@arcgis/core 4.34.0-next.75 → 4.34.0-next.77
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/Basemap.js +1 -1
- package/Ground.js +1 -1
- package/applications/Components/arcadeEditorUtils.d.ts +4 -0
- package/applications/Components/arcadeEditorUtils.js +5 -0
- package/applications/Components/featureUtils.d.ts +1 -0
- package/applications/Components/featureUtils.js +1 -1
- package/arcade/Feature.js +1 -1
- package/arcade/Pixel.js +1 -1
- package/arcade/Voxel.js +1 -1
- package/arcade/arcadeAsyncRuntime.js +1 -1
- package/arcade/arcadeCompiler.js +1 -1
- package/arcade/arcadeRuntime.js +1 -1
- package/arcade/featureset/support/FeatureSetIterator.js +1 -1
- package/arcade/functions/feature.js +1 -1
- package/arcade/functions/featuresetbase.js +1 -1
- package/arcade/functions/geometry.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/025f1d78dfa5ec93178b.js +1 -0
- package/assets/esri/core/workers/chunks/050429f516149ce3b517.js +1 -0
- package/assets/esri/core/workers/chunks/0652d7e525d99e39c957.js +1 -0
- package/assets/esri/core/workers/chunks/0668eee42b3169e1bf66.js +1 -0
- package/assets/esri/core/workers/chunks/07a355a9c95154971aab.js +1 -0
- package/assets/esri/core/workers/chunks/0dd6b8b3e634bb5f0ca7.js +1 -0
- package/assets/esri/core/workers/chunks/124f8757ea18bfd158ec.js +1 -0
- package/assets/esri/core/workers/chunks/16d66770ef841564ee3f.js +1 -0
- package/assets/esri/core/workers/chunks/17103e6542aae53c7301.js +1 -0
- package/assets/esri/core/workers/chunks/1990162dcf73601d54f7.js +1 -0
- package/assets/esri/core/workers/chunks/{5c30252c1bb8350cae5f.js → 1c52999a6392370844a6.js} +1 -1
- package/assets/esri/core/workers/chunks/20850b0fdb55fb17bc90.js +1 -0
- package/assets/esri/core/workers/chunks/{6a1b652ccbf58ac44658.js → 23e17b745adf71a5efc7.js} +1 -1
- package/assets/esri/core/workers/chunks/2605062e44f2d4e73f14.js +1 -0
- package/assets/esri/core/workers/chunks/29a86d51407310bb7745.js +1 -0
- package/assets/esri/core/workers/chunks/2a2a925c45d5fd58628b.js +1 -0
- package/assets/esri/core/workers/chunks/2fe96bf7dedef11a3b63.js +1 -0
- package/assets/esri/core/workers/chunks/3452ba299f6ce0582f09.js +1 -0
- package/assets/esri/core/workers/chunks/36a006c55766f9540bfc.js +1 -0
- package/assets/esri/core/workers/chunks/{18641332bee3e9b9c44a.js → 388482cea4b9fdeaf06e.js} +1 -1
- package/assets/esri/core/workers/chunks/3b23c37e5bc552dc81d4.js +1 -0
- package/assets/esri/core/workers/chunks/{9325000c87295c473291.js → 3b2ef975831eb75b40fb.js} +1 -1
- package/assets/esri/core/workers/chunks/3ff3e1507220d3869c76.js +1 -0
- package/assets/esri/core/workers/chunks/43818bf53dd5445a7bdb.js +1 -0
- package/assets/esri/core/workers/chunks/4823e4522bd7379d858e.js +1 -0
- package/assets/esri/core/workers/chunks/49e6202da7a20f06c661.js +353 -0
- package/assets/esri/core/workers/chunks/4d47187bc0821413492d.js +1 -0
- package/assets/esri/core/workers/chunks/{b818b5e392d5eb7c7e70.js → 4e6e8dda6c12f6fbed8e.js} +1 -1
- package/assets/esri/core/workers/chunks/5019f1b8186a65a0313b.js +1 -0
- package/assets/esri/core/workers/chunks/5102c20645d9708c34b4.js +1 -0
- package/assets/esri/core/workers/chunks/512dcd6e34e217029391.js +1 -0
- package/assets/esri/core/workers/chunks/5248581d23ada240c78d.js +1 -0
- package/assets/esri/core/workers/chunks/614a00a3179f8fe23f45.js +1 -0
- package/assets/esri/core/workers/chunks/{e12e8d69c05c182b6a69.js → 61bb39597ccf89f99a72.js} +1 -1
- package/assets/esri/core/workers/chunks/{5477ff0ce432c9e5b3ab.js → 6201356f7f91e5c06425.js} +1 -1
- package/assets/esri/core/workers/chunks/6271a706ac3fcba91432.js +1 -0
- package/assets/esri/core/workers/chunks/6593b419339e7598b760.js +1 -0
- package/assets/esri/core/workers/chunks/{51ddda291bbbf5db9905.js → 65e279516170ddbd4a65.js} +1 -1
- package/assets/esri/core/workers/chunks/67fdc8074cdcf374af9a.js +1 -0
- package/assets/esri/core/workers/chunks/6dafb2b95bae552c1cc2.js +1 -0
- package/assets/esri/core/workers/chunks/7680d4d739f7aa3f7ae1.js +1 -0
- package/assets/esri/core/workers/chunks/7889a909394c61a9d3e0.js +1 -0
- package/assets/esri/core/workers/chunks/79e965e8f7cf822b4f45.js +1 -0
- package/assets/esri/core/workers/chunks/804e3b3df375177e6c86.js +1 -0
- package/assets/esri/core/workers/chunks/81a8addcb858086ff9ee.js +1 -0
- package/assets/esri/core/workers/chunks/83065bef261314f9b2c5.js +1 -0
- package/assets/esri/core/workers/chunks/8a5e40f48a8265fd1b42.js +1 -0
- package/assets/esri/core/workers/chunks/8bd6c27a93a697a7fa3d.js +1 -0
- package/assets/esri/core/workers/chunks/8c94448a44fb27054a22.js +1 -0
- package/assets/esri/core/workers/chunks/92d0e0155563c6355079.js +1 -0
- package/assets/esri/core/workers/chunks/930322c9790572bd0c49.js +1 -0
- package/assets/esri/core/workers/chunks/96a14689815bec741308.js +1 -0
- package/assets/esri/core/workers/chunks/97d71459ad72b4b780a3.js +1 -0
- package/assets/esri/core/workers/chunks/9835c579edfc08125d31.js +1 -0
- package/assets/esri/core/workers/chunks/9971de3f38a55735cec9.js +1 -0
- package/assets/esri/core/workers/chunks/99ac292a858bbedc6a89.js +1 -0
- package/assets/esri/core/workers/chunks/9ce599dc1d385e6893c1.js +1 -0
- package/assets/esri/core/workers/chunks/{fec572f03f9514244972.js → a05a7df07b74e1957538.js} +1 -1
- package/assets/esri/core/workers/chunks/a0edff37fd4a3f2cb2eb.js +1 -0
- package/assets/esri/core/workers/chunks/a7e649b3b02e664ada80.js +1 -0
- package/assets/esri/core/workers/chunks/a8a79a5c804ef715aa94.js +1 -0
- package/assets/esri/core/workers/chunks/{10ec10ca361842efce92.js → ab005fe84952f0676020.js} +1 -1
- package/assets/esri/core/workers/chunks/acb49f3d2b783e81a215.js +1 -0
- package/assets/esri/core/workers/chunks/adc61d88c3c6936ad75a.js +1 -0
- package/assets/esri/core/workers/chunks/afa3ca2bd2648774f133.js +1 -0
- package/assets/esri/core/workers/chunks/afb76f9d6abedef771df.js +1 -0
- package/assets/esri/core/workers/chunks/b168b6ffc16cd509d316.js +1 -0
- package/assets/esri/core/workers/chunks/b19d723d09f5bea9ca27.js +1 -0
- package/assets/esri/core/workers/chunks/b246ed6d86c2c8df56fb.js +1 -0
- package/assets/esri/core/workers/chunks/b4a053063e6022080d31.js +1 -0
- package/assets/esri/core/workers/chunks/b4ba7f8ea81522ad1e2e.js +1 -0
- package/assets/esri/core/workers/chunks/b8d02f1b73c374767a5f.js +1 -0
- package/assets/esri/core/workers/chunks/b97f224972f1b1abaee8.js +1 -0
- package/assets/esri/core/workers/chunks/b9e725d2b5a7d0132663.js +1 -0
- package/assets/esri/core/workers/chunks/ba6452acee3d6defb37e.js +1 -0
- package/assets/esri/core/workers/chunks/bbb3b32affde9ea78534.js +1 -0
- package/assets/esri/core/workers/chunks/bbb585f0b484ab5eabb3.js +1 -0
- package/assets/esri/core/workers/chunks/bc83bcfe123525d21884.js +1 -0
- package/assets/esri/core/workers/chunks/c799f1c03cb22ef52f5f.js +1 -0
- package/assets/esri/core/workers/chunks/cac5732f9dfece4bf2c5.js +1 -0
- package/assets/esri/core/workers/chunks/cafc19bf2caaf7a8c2e8.js +1 -0
- package/assets/esri/core/workers/chunks/cc7423413747566f56e2.js +1 -0
- package/assets/esri/core/workers/chunks/ccd157ede169b93eea65.js +1 -0
- package/assets/esri/core/workers/chunks/ce0bf0d0cd9e9a90093b.js +1 -0
- package/assets/esri/core/workers/chunks/ce49ff6bf20cff349726.js +1 -0
- package/assets/esri/core/workers/chunks/d1657a29321adb259166.js +1 -0
- package/assets/esri/core/workers/chunks/d2b69f91eb85b561fe01.js +1 -0
- package/assets/esri/core/workers/chunks/d51e8eeb1e1eb0605cc9.js +1 -0
- package/assets/esri/core/workers/chunks/d69bd6b5d781a6c527d1.js +1 -0
- package/assets/esri/core/workers/chunks/d7fc8ea2ff527a09f4b9.js +1 -0
- package/assets/esri/core/workers/chunks/d8494617cebc68e50d35.js +1 -0
- package/assets/esri/core/workers/chunks/d89832617bac4890893e.js +1 -0
- package/assets/esri/core/workers/chunks/{d55c55d39a253630d228.js → db2396bf062468ee8b60.js} +1 -1
- package/assets/esri/core/workers/chunks/e4833b718a813a8d125b.js +1 -0
- package/assets/esri/core/workers/chunks/{b5f197e24982f6e14468.js → e7af5caab9aa9b6a12e3.js} +3 -3
- package/assets/esri/core/workers/chunks/e81386199a6db9a50fd3.js +1 -0
- package/assets/esri/core/workers/chunks/ecac5ca00c742bfb5898.js +1 -0
- package/assets/esri/core/workers/chunks/f45c343527709f6f91c2.js +1 -0
- package/assets/esri/core/workers/chunks/f5710ced8d38f9a90fc5.js +1 -0
- package/assets/esri/core/workers/chunks/f592c4e5e1746d4619db.js +1 -0
- package/assets/esri/core/workers/chunks/f8d2c52cc51d5f1bbce2.js +1 -0
- package/assets/esri/core/workers/chunks/{0d946a226b846b3c0849.js → fc06014fb484fc8c697e.js} +1 -1
- package/assets/esri/core/workers/chunks/feed74ed275f21a68a1b.js +1 -0
- package/assets/esri/core/workers/chunks/ffee8cc83d703c1dc0c0.js +1 -0
- package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
- package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
- package/chunks/Compositing.glsl.js +4 -3
- package/chunks/cameraUtilsSpherical.js +1 -1
- package/chunks/lyr3DMain.js +1 -1
- package/chunks/lyr3DWorker.js +1 -1
- package/config.js +1 -1
- package/core/sql.d.ts +1 -0
- package/geometry/support/heightModelInfoUtils.js +1 -1
- package/geometry/support/normalizeUtils.js +1 -1
- package/geometry/support/spatialReferenceUtils.js +1 -1
- package/interfaces.d.ts +45 -0
- package/kernel.js +1 -1
- package/layers/GaussianSplatLayer.js +1 -1
- package/layers/Layer.js +1 -1
- package/layers/Lyr3DWasmPerSceneView.js +1 -1
- package/layers/Lyr3DWorkerHandle.js +1 -1
- package/layers/catalog/catalogUtils.js +1 -1
- package/layers/mixins/ScaleRangeLayer.js +1 -1
- package/layers/support/tiles3DUtils.js +1 -1
- package/networks/CircuitManager.js +1 -1
- package/networks/support/Circuit.js +1 -1
- package/networks/support/CircuitSection.js +1 -1
- package/networks/support/Subcircuit.js +1 -1
- package/package.json +1 -1
- package/support/LayersMixin.js +1 -1
- package/support/TablesMixin.js +1 -1
- package/support/arcadeUtils.js +1 -1
- package/support/modeUtils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/support/symbolUtils.js +1 -1
- package/views/2d/layers/MediaLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementTool.js +1 -1
- package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
- package/views/3d/layers/Lyr3DWorker.js +1 -1
- package/views/3d/layers/i3s/PointCloudRenderer.js +1 -1
- package/views/3d/support/cameraUtils.js +1 -1
- package/views/3d/support/cameraUtilsSpherical.js +1 -1
- package/{layers/support/GaussianSplatAtlasPageAllocator.js → views/3d/support/gaussianSplatting/GaussianSplatAtlasPages.js} +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +5 -0
- package/views/3d/support/gaussianSplatting/GaussianSplatOrderTexture.js +5 -0
- package/views/3d/support/gaussianSplatting/GaussianSplatTextureAtlas.js +5 -0
- package/views/3d/support/gaussianSplatting/GaussianTile.js +5 -0
- package/views/3d/terrain/OverlayManager.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js +12 -13
- package/views/3d/webgl-engine/lib/CompositingHelper.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/strokes.js +1 -1
- package/views/3d/webgl-engine/materials/stippleTextureRepository.js +1 -1
- package/views/3d/webgl-engine/shaders/CompositingTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/CompositingTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/LineOffset.glsl.js +10 -11
- package/views/VideoView.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileTool.js +1 -1
- package/widgets/Feature/support/arcadeFeatureUtils.js +1 -1
- package/widgets/support/widget.js +1 -1
- package/assets/esri/core/workers/chunks/03fac1122eb73bb14d2d.js +0 -1
- package/assets/esri/core/workers/chunks/0434a490326c0de47c22.js +0 -1
- package/assets/esri/core/workers/chunks/0618ea8bf9da93d713b1.js +0 -1
- package/assets/esri/core/workers/chunks/06b65105b15abf4d0fbf.js +0 -1
- package/assets/esri/core/workers/chunks/06bd58c219678315cf5c.js +0 -1
- package/assets/esri/core/workers/chunks/0751f539db31bdb5caec.js +0 -1
- package/assets/esri/core/workers/chunks/0b71100fa1e7ca706dbb.js +0 -1
- package/assets/esri/core/workers/chunks/181b3564a0e3939020bc.js +0 -1
- package/assets/esri/core/workers/chunks/19228ab0fe7944c554e5.js +0 -1
- package/assets/esri/core/workers/chunks/199a17b0a0f75cbaed16.js +0 -1
- package/assets/esri/core/workers/chunks/19c1f1431c0b2f4525a2.js +0 -1
- package/assets/esri/core/workers/chunks/28a2f74d4a449386d082.js +0 -1
- package/assets/esri/core/workers/chunks/2a19a4d7d1c580121065.js +0 -1
- package/assets/esri/core/workers/chunks/2afafaf40293d5ab1d8e.js +0 -1
- package/assets/esri/core/workers/chunks/2c399991e8627baa51b3.js +0 -1
- package/assets/esri/core/workers/chunks/2f44848916051f5501eb.js +0 -1
- package/assets/esri/core/workers/chunks/356c96fad88558be9054.js +0 -1
- package/assets/esri/core/workers/chunks/37ff19a9c5c99bd4e7c7.js +0 -1
- package/assets/esri/core/workers/chunks/38e7d1c6987aaa9b520b.js +0 -1
- package/assets/esri/core/workers/chunks/3bf99037befdedd75cb4.js +0 -1
- package/assets/esri/core/workers/chunks/3d2629357242492afcfa.js +0 -1
- package/assets/esri/core/workers/chunks/3e9c3e7c5cf7c0afbc80.js +0 -1
- package/assets/esri/core/workers/chunks/3fecfe4f8ca2a5fd7360.js +0 -1
- package/assets/esri/core/workers/chunks/43095bed5456251940b9.js +0 -1
- package/assets/esri/core/workers/chunks/433c4dc666a6b2c99063.js +0 -353
- package/assets/esri/core/workers/chunks/451761c7bd2da530e1d0.js +0 -1
- package/assets/esri/core/workers/chunks/48449abe795cb7a831eb.js +0 -1
- package/assets/esri/core/workers/chunks/4bc091770bab38874848.js +0 -1
- package/assets/esri/core/workers/chunks/52286d4135b8395a3400.js +0 -1
- package/assets/esri/core/workers/chunks/540506802776f77e47f3.js +0 -1
- package/assets/esri/core/workers/chunks/56f54d007b0da0d908aa.js +0 -1
- package/assets/esri/core/workers/chunks/5879cebb22157b0b4998.js +0 -1
- package/assets/esri/core/workers/chunks/5c4ba165816809e06340.js +0 -1
- package/assets/esri/core/workers/chunks/5f239972cb95afdfa77a.js +0 -1
- package/assets/esri/core/workers/chunks/61896e64e9ef49b4bb1b.js +0 -1
- package/assets/esri/core/workers/chunks/6531f33d6710960079e9.js +0 -1
- package/assets/esri/core/workers/chunks/6963ded8428cc8d51d85.js +0 -1
- package/assets/esri/core/workers/chunks/6c3ae96c6ef764fb9552.js +0 -1
- package/assets/esri/core/workers/chunks/6e59ba2afd444eb4be18.js +0 -1
- package/assets/esri/core/workers/chunks/7430c462c350fdd26349.js +0 -1
- package/assets/esri/core/workers/chunks/76ec3d2646ba64e3442f.js +0 -1
- package/assets/esri/core/workers/chunks/7aaa6b318195d7342e6c.js +0 -1
- package/assets/esri/core/workers/chunks/7e746427375e83fc4351.js +0 -1
- package/assets/esri/core/workers/chunks/810e4c16c6eae420508b.js +0 -1
- package/assets/esri/core/workers/chunks/8b587affaaa0b1e4368c.js +0 -1
- package/assets/esri/core/workers/chunks/8bc8caa384b24af12411.js +0 -1
- package/assets/esri/core/workers/chunks/8e428b0f33ef4688415e.js +0 -1
- package/assets/esri/core/workers/chunks/8fc13e0e1a5a8f3e4798.js +0 -1
- package/assets/esri/core/workers/chunks/90540fdfb0c5f68aa959.js +0 -1
- package/assets/esri/core/workers/chunks/925ad2665c2fe0f47cc3.js +0 -1
- package/assets/esri/core/workers/chunks/92d5b0559e128d62fbda.js +0 -1
- package/assets/esri/core/workers/chunks/9304c3cdf732745577fd.js +0 -1
- package/assets/esri/core/workers/chunks/93b2e0a300b2758a1ca4.js +0 -1
- package/assets/esri/core/workers/chunks/9421389888d4d9e4e809.js +0 -1
- package/assets/esri/core/workers/chunks/98c94a99e2e04d5ae65f.js +0 -1
- package/assets/esri/core/workers/chunks/9c35860439948638cb8f.js +0 -1
- package/assets/esri/core/workers/chunks/a0a519f498e9ea7623ff.js +0 -1
- package/assets/esri/core/workers/chunks/a25b75de1bca1dd21941.js +0 -1
- package/assets/esri/core/workers/chunks/a2baeb9fa805c3537049.js +0 -1
- package/assets/esri/core/workers/chunks/a33e1a031ba9f028023d.js +0 -1
- package/assets/esri/core/workers/chunks/ad3ebd4f05cc673140f3.js +0 -1
- package/assets/esri/core/workers/chunks/b03dcbc31bccb9fdf9fe.js +0 -1
- package/assets/esri/core/workers/chunks/b0de01f8c9b1c3182e0c.js +0 -1
- package/assets/esri/core/workers/chunks/b6c6f82df3b60c2f831f.js +0 -1
- package/assets/esri/core/workers/chunks/b7f5a26ff3a73c64552d.js +0 -1
- package/assets/esri/core/workers/chunks/bd2dc1282c49125ede89.js +0 -1
- package/assets/esri/core/workers/chunks/bd4e64d6e73cd4db9695.js +0 -1
- package/assets/esri/core/workers/chunks/c07507a42def2bd2a222.js +0 -1
- package/assets/esri/core/workers/chunks/c34a164a8ece4cb33e81.js +0 -1
- package/assets/esri/core/workers/chunks/c7ba8f2aca0fbd6ceded.js +0 -1
- package/assets/esri/core/workers/chunks/c908184d747d33366881.js +0 -1
- package/assets/esri/core/workers/chunks/d1711256493d55eca523.js +0 -1
- package/assets/esri/core/workers/chunks/e086b835a98b71a46825.js +0 -1
- package/assets/esri/core/workers/chunks/e3f2cdf5d71a7040894b.js +0 -1
- package/assets/esri/core/workers/chunks/e54df2128039425a9090.js +0 -1
- package/assets/esri/core/workers/chunks/e58c5c8639aa837c84d1.js +0 -1
- package/assets/esri/core/workers/chunks/e6e4e2fb9568319c6207.js +0 -1
- package/assets/esri/core/workers/chunks/e92d9e0ac789bcf1cdf4.js +0 -1
- package/assets/esri/core/workers/chunks/eb0a5d592f5805836203.js +0 -1
- package/assets/esri/core/workers/chunks/eccb4550edc4752cf41a.js +0 -1
- package/assets/esri/core/workers/chunks/ee391a41144855fc625d.js +0 -1
- package/assets/esri/core/workers/chunks/f060a52a9b69eb250d63.js +0 -1
- package/assets/esri/core/workers/chunks/f3ef59991c577ff5e825.js +0 -1
- package/assets/esri/core/workers/chunks/f749e2a89a14ab89ae59.js +0 -1
- package/assets/esri/core/workers/chunks/f7f5c4f30e5a0ddbf9a4.js +0 -1
- package/assets/esri/core/workers/chunks/fb0f729eff2f2911d6c3.js +0 -1
- package/assets/esri/core/workers/chunks/fdf2b980e8a8aa47ce91.js +0 -1
- package/assets/esri/core/workers/chunks/fe24c6d61a50898549a5.js +0 -1
- package/layers/support/gaussianSplatUtils.js +0 -5
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2763,8256],{4146:(e,t,n)=>{n.d(t,{A:()=>v});var r=n(31635),i=n(78888),o=n(49186),s=n(65529),a=n(4902),l=n(92474),c=n(53966),u=n(74887),h=n(84952),p=n(10107),d=(n(44208),n(87811),n(40608)),f=n(5443),m=n(16930),g=n(92602),y=n(79677);let x=0,v=class extends((0,s.Zt)((0,a.sA)(l.x_))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new f.A(-180,-90,180,90,m.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+x++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=m.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await n.e(7982).then(n.bind(n,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:r}=await n.e(5613).then(n.bind(n,45613));try{return await r(t)}catch(e){const n=t?.portalItem,r=n?.id||"unset",i=n?.portal?.url||g.A.portalUrl;throw c.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+i+"', id: '"+r+"')",e),e}}(e)}initialize(){this.when().catch(e=>{(0,u.zf)(e)||c.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})})}destroy(){const e=this.parent;if(e){const t=this;"layers"in e&&e.layers.includes(t)?e.layers.remove(t):"tables"in e&&e.tables.includes(t)?e.tables.remove(t):"baseLayers"in e&&e.baseLayers.includes(t)?e.baseLayers.remove(t):"groundLayers"in e&&e.groundLayers.includes(t)?e.groundLayers.remove(t):"referenceLayers"in e&&e.referenceLayers.includes(t)&&e.referenceLayers.remove(t),this._set("parent",null)}}get effectiveVisible(){let e=this.visible;const t=this.parent;return e&&t&&"effectiveVisible"in t&&(e&&=t.effectiveVisible),e}get hasAttributionData(){return null!=this.attributionDataUrl}get loaded(){return super.loaded}get parsedUrl(){return(0,h.An)(this.url)}createLayerView(e,t){return Promise.reject(new o.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,i.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new o.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,r.Cg)([(0,p.MZ)({type:String})],v.prototype,"attributionDataUrl",void 0),(0,r.Cg)([(0,p.MZ)({readOnly:!0})],v.prototype,"effectiveVisible",null),(0,r.Cg)([(0,p.MZ)({type:f.A})],v.prototype,"fullExtent",void 0),(0,r.Cg)([(0,p.MZ)({readOnly:!0})],v.prototype,"hasAttributionData",null),(0,r.Cg)([(0,p.MZ)({type:String,clonable:!1})],v.prototype,"id",void 0),(0,r.Cg)([(0,p.MZ)({type:Boolean,nonNullable:!0})],v.prototype,"legendEnabled",void 0),(0,r.Cg)([(0,p.MZ)({type:["show","hide","hide-children"]})],v.prototype,"listMode",void 0),(0,r.Cg)([(0,p.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],v.prototype,"opacity",void 0),(0,r.Cg)([(0,p.MZ)({clonable:!1})],v.prototype,"parent",void 0),(0,r.Cg)([(0,p.MZ)({readOnly:!0})],v.prototype,"parsedUrl",null),(0,r.Cg)([(0,p.MZ)({type:Boolean,readOnly:!0})],v.prototype,"persistenceEnabled",void 0),(0,r.Cg)([(0,p.MZ)({type:Boolean})],v.prototype,"popupEnabled",void 0),(0,r.Cg)([(0,p.MZ)({type:Boolean})],v.prototype,"attributionVisible",void 0),(0,r.Cg)([(0,p.MZ)({type:m.A})],v.prototype,"spatialReference",void 0),(0,r.Cg)([(0,p.MZ)({type:String})],v.prototype,"title",void 0),(0,r.Cg)([(0,p.MZ)({readOnly:!0,json:{read:!1}})],v.prototype,"type",void 0),(0,r.Cg)([(0,p.MZ)()],v.prototype,"url",void 0),(0,r.Cg)([(0,p.MZ)({type:y.A})],v.prototype,"visibilityTimeExtent",void 0),(0,r.Cg)([(0,p.MZ)({type:Boolean,nonNullable:!0})],v.prototype,"visible",void 0),v=(0,r.Cg)([(0,d.$)("esri.layers.Layer")],v)},4902:(e,t,n)=>{n.d(t,{PH:()=>a,sA:()=>s});var r=n(31635),i=n(40608);let o=0;const s=e=>{const t=e;let n=class extends t{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+o++})}};return n=(0,r.Cg)([(0,i.$)("esri.core.Identifiable")],n),n},a=e=>{const t=e;let n=class extends t{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:o++})}};return n=(0,r.Cg)([(0,i.$)("esri.core.Identifiable.NumericIdentifiable")],n),n};s(class{})},6518:(e,t,n)=>{n.d(t,{F:()=>a});var r=n(44208),i=n(75503),o=n(19419);const s={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new i.wq(9,(0,r.A)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach((n,r)=>{e[t++]=r}),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter(e=>this._idByBounds.has(e))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,o.Ie)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,n){(function(e){s.minX=e[0],s.minY=e[1],s.maxX=e[2],s.maxY=e[3]})(t),e.search(s,n)}(this._index,e,e=>t(this._idByBounds.get(e)))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},8303:(e,t,n)=>{n.d(t,{A:()=>M});var r=n(31635),i=n(92602),o=n(70333),s=n(78888),a=n(60999),l=n(49186),c=n(53966),u=n(97768),h=n(74887),p=n(84952),d=n(10107),f=(n(44208),n(87811),n(36005)),m=n(40608),g=n(43937),y=n(77548),x=n(20655),v=n(80812),w=n(41318),_=n(10407);const M=e=>{const t=e;let M=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,u.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,n){if(t.itemId)return new v.default({id:t.itemId,portal:n?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:r}=await n.e(1204).then(n.bind(n,41204));return(0,h.Te)(t),await r({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,h.zf)(e)||c.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch(e=>((0,h.QP)(e),!0)))}async setUserPrivileges(e,t){if(!i.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:n,fullEdit:r},content:{updateItem:i}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",n),this._set("userHasFullEditingPrivileges",r),this._set("userHasUpdateItemPrivileges",i)}catch(e){(0,h.QP)(e)}}async _fetchUserPrivileges(e,t){let n=this.portalItem;if(!e||!n||!n.loaded||n.sourceUrl)return this._fetchFallbackUserPrivileges(t);const r=!o.id?.findCredential(this.url),i=e===n.id;if(i&&n.portal.user)return this._getUserPrivileges(n,r);let s,a;if(i)s=n.portal.url;else try{s=await(0,y.wI)(this.url,t)}catch(e){(0,h.QP)(e)}if(!s||!(0,p.b8)(s,n.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;a=await(o.id?.getCredential(`${s}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,h.QP)(e)}const l=!0,c=!1,u=!1;if(!a)return{features:{edit:l,fullEdit:c},content:{updateItem:u}};try{if(i?await n.reload():(n=new v.default({id:e,portal:{url:s}}),await n.load(t)),n.portal.user)return this._getUserPrivileges(n,r)}catch(e){(0,h.QP)(e)}return{features:{edit:l,fullEdit:c},content:{updateItem:u}}}_getUserPrivileges(e,t){const n=(0,_.It)(e);return t&&(n.features.edit=!0),n}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,h.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?o.id?.findCredential(this.url):null;if(!t)return!0;const n=b.credential===t?b.user:await this._fetchEditingUser(e);return b.credential=t,b.user=n,null==n?.privileges||n.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const n=o.id?.findServerInfo(this.url??"");if(!n?.owningSystemUrl)return null;const r=`${n.owningSystemUrl}/sharing/rest`,i=x.A.getDefault();if(i&&i.loaded&&(0,p.S8)(i.restUrl)===(0,p.S8)(r))return i.user;const l=`${r}/community/self`,c=null!=e?e.signal:null,u=await(0,a.Ke)((0,s.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:c}));return u.ok?w.A.fromJSON(u.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const n=t?.portal,r=this.portalItem?.id&&(this.portalItem.portal||x.A.getDefault());return n&&r&&!(0,p.ut)(r.restUrl,n.restUrl)?(t.messages&&t.messages.push(new l.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,r.Cg)([(0,d.MZ)({type:v.default})],M.prototype,"portalItem",null),(0,r.Cg)([(0,f.w)("web-document","portalItem",["itemId"])],M.prototype,"readPortalItem",null),(0,r.Cg)([(0,g.K)("web-document","portalItem",{itemId:{type:String}})],M.prototype,"writePortalItem",null),(0,r.Cg)([(0,d.MZ)({clonable:!1})],M.prototype,"resourceReferences",void 0),(0,r.Cg)([(0,d.MZ)({type:Boolean,readOnly:!0})],M.prototype,"userHasEditingPrivileges",void 0),(0,r.Cg)([(0,d.MZ)({type:Boolean,readOnly:!0})],M.prototype,"userHasFullEditingPrivileges",void 0),(0,r.Cg)([(0,d.MZ)({type:Boolean,readOnly:!0})],M.prototype,"userHasUpdateItemPrivileges",void 0),M=(0,r.Cg)([(0,m.$)("esri.layers.mixins.PortalLayer")],M),M},b={credential:null,user:null}},11006:(e,t,n)=>{function r(e,t,n,r,o){i(e,t,n||0,r||e.length-1,o||s)}function i(e,t,n,r,s){for(;r>n;){if(r-n>600){var a=r-n+1,l=t-n+1,c=Math.log(a),u=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*u*(a-u)/a)*(l-a/2<0?-1:1);i(e,t,Math.max(n,Math.floor(t-l*u/a+h)),Math.min(r,Math.floor(t+(a-l)*u/a+h)),s)}var p=e[t],d=n,f=r;for(o(e,n,t),s(e[r],p)>0&&o(e,n,r);d<f;){for(o(e,d,f),d++,f--;s(e[d],p)<0;)d++;for(;s(e[f],p)>0;)f--}0===s(e[n],p)?o(e,n,f):o(e,++f,r),f<=t&&(n=f+1),t<=f&&(r=f-1)}}function o(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function s(e,t){return e<t?-1:e>t?1:0}n.d(t,{q:()=>r})},13069:(e,t,n)=>{n.d(t,{AG:()=>a,lk:()=>i,vD:()=>s,yS:()=>o});const r="randomUUID"in crypto;function i(){if(r)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function o(){return`{${i().toUpperCase()}}`}function s(){return`{${i()}}`}function a(e){const t=e.toUpperCase();return e.startsWith("{")?t:`{${t}}`}},16494:(e,t,n)=>{n.d(t,{W5:()=>s});var r=n(37330);const i=["dd","dl","dt","h1","h2","h3","h4","h5","h6","sub","sup","animate","animatetransform","circle","clippath","defs","ellipse","g","image","line","lineargradient","marker","mask","path","pattern","polygon","polyline","radialgradient","rect","stop","svg","switch","symbol","text","textpath","tspan","use"].reduce((e,t)=>(e[t]=[],e),{}),o=["align","alink","alt","bgcolor","border","cellpadding","cellspacing","class","color","cols","colspan","coords","d","dir","face","height","hspace","ismap","lang","marginheight","marginwidth","multiple","nohref","noresize","noshade","nowrap","ref","rel","rev","rows","rowspan","scrolling","shape","span","summary","tabindex","title","usemap","valign","value","vlink","vspace","width"],s=new r.I({whiteList:i,onTagAttr:(e,t,n)=>{const r=`${t}="${n}"`;if(o.includes(t))return r},stripIgnoreTag:!0,stripIgnoreTagBody:["script","style"]},!0)},19647:(e,t,n)=>{n.r(t),n.d(t,{default:()=>et});var r=n(31635),i=n(7762),o=n(49186),s=n(53966),a=n(92071),l=n(74887),c=n(10107),u=n(79901),h=(n(44208),n(87811),n(36005)),p=n(40608),d=n(43937),f=n(4146),m=n(63074),g=n(16131),y=n(8303),x=n(25036),v=n(69540),w=n(25482),_=n(77690),M=n(29242),b=n(37585),A=n(38954);const C=(0,n(51850).vt)(),P=(0,M.vt)(),I=(0,M.vt)(),S=(0,M.vt)();function O(e,t,n){return(0,A.i)(C,t[0],t[1],1),(0,A.o)(C,C,(0,_.mg)(P,n)),0===C[2]?(0,b.hZ)(e,C[0],C[1]):(0,b.hZ)(e,C[0]/C[2],C[1]/C[2])}function R(e,t,n){return E(I,t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7]),E(S,n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7]),(0,_.lw)(e,(0,_.KC)(I,I),S),0!==e[8]&&(e[0]/=e[8],e[1]/=e[8],e[2]/=e[8],e[3]/=e[8],e[4]/=e[8],e[5]/=e[8],e[6]/=e[8],e[7]/=e[8],e[8]/=e[8]),e}function E(e,t,n,r,i,o,s,a,l){(0,_.hZ)(e,t,r,o,n,i,s,1,1,1),(0,A.i)(C,a,l,1),(0,_.KC)(P,e);const[c,u,h]=(0,A.o)(C,C,(0,_.mg)(P,P));return(0,_.hZ)(P,c,0,0,0,u,0,0,0,h),(0,_.lw)(e,P,e)}var T=n(90629),L=n(48163),Z=n(86738),B=n(39829),j=n(98988),$=n(16930);let U=class extends v.Pw{projectOrWarn(e,t){if(null==e)return e;const{geometry:n,pending:r}=(0,j.projectOrLoad)(e,t);return r?null:r||n?n:(s.A.getLogger(this).warn("geometry could not be projected to the spatial reference",{georeference:this,geometry:e,sourceSpatialReference:e.spatialReference,targetSpatialReference:t}),null)}};U=(0,r.Cg)([(0,p.$)("esri.layers.support.GeoreferenceBase")],U);const N=(0,M.vt)(),Y=(0,L.vt)();let X=class extends w.o{};(0,r.Cg)([(0,c.MZ)({type:Number,json:{write:{isRequired:!0}}})],X.prototype,"x",void 0),(0,r.Cg)([(0,c.MZ)({type:Number,json:{write:{isRequired:!0}}})],X.prototype,"y",void 0),X=(0,r.Cg)([(0,p.$)("esri.layers.support.ControlPointsGeoreference.ControlPointJSONType")],X);let F=class extends v.Pw{constructor(){super(...arguments),this.sourcePoint=null,this.mapPoint=null}};(0,r.Cg)([(0,c.MZ)()],F.prototype,"sourcePoint",void 0),(0,r.Cg)([(0,c.MZ)({type:Z.A})],F.prototype,"mapPoint",void 0),F=(0,r.Cg)([(0,p.$)("esri.layers.support.ControlPointsGeoreference.ControlPoint")],F);let k=class extends((0,w.T)(U)){constructor(e){super(e),this.controlPoints=null,this.height=0,this.type="control-points",this.width=0}readControlPoints(e,t){const n=$.A.fromJSON(t.spatialReference),r=(0,M.fA)(...t.coefficients,1);return e.map(e=>((0,b.hZ)(Y,e.x,e.y),O(Y,Y,r),{sourcePoint:e,mapPoint:new Z.A({x:Y[0],y:Y[1],spatialReference:n})}))}writeControlPoints(e,t,n,r){if(null==this.transform){const e=new o.A("web-document-write:invalid-georeference","Invalid 'controlPoints', 'width', 'height' configuration. Make sure the parent media element is loaded i.e. the ImageElement or VideoElement set as 'MediaLayer.source'.",{layer:r?.layer,georeference:this});return void(r?.messages?r.messages.push(e):s.A.getLogger(this).error(e.name,e.message))}null!=e&&H(e[0])&&(t.controlPoints=e.map(e=>{const t=e.sourcePoint;return{x:t.x,y:t.y}}),t.spatialReference=e[0].mapPoint.spatialReference.toJSON(),t.coefficients=this.transform.slice(0,8))}get coords(){if(null==this.controlPoints)return null;const e=this._updateTransform(N);if(null==e||!H(this.controlPoints[0]))return null;const t=this.controlPoints[0].mapPoint.spatialReference;return function(e,t,n,r){const i=(0,L.fA)(0,n),o=(0,L.fA)(0,0),s=(0,L.fA)(t,0),a=(0,L.fA)(t,n);return O(i,i,e),O(o,o,e),O(s,s,e),O(a,a,e),new B.A({rings:[[i,o,s,a,i]],spatialReference:r})}(e,this.width,this.height,t)}set coords(e){if(null==this.controlPoints||!H(this.controlPoints[0]))return;const t=this.controlPoints[0].mapPoint.spatialReference;if(null==(e=this.projectOrWarn(e,t)))return;const{width:n,height:r}=this,{rings:[[i,o,s,a]]}=e,l={sourcePoint:(0,T.tc)(0,r),mapPoint:new Z.A({x:i[0],y:i[1],spatialReference:t})},c={sourcePoint:(0,T.tc)(0,0),mapPoint:new Z.A({x:o[0],y:o[1],spatialReference:t})},u={sourcePoint:(0,T.tc)(n,0),mapPoint:new Z.A({x:s[0],y:s[1],spatialReference:t})},h={sourcePoint:(0,T.tc)(n,r),mapPoint:new Z.A({x:a[0],y:a[1],spatialReference:t})};H(l)&&H(c)&&H(u)&&H(h)&&(te(N,l,c,u,h),this.controlPoints=this.controlPoints.map(({sourcePoint:e})=>((0,b.hZ)(Y,e.x,e.y),O(Y,Y,N),{sourcePoint:e,mapPoint:new Z.A({x:Y[0],y:Y[1],spatialReference:t})})))}get inverseTransform(){return null==this.transform?null:(0,_.B8)((0,M.vt)(),this.transform)}get transform(){return this._updateTransform()}toMap(e){if(null==e||null==this.transform||null==this.controlPoints||!H(this.controlPoints[0]))return null;(0,b.hZ)(Y,e.x,e.y);const t=this.controlPoints[0].mapPoint.spatialReference;return O(Y,Y,this.transform),new Z.A({x:Y[0],y:Y[1],spatialReference:t})}toSource(e){if(null==e||null==this.inverseTransform||null==this.controlPoints||!H(this.controlPoints[0]))return null;const t=this.controlPoints[0].mapPoint.spatialReference;return e=e.normalize(),null==(e=(0,j.projectOrLoad)(e,t).geometry)?null:((0,b.hZ)(Y,e.x,e.y),O(Y,Y,this.inverseTransform),(0,T.tc)(Y[0],Y[1]))}toSourceNormalized(e){const t=this.toSource(e);return null!=t&&(t.x/=this.width,t.y/=this.height),t}_updateTransform(e){const{controlPoints:t,width:n,height:r}=this;if(!(null!=t&&n>0&&r>0))return null;const[i,o,s,a]=t;if(!H(i))return null;const l=i.mapPoint.spatialReference,c=this._projectControlPoint(o,l),u=this._projectControlPoint(s,l),h=this._projectControlPoint(a,l);if(!c.valid||!u.valid||!h.valid)return null;if(!H(c.controlPoint))return null;null==e&&(e=(0,M.vt)());let p=null;return p=H(u.controlPoint)&&H(h.controlPoint)?te(e,i,c.controlPoint,u.controlPoint,h.controlPoint):H(u.controlPoint)?function(e,t,n,r){return ee(z,W,t),ee(D,G,n),ee(q,J,r),(0,b.Cc)(V,z,D,.5),(0,b.e$)(V,q,V,Math.PI),(0,b.Cc)(K,W,G,.5),(0,b.e$)(K,J,K,Math.PI),oe(e,z,D,q,V,W,G,J,K)}(e,i,c.controlPoint,u.controlPoint):function(e,t,n){return ee(z,W,t),ee(D,G,n),(0,b.e$)(q,D,z,Q),(0,b.e$)(V,z,D,Q),(0,b.e$)(J,G,W,-Q),(0,b.e$)(K,W,G,-Q),oe(e,z,D,q,V,W,G,J,K)}(e,i,c.controlPoint),p.every(e=>0===e)?null:p}_projectControlPoint(e,t){if(!H(e))return{valid:!0,controlPoint:e};const{sourcePoint:n,mapPoint:r}=e,{geometry:i,pending:o}=(0,j.projectOrLoad)(r,t);return o?{valid:!1,controlPoint:null}:o||i?{valid:!0,controlPoint:{sourcePoint:n,mapPoint:i}}:(s.A.getLogger(this).warn("map point could not be projected to the spatial reference",{georeference:this,controlPoint:e,sourceSpatialReference:r.spatialReference,targetSpatialReference:t}),{valid:!1,controlPoint:null})}};function H(e){return null!=e?.sourcePoint&&null!=e.mapPoint}(0,r.Cg)([(0,c.MZ)({type:[F],json:{write:{allowNull:!1,isRequired:!0,target:{controlPoints:{type:[X],isRequired:!0},coefficients:{type:[Number],isRequired:!0},spatialReference:{type:$.A,isRequired:!0}}}}})],k.prototype,"controlPoints",void 0),(0,r.Cg)([(0,h.w)("controlPoints")],k.prototype,"readControlPoints",null),(0,r.Cg)([(0,d.K)("controlPoints")],k.prototype,"writeControlPoints",null),(0,r.Cg)([(0,c.MZ)({clonable:!1})],k.prototype,"coords",null),(0,r.Cg)([(0,c.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}})],k.prototype,"height",void 0),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],k.prototype,"inverseTransform",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],k.prototype,"transform",null),(0,r.Cg)([(0,c.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}})],k.prototype,"width",void 0),k=(0,r.Cg)([(0,p.$)("esri.layers.support.ControlPointsGeoreference")],k);const z=(0,L.vt)(),D=(0,L.vt)(),q=(0,L.vt)(),V=(0,L.vt)(),W=(0,L.vt)(),G=(0,L.vt)(),J=(0,L.vt)(),K=(0,L.vt)(),Q=Math.PI/2;function ee(e,t,n){(0,b.hZ)(e,n.sourcePoint.x,n.sourcePoint.y),(0,b.hZ)(t,n.mapPoint.x,n.mapPoint.y)}function te(e,t,n,r,i){return ee(z,W,t),ee(D,G,n),ee(q,J,r),ee(V,K,i),oe(e,z,D,q,V,W,G,J,K)}const ne=new Array(8).fill(0),re=new Array(8).fill(0);function ie(e,t,n,r,i){return e[0]=t[0],e[1]=t[1],e[2]=n[0],e[3]=n[1],e[4]=r[0],e[5]=r[1],e[6]=i[0],e[7]=i[1],e}function oe(e,t,n,r,i,o,s,a,l){return R(e,ie(ne,t,n,r,i),ie(re,o,s,a,l))}var se=n(78888),ae=n(21287),le=n(84952),ce=n(13069),ue=n(4902),he=n(92474),pe=n(35666),de=n(5443),fe=n(21325);const me=(0,L.vt)();let ge=class extends U{constructor(e){super(e),this.bottomLeft=null,this.bottomRight=null,this.topLeft=null,this.topRight=null,this.type="corners"}get coords(){let{topLeft:e,topRight:t,bottomLeft:n,bottomRight:r}=this;if(null==e||null==t||null==n||null==r)return null;const i=e.spatialReference;return t=this.projectOrWarn(t,i),n=this.projectOrWarn(n,i),r=this.projectOrWarn(r,i),null==t||null==n||null==r?null:new B.A({rings:[[[n.x,n.y],[e.x,e.y],[t.x,t.y],[r.x,r.y],[n.x,n.y]]],spatialReference:i})}set coords(e){const{topLeft:t}=this;if(null==t)return;const n=t.spatialReference;if(null==(e=this.projectOrWarn(e,n)))return;const{rings:[[r,i,o,s]]}=e;this.bottomLeft=new Z.A({x:r[0],y:r[1],spatialReference:n}),this.topLeft=new Z.A({x:i[0],y:i[1],spatialReference:n}),this.topRight=new Z.A({x:o[0],y:o[1],spatialReference:n}),this.bottomRight=new Z.A({x:s[0],y:s[1],spatialReference:n})}toSourceNormalized(e){const{topLeft:t,topRight:n,bottomRight:r,bottomLeft:i}=this;if(null==e||null==t||null==n||null==r||null==i)return null;const o=t.spatialReference;e=e.normalize();const s=(0,j.projectOrLoad)(e,o).geometry;if(null==s)return null;(0,b.hZ)(me,s.x,s.y);const a=R((0,M.vt)(),[t.x,t.y,i.x,i.y,n.x,n.y,r.x,r.y],[0,0,0,1,1,0,1,1]);return O(me,me,a),(0,T.tc)(me[0],me[1])}};(0,r.Cg)([(0,c.MZ)({clonable:!1})],ge.prototype,"coords",null),(0,r.Cg)([(0,c.MZ)({type:Z.A})],ge.prototype,"bottomLeft",void 0),(0,r.Cg)([(0,c.MZ)({type:Z.A})],ge.prototype,"bottomRight",void 0),(0,r.Cg)([(0,c.MZ)({type:Z.A})],ge.prototype,"topLeft",void 0),(0,r.Cg)([(0,c.MZ)({type:Z.A})],ge.prototype,"topRight",void 0),ge=(0,r.Cg)([(0,p.$)("esri.layers.support.CornersGeoreference")],ge);const ye=ge;var xe=n(34727),ve=n(34304);let we=class extends U{constructor(e){super(e),this.extent=null,this.rotation=0,this.type="extent-and-rotation"}get coords(){if(null==this.extent)return null;const{xmin:e,ymin:t,xmax:n,ymax:r,spatialReference:i}=this.extent;let o;if(this.rotation){const{x:i,y:s}=this.extent.center,a=_e(i,s,this.rotation);o=[a(e,t),a(e,r),a(n,r),a(n,t)],o.push(o[0])}else o=[[e,t],[e,r],[n,r],[n,t],[e,t]];return new B.A({rings:[o],spatialReference:i})}set coords(e){if(null==e||null==this.extent)return;const t=this.extent.spatialReference;if(e=this.projectOrWarn(e,t),null==e?.extent)return;const{rings:[[n,r,i]],extent:{center:{x:o,y:s}}}=e,a=(0,xe.KJ)(Math.PI/2-Math.atan2(r[1]-n[1],r[0]-n[0])),l=_e(o,s,-a),[c,u]=l(n[0],n[1]),[h,p]=l(i[0],i[1]);this.extent=new de.A({xmin:c,ymin:u,xmax:h,ymax:p,spatialReference:t}),this.rotation=a}toSourceNormalized(e){const{extent:t,rotation:n}=this;if(null==e||null==t)return null;const{xmin:r,ymin:i,xmax:o,ymax:s,center:a,spatialReference:l}=t;e=e.normalize();const c=(0,j.projectOrLoad)(e,l).geometry;if(null==c)return null;let u=c.x,h=c.y;return n&&([u,h]=_e(a.x,a.y,-n)(u,h)),(0,T.tc)((0,xe.hs)(u,r,o,0,1),(0,xe.hs)(h,s,i,0,1))}};function _e(e,t,n){const r=(0,ve.DF)(n),i=Math.cos(r),o=Math.sin(r);return(n,r)=>[i*(n-e)+o*(r-t)+e,i*(r-t)-o*(n-e)+t]}function Me(e,t){const n=(0,pe.aB)(t);return function(e){return"media"===e?.type}(e)&&!!e.portalItem&&null!=n&&n>3}function be(e,t,n){return{enabled:!Me(n?.layer,n?.origin),ignoreOrigin:!0}}(0,r.Cg)([(0,c.MZ)({clonable:!1})],we.prototype,"coords",null),(0,r.Cg)([(0,c.MZ)({type:de.A})],we.prototype,"extent",void 0),(0,r.Cg)([(0,c.MZ)({type:Number})],we.prototype,"rotation",void 0),we=(0,r.Cg)([(0,p.$)("esri.layers.support.ExtentAndRotationGeoreference")],we);const Ae={json:{name:"url",type:String,write:{overridePolicy:be}}},Ce={readOnly:!0,json:{read:!1,write:{target:"mediaType",overridePolicy:be}}},Pe={types:{key:"type",base:U,typeMap:{"control-points":k,corners:ye,"extent-and-rotation":we}},json:{types:{key:"type",base:U,typeMap:{"control-points":k}},write:{overridePolicy:()=>({enabled:!0,ignoreOrigin:!0})}}};let Ie=class extends((0,ue.PH)((0,a.P)(he.x_))){constructor(e){super(e),this.georeference=null,this.opacity=1}readGeoreference(e){return k.fromJSON(e)}writeGeoreference(e,t,n,r){const i=r?.resources?.pendingOperations,a=()=>{const i=function(e,t,n){if(!e||"control-points"===e.type)return e;const{coords:r}=e;if(5!==r?.rings[0]?.length)return null;const[i,o,s,a]=r.rings[0],{spatialReference:l}=r;return new k({controlPoints:[{mapPoint:new Z.A({x:i[0],y:i[1],spatialReference:l}),sourcePoint:(0,T.tc)(0,n)},{mapPoint:new Z.A({x:o[0],y:o[1],spatialReference:l}),sourcePoint:(0,T.tc)(0,0)},{mapPoint:new Z.A({x:s[0],y:s[1],spatialReference:l}),sourcePoint:(0,T.tc)(t,0)},{mapPoint:new Z.A({x:a[0],y:a[1],spatialReference:l}),sourcePoint:(0,T.tc)(t,n)}],width:t,height:n})}(this.georeference,this.contentWidth,this.contentHeight);if(i){if("control-points"!==e.type&&s.A.getLogger(this).warn(`only georeference of type 'control-points' may be persisted. The georeference of type '${e.type}' has been automatically converted.`),4!==i.controlPoints?.length&&r?.messages)return void r.messages.push(new o.A("property:unsupported","only 'control-points' georeference with 4 control points may be persisted."));t[n]=i.write({},r)}};if("control-points"!==e.type&&!this.loaded&&i)return t[n]={},void i.push(this.load().then(a));a()}get contentWidth(){return 0}get contentHeight(){return 0}toSource(e){const{georeference:t,contentWidth:n,contentHeight:r}=this;if(null==e||null==t||0===n||0===r)return null;const i=t.toSourceNormalized(e);return null==i?null:(i.x*=n,i.y*=r,i)}};(0,r.Cg)([(0,c.MZ)(Pe)],Ie.prototype,"georeference",void 0),(0,r.Cg)([(0,h.w)("georeference")],Ie.prototype,"readGeoreference",null),(0,r.Cg)([(0,d.K)("georeference")],Ie.prototype,"writeGeoreference",null),(0,r.Cg)([(0,c.MZ)({json:{read:!1,write:!1}})],Ie.prototype,"opacity",void 0),Ie=(0,r.Cg)([(0,p.$)("esri.layers.support.MediaElementBase")],Ie);var Se=n(85648);const Oe=Symbol("ImageElementInstance"),Re=Symbol("VideoElementInstance");function Ee(e){return function(e){return null!=e&&"object"==typeof e&&Oe in e}(e)||function(e){return null!=e&&"object"==typeof e&&Re in e}(e)}var Te,Le=n(97159);let Ze=class extends Ie{static{Te=Oe}constructor(e){super(e),this.animationOptions=null,this.content=null,this.image=null,this.type="image",this[Te]=!0,this.image=null}load(){const e=this.image;if("string"==typeof e){const t=(0,ae.M5)(e).then(e=>{this._set("content",e)});this.addResolvingPromise(t)}else if(e instanceof HTMLImageElement){const t=e.decode().then(()=>{this._set("content",e)});this.addResolvingPromise(t)}else e?this._set("content",e):this.addResolvingPromise(Promise.reject(new o.A("image-element:invalid-image-type","Invalid image type",{image:e})));return Promise.resolve(this)}get contentWidth(){return null==this.content?0:this.content instanceof HTMLImageElement?this.content.naturalWidth:this.content.width}get contentHeight(){return null==this.content?0:this.content instanceof HTMLImageElement?this.content.naturalHeight:this.content.height}readImage(e,t,n){return(0,Le.f)(t.url,n)}writeImage(e,t,n,r){if(null==e)return;const i=r?.portalItem,o=r?.resources;if(!i||!o)return void("string"==typeof e&&(t[n]=(0,Le.t)(e,r)));const s=function(e){return"string"==typeof e&&!(0,le.DB)(e)&&!(0,le.w8)(e)}(e)?e:null;if(s){if(null==(0,Le.i)(s))return void(t[n]=s);const e=(0,Le.t)(s,{...r,verifyItemRelativeUrls:r?.verifyItemRelativeUrls?{writtenUrls:r.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},1);if(i&&e&&!(0,le.oP)(e))return o.toKeep.push({resource:i.resourceFromPath(e),compress:!1}),void(t[n]=e)}t[n]="<pending>",o.pendingOperations.push(async function(e){return"string"==typeof e?(0,le.DB)(e)?(0,le.N9)(e):(await(0,se.A)(e,{responseType:"blob"})).data:new Promise(t=>function(e){if(e instanceof HTMLCanvasElement)return e;const t=e instanceof HTMLImageElement?e.naturalWidth:e.width,n=e instanceof HTMLImageElement?e.naturalHeight:e.height,r=document.createElement("canvas"),i=r.getContext("2d");return r.width=t,r.height=n,e instanceof HTMLImageElement?i.drawImage(e,0,0,e.width,e.height):e instanceof ImageData&&i.putImageData(e,0,0),r}(e).toBlob(t))}(e).then(e=>{const r=function(e,t){const n=(0,ce.lk)(),r=`${(0,le.fj)("media",n)}.${(0,Se.n)({type:"blob",blob:e})}`;return t.resourceFromPath(r)}(e,i);t[n]=r.itemRelativeUrl,o.toAdd.push({resource:r,content:{type:"blob",blob:e},compress:!1,finish:e=>{this.image=e.url}})}))}};(0,r.Cg)([(0,c.MZ)()],Ze.prototype,"animationOptions",void 0),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],Ze.prototype,"content",void 0),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],Ze.prototype,"contentWidth",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],Ze.prototype,"contentHeight",null),(0,r.Cg)([(0,c.MZ)(Ae)],Ze.prototype,"image",void 0),(0,r.Cg)([(0,h.w)("image",["url"])],Ze.prototype,"readImage",null),(0,r.Cg)([(0,d.K)("image")],Ze.prototype,"writeImage",null),(0,r.Cg)([(0,c.MZ)(Ce)],Ze.prototype,"type",void 0),Ze=(0,r.Cg)([(0,p.$)("esri.layers.support.ImageElement")],Ze);var Be=n(62885),je=n(65529),$e=n(61893),Ue=n(36708),Ne=n(19419),Ye=n(12176),Xe=n(6518),Fe=n(65008),ke=n(89056);let He=class extends Fe.A{constructor(e){super(e)}get bounds(){const e=this.coords;return null==e?.extent?null:(0,Ne.VY)(e.extent)}get coords(){const e=this.element.georeference?.coords;return(0,j.projectOrLoad)(e,this.spatialReference).geometry}get normalizedCoords(){return B.A.fromJSON((0,ke.jZ)(this.coords))}get normalizedBounds(){const e=null!=this.normalizedCoords?this.normalizedCoords.extent:null;return null!=e?(0,Ne.VY)(e):null}};(0,r.Cg)([(0,c.MZ)()],He.prototype,"spatialReference",void 0),(0,r.Cg)([(0,c.MZ)()],He.prototype,"element",void 0),(0,r.Cg)([(0,c.MZ)()],He.prototype,"bounds",null),(0,r.Cg)([(0,c.MZ)()],He.prototype,"coords",null),(0,r.Cg)([(0,c.MZ)()],He.prototype,"normalizedCoords",null),(0,r.Cg)([(0,c.MZ)()],He.prototype,"normalizedBounds",null),He=(0,r.Cg)([(0,p.$)("esri.layers.support.MediaElementView")],He);var ze,De=n(16494),qe=n(38969);const Ve=Symbol("canplay");let We=class extends Ie{static{ze=Re}constructor(e){super(e),this.autoplay=!0,this.content=null,this.type="video",this[ze]=!0}load(){const e=this.video;return"string"==typeof e?this.addResolvingPromise(this._preProcessVideoUrl(e).then(async e=>{const t=document.createElement("video");return t.src=De.W5.sanitizeUrl((0,le.s2)(e)),t.crossOrigin="anonymous",t.autoplay=this.autoplay,t.muted=!0,t.loop=!0,t.playsInline=!0,this._loadVideo(t).then(()=>{this._set("content",t)})})):e instanceof HTMLVideoElement?this.addResolvingPromise(this._loadVideo(e).then(()=>{this._set("content",e)})):this.addResolvingPromise(Promise.reject(new o.A("video-element:invalid-video-type","Invalid video type",{video:e}))),Promise.resolve(this)}get contentWidth(){return this.content?.videoWidth??0}get contentHeight(){return this.content?.videoHeight??0}get currentTime(){return this.content?.currentTime}set currentTime(e){if(!this.content)return;const t=(0,xe.qE)(e,0,this.content.duration);"fastSeek"in this.content?this.content.fastSeek(t):this.content.currentTime=t,this.content.play().then(()=>{this.content?.pause()}).catch(()=>{})}get duration(){return this.content?.duration}set video(e){"not-loaded"===this.loadStatus?this._set("video",e):s.A.getLogger(this).error("#video","video cannot be changed after the element is loaded.")}writeVideo(e,t,n,r){if(!e)return void(r?.messages&&r.messages.push(new o.A("video-element:unsupported-video","video source is missing")));const i=function(e){return"string"==typeof e&&!(0,le.DB)(e)&&!(0,le.w8)(e)}(e)?e:null;if(!i)return void(r?.messages&&r.messages.push(new o.A("video-element:unsupported-video","video source must be an absolute url")));!(0,le.oP)(i)&&r?.blockedRelativeUrls&&r.blockedRelativeUrls.push(i);const s=(0,le.s2)(i);(0,Le.i)(s)?r?.messages&&r.messages.push(new o.A("video-element:unsupported-video","video source cannot be an item resource")):t[n]=s}async _preProcessVideoUrl(e){if((0,le.zs)(e))return(0,le.yM)(e);try{return await(0,se.A)(e,{method:"head"}),e}catch{try{return(0,le.yM)(e,!0)}catch{return e}}}async _loadVideo(e){"anonymous"!==e.crossOrigin&&(e.crossOrigin="anonymous",(0,le.w8)(e.src)||(e.src=e.src));try{await(0,qe.i)(e,e=>this.addHandles(e,Ve)),this.autoplay&&await e.play().catch(e=>{throw console.error(e),e})}finally{this.removeHandles(Ve)}}};(0,r.Cg)([(0,c.MZ)()],We.prototype,"autoplay",void 0),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],We.prototype,"content",void 0),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],We.prototype,"contentWidth",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],We.prototype,"contentHeight",null),(0,r.Cg)([(0,c.MZ)({type:Number})],We.prototype,"currentTime",null),(0,r.Cg)([(0,c.MZ)({type:Number})],We.prototype,"duration",null),(0,r.Cg)([(0,c.MZ)(Ae)],We.prototype,"video",null),(0,r.Cg)([(0,d.K)("video")],We.prototype,"writeVideo",null),(0,r.Cg)([(0,c.MZ)(Ce)],We.prototype,"type",void 0),We=(0,r.Cg)([(0,p.$)("esri.layers.support.VideoElement")],We);const Ge={key:"type",defaultKeyValue:"image",base:Ie,typeMap:{image:Ze,video:We}},Je=i.A.ofType(Ge);let Ke=class extends((0,he.WV)((0,$e.g)(je.nJ))){constructor(e){super(e),this._index=new Xe.F,this._elementViewsMap=new Map,this._elementsIndexes=new Map,this._elementsChangedHandler=e=>{for(const t of e.removed){const e=this._elementViewsMap.get(t);this._elementViewsMap.delete(t),this._index.delete(e),this.removeHandles(e),e.destroy(),this.notifyChange("fullExtent")}const{spatialReference:t}=this;for(const n of e.added){if(this._elementViewsMap.get(n))continue;const e=new He({spatialReference:t,element:n});this._elementViewsMap.set(n,e);const r=(0,Ue.wB)(()=>e.coords,()=>this._updateIndexForElement(e,!1));this._updateIndexForElement(e,!0),this.addHandles(r,e)}this._elementsIndexes.clear(),this.elements.forEach((e,t)=>this._elementsIndexes.set(e,t)),this.emit("refresh")},this.elements=new Je}async load(e){if((0,l.Te)(e),!this.spatialReference){const e=this.elements.find(e=>null!=e.georeference?.coords);this._set("spatialReference",e?e.georeference.coords.spatialReference:$.A.WGS84)}return this._elementsChangedHandler({added:this.elements.items,removed:[]}),this.addHandles(this.elements.on("change",this._elementsChangedHandler)),this}destroy(){this._index.clear(),this._elementViewsMap.clear(),this._elementsIndexes.clear()}set elements(e){this._set("elements",(0,Be.V)(e,this._get("elements"),Je))}get fullExtent(){if("not-loaded"===this.loadStatus)return null;const e=this._index.fullBounds;return null==e?null:new de.A({xmin:e[0],ymin:e[1],xmax:e[2],ymax:e[3],spatialReference:this.spatialReference})}set spatialReference(e){"not-loaded"===this.loadStatus?this._set("spatialReference",e):s.A.getLogger(this).error("#spatialReference","spatialReference cannot be changed after the source is loaded.")}async queryElements(e,t){await this.load(),await(0,j.initializeProjection)(e.spatialReference,this.spatialReference,null,t);const n=(0,fe.aI)(e.spatialReference,this.spatialReference)?e:(0,j.project)(e,this.spatialReference);if(!n)return[];const r=n.normalize(),i=[];for(const e of r)this._index.forEachInBounds((0,Ne.VY)(e),({normalizedCoords:t,element:n})=>{null!=t&&(0,Ye.fA)(e,t)&&i.push(n)});return i.sort((e,t)=>this._elementsIndexes.get(e)-this._elementsIndexes.get(t)),i}hasElement(e){return this.elements.includes(e)}_updateIndexForElement(e,t){const n=e.normalizedBounds,r=this._index.has(e),i=null!=n;this._index.delete(e),i&&this._index.set(e,n),this.notifyChange("fullExtent"),t||(r!==i?this.emit("refresh"):this.emit("change",{element:e.element}))}};(0,r.Cg)([(0,c.MZ)()],Ke.prototype,"elements",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],Ke.prototype,"fullExtent",null),(0,r.Cg)([(0,c.MZ)()],Ke.prototype,"spatialReference",null),Ke=(0,r.Cg)([(0,p.$)("esri.layers.support.LocalMediaElementSource")],Ke);let Qe=class extends((0,m.dM)((0,x.j)((0,g.q)((0,y.A)((0,a.P)(f.A)))))){constructor(e){super(e),this.effectiveSource=null,this.georeference=null,this.copyright=null,this.operationalLayerType="MediaLayer",this.spatialReference=null,this.type="media",this._debouncedSaveOperations=(0,l.sg)(async(e,t,r)=>{const{save:i,saveAs:o}=await n.e(3561).then(n.bind(n,63561));switch(e){case 0:return i(this,t);case 1:return o(this,r,t)}}),this.source=new Ke}load(e){return this.addResolvingPromise(this._doLoad(e)),Promise.resolve(this)}async _doLoad(e){await this.loadFromPortal({supportedTypes:["Media Layer"]},e);let t=this.source;if(!t)throw new o.A("media-layer:source-missing","Set 'MediaLayer.source' before loading the layer.");const n=this._getSourceOverride(t,this.georeference);n&&(this.setAtOrigin("source",n,"web-map"),this.setAtOrigin("source",n,"web-scene"),t=n);const r=Ee(t)?new Ke({elements:new i.A([t])}):t;this._set("effectiveSource",r),this.spatialReference&&(r.spatialReference=this.spatialReference),await r.load(e),this.spatialReference=r.spatialReference}destroy(){this.effectiveSource?.destroy(),this.effectiveSource!==this.source&&this.source?.destroy()}readGeoreference(e,t){return e&&"itemId"in t&&t.itemId?e:void 0}get fullExtent(){return this.loaded?this.effectiveSource.fullExtent:null}get loaded(){return super.loaded}get source(){return this._get("source")}set source(e){"loaded"!==this.loadStatus&&"failed"!==this.loadStatus?this._set("source",e):s.A.getLogger(this).error("#source","source cannot be changed after the layer is loaded.")}castSource(e){return e?Array.isArray(e)?new Ke({elements:new i.A(e)}):e instanceof i.A?new Ke({elements:e}):e:null}readSource(e,t,n){if("itemId"in t&&t.itemId)return;const r=this._createSource(t);return r?.read(t,n),r}writeSource(e,t,n,r){if(e&&e instanceof Ke){const t=e.elements.length;if(1!==t)return void(r?.messages&&r.messages.push(new o.A("media-layer:unsupported-source",`local media element source can only be persisted if it contains exactly one ImageElement, but it has ${t}.`)));e=e.elements.at(0)}Ee(e)?e.write(t,r):r?.messages&&(e?r.messages.push(new o.A("media-layer:unsupported-source","only media elements of type 'ImageElement' or 'VideoElement' can be persisted")):r.messages.push(new o.A("media-layer:unsupported-source","the media layer is missing a source")))}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}_createSource(e){if("mediaType"in e)switch(e.mediaType){case"image":return new Ze;case"video":return new We}return null}_getSourceOverride(e,t){if(Ee(e)&&3===this.originIdOf("source")&&t&&(5===this.originIdOf("georeference")||4===this.originIdOf("georeference"))){const n=e.toJSON(),r=this._createSource(n);return r.read({...n},{origin:"portal-item"}),r.read({georeference:t},{origin:"web-map"}),r.read({georeference:t},{origin:"web-scene"}),r}return null}};(0,r.Cg)([(0,c.MZ)({readOnly:!0})],Qe.prototype,"effectiveSource",void 0),(0,r.Cg)([(0,c.MZ)({readOnly:!0,json:{read:!1,write:!1,origins:{"web-document":{read:!0}}}})],Qe.prototype,"georeference",void 0),(0,r.Cg)([(0,h.w)("web-document","georeference")],Qe.prototype,"readGeoreference",null),(0,r.Cg)([(0,c.MZ)({type:String})],Qe.prototype,"copyright",void 0),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],Qe.prototype,"fullExtent",null),(0,r.Cg)([(0,c.MZ)({type:["MediaLayer"]})],Qe.prototype,"operationalLayerType",void 0),(0,r.Cg)([(0,c.MZ)({type:["show","hide"]})],Qe.prototype,"listMode",void 0),(0,r.Cg)([(0,c.MZ)({nonNullable:!0,json:{write:{enabled:!0,allowNull:!1,target:{url:{type:String},mediaType:{type:["image","video"]},georeference:{type:k}},overridePolicy(e,t,n){return{enabled:!0,allowNull:!1,ignoreOrigin:Me(this,n?.origin)&&Ee(e)&&!!e.georeference&&e.originIdOf("georeference")>3}}}}})],Qe.prototype,"source",null),(0,r.Cg)([(0,u.w)("source")],Qe.prototype,"castSource",null),(0,r.Cg)([(0,h.w)("source",["url"])],Qe.prototype,"readSource",null),(0,r.Cg)([(0,d.K)("source")],Qe.prototype,"writeSource",null),(0,r.Cg)([(0,c.MZ)()],Qe.prototype,"spatialReference",void 0),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],Qe.prototype,"type",void 0),Qe=(0,r.Cg)([(0,p.$)("esri.layers.MediaLayer")],Qe);const et=Qe},21287:(e,t,n)=>{n.d(t,{M5:()=>h,eV:()=>u});var r=n(78888),i=n(49186),o=n(74887),s=n(84952),a=n(26306);let l=null,c=!0;function u(e,t,n,r){if(!t||!n)throw new Error("Cannot construct image data without dimensions");if(c)try{return new ImageData(e,t,n)}catch(e){c=!1}const i=function(e,t,n){return n||(l||(l=document.createElement("canvas"),l.width=1,l.height=1),n=l),n.getContext("2d").createImageData(e,t)}(t,n,r);return i.data.set(e,0),i}async function h(e,t){const{arrayBuffer:l,mediaType:c}=await async function(e,t){const n=(0,s.r$)(e);if(n?.isBase64)return{arrayBuffer:(0,a.M)(n.data),mediaType:n.mediaType};const i=await(0,r.A)(e,{responseType:"array-buffer",...t});return{arrayBuffer:i.data,mediaType:i.getHeader?.("Content-Type")??""}}(e,t),u="image/png"===c;if("image/gif"===c){const{isAnimatedGIF:e,parseGif:r}=await n.e(820).then(n.bind(n,10820));if(e(l))return r(l,t)}if(u){const{isAnimatedPNG:e,parseApng:r}=await n.e(2390).then(n.bind(n,22390));if(e(l))return r(l,t)}return async function(e,t){const n=window.URL.createObjectURL(e);try{const{data:e}=await(0,r.A)(n,{...t,responseType:"image"});return e}catch(e){if(!(0,o.zf)(e))throw new i.A("invalid-image",`Could not fetch requested image at ${n}`);throw e}finally{window.URL.revokeObjectURL(n)}}(new Blob([l],{type:c}),t)}},25036:(e,t,n)=>{n.d(t,{j:()=>s});var r=n(31635),i=n(10107),o=(n(44208),n(53966),n(87811),n(40608));const s=e=>{const t=e;let n=class extends t{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){const e={minScale:this.minScale,maxScale:this.maxScale},t=this.parent;t&&"effectiveScaleRange"in t&&function(e,t){e.minScale=e.minScale>0?t.minScale>0?Math.min(e.minScale,t.minScale):e.minScale:t.minScale,e.maxScale=e.maxScale>0?t.maxScale>0?Math.max(e.maxScale,t.maxScale):e.maxScale:t.maxScale}(e,t.effectiveScaleRange);const n=this._get("effectiveScaleRange");return n&&n.minScale===e.minScale&&n.maxScale===e.maxScale?n:e}};return(0,r.Cg)([(0,i.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],n.prototype,"minScale",void 0),(0,r.Cg)([(0,i.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],n.prototype,"maxScale",void 0),(0,r.Cg)([(0,i.MZ)({readOnly:!0})],n.prototype,"effectiveScaleRange",null),n=(0,r.Cg)([(0,o.$)("esri.layers.mixins.ScaleRangeLayer")],n),n}},38954:(e,t,n)=>{n.d(t,{A:()=>f,B:()=>d,C:()=>u,D:()=>h,E:()=>L,F:()=>$,H:()=>N,a:()=>Z,b:()=>y,c:()=>s,d:()=>c,e:()=>A,f:()=>l,g:()=>g,h:()=>C,i:()=>a,j:()=>x,k:()=>w,l:()=>o,m:()=>P,n:()=>b,o:()=>S,q:()=>T,r:()=>M,s:()=>v,t:()=>I,u:()=>_,v:()=>O,w:()=>p,x:()=>U,y:()=>Y,z:()=>m});var r=n(51850),i=n(34304);function o(e){const t=e[0],n=e[1],r=e[2];return Math.sqrt(t*t+n*n+r*r)}function s(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function a(e,t,n,r){return e[0]=t,e[1]=n,e[2]=r,e}function l(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e}function c(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e}function u(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e[2]=t[2]*n[2],e}function h(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e[2]=t[2]/n[2],e}function p(e,t){return e[0]=Math.abs(t[0]),e[1]=Math.abs(t[1]),e[2]=Math.abs(t[2]),e}function d(e,t){return e[0]=Math.sign(t[0]),e[1]=Math.sign(t[1]),e[2]=Math.sign(t[2]),e}function f(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e[2]=Math.min(t[2],n[2]),e}function m(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e[2]=Math.max(t[2],n[2]),e}function g(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e}function y(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e[2]=t[2]+n[2]*r,e}function x(e,t){const n=t[0]-e[0],r=t[1]-e[1],i=t[2]-e[2];return Math.sqrt(n*n+r*r+i*i)}function v(e,t){const n=t[0]-e[0],r=t[1]-e[1],i=t[2]-e[2];return n*n+r*r+i*i}function w(e){const t=e[0],n=e[1],r=e[2];return t*t+n*n+r*r}function _(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e}function M(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e}function b(e,t){const n=t[0],r=t[1],i=t[2];let o=n*n+r*r+i*i;return o>0&&(o=1/Math.sqrt(o),e[0]=t[0]*o,e[1]=t[1]*o,e[2]=t[2]*o),e}function A(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function C(e,t,n){const r=t[0],i=t[1],o=t[2],s=n[0],a=n[1],l=n[2];return e[0]=i*l-o*a,e[1]=o*s-r*l,e[2]=r*a-i*s,e}function P(e,t,n,r){const i=t[0],o=t[1],s=t[2];return e[0]=i+r*(n[0]-i),e[1]=o+r*(n[1]-o),e[2]=s+r*(n[2]-s),e}function I(e,t,n){const r=t[0],i=t[1],o=t[2];return e[0]=n[0]*r+n[4]*i+n[8]*o+n[12],e[1]=n[1]*r+n[5]*i+n[9]*o+n[13],e[2]=n[2]*r+n[6]*i+n[10]*o+n[14],e}function S(e,t,n){const r=t[0],i=t[1],o=t[2];return e[0]=r*n[0]+i*n[3]+o*n[6],e[1]=r*n[1]+i*n[4]+o*n[7],e[2]=r*n[2]+i*n[5]+o*n[8],e}function O(e,t,n){const r=n[0],i=n[1],o=n[2],s=n[3],a=t[0],l=t[1],c=t[2],u=i*c-o*l,h=o*a-r*c,p=r*l-i*a,d=i*p-o*h,f=o*u-r*p,m=r*h-i*u,g=2*s;return e[0]=a+u*g+2*d,e[1]=l+h*g+2*f,e[2]=c+p*g+2*m,e}const R=(0,r.vt)(),E=(0,r.vt)();function T(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function L(e,t,n){const r=n[0]-t[0],i=n[1]-t[1],o=n[2]-t[2];let s=r*r+i*i+o*o;return s>0?(s=1/Math.sqrt(s),e[0]=r*s,e[1]=i*s,e[2]=o*s,e):(e[0]=0,e[1]=0,e[2]=0,e)}const Z=c,B=u,j=h,$=x,U=v,N=o,Y=w;Object.freeze(Object.defineProperty({__proto__:null,abs:p,add:l,angle:function(e,t){b(R,e),b(E,t);const n=A(R,E);return n>1?0:n<-1?Math.PI:Math.acos(n)},bezier:function(e,t,n,r,i,o){const s=1-o,a=s*s,l=o*o,c=a*s,u=3*o*a,h=3*l*s,p=l*o;return e[0]=t[0]*c+n[0]*u+r[0]*h+i[0]*p,e[1]=t[1]*c+n[1]*u+r[1]*h+i[1]*p,e[2]=t[2]*c+n[2]*u+r[2]*h+i[2]*p,e},ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e},clamp:function(e,t=0,n=1){return e[0]=Math.min(Math.max(e[0],t),n),e[1]=Math.min(Math.max(e[1],t),n),e[2]=Math.min(Math.max(e[2],t),n),e},copy:s,cross:C,crossAndNormalize:function(e,t,n){const r=t[0],i=t[1],o=t[2],s=n[0],a=n[1],l=n[2],c=i*l-o*a,u=o*s-r*l,h=r*a-i*s,p=Math.sqrt(c*c+u*u+h*h);return e[0]=c/p,e[1]=u/p,e[2]=h/p,e},direction:L,dist:$,distance:x,div:j,divide:h,dot:A,equals:function(e,t){if(e===t)return!0;const n=e[0],r=e[1],o=e[2],s=t[0],a=t[1],l=t[2],c=(0,i.FD)();return Math.abs(n-s)<=c*Math.max(1,Math.abs(n),Math.abs(s))&&Math.abs(r-a)<=c*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(o-l)<=c*Math.max(1,Math.abs(o),Math.abs(l))},exactEquals:T,floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e},hermite:function(e,t,n,r,i,o){const s=o*o,a=s*(2*o-3)+1,l=s*(o-2)+o,c=s*(o-1),u=s*(3-2*o);return e[0]=t[0]*a+n[0]*l+r[0]*c+i[0]*u,e[1]=t[1]*a+n[1]*l+r[1]*c+i[1]*u,e[2]=t[2]*a+n[2]*l+r[2]*c+i[2]*u,e},inverse:M,len:N,length:o,lerp:P,max:m,min:f,mul:B,multiply:u,negate:_,normalize:b,random:function(e,t=1){const n=i.Ov,r=2*n()*Math.PI,o=2*n()-1,s=Math.sqrt(1-o*o)*t;return e[0]=Math.cos(r)*s,e[1]=Math.sin(r)*s,e[2]=o*t,e},rotateX:function(e,t,n,r){const i=[],o=[];return i[0]=t[0]-n[0],i[1]=t[1]-n[1],i[2]=t[2]-n[2],o[0]=i[0],o[1]=i[1]*Math.cos(r)-i[2]*Math.sin(r),o[2]=i[1]*Math.sin(r)+i[2]*Math.cos(r),e[0]=o[0]+n[0],e[1]=o[1]+n[1],e[2]=o[2]+n[2],e},rotateY:function(e,t,n,r){const i=[],o=[];return i[0]=t[0]-n[0],i[1]=t[1]-n[1],i[2]=t[2]-n[2],o[0]=i[2]*Math.sin(r)+i[0]*Math.cos(r),o[1]=i[1],o[2]=i[2]*Math.cos(r)-i[0]*Math.sin(r),e[0]=o[0]+n[0],e[1]=o[1]+n[1],e[2]=o[2]+n[2],e},rotateZ:function(e,t,n,r){const i=[],o=[];return i[0]=t[0]-n[0],i[1]=t[1]-n[1],i[2]=t[2]-n[2],o[0]=i[0]*Math.cos(r)-i[1]*Math.sin(r),o[1]=i[0]*Math.sin(r)+i[1]*Math.cos(r),o[2]=i[2],e[0]=o[0]+n[0],e[1]=o[1]+n[1],e[2]=o[2]+n[2],e},round:function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e},scale:g,scaleAndAdd:y,set:a,sign:d,sqrDist:U,sqrLen:Y,squaredDistance:v,squaredLength:w,str:function(e){return"vec3("+e[0]+", "+e[1]+", "+e[2]+")"},sub:Z,subtract:c,transformMat3:S,transformMat4:I,transformQuat:O},Symbol.toStringTag,{value:"Module"}))},38969:(e,t,n)=>{n.d(t,{i:()=>i});var r=n(37955);function i(e,t){return new Promise((n,i)=>{e.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?n():(t((0,r.Oo)(e,"canplay",n)),t((0,r.Oo)(e,"error",i)))})}},48163:(e,t,n)=>{function r(){return[0,0]}function i(e){return[e[0],e[1]]}function o(e,t){return[e,t]}function s(){return o(1,1)}function a(){return o(1,0)}function l(){return o(0,1)}n.d(t,{Un:()=>c,fA:()=>o,o8:()=>i,vt:()=>r});const c=s(),u=a(),h=l();Object.freeze(Object.defineProperty({__proto__:null,ONES:c,UNIT_X:u,UNIT_Y:h,ZEROS:[0,0],clone:i,create:r,freeze:function(e,t){return[e,t]},fromArray:function(e,t=[0,0]){const n=Math.min(2,e.length);for(let r=0;r<n;++r)t[r]=e[r];return t},fromValues:o,ones:s,unitX:a,unitY:l,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},62885:(e,t,n)=>{n.d(t,{H:()=>o,V:()=>i});var r=n(7762);function i(e,t,n=r.A){return t||(t=new n),t===e||t.destroyed||(t.removeAll(),(i=e)&&(Array.isArray(i)||"items"in i&&Array.isArray(i.items))?t.addMany(e):e&&t.add(e)),t;var i}function o(e){return e}},63074:(e,t,n)=>{n.d(t,{LF:()=>u,dM:()=>h,sU:()=>l});var r=n(31635),i=n(10107),o=(n(44208),n(53966),n(87811),n(40608)),s=n(89317),a=n(76369);const l={type:["average","color-burn","color-dodge","color","darken","destination-atop","destination-in","destination-out","destination-over","difference","exclusion","hard-light","hue","invert","lighten","lighter","luminosity","minus","multiply","normal","overlay","plus","reflect","saturation","screen","soft-light","source-atop","source-in","source-out","vivid-light","xor"],nonNullable:!0,json:{read:!1,write:!1,origins:{"web-map":{read:!0,write:{layerContainerTypes:s.K}},"portal-item":{read:!0,write:{layerContainerTypes:s.K}}}}},c={read:{reader:a.LF},write:{allowNull:!0,writer:a.M9,layerContainerTypes:s.K}},u={json:{read:!1,write:!1,origins:{"web-map":c,"portal-item":c}}},h=e=>{const t=e;let n=class extends t{constructor(){super(...arguments),this.blendMode="normal",this.effect=null}};return(0,r.Cg)([(0,i.MZ)(l)],n.prototype,"blendMode",void 0),(0,r.Cg)([(0,i.MZ)(u)],n.prototype,"effect",void 0),n=(0,r.Cg)([(0,o.$)("esri.layers.mixins.BlendLayer")],n),n}},69540:(e,t,n)=>{n.d(t,{OU:()=>u,Pw:()=>h});var r=n(31635),i=n(65008),o=(n(44208),n(4718)),s=(n(53966),n(97768)),a=n(88620),l=n(40608);const c=Symbol("ClonableMixin"),u=e=>{var t;const n=e;let i=class extends n{constructor(){super(...arguments),this[t]=!0}static{t=c}clone(e){const t=(0,a.oY)(this);(0,s.Lw)(t,"unable to clone instance of non-accessor class");const n=t.metadata,r=t.store,i={},l=new Map;for(const t in n){const s=n[t],a=r?.originOf(t),c=s.clonable;if(s.readOnly||!1===c||7!==a&&0!==a&&5!==a&&4!==a)continue;const u=this[t];let h=null;if("function"==typeof c)h=c(u,e);else if("reference"===c)h=u;else if(h=(0,o.TU)(u,e),null!=u&&null==h)continue;0===a?l.set(t,h):i[t]=h}const c=new(0,Object.getPrototypeOf(this).constructor)(i);if(l.size){const e=(0,a.oY)(c)?.store;if(e)for(const[t,n]of l)e.set(t,n,0)}return c}};return i=(0,r.Cg)([(0,l.$)("esri.core.Clonable")],i),i},h=u(i.A)},75503:(e,t,n)=>{n.d(t,{EC:()=>C,wq:()=>a});var r=n(4576),i=n(21818),o=(n(44208),n(15142)),s=n(11006);class a{constructor(e=9,t){this._compareMinX=p,this._compareMinY=d,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),_.prune(),M.prune(),b.prune(),A.prune()}all(e){l(this._data,e)}search(e,t){let n=this._data;const r=this._toBBox;if(v(e,n))for(_.clear();n;){for(let i=0,o=n.children.length;i<o;i++){const o=n.children[i],s=n.leaf?r(o):o;v(e,s)&&(n.leaf?t(o):x(e,s)?l(o,t):_.push(o))}n=_.pop()}}collides(e){let t=this._data;const n=this._toBBox;if(!v(e,t))return!1;for(_.clear();t;){for(let r=0,i=t.children.length;r<i;r++){const i=t.children[r],o=t.leaf?n(i):i;if(v(e,o)){if(t.leaf||x(e,o))return!0;_.push(i)}}t=_.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,n=e.length;t<n;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new I([]),this}remove(e){if(!e)return this;let t,n=this._data,o=null,s=0,a=!1;const l=this._toBBox(e);for(b.clear(),A.clear();n||b.length>0;){if(n||(n=b.pop(),o=b.data[b.length-1],s=A.pop()??0,a=!0),n.leaf&&(t=(0,r.qh)(n.children,(0,i.zI)(e),n.children.length,n.indexHint),-1!==t))return n.children.splice(t,1),b.push(n),this._condense(b),this;a||n.leaf||!x(n,l)?o?(s++,n=o.children[s],a=!1):n=null:(b.push(n),A.push(s),s=0,o=n,n=n.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,n,r){const i=n-t+1;let o=this._maxEntries;if(i<=o){const r=new I(e.slice(t,n+1));return c(r,this._toBBox),r}r||(r=Math.ceil(Math.log(i)/Math.log(o)),o=Math.ceil(i/o**(r-1)));const s=new S([]);s.height=r;const a=Math.ceil(i/o),l=a*Math.ceil(Math.sqrt(o));w(e,t,n,l,this._compareMinX);for(let i=t;i<=n;i+=l){const t=Math.min(i+l-1,n);w(e,i,t,a,this._compareMinY);for(let n=i;n<=t;n+=a){const i=Math.min(n+a-1,t);s.children.push(this._build(e,n,i,r-1))}}return c(s,this._toBBox),s}_insert(e,t,n){const r=this._toBBox,i=n?e:r(e);b.clear();const o=function(e,t,n,r){for(;r.push(t),!0!==t.leaf&&r.length-1!==n;){let n,r=1/0,i=1/0;for(let o=0,s=t.children.length;o<s;o++){const s=t.children[o],a=f(s),l=g(e,s)-a;l<i?(i=l,r=a<r?a:r,n=s):l===i&&a<r&&(r=a,n=s)}t=n||t.children[0]}return t}(i,this._data,t,b);for(o.children.push(e),h(o,i);t>=0&&b.data[t].children.length>this._maxEntries;)this._split(b,t),t--;!function(e,t,n){for(let r=n;r>=0;r--)h(t.data[r],e)}(i,b,t)}_split(e,t){const n=e.data[t],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);const o=this._chooseSplitIndex(n,i,r);if(!o)return;const s=n.children.splice(o,n.children.length-o),a=n.leaf?new I(s):new S(s);a.height=n.height,c(n,this._toBBox),c(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(n,a)}_splitRoot(e,t){this._data=new S([e,t]),this._data.height=e.height+1,c(this._data,this._toBBox)}_chooseSplitIndex(e,t,n){let r,i,o;r=i=1/0;for(let s=t;s<=n-t;s++){const t=u(e,0,s,this._toBBox),a=u(e,s,n,this._toBBox),l=y(t,a),c=f(t)+f(a);l<r?(r=l,o=s,i=c<i?c:i):l===r&&c<i&&(i=c,o=s)}return o}_chooseSplitAxis(e,t,n){const r=e.leaf?this._compareMinX:p,i=e.leaf?this._compareMinY:d;this._allDistMargin(e,t,n,r)<this._allDistMargin(e,t,n,i)&&e.children.sort(r)}_allDistMargin(e,t,n,r){e.children.sort(r);const i=this._toBBox,o=u(e,0,t,i),s=u(e,n-t,n,i);let a=m(o)+m(s);for(let r=t;r<n-t;r++){const t=e.children[r];h(o,e.leaf?i(t):t),a+=m(o)}for(let r=n-t-1;r>=t;r--){const t=e.children[r];h(s,e.leaf?i(t):t),a+=m(s)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const n=e.data[t];if(0===n.children.length)if(t>0){const i=e.data[t-1],o=i.children;o.splice((0,r.qh)(o,n,o.length,i.indexHint),1)}else this.clear();else c(n,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function l(e,t){let n=e;for(M.clear();n;){if(!0===n.leaf)for(const e of n.children)t((0,i.zI)(e));else M.pushArray(n.children);n=M.pop()??null}}function c(e,t){u(e,0,e.children.length,t,e)}function u(e,t,n,r,i){i||(i=new I([])),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(let o,s=t;s<n;s++)o=e.children[s],h(i,e.leaf?r(o):o);return i}function h(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function p(e,t){return e.minX-t.minX}function d(e,t){return e.minY-t.minY}function f(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function m(e){return e.maxX-e.minX+(e.maxY-e.minY)}function g(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function y(e,t){const n=Math.max(e.minX,t.minX),r=Math.max(e.minY,t.minY),i=Math.min(e.maxX,t.maxX),o=Math.min(e.maxY,t.maxY);return Math.max(0,i-n)*Math.max(0,o-r)}function x(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function v(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function w(e,t,n,r,i){const o=[t,n];for(;o.length;){const t=o.pop(),n=o.pop();if(t-n<=r)continue;const a=n+Math.ceil((t-n)/r/2)*r;(0,s.q)(e,a,n,t,i),o.push(n,a,a,t)}}const _=new o.A,M=new o.A,b=new o.A,A=new o.A({deallocator:void 0});class C{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class P extends C{constructor(){super(...arguments),this.height=1,this.indexHint=new r.vW}}class I extends P{constructor(e){super(),this.children=e,this.leaf=!0}}class S extends P{constructor(e){super(),this.children=e,this.leaf=!1}}},76369:(e,t,n)=>{n.d(t,{LF:()=>M,M9:()=>b});var r=n(49186),i=n(93637),o=n(40876),s=n(59247),a=n(27865);class l extends SyntaxError{constructor(e,t,n,r){super(e),this.expected=t,this.found=n,this.location=r,this.name="SyntaxError"}format(e){let t="Error: "+this.message;if(this.location){let n=null;const r=e.find(e=>e.source===this.location.source);r&&(n=r.text.split(/\r\n|\n|\r/g));const i=this.location.start,o=this.location.source&&"function"==typeof this.location.source.offset?this.location.source.offset(i):i,s=this.location.source+":"+o.line+":"+o.column;if(n){const e=this.location.end,r="".padEnd(o.line.toString().length," "),a=n[i.line-1],l=(i.line===e.line?e.column:a.length+1)-i.column||1;t+="\n --\x3e "+s+"\n"+r+" |\n"+o.line+" | "+a+"\n"+r+" | "+"".padEnd(i.column-1," ")+"".padEnd(l,"^")}else t+="\n at "+s}return t}static buildMessage(e,t){function n(e){return e.codePointAt(0).toString(16).toUpperCase()}const r=Object.prototype.hasOwnProperty.call(RegExp.prototype,"unicode")?new RegExp("[\\p{C}\\p{Mn}\\p{Mc}]","gu"):null;function i(e){return r?e.replace(r,e=>"\\u{"+n(e)+"}"):e}function o(e){return i(e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,e=>"\\x0"+n(e)).replace(/[\x10-\x1F\x7F-\x9F]/g,e=>"\\x"+n(e)))}function s(e){return i(e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,e=>"\\x0"+n(e)).replace(/[\x10-\x1F\x7F-\x9F]/g,e=>"\\x"+n(e)))}const a={literal:e=>'"'+o(e.text)+'"',class(e){const t=e.parts.map(e=>Array.isArray(e)?s(e[0])+"-"+s(e[1]):s(e));return"["+(e.inverted?"^":"")+t.join("")+"]"+(e.unicode?"u":"")},any:()=>"any character",end:()=>"end of input",other:e=>e.description};function l(e){return a[e.type](e)}return"Expected "+function(e){const t=e.map(l);if(t.sort(),t.length>0){let e=1;for(let n=1;n<t.length;n++)t[n-1]!==t[n]&&(t[e]=t[n],e++);t.length=e}switch(t.length){case 1:return t[0];case 2:return t[0]+" or "+t[1];default:return t.slice(0,-1).join(", ")+", or "+t[t.length-1]}}(e)+" but "+function(e){return e?'"'+o(e)+'"':"end of input"}(t)+" found."}}function c(e){if(!e||0===e.length)return null;if("string"==typeof e){const t=u(e);return t&&0!==t.length?t:null}const t=e.map(e=>{if(!Number.isFinite(e.scale)||e.scale<=0)throw new r.A("effect:invalid-scale","scale must be finite and greater than 0",{stop:e});return{scale:e.scale,effects:u(e.value)}});t.sort((e,t)=>t.effects.length-e.effects.length);for(let e=0;e<t.length-1;e++){if(!(0,a.mj)(t[e].effects,t[e+1].effects))throw new r.A("effect:interpolation-impossible","Cannot interpolate by scale between 2 lists of mixed effects",{a:t[e].effects,b:t[e+1].effects});(0,a.O9)(t[e].effects,t[e+1].effects)}return t.sort((e,t)=>t.scale-e.scale),t}function u(e){let t;if(!e)return[];try{t=function(e,t){const n={},r=(t=void 0!==t?t:{}).grammarSource,i={start:_e};let o=_e;const s="none",a=")",c=",",u="(",h="%",p="px",d="cm",f="mm",m="in",g="pt",y="pc",x="deg",v="rad",w="grad",_="turn",M="#",b=".",A="e",C=/^[ \t\n\r]/,P=/^[a-z\-]/,I=/^[0-9a-fA-F]/,S=/^[+\-]/,O=/^[0-9]/,R=ye("none"),E=me("none",!1),T=me(")",!1),L=me(",",!1),Z=ge([" ","\t","\n","\r"],!1,!1,!1),B=ye("function"),j=me("(",!1),$=ye("identifier"),U=ge([["a","z"],"-"],!1,!1,!1),N=ye("percentage"),Y=me("%",!1),X=ye("length"),F=me("px",!1),k=me("cm",!1),H=me("mm",!1),z=me("in",!1),D=me("pt",!1),q=me("pc",!1),V=ye("angle"),W=me("deg",!1),G=me("rad",!1),J=me("grad",!1),K=me("turn",!1),Q=ye("number"),ee=ye("color"),te=me("#",!1),ne=ge([["0","9"],["a","f"],["A","F"]],!1,!1,!1),re=ge(["+","-"],!1,!1,!1),ie=ge([["0","9"]],!1,!1,!1),oe=me(".",!1),se=me("e",!1);let ae=0|t.peg$currPos,le=ae;const ce=[{line:1,column:1}];let ue,he=ae,pe=t.peg$maxFailExpected||[],de=0|t.peg$silentFails;if(t.startRule){if(!(t.startRule in i))throw new Error("Can't start parsing from rule \""+t.startRule+'".');o=i[t.startRule]}function fe(){return e.substring(le,ae)}function me(e,t){return{type:"literal",text:e,ignoreCase:t}}function ge(e,t,n,r){return{type:"class",parts:e,inverted:t,ignoreCase:n,unicode:r}}function ye(e){return{type:"other",description:e}}function xe(t){let n,r=ce[t];if(r)return r;if(t>=ce.length)n=ce.length-1;else for(n=t;!ce[--n];);for(r=ce[n],r={line:r.line,column:r.column};n<t;)10===e.charCodeAt(n)?(r.line++,r.column=1):r.column++,n++;return ce[t]=r,r}function ve(e,t,n){const i=xe(e),o=xe(t);return{source:r,start:{offset:e,line:i.line,column:i.column},end:{offset:t,line:o.line,column:o.column}}}function we(e){ae<he||(ae>he&&(he=ae,pe=[]),pe.push(e))}function _e(){let e;return e=Me(),e===n&&(e=function(){let e,t;if(e=[],t=be(),t!==n)for(;t!==n;)e.push(t),t=be();else e=n;return e}()),e}function Me(){let t,r;return de++,t=ae,Ce(),e.substr(ae,4)===s?(r=s,ae+=4):(r=n,0===de&&we(E)),r!==n?(Ce(),le=t,t=[]):(ae=t,t=n),de--,t===n&&0===de&&we(R),t}function be(){let t,r,i,o;return t=ae,Ce(),r=function(){let t,r,i;return de++,t=ae,r=Pe(),r!==n?(40===e.charCodeAt(ae)?(i=u,ae++):(i=n,0===de&&we(j)),i!==n?(le=t,t=r):(ae=t,t=n)):(ae=t,t=n),de--,t===n&&(r=n,0===de&&we(B)),t}(),r!==n?(Ce(),i=function(){let t,r,i,o,s,a,l,u;if(t=ae,r=Ae(),r!==n){for(i=[],o=ae,s=Ce(),44===e.charCodeAt(ae)?(a=c,ae++):(a=n,0===de&&we(L)),a===n&&(a=null),l=Ce(),u=Ae(),u!==n?(s=[s,a,l,u],o=s):(ae=o,o=n);o!==n;)i.push(o),o=ae,s=Ce(),44===e.charCodeAt(ae)?(a=c,ae++):(a=n,0===de&&we(L)),a===n&&(a=null),l=Ce(),u=Ae(),u!==n?(s=[s,a,l,u],o=s):(ae=o,o=n);le=t,t=function(e,t){return t.length>0?function(e,t){return[e].concat(function(e){return e.map(function(e){return e[3]})}(t))}(e,t):[e]}(r,i)}else ae=t,t=n;return t}(),i===n&&(i=null),Ce(),41===e.charCodeAt(ae)?(o=a,ae++):(o=n,0===de&&we(T)),o!==n?(Ce(),le=t,t=function(e,t){return{type:"function",name:e,parameters:t||[]}}(r,i)):(ae=t,t=n)):(ae=t,t=n),t}function Ae(){let e,t;return e=ae,t=Ie(),t===n&&(t=Se(),t===n&&(t=Oe(),t===n&&(t=function(){let e,t;return de++,e=ae,Ce(),t=Ee(),t!==n?(le=e,e=function(e){return{value:e,unit:null}}(t)):(ae=e,e=n),de--,e===n&&0===de&&we(Q),e}()))),t!==n&&(le=e,t=function(e){return{type:"quantity",value:e.value,unit:e.unit}}(t)),e=t,e===n&&(e=ae,t=Re(),t!==n&&(le=e,t=function(e){return{type:"color",colorType:e.type,value:e.value}}(t)),e=t),e}function Ce(){let t,r;for(de++,t=[],r=e.charAt(ae),C.test(r)?ae++:(r=n,0===de&&we(Z));r!==n;)t.push(r),r=e.charAt(ae),C.test(r)?ae++:(r=n,0===de&&we(Z));return de--,t}function Pe(){let t,r,i;if(de++,t=ae,r=[],i=e.charAt(ae),P.test(i)?ae++:(i=n,0===de&&we(U)),i!==n)for(;i!==n;)r.push(i),i=e.charAt(ae),P.test(i)?ae++:(i=n,0===de&&we(U));else r=n;return r!==n&&(le=t,r=fe()),t=r,de--,t===n&&(r=n,0===de&&we($)),t}function Ie(){let t,r,i;return de++,t=ae,Ce(),r=Ee(),r!==n?(37===e.charCodeAt(ae)?(i=h,ae++):(i=n,0===de&&we(Y)),i!==n?(le=t,t=function(e){return{value:e,unit:"%"}}(r)):(ae=t,t=n)):(ae=t,t=n),de--,t===n&&0===de&&we(N),t}function Se(){let t,r,i;return de++,t=ae,Ce(),r=Ee(),r!==n?(e.substr(ae,2)===p?(i=p,ae+=2):(i=n,0===de&&we(F)),i!==n?(le=t,t=function(e){return{value:e,unit:"px"}}(r)):(ae=t,t=n)):(ae=t,t=n),t===n&&(t=ae,Ce(),r=Ee(),r!==n?(e.substr(ae,2)===d?(i=d,ae+=2):(i=n,0===de&&we(k)),i!==n?(le=t,t=function(e){return{value:e,unit:"cm"}}(r)):(ae=t,t=n)):(ae=t,t=n),t===n&&(t=ae,Ce(),r=Ee(),r!==n?(e.substr(ae,2)===f?(i=f,ae+=2):(i=n,0===de&&we(H)),i!==n?(le=t,t=function(e){return{value:e,unit:"mm"}}(r)):(ae=t,t=n)):(ae=t,t=n),t===n&&(t=ae,Ce(),r=Ee(),r!==n?(e.substr(ae,2)===m?(i=m,ae+=2):(i=n,0===de&&we(z)),i!==n?(le=t,t=function(e){return{value:e,unit:"in"}}(r)):(ae=t,t=n)):(ae=t,t=n),t===n&&(t=ae,Ce(),r=Ee(),r!==n?(e.substr(ae,2)===g?(i=g,ae+=2):(i=n,0===de&&we(D)),i!==n?(le=t,t=function(e){return{value:e,unit:"pt"}}(r)):(ae=t,t=n)):(ae=t,t=n),t===n&&(t=ae,Ce(),r=Ee(),r!==n?(e.substr(ae,2)===y?(i=y,ae+=2):(i=n,0===de&&we(q)),i!==n?(le=t,t=function(e){return{value:e,unit:"pc"}}(r)):(ae=t,t=n)):(ae=t,t=n)))))),de--,t===n&&0===de&&we(X),t}function Oe(){let t,r,i;return de++,t=ae,r=Ee(),r!==n?(e.substr(ae,3)===x?(i=x,ae+=3):(i=n,0===de&&we(W)),i!==n?(le=t,t=function(e){return{value:e,unit:"deg"}}(r)):(ae=t,t=n)):(ae=t,t=n),t===n&&(t=ae,r=Ee(),r!==n?(e.substr(ae,3)===v?(i=v,ae+=3):(i=n,0===de&&we(G)),i!==n?(le=t,t=function(e){return{value:e,unit:"rad"}}(r)):(ae=t,t=n)):(ae=t,t=n),t===n&&(t=ae,r=Ee(),r!==n?(e.substr(ae,4)===w?(i=w,ae+=4):(i=n,0===de&&we(J)),i!==n?(le=t,t=function(e){return{value:e,unit:"grad"}}(r)):(ae=t,t=n)):(ae=t,t=n),t===n&&(t=ae,r=Ee(),r!==n?(e.substr(ae,4)===_?(i=_,ae+=4):(i=n,0===de&&we(K)),i!==n?(le=t,t=function(e){return{value:e,unit:"turn"}}(r)):(ae=t,t=n)):(ae=t,t=n)))),de--,t===n&&(r=n,0===de&&we(V)),t}function Re(){let t,r,i,o;if(de++,t=ae,35===e.charCodeAt(ae)?(r=M,ae++):(r=n,0===de&&we(te)),r!==n){if(i=[],o=e.charAt(ae),I.test(o)?ae++:(o=n,0===de&&we(ne)),o!==n)for(;o!==n;)i.push(o),o=e.charAt(ae),I.test(o)?ae++:(o=n,0===de&&we(ne));else i=n;i!==n?(le=t,t={type:"hex",value:fe()}):(ae=t,t=n)}else ae=t,t=n;return t===n&&(t=ae,r=be(),r!==n&&(le=t,r=function(e){return{type:"function",value:e}}(r)),t=r,t===n&&(t=ae,r=Pe(),r!==n&&(le=t,r={type:"named",value:fe()}),t=r)),de--,t===n&&(r=n,0===de&&we(ee)),t}function Ee(){let t,r,i,o,s,a,l,c;for(t=ae,r=e.charAt(ae),S.test(r)?ae++:(r=n,0===de&&we(re)),r===n&&(r=null),i=ae,o=[],s=e.charAt(ae),O.test(s)?ae++:(s=n,0===de&&we(ie));s!==n;)o.push(s),s=e.charAt(ae),O.test(s)?ae++:(s=n,0===de&&we(ie));if(46===e.charCodeAt(ae)?(s=b,ae++):(s=n,0===de&&we(oe)),s!==n){if(a=[],l=e.charAt(ae),O.test(l)?ae++:(l=n,0===de&&we(ie)),l!==n)for(;l!==n;)a.push(l),l=e.charAt(ae),O.test(l)?ae++:(l=n,0===de&&we(ie));else a=n;a!==n?(o=[o,s,a],i=o):(ae=i,i=n)}else ae=i,i=n;if(i===n)if(i=[],o=e.charAt(ae),O.test(o)?ae++:(o=n,0===de&&we(ie)),o!==n)for(;o!==n;)i.push(o),o=e.charAt(ae),O.test(o)?ae++:(o=n,0===de&&we(ie));else i=n;if(i!==n){if(o=ae,101===e.charCodeAt(ae)?(s=A,ae++):(s=n,0===de&&we(se)),s!==n){if(a=e.charAt(ae),S.test(a)?ae++:(a=n,0===de&&we(re)),a===n&&(a=null),l=[],c=e.charAt(ae),O.test(c)?ae++:(c=n,0===de&&we(ie)),c!==n)for(;c!==n;)l.push(c),c=e.charAt(ae),O.test(c)?ae++:(c=n,0===de&&we(ie));else l=n;l!==n?(s=[s,a,l],o=s):(ae=o,o=n)}else ae=o,o=n;o===n&&(o=null),le=t,t=parseFloat(fe())}else ae=t,t=n;return t}ue=o();const Te=ue!==n&&ae===e.length;function Le(){throw ue!==n&&ae<e.length&&we({type:"end"}),function(e,t,n){return new l(l.buildMessage(e,t),e,t,n)}(pe,he<e.length?function(t=ae){const n=e.codePointAt(t);return void 0===n?"":String.fromCodePoint(n)}(he):null,he<e.length?ve(he,he+1):ve(he,he))}return t.peg$library?{peg$result:ue,peg$currPos:ae,peg$FAILED:n,peg$maxFailExpected:pe,peg$maxFailPos:he,peg$success:Te,peg$throw:Te?void 0:Le}:Te?ue:void Le()}(e)}catch(t){throw new r.A("effect:invalid-syntax","Invalid effect syntax",{value:e,error:t})}return t.map(e=>function(e){try{switch(e.name){case"grayscale":case"sepia":case"saturate":case"invert":case"brightness":case"contrast":return function(e){let t=1;return h(e.parameters,1),1===e.parameters.length&&(t=g(e.parameters[0])),new s.yG(e.name,t)}(e);case"opacity":return function(e){let t=1;return h(e.parameters,1),1===e.parameters.length&&(t=g(e.parameters[0])),new s.jm(t)}(e);case"hue-rotate":return function(e){let t=0;return h(e.parameters,1),1===e.parameters.length&&(t=function(e){return function(e){if("quantity"!==e.type||!(0===e.value&&null===e.unit||e.unit&&null!=f[e.unit]))throw new r.A("effect:type-error",`Expected <angle>, Actual: ${p(e)}`,{term:e})}(e),e.value*f[e.unit]||0}(e.parameters[0])),new s.Nd(t)}(e);case"blur":return function(e){let t=0;return h(e.parameters,1),1===e.parameters.length&&(t=y(e.parameters[0]),d(t,e.parameters[0])),new s.Fk(t)}(e);case"drop-shadow":return function(e){const t=[];let n=null;for(const i of e.parameters)if("color"===i.type){if(t.length&&Object.freeze(t),n)throw new r.A("effect:type-error","Accepts only one color",{});n=x(i)}else{const e=y(i);if(Object.isFrozen(t))throw new r.A("effect:type-error","<length> parameters not consecutive",{lengths:t});t.push(e),3===t.length&&d(e,i)}if(t.length<2||t.length>3)throw new r.A("effect:type-error",`Expected <length>{2,3}, Actual: <length>{${t.length}}`,{lengths:t});return new s.$b(t[0],t[1],t[2]||0,n||v("black"))}(e);case"bloom":return function(e){let t=1,n=0,r=0;return h(e.parameters,3),e.parameters[0]&&(t=g(e.parameters[0])),e.parameters[1]&&(n=y(e.parameters[1]),d(n,e.parameters[1])),e.parameters[2]&&(r=g(e.parameters[2])),new s.bv(t,n,r)}(e)}}catch(t){throw t.details.filter=e,t}throw new r.A("effect:unknown-effect",`Effect '${e.name}' is not supported`,{effect:e})}(e))}function h(e,t){if(e.length>t)throw new r.A("effect:type-error",`Function supports up to ${t} parameters, Actual: ${e.length}`,{parameters:e})}function p(e){if("color"===e.type)return"<color>";if(e.unit){if(e.unit in m)return"<length>";if(e.unit in f)return"<angle>";if("%"===e.unit)return"<percentage>"}return"<double>"}function d(e,t){if(e<0)throw new r.A("effect:type-error",`Negative values are not allowed, Actual: ${e}`,{term:t})}const f={deg:1,grad:.9,rad:180/Math.PI,turn:360},m={px:1,cm:96/2.54,mm:96/2.54/10,in:96,pc:16,pt:96/72};function g(e){!function(e){if("quantity"!==e.type||null!==e.unit&&"%"!==e.unit)throw new r.A("effect:type-error",`Expected <double> or <percentage>, Actual: ${p(e)}`,{term:e})}(e);const t=e.value;return d(t,e),"%"===e.unit?.01*t:t}function y(e){return function(e){if("quantity"!==e.type||!(0===e.value&&null===e.unit||e.unit&&null!=m[e.unit]))throw new r.A("effect:type-error",`Expected <length>, Actual: ${p(e)}`,{term:e})}(e),e.value*m[e.unit]||0}function x(e){switch(e.colorType){case"hex":return(0,o.j5)(e.value);case"named":return v(e.value);case"function":return function(e){if(h(e.parameters,4),w.test(e.name))return[g(e.parameters[0]),g(e.parameters[1]),g(e.parameters[2]),e.parameters[3]?g(e.parameters[3]):1];if(_.test(e.name))return(0,o.ay)(function(e){return function(e){if("quantity"!==e.type||null!==e.unit)throw new r.A("effect:type-error",`Expected <double>, Actual: ${p(e)}`,{term:e})}(e),d(e.value,e),e.value}(e.parameters[0]),g(e.parameters[1]),g(e.parameters[2]),e.parameters[3]?g(e.parameters[3]):1);throw new r.A("effect:syntax-error",`Invalid color function '${e.name}'`,{colorFunction:e})}(e.value)}}function v(e){if(!(0,o.V6)(e))throw new r.A("effect:unknown-color",`color '${e}' isn't valid`,{namedColor:e});return(0,o.c4)(e)}const w=/^rgba?/i,_=/^hsla?/i;function M(e,t,n){try{return function(e){if(!e||0===e.length)return null;if(function(e){const t=e[0];return!!t&&"scale"in t}(e)){const t=[];for(const n of e)t.push({scale:n.scale,value:A(n.value)});return t}return A(e)}(e)}catch(e){n?.messages?.push(e)}return null}function b(e,t,n,r){try{const r=function(e){const t=c(e);return t?(0,a.dw)(t)?t.map(e=>e.toJSON()):t.map(({scale:e,effects:t})=>({scale:e,value:t.map(e=>e.toJSON())})):null}(e);(0,i.sM)(n,r,t)}catch(e){r.messages&&r.messages.push(e)}}function A(e){if(!e?.length)return"";const t=[];for(const n of e){let e=[];switch(n.type){case"grayscale":case"sepia":case"saturate":case"invert":case"brightness":case"contrast":case"opacity":e=[C(n,"amount")];break;case"blur":e=[C(n,"radius","pt")];break;case"hue-rotate":e=[C(n,"angle","deg")];break;case"drop-shadow":e=[C(n,"xoffset","pt"),C(n,"yoffset","pt"),C(n,"blurRadius","pt"),P(n,"color")];break;case"bloom":e=[C(n,"strength"),C(n,"radius","pt"),C(n,"threshold")]}const r=`${n.type}(${e.filter(Boolean).join(" ")})`;c(r),t.push(r)}return t.join(" ")}function C(e,t,n){if(null==e[t])throw new r.A("effect:missing-parameter",`Missing parameter '${t}' in ${e.type} effect`,{effect:e});return n?e[t]+n:""+e[t]}function P(e,t){if(null==e[t])throw new r.A("effect:missing-parameter",`Missing parameter '${t}' in ${e.type} effect`,{effect:e});const n=e[t];return`rgba(${n[0]||0}, ${n[1]||0}, ${n[2]||0}, ${n[3]/255||0})`}},78553:(e,t,n)=>{n.d(t,{D:()=>o,p:()=>i});var r=n(56507);function i(e){const t=(0,r.Vr)(100*(1-e));return Math.max(0,Math.min(t,100))}function o(e){const t=1-e/100;return Math.max(0,Math.min(t,1))}},79677:(e,t,n)=>{n.d(t,{A:()=>p});var r,i=n(31635),o=n(25482),s=n(88930),a=n(10107),l=(n(44208),n(53966),n(87811),n(36005)),c=n(40608),u=n(43937),h=n(98623);let p=class extends o.o{static{r=this}static get allTime(){return d}static get empty(){return f}static fromArray(e){return new r({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(r.allTime)}get isEmpty(){return this.equals(r.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new r({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,n=this.end?.getTime()??this.end,r=e.start?.getTime()??e.start,i=e.end?.getTime()??e.end;return t===r&&n===i}expandTo(e,t=h.qU){if(this.isEmpty||this.isAllTime)return this.clone();let n=this.start;n&&(n=(0,s.lL)(n,e,t));let i=this.end;if(i){const n=(0,s.lL)(i,e,t);i=i.getTime()===n.getTime()?n:(0,s.S1)(n,1,e,t)}return new r({start:n,end:i})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return r.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,n=this.end?.getTime()??1/0,i=e.start?.getTime()??-1/0,o=e.end?.getTime()??1/0;let s,a;return i>=t&&i<=n?s=i:t>=i&&t<=o&&(s=t),n>=i&&n<=o?a=n:o>=t&&o<=n&&(a=o),null==s||null==a||isNaN(s)||isNaN(a)?r.empty:new r({start:s===-1/0?null:new Date(s),end:a===1/0?null:new Date(a)})}offset(e,t,n=h.qU){if(this.isEmpty||this.isAllTime)return this.clone();const i=new r,{start:o,end:a}=this;return null!=o&&(i.start=(0,s.S1)(o,e,t,n)),null!=a&&(i.end=(0,s.S1)(a,e,t,n)),i}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return d.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,n=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new r({start:t,end:n})}};(0,i.Cg)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"end",void 0),(0,i.Cg)([(0,l.w)("end")],p.prototype,"readEnd",null),(0,i.Cg)([(0,u.K)("end")],p.prototype,"writeEnd",null),(0,i.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],p.prototype,"isAllTime",null),(0,i.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],p.prototype,"isEmpty",null),(0,i.Cg)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"start",void 0),(0,i.Cg)([(0,l.w)("start")],p.prototype,"readStart",null),(0,i.Cg)([(0,u.K)("start")],p.prototype,"writeStart",null),p=r=(0,i.Cg)([(0,c.$)("esri.time.TimeExtent")],p);const d=new p,f=new p({start:void 0,end:void 0})},80754:(e,t,n)=>{n.d(t,{j7:()=>s,kS:()=>l,kd:()=>a,r8:()=>c});var r=n(82799),i=n(16930),o=n(65864);const s={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new r.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:i.A.WebMercator}),minus180Line:new r.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:i.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new r.A({paths:[[[180,-180],[180,180]]],spatialReference:i.A.WGS84}),minus180Line:new r.A({paths:[[[-180,-180],[-180,180]]],spatialReference:i.A.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const n=c(e);for(const e of n)for(const n of e)n[0]+=t;return e}function c(e){return(0,o.Bi)(e)?e.rings:e.paths}},85648:(e,t,n)=>{n.d(t,{n:()=>i});var r=n(84952);function i(e){return o[function(e){return"json"===e.type?"application/json":"blob"===e.type?e.blob.type:function(e){const t=(0,r.Zo)(e);return l[t]||s}(e.url)}(e)]||a}const o={},s="text/plain",a=o[s],l={png:"image/png",jpeg:"image/jpeg",jpg:"image/jpg",bmp:"image/bmp",gif:"image/gif",json:"application/json",txt:"text/plain",xml:"application/xml",svg:"image/svg+xml",zip:"application/zip",pbf:"application/vnd.mapbox-vector-tile",gz:"application/gzip","bin.gz":"application/octet-stream"};for(const e in l)o[l[e]]=e},89056:(e,t,n)=>{n.d(t,{b3:()=>h,jZ:()=>u});var r=n(12195),i=n(19419),o=n(6606),s=n(95108),a=n(65864),l=n(80754),c=n(21325);function u(e){return p(e,!0)}function h(e){return p(e,!1)}function p(e,t){if(null==e)return null;const n=e.spatialReference,i=(0,c.Vp)(n),s=(0,r.W)(e)?e.toJSON():e;if(!i)return s;const u=(0,c.K8)(n)?102100:4326,h=l.j7[u].maxX,p=l.j7[u].minX;if((0,a.fT)(s))return f(s,h,p);if((0,a.U9)(s))return s.points=s.points.map(e=>f(e,h,p)),s;if((0,a.ZC)(s))return d(s,i);if((0,a.Bi)(s)||(0,a.Rg)(s)){const e=(0,o.Rg)(w,s),n={xmin:e[0],ymin:e[1],xmax:e[2],ymax:e[3]},r=(0,l.kd)(n.xmin,p)*(2*h),i=0===r?s:(0,l.kS)(s,r);return n.xmin+=r,n.xmax+=r,n.xmax>h?x(i,h,t):n.xmin<p?x(i,p,t):i}return s}function d(e,t){if(!t)return e;const n=function(e,t){const n=[],{ymin:r,ymax:i,xmin:o,xmax:s}=e,a=e.xmax-e.xmin,[l,c]=t.valid,{x:u,frameId:h}=m(e.xmin,t),{x:p,frameId:d}=m(e.xmax,t),f=u===p&&a>0;if(a>2*c){const e={xmin:o<s?u:p,ymin:r,xmax:c,ymax:i},t={xmin:l,ymin:r,xmax:o<s?p:u,ymax:i},a={xmin:0,ymin:r,xmax:c,ymax:i},f={xmin:l,ymin:r,xmax:0,ymax:i},m=[],y=[];g(e,a)&&m.push(h),g(e,f)&&y.push(h),g(t,a)&&m.push(d),g(t,f)&&y.push(d);for(let e=h+1;e<d;e++)m.push(e),y.push(e);n.push(new v(e,[h]),new v(t,[d]),new v(a,m),new v(f,y))}else u>p||f?n.push(new v({xmin:u,ymin:r,xmax:c,ymax:i},[h]),new v({xmin:l,ymin:r,xmax:p,ymax:i},[d])):n.push(new v({xmin:u,ymin:r,xmax:p,ymax:i},[h]));return n}(e,t).map(e=>e.extent);return n.length<2?n[0]||e:n.length>2?(e.xmin=t.valid[0],e.xmax=t.valid[1],e):{rings:n.map(e=>[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]])}}function f(e,t,n){if(Array.isArray(e)){const r=e[0];if(r>t){const n=(0,l.kd)(r,t);e[0]=r+n*(-2*t)}else if(r<n){const t=(0,l.kd)(r,n);e[0]=r+t*(-2*n)}}else{const r=e.x;if(r>t){const n=(0,l.kd)(r,t);e.x+=n*(-2*t)}else if(r<n){const t=(0,l.kd)(r,n);e.x+=t*(-2*n)}}return e}function m(e,t){const[n,r]=t.valid,i=2*r;let o,s=0;return e>r?(o=Math.ceil(Math.abs(e-r)/i),e-=o*i,s=o):e<n&&(o=Math.ceil(Math.abs(e-n)/i),e+=o*i,s=-o),{x:e,frameId:s}}function g(e,t){const{xmin:n,ymin:r,xmax:i,ymax:o}=t;return y(e,n,r)&&y(e,n,o)&&y(e,i,o)&&y(e,i,r)}function y(e,t,n){return t>=e.xmin&&t<=e.xmax&&n>=e.ymin&&n<=e.ymax}function x(e,t,n=!0){const r=!(0,a.Rg)(e);if(r&&(0,s.m3)(e),n)return(new _).cut(e,t);const i=r?e.rings:e.paths,o=r?4:2,l=i.length,c=-2*t;for(let e=0;e<l;e++){const t=i[e];if(t&&t.length>=o){const e=[];for(const n of t)e.push([n[0]+c,n[1]]);i.push(e)}}return r?e.rings=i:e.paths=i,e}class v{constructor(e,t){this.extent=e,this.frameIds=t}}const w=(0,i.vt)();class _{constructor(){this._linesIn=[],this._linesOut=[]}cut(e,t){let n;if(this._xCut=t,e.rings)this._closed=!0,n=e.rings,this._minPts=4;else{if(!e.paths)return null;this._closed=!1,n=e.paths,this._minPts=2}for(const e of n){if(!e||e.length<this._minPts)continue;let t=!0;for(const n of e)t?(this.moveTo(n),t=!1):this.lineTo(n);this._closed&&this.close()}this._pushLineIn(),this._pushLineOut(),n=[];for(const e of this._linesIn)e&&e.length>=this._minPts&&n.push(e);const r=-2*this._xCut;for(const e of this._linesOut)if(e&&e.length>=this._minPts){for(const t of e)t[0]+=r;n.push(e)}return this._closed?e.rings=n:e.paths=n,e}moveTo(e){this._pushLineIn(),this._pushLineOut(),this._prevSide=this._side(e[0]),this._moveTo(e[0],e[1],this._prevSide),this._prevPt=e,this._firstPt=e}lineTo(e){const t=this._side(e[0]);if(t*this._prevSide===-1){const n=this._intersect(this._prevPt,e);this._lineTo(this._xCut,n,0),this._prevSide=0,this._lineTo(e[0],e[1],t)}else this._lineTo(e[0],e[1],t);this._prevSide=t,this._prevPt=e}close(){const e=this._firstPt,t=this._prevPt;e[0]===t[0]&&e[1]===t[1]||this.lineTo(e),this._checkClosingPt(this._lineIn),this._checkClosingPt(this._lineOut)}_moveTo(e,t,n){this._closed?(this._lineIn.push([n<=0?e:this._xCut,t]),this._lineOut.push([n>=0?e:this._xCut,t])):(n<=0&&this._lineIn.push([e,t]),n>=0&&this._lineOut.push([e,t]))}_lineTo(e,t,n){this._closed?(M(this._lineIn,n<=0?e:this._xCut,t),M(this._lineOut,n>=0?e:this._xCut,t)):n<0?(0===this._prevSide&&this._pushLineOut(),this._lineIn.push([e,t])):n>0?(0===this._prevSide&&this._pushLineIn(),this._lineOut.push([e,t])):this._prevSide<0?(this._lineIn.push([e,t]),this._lineOut.push([e,t])):this._prevSide>0&&(this._lineOut.push([e,t]),this._lineIn.push([e,t]))}_checkClosingPt(e){const t=e.length;t>3&&e[0][0]===this._xCut&&e[t-2][0]===this._xCut&&e[1][0]===this._xCut&&(e[0][1]=e[t-2][1],e.pop())}_side(e){return e<this._xCut?-1:e>this._xCut?1:0}_intersect(e,t){const n=(this._xCut-e[0])/(t[0]-e[0]);return e[1]+n*(t[1]-e[1])}_pushLineIn(){this._lineIn&&this._lineIn.length>=this._minPts&&this._linesIn.push(this._lineIn),this._lineIn=[]}_pushLineOut(){this._lineOut&&this._lineOut.length>=this._minPts&&this._linesOut.push(this._lineOut),this._lineOut=[]}}function M(e,t,n){const r=e.length;r>1&&e[r-1][0]===t&&e[r-2][0]===t?e[r-1][1]=n:e.push([t,n])}},92071:(e,t,n)=>{n.d(t,{P:()=>x,L:()=>v});var r=n(31635),i=n(65008),o=n(76953),s=n(4718),a=n(35666);class l{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(a.AU),this._values=new Map,this.multipleOriginsSupported=!0}clone(e){const t=new l,n=this._originStores[0];n&&n.forEach((e,n)=>{t.set(n,(0,s.o8)(e),0)});for(let n=2;n<a.AU;n++){const r=this._originStores[n];r&&r.forEach((r,i)=>{e&&e.has(i)||t.set(i,(0,s.o8)(r),n)})}return t}get(e,t){const n=void 0===t?this._values:this._originStores[t];return n?n.get(e):void 0}keys(e){const t=null==e?this._values:this._originStores[e];return t?[...t.keys()]:[]}set(e,t,n=7){let r=this._originStores[n];if(r||(r=new Map,this._originStores[n]=r),r.set(e,t),!this._values.has(e)||this._propertyOriginMap.get(e)<=n){const r=this._values.get(e);return this._values.set(e,t),this._propertyOriginMap.set(e,n),r!==t}return!1}delete(e,t=7){const n=this._originStores[t];if(!n)return;const r=n.get(e);if(n.delete(e),this._values.has(e)&&this._propertyOriginMap.get(e)===t){this._values.delete(e);for(let n=t-1;n>=0;n--){const t=this._originStores[n];if(t&&t.has(e)){this._values.set(e,t.get(e)),this._propertyOriginMap.set(e,n);break}}}return r}has(e,t){const n=void 0===t?this._values:this._originStores[t];return!!n&&n.has(e)}revert(e,t){for(;t>0&&!this.has(e,t);)--t;const n=this._originStores[t],r=n?.get(e),i=this._values.get(e);return this._values.set(e,r),this._propertyOriginMap.set(e,t),i!==r}originOf(e){return this._propertyOriginMap.get(e)||0}isAtOrigin(e,t){return this.has(e,t)&&this.originOf(e)===t}isBelowOrigin(e,t){return!this.has(e)||this.originOf(e)<t}forEach(e){this._values.forEach(e)}}var c=n(45917),u=n(88620),h=n(40608);const p=e=>{const t=e;let n=class extends t{constructor(...e){super(...e);const t=(0,u.oY)(this),n=t.store,r=new l;t.store=r,(0,o.k)(t,n,r)}read(e,t){(0,c.L)(this,e,t)}getAtOrigin(e,t){const n=d(this),r=(0,a.aB)(t);if("string"==typeof e)return n.get(e,r);const i={};return e.forEach(e=>{i[e]=n.get(e,r)}),i}originOf(e){return(0,a.OL)(this.originIdOf(e))}originIdOf(e){return d(this).originOf(e)}revert(e,t){const n=d(this),r=(0,a.aB)(t),i=(0,u.oY)(this);let o;o="string"==typeof e?"*"===e?n.keys(r):[e]:e,o.forEach(e=>{i.invalidate(e),n.revert(e,r),i.commit(e)})}};return n=(0,r.Cg)([(0,h.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],n),n};function d(e){return(0,u.oY)(e).store}p(i.A);var f=n(16649),m=n(49422);const g=e=>{const t=e;let n=class extends t{constructor(...e){super(...e)}clear(e,t="user"){(0,u.oY)(this).clearOrigin(e,(0,a.aB)(t))}write(e,t){return(0,m.M)(this,e=e||{},t),e}setAtOrigin(e,t,n){(0,u.oY)(this).setAtOrigin(e,t,(0,a.aB)(n))}removeOrigin(e){const t=y(this),n=(0,a.aB)(e),r=t.keys(n);for(const e of r)t.originOf(e)===n&&t.set(e,t.get(e,n),7)}updateOrigin(e,t){const n=y(this),r=(0,a.aB)(t),i=(0,f.Jt)(this,e);for(let t=r+1;t<a.AU;++t)n.delete(e,t);n.set(e,i,r)}toJSON(e){return this.write({},e)}};return n=(0,r.Cg)([(0,h.$)("esri.core.MultiOriginJSONSupport.WriteableMultiOriginJSONSupport")],n),n.prototype.toJSON.isDefaultToJSON=!0,n};function y(e){return(0,u.oY)(e).store}const x=e=>{const t=g(p(e));let n=class extends t{};return n=(0,r.Cg)([(0,h.$)("esri.core.MultiOriginJSONSupport")],n),n},v=x(i.A)}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8407],{10407:(e,t,r)=>{r.d(t,{It:()=>y,LG:()=>s,OM:()=>l,Sm:()=>c,Y:()=>u,bK:()=>a,mm:()=>p,sQ:()=>f});var n=r(98988),i=r(16930),o=r(28735);function s(e,t){if(!u(e,t)){const r=e.typeKeywords;r?r.push(t):e.typeKeywords=[t]}}function u(e,t){return!!e.typeKeywords?.includes(t)}function a(e){return u(e,p.HOSTED_SERVICE)}function l(e,t){const r=e.typeKeywords;if(r){const e=r.indexOf(t);e>-1&&r.splice(e,1)}}function c(e,t,r){r?s(e,t):l(e,t)}async function f(e){const t=e.clone().normalize();let r;if(t.length>1)for(const e of t)r?e.width>r.width&&(r=e):r=e;else r=t[0];return async function(e){const t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,o.ci)(e);const r=i.A.WGS84;return await(0,n.initializeProjection)(t,r),(0,n.project)(e,r)}(r)}const p={CHARTS:"Charts",DYNAMIC:"Dynamic",DEVELOPER_BASEMAP:"DeveloperBasemap",GROUP_LAYER_MAP:"Map",HOSTED_SERVICE:"Hosted Service",JSAPI:"ArcGIS API for JavaScript",LOCAL_SCENE:"ViewingMode-Local",METADATA:"Metadata",MULTI_LAYER:"Multilayer",ORIENTED_IMAGERY_LAYER:"OrientedImageryLayer",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery"};function y(e){const{portal:t,isOrgItem:r,itemControl:n}=e,i=t.user?.privileges;let o=!i||i.includes("features:user:edit"),s=!!r&&!!i?.includes("features:user:fullEdit");const u="update"===n||"admin"===n;return u?s=o=!0:s&&(o=!0),{features:{edit:o,fullEdit:s},content:{updateItem:u}}}},60999:(e,t,r)=>{r.d(t,{DZ:()=>d,Ke:()=>y,Tj:()=>c,UT:()=>g,jJ:()=>l});var n=r(31635),i=r(65008),o=r(97768),s=r(74887),u=r(10107),a=r(40608);function l(e,t,r){return(0,s.Lx)(e.map((e,n)=>t.apply(r,[e,n])))}async function c(e,t,r){return(await(0,s.Lx)(e.map((e,n)=>t.apply(r,[e,n])))).map(e=>e.value)}function f(e){return{ok:!0,value:e}}function p(e){return{ok:!1,error:e}}async function y(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return f(await e)}catch(e){return p(e)}}async function d(e){try{return f(await e)}catch(e){return(0,s.QP)(e),p(e)}}function g(e,t){return new h(e,t)}let h=class extends i.A{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,o.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:r}=this._abortController;this.promise=e(r),this.promise.then(e=>{this._result=f(e),this._cleanup()},e=>{this._result=p(e),this._cleanup()}),this._abortHandle=(0,s.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,o.xt)(this._abortHandle),this._abortController=null}};(0,n.Cg)([(0,u.MZ)()],h.prototype,"value",null),(0,n.Cg)([(0,u.MZ)()],h.prototype,"error",null),(0,n.Cg)([(0,u.MZ)()],h.prototype,"finished",null),(0,n.Cg)([(0,u.MZ)()],h.prototype,"promise",void 0),(0,n.Cg)([(0,u.MZ)()],h.prototype,"_result",void 0),h=(0,n.Cg)([(0,a.$)("esri.core.asyncUtils.ReactiveTask")],h)},77548:(e,t,r)=>{r.d(t,{Gh:()=>g,tk:()=>f,BR:()=>c,wI:()=>l,G$:()=>y,$x:()=>p,Ov:()=>u,W_:()=>a,OP:()=>d,TU:()=>s,XX:()=>o});var n=r(70333),i=r(78888);r(7762),r(84952),r(36563),r(36708),new WeakMap;const o={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function s(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function u(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function a(e){const t=e?.type;return("feature"===t||"subtype-group"===t||"oriented-imagery"===t)&&"feature-layer"===e?.source?.type}async function l(e,t){const r=n.id?.findServerInfo(e);if(null!=r?.currentVersion)return r.owningSystemUrl||null;const o=e.toLowerCase().indexOf("/rest/services");if(-1===o)return null;const s=`${e.slice(0,o)}/rest/info`,u=null!=t?t.signal:null,{data:a}=await(0,i.A)(s,{query:{f:"json"},responseType:"json",signal:u});return a?.owningSystemUrl||null}function c(e){return function(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"catalog-footprint":case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function f(e){return!!function(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":return!0;default:return!1}}(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}function p(e,t){return null}function y(e){return null}function d(e){return!e||"Feature Service"===e.type&&!e.sourceUrl}function g(e,t){if(!t||!d(e))return;const r=(e.url,null);r&&(e.url=r)}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5751,8256],{4146:(e,t,i)=>{i.d(t,{A:()=>_});var r=i(31635),s=i(78888),n=i(49186),o=i(65529),a=i(4902),l=i(92474),h=i(53966),u=i(74887),d=i(84952),c=i(10107),p=(i(44208),i(87811),i(40608)),g=i(5443),y=i(16930),f=i(92602),m=i(79677);let v=0,_=class extends((0,o.Zt)((0,a.sA)(l.x_))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new g.A(-180,-90,180,90,y.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+v++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=y.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await i.e(7982).then(i.bind(i,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:r}=await i.e(5613).then(i.bind(i,45613));try{return await r(t)}catch(e){const i=t?.portalItem,r=i?.id||"unset",s=i?.portal?.url||f.A.portalUrl;throw h.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+s+"', id: '"+r+"')",e),e}}(e)}initialize(){this.when().catch(e=>{(0,u.zf)(e)||h.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})})}destroy(){const e=this.parent;if(e){const t=this;"layers"in e&&e.layers.includes(t)?e.layers.remove(t):"tables"in e&&e.tables.includes(t)?e.tables.remove(t):"baseLayers"in e&&e.baseLayers.includes(t)?e.baseLayers.remove(t):"groundLayers"in e&&e.groundLayers.includes(t)?e.groundLayers.remove(t):"referenceLayers"in e&&e.referenceLayers.includes(t)&&e.referenceLayers.remove(t),this._set("parent",null)}}get effectiveVisible(){let e=this.visible;const t=this.parent;return e&&t&&"effectiveVisible"in t&&(e&&=t.effectiveVisible),e}get hasAttributionData(){return null!=this.attributionDataUrl}get loaded(){return super.loaded}get parsedUrl(){return(0,d.An)(this.url)}createLayerView(e,t){return Promise.reject(new n.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,s.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new n.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,r.Cg)([(0,c.MZ)({type:String})],_.prototype,"attributionDataUrl",void 0),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],_.prototype,"effectiveVisible",null),(0,r.Cg)([(0,c.MZ)({type:g.A})],_.prototype,"fullExtent",void 0),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],_.prototype,"hasAttributionData",null),(0,r.Cg)([(0,c.MZ)({type:String,clonable:!1})],_.prototype,"id",void 0),(0,r.Cg)([(0,c.MZ)({type:Boolean,nonNullable:!0})],_.prototype,"legendEnabled",void 0),(0,r.Cg)([(0,c.MZ)({type:["show","hide","hide-children"]})],_.prototype,"listMode",void 0),(0,r.Cg)([(0,c.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],_.prototype,"opacity",void 0),(0,r.Cg)([(0,c.MZ)({clonable:!1})],_.prototype,"parent",void 0),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],_.prototype,"parsedUrl",null),(0,r.Cg)([(0,c.MZ)({type:Boolean,readOnly:!0})],_.prototype,"persistenceEnabled",void 0),(0,r.Cg)([(0,c.MZ)({type:Boolean})],_.prototype,"popupEnabled",void 0),(0,r.Cg)([(0,c.MZ)({type:Boolean})],_.prototype,"attributionVisible",void 0),(0,r.Cg)([(0,c.MZ)({type:y.A})],_.prototype,"spatialReference",void 0),(0,r.Cg)([(0,c.MZ)({type:String})],_.prototype,"title",void 0),(0,r.Cg)([(0,c.MZ)({readOnly:!0,json:{read:!1}})],_.prototype,"type",void 0),(0,r.Cg)([(0,c.MZ)()],_.prototype,"url",void 0),(0,r.Cg)([(0,c.MZ)({type:m.A})],_.prototype,"visibilityTimeExtent",void 0),(0,r.Cg)([(0,c.MZ)({type:Boolean,nonNullable:!0})],_.prototype,"visible",void 0),_=(0,r.Cg)([(0,p.$)("esri.layers.Layer")],_)},4902:(e,t,i)=>{i.d(t,{PH:()=>a,sA:()=>o});var r=i(31635),s=i(40608);let n=0;const o=e=>{const t=e;let i=class extends t{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+n++})}};return i=(0,r.Cg)([(0,s.$)("esri.core.Identifiable")],i),i},a=e=>{const t=e;let i=class extends t{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:n++})}};return i=(0,r.Cg)([(0,s.$)("esri.core.Identifiable.NumericIdentifiable")],i),i};o(class{})},8303:(e,t,i)=>{i.d(t,{A:()=>M});var r=i(31635),s=i(92602),n=i(70333),o=i(78888),a=i(60999),l=i(49186),h=i(53966),u=i(97768),d=i(74887),c=i(84952),p=i(10107),g=(i(44208),i(87811),i(36005)),y=i(40608),f=i(43937),m=i(77548),v=i(20655),_=i(80812),w=i(41318),b=i(10407);const M=e=>{const t=e;let M=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,u.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new _.default({id:t.itemId,portal:i?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:r}=await i.e(1204).then(i.bind(i,41204));return(0,d.Te)(t),await r({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,d.zf)(e)||h.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch(e=>((0,d.QP)(e),!0)))}async setUserPrivileges(e,t){if(!s.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:i,fullEdit:r},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",i),this._set("userHasFullEditingPrivileges",r),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,d.QP)(e)}}async _fetchUserPrivileges(e,t){let i=this.portalItem;if(!e||!i||!i.loaded||i.sourceUrl)return this._fetchFallbackUserPrivileges(t);const r=!n.id?.findCredential(this.url),s=e===i.id;if(s&&i.portal.user)return this._getUserPrivileges(i,r);let o,a;if(s)o=i.portal.url;else try{o=await(0,m.wI)(this.url,t)}catch(e){(0,d.QP)(e)}if(!o||!(0,c.b8)(o,i.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;a=await(n.id?.getCredential(`${o}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,d.QP)(e)}const l=!0,h=!1,u=!1;if(!a)return{features:{edit:l,fullEdit:h},content:{updateItem:u}};try{if(s?await i.reload():(i=new _.default({id:e,portal:{url:o}}),await i.load(t)),i.portal.user)return this._getUserPrivileges(i,r)}catch(e){(0,d.QP)(e)}return{features:{edit:l,fullEdit:h},content:{updateItem:u}}}_getUserPrivileges(e,t){const i=(0,b.It)(e);return t&&(i.features.edit=!0),i}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,d.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?n.id?.findCredential(this.url):null;if(!t)return!0;const i=S.credential===t?S.user:await this._fetchEditingUser(e);return S.credential=t,S.user=i,null==i?.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const i=n.id?.findServerInfo(this.url??"");if(!i?.owningSystemUrl)return null;const r=`${i.owningSystemUrl}/sharing/rest`,s=v.A.getDefault();if(s&&s.loaded&&(0,c.S8)(s.restUrl)===(0,c.S8)(r))return s.user;const l=`${r}/community/self`,h=null!=e?e.signal:null,u=await(0,a.Ke)((0,o.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:h}));return u.ok?w.A.fromJSON(u.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t?.portal,r=this.portalItem?.id&&(this.portalItem.portal||v.A.getDefault());return i&&r&&!(0,c.ut)(r.restUrl,i.restUrl)?(t.messages&&t.messages.push(new l.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,r.Cg)([(0,p.MZ)({type:_.default})],M.prototype,"portalItem",null),(0,r.Cg)([(0,g.w)("web-document","portalItem",["itemId"])],M.prototype,"readPortalItem",null),(0,r.Cg)([(0,f.K)("web-document","portalItem",{itemId:{type:String}})],M.prototype,"writePortalItem",null),(0,r.Cg)([(0,p.MZ)({clonable:!1})],M.prototype,"resourceReferences",void 0),(0,r.Cg)([(0,p.MZ)({type:Boolean,readOnly:!0})],M.prototype,"userHasEditingPrivileges",void 0),(0,r.Cg)([(0,p.MZ)({type:Boolean,readOnly:!0})],M.prototype,"userHasFullEditingPrivileges",void 0),(0,r.Cg)([(0,p.MZ)({type:Boolean,readOnly:!0})],M.prototype,"userHasUpdateItemPrivileges",void 0),M=(0,r.Cg)([(0,y.$)("esri.layers.mixins.PortalLayer")],M),M},S={credential:null,user:null}},18768:(e,t,i)=>{i.d(t,{b:()=>l});var r=i(31635),s=i(53966),n=i(10107),o=(i(44208),i(87811),i(40608)),a=i(60694);const l=e=>{const t=e;let i=class extends t{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,a.qg)(this.url);if(e?.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,a.Jf)(e,s.A.getLogger(this)))}};return(0,r.Cg)([(0,n.MZ)()],i.prototype,"title",null),(0,r.Cg)([(0,n.MZ)({type:String})],i.prototype,"url",null),i=(0,r.Cg)([(0,o.$)("esri.layers.mixins.ArcGISService")],i),i}},35982:(e,t,i)=>{i.d(t,{B:()=>l});var r=i(4576),s=i(36563),n=i(53966),o=i(74887),a=i(29953);class l{constructor(e,t,i,r,s={}){this._mainMethod=t,this._transferLists=i,this._listeners=[],this._promise=(0,a.ho)(e,{...s,schedule:r}).then(e=>{if(void 0===this._thread){this._thread=e,this._promise=null,s.hasInitialize&&this.broadcast({},"initialize");for(const e of this._listeners)this._connectListener(e)}else e.close()}),this._promise.catch(t=>n.A.getLogger("esri.core.workers.WorkerHandle").error(`Failed to initialize ${e} worker: ${t}`))}on(e,t){const i={removed:!1,eventName:e,callback:t,threadHandle:null};return this._listeners.push(i),this._connectListener(i),(0,s.hA)(()=>{i.removed=!0,(0,r.TF)(this._listeners,i),this._thread&&null!=i.threadHandle&&i.threadHandle.remove()})}destroy(){this._thread&&(this._thread.close(),this._thread=null),this._promise=null,this._listeners.length=0,this._transferLists={}}invoke(e,t,i){return this.invokeMethod(this._mainMethod,e,t,i)}invokeMethod(e,t,i,r){if(this._thread){const s=this._transferLists[e],n=s?s(t):[];return this._thread.invoke(e,t,{transferList:n,signal:i,priority:r})}return this._promise?this._promise.then(()=>((0,o.Te)(i),this.invokeMethod(e,t,i))):Promise.reject(null)}broadcast(e,t){return this._thread?Promise.all(this._thread.broadcast(t,e)).then(h):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)})}}function h(){}},54239:(e,t,i)=>{i.d(t,{A:()=>m});var r,s=i(31635),n=i(4576),o=i(66552),a=i(25482),l=i(83047),h=i(67076),u=i(10107),d=(i(44208),i(53966),i(36005)),c=i(40608),p=i(43937);const g=(0,o.O)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),y=g.jsonValues.slice();(0,n.Xy)(y,"orthometric");const f=(0,o.O)()({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 m=r=class extends a.o{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,i){return g.write(e,t,i)}readHeightModel(e,t,i){return g.read(e)||(i?.messages&&i.messages.push(function(e,t){return new h.A("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:i})),null)}readHeightUnit(e,t,i){return f.read(e)||(i?.messages&&i.messages.push(v(e,{context:i})),null)}readHeightUnitService(e,t,i){return(0,l.LA)(e)||f.read(e)||(i?.messages&&i.messages.push(v(e,{context:i})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new r({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 i=(0,l.k1)(t);return new r({heightModel:e.heightModel,heightUnit:i??void 0,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 r;return t.read(e,{origin:"web-scene"}),t}};function v(e,t){return new h.A("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,s.Cg)([(0,u.MZ)({type:g.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:y,default:"ellipsoidal",write:{isRequired:!0}}}}})],m.prototype,"heightModel",void 0),(0,s.Cg)([(0,p.K)("web-scene","heightModel")],m.prototype,"writeHeightModel",null),(0,s.Cg)([(0,d.w)(["web-scene","service"],"heightModel")],m.prototype,"readHeightModel",null),(0,s.Cg)([(0,u.MZ)({type:f.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:f.jsonValues,write:{writer:f.write,isRequired:!0}}}}})],m.prototype,"heightUnit",void 0),(0,s.Cg)([(0,d.w)("web-scene","heightUnit")],m.prototype,"readHeightUnit",null),(0,s.Cg)([(0,d.w)("service","heightUnit")],m.prototype,"readHeightUnitService",null),(0,s.Cg)([(0,u.MZ)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],m.prototype,"vertCRS",void 0),(0,s.Cg)([(0,d.w)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],m.prototype,"readVertCRS",null),m=r=(0,s.Cg)([(0,c.$)("esri.geometry.HeightModelInfo")],m)},66344:(e,t,i)=>{i.d(t,{q:()=>a});const r=!!(0,i(44208).A)("esri-tests-disable-gpu-memory-measurements");Symbol.iterator;class s{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._users=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._users.clear(),this._db=null}register(e){this._users.set(e.id.slice(0,-1),e)}deregister(e){this.clear(e),this._sizeLimits.delete(e),this._users.delete(e.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}getSize(e,t){const i=this._db.get(e.id+t);return i?.size??0}put(e,t,i,s,o){t=e.id+t;const a=this._db.get(t);if(a&&(this._size-=a.size,e.size-=a.size,this._db.delete(t),a.entry!==i&&this._notifyRemove(t,a.entry,a.size,0)),s>this._maxSize)return void this._notifyRemove(t,i,s,0);if(void 0===i)return void console.warn("Refusing to cache undefined entry ");if(!s||s<0)return r||console.warn(`Refusing to cache entry with size ${s} for key ${t}`),void this._notifyRemove(t,i,0,0);const l=1+Math.max(o,-4)- -3;this._db.set(t,new n(i,s,l)),this._size+=s,e.size+=s,this._checkSize()}updateSize(e,t){t=e.id+t;const i=this._db.get(t);if(!i)return;this._size-=i.size,e.size-=i.size;let r=i.entry.usedMemory;for(;r>this._maxSize;){const e=this._notifyRemove(t,i.entry,r,1);if(!(null!=e&&e>0))return void this._db.delete(t);r=e}i.size=r,this._size+=r,e.size+=r,this._checkSize()}pop(e,t){t=e.id+t;const i=this._db.get(t);if(i)return this._size-=i.size,e.size-=i.size,this._db.delete(t),++this._hit,i.entry;++this._miss}get(e,t){t=e.id+t;const i=this._db.get(t);if(void 0!==i)return this._db.delete(t),i.lives=i.lifetime,this._db.set(t,i),++this._hit,i.entry;++this._miss}peek(e,t){const i=this._db.get(e.id+t);return i?++this._hit:++this._miss,i?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},i=new Array;this._db.forEach((e,r)=>{const s=e.lifetime;i[s]=(i[s]||0)+e.size,this._users.forEach(i=>{const{id:s,name:n}=i;if(r.startsWith(s)){const i=t[n]||0;t[n]=i+e.size}})});const r={};this._users.forEach(e=>{const i=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const s=t[i]||0;t[i]=s,r[i]=Math.round(100*e.hitRate)+"%"}else r[i]="0%"});const s=Object.keys(t);s.sort((e,i)=>t[i]-t[e]),s.forEach(i=>e[i]=Math.round(t[i]/2**20)+"MB / "+r[i]);for(let t=i.length-1;t>=0;--t){const r=i[t];r&&(e["Priority "+(t+-3-1)]=Math.round(r/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forEach(e=>e.resetHitRate())}clear(e){const t=e.id;this._db.forEach((e,i)=>{i.startsWith(t)&&(this._size-=e.size,this._db.delete(i),this._notifyRemove(i,e.entry,e.size,0))}),e.size=0}clearAll(){this._db.forEach((e,t)=>this._notifyRemove(t,e.entry,e.size,0)),this._users.forEach(e=>e.size=0),this._size=0,this._db.clear()}*values(e){for(const[t,i]of this._db)t.startsWith(e.id)&&(yield i.entry)}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,i,r){const s=this._users.get(e.split(o)[0])?.removeFunc,n=s?.(t,r,i);return"number"==typeof n?n:null}_checkSize(){this._sizeLimits.forEach((e,t)=>this._checkSizeLimits(e,t)),this._checkSizeLimits(this.maxSize)}setMaxSize(e,t){null==t||t<=0?this._sizeLimits.delete(e):this._sizeLimits.set(e,t)}_checkSizeLimits(e,t){const i=t??this;if(i.size<=e)return;const r=t?.id;let s=!0;for(;s;){s=!1;for(const[n,a]of this._db)if(0===a.lifetime&&(!r||n.startsWith(r))){const r=t??this._users.get(n.split(o)[0]);if(this._purgeItem(n,a,r),i.size<=.9*e)return;s||=this._db.has(n)}}for(const[s,n]of this._db)if(!r||s.startsWith(r)){const r=t??this._users.get(s.split(o)[0]);if(this._purgeItem(s,n,r),i.size<=.9*e)return}}_purgeItem(e,t,i){if(this._db.delete(e),t.lives<=1){this._size-=t.size,i&&(i.size-=t.size);const r=this._notifyRemove(e,t.entry,t.size,1);null!=r&&r>0&&(this._size+=r,i&&(i.size+=r),t.lives=t.lifetime,t.size=r,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}new s(0);class n{constructor(e,t,i){this.entry=e,this.size=t,this.lifetime=i,this.lives=i}}const o=":";class a{constructor(e,t){this.removeFunc=t,this._storage=new s,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage.destroy(),this._storage=null}put(e,t,i=1){this._storage.put(this,e,t,i,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},68611:(e,t,i)=>{i.r(t),i.d(t,{default:()=>A});var r=i(31635),s=i(78888),n=i(49186),o=i(97768),a=i(92071),l=i(74887),h=i(84952),u=i(10107),d=(i(44208),i(53966),i(87811),i(36005)),c=i(40608),p=i(54239),g=i(4146),y=i(89186),f=i(18768),m=i(16131),v=i(8303),_=i(10873);class w{constructor(e,t,i,r){this._hasNoDataValues=null,this._minValue=null,this._maxValue=null,"pixelData"in e?(this.values=e.pixelData,this.width=e.width,this.height=e.height,this.noDataValue=e.noDataValue):(this.values=e,this.width=t,this.height=i,this.noDataValue=r)}get hasNoDataValues(){if(null==this._hasNoDataValues){const e=this.noDataValue;this._hasNoDataValues=this.values.includes(e)}return this._hasNoDataValues}get minValue(){return this._ensureBounds(),this._minValue}get maxValue(){return this._ensureBounds(),this._maxValue}get usedMemory(){return this.values.byteLength+256}_ensureBounds(){if(null!=this._minValue)return;const{noDataValue:e,values:t}=this;let i=1/0,r=-1/0,s=!0;for(const n of t)n===e?this._hasNoDataValues=!0:(i=n<i?n:i,r=n>r?n:r,s=!1);s?(this._minValue=0,this._maxValue=0):(this._minValue=i,this._maxValue=r>-3e38?r:0)}}var b=i(35982);class M extends b.B{constructor(e=null){super("LercWorker","_decode",{_decode:e=>[e.buffer]},e,{strategy:"dedicated"}),this.schedule=e,this.ref=0}decode(e,t,i){return e&&0!==e.byteLength?this.invoke({buffer:e,options:t},i):Promise.resolve(null)}release(){--this.ref<=0&&(S.forEach((e,t)=>{e===this&&S.delete(t)}),this.destroy())}}const S=new Map;let C=class extends((0,y.f)((0,f.b)((0,m.q)((0,v.A)((0,a.P)(g.A)))))){constructor(...e){super(...e),this.capabilities={operations:{supportsTileMap:!1}},this.copyright=null,this.heightModelInfo=null,this.path=null,this.minScale=void 0,this.maxScale=void 0,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=S.get(e);return t||(null!=e?(t=new M(t=>e.immediate.schedule(t)),S.set(e,t)):(t=new M,S.set(null,t))),++t.ref,t}()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._lercDecoder=(0,o.Gz)(this._lercDecoder)}readCapabilities(e,t){const i=t.capabilities&&t.capabilities.split(",").map(e=>e.toLowerCase().trim());return i?{operations:{supportsTileMap:i.includes("tilemap")}}:{operations:{supportsTileMap:!1}}}readVersion(e,t){let i=t.currentVersion;return i||(i=9.3),i}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"],supportsData:!1,validateItem:e=>{if(e.typeKeywords)for(let t=0;t<e.typeKeywords.length;t++)if("elevation 3d layer"===e.typeKeywords[t].toLowerCase())return!0;throw new n.A("portal:invalid-layer-item-type","Invalid layer item type '${type}', expected '${expectedType}' ",{type:"Image Service",expectedType:"Image Service Elevation 3D Layer"})}},e).catch(l.QP).then(()=>this._fetchImageService(t))),Promise.resolve(this)}fetchTile(e,t,i,r){const n=r?.signal,o={responseType:"array-buffer",signal:n},a={noDataValue:r?.noDataValue,returnFileInfo:!0};return this.load().then(()=>this._fetchTileAvailability(e,t,i,r)).then(()=>(0,s.A)(this.getTileUrl(e,t,i),o)).then(e=>this._lercDecoder.decode(e.data,a,n)).then(e=>new w(e))}getTileUrl(e,t,i){const r=!this.capabilities.operations.supportsTileMap&&this.supportsBlankTile,s=(0,h.x0)({...this.parsedUrl.query,blankTile:!r&&null});return`${this.parsedUrl.path}/tile/${e}/${t}/${i}${s?"?"+s:""}`}async queryElevation(e,t){const{ElevationQuery:r}=await i.e(2095).then(i.bind(i,64476));return(0,l.Te)(t),(new r).query(this,e,t)}async createElevationSampler(e,t){const{ElevationQuery:r}=await i.e(2095).then(i.bind(i,64476));return(0,l.Te)(t),(new r).createSampler(this,e,t)}_fetchTileAvailability(e,t,i,r){return this.tilemapCache?this.tilemapCache.fetchAvailability(e,t,i,r):Promise.resolve("unknown")}async _fetchImageService(e){if(this.sourceJSON)return this.sourceJSON;const t={query:{f:"json",...this.parsedUrl.query},responseType:"json",signal:e},i=await(0,s.A)(this.parsedUrl.path,t);i.ssl&&(this.url=this.url?.replace(/^http:/i,"https:")),this.sourceJSON=i.data,this.read(i.data,{origin:"service",url:this.parsedUrl})}get hasOverriddenFetchTile(){return!this.fetchTile[z]}};(0,r.Cg)([(0,u.MZ)({readOnly:!0})],C.prototype,"capabilities",void 0),(0,r.Cg)([(0,d.w)("service","capabilities",["capabilities"])],C.prototype,"readCapabilities",null),(0,r.Cg)([(0,u.MZ)({json:{read:{source:"copyrightText"}}})],C.prototype,"copyright",void 0),(0,r.Cg)([(0,u.MZ)({readOnly:!0,type:p.A})],C.prototype,"heightModelInfo",void 0),(0,r.Cg)([(0,u.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],C.prototype,"path",void 0),(0,r.Cg)([(0,u.MZ)({type:["show","hide"]})],C.prototype,"listMode",void 0),(0,r.Cg)([(0,u.MZ)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],C.prototype,"minScale",void 0),(0,r.Cg)([(0,u.MZ)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],C.prototype,"maxScale",void 0),(0,r.Cg)([(0,u.MZ)({json:{read:!1,write:!1,origins:{"web-document":{read:!1,write:!1}}}})],C.prototype,"opacity",void 0),(0,r.Cg)([(0,u.MZ)({type:["ArcGISTiledElevationServiceLayer"]})],C.prototype,"operationalLayerType",void 0),(0,r.Cg)([(0,u.MZ)()],C.prototype,"sourceJSON",void 0),(0,r.Cg)([(0,u.MZ)({json:{read:!1},value:"elevation",readOnly:!0})],C.prototype,"type",void 0),(0,r.Cg)([(0,u.MZ)(_.OZ)],C.prototype,"url",void 0),(0,r.Cg)([(0,u.MZ)()],C.prototype,"version",void 0),(0,r.Cg)([(0,d.w)("version",["currentVersion"])],C.prototype,"readVersion",null),C=(0,r.Cg)([(0,c.$)("esri.layers.ElevationLayer")],C);const z=Symbol("default-fetch-tile");C.prototype.fetchTile[z]=!0;const A=C},69397:(e,t,i)=>{i.d(t,{$B:()=>s,Qf:()=>h,Qh:()=>a,RS:()=>n,ez:()=>c,lM:()=>o,qK:()=>d});var r=i(34275);function s(e){return 32+e.length}const n=16;function o(e){if(!e)return 0;let t=d;for(const i in e)e.hasOwnProperty(i)&&(t+=l(e[i],!1));return t}function a(e){if(!e)return 0;if("number"==typeof e[0])return h(e);if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return u(e,8);let i=c;for(let r=0;r<t;r++)i+=l(e[r]);return i}(e);let t=d;for(const i in e)e.hasOwnProperty(i)&&(t+=l(e[i]));return t}function l(e,t=!0){switch(typeof e){case"object":return t?a(e):d;case"string":return s(e);case"number":return n;case"boolean":return 4;default:return 8}}function h(...e){return e.reduce((e,t)=>e+(t?(0,r.iu)(t)?t.byteLength+p:Array.isArray(t)?u(t,n):0:0),0)}function u(e,t){return c+e.length*t}const d=32,c=16,p=145},69540:(e,t,i)=>{i.d(t,{OU:()=>u,Pw:()=>d});var r=i(31635),s=i(65008),n=(i(44208),i(4718)),o=(i(53966),i(97768)),a=i(88620),l=i(40608);const h=Symbol("ClonableMixin"),u=e=>{var t;const i=e;let s=class extends i{constructor(){super(...arguments),this[t]=!0}static{t=h}clone(e){const t=(0,a.oY)(this);(0,o.Lw)(t,"unable to clone instance of non-accessor class");const i=t.metadata,r=t.store,s={},l=new Map;for(const t in i){const o=i[t],a=r?.originOf(t),h=o.clonable;if(o.readOnly||!1===h||7!==a&&0!==a&&5!==a&&4!==a)continue;const u=this[t];let d=null;if("function"==typeof h)d=h(u,e);else if("reference"===h)d=u;else if(d=(0,n.TU)(u,e),null!=u&&null==d)continue;0===a?l.set(t,d):s[t]=d}const h=new(0,Object.getPrototypeOf(this).constructor)(s);if(l.size){const e=(0,a.oY)(h)?.store;if(e)for(const[t,i]of l)e.set(t,i,0)}return h}};return s=(0,r.Cg)([(0,l.$)("esri.core.Clonable")],s),s},d=u(s.A)},78553:(e,t,i)=>{i.d(t,{D:()=>n,p:()=>s});var r=i(56507);function s(e){const t=(0,r.Vr)(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))}},79677:(e,t,i)=>{i.d(t,{A:()=>c});var r,s=i(31635),n=i(25482),o=i(88930),a=i(10107),l=(i(44208),i(53966),i(87811),i(36005)),h=i(40608),u=i(43937),d=i(98623);let c=class extends n.o{static{r=this}static get allTime(){return p}static get empty(){return g}static fromArray(e){return new r({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(r.allTime)}get isEmpty(){return this.equals(r.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new r({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,i=this.end?.getTime()??this.end,r=e.start?.getTime()??e.start,s=e.end?.getTime()??e.end;return t===r&&i===s}expandTo(e,t=d.qU){if(this.isEmpty||this.isAllTime)return this.clone();let i=this.start;i&&(i=(0,o.lL)(i,e,t));let s=this.end;if(s){const i=(0,o.lL)(s,e,t);s=s.getTime()===i.getTime()?i:(0,o.S1)(i,1,e,t)}return new r({start:i,end:s})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return r.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,i=this.end?.getTime()??1/0,s=e.start?.getTime()??-1/0,n=e.end?.getTime()??1/0;let o,a;return s>=t&&s<=i?o=s:t>=s&&t<=n&&(o=t),i>=s&&i<=n?a=i:n>=t&&n<=i&&(a=n),null==o||null==a||isNaN(o)||isNaN(a)?r.empty:new r({start:o===-1/0?null:new Date(o),end:a===1/0?null:new Date(a)})}offset(e,t,i=d.qU){if(this.isEmpty||this.isAllTime)return this.clone();const s=new r,{start:n,end:a}=this;return null!=n&&(s.start=(0,o.S1)(n,e,t,i)),null!=a&&(s.end=(0,o.S1)(a,e,t,i)),s}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return p.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,i=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new r({start:t,end:i})}};(0,s.Cg)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"end",void 0),(0,s.Cg)([(0,l.w)("end")],c.prototype,"readEnd",null),(0,s.Cg)([(0,u.K)("end")],c.prototype,"writeEnd",null),(0,s.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],c.prototype,"isAllTime",null),(0,s.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],c.prototype,"isEmpty",null),(0,s.Cg)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"start",void 0),(0,s.Cg)([(0,l.w)("start")],c.prototype,"readStart",null),(0,s.Cg)([(0,u.K)("start")],c.prototype,"writeStart",null),c=r=(0,s.Cg)([(0,h.$)("esri.time.TimeExtent")],c);const p=new c,g=new c({start:void 0,end:void 0})},92071:(e,t,i)=>{i.d(t,{P:()=>v,L:()=>_});var r=i(31635),s=i(65008),n=i(76953),o=i(4718),a=i(35666);class l{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(a.AU),this._values=new Map,this.multipleOriginsSupported=!0}clone(e){const t=new l,i=this._originStores[0];i&&i.forEach((e,i)=>{t.set(i,(0,o.o8)(e),0)});for(let i=2;i<a.AU;i++){const r=this._originStores[i];r&&r.forEach((r,s)=>{e&&e.has(s)||t.set(s,(0,o.o8)(r),i)})}return t}get(e,t){const i=void 0===t?this._values:this._originStores[t];return i?i.get(e):void 0}keys(e){const t=null==e?this._values:this._originStores[e];return t?[...t.keys()]:[]}set(e,t,i=7){let r=this._originStores[i];if(r||(r=new Map,this._originStores[i]=r),r.set(e,t),!this._values.has(e)||this._propertyOriginMap.get(e)<=i){const r=this._values.get(e);return this._values.set(e,t),this._propertyOriginMap.set(e,i),r!==t}return!1}delete(e,t=7){const i=this._originStores[t];if(!i)return;const r=i.get(e);if(i.delete(e),this._values.has(e)&&this._propertyOriginMap.get(e)===t){this._values.delete(e);for(let i=t-1;i>=0;i--){const t=this._originStores[i];if(t&&t.has(e)){this._values.set(e,t.get(e)),this._propertyOriginMap.set(e,i);break}}}return r}has(e,t){const i=void 0===t?this._values:this._originStores[t];return!!i&&i.has(e)}revert(e,t){for(;t>0&&!this.has(e,t);)--t;const i=this._originStores[t],r=i?.get(e),s=this._values.get(e);return this._values.set(e,r),this._propertyOriginMap.set(e,t),s!==r}originOf(e){return this._propertyOriginMap.get(e)||0}isAtOrigin(e,t){return this.has(e,t)&&this.originOf(e)===t}isBelowOrigin(e,t){return!this.has(e)||this.originOf(e)<t}forEach(e){this._values.forEach(e)}}var h=i(45917),u=i(88620),d=i(40608);const c=e=>{const t=e;let i=class extends t{constructor(...e){super(...e);const t=(0,u.oY)(this),i=t.store,r=new l;t.store=r,(0,n.k)(t,i,r)}read(e,t){(0,h.L)(this,e,t)}getAtOrigin(e,t){const i=p(this),r=(0,a.aB)(t);if("string"==typeof e)return i.get(e,r);const s={};return e.forEach(e=>{s[e]=i.get(e,r)}),s}originOf(e){return(0,a.OL)(this.originIdOf(e))}originIdOf(e){return p(this).originOf(e)}revert(e,t){const i=p(this),r=(0,a.aB)(t),s=(0,u.oY)(this);let n;n="string"==typeof e?"*"===e?i.keys(r):[e]:e,n.forEach(e=>{s.invalidate(e),i.revert(e,r),s.commit(e)})}};return i=(0,r.Cg)([(0,d.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],i),i};function p(e){return(0,u.oY)(e).store}c(s.A);var g=i(16649),y=i(49422);const f=e=>{const t=e;let i=class extends t{constructor(...e){super(...e)}clear(e,t="user"){(0,u.oY)(this).clearOrigin(e,(0,a.aB)(t))}write(e,t){return(0,y.M)(this,e=e||{},t),e}setAtOrigin(e,t,i){(0,u.oY)(this).setAtOrigin(e,t,(0,a.aB)(i))}removeOrigin(e){const t=m(this),i=(0,a.aB)(e),r=t.keys(i);for(const e of r)t.originOf(e)===i&&t.set(e,t.get(e,i),7)}updateOrigin(e,t){const i=m(this),r=(0,a.aB)(t),s=(0,g.Jt)(this,e);for(let t=r+1;t<a.AU;++t)i.delete(e,t);i.set(e,s,r)}toJSON(e){return this.write({},e)}};return i=(0,r.Cg)([(0,d.$)("esri.core.MultiOriginJSONSupport.WriteableMultiOriginJSONSupport")],i),i.prototype.toJSON.isDefaultToJSON=!0,i};function m(e){return(0,u.oY)(e).store}const v=e=>{const t=f(c(e));let i=class extends t{};return i=(0,r.Cg)([(0,d.$)("esri.core.MultiOriginJSONSupport")],i),i},_=v(s.A)}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3116],{751:(e,t,r)=>{r.d(t,{CJ:()=>f});var n=r(49186),s=r(4718),a=r(93637),i=r(67124),o=r(77548);const l=new Set(["bing-maps","imagery","imagery-tile","map-image","open-street-map","tile","unknown","unsupported","vector-tile","web-tile","wcs","wms","wmts"]),u=new Set(["integrated-mesh-3dtiles"]),c=new Set(["catalog","csv","feature","geo-rss","geojson","group","imagery","imagery-tile","kml","knowledge-graph","map-image","map-notes","media","ogc-feature","oriented-imagery","route","stream","subtype-group","tile","unknown","unsupported","vector-tile","video","web-tile","wcs","wfs","wms","wmts"]),p=new Set([...c,"link-chart"]);function d(e,t){if(t.restrictedWebMapWriting){const r=function(e){switch(e.layerContainerType){case"basemap-base-layers":return l;case"basemap-ground-layers":return u;case"operational-layers":return"link-chart"===e.origin?p:c;default:return null}}(t);return null==r||r.has(e.type)&&!(0,o.Ov)(e)}return!0}function y(e,t){"maxScale"in e&&(t.maxScale=(0,i.B)(e.maxScale)??void 0),"minScale"in e&&(t.minScale=(0,i.B)(e.minScale)??void 0)}function f(e,t,r){if(!e.persistenceEnabled)return null;if(!("write"in e)||!e.write)return r?.messages&&r.messages.push(new n.A("layer:unsupported",`Layers (${e.title}, ${e.id}) of type '${e.declaredClass}' cannot be persisted`,{layer:e})),null;if((0,o.Ov)(e)&&!e.isTable)t=e.resourceInfo;else if(d(e,r)){const t={};return e.write(t,r)?t:null}return null!=t&&function(e,t){if(function(e,t){if(t)if((0,o.Ov)(e)){const r=(0,a.wc)("featureCollection.layers",t),n=r?.[0]?.layerDefinition;n&&y(e,n)}else"group"!==e.type&&y(e,t)}(e,t),t&&(t.id=e.id,"blendMode"in e&&(t.blendMode=e.blendMode,"normal"===t.blendMode&&delete t.blendMode),t.opacity=(0,i.B)(e.opacity)??void 0,t.title=e.title||"Layer",t.visibility=e.visible,"legendEnabled"in e&&"wmts"!==e.type))if((0,o.Ov)(e)){const r=t.featureCollection;r&&(r.showLegend=e.legendEnabled)}else t.showLegend=e.legendEnabled}(e,t=(0,s.o8)(t)),t}},18047:(e,t,r)=>{r.d(t,{ZV:()=>l,yx:()=>o});var n=r(73444);const s={ar:"ar-u-nu-latn",bs:"sr-Latn-CS",nn:"no-NN"};let a=new WeakMap,i={};function o(e={}){const t={};return null!=e.digitSeparator&&(t.useGrouping=e.digitSeparator),null!=e.places&&(t.minimumFractionDigits=t.maximumFractionDigits=e.places),t}function l(e,t){return Object.is(e,-0)&&(e=0),function(e){const t=e||i;if(!a.has(t)){const r=(0,n.lR)(),i=r&&s[r]||(0,n.QC)();a.set(t,new Intl.NumberFormat(i,e))}return a.get(t)}(t).format(e)}(0,n.Ml)(()=>{a=new WeakMap,i={}}),new Map},36708:(e,t,r)=>{r.d(t,{C_:()=>d,OH:()=>h,Vh:()=>g,on:()=>p,pc:()=>m,wB:()=>l,z7:()=>u});var n=r(37955),s=r(36563),a=r(97768),i=r(74887),o=r(14012);function l(e,t,r={}){return c(e,t,r,y)}function u(e,t,r={}){return c(e,t,r,f)}function c(e,t,r={},n){let s=null;const i=r.once?(e,r)=>{n(e)&&((0,a.xt)(s),t(e,r))}:(e,r)=>{n(e)&&t(e,r)};if(s=(0,o.Cn)(e,i,r.sync,r.equals),r.initial){const t=e();i(t,t)}return s}function p(e,t,r,i={}){let o=null,u=null,c=null;function p(){o&&u&&(u.remove(),i.onListenerRemove?.(o),o=null,u=null)}function d(e){i.once&&i.once&&(0,a.xt)(c),r(e)}const y=l(e,(e,r)=>{p(),(0,n.wb)(e)&&(o=e,u=(0,n.on)(e,t,d),i.onListenerAdd?.(e))},{sync:i.sync,initial:!0});return c=(0,s.hA)(()=>{y.remove(),p()}),c}function d(e,t){return function(e,t,r){if((0,i.G4)(r))return Promise.reject((0,i.NK)());const n=e();if(t?.(n))return Promise.resolve(n);let o=null;function l(){o=(0,a.xt)(o)}return new Promise((n,a)=>{o=(0,s.vE)([(0,i.u7)(r,()=>{l(),a((0,i.NK)())}),c(e,e=>{l(),n(e)},{sync:!1,once:!0},t??y)])})}(e,f,t)}function y(e){return!0}function f(e){return!!e}r(80559);const h={sync:!0},g={initial:!0},m={sync:!0,initial:!0}},47566:(e,t,r)=>{r(97770),r(18047),r(71754),r(73444);var n=r(10838),s=r(78888),a=r(49186);async function i(e){if(null!=l.fetchBundleAsset)return l.fetchBundleAsset(e);const t=await(0,s.A)(e,{responseType:"text"});return JSON.parse(t.data)}class o{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,s){const o=t.exec(r);if(!o)throw new a.A("esri-intl:invalid-bundle",`Bundle id "${r}" is not compatible with the pattern "${t}"`);const l=o[1]?`${o[1]}/`:"",u=o[2],c=(0,n.xO)(s),p=`${l}${u}.json`,d=c?`${l}${u}_${c}.json`:p;let y;try{y=await i(e(d))}catch(t){if(d===p)throw new a.A("intl:unknown-bundle",`Bundle "${r}" cannot be loaded`,{error:t});try{y=await i(e(p))}catch(e){throw new a.A("intl:unknown-bundle",`Bundle "${r}" cannot be loaded`,{error:e})}}return y}(this.getAssetUrl,this.matcher,e,t)}}const l={};var u,c=r(2741);(0,n.ao)((u={pattern:"esri/",location:c.s},new o(u)))},60999:(e,t,r)=>{r.d(t,{DZ:()=>f,Ke:()=>y,Tj:()=>c,UT:()=>h,jJ:()=>u});var n=r(31635),s=r(65008),a=r(97768),i=r(74887),o=r(10107),l=r(40608);function u(e,t,r){return(0,i.Lx)(e.map((e,n)=>t.apply(r,[e,n])))}async function c(e,t,r){return(await(0,i.Lx)(e.map((e,n)=>t.apply(r,[e,n])))).map(e=>e.value)}function p(e){return{ok:!0,value:e}}function d(e){return{ok:!1,error:e}}async function y(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return p(await e)}catch(e){return d(e)}}async function f(e){try{return p(await e)}catch(e){return(0,i.QP)(e),d(e)}}function h(e,t){return new g(e,t)}let g=class extends s.A{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,a.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:r}=this._abortController;this.promise=e(r),this.promise.then(e=>{this._result=p(e),this._cleanup()},e=>{this._result=d(e),this._cleanup()}),this._abortHandle=(0,i.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,a.xt)(this._abortHandle),this._abortController=null}};(0,n.Cg)([(0,o.MZ)()],g.prototype,"value",null),(0,n.Cg)([(0,o.MZ)()],g.prototype,"error",null),(0,n.Cg)([(0,o.MZ)()],g.prototype,"finished",null),(0,n.Cg)([(0,o.MZ)()],g.prototype,"promise",void 0),(0,n.Cg)([(0,o.MZ)()],g.prototype,"_result",void 0),g=(0,n.Cg)([(0,l.$)("esri.core.asyncUtils.ReactiveTask")],g)},62885:(e,t,r)=>{r.d(t,{H:()=>a,V:()=>s});var n=r(7762);function s(e,t,r=n.A){return t||(t=new r),t===e||t.destroyed||(t.removeAll(),(s=e)&&(Array.isArray(s)||"items"in s&&Array.isArray(s.items))?t.addMany(e):e&&t.add(e)),t;var s}function a(e){return e}},71754:(e,t,r)=>{r.d(t,{V:()=>u});var n=r(53966),s=r(93637),a=r(799),i=r(97770),o=r(18047);const l=()=>n.A.getLogger("esri.intl.substitute");function u(e,t,r={}){const{format:n={}}=r;return(0,a.HC)(e,e=>function(e,t,r){let n,a;const i=e.indexOf(":");if(-1===i?n=e.trim():(n=e.slice(0,i).trim(),a=e.slice(i+1).trim()),!n)return"";const o=(0,s.wc)(n,t);if(null==o)return"";const l=(a?r?.[a]:null)??r?.[n];return l?c(o,l):a?p(o,a):d(o)}(e,t,n))}function c(e,t){switch(t.type){case"date":return(0,i.Yq)(e,t.intlOptions);case"number":return(0,o.ZV)(e,t.intlOptions);default:return l().warn("missing format descriptor for key {key}"),d(e)}}function p(e,t){switch(t.toLowerCase()){case"dateformat":return(0,i.Yq)(e);case"numberformat":return(0,o.ZV)(e);default:return l().warn(`inline format is unsupported since 4.12: ${t}`),/^(dateformat|datestring)/i.test(t)?(0,i.Yq)(e):/^numberformat/i.test(t)?(0,o.ZV)(e):d(e)}}function d(e){switch(typeof e){case"string":return e;case"number":return(0,o.ZV)(e);case"boolean":return""+e;default:return e instanceof Date?(0,i.Yq)(e):""}}},77548:(e,t,r)=>{r.d(t,{Gh:()=>h,tk:()=>p,BR:()=>c,wI:()=>u,G$:()=>y,$x:()=>d,Ov:()=>o,W_:()=>l,OP:()=>f,TU:()=>i,XX:()=>a});var n=r(70333),s=r(78888);r(7762),r(84952),r(36563),r(36708),new WeakMap;const a={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function i(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function o(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function l(e){const t=e?.type;return("feature"===t||"subtype-group"===t||"oriented-imagery"===t)&&"feature-layer"===e?.source?.type}async function u(e,t){const r=n.id?.findServerInfo(e);if(null!=r?.currentVersion)return r.owningSystemUrl||null;const a=e.toLowerCase().indexOf("/rest/services");if(-1===a)return null;const i=`${e.slice(0,a)}/rest/info`,o=null!=t?t.signal:null,{data:l}=await(0,s.A)(i,{query:{f:"json"},responseType:"json",signal:o});return l?.owningSystemUrl||null}function c(e){return function(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"catalog-footprint":case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function p(e){return!!function(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":return!0;default:return!1}}(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}function d(e,t){return null}function y(e){return null}function f(e){return!e||"Feature Service"===e.type&&!e.sourceUrl}function h(e,t){if(!t||!f(e))return;const r=(e.url,null);r&&(e.url=r)}},81583:(e,t,r)=>{r.d(t,{L:()=>o,g:()=>i});var n=r(60999),s=r(7762),a=r(92474);async function i(e,t){return await e.load(),o(e,t)}async function o(e,t){const r=[],i=(...e)=>{for(const t of e)null!=t&&(Array.isArray(t)?i(...t):s.A.isCollection(t)?t.forEach(e=>i(e)):(0,a.Zm)(t)&&r.push(t))};t(i);let o=null;if(await(0,n.Tj)(r,async e=>{const t=await(0,n.Ke)(function(e){return"loadAll"in e&&"function"==typeof e.loadAll}(e)?e.loadAll():e.load());!1!==t.ok||o||(o=t)}),o)throw o.error;return e}},83116:(e,t,r)=>{r.r(t),r.d(t,{default:()=>R});var n=r(31635),s=r(92602),a=r(78888),i=r(7762),o=r(62885),l=r(25482),u=r(4718),c=r(92474),p=r(81583),d=r(53966),y=r(97768),f=r(74887),h=r(84952),g=r(10107),m=(r(44208),r(40608)),w=r(43937),b=r(16930),L=r(20655),v=r(80812),C=r(43281),A=(r(47566),r(65008)),I=(r(87811),r(73444)),M=r(10838);let _=class extends A.A{constructor(e){super(e),this.apiKey=null,this.id=null,this.language=null,this.places=null,this.serviceUrl="https://basemapstyles-api.arcgis.com/arcgis/rest/services/styles/v2",this.worldview=null}get languageParameter(){const e=this.language;let t="local"===e||"global"===e?e:(0,M.xO)(e??(0,I.JK)())??"global";return t="no"===t?"nb":t,t}};(0,n.Cg)([(0,g.MZ)()],_.prototype,"apiKey",void 0),(0,n.Cg)([(0,g.MZ)()],_.prototype,"id",void 0),(0,n.Cg)([(0,g.MZ)()],_.prototype,"language",void 0),(0,n.Cg)([(0,g.MZ)()],_.prototype,"places",void 0),(0,n.Cg)([(0,g.MZ)()],_.prototype,"serviceUrl",void 0),(0,n.Cg)([(0,g.MZ)()],_.prototype,"worldview",void 0),_=(0,n.Cg)([(0,m.$)("esri.support.BasemapStyle")],_);const S=_;var x,$=r(751);let k=0,O=x=class extends((0,l.T)(c.x_)){constructor(e){super(e),this.id=null,this.portalItem=null,this.spatialReference=null,this.style=null,this.thumbnailUrl=null,this.title="Basemap",this.type="Basemap",this.id=Date.now().toString(16)+"-basemap-"+k++,this.baseLayers=new i.A,this.referenceLayers=new i.A,this.groundLayers=new i.A;const t=e=>{e.parent&&e.parent!==this&&"remove"in e.parent&&e.parent.remove(e),e.parent=this,"elevation"!==e.type&&"integrated-mesh-3dtiles"!==e.type||d.A.getLogger(this).error(`Layer '${e.title}, id:${e.id}' of type '${e.type}' is not supported as a basemap layer and will therefore be ignored.`)},r=e=>{e.parent&&e.parent!==this&&"remove"in e.parent&&e.parent.remove(e),e.parent=this,"integrated-mesh-3dtiles"!==e.type&&d.A.getLogger(this).error(`Layer '${e.title}, id:${e.id}' of type '${e.type}' is not supported as a ground layer and will therefore be ignored.`)},n=e=>{e.parent=null};this.addHandles([this.baseLayers.on("after-add",e=>t(e.item)),this.groundLayers.on("after-add",e=>r(e.item)),this.referenceLayers.on("after-add",e=>t(e.item)),this.baseLayers.on("after-remove",e=>n(e.item)),this.groundLayers.on("after-remove",e=>n(e.item)),this.referenceLayers.on("after-remove",e=>n(e.item))])}initialize(){this.when().catch(e=>{d.A.getLogger(this).error("#load()",`Failed to load basemap (title: '${this.title}', id: '${this.id}')`,e)}),this.resourceInfo&&this.read(this.resourceInfo.data,this.resourceInfo.context)}destroy(){const e=this.baseLayers.toArray();for(const t of e)t.destroyed||t.destroy();const t=this.groundLayers.toArray();for(const e of t)e.destroyed||e.destroy();const r=this.referenceLayers.toArray();for(const e of r)e.destroyed||e.destroy();this.baseLayers.destroy(),this.groundLayers.destroy(),this.referenceLayers.destroy(),this.portalItem=(0,y.pR)(this.portalItem)}normalizeCtorArgs(e){return e&&"resourceInfo"in e&&(this._set("resourceInfo",e.resourceInfo),delete(e={...e}).resourceInfo),e}set baseLayers(e){this._set("baseLayers",(0,o.V)(e,this._get("baseLayers")))}_writeBaseLayers(e,t,r){const n=[];e?(r={...r,layerContainerType:"basemap-base-layers"},this.baseLayers.forEach(e=>{const t=(0,$.CJ)(e,r.webmap?r.webmap.getLayerJSONFromResourceInfo(e):null,r);null!=t&&n.push(t)}),this.referenceLayers.forEach(e=>{const t=(0,$.CJ)(e,r.webmap?r.webmap.getLayerJSONFromResourceInfo(e):null,r);null!=t&&("scene"!==e.type&&(t.isReference=!0),n.push(t))}),t.baseMapLayers=n):t.baseMapLayers=n}set groundLayers(e){this._set("groundLayers",(0,o.V)(e,this._get("groundLayers")))}_writeGroundLayers(e,t,r){const n=[];e&&(r={...r,layerContainerType:"basemap-ground-layers"},this.groundLayers.forEach(e=>{const t=(0,$.CJ)(e,r.webmap?r.webmap.getLayerJSONFromResourceInfo(e):null,r);null!=t&&n.push(t)}),n.length>0&&(t.groundLayers=n))}get loaded(){return super.loaded}set referenceLayers(e){this._set("referenceLayers",(0,o.V)(e,this._get("referenceLayers")))}writeTitle(e,t){t.title=e||"Basemap"}load(e){return this.addResolvingPromise(this._loadFromSource(e)),Promise.resolve(this)}loadAll(){return(0,p.g)(this,e=>{e(this.baseLayers,this.groundLayers,this.referenceLayers)})}clone(){const e={id:this.id,title:this.title,portalItem:this.portalItem,baseLayers:this.baseLayers.map(e=>(0,u.Nb)(e)?e.clone():e),groundLayers:this.groundLayers.map(e=>(0,u.Nb)(e)?e.clone():e),referenceLayers:this.referenceLayers.map(e=>(0,u.Nb)(e)?e.clone():e)};return this.loaded&&(e.loadStatus="loaded"),new x({resourceInfo:this.resourceInfo}).set(e)}read(e,t){this.resourceInfo||this._set("resourceInfo",{data:e,context:t}),super.read(e,t)}write(e,t){return e=e||{},t?.origin||(t={origin:"web-map",...t}),super.write(e,t),!this.loaded&&this.resourceInfo?.data.baseMapLayers&&(e.baseMapLayers=this.resourceInfo.data.baseMapLayers.map(e=>{const t=(0,u.o8)(e);return t.url&&(0,h.BQ)(t.url)&&(t.url=`https:${t.url}`),t.templateUrl&&(0,h.BQ)(t.templateUrl)&&(t.templateUrl=`https:${t.templateUrl}`),t})),e}async _loadFromSource(e){const{resourceInfo:t,portalItem:r,style:n}=this;(0,f.Te)(e);const s=[];if(t){const r=t.context?t.context.url:null;if(s.push(this._loadLayersFromJSON(t.data,r,e)),t.data.id&&!t.data.title){const e=t.data.id;s.push((0,C.q)(e).then(e=>{e&&this.read({title:e},t.context)}))}}else r?s.push(this._loadFromItem(r,e)):n&&s.push(this._loadFromStylesService(n,e));await Promise.all(s)}async _loadLayersFromJSON(e,t,n){const s=this.resourceInfo?.context,a=this.portalItem?.portal||s?.portal||null,i=Z[s?.origin||""]??"web-map",{populateOperationalLayers:o}=await r.e(5356).then(r.bind(r,75356)),l=[];if((0,f.Te)(n),e.baseMapLayers&&Array.isArray(e.baseMapLayers)){const r={context:{...s,origin:i,url:t,portal:a,layerContainerType:"basemap-base-layers"},defaultLayerType:"DefaultTileLayer"},n=e=>"web-scene"===i&&"ArcGISSceneServiceLayer"===e.layerType||e.isReference,u=o(this.baseLayers,e.baseMapLayers.filter(e=>!n(e)),r);l.push(u);const c=o(this.referenceLayers,e.baseMapLayers.filter(n),r);l.push(c)}if(e.groundLayers&&Array.isArray(e.groundLayers)){const r={context:{...s,origin:i,url:t,portal:a,layerContainerType:"basemap-ground-layers"},defaultLayerType:"IntegratedMesh3DTilesLayer"},n=o(this.groundLayers,e.groundLayers,r);l.push(n)}await Promise.allSettled(l)}async _loadFromItem(e,t){const r=await e.load(t),n=await r.fetchData("json",t),s=(0,h.An)(e.itemUrl??"");return this._set("resourceInfo",{data:n.baseMap??{},context:{origin:U[e.type||""]??"web-map",portal:e.portal||L.A.getDefault(),url:s}}),this.read(this.resourceInfo.data,this.resourceInfo.context),this.read({spatialReference:n.spatialReference},this.resourceInfo.context),this.read({title:e.title,thumbnailUrl:e.thumbnailUrl},{origin:"portal-item",portal:e.portal||L.A.getDefault(),url:s}),this._loadLayersFromJSON(this.resourceInfo.data,s,t)}async _loadFromStylesService(e,t){const r=e.serviceUrl.endsWith("/webmaps")?e.serviceUrl.slice(0,-8):e.serviceUrl,n=`${r}/styles/${e.id}/self`,i=`${r}/webmaps/${e.id}`,o=e.apiKey??s.A.apiKeys.basemapStyles,[l,u]=await Promise.all([(await(0,a.A)(n,{query:{token:o},signal:t?.signal})).data,(await(0,a.A)(i,{query:{language:e.languageParameter,places:e.places,worldview:e.worldview,token:o},signal:t?.signal})).data]);this.thumbnailUrl??=l.thumbnailUrl;const c=(0,h.An)(i);if(this._set("resourceInfo",{data:u.baseMap??{},context:{origin:"web-map",url:c}}),this.read(this.resourceInfo.data,this.resourceInfo.context),this.read({spatialReference:u.spatialReference},this.resourceInfo.context),await this._loadLayersFromJSON(this.resourceInfo.data,c,t),o)for(const e of[...this.baseLayers,...this.groundLayers,...this.referenceLayers])"apiKey"in e&&(e.apiKey=o)}static fromId(e){const t=C.H[e];return t?t.itemId?new x({portalItem:{id:t.itemId,portal:{url:"https://www.arcgis.com"}}}):x.fromJSON(t,t.is3d?{origin:"web-scene",portal:new L.A({url:"https://www.arcgis.com"})}:{origin:"web-map"}):null}};(0,n.Cg)([(0,g.MZ)({json:{read:!1,write:{ignoreOrigin:!0,target:"baseMapLayers",writer(e,t,r,n){this._writeBaseLayers(e,t,n)}},origins:{"web-scene":{write:{ignoreOrigin:!0,target:{baseMapLayers:{type:i.A}},writer(e,t,r,n){this._writeBaseLayers(e,t,n)}}}}}})],O.prototype,"baseLayers",null),(0,n.Cg)([(0,g.MZ)({json:{read:!1,write:{ignoreOrigin:!0,target:"groundLayers",writer(e,t,r,n){this._writeGroundLayers(e,t,n)}},origins:{"web-scene":{write:{ignoreOrigin:!0,target:{groundLayers:{type:i.A}},writer(e,t,r,n){this._writeGroundLayers(e,t,n)}}}}}})],O.prototype,"groundLayers",null),(0,n.Cg)([(0,g.MZ)({type:String,json:{origins:{"web-scene":{write:!0}}}})],O.prototype,"id",void 0),(0,n.Cg)([(0,g.MZ)({type:v.default})],O.prototype,"portalItem",void 0),(0,n.Cg)([(0,g.MZ)()],O.prototype,"referenceLayers",null),(0,n.Cg)([(0,g.MZ)({readOnly:!0})],O.prototype,"resourceInfo",void 0),(0,n.Cg)([(0,g.MZ)({type:b.A})],O.prototype,"spatialReference",void 0),(0,n.Cg)([(0,g.MZ)({type:S})],O.prototype,"style",void 0),(0,n.Cg)([(0,g.MZ)()],O.prototype,"thumbnailUrl",void 0),(0,n.Cg)([(0,g.MZ)({type:String,json:{origins:{"web-scene":{write:{isRequired:!0}}}}})],O.prototype,"title",void 0),(0,n.Cg)([(0,w.K)("title")],O.prototype,"writeTitle",null),O=x=(0,n.Cg)([(0,m.$)("esri.Basemap")],O);const U={"Web Scene":"web-scene","Web Map":"web-map","Link Chart":"link-chart"},Z={"web-scene":"web-scene","web-map":"web-map","link-chart":"link-chart"},R=O}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[409],{17136:(e,t,n)=>{n.d(t,{O7:()=>M,el:()=>k});var s=n(92602),r=n(49186),o=n(53966),i=n(39829),c=n(82799),l=n(80754),u=n(21325),f=n(28735),a=n(78888),p=n(65864),h=n(2272),g=n(84952),y=n(92300);const m=()=>o.A.getLogger("esri.geometry.support.normalizeUtils");function d(e){return"polygon"===e[0].type}function A(e){return"polyline"===e[0].type}function x(e,t,n){if(t){const t=function(e,t){if(!(e instanceof c.A||e instanceof i.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw m().error(e),new r.A("internal:geometry",e)}const n=(0,l.r8)(e),s=[];for(const e of n){const n=[];s.push(n),n.push([e[0][0],e[0][1]]);for(let s=0;s<e.length-1;s++){const r=e[s][0],o=e[s][1],i=e[s+1][0],c=e[s+1][1],l=Math.sqrt((i-r)*(i-r)+(c-o)*(c-o)),u=(c-o)/l,f=(i-r)/l,a=l/t;if(a>1){for(let e=1;e<=a-1;e++){const s=e*t,i=f*s+r,c=u*s+o;n.push([i,c])}const e=(l+Math.floor(a-1)*t)/2,s=f*e+r,i=u*e+o;n.push([s,i])}n.push([i,c])}}return function(e){return"polygon"===e.type}(e)?new i.A({rings:s,spatialReference:e.spatialReference}):new c.A({paths:s,spatialReference:e.spatialReference})}(e,1e6);e=(0,f.ci)(t,!0)}return n&&(e=(0,l.kS)(e,n)),e}function w(e,t,n){if(Array.isArray(e)){const s=e[0];if(s>t){const n=(0,l.kd)(s,t);e[0]=s+n*(-2*t)}else if(s<n){const t=(0,l.kd)(s,n);e[0]=s+t*(-2*n)}}else{const s=e.x;if(s>t){const n=(0,l.kd)(s,t);e=e.clone().offset(n*(-2*t),0)}else if(s<n){const t=(0,l.kd)(s,n);e=e.clone().offset(t*(-2*n),0)}}return e}function R(e,t){let n=-1;for(let s=0;s<t.cutIndexes.length;s++){const r=t.cutIndexes[s],o=t.geometries[s],i=(0,l.r8)(o);for(let e=0;e<i.length;e++){const t=i[e];t.some(n=>{if(n[0]<180)return!0;{let n=0;for(let e=0;e<t.length;e++){const s=t[e][0];n=s>n?s:n}n=Number(n.toFixed(9));const s=-360*(0,l.kd)(n,180);for(let n=0;n<t.length;n++){const t=o.getPoint(e,n);o.setPoint(e,n,t.clone().offset(s,0))}return!0}})}if(r===n){if(d(e))for(const t of(0,l.r8)(o))e[r]=e[r].addRing(t);else if(A(e))for(const t of(0,l.r8)(o))e[r]=e[r].addPath(t)}else n=r,e[r]=o}return e}async function k(e,t,n){if(!Array.isArray(e))return k([e],t);t&&"string"!=typeof t&&m().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const r="string"==typeof t?t:t?.url??s.A.geometryServiceUrl;let o,d,A,M,b,j,v,L,S=0;const X=[],N=[];for(const t of e)if(null!=t)if(o||(o=t.spatialReference,d=(0,u.Vp)(o),A=o.isWebMercator,j=A?102100:4326,M=l.j7[j].maxX,b=l.j7[j].minX,v=l.j7[j].plus180Line,L=l.j7[j].minus180Line),d)if("mesh"===t.type)N.push(t);else if("point"===t.type)N.push(w(t.clone(),M,b));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map(e=>w(e,M,b)),N.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,d);N.push(e.rings?new i.A(e):e)}else if(t.extent){const e=t.extent,n=(0,l.kd)(e.xmin,b)*(2*M);let s=0===n?t.clone():(0,l.kS)(t.clone(),n);e.offset(n,0);let{xmin:r,xmax:o}=e;r=Number(r.toFixed(9)),o=Number(o.toFixed(9)),e.intersects(v)&&o!==M?(S=o>S?o:S,s=x(s,A),X.push(s),N.push("cut")):e.intersects(L)&&r!==b?(S=o*(2*M)>S?o*(2*M):S,s=x(s,A,360),X.push(s),N.push("cut")):N.push(s)}else N.push(t.clone());else N.push(t);else N.push(t);let C=(0,l.kd)(S,M),P=-90;const q=C,G=new c.A;for(;C>0;){const e=360*C-180;G.addPath([[e,P],[e,-1*P]]),P*=-1,C--}if(X.length>0&&q>0){const t=R(X,await async function(e,t,n,s){const r=(0,h.Dl)(e),o=t[0].spatialReference,i={...s,responseType:"json",query:{...r.query,f:"json",sr:(0,u.YX)(o),target:JSON.stringify({geometryType:(0,p.$B)(t[0]),geometries:t}),cutter:JSON.stringify(n)}},c=await(0,a.A)(r.path+"/cut",i),{cutIndexes:l,geometries:f=[]}=c.data;return{cutIndexes:l,geometries:f.map(e=>{const t=(0,p.rS)(e);return t.spatialReference=o,t})}}(r,X,G,n)),s=[],o=[];for(let n=0;n<N.length;n++){const r=N[n];if("cut"!==r)o.push(r);else{const r=t.shift(),i=e[n];null!=i&&"polygon"===i.type&&i.rings&&i.rings.length>1&&r.rings.length>=i.rings.length?(s.push(r),o.push("simplify")):o.push(A?(0,f.Gh)(r):r)}}if(!s.length)return o;const i=await async function(e,t,n){const s="string"==typeof e?(0,g.An)(e):e,r=t[0].spatialReference,o=(0,p.$B)(t[0]),i={...n,query:{...s.query,f:"json",sr:(0,u.YX)(r),geometries:JSON.stringify((0,y.X)(t))}},{data:c}=await(0,a.A)(s.path+"/simplify",i);return(0,y.V)(c.geometries,o,r)}(r,s,n),c=[];for(let e=0;e<o.length;e++){const t=o[e];"simplify"!==t?c.push(t):c.push(A?(0,f.Gh)(i.shift()):i.shift())}return c}const O=[];for(let e=0;e<N.length;e++){const t=N[e];if("cut"!==t)O.push(t);else{const e=X.shift();O.push(!0===A?(0,f.Gh)(e):e)}}return O}function M(e,t,n){const s=(0,u.Vp)(n);if(null==s)return e;const[r,o]=s.valid,i=2*o;let c=0,l=0;t>o?c=Math.ceil(Math.abs(t-o)/i):t<r&&(c=-Math.ceil(Math.abs(t-r)/i)),e>o?l=Math.ceil(Math.abs(e-o)/i):e<r&&(l=-Math.ceil(Math.abs(e-r)/i));let f=e+(c-l)*i;const a=f-t;return a>o?f-=i:a<r&&(f+=i),f}},36708:(e,t,n)=>{n.d(t,{C_:()=>p,OH:()=>y,Vh:()=>m,on:()=>a,pc:()=>d,wB:()=>l,z7:()=>u});var s=n(37955),r=n(36563),o=n(97768),i=n(74887),c=n(14012);function l(e,t,n={}){return f(e,t,n,h)}function u(e,t,n={}){return f(e,t,n,g)}function f(e,t,n={},s){let r=null;const i=n.once?(e,n)=>{s(e)&&((0,o.xt)(r),t(e,n))}:(e,n)=>{s(e)&&t(e,n)};if(r=(0,c.Cn)(e,i,n.sync,n.equals),n.initial){const t=e();i(t,t)}return r}function a(e,t,n,i={}){let c=null,u=null,f=null;function a(){c&&u&&(u.remove(),i.onListenerRemove?.(c),c=null,u=null)}function p(e){i.once&&i.once&&(0,o.xt)(f),n(e)}const h=l(e,(e,n)=>{a(),(0,s.wb)(e)&&(c=e,u=(0,s.on)(e,t,p),i.onListenerAdd?.(e))},{sync:i.sync,initial:!0});return f=(0,r.hA)(()=>{h.remove(),a()}),f}function p(e,t){return function(e,t,n){if((0,i.G4)(n))return Promise.reject((0,i.NK)());const s=e();if(t?.(s))return Promise.resolve(s);let c=null;function l(){c=(0,o.xt)(c)}return new Promise((s,o)=>{c=(0,r.vE)([(0,i.u7)(n,()=>{l(),o((0,i.NK)())}),f(e,e=>{l(),s(e)},{sync:!1,once:!0},t??h)])})}(e,g,t)}function h(e){return!0}function g(e){return!!e}n(80559);const y={sync:!0},m={initial:!0},d={sync:!0,initial:!0}},80754:(e,t,n)=>{n.d(t,{j7:()=>i,kS:()=>l,kd:()=>c,r8:()=>u});var s=n(82799),r=n(16930),o=n(65864);const i={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new s.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:r.A.WebMercator}),minus180Line:new s.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:r.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new s.A({paths:[[[180,-180],[180,180]]],spatialReference:r.A.WGS84}),minus180Line:new s.A({paths:[[[-180,-180],[-180,180]]],spatialReference:r.A.WGS84})}};function c(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const n=u(e);for(const e of n)for(const n of e)n[0]+=t;return e}function u(e){return(0,o.Bi)(e)?e.rings:e.paths}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5804,6298],{15804:(e,t,r)=>{r.d(t,{addOrUpdateResources:()=>a,bg:()=>d,cL:()=>c,fetchResources:()=>i,removeAllResources:()=>p,removeResource:()=>l});var o=r(78888),s=r(49186),n=r(84952);async function i(e,t={},r){await e.load(r);const o=(0,n.fj)(e.itemUrl,"resources"),{start:s=1,num:i=10,sortOrder:a="asc",sortField:l="resource"}=t,p={query:{start:s,num:i,sortOrder:a,sortField:l,token:e.apiKey},signal:r?.signal},u=await e.portal.request(o,p);return{total:u.total,nextStart:u.nextStart,resources:u.resources.map(({created:t,size:r,resource:o})=>({created:new Date(t),size:r,resource:e.resourceFromPath(o)}))}}async function a(e,t,r,o){const i=new Map;for(const{resource:e,content:o,compress:n,access:a}of t){if(!e.hasPath())throw new s.A(`portal-item-resource-${r}:invalid-path`,"Resource does not have a valid path");const[t,l]=u(e.path),p=`${t}/${n??""}/${a??""}`;i.has(p)||i.set(p,{prefix:t,compress:n,access:a,files:[]}),i.get(p).files.push({fileName:l,content:o})}await e.load(o);const a=(0,n.fj)(e.userItemUrl,"add"===r?"addResources":"updateResources");for(const{prefix:t,compress:r,access:s,files:n}of i.values()){const i=25;for(let l=0;l<n.length;l+=i){const p=n.slice(l,l+i),u=new FormData;t&&"."!==t&&u.append("resourcesPrefix",t),r&&u.append("compress","true"),s&&u.append("access",s);let c=0;for(const{fileName:e,content:t}of p)u.append("file"+ ++c,t,e);u.append("f","json"),await e.portal.request(a,{method:"post",body:u,signal:o?.signal})}}}async function l(e,t,r){if(!t.hasPath())throw new s.A("portal-item-resources-remove:invalid-path","Resource does not have a valid path");await e.load(r);const o=(0,n.fj)(e.userItemUrl,"removeResources");await e.portal.request(o,{method:"post",query:{resource:t.path},signal:r?.signal}),t.portalItem=null}async function p(e,t){await e.load(t);const r=(0,n.fj)(e.userItemUrl,"removeResources");return e.portal.request(r,{method:"post",query:{deleteAll:!0},signal:t?.signal})}function u(e){const t=e.lastIndexOf("/");return-1===t?[".",e]:[e.slice(0,t),e.slice(t+1)]}async function c(e){return"blob"===e.type?e.blob:"json"===e.type?new Blob([e.jsonString],{type:"application/json"}):(await(0,o.A)(e.url,{responseType:"blob"})).data}function d(e,t){if(!e.hasPath())return null;const[r,,o]=function(e){const[t,r]=function(e){const t=(0,n.Zo)(e);return null==t?[e,""]:[e.slice(0,e.length-t.length-1),`.${t}`]}(e),[o,s]=u(t);return[o,s,r]}(e.path);return e.portalItem.resourceFromPath((0,n.fj)(r,t+o))}},24212:(e,t,r)=>{function o(e,t){return function(e,t){return t?.mode?t.mode:function(e){return e?l:p}(e).mode}(null==e||(e.hasZ??!1),t)}function s(e,t,r){return r&&r.mode!==t?`${e} only support ${t} elevation mode`:null}function n(e,t,r){return r?.mode===t?`${e} do not support ${t} elevation mode`:null}function i(e,t){return null!=t?.featureExpressionInfo&&"0"!==t.featureExpressionInfo.expression?`${e} do not support featureExpressionInfo`:null}function a(e,t){t&&e.warn(".elevationInfo=",t)}r.d(t,{$7:()=>n,B:()=>s,XF:()=>a,tW:()=>i,w7:()=>o}),r(83047),r(16271);const l={mode:"absolute-height",offset:0},p={mode:"on-the-ground",offset:null}},26121:(e,t,r)=>{r.d(t,{ci:()=>i,dL:()=>s});var o=r(49186);async function s(e){const t=[];for(const r of e.allLayers)if("beforeSave"in r&&"function"==typeof r.beforeSave){const e=r.beforeSave();e&&t.push(e)}await Promise.allSettled(t)}r(77548);const n=new Set(["layer:unsupported","property:unsupported","symbol:unsupported","symbol-layer:unsupported","url:unsupported"]);function i(e,t,r){let s=(e.messages??[]).filter(({type:e})=>"error"===e).map(({name:e,message:t,details:r})=>new o.A(e,t,r));if(e.blockedRelativeUrls&&(s=s.concat(e.blockedRelativeUrls.map(e=>new o.A("url:unsupported",`Relative url '${e}' is not supported`)))),r){const{ignoreUnsupported:e,supplementalUnsupportedErrors:t=[],requiredPropertyChecksDisabled:o}=r;e&&(s=s.filter(({name:e})=>!(n.has(e)||t.includes(e)))),o&&(s=s.filter(e=>"web-document-write:property-required"!==e.name))}if(s.length>0)throw new o.A(t.errorName,"Failed to save due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:s})}},46130:(e,t,r)=>{r.d(t,{v:()=>s});var o=r(76553);function s(e){e?.writtenProperties&&e.writtenProperties.forEach(({target:e,propName:t,newOrigin:r})=>{(0,o.H)(e)&&r&&e.originOf(t)!==r&&e.updateOrigin(t,r)})}},50805:(e,t,r)=>{r.d(t,{L0:()=>g,Ot:()=>y,W4:()=>l,uV:()=>c});var o=r(31635),s=r(25482),n=r(10107),i=(r(44208),r(53966),r(87811),r(93223)),a=r(40608);let l=class extends s.o{constructor(){super(...arguments),this.nodesPerPage=null,this.rootIndex=0,this.lodSelectionMetricType=null}};(0,o.Cg)([(0,n.MZ)({type:Number})],l.prototype,"nodesPerPage",void 0),(0,o.Cg)([(0,n.MZ)({type:Number})],l.prototype,"rootIndex",void 0),(0,o.Cg)([(0,n.MZ)({type:String})],l.prototype,"lodSelectionMetricType",void 0),l=(0,o.Cg)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3SNodePageDefinition")],l);let p=class extends s.o{constructor(){super(...arguments),this.factor=1}};(0,o.Cg)([(0,n.MZ)({type:Number,json:{read:{source:"textureSetDefinitionId"}}})],p.prototype,"id",void 0),(0,o.Cg)([(0,n.MZ)({type:Number})],p.prototype,"factor",void 0),p=(0,o.Cg)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3SMaterialTexture")],p);let u=class extends s.o{constructor(){super(...arguments),this.baseColorFactor=[1,1,1,1],this.baseColorTexture=null,this.metallicRoughnessTexture=null,this.metallicFactor=1,this.roughnessFactor=1}};(0,o.Cg)([(0,n.MZ)({type:[Number]})],u.prototype,"baseColorFactor",void 0),(0,o.Cg)([(0,n.MZ)({type:p})],u.prototype,"baseColorTexture",void 0),(0,o.Cg)([(0,n.MZ)({type:p})],u.prototype,"metallicRoughnessTexture",void 0),(0,o.Cg)([(0,n.MZ)({type:Number})],u.prototype,"metallicFactor",void 0),(0,o.Cg)([(0,n.MZ)({type:Number})],u.prototype,"roughnessFactor",void 0),u=(0,o.Cg)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3SMaterialPBRMetallicRoughness")],u);let c=class extends s.o{constructor(){super(...arguments),this.alphaMode="opaque",this.alphaCutoff=.25,this.doubleSided=!1,this.cullFace="none",this.normalTexture=null,this.occlusionTexture=null,this.emissiveTexture=null,this.emissiveFactor=null,this.pbrMetallicRoughness=null}};(0,o.Cg)([(0,i.e)({opaque:"opaque",mask:"mask",blend:"blend"})],c.prototype,"alphaMode",void 0),(0,o.Cg)([(0,n.MZ)({type:Number})],c.prototype,"alphaCutoff",void 0),(0,o.Cg)([(0,n.MZ)({type:Boolean})],c.prototype,"doubleSided",void 0),(0,o.Cg)([(0,i.e)({none:"none",back:"back",front:"front"})],c.prototype,"cullFace",void 0),(0,o.Cg)([(0,n.MZ)({type:p})],c.prototype,"normalTexture",void 0),(0,o.Cg)([(0,n.MZ)({type:p})],c.prototype,"occlusionTexture",void 0),(0,o.Cg)([(0,n.MZ)({type:p})],c.prototype,"emissiveTexture",void 0),(0,o.Cg)([(0,n.MZ)({type:[Number]})],c.prototype,"emissiveFactor",void 0),(0,o.Cg)([(0,n.MZ)({type:u})],c.prototype,"pbrMetallicRoughness",void 0),c=(0,o.Cg)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3SMaterialDefinition")],c);let d=class extends s.o{};(0,o.Cg)([(0,n.MZ)({type:String,json:{read:{source:["name","index"],reader:(e,t)=>null!=e?e:`${t.index}`}}})],d.prototype,"name",void 0),(0,o.Cg)([(0,i.e)({jpg:"jpg",png:"png",dds:"dds","ktx-etc2":"ktx-etc2",ktx2:"ktx2",basis:"basis"})],d.prototype,"format",void 0),d=(0,o.Cg)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3STextureFormat")],d);let y=class extends s.o{constructor(){super(...arguments),this.atlas=!1}};(0,o.Cg)([(0,n.MZ)({type:[d]})],y.prototype,"formats",void 0),(0,o.Cg)([(0,n.MZ)({type:Boolean})],y.prototype,"atlas",void 0),y=(0,o.Cg)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3STextureSetDefinition")],y);let h=class extends s.o{};(0,o.Cg)([(0,i.e)({Float32:"Float32",UInt64:"UInt64",UInt32:"UInt32",UInt16:"UInt16",UInt8:"UInt8"})],h.prototype,"type",void 0),(0,o.Cg)([(0,n.MZ)({type:Number})],h.prototype,"component",void 0),h=(0,o.Cg)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3SGeometryAttribute")],h);let f=class extends s.o{};(0,o.Cg)([(0,i.e)({draco:"draco"})],f.prototype,"encoding",void 0),(0,o.Cg)([(0,n.MZ)({type:[String]})],f.prototype,"attributes",void 0),f=(0,o.Cg)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3SGeometryCompressedAttributes")],f);let m=class extends s.o{constructor(){super(...arguments),this.offset=0}};(0,o.Cg)([(0,n.MZ)({type:Number})],m.prototype,"offset",void 0),(0,o.Cg)([(0,n.MZ)({type:h})],m.prototype,"position",void 0),(0,o.Cg)([(0,n.MZ)({type:h})],m.prototype,"normal",void 0),(0,o.Cg)([(0,n.MZ)({type:h})],m.prototype,"uv0",void 0),(0,o.Cg)([(0,n.MZ)({type:h})],m.prototype,"color",void 0),(0,o.Cg)([(0,n.MZ)({type:h})],m.prototype,"uvRegion",void 0),(0,o.Cg)([(0,n.MZ)({type:h})],m.prototype,"featureId",void 0),(0,o.Cg)([(0,n.MZ)({type:h})],m.prototype,"faceRange",void 0),(0,o.Cg)([(0,n.MZ)({type:f})],m.prototype,"compressedAttributes",void 0),m=(0,o.Cg)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3SGeometryBuffer")],m);let g=class extends s.o{};(0,o.Cg)([(0,i.e)({triangle:"triangle"})],g.prototype,"topology",void 0),(0,o.Cg)([(0,n.MZ)()],g.prototype,"geometryBuffers",void 0),g=(0,o.Cg)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3SGeometryDefinition")],g)},58947:(e,t,r)=>{r.d(t,{w:()=>b});var o=r(31635),s=r(78888),n=r(49186),i=r(53966),a=r(74887),l=r(10107),p=(r(44208),r(87811),r(36005)),u=r(40608),c=r(46130),d=r(5443),y=r(54239),h=r(16930),f=r(60694),m=r(10873),g=r(83898),v=r(73179);var w=r(20655),S=r(80812),x=r(88788),I=r(91682),C=r(26121);const b=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.spatialReference=null,this.fullExtent=null,this.heightModelInfo=null,this.minScale=0,this.maxScale=0,this.version={major:Number.NaN,minor:Number.NaN,versionString:""},this.copyright=null,this.sublayerTitleMode="item-title",this.title=null,this.layerId=null,this.url=null,this.indexInfo=null,this._debouncedSaveOperations=(0,a.sg)(async(e,t,r)=>{switch(e){case 0:return this._save(t);case 1:return this._saveAs(r,t)}})}readSpatialReference(e,t){return A(t)}readFullExtent(e,t,r){if(null!=e&&"object"==typeof e){const o=null==e.spatialReference?{...e,spatialReference:A(t)}:e;return d.A.fromJSON(o,r)}const o=t.store,s=A(t);return null==s||null==o?.extent||!Array.isArray(o.extent)||o.extent.some(e=>e<M)?null:new d.A({xmin:o.extent[0],ymin:o.extent[1],xmax:o.extent[2],ymax:o.extent[3],spatialReference:s})}parseVersionString(e){const t={major:Number.NaN,minor:Number.NaN,versionString:e},r=e.split(".");return r.length>=2&&(t.major=parseInt(r[0],10),t.minor=parseInt(r[1],10)),t}readVersion(e,t){const r=t.store,o=null!=r.version?r.version.toString():"";return this.parseVersionString(o)}readTitlePortalItem(e){return"item-title"!==this.sublayerTitleMode?void 0:e}readTitleService(e,t){const r=this.portalItem?.title;if("item-title"===this.sublayerTitleMode)return this.url?(0,f.yG)(this.url,t.name):t.name;let o=t.name;if(!o&&this.url){const e=(0,f.qg)(this.url);null!=e&&(o=e.title)}return"item-title-and-service-name"===this.sublayerTitleMode&&r&&(o=r+" - "+o),(0,f.cr)(o)}get parsedUrl(){return(0,v.h)(this,{separator:"layers"})}async _fetchIndexAndUpdateExtent(e,t){this.indexInfo=(0,g.F)(this.parsedUrl?.path??"",this.rootNode,e,this.customParameters,this.apiKey,i.A.getLogger(this),t),null==this.fullExtent||this.fullExtent.hasZ||this._updateExtent(await this.indexInfo)}_updateExtent(e){if("page"===e?.type){const t=e.rootIndex%e.pageSize,r=e.rootPage?.nodes?.[t];if(null==r?.obb?.center||null==r.obb.halfSize)throw new n.A("sceneservice:invalid-node-page","Invalid node page.");if(r.obb.center[0]<M||null==this.fullExtent||this.fullExtent.hasZ)return;const o=r.obb.halfSize,s=r.obb.center[2],i=Math.sqrt(o[0]*o[0]+o[1]*o[1]+o[2]*o[2]);this.fullExtent.zmin=s-i,this.fullExtent.zmax=s+i}else if("node"===e?.type){const t=e.rootNode?.mbs;if(!Array.isArray(t)||4!==t.length||t[0]<M)return;const r=t[2],o=t[3],{fullExtent:s}=this;s&&(s.zmin=r-o,s.zmax=r+o)}}async _fetchService(e){if(null==this.url)throw new n.A("sceneservice:url-not-set","Scene service can not be loaded without valid portal item or url");if(null==this.layerId&&/SceneServer\/*$/i.test(this.url)){const t=await this._fetchFirstLayerId(e);null!=t&&(this.layerId=t)}return this._fetchServiceLayer(e)}async _fetchFirstLayerId(e){const t=await(0,s.A)(this.url??"",{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e});if(t.data&&Array.isArray(t.data.layers)&&t.data.layers.length>0)return t.data.layers[0].id}async _fetchServiceLayer(e){const t=await(0,s.A)(this.parsedUrl?.path??"",{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e});t.ssl&&this.url&&(this.url=this.url.replace(/^http:/i,"https:"));let r=!1;if(t.data.layerType&&"Voxel"===t.data.layerType&&(r=!0),r)return this._fetchVoxelServiceLayer();const o=t.data;this.read(o,this._getServiceContext()),this.validateLayer(o)}async _fetchVoxelServiceLayer(e){const t=(await(0,s.A)(this.parsedUrl?.path+"/layer",{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e})).data;this.read(t,this._getServiceContext()),this.validateLayer(t)}_getServiceContext(){return{origin:"service",portalItem:this.portalItem,portal:this.portalItem?.portal,url:this.parsedUrl}}async _ensureLoadBeforeSave(){await this.load(),"beforeSave"in this&&"function"==typeof this.beforeSave&&await this.beforeSave()}validateLayer(e){}async _saveAs(e,t){const r={...N,...t};let o=S.default.from(e);if(!o)throw new n.A("sceneservice:portal-item-required","_saveAs() requires a portal item to save to");o.id&&(o=o.clone(),o.id=null);const s=o.portal||w.A.getDefault();await this._ensureLoadBeforeSave(),o.type=R,o.portal=s;const i=(0,x.m)(o,"portal-item",!0),a={layers:[this.write({},i)]};return await Promise.all(i.resources.pendingOperations??[]),await this._validateAgainstJSONSchema(a,i,r),this.url&&(o.url=this.url),o.title||(o.title=this.title),Z(o,r,1),await s.signIn(),await s.user.addItem({item:o,folder:r?.folder,data:a}),await(0,I.r)(this.resourceReferences,i),this.portalItem=o,(0,c.v)(i),i.portalItem=o,o}async _save(e){const t={...N,...e};if(!this.portalItem)throw new n.A("sceneservice:portal-item-not-set","Portal item to save to has not been set on this SceneService");if(this.portalItem.type!==R)throw new n.A("sceneservice:portal-item-wrong-type",`Portal item needs to have type "${R}"`);await this._ensureLoadBeforeSave();const r=(0,x.m)(this.portalItem,"portal-item",!0),o={layers:[this.write({},r)]};return await Promise.all(r.resources.pendingOperations??[]),await this._validateAgainstJSONSchema(o,r,t),this.url&&(this.portalItem.url=this.url),this.portalItem.title||(this.portalItem.title=this.title),Z(this.portalItem,t,0),await(0,I.S)(this.portalItem,o,this.resourceReferences,r),(0,c.v)(r),this.portalItem}async _validateAgainstJSONSchema(e,t,r){const o=r?.validationOptions;(0,C.ci)(t,{errorName:"sceneservice:save"},{ignoreUnsupported:o?.ignoreUnsupported,supplementalUnsupportedErrors:["scenemodification:unsupported"]});const s=o?.enabled,a=null;if(s&&a){const t=(await a()).validate(e,r.portalItemLayerType);if(!t.length)return;const s=`Layer item did not validate:\n${t.join("\n")}`;if(i.A.getLogger(this).error(`_validateAgainstJSONSchema(): ${s}`),"throw"===o.failPolicy){const e=t.map(e=>new n.A("sceneservice:schema-validation",e));throw new n.A("sceneservice-validate:error","Failed to save layer item due to schema validation, see `details.errors`.",{validationErrors:e})}}}};return(0,o.Cg)([(0,l.MZ)(m.id)],r.prototype,"id",void 0),(0,o.Cg)([(0,l.MZ)({type:h.A})],r.prototype,"spatialReference",void 0),(0,o.Cg)([(0,p.w)("spatialReference",["spatialReference","store.indexCRS","store.geographicCRS"])],r.prototype,"readSpatialReference",null),(0,o.Cg)([(0,l.MZ)({type:d.A})],r.prototype,"fullExtent",void 0),(0,o.Cg)([(0,p.w)("fullExtent",["fullExtent","store.extent","spatialReference","store.indexCRS","store.geographicCRS"])],r.prototype,"readFullExtent",null),(0,o.Cg)([(0,l.MZ)({readOnly:!0,type:y.A})],r.prototype,"heightModelInfo",void 0),(0,o.Cg)([(0,l.MZ)({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:{source:"minScale"},write:!1}}}})],r.prototype,"minScale",void 0),(0,o.Cg)([(0,l.MZ)({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:{source:"maxScale"},write:!1}}}})],r.prototype,"maxScale",void 0),(0,o.Cg)([(0,l.MZ)({readOnly:!0})],r.prototype,"version",void 0),(0,o.Cg)([(0,p.w)("version",["store.version"])],r.prototype,"readVersion",null),(0,o.Cg)([(0,l.MZ)({type:String,json:{read:{source:"copyrightText"}}})],r.prototype,"copyright",void 0),(0,o.Cg)([(0,l.MZ)({type:String,json:{read:!1}})],r.prototype,"sublayerTitleMode",void 0),(0,o.Cg)([(0,l.MZ)({type:String})],r.prototype,"title",void 0),(0,o.Cg)([(0,p.w)("portal-item","title")],r.prototype,"readTitlePortalItem",null),(0,o.Cg)([(0,p.w)("service","title",["name"])],r.prototype,"readTitleService",null),(0,o.Cg)([(0,l.MZ)({type:Number,json:{origins:{service:{read:{source:"id"}},"portal-item":{write:{target:"id",isRequired:!0,ignoreOrigin:!0},read:!1}}}})],r.prototype,"layerId",void 0),(0,o.Cg)([(0,l.MZ)((0,v.b)({separator:"layers"}))],r.prototype,"url",void 0),(0,o.Cg)([(0,l.MZ)({readOnly:!0})],r.prototype,"parsedUrl",null),(0,o.Cg)([(0,l.MZ)({readOnly:!0})],r.prototype,"store",void 0),(0,o.Cg)([(0,l.MZ)({type:String,readOnly:!0,json:{read:{source:"store.rootNode"}}})],r.prototype,"rootNode",void 0),r=(0,o.Cg)([(0,u.$)("esri.layers.mixins.SceneService")],r),r},M=-1e38;function A(e){if(null!=e.spatialReference)return h.A.fromJSON(e.spatialReference);const t=e.store,r=t.indexCRS||t.geographicCRS,o=r&&parseInt(r.slice(r.lastIndexOf("/")+1),10);return null!=o?new h.A(o):null}function Z(e,t,r){e.typeKeywords||(e.typeKeywords=[]);const o=t.getTypeKeywords();for(const t of o)e.typeKeywords.push(t);e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter((e,t,r)=>r.indexOf(e)===t),1===r&&(e.typeKeywords=e.typeKeywords.filter(e=>"Hosted Service"!==e)))}const R="Scene Service",N={getTypeKeywords:()=>[],portalItemLayerType:"unknown",validationOptions:{enabled:!0,ignoreUnsupported:!1,failPolicy:"throw"}}},76553:(e,t,r)=>{function o(e){return e&&"getAtOrigin"in e&&"originOf"in e}r.d(t,{H:()=>o})},83898:(e,t,r)=>{r.d(t,{F:()=>n});var o=r(78888),s=r(49186);async function n(e,t,r,n,i,a,l){let p=null;if(null!=r){const t=`${e}/nodepages/`,s=t+Math.floor(r.rootIndex/r.nodesPerPage);try{return{type:"page",rootPage:(await(0,o.A)(s,{query:{f:"json",...n,token:i},responseType:"json",signal:l})).data,rootIndex:r.rootIndex,pageSize:r.nodesPerPage,lodMetric:r.lodSelectionMetricType,urlPrefix:t}}catch(e){null!=a&&a.warn("#fetchIndexInfo()","Failed to load root node page. Falling back to node documents.",s,e),p=e}}if(!t)return null;const u=t?.split("/").pop(),c=`${e}/nodes/`,d=c+u;try{return{type:"node",rootNode:(await(0,o.A)(d,{query:{f:"json",...n,token:i},responseType:"json",signal:l})).data,urlPrefix:c}}catch(e){throw new s.A("sceneservice:root-node-missing","Root node missing.",{pageError:p,nodeError:e,url:d})}}},88788:(e,t,r)=>{r.d(t,{m:()=>i,v:()=>n});var o=r(84952),s=r(20655);function n(e,t){return{...a(e,t),readResourcePaths:[]}}function i(e,t,r){const s=(0,o.An)(e.itemUrl);return{...a(e,t),messages:[],writtenProperties:[],blockedRelativeUrls:[],verifyItemRelativeUrls:s?{rootPath:s.path,writtenUrls:[]}:null,resources:r?{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}:null}}function a(e,t){return{origin:t,url:(0,o.An)(e.itemUrl),portal:e.portal||s.A.getDefault(),portalItem:e}}},91682:(e,t,r)=>{r.d(t,{S:()=>l,r:()=>a});var o=r(49186),s=r(74887),n=r(13069),i=r(15804);async function a(e,t,r){const o=await p(e,t,r);await u(o,t,r)}async function l(e,t,r,o,s){const n=await p(r,o,s);await e.update({data:t}),await u(n,o,s)}async function p(e,t,a){if(!t?.resources)return;const l=t.portalItem===e.portalItem?new Set(e.paths):new Set;e.paths.length=0,e.portalItem=t.portalItem;const p=new Set(t.resources.toKeep.map(e=>e.resource.path)),u=new Set,c=[];p.forEach(t=>{l.delete(t),e.paths.push(t)});const d=[],y=[],h=[];for(const r of t.resources.toUpdate)if(l.delete(r.resource.path),p.has(r.resource.path)||u.has(r.resource.path)){const{resource:t,content:o,finish:s}=r,a=(0,i.bg)(t,(0,n.lk)());e.paths.push(a.path),d.push({resource:a,content:await(0,i.cL)(o),compress:r.compress}),s&&h.push(()=>s(a))}else{e.paths.push(r.resource.path),y.push({resource:r.resource,content:await(0,i.cL)(r.content),compress:r.compress});const t=r.finish;t&&h.push(()=>t(r.resource)),u.add(r.resource.path)}for(const r of t.resources.toAdd)if(e.paths.push(r.resource.path),l.has(r.resource.path))l.delete(r.resource.path);else{d.push({resource:r.resource,content:await(0,i.cL)(r.content),compress:r.compress});const e=r.finish;e&&h.push(()=>e(r.resource))}if(d.length||y.length){const{addOrUpdateResources:e}=await Promise.resolve().then(r.bind(r,15804));await e(t.portalItem,d,"add",a),await e(t.portalItem,y,"update",a)}if(h.forEach(e=>e()),0===c.length)return l;const f=await(0,s.Ol)(c);if((0,s.Te)(a),f.length>0)throw new o.A("save:resources","Failed to save one or more resources",{errors:f});return l}async function u(e,t,r){if(!e||!t.portalItem)return;const o=[];for(const s of e){const e=t.portalItem.resourceFromPath(s);o.push(e.portalItem.removeResource(e,r))}await(0,s.Lx)(o)}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1863],{162:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Y});var i=r(31635),s=r(7762),n=r(38961),o=r(92071),l=r(74887),a=r(36708),u=r(84952),c=r(10107),h=(r(44208),r(53966),r(87811),r(36005)),p=r(40608),d=r(43937),y=r(5443),f=r(16930),m=r(4146),g=r(63074),b=r(16131),v=r(8303),_=r(54310),w=r(25036),F=r(10873),M=r(65529),S=r(25482),T=r(92474),x=r(799),C=r(56507),I=r(89808),A=r(99959);const P=Symbol("isKMLGraphicOrigin");var Z;class O extends A.A{get[(Z=P,I.Q)](){return this.layer}constructor(e,t){super(),this[Z]=!0,this.type="kml",this.layer=e,this.sublayer=t}get id(){return`${this.layer.id}:__${this.sublayer.id}__`}}var R=r(92602),E=r(70333),N=(r(37838),r(78888)),L=r(4718),G=r(70328),j=r(6606);r(65494),r(22671);const k={esriGeometryPoint:"points",esriGeometryPolyline:"polylines",esriGeometryPolygon:"polygons"};function D(e){const t=e.folders||[],r=t.slice(),i=new Map,s=new Map,n=new Map,o=new Map,l=new Map,a={esriGeometryPoint:s,esriGeometryPolyline:n,esriGeometryPolygon:o};(e.featureCollection?.layers||[]).forEach(e=>{const t=(0,L.o8)(e);t.featureSet.features=[];const r=e.featureSet.geometryType;i.set(r,t);const l=e.layerDefinition.objectIdField;"esriGeometryPoint"===r?J(s,l,e.featureSet.features):"esriGeometryPolyline"===r?J(n,l,e.featureSet.features):"esriGeometryPolygon"===r&&J(o,l,e.featureSet.features)}),e.groundOverlays&&e.groundOverlays.forEach(e=>{l.set(e.id,e)}),t.forEach(t=>{t.networkLinkIds.forEach(i=>{const s=function(e,t,r){const i=function(e,t){let r;return t.some(t=>t.id===e&&(r=t,!0)),r}(e,r);return i&&(i.parentFolderId=t,i.networkLink=i),i}(i,t.id,e.networkLinks);s&&r.push(s)})}),r.forEach(e=>{if(e.featureInfos){e.points=(0,L.o8)(i.get("esriGeometryPoint")),e.polylines=(0,L.o8)(i.get("esriGeometryPolyline")),e.polygons=(0,L.o8)(i.get("esriGeometryPolygon")),e.mapImages=[];for(const t of e.featureInfos)switch(t.type){case"esriGeometryPoint":case"esriGeometryPolyline":case"esriGeometryPolygon":{const r=a[t.type].get(t.id);r&&e[k[t.type]]?.featureSet.features.push(r);break}case"GroundOverlay":{const r=l.get(t.id);r&&e.mapImages.push(r);break}}e.fullExtent=z([e])}});const u=z(r);return{folders:t,sublayers:r,extent:u}}function $(e,t,r,i){const s=E.id?.findCredential(e);e=(0,u.a6)(e,{token:s?.token});const n=R.A.kmlServiceUrl;return(0,N.A)(n,{query:{url:e,model:"simple",folders:"",refresh:0!==r||void 0,outSR:JSON.stringify(t)},responseType:"json",signal:i})}function q(e,t,r=null,i=[]){const s=[],n={},o=t.sublayers,l=new Set(t.folders.map(e=>e.id));return o.forEach(t=>{const o=new e;if(r?o.read(t,r):o.read(t),i.length&&l.has(o.id)&&(o.visible=i.includes(o.id)),n[t.id]=o,null!=t.parentFolderId&&-1!==t.parentFolderId){const e=n[t.parentFolderId];e.sublayers||(e.sublayers=[]),e.sublayers?.unshift(o)}else s.unshift(o)}),s}function J(e,t,r){r.forEach(r=>{e.set(r.attributes[t],r)})}function z(e){const t=(0,G.vt)(G.qv),r=(0,G.vt)(G.qv);for(const i of e){if(i.polygons?.featureSet?.features)for(const e of i.polygons.featureSet.features)(0,j.LJ)(t,e.geometry),(0,G.RF)(r,t);if(i.polylines?.featureSet?.features)for(const e of i.polylines.featureSet.features)(0,j.LJ)(t,e.geometry),(0,G.RF)(r,t);if(i.points?.featureSet?.features)for(const e of i.points.featureSet.features)(0,j.LJ)(t,e.geometry),(0,G.RF)(r,t);if(i.mapImages)for(const e of i.mapImages)(0,j.LJ)(t,e.extent),(0,G.RF)(r,t)}return(0,G.aI)(r,G.qv)?void 0:{xmin:r[0],ymin:r[1],zmin:r[2],xmax:r[3],ymax:r[4],zmax:r[5],spatialReference:f.A.WGS84}}var U;let V=U=class extends((0,M.Zt)((0,S.T)(T.x_))){constructor(...e){super(...e),this.description=null,this.fullExtent=null,this.id=null,this.networkLink=null,this.parent=null,this.sublayers=null,this.title=null,this.sourceJSON=null,this.layer=null,this.addHandles([(0,a.on)(()=>this.sublayers,"after-add",({item:e})=>{e.parent=this,e.layer=this.layer},a.OH),(0,a.on)(()=>this.sublayers,"after-remove",({item:e})=>{e.layer=e.parent=null},a.OH),(0,a.wB)(()=>this.sublayers,(e,t)=>{if(t)for(const e of t)e.layer=e.parent=null;if(e)for(const t of e)t.parent=this,t.layer=this.layer},a.OH),(0,a.wB)(()=>this.layer,e=>{if(this.sublayers)for(const t of this.sublayers)t.layer=e},a.OH)])}initialize(){(0,a.C_)(()=>this.networkLink).then(()=>(0,a.C_)(()=>!0===this.visible)).then(()=>this.load())}load(e){if(!this.networkLink)return;if(this.networkLink.viewFormat)return;const t=null!=e?e.signal:null,r=this._fetchService(this._get("networkLink")?.href??"",t).then(e=>{const t=z(e.sublayers);this.fullExtent=y.A.fromJSON(t),this.sourceJSON=e;const r=(0,C.dp)(s.A.ofType(U),q(U,e));this.sublayers?this.sublayers.addMany(r):this.sublayers=r,this.layer?.emit("sublayer-update"),this.layer&&this.layer.notifyChange("visibleSublayers")});return this.addResolvingPromise(r),Promise.resolve(this)}get visible(){return this._get("visible")}set visible(e){this._get("visible")!==e&&(this._set("visible",e),this.layer&&this.layer.notifyChange("visibleSublayers"))}readVisible(e,t){return!!t.visibility}get origin(){return this.layer?new O(this.layer,this):null}_fetchService(e,t){return $(e,this.layer.outSpatialReference,this.layer.refreshInterval,t).then(e=>D(e.data))}};(0,i.Cg)([(0,c.MZ)()],V.prototype,"description",void 0),(0,i.Cg)([(0,c.MZ)({type:y.A})],V.prototype,"fullExtent",void 0),(0,i.Cg)([(0,c.MZ)()],V.prototype,"id",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0,value:null})],V.prototype,"networkLink",void 0),(0,i.Cg)([(0,c.MZ)({json:{write:{allowNull:!0}}})],V.prototype,"parent",void 0),(0,i.Cg)([(0,c.MZ)({type:s.A.ofType(V),json:{write:{allowNull:!0}}})],V.prototype,"sublayers",void 0),(0,i.Cg)([(0,c.MZ)({value:null,json:{read:{source:"name",reader:e=>(0,x._e)(e)}}})],V.prototype,"title",void 0),(0,i.Cg)([(0,c.MZ)({value:!0})],V.prototype,"visible",null),(0,i.Cg)([(0,h.w)("visible",["visibility"])],V.prototype,"readVisible",null),(0,i.Cg)([(0,c.MZ)()],V.prototype,"sourceJSON",void 0),(0,i.Cg)([(0,c.MZ)()],V.prototype,"layer",void 0),(0,i.Cg)([(0,c.MZ)()],V.prototype,"origin",null),V=U=(0,i.Cg)([(0,p.$)("esri.layers.support.KMLSublayer")],V);const H=["kml","xml"];let B=class extends((0,g.dM)((0,_.J)((0,w.j)((0,b.q)((0,v.A)((0,o.P)(m.A))))))){constructor(...e){super(...e),this._visibleFolders=[],this.allSublayers=new n.A({getCollections:()=>[this.sublayers],getChildrenFunction:e=>e.sublayers}),this.outSpatialReference=f.A.WGS84,this.path=null,this.legendEnabled=!1,this.operationalLayerType="KML",this.sublayers=null,this.type="kml",this.url=null}initialize(){this.addHandles([(0,a.wB)(()=>this.sublayers,(e,t)=>{t&&t.forEach(e=>{e.parent=null,e.layer=null}),e&&e.forEach(e=>{e.parent=this,e.layer=this})},a.OH),this.on("sublayer-update",()=>this.notifyChange("fullExtent"))])}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}get sublayerById(){const e=new Map;for(const t of this.allSublayers)e.set(t.id,t);return e}readSublayersFromItemOrWebMap(e,t){this._visibleFolders=t.visibleFolders}readSublayers(e,t,r){return q(V,t,r,this._visibleFolders)}writeSublayers(e,t){const r=[],i=e.toArray();for(;i.length;){const e=i[0];e.networkLink||(e.visible&&r.push(e.id),e.sublayers&&i.push(...e.sublayers.toArray())),i.shift()}t.visibleFolders=r}get title(){const e=this._get("title");return e&&"defaults"!==this.originOf("title")?e:this.url?(0,u.e7)(this.url,H)||"KML":e}set title(e){this._set("title",e)}get visibleSublayers(){const e=this.sublayers,t=[],r=e=>{e.visible&&(t.push(e),e.sublayers&&e.sublayers.forEach(r))};return e?.forEach(r),t}get fullExtent(){return this._recomputeFullExtent()}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["KML"],supportsData:!1},e).catch(l.QP).then(()=>this._fetchService(t))),Promise.resolve(this)}destroy(){super.destroy(),this.allSublayers.destroy()}async _fetchService(e){const t=D((await Promise.resolve().then(()=>this.resourceInfo?{ssl:!1,data:this.resourceInfo}:$(this.url??"",this.outSpatialReference,this.refreshInterval,e))).data);t&&this.read(t,{origin:"service"})}_recomputeFullExtent(){let e=null;null!=this.extent&&(e=this.extent.clone());const t=r=>{if(r.sublayers)for(const i of r.sublayers.items)t(i),i.visible&&i.fullExtent&&(null!=e?e.union(i.fullExtent):e=i.fullExtent.clone())};return t(this),e}};(0,i.Cg)([(0,c.MZ)({readOnly:!0})],B.prototype,"allSublayers",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],B.prototype,"sublayerById",null),(0,i.Cg)([(0,c.MZ)({type:f.A})],B.prototype,"outSpatialReference",void 0),(0,i.Cg)([(0,c.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],B.prototype,"path",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0,json:{read:!1,write:!1}})],B.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,c.MZ)({type:["show","hide","hide-children"]})],B.prototype,"listMode",void 0),(0,i.Cg)([(0,c.MZ)({type:["KML"]})],B.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,c.MZ)({})],B.prototype,"resourceInfo",void 0),(0,i.Cg)([(0,c.MZ)({type:s.A.ofType(V),json:{write:{ignoreOrigin:!0}}})],B.prototype,"sublayers",void 0),(0,i.Cg)([(0,h.w)(["web-map","portal-item"],"sublayers",["visibleFolders"])],B.prototype,"readSublayersFromItemOrWebMap",null),(0,i.Cg)([(0,h.w)("service","sublayers",["sublayers"])],B.prototype,"readSublayers",null),(0,i.Cg)([(0,d.K)("sublayers")],B.prototype,"writeSublayers",null),(0,i.Cg)([(0,c.MZ)({readOnly:!0,json:{read:!1}})],B.prototype,"type",void 0),(0,i.Cg)([(0,c.MZ)({json:{origins:{"web-map":{read:{source:"title"}}},write:{ignoreOrigin:!0}}})],B.prototype,"title",null),(0,i.Cg)([(0,c.MZ)(F.OZ)],B.prototype,"url",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],B.prototype,"visibleSublayers",null),(0,i.Cg)([(0,c.MZ)({type:y.A})],B.prototype,"extent",void 0),(0,i.Cg)([(0,c.MZ)()],B.prototype,"fullExtent",null),B=(0,i.Cg)([(0,p.$)("esri.layers.KMLLayer")],B);const Y=B},4197:(e,t,r)=>{r.d(t,{Vj:()=>u,cj:()=>a,jh:()=>n,l5:()=>l,xm:()=>o});var i=r(34275),s=r(9093);function n(e){return e<=i.y9?new Array(e).fill(0):new Float64Array(e)}function o(e){return((0,i.iu)(e)?e.byteLength/8:e.length)<=i.y9?Array.from(e):new Float64Array(e)}function l(e,t,r){return Array.isArray(e)?e.slice(t,t+r):e.subarray(t,t+r)}function a(e){return[...e]}function u(e){const t=(0,s.vt)();for(let r=0;r<16;++r)t[r]=e[r];return t}},6797:(e,t,r)=>{r.d(t,{Mj:()=>p,Ui:()=>y,w2:()=>d});var i=r(65008),s=r(7762),n=r(88620);const o=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function l(e){return e instanceof i.A}function a(e){return e instanceof s.A?Object.keys(e.items):l(e)?(0,n.oY)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof s.A?e.items[t]:e[t]}function c(e){return e?e.declaredClass:null}function h(e,t){const r=e.diff;if(r&&"function"==typeof r)return r(e,t);const i=a(e),s=a(t);if(0===i.length&&0===s.length)return;if(!i.length||!s.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const n=s.filter(e=>!i.includes(e)),p=i.filter(e=>!s.includes(e)),d=i.filter(r=>s.includes(r)&&u(e,r)!==u(t,r)).concat(n,p).sort(),y=c(e);if(y&&o.has(y)&&d.length)return{type:"complete",oldValue:e,newValue:t};let f;const m=l(e)&&l(t);for(const i of d){const s=u(e,i),n=u(t,i);let o;if((m||"function"!=typeof s&&"function"!=typeof n)&&s!==n&&(null!=s||null!=n)){if(r&&r[i]&&"function"==typeof r[i])o=r[i]?.(s,n);else if(s instanceof Date&&n instanceof Date){if(s.getTime()===n.getTime())continue;o={type:"complete",oldValue:s,newValue:n}}else o="object"==typeof s&&"object"==typeof n&&c(s)===c(n)?h(s,n):{type:"complete",oldValue:s,newValue:n};null!=o&&(null!=f?f.diff[i]=o:f={type:"partial",diff:{[i]:o}})}}return f}function p(e,t){return function(e,t){if(null==e)return!1;const r=t.split(".");let i=e;for(const e of r){if("complete"===i.type)return!0;if("partial"!==i.type)return!1;{const t=i.diff[e];if(!t)return!1;i=t}}return!0}(e,t)}function d(e,t){if(!e)return!1;if("partial"===e.type){const r=Object.keys(e.diff);return 1===r.length&&r[0]===t}return!1}function y(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&c(e)!==c(t)?{type:"complete",oldValue:e,newValue:t}:h(e,t)}},8303:(e,t,r)=>{r.d(t,{A:()=>F});var i=r(31635),s=r(92602),n=r(70333),o=r(78888),l=r(60999),a=r(49186),u=r(53966),c=r(97768),h=r(74887),p=r(84952),d=r(10107),y=(r(44208),r(87811),r(36005)),f=r(40608),m=r(43937),g=r(77548),b=r(20655),v=r(80812),_=r(41318),w=r(10407);const F=e=>{const t=e;let F=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,c.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new v.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:i}=await r.e(1204).then(r.bind(r,41204));return(0,h.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,h.zf)(e)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch(e=>((0,h.QP)(e),!0)))}async setUserPrivileges(e,t){if(!s.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,h.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=!n.id?.findCredential(this.url),s=e===r.id;if(s&&r.portal.user)return this._getUserPrivileges(r,i);let o,l;if(s)o=r.portal.url;else try{o=await(0,g.wI)(this.url,t)}catch(e){(0,h.QP)(e)}if(!o||!(0,p.b8)(o,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;l=await(n.id?.getCredential(`${o}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,h.QP)(e)}const a=!0,u=!1,c=!1;if(!l)return{features:{edit:a,fullEdit:u},content:{updateItem:c}};try{if(s?await r.reload():(r=new v.default({id:e,portal:{url:o}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,i)}catch(e){(0,h.QP)(e)}return{features:{edit:a,fullEdit:u},content:{updateItem:c}}}_getUserPrivileges(e,t){const r=(0,w.It)(e);return t&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,h.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?n.id?.findCredential(this.url):null;if(!t)return!0;const r=M.credential===t?M.user:await this._fetchEditingUser(e);return M.credential=t,M.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=n.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,s=b.A.getDefault();if(s&&s.loaded&&(0,p.S8)(s.restUrl)===(0,p.S8)(i))return s.user;const a=`${i}/community/self`,u=null!=e?e.signal:null,c=await(0,l.Ke)((0,o.A)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return c.ok?_.A.fromJSON(c.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,i=this.portalItem?.id&&(this.portalItem.portal||b.A.getDefault());return r&&i&&!(0,p.ut)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new a.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i.Cg)([(0,d.MZ)({type:v.default})],F.prototype,"portalItem",null),(0,i.Cg)([(0,y.w)("web-document","portalItem",["itemId"])],F.prototype,"readPortalItem",null),(0,i.Cg)([(0,m.K)("web-document","portalItem",{itemId:{type:String}})],F.prototype,"writePortalItem",null),(0,i.Cg)([(0,d.MZ)({clonable:!1})],F.prototype,"resourceReferences",void 0),(0,i.Cg)([(0,d.MZ)({type:Boolean,readOnly:!0})],F.prototype,"userHasEditingPrivileges",void 0),(0,i.Cg)([(0,d.MZ)({type:Boolean,readOnly:!0})],F.prototype,"userHasFullEditingPrivileges",void 0),(0,i.Cg)([(0,d.MZ)({type:Boolean,readOnly:!0})],F.prototype,"userHasUpdateItemPrivileges",void 0),F=(0,i.Cg)([(0,f.$)("esri.layers.mixins.PortalLayer")],F),F},M={credential:null,user:null}},9093:(e,t,r)=>{function i(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function s(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]]}r.d(t,{o8:()=>s,vt:()=>i,zK:()=>n});const n=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:n,clone:s,create:i,fromValues:function(e,t,r,i,s,n,o,l,a,u,c,h,p,d,y,f){return[e,t,r,i,s,n,o,l,a,u,c,h,p,d,y,f]}},Symbol.toStringTag,{value:"Module"}))},22671:(e,t,r)=>{r.d(t,{A:()=>b});var i,s=r(31635),n=r(52106),o=r(66552),l=r(25482),a=r(4718),u=r(10107),c=(r(44208),r(53966),r(36005)),h=r(40608),p=r(43937),d=r(16930),y=r(65864),f=r(50498),m=r(20437);const g=new o.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let b=i=class extends l.o{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){return this.readFeaturesWithClass(e,t,n.A)}writeGeometryType(e,t,r,i){if(e)return void g.write(e,t,r,i);const{features:s}=this;if(s)for(const e of s)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,y.rS)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=d.A.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,a.o8)({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 i=t.features[r];if(i.geometry){const t=e?.[r];i.geometry=t?.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,s]}=e,n=this.features,o=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-i)/t),e=>Math.round((s-e)/r));for(let e=0,t=n.length;e<t;e++)o?.(n[e].geometry)||(n.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:[i,s],scale:[n,o]}=r;let l=null,a=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;l=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;a=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,e=>e*n+i,e=>s-e*o,l,a);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){const i=d.A.fromJSON(t.spatialReference),s=[];for(let t=0;t<e.length;t++){const n=e[t],o=r.fromJSON(n),l=n.geometry?.spatialReference;null==o.geometry||l||(o.geometry.spatialReference=i);const a=n.aggregateGeometries,u=o.aggregateGeometries;if(a&&null!=u)for(const e in u){const t=u[e],r=a[e],s=r?.spatialReference;null==t||s||(t.spatialReference=i)}s.push(o)}return s}_quantizePoints(e,t,r){let i,s;const n=[];for(let o=0,l=e.length;o<l;o++){const l=e[o];if(o>0){const e=t(l[0]),o=r(l[1]);e===i&&o===s||(n.push([e-i,o-s]),i=e,s=o)}else i=t(l[0]),s=r(l[1]),n.push([i,s])}return n.length>0?n: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 i=(0,y.Bi)(e)?e.rings:e.paths,s=[];for(let e=0,n=i.length;e<n;e++){const n=i[e],o=this._quantizePoints(n,t,r);o&&s.push(o)}return s.length>0?((0,y.Bi)(e)?e.rings=s:e.paths=s,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,s){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{const n=(0,y.Bi)(e)?e.rings:e.paths;let o,l;for(let e=0,i=n.length;e<i;e++){const i=n[e];for(let e=0,s=i.length;e<s;e++){const s=i[e];e>0?(o+=s[0],l+=s[1]):(o=s[0],l=s[1]),s[0]=t(o),s[1]=r(l)}}if(i&&s)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2]),r[3]=s(r[3])}}else if(i)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}else if(s)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),s&&null!=e.mmax&&null!=e.mmin&&(e.mmax=s(e.mmax),e.mmin=s(e.mmin))}:"multipoint"===e?e=>{const n=e.points;let o,l;for(let e=0,i=n.length;e<i;e++){const i=n[e];e>0?(o+=i[0],l+=i[1]):(o=i[0],l=i[1]),i[0]=t(o),i[1]=r(l)}if(i&&s)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=i(t[2]),t[3]=s(t[3])}else if(i)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=i(t[2])}else if(s)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=s(t[2])}}:null}};(0,s.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],b.prototype,"displayFieldName",void 0),(0,s.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"exceededTransferLimit",void 0),(0,s.Cg)([(0,u.MZ)({type:[n.A],json:{write:!0}})],b.prototype,"features",void 0),(0,s.Cg)([(0,c.w)("features")],b.prototype,"readFeatures",null),(0,s.Cg)([(0,u.MZ)({type:[m.A],json:{write:!0}})],b.prototype,"fields",void 0),(0,s.Cg)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],b.prototype,"geometryType",void 0),(0,s.Cg)([(0,p.K)("geometryType")],b.prototype,"writeGeometryType",null),(0,s.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"hasM",void 0),(0,s.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"hasZ",void 0),(0,s.Cg)([(0,u.MZ)({types:f.yR,json:{write:!0}})],b.prototype,"queryGeometry",void 0),(0,s.Cg)([(0,c.w)("queryGeometry")],b.prototype,"readQueryGeometry",null),(0,s.Cg)([(0,u.MZ)({type:d.A,json:{write:!0}})],b.prototype,"spatialReference",void 0),(0,s.Cg)([(0,p.K)("spatialReference")],b.prototype,"writeSpatialReference",null),(0,s.Cg)([(0,u.MZ)({json:{write:!0}})],b.prototype,"transform",void 0),b=i=(0,s.Cg)([(0,h.$)("esri.rest.support.FeatureSet")],b),b.prototype.toJSON.isDefaultToJSON=!0},38961:(e,t,r)=>{r.d(t,{A:()=>u});var i=r(31635),s=r(7762),n=r(36708),o=r(10107),l=r(40608),a=r(80559);let u=class extends s.A{constructor(e){super(e),this.getCollections=null}initialize(){this.addHandles((0,a.fm)(()=>this._refresh(),n.OH))}destroy(){this.getCollections=null}_refresh(){const e=null!=this.getCollections?this.getCollections():null;if(null==e)return void this.removeAll();let t=0;for(const r of e)null!=r&&(t=this._processCollection(t,r));this.splice(t)}_createNewInstance(e){return new s.A(e)}_processCollection(e,t){if(!t)return e;const r=this.itemFilterFunction??(e=>!!e);for(const i of t)if(i){if(r(i)){const t=this.indexOf(i,e);t>=0?t!==e&&this.reorder(i,e):this.add(i,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(i);if(Array.isArray(t))for(const r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};(0,i.Cg)([(0,o.MZ)()],u.prototype,"getCollections",void 0),(0,i.Cg)([(0,o.MZ)()],u.prototype,"getChildrenFunction",void 0),(0,i.Cg)([(0,o.MZ)()],u.prototype,"itemFilterFunction",void 0),u=(0,i.Cg)([(0,l.$)("esri.core.CollectionFlattener")],u)},46140:(e,t,r)=>{r.d(t,{R:()=>s});var i=r(49186);let s=class e{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new i.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new e(this.major,this.minor,this._context)}static parse(t,r=""){const[s,n]=t.split("."),o=/^\s*\d+\s*$/;if(!s?.match||!o.test(s))throw new i.A((r&&r+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:t});if(!n?.match||!o.test(n))throw new i.A((r&&r+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:t});const l=parseInt(s,10),a=parseInt(n,10);return new e(l,a,r)}}},50498:(e,t,r)=>{r.d(t,{Ye:()=>h,gy:()=>c,yR:()=>p});var i=r(66552),s=r(5443),n=r(91075),o=r(48526),l=r(86738),a=r(39829),u=r(82799);const c=(0,i.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),h=(0,i.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"}),p={base:n.A,key:"type",typeMap:{extent:s.A,multipoint:o.A,point:l.A,polyline:u.A,polygon:a.A}}},52106:(e,t,r)=>{r.d(t,{A:()=>F});var i,s=r(31635),n=r(37838),o=r(69540),l=r(51447),a=r(25482),u=r(53966),c=r(36708),h=r(24326),p=r(10107),d=(r(44208),r(87811),r(40608)),y=r(12195),f=r(65864),m=r(50498),g=r(55156),b=r(60950),v=r(54339),_=r(33910);function w(e){if(null==e)return null;const t={};for(const r in e){const i=e[r];i&&(t[r]=i.toJSON())}return 0!==Object.keys(t).length?t:null}let F=class extends((0,o.OU)(a.o)){static{i=this}constructor(e){super(e),this.isAggregate=!1,this.layer=null,this.origin=null,this.sourceLayer=null,this._version=0,Object.defineProperty(this,"uid",{value:(0,h.c)(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&(0,l.eF)(u.A.getLogger(this),"Graphic",{version:"4.30"})}initialize(){this._watchMeshGeometryChanges()}set aggregateGeometries(e){const t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}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),"mesh"!==e?.type&&this._notifyLayer("geometry",t,e))}set popupTemplate(e){const t=this._get("popupTemplate");t!==e&&(this._set("popupTemplate",e),this._notifyLayer("popupTemplate",t,e))}set symbol(e){const t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}get version(){return this._version}set visible(e){const t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new i({aggregateGeometries:this.aggregateGeometries,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;const t=(0,b.E_)(this.origin);if(t)return t.popupTemplate??(e?t.defaultPopupTemplate:null)??null;const r=this.origin&&"layer"in this.origin?this.origin.layer:null;for(const t of[r,this.sourceLayer,this.layer])if(t&&"object"==typeof t){if("popupTemplate"in t&&t.popupTemplate)return t.popupTemplate;if(e&&"defaultPopupTemplate"in t&&null!=t.defaultPopupTemplate)return t.defaultPopupTemplate}return null}getAttribute(e){return 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}}getObjectId(){const e=(0,g.I)(this.origin);if(e)return(0,v.r)(this,e);const t=this.sourceLayer??this.layer;return t?(0,v.r)(this,t):null}getGlobalId(){const e=(0,g.I)(this.origin);if(e?.globalIdField)return this.getAttribute(e.globalIdField);const t=this.sourceLayer??this.layer;return t&&"globalIdField"in t&&t.globalIdField?this.getAttribute(t.globalIdField):null}toJSON(){return{aggregateGeometries:w(this.aggregateGeometries),geometry:null!=this.geometry?this.geometry.toJSON():null,symbol:null!=this.symbol?this.symbol.toJSON():null,attributes:(0,y.W)(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null}}notifyMeshTransformChanged(e={}){const{geometry:t}=this;if("mesh"===t?.type){const r={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",r,r,e.action)}}_notifyLayer(e,t,r,i){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;const s={graphic:this,property:e,oldValue:t,newValue:r};"origin-transform"===e&&(s.action=i),"attributes"===e&&(s.attributeName=i),this.layer.graphicChanged(s)}_watchMeshGeometryChanges(){this.addHandles([(0,c.z7)(()=>"mesh"===this.geometry?.type&&this.geometry.vertexSpace.origin?{localMatrix:this.geometry.transform?.localMatrix,origin:this.geometry.vertexSpace.origin}:void 0,({localMatrix:e,origin:t})=>{this._lastMeshTransform.localMatrix===e&&this._lastMeshTransform.origin===t||(this._lastMeshTransform.localMatrix=e,this._lastMeshTransform.origin=t,this.notifyMeshTransformChanged())}),(0,c.z7)(()=>"mesh"===this.geometry?.type?{vertexAttributes:this.geometry.vertexAttributes}:void 0,()=>{const e=this.geometry;"mesh"===e?.type&&e.vertexSpace.origin?(this._lastMeshTransform.localMatrix=e.transform?.localMatrix,this._lastMeshTransform.origin=e.vertexSpace.origin):(this._lastMeshTransform.localMatrix=void 0,this._lastMeshTransform.origin=void 0),this._notifyLayer("geometry",this.geometry,this.geometry)},{equals:(e,t)=>e===t,sync:!0})])}};(0,s.Cg)([(0,p.MZ)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const r in e){const i=(0,f.rS)(e[r]);i&&(t[r]=i)}return 0!==Object.keys(t).length?t:null}}})],F.prototype,"aggregateGeometries",null),(0,s.Cg)([(0,p.MZ)({value:null})],F.prototype,"attributes",null),(0,s.Cg)([(0,p.MZ)({value:null,types:m.yR,json:{read:f.rS}})],F.prototype,"geometry",null),(0,s.Cg)([(0,p.MZ)({type:Boolean})],F.prototype,"isAggregate",void 0),(0,s.Cg)([(0,p.MZ)({clonable:!1})],F.prototype,"layer",void 0),(0,s.Cg)([(0,p.MZ)({clonable:"reference"})],F.prototype,"origin",void 0),(0,s.Cg)([(0,p.MZ)({type:n.A,value:null})],F.prototype,"popupTemplate",null),(0,s.Cg)([(0,p.MZ)({clonable:"reference"})],F.prototype,"sourceLayer",void 0),(0,s.Cg)([(0,p.MZ)({value:null,types:_.Es})],F.prototype,"symbol",null),(0,s.Cg)([(0,p.MZ)({clonable:!1,json:{read:!1,write:!1}})],F.prototype,"_version",void 0),(0,s.Cg)([(0,p.MZ)({type:Boolean,value:!0})],F.prototype,"visible",null),F=i=(0,s.Cg)([(0,d.$)("esri.Graphic")],F)},54339:(e,t,r)=>{function i(e,t){switch(t.type){case"object-id":case"unique-id-simple":return e.attributes[t.fieldName];case"unique-id-composite":{const r=[];for(const i of t.fieldNames)r.push(e.attributes[i]??null);return JSON.stringify(r)}}}function s(e,t){if("uniqueIdFields"in t&&t.uniqueIdFields?.length){if(1===t.uniqueIdFields.length)return e.attributes?.[t.uniqueIdFields[0]];const r=t.uniqueIdFields.map(t=>e.attributes?.[t]);return JSON.stringify(r)}return"objectIdField"in t&&t.objectIdField?e.attributes?.[t.objectIdField]:null}r.d(t,{W:()=>i,r:()=>s})},55156:(e,t,r)=>{r.d(t,{I:()=>s,e:()=>i});const i=Symbol("idFieldsProviderSymbol");function s(e){return(t=e)&&i in t?e[i]:void 0;var t}},55674:(e,t,r)=>{r.d(t,{Ad:()=>d,Gj:()=>m,QY:()=>p,lL:()=>g,xR:()=>y});var i=r(66131),s=r(49186),n=(r(44208),r(44729)),o=r(15032),l=r(65864),a=r(95466),u=r(43668),c=r(98623);const h=["geometry","scale","timeProperties"];function p(e,t){if(null!=t)for(const r of h)t.hasArcadeDependency(r)&&e.add(r);return e}function d(e,t){return f.create(e,t,null,["$feature","$view"])}function y(e,t,r){return f.create(e,t,r,["$feature","$view","$config"])}class f{static async create(e,t,r,i){const{arcade:n,Dictionary:o}=await(0,u.l)();let l;try{l=n.parseScript(e)}catch(t){throw new s.A("arcade-bad-expression","Failed to parse arcade script",{script:e,error:t})}const a=n.scriptUsesGeometryEngine(l);a&&await n.enableGeometrySupport(),await n.loadDependentModules(new Set,l,null,!1,a);const c={vars:i.reduce((e,t)=>({...e,[t]:null}),{}),spatialReference:t,useAsync:!1},h=n.compileScript(l,c);let p=null;null!=r&&(p=new o(r),p.immutable=!0);const d=new o;return d.immutable=!1,d.setField("scale",0),new f(e,n,l,h,t,d,p,o)}constructor(e,t,r,i,s,n,o,l){this.script=e,this._arcade=t,this._syntaxTree=r,this._compiled=i,this._spatialReference=s,this._viewDict=n,this._configDict=o,this._dictionaryCtor=l,this._dependencies=new Map,this._featureReader=new m,this._dependencies.set("geometry",t.scriptTouchesGeometry(this._syntaxTree)),this._dependencies.set("scale",this._arcade.referencesMember(this._syntaxTree,"scale")),this._dependencies.set("timeProperties",this._arcade.scriptUsesViewProperties(this._syntaxTree,["timeProperties"]))}evaluate(e,t){const r=t.$view?.timeZone;if(t.$view){let e;if(this._viewDict.setField("scale",t.$view.scale),null!=t.$view.timeProperties){const{currentStart:s,currentEnd:n}=t.$view.timeProperties;e=new this._dictionaryCtor({currentStart:null!=s?null!=r?i.lY.epochToArcadeDate(s,r):i.lY.unknownEpochToArcadeDate(s):void 0,currentEnd:null!=n?null!=r?i.lY.epochToArcadeDate(n,r):i.lY.unknownEpochToArcadeDate(n):void 0,startIncluded:!0,endIncluded:!0})}this._viewDict.setField("timeProperties",e)}return this._compiled({vars:{$view:this._viewDict,$config:this._configDict,$feature:e},spatialReference:this._spatialReference,timeZone:r})}repurposeFeature(e,t){return this._featureReader.bind(e,t,this._spatialReference),this._featureReader}references(e){return this._dependencies.get(e)??!1}}class m{constructor(){this._boundTarget=null,this._boundSchema={fields:null,fieldsIndex:null,spatialReference:null,get geometryType(){return null},get objectIdField(){return null}},this.arcadeDeclaredClass="esri.arcade.Feature",this._contextTimeZone=null}bind(e,t,r){const i=t??new a.A(g(e.attributes));this._boundTarget=e,this._boundSchema.fields=i.fields,this._boundSchema.fieldsIndex=i,this._boundSchema.spatialReference=r}_getField(e){return this._boundSchema.fieldsIndex.get(e)}get contextTimeZone(){return this._contextTimeZone}set contextTimeZone(e){this._contextTimeZone=e}readArcadeFeature(){return this}hasField(e){return this._boundSchema.fieldsIndex.has(e)}geometry(){if("fromJSON"in this._boundTarget)return this._boundTarget.geometry;const e=(0,l.rS)(this._boundTarget.geometry);if(e){if(!this._boundSchema.spatialReference)throw new Error("InternalError: Expected spatial reference to be defined");e.spatialReference=this._boundSchema.spatialReference}return e}isUnknownDateTimeField(e){return this._boundSchema.fieldsIndex.getTimeZone(e)===c.L5}field(e,t=!0){const r=this._getField(e);if(r){const t=this._boundTarget.attributes[r.name];if(null==t)return null;switch(r.type){case"date-only":case"esriFieldTypeDateOnly":return n.n.fromReader(t);case"time-only":case"esriFieldTypeTimeOnly":return o.k.fromReader(t);case"esriFieldTypeTimestampOffset":case"timestamp-offset":return i.lY.fromReaderAsTimeStampOffset(t);case"date":case"esriFieldTypeDate":return this.isUnknownDateTimeField(e)?i.lY.unknownEpochToArcadeDate(t):i.lY.epochToArcadeDate(t,this.contextTimeZone??c.qU);default:return t}}if(t)throw new Error(`Field ${e} does not exist`);return null}setField(e,t){throw new Error("Unable to update feature attribute values, feature is readonly")}keys(){return this._boundSchema.fieldsIndex.fields.map(e=>e.name)}castToText(e=!1){return JSON.stringify(this._boundTarget)}gdbVersion(){return null}fullSchema(){return this._boundSchema}castAsJson(e=null){return{attributes:this._boundTarget.attributes,geometry:!0===e?.keepGeometryType?this.geometry():this.geometry()?.toJSON()??null}}castAsJsonAsync(e=null,t=null){return Promise.resolve(this.castAsJson(t))}}function g(e){const t=[];for(const r in e)t.push({name:r,alias:r,type:"string"==typeof e[r]?"esriFieldTypeString":"esriFieldTypeDouble"});return t}},65494:(e,t,r)=>{r.d(t,{L:()=>a,r:()=>o});var i=r(67076),s=r(90360),n=r(41214);function o(e,t){return a(e,null,t)}const l=(0,s.C)({types:n.Hg});function a(e,t,r){return e?e&&(e.styleName||e.styleUrl)&&"uniqueValue"!==e.type?(r?.messages&&r.messages.push(new i.A("renderer:unsupported","Only UniqueValueRenderer can be referenced from a web style, but found '"+e.type+"'",{definition:e,context:r})),null):l(e,t,r):null}},70328:(e,t,r)=>{r.d(t,{BI:()=>v,DC:()=>h,Ej:()=>d,Ie:()=>g,Jt:()=>b,Ne:()=>y,RF:()=>c,aI:()=>w,fA:()=>o,gE:()=>a,hZ:()=>m,iT:()=>p,is:()=>_,qv:()=>F,vI:()=>f,vY:()=>l,v_:()=>M,vt:()=>n,w1:()=>u});var i=r(5443),s=(r(19419),r(4197));function n(e=M){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function o(e,t,r,i,s,o,l=n()){return l[0]=e,l[1]=t,l[2]=r,l[3]=i,l[4]=s,l[5]=o,l}function l(e,t=n()){return function(e,t,r,i=n()){return m(i,F),function(e,t,r=0,i=t.length/3){let s=e[0],n=e[1],o=e[2],l=e[3],a=e[4],u=e[5];for(let e=0;e<i;e++)s=Math.min(s,t[r+3*e]),n=Math.min(n,t[r+3*e+1]),o=Math.min(o,t[r+3*e+2]),l=Math.max(l,t[r+3*e]),a=Math.max(a,t[r+3*e+1]),u=Math.max(u,t[r+3*e+2]);e[0]=s,e[1]=n,e[2]=o,e[3]=l,e[4]=a,e[5]=u}(i,e,t,r),i}(e,0,e.length/3,t)}function a(e,t=(0,s.jh)(24)){const[r,i,n,o,l,a]=e;return t[0]=r,t[1]=i,t[2]=n,t[3]=r,t[4]=i,t[5]=a,t[6]=r,t[7]=l,t[8]=n,t[9]=r,t[10]=l,t[11]=a,t[12]=o,t[13]=i,t[14]=n,t[15]=o,t[16]=i,t[17]=a,t[18]=o,t[19]=l,t[20]=n,t[21]=o,t[22]=l,t[23]=a,t}function u(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new i.A(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function c(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function h(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[3]=Math.max(e[3],t[2]),e[4]=Math.max(e[4],t[3])}function p(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function d(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function y(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function f(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function m(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function g(e){return e?m(e,F):n(F)}function b(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function v(e,t,r,i,s){return e[0]=t,e[1]=r,e[2]=Number.NEGATIVE_INFINITY,e[3]=i,e[4]=s,e[5]=Number.POSITIVE_INFINITY,e}function _(e){return 6===e.length}function w(e,t,r){if(null==e||null==t)return e===t;if(!_(e)||!_(t))return!1;if(r){for(let i=0;i<e.length;i++)if(!r(e[i],t[i]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}const F=[1/0,1/0,1/0,-1/0,-1/0,-1/0],M=[0,0,0,0,0,0];n()},73681:(e,t,r)=>{r.d(t,{n:()=>a});var i=r(49186),s=r(53966),n=r(46140),o=r(95466),l=r(55674);class a{static async from(e,t,r){const o=e.dictionary_version?n.R.parse(e.dictionary_version):null,c=new Set(e.itemsNames),h={};if(t)for(const e in t)h[e]=t[e];if(e.authoringInfo.configuration)for(const t of e.authoringInfo.configuration)h.hasOwnProperty(t.name)||(h[t.name]=t.value);const p=new Set(e.authoringInfo.symbol);for(const e of Object.keys(r))p.delete(e);p.size&&s.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("missing-fields: fieldMap entries for the following symbol fields are missing",{symbolFields:p});const d=await(0,l.xR)(e.expression,null,h);if(!d)throw new i.A("dictionary-renderer:expression-error","Unable to create dictionary renderer expression");const y=!o||!o.greaterEqual(4,0);y&&s.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("Dictionary script does not support native field types. Applying fallback",{version:o});const f=new u(r,y);return new a(y,c,d,f)}constructor(e,t,r,i){this._requiresFieldCoercionToString=e,this._itemNames=t,this._compiled=r,this._reader=i}get itemNames(){return this._itemNames}evaluate(e,t,r,i){try{return this._reader.bind(e,r,i),this._compiled.evaluate(this._reader,{$view:{scale:t}})}catch(e){s.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("arcade: dictionary script evaluation failed",{error:e})}return null}createDictionaryFieldsIndex(e){if(!this._requiresFieldCoercionToString)return new o.A(e);const t=e.map(e=>({...e,type:"esriFieldTypeString"}));return new o.A(t)}}class u extends l.Gj{constructor(e,t){super(),this._fieldMap=e,this._requiresFieldCoercionToString=t}_getField(e){const t=this._fieldMap[e]??e;return this._boundSchema.fieldsIndex.get(t)}field(e){if(!this._requiresFieldCoercionToString)return super.field(e,!1);const t=this._getField(e);return null==t||null==this._boundTarget.attributes[t.name]?"":""+this._boundTarget.attributes[t.name]}}},89808:(e,t,r)=>{r.d(t,{Q:()=>i});const i=Symbol("getSliceableSymbol")},95466:(e,t,r)=>{r.d(t,{A:()=>d});var i=r(49186),s=r(53966),n=r(91869),o=r(3330),l=r(12195),a=r(30524),u=r(98623),c=r(56400),h=r(96285);const p=new Map;class d{static fromJSON(e){return new d(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new d(e.fields??[],g(e))}static fromLayerJSON(e){return new d(e.fields??[],g(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const r=[];for(const e of this.fields){const t=e?.name,i=f(t);if(t&&i){const s=y(t);this._fieldsMap.set(t,e),this._fieldsMap.set(s,e),this._normalizedFieldsMap.set(i,e),r.push(`${s}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,a.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,a.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,a.te)(e)||(0,a.Xz)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}r.sort(),this.uid=r.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,a.te)(e)||(0,a.Xz)(e)||e.nullable||void 0!==(0,a.lD)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(y(e))??this._normalizedFieldsMap.get(f(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(s.A.getLogger("esri.layers.support.FieldsIndex").errorOnce(new i.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.n$):m.has(t.type)?u.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u.L5?o.GB.instance:t===u.n$?h.mQ.utcInstance:(0,n.tE)(p,t,()=>h.oh.create(t)):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,a.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map(e=>(0,l.W)(e)?e.toJSON():e),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function y(e){return e.trim().toLowerCase()}function f(e){return(0,a.rS)(e)?.toLowerCase()??""}const m=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function g(e){const t=new Map;if(!e.fields)return t;const r=!0===e.datesInUnknownTimezone,{timeInfo:i,editFieldsInfo:s}=e,n=(i?"startField"in i?i.startField:i.startTimeField:"")??"",o=(i?"endField"in i?i.endField:i.endTimeField:"")??"",l=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,c.ZS)(e.dateFieldsTimeReference):null,a=s?function(e){return"timeZone"in e}(s)?s.timeZone??l:s.dateFieldsTimeReference?(0,c.ZS)(s.dateFieldsTimeReference):l??u.n$:null,h=i?function(e){return"timeZone"in e}(i)?i.timeZone??l:i.timeReference?(0,c.ZS)(i.timeReference):l:null,p=new Map([[y(s?.creationDateField??""),a],[y(s?.editDateField??""),a],[y(n),h],[y(o),h]]);for(const{name:i,type:s}of e.fields)if(m.has(s))t.set(i,u.L5);else if("date"!==s&&"esriFieldTypeDate"!==s)t.set(i,null);else if(r)t.set(i,u.L5);else{const e=p.get(y(i??""))??l;t.set(i,e)}return t}},96576:(e,t,r)=>{r.d(t,{A:()=>p});var i,s=r(31635),n=r(4718),o=r(10107),l=(r(44208),r(53966),r(93223)),a=r(40608),u=r(92438),c=r(63988),h=r(49849);let p=i=class extends((0,c.h)(u.A)){constructor(e){super(e),this.description=null,this.label=null,this.symbol=null,this.type="simple"}async collectRequiredFields(e,t){await Promise.all([this.collectSymbolFields(e,t),this.collectVVRequiredFields(e,t)])}async collectSymbolFields(e,t){await Promise.all(this.symbols.map(r=>r.collectRequiredFields(e,t)))}getSymbol(e,t){return this.symbol}async getSymbolAsync(e,t){return this.symbol}get symbols(){return this.symbol?[this.symbol]:[]}getAttributeHash(){return this.visualVariables?.reduce((e,t)=>e+t.getAttributeHash(),"")??""}getMeshHash(){return this.symbols.reduce((e,t)=>e+JSON.stringify(t),"")}get arcadeRequired(){return this.arcadeRequiredForVisualVariables}clone(){return new i({description:this.description,label:this.label,symbol:(0,n.o8)(this.symbol),visualVariables:(0,n.o8)(this.visualVariables),authoringInfo:(0,n.o8)(this.authoringInfo)})}};(0,s.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],p.prototype,"description",void 0),(0,s.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],p.prototype,"label",void 0),(0,s.Cg)([(0,o.MZ)(h.Wp)],p.prototype,"symbol",void 0),(0,s.Cg)([(0,l.e)({simple:"simple"})],p.prototype,"type",void 0),p=i=(0,s.Cg)([(0,a.$)("esri.renderers.SimpleRenderer")],p)},99959:(e,t,r)=>{r.d(t,{A:()=>n});var i=r(31635),s=(r(53966),r(44208),r(87811),r(49186),r(40608));let n=class{};n=(0,i.Cg)([(0,s.$)("esri.graphic.GraphicOrigin")],n)}}]);
|