@arcgis/core 4.27.0-next.20230521 → 4.27.0-next.20230522
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Graphic.js +1 -1
- package/arcade/featureset/actions/SpatialFilter.js +1 -1
- package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
- package/arcade/featureset/sources/FeatureLayerMemory.js +1 -1
- package/arcade/featureset/sources/FeatureLayerRelated.js +1 -1
- package/arcade/functions/featuresetbase.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/0d02856e55d20b99fc8b.js +1 -0
- package/assets/esri/core/workers/chunks/{69242c66492717c7388c.js → 0fcb8d408696075338e2.js} +1 -1
- package/assets/esri/core/workers/chunks/{1edc5c06874cb12c5478.js → 17f313e548281bb5db3e.js} +1 -1
- package/assets/esri/core/workers/chunks/{b91c155de9a89e4e6971.js → 187c3b971ed0fc4363ef.js} +1 -1
- package/assets/esri/core/workers/chunks/{85c6ce93aa41e6b65997.js → 18db07d739a713cc0465.js} +1 -1
- package/assets/esri/core/workers/chunks/28286014a575042619ee.js +1 -0
- package/assets/esri/core/workers/chunks/{692dfeb2e255fdc0ade2.js → 39288fa69561d21f04f8.js} +1 -1
- package/assets/esri/core/workers/chunks/{2b9d3e60977934a6d471.js → 3bc6b5f0643364749ef8.js} +1 -1
- package/assets/esri/core/workers/chunks/45e5ad704d18dd0857ce.js +1 -0
- package/assets/esri/core/workers/chunks/{62d9d15f0d00a75da42c.js → 4670b17ae2ed3c13d344.js} +1 -1
- package/assets/esri/core/workers/chunks/4d24efa01d1accc5a5f0.js +1 -0
- package/assets/esri/core/workers/chunks/52575f021a14dd961de8.js +1 -0
- package/assets/esri/core/workers/chunks/{6312783626bacf52df7a.js → 55486c644e8b01326a0d.js} +1 -1
- package/assets/esri/core/workers/chunks/5576858f56314afcb4d5.js +1 -0
- package/assets/esri/core/workers/chunks/5a4c04bf4f57e74457c5.js +1 -0
- package/assets/esri/core/workers/chunks/70d6e5edf05ef7079fa8.js +1 -0
- package/assets/esri/core/workers/chunks/71bdf8f10aee0077f681.js +1 -0
- package/assets/esri/core/workers/chunks/72b2c3c8e76da699690c.js +1 -0
- package/assets/esri/core/workers/chunks/78ce0b1af62435d8ebf4.js +1 -0
- package/assets/esri/core/workers/chunks/791f529e90135398b3d5.js +1 -0
- package/assets/esri/core/workers/chunks/8d3abfe6fdc5ac8d6cb7.js +1 -0
- package/assets/esri/core/workers/chunks/96d339abcd917f1f0ae1.js +1 -0
- package/assets/esri/core/workers/chunks/97cdbec7532cfcdf9ad2.js +1 -0
- package/assets/esri/core/workers/chunks/{f3f6035a17f7dcd19675.js → 9ab400a89dd701778d2c.js} +1 -1
- package/assets/esri/core/workers/chunks/{1488b3d48232844b8bb4.js → 9fe349f43d5ff5a4ac2d.js} +1 -1
- package/assets/esri/core/workers/chunks/{22396dd3717d17a5d235.js → a1c31bb8c12831539328.js} +1 -1
- package/assets/esri/core/workers/chunks/b4e2dc6b3d06b426e596.js +1 -0
- package/assets/esri/core/workers/chunks/{48abcb2d88f22e6e9fde.js → c2cb9fa18c77f0c5104e.js} +1 -1
- package/assets/esri/core/workers/chunks/cad7a2092ea7f51dbd8b.js +1 -0
- package/assets/esri/core/workers/chunks/d725dbbdeb05322e6d88.js +1 -0
- package/assets/esri/core/workers/chunks/df3e497d12ed77bae168.js +1 -0
- package/assets/esri/core/workers/chunks/{4d5f71d84c85f45c97ea.js → ed6f6e539a915ba9e64d.js} +1 -1
- package/assets/esri/core/workers/chunks/fb080339bfaf32731ca6.js +1 -0
- package/assets/esri/themes/base/_core.scss +2 -0
- package/assets/esri/themes/base/widgets/_FloorFilter.scss +6 -0
- package/assets/esri/themes/base/widgets/_UtilityNetworkValidateTopology.scss +40 -0
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ar.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_bg.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_bs.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ca.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_cs.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_da.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_de.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_el.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_es.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_et.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_fi.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_fr.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_he.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_hr.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_hu.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_id.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_it.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ja.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ko.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_lt.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_lv.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_nb.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_nl.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_pl.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_pt-BR.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_pt-PT.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ro.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ru.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_sk.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_sl.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_sr.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_sv.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_th.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_tr.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_uk.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_vi.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_zh-CN.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_zh-HK.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_zh-TW.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_en.json +1 -1
- package/chunks/mat4.js +1 -1
- package/core/accessorSupport/write.js +1 -1
- package/core/fontUtils.js +1 -1
- package/core/libs/gl-matrix-2/math/mat4.js +1 -1
- package/geometry/Mesh.js +1 -1
- package/geometry/support/MeshGeoreferencedRelativeVertexSpace.d.ts +4 -0
- package/geometry/support/MeshGeoreferencedRelativeVertexSpace.js +5 -0
- package/geometry/support/MeshGeoreferencedVertexSpace.d.ts +4 -0
- package/geometry/support/MeshGeoreferencedVertexSpace.js +5 -0
- package/geometry/support/MeshLocalVertexSpace.d.ts +4 -0
- package/geometry/support/MeshLocalVertexSpace.js +5 -0
- package/geometry/support/MeshTransform.d.ts +4 -0
- package/geometry/support/MeshTransform.js +1 -1
- package/geometry/support/meshUtils/ElevationSamplerWorker.js +1 -1
- package/geometry/support/meshUtils/centerAt.js +1 -1
- package/geometry/support/meshUtils/exporters/gltf/geometry.js +1 -1
- package/geometry/support/meshUtils/exporters/gltf/gltf.js +1 -1
- package/geometry/support/meshUtils/geographicUtils.js +1 -1
- package/geometry/support/meshUtils/georeference.js +1 -1
- package/geometry/support/meshUtils/loadGLTFMesh.js +1 -1
- package/geometry/support/meshUtils/merge.js +1 -1
- package/geometry/support/meshUtils/offset.js +1 -1
- package/geometry/support/meshUtils/primitives.js +1 -1
- package/geometry/support/meshUtils/rotate.js +1 -1
- package/geometry/support/meshUtils/scale.js +1 -1
- package/interfaces.d.ts +227 -1
- package/layers/VoxelWasmPerSceneView.js +1 -1
- package/layers/graphics/data/attributeSupport.js +1 -1
- package/layers/graphics/sources/FeatureLayerSource.js +1 -1
- package/networks/support/TopologyValidationJobInfo.js +1 -1
- package/package.json +1 -1
- package/popup/FieldInfo.js +1 -1
- package/portal/Portal.js +1 -1
- package/rest/support/FeatureSet.js +1 -1
- package/rest/support/meshFeatureSet.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/cimAnalyzer.js +1 -1
- package/views/3d/environment/EnvironmentRenderer.js +1 -1
- package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
- package/views/3d/interactive/editingTools/meshFastUpdateUtils.js +1 -1
- package/views/3d/interactive/editingTools/moveGraphic/GraphicMoveTool.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/GraphicTransformTool.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/ScaleRotateMeshAdapter.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/undoRecords.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshObject3DGraphicLayer.js +1 -1
- package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
- package/views/3d/layers/i3s/I3SOverrides.js +1 -1
- package/views/3d/state/utils/navigationUtils.js +1 -1
- package/views/3d/support/DisplayQualityProfile.js +1 -1
- package/views/3d/support/QualitySettings.js +1 -1
- package/views/3d/webgl-engine/lib/Camera.js +1 -1
- package/views/3d/webgl-engine/lib/RenderFeature.js +1 -1
- package/views/3d/webgl-engine/lib/RenderPluginManager.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/TextRenderParameters.js +1 -1
- package/views/interactive/dragEventPipeline.js +1 -1
- package/widgets/BasemapGallery/support/PortalBasemapsSource.js +1 -1
- package/widgets/Editor/Edits.js +1 -1
- package/widgets/Editor/Upload.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Feature/support/featureUtils.js +1 -1
- package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
- package/widgets/UtilityNetworkValidateTopology/UtilityNetworkValidateTopologyViewModel.js +5 -0
- package/widgets/UtilityNetworkValidateTopology.js +5 -0
- package/assets/esri/core/workers/chunks/163bf2e13abbdd298374.js +0 -1
- package/assets/esri/core/workers/chunks/23f73f81aea461c0c6e6.js +0 -1
- package/assets/esri/core/workers/chunks/2640204c4655aa535ccb.js +0 -1
- package/assets/esri/core/workers/chunks/2bf42d060f877566b989.js +0 -1
- package/assets/esri/core/workers/chunks/34ec9623a1bece86a82b.js +0 -1
- package/assets/esri/core/workers/chunks/3bf52139340827794c3b.js +0 -1
- package/assets/esri/core/workers/chunks/52d02021e858820bc4fa.js +0 -1
- package/assets/esri/core/workers/chunks/64b8f65e2ef6cbf08380.js +0 -1
- package/assets/esri/core/workers/chunks/78aede1e114deefacb54.js +0 -1
- package/assets/esri/core/workers/chunks/7ef100158ca28631fcaf.js +0 -1
- package/assets/esri/core/workers/chunks/93ad67930aa7d4a4b0ac.js +0 -1
- package/assets/esri/core/workers/chunks/964795dfb57f0d0635d0.js +0 -1
- package/assets/esri/core/workers/chunks/99ce0a202dcd3d7dc290.js +0 -1
- package/assets/esri/core/workers/chunks/abe6c99a1a719543dbe8.js +0 -1
- package/assets/esri/core/workers/chunks/c3bf44146fddfe8990f7.js +0 -1
- package/assets/esri/core/workers/chunks/cbe817e966b57599bafd.js +0 -1
- package/assets/esri/core/workers/chunks/e15b5d7e46a834eacc57.js +0 -1
- package/assets/esri/core/workers/chunks/e1e0b3580e2c3098c9f4.js +0 -1
- package/assets/esri/core/workers/chunks/e305d20e4424451cab5b.js +0 -1
- package/assets/esri/core/workers/chunks/e6836c84470fb6bd25bf.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[938,5732],{5732:(e,t,r)=>{r.d(t,{c:()=>s,g:()=>i});var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},57435:(e,t,r)=>{r.d(t,{Z:()=>u});var s=r(43697),i=r(46791),o=(r(20102),r(92604),r(26258),r(87538)),n=r(5600),a=r(52011);let l=class extends i.Z{constructor(e){super(e),this.getCollections=null}initialize(){this.own((0,o.EH)((()=>this._refresh())))}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,this.length)}_createNewInstance(e){return new i.Z(e)}_processCollection(e,t){if(!t)return e;const r=this.itemFilterFunction??(e=>!!e);for(const s of t)if(s){if(r(s)){const t=this.indexOf(s,e);t>=0?t!==e&&this.reorder(s,e):this.add(s,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(s);if(Array.isArray(t))for(const r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};(0,s._)([(0,n.Cb)()],l.prototype,"getCollections",void 0),(0,s._)([(0,n.Cb)()],l.prototype,"getChildrenFunction",void 0),(0,s._)([(0,n.Cb)()],l.prototype,"itemFilterFunction",void 0),l=(0,s._)([(0,a.j)("esri.core.CollectionFlattener")],l);const u=l},68668:(e,t,r)=>{r.d(t,{G:()=>n,w:()=>a});var s=r(66643),i=r(46791),o=r(83379);async function n(e,t){return await e.load(),a(e,t)}async function a(e,t){const r=[],n=(...e)=>{for(const t of e)null!=t&&(Array.isArray(t)?n(...t):i.Z.isCollection(t)?t.forEach((e=>n(e))):o.Z.isLoadable(t)&&r.push(t))};t(n);let a=null;if(await(0,s.UI)(r,(async e=>{const t=await(0,s.q6)(function(e){return"loadAll"in e&&"function"==typeof e.loadAll}(e)?e.loadAll():e.load());!1!==t.ok||a||(a=t)})),a)throw a.error;return e}},42033:(e,t,r)=>{async function s(e,t){const{WhereClause:s}=await r.e(1534).then(r.bind(r,41534));return s.create(e,t)}function i(e,t){return null!=e?null!=t?`(${e}) AND (${t})`:e:t}r.d(t,{E:()=>s,_:()=>i})},49735:(e,t,r)=>{r.d(t,{Z:()=>I});var s=r(43697),i=r(92036),o=r(20102),n=r(80442),a=r(95330),l=r(81271),u=r(5600),p=(r(75215),r(67676),r(52011)),d=r(2981),c=r(10158),y=r(11282),h=r(41818),f=(r(66577),r(34599)),b=r(14165),m=r(6570),g=r(5396),S=r(4967),v=r(53261),_=r(74889);let w=class extends i.Z{constructor(e){super(e),this.dynamicDataSource=null,this.fieldsIndex=null,this.gdbVersion=null,this.infoFor3D=null,this.pbfSupported=!1,this.queryAttachmentsSupported=!1,this.sourceSpatialReference=null,this.url=null}get parsedUrl(){return(0,l.mN)(this.url)}async execute(e,t){const r=await this.executeJSON(e,t);return this.featureSetFromJSON(e,r,t)}async executeJSON(e,t){const r=this._normalizeQuery(e),s=null!=e.outStatistics?.[0],i=(0,n.Z)("featurelayer-pbf-statistics"),o=!s||i;let a;if(this.pbfSupported&&o)try{a=await(0,v.t)(this.url,r,t)}catch(e){if("query:parsing-pbf"!==e.name)throw e;this.pbfSupported=!1}return this.pbfSupported&&o||(a=await(0,S.F)(this.url,r,t)),this._normalizeFields(a.fields),a}async featureSetFromJSON(e,t,s){if(!this._queryIs3DObjectFormat(e)||null==this.infoFor3D||!t.features)return _.Z.fromJSON(t);const{meshFeatureSetFromJSON:i}=await(0,a.Hl)(Promise.all([r.e(6481),r.e(6459),r.e(7697)]).then(r.bind(r,87697)),s);return i(e,this.infoFor3D,t)}executeForCount(e,t){return(0,h.P)(this.url,this._normalizeQuery(e),t)}executeForExtent(e,t){return async function(e,t,r){const s=(0,y.en)(e);return(0,f.Vr)(s,b.Z.from(t),{...r}).then((e=>({count:e.data.count,extent:m.Z.fromJSON(e.data.extent)})))}(this.url,this._normalizeQuery(e),t)}executeForIds(e,t){return(0,g.G)(this.url,this._normalizeQuery(e),t)}async executeRelationshipQuery(e,t){const[{default:s},{executeRelationshipQuery:i}]=await(0,a.Hl)(Promise.all([r.e(5935).then(r.bind(r,75935)),r.e(1073).then(r.bind(r,81073))]),t);return e=s.from(e),(this.gdbVersion||this.dynamicDataSource)&&((e=e.clone()).gdbVersion=e.gdbVersion||this.gdbVersion,e.dynamicDataSource=e.dynamicDataSource||this.dynamicDataSource),i(this.url,e,t)}async executeRelationshipQueryForCount(e,t){const[{default:s},{executeRelationshipQueryForCount:i}]=await(0,a.Hl)(Promise.all([r.e(5935).then(r.bind(r,75935)),r.e(1073).then(r.bind(r,81073))]),t);return e=s.from(e),(this.gdbVersion||this.dynamicDataSource)&&((e=e.clone()).gdbVersion=e.gdbVersion||this.gdbVersion,e.dynamicDataSource=e.dynamicDataSource||this.dynamicDataSource),i(this.url,e,t)}async executeAttachmentQuery(e,t){const{executeAttachmentQuery:s,fetchAttachments:i,processAttachmentQueryResult:o}=await(0,a.Hl)(r.e(540).then(r.bind(r,30540)),t),n=(0,y.en)(this.url);return o(n,await(this.queryAttachmentsSupported?s(n,e,t):i(n,e,t)))}async executeTopFeaturesQuery(e,t){const{executeTopFeaturesQuery:s}=await(0,a.Hl)(r.e(1158).then(r.bind(r,71158)),t);return s(this.parsedUrl,e,this.sourceSpatialReference,t)}async executeForTopIds(e,t){const{executeForTopIds:s}=await(0,a.Hl)(r.e(3992).then(r.bind(r,33992)),t);return s(this.parsedUrl,e,t)}async executeForTopExtents(e,t){const{executeForTopExtents:s}=await(0,a.Hl)(r.e(1790).then(r.bind(r,21790)),t);return s(this.parsedUrl,e,t)}async executeForTopCount(e,t){const{executeForTopCount:s}=await(0,a.Hl)(r.e(4371).then(r.bind(r,14371)),t);return s(this.parsedUrl,e,t)}_normalizeQuery(e){let t=b.Z.from(e);t.sourceSpatialReference=t.sourceSpatialReference||this.sourceSpatialReference,(this.gdbVersion||this.dynamicDataSource)&&(t=t===e?t.clone():t,t.gdbVersion=e.gdbVersion||this.gdbVersion,t.dynamicDataSource=e.dynamicDataSource?c.n.from(e.dynamicDataSource):this.dynamicDataSource);const{infoFor3D:r}=this;if(null!=r&&this._queryIs3DObjectFormat(e)){t=t===e?t.clone():t,t.formatOf3DObjects=null;const{supportedFormats:s,queryFormats:i}=r,n=(0,d.S0)("model/gltf-binary",s)??(0,d.Ow)("glb",s),a=(0,d.S0)("model/gltf+json",s)??(0,d.Ow)("gtlf",s);for(const e of i){if(e===n){t.formatOf3DObjects=e;break}e!==a||t.formatOf3DObjects||(t.formatOf3DObjects=e)}if(!t.formatOf3DObjects)throw new o.Z("query:unsupported-3d-query-formats","Could not find any supported 3D object query format. Only supported formats are 3D_glb and 3D_gltf");if(null==t.outFields||!t.outFields.includes("*")){t=t===e?t.clone():t,null==t.outFields&&(t.outFields=[]);const{originX:s,originY:i,originZ:o,translationX:n,translationY:a,translationZ:l,scaleX:u,scaleY:p,scaleZ:d,rotationX:c,rotationY:y,rotationZ:h,rotationDeg:f}=r.transformFieldRoles;t.outFields.push(s,i,o,n,a,l,u,p,d,c,y,h,f)}}return t}_normalizeFields(e){if(null!=this.fieldsIndex&&null!=e)for(const t of e){const e=this.fieldsIndex.get(t.name);e&&Object.assign(t,e.toJSON())}}_queryIs3DObjectFormat(e){return null!=this.infoFor3D&&!0===e.returnGeometry&&"xyFootprint"!==e.multipatchOption&&!e.outStatistics}};(0,s._)([(0,u.Cb)({type:c.n})],w.prototype,"dynamicDataSource",void 0),(0,s._)([(0,u.Cb)()],w.prototype,"fieldsIndex",void 0),(0,s._)([(0,u.Cb)()],w.prototype,"gdbVersion",void 0),(0,s._)([(0,u.Cb)()],w.prototype,"infoFor3D",void 0),(0,s._)([(0,u.Cb)({readOnly:!0})],w.prototype,"parsedUrl",null),(0,s._)([(0,u.Cb)()],w.prototype,"pbfSupported",void 0),(0,s._)([(0,u.Cb)()],w.prototype,"queryAttachmentsSupported",void 0),(0,s._)([(0,u.Cb)()],w.prototype,"sourceSpatialReference",void 0),(0,s._)([(0,u.Cb)({type:String})],w.prototype,"url",void 0),w=(0,s._)([(0,p.j)("esri.tasks.QueryTask")],w);const I=w},54295:(e,t,r)=>{r.d(t,{V:()=>n});var s=r(43697),i=r(5600),o=(r(75215),r(67676),r(80442),r(52011));const n=e=>{let t=class extends e{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,s._)([(0,i.Cb)({type:String})],t.prototype,"apiKey",null),t=(0,s._)([(0,o.j)("esri.layers.mixins.APIKeyMixin")],t),t}},7944:(e,t,r)=>{r.d(t,{O:()=>g});var s=r(43697),i=r(3172),o=r(30175),n=r(95330),a=r(81271),l=r(23670),u=r(5600),p=(r(75215),r(67676),r(80442),r(71715)),d=r(52011),c=r(31263),y=r(6570),h=r(82971),f=r(66677),b=r(21506),m=r(14661);const g=e=>{let t=class extends e{constructor(){super(...arguments),this.capabilities=void 0,this.copyright=null,this.fullExtent=null,this.legendEnabled=!0,this.spatialReference=null,this.version=void 0,this._allLayersAndTablesMap=null}readCapabilities(e,t){const r=t.capabilities&&t.capabilities.split(",").map((e=>e.toLowerCase().trim()));if(!r)return{operations:{supportsExportMap:!1,supportsExportTiles:!1,supportsIdentify:!1,supportsQuery:!1,supportsTileMap:!1},exportMap:null,exportTiles:null};const s=this.type,i="tile"!==s&&!!t.supportsDynamicLayers,o=r.includes("query"),n=r.includes("map"),a=!!t.exportTilesAllowed,u=r.includes("tilemap"),p=r.includes("data"),d="tile"!==s&&(!t.tileInfo||i),c="tile"!==s&&(!t.tileInfo||i),y="tile"!==s,h=t.cimVersion&&l.G.parse(t.cimVersion),f=h?.since(1,4)??!1,b=h?.since(2,0)??!1;return{operations:{supportsExportMap:n,supportsExportTiles:a,supportsIdentify:o,supportsQuery:p,supportsTileMap:u},exportMap:n?{supportsArcadeExpressionForLabeling:f,supportsSublayersChanges:y,supportsDynamicLayers:i,supportsSublayerVisibility:d,supportsSublayerDefinitionExpression:c,supportsCIMSymbols:b}:null,exportTiles:a?{maxExportTilesCount:+t.maxExportTilesCount}:null}}readVersion(e,t){let r=t.currentVersion;return r||(r=t.hasOwnProperty("capabilities")||t.hasOwnProperty("tables")?10:t.hasOwnProperty("supportedImageFormatTypes")?9.31:9.3),r}async fetchRelatedService(e){const t=this.portalItem;if(!t||!(0,m.Fj)(t))return null;this._relatedFeatureServicePromise||(this._relatedFeatureServicePromise=t.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},e).then((e=>e.find((e=>"Feature Service"===e.type))??null),(()=>null)));const r=await this._relatedFeatureServicePromise;return(0,n.k_)(e),r?{itemId:r.id,url:r.url}:null}async fetchSublayerInfo(e,t){const{source:r}=e;if(this?.portalItem&&"tile"===this.type&&"map-layer"===r?.type&&(0,m.Fj)(this.portalItem)&&e.originIdOf("url")<c.s3.SERVICE){const s=await this.fetchRelatedService(t);s&&(e.url=(0,a.v_)(s.url,r.mapLayerId.toString()),e.layerItemId=s.itemId)}const{url:s}=e;let o;if("data-layer"===r.type)o=(await(0,i.default)(s,{responseType:"json",query:{f:"json",...this.customParameters,token:this.apiKey},...t})).data;else if(s&&e.originIdOf("url")>c.s3.SERVICE)try{o=(await this._fetchAllLayersAndTablesFromService(s)).get(r.mapLayerId)}catch{}else{let s=e.id;"map-layer"===r?.type&&(s=r.mapLayerId);try{o=(await this.fetchAllLayersAndTables(t)).get(s)}catch{}}return o}async fetchAllLayersAndTables(e){return this._fetchAllLayersAndTablesFromService(this.parsedUrl?.path,e)}async _fetchAllLayersAndTablesFromService(e,t){await this.load(t),this._allLayersAndTablesMap||=new Map;const r=(0,f.Qc)(e),s=(0,o.s1)(this._allLayersAndTablesMap,r?.url.path,(()=>(0,i.default)((0,a.v_)(r?.url.path,"/layers"),{responseType:"json",query:{f:"json",...this.customParameters,token:this.apiKey}}).then((e=>{const t=new Map;for(const r of e.data.layers)t.set(r.id,r);return{result:t}}),(e=>({error:e}))))),l=await s;if((0,n.k_)(t),"result"in l)return l.result;throw l.error}};return(0,s._)([(0,u.Cb)({readOnly:!0})],t.prototype,"capabilities",void 0),(0,s._)([(0,p.r)("service","capabilities",["capabilities","exportTilesAllowed","maxExportTilesCount","supportsDynamicLayers","tileInfo"])],t.prototype,"readCapabilities",null),(0,s._)([(0,u.Cb)({json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,s._)([(0,u.Cb)({type:y.Z})],t.prototype,"fullExtent",void 0),(0,s._)([(0,u.Cb)(b.id)],t.prototype,"id",void 0),(0,s._)([(0,u.Cb)({type:Boolean,json:{origins:{service:{read:{enabled:!1}}},read:{source:"showLegend"},write:{target:"showLegend"}}})],t.prototype,"legendEnabled",void 0),(0,s._)([(0,u.Cb)(b.C_)],t.prototype,"popupEnabled",void 0),(0,s._)([(0,u.Cb)({type:h.Z})],t.prototype,"spatialReference",void 0),(0,s._)([(0,u.Cb)({readOnly:!0})],t.prototype,"version",void 0),(0,s._)([(0,p.r)("version",["currentVersion","capabilities","tables","supportedImageFormatTypes"])],t.prototype,"readVersion",null),t=(0,s._)([(0,d.j)("esri.layers.mixins.ArcGISMapService")],t),t}},10343:(e,t,r)=>{r.d(t,{x:()=>g});var s=r(43697),i=r(46791),o=r(57435),n=r(20102),a=r(92604),l=r(17445),u=r(5600),p=(r(75215),r(67676),r(80442),r(1153)),d=r(52011),c=r(31263),y=r(49867),h=r(32073);const f=a.Z.getLogger("esri.layers.TileLayer"),b=i.Z.ofType(y.Z);function m(e,t){e&&e.forEach((e=>{t(e),e.sublayers&&e.sublayers.length&&m(e.sublayers,t)}))}const g=e=>{let t=class extends e{constructor(...e){super(...e),this.allSublayers=new o.Z({getCollections:()=>[this.sublayers],getChildrenFunction:e=>e.sublayers}),this.sublayersSourceJSON={[c.s3.SERVICE]:{},[c.s3.PORTAL_ITEM]:{},[c.s3.WEB_SCENE]:{},[c.s3.WEB_MAP]:{}},this.addHandles((0,l.YP)((()=>this.sublayers),((e,t)=>this._handleSublayersChange(e,t)),l.Z_))}destroy(){this.allSublayers.destroy()}readSublayers(e,t){if(!t||!e)return;const{sublayersSourceJSON:r}=this,s=(0,c.M9)(t.origin);if(s<c.s3.SERVICE)return;if(r[s]={context:t,visibleLayers:e.visibleLayers||r[s].visibleLayers,layers:e.layers||r[s].layers},s>c.s3.SERVICE)return;this._set("serviceSublayers",this.createSublayersForOrigin("service").sublayers);const{sublayers:i,origin:o}=this.createSublayersForOrigin("web-document"),n=(0,p.vw)(this);n.setDefaultOrigin(o),this._set("sublayers",new b(i)),n.setDefaultOrigin("user")}findSublayerById(e){return this.allSublayers.find((t=>t.id===e))}createServiceSublayers(){return this.createSublayersForOrigin("service").sublayers}createSublayersForOrigin(e){const t=(0,c.M9)("web-document"===e?"web-map":e);let r=c.s3.SERVICE,s=this.sublayersSourceJSON[c.s3.SERVICE].layers,i=this.sublayersSourceJSON[c.s3.SERVICE].context,o=null;const n=[c.s3.PORTAL_ITEM,c.s3.WEB_SCENE,c.s3.WEB_MAP].filter((e=>e<=t));for(const e of n){const t=this.sublayersSourceJSON[e];(0,h.ac)(t.layers)&&(r=e,s=t.layers,i=t.context,t.visibleLayers&&(o={visibleLayers:t.visibleLayers,context:t.context}))}const a=[c.s3.PORTAL_ITEM,c.s3.WEB_SCENE,c.s3.WEB_MAP].filter((e=>e>r&&e<=t));let l=null;for(const e of a){const{layers:t,visibleLayers:r,context:s}=this.sublayersSourceJSON[e];t&&(l={layers:t,context:s}),r&&(o={visibleLayers:r,context:s})}const u=function(e,t){const r=[],s={};return e?(e.forEach((e=>{const i=new y.Z;if(i.read(e,t),s[i.id]=i,null!=e.parentLayerId&&-1!==e.parentLayerId){const t=s[e.parentLayerId];t.sublayers||(t.sublayers=[]),t.sublayers.unshift(i)}else r.unshift(i)})),r):r}(s,i),p=new Map,d=new Set;if(l)for(const e of l.layers)p.set(e.id,e);if(o?.visibleLayers)for(const e of o.visibleLayers)d.add(e);return m(u,(e=>{l&&e.read(p.get(e.id),l.context),o&&e.read({defaultVisibility:d.has(e.id)},o.context)})),{origin:(0,c.x3)(r),sublayers:new b({items:u})}}read(e,t){super.read(e,t),this.readSublayers(e,t)}_handleSublayersChange(e,t){t&&(t.forEach((e=>{e.parent=null,e.layer=null})),this.removeHandles("sublayers-owner")),e&&(e.forEach((e=>{e.parent=this,e.layer=this})),this.addHandles([e.on("after-add",(({item:e})=>{e.parent=this,e.layer=this})),e.on("after-remove",(({item:e})=>{e.parent=null,e.layer=null}))],"sublayers-owner"),"tile"===this.type&&this.addHandles(e.on("before-changes",(e=>{f.error(new n.Z("tilelayer:sublayers-non-modifiable","ISublayer can't be added, moved, or removed from the layer's sublayers",{layer:this})),e.preventDefault()})),"sublayers-owner"))}};return(0,s._)([(0,u.Cb)({readOnly:!0})],t.prototype,"allSublayers",void 0),(0,s._)([(0,u.Cb)({readOnly:!0,type:i.Z.ofType(y.Z)})],t.prototype,"serviceSublayers",void 0),(0,s._)([(0,u.Cb)({value:null,type:b,json:{read:!1,write:{allowNull:!0,ignoreOrigin:!0}}})],t.prototype,"sublayers",void 0),(0,s._)([(0,u.Cb)({readOnly:!0})],t.prototype,"sublayersSourceJSON",void 0),t=(0,s._)([(0,d.j)("esri.layers.mixins.SublayersOwner")],t),t}},70082:(e,t,r)=>{r.d(t,{Z:()=>d});var s=r(43697),i=r(2368),o=r(35454),n=r(96674),a=r(5600),l=(r(75215),r(67676),r(80442),r(52011));const u=new o.X({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let p=class extends((0,i.J)(n.wq)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,s._)([(0,a.Cb)({json:{write:!0}})],p.prototype,"name",void 0),(0,s._)([(0,a.Cb)({json:{write:!0}})],p.prototype,"description",void 0),(0,s._)([(0,a.Cb)({json:{read:u.read,write:u.write}})],p.prototype,"drawingTool",void 0),(0,s._)([(0,a.Cb)({json:{write:!0}})],p.prototype,"prototype",void 0),(0,s._)([(0,a.Cb)({json:{write:!0}})],p.prototype,"thumbnail",void 0),p=(0,s._)([(0,l.j)("esri.layers.support.FeatureTemplate")],p);const d=p},56765:(e,t,r)=>{r.d(t,{Z:()=>p});var s,i=r(43697),o=r(46791),n=r(96674),a=r(5600),l=(r(75215),r(67676),r(80442),r(52011));let u=s=class extends n.wq{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new o.Z}clone(){return new s({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,i._)([(0,a.Cb)({type:String,json:{write:!0}})],u.prototype,"floorField",void 0),(0,i._)([(0,a.Cb)({json:{read:!1,write:!1}})],u.prototype,"viewAllMode",void 0),(0,i._)([(0,a.Cb)({json:{read:!1,write:!1}})],u.prototype,"viewAllLevelIds",void 0),u=s=(0,i._)([(0,l.j)("esri.layers.support.LayerFloorInfo")],u);const p=u},49867:(e,t,r)=>{r.d(t,{Z:()=>K});var s,i=r(43697),o=(r(66577),r(51773)),n=(r(16050),r(12501),r(28756),r(92271),r(72529),r(5499),r(84382),r(81571),r(91423),r(32400)),a=r(3172),l=r(9790),u=r(46791),p=r(20102),d=r(3920),c=r(80442),y=r(10699),h=r(22974),f=r(83379),b=r(92604),m=r(16453),g=r(42033),S=r(81271),v=r(5600),_=r(90578),w=r(71715),I=r(52011),C=r(30556),F=r(75215),x=r(31263),E=r(1153),T=r(49735),A=r(16451),O=r(1231),D=r(99514),P=r(54306),L=r(30707),R=r(56765),M=r(72064),j=r(10158),V=r(42843),Z=r(56545),Q=r(14165),q=r(32163),N=r(6570),k=r(86973);function G(e){return null!=e&&"esriSMS"===e.type}function B(e,t,r){const s=this.originIdOf(t)>=(0,x.M9)(r.origin);return{ignoreOrigin:!0,allowNull:s,enabled:!!r&&"map-image"===r.layer?.type&&(r.writeSublayerStructure||s)}}function U(e,t,r){return{enabled:!!r&&"tile"===r.layer?.type&&(r.origin&&this.originIdOf(t)>=(0,x.M9)(r.origin)||this._isOverridden(t))}}function z(e,t,r){return{ignoreOrigin:!0,enabled:r&&r.writeSublayerStructure||!1}}function H(e,t,r){return{ignoreOrigin:!0,enabled:!!r&&(r.writeSublayerStructure||this.originIdOf(t)>=(0,x.M9)(r.origin))}}let J=0;const W=new Set;W.add("layer"),W.add("parent"),W.add("loaded"),W.add("loadStatus"),W.add("loadError"),W.add("loadWarnings");let $=s=class extends((0,d.p)((0,m.R)((0,y.IG)(f.Z)))){constructor(e){super(e),this.capabilities=void 0,this.fields=null,this.fullExtent=null,this.geometryType=null,this.globalIdField=null,this.legendEnabled=!0,this.objectIdField=null,this.parent=null,this.popupEnabled=!0,this.popupTemplate=null,this.sourceJSON=null,this.title=null,this.typeIdField=null,this.types=null,this._lastParsedUrl=null}async load(e){return this.addResolvingPromise((async()=>{const{layer:t,url:r}=this;if(!t&&!r)throw new p.Z("sublayer:missing-layer","Sublayer can't be loaded without being part of a layer",{sublayer:this});const s=t?await t.fetchSublayerInfo(this,e):(await(0,a.default)(r,{responseType:"json",query:{f:"json"},...e})).data;s&&(this.sourceJSON=s,this.read({layerDefinition:s},{origin:"service"}))})()),this}readCapabilities(e,t){t=t.layerDefinition||t;const{operations:{supportsQuery:r,supportsQueryAttachments:s},query:{supportsFormatPBF:i},data:{supportsAttachment:o}}=(0,M.h)(t,this.url);return{exportMap:{supportsModification:!!t.canModifyLayer},operations:{supportsQuery:r,supportsQueryAttachments:s},data:{supportsAttachment:o},query:{supportsFormatPBF:i}}}get defaultPopupTemplate(){return this.createPopupTemplate()}set definitionExpression(e){this._setAndNotifyLayer("definitionExpression",e)}get effectiveScaleRange(){const{minScale:e,maxScale:t}=this;return{minScale:e,maxScale:t}}get fieldsIndex(){return new D.Z(this.fields||[])}set floorInfo(e){this._setAndNotifyLayer("floorInfo",e)}readGlobalIdFieldFromService(e,t){if((t=t.layerDefinition||t).globalIdField)return t.globalIdField;if(t.fields)for(const e of t.fields)if("esriFieldTypeGlobalID"===e.type)return e.name}get id(){return this._get("id")??J++}set id(e){this._get("id")!==e&&(!1!==this.layer?.capabilities?.exportMap?.supportsDynamicLayers?this._set("id",e):this._logLockedError("id","capability not available 'layer.capabilities.exportMap.supportsDynamicLayers'"))}set labelingInfo(e){this._setAndNotifyLayer("labelingInfo",e)}writeLabelingInfo(e,t,r,s){e&&e.length&&(t.layerDefinition={drawingInfo:{labelingInfo:e.map((e=>e.write({},s)))}})}set labelsVisible(e){this._setAndNotifyLayer("labelsVisible",e)}set layer(e){this._set("layer",e),this.sublayers&&this.sublayers.forEach((t=>t.layer=e))}set listMode(e){this._set("listMode",e)}set minScale(e){this._setAndNotifyLayer("minScale",e)}readMinScale(e,t){return t.minScale||t.layerDefinition&&t.layerDefinition.minScale||0}set maxScale(e){this._setAndNotifyLayer("maxScale",e)}readMaxScale(e,t){return t.maxScale||t.layerDefinition&&t.layerDefinition.maxScale||0}readObjectIdFieldFromService(e,t){if((t=t.layerDefinition||t).objectIdField)return t.objectIdField;if(t.fields)for(const e of t.fields)if("esriFieldTypeOID"===e.type)return e.name}set opacity(e){this._setAndNotifyLayer("opacity",e)}readOpacity(e,t){const r=t.layerDefinition;return 1-.01*((null!=r?.transparency?r.transparency:r?.drawingInfo?.transparency)??0)}writeOpacity(e,t,r,s){t.layerDefinition={drawingInfo:{transparency:100-100*e}}}writeParent(e,t){this.parent&&this.parent!==this.layer?t.parentLayerId=(0,F.vU)(this.parent.id):t.parentLayerId=-1}get queryTask(){if(!this.layer)return null;const{spatialReference:e}=this.layer,t="gdbVersion"in this.layer?this.layer.gdbVersion:void 0,{capabilities:r,fieldsIndex:s}=this,i=(0,c.Z)("featurelayer-pbf")&&r?.query.supportsFormatPBF,o=r?.operations?.supportsQueryAttachments??!1;return new T.Z({url:this.url,pbfSupported:i,fieldsIndex:s,gdbVersion:t,sourceSpatialReference:e,queryAttachmentsSupported:o})}set renderer(e){if(e)for(const t of e.getSymbols())if((0,l.dU)(t)){b.Z.getLogger(this).warn("Sublayer renderer should use 2D symbols");break}this._setAndNotifyLayer("renderer",e)}get source(){return this._get("source")||new V.R({mapLayerId:this.id})}set source(e){this._setAndNotifyLayer("source",e)}set sublayers(e){this._handleSublayersChange(e,this._get("sublayers")),this._set("sublayers",e)}castSublayers(e){return(0,F.se)(u.Z.ofType(s),e)}writeSublayers(e,t,r){this.sublayers?.length&&(t[r]=this.sublayers.map((e=>e.id)).toArray().reverse())}readTypeIdField(e,t){let r=(t=t.layerDefinition||t).typeIdField;if(r&&t.fields){r=r.toLowerCase();const e=t.fields.find((e=>e.name.toLowerCase()===r));e&&(r=e.name)}return r}get url(){const e=this.layer?.parsedUrl??this._lastParsedUrl,t=this.source;if(!e)return null;if(this._lastParsedUrl=e,"map-layer"===t?.type)return`${e.path}/${t.mapLayerId}`;const r={layer:JSON.stringify({source:this.source})};return`${e.path}/dynamicLayer?${(0,S.B7)(r)}`}set url(e){this._overrideIfSome("url",e)}set visible(e){this._setAndNotifyLayer("visible",e)}writeVisible(e,t,r,s){t[r]=this.getAtOrigin("defaultVisibility","service")||e}clone(){const{store:e}=(0,E.vw)(this),t=new s;return(0,E.vw)(t).store=e.clone(W),this.commitProperty("url"),t._lastParsedUrl=this._lastParsedUrl,t}createPopupTemplate(e){return(0,q.eZ)(this,e)}createQuery(){return new Q.Z({returnGeometry:!0,where:this.definitionExpression||"1=1"})}async createFeatureLayer(){if(this.hasOwnProperty("sublayers"))return null;const{layer:e}=this,t=e?.parsedUrl,s=new(0,(await Promise.all([r.e(6404),r.e(4646),r.e(9238),r.e(5049)]).then(r.bind(r,19238))).default)({url:t?.path});return t&&this.source&&("map-layer"===this.source.type?s.layerId=this.source.mapLayerId:s.dynamicDataSource=this.source),null!=e?.refreshInterval&&(s.refreshInterval=e.refreshInterval),this.definitionExpression&&(s.definitionExpression=this.definitionExpression),this.floorInfo&&(s.floorInfo=(0,h.d9)(this.floorInfo)),this.originIdOf("labelingInfo")>x.s3.SERVICE&&(s.labelingInfo=(0,h.d9)(this.labelingInfo)),this.originIdOf("labelsVisible")>x.s3.DEFAULTS&&(s.labelsVisible=this.labelsVisible),this.originIdOf("legendEnabled")>x.s3.DEFAULTS&&(s.legendEnabled=this.legendEnabled),this.originIdOf("visible")>x.s3.DEFAULTS&&(s.visible=this.visible),this.originIdOf("minScale")>x.s3.DEFAULTS&&(s.minScale=this.minScale),this.originIdOf("maxScale")>x.s3.DEFAULTS&&(s.maxScale=this.maxScale),this.originIdOf("opacity")>x.s3.DEFAULTS&&(s.opacity=this.opacity),this.originIdOf("popupTemplate")>x.s3.DEFAULTS&&(s.popupTemplate=(0,h.d9)(this.popupTemplate)),this.originIdOf("renderer")>x.s3.SERVICE&&(s.renderer=(0,h.d9)(this.renderer)),"data-layer"===this.source?.type&&(s.dynamicDataSource=this.source.clone()),this.originIdOf("title")>x.s3.DEFAULTS&&(s.title=this.title),"map-image"===e?.type&&e.originIdOf("customParameters")>x.s3.DEFAULTS&&(s.customParameters=e.customParameters),"tile"===e?.type&&e.originIdOf("customParameters")>x.s3.DEFAULTS&&(s.customParameters=e.customParameters),s}getField(e){return this.fieldsIndex.get(e)}getFeatureType(e){const{typeIdField:t,types:r}=this;if(!t||!e)return null;const s=e.attributes?e.attributes[t]:void 0;if(null==s)return null;let i=null;return r?.some((e=>{const{id:t}=e;return null!=t&&(t.toString()===s.toString()&&(i=e),!!i)})),i}getFieldDomain(e,t){const r=t&&t.feature,s=this.getFeatureType(r);if(s){const t=s.domains&&s.domains[e];if(t&&"inherited"!==t.type)return t}return this._getLayerDomain(e)}async queryAttachments(e,t){await this.load(),e=Z.Z.from(e);const r=this.capabilities;if(!r?.data?.supportsAttachment)throw new p.Z("queryAttachments:not-supported","this layer doesn't support attachments");const{attachmentTypes:s,objectIds:i,globalIds:o,num:n,size:a,start:l,where:u}=e;if(!r?.operations?.supportsQueryAttachments&&(s?.length>0||o?.length>0||a?.length>0||n||l||u))throw new p.Z("queryAttachments:option-not-supported","when 'capabilities.operations.supportsQueryAttachments' is false, only objectIds is supported",e);if(!(i?.length||o?.length||u))throw new p.Z("queryAttachments:invalid-query","'objectIds', 'globalIds', or 'where' are required to perform attachment query",e);return this.queryTask.executeAttachmentQuery(e,t)}async queryFeatures(e=this.createQuery(),t){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new p.Z("queryFeatures:not-supported","this layer doesn't support queries.");if(!this.url)throw new p.Z("queryFeatures:not-supported","this layer has no url.");const r=await this.queryTask.execute(e,{...t,query:{...this.layer?.customParameters,token:this.layer?.apiKey}});if(r?.features)for(const e of r.features)e.sourceLayer=this;return r}toExportImageJSON(e){const t={id:this.id,source:this.source?.toJSON()||{mapLayerId:this.id,type:"mapLayer"}},r=(0,g._)(e,this.definitionExpression);null!=r&&(t.definitionExpression=r);const s=["renderer","labelingInfo","opacity","labelsVisible"].reduce(((e,t)=>(e[t]=this.originIdOf(t),e)),{}),i=Object.keys(s).some((e=>s[e]>x.s3.SERVICE));if(i){const e=t.drawingInfo={};if(s.renderer>x.s3.SERVICE&&(e.renderer=this.renderer?this.renderer.toJSON():null),s.labelsVisible>x.s3.SERVICE&&(e.showLabels=this.labelsVisible),this.labelsVisible&&s.labelingInfo>x.s3.SERVICE){!this.loaded&&this.labelingInfo.some((e=>!e.labelPlacement))&&b.Z.getLogger(this).warnOnce(`A Sublayer (title: ${this.title}, id: ${this.id}) has an undefined 'labelPlacement' and so labels cannot be displayed. Either define a valid 'labelPlacement' or call Sublayer.load() to use a default value based on geometry type.`,{sublayer:this});let t=this.labelingInfo;null!=this.geometryType&&(t=(0,L.a)(this.labelingInfo,k.M.toJSON(this.geometryType))),e.labelingInfo=t.filter((e=>e.labelPlacement)).map((e=>e.toJSON({origin:"service",layer:this.layer}))),e.showLabels=!0}s.opacity>x.s3.SERVICE&&(e.transparency=100-100*this.opacity),this._assignDefaultSymbolColors(e.renderer)}return t}_assignDefaultSymbolColors(e){this._forEachSimpleMarkerSymbols(e,(e=>{e.color||"esriSMSX"!==e.style&&"esriSMSCross"!==e.style||(e.outline&&e.outline.color?e.color=e.outline.color:e.color=[0,0,0,0])}))}_forEachSimpleMarkerSymbols(e,t){if(e){const r=("uniqueValueInfos"in e?e.uniqueValueInfos:"classBreakInfos"in e?e.classBreakInfos:null)??[];for(const e of r)G(e.symbol)&&t(e.symbol);"symbol"in e&&G(e.symbol)&&t(e.symbol),"defaultSymbol"in e&&G(e.defaultSymbol)&&t(e.defaultSymbol)}}_setAndNotifyLayer(e,t){const r=this.layer,s=this._get(e);let i,o;switch(e){case"definitionExpression":case"floorInfo":i="supportsSublayerDefinitionExpression";break;case"minScale":case"maxScale":case"visible":i="supportsSublayerVisibility";break;case"labelingInfo":case"labelsVisible":case"opacity":case"renderer":case"source":i="supportsDynamicLayers",o="supportsModification"}const n=(0,E.vw)(this).getDefaultOrigin();if("service"!==n){if(i&&!1===this.layer?.capabilities?.exportMap?.[i])return void this._logLockedError(e,`capability not available 'layer.capabilities.exportMap.${i}'`);if(o&&!1===this.capabilities?.exportMap[o])return void this._logLockedError(e,`capability not available 'capabilities.exportMap.${o}'`)}"source"!==e||"not-loaded"===this.loadStatus?(this._set(e,t),"service"!==n&&s!==t&&r&&r.emit&&r.emit("sublayer-update",{propertyName:e,target:this})):this._logLockedError(e,"'source' can't be changed after calling sublayer.load()")}_handleSublayersChange(e,t){t&&(t.forEach((e=>{e.parent=null,e.layer=null})),this.handles.removeAll()),e&&(e.forEach((e=>{e.parent=this,e.layer=this.layer})),this.handles.add([e.on("after-add",(({item:e})=>{e.parent=this,e.layer=this.layer})),e.on("after-remove",(({item:e})=>{e.parent=null,e.layer=null})),e.on("before-changes",(e=>{const t=this.layer?.capabilities?.exportMap?.supportsSublayersChanges;null==t||t||(b.Z.getLogger(this).error(new p.Z("sublayer:sublayers-non-modifiable","Sublayer can't be added, moved, or removed from the layer's sublayers",{sublayer:this,layer:this.layer})),e.preventDefault())}))]))}_logLockedError(e,t){const{layer:r,declaredClass:s}=this;b.Z.getLogger(s).error(new p.Z("sublayer:locked",`Property '${String(e)}' can't be changed on Sublayer from the layer '${r?.id}'`,{reason:t,sublayer:this,layer:r}))}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}};$.test={isMapImageLayerOverridePolicy:e=>e===z||e===B,isTileImageLayerOverridePolicy:e=>e===U},(0,i._)([(0,v.Cb)({readOnly:!0})],$.prototype,"capabilities",void 0),(0,i._)([(0,w.r)("service","capabilities",["layerDefinition.canModifyLayer","layerDefinition.capabilities"])],$.prototype,"readCapabilities",null),(0,i._)([(0,v.Cb)()],$.prototype,"defaultPopupTemplate",null),(0,i._)([(0,v.Cb)({type:String,value:null,json:{name:"layerDefinition.definitionExpression",write:{allowNull:!0,overridePolicy:B}}})],$.prototype,"definitionExpression",null),(0,i._)([(0,v.Cb)({readOnly:!0})],$.prototype,"effectiveScaleRange",null),(0,i._)([(0,v.Cb)({type:[O.Z],json:{origins:{service:{read:{source:"layerDefinition.fields"}}}}})],$.prototype,"fields",void 0),(0,i._)([(0,v.Cb)({readOnly:!0})],$.prototype,"fieldsIndex",null),(0,i._)([(0,v.Cb)({type:R.Z,value:null,json:{name:"layerDefinition.floorInfo",read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo",overridePolicy:B},origins:{"web-scene":{read:!1,write:!1}}}})],$.prototype,"floorInfo",null),(0,i._)([(0,v.Cb)({type:N.Z,json:{read:{source:"layerDefinition.extent"}}})],$.prototype,"fullExtent",void 0),(0,i._)([(0,v.Cb)({type:k.M.apiValues,json:{origins:{service:{name:"layerDefinition.geometryType",read:{reader:k.M.read}}}}})],$.prototype,"geometryType",void 0),(0,i._)([(0,v.Cb)({type:String})],$.prototype,"globalIdField",void 0),(0,i._)([(0,w.r)("service","globalIdField",["layerDefinition.globalIdField","layerDefinition.fields"])],$.prototype,"readGlobalIdFieldFromService",null),(0,i._)([(0,v.Cb)({type:F.z8,json:{write:{ignoreOrigin:!0}}})],$.prototype,"id",null),(0,i._)([(0,v.Cb)({value:null,type:[P.Z],json:{read:{source:"layerDefinition.drawingInfo.labelingInfo"},write:{target:"layerDefinition.drawingInfo.labelingInfo",overridePolicy:z}}})],$.prototype,"labelingInfo",null),(0,i._)([(0,C.c)("labelingInfo")],$.prototype,"writeLabelingInfo",null),(0,i._)([(0,v.Cb)({type:Boolean,value:!0,json:{read:{source:"layerDefinition.drawingInfo.showLabels"},write:{target:"layerDefinition.drawingInfo.showLabels",overridePolicy:z}}})],$.prototype,"labelsVisible",null),(0,i._)([(0,v.Cb)({value:null})],$.prototype,"layer",null),(0,i._)([(0,v.Cb)({type:String,json:{write:{overridePolicy:U}}})],$.prototype,"layerItemId",void 0),(0,i._)([(0,v.Cb)({type:Boolean,value:!0,json:{origins:{service:{read:{enabled:!1}}},read:{source:"showLegend"},write:{target:"showLegend",overridePolicy:H}}})],$.prototype,"legendEnabled",void 0),(0,i._)([(0,v.Cb)({type:["show","hide","hide-children"],value:"show",json:{read:!1,write:!1,origins:{"web-scene":{read:!0,write:!0}}}})],$.prototype,"listMode",null),(0,i._)([(0,v.Cb)({type:Number,value:0,json:{write:{overridePolicy:z}}})],$.prototype,"minScale",null),(0,i._)([(0,w.r)("minScale",["minScale","layerDefinition.minScale"])],$.prototype,"readMinScale",null),(0,i._)([(0,v.Cb)({type:Number,value:0,json:{write:{overridePolicy:z}}})],$.prototype,"maxScale",null),(0,i._)([(0,w.r)("maxScale",["maxScale","layerDefinition.maxScale"])],$.prototype,"readMaxScale",null),(0,i._)([(0,v.Cb)({type:String})],$.prototype,"objectIdField",void 0),(0,i._)([(0,w.r)("service","objectIdField",["layerDefinition.objectIdField","layerDefinition.fields"])],$.prototype,"readObjectIdFieldFromService",null),(0,i._)([(0,v.Cb)({type:Number,value:1,json:{write:{target:"layerDefinition.drawingInfo.transparency",overridePolicy:z}}})],$.prototype,"opacity",null),(0,i._)([(0,w.r)("opacity",["layerDefinition.drawingInfo.transparency","layerDefinition.transparency"])],$.prototype,"readOpacity",null),(0,i._)([(0,C.c)("opacity")],$.prototype,"writeOpacity",null),(0,i._)([(0,v.Cb)({json:{type:F.z8,write:{target:"parentLayerId",writerEnsuresNonNull:!0,overridePolicy:z}}})],$.prototype,"parent",void 0),(0,i._)([(0,C.c)("parent")],$.prototype,"writeParent",null),(0,i._)([(0,v.Cb)({type:Boolean,value:!0,json:{read:{source:"disablePopup",reader:(e,t)=>!t.disablePopup},write:{target:"disablePopup",overridePolicy:H,writer(e,t,r){t[r]=!e}}}})],$.prototype,"popupEnabled",void 0),(0,i._)([(0,v.Cb)({type:o.Z,json:{read:{source:"popupInfo"},write:{target:"popupInfo",overridePolicy:H}}})],$.prototype,"popupTemplate",void 0),(0,i._)([(0,v.Cb)({readOnly:!0})],$.prototype,"queryTask",null),(0,i._)([(0,v.Cb)({types:n.A,value:null,json:{name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:z},origins:{"web-scene":{types:n.o,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:z}}}}})],$.prototype,"renderer",null),(0,i._)([(0,v.Cb)({types:{key:"type",base:null,typeMap:{"data-layer":j.n,"map-layer":V.R}},cast(e){if(e){if("mapLayerId"in e)return(0,F.TJ)(V.R,e);if("dataSource"in e)return(0,F.TJ)(j.n,e)}return e},json:{name:"layerDefinition.source",write:{overridePolicy:z}}})],$.prototype,"source",null),(0,i._)([(0,v.Cb)()],$.prototype,"sourceJSON",void 0),(0,i._)([(0,v.Cb)({value:null,json:{type:[F.z8],write:{target:"subLayerIds",allowNull:!0,overridePolicy:z}}})],$.prototype,"sublayers",null),(0,i._)([(0,_.p)("sublayers")],$.prototype,"castSublayers",null),(0,i._)([(0,C.c)("sublayers")],$.prototype,"writeSublayers",null),(0,i._)([(0,v.Cb)({type:String,json:{name:"name",write:{overridePolicy:H}}})],$.prototype,"title",void 0),(0,i._)([(0,v.Cb)({type:String})],$.prototype,"typeIdField",void 0),(0,i._)([(0,w.r)("typeIdField",["layerDefinition.typeIdField"])],$.prototype,"readTypeIdField",null),(0,i._)([(0,v.Cb)({type:[A.Z],json:{origins:{service:{read:{source:"layerDefinition.types"}}}}})],$.prototype,"types",void 0),(0,i._)([(0,v.Cb)({type:String,json:{name:"layerUrl",write:{overridePolicy:U}}})],$.prototype,"url",null),(0,i._)([(0,v.Cb)({type:Boolean,value:!0,json:{read:{source:"defaultVisibility"},write:{target:"defaultVisibility",overridePolicy:z}}})],$.prototype,"visible",null),(0,i._)([(0,C.c)("visible")],$.prototype,"writeVisible",null),$=s=(0,i._)([(0,I.j)("esri.layers.support.Sublayer")],$);const K=$},90082:(e,t,r)=>{r.d(t,{V:()=>n,g:()=>o});var s=r(20102),i=r(95330);async function o(e,t,r){let o;try{o=await createImageBitmap(e)}catch(e){throw new s.Z("request:server",`Unable to load ${t}`,{url:t,error:e})}return(0,i.k_)(r),o}async function n(e,t,r,o,n){let a;try{a=await createImageBitmap(e)}catch(e){throw new s.Z("request:server",`Unable to load tile ${t}/${r}/${o}`,{error:e,level:t,row:r,col:o})}return(0,i.k_)(n),a}},2981:(e,t,r)=>{r.d(t,{$6:()=>p,Ow:()=>o,S0:()=>i,d1:()=>n});const s=[["binary","application/octet-stream","bin",""]];function i(e,t){return l(function(e,t){return a(t).find((t=>u(t)===e))}(e,t))}function o(e,t){return l(function(e,t){const r=e.toLowerCase();return a(t).find((e=>function(e){return e?.[2].split(",")??[]}(e).some((e=>r.endsWith(e)))))}(e,t))}function n(e,t){return u(function(e,t){return a(t).find((t=>l(t)===e))}(e,t))}function a(e){return[...s,...e]}function l(e){return e?.[0]}function u(e){return e?.[1]}function p(e){return e.tables?.find((e=>"assetMaps"===e.role))}},72064:(e,t,r)=>{r.d(t,{h:()=>d});var s=r(80442),i=r(66677);const o={name:"supportsName",size:"supportsSize",contentType:"supportsContentType",keywords:"supportsKeywords",exifInfo:"supportsExifInfo"};function n(e,t,r){return!!l(e,t,r)}function a(e,t,r){return l(e,t,r)}function l(e,t,r){return e&&e.hasOwnProperty(t)?e[t]:r}function u(e){const t=e?.supportedSpatialAggregationStatistics?.map((e=>e.toLowerCase()));return{envelope:!!t?.includes("envelopeaggregate"),centroid:!!t?.includes("centroidaggregate"),convexHull:!!t?.includes("convexhullaggregate")}}function p(e,t){const r=e?.supportedOperationsWithCacheHint?.map((e=>e.toLowerCase()));return!!r?.includes(t.toLowerCase())}function d(e,t){return{analytics:c(e),attachment:y(e),data:h(e),metadata:f(e),operations:b(e.capabilities,e,t),query:m(e,t),queryRelated:g(e),queryTopFeatures:S(e),editing:v(e)}}function c(e){return{supportsCacheHint:p(e.advancedQueryCapabilities,"queryAnalytics")}}function y(e){const t=e.attachmentProperties,r={supportsName:!1,supportsSize:!1,supportsContentType:!1,supportsKeywords:!1,supportsExifInfo:!1,supportsCacheHint:p(e.advancedQueryCapabilities,"queryAttachments"),supportsResize:n(e,"supportsAttachmentsResizing",!1)};return t&&Array.isArray(t)&&t.forEach((e=>{const t=o[e.name];t&&(r[t]=!!e.isEnabled)})),r}function h(e){return{isVersioned:n(e,"isDataVersioned",!1),supportsAttachment:n(e,"hasAttachments",!1),supportsM:n(e,"hasM",!1),supportsZ:n(e,"hasZ",!1)}}function f(e){return{supportsAdvancedFieldProperties:n(e,"supportsFieldDescriptionProperty",!1)}}function b(e,t,r){const s=e?e.toLowerCase().split(",").map((e=>e.trim())):[],o=r?(0,i.Qc)(r):null,a=s.includes(null!=o&&"MapServer"===o.serverType?"data":"query"),l=s.includes("editing")&&!t.datesInUnknownTimezone;let u=l&&s.includes("create"),p=l&&s.includes("delete"),d=l&&s.includes("update");const c=s.includes("changetracking"),y=t.advancedQueryCapabilities;return l&&!(u||p||d)&&(u=p=d=!0),{supportsCalculate:n(t,"supportsCalculate",!1),supportsTruncate:n(t,"supportsTruncate",!1),supportsValidateSql:n(t,"supportsValidateSql",!1),supportsAdd:u,supportsDelete:p,supportsEditing:l,supportsChangeTracking:c,supportsQuery:a,supportsQueryAnalytics:n(y,"supportsQueryAnalytic",!1),supportsQueryAttachments:n(y,"supportsQueryAttachments",!1),supportsQueryTopFeatures:n(y,"supportsTopFeaturesQuery",!1),supportsResizeAttachments:n(t,"supportsAttachmentsResizing",!1),supportsSync:s.includes("sync"),supportsUpdate:d,supportsExceedsLimitStatistics:n(t,"supportsExceedsLimitStatistics",!1)}}function m(e,t){const r=e.advancedQueryCapabilities,o=e.ownershipBasedAccessControlForFeatures,l=e.archivingInfo,d=e.currentVersion,c=t?.includes("MapServer"),y=!c||d>=(0,s.Z)("mapserver-pbf-version-support"),h=(0,i.M8)(t),f=new Set((e.supportedQueryFormats??"").split(",").map((e=>e.toLowerCase().trim())));return{supportsStatistics:n(r,"supportsStatistics",e.supportsStatistics),supportsPercentileStatistics:n(r,"supportsPercentileStatistics",!1),supportsSpatialAggregationStatistics:n(r,"supportsSpatialAggregationStatistics",!1),supportedSpatialAggregationStatistics:u(r),supportsCentroid:n(r,"supportsReturningGeometryCentroid",!1),supportsDistance:n(r,"supportsQueryWithDistance",!1),supportsDistinct:n(r,"supportsDistinct",e.supportsAdvancedQueries),supportsExtent:n(r,"supportsReturningQueryExtent",!1),supportsGeometryProperties:n(r,"supportsReturningGeometryProperties",!1),supportsHavingClause:n(r,"supportsHavingClause",!1),supportsOrderBy:n(r,"supportsOrderBy",e.supportsAdvancedQueries),supportsPagination:n(r,"supportsPagination",!1),supportsQuantization:n(e,"supportsCoordinatesQuantization",!1),supportsQuantizationEditMode:n(e,"supportsQuantizationEditMode",!1),supportsQueryGeometry:n(e,"supportsReturningQueryGeometry",!1),supportsResultType:n(r,"supportsQueryWithResultType",!1),supportsMaxRecordCountFactor:n(r,"supportsMaxRecordCountFactor",!1),supportsSqlExpression:n(r,"supportsSqlExpression",!1),supportsStandardizedQueriesOnly:n(e,"useStandardizedQueries",!1),supportsTopFeaturesQuery:n(r,"supportsTopFeaturesQuery",!1),supportsQueryByOthers:n(o,"allowOthersToQuery",!0),supportsHistoricMoment:n(l,"supportsQueryWithHistoricMoment",!1),supportsFormatPBF:y&&f.has("pbf"),supportsDisjointSpatialRelationship:n(r,"supportsDisjointSpatialRel",!1),supportsCacheHint:n(r,"supportsQueryWithCacheHint",!1)||p(r,"query"),supportsDefaultSpatialReference:n(r,"supportsDefaultSR",!1),supportsCompactGeometry:h,supportsFullTextSearch:n(r,"supportsFullTextSearch",!1),maxRecordCountFactor:a(e,"maxRecordCountFactor",void 0),maxRecordCount:a(e,"maxRecordCount",void 0),standardMaxRecordCount:a(e,"standardMaxRecordCount",void 0),tileMaxRecordCount:a(e,"tileMaxRecordCount",void 0)}}function g(e){const t=e.advancedQueryCapabilities,r=n(t,"supportsAdvancedQueryRelated",!1);return{supportsPagination:n(t,"supportsQueryRelatedPagination",!1),supportsCount:r,supportsOrderBy:r,supportsCacheHint:p(t,"queryRelated")}}function S(e){return{supportsCacheHint:p(e.advancedQueryCapabilities,"queryTopFilter")}}function v(e){const t=e.ownershipBasedAccessControlForFeatures,r=e?e.advancedEditingCapabilities:void 0;return{supportsGeometryUpdate:n(e,"allowGeometryUpdates",!0),supportsGlobalId:n(e,"supportsApplyEditsWithGlobalIds",!1),supportsReturnServiceEditsInSourceSpatialReference:n(e,"supportsReturnServiceEditsInSourceSR",!1),supportsRollbackOnFailure:n(e,"supportsRollbackOnFailureParameter",!1),supportsUpdateWithoutM:n(e,"allowUpdateWithoutMValues",!1),supportsUploadWithItemId:n(e,"supportsAttachmentsByUploadId",!1),supportsDeleteByAnonymous:n(t,"allowAnonymousToDelete",!0),supportsDeleteByOthers:n(t,"allowOthersToDelete",!0),supportsUpdateByAnonymous:n(t,"allowAnonymousToUpdate",!0),supportsUpdateByOthers:n(t,"allowOthersToUpdate",!0),supportsAsyncApplyEdits:n(r,"supportsAsyncApplyEdits",!1)}}},32073:(e,t,r)=>{r.d(t,{FN:()=>o,QV:()=>i,ac:()=>a});var s=r(31263);function i(e,t,r){const s=t.flatten((({sublayers:e})=>e)).length;return s!==e.length||!!e.some((e=>e.originIdOf("minScale")>r||e.originIdOf("maxScale")>r||e.originIdOf("renderer")>r||e.originIdOf("labelingInfo")>r||e.originIdOf("opacity")>r||e.originIdOf("labelsVisible")>r||e.originIdOf("source")>r))||!n(e,t)}function o(e,t,r){return!!e.some((e=>{const t=e.source;return!(!t||"map-layer"===t.type&&t.mapLayerId===e.id&&(null==t.gdbVersion||t.gdbVersion===r))||e.originIdOf("renderer")>s.s3.SERVICE||e.originIdOf("labelingInfo")>s.s3.SERVICE||e.originIdOf("opacity")>s.s3.SERVICE||e.originIdOf("labelsVisible")>s.s3.SERVICE}))||!n(e,t)}function n(e,t){if(!e||!e.length||null==t)return!0;const r=t.slice().reverse().flatten((({sublayers:e})=>e&&e.toArray().reverse())).map((e=>e.id)).toArray();if(e.length>r.length)return!1;let s=0;const i=r.length;for(const{id:t}of e){for(;s<i&&r[s]!==t;)s++;if(s>=i)return!1}return!0}function a(e){return!!e&&e.some((e=>null!=e.minScale||e.layerDefinition&&null!=e.layerDefinition.minScale))}},41818:(e,t,r)=>{r.d(t,{P:()=>n});var s=r(11282),i=r(34599),o=r(14165);async function n(e,t,r){const n=(0,s.en)(e);return(0,i.hH)(n,o.Z.from(t),{...r}).then((e=>e.data.count))}},5396:(e,t,r)=>{r.d(t,{G:()=>n});var s=r(11282),i=r(34599),o=r(14165);async function n(e,t,r){const n=(0,s.en)(e);return(0,i.Ev)(n,o.Z.from(t),{...r}).then((e=>e.data.objectIds))}},4967:(e,t,r)=>{r.d(t,{F:()=>l,e:()=>a});var s=r(11282),i=r(34599),o=r(74889),n=r(14165);async function a(e,t,r){const s=await l(e,t,r);return o.Z.fromJSON(s)}async function l(e,t,r){const o=(0,s.en)(e),a={...r},l=n.Z.from(t),{data:u}=await(0,i.JT)(o,l,l.sourceSpatialReference,a);return u}},53261:(e,t,r)=>{r.d(t,{t:()=>b});var s=r(11282),i=r(70586),o=r(69285),n=r(98732);function a(e,t){return t}function l(e,t,r,s){switch(r){case 0:return c(e,t+s,0);case 1:return"lowerLeft"===e.originPosition?c(e,t+s,1):function({translate:e,scale:t},r,s){return e[s]-r*t[s]}(e,t+s,1)}}function u(e,t,r,s){return 2===r?c(e,t,2):l(e,t,r,s)}function p(e,t,r,s){return 2===r?c(e,t,3):l(e,t,r,s)}function d(e,t,r,s){return 3===r?c(e,t,3):u(e,t,r,s)}function c({translate:e,scale:t},r,s){return e[s]+r*t[s]}class y{constructor(e){this._options=e,this.geometryTypes=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"],this._previousCoordinate=[0,0],this._transform=null,this._applyTransform=a,this._lengths=[],this._currentLengthIndex=0,this._toAddInCurrentPath=0,this._vertexDimension=0,this._coordinateBuffer=null,this._coordinateBufferPtr=0,this._attributesConstructor=class{}}createFeatureResult(){return{fields:[],features:[]}}finishFeatureResult(e){if(this._options.applyTransform&&(e.transform=null),this._attributesConstructor=class{},this._coordinateBuffer=null,this._lengths.length=0,!e.hasZ)return;const t=(0,o.k)(e.geometryType,this._options.sourceSpatialReference,e.spatialReference);if(null!=t)for(const r of e.features)t(r.geometry)}createSpatialReference(){return{}}addField(e,t){const r=e.fields;(0,i.O3)(r),r.push(t);const s=r.map((e=>e.name));this._attributesConstructor=function(){for(const e of s)this[e]=null}}addFeature(e,t){e.features.push(t)}prepareFeatures(e){switch(this._transform=e.transform,this._options.applyTransform&&e.transform&&(this._applyTransform=this._deriveApplyTransform(e)),this._vertexDimension=2,e.hasZ&&this._vertexDimension++,e.hasM&&this._vertexDimension++,e.geometryType){case"esriGeometryPoint":this.addCoordinate=(e,t,r)=>this.addCoordinatePoint(e,t,r),this.createGeometry=e=>this.createPointGeometry(e);break;case"esriGeometryPolygon":this.addCoordinate=(e,t,r)=>this._addCoordinatePolygon(e,t,r),this.createGeometry=e=>this._createPolygonGeometry(e);break;case"esriGeometryPolyline":this.addCoordinate=(e,t,r)=>this._addCoordinatePolyline(e,t,r),this.createGeometry=e=>this._createPolylineGeometry(e);break;case"esriGeometryMultipoint":this.addCoordinate=(e,t,r)=>this._addCoordinateMultipoint(e,t,r),this.createGeometry=e=>this._createMultipointGeometry(e)}}createFeature(){return this._lengths.length=0,this._currentLengthIndex=0,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0,this._coordinateBuffer=null,this._coordinateBufferPtr=0,{attributes:new this._attributesConstructor}}allocateCoordinates(){}addLength(e,t,r){0===this._lengths.length&&(this._toAddInCurrentPath=t),this._lengths.push(t)}addQueryGeometry(e,t){const{queryGeometry:r,queryGeometryType:s}=t,i=(0,n.$g)(r.clone(),r,!1,!1,this._transform),o=(0,n.di)(i,s,!1,!1);e.queryGeometryType=s,e.queryGeometry={...o}}createPointGeometry(e){const t={x:0,y:0,spatialReference:e.spatialReference};return e.hasZ&&(t.z=0),e.hasM&&(t.m=0),t}addCoordinatePoint(e,t,r){const s=(0,i.s3)(this._transform,"transform");switch(t=this._applyTransform(s,t,r,0),r){case 0:e.x=t;break;case 1:e.y=t;break;case 2:"z"in e?e.z=t:e.m=t;break;case 3:e.m=t}}_transformPathLikeValue(e,t){let r=0;t<=1&&(r=this._previousCoordinate[t],this._previousCoordinate[t]+=e);const s=(0,i.s3)(this._transform,"transform");return this._applyTransform(s,e,t,r)}_addCoordinatePolyline(e,t,r){this._dehydratedAddPointsCoordinate(e.paths,t,r)}_addCoordinatePolygon(e,t,r){this._dehydratedAddPointsCoordinate(e.rings,t,r)}_addCoordinateMultipoint(e,t,r){0===r&&e.points.push([]);const s=this._transformPathLikeValue(t,r);e.points[e.points.length-1].push(s)}_createPolygonGeometry(e){return{rings:[[]],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_createPolylineGeometry(e){return{paths:[[]],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_createMultipointGeometry(e){return{points:[],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_dehydratedAddPointsCoordinate(e,t,r){0===r&&0==this._toAddInCurrentPath--&&(e.push([]),this._toAddInCurrentPath=this._lengths[++this._currentLengthIndex]-1,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0);const s=this._transformPathLikeValue(t,r),i=e[e.length-1];0===r&&(this._coordinateBufferPtr=0,this._coordinateBuffer=new Array(this._vertexDimension),i.push(this._coordinateBuffer)),this._coordinateBuffer[this._coordinateBufferPtr++]=s}_deriveApplyTransform(e){const{hasZ:t,hasM:r}=e;return t&&r?d:t?u:r?p:l}}var h=r(34599),f=(r(74889),r(14165));async function b(e,t,r){const i=(0,s.en)(e),o={...r},n=f.Z.from(t),a=!n.quantizationParameters,{data:l}=await(0,h.qp)(i,n,new y({sourceSpatialReference:n.sourceSpatialReference,applyTransform:a}),o);return l}},28694:(e,t,r)=>{r.d(t,{p:()=>i});var s=r(69285);function i(e,t,r){if(!r||!r.features||!r.hasZ)return;const i=(0,s.k)(r.geometryType,t,e.outSpatialReference);if(null!=i)for(const e of r.features)i(e.geometry)}},56545:(e,t,r)=>{r.d(t,{Z:()=>c});var s,i=r(43697),o=r(96674),n=r(22974),a=r(5600),l=r(75215),u=r(52011),p=r(30556);let d=s=class extends o.wq{constructor(e){super(e),this.attachmentTypes=null,this.attachmentsWhere=null,this.cacheHint=void 0,this.keywords=null,this.globalIds=null,this.name=null,this.num=null,this.objectIds=null,this.returnMetadata=!1,this.size=null,this.start=null,this.where=null}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10}clone(){return new s((0,n.d9)({attachmentTypes:this.attachmentTypes,attachmentsWhere:this.attachmentsWhere,cacheHint:this.cacheHint,keywords:this.keywords,where:this.where,globalIds:this.globalIds,name:this.name,num:this.num,objectIds:this.objectIds,returnMetadata:this.returnMetadata,size:this.size,start:this.start}))}};(0,i._)([(0,a.Cb)({type:[String],json:{write:!0}})],d.prototype,"attachmentTypes",void 0),(0,i._)([(0,a.Cb)({type:String,json:{read:{source:"attachmentsDefinitionExpression"},write:{target:"attachmentsDefinitionExpression"}}})],d.prototype,"attachmentsWhere",void 0),(0,i._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],d.prototype,"cacheHint",void 0),(0,i._)([(0,a.Cb)({type:[String],json:{write:!0}})],d.prototype,"keywords",void 0),(0,i._)([(0,a.Cb)({type:[Number],json:{write:!0}})],d.prototype,"globalIds",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],d.prototype,"name",void 0),(0,i._)([(0,a.Cb)({type:Number,json:{read:{source:"resultRecordCount"}}})],d.prototype,"num",void 0),(0,i._)([(0,a.Cb)({type:[Number],json:{write:!0}})],d.prototype,"objectIds",void 0),(0,i._)([(0,a.Cb)({type:Boolean,json:{default:!1,write:!0}})],d.prototype,"returnMetadata",void 0),(0,i._)([(0,a.Cb)({type:[Number],json:{write:!0}})],d.prototype,"size",void 0),(0,i._)([(0,a.Cb)({type:Number,json:{read:{source:"resultOffset"}}})],d.prototype,"start",void 0),(0,i._)([(0,p.c)("start"),(0,p.c)("num")],d.prototype,"writeStart",null),(0,i._)([(0,a.Cb)({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],d.prototype,"where",void 0),d=s=(0,i._)([(0,u.j)("esri.rest.support.AttachmentQuery")],d),d.from=(0,l.se)(d);const c=d}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6459],{21787:(t,e,n)=>{n.d(e,{a:()=>s,b:()=>l,e:()=>c,f:()=>o,i:()=>h,m:()=>u,s:()=>a,t:()=>i});var r=n(46851);function o(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t}function a(t,e,n,r,o,a,i,c,s,u){return t[0]=e,t[1]=n,t[2]=r,t[3]=o,t[4]=a,t[5]=i,t[6]=c,t[7]=s,t[8]=u,t}function i(t,e){if(t===e){const n=e[1],r=e[2],o=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=r,t[7]=o}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t}function c(t,e){const n=e[0],r=e[1],o=e[2],a=e[3],i=e[4],c=e[5],s=e[6],u=e[7],l=e[8],f=l*i-c*u,h=-l*a+c*s,p=u*a-i*s;let g=n*f+r*h+o*p;return g?(g=1/g,t[0]=f*g,t[1]=(-l*r+o*u)*g,t[2]=(c*r-o*i)*g,t[3]=h*g,t[4]=(l*n-o*s)*g,t[5]=(-c*n+o*a)*g,t[6]=p*g,t[7]=(-u*n+r*s)*g,t[8]=(i*n-r*a)*g,t):null}function s(t,e){const n=e[0],r=e[1],o=e[2],a=e[3],i=e[4],c=e[5],s=e[6],u=e[7],l=e[8];return t[0]=i*l-c*u,t[1]=o*u-r*l,t[2]=r*c-o*i,t[3]=c*s-a*l,t[4]=n*l-o*s,t[5]=o*a-n*c,t[6]=a*u-i*s,t[7]=r*s-n*u,t[8]=n*i-r*a,t}function u(t,e,n){const r=e[0],o=e[1],a=e[2],i=e[3],c=e[4],s=e[5],u=e[6],l=e[7],f=e[8],h=n[0],p=n[1],g=n[2],y=n[3],M=n[4],d=n[5],m=n[6],b=n[7],v=n[8];return t[0]=h*r+p*i+g*u,t[1]=h*o+p*c+g*l,t[2]=h*a+p*s+g*f,t[3]=y*r+M*i+d*u,t[4]=y*o+M*c+d*l,t[5]=y*a+M*s+d*f,t[6]=m*r+b*i+v*u,t[7]=m*o+b*c+v*l,t[8]=m*a+b*s+v*f,t}function l(t,e){const n=e[0],r=e[1],o=e[2],a=e[3],i=e[4],c=e[5],s=e[6],u=e[7],l=e[8],f=e[9],h=e[10],p=e[11],g=e[12],y=e[13],M=e[14],d=e[15],m=n*c-r*i,b=n*s-o*i,v=n*u-a*i,A=r*s-o*c,P=r*u-a*c,w=o*u-a*s,_=l*y-f*g,x=l*M-h*g,F=l*d-p*g,S=f*M-h*y,T=f*d-p*y,C=h*d-p*M;let O=m*C-b*T+v*S+A*F-P*x+w*_;return O?(O=1/O,t[0]=(c*C-s*T+u*S)*O,t[1]=(s*F-i*C-u*x)*O,t[2]=(i*T-c*F+u*_)*O,t[3]=(o*T-r*C-a*S)*O,t[4]=(n*C-o*F+a*x)*O,t[5]=(r*F-n*T-a*_)*O,t[6]=(y*w-M*P+d*A)*O,t[7]=(M*v-g*w-d*b)*O,t[8]=(g*P-y*v+d*m)*O,t):null}function f(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t}function h(t){const e=(0,r.g)(),n=t[0],o=t[1],a=t[2],i=t[3],c=t[4],s=t[5],u=t[6],l=t[7],f=t[8];return Math.abs(1-(n*n+i*i+u*u))<=e&&Math.abs(1-(o*o+c*c+l*l))<=e&&Math.abs(1-(a*a+s*s+f*f))<=e}const p=u,g=f;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t},adjoint:s,copy:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},determinant:function(t){const e=t[0],n=t[1],r=t[2],o=t[3],a=t[4],i=t[5],c=t[6],s=t[7],u=t[8];return e*(u*a-i*s)+n*(-u*o+i*c)+r*(s*o-a*c)},equals:function(t,e){const n=t[0],o=t[1],a=t[2],i=t[3],c=t[4],s=t[5],u=t[6],l=t[7],f=t[8],h=e[0],p=e[1],g=e[2],y=e[3],M=e[4],d=e[5],m=e[6],b=e[7],v=e[8],A=(0,r.g)();return Math.abs(n-h)<=A*Math.max(1,Math.abs(n),Math.abs(h))&&Math.abs(o-p)<=A*Math.max(1,Math.abs(o),Math.abs(p))&&Math.abs(a-g)<=A*Math.max(1,Math.abs(a),Math.abs(g))&&Math.abs(i-y)<=A*Math.max(1,Math.abs(i),Math.abs(y))&&Math.abs(c-M)<=A*Math.max(1,Math.abs(c),Math.abs(M))&&Math.abs(s-d)<=A*Math.max(1,Math.abs(s),Math.abs(d))&&Math.abs(u-m)<=A*Math.max(1,Math.abs(u),Math.abs(m))&&Math.abs(l-b)<=A*Math.max(1,Math.abs(l),Math.abs(b))&&Math.abs(f-v)<=A*Math.max(1,Math.abs(f),Math.abs(v))},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]},frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2)},fromMat2d:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=0,t[3]=e[2],t[4]=e[3],t[5]=0,t[6]=e[4],t[7]=e[5],t[8]=1,t},fromMat4:o,fromQuat:function(t,e){const n=e[0],r=e[1],o=e[2],a=e[3],i=n+n,c=r+r,s=o+o,u=n*i,l=r*i,f=r*c,h=o*i,p=o*c,g=o*s,y=a*i,M=a*c,d=a*s;return t[0]=1-f-g,t[3]=l-d,t[6]=h+M,t[1]=l+d,t[4]=1-u-g,t[7]=p-y,t[2]=h-M,t[5]=p+y,t[8]=1-u-f,t},fromRotation:function(t,e){const n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=-n,t[4]=r,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=e[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromTranslation:function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=e[0],t[7]=e[1],t[8]=1,t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},invert:c,isOrthoNormal:h,mul:p,multiply:u,multiplyScalar:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t},multiplyScalarAndAdd:function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t},normalFromMat4:l,normalFromMat4Legacy:function(t,e){const n=e[0],r=e[1],o=e[2],a=e[4],i=e[5],c=e[6],s=e[8],u=e[9],l=e[10],f=l*i-c*u,h=-l*a+c*s,p=u*a-i*s,g=n*f+r*h+o*p;if(!g)return null;const y=1/g;return t[0]=f*y,t[1]=(-l*r+o*u)*y,t[2]=(c*r-o*i)*y,t[3]=h*y,t[4]=(l*n-o*s)*y,t[5]=(-c*n+o*a)*y,t[6]=p*y,t[7]=(-u*n+r*s)*y,t[8]=(i*n-r*a)*y,t},projection:function(t,e,n){return t[0]=2/e,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/n,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},rotate:function(t,e,n){const r=e[0],o=e[1],a=e[2],i=e[3],c=e[4],s=e[5],u=e[6],l=e[7],f=e[8],h=Math.sin(n),p=Math.cos(n);return t[0]=p*r+h*i,t[1]=p*o+h*c,t[2]=p*a+h*s,t[3]=p*i-h*r,t[4]=p*c-h*o,t[5]=p*s-h*a,t[6]=u,t[7]=l,t[8]=f,t},scale:function(t,e,n){const r=n[0],o=n[1],a=n[2];return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=o*e[3],t[4]=o*e[4],t[5]=o*e[5],t[6]=a*e[6],t[7]=a*e[7],t[8]=a*e[8],t},scaleByVec2:function(t,e,n){const r=n[0],o=n[1];return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=o*e[3],t[4]=o*e[4],t[5]=o*e[5],t},set:a,str:function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},sub:g,subtract:f,translate:function(t,e,n){const r=e[0],o=e[1],a=e[2],i=e[3],c=e[4],s=e[5],u=e[6],l=e[7],f=e[8],h=n[0],p=n[1];return t[0]=r,t[1]=o,t[2]=a,t[3]=i,t[4]=c,t[5]=s,t[6]=h*r+p*i+u,t[7]=h*o+p*c+l,t[8]=h*a+p*s+f,t},transpose:i},Symbol.toStringTag,{value:"Module"}))},46521:(t,e,n)=>{function r(){return[1,0,0,0,1,0,0,0,1]}function o(t,e,n,r,o,a,i,c,s){return[t,e,n,r,o,a,i,c,s]}function a(t,e){return new Float64Array(t,e,9)}n.d(e,{a:()=>a,c:()=>r,f:()=>o}),Object.freeze(Object.defineProperty({__proto__:null,clone:function(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]]},create:r,createView:a,fromValues:o},Symbol.toStringTag,{value:"Module"}))},13598:(t,e,n)=>{function r(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function o(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]]}function a(t,e){return new Float64Array(t,e,16)}n.d(e,{I:()=>i,a:()=>a,b:()=>o,c:()=>r});const i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:o,create:r,createView:a,fromValues:function(t,e,n,r,o,a,i,c,s,u,l,f,h,p,g,y){return[t,e,n,r,o,a,i,c,s,u,l,f,h,p,g,y]}},Symbol.toStringTag,{value:"Module"}))},51305:(t,e,n)=>{n.d(e,{c:()=>p,g:()=>l,j:()=>T,k:()=>y,m:()=>f,s:()=>u});var r=n(46521),o=n(94961),a=n(65617),i=n(46851),c=n(17896),s=n(98766);function u(t,e,n){n*=.5;const r=Math.sin(n);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(n),t}function l(t,e){const n=2*Math.acos(e[3]),r=Math.sin(n/2);return r>(0,i.g)()?(t[0]=e[0]/r,t[1]=e[1]/r,t[2]=e[2]/r):(t[0]=1,t[1]=0,t[2]=0),n}function f(t,e,n){const r=e[0],o=e[1],a=e[2],i=e[3],c=n[0],s=n[1],u=n[2],l=n[3];return t[0]=r*l+i*c+o*u-a*s,t[1]=o*l+i*s+a*c-r*u,t[2]=a*l+i*u+r*s-o*c,t[3]=i*l-r*c-o*s-a*u,t}function h(t,e,n,r){const o=e[0],a=e[1],c=e[2],s=e[3];let u,l,f,h,p,g=n[0],y=n[1],M=n[2],d=n[3];return l=o*g+a*y+c*M+s*d,l<0&&(l=-l,g=-g,y=-y,M=-M,d=-d),1-l>(0,i.g)()?(u=Math.acos(l),f=Math.sin(u),h=Math.sin((1-r)*u)/f,p=Math.sin(r*u)/f):(h=1-r,p=r),t[0]=h*o+p*g,t[1]=h*a+p*y,t[2]=h*c+p*M,t[3]=h*s+p*d,t}function p(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t}function g(t,e){const n=e[0]+e[4]+e[8];let r;if(n>0)r=Math.sqrt(n+1),t[3]=.5*r,r=.5/r,t[0]=(e[5]-e[7])*r,t[1]=(e[6]-e[2])*r,t[2]=(e[1]-e[3])*r;else{let n=0;e[4]>e[0]&&(n=1),e[8]>e[3*n+n]&&(n=2);const o=(n+1)%3,a=(n+2)%3;r=Math.sqrt(e[3*n+n]-e[3*o+o]-e[3*a+a]+1),t[n]=.5*r,r=.5/r,t[3]=(e[3*o+a]-e[3*a+o])*r,t[o]=(e[3*o+n]+e[3*n+o])*r,t[a]=(e[3*a+n]+e[3*n+a])*r}return t}function y(t,e,n,r){const o=.5*Math.PI/180;e*=o,n*=o,r*=o;const a=Math.sin(e),i=Math.cos(e),c=Math.sin(n),s=Math.cos(n),u=Math.sin(r),l=Math.cos(r);return t[0]=a*s*l-i*c*u,t[1]=i*c*l+a*s*u,t[2]=i*s*u-a*c*l,t[3]=i*s*l+a*c*u,t}const M=s.c,d=s.s,m=s.a,b=f,v=s.b,A=s.d,P=s.l,w=s.e,_=w,x=s.f,F=x,S=s.n,T=s.g,C=s.h,O=(0,a.c)(),R=(0,a.f)(1,0,0),B=(0,a.f)(0,1,0),Z=(0,o.a)(),j=(0,o.a)(),V=(0,r.c)();Object.freeze(Object.defineProperty({__proto__:null,add:m,calculateW:function(t,e){const n=e[0],r=e[1],o=e[2];return t[0]=n,t[1]=r,t[2]=o,t[3]=Math.sqrt(Math.abs(1-n*n-r*r-o*o)),t},conjugate:p,copy:M,dot:A,equals:C,exactEquals:T,fromEuler:y,fromMat3:g,getAxisAngle:l,identity:function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},invert:function(t,e){const n=e[0],r=e[1],o=e[2],a=e[3],i=n*n+r*r+o*o+a*a,c=i?1/i:0;return t[0]=-n*c,t[1]=-r*c,t[2]=-o*c,t[3]=a*c,t},len:_,length:w,lerp:P,mul:b,multiply:f,normalize:S,random:function(t){const e=i.R,n=e(),r=e(),o=e(),a=Math.sqrt(1-n),c=Math.sqrt(n);return t[0]=a*Math.sin(2*Math.PI*r),t[1]=a*Math.cos(2*Math.PI*r),t[2]=c*Math.sin(2*Math.PI*o),t[3]=c*Math.cos(2*Math.PI*o),t},rotateX:function(t,e,n){n*=.5;const r=e[0],o=e[1],a=e[2],i=e[3],c=Math.sin(n),s=Math.cos(n);return t[0]=r*s+i*c,t[1]=o*s+a*c,t[2]=a*s-o*c,t[3]=i*s-r*c,t},rotateY:function(t,e,n){n*=.5;const r=e[0],o=e[1],a=e[2],i=e[3],c=Math.sin(n),s=Math.cos(n);return t[0]=r*s-a*c,t[1]=o*s+i*c,t[2]=a*s+r*c,t[3]=i*s-o*c,t},rotateZ:function(t,e,n){n*=.5;const r=e[0],o=e[1],a=e[2],i=e[3],c=Math.sin(n),s=Math.cos(n);return t[0]=r*s+o*c,t[1]=o*s-r*c,t[2]=a*s+i*c,t[3]=i*s-a*c,t},rotationTo:function(t,e,n){const r=(0,c.e)(e,n);return r<-.999999?((0,c.f)(O,R,e),(0,c.u)(O)<1e-6&&(0,c.f)(O,B,e),(0,c.n)(O,O),u(t,O,Math.PI),t):r>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):((0,c.f)(O,e,n),t[0]=O[0],t[1]=O[1],t[2]=O[2],t[3]=1+r,S(t,t))},scale:v,set:d,setAxes:function(t,e,n,r){const o=V;return o[0]=n[0],o[3]=n[1],o[6]=n[2],o[1]=r[0],o[4]=r[1],o[7]=r[2],o[2]=-e[0],o[5]=-e[1],o[8]=-e[2],S(t,g(t,o))},setAxisAngle:u,slerp:h,sqlerp:function(t,e,n,r,o,a){return h(Z,e,o,a),h(j,n,r,a),h(t,Z,j,2*a*(1-a)),t},sqrLen:F,squaredLength:x,str:function(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}},Symbol.toStringTag,{value:"Module"}))},94961:(t,e,n)=>{function r(){return[0,0,0,1]}function o(t){return[t[0],t[1],t[2],t[3]]}function a(t,e){return new Float64Array(t,e,4)}n.d(e,{I:()=>i,a:()=>r,b:()=>o,c:()=>a});const i=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:o,create:r,createView:a,fromValues:function(t,e,n,r){return[t,e,n,r]}},Symbol.toStringTag,{value:"Module"}))},20773:(t,e,n)=>{n.d(e,{a:()=>c,b:()=>i,c:()=>o,d:()=>l,e:()=>s,n:()=>f,s:()=>u,t:()=>a});var r=n(72220);function o(t,e,n){a(t.typedBuffer,e.typedBuffer,n,t.typedBufferStride,e.typedBufferStride)}function a(t,e,n,o=3,a=o){if(t.length/o!==Math.ceil(e.length/a))return r.c.error("source and destination buffers need to have the same number of elements"),t;const i=t.length/o,c=n[0],s=n[1],u=n[2],l=n[4],f=n[5],h=n[6],p=n[8],g=n[9],y=n[10],M=n[12],d=n[13],m=n[14];let b=0,v=0;for(let n=0;n<i;n++){const n=e[b],r=e[b+1],i=e[b+2];t[v]=c*n+l*r+p*i+M,t[v+1]=s*n+f*r+g*i+d,t[v+2]=u*n+h*r+y*i+m,b+=a,v+=o}return t}function i(t,e,n){c(t.typedBuffer,e.typedBuffer,n,t.typedBufferStride,e.typedBufferStride)}function c(t,e,n,o=3,a=o){if(t.length/o!==Math.ceil(e.length/a))return void r.c.error("source and destination buffers need to have the same number of elements");const i=t.length/o,c=n[0],s=n[1],u=n[2],l=n[3],f=n[4],h=n[5],p=n[6],g=n[7],y=n[8];let M=0,d=0;for(let n=0;n<i;n++){const n=e[M],r=e[M+1],i=e[M+2];t[d]=c*n+l*r+p*i,t[d+1]=s*n+f*r+g*i,t[d+2]=u*n+h*r+y*i,M+=a,d+=o}}function s(t,e,n){u(t.typedBuffer,e,n,t.typedBufferStride)}function u(t,e,n,r=3){const o=Math.min(t.length/r,e.count),a=e.typedBuffer,i=e.typedBufferStride;let c=0,s=0;for(let e=0;e<o;e++)t[s]=n*a[c],t[s+1]=n*a[c+1],t[s+2]=n*a[c+2],c+=i,s+=r}function l(t,e){f(t.typedBuffer,e.typedBuffer,t.typedBufferStride,e.typedBufferStride)}function f(t,e,n=3,r=n){const o=Math.min(t.length/n,e.length/r);let a=0,i=0;for(let c=0;c<o;c++){const o=e[a],c=e[a+1],s=e[a+2],u=o*o+c*c+s*s;if(u>0){const e=1/Math.sqrt(u);t[i]=e*o,t[i+1]=e*c,t[i+2]=e*s}a+=r,i+=n}}Object.freeze(Object.defineProperty({__proto__:null,normalize:f,normalizeView:l,scale:u,scaleView:s,shiftRight:function(t,e,n){const r=Math.min(t.count,e.count),o=t.typedBuffer,a=t.typedBufferStride,i=e.typedBuffer,c=e.typedBufferStride;let s=0,u=0;for(let t=0;t<r;t++)o[u]=i[s]>>n,o[u+1]=i[s+1]>>n,o[u+2]=i[s+2]>>n,s+=c,u+=a},transformMat3:c,transformMat3View:i,transformMat4:a,transformMat4View:o},Symbol.toStringTag,{value:"Module"}))},58995:(t,e,n)=>{n.d(e,{rS:()=>u});var r=n(2109),o=n(82971),a=n(8744);const i=new o.Z(r.kU),c=new o.Z(r.JL),s=new o.Z(r.mM);function u(t){return t&&((0,a.BZ)(t)||(0,a.fS)(t,c))?c:t&&((0,a.V2)(t)||(0,a.fS)(t,s))?s:i}new o.Z(r.pn)},83025:(t,e,n)=>{n.d(e,{QZ:()=>a,Rq:()=>i,bg:()=>o});var r=n(1533);function o(t,e=!1){return t<=r.DB?e?new Array(t).fill(0):new Array(t):new Float64Array(t)}function a(t){return((0,r.kJ)(t)?t.length:t.byteLength/8)<=r.DB?Array.from(t):new Float64Array(t)}function i(t,e,n){return Array.isArray(t)?t.slice(e,e+n):t.subarray(e,e+n)}},85872:(t,e,n)=>{n.d(e,{Z:()=>h});var r=n(43697),o=n(2368),a=n(96674),i=n(5600),c=(n(75215),n(67676),n(80442),n(36030)),s=n(52011),u=n(65617),l=n(94139);let f=class extends((0,o.J)(a.wq)){constructor(t){super(t),this.type="georeferenced-relative",this.isRelative=!0,this.isGeoreferenced=!0,this.origin=(0,u.c)()}getOriginPoint(t){const[e,n,r]=this.origin;return new l.Z({x:e,y:n,z:r,spatialReference:t})}setOriginFormPoint({x:t,y:e,z:n}){this.origin=(0,u.f)(t,e,n??0)}};(0,r._)([(0,c.J)({georeferencedRelative:"georeferenced-relative"},{readOnly:!0})],f.prototype,"type",void 0),(0,r._)([(0,i.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],f.prototype,"origin",void 0),f=(0,r._)([(0,s.j)("esri.geometry.support.MeshGeoreferencedRelativeVertexSpace")],f);const h=f},50567:(t,e,n)=>{n.d(e,{Z:()=>u});var r=n(43697),o=n(2368),a=n(96674),i=(n(92604),n(75215),n(67676),n(80442),n(20102),n(36030)),c=n(52011);let s=class extends((0,o.J)(a.wq)){constructor(){super({}),this.type="georeferenced",this.isRelative=!1,this.isGeoreferenced=!0}};(0,r._)([(0,i.J)({georeferenced:"georeferenced"},{readOnly:!0})],s.prototype,"type",void 0),s=(0,r._)([(0,c.j)("esri.geometry.support.MeshGeoreferencedVertexSpace")],s);const u=s},84555:(t,e,n)=>{n.d(e,{Z:()=>h});var r=n(43697),o=n(2368),a=n(96674),i=n(5600),c=(n(75215),n(67676),n(80442),n(36030)),s=n(52011),u=n(65617),l=n(94139);let f=class extends((0,o.J)(a.wq)){constructor(t){super(t),this.type="local",this.isRelative=!0,this.isGeoreferenced=!1,this.origin=(0,u.c)()}getOriginPoint(t){const[e,n,r]=this.origin;return new l.Z({x:e,y:n,z:r,spatialReference:t})}setOriginFormPoint({x:t,y:e,z:n}){this.origin=(0,u.f)(t,e,n??0)}};(0,r._)([(0,c.J)({local:"local"},{readOnly:!0})],f.prototype,"type",void 0),(0,r._)([(0,i.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],f.prototype,"origin",void 0),f=(0,r._)([(0,s.j)("esri.geometry.support.MeshLocalVertexSpace")],f);const h=f},2674:(t,e,n)=>{n.d(e,{Z:()=>d});var r,o=n(43697),a=n(96674),i=n(5600),c=(n(75215),n(67676),n(80442),n(52011)),s=n(52138),u=n(13598),l=n(51305),f=n(94961),h=n(17896),p=n(65617),g=n(3709);let y=r=class extends a.wq{constructor(t){super(t),this.translation=(0,p.c)(),this.rotationAxis=(0,p.g)(g.UP),this.rotationAngle=0,this.scale=(0,p.f)(1,1,1)}get rotation(){return(0,g.uT)(this.rotationAxis,this.rotationAngle)}set rotation(t){this.rotationAxis=(0,p.a)((0,g.ZZ)(t)),this.rotationAngle=(0,g.EU)(t)}get localMatrix(){const t=(0,u.c)();return(0,l.s)(M,(0,g.ZZ)(this.rotation),(0,g.WH)(this.rotation)),(0,s.g)(t,M,this.translation,this.scale),t}get localMatrixInverse(){return(0,s.a)((0,u.c)(),this.localMatrix)}applyLocal(t,e){return(0,h.m)(e,t,this.localMatrix)}applyLocalInverse(t,e){return(0,h.m)(e,t,this.localMatrixInverse)}equals(t){return this===t||null!=t&&(0,s.h)(this.localMatrix,t.localMatrix)}clone(){const t={translation:(0,p.a)(this.translation),rotationAxis:(0,p.a)(this.rotationAxis),rotationAngle:this.rotationAngle,scale:(0,p.a)(this.scale)};return new r(t)}};(0,o._)([(0,i.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],y.prototype,"translation",void 0),(0,o._)([(0,i.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],y.prototype,"rotationAxis",void 0),(0,o._)([(0,i.Cb)({type:Number,nonNullable:!0,json:{write:!0}})],y.prototype,"rotationAngle",void 0),(0,o._)([(0,i.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],y.prototype,"scale",void 0),(0,o._)([(0,i.Cb)()],y.prototype,"rotation",null),(0,o._)([(0,i.Cb)()],y.prototype,"localMatrix",null),(0,o._)([(0,i.Cb)()],y.prototype,"localMatrixInverse",null),y=r=(0,o._)([(0,c.j)("esri.geometry.support.MeshTransform")],y);const M=(0,f.a)(),d=y},3709:(t,e,n)=>{n.d(e,{EU:()=>p,UP:()=>y,Ue:()=>s,WH:()=>g,ZZ:()=>h,qC:()=>l,qw:()=>f,uT:()=>u});var r=n(22021),o=n(51305),a=n(94961),i=n(17896),c=n(65617);function s(t=y){return[t[0],t[1],t[2],t[3]]}function u(t,e,n=s()){return(0,i.c)(n,t),n[3]=e,n}function l(t,e,n=s()){return(0,o.s)(M,t,g(t)),(0,o.s)(d,e,g(e)),(0,o.m)(M,d,M),function(t,e){return t[3]=e,t}(n,(0,r.BV)((0,o.g)(n,M)))}function f(t,e,n,r=s()){return u(c.d,t,m),u(c.e,e,b),u(c.U,n,v),l(m,b,m),l(m,v,r),r}function h(t){return t}function p(t){return t[3]}function g(t){return(0,r.Vl)(t[3])}const y=[0,0,1,0],M=(0,a.a)(),d=(0,a.a)(),m=(s(),s()),b=s(),v=s()},72220:(t,e,n)=>{n.d(e,{c:()=>r});const r=n(92604).Z.getLogger("esri.views.3d.support.buffer.math")},13442:(t,e,n)=>{n.d(e,{A:()=>a,h:()=>o});var r=n(92604);function o(t,e){return t.isGeographic||t.isWebMercator&&(e?.geographic??!0)}function a(t,e,n){const o=!t.isGeoreferenced;null!=n?.geographic&&n.geographic!==o&&r.Z.getLogger(e).warnOnce(`Specifying the 'geographic' parameter (${n.geographic}) for a Mesh vertex space of type "${t.type}" is not supported. This parameter will be ignored.`)}},66459:(t,e,n)=>{n.d(e,{FF:()=>P,I5:()=>v,Yq:()=>w,iV:()=>_,iv:()=>b,w1:()=>A});var r=n(67900),o=n(46521),a=n(52138),i=n(13598),c=n(65617),s=n(21787),u=n(44547),l=n(58995),f=n(83025),h=n(85872),p=n(50567),g=n(84555),y=n(2674),M=n(20773),d=n(13442),m=n(56493);function b(t,e,n){return(0,d.h)(e.spatialReference,n)?function(t,e,n){const r=e.spatialReference,o=T(e,n,B),a=new Float64Array(t.position.length),i=function(t,e,n,r){(0,M.t)(r,t,e);const o=new Float64Array(t.length);return(0,m.To)(r,o,n)}(t.position,o,r,a),c=(0,s.b)(j,o);return{position:i,normal:x(i,a,t.normal,c,r),tangent:F(i,a,t.tangent,c,r)}}(t,e,n):function(t,e,n){const r=new Float64Array(t.position.length),o=t.position,a=e.x,i=e.y,c=e.z??0,{horizontal:s,vertical:u}=R(n?n.unit:null,e.spatialReference);for(let t=0;t<o.length;t+=3)r[t]=o[t]*s+a,r[t+1]=o[t+1]*s+i,r[t+2]=o[t+2]*u+c;return{position:r,normal:t.normal,tangent:t.tangent}}(t,e,n)}function v(t,e,n,r){const{position:o,normal:a,tangent:c}=t;if(!e.isRelative)return{position:o,normal:a,tangent:c};const s=n?.localMatrix??i.I;return b({position:(0,M.t)(new Float64Array(o.length),o,s),normal:null!=a?(0,m.w9)(a,new Float32Array(a.length),s):null,tangent:null!=c?(0,m.VS)(c,new Float32Array(c.length),s):null},e.getOriginPoint(r),{geographic:!e.isGeoreferenced})}function A(t,e,n){if(n?.useTransform){const{position:r,normal:o,tangent:a}=t,{x:i,y:s,z:u}=e,l=(0,c.f)(i,s,u??0);return{vertexAttributes:{position:r,normal:o,tangent:a},vertexSpace:n.geographic??1?new g.Z({origin:l}):new h.Z({origin:l}),transform:new y.Z}}return{vertexAttributes:b(t,e,n),vertexSpace:new p.Z,transform:null}}function P(t,e,n){return(0,d.h)(e.spatialReference,n)?function(t,e,n){const r=e.spatialReference;T(e,n,B);const o=(0,a.a)(Z,B),i=new Float64Array(t.position.length),c=function(t,e,n,r){const o=(0,m.XO)(t,e,r),a=new Float64Array(o.length);return(0,M.t)(a,o,n),a}(t.position,r,o,i),u=(0,s.b)(j,o);return{position:c,normal:C(t.normal,t.position,i,r,u),tangent:O(t.tangent,t.position,i,r,u)}}(t,e,n):S(t,e,n)}function w(t,e,n,r,o){if(!e.isRelative)return P(t,r,o);const{spatialReference:a}=r,i=v(t,e,n,a);return r.equals(e.getOriginPoint(a))?S(i,r,o):P(i,r,o)}function _(t,e,n,r){const o=e.isRelative?e.origin:c.Z,s=e.isRelative?t?.localMatrix??i.I:i.I;if(!e.isGeoreferenced){const t=r,e=(0,l.rS)(t);(0,u.Bm)(t,o,B,e),(0,a.m)(B,B,s);const i=(0,f.bg)(n.length);return(0,M.t)(i,n,B),(0,u.CM)(i,e,0,i,t,0,i.length/3),i}const h=(0,a.j)(s,i.I)?(0,f.QZ)(n):(0,M.t)((0,f.bg)(n.length),n,s);for(let t=0;t<h.length;t+=3)h[t]+=o[0],h[t+1]+=o[1],h[t+2]+=o[2];return h}function x(t,e,n,r,o){if(null==n)return null;const a=new Float32Array(n.length);return(0,M.a)(a,n,r),(0,m.Yk)(a,t,e,o,a),a}function F(t,e,n,r,o){if(null==n)return null;const a=new Float32Array(n.length);(0,M.a)(a,n,r,4);for(let t=3;t<a.length;t+=4)a[t]=n[t];return(0,m.M2)(a,t,e,o,a),a}function S(t,e,n){const r=new Float64Array(t.position.length),o=t.position,a=e.x,i=e.y,c=e.z??0,{horizontal:s,vertical:u}=R(n?n.unit:null,e.spatialReference);for(let t=0;t<o.length;t+=3)r[t]=(o[t]-a)/s,r[t+1]=(o[t+1]-i)/s,r[t+2]=(o[t+2]-c)/u;return{position:r,normal:t.normal,tangent:t.tangent}}function T(t,e,n){(0,u.Bm)(t.spatialReference,[t.x,t.y,t.z??0],n,(0,l.rS)(t.spatialReference));const{horizontal:r,vertical:o}=R(e?e.unit:null,t.spatialReference);return(0,a.k)(n,n,[r,r,o]),n}function C(t,e,n,r,o){if(null==t)return null;const a=(0,m.Iz)(t,e,n,r,new Float32Array(t.length));return(0,M.a)(a,a,o),a}function O(t,e,n,r,o){if(null==t)return null;const a=(0,m.wi)(t,e,n,r,new Float32Array(t.length));return(0,M.a)(a,a,o,4),a}function R(t,e){if(null==t)return V;const n=e.isGeographic?1:(0,r.c9)(e),o=e.isGeographic?1:(0,r._R)(e),a=(0,r.En)(1,t,"meters");return{horizontal:a*n,vertical:a*o}}const B=(0,i.c)(),Z=(0,i.c)(),j=(0,o.c)(),V={horizontal:1,vertical:1}},56493:(t,e,n)=>{n.d(e,{Iz:()=>M,M2:()=>w,To:()=>b,VS:()=>A,XO:()=>m,Yk:()=>d,w9:()=>v,wi:()=>P});var r=n(92604),o=n(21787),a=n(46521),i=n(13598),c=n(17896),s=n(65617),u=n(44547),l=n(58995),f=n(8744),h=n(40488),p=n(56481),g=n(20773);const y=r.Z.getLogger("esri.geometry.support.meshUtils.normalProjection");function M(t,e,n,r,o){return x(r)?(_(S.TO_PCPF,p.ct.fromTypedArray(t),p.fP.fromTypedArray(e),p.fP.fromTypedArray(n),r,p.ct.fromTypedArray(o)),o):(y.error("Cannot convert spatial reference to PCPF"),o)}function d(t,e,n,r,o){return x(r)?(_(S.FROM_PCPF,p.ct.fromTypedArray(t),p.fP.fromTypedArray(e),p.fP.fromTypedArray(n),r,p.ct.fromTypedArray(o)),o):(y.error("Cannot convert to spatial reference from PCPF"),o)}function m(t,e,n){return(0,u.CM)(t,e,0,n,(0,l.rS)(e),0,t.length/3),n}function b(t,e,n){return(0,u.CM)(t,(0,l.rS)(n),0,e,n,0,t.length/3),e}function v(t,e,n){return(0,o.b)(B,n),(0,g.a)(e,t,B),(0,o.i)(B)||(0,g.n)(e,e),e}function A(t,e,n){if((0,o.b)(B,n),(0,g.a)(e,t,B,4),(0,o.i)(B)||(0,g.n)(e,e,4),t!==e)for(let n=3;n<t.length;n+=4)e[n]=t[n];return e}function P(t,e,n,r,o){if(!x(r))return y.error("Cannot convert spatial reference to PCPF"),o;_(S.TO_PCPF,p.ct.fromTypedArray(t,4*Float32Array.BYTES_PER_ELEMENT),p.fP.fromTypedArray(e),p.fP.fromTypedArray(n),r,p.ct.fromTypedArray(o,4*Float32Array.BYTES_PER_ELEMENT));for(let e=3;e<t.length;e+=4)o[e]=t[e];return o}function w(t,e,n,r,o){if(!x(r))return y.error("Cannot convert to spatial reference from PCPF"),o;_(S.FROM_PCPF,p.ct.fromTypedArray(t,16),p.fP.fromTypedArray(e),p.fP.fromTypedArray(n),r,p.ct.fromTypedArray(o,16));for(let e=3;e<t.length;e+=4)o[e]=t[e];return o}function _(t,e,n,r,a,i){if(!e)return;const s=n.count,f=(0,l.rS)(a);if(F(a))for(let n=0;n<s;n++)r.getVec(n,C),e.getVec(n,O),(0,u.Bm)(f,C,R,f),(0,o.f)(B,R),t===S.FROM_PCPF&&(0,o.t)(B,B),(0,c.t)(O,O,B),i.setVec(n,O);else for(let a=0;a<s;a++){r.getVec(a,C),e.getVec(a,O),(0,u.Bm)(f,C,R,f),(0,o.f)(B,R);const s=(0,h.mZ)(n.get(a,1));let l=Math.cos(s);t===S.TO_PCPF&&(l=1/l),B[0]*=l,B[1]*=l,B[2]*=l,B[3]*=l,B[4]*=l,B[5]*=l,t===S.FROM_PCPF&&(0,o.t)(B,B),(0,c.t)(O,O,B),(0,c.n)(O,O),i.setVec(a,O)}return i}function x(t){return F(t)||function(t){return t.isWebMercator}(t)}function F(t){return t.isWGS84||(0,f.yW)(t)||(0,f.BZ)(t)||(0,f.V2)(t)}var S,T;(T=S||(S={}))[T.TO_PCPF=0]="TO_PCPF",T[T.FROM_PCPF=1]="FROM_PCPF";const C=(0,s.c)(),O=(0,s.c)(),R=(0,i.c)(),B=(0,a.c)()}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5261],{88764:(e,t,s)=>{s.d(t,{q:()=>l});var i,r,n,a=s(5732),o={exports:{}};i=o,r=function(){function e(s,i,r,n,a){for(;n>r;){if(n-r>600){var o=n-r+1,l=i-r+1,u=Math.log(o),c=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*c*(o-c)/o)*(l-o/2<0?-1:1);e(s,i,Math.max(r,Math.floor(i-l*c/o+h)),Math.min(n,Math.floor(i+(o-l)*c/o+h)),a)}var d=s[i],f=r,p=n;for(t(s,r,i),a(s[n],d)>0&&t(s,r,n);f<p;){for(t(s,f,p),f++,p--;a(s[f],d)<0;)f++;for(;a(s[p],d)>0;)p--}0===a(s[r],d)?t(s,r,p):t(s,++p,n),p<=i&&(r=p+1),i<=p&&(n=p-1)}}function t(e,t,s){var i=e[t];e[t]=e[s],e[s]=i}function s(e,t){return e<t?-1:e>t?1:0}return function(t,i,r,n,a){e(t,i,r||0,n||t.length-1,a||s)}},void 0!==(n=r())&&(i.exports=n);const l=(0,a.g)(o.exports)},37455:(e,t,s)=>{s.d(t,{N:()=>i});const i={convertToGEGeometry:function(e,t){return null==t?null:e.convertJSONToGeometry(t)},exportPoint:function(e,t,s){const i=new r(e.getPointX(t),e.getPointY(t),s),n=e.hasZ(t),a=e.hasM(t);return n&&(i.z=e.getPointZ(t)),a&&(i.m=e.getPointM(t)),i},exportPolygon:function(e,t,s){return new n(e.exportPaths(t),s,e.hasZ(t),e.hasM(t))},exportPolyline:function(e,t,s){return new a(e.exportPaths(t),s,e.hasZ(t),e.hasM(t))},exportMultipoint:function(e,t,s){return new o(e.exportPoints(t),s,e.hasZ(t),e.hasM(t))},exportExtent:function(e,t,s){const i=e.hasZ(t),r=e.hasM(t),n=new l(e.getXMin(t),e.getYMin(t),e.getXMax(t),e.getYMax(t),s);if(i){const s=e.getZExtent(t);n.zmin=s.vmin,n.zmax=s.vmax}if(r){const s=e.getMExtent(t);n.mmin=s.vmin,n.mmax=s.vmax}return n}};class r{constructor(e,t,s){this.x=e,this.y=t,this.spatialReference=s,this.z=void 0,this.m=void 0}}class n{constructor(e,t,s,i){this.rings=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,s&&(this.hasZ=s),i&&(this.hasM=i)}}class a{constructor(e,t,s,i){this.paths=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,s&&(this.hasZ=s),i&&(this.hasM=i)}}class o{constructor(e,t,s,i){this.points=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,s&&(this.hasZ=s),i&&(this.hasM=i)}}class l{constructor(e,t,s,i,r){this.xmin=e,this.ymin=t,this.xmax=s,this.ymax=i,this.spatialReference=r,this.zmin=void 0,this.zmax=void 0,this.mmin=void 0,this.mmax=void 0}}},29730:(e,t,s)=>{function i(e,t){return e?t?4:3:t?3:2}function r(e,t,s,r,o){if(null==t||!t.lengths.length)return null;const l="upperLeft"===o?.originPosition?-1:1;e.lengths.length&&(e.lengths.length=0),e.coords.length&&(e.coords.length=0);const u=e.coords,c=[],h=s?[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY]:[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY],{lengths:d,coords:f}=t,p=i(s,r);let m=0;for(const e of d){const t=n(h,f,m,e,s,r,l);t&&c.push(t),m+=e*p}if(c.sort(((e,t)=>{let i=l*e[2]-l*t[2];return 0===i&&s&&(i=e[4]-t[4]),i})),c.length){let e=6*c[0][2];u[0]=c[0][0]/e,u[1]=c[0][1]/e,s&&(e=6*c[0][4],u[2]=0!==e?c[0][3]/e:0),(u[0]<h[0]||u[0]>h[1]||u[1]<h[2]||u[1]>h[3]||s&&(u[2]<h[4]||u[2]>h[5]))&&(u.length=0)}if(!u.length){const e=t.lengths[0]?a(f,0,d[0],s,r):null;if(!e)return null;u[0]=e[0],u[1]=e[1],s&&e.length>2&&(u[2]=e[2])}return e}function n(e,t,s,r,n,a,o=1){const l=i(n,a);let u=s,c=s+l,h=0,d=0,f=0,p=0,m=0;for(let s=0,i=r-1;s<i;s++,u+=l,c+=l){const s=t[u],i=t[u+1],r=t[u+2],a=t[c],o=t[c+1],l=t[c+2];let g=s*o-a*i;p+=g,h+=(s+a)*g,d+=(i+o)*g,n&&(g=s*l-a*r,f+=(r+l)*g,m+=g),s<e[0]&&(e[0]=s),s>e[1]&&(e[1]=s),i<e[2]&&(e[2]=i),i>e[3]&&(e[3]=i),n&&(r<e[4]&&(e[4]=r),r>e[5]&&(e[5]=r))}if(p*o>0&&(p*=-1),m*o>0&&(m*=-1),!p)return null;const g=[h,d,.5*p];return n&&(g[3]=f,g[4]=.5*m),g}function a(e,t,s,r,n){const a=i(r,n);let h=t,d=t+a,f=0,p=0,m=0,g=0;for(let t=0,i=s-1;t<i;t++,h+=a,d+=a){const t=e[h],s=e[h+1],i=e[h+2],n=e[d],a=e[d+1],_=e[d+2],y=r?l(t,s,i,n,a,_):o(t,s,n,a);if(y)if(f+=y,r){const e=c(t,s,i,n,a,_);p+=y*e[0],m+=y*e[1],g+=y*e[2]}else{const e=u(t,s,n,a);p+=y*e[0],m+=y*e[1]}}return f>0?r?[p/f,m/f,g/f]:[p/f,m/f]:s>0?r?[e[t],e[t+1],e[t+2]]:[e[t],e[t+1]]:null}function o(e,t,s,i){const r=s-e,n=i-t;return Math.sqrt(r*r+n*n)}function l(e,t,s,i,r,n){const a=i-e,o=r-t,l=n-s;return Math.sqrt(a*a+o*o+l*l)}function u(e,t,s,i){return[e+.5*(s-e),t+.5*(i-t)]}function c(e,t,s,i,r,n){return[e+.5*(i-e),t+.5*(r-t),s+.5*(n-s)]}s.d(t,{Y:()=>r})},66202:(e,t,s)=>{s.d(t,{q:()=>De});var i=s(67676),r=s(20102),n=s(22974),a=s(70586),o=s(69801),l=s(95330),u=s(67900),c=s(60437),h=s(24470),d=s(20322),f=s(33955),p=s(16306),m=s(8744),g=s(98732),_=s(35454),y=s(13867),I=s(41534);const S=new class{constructor(e,t){this._cache=new y.z(e),this._invalidCache=new y.z(t)}get(e,t){const s=`${t.uid}:${e}`,i=this._cache.get(s);if(i)return i;if(void 0!==this._invalidCache.get(s))return null;try{const i=I.WhereClause.create(e,t);return this._cache.put(s,i),i}catch{return this._invalidCache.put(s,null),null}}}(50,500),x="feature-store:unsupported-query",E=" as ",R=new _.X({esriFieldTypeString:"string"}),T=new _.X({esriFieldTypeOID:"oid",esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long"}),F=new _.X({esriFieldTypeDate:"date"}),w=new _.X({esriFieldTypeGUID:"guid",esriFieldTypeGlobalId:"global-id"}),b=new Set([...T.jsonValues,...F.jsonValues,...R.jsonValues,...w.jsonValues]),A=new Intl.ListFormat("en-US",{type:"conjunction"}).format([...T.apiValues,...F.apiValues,...R.apiValues,...w.apiValues]);function v(e,t,s={}){const i=C(e,t);if(!i)throw new r.Z(x,"invalid SQL expression",{expression:e});const n=s.expressionName||"expression";if(s.validateStandardized&&!i.isStandardized)throw new r.Z(x,`${n} is not standard`,{expression:e});if(s.validateAggregate&&!i.isAggregate)throw new r.Z(x,`${n} does not contain a valid aggregate function`,{expression:e});return i.fieldNames}function N(e,t,s){if(!t)return!0;const i="having",n=v(t,e,{validateAggregate:!0,expressionName:i});P(e,n,{expressionName:i}),O(e,n,{expressionName:i});const a=S.get(t,e),o=a?.getExpressions().every((t=>{const{aggregateType:i,field:r}=t,n=e.get(r)?.name;return s.some((t=>{const{onStatisticField:s,statisticType:r}=t,a=e.get(s)?.name;return a===n&&r.toLowerCase().trim()===i}))}));if(!o)throw new r.Z(x,"expressions in having should also exist in outStatistics",{having:t});return!0}function C(e,t){return e?S.get(e,t):null}function P(e,t,s={}){s.errorMessage||(s.errorMessage=s.expressionName?`${s.expressionName} contains invalid fields`:"Fields are invalid"),M(e,t,((e,t)=>t.has(e)),s)}function O(e,t,s={}){s.errorMessage||(s.errorMessage=s.expressionName?`${s.expressionName} only supports ${A} field types`:`Only ${A} field types are supported`),M(e,t,((e,t)=>!G(e,t)),s)}function M(e,t,s,i={}){const n=i.verifyExpression??!0,a=[];for(const r of t){const t=s(r,e);if("*"!==r&&!t)if(n){const t=k(r);try{M(e,v(t,e,{validateStandardized:!0}),s,i)}catch(e){const t=e?.details;if(t?.expression)throw e;t?.invalidFields?a.push(...t.invalidFields):a.push(r)}}else a.push(r)}if(a.length)throw new r.Z(x,i.errorMessage,{invalidFields:a})}function k(e){return e.split(E)[0]}function G(e,t,s=b){const i=t.get(e);return!!i&&!s.has(i.type)}var V=s(37427),D=s(61159),L=s(35308),Q=s(49600),U=s(82397),z=s(11490),q=s(24452),Z=s(59266);class j{constructor(e,t,s){this._fieldDataCache=new Map,this._returnDistinctMap=new Map,this.returnDistinctValues=e.returnDistinctValues??!1,this.fieldsIndex=s,this.featureAdapter=t;const i=e.outFields;if(i&&!i.includes("*")){this.outFields=i;let e=0;for(const t of i){const i=k(t),r=this.fieldsIndex.get(i),n=r?null:C(i,s),a=r?r.name:t.split(E)[1]||"FIELD_EXP_"+e++;this._fieldDataCache.set(t,{alias:a,clause:n})}}}countDistinctValues(e){return this.returnDistinctValues?(e.forEach((e=>this.getAttributes(e))),this._returnDistinctMap.size):e.length}getAttributes(e){const t=this._processAttributesForOutFields(e);return this._processAttributesForDistinctValues(t)}getFieldValue(e,t,s){const i=s?s.name:t;let r=null;return this._fieldDataCache.has(i)?r=this._fieldDataCache.get(i)?.clause:s||(r=C(t,this.fieldsIndex),this._fieldDataCache.set(i,{alias:i,clause:r})),s?this.featureAdapter.getAttribute(e,i):r?.calculateValue(e,this.featureAdapter)}getDataValues(e,t){const s=t.normalizationType,i=t.normalizationTotal;return e.map((e=>{let r=t.field&&this.getFieldValue(e,t.field,this.fieldsIndex.get(t.field));if(t.field2&&(r=`${(0,q.wk)(r)}${t.fieldDelimiter}${(0,q.wk)(this.getFieldValue(e,t.field2,this.fieldsIndex.get(t.field2)))}`,t.field3&&(r=`${r}${t.fieldDelimiter}${(0,q.wk)(this.getFieldValue(e,t.field3,this.fieldsIndex.get(t.field3)))}`)),s&&Number.isFinite(r)){const n="field"===s&&t.normalizationField?this.getFieldValue(e,t.normalizationField,this.fieldsIndex.get(t.normalizationField)):null;r=(0,q.fk)(r,s,n,i)}return r}))}async getExpressionValues(e,t,s,i){const{arcadeUtils:r}=await(0,Z.LC)(),n=r.hasGeometryOperations(t);n&&await r.enableGeometryOperations();const a=r.createFunction(t),o=s&&r.getViewInfo(s),l={fields:this.fieldsIndex.fields};return e.map((e=>{const t={attributes:this.featureAdapter.getAttributes(e),layer:l,geometry:n?{...(0,z.Op)(i.geometryType,i.hasZ,i.hasM,this.featureAdapter.getGeometry(e)),spatialReference:s?.spatialReference}:null},u=r.createExecContext(t,o);return r.executeFunction(a,u)}))}validateItem(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:C(t,this.fieldsIndex)}),this._fieldDataCache.get(t)?.clause?.testFeature(e,this.featureAdapter)??!1}validateItems(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:C(t,this.fieldsIndex)}),this._fieldDataCache.get(t)?.clause?.testSet(e,this.featureAdapter)??!1}_processAttributesForOutFields(e){const t=this.outFields;if(!t||!t.length)return this.featureAdapter.getAttributes(e);const s={};for(const i of t){const{alias:t,clause:r}=this._fieldDataCache.get(i);s[t]=r?r.calculateValue(e,this.featureAdapter):this.featureAdapter.getAttribute(e,t)}return s}_processAttributesForDistinctValues(e){if(null==e||!this.returnDistinctValues)return e;const t=this.outFields,s=[];if(t)for(const i of t){const{alias:t}=this._fieldDataCache.get(i);s.push(e[t])}else for(const t in e)s.push(e[t]);const i=`${(t||["*"]).join(",")}=${s.join(",")}`;let r=this._returnDistinctMap.get(i)||0;return this._returnDistinctMap.set(i,++r),r>1?null:e}}function B(e,t,s){return{objectId:e,target:t,distance:s,type:"vertex"}}function Y(e,t,s,i,r,n=!1){return{objectId:e,target:t,distance:s,type:"edge",start:i,end:r,draped:n}}var H=s(35671);class W{constructor(e,t,s){this.items=e,this.query=t,this.geometryType=s.geometryType,this.hasM=s.hasM,this.hasZ=s.hasZ,this.fieldsIndex=s.fieldsIndex,this.objectIdField=s.objectIdField,this.spatialReference=s.spatialReference,this.featureAdapter=s.featureAdapter}get size(){return this.items.length}createQueryResponseForCount(){const e=new j(this.query,this.featureAdapter,this.fieldsIndex);if(!this.query.outStatistics)return e.countDistinctValues(this.items);const{groupByFieldsForStatistics:t,having:s,outStatistics:i}=this.query,r=t?.length;if(!r)return 1;const n=new Map,a=new Map,o=new Set;for(const r of i){const{statisticType:i}=r,l="exceedslimit"!==i?r.onStatisticField:void 0;if(!a.has(l)){const s=[];for(const i of t){const t=this._getAttributeValues(e,i,n);s.push(t)}a.set(l,this._calculateUniqueValues(s,e.returnDistinctValues))}const u=a.get(l);for(const t in u){const{data:i,items:r}=u[t],n=i.join(",");s&&!e.validateItems(r,s)||o.add(n)}}return o.size}async createQueryResponse(){let e;if(e=this.query.outStatistics?this.query.outStatistics.some((e=>"exceedslimit"===e.statisticType))?this._createExceedsLimitQueryResponse(this.query):await this._createStatisticsQueryResponse(this.query):this._createFeatureQueryResponse(this.query),this.query.returnQueryGeometry){const t=this.query.geometry;(0,m.JY)(this.query.outSR)&&!(0,m.fS)(t.spatialReference,this.query.outSR)?e.queryGeometry=(0,z.S2)({spatialReference:this.query.outSR,...(0,V.iV)(t,t.spatialReference,this.query.outSR)}):e.queryGeometry=(0,z.S2)({spatialReference:this.query.outSR,...t})}return e}createSnappingResponse(e,t){const s=this.featureAdapter,i=$(this.hasZ,this.hasM),{point:r,mode:n}=e,a="number"==typeof e.distance?e.distance:e.distance.x,o="number"==typeof e.distance?e.distance:e.distance.y,l={candidates:[]},u="esriGeometryPolygon"===this.geometryType,c=this._getPointCreator(n,this.spatialReference,t),h=new J(null,0),d=new J(null,0),f={x:0,y:0,z:0};for(const t of this.items){const n=s.getGeometry(t);if(null==n)continue;const{coords:p,lengths:m}=n;if(h.coords=p,d.coords=p,e.returnEdge){let e=0;for(let n=0;n<m.length;n++){const u=m[n];for(let n=0;n<u;n++,e+=i){const p=h;if(p.coordsIndex=e,n!==u-1){const n=d;n.coordsIndex=e+i;const u=f;X(f,r,p,n);const h=(r.x-u.x)/a,m=(r.y-u.y)/o,g=h*h+m*m;g<=1&&l.candidates.push(Y(s.getObjectId(t),c(u),Math.sqrt(g),c(p),c(n)))}}}}if(e.returnVertex){const e=u?p.length-i:p.length;for(let n=0;n<e;n+=i){const e=h;e.coordsIndex=n;const i=(r.x-e.x)/a,u=(r.y-e.y)/o,d=i*i+u*u;d<=1&&l.candidates.push(B(s.getObjectId(t),c(e),Math.sqrt(d)))}}}return l.candidates.sort(((e,t)=>e.distance-t.distance)),l}_getPointCreator(e,t,s){const i=null==s||(0,m.fS)(t,s)?e=>e:e=>(0,V.iV)(e,t,s),{hasZ:r}=this;return"3d"===e?r?({x:e,y:t,z:s})=>i({x:e,y:t,z:s}):({x:e,y:t})=>i({x:e,y:t,z:0}):({x:e,y:t})=>i({x:e,y:t})}async createSummaryStatisticsResponse(e){const{field:t,valueExpression:s,normalizationField:i,normalizationType:r,normalizationTotal:n,minValue:a,maxValue:o,scale:l}=e,u=this.fieldsIndex.isDateField(t),c=await this._getDataValues({field:t,valueExpression:s,normalizationField:i,normalizationType:r,normalizationTotal:n,scale:l}),h=(0,q.S5)({normalizationType:r,normalizationField:i,minValue:a,maxValue:o}),d=this.fieldsIndex.get(t),f={value:.5,fieldType:d?.type},p=(0,H.qN)(d)?(0,q.H0)({values:c,supportsNullCount:h,percentileParams:f}):(0,q.i5)({values:c,minValue:a,maxValue:o,useSampleStdDev:!r,supportsNullCount:h,percentileParams:f});return(0,q.F_)(p,u)}async createUniqueValuesResponse(e){const{field:t,valueExpression:s,domains:i,returnAllCodedValues:r,scale:n}=e,a=await this._getDataValues({field:t,field2:e.field2,field3:e.field3,fieldDelimiter:e.fieldDelimiter,valueExpression:s,scale:n}),o=(0,q.eT)(a);return(0,q.Qm)(o,i,r,e.fieldDelimiter)}async createClassBreaksResponse(e){const{field:t,valueExpression:s,normalizationField:i,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c,scale:h}=e,d=await this._getDataValues({field:t,valueExpression:s,normalizationField:i,normalizationType:r,normalizationTotal:n,scale:h}),f=(0,q.G2)(d,{field:t,normalizationField:i,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c});return(0,q.DL)(f,a)}async createHistogramResponse(e){const{field:t,valueExpression:s,normalizationField:i,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c,scale:h}=e,d=await this._getDataValues({field:t,valueExpression:s,normalizationField:i,normalizationType:r,normalizationTotal:n,scale:h});return(0,q.oF)(d,{field:t,normalizationField:i,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c})}_sortFeatures(e,t,s){if(e.length>1&&t&&t.length)for(const i of t.reverse()){const t=i.split(" "),r=t[0],n=this.fieldsIndex.get(r),a=!!t[1]&&"desc"===t[1].toLowerCase(),o=(0,q.Lq)(n?.type,a);e.sort(((e,t)=>{const i=s(e,r,n),a=s(t,r,n);return o(i,a)}))}}_createFeatureQueryResponse(e){const t=this.items,{geometryType:s,hasM:i,hasZ:r,objectIdField:n,spatialReference:a}=this,{outFields:o,outSR:l,quantizationParameters:u,resultRecordCount:c,resultOffset:h,returnZ:d,returnM:f}=e,p=null!=c&&t.length>(h||0)+c,m=o&&(o.includes("*")?[...this.fieldsIndex.fields]:o.map((e=>this.fieldsIndex.get(e))));return{exceededTransferLimit:p,features:this._createFeatures(e,t),fields:m,geometryType:s,hasM:i&&f,hasZ:r&&d,objectIdFieldName:n,spatialReference:(0,z.S2)(l||a),transform:u&&(0,U.vY)(u)||null}}_createFeatures(e,t){const s=new j(e,this.featureAdapter,this.fieldsIndex),{hasM:i,hasZ:r}=this,{orderByFields:n,quantizationParameters:a,returnGeometry:o,returnCentroid:l,maxAllowableOffset:u,resultOffset:c,resultRecordCount:h,returnZ:d=!1,returnM:f=!1}=e,p=r&&d,m=i&&f;let g=[],_=0;const y=[...t];if(this._sortFeatures(y,n,((e,t,i)=>s.getFieldValue(e,t,i))),o||l){const e=(0,U.vY)(a)??void 0;if(o&&!l)for(const t of y)g[_++]={attributes:s.getAttributes(t),geometry:(0,z.Op)(this.geometryType,this.hasZ,this.hasM,this.featureAdapter.getGeometry(t),u,e,p,m)};else if(!o&&l)for(const t of y)g[_++]={attributes:s.getAttributes(t),centroid:(0,z.EG)(this,this.featureAdapter.getCentroid(t,this),e)};else for(const t of y)g[_++]={attributes:s.getAttributes(t),centroid:(0,z.EG)(this,this.featureAdapter.getCentroid(t,this),e),geometry:(0,z.Op)(this.geometryType,this.hasZ,this.hasM,this.featureAdapter.getGeometry(t),u,e,p,m)}}else for(const e of y){const t=s.getAttributes(e);t&&(g[_++]={attributes:t})}const I=c||0;if(null!=h){const e=I+h;g=g.slice(I,Math.min(g.length,e))}return g}_createExceedsLimitQueryResponse(e){let t=!1,s=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY,r=Number.POSITIVE_INFINITY;for(const t of e.outStatistics??[])if("exceedslimit"===t.statisticType){s=null!=t.maxPointCount?t.maxPointCount:Number.POSITIVE_INFINITY,i=null!=t.maxRecordCount?t.maxRecordCount:Number.POSITIVE_INFINITY,r=null!=t.maxVertexCount?t.maxVertexCount:Number.POSITIVE_INFINITY;break}if("esriGeometryPoint"===this.geometryType)t=this.items.length>s;else if(this.items.length>i)t=!0;else{const e=$(this.hasZ,this.hasM),s=this.featureAdapter;t=this.items.reduce(((e,t)=>{const i=s.getGeometry(t);return e+(null!=i&&i.coords.length||0)}),0)/e>r}return{fields:[{name:"exceedslimit",type:"esriFieldTypeInteger",alias:"exceedslimit",sqlType:"sqlTypeInteger",domain:null,defaultValue:null}],features:[{attributes:{exceedslimit:Number(t)}}]}}async _createStatisticsQueryResponse(e){const t={attributes:{}},s=[],i=new Map,r=new Map,n=new Map,a=new Map,o=new j(e,this.featureAdapter,this.fieldsIndex),l=e.outStatistics,{groupByFieldsForStatistics:u,having:c,orderByFields:h}=e,d=u&&u.length,f=!!d,p=f?u[0]:null,m=f&&!this.fieldsIndex.get(p);for(const e of l??[]){const{outStatisticFieldName:l,statisticType:h}=e,g=e,_="exceedslimit"!==h?e.onStatisticField:void 0,y="percentile_disc"===h||"percentile_cont"===h,I="EnvelopeAggregate"===h||"CentroidAggregate"===h||"ConvexHullAggregate"===h,S=f&&1===d&&(_===p||m)&&"count"===h;if(f){if(!n.has(_)){const e=[];for(const t of u){const s=this._getAttributeValues(o,t,i);e.push(s)}n.set(_,this._calculateUniqueValues(e,!I&&o.returnDistinctValues))}const e=n.get(_);for(const t in e){const{count:s,data:r,items:n,itemPositions:h}=e[t],d=r.join(",");if(!c||o.validateItems(n,c)){const e=a.get(d)||{attributes:{}};if(I){e.aggregateGeometries||(e.aggregateGeometries={});const{aggregateGeometries:t,outStatisticFieldName:s}=await this._getAggregateGeometry(g,n);e.aggregateGeometries[s]=t}else{let t=null;if(S)t=s;else{const e=this._getAttributeValues(o,_,i),s=h.map((t=>e[t]));t=y&&"statisticParameters"in g?this._getPercentileValue(g,s):this._getStatisticValue(g,s,null,o.returnDistinctValues)}e.attributes[l]=t}let t=0;u.forEach(((s,i)=>e.attributes[this.fieldsIndex.get(s)?s:"EXPR_"+ ++t]=r[i])),a.set(d,e)}}}else if(I){t.aggregateGeometries||(t.aggregateGeometries={});const{aggregateGeometries:e,outStatisticFieldName:s}=await this._getAggregateGeometry(g,this.items);t.aggregateGeometries[s]=e}else{const e=this._getAttributeValues(o,_,i);t.attributes[l]=y&&"statisticParameters"in g?this._getPercentileValue(g,e):this._getStatisticValue(g,e,r,o.returnDistinctValues)}s.push({name:l,alias:l,type:"esriFieldTypeDouble"})}const g=f?Array.from(a.values()):[t];return this._sortFeatures(g,h,((e,t)=>e.attributes[t])),{fields:s,features:g}}async _getAggregateGeometry(e,t){const{convexHull:i,union:r}=await Promise.all([s.e(5837),s.e(247)]).then(s.bind(s,30247)),{statisticType:n,outStatisticFieldName:a}=e,{featureAdapter:o,spatialReference:l,geometryType:u,hasZ:c,hasM:h}=this,d=t.map((e=>(0,z.Op)(u,c,h,o.getGeometry(e)))),f=i(l,d,!0)[0],p={aggregateGeometries:null,outStatisticFieldName:null};if("EnvelopeAggregate"===n){const e=f?(0,Q._w)(f):(0,Q.aO)(r(l,d));p.aggregateGeometries={...e,spatialReference:l},p.outStatisticFieldName=a||"extent"}else if("CentroidAggregate"===n){const e=f?(0,L.tO)(f):(0,L.$G)((0,Q.aO)(r(l,d)));p.aggregateGeometries={x:e[0],y:e[1],spatialReference:l},p.outStatisticFieldName=a||"centroid"}else"ConvexHullAggregate"===n&&(p.aggregateGeometries=f,p.outStatisticFieldName=a||"convexHull");return p}_getStatisticValue(e,t,s,i){const{onStatisticField:r,statisticType:n}=e;let a=null;return a=s?.has(r)?s.get(r):(0,H.qN)(this.fieldsIndex.get(r))?(0,q.H0)({values:t,returnDistinct:i}):(0,q.i5)({values:i?[...new Set(t)]:t,minValue:null,maxValue:null,useSampleStdDev:!0}),s&&s.set(r,a),a["var"===n?"variance":n]}_getPercentileValue(e,t){const{onStatisticField:s,statisticParameters:i,statisticType:r}=e,{value:n,orderBy:a}=i,o=this.fieldsIndex.get(s);return(0,q.XL)(t,{value:n,orderBy:a,fieldType:o?.type,isDiscrete:"percentile_disc"===r})}_getAttributeValues(e,t,s){if(s.has(t))return s.get(t);const i=this.fieldsIndex.get(t),r=this.items.map((s=>e.getFieldValue(s,t,i)));return s.set(t,r),r}_calculateUniqueValues(e,t){const s={},i=this.items,r=i.length;for(let n=0;n<r;n++){const r=i[n],a=[];for(const t of e)a.push(t[n]);const o=a.join(",");null==s[o]?s[o]={count:1,data:a,items:[r],itemPositions:[n]}:(t||s[o].count++,s[o].items.push(r),s[o].itemPositions.push(n))}return s}async _getDataValues(e){const t=new j(this.query,this.featureAdapter,this.fieldsIndex),{valueExpression:s,scale:i}=e,r=s?{viewingMode:"map",scale:i,spatialReference:this.query.outSR||this.spatialReference}:null;return s?t.getExpressionValues(this.items,s,r,{geometryType:this.geometryType,hasZ:this.hasZ,hasM:this.hasM}):t.getDataValues(this.items,{field:e.field,field2:e.field2,field3:e.field3,fieldDelimiter:e.fieldDelimiter,normalizationField:e.normalizationField,normalizationType:e.normalizationType,normalizationTotal:e.normalizationTotal})}}function X(e,t,s,i){const r=i.x-s.x,n=i.y-s.y,a=r*r+n*n,o=(t.x-s.x)*r+(t.y-s.y)*n,l=Math.min(1,Math.max(0,o/a));e.x=s.x+r*l,e.y=s.y+n*l}function $(e,t){return e?t?4:3:t?3:2}class J{constructor(e,t){this.coords=e,this.coordsIndex=t}get x(){return this.coords[this.coordsIndex]}get y(){return this.coords[this.coordsIndex+1]}get z(){return this.coords[this.coordsIndex+2]}}var K=s(10402),ee=s(17590),te=s(99514),se=s(61247),ie=(s(80442),s(92604)),re=s(54790),ne=s(44553),ae=s(17445),oe=s(58971),le=s(10661);class ue{constructor(e,t){this._observable=new le.s,this._value=e,this._equalityFunction=t}get value(){return(0,oe.it)(this._observable),this._value}set value(e){this._equalityFunction(e,this._value)||(this._value=e,this._observable.notify())}mutate(e){e(this._value),this._observable.notify()}}function ce(e,t=n.y7){return new ue(e,t)}var he=s(76882);class de{constructor(){this._tasks=new Array,this._running=ce(!1)}get length(){return this._tasks.length}get running(){return this._running.value}destroy(){this.cancelAll()}runTask(e){for(;!e.done&&this._process(e);)e.madeProgress()}push(e,t,s){return this._running.value=!0,new Promise(((i,r)=>this._tasks.push(new fe(i,r,e,t,s))))}unshift(e,t,s){return this._running.value=!0,new Promise(((i,r)=>this._tasks.unshift(new fe(i,r,e,t,s))))}_process(e){if(0===this._tasks.length)return!1;const t=this._tasks.shift();try{const s=(0,l.Hc)(t.signal);if(s&&!t.abortCallback)t.reject((0,l.zE)());else{const i=s?t.abortCallback?.((0,l.zE)()):t.callback(e);(0,l.y8)(i)?i.then(t.resolve,t.reject):t.resolve(i)}}catch(e){t.reject(e)}return this._running.value=this._tasks.length>0,!0}cancelAll(){const e=(0,l.zE)();for(const t of this._tasks)if(t.abortCallback){const s=t.abortCallback(e);t.resolve(s)}else t.reject(e);this._tasks.length=0,this._running.value=!1}}class fe{constructor(e,t,s,i=void 0,r=void 0){this.resolve=e,this.reject=t,this.callback=s,this.signal=i,this.abortCallback=r}}var pe=s(43697),me=s(92036),ge=s(5600),_e=(s(75215),s(52011));let ye=class extends me.Z{constructor(){super(...arguments),this.SCHEDULER_LOG_SLOW_TASKS=!1,this.FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES=!1}};(0,pe._)([(0,ge.Cb)()],ye.prototype,"SCHEDULER_LOG_SLOW_TASKS",void 0),(0,pe._)([(0,ge.Cb)()],ye.prototype,"FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES",void 0),ye=(0,pe._)([(0,_e.j)("esri.views.support.DebugFlags")],ye);const Ie=new ye;var Se,xe,Ee,Re;!function(e){e[e.ANIMATING=0]="ANIMATING",e[e.INTERACTING=1]="INTERACTING",e[e.IDLE=2]="IDLE"}(Se||(Se={})),(Re=xe||(xe={}))[Re.YIELD=1]="YIELD",function(e){e.RESOURCE_CONTROLLER_IMMEDIATE="immediate",e.RESOURCE_CONTROLLER="schedule",e.SLIDE="slide",e.STREAM_DATA_LOADER="stream loader",e.ELEVATION_QUERY="elevation query",e.TERRAIN_SURFACE="terrain",e.SURFACE_GEOMETRY_UPDATES="surface geometry updates",e.LOD_RENDERER="LoD renderer",e.GRAPHICS_CORE="Graphics3D",e.I3S_CONTROLLER="I3S",e.POINT_CLOUD_LAYER="point cloud",e.FEATURE_TILE_FETCHER="feature fetcher",e.OVERLAY="overlay",e.STAGE="stage",e.GRAPHICS_DECONFLICTOR="graphics deconflictor",e.FILTER_VISIBILITY="Graphics3D filter visibility",e.SCALE_VISIBILITY="Graphics3D scale visibility",e.FRUSTUM_VISIBILITY="Graphics3D frustum visibility",e.POINT_OF_INTEREST_FREQUENT="POI frequent",e.POINT_OF_INTEREST_INFREQUENT="POI infrequent",e.LABELER="labeler",e.FEATURE_QUERY_ENGINE="feature query",e.FEATURE_TILE_TREE="feature tile tree",e.FEATURE_TILE_TREE_ACTIVE="fast feature tile tree",e.ELEVATION_ALIGNMENT="elevation alignment",e.TEXT_TEXTURE_ATLAS="text texture atlas",e.TEXTURE_UNLOAD="texture unload",e.LINE_OF_SIGHT_TOOL="line of sight tool",e.LINE_OF_SIGHT_TOOL_INTERACTIVE="interactive line of sight tool",e.ELEVATION_PROFILE="elevation profile",e.SNAPPING="snapping",e.SHADOW_ACCUMULATOR="shadow accumulator",e.CLOUDS_GENERATOR="clouds generator",e[e.NONE=0]="NONE",e[e.TEST_PRIO=1]="TEST_PRIO"}(Ee||(Ee={}));const Te=new Map([[Ee.RESOURCE_CONTROLLER_IMMEDIATE,0],[Ee.RESOURCE_CONTROLLER,4],[Ee.SLIDE,0],[Ee.STREAM_DATA_LOADER,0],[Ee.ELEVATION_QUERY,0],[Ee.TERRAIN_SURFACE,1],[Ee.SURFACE_GEOMETRY_UPDATES,1],[Ee.LOD_RENDERER,2],[Ee.GRAPHICS_CORE,2],[Ee.I3S_CONTROLLER,2],[Ee.POINT_CLOUD_LAYER,2],[Ee.FEATURE_TILE_FETCHER,2],[Ee.OVERLAY,4],[Ee.STAGE,4],[Ee.GRAPHICS_DECONFLICTOR,4],[Ee.FILTER_VISIBILITY,4],[Ee.SCALE_VISIBILITY,4],[Ee.FRUSTUM_VISIBILITY,4],[Ee.CLOUDS_GENERATOR,4],[Ee.POINT_OF_INTEREST_FREQUENT,6],[Ee.POINT_OF_INTEREST_INFREQUENT,30],[Ee.LABELER,8],[Ee.FEATURE_QUERY_ENGINE,8],[Ee.FEATURE_TILE_TREE,16],[Ee.FEATURE_TILE_TREE_ACTIVE,0],[Ee.ELEVATION_ALIGNMENT,12],[Ee.TEXT_TEXTURE_ATLAS,12],[Ee.TEXTURE_UNLOAD,12],[Ee.LINE_OF_SIGHT_TOOL,16],[Ee.LINE_OF_SIGHT_TOOL_INTERACTIVE,0],[Ee.SNAPPING,0],[Ee.SHADOW_ACCUMULATOR,30]]);function Fe(e){return Te.has(e)?Te.get(e):"number"==typeof e?e:1}const we=(0,he.HA)(6.5),be=(0,he.HA)(1),Ae=(0,he.HA)(30),ve=(0,he.HA)(1e3/30),Ne=(0,he.HA)(100);var Ce,Pe;!function(e){e.Scheduler=class{get updating(){return this._updating.value}_updatingChanged(){this._updating.value=this._tasks.some((e=>e.needsUpdate))}constructor(){this._updating=ce(!0),this._microTaskQueued=!1,this._frameNumber=0,this.performanceInfo={total:new re.Z("total"),tasks:new Map},this._frameTaskTimes=new Map,this._budget=new s,this._state=Se.INTERACTING,this._tasks=new ne.Z,this._runQueue=new ne.Z,this._load=0,this._idleStateCallbacks=new ne.Z,this._idleUpdatesStartFired=!1,this._forceTask=!1,this._debug=!1,this._debugHandle=(0,ae.YP)((()=>Ie.SCHEDULER_LOG_SLOW_TASKS),(e=>this._debug=e),ae.nn);for(const e of Object.keys(Ee))this.performanceInfo.tasks.set(Ee[e],new re.Z(Ee[e]));const e=this;this._test={FRAME_SAFETY_BUDGET:we,INTERACTING_BUDGET:ve,IDLE_BUDGET:Ne,get availableBudget(){return e._budget.budget},usedBudget:0,getBudget:()=>e._budget,setBudget:t=>e._budget=t,updateTask:e=>this._updateTask(e),getState:e=>this._getState(e),getRuntime:e=>this._getRuntime(e),frameTaskTimes:this._frameTaskTimes,resetRuntimes:()=>this._resetRuntimes(),getRunning:()=>this._getRunning()}}destroy(){this._tasks.toArray().forEach((e=>e.remove())),this._tasks.clear(),(0,a.hw)(this._debugHandle),this._microTaskQueued=!1,this._updatingChanged()}taskRunningChanged(e){this._updatingChanged(),e&&this._budget.remaining>0&&!this._microTaskQueued&&(this._microTaskQueued=!0,queueMicrotask((()=>{this._microTaskQueued&&(this._microTaskQueued=!1,this._budget.remaining>0&&this._schedule()&&this.frame())})))}registerTask(e,s){const i=Fe(e),r=new t(this,e,s,i);return this._tasks.push(r),this._updatingChanged(),this.performanceInfo.tasks.has(e)||this.performanceInfo.tasks.set(e,new re.Z(e)),r}registerIdleStateCallbacks(e,t){const s={idleBegin:e,idleEnd:t};this._idleStateCallbacks.push(s),this.state===Se.IDLE&&this._idleUpdatesStartFired&&s.idleBegin();const i=this;return{remove:()=>this._removeIdleStateCallbacks(s),set idleBegin(e){i._idleUpdatesStartFired&&(s.idleEnd(),i._state===Se.IDLE&&e()),s.idleBegin=e},set idleEnd(e){s.idleEnd=e}}}get load(){return this._load}set state(e){this._state!==e&&(this._state=e,this.state!==Se.IDLE&&this._idleUpdatesStartFired&&(this._idleUpdatesStartFired=!1,this._idleStateCallbacks.forAll((e=>e.idleEnd()))))}get state(){return this._state}updateBudget(e){this._test.usedBudget=0,++this._frameNumber;let t=we,s=e.frameDuration,i=be;switch(this.state){case Se.IDLE:t=(0,he.HA)(0),s=(0,he.HA)(Math.max(Ne,e.frameDuration)),i=Ae;break;case Se.INTERACTING:s=(0,he.HA)(Math.max(ve,e.frameDuration));case Se.ANIMATING:}return s=(0,he.HA)(s-e.elapsedFrameTime-t),this.state!==Se.IDLE&&s<be&&!this._forceTask?(this._forceTask=!0,!1):(s=(0,he.HA)(Math.max(s,i)),this._budget.reset(s,this.state),this._updateLoad(),this._schedule())}frame(){switch(this._forceTask=!1,this._microTaskQueued=!1,this.state){case Se.IDLE:this._idleUpdatesStartFired||(this._idleUpdatesStartFired=!0,this._idleStateCallbacks.forAll((e=>e.idleBegin()))),this._runIdle();break;case Se.INTERACTING:this._runInteracting();break;default:this._runAnimating()}this._test.usedBudget=this._budget.elapsed}stopFrame(){this._budget.reset((0,he.HA)(0),this._state),this._budget.madeProgress()}_removeIdleStateCallbacks(e){this._idleUpdatesStartFired&&e.idleEnd(),this._idleStateCallbacks.removeUnordered(e)}removeTask(e){this._tasks.removeUnordered(e),this._runQueue.removeUnordered(e),this._updatingChanged()}_updateTask(e){this._tasks.forAll((t=>{t.name===e&&t.setPriority(e)}))}_getState(e){if(this._runQueue.some((t=>t.name===e)))return Pe.SCHEDULED;let t=Pe.IDLE;return this._tasks.forAll((s=>{s.name===e&&s.needsUpdate&&(s.schedulePriority<=1?t=Pe.READY:t!==Pe.READY&&(t=Pe.WAITING))})),t}_getRuntime(e){let t=0;return this._tasks.forAll((s=>{s.name===e&&(t+=s.runtime)})),t}_resetRuntimes(){this._tasks.forAll((e=>e.runtime=0))}_getRunning(){const e=new Map;if(this._tasks.forAll((t=>{t.needsUpdate&&e.set(t.name,(e.get(t.name)||0)+1)})),0===e.size)return null;let t="";return e.forEach(((e,s)=>{t+=e>1?` ${e}x ${s}`:` ${s}`})),t}_runIdle(){this._run()}_runInteracting(){this._run()}_runAnimating(){this._run()}_updateLoad(){const e=this._tasks.reduce(((e,t)=>t.needsUpdate?++e:e),0);this._load=.9*this._load+e*(1-.9)}_schedule(){for(this._runQueue.filterInPlace((e=>!!e.needsUpdate||(e.schedulePriority=e.basePriority,!1))),this._tasks.forAll((e=>{0===e.basePriority&&e.needsUpdate&&!this._runQueue.includes(e)&&e.blockFrame!==this._frameNumber&&this._runQueue.unshift(e)}));0===this._runQueue.length;){let e=!1,t=0;if(this._tasks.forAll((s=>{s.needsUpdate&&0!==s.schedulePriority&&0!==s.basePriority&&s.blockFrame!==this._frameNumber&&(e=!0,t=Math.max(t,s.basePriority),1===s.schedulePriority?(s.schedulePriority=0,this._runQueue.push(s)):--s.schedulePriority)})),!e)return this._updatingChanged(),!1}return this._updatingChanged(),!0}_run(){const e=this._budget.now();this._startFrameTaskTimes();do{for(;this._runQueue.length>0;){const t=this._budget.now(),s=this._runQueue.pop();this._budget.resetProgress();try{s.task.runTask(this._budget)===xe.YIELD&&(s.blockFrame=this._frameNumber)}catch(e){ie.Z.getLogger("esri.views.support.Scheduler").error(`Exception in task "${s.name}"`,e)}!this._budget.hasProgressed&&s.blockFrame!==this._frameNumber&&s.needsUpdate&&(s.name,Ee.I3S_CONTROLLER,s.blockFrame=this._frameNumber),s.schedulePriority=s.basePriority;const i=this._budget.now()-t;if(s.runtime+=i,this._frameTaskTimes.set(s.priority,this._frameTaskTimes.get(s.priority)+i),this._debug&&i>2*this._budget.budget&&console.log("Task",s.name,"used",i,"of max",this._budget.budget,"ms"),this._budget.remaining<=0)return this._updatingChanged(),void this._recordFrameTaskTimes(this._budget.now()-e)}}while(this._schedule());this._updatingChanged(),this._recordFrameTaskTimes(this._budget.now()-e)}_startFrameTaskTimes(){for(const e of Object.keys(Ee))this._frameTaskTimes.set(Ee[e],0)}_recordFrameTaskTimes(e){this._frameTaskTimes.forEach(((e,t)=>this.performanceInfo.tasks.get(t).record(e))),this.performanceInfo.total.record(e)}get test(){return this._test}};class t{get task(){return this._task.value}get updating(){return this._queue.running}constructor(e,t,s,i){this._scheduler=e,this.name=t,this._basePriority=i,this.blockFrame=0,this.runtime=0,this._queue=new de,this._handles=new se.Z,this.schedulePriority=this._basePriority,this._task=ce(null!=s?s:this._queue),this._handles.add((0,ae.gx)((()=>this.task.running),(t=>e.taskRunningChanged(t))))}remove(){this.processQueue(Oe),this._scheduler.removeTask(this),this.schedule=Me.schedule,this.reschedule=Me.reschedule,this._handles.destroy()}get basePriority(){return this._basePriority}setPriority(e){this.name=e;const t=Fe(e);0!==this._basePriority&&0===this.schedulePriority||(this.schedulePriority=t),this._basePriority=t}get priority(){return this.name}set priority(e){this.setPriority(e)}get needsUpdate(){return this.updating||this.task.running}schedule(e,t,s){return this._queue.push(e,t,s)}reschedule(e,t,s){return this._queue.unshift(e,t,s)}processQueue(e){this._queue.runTask(e)}}class s{constructor(){this._begin="undefined"!=typeof performance?performance.now():0,this._budget=0,this._state=Se.IDLE,this._done=!1,this._progressed=!1,this._enabled=!0}run(e){return!this.done&&(!0===e()&&this.madeProgress(),!0)}get done(){return this._done}get budget(){return this._budget}madeProgress(){return this._progressed=!0,this._done=this.elapsed>=this._budget&&this._enabled,this._done}get state(){return this._state}get enabled(){return this._enabled}set enabled(e){this._enabled=e}reset(e,t){this._begin=this.now(),this._budget=e,this._state=t,this.resetProgress()}get remaining(){return Math.max(this._budget-this.elapsed,0)}now(){return performance.now()}get elapsed(){return performance.now()-this._begin}resetProgress(){this._progressed=!1,this._done=!1}get hasProgressed(){return this._progressed}}e.Budget=s}(Ce||(Ce={})),function(e){e.SCHEDULED="s",e.READY="r",e.WAITING="w",e.IDLE="i"}(Pe||(Pe={}));const Oe=(()=>{const e=new Ce.Budget;return e.enabled=!1,e})(),Me=new class{remove(){}processQueue(){}schedule(e,t,s){try{if((0,l.Hc)(t)){const e=(0,l.zE)();return s?Promise.resolve(s(e)):Promise.reject(e)}return(0,l.gx)(e(Oe))}catch(e){return Promise.reject(e)}}reschedule(e,t,s){return this.schedule(e,t,s)}},ke="feature-store:unsupported-query",Ge=new o.WJ(2e6);let Ve=0;class De{constructor(e){this._geometryQueryCache=null,this._changeHandle=null,this.capabilities={query:D.g},this.geometryType=e.geometryType,this.hasM=!!e.hasM,this.hasZ=!!e.hasZ,this.objectIdField=e.objectIdField,this.spatialReference=e.spatialReference,this.definitionExpression=e.definitionExpression,this.featureStore=e.featureStore,this.aggregateAdapter=e.aggregateAdapter,this._changeHandle=this.featureStore.events.on("changed",(()=>this.clearCache())),this.timeInfo=e.timeInfo,e.cacheSpatialQueries&&(this._geometryQueryCache=new o.Xq(Ve+++"$$",Ge)),this.fieldsIndex=new te.Z(e.fields),e.scheduler&&e.priority&&(this._frameTask=e.scheduler.registerTask(e.priority))}destroy(){this._frameTask=(0,a.hw)(this._frameTask),this.clearCache(),(0,a.SC)(this._geometryQueryCache),this._changeHandle=(0,a.hw)(this._changeHandle),(0,a.SC)(this.fieldsIndex)}get featureAdapter(){return this.featureStore.featureAdapter}clearCache(){this._geometryQueryCache?.clear(),this._allFeaturesPromise=null,this._timeExtentPromise=null}async executeQuery(e,t){try{return(await this._executeQuery(e,{},t)).createQueryResponse()}catch(t){if(t!==z.vF)throw t;return new W([],e,this).createQueryResponse()}}async executeQueryForCount(e={},t){try{return(await this._executeQuery(e,{returnGeometry:!1,returnCentroid:!1,outSR:null},t)).createQueryResponseForCount()}catch(e){if(e!==z.vF)throw e;return 0}}async executeQueryForExtent(e,t){const s=e.outSR;try{const i=await this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null},t),r=i.size;return r?{count:r,extent:await this._getBounds(i.items,i.spatialReference,s||this.spatialReference)}:{count:0,extent:null}}catch(e){if(e===z.vF)return{count:0,extent:null};throw e}}async executeQueryForIds(e,t){return this.executeQueryForIdSet(e,t).then((e=>Array.from(e)))}async executeQueryForIdSet(e,t){try{const s=await this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null},t),i=s.items,r=new Set;return await this._reschedule((()=>{for(const e of i)r.add(s.featureAdapter.getObjectId(e))}),t),r}catch(e){if(e===z.vF)return new Set;throw e}}async executeQueryForSnapping(e,t){const{point:s,distance:i,returnEdge:r,returnVertex:n}=e;if(!r&&!n)return{candidates:[]};const a=await this._reschedule((()=>this._checkQuerySupport(e.query)),t),o=!(0,m.fS)(s.spatialReference,this.spatialReference);o&&await(0,V._W)(s.spatialReference,this.spatialReference);const l="number"==typeof i?i:i.x,u="number"==typeof i?i:i.y,c={xmin:s.x-l,xmax:s.x+l,ymin:s.y-u,ymax:s.y+u,spatialReference:s.spatialReference},h=o?(0,V.iV)(c,this.spatialReference):c;if(!h)return{candidates:[]};const d=(await(0,p.aX)((0,f.im)(s),null,{signal:t}))[0],g=(await(0,p.aX)((0,f.im)(h),null,{signal:t}))[0];if(null==d||null==g)return{candidates:[]};const _=new W(await this._reschedule((()=>this._searchFeatures(this._getQueryBBoxes(g.toJSON()))),t),a,this);await this._reschedule((()=>this._executeObjectIdsQuery(_)),t),await this._reschedule((()=>this._executeTimeQuery(_)),t),await this._reschedule((()=>this._executeAttributesQuery(_)),t);const y=d.toJSON(),I=o?(0,V.iV)(y,this.spatialReference):y,S=o?Math.max(h.xmax-h.xmin,h.ymax-h.ymin)/2:i;return _.createSnappingResponse({...e,point:I,distance:S},s.spatialReference)}async executeQueryForLatestObservations(e,t){if(!this.timeInfo||!this.timeInfo.trackIdField)throw new r.Z(ke,"Missing timeInfo or timeInfo.trackIdField",{query:e,timeInfo:this.timeInfo});try{const s=await this._executeQuery(e,{},t);return await this._reschedule((()=>this._filterLatest(s)),t),s.createQueryResponse()}catch(t){if(t!==z.vF)throw t;return new W([],e,this).createQueryResponse()}}async executeQueryForSummaryStatistics(e={},t,s){const{field:i,normalizationField:r,valueExpression:n}=t;return(await this._getQueryEngineResultForStats(e,{field:i,normalizationField:r,valueExpression:n},s)).createSummaryStatisticsResponse(t)}async executeQueryForUniqueValues(e={},t,s){const{field:i,field2:r,field3:n,valueExpression:a}=t;return(await this._getQueryEngineResultForStats(e,{field:i,field2:r,field3:n,valueExpression:a},s)).createUniqueValuesResponse(t)}async executeQueryForClassBreaks(e={},t,s){const{field:i,normalizationField:r,valueExpression:n}=t;return(await this._getQueryEngineResultForStats(e,{field:i,normalizationField:r,valueExpression:n},s)).createClassBreaksResponse(t)}async executeQueryForHistogram(e={},t,s){const{field:i,normalizationField:r,valueExpression:n}=t;return(await this._getQueryEngineResultForStats(e,{field:i,normalizationField:r,valueExpression:n},s)).createHistogramResponse(t)}async fetchRecomputedExtents(e){const[t,s]=await Promise.all(["getFullExtent"in this.featureStore&&this.featureStore.getFullExtent?Promise.resolve(this.featureStore.getFullExtent(this.spatialReference)):this._getBounds(await this._getAllFeatures(),this.spatialReference,this.spatialReference),null!=this._timeExtentPromise?this._timeExtentPromise:this._timeExtentPromise=(0,ee.R)(this.timeInfo,this.featureStore)]);return(0,l.k_)(e),{fullExtent:t,timeExtent:s}}async _getBounds(e,t,s){const i=(0,c.t8)((0,c.Ue)(),c.Gv);await this.featureStore.forEachBounds(e,(e=>(0,c.TC)(i,e)));const r={xmin:i[0],ymin:i[1],xmax:i[3],ymax:i[4],spatialReference:(0,z.S2)(this.spatialReference)};this.hasZ&&isFinite(i[2])&&isFinite(i[5])&&(r.zmin=i[2],r.zmax=i[5]);const n=(0,V.iV)(r,t,s);if(n.spatialReference=(0,z.S2)(s),n.xmax-n.xmin==0){const e=(0,u.c9)(n.spatialReference);n.xmin-=e,n.xmax+=e}if(n.ymax-n.ymin==0){const e=(0,u.c9)(n.spatialReference);n.ymin-=e,n.ymax+=e}if(this.hasZ&&null!=n.zmin&&null!=n.zmax&&n.zmax-n.zmin==0){const e=(0,u.c9)(n.spatialReference);n.zmin-=e,n.zmax+=e}return n}async _schedule(e,t){return null!=this._frameTask?this._frameTask.schedule(e,t):e(Oe)}async _reschedule(e,t){return null!=this._frameTask?this._frameTask.reschedule(e,t):e(Oe)}async _getAllFeaturesQueryEngineResult(e){return new W(await this._getAllFeatures(),e,this)}async _getAllFeatures(){if(null==this._allFeaturesPromise){const e=[];this._allFeaturesPromise=(async()=>{await this.featureStore.forEach((t=>e.push(t)))})().then((()=>e))}const e=this._allFeaturesPromise,t=await e;return e===this._allFeaturesPromise?t.slice():this._getAllFeatures()}async _executeQuery(e,t,s){e=(0,n.d9)(e),e=await this._schedule((()=>(0,z.Up)(e,this.definitionExpression,this.spatialReference)),s),e=await this._reschedule((()=>this._checkQuerySupport(e)),s),e={...e,...t};const i=await this._reschedule((()=>this._executeSceneFilterQuery(e,s)),s),r=await this._reschedule((()=>this._executeGeometryQuery(e,i,s)),s);return await this._reschedule((()=>this._executeAggregateIdsQuery(r)),s),await this._reschedule((()=>this._executeObjectIdsQuery(r)),s),await this._reschedule((()=>this._executeTimeQuery(r)),s),await this._reschedule((()=>this._executeAttributesQuery(r)),s),r}async _executeSceneFilterQuery(e,t){if(null==e.sceneFilter)return null;const{outSR:s,returnGeometry:i,returnCentroid:r}=e,n=this.featureStore.featureSpatialReference,a=e.sceneFilter.geometry,o=null==n||(0,m.fS)(n,a.spatialReference)?a:(0,V.iV)(a,n);if(!o)return null;const l=i||r,u=(0,m.JY)(s)&&!(0,m.fS)(this.spatialReference,s)&&l?async e=>this._project(e,s):e=>e,c=this.featureAdapter,h=await this._reschedule((()=>this._searchFeatures(this._getQueryBBoxes(o))),t);if("disjoint"===e.sceneFilter.spatialRelationship){if(!h.length)return null;const s=new Set;for(const e of h)s.add(c.getObjectId(e));const i=await this._reschedule((()=>this._getAllFeatures()),t),r=await this._reschedule((async()=>{const r=await(0,K.cW)("esriSpatialRelDisjoint",o,this.geometryType,this.hasZ,this.hasM),n=await this._runSpatialFilter(i,(e=>!s.has(c.getObjectId(e))||r(c.getGeometry(e))),t);return new W(n,e,this)}),t);return u(r)}if(!h.length)return new W([],e,this);if(this._canExecuteSinglePass(o,e))return u(new W(h,e,this));const d=await(0,K.cW)("esriSpatialRelContains",o,this.geometryType,this.hasZ,this.hasM),f=await this._runSpatialFilter(h,(e=>d(c.getGeometry(e))),t);return u(new W(f,e,this))}async _executeGeometryQuery(e,t,s){if(null!=t&&0===t.items.length)return t;e=null!=t?t.query:e;const{geometry:r,outSR:n,spatialRel:a,returnGeometry:o,returnCentroid:l}=e,u=this.featureStore.featureSpatialReference,c=!r||null==u||(0,m.fS)(u,r.spatialReference)?r:(0,V.iV)(r,u),h=o||l,d=(0,m.JY)(n)&&!(0,m.fS)(this.spatialReference,n),f=this._geometryQueryCache&&null==t?d&&h?JSON.stringify({originalFilterGeometry:r,spatialRelationship:a,outSpatialReference:n}):JSON.stringify({originalFilterGeometry:r,spatialRelationship:a}):null,p=f?this._geometryQueryCache.get(f):null;if(null!=p)return new W(p,e,this);const g=async e=>(d&&h&&await this._project(e,n),f&&this._geometryQueryCache.put(f,e.items,e.items.length+1),e);if(!c)return g(null!=t?t:await this._getAllFeaturesQueryEngineResult(e));const _=this.featureAdapter;let y=await this._reschedule((()=>this._searchFeatures(this._getQueryBBoxes(r))),s);if("esriSpatialRelDisjoint"===a){if(!y.length)return g(null!=t?t:await this._getAllFeaturesQueryEngineResult(e));const i=new Set;for(const e of y)i.add(_.getObjectId(e));const r=null!=t?t.items:await this._reschedule((()=>this._getAllFeatures()),s),n=await this._reschedule((async()=>{const t=await(0,K.cW)(a,c,this.geometryType,this.hasZ,this.hasM),n=await this._runSpatialFilter(r,(e=>!i.has(_.getObjectId(e))||t(_.getGeometry(e))),s);return new W(n,e,this)}),s);return g(n)}if(null!=t){const e=new i.SO;y=y.filter((s=>(0,i.cq)(t.items,s,t.items.length,e)>=0))}if(!y.length){const t=new W([],e,this);return f&&this._geometryQueryCache.put(f,t.items,1),t}if(this._canExecuteSinglePass(c,e))return g(new W(y,e,this));const I=await(0,K.cW)(a,c,this.geometryType,this.hasZ,this.hasM),S=await this._runSpatialFilter(y,(e=>I(_.getGeometry(e))),s);return g(new W(S,e,this))}_executeAggregateIdsQuery(e){if(0===e.items.length||!e.query.aggregateIds||!e.query.aggregateIds.length||null==this.aggregateAdapter)return;const t=new Set;for(const s of e.query.aggregateIds)this.aggregateAdapter.getFeatureObjectIds(s).forEach((e=>t.add(e)));const s=this.featureAdapter.getObjectId;e.items=e.items.filter((e=>t.has(s(e))))}_executeObjectIdsQuery(e){if(0===e.items.length||!e.query.objectIds||!e.query.objectIds.length)return;const t=new Set(e.query.objectIds),s=this.featureAdapter.getObjectId;e.items=e.items.filter((e=>t.has(s(e))))}_executeTimeQuery(e){if(0===e.items.length)return;const t=(0,ee.y)(this.timeInfo,e.query.timeExtent,this.featureAdapter);null!=t&&(e.items=e.items.filter(t))}_executeAttributesQuery(e){if(0===e.items.length)return;const t=C(e.query.where,this.fieldsIndex);if(t){if(!t.isStandardized)throw new TypeError("Where clause is not standardized");e.items=e.items.filter((e=>t.testFeature(e,this.featureAdapter)))}}async _runSpatialFilter(e,t,s){if(!t)return e;if(null==this._frameTask)return e.filter((e=>t(e)));let i=0;const r=new Array,n=async a=>{for(;i<e.length;){const o=e[i++];t(o)&&(r.push(o),a.madeProgress()),a.done&&await this._reschedule((e=>n(e)),s)}};return this._reschedule((e=>n(e)),s).then((()=>r))}_filterLatest(e){const{trackIdField:t,startTimeField:s,endTimeField:i}=this.timeInfo,r=i||s,n=new Map,a=this.featureAdapter.getAttribute;for(const s of e.items){const e=a(s,t),i=a(s,r),o=n.get(e);(!o||i>a(o,r))&&n.set(e,s)}e.items=Array.from(n.values())}_canExecuteSinglePass(e,t){const{spatialRel:s}=t;return(0,K.hN)(e)&&("esriSpatialRelEnvelopeIntersects"===s||"esriGeometryPoint"===this.geometryType&&("esriSpatialRelIntersects"===s||"esriSpatialRelContains"===s||"esriSpatialRelWithin"===s))}async _project(e,t){if(!t||(0,m.fS)(this.spatialReference,t))return e;const s=this.featureAdapter,i=await(0,V.oj)(e.items.map((e=>(0,z.Op)(this.geometryType,this.hasZ,this.hasM,s.getGeometry(e)))),this.spatialReference,t);return e.items=i.map(((t,i)=>s.cloneWithGeometry(e.items[i],(0,g.GH)(t,this.hasZ,this.hasM)))),e}_getQueryBBoxes(e){if((0,K.hN)(e)){if((0,f.YX)(e))return[(0,h.al)(e.xmin,e.ymin,e.xmax,e.ymax)];if((0,f.oU)(e))return e.rings.map((e=>(0,h.al)(Math.min(e[0][0],e[2][0]),Math.min(e[0][1],e[2][1]),Math.max(e[0][0],e[2][0]),Math.max(e[0][1],e[2][1]))))}return[(0,d.$P)((0,h.Ue)(),e)]}async _searchFeatures(e){const t=new Set;await Promise.all(e.map((e=>this.featureStore.forEachInBounds(e,(e=>t.add(e))))));const s=Array.from(t.values());return t.clear(),s}async _checkStatisticsSupport(e,t){if((e.distance??0)<0||null!=e.geometryPrecision||e.multipatchOption||e.pixelSize||e.relationParam||e.text||e.outStatistics||e.groupByFieldsForStatistics||e.having||e.orderByFields)throw new r.Z(ke,"Unsupported query options",{query:e});return this._checkAttributesQuerySupport(e),Promise.all([this._checkStatisticsParamsSupport(t),(0,K.P0)(e,this.geometryType,this.spatialReference),(0,V._W)(this.spatialReference,e.outSR)]).then((()=>e))}async _checkStatisticsParamsSupport(e){let t=[];if(e.valueExpression){const{arcadeUtils:s}=await(0,Z.LC)();t=s.extractFieldNames(e.valueExpression)}if(e.field&&t.push(e.field),e.field2&&t.push(e.field2),e.field3&&t.push(e.field3),e.normalizationField&&t.push(e.normalizationField),!t.length&&!e.valueExpression)throw new r.Z(ke,"field or valueExpression is required",{params:e});P(this.fieldsIndex,t,{errorMessage:"Cannot calculate statistics for missing fields"}),O(this.fieldsIndex,t,{expressionName:"statistics"})}async _checkQuerySupport(e){if((e.distance??0)<0||null!=e.geometryPrecision||e.multipatchOption||e.pixelSize||e.relationParam||e.text)throw new r.Z(ke,"Unsupported query options",{query:e});return this._checkAttributesQuerySupport(e),this._checkStatisticsQuerySupport(e),Promise.all([(0,K.P0)(e,this.geometryType,this.spatialReference),(0,V._W)(this.spatialReference,e.outSR)]).then((()=>e))}_checkAttributesQuerySupport(e){const{outFields:t,orderByFields:s,returnDistinctValues:i,outStatistics:n}=e,a=n?n.map((e=>e.outStatisticFieldName&&e.outStatisticFieldName.toLowerCase())).filter(Boolean):[];if(s&&s.length>0){const e=" asc",t=" desc",i=s.map((s=>{const i=s.toLowerCase();return i.includes(e)?i.split(e)[0]:i.includes(t)?i.split(t)[0]:s})).filter((e=>!a.includes(e)));P(this.fieldsIndex,i,{expressionName:"orderByFields"})}if(t&&t.length>0)P(this.fieldsIndex,t,{expressionName:"outFields"});else if(i)throw new r.Z(ke,"outFields should be specified for returnDistinctValues",{query:e});!function(e,t){if(!t)return!0;const s="where clause",i=v(t,e,{validateStandardized:!0,expressionName:s});P(e,i,{expressionName:s}),O(e,i,{expressionName:s})}(this.fieldsIndex,e.where)}_checkStatisticsQuerySupport(e){const{outStatistics:t,groupByFieldsForStatistics:s,having:i}=e,n=s&&s.length,a=t&&t.length;if(i){if(!n||!a)throw new r.Z(ke,"outStatistics and groupByFieldsForStatistics should be specified with having",{query:e});N(this.fieldsIndex,i,t)}if(a){if(!function(e){return null!=e&&e.every((e=>"exceedslimit"!==e.statisticType))}(t))return;const i=t.map((e=>e.onStatisticField)).filter(Boolean);P(this.fieldsIndex,i,{expressionName:"onStatisticFields"}),n&&P(this.fieldsIndex,s,{expressionName:"groupByFieldsForStatistics"});const a=new Set([...T.jsonValues,...F.jsonValues]),o=new Intl.ListFormat("en-US",{type:"conjunction"}).format([...T.apiValues,...F.apiValues]);for(const s of t){const{onStatisticField:t,statisticType:i}=s;if("percentile_disc"!==i&&"percentile_cont"!==i||!("statisticParameters"in s)){if("count"!==i&&t&&G(t,this.fieldsIndex,a))throw new r.Z(ke,`outStatistics only supports ${o} field types`,{definition:s,query:e})}else{const{statisticParameters:t}=s;if(!t)throw new r.Z(ke,"statisticParamters should be set for percentile type",{definition:s,query:e})}}}}async _getQueryEngineResultForStats(e,t,s){e=(0,n.d9)(e);try{e=await this._schedule((()=>(0,z.Up)(e,this.definitionExpression,this.spatialReference)),s),e=await this._reschedule((()=>this._checkStatisticsSupport(e,t)),s);const i=await this._reschedule((()=>this._executeSceneFilterQuery(e,s)),s),r=await this._reschedule((()=>this._executeGeometryQuery(e,i,s)),s);return await this._reschedule((()=>this._executeAggregateIdsQuery(r)),s),await this._reschedule((()=>this._executeObjectIdsQuery(r)),s),await this._reschedule((()=>this._executeTimeQuery(r)),s),await this._reschedule((()=>this._executeAttributesQuery(r)),s),r}catch(t){if(t!==z.vF)throw t;return new W([],e,this)}}}},61159:(e,t,s)=>{s.d(t,{g:()=>i});const i={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}},37427:(e,t,s)=>{s.d(t,{_W:()=>d,iV:()=>m,oj:()=>_});var i=s(67676),r=s(44547),n=s(37455),a=s(8744),o=s(40488);const l=[0,0];function u(e,t){if(!t)return null;if("x"in t){const s={x:0,y:0};return[s.x,s.y]=e(t.x,t.y,l),null!=t.z&&(s.z=t.z),null!=t.m&&(s.m=t.m),s}if("xmin"in t){const s={xmin:0,ymin:0,xmax:0,ymax:0};return[s.xmin,s.ymin]=e(t.xmin,t.ymin,l),[s.xmax,s.ymax]=e(t.xmax,t.ymax,l),t.hasZ&&(s.zmin=t.zmin,s.zmax=t.zmax,s.hasZ=!0),t.hasM&&(s.mmin=t.mmin,s.mmax=t.mmax,s.hasM=!0),s}return"rings"in t?{rings:c(t.rings,e),hasM:t.hasM,hasZ:t.hasZ}:"paths"in t?{paths:c(t.paths,e),hasM:t.hasM,hasZ:t.hasZ}:"points"in t?{points:h(t.points,e),hasM:t.hasM,hasZ:t.hasZ}:null}function c(e,t){const s=[];for(const i of e)s.push(h(i,t));return s}function h(e,t){const s=[];for(const i of e){const e=t(i[0],i[1],[0,0]);s.push(e),i.length>2&&e.push(i[2]),i.length>3&&e.push(i[3])}return s}async function d(e,t){if(!e||!t)return;const s=Array.isArray(e)?e.map((e=>null!=e.geometry?e.geometry.spatialReference:null)).filter(i.pC):[e];await(0,r.iQ)(s.map((e=>({source:e,dest:t}))))}const f=u.bind(null,o.hG),p=u.bind(null,o.R6);function m(e,t,s,i){if(!e)return e;if(s||(s=t,t=e.spatialReference),!(0,a.JY)(t)||!(0,a.JY)(s)||(0,a.fS)(t,s))return e;if((0,o.Q8)(t,s)){const t=(0,a.sS)(s)?f(e):p(e);return t.spatialReference=s,t}return(0,r.oj)(n.N,[e],t,s,null,i)[0]}const g=new class{constructor(){this._jobs=[],this._timer=null,this._process=this._process.bind(this)}async push(e,t,s){if(!e||!e.length||!t||!s||(0,a.fS)(t,s))return e;const i={geometries:e,inSpatialReference:t,outSpatialReference:s,resolve:null};return this._jobs.push(i),new Promise((e=>{i.resolve=e,null===this._timer&&(this._timer=setTimeout(this._process,10))}))}_process(){this._timer=null;const e=this._jobs.shift();if(!e)return;const{geometries:t,inSpatialReference:s,outSpatialReference:i,resolve:l}=e;(0,o.Q8)(s,i)?(0,a.sS)(i)?l(t.map(f)):l(t.map(p)):l((0,r.oj)(n.N,t,s,i,null,null)),this._jobs.length>0&&(this._timer=setTimeout(this._process,10))}};function _(e,t,s){return g.push(e,t,s)}},10402:(e,t,s)=>{s.d(t,{hN:()=>x,P0:()=>S,cW:()=>I});var i=s(20102),r=s(54102),n=s(87416),a=s(33955),o=s(8744);function l(e,t){return e?t?4:3:t?3:2}function u(e,t,s,i,r,n){const a=l(r,n),{coords:o,lengths:u}=i;if(!u)return!1;for(let i=0,r=0;i<u.length;i++,r+=a)if(!c(e,t,s,o[r],o[r+1]))return!1;return!0}function c(e,t,s,i,r){if(!e)return!1;const n=l(t,s),{coords:a,lengths:o}=e;let u=!1,c=0;for(const e of o)u=h(u,a,n,c,e,i,r),c+=e*n;return u}function h(e,t,s,i,r,n,a){let o=e,l=i;for(let e=i,u=i+r*s;e<u;e+=s){l=e+s,l===u&&(l=i);const r=t[e],c=t[e+1],h=t[l],d=t[l+1];(c<a&&d>=a||d<a&&c>=a)&&r+(a-c)/(d-c)*(h-r)<n&&(o=!o)}return o}var d=s(98732),f=s(5428),p=s(37427),m=s(11490);const g="feature-store:unsupported-query",_={esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"intersects",esriSpatialRelIndexIntersects:null,esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:null},y={spatialRelationship:{esriSpatialRelIntersects:!0,esriSpatialRelContains:!0,esriSpatialRelWithin:!0,esriSpatialRelCrosses:!0,esriSpatialRelDisjoint:!0,esriSpatialRelTouches:!0,esriSpatialRelOverlaps:!0,esriSpatialRelEnvelopeIntersects:!0,esriSpatialRelIndexIntersects:!1,esriSpatialRelRelation:!1},queryGeometry:{esriGeometryPoint:!0,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!0},layerGeometry:{esriGeometryPoint:!0,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!1}};function I(e,t,i,o,l){if((0,a.oU)(t)&&"esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e)){const e=(0,d.Uy)(new f.Z,t,!1,!1);return Promise.resolve((t=>function(e,t,s,i){return c(e,!1,!1,i.coords[0],i.coords[1])}(e,0,0,t)))}if((0,a.oU)(t)&&"esriGeometryMultipoint"===i){const s=(0,d.Uy)(new f.Z,t,!1,!1);if("esriSpatialRelContains"===e)return Promise.resolve((e=>u(s,!1,!1,e,o,l)))}if((0,a.YX)(t)&&"esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e))return Promise.resolve((e=>(0,r.aV)(t,(0,m.Op)(i,o,l,e))));if((0,a.YX)(t)&&"esriGeometryMultipoint"===i&&"esriSpatialRelContains"===e)return Promise.resolve((e=>(0,r.lQ)(t,(0,m.Op)(i,o,l,e))));if((0,a.YX)(t)&&"esriSpatialRelIntersects"===e){const e="mesh"===(h=i)?n.h_:(0,n.IY)(h);return Promise.resolve((s=>e(t,(0,m.Op)(i,o,l,s))))}var h;return Promise.all([s.e(5837),s.e(247)]).then(s.bind(s,30247)).then((s=>{const r=s[_[e]].bind(null,t.spatialReference,t);return e=>r((0,m.Op)(i,o,l,e))}))}async function S(e,t,s){const{spatialRel:r,geometry:n}=e;if(n){if(!function(e){return null!=e&&!0===y.spatialRelationship[e]}(r))throw new i.Z(g,"Unsupported query spatial relationship",{query:e});if((0,o.JY)(n.spatialReference)&&(0,o.JY)(s)){if(!function(e){return null!=e&&!0===y.queryGeometry[(0,a.Ji)(e)]}(n))throw new i.Z(g,"Unsupported query geometry type",{query:e});if(!function(e){return null!=e&&!0===y.layerGeometry[e]}(t))throw new i.Z(g,"Unsupported layer geometry type",{query:e});if(e.outSR)return(0,p._W)(e.geometry&&e.geometry.spatialReference,e.outSR)}}}function x(e){if((0,a.YX)(e))return!0;if((0,a.oU)(e)){for(const t of e.rings){if(5!==t.length)return!1;if(t[0][0]!==t[1][0]||t[0][0]!==t[4][0]||t[2][0]!==t[3][0]||t[0][1]!==t[3][1]||t[0][1]!==t[4][1]||t[1][1]!==t[2][1])return!1}return!0}return!1}},17590:(e,t,s)=>{async function i(e,t){if(!e)return null;const s=t.featureAdapter,{startTimeField:i,endTimeField:r}=e;let n=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY;if(i&&r)await t.forEach((e=>{const t=s.getAttribute(e,i),o=s.getAttribute(e,r);null==t||isNaN(t)||(n=Math.min(n,t)),null==o||isNaN(o)||(a=Math.max(a,o))}));else{const e=i||r;await t.forEach((t=>{const i=s.getAttribute(t,e);null==i||isNaN(i)||(n=Math.min(n,i),a=Math.max(a,i))}))}return{start:n,end:a}}function r(e,t,s){if(!t||!e)return null;const{startTimeField:i,endTimeField:r}=e;if(!i&&!r)return null;const{start:n,end:a}=t;return null===n&&null===a?null:void 0===n&&void 0===a?()=>!1:i&&r?function(e,t,s,i,r){return null!=i&&null!=r?n=>{const a=e.getAttribute(n,t),o=e.getAttribute(n,s);return(null==a||a<=r)&&(null==o||o>=i)}:null!=i?t=>{const r=e.getAttribute(t,s);return null==r||r>=i}:null!=r?s=>{const i=e.getAttribute(s,t);return null==i||i<=r}:void 0}(s,i,r,n,a):function(e,t,s,i){return null!=s&&null!=i&&s===i?i=>e.getAttribute(i,t)===s:null!=s&&null!=i?r=>{const n=e.getAttribute(r,t);return n>=s&&n<=i}:null!=s?i=>e.getAttribute(i,t)>=s:null!=i?s=>e.getAttribute(s,t)<=i:void 0}(s,i||r,n,a)}s.d(t,{R:()=>i,y:()=>r})},11490:(e,t,s)=>{s.d(t,{EG:()=>I,Op:()=>S,S2:()=>T,Up:()=>x,j6:()=>E,vF:()=>p});var i=s(35454),r=s(67900),n=s(44547),a=s(49600),o=s(33955),l=s(16306),u=s(8744),c=s(98732),h=s(5428),d=s(37427);const f=new i.X({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"}),p=Object.freeze({}),m=new h.Z,g=new h.Z,_=new h.Z,y={esriGeometryPoint:c.fQ,esriGeometryPolyline:c.J6,esriGeometryPolygon:c.eG,esriGeometryMultipoint:c.Iv};function I(e,t,s,i=e.hasZ,r=e.hasM){if(null==t)return null;const n=e.hasZ&&i,a=e.hasM&&r;if(s){const o=(0,c.Nh)(_,t,e.hasZ,e.hasM,"esriGeometryPoint",s,i,r);return(0,c.fQ)(o,n,a)}return(0,c.fQ)(t,n,a)}function S(e,t,s,i,r,n,a=t,o=s){const l=t&&a,u=s&&o,h=null!=i?"coords"in i?i:i.geometry:null;if(null==h)return null;if(r){let i=(0,c.zj)(g,h,t,s,e,r,a,o);return n&&(i=(0,c.Nh)(_,i,l,u,e,n)),y[e]?.(i,l,u)??null}if(n){const i=(0,c.Nh)(_,h,t,s,e,n,a,o);return y[e]?.(i,l,u)??null}return(0,c.hY)(m,h,t,s,a,o),y[e]?.(m,l,u)??null}async function x(e,t,s){const{outFields:i,orderByFields:r,groupByFieldsForStatistics:n,outStatistics:a}=e;if(i)for(let e=0;e<i.length;e++)i[e]=i[e].trim();if(r)for(let e=0;e<r.length;e++)r[e]=r[e].trim();if(n)for(let e=0;e<n.length;e++)n[e]=n[e].trim();if(a)for(let e=0;e<a.length;e++)a[e].onStatisticField&&(a[e].onStatisticField=a[e].onStatisticField.trim());return e.geometry&&!e.outSR&&(e.outSR=e.geometry.spatialReference),E(e,t,s)}async function E(e,t,i){if(!e)return null;let{where:n}=e;if(e.where=n=n&&n.trim(),(!n||/^1 *= *1$/.test(n)||t&&t===n)&&(e.where=null),!e.geometry)return e;let c=await async function(e){const{distance:t,units:i}=e,n=e.geometry;if(null==t||"vertexAttributes"in n)return n;const a=n.spatialReference,o=i?f.fromJSON(i):(0,r.qE)(a),l=a&&((0,u.sT)(a)||(0,u.sS)(a))?n:await(0,d._W)(a,u.Zn).then((()=>(0,d.iV)(n,u.Zn)));return(await async function(){return(await Promise.all([s.e(5837),s.e(247)]).then(s.bind(s,30247))).geodesicBuffer}())(l.spatialReference,l,t,o)}(e);if(e.distance=0,e.units=null,"esriSpatialRelEnvelopeIntersects"===e.spatialRel){const{spatialReference:t}=e.geometry;c=(0,a.aO)(c),c.spatialReference=t}if(c){await(0,d._W)(c.spatialReference,i),c=function(e,t){const s=e.spatialReference;return R(e,t)&&(0,o.YX)(e)?{spatialReference:s,rings:[[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]]}:e}(c,i);const t=(await(0,l.aX)((0,o.im)(c)))[0];if(null==t)throw p;const s="quantizationParameters"in e&&e.quantizationParameters?.tolerance||"maxAllowableOffset"in e&&e.maxAllowableOffset||0,r=s&&R(c,i)?{densificationStep:8*s}:void 0,n=t.toJSON(),a=await(0,d.iV)(n,n.spatialReference,i,r);if(!a)throw p;a.spatialReference=i,e.geometry=a}return e}function R(e,t){if(!e)return!1;const s=e.spatialReference;return((0,o.YX)(e)||(0,o.oU)(e)||(0,o.l9)(e))&&!(0,u.fS)(s,t)&&!(0,n.Up)(s,t)}function T(e){return e&&F in e?JSON.parse(JSON.stringify(e,w)):e}const F="_geVersion",w=(e,t)=>e!==F?t:void 0}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7697],{95401:(e,t,n)=>{n.d(t,{e:()=>l});var r,o,i,s=n(5732),a={exports:{}};r=a,o=function(){function e(e,n,o){o=o||2;var i,s,a,c,u,p,h,f=n&&n.length,g=f?n[0]*o:e.length,d=t(e,0,g,o,!0),x=[];if(!d||d.next===d.prev)return x;if(f&&(d=l(e,n,d,o)),e.length>80*o){i=a=e[0],s=c=e[1];for(var m=o;m<g;m+=o)(u=e[m])<i&&(i=u),(p=e[m+1])<s&&(s=p),u>a&&(a=u),p>c&&(c=p);h=0!==(h=Math.max(a-i,c-s))?1/h:0}return r(d,x,o,i,s,h),x}function t(e,t,n,r,o){var i,s;if(o===M(e,t,n,r)>0)for(i=t;i<n;i+=r)s=T(i,e[i],e[i+1],s);else for(i=n-r;i>=t;i-=r)s=T(i,e[i],e[i+1],s);if(s&&v(s,s.next)){var a=s.next;_(s),s=a}return s}function n(e,t){if(!e)return e;t||(t=e);var n,r=e;do{if(n=!1,r.steiner||!v(r,r.next)&&0!==y(r.prev,r,r.next))r=r.next;else{var o=r.prev;if(_(r),(r=t=o)===r.next)break;n=!0}}while(n||r!==t);return t}function r(e,t,l,c,u,p,h){if(e){!h&&p&&f(e,c,u,p);for(var g,d,x=e;e.prev!==e.next;)if(g=e.prev,d=e.next,p?i(e,c,u,p):o(e))t.push(g.i/l),t.push(e.i/l),t.push(d.i/l),_(e),e=d.next,x=d.next;else if((e=d)===x){h?1===h?r(e=s(n(e),t,l),t,l,c,u,p,2):2===h&&a(e,t,l,c,u,p):r(n(e),t,l,c,u,p,1);break}}}function o(e){var t=e.prev,n=e,r=e.next;if(y(t,n,r)>=0)return!1;for(var o=e.next.next;o!==e.prev;){if(x(t.x,t.y,n.x,n.y,r.x,r.y,o.x,o.y)&&y(o.prev,o,o.next)>=0)return!1;o=o.next}return!0}function i(e,t,n,r){var o=e.prev,i=e,s=e.next;if(y(o,i,s)>=0)return!1;for(var a=o.x<i.x?o.x<s.x?o.x:s.x:i.x<s.x?i.x:s.x,l=o.y<i.y?o.y<s.y?o.y:s.y:i.y<s.y?i.y:s.y,c=o.x>i.x?o.x>s.x?o.x:s.x:i.x>s.x?i.x:s.x,u=o.y>i.y?o.y>s.y?o.y:s.y:i.y>s.y?i.y:s.y,p=g(a,l,t,n,r),h=g(c,u,t,n,r),f=e.prevZ,d=e.nextZ;f&&f.z>=p&&d&&d.z<=h;){if(f!==e.prev&&f!==e.next&&x(o.x,o.y,i.x,i.y,s.x,s.y,f.x,f.y)&&y(f.prev,f,f.next)>=0)return!1;if(f=f.prevZ,d!==e.prev&&d!==e.next&&x(o.x,o.y,i.x,i.y,s.x,s.y,d.x,d.y)&&y(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(;f&&f.z>=p;){if(f!==e.prev&&f!==e.next&&x(o.x,o.y,i.x,i.y,s.x,s.y,f.x,f.y)&&y(f.prev,f,f.next)>=0)return!1;f=f.prevZ}for(;d&&d.z<=h;){if(d!==e.prev&&d!==e.next&&x(o.x,o.y,i.x,i.y,s.x,s.y,d.x,d.y)&&y(d.prev,d,d.next)>=0)return!1;d=d.nextZ}return!0}function s(e,t,r){var o=e;do{var i=o.prev,s=o.next.next;!v(i,s)&&w(i,o,o.next,s)&&Z(i,s)&&Z(s,i)&&(t.push(i.i/r),t.push(o.i/r),t.push(s.i/r),_(o),_(o.next),o=e=s),o=o.next}while(o!==e);return n(o)}function a(e,t,o,i,s,a){var l=e;do{for(var c=l.next.next;c!==l.prev;){if(l.i!==c.i&&m(l,c)){var u=C(l,c);return l=n(l,l.next),u=n(u,u.next),r(l,t,o,i,s,a),void r(u,t,o,i,s,a)}c=c.next}l=l.next}while(l!==e)}function l(e,r,o,i){var s,a,l,u=[];for(s=0,a=r.length;s<a;s++)(l=t(e,r[s]*i,s<a-1?r[s+1]*i:e.length,i,!1))===l.next&&(l.steiner=!0),u.push(d(l));for(u.sort(c),s=0;s<u.length;s++)o=n(o=p(u[s],o),o.next);return o}function c(e,t){return e.x-t.x}function u(e){if(e.next.prev===e)return e;let t=e;for(;;){const n=t.next;if(n.prev===t||n===t||n===e)break;t=n}return t}function p(e,t){var r=function(e,t){var n,r=t,o=e.x,i=e.y,s=-1/0;do{if(i<=r.y&&i>=r.next.y&&r.next.y!==r.y){var a=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(a<=o&&a>s){if(s=a,a===o){if(i===r.y)return r;if(i===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}r=r.next}while(r!==t);if(!n)return null;if(o===s)return n;var l,c=n,u=n.x,p=n.y,f=1/0;r=n;do{o>=r.x&&r.x>=u&&o!==r.x&&x(i<p?o:s,i,u,p,i<p?s:o,i,r.x,r.y)&&(l=Math.abs(i-r.y)/(o-r.x),Z(r,e)&&(l<f||l===f&&(r.x>n.x||r.x===n.x&&h(n,r)))&&(n=r,f=l)),r=r.next}while(r!==c);return n}(e,t);if(!r)return t;var o=C(r,e),i=n(r,r.next);let s=u(o);return n(s,s.next),i=u(i),u(t===r?i:t)}function h(e,t){return y(e.prev,e,t.prev)<0&&y(t.next,e,e.next)<0}function f(e,t,n,r){var o=e;do{null===o.z&&(o.z=g(o.x,o.y,t,n,r)),o.prevZ=o.prev,o.nextZ=o.next,o=o.next}while(o!==e);o.prevZ.nextZ=null,o.prevZ=null,function(e){var t,n,r,o,i,s,a,l,c=1;do{for(n=e,e=null,i=null,s=0;n;){for(s++,r=n,a=0,t=0;t<c&&(a++,r=r.nextZ);t++);for(l=c;a>0||l>0&&r;)0!==a&&(0===l||!r||n.z<=r.z)?(o=n,n=n.nextZ,a--):(o=r,r=r.nextZ,l--),i?i.nextZ=o:e=o,o.prevZ=i,i=o;n=r}i.nextZ=null,c*=2}while(s>1)}(o)}function g(e,t,n,r,o){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*o)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*o)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function d(e){var t=e,n=e;do{(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next}while(t!==e);return n}function x(e,t,n,r,o,i,s,a){return(o-s)*(t-a)-(e-s)*(i-a)>=0&&(e-s)*(r-a)-(n-s)*(t-a)>=0&&(n-s)*(i-a)-(o-s)*(r-a)>=0}function m(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&w(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(Z(e,t)&&Z(t,e)&&function(e,t){var n=e,r=!1,o=(e.x+t.x)/2,i=(e.y+t.y)/2;do{n.y>i!=n.next.y>i&&n.next.y!==n.y&&o<(n.next.x-n.x)*(i-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)&&(y(e.prev,e,t.prev)||y(e,t.prev,t))||v(e,t)&&y(e.prev,e,e.next)>0&&y(t.prev,t,t.next)>0)}function y(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function v(e,t){return e.x===t.x&&e.y===t.y}function w(e,t,n,r){var o=A(y(e,t,n)),i=A(y(e,t,r)),s=A(y(n,r,e)),a=A(y(n,r,t));return o!==i&&s!==a||!(0!==o||!b(e,n,t))||!(0!==i||!b(e,r,t))||!(0!==s||!b(n,e,r))||!(0!==a||!b(n,t,r))}function b(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function A(e){return e>0?1:e<0?-1:0}function Z(e,t){return y(e.prev,e,e.next)<0?y(e,t,e.next)>=0&&y(e,e.prev,t)>=0:y(e,t,e.prev)<0||y(e,e.next,t)<0}function C(e,t){var n=new S(e.i,e.x,e.y),r=new S(t.i,t.x,t.y),o=e.next,i=t.prev;return e.next=t,t.prev=e,n.next=o,o.prev=n,r.next=n,n.prev=r,i.next=r,r.prev=i,r}function T(e,t,n,r){var o=new S(e,t,n);return r?(o.next=r.next,o.prev=r,r.next.prev=o,r.next=o):(o.prev=o,o.next=o),o}function _(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function S(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function M(e,t,n,r){for(var o=0,i=t,s=n-r;i<n;i+=r)o+=(e[s]-e[i])*(e[i+1]+e[s+1]),s=i;return o}return e.deviation=function(e,t,n,r){var o=t&&t.length,i=o?t[0]*n:e.length,s=Math.abs(M(e,0,i,n));if(o)for(var a=0,l=t.length;a<l;a++){var c=t[a]*n,u=a<l-1?t[a+1]*n:e.length;s-=Math.abs(M(e,c,u,n))}var p=0;for(a=0;a<r.length;a+=3){var h=r[a]*n,f=r[a+1]*n,g=r[a+2]*n;p+=Math.abs((e[h]-e[g])*(e[f+1]-e[h+1])-(e[h]-e[f])*(e[g+1]-e[h+1]))}return 0===s&&0===p?0:Math.abs((p-s)/s)},e.flatten=function(e){for(var t=e[0][0].length,n={vertices:[],holes:[],dimensions:t},r=0,o=0;o<e.length;o++){for(var i=0;i<e[o].length;i++)for(var s=0;s<t;s++)n.vertices.push(e[o][i][s]);o>0&&(r+=e[o-1].length,n.holes.push(r))}return n},e},void 0!==(i=o())&&(r.exports=i);const l=(0,s.g)(a.exports)},24882:(e,t,n)=>{n.d(t,{$z:()=>s,KF:()=>u,mi:()=>o});var r=n(1533);function o(e){return(0,r.kJ)(e)?e.length<r.DB?e:i(e):e.length<r.DB?Array.from(e):e.BYTES_PER_ELEMENT===Uint16Array.BYTES_PER_ELEMENT?e:i(e)}function i(e){let t=!0;for(const n of e){if(n>=65536)return(0,r.kJ)(e)?new Uint32Array(e):e;n>=256&&(t=!1)}return t?new Uint8Array(e):new Uint16Array(e)}function s(e){return e<=r.DB?new Array(e):e<=65536?new Uint16Array(e):new Uint32Array(e)}let a=(()=>{const e=new Uint32Array(131072);for(let t=0;t<e.length;++t)e[t]=t;return e})();const l=[0],c=(()=>{const e=new Uint16Array(65536);for(let t=0;t<e.length;++t)e[t]=t;return e})();function u(e){if(1===e)return l;if(e<r.DB)return Array.from(new Uint16Array(c.buffer,0,e));if(e<c.length)return new Uint16Array(c.buffer,0,e);if(e>a.length){const t=Math.max(2*a.length,e);a=new Uint32Array(t);for(let e=0;e<a.length;e++)a[e]=e}return new Uint32Array(a.buffer,0,e)}new Uint8Array(65536)},62540:(e,t,n)=>{n.d(t,{Z:()=>y});var r,o=n(43697),i=n(96674),s=n(22974),a=n(92604),l=n(5600),c=n(90578),u=n(52011),p=n(75215),h=n(65542),f=n(60746),g=n(71630);const d="esri.geometry.support.MeshComponent",x=a.Z.getLogger(d);let m=r=class extends i.wq{static from(e){return(0,p.TJ)(r,e)}constructor(e){super(e),this.faces=null,this.material=null,this.shading="source",this.trustSourceNormals=!1}castFaces(e){return(0,g.X)(e,Uint32Array,[Uint16Array],{loggerTag:".faces=",stride:3},x)}castMaterial(e){return(0,p.TJ)(e&&"object"==typeof e&&("metallic"in e||"roughness"in e||"metallicRoughnessTexture"in e)?f.Z:h.Z,e)}clone(){return new r({faces:(0,s.d9)(this.faces),shading:this.shading,material:(0,s.d9)(this.material),trustSourceNormals:this.trustSourceNormals})}cloneWithDeduplication(e,t){const n={faces:(0,s.d9)(this.faces),shading:this.shading,material:this.material?this.material.cloneWithDeduplication(e,t):null,trustSourceNormals:this.trustSourceNormals};return new r(n)}};(0,o._)([(0,l.Cb)({json:{write:!0}})],m.prototype,"faces",void 0),(0,o._)([(0,c.p)("faces")],m.prototype,"castFaces",null),(0,o._)([(0,l.Cb)({type:h.Z,json:{write:!0}})],m.prototype,"material",void 0),(0,o._)([(0,c.p)("material")],m.prototype,"castMaterial",null),(0,o._)([(0,l.Cb)({type:String,json:{write:!0}})],m.prototype,"shading",void 0),(0,o._)([(0,l.Cb)({type:Boolean})],m.prototype,"trustSourceNormals",void 0),m=r=(0,o._)([(0,u.j)(d)],m);const y=m},65542:(e,t,n)=>{n.d(t,{Z:()=>h});var r,o=n(43697),i=n(22303),s=n(96674),a=n(5600),l=(n(75215),n(67676),n(80442),n(52011)),c=n(91024),u=n(80218);let p=r=class extends s.wq{constructor(e){super(e),this.color=null,this.colorTexture=null,this.colorTextureTransform=null,this.normalTexture=void 0,this.normalTextureTransform=void 0,this.alphaMode="auto",this.alphaCutoff=.5,this.doubleSided=!0}clone(){return this.cloneWithDeduplication(null,new Map)}cloneWithDeduplication(e,t){const n=null!=e?e.get(this):null;if(n)return n;const o=new r(this.clonePropertiesWithDeduplication(t));return null!=e&&e.set(this,o),o}clonePropertiesWithDeduplication(e){return{color:null!=this.color?this.color.clone():null,colorTexture:this.colorTexture?.cloneWithDeduplication(e),normalTexture:this.normalTexture?.cloneWithDeduplication(e),alphaMode:this.alphaMode,alphaCutoff:this.alphaCutoff,doubleSided:this.doubleSided,colorTextureTransform:this.colorTextureTransform?.clone(),normalTextureTransform:this.normalTextureTransform?.clone()}}};(0,o._)([(0,a.Cb)({type:i.Z,json:{write:!0}})],p.prototype,"color",void 0),(0,o._)([(0,a.Cb)({type:c.Z,json:{write:!0}})],p.prototype,"colorTexture",void 0),(0,o._)([(0,a.Cb)({type:u.Z,json:{write:!0}})],p.prototype,"colorTextureTransform",void 0),(0,o._)([(0,a.Cb)({type:c.Z,json:{write:!0}})],p.prototype,"normalTexture",void 0),(0,o._)([(0,a.Cb)({type:u.Z,json:{write:!0}})],p.prototype,"normalTextureTransform",void 0),(0,o._)([(0,a.Cb)({nonNullable:!0,json:{write:!0}})],p.prototype,"alphaMode",void 0),(0,o._)([(0,a.Cb)({nonNullable:!0,json:{write:!0}})],p.prototype,"alphaCutoff",void 0),(0,o._)([(0,a.Cb)({nonNullable:!0,json:{write:!0}})],p.prototype,"doubleSided",void 0),p=r=(0,o._)([(0,l.j)("esri.geometry.support.MeshMaterial")],p);const h=p},60746:(e,t,n)=>{n.d(t,{Z:()=>h});var r,o=n(43697),i=n(22303),s=n(5600),a=(n(75215),n(67676),n(80442),n(52011)),l=n(65542),c=n(91024),u=n(80218);let p=r=class extends l.Z{constructor(e){super(e),this.emissiveColor=null,this.emissiveTexture=null,this.emissiveTextureTransform=void 0,this.occlusionTexture=null,this.occlusionTextureTransform=void 0,this.metallic=1,this.roughness=1,this.metallicRoughnessTexture=null,this.metallicRoughnessTextureTransform=void 0}clone(){return this.cloneWithDeduplication(null,new Map)}cloneWithDeduplication(e,t){const n=null!=e?e.get(this):null;if(n)return n;const o=new r(this.clonePropertiesWithDeduplication(t));return null!=e&&e.set(this,o),o}clonePropertiesWithDeduplication(e){return{...super.clonePropertiesWithDeduplication(e),emissiveColor:this.emissiveColor?.clone(),emissiveTexture:this.emissiveTexture?.cloneWithDeduplication(e),emissiveTextureTransform:this.emissiveTextureTransform?.clone(),occlusionTexture:this.occlusionTexture?.cloneWithDeduplication(e),occlusionTextureTransform:this.occlusionTextureTransform?.clone(),metallic:this.metallic,roughness:this.roughness,metallicRoughnessTexture:this.metallicRoughnessTexture?.cloneWithDeduplication(e),metallicRoughnessTextureTransform:this.metallicRoughnessTextureTransform?.clone()}}};(0,o._)([(0,s.Cb)({type:i.Z,json:{write:!0}})],p.prototype,"emissiveColor",void 0),(0,o._)([(0,s.Cb)({type:c.Z,json:{write:!0}})],p.prototype,"emissiveTexture",void 0),(0,o._)([(0,s.Cb)({type:u.Z,json:{write:!0}})],p.prototype,"emissiveTextureTransform",void 0),(0,o._)([(0,s.Cb)({type:c.Z,json:{write:!0}})],p.prototype,"occlusionTexture",void 0),(0,o._)([(0,s.Cb)({type:u.Z,json:{write:!0}})],p.prototype,"occlusionTextureTransform",void 0),(0,o._)([(0,s.Cb)({type:Number,nonNullable:!0,json:{write:!0},range:{min:0,max:1}})],p.prototype,"metallic",void 0),(0,o._)([(0,s.Cb)({type:Number,nonNullable:!0,json:{write:!0},range:{min:0,max:1}})],p.prototype,"roughness",void 0),(0,o._)([(0,s.Cb)({type:c.Z,json:{write:!0}})],p.prototype,"metallicRoughnessTexture",void 0),(0,o._)([(0,s.Cb)({type:u.Z,json:{write:!0}})],p.prototype,"metallicRoughnessTextureTransform",void 0),p=r=(0,o._)([(0,a.j)("esri.geometry.support.MeshMaterialMetallicRoughness")],p);const h=p},91024:(e,t,n)=>{n.d(t,{Z:()=>v});var r=n(43697);n(80442);let o=null,i=!0;function s(){return o||(o=document.createElement("canvas"),o.width=1,o.height=1),o}function a(e,t,n){return n||(n=s()),n.getContext("2d").createImageData(e,t)}var l,c=n(96674),u=n(5600),p=n(75215),h=(n(67676),n(71715)),f=n(52011),g=n(30556),d=n(25929);const x=new WeakMap;let m=0,y=l=class extends c.wq{constructor(e){super(e),this.wrap="repeat"}get url(){return this._get("url")||null}set url(e){this._set("url",e),e&&this._set("data",null)}get data(){return this._get("data")||null}set data(e){this._set("data",e),e&&this._set("url",null)}writeData(e,t,n,r){if(e instanceof HTMLImageElement){const o={type:"image-element",src:(0,d.t)(e.src,r),crossOrigin:e.crossOrigin};t[n]=o}else if(e instanceof HTMLCanvasElement){const r=e.getContext("2d").getImageData(0,0,e.width,e.height),o={type:"canvas-element",imageData:this._encodeImageData(r)};t[n]=o}else if(e instanceof HTMLVideoElement){const o={type:"video-element",src:(0,d.t)(e.src,r),autoplay:e.autoplay,loop:e.loop,muted:e.muted,crossOrigin:e.crossOrigin,preload:e.preload};t[n]=o}else if(e instanceof ImageData){const r={type:"image-data",imageData:this._encodeImageData(e)};t[n]=r}}readData(e){switch(e.type){case"image-element":{const t=new Image;return t.src=e.src,t.crossOrigin=e.crossOrigin,t}case"canvas-element":{const t=this._decodeImageData(e.imageData),n=document.createElement("canvas");return n.width=t.width,n.height=t.height,n.getContext("2d").putImageData(t,0,0),n}case"image-data":return this._decodeImageData(e.imageData);case"video-element":{const t=document.createElement("video");return t.src=e.src,t.crossOrigin=e.crossOrigin,t.autoplay=e.autoplay,t.loop=e.loop,t.muted=e.muted,t.preload=e.preload,t}default:return}}get transparent(){const e=this.data,t=this.url;if(e instanceof HTMLCanvasElement)return this._imageDataContainsTransparent(e.getContext("2d").getImageData(0,0,e.width,e.height));if(e instanceof ImageData)return this._imageDataContainsTransparent(e);if(t){const e=t.substr(t.length-4,4).toLowerCase(),n=t.substr(0,15).toLocaleLowerCase();if(".png"===e||"data:image/png;"===n)return!0}return!1}set transparent(e){this._overrideIfSome("transparent",e)}get contentHash(){const e="string"==typeof this.wrap?this.wrap:"object"==typeof this.wrap?`${this.wrap.horizontal}/${this.wrap.vertical}`:"",t=(t="")=>`d:${t},t:${this.transparent},w:${e}`;return null!=this.url?t(this.url):null!=this.data?this.data instanceof HTMLImageElement||this.data instanceof HTMLVideoElement?t(this.data.src):(x.has(this.data)||x.set(this.data,++m),t(x.get(this.data))):t()}clone(){const e={url:this.url,data:this.data,wrap:this._cloneWrap()};return new l(e)}cloneWithDeduplication(e){const t=e.get(this);if(t)return t;const n=this.clone();return e.set(this,n),n}_cloneWrap(){return"string"==typeof this.wrap?this.wrap:{horizontal:this.wrap.horizontal,vertical:this.wrap.vertical}}_encodeImageData(e){let t="";for(let n=0;n<e.data.length;n++)t+=String.fromCharCode(e.data[n]);return{data:btoa(t),width:e.width,height:e.height}}_decodeImageData(e){const t=atob(e.data),n=new Uint8ClampedArray(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return function(e,t,n,r){if(!t||!n)throw new Error("Cannot construct image data without dimensions");if(i)try{return new ImageData(e,t,n)}catch(e){i=!1}const o=a(t,n,void 0);return o.data.set(e,0),o}(n,e.width,e.height)}_imageDataContainsTransparent(e){for(let t=3;t<e.data.length;t+=4)if(255!==e.data[t])return!0;return!1}static from(e){return"string"==typeof e?new l({url:e}):e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof ImageData||e instanceof HTMLVideoElement?new l({data:e}):(0,p.TJ)(l,e)}};(0,r._)([(0,u.Cb)({type:String,json:{write:d.w}})],y.prototype,"url",null),(0,r._)([(0,u.Cb)({json:{write:{overridePolicy(){return{enabled:!this.url}}}}}),(0,u.Cb)()],y.prototype,"data",null),(0,r._)([(0,g.c)("data")],y.prototype,"writeData",null),(0,r._)([(0,h.r)("data")],y.prototype,"readData",null),(0,r._)([(0,u.Cb)({type:Boolean,json:{write:{overridePolicy(){return{enabled:this._isOverridden("transparent")}}}}})],y.prototype,"transparent",null),(0,r._)([(0,u.Cb)({json:{write:!0}})],y.prototype,"wrap",void 0),(0,r._)([(0,u.Cb)({readOnly:!0})],y.prototype,"contentHash",null),y=l=(0,r._)([(0,f.j)("esri.geometry.support.MeshTexture")],y);const v=y},80218:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(43697),o=n(2368),i=n(96674),s=n(5600),a=(n(75215),n(67676),n(80442),n(52011));let l=class extends((0,o.J)(i.wq)){constructor(e){super(e),this.offset=[0,0],this.rotation=0,this.scale=[1,1]}};(0,r._)([(0,s.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],l.prototype,"offset",void 0),(0,r._)([(0,s.Cb)({type:Number,nonNullable:!0,json:{write:!0}})],l.prototype,"rotation",void 0),(0,r._)([(0,s.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],l.prototype,"scale",void 0),l=(0,r._)([(0,a.j)("esri.geometry.support.MeshTextureTransform")],l);const c=l},71630:(e,t,n)=>{n.d(t,{Q:()=>f,X:()=>d});var r,o=n(43697),i=n(96674),s=n(22974),a=n(92604),l=n(5600),c=n(90578),u=n(52011);const p="esri.geometry.support.MeshVertexAttributes",h=a.Z.getLogger(p);let f=r=class extends i.wq{constructor(e){super(e),this.color=null,this.position=new Float64Array(0),this.uv=null,this.normal=null,this.tangent=null}castColor(e){return d(e,Uint8Array,[Uint8ClampedArray],{loggerTag:".color=",stride:4},h)}castPosition(e){return e&&e instanceof Float32Array&&h.warn(".position=","Setting position attribute from a Float32Array may cause precision problems. Consider storing data in a Float64Array or a regular number array"),d(e,Float64Array,[Float32Array],{loggerTag:".position=",stride:3},h)}castUv(e){return d(e,Float32Array,[Float64Array],{loggerTag:".uv=",stride:2},h)}castNormal(e){return d(e,Float32Array,[Float64Array],{loggerTag:".normal=",stride:3},h)}castTangent(e){return d(e,Float32Array,[Float64Array],{loggerTag:".tangent=",stride:4},h)}clone(){const e={position:(0,s.d9)(this.position),uv:(0,s.d9)(this.uv),normal:(0,s.d9)(this.normal),tangent:(0,s.d9)(this.tangent),color:(0,s.d9)(this.color)};return new r(e)}clonePositional(){const e={position:(0,s.d9)(this.position),normal:(0,s.d9)(this.normal),tangent:(0,s.d9)(this.tangent),uv:this.uv,color:this.color};return new r(e)}};function g(e,t,n,r){const{loggerTag:o,stride:i}=t;return e.length%i!=0?(r.error(o,`Invalid array length, expected a multiple of ${i}`),new n([])):e}function d(e,t,n,r,o){if(!e)return e;if(e instanceof t)return g(e,r,t,o);for(const i of n)if(e instanceof i)return g(new t(e),r,t,o);if(Array.isArray(e))return g(new t(e),r,t,o);{const r=n.map((e=>`'${e.name}'`));return o.error(`Failed to set property, expected one of ${r}, but got ${e.constructor.name}`),new t([])}}function x(e,t,n){t[n]=function(e){const t=new Array(e.length);for(let n=0;n<e.length;n++)t[n]=e[n];return t}(e)}(0,o._)([(0,l.Cb)({json:{write:x}})],f.prototype,"color",void 0),(0,o._)([(0,c.p)("color")],f.prototype,"castColor",null),(0,o._)([(0,l.Cb)({nonNullable:!0,json:{write:x}})],f.prototype,"position",void 0),(0,o._)([(0,c.p)("position")],f.prototype,"castPosition",null),(0,o._)([(0,l.Cb)({json:{write:x}})],f.prototype,"uv",void 0),(0,o._)([(0,c.p)("uv")],f.prototype,"castUv",null),(0,o._)([(0,l.Cb)({json:{write:x}})],f.prototype,"normal",void 0),(0,o._)([(0,c.p)("normal")],f.prototype,"castNormal",null),(0,o._)([(0,l.Cb)({json:{write:x}})],f.prototype,"tangent",void 0),(0,o._)([(0,c.p)("tangent")],f.prototype,"castTangent",null),f=r=(0,o._)([(0,u.j)(p)],f)},84470:(e,t,n)=>{n.d(t,{CP:()=>a,JG:()=>g,LL:()=>l,NZ:()=>c,fV:()=>d,vj:()=>m,yT:()=>v,zE:()=>y});var r=n(3172),o=n(67676),i=n(95330),s=n(2981);class a{constructor(e,t,n){this.assetName=e,this.assetMimeType=t,this.parts=n}equals(e){return this===e||this.assetName===e.assetName&&this.assetMimeType===e.assetMimeType&&(0,o.fS)(this.parts,e.parts,((e,t)=>e.equals(t)))}isOnService(e){return this.parts.every((t=>t.isOnService(e)))}async toBlob(e){const{parts:t}=this;if(1===t.length)return t[0].toBlob(e);const n=await Promise.all(t.map((t=>t.toBlob(e))));return(0,i.k_)(e),new Blob(n)}}class l{constructor(e,t){this.partUrl=e,this.partHash=t}equals(e){return this===e||this.partUrl===e.partUrl&&this.partHash===e.partHash}isOnService(e){return this.partUrl.startsWith(`${e.path}/assets/`)}async toBlob(e){const{data:t}=await(0,r.default)(this.partUrl,{responseType:"blob"});return(0,i.k_)(e),t}}function c(e){return function(e){return!!e&&(Array.isArray(e)?e.some(f):f(e))}(e?.source)}function u(e){return!!Array.isArray(e)&&e.every((e=>e instanceof a))}const p=/^(model\/gltf\+json)|(model\/gltf-binary)$/,h=/\.(gltf|glb)/i;function f(e){if(e instanceof File){const{type:t,name:n}=e;return p.test(t)||h.test(n)}return p.test(e.assetMimeType)||h.test(e.assetName)}function g(e,t){if(!e)return!1;const{source:n}=e;return function(e,t){return Array.isArray(e)?e.every((e=>x(e,t))):x(e,t)}(n,t)}function d(e,t){if(e===t)return!0;const{source:n}=e,{source:r}=t;if(n===r)return!0;if(u(n)&&u(r)){if(n.length!==r.length)return!1;const e=(e,t)=>e.assetName<t.assetName?-1:e.assetName>t.assetName?1:0,t=[...n].sort(e),o=[...r].sort(e);for(let e=0;e<t.length;++e)if(!t[e].equals(o[e]))return!1;return!0}return!1}function x(e,t){return e instanceof a&&e.isOnService(t)}function m(e,t){return e instanceof File?(0,s.Ow)(e.name,t)??(0,s.S0)(e.type,t):(0,s.S0)(e.assetMimeType,t)??(0,s.Ow)(e.assetName,t)}function y(e){return Array.isArray(e)?e:[e]}function v(e){return!!e.original}},47545:(e,t,n)=>{n.d(t,{d:()=>i});var r=n(22021),o=n(24882);function i(e,t,n){const i=Array.isArray(e),u=i?e.length/t:e.byteLength/(4*t),p=i?e:new Uint32Array(e,0,u*t),h=n?.minReduction??0,f=n?.originalIndices||null,g=f?f.length:0,d=n?.componentOffsets||null;let x=0;if(d)for(let e=0;e<d.length-1;e++){const t=d[e+1]-d[e];t>x&&(x=t)}else x=u;const m=Math.floor(1.1*x)+1;(null==c||c.length<2*m)&&(c=new Uint32Array((0,r.Sf)(2*m)));for(let e=0;e<2*m;e++)c[e]=0;let y=0;const v=!!d&&!!f,w=v?g:u;let b=(0,o.$z)(u);const A=new Uint32Array(g),Z=1.96;let C=0!==h?Math.ceil(4*Z*Z/(h*h)*h*(1-h)):w,T=1,_=d?d[1]:w;for(let e=0;e<w;e++){if(e===C){const t=1-y/e;if(t+Z*Math.sqrt(t*(1-t)/e)<h)return null;C*=2}if(e===_){for(let e=0;e<2*m;e++)c[e]=0;if(f)for(let e=d[T-1];e<d[T];e++)A[e]=b[f[e]];_=d[++T]}const n=v?f[e]:e,r=n*t,o=l(p,r,t);let i=o%m,a=y;for(;0!==c[2*i+1];){if(c[2*i]===o){const e=c[2*i+1]-1;if(s(p,r,e*t,t)){a=b[e];break}}i++,i>=m&&(i-=m)}a===y&&(c[2*i]=o,c[2*i+1]=n+1,y++),b[n]=a}if(0!==h&&1-y/u<h)return null;if(v){for(let e=d[T-1];e<A.length;e++)A[e]=b[f[e]];b=(0,o.mi)(A)}const S=i?new Array(y):new Uint32Array(y*t);y=0;for(let e=0;e<w;e++)b[e]===y&&(a(p,(v?f[e]:e)*t,S,y*t,t),y++);if(f&&!v){const e=new Uint32Array(g);for(let t=0;t<e.length;t++)e[t]=b[f[t]];b=(0,o.mi)(e)}return{buffer:Array.isArray(S)?S:S.buffer,indices:b,uniqueCount:y}}function s(e,t,n,r){for(let o=0;o<r;o++)if(e[t+o]!==e[n+o])return!1;return!0}function a(e,t,n,r,o){for(let i=0;i<o;i++)n[r+i]=e[t+i]}function l(e,t,n){let r=0;for(let o=0;o<n;o++)r=e[t+o]+r|0,r=r+(r<<11)+(r>>>2)|0;return r>>>0}let c=null},87697:(e,t,n)=>{n.r(t),n.d(t,{assetMapFromAssetMapsJSON:()=>$e,extractMesh:()=>He,meshFeatureSetFromJSON:()=>Be});var r,o,i=n(38171),s=n(92604),a=n(30175),l=n(65617),c=n(6570),u=n(43697),p=n(20102),h=n(3920),f=n(83379),g=n(609),d=n(95330),x=n(17445),m=n(5600),y=(n(75215),n(67676),n(80442),n(52011)),v=n(9361),w=n(94139),b=n(38913),A=n(3709),Z=n(62540),C=n(85872),T=n(50567),_=n(84555),S=n(2674),M=n(71630),F=n(95401),R=n(86662),L=n(83025),D=n(24882),E=n(47545);function j(e,t,n){const o=e.length,i=new Array(o),s=new Array(o),a=new Array(o);let l=0,c=0,u=0,p=0;for(let t=0;t<o;++t)p+=e[t].length;const h=(0,L.bg)(3*p);let f=0;for(let p=o-1;p>=0;p--){const g=e[p],d=n===r.CCW_IS_HOLE&&I(g);if(d&&1!==o)i[l++]=g;else{let e=g.length;for(let t=0;t<l;++t)e+=i[t].length;const n={index:f,pathLengths:new Array(l+1),count:e,holeIndices:new Array(l)};n.pathLengths[0]=g.length,g.length>0&&(a[u++]={index:f,count:g.length}),f=d?O(g,g.length-1,-1,h,f,g.length,t):O(g,0,1,h,f,g.length,t);for(let e=0;e<l;++e){const r=i[e];n.holeIndices[e]=f,n.pathLengths[e+1]=r.length,r.length>0&&(a[u++]={index:f,count:r.length}),f=O(r,0,1,h,f,r.length,t)}l=0,n.count>0&&(s[c++]=n)}}for(let e=0;e<l;++e){const n=i[e];n.length>0&&(a[u++]={index:f,count:n.length}),f=O(n,0,1,h,f,n.length,t)}return s.length=c,a.length=u,{position:h,polygons:s,outlines:a}}function O(e,t,n,r,o,i,s){o*=3;for(let a=0;a<i;++a){const i=e[t];r[o++]=i[0],r[o++]=i[1],r[o++]=s?i[2]:0,t+=n}return o/3}function I(e){return!(0,R.bu)(e,!1,!1)}(o=r||(r={}))[o.NONE=0]="NONE",o[o.CCW_IS_HOLE=1]="CCW_IS_HOLE";var N=n(17896),P=n(44547),U=n(13442),z=n(66459);const k="esri.geometry.support.meshUtils.centerAt";const W=(0,l.c)(),B=(0,l.c)(),H=(0,l.c)();var $=n(81271);function V(e){const t=(0,$.Yd)(e.url);return n=>{const r=(0,$.PF)(n,t,t),o=r?r.replace(/^ *\.\//,""):null;return(o?e.files.get(o):null)??n}}function q(e){return K.fromBlob(e)}const G=/^(model\/gltf\+json)|(model\/gltf-binary)$/,J=/\.(gltf|glb)/i;function Y(e){const t=new Map;let n=null;for(const{name:r,mimeType:o,source:i}of e)(null==n||G.test(o)||J.test(r))&&(n=i.url),t.set(r,i.url),i.files.forEach(((e,n)=>t.set(n,e)));if(null==n)throw new p.Z("mesh-load-external:missing-files","Missing files to load external mesh source");return new K(n,(()=>e.forEach((({source:e})=>e.dispose()))),t)}class K{constructor(e,t=(()=>{}),n=new Map){this.url=e,this.dispose=t,this.files=n}static fromBlob(e){const t=URL.createObjectURL(e);return new K(t,(()=>URL.revokeObjectURL(t)))}}var X=n(2368),Q=n(46791),ee=n(84470);let te=class extends X.j{constructor(){super(),this.externalSources=new Q.Z,this._explicitDisplaySource=null}get displaySource(){return this._explicitDisplaySource??this._implicitDisplaySource}set displaySource(e){if(null!=e&&!(0,ee.NZ)(e))throw new Error("Cannot use this source for display: it is not in a supported format.");this._explicitDisplaySource=e,e&&this.externalSources.every((t=>!(0,ee.fV)(t,e)))&&this.externalSources.add(e)}clearSources(){this.displaySource=null,this.externalSources.removeAll()}getExternalSourcesOnService(e){return this.externalSources.items.filter((t=>(0,ee.JG)(t,e)))}get _implicitDisplaySource(){return this.externalSources.find(ee.NZ)}};(0,u._)([(0,m.Cb)()],te.prototype,"externalSources",void 0),(0,u._)([(0,m.Cb)()],te.prototype,"displaySource",null),(0,u._)([(0,m.Cb)()],te.prototype,"_implicitDisplaySource",null),(0,u._)([(0,m.Cb)()],te.prototype,"_explicitDisplaySource",void 0),te=(0,u._)([(0,y.j)("esri.geometry.support.meshUtils.Metadata")],te);var ne=n(21787),re=n(46521),oe=n(13598),ie=n(58995),se=n(56493);function ae(e,t){if(e)for(let n=0;n<e.length;n+=3)for(let r=0;r<3;r++)e[n+r]+=t[r]}const le=(0,l.c)(),ce=(0,oe.c)(),ue=(0,re.c)(),pe={position:[-.5,-.5,0,.5,-.5,0,.5,.5,0,-.5,.5,0],normal:[0,0,1,0,0,1,0,0,1,0,0,1],uv:[0,1,1,1,1,0,0,0],faces:[0,1,2,0,2,3],facingAxisOrderSwap:{east:[3,1,2],west:[-3,-1,2],north:[-1,3,2],south:[1,-3,2],up:[1,2,3],down:[1,-2,-3]}};function he(e,t,n){e.isPlane||function(e){for(let t=0;t<e.position.length;t+=3)e.position[t+2]+=.5}(e),function(e,t){if(null==t)return;const n="number"==typeof t?[t,t,t]:[null!=t.width?t.width:1,null!=t.depth?t.depth:1,null!=t.height?t.height:1];xe[0]=n[0],xe[4]=n[1],xe[8]=n[2];for(let t=0;t<e.position.length;t+=3){for(let n=0;n<3;n++)de[n]=e.position[t+n];(0,N.t)(de,de,xe);for(let n=0;n<3;n++)e.position[t+n]=de[n]}if(n[0]!==n[1]||n[1]!==n[2]){xe[0]=1/n[0],xe[4]=1/n[1],xe[8]=1/n[2];for(let t=0;t<e.normal.length;t+=3){for(let n=0;n<3;n++)de[n]=e.normal[t+n];(0,N.t)(de,de,xe),(0,N.n)(de,de);for(let n=0;n<3;n++)e.normal[t+n]=de[n]}}}(e,n?.size);const{vertexAttributes:r,vertexSpace:o,transform:i}=(0,z.w1)(e,t,n);return{vertexAttributes:new M.Q({...r,uv:e.uv}),vertexSpace:o,transform:i,components:[new Z.Z({faces:e.faces,material:n&&n.material||null})],spatialReference:t.spatialReference}}const fe={faceDescriptions:[{axis:[0,-1,0],uvOrigin:[0,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[1,0,0],uvOrigin:[.25,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,1,0],uvOrigin:[.5,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[-1,0,0],uvOrigin:[.75,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[0,0,1],uvOrigin:[0,.375],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,0,-1],uvOrigin:[0,.875],corners:[[-1,1],[1,1],[1,-1],[-1,-1]]}],uvScales:[[0,0],[1,0],[1,1],[0,1]],faceVertexOffsets:[0,1,2,0,2,3]},ge={south:0,east:1,north:2,west:3,up:4,down:5},de=(0,l.c)(),xe=(0,re.c)();var me=n(52138);const ye="esri.geometry.support.meshUtils.rotate";function ve(e,t,n,r=l.Z){if(null!=e){(0,me.d)(Ze,(0,A.WH)(t),(0,A.ZZ)(t));for(let t=0;t<e.length;t+=n){for(let n=0;n<3;n++)we[n]=e[t+n]-r[n];(0,N.m)(we,we,Ze);for(let n=0;n<3;n++)e[t+n]=we[n]+r[n]}}}const we=(0,l.c)(),be=(0,l.c)(),Ae=(0,A.Ue)(),Ze=(0,oe.c)(),Ce=(0,re.c)(),Te=(0,l.c)(),_e="esri.geometry.support.meshUtils.scale";function Se(e,t,n=l.Z){if(e)for(let r=0;r<e.length;r+=3){for(let t=0;t<3;t++)Me[t]=e[r+t]-n[t];(0,N.g)(Me,Me,t);for(let t=0;t<3;t++)e[r+t]=Me[t]+n[t]}}const Me=(0,l.c)(),Fe=(0,l.c)(),Re=(0,l.c)();var Le;const De="esri.geometry.Mesh",Ee={base:null,key:"type",defaultKeyValue:"georeferenced",typeMap:{georeferenced:T.Z,"georeferenced-relative":C.Z,local:_.Z}};let je=Le=class extends((0,h.p)(f.Z.LoadableMixin((0,g.v)(v.Z)))){constructor(e){super(e),this.components=null,this.vertexSpace=new T.Z,this.transform=null,this.metadata=new te,this.hasZ=!0,this.hasM=!1,this.vertexAttributes=new M.Q,this.type="mesh"}initialize(){(0===this.metadata.externalSources.length||this.vertexAttributes.position.length)&&(this.loadStatus="loaded"),this.when((()=>{this.handles.add((0,x.YP)((()=>({vertexAttributes:this.vertexAttributes,components:this.components?.map((e=>e.clone()))})),(()=>this._clearSources()),{once:!0,sync:!0}))}))}get hasExtent(){return this.loaded?this.vertexAttributes.position.length>0&&(!this.components||this.components.length>0):null!=this.metadata.displaySource?.extent}get _boundingInfo(){const e=this.vertexAttributes.position,t=this.spatialReference;if(0===e.length||this.components&&0===this.components.length)return{extent:new c.Z({xmin:0,ymin:0,zmin:0,xmax:0,ymax:0,zmax:0,spatialReference:t}),center:new w.Z({x:0,y:0,z:0,spatialReference:t})};const{vertexSpace:n,transform:r}=this,o=n.isRelative?(0,z.iV)(r,n,e,t):e;let i=1/0,s=1/0,a=1/0,l=-1/0,u=-1/0,p=-1/0,h=0,f=0,g=0;const d=o.length,x=1/(d/3);let m=0;for(;m<d;){const e=o[m++],t=o[m++],n=o[m++];i=Math.min(i,e),s=Math.min(s,t),a=Math.min(a,n),l=Math.max(l,e),u=Math.max(u,t),p=Math.max(p,n),h+=x*e,f+=x*t,g+=x*n}return{extent:new c.Z({xmin:i,ymin:s,zmin:a,xmax:l,ymax:u,zmax:p,spatialReference:t}),center:new w.Z({x:h,y:f,z:g,spatialReference:t})}}get anchor(){const{vertexSpace:e}=this;if(e.isRelative)return e.getOriginPoint(this.spatialReference);const t=this._boundingInfo;return new w.Z({x:t.center.x,y:t.center.y,z:t.extent.zmin,spatialReference:this.spatialReference})}get origin(){const{vertexSpace:e}=this;return e.isRelative?e.getOriginPoint(this.spatialReference):this._boundingInfo.center}get extent(){return this.loaded||null==this.metadata?.displaySource?.extent?this._boundingInfo.extent:this.metadata.displaySource.extent.clone()}addComponent(e){this.loaded?(this.components||(this.components=[]),this.components.push(Z.Z.from(e)),this.notifyChange("components")):s.Z.getLogger(this).error("addComponent()","Mesh must be loaded before applying operations")}removeComponent(e){if(this.loaded){if(this.components){const t=this.components.indexOf(e);if(-1!==t)return this.components.splice(t,1),void this.notifyChange("components")}s.Z.getLogger(this).error("removeComponent()","Provided component is not part of the list of components")}else s.Z.getLogger(this).error("removeComponent()","Mesh must be loaded before applying operations")}rotate(e,t,n,r){return(0,A.qw)(e,t,n,Ie),function(e,t,n){if(!e.vertexAttributes||!e.vertexAttributes.position||0===t[3])return;const{spatialReference:r,vertexSpace:o}=e;if(o.isRelative){(0,U.A)(o,ye,n);const r=n?.origin??e.origin;e.transform??=new S.Z,function(e,t,n,r){const o=t.origin,i=(0,N.s)(we,r.x,r.y,r.z??0),s=(0,N.b)(we,i,o);e.applyLocalInverse(s,be),e.rotation=(0,A.qC)(e.rotation,n,(0,A.Ue)()),e.applyLocalInverse(s,s),(0,N.b)(s,s,be),e.translation=(0,N.a)((0,l.c)(),e.translation,s)}(e.transform,o,t,r)}else{const o=n?.origin??e.origin;(0,U.h)(r,n)?function(e,t,n){const r=e.spatialReference,o=(0,ie.rS)(r),i=Te;(0,P.KC)(n,i,o)||(0,P.KC)(e.origin,i,o);const s=e.vertexAttributes.position,a=e.vertexAttributes.normal,l=e.vertexAttributes.tangent,c=new Float64Array(s.length),u=null!=a?new Float32Array(a.length):null,p=null!=l?new Float32Array(l.length):null;(0,P.Bm)(o,i,Ze,o),(0,ne.f)(Ce,Ze);const h=Ae;(0,N.t)((0,A.ZZ)(Ae),(0,A.ZZ)(t),Ce),h[3]=t[3],(0,se.XO)(s,r,c),null!=a&&null!=u&&(0,se.Iz)(a,s,c,r,u),null!=l&&null!=p&&(0,se.wi)(l,s,c,r,p),ve(c,h,3,i),(0,se.To)(c,s,r),null!=a&&null!=u&&(ve(u,h,3),(0,se.Yk)(u,s,c,r,a)),null!=l&&null!=p&&(ve(p,h,4),(0,se.M2)(p,s,c,r,l)),e.vertexAttributesChanged()}(e,t,o):function(e,t,n){const r=Te;if(!(0,P.KC)(n,r,e.spatialReference)){const t=e.origin;r[0]=t.x,r[1]=t.y,r[2]=t.z,s.Z.getLogger(ye).error(`Failed to project specified origin (wkid:${n.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}).`)}ve(e.vertexAttributes.position,t,3,r),ve(e.vertexAttributes.normal,t,3),ve(e.vertexAttributes.tangent,t,4),e.vertexAttributesChanged()}(e,t,o)}}(this,Ie,r),this}offset(e,t,n,r){return this.loaded?(Oe[0]=e,Oe[1]=t,Oe[2]=n,function(e,t,n){if(!e.vertexAttributes||!e.vertexAttributes.position)return;const{vertexSpace:r}=e;r.isRelative?((0,U.A)(r,"esri.geometry.support.meshUtils.offset",n),function(e,t){const n=e.origin;e.origin=(0,N.a)((0,l.c)(),n,t)}(r,t)):(0,U.h)(e.spatialReference,n)?function(e,t){const n=e.spatialReference,r=e.vertexAttributes.position,o=e.vertexAttributes.normal,i=e.vertexAttributes.tangent,s=new Float64Array(r.length),a=null!=o?new Float32Array(o.length):null,l=null!=i?new Float32Array(i.length):null,c=e.extent.center,u=le;(0,P.Bm)(n,[c.x,c.y,c.z],ce,(0,ie.rS)(n)),(0,ne.f)(ue,ce),(0,N.t)(u,t,ue),(0,se.XO)(r,n,s),null!=o&&null!=a&&(0,se.Iz)(o,r,s,n,a),null!=i&&null!=l&&(0,se.wi)(i,r,s,n,l),ae(s,u),(0,se.To)(s,r,n),null!=o&&null!=a&&(0,se.Yk)(a,r,s,n,o),null!=i&&null!=l&&(0,se.M2)(l,r,s,n,i),e.vertexAttributesChanged()}(e,t):function(e,t){ae(e.vertexAttributes.position,t),e.vertexAttributesChanged()}(e,t)}(this,Oe,r),this):(s.Z.getLogger(this).error("offset()","Mesh must be loaded before applying operations"),this)}scale(e,t){return this.loaded?(function(e,t,n){if(!e.vertexAttributes||!e.vertexAttributes.position)return;const{spatialReference:r,vertexSpace:o}=e;if(o.isRelative){(0,U.A)(o,_e,n);const r=n?.origin??e.origin;e.transform??=new S.Z,function(e,t,n,r){const o=t.origin,i=(0,N.s)(Me,r.x,r.y,r.z),s=(0,N.b)(Me,i,o);e.applyLocalInverse(s,Fe);const a=(0,N.g)((0,l.c)(),e.scale,n);e.scale=a,e.applyLocalInverse(s,s),(0,N.b)(s,s,Fe),e.translation=(0,N.a)((0,l.c)(),e.translation,s)}(e.transform,o,t,r)}else{const o=(0,U.h)(r,n),i=n?.origin??e.origin;o?function(e,t,n){const r=e.spatialReference,o=(0,ie.rS)(r),i=Re;(0,P.KC)(n,i,o)||(0,P.KC)(e.origin,i,o);const s=e.vertexAttributes.position,a=e.vertexAttributes.normal,l=e.vertexAttributes.tangent,c=new Float64Array(s.length),u=null!=a?new Float32Array(a.length):null,p=null!=l?new Float32Array(l.length):null;(0,se.XO)(s,r,c),null!=a&&null!=u&&(0,se.Iz)(a,s,c,r,u),null!=l&&null!=p&&(0,se.wi)(l,s,c,r,p),Se(c,t,i),(0,se.To)(c,s,r),null!=a&&null!=u&&(0,se.Yk)(u,s,c,r,a),null!=l&&null!=p&&(0,se.M2)(p,s,c,r,l),e.vertexAttributesChanged()}(e,t,i):function(e,t,n){const r=Re;if(!(0,P.KC)(n,r,e.spatialReference)){const t=e.origin;r[0]=t.x,r[1]=t.y,r[2]=t.z,s.Z.getLogger(_e).error(`Failed to project specified origin (wkid:${n.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}).`)}Se(e.vertexAttributes.position,t,r),e.vertexAttributesChanged()}(e,t,i)}}(this,e,t),this):(s.Z.getLogger(this).error("scale()","Mesh must be loaded before applying operations"),this)}centerAt(e,t){return this.loaded?(function(e,t,n){if(!e.vertexAttributes||!e.vertexAttributes.position)return;const{vertexSpace:r}=e,o=n?.origin??e.origin;r.isRelative?((0,U.A)(r,k,n),function(e,t,n){const r=(0,N.s)(H,t.x-n.x,t.y-n.y,(t.z??0)-(n.z??0)),o=e.origin;e.origin=(0,N.a)((0,l.c)(),o,r)}(r,t,o)):(0,U.h)(e.spatialReference,n)?function(e,t,n){const r=(0,z.FF)(e.vertexAttributes,n,{geographic:!0}),{position:o,normal:i,tangent:s}=(0,z.iv)(r,t,{geographic:!0});e.vertexAttributes.position=o,e.vertexAttributes.normal=i,e.vertexAttributes.tangent=s,e.vertexAttributesChanged()}(e,t,o):function(e,t,n){const r=B,o=W;if((0,P.KC)(t,o,e.spatialReference)){if(!(0,P.KC)(n,r,e.spatialReference)){const t=e.origin;r[0]=t.x,r[1]=t.y,r[2]=t.z,s.Z.getLogger(k).error(`Failed to project specified origin (wkid:${n.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}).`)}(function(e,t,n){if(e)for(let r=0;r<e.length;r+=3)for(let o=0;o<3;o++)e[r+o]+=t[o]-n[o]})(e.vertexAttributes.position,o,r),e.vertexAttributesChanged()}else s.Z.getLogger(k).error(`Failed to project centerAt location (wkid:${t.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid})`)}(e,t,o)}(this,e,t),this):(s.Z.getLogger(this).error("centerAt()","Mesh must be loaded before applying operations"),this)}load(e){const{metadata:{displaySource:t}}=this;return t&&this.addResolvingPromise(async function(e,t,r){const{source:o}=t,{loadGLTFMesh:i}=await(0,d.Hl)(Promise.all([n.e(8598),n.e(8079)]).then(n.bind(n,78079)),r),s=await async function(e,t){if(Array.isArray(e)){if(!e.length)throw new p.Z("mesh-load-external:missing-assets","There must be at least one file to load");return e[0]instanceof File?function(e){return Y(e.map((e=>({name:e.name,mimeType:e.type,source:q(e)}))))}(e):async function(e,t){const n=await(0,d.WW)(e.map((async e=>{const n=await async function(e,t){const{parts:n}=e;if(1===n.length)return new K(n[0].partUrl);const r=await e.toBlob(t);return(0,d.k_)(t),K.fromBlob(r)}(e);return(0,d.k_)(t),{name:e.assetName,mimeType:e.assetMimeType,source:n}})));if((0,d.Hc)(t))throw n.forEach((e=>e.source.dispose())),(0,d.zE)();return Y(n)}(e,t)}return q(e)}(o,r);(0,d.k_)(r);const a=i(new w.Z({x:0,y:0,z:0,spatialReference:e.spatialReference}),s.url,{resolveFile:V(s),useTransform:!0,signal:r?.signal});a.then((()=>s.dispose()),(()=>s.dispose()));const{vertexAttributes:l,components:c}=await a;e.vertexAttributes=l,e.components=c}(this,t,e)),Promise.resolve(this)}addExternalSources(e){this.metadata.externalSources.addMany(e)}updateDisplaySource(e){this.metadata.displaySource=e}clone(){let e=null;if(this.components){const t=new Map,n=new Map;e=this.components.map((e=>e.cloneWithDeduplication(t,n)))}const t={components:e,spatialReference:this.spatialReference,vertexAttributes:this.vertexAttributes.clone(),vertexSpace:this.vertexSpace.clone(),transform:this.transform?.clone()??null,metadata:this.metadata.clone()};return new Le(t)}cloneShallow(){return new Le({components:this.components,spatialReference:this.spatialReference,vertexAttributes:this.vertexAttributes,vertexSpace:this.vertexSpace.clone(),transform:this.transform,metadata:this.metadata})}vertexAttributesChanged(){this.notifyChange("vertexAttributes")}async toBinaryGLTF(e){const t=n.e(7277).then(n.bind(n,7277)),r=this.load(),o=await Promise.all([t,r]),{toBinaryGLTF:i}=o[0];return i(this,e)}_clearSources(){this.metadata.clearSources()}static createBox(e,t){if(!(e instanceof w.Z))return s.Z.getLogger(De).error(".createBox()","expected location to be a Point instance"),null;const n=new Le(he(function(){const{faceDescriptions:e,faceVertexOffsets:t,uvScales:n}=fe,r=4*e.length,o=new Float64Array(3*r),i=new Float32Array(3*r),s=new Float32Array(2*r),a=new Uint32Array(2*e.length*3);let l=0,c=0,u=0,p=0;for(let r=0;r<e.length;r++){const h=e[r],f=l/3;for(const e of t)a[p++]=f+e;const g=h.corners;for(let e=0;e<4;e++){const t=g[e];let r=0;s[u++]=.25*n[e][0]+h.uvOrigin[0],s[u++]=h.uvOrigin[1]-.25*n[e][1];for(let e=0;e<3;e++)0!==h.axis[e]?(o[l++]=.5*h.axis[e],i[c++]=h.axis[e]):(o[l++]=.5*t[r++],i[c++]=0)}}return{position:o,normal:i,uv:s,faces:a}}(),e,t));return t&&t.imageFace&&"all"!==t.imageFace?function(e,t){const n=e.components[0],r=n.faces,o=ge[t],i=6*o,s=new Array(6),a=new Array(r.length-6);let l=0,c=0;for(let e=0;e<r.length;e++)e>=i&&e<i+6?s[l++]=r[e]:a[c++]=r[e];if(null!=e.vertexAttributes.uv){const t=new Float32Array(e.vertexAttributes.uv),n=4*o*2,r=[0,1,1,1,1,0,0,0];for(let e=0;e<r.length;e++)t[n+e]=r[e];e.vertexAttributes.uv=t}return e.components=[new Z.Z({faces:s,material:n.material}),new Z.Z({faces:a})],e}(n,t.imageFace):n}static createSphere(e,t){return e instanceof w.Z?new Le(he(function(e=0){const t=Math.round(8*2**e),n=2*t,r=(t-1)*(n+1)+2*n,o=new Float64Array(3*r),i=new Float32Array(3*r),s=new Float32Array(2*r),a=new Uint32Array((t-1)*n*2*3);let l=0,c=0,u=0,p=0;for(let e=0;e<=t;e++){const r=e/t*Math.PI+.5*Math.PI,h=Math.cos(r),f=Math.sin(r);de[2]=f;const g=0===e||e===t,d=g?n-1:n;for(let r=0;r<=d;r++){const f=r/d*2*Math.PI;de[0]=-Math.sin(f)*h,de[1]=Math.cos(f)*h;for(let e=0;e<3;e++)o[l]=.5*de[e],i[l]=de[e],++l;s[c++]=(r+(g?.5:0))/n,s[c++]=e/t,0!==e&&r!==n&&(e!==t&&(a[u++]=p,a[u++]=p+1,a[u++]=p-n),1!==e&&(a[u++]=p,a[u++]=p-n,a[u++]=p-n-1)),p++}}return{position:o,normal:i,uv:s,faces:a}}(t&&t.densificationFactor||0),e,t)):(s.Z.getLogger(De).error(".createSphere()","expected location to be a Point instance"),null)}static createCylinder(e,t){return e instanceof w.Z?new Le(he(function(e=0){const t=Math.round(16*2**e),n=4*(t+1)+2*t,r=new Float64Array(3*n),o=new Float32Array(3*n),i=new Float32Array(2*n),s=new Uint32Array(4*t*3);let a=0,l=0,c=0,u=0,p=0;for(let e=0;e<=5;e++){const n=0===e||5===e,h=e<=1||e>=4,f=2===e||4===e,g=n?t-1:t;for(let d=0;d<=g;d++){const x=d/g*2*Math.PI,m=n?0:.5;de[0]=m*Math.sin(x),de[1]=m*-Math.cos(x),de[2]=e<=2?.5:-.5;for(let t=0;t<3;t++)r[a++]=de[t],o[l++]=h?2===t?e<=1?1:-1:0:2===t?0:de[t]/m;i[c++]=(d+(n?.5:0))/t,i[c++]=e<=1?1*e/3:e<=3?1*(e-2)/3+1/3:1*(e-4)/3+2/3,f||0===e||d===t||(5!==e&&(s[u++]=p,s[u++]=p+1,s[u++]=p-t),1!==e&&(s[u++]=p,s[u++]=p-t,s[u++]=p-t-1)),p++}}return{position:r,normal:o,uv:i,faces:s}}(t&&t.densificationFactor||0),e,t)):(s.Z.getLogger(De).error(".createCylinder()","expected location to be a Point instance"),null)}static createPlane(e,t){if(!(e instanceof w.Z))return s.Z.getLogger(De).error(".createPlane()","expected location to be a Point instance"),null;const n=t?.facing??"up",r=function(e,t){const n="number"==typeof t?t:null!=t?t.width:1,r="number"==typeof t?t:null!=t?t.height:1;switch(e){case"up":case"down":return{width:n,depth:r};case"north":case"south":return{width:n,height:r};case"east":case"west":return{depth:n,height:r}}}(n,t?.size);return new Le(he(function(e){const t=pe.facingAxisOrderSwap[e],n=pe.position,r=pe.normal,o=new Float64Array(n.length),i=new Float32Array(r.length);let s=0;for(let e=0;e<4;e++){const e=s;for(let a=0;a<3;a++){const l=t[a],c=Math.abs(l)-1,u=l>=0?1:-1;o[s]=n[e+c]*u,i[s]=r[e+c]*u,s++}}return{position:o,normal:i,uv:new Float32Array(pe.uv),faces:new Uint32Array(pe.faces),isPlane:!0}}(n),e,{...t,size:r}))}static createFromPolygon(e,t){if(!(e instanceof b.Z))return s.Z.getLogger(De).error(".createFromPolygon()","expected polygon to be a Polygon instance"),null;const n=function(e){const t=j(e.rings,e.hasZ,r.CCW_IS_HOLE),n=new Array;let o=0,i=0;for(const e of t.polygons){const r=e.count,s=e.index,a=(0,L.Rq)(t.position,3*s,3*r),l=e.holeIndices.map((e=>e-s)),c=(0,D.mi)((0,F.e)(a,l,3));n.push({position:a,faces:c}),o+=a.length,i+=c.length}const s=function(e,t,n){if(1===e.length)return e[0];const r=(0,L.bg)(t),o=new Array(n);let i=0,s=0,a=0;for(const t of e){for(let e=0;e<t.position.length;e++)r[i++]=t.position[e];for(const e of t.faces)o[s++]=e+a;a=i/3}return{position:r,faces:(0,D.mi)(o)}}(n,o,i),a=Array.isArray(s.position)?(0,E.d)(s.position,3,{originalIndices:s.faces}):(0,E.d)(s.position.buffer,6,{originalIndices:s.faces});return s.position=(0,L.QZ)(new Float64Array(a.buffer)),s.faces=a.indices,s}(e);return new Le({vertexAttributes:new M.Q({position:n.position}),components:[new Z.Z({faces:n.faces,shading:"flat",material:t?.material??null})],spatialReference:e.spatialReference,vertexSpace:new T.Z})}static async createFromGLTF(e,t,r){if(!(e instanceof w.Z))throw s.Z.getLogger(De).error(".createfromGLTF()","expected location to be a Point instance"),new p.Z("invalid-input","Expected location to be a Point instance");const{loadGLTFMesh:o}=await(0,d.Hl)(Promise.all([n.e(8598),n.e(8079)]).then(n.bind(n,78079)),r);return new Le(await o(e,t,r))}static async createFromFiles(e,t,n){if(!(e instanceof w.Z)){const e="Expected location to be a Point instance";throw s.Z.getLogger(De).error(".createFromFiles()",e),new p.Z("invalid-input",e)}const r=Le.createWithExternalSource(e,t),o=n?.layer;if(!o){const e="A layer is needed to convert the files";throw s.Z.getLogger(De).error(".createFromFiles()",e),new p.Z("invalid-input",e)}const[i]=await o.uploadAssets([r],n);return i}static createWithExternalSource(e,t,n){const r=n?.extent??null,{x:o,y:i,z:s,spatialReference:a}=e,l=n?.transform?.clone()??new S.Z,c=n?.vertexSpace??new _.Z({origin:[o,i,s??0]}),u={source:t,extent:r},p=new te;return p.externalSources.push(u),new Le({metadata:p,transform:l,vertexSpace:c,spatialReference:a})}static createIncomplete(e,t){const{x:n,y:r,z:o,spatialReference:i}=e,s=t?.transform?.clone()??new S.Z,a=t?.vertexSpace??new _.Z({origin:[n,r,o??0]}),l=new Le({transform:s,vertexSpace:a,spatialReference:i});return l.addResolvingPromise(Promise.reject(new p.Z("mesh-incomplete","Mesh resources are not complete"))),l}};(0,u._)([(0,m.Cb)({type:[Z.Z],json:{write:!0}})],je.prototype,"components",void 0),(0,u._)([(0,m.Cb)({nonNullable:!0,types:Ee,constructOnly:!0,json:{write:!0}})],je.prototype,"vertexSpace",void 0),(0,u._)([(0,m.Cb)({type:S.Z,json:{write:!0}})],je.prototype,"transform",void 0),(0,u._)([(0,m.Cb)({constructOnly:!0})],je.prototype,"metadata",void 0),(0,u._)([(0,m.Cb)({readOnly:!0})],je.prototype,"hasExtent",null),(0,u._)([(0,m.Cb)({readOnly:!0})],je.prototype,"_boundingInfo",null),(0,u._)([(0,m.Cb)({readOnly:!0})],je.prototype,"anchor",null),(0,u._)([(0,m.Cb)({readOnly:!0})],je.prototype,"origin",null),(0,u._)([(0,m.Cb)({readOnly:!0,json:{read:!1}})],je.prototype,"extent",null),(0,u._)([(0,m.Cb)({readOnly:!0,json:{read:!1,write:!0,default:!0}})],je.prototype,"hasZ",void 0),(0,u._)([(0,m.Cb)({readOnly:!0,json:{read:!1,write:!0,default:!1}})],je.prototype,"hasM",void 0),(0,u._)([(0,m.Cb)({type:M.Q,nonNullable:!0,json:{write:!0}})],je.prototype,"vertexAttributes",void 0),je=Le=(0,u._)([(0,y.j)(De)],je);const Oe=(0,l.c)(),Ie=(0,A.Ue)(),Ne=je;var Pe,Ue,ze=n(82971),ke=n(2981),We=n(74889);function Be(e,t,n){const r=n.features;n.features=[],delete n.geometryType;const o=We.Z.fromJSON(n);if(o.geometryType="mesh",!n.assetMaps)return o;const s=$e(t,n.assetMaps),a=e.sourceSpatialReference??ze.Z.WGS84,l=n.globalIdFieldName,{outFields:c}=e,u=null!=c&&c.length>0?(p=c.includes("*")?null:new Set(c),({attributes:e})=>{if(!e)return{};if(!p)return e;for(const t in e)p.has(t)||delete e[t];return e}):()=>({});var p;for(const e of r){const n=He(e,l,a,t,s);null!=n&&o.features.push(new i.Z({geometry:n,attributes:u(e)}))}return o}function He(e,t,n,r,o){const i=e.attributes[t],s=o.get(i);if(null==s)return null;const{originPoint:a,originVector:u}=function({attributes:e},t,{transformFieldRoles:n}){const r=e[n.originX],o=e[n.originY],i=e[n.originZ];return{originPoint:new w.Z({x:r,y:o,z:i,spatialReference:t}),originVector:(0,l.f)(r,o,i)}}(e,n,r),p=c.Z.fromJSON(e.geometry);p.spatialReference=n;const h=function(e,{transformFieldRoles:t}){return new S.Z({translation:[e[t.translationX],-e[t.translationZ],e[t.translationY]],rotationAxis:[e[t.rotationX],e[t.rotationZ],e[t.rotationY]],rotationAngle:e[t.rotationDeg],scale:[e[t.scaleX],e[t.scaleY],e[t.scaleZ]]})}(e.attributes,r),f=s.projectVertices?new C.Z({origin:u}):new _.Z({origin:u}),g=function(e){const t=Array.from(e.files.values()),n=new Array;for(const e of t){if(e.status!==Pe.COMPLETED)return null;const t=new Array;for(const n of e.parts){if(!n)return null;t.push(new ee.LL(n.url,n.hash))}n.push(new ee.CP(e.name,e.mimeType,t))}return n}(s);return g?Ne.createWithExternalSource(a,g,{extent:p,transform:h,vertexSpace:f}):Ne.createIncomplete(a,{extent:p,transform:h,vertexSpace:f})}function $e(e,t){const n=new Map;for(const r of t){const t=r.parentGlobalId;if(null==t)continue;const o=r.assetName,i=r.assetType,l=r.assetHash,c=r.assetURL,u=r.conversionStatus,p=r.seqNo,h=(0,ke.d1)(i,e.supportedFormats);if(!h){s.Z.getLogger("esri.rest.support.meshFeatureSet").error("mesh-feature-set:unknown-format",`Service returned an asset of type ${i}, but it does not list it as a supported type`);continue}const f=(0,a.s1)(n,t,(()=>({projectVertices:qe(r.flags).projectVertices,files:new Map})));(0,a.s1)(f.files,o,(()=>({name:o,type:i,mimeType:h,status:Ve(u),parts:[]}))).parts[p]={hash:l,url:c}}return n}function Ve(e){switch(e){case"COMPLETED":case"SUBMITTED":return Pe.COMPLETED;case"INPROGRESS":return Pe.PENDING;default:return Pe.FAILED}}function qe(e){return{projectVertices:e.includes("PROJECT_VERTICES")}}(Ue=Pe||(Pe={}))[Ue.FAILED=0]="FAILED",Ue[Ue.PENDING=1]="PENDING",Ue[Ue.COMPLETED=2]="COMPLETED"}}]);
|