@arcgis/core 4.33.0-next.20250204 → 4.33.0-next.20250206
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/assets/components/assets/icon/dualImageArea16.json +1 -0
- package/assets/components/assets/icon/dualImageArea24.json +1 -0
- package/assets/components/assets/icon/dualImageArea32.json +1 -0
- package/assets/components/assets/icon/dualImageDistance16.json +1 -0
- package/assets/components/assets/icon/dualImageDistance24.json +1 -0
- package/assets/components/assets/icon/dualImageDistance32.json +1 -0
- package/assets/components/assets/icon/dualImageLocation16.json +1 -0
- package/assets/components/assets/icon/dualImageLocation24.json +1 -0
- package/assets/components/assets/icon/dualImageLocation32.json +1 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/06f693780f70e5a627c4.js +1 -0
- package/assets/esri/core/workers/chunks/{24a86c52c8bdd0b5eb4d.js → 09a99c556089c166d1f8.js} +1 -1
- package/assets/esri/core/workers/chunks/15f850c9a1154fc57e5a.js +1 -0
- package/assets/esri/core/workers/chunks/{9b4f471fcd8a3b5e089f.js → 192569dfa7c0ea8dd864.js} +1 -1
- package/assets/esri/core/workers/chunks/1a2e1a414e651e988435.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/24e47f748f0e4f815c6e.js +1 -0
- package/assets/esri/core/workers/chunks/28374a64790342e1b5ae.js +1 -0
- package/assets/esri/core/workers/chunks/{c3f03ccabca691186aad.js → 287362f9af132fafe4de.js} +1 -1
- package/assets/esri/core/workers/chunks/{ad215219e5eef8598745.js → 28dbbfc44cc2bdcd221d.js} +1 -1
- package/assets/esri/core/workers/chunks/2adc533dadcb018a9755.js +1 -0
- package/assets/esri/core/workers/chunks/308ec51ff4a66f7fcb0d.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/333091ab2e267652ed56.js +1 -0
- package/assets/esri/core/workers/chunks/354531dc2f0dea2ad96f.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/38cd7745b8ef1b8b6196.js +1 -0
- package/assets/esri/core/workers/chunks/{8a1e4f65fc81aba7a704.js → 4122d10bc910e888eee1.js} +1 -1
- package/assets/esri/core/workers/chunks/41cd1a5c99ab3bbd1fb4.js +1 -0
- package/assets/esri/core/workers/chunks/433576983754f690bcc7.js +1 -0
- package/assets/esri/core/workers/chunks/{b1269b51cef3e11c85e3.js → 48ecc5a74fecbb2b9c6f.js} +1 -1
- package/assets/esri/core/workers/chunks/{b8a519d5d24b2e728ff8.js → 5a25cef6355fd20e44e7.js} +2 -2
- package/assets/esri/core/workers/chunks/{b8a519d5d24b2e728ff8.js.LICENSE.txt → 5a25cef6355fd20e44e7.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/{8edae4ca2b18a219a43e.js → 5e7f16b312077ca8c18d.js} +1 -1
- package/assets/esri/core/workers/chunks/{7a0415db78c68d31733f.js → 6039da57a2adedd3b83f.js} +1 -1
- package/assets/esri/core/workers/chunks/72cf9192292e5c85c6df.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/73d03c208242778e67bf.js +1 -0
- package/assets/esri/core/workers/chunks/{e4f82b5b50996b1ae48e.js → 746c964cf07e4306f21f.js} +1 -1
- package/assets/esri/core/workers/chunks/77764ca90bdd13ee2167.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/{723a9fba144e2fa6d017.js → 7cb09e58bcc537ec1f7a.js} +1 -1
- package/assets/esri/core/workers/chunks/{07360fde6ea65664e6ca.js → 82d26884127ed772cc4b.js} +1 -1
- package/assets/esri/core/workers/chunks/842db06ce62758fab1e7.js +1 -0
- package/assets/esri/core/workers/chunks/{60cd8f4bba3e682ba57e.js → 91d2bdfa6e34c10b7f50.js} +1 -1
- package/assets/esri/core/workers/chunks/{12dd892cf61a76fb40ad.js → 991e0f619f1f81f94d56.js} +1 -1
- package/assets/esri/core/workers/chunks/9a27824d94df702e6e28.js +1 -0
- package/assets/esri/core/workers/chunks/{610b33b7291cffcc4e5d.js → a42ae5d5e5f66d120b4d.js} +1 -1
- package/assets/esri/core/workers/chunks/a5e9ea13e844a62b2a7f.js +1 -0
- package/assets/esri/core/workers/chunks/b21b152fa15896577242.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/b43d88b6e7dc4ab13599.js +1 -0
- package/assets/esri/core/workers/chunks/{da77eefaad83c0644380.js → b8fae500c69ca2cff62a.js} +1 -1
- package/assets/esri/core/workers/chunks/b9d9a1dc3c5d799e2685.js +1 -0
- package/assets/esri/core/workers/chunks/{9c5c6ecaf5be24279fa5.js → ddc30044f61a2c2df3fe.js} +1 -1
- package/assets/esri/core/workers/chunks/e26dc0c1654316bb1558.js +1 -0
- package/assets/esri/core/workers/chunks/ef6279f5c63ab1e88c71.js +1 -0
- package/assets/esri/core/workers/chunks/{0711d3ad4d403bcfdcad.js → f117a89d1f4001a1f9f0.js} +1 -1
- package/assets/esri/core/workers/chunks/f4e48bbdbc9da10ec71a.js +1 -0
- package/assets/esri/core/workers/chunks/f9e48205178a5a804d38.js +1 -0
- package/assets/esri/themes/base/widgets/_Directions.scss +74 -17
- 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/chunks/ColorMaterial.glsl.js +4 -5
- package/chunks/Pattern.glsl.js +1 -1
- package/chunks/WaterSurface.glsl.js +2 -2
- package/geometry/operators/projectOperator.js +1 -1
- package/geometry/operators/shapePreservingProjectOperator.js +1 -1
- package/geometry/support/meshUtils/elevation.js +1 -1
- package/interfaces.d.ts +76 -28
- package/layers/Layer.js +1 -1
- package/layers/graphics/data/FeatureStore.js +1 -1
- package/layers/graphics/sources/geojson/GeoJSONSourceWorker.js +1 -1
- package/layers/graphics/sources/support/MemorySourceWorker.js +1 -1
- package/layers/ogc/wcsUtils.js +1 -1
- package/layers/support/RasterFunctionTemplate.js +1 -1
- package/layers/support/Sublayer.js +1 -1
- package/layers/support/capabilities.js +1 -1
- package/layers/support/featureLayerUtils.js +1 -1
- package/layers/support/rasterDatasets/WCSRaster.js +1 -1
- package/layers/support/rasterDatasets/multipartParser.js +1 -1
- package/layers/support/rasterDatasets/wcsCapabilitiesParser.js +1 -1
- package/layers/support/rasterFunctionUtils.d.ts +2 -1
- package/layers/support/rasterFunctionUtils.js +1 -1
- package/layers/support/rasterFunctions/creators/createDataManagementFunctions.js +1 -1
- package/layers/support/serviceCapabilitiesUtils.js +1 -1
- package/package.json +2 -2
- package/rest/query/operations/queryAttachments.js +1 -1
- package/rest/support/AttachmentQuery.js +1 -1
- package/smartMapping/support/adapters/InMemoryLayerAdapter.js +1 -1
- package/smartMapping/support/adapters/support/histogramUtils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/CIMSymbolRasterizer.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/heatmap/HeatmapResources.js +1 -1
- package/views/2d/layers/FeatureLayerView2D.js +1 -1
- package/views/2d/layers/GraphicsLayerView2D.js +1 -1
- package/views/2d/layers/ImageryLayerView2D.js +1 -1
- package/views/2d/layers/LayerView2D.js +1 -1
- package/views/2d/layers/MapImageLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/graphics/HighlightGraphicContainer.js +1 -1
- package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
- package/views/2d/layers/support/util.js +1 -1
- package/views/3d/environment/ChapmanAtmosphere.js +1 -1
- package/views/3d/layers/MediaLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
- package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
- package/views/3d/terrain/OverlayManager.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/webgl-engine/Stage.js +1 -1
- package/views/3d/webgl-engine/effects/haze/Haze.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/3d/webgl-engine/parts/ScreenshotManager.js +1 -1
- package/views/LayerViewManager.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorker.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTileCache.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTileStore.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiledFetcher.js +1 -1
- package/views/layers/support/MapServiceLayerViewHelper.js +1 -1
- package/widgets/Attachments/AttachmentsViewModel.js +1 -1
- package/widgets/Directions.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/Editor/support/EditorItem.js +1 -1
- package/widgets/Feature/FeatureExpression/FeatureExpressionViewModel.js +1 -1
- package/widgets/Feature/FeatureViewModel.js +1 -1
- package/widgets/Feature/support/arcadeFeatureUtils.js +1 -1
- package/widgets/NavigationToggle/NavigationToggleViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/sketch/MeasurementAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/components/ImageLocationWidget.js +1 -1
- package/widgets/support/geolocationUtils.js +1 -1
- package/assets/esri/core/workers/chunks/04306c2760c1f5b19966.js +0 -1
- package/assets/esri/core/workers/chunks/1e3ab66d0e8a7f160f33.js +0 -1
- package/assets/esri/core/workers/chunks/380d37ceb8cf52bad190.js +0 -1
- package/assets/esri/core/workers/chunks/39e38aab86dcee3f79be.js +0 -1
- package/assets/esri/core/workers/chunks/3ce826ebf0692363309d.js +0 -1
- package/assets/esri/core/workers/chunks/402de76b5de05615e111.js +0 -1
- package/assets/esri/core/workers/chunks/69d307758262e5d7a32e.js +0 -1
- package/assets/esri/core/workers/chunks/6dee40b94f94ee7bc4e4.js +0 -1
- package/assets/esri/core/workers/chunks/7a3e4cb5f64dac2cfe0e.js +0 -1
- package/assets/esri/core/workers/chunks/7e4d72279cc599b7029c.js +0 -1
- package/assets/esri/core/workers/chunks/8438fba57e82e4cc7c11.js +0 -1
- package/assets/esri/core/workers/chunks/92155d112ebb6a4c6c6e.js +0 -1
- package/assets/esri/core/workers/chunks/ba37ab9e560644dc1f18.js +0 -1
- package/assets/esri/core/workers/chunks/bbbe5d6cb8b737811c84.js +0 -1
- package/assets/esri/core/workers/chunks/bf26f58210755875748c.js +0 -1
- package/assets/esri/core/workers/chunks/c7a94e569c905f97244a.js +0 -1
- package/assets/esri/core/workers/chunks/d8c762ca94e3a11b125d.js +0 -1
- package/assets/esri/core/workers/chunks/dbc447413ab40a79ba87.js +0 -1
- package/assets/esri/core/workers/chunks/f48ef415b90edc7ccadd.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5202],{67996:(e,t,n)=>{n.d(t,{cZ:()=>D,XW:()=>O,fe:()=>F});var r,i,s=n(78888),o=n(49186),a=n(91869),l=(n(90708),n(92722)),p=n(16930);class u{constructor(){this.version="",this.queryResult=new d}}class d{constructor(){this.featureResult=new c}}class c{constructor(){this.objectIdFieldName="",this.uniqueIdField=new h,this.globalIdFieldName="",this.geohashFieldName="",this.geometryProperties=new y,this.geometryType=null,this.spatialReference=new p.A,this.exceededTransferLimit=!1,this.hasZ=!1,this.hasM=!1,this.transform=new m,this.fields=[],this.fieldNameToAttributeIndexMap={},this.values=[],this.features=[],this.geometryFields=[]}}class h{constructor(){this.name="",this.isSystemMaintained=!1}}class y{constructor(){this.shapeAreaFieldName="",this.shapeLengthFieldName="",this.units=""}}class m{constructor(){this.quantizeOriginPosition="upperLeft",this.scale=new f,this.translate=new g}}class f{constructor(){this.xScale=0,this.yScale=0,this.mScale=0,this.zScale=0}}class g{constructor(){this.xTranslate=0,this.yTranslate=0,this.mTranslate=0,this.zTranslate=0}}class _{constructor(){this.name="",this.fieldType="esriFieldTypeString",this.alias="",this.sqlType="sqlTypeVarchar",this.domain="",this.defaultValue=""}}class b{constructor(){this.attributes=[],this.compressedGeometry=new w,this.centroid=new w,this.aggregateGeometries=[]}}class w{constructor(){this.geometryType=null,this.lengths=[],this.coords=[]}}(i=r||(r={})).ELEMENTUID="ELEMENTUID",i.TYPENAME="TYPENAME";const I=[r.ELEMENTUID,r.TYPENAME];var T,M;!function(e){e[e.ELEMENTUID=0]="ELEMENTUID",e[e.TYPENAME=1]="TYPENAME"}(T||(T={})),function(e){e[e.ELEMENTUID=0]="ELEMENTUID",e[e.TYPENAME=1]="TYPENAME",e[e.FROMUID=2]="FROMUID",e[e.TOUID=3]="TOUID"}(M||(M={}));var v,x,A,E,S=n(45724),N=n(35448);function C(e){const t=new w;t.geometryType=N.bV[e.geometry_type.value];const n=[],r=[];for(let t=0;t<e.lengths.length;t++)n.push(e.lengths[t]);for(let t=0;t<e.coords.length;t++)r.push(e.coords[t]);return t.lengths=n,t.coords=r,t}function L(e){const t=new _;return t.name=e.name,t.alias=e.alias,t.fieldType=N.r5[e.field_type.value],t.sqlType=A[e.sql_type.value],t.domain=e.domain,t.defaultValue=e.default_value,t}function R(e){const t=L(e);return t.geometryType=N.bV[e.geometry_type.value],t}function k(e){const t=new m;t.quantizeOriginPosition=x[e.quantizeOriginPosition.value];const n=t.scale,r=e.scale;n.xScale=r.xScale,n.yScale=r.yScale,n.mScale=r.mScale,n.zScale=r.zScale;const i=t.translate,s=e.translate;return i.xTranslate=s.xTranslate,i.yTranslate=s.yTranslate,i.mTranslate=s.mTranslate,i.zTranslate=s.zTranslate,t}async function D(e,t){t??=!1;const n={generateAllSublayers:t,namedTypeDefinitions:new Map};return await async function(e){const t=await(0,s.A)(e,{responseType:"array-buffer"}),n=await t.data;return async function(e){const t=new((await(0,S.I)()).MapOfObjectIdentifierSetsDecoder),n=t.decode(new Uint8Array(e)),r=new Map;if(0!==n.error_code)throw new o.A("knowledge-graph:layer-support-utils",n.error_message);const i=t.get_map_of_identifier_sets(),s=i.keys,a=s.size();for(let e=0;e<a;e++){const t=s.get(e),n=i.query_identifier_set(t),a=[];if(n.id_array_type.value===E.GLOBALID_ARRAY){const e=n.get_globalid_array(),t=e.count();for(let n=0;n<t;n++)a.push(e.get_globalid_at(n))}else if(n.id_array_type.value===E.IDENTIFIER_ARRAY){const e=n.get_identifier_array(),t=e.count();for(let n=0;n<t;n++)a.push(e.get_identifier_at(n).toString())}else if(n.id_array_type.value===E.STRING_ARRAY){const e=n.get_string_array(),t=e.count();for(let n=0;n<t;n++)a.push(e.get_string_at(n))}else{if(n.id_array_type.value!==E.OID_ARRAY)throw new o.A("knowledge-graph:layer-support-utils","Tried to encode an unexpected ID Array type.");{const e=n.get_oid_array(),t=e.count();for(let n=0;n<t;n++)a.push(e.get_objectid_at(n).toString())}}r.set(t,a)}return t.delete(),r}(new Uint8Array(n))}(e).then((e=>{!function(e,t){for(const[n,r]of e){const e=(0,a.tE)(t.namedTypeDefinitions,n,(()=>({useAllData:!1,members:new Map})));for(const t of r)e.members.has(t)||e.members.set(t,{id:t})}}(e,n)})),n}async function F(e){const t=await(0,S.I)(),n=new t.MapOfObjectIdentifierSets;!function(e,t,n){for(const[r,i]of n.namedTypeDefinitions){if(!i.members||i.useAllData)continue;const n=i.members.keys();let s=!1,o=!0;const a=new t.ObjectIdArray,l=new t.StringArray,p=new t.GlobalIdArray,u=new t.IdentifierArray,d=new t.ObjectIdentifierSet;for(const e of n)o&&(s=!isNaN(Number(e)),o=!1),s?a.add_objectid(Number(e)):(l.add_string(e),p.add_globalid(e)),u.add_identifier(e);d.set_oid_array(a),d.set_string_array(l),d.set_globalid_array(p),d.set_identifier_array(u),a.delete(),l.delete(),p.delete(),u.delete(),e.put_identifier_set(r,d),d.delete()}}(n,t,e);const r=new t.MapOfObjectIdentifierSetsEncoder;try{r.set_map_of_identifier_sets(n),r.encode();const e=r.get_encoding_result();if(0!==e.error.error_code)throw new o.A("knowledge-graph:layer-support-utils",e.error.error_message);const t=structuredClone(e.get_byte_buffer());return r.delete(),t}finally{n.delete()}}async function B(e){const t=await(0,s.A)(e,{responseType:"array-buffer"});return async function(e){const t=new((await(0,S.I)()).FeatureCollectionDecoder),n=t.decode(new Uint8Array(e));if(0!==n.error_code)throw new o.A("knowledge-graph:layer-support-utils",n.error_message);const r=function(e){const t=new u;t.version=e.version;const n=e.get_query_result();if(0!==n.results_type.value)throw new Error("Got a non-feature collection type");const r=n.get_feature_result(),i=t.queryResult.featureResult;i.objectIdFieldName=r.objectid_field_name,i.exceededTransferLimit=r.exceeded_transfer_limit,i.hasM=r.has_m,i.hasZ=r.has_z,i.geometryType=N.bV[r.geometry_type.value],i.globalIdFieldName=r.globalid_field_name,i.geohashFieldName=r.geohash_field_name;const s=i.uniqueIdField,o=r.unique_id_field;s.name=o.name,s.isSystemMaintained=o.isSystemMaintained;const a=i.geometryProperties,l=r.geometry_properties;a.shapeAreaFieldName=l.shapeAreaFieldName,a.shapeLengthFieldName=l.shapeLengthFieldName,a.units=l.units;const p=i.spatialReference,d=r.spatial_reference;p.wkid=d.wkid,p.latestWkid=d.latestWkid,p.vcsWkid=d.vcsWkid,p.latestVcsWkid=d.latestVcsWkid,p.wkt=d.wkt,i.transform=k(r.transform);const c=i.fields,h=i.fieldNameToAttributeIndexMap,y=r.fields,m=y.size();for(let e=0;e<m;e++){const t=y.get(e),n=L(t);c.push(n),h[n.name]=e,t.delete()}y.delete();const f=i.values,g=r.values_count();for(let e=0;e<g;e++)f.push(r.get_value_at(e));const _=i.features,w=r.features,T=w.size();if(T>0)for(const e of I)if(void 0===h[e])throw new Error(`Feature collection missing required attribute: ${e}`);for(let e=0;e<T;e++){const t=new b,n=w.get(e),r=t.attributes,i=n.attributes_count();for(let e=0;e<i;e++)r.push(n.get_attribute_at(e));const s=n.get_compressed_geometry();s&&(t.compressedGeometry=C(s),t.centroid=C(n.get_centroid()));const o=t.aggregateGeometries,a=n.aggregate_geometries,l=a.size();for(let e=0;e<l;e++){const t=a.get(e),n=C(t);o.push(n),t.delete()}a.delete(),_.push(t),n.delete()}w.delete();const M=i.geometryFields,v=r.geometry_fields,x=v.size();for(let e=0;e<x;e++){const t=v.get(e),n=R(t);M.push(n),t.delete()}return v.delete(),t}(t.get_feature_collection());return t.delete(),r}(await t.data)}function j(e,t){if(!e?.queryResult?.featureResult)return t;const n=e.queryResult.featureResult.fieldNameToAttributeIndexMap;for(const i of e.queryResult.featureResult.features){const e=i.attributes[n[r.TYPENAME]],s=(0,a.tE)(t.namedTypeDefinitions,e,(()=>({useAllData:!1,members:new Map}))),o=i.attributes[n[r.ELEMENTUID]];if(i.compressedGeometry?.coords?.length>0){let e=i.compressedGeometry.lengths;"esriGeometryPoint"===i.compressedGeometry.geometryType&&(e=[]),s.members.set(o,{id:o,linkChartLocation:new l.A(e,i.compressedGeometry.coords)})}else s.members.set(o,{id:o})}return t}!function(e){e[e.featureResult=0]="featureResult",e[e.countResult=1]="countResult",e[e.idsResult=2]="idsResult"}(v||(v={})),function(e){e[e.upperLeft=0]="upperLeft",e[e.lowerLeft=1]="lowerLeft"}(x||(x={})),function(e){e[e.sqlTypeBigInt=0]="sqlTypeBigInt",e[e.sqlTypeBinary=1]="sqlTypeBinary",e[e.sqlTypeBit=2]="sqlTypeBit",e[e.sqlTypeChar=3]="sqlTypeChar",e[e.sqlTypeDate=4]="sqlTypeDate",e[e.sqlTypeDecimal=5]="sqlTypeDecimal",e[e.sqlTypeDouble=6]="sqlTypeDouble",e[e.sqlTypeFloat=7]="sqlTypeFloat",e[e.sqlTypeGeometry=8]="sqlTypeGeometry",e[e.sqlTypeGUID=9]="sqlTypeGUID",e[e.sqlTypeInteger=10]="sqlTypeInteger",e[e.sqlTypeLongNVarchar=11]="sqlTypeLongNVarchar",e[e.sqlTypeLongVarbinary=12]="sqlTypeLongVarbinary",e[e.sqlTypeLongVarchar=13]="sqlTypeLongVarchar",e[e.sqlTypeNChar=14]="sqlTypeNChar",e[e.sqlTypeNVarChar=15]="sqlTypeNVarChar",e[e.sqlTypeOther=16]="sqlTypeOther",e[e.sqlTypeReal=17]="sqlTypeReal",e[e.sqlTypeSmallInt=18]="sqlTypeSmallInt",e[e.sqlTypeSqlXml=19]="sqlTypeSqlXml",e[e.sqlTypeTime=20]="sqlTypeTime",e[e.sqlTypeTimestamp=21]="sqlTypeTimestamp",e[e.sqlTypeTimestamp2=22]="sqlTypeTimestamp2",e[e.sqlTypeTinyInt=23]="sqlTypeTinyInt",e[e.sqlTypeVarbinary=24]="sqlTypeVarbinary",e[e.sqlTypeVarchar=25]="sqlTypeVarchar"}(A||(A={})),function(e){e[e.OID_ARRAY=0]="OID_ARRAY",e[e.GLOBALID_ARRAY=1]="GLOBALID_ARRAY",e[e.STRING_ARRAY=2]="STRING_ARRAY",e[e.IDENTIFIER_ARRAY=3]="IDENTIFIER_ARRAY"}(E||(E={}));const O={fetchAndConvertSerializedLinkChart:e=>async function(e){const t=[],n={generateAllSublayers:!1,namedTypeDefinitions:new Map};return e.entitiesUrl&&t.push(B(e.entitiesUrl).then((e=>{j(e,n)}))),e.relationshipsUrl&&t.push(B(e.relationshipsUrl).then((e=>{j(e,n)}))),await Promise.all(t),n}(e)}},75503:(e,t,n)=>{n.d(t,{E:()=>x,w:()=>a});var r=n(4576),i=n(21818),s=(n(44208),n(3694)),o=n(11006);class a{constructor(e=9,t){this._compareMinX=c,this._compareMinY=h,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),I.prune(),T.prune(),M.prune(),v.prune()}all(e){l(this._data,e)}search(e,t){let n=this._data;const r=this._toBBox;if(b(e,n))for(I.clear();n;){for(let i=0,s=n.children.length;i<s;i++){const s=n.children[i],o=n.leaf?r(s):s;b(e,o)&&(n.leaf?t(s):_(e,o)?l(s,t):I.push(s))}n=I.pop()}}collides(e){let t=this._data;const n=this._toBBox;if(!b(e,t))return!1;for(I.clear();t;){for(let r=0,i=t.children.length;r<i;r++){const i=t.children[r],s=t.leaf?n(i):i;if(b(e,s)){if(t.leaf||_(e,s))return!0;I.push(i)}}t=I.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,n=e.length;t<n;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new E([]),this}remove(e){if(!e)return this;let t,n=this._data,s=null,o=0,a=!1;const l=this._toBBox(e);for(M.clear(),v.clear();n||M.length>0;){if(n||(n=M.pop(),s=M.data[M.length-1],o=v.pop()??0,a=!0),n.leaf&&(t=(0,r.qh)(n.children,(0,i.zI)(e),n.children.length,n.indexHint),-1!==t))return n.children.splice(t,1),M.push(n),this._condense(M),this;a||n.leaf||!_(n,l)?s?(o++,n=s.children[o],a=!1):n=null:(M.push(n),v.push(o),o=0,s=n,n=n.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,n,r){const i=n-t+1;let s=this._maxEntries;if(i<=s){const r=new E(e.slice(t,n+1));return p(r,this._toBBox),r}r||(r=Math.ceil(Math.log(i)/Math.log(s)),s=Math.ceil(i/s**(r-1)));const o=new S([]);o.height=r;const a=Math.ceil(i/s),l=a*Math.ceil(Math.sqrt(s));w(e,t,n,l,this._compareMinX);for(let i=t;i<=n;i+=l){const t=Math.min(i+l-1,n);w(e,i,t,a,this._compareMinY);for(let n=i;n<=t;n+=a){const i=Math.min(n+a-1,t);o.children.push(this._build(e,n,i,r-1))}}return p(o,this._toBBox),o}_insert(e,t,n){const r=this._toBBox,i=n?e:r(e);M.clear();const s=function(e,t,n,r){for(;r.push(t),!0!==t.leaf&&r.length-1!==n;){let n,r=1/0,i=1/0;for(let s=0,o=t.children.length;s<o;s++){const o=t.children[s],a=y(o),l=f(e,o)-a;l<i?(i=l,r=a<r?a:r,n=o):l===i&&a<r&&(r=a,n=o)}t=n||t.children[0]}return t}(i,this._data,t,M);for(s.children.push(e),d(s,i);t>=0&&M.data[t].children.length>this._maxEntries;)this._split(M,t),t--;!function(e,t,n){for(let r=n;r>=0;r--)d(t.data[r],e)}(i,M,t)}_split(e,t){const n=e.data[t],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);const s=this._chooseSplitIndex(n,i,r);if(!s)return;const o=n.children.splice(s,n.children.length-s),a=n.leaf?new E(o):new S(o);a.height=n.height,p(n,this._toBBox),p(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(n,a)}_splitRoot(e,t){this._data=new S([e,t]),this._data.height=e.height+1,p(this._data,this._toBBox)}_chooseSplitIndex(e,t,n){let r,i,s;r=i=1/0;for(let o=t;o<=n-t;o++){const t=u(e,0,o,this._toBBox),a=u(e,o,n,this._toBBox),l=g(t,a),p=y(t)+y(a);l<r?(r=l,s=o,i=p<i?p:i):l===r&&p<i&&(i=p,s=o)}return s}_chooseSplitAxis(e,t,n){const r=e.leaf?this._compareMinX:c,i=e.leaf?this._compareMinY:h;this._allDistMargin(e,t,n,r)<this._allDistMargin(e,t,n,i)&&e.children.sort(r)}_allDistMargin(e,t,n,r){e.children.sort(r);const i=this._toBBox,s=u(e,0,t,i),o=u(e,n-t,n,i);let a=m(s)+m(o);for(let r=t;r<n-t;r++){const t=e.children[r];d(s,e.leaf?i(t):t),a+=m(s)}for(let r=n-t-1;r>=t;r--){const t=e.children[r];d(o,e.leaf?i(t):t),a+=m(o)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const n=e.data[t];if(0===n.children.length)if(t>0){const i=e.data[t-1],s=i.children;s.splice((0,r.qh)(s,n,s.length,i.indexHint),1)}else this.clear();else p(n,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function l(e,t){let n=e;for(T.clear();n;){if(!0===n.leaf)for(const e of n.children)t((0,i.zI)(e));else T.pushArray(n.children);n=T.pop()??null}}function p(e,t){u(e,0,e.children.length,t,e)}function u(e,t,n,r,i){i||(i=new E([])),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(let s,o=t;o<n;o++)s=e.children[o],d(i,e.leaf?r(s):s);return i}function d(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function c(e,t){return e.minX-t.minX}function h(e,t){return e.minY-t.minY}function y(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function m(e){return e.maxX-e.minX+(e.maxY-e.minY)}function f(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function g(e,t){const n=Math.max(e.minX,t.minX),r=Math.max(e.minY,t.minY),i=Math.min(e.maxX,t.maxX),s=Math.min(e.maxY,t.maxY);return Math.max(0,i-n)*Math.max(0,s-r)}function _(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function b(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function w(e,t,n,r,i){const s=[t,n];for(;s.length;){const t=s.pop(),n=s.pop();if(t-n<=r)continue;const a=n+Math.ceil((t-n)/r/2)*r;(0,o.q)(e,a,n,t,i),s.push(n,a,a,t)}}const I=new s.A,T=new s.A,M=new s.A,v=new s.A({deallocator:void 0});class x{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class A extends x{constructor(){super(...arguments),this.height=1,this.indexHint=new r.vW}}class E extends A{constructor(e){super(),this.children=e,this.leaf=!0}}class S extends A{constructor(e){super(),this.children=e,this.leaf=!1}}},39516:(e,t,n)=>{let r;async function i(){return null==r&&(r=n.e(4123).then(n.bind(n,44123)).then((e=>new e.WhereClauseCache(500,500)))),r}async function s(e,t){const n=await i(),r=n.get(e,t);if(null==r)throw n.getError(e,t);return r}function o(e,t){return e||=null,t||=null,"1=1"===e?t??e:"1=1"===t?e??t:e&&t?`(${e}) AND (${t})`:e??t}function a(e,t){return e||=null,t||=null,"1=1"===e||"1=1"===t||e===t?"1=1"===e?e:t:e&&t?`(${e}) OR (${t})`:e??t}n.d(t,{GP:()=>s,IW:()=>a,mA:()=>o})},13069:(e,t,n)=>{n.d(t,{AG:()=>a,lk:()=>i,vD:()=>o,yS:()=>s});const r="randomUUID"in crypto;function i(){if(r)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function s(){return`{${i().toUpperCase()}}`}function o(){return`{${i()}}`}function a(e){const t=e.toUpperCase();return"{"!==e[0]?`{${t}}`:t}},83960:(e,t,n)=>{n.d(t,{X_:()=>o,oW:()=>l,zx:()=>a});var r=n(34727),i=n(83047);const s=96;function o(e,t){const n=t||e.extent,r=e.width,o=(0,i.GA)(n?.spatialReference);return n&&r?n.width/r*o*i.dy*s:0}function a(e,t,n){return function(e,t){return 0===t||(0,r.Sp)(e,t)||e<t}(e,t)&&function(e,t){return 0===t||(0,r.Sp)(e,t)||e>t}(e,n)}function l(e,t){return(0,r.Sp)(e,t)?0:(e||Number.POSITIVE_INFINITY)>(t||Number.POSITIVE_INFINITY)?1:-1}},94194:(e,t,n)=>{n.d(t,{A:()=>w});var r=n(90237),i=n(10107),s=(n(44208),n(53966),n(87811),n(40608)),o=n(5503),a=n(62885);let l=class extends o.A{constructor(e){super(e),this.addHandles([this.on("before-add",(e=>{null==e.item&&e.preventDefault()})),this.on("after-add",(e=>this._own(e.item))),this.on("after-remove",(e=>this._release(e.item)))])}get owner(){return this._get("owner")}set owner(e){e!==this._get("owner")&&(this._releaseAll(),this._set("owner",e),this._ownAll())}_ownAll(){for(const e of this.items)this._own(e)}_releaseAll(){for(const e of this.items)this._release(e)}_createNewInstance(e){return this.itemType?new(o.A.ofType(this.itemType.Type))(e):new o.A(e)}};(0,r._)([(0,i.MZ)()],l.prototype,"owner",null),l=(0,r._)([(0,s.$)("esri.core.support.OwningCollection")],l);var p=n(4146),u=n(63074),d=n(25036),c=n(52106),h=n(56507),y=(n(49186),n(7695));let m=class extends l{_own(e){e.layer&&"remove"in e.layer&&e.layer!==this.owner&&e.layer.remove(e),e.layer=this.owner}_release(e){e.layer===this.owner&&(e.layer=null)}};(0,r._)([(0,y.u)({Type:c.A,ensureType:(0,h.dp)(c.A)})],m.prototype,"itemType",void 0),m=(0,r._)([(0,s.$)("esri.support.GraphicsCollection")],m);var f=n(88625);let g=class extends((0,u.dM)((0,d.j)(p.A))){constructor(e){super(e),this.elevationInfo=null,this.graphics=new m,this.screenSizePerspectiveEnabled=!0,this.type="graphics",this.internal=!1}destroy(){this.removeAll(),this.graphics.destroy()}add(e){return this.graphics.add(e),this}addMany(e){return this.graphics.addMany(e),this}removeAll(){return this.graphics.removeAll(),this}remove(e){this.graphics.remove(e)}removeMany(e){this.graphics.removeMany(e)}on(e,t){return super.on(e,t)}graphicChanged(e){this.emit("graphic-update",e)}};var _,b;(0,r._)([(0,i.MZ)({type:f.A})],g.prototype,"elevationInfo",void 0),(0,r._)([(0,i.MZ)((_=m,b="graphics",{type:_,cast:a.H,set(e){const t=(0,a.V)(e,this._get(b),_);t.owner=this,this._set(b,t)}}))],g.prototype,"graphics",void 0),(0,r._)([(0,i.MZ)({type:["show","hide"]})],g.prototype,"listMode",void 0),(0,r._)([(0,i.MZ)()],g.prototype,"screenSizePerspectiveEnabled",void 0),(0,r._)([(0,i.MZ)({readOnly:!0})],g.prototype,"type",void 0),(0,r._)([(0,i.MZ)({constructOnly:!0})],g.prototype,"internal",void 0),g=(0,r._)([(0,s.$)("esri.layers.GraphicsLayer")],g);const w=g},6518:(e,t,n)=>{n.d(t,{F:()=>a});var r=n(44208),i=n(75503),s=n(19419);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new i.w(9,(0,r.A)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach(((n,r)=>{e[t++]=r})),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter((e=>this._idByBounds.has(e)))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,s.Ie)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,n){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,n)}(this._index,e,(e=>t(this._idByBounds.get(e))))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},83221:(e,t,n)=>{n.d(t,{A:()=>y});var r=n(4576),i=n(49186),s=n(65529),o=n(53966),a=n(70328),l=n(19419),p=n(90708),u=n(6518),d=n(51441),c=n(37730);const h=(0,a.vt)();class y{constructor(e){this.geometryInfo=e,this._boundsStore=new u.F,this._featuresById=new Map,this._usedMemory=0,this.events=new s.A,this.featureAdapter=c.T}get usedMemory(){return this._usedMemory}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach((t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)})),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,n,r,i]=this.fullBounds;return{xmin:t,ymin:n,xmax:r,ymax:i,spatialReference:(0,d.ag)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}upsertMany(e){const t=e.map((e=>this._upsert(e)));return this._emitChanged(),t.filter(r.Ru)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged(),this._usedMemory=0}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const n of e){const e=this._boundsStore.get(n.objectId);e&&t((0,a.Jt)(h,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach((t=>e(t)))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,(e=>{t(this._featuresById.get(e))}))}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new i.A("featurestore:invalid-feature","feature id is missing",{feature:e}));const n=this._featuresById.get(t);let r;if(n?(e.displayId=n.displayId,r=this._boundsStore.get(t),this._boundsStore.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(n)??0):null!=this.onFeatureAdd&&this.onFeatureAdd(e),!e.geometry?.coords?.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);r=(0,p.jQ)(null!=r?r:(0,l.vt)(),e.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),null!=r&&this._boundsStore.set(t,r),this._featuresById.set(t,e),this._usedMemory+=this.estimateFeatureUsedMemory?.(e)??0}_upsert(e){const t=e?.objectId;if(null==t)return o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new i.A("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const n=this._featuresById.get(t);if(!n)return this._add(e),e;this._usedMemory-=this.estimateFeatureUsedMemory?.(n)??0;const{geometry:r,attributes:s}=e;for(const e in s)n.attributes[e]=s[e];return r&&(n.geometry=r,this._boundsStore.set(t,(0,p.jQ)((0,l.vt)(),r,this.geometryInfo.hasZ,this.geometryInfo.hasM)??null)),this._usedMemory+=this.estimateFeatureUsedMemory?.(n)??0,n}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._boundsStore.delete(t),this._featuresById.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(e)??0,e}}},37730:(e,t,n)=>{n.d(t,{T:()=>i});var r=n(43334);const i={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t)=>new r.Om(t,e.attributes,null,e.objectId),getGeometry:e=>e.geometry,getCentroid:(e,t)=>e.ensureCentroid(t)}},64714:(e,t,n)=>{n.d(t,{F0:()=>l,Vx:()=>d,e2:()=>h,f:()=>y});var r=n(44208),i=n(4718),s=n(99352),o=n(4071),a=n(93470);function l(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?a.Cb:"esriGeometryPolyline"===e?a.yM:a.WR}}}const p=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let u=1;function d(e,t){if((0,r.A)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let n=`this${c(t)} = null;`;for(const t in e)n+=`this${c(t)} = ${JSON.stringify(e[t])};`;const r=new Function(`\n return class AttributesClass$${u++} {\n constructor() {\n ${n};\n }\n }\n `)();return()=>new r}catch(n){return()=>({[t]:null,...e})}}function c(e){return p.test(e)?`.${e}`:`["${e}"]`}function h(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,i.o8)(e)}}]}function y(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:s.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:o.$,editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},80340:(e,t,n)=>{n.d(t,{P:()=>T});var r=n(90237),i=n(69622),s=n(49186),o=n(53966),a=n(91869),l=n(74887),p=n(39516),u=n(10107),d=(n(44208),n(87811),n(40608)),c=n(5443),h=n(39829),y=n(57251),m=n(21325),f=n(15375),g=n(69860),_=n(30504),b=n(88613),w=n(42538),I=n(61956);let T=class extends i.A{constructor(e){super(e),this._processingCacheUpdatesLookup=new Map,this.knowledgeGraph=null,this.inclusionModeDefinition={generateAllSublayers:!0,namedTypeDefinitions:new Map},this.entityTypeNames=new Set,this.relationshipTypeNames=new Set,this.geographicLookup=new Map,this.sublayerCaches=new Map,this.nodeConnectionsLookup=new Map,this.relationshipConnectionsLookup=new Map,this.memberIdTypeLookup=new Map;const t=new Map;e.knowledgeGraph.dataModel.entityTypes?.forEach((n=>{n.name&&(t.set(n.name,"entity"),this._processingCacheUpdatesLookup.set(n.name,[]),e.inclusionModeDefinition&&!e.inclusionModeDefinition?.generateAllSublayers||this.entityTypeNames.add(n.name),n.properties?.forEach((e=>{e.geometryType&&"esriGeometryNull"!==e.geometryType&&this.geographicLookup.set(n.name,{name:e.name??"",geometryType:e.geometryType})})))})),e.knowledgeGraph.dataModel.relationshipTypes?.forEach((n=>{n.name&&(t.set(n.name,"relationship"),this._processingCacheUpdatesLookup.set(n.name,[]),e.inclusionModeDefinition&&!e.inclusionModeDefinition?.generateAllSublayers||this.relationshipTypeNames.add(n.name),n.properties?.forEach((e=>{e.geometryType&&"esriGeometryNull"!==e.geometryType&&this.geographicLookup.set(n.name,{name:e.name??"",geometryType:e.geometryType})})))})),e.inclusionModeDefinition?.namedTypeDefinitions.forEach(((n,r)=>{if("entity"===t.get(r))this.entityTypeNames.add(r);else{if("relationship"!==t.get(r))return o.A.getLogger(this).warn(`A named type, ${r}, was in the inclusion list that wasn't in the data model and will be removed`),void e.inclusionModeDefinition?.namedTypeDefinitions.delete(r);this.relationshipTypeNames.add(r)}const i=new Map;n.members?.forEach((e=>{(0,a.tE)(this.memberIdTypeLookup,e.id,(()=>new Set)).add(r);const t=this.getById(e.id);t&&i.set(e.id,t)})),this.sublayerCaches.set(r,i)}))}addToLayer(e){e.forEach((({typeName:e,id:t})=>{if(!this.inclusionModeDefinition)throw new s.A("knowledge-graph:layer-data-manager","You cannot add to a layer's exclusion list if it was not created with an exclusion list originally");if(this.inclusionModeDefinition.namedTypeDefinitions.has(e)){if(this.inclusionModeDefinition.namedTypeDefinitions.has(e)){const n=this.inclusionModeDefinition.namedTypeDefinitions.get(e);n.members||(n.members=new Map),n.members.set(t,{id:t}),(0,a.tE)(this.memberIdTypeLookup,t,(()=>new Set)).add(e)}}else{const n=new Map;n.set(t,{id:t}),this.inclusionModeDefinition.namedTypeDefinitions.set(e,{useAllData:!1,members:n}),(0,a.tE)(this.memberIdTypeLookup,t,(()=>new Set)).add(e)}}))}getById(e){return g.A.getInstance().readFromStoreById(e)}async getData(e,t,n){if(t.objectType.name&&this.inclusionModeDefinition?.namedTypeDefinitions&&this.inclusionModeDefinition.namedTypeDefinitions.size>0&&!this.inclusionModeDefinition.namedTypeDefinitions.has(t.objectType.name))return[];let r;if(r=e||new I.A({where:"1=1",outFields:["*"]}),"link-chart"===t.parentCompositeLayer.type){const e=t.parentCompositeLayer,n=this._processingCacheUpdatesLookup.get(t.objectType.name??""),i=r.outFields;i&&1===i.length&&i[0]===f.dr&&"1=1"===r.where||await Promise.all(n??[]);const s=this.sublayerCaches.has(t.objectType.name??"")?Array.from(this.sublayerCaches.get(t.objectType.name)?.values()):[],o=[];return s.forEach((n=>{if(this.relationshipTypeNames.has(t.objectType.name)){n.geometry=e.relationshipLinkChartDiagramLookup.get(n.attributes[t.objectIdField]);const r=this.memberIdTypeLookup.get(n.attributes[f.Cz]),i=this.memberIdTypeLookup.get(n.attributes[f.KQ]),s=this._isEndEntitySpatial(r,n,f.Cz),o=this._isEndEntitySpatial(i,n,f.KQ);n.attributes[f.BL]=Number(s&&o)}else{n.geometry=e.entityLinkChartDiagramLookup.get(n.attributes[t.objectIdField]);const r=this.geographicLookup.get(t.objectType.name);r&&n.attributes[r.name]?n.attributes[f.BL]=1:n.attributes[f.BL]=0}n.attributes[f.T1]=n.geometry,o.push(n)})),o}return this.retrieveDataFromService(r,t,n)}async getConnectedRecordIds(e,t,n){const r=[];let i="";const s=this._getNamedTypeIdMapFromNodeIds(e);if(t&&0!==t?.length){for(const e of t)i=i+e+"|";i=i.slice(0,-1)}const o={},a=[];for(const[e,n]of s){const r=`${e}_ids`;o[r]=n,t&&0!==t?.length?a.push(`MATCH (n:${e}) WHERE id(n) IN $${r} WITH n MATCH (n)-[r:${i}]-(m) RETURN id(r), type(r), id(m), labels(m)[0]`):a.push(`MATCH (n:${e}) WHERE id(n) IN $${r} WITH n MATCH (n)-[r]-(m) RETURN id(r), type(r), id(m), labels(m)[0]`)}if(!a.length)return r;const l=a.join(" UNION "),p=(await(0,b.executeQueryStreaming)(this.knowledgeGraph,new w.A({openCypherQuery:l,bindParameters:o}),{signal:n?.signal})).resultRowsStream.getReader();for(;;){const{done:e,value:t}=await p.read();if(e)break;for(let e=0;e<t.length;e++){const n=t[e];r.push({id:n[0],typeName:n[1]}),r.push({id:n[2],typeName:n[3]})}}return r}async getRelationshipsBetweenNodes(e,t,n){const r=this._getNamedTypeIdMapFromNodeIds(e);if(0===r.size)return[];const i={relationshipExclusionIds:t,possibleConnectionEntityIds:e},s=[];for(const[e,t]of r.entries()){const n=`${e}_ids`;i[n]=t,s.push(`MATCH (n:${e}) WHERE id(n) IN $${n} WITH n MATCH (n)-[r]->(m) WHERE id(m) IN $possibleConnectionEntityIds AND NOT id(r) IN $relationshipExclusionIds RETURN id(r), type(r)`)}const o=s.join(" UNION "),a=[],l=(await(0,b.executeQueryStreaming)(this.knowledgeGraph,new w.A({openCypherQuery:o,bindParameters:i}),{signal:n?.signal})).resultRowsStream.getReader();for(;;){const{done:e,value:t}=await l.read();if(e)break;for(let e=0;e<t.length;e++){const n=t[e];a.push({id:n[0],typeName:n[1]})}}return a}async getRelationshipsFromNodes(e,t,n,r){const i=this._getNamedTypeIdMapFromNodeIds(e);if(0===i.size||0===t.length)return[];const s={relationshipExclusionIds:n,possibleConnectionEntityIds:t},o=[];for(const[e,t]of i.entries()){const n=`${e}_ids`;s[n]=t,o.push(`MATCH (n:${e}) WHERE id(n) IN $${n} WITH n MATCH (n)-[r]-(m) WHERE id(m) IN $possibleConnectionEntityIds AND NOT id(r) IN $relationshipExclusionIds RETURN id(r), type(r)`)}const a=o.join(" UNION "),l=new Map,p=(await(0,b.executeQueryStreaming)(this.knowledgeGraph,new w.A({openCypherQuery:a,bindParameters:s}),{signal:r?.signal})).resultRowsStream.getReader();for(;;){const{done:e,value:t}=await p.read();if(e)break;for(let e=0;e<t.length;e++){const n=t[e];let r=l.get(n[1]);r||(r=new Set,l.set(n[1],r)),r.add(n[0])}}const u=[];for(const[e,t]of l)for(const n of t)u.push({id:n,typeName:e});return u}async refreshCacheContent(e,t,n,r=!0,i){const o=g.A.getInstance(),p=[],u=new Map,d=new Map;this.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&d.set(e.name,e)})),this.knowledgeGraph.dataModel.relationshipTypes?.forEach((e=>{e.name&&d.set(e.name,e)})),e||this.inclusionModeDefinition?e?e.forEach((e=>{if(this.memberIdTypeLookup.has(e))for(const t of this.memberIdTypeLookup.get(e))u.has(t)?u.get(t)?.push(e):u.set(t,[e])})):this.inclusionModeDefinition?.namedTypeDefinitions?.forEach(((e,t)=>{e.useAllData?u.set(t,null):e.members&&e.members.forEach((e=>{u.has(t)&&null!==u.get(t)?u.get(t)?.push(e.id):u.set(t,[e.id])}))})):(this.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&u.set(e.name,null)})),this.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&u.set(e.name,null)})));for(const[e,l]of u){const u=new Set(l),c=new Promise(((p,c)=>{(async()=>{const p=new Set,c=[];let h,y="",m=!1;if(t||d.get(e)?.properties?.forEach((e=>{e.name&&p.add(e.name)})),n&&this.geographicLookup.has(e)){const t=this.geographicLookup.get(e)?.name;t&&p.add(t)}if(this.entityTypeNames.has(e))y=`MATCH (n:${e}) ${l?"WHERE id(n) IN $ids ":""}return ID(n)`,p.forEach((e=>{y+=`, n.${e}`,c.push(e)}));else{if(!this.relationshipTypeNames.has(e))throw new s.A("knowledge-graph:layer-data-manager",`The graph type of ${e} could not be determined. Was this type set in the KG data model and inclusion definition?`);m=!0,y=`MATCH ()-[n:${e}]->() ${l?"WHERE id(n) IN $ids ":""}return ID(n), id(startNode(n)), id(endNode(n))`,p.forEach((e=>{y+=`, n.${e}`,c.push(e)}))}h=new w.A(l?{openCypherQuery:y,bindParameters:{ids:l}}:{openCypherQuery:y});const g=(await(0,b.executeQueryStreaming)(this.knowledgeGraph,h,{signal:i?.signal})).resultRowsStream.getReader();for(;;){const{done:t,value:n}=await g.read();if(t)break;const i=[];for(let e=0;e<n.length;e++){const t=n[e];let r=0,s=0;const o={properties:{}};for(o.id=t[r],r++,s++,m&&(o.originId=t[r],r++,s++,o.destinationId=t[r],r++,s++,(0,a.tE)(this.nodeConnectionsLookup,o.originId,(()=>new Set)).add(o.id),(0,a.tE)(this.nodeConnectionsLookup,o.destinationId,(()=>new Set)).add(o.id),(0,a.tE)(this.relationshipConnectionsLookup,o.id,(()=>[o.originId,o.destinationId])));r<t.length;r++)o.properties[c[r-s]]=t[r];u.delete(o.id),i.push(o)}const s=o.writeToStore(i,f.dr,this.geographicLookup.get(e)?.name);this.sublayerCaches.has(e)||this.sublayerCaches.set(e,new Map),r&&!this.inclusionModeDefinition?.namedTypeDefinitions.has(e)&&this.inclusionModeDefinition?.namedTypeDefinitions.set(e,{useAllData:!1,members:new Map}),r&&!this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members&&(this.inclusionModeDefinition.namedTypeDefinitions.get(e).members=new Map);const l=this.sublayerCaches.get(e);s.forEach((t=>{l?.set(t.attributes[f.dr],t),r&&!this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members.has(t.attributes[f.dr])&&(this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members.set(t.attributes[f.dr],{id:t.attributes[f.dr]}),(0,a.tE)(this.memberIdTypeLookup,t.attributes[f.dr],(()=>new Set)).add(e))}))}const _=this.inclusionModeDefinition?.namedTypeDefinitions.get(e);if(_)for(const e of u)_.members?.delete(e)})().then((()=>{p(null)})).catch((e=>{"AbortError"===e.name?p(null):c(e)}))}));p.push(c),this._processingCacheUpdatesLookup.get(e)?.push(c)}if(await Promise.all(p),i?.signal?.aborted)throw(0,l.NK)()}removeFromLayer(e){const t=new Set,n=new Set(e.map((e=>e.id)));for(const n of e)t.add(n.typeName),1===this.memberIdTypeLookup.get(n.id)?.size?this.memberIdTypeLookup.delete(n.id):this.memberIdTypeLookup.get(n.id)?.delete(n.typeName),this.inclusionModeDefinition?.namedTypeDefinitions.forEach(((e,t)=>{t===n.typeName&&e.members?.has(n.id)&&e.members.delete(n.id)}));t.forEach((e=>{this.sublayerCaches.get(e)?.forEach(((t,r)=>{n.has(r)&&this.sublayerCaches.get(e)?.delete(r)}))}))}async retrieveDataFromService(e,t,n){const r=g.A.getInstance(),i=new Set,o=[];let a,l="",u=[];const d="relationship"===t.graphType,I=this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData,T=t.parentCompositeLayer.sublayerIdsCache.get(t.objectType.name);let M=!I&&T?Array.from(T).sort():null;if(this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData)this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData&&null!=e.objectIds&&(M=e.objectIds);else if(null!=e.objectIds&&M&&M.length>0){const t=e.objectIds;e.objectIds=M.filter((e=>t.includes(e)))}else if(null!=e.objectIds)M=e.objectIds;else{if(this.inclusionModeDefinition?.namedTypeDefinitions.has(t.objectType.name)&&(!this.inclusionModeDefinition.namedTypeDefinitions.get(t.objectType.name)?.members||this.inclusionModeDefinition.namedTypeDefinitions.get(t.objectType.name)?.members?.size<1))return e.objectIds=[],[];e.objectIds=M}if(null!=e.outFields){const n=e.outFields;n.includes("*")?t.fields.forEach((e=>{i.add(e.name)})):n.forEach((e=>{e!==f.dr&&e!==t.geometryFieldName&&i.add(e)}))}if(null!=e.geometry){const n=e.geometry;let r;const u=t.parentCompositeLayer.dataManager.knowledgeGraph.serviceDefinition,f=u?.spatialReference,g=u?.serviceCapabilities?.geometryCapabilities;let b=g?.geometryMaxBoundingRectangleSizeX,I=g?.geometryMaxBoundingRectangleSizeY;if("point"===n.type){let e=n;e.spatialReference?.isWGS84||(await(0,y.initializeProjection)(e.spatialReference,m.KK),e=(0,y.project)(e,m.KK)),r=new c.A({spatialReference:m.KK,xmin:e.x-1e-4,ymin:e.y-1e-4,xmax:e.x+1e-4,ymax:e.y+1e-4})}else n?.extent?.spatialReference&&!n.spatialReference?.isWGS84?(await(0,y.initializeProjection)(n.extent.spatialReference,m.KK),r=(0,y.project)(n.extent,m.KK)):r=n.extent;if(b&&I&&f){if(4326!==f.wkid){const e=new c.A({spatialReference:f,xmax:b,ymax:I}),t=(0,y.project)(e,m.KK);b=t.xmax,I=t.ymax}if(r.xmax-r.xmin>b)throw new s.A("knowledge-graph:layer-data-manager",`Extent x bounds should be within ${b}° latitude, limit exceeded`);if(r.ymax-r.ymin>I)throw new s.A("knowledge-graph:layer-data-manager",`Extent y bounds should be within ${I}° longitude, limit exceeded`)}if(null!=e.where&&"1=1"!==e.where){const n=await(0,p.GP)(e.where.toUpperCase(),t.fieldsIndex);t.fields.forEach((e=>{n.fieldNames.includes(e.name)&&i.add(e.name)}))}l=d?`Match ()-[n:${t.objectType.name}]->() WHERE esri.graph.ST_Intersects($param_filter_geom, n.${t.geometryFieldName}) return ID(n), id(startNode(r)), id(endNode(r))`:`Match (n:${t.objectType.name}) WHERE esri.graph.ST_Intersects($param_filter_geom, n.${t.geometryFieldName}) return ID(n)`,t.geometryFieldName&&i.add(t.geometryFieldName),i.forEach((e=>{l+=`, n.${e}`,o.push(e)})),a=new w.A({openCypherQuery:l,bindParameters:{param_filter_geom:new h.A({rings:(0,_.Wq)(r)})}})}else{let n="";if(null!=e.where&&"1=1"!==e.where){const r=await(0,p.GP)(e.where,t.fieldsIndex);t.fields.forEach((e=>{r.fieldNames.includes(e.name)&&i.add(e.name)}));const s=new Set(["column-reference","string","number","binary-expression"]),o=new Set(["=","<","<=","<>",">",">=","AND","OR","LIKE"]);let a=!1;const l=e=>{if("column-reference"===e.type)return`n.${e.column}`;if("string"===e.type)return`'${e.value}'`;if("number"===e.type)return`${e.value}`;if("binary-expression"===e.type&&s.has(e.left.type)&&s.has(e.right.type)&&o.has(e.operator))return`${l(e.left)} ${e.operator} ${l(e.right)}`;if("binary-expression"===e.type&&"LIKE"===e.operator){let t="";if("function"===e.left.type&&"column-reference"===e.left.args.value[0].type)t+=`lower(n.${e.left.args.value[0].column})`;else{if("column-reference"!==e.left.type)return a=!0,"";t+=`lower(n.${e.left.column})`}if(t+=" CONTAINS (","string"!==e.right.type)return a=!0,"";{let n=e.right.value;"%"===n.charAt(0)&&(n=n.slice(1)),"%"===n.charAt(n.length-1)&&(n=n.slice(0,-1)),t+=`'${n.toLowerCase()}')`}return t}return a=!0,""};n=l(r.parseTree),a&&(n="")}let r="";r=d?`Match ()-[n:${t.objectType.name}]->()`:`Match (n:${t.objectType.name})`;let s=!1;M&&(s=!0,r+=" WHERE ID(n) IN $ids"),n&&(r+=s?" AND":" WHERE",r+=` ${n}`),r+=" return ID(n)",d&&(r+=", id(startNode(n)), id(endNode(n))"),e.returnGeometry&&t.geometryFieldName&&i.add(t.geometryFieldName),i.forEach((e=>{r+=`, n.${e}`,o.push(e)})),a=new w.A(M?{openCypherQuery:r,bindParameters:{ids:M}}:{openCypherQuery:r})}const v=(await(0,b.executeQueryStreaming)(t.parentCompositeLayer.dataManager.knowledgeGraph,a,n)).resultRowsStream.getReader();for(;;){const{done:e,value:n}=await v.read();if(e)break;const i=[];for(let e=0;e<n.length;e++){const t=n[e];let r=0,s=0;const a={properties:{}};for(a.id=t[r],r++,s++,d&&(a.originId=t[r],r++,s++,a.destinationId=t[r],r++,s++);r<t.length;r++)a.properties[o[r-s]]=t[r];i.push(a)}u=u.concat(r.writeToStore(i,f.dr,t.parentCompositeLayer.dataManager.geographicLookup.get(t.objectType.name)?.name))}return u}_isEndEntitySpatial(e,t,n){for(const r of e??[])if(this.entityTypeNames.has(r)){const e=this.geographicLookup.get(r),i=e&&this.sublayerCaches.get(r)?.get(t.attributes[n]);if(e&&i?.attributes[e.name])return!0}return!1}_getNamedTypeIdMapFromNodeIds(e){const t=new Map;return e.forEach((e=>{if(this.memberIdTypeLookup.has(e))for(const n of this.memberIdTypeLookup.get(e)){if(!this.entityTypeNames.has(n))return;t.has(n)?t.get(n)?.push(e):t.set(n,[e])}})),t}};(0,r._)([(0,u.MZ)()],T.prototype,"knowledgeGraph",void 0),(0,r._)([(0,u.MZ)()],T.prototype,"inclusionModeDefinition",void 0),(0,r._)([(0,u.MZ)()],T.prototype,"entityTypeNames",void 0),(0,r._)([(0,u.MZ)()],T.prototype,"relationshipTypeNames",void 0),(0,r._)([(0,u.MZ)()],T.prototype,"geographicLookup",void 0),(0,r._)([(0,u.MZ)()],T.prototype,"sublayerCaches",void 0),(0,r._)([(0,u.MZ)()],T.prototype,"nodeConnectionsLookup",void 0),(0,r._)([(0,u.MZ)()],T.prototype,"relationshipConnectionsLookup",void 0),(0,r._)([(0,u.MZ)()],T.prototype,"memberIdTypeLookup",void 0),T=(0,r._)([(0,d.$)("esri.layers.knowledgeGraph.KnowledgeGraphLayerDataManager")],T)},70643:(e,t,n)=>{n.d(t,{A:()=>re});var r=n(90237),i=n(13874),s=n(4718),o=n(53966),a=n(92071),l=(n(29953),n(10107)),p=(n(44208),n(40608)),u=n(43937),d=n(35666),c=n(5443),h=n(86738),y=n(39829),m=n(82799),f=n(57251),g=n(16930),_=n(21325),b=n(50498),w=n(4146),I=n(83221),T=n(19730),M=n(64714),v=n(15375);n(87811);const x=(0,n(17036).p)(),A=e=>{let t=class extends e{constructor(){super(...arguments),this.fields=[],this.fieldsIndex=null}};return(0,r._)([(0,l.MZ)(x.fields)],t.prototype,"fields",void 0),(0,r._)([(0,l.MZ)(x.fieldsIndex)],t.prototype,"fieldsIndex",void 0),t=(0,r._)([(0,p.$)("esri.layers.knowledgeGraph.KnowledgeGraphSublayerBase")],t),t};var E=n(85342),S=n(63074),N=n(6455),C=n(87718),L=n(76294),R=n(32756),k=n(54310),D=n(25036),F=n(82935),B=n(10873),j=n(13213),O=n(20437),$=n(30524),Z=n(46499),G=n(39383),P=n(96184),q=n(96576),U=n(65494),z=n(13112),Y=n(22671),Q=n(61956),H=n(30291),V=n(37531),W=n(61322);function X(e){if(!e.json)return e;e.json.write=J(e.json.write);const t=e.json.origins;if(!t)return e;let n;for(n in t){const e=t[n];e&&(e.write=J(e.write))}return e}function J(e){return"object"==typeof e&&e?(!1!==e.enabled&&(e.overridePolicy=function(e){const{target:t,writer:n,overridePolicy:r,...i}=e;return function(e,t){const n=ee.call(this,e,t);return n.enabled?{...i,...n}:n}}(e)),e):!0===e?K():e}function K(){return{overridePolicy:ee}}function ee(e,t){const n=!!this.geometryType;let r={enabled:n};return n&&(r={...r,...te.call(this,e,t)}),r}function te(e,t){return{ignoreOrigin:this.originIdOf(t)>d.Gr.DEFAULTS}}let ne=class extends(A((0,N.FJ)((0,L.J)((0,C.F)((0,S.dM)((0,R.fY)((0,F.e)((0,D.j)((0,k.J)((0,a.P)(w.A))))))))))){constructor(e){super(e),this.blendMode="normal",this.capabilities=(0,M.f)(!1,!1),this.charts=null,this.definitionExpression=null,this.displayField="",this.displayFilterEnabled=!0,this.displayFilterInfo=null,this.effect=null,this.elevationInfo=null,this.featureEffect=null,this.graphType=null,this.labelsVisible=!0,this.layerType=null,this.legendEnabled=!0,this.maxScale=0,this.minScale=0,this.objectIdField=v.dr,this.objectType=null,this.opacity=1,this.orderBy=null,this.parent=null,this.parentCompositeLayer=null,this.persistenceEnabled=!0,this.popupEnabled=!0,this.popupTemplate=null,this.refreshInterval=0,this.source={openPorts:()=>this.load().then((()=>{const e=new MessageChannel;return new W.default(e.port1,{channel:e,client:{queryFeatures:(e,t={})=>{const n=Q.A.fromJSON(e);return this.queryFeaturesJSON(n,t)}}}),[e.port2]}))},this.type="knowledge-graph-sublayer",this.useViewTime=!0,this.visible=!0}get defaultPopupTemplate(){return this.createPopupTemplate()}set featureReduction(e){const t=this._normalizeFeatureReduction(e);this._set("featureReduction",t)}get fields(){const e=[];return this.objectType?.properties?.forEach((t=>{const n="esriFieldTypeOID"===t.fieldType?"esriFieldTypeInteger":t.fieldType;e.push(O.A.fromJSON({name:t.name,type:n,alias:t.alias,defaultValue:t.defaultValue,editable:t.editable,nullable:t.nullable}))})),e.push(O.A.fromJSON({name:this.objectIdField,type:"esriFieldTypeString",alias:this.objectIdField,editable:!1}),O.A.fromJSON({name:v.M1,type:"esriFieldTypeInteger",alias:v.M1,editable:!1}),O.A.fromJSON({name:v.BL,type:"esriFieldTypeInteger",alias:v.BL,editable:!1})),e}get geometryType(){if("link-chart"===this.parentCompositeLayer?.type)return"relationship"===this.graphType?"polyline":"point";const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.geometryType;return t&&"esriGeometryNull"!==t?b.gy.fromJSON(t):null}get geometryFieldName(){if("link-chart"===this.parentCompositeLayer?.type)return v.T1;const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name);return e?.name??null}get graphTypeName(){return this.objectType?.name}get hasM(){const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.name,n=t?this.objectType?.properties?.[t]:null;return n?.hasM??!1}get hasZ(){const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.name,n=t?this.objectType?.properties?.[t]:null;return n?.hasZ??!1}set labelingInfo(e){this._set("labelingInfo",e)}get labelingInfo(){if(this._isOverridden("labelingInfo"))return this._get("labelingInfo");const e=this.objectType.properties?(0,E.MY)(this.objectType.properties):"ESRI__ID";return"link-chart"===this.parentCompositeLayer.type?(0,E.iW)(this.graphType,this.graphTypeName,e):(0,E.e$)(this.graphTypeName,this.geometryType,e)}set renderer(e){(0,$.yp)(e,this.fieldsIndex),this._set("renderer",e)}get renderer(){if(this._isOverridden("renderer"))return this._get("renderer");const e=this.parentCompositeLayer?.dataManager?.knowledgeGraph?.dataModel,t=[...e?.entityTypes??[],...e?.relationshipTypes??[]].map((e=>e.name)).indexOf(this.graphTypeName),n=(0,E.Td)(t);if("link-chart"===this.parentCompositeLayer?.type){if("relationship"===this.graphType)return new q.A({type:"simple",symbol:(0,E.UT)(n)});const e=(0,U.r)((0,M.F0)(b.gy.toJSON("point")).renderer);return(0,V.dt)(e.symbol,n),e}const r=(0,U.r)((0,M.F0)(b.gy.toJSON(this.geometryType)).renderer);return(0,V.dt)(r.symbol,n),r}get spatialReference(){return this.parentCompositeLayer?.dataManager?.knowledgeGraph?.dataModel?.spatialReference??g.A.WGS84}set timeInfo(e){this._set("timeInfo",e)}get title(){return this._isOverridden("title")?this._get("title"):this.graphTypeName}set title(e){this._set("title",e)}writeTitle(e,t){t.title=e??"Layer"}createPopupTemplate(e){return(0,H.tn)(this,e)}createQuery(){return new Q.A({where:"1=1",outFields:["*"]})}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){return null}async queryFeatures(e,t){const{resolvedQuery:n,queryEngine:r}=await this._setupQueryObjects(e),i=Y.A.fromJSON(await r.executeQuery(n.toJSON(),t?.signal));return i.features.forEach((e=>{e.sourceLayer=this})),i}async queryFeaturesJSON(e,t){const{resolvedQuery:n,queryEngine:r}=await this._setupQueryObjects(e);return await r.executeQuery(n.toJSON(),t?.signal)}async queryFeatureCount(e,t){const{resolvedQuery:n,queryEngine:r}=await this._setupQueryObjects(e);return r.executeQueryForCount(n.toJSON(),t?.signal)}async queryExtent(e={},t){const n={...e,returnGeometry:!0},{resolvedQuery:r,queryEngine:i}=await this._setupQueryObjects(n),s=await i.executeQueryForExtent(r.toJSON(),t?.signal);let o;return o=null!=s.extent?.xmin&&null!=s.extent?.xmax&&null!=s.extent?.ymin&&null!=s.extent?.ymax?new c.A(s.extent):new c.A,{count:s.count,extent:o}}async queryObjectIds(e,t){const n=Q.A.from(e);let r;if("link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)r=this._cachedQueryEngine;else{const e=await this.parentCompositeLayer.dataManager.getData(n,this,t);r=this.loadQueryEngine(e)}return await r.executeQueryForIds(n.toJSON(),t?.signal)}loadQueryEngine(e){const t=new I.A({geometryType:b.gy.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ}),n=new T.do({fieldsIndex:this.fieldsIndex.toJSON(),geometryType:b.gy.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ,objectIdField:this.objectIdField,spatialReference:this.spatialReference.toJSON(),timeInfo:this.timeInfo?.toJSON(),featureStore:t});return n.featureStore.addMany(e),n}async refreshCachedQueryEngine(){const e=await this.parentCompositeLayer.dataManager.getData(new Q.A({where:"1=1",outFields:[v.dr]}),this);this._cachedQueryEngine=this.loadQueryEngine(e)}load(e){return this.addResolvingPromise(this.parent.load(e).then((()=>(0,$.sv)(this.timeInfo,this.fieldsIndex)))),Promise.resolve(this)}async _setupQueryObjects(e,t){const n=Q.A.from(e),r=n.geometry;if(r&&!r.spatialReference?.isWGS84&&(await(0,f.initializeProjection)(r.spatialReference,_.KK),n.geometry=(0,f.project)(r instanceof y.A||r instanceof m.A||r instanceof h.A?r:r.extent,_.KK)),"link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)return{resolvedQuery:n,queryEngine:this._cachedQueryEngine};const i=await this.parentCompositeLayer.dataManager.getData(n,this,t);return{resolvedQuery:n,queryEngine:this.loadQueryEngine(i)}}};(0,r._)([(0,l.MZ)(X((0,s.o8)(S.sU)))],ne.prototype,"blendMode",void 0),(0,r._)([(0,l.MZ)()],ne.prototype,"capabilities",void 0),(0,r._)([(0,l.MZ)({json:{origins:{"web-scene":{write:!1}},write:K()}})],ne.prototype,"charts",void 0),(0,r._)([(0,l.MZ)({readOnly:!0})],ne.prototype,"defaultPopupTemplate",null),(0,r._)([(0,l.MZ)({type:String,json:{origins:{service:{read:!1}},name:"layerDefinition.definitionExpression",write:{ignoreOrigin:!0}}})],ne.prototype,"definitionExpression",void 0),(0,r._)([(0,l.MZ)()],ne.prototype,"displayField",void 0),(0,r._)([(0,l.MZ)(X((0,s.o8)(N.Dp)))],ne.prototype,"displayFilterEnabled",void 0),(0,r._)([(0,l.MZ)(X((0,s.o8)(N.KV)))],ne.prototype,"displayFilterInfo",void 0),(0,r._)([(0,l.MZ)(X((0,s.o8)(S.LF)))],ne.prototype,"effect",void 0),(0,r._)([(0,l.MZ)()],ne.prototype,"elevationInfo",void 0),(0,r._)([(0,l.MZ)(X((0,s.o8)(C.Y)))],ne.prototype,"featureEffect",void 0),(0,r._)([(0,l.MZ)(X((0,s.o8)(j.d)))],ne.prototype,"featureReduction",null),(0,r._)([(0,l.MZ)()],ne.prototype,"fields",null),(0,r._)([(0,l.MZ)()],ne.prototype,"geometryType",null),(0,r._)([(0,l.MZ)()],ne.prototype,"geometryFieldName",null),(0,r._)([(0,l.MZ)({type:["entity","relationship"],nonNullable:!0,json:{write:{isRequired:!0,ignoreOrigin:!0}}})],ne.prototype,"graphType",void 0),(0,r._)([(0,l.MZ)({type:String,nonNullable:!0,json:{write:{isRequired:!0,ignoreOrigin:!0}}})],ne.prototype,"graphTypeName",null),(0,r._)([(0,l.MZ)()],ne.prototype,"hasM",null),(0,r._)([(0,l.MZ)()],ne.prototype,"hasZ",null),(0,r._)([(0,l.MZ)({type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0}}})],ne.prototype,"id",void 0),(0,r._)([(0,l.MZ)({type:Boolean,value:!0,nonNullable:!0,json:{name:"showLabels",default:!1,write:{overridePolicy(){return{enabled:!!this.geometryType,alwaysWriteDefaults:!0,ignoreOrigin:!0}}}}})],ne.prototype,"labelsVisible",void 0),(0,r._)([(0,l.MZ)({type:[Z.A],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:function(e,t,n){const r=[["ESRI__AGGREGATION_COUNT",v.M1],["ESRI__ORIGIN_ID",v.Cz],["ESRI__DESTINATION_ID",v.KQ],["ESRI__LAYOUT_GEOMETRY",v.T1]];try{for(const t of e)for(const[e,n]of r)t.labelExpression=t.labelExpression?.replaceAll(e,n),t.labelExpressionInfo?.expression&&(t.labelExpressionInfo.expression=t.labelExpressionInfo.expression.replaceAll(e,n))}catch(e){o.A.getLogger(this).warn("Error updating labelingInfo",e)}return(0,G.w)(e,t,n)},write:K()}})],ne.prototype,"labelingInfo",null),(0,r._)([(0,l.MZ)({readOnly:!0,json:{read:!1,write:{writer(e,t){switch(this.parentCompositeLayer.type){case"link-chart":t.layerType="LinkChartSubLayer";break;case"knowledge-graph":t.layerType=this.geometryType?"KnowledgeGraphSubLayer":"KnowledgeGraphSubTable"}},isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],ne.prototype,"layerType",void 0),(0,r._)([(0,l.MZ)(X((0,s.o8)(B.fV)))],ne.prototype,"legendEnabled",void 0),(0,r._)([(0,l.MZ)(X((0,s.o8)(B.hG)))],ne.prototype,"maxScale",void 0),(0,r._)([(0,l.MZ)(X((0,s.o8)(B.hn)))],ne.prototype,"minScale",void 0),(0,r._)([(0,l.MZ)()],ne.prototype,"objectIdField",void 0),(0,r._)([(0,l.MZ)()],ne.prototype,"objectType",void 0),(0,r._)([(0,l.MZ)(X((0,s.o8)(B.ke)))],ne.prototype,"opacity",void 0),(0,r._)([(0,l.MZ)(X((0,s.o8)(R.ne)))],ne.prototype,"orderBy",void 0),(0,r._)([(0,l.MZ)({clonable:!1})],ne.prototype,"parent",void 0),(0,r._)([(0,l.MZ)()],ne.prototype,"parentCompositeLayer",void 0),(0,r._)([(0,l.MZ)(X((0,s.o8)(B.M6)))],ne.prototype,"popupEnabled",void 0),(0,r._)([(0,l.MZ)({type:i.A,json:{name:"popupInfo",write:{ignoreOrigin:!0}}})],ne.prototype,"popupTemplate",void 0),(0,r._)([(0,l.MZ)({type:Number,json:{write:{overridePolicy:te}}})],ne.prototype,"refreshInterval",void 0),(0,r._)([(0,l.MZ)({types:z.Hg,json:{name:"layerDefinition.drawingInfo.renderer",write:K()}})],ne.prototype,"renderer",null),(0,r._)([(0,l.MZ)()],ne.prototype,"source",void 0),(0,r._)([(0,l.MZ)()],ne.prototype,"spatialReference",null),(0,r._)([(0,l.MZ)({type:P.A,json:{name:"layerDefinition.timeInfo",write:!0,origins:{"web-document":{name:"layerDefinition.timeInfo",read:!0,write:!0},"portal-item":{name:"layerDefinition.timeInfo",read:!0,write:!0}}}})],ne.prototype,"timeInfo",null),(0,r._)([(0,l.MZ)({type:String,json:{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],ne.prototype,"title",null),(0,r._)([(0,u.K)("title")],ne.prototype,"writeTitle",null),(0,r._)([(0,l.MZ)({json:{read:!1}})],ne.prototype,"type",void 0),(0,r._)([(0,l.MZ)(X((0,s.o8)(F.B)))],ne.prototype,"useViewTime",void 0),(0,r._)([(0,l.MZ)({type:Boolean,json:{name:"visibility",write:K()}})],ne.prototype,"visible",void 0),ne=(0,r._)([(0,p.$)("esri.layers.knowledgeGraph.KnowledgeGraphSublayer")],ne);const re=ne},69860:(e,t,n)=>{n.d(t,{A:()=>a});var r=n(65864),i=n(90708),s=n(43334),o=n(15375);class a{constructor(){this._featureLookup=new Map}static getInstance(){return a.instance||(a.instance=new a),a.instance}static resetInstance(){a.instance&&(a.instance=null)}deleteFromStore(e){e.forEach((e=>{this._featureLookup.delete(e)}))}readFromStoreByList(e){const t=[];return e.forEach((e=>{const n=this.readFromStoreById(e);n&&t.push(n)})),t}readFromStoreById(e){return this._featureLookup.get(e)??null}writeToStore(e,t,n){const a=[];return e.forEach((e=>{if(!e?.id)return;e.properties||(e.properties=[]);let l,p=null;if(n&&e.properties[n]&&(p=(0,i.Ux)(e.properties[n])),"originId"in e&&"destinationId"in e&&(e.properties[o.Cz]=e.originId,e.properties[o.KQ]=e.destinationId),e.properties[t]=e.id,e.id&&this._featureLookup.has(e.id)&&this._featureLookup.get(e.id).attributes){const i=this._featureLookup.get(e.id),o=JSON.parse(JSON.stringify(Object.assign(i.attributes,e.properties)));n&&e.properties[n]&&(o[n]=(0,r.rS)(e.properties[n])),l=new s.Om(p?JSON.parse(JSON.stringify(p)):i?.geometry?JSON.parse(JSON.stringify(i.geometry)):null,o,null,e.properties[t])}else l=new s.Om(p?JSON.parse(JSON.stringify(p)):null,e.properties,null,e.properties[t]);this._featureLookup.set(`${e.typeName?`${e.typeName}__${e.id}`:e.id}`,l),a.push(l)})),a}}},15375:(e,t,n)=>{n.d(t,{BL:()=>l,Cz:()=>i,KQ:()=>s,M1:()=>a,T1:()=>o,dr:()=>r});const r="ESRI__ID",i="ESRI__OriginID",s="ESRI__DestID",o="ESRI__LayoutGeometry",a="ESRI__AggregationCount",l="LC.ESRI__IsSpatial"},85342:(e,t,n)=>{n.d(t,{MY:()=>f,Td:()=>y,UT:()=>m,e$:()=>_,iW:()=>g,qN:()=>d});var r=n(68197),i=n(46499),s=n(73913),o=n(88613),a=n(40863),l=n(68249);const p={initializeLayersFromClientData:async(e,t,n)=>{if(t||(t=[...e.layers,...e.tables].map((e=>e.graphTypeName))),0===t?.length)return;const r=new Map;for(const n of t)r.set(n,u(e,n));const i=await(0,o.fetchClientDataAtKeys)(e.dataManager.knowledgeGraph,Array.from(r.values()),{requestOptions:{signal:n?.signal}});for(const t of[...e.layers,...e.tables]){const n=t.objectType.name;if(null==n)continue;const r=i.get(u(e,n));if(r){const e=JSON.parse(r);null===e||"object"!=typeof e||e.hasOwnProperty("showLabels")||(e.showLabels=!1),t.read(e,{origin:"service"})}}}},u=(e,t)=>"knowledge-graph"===e.type?`${t}/Map`:`${t}/LinkChart/LinkChartSubLayer`;async function d(e,t,n){return p.initializeLayersFromClientData(e,t,n)}const c=["#4a0932","#b31515","#18382e","#a64f1b","#102432","#8c213f","#ed9310","#2c6954","#144d59","#ffc730","#75351e","#454f4b","#78b1c2","#191921","#8f8f82","#9be0c0","#dbb658","#87b051","#11495c","#c43541","#9c5596","#44498b","#ad9d63","#86afb3","#5c98ca","#b0bfa2","#73241f","#b86b53","#d9d78c","#3e756d","#f260a1","#a0d17d","#c27c30","#eb82eb","#ffdf3c","#ffb259","#ab52b3","#3cccb4","#0095ba","#d92b30"],h="#8f8f82";function y(e){return e<0||e>=c.length?new r.A(h):new r.A(c[e])}function m(e){const t=e.toArray();return new a.A({data:{type:"CIMSymbolReference",symbol:{type:"CIMLineSymbol",symbolLayers:[{type:"CIMSolidStroke",enable:!0,style:"solid",width:.75,color:t},{type:"CIMVectorMarker",enable:!0,size:6,markerPlacement:{type:"CIMMarkerPlacementOnLine",angleToLine:!0,relativeTo:"LineMiddle"},frame:{xmin:-10,ymin:-5,xmax:0,ymax:5},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{rings:[[[-12,-3.47],[-12,3.6],[1.96,-.03],[-12,-3.47]]]},symbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:t}]}}]}]}}})}function f(e){let t="ESRI__ID",n=4;for(const r of e)if(r.name){if("name"===r.name.toLowerCase()){t=r.name;break}r.name.toLowerCase().includes("name")?(t=r.name,n=2):"esriFieldTypeString"===r.fieldType&&n>3&&(t=r.name,n=3)}return t}function g(e,t,n){const r={color:[80,80,80],haloColor:[255,255,255],haloSize:.7,font:{size:10,weight:"normal"}},o=new i.A({labelExpressionInfo:new s.A({expression:"ESRI__ID"===n?`${t}`:`$feature.${n}`}),labelPlacement:"above-center",symbol:new l.A(r)}),a=new i.A({labelExpressionInfo:new s.A({expression:`'${t}' + IIf($feature.ESRI__AggregationCount>1, ' (' + $feature.ESRI__AggregationCount + ')', '')`}),labelPlacement:"center-along",labelPosition:"parallel",repeatLabel:!1,symbol:new l.A({...r,yoffset:"12px"})});return"entity"===e?[o]:[a]}function _(e,t,n){const r={color:[255,255,255],haloColor:[0,0,0],haloSize:.7,font:{size:10,weight:"bold"}},o="ESRI__ID"===n?`${e}`:`$feature.${n}`;return"point"===t?[new i.A({labelExpressionInfo:new s.A({expression:o}),labelPlacement:"above-center",symbol:new l.A(r)})]:"polyline"===t?[new i.A({labelExpressionInfo:new s.A({expression:o}),labelPlacement:"center-along",repeatLabel:!0,symbol:new l.A(r)})]:"polygon"===t?[new i.A({labelExpressionInfo:new s.A({expression:o}),labelPlacement:"always-horizontal",symbol:new l.A(r)})]:null}},30504:(e,t,n)=>{n.d(t,{k5:()=>p,aq:()=>l,Wq:()=>u}),n(52106);var r=n(49186),i=(n(86738),n(39829),n(82799),n(94194),n(69860),n(8460),n(66552));(0,i.O)()({none:"none",startAndEnd:"start-and-end",startOnly:"start-only"}),(0,i.O)()({absoluteValue:"absolute-value",multiplier:"multiplier"});const s=new Map([["basic-grid","basic-grid"],["geographic-organic-standard","geographic-organic-standard"],["hierarchical-bottom-to-top","hierarchical-bottom-to-top"],["hierarchical-top-to-bottom","hierarchical-bottom-to-top"],["organic-community","organic-community"],["organic-fusiform","organic-standard"],["organic-leaf-circle","organic-standard"],["organic-standard","organic-standard"],["radial-node-centric","radial-root-centric"],["radial-root-centric","radial-root-centric"],["tree-bottom-to-top","tree-left-to-right"],["tree-left-to-right","tree-left-to-right"],["tree-right-to-left","tree-left-to-right"],["tree-top-to-bottom","tree-left-to-right"],["chronological-mono-timeline","chronological-mono-timeline"],["chronological-multi-timeline","chronological-multi-timeline"]]);var o=n(88613),a=n(42538);async function l(e,t,n){const r=[],i=function(e,t){const n=new Map;if(t.dataModel?.relationshipTypes)for(const e of t.dataModel.relationshipTypes)e.name&&n.set(e.name,[]);for(const t of e)n.has(t.typeName)&&n.get(t.typeName)?.push(t.id);return n}(e,t),s={},l=[];for(const[e,t]of i){if(t.length<1)continue;const n=`${e}_ids`;s[n]=t,l.push(`MATCH (n)-[r:${e}]->(m) WHERE id(r) in $${n} RETURN id(n), labels(n)[0], id(m), labels(m)[0]`)}if(0===l.length)return[];const p=l.join(" UNION "),u=new a.A({openCypherQuery:p,bindParameters:s}),d=(await(0,o.executeQueryStreaming)(t,u,n?.requestOptions)).resultRowsStream.getReader();for(;;){const{done:e,value:t}=await d.read();if(e)break;for(const e of t)r.push({id:e[0],typeName:e[1]}),r.push({id:e[2],typeName:e[3]})}return r}n(40863),n(94985),n(68249);const p=e=>s.get(e)??"radial-root-centric";function u(e){if(!e.spatialReference.isWGS84)throw new r.A("knowledge-graph:layer-support-utils","The utilsExtentToInBoundsRings function only supports WGS84 spatial references.");return e.clone().normalize().map((e=>[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]))}},6455:(e,t,n)=>{n.d(t,{FJ:()=>w,Dp:()=>I,KV:()=>T});var r=n(90237),i=n(93637),s=n(10107),o=(n(44208),n(53966),n(87811),n(40608)),a=n(89317),l=n(69540),p=n(5503),u=n(25482),d=n(43937),c=n(83960),h=n(13069);const y={write:{overridePolicy:(e,t,n)=>({enabled:!n||"scale"===n.filterMode})}};let m=class extends(l.A.ClonableMixin(u.A)){constructor(e){super(e),this.id=(0,h.lk)(),this.maxScale=0,this.minScale=0,this.title="",this.where=null}};(0,r._)([(0,s.MZ)({type:String,json:{write:!0}})],m.prototype,"id",void 0),(0,r._)([(0,s.MZ)({type:Number,json:y})],m.prototype,"maxScale",void 0),(0,r._)([(0,s.MZ)({type:Number,json:y})],m.prototype,"minScale",void 0),(0,r._)([(0,s.MZ)({type:String,json:{write:!0}})],m.prototype,"title",void 0),(0,r._)([(0,s.MZ)({type:String,json:{write:!0}})],m.prototype,"where",void 0),m=(0,r._)([(0,o.$)("esri.layers.support.DisplayFilter")],m);const f=m;var g=n(41560);let _=class extends(l.A.ClonableMixin(u.A)){constructor(e){super(e),this.activeFilterId=null,this.filters=new(p.A.ofType(f)),this.mode="manual"}writeFilters(e,t,n,r){const i=e.toArray();"scale"===this.mode&&i.sort(((e,t)=>{const n=(0,c.oW)(t.minScale,e.minScale),r=e.maxScale-t.maxScale;return 0===n?r:n})),t[n]=i.map((e=>e.toJSON(r)))}write(e,t){return super.write(e,(0,g.mW)(this,t))}};(0,r._)([(0,s.MZ)({type:String,json:{write:{overridePolicy:(e,t,n)=>({enabled:"manual"===n.filterMode,isRequired:!0})}}})],_.prototype,"activeFilterId",void 0),(0,r._)([(0,s.MZ)({type:p.A.ofType(f),nonNullable:!0,json:{write:!0}})],_.prototype,"filters",void 0),(0,r._)([(0,d.K)("filters")],_.prototype,"writeFilters",null),(0,r._)([(0,s.MZ)({type:["manual","scale"],nonNullable:!0,json:{name:"filterMode",write:!0}})],_.prototype,"mode",void 0),_=(0,r._)([(0,o.$)("esri.layers.support.DisplayFilterInfo")],_);const b=_,w=e=>{let t=class extends e{constructor(){super(...arguments),this.displayFilterEnabled=!0,this.displayFilterInfo=null}};return(0,r._)([(0,s.MZ)(I)],t.prototype,"displayFilterEnabled",void 0),(0,r._)([(0,s.MZ)(T)],t.prototype,"displayFilterInfo",void 0),t=(0,r._)([(0,o.$)("esri.layers.mixins.DisplayFilteredLayer")],t),t},I={type:Boolean,json:{name:"layerDefinition.disableDisplayFilter",read:{reader:e=>!e},write:{layerContainerTypes:a.K,writer(e,t,n){(0,i.sM)(n,!e,t)}},origins:{"web-scene":{write:!1,read:!1}}}},T={type:b,json:{name:"layerDefinition.displayFilterInfo",write:{enabled:!0,allowNull:!0,layerContainerTypes:a.K},origins:{"web-scene":{write:!1,read:!1}}}}},32756:(e,t,n)=>{n.d(t,{Rr:()=>l,fY:()=>u,ne:()=>p});var r=n(90237),i=n(93637),s=n(10107),o=(n(44208),n(53966),n(87811),n(40608)),a=n(91880);function l(e,t,n){if(!e)return null;const r=e.find((e=>!!e.field));if(!r)return null;const i=new a.A;return i.read(r,n),[i]}const p={type:[a.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:l},write:{writer:function(e,t,n,r){const s=e.find((e=>!!e.field));s&&(0,i.sM)(n,[s.toJSON()],t)}}}},u=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return(0,r._)([(0,s.MZ)(p)],t.prototype,"orderBy",void 0),t=(0,r._)([(0,o.$)("esri.layers.mixins.OrderedLayer")],t),t}},82935:(e,t,n)=>{n.d(t,{B:()=>h,e:()=>y});var r=n(90237),i=n(10107),s=(n(44208),n(53966),n(87811),n(36005)),o=n(40608),a=n(89317),l=n(30524),p=n(96184),u=n(73133),d=n(79677),c=n(10184);const h={type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation",layerContainerTypes:a.K}}},y=e=>{let t=class extends e{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const n=t.timeInfo.exportOptions;if(!n)return null;const r=n.timeOffset,i=u.j.fromJSON(n.timeOffsetUnits);return r&&i?new c.A({value:r,unit:i}):null}set timeInfo(e){(0,l.sv)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,r._)([(0,i.MZ)({type:d.A,json:{write:!1}})],t.prototype,"timeExtent",void 0),(0,r._)([(0,i.MZ)({type:c.A})],t.prototype,"timeOffset",void 0),(0,r._)([(0,s.w)("service","timeOffset",["timeInfo.exportOptions"])],t.prototype,"readOffset",null),(0,r._)([(0,i.MZ)({value:null,type:p.A,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],t.prototype,"timeInfo",null),(0,r._)([(0,i.MZ)(h)],t.prototype,"useViewTime",void 0),t=(0,r._)([(0,o.$)("esri.layers.mixins.TemporalLayer")],t),t}},91880:(e,t,n)=>{n.d(t,{A:()=>d});var r,i=n(90237),s=n(66552),o=n(25482),a=n(10107),l=(n(44208),n(53966),n(87811),n(40608));const p=new s.J({asc:"ascending",desc:"descending"});let u=r=class extends o.A{constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new r({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,i._)([(0,a.MZ)({type:String,json:{write:!0}})],u.prototype,"field",void 0),(0,i._)([(0,a.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],u.prototype,"valueExpression",void 0),(0,i._)([(0,a.MZ)({type:p.apiValues,json:{type:p.jsonValues,read:p.read,write:p.write}})],u.prototype,"order",void 0),u=r=(0,i._)([(0,l.$)("esri.layers.support.OrderByInfo")],u);const d=u},96184:(e,t,n)=>{n.d(t,{A:()=>m});var r=n(90237),i=n(69540),s=n(25482),o=n(10107),a=(n(44208),n(53966),n(87811),n(36005)),l=n(40608),p=n(43937),u=n(79677),d=n(10184),c=n(56400);function h(e,t){return d.A.fromJSON({value:e,unit:t})}let y=class extends(i.A.ClonableMixin(s.A)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeZone=null,this.trackIdField=null,this.useTime=!0,this.stops=null}readFullTimeExtent(e,t){return t.timeExtent&&Array.isArray(t.timeExtent)&&2===t.timeExtent.length?u.A.fromArray(t.timeExtent):null}writeFullTimeExtent(e,t){null!=e?.start&&null!=e.end?t.timeExtent=e.toArray():t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?h(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?h(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,r._)([(0,o.MZ)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],y.prototype,"cumulative",void 0),(0,r._)([(0,o.MZ)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],y.prototype,"endField",void 0),(0,r._)([(0,o.MZ)({type:u.A,json:{write:{enabled:!0,allowNull:!0}}})],y.prototype,"fullTimeExtent",void 0),(0,r._)([(0,a.w)("fullTimeExtent",["timeExtent"])],y.prototype,"readFullTimeExtent",null),(0,r._)([(0,p.K)("fullTimeExtent")],y.prototype,"writeFullTimeExtent",null),(0,r._)([(0,o.MZ)({type:Boolean,json:{write:!0}})],y.prototype,"hasLiveData",void 0),(0,r._)([(0,o.MZ)({type:d.A,json:{write:{enabled:!0,allowNull:!0}}})],y.prototype,"interval",void 0),(0,r._)([(0,a.w)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],y.prototype,"readInterval",null),(0,r._)([(0,p.K)("interval")],y.prototype,"writeInterval",null),(0,r._)([(0,o.MZ)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],y.prototype,"startField",void 0),(0,r._)([(0,o.MZ)((0,c.P6)("timeReference",!0))],y.prototype,"timeZone",void 0),(0,r._)([(0,o.MZ)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],y.prototype,"trackIdField",void 0),(0,r._)([(0,o.MZ)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],y.prototype,"useTime",void 0),(0,r._)([(0,o.MZ)({type:[Date],json:{read:!1}})],y.prototype,"stops",void 0),y=(0,r._)([(0,l.$)("esri.layers.support.TimeInfo")],y);const m=y},4071:(e,t,n)=>{n.d(t,{$:()=>r,P:()=>i});const r={supportsDate:!1,supportsFixedInterval:!1,supportsAutoInterval:!1,supportsFixedBoundaries:!1,supportsStackBy:!1,supportsSplitBy:!1,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!1,supportedStatistics:void 0,supportedNormalizationTypes:void 0},i={analytics:{supportsCacheHint:!1},attachment:{supportsContentType:!1,supportsExifInfo:!1,supportsKeywords:!1,supportsName:!1,supportsSize:!1,supportsCacheHint:!1,supportsOrderByFields:!1,supportsResize:!1},data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsAsyncApplyEdits:!1,zDefault:void 0},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryBins:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:r,query:{maxRecordCount:0,maxRecordCountFactor:0,standardMaxRecordCount:0,supportsCacheHint:!1,supportsCentroid:!1,supportsCompactGeometry:!1,supportsCurrentUser:!1,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsReturnMesh:!1,supportsSqlExpression:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsTrueCurve:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsStatistics:!1,tileMaxRecordCount:0}}},41560:(e,t,n)=>{n.d(t,{Ch:()=>o,mW:()=>s});var r=n(34727),i=n(39516);function s(e,t){return{...t,filterMode:e.mode}}function o(e,t,n){const s=function(e){if("manual"===p(e))return null;const t=[Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY];for(const{minScale:n,maxScale:r}of e.filters)t[0]=Math.max(t[0],u(n)),t[1]=Math.min(t[1],d(r));return t}(e);if(s&&((0,r.gg)(t,s[0])||(0,r.ZH)(n,s[1])))return"";const o=Array.from(a(e,t,n)),l=function(e,t,n){if(0===e.length)return!0;const i=u(e.at(0)?.minScale),s=d(e.at(-1)?.maxScale);if((0,r.ZH)(i,t)||(0,r.gg)(s,n))return!0;for(let t=0;t<e.length-1;t++){const n=e[t],i=e[t+1];if((0,r.ZH)(u(i.minScale),d(n.maxScale)))return!0}return!1}(o,t,n)?"1=1":o.map((e=>e.where||"1=1")).reduce(((e,t)=>(0,i.IW)(e,t)),"");return l&&"1=1"!==l?l:""}function*a(e,t,n){if("manual"===p(e)){const t=e.filters.find((t=>t.id===e.activeFilterId));t&&(yield t)}else{"object"==typeof t&&(t=t.scale);for(const r of e.filters)l(r.minScale,r.maxScale,t,n)&&(yield r)}}function l(e,t,n,i){return e=u(e),n=u(n),t=d(t),!(!(0,r.Sp)(n,e)&&(i??n)>e||(0,r.Hx)(t,n)||void 0!==i&&(0,r.Sp)(i,e))}function p(e){return"mode"in e?e.mode:e.filterMode}function u(e){return e||Number.POSITIVE_INFINITY}function d(e){return e||0}},17036:(e,t,n)=>{n.d(t,{p:()=>l});var r=n(44208),i=n(53966),s=n(20437),o=n(95466),a=n(30524);function l(){return{fields:{type:[s.A],value:null,set:function(e){if(e&&(0,r.A)("big-integer-warning-enabled")){const t=e.filter((e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8));if(t.length){const e=t.map((e=>`'${e.name}'`)).join(", ");i.A.getLogger(this).warn("#fields",`Layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}') references big-integer field(s): ${e}, support for which is experimental. Only integers less than ${Number.MAX_SAFE_INTEGER} (Number.MAX_SAFE_INTEGER) are supported.`)}}this._set("fields",e)}},fieldsIndex:{readOnly:!0,get(){return o.A.fromLayer(this)}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){const e=this._userOutFields;if(!e?.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(const t of e){const n=this.fieldsIndex?.has(t);n||i.A.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e})}return(0,a.DB)(this.fieldsIndex,e)}}}}},32730:(e,t,n)=>{n.d(t,{BI:()=>f,D3:()=>y,XJ:()=>m,lc:()=>h,mX:()=>_,rU:()=>g,tH:()=>M});var r=n(799);const i="__begin__",s="__end__",o=new RegExp(i,"ig"),a=new RegExp(s,"ig"),l=new RegExp("^"+i,"i"),p=new RegExp(s+"$","i"),u='"',d=u+" + ",c=" + "+u;function h(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function y(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function m(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=h(e.labelExpression),t.type="conventional"),t}function f(e){const t=m(e);switch(t.type){case"conventional":return _(t.expression);case"arcade":return t.expression}return null}function g(e){const t=m(e);switch(t.type){case"conventional":return function(e){const t=e?.match(b);return t?.[1].trim()||null}(t.expression);case"arcade":return M(t.expression)}return null}function _(e){let t;return e?(t=(0,r.HC)(e,(e=>i+'$feature["'+e+'"]'+s)),t=l.test(t)?t.replace(l,""):u+t,t=p.test(t)?t.replace(p,""):t+u,t=t.replaceAll(o,d).replaceAll(a,c)):t='""',t}const b=/^\s*\{([^}]+)\}\s*$/i,w=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,I=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,T=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function M(e){if(!e)return null;let t=w.exec(e)||I.exec(e);return t?t[1]||t[3]:(t=T.exec(e),t?t[2]:null)}},8460:(e,t,n)=>{n.d(t,{$C:()=>_,Hh:()=>o,J:()=>p,JT:()=>l,Tu:()=>f,Wg:()=>g,Xq:()=>w,i6:()=>I,pM:()=>m,tx:()=>a,vJ:()=>b});var r=n(2741);let i,s=null;function o(){return i||(i=n.e(3666).then(n.bind(n,3666)).then((e=>e.l)).then((({default:e})=>e({locateFile:e=>(0,r.s)(`esri/libs/linkchartlayout/${e}`)}))).then((e=>{!function(e){s=e}(e)})),i)}var a,l,p,u,d;(d=a||(a={}))[d.None=0]="None",d[d.IsMovable=1]="IsMovable",d[d.IsGeographic=2]="IsGeographic",d[d.IsRoot=4]="IsRoot",d[d.IsOld=8]="IsOld",function(e){e[e.Success=0]="Success",e[e.Error=1]="Error",e[e.Canceled=2]="Canceled"}(l||(l={})),function(e){e[e.Regular=0]="Regular",e[e.Curved=1]="Curved",e[e.Recursive=2]="Recursive"}(p||(p={})),function(e){e[e.right=0]="right",e[e.left=1]="left",e[e.top=2]="top",e[e.bottom=3]="bottom"}(u||(u={}));const c={none:0,"start-only":1,"start-and-end":2};function h(e){const t={timeDirection:"right",timeBannerUTCOffsetInMinutes:0,eventsTicksVisualization:"start-and-end",showDurationLineForNonZeroDurationEntityEvents:!0,durationLineWidth:5,entityPositionAtDurationRatio:1,showNonZeroDurationIntervalBounds:!1,separateTimeOverlaps:!0,separateTimelineOverlaps:!0,moveFirstBends:!0,secondBendRatio:.3,lineSeparationMultiplier:1,spaceSeparatedLinesEvenly:!1,useBezierCurves:!1,separatedLineShapeRatio:0,...e?.toJSON()??{},eventsTicksVisualization:e?.eventsTicksVisualization??"start-and-end"};return{...t,timeDirection:{value:u[t.timeDirection]??u.right},eventsTicksVisualization:{value:c[t.eventsTicksVisualization]??c["start-and-end"]}}}function y(e,t,n,r,i,o){const a=n.length,p=i.length,u=Float64Array.BYTES_PER_ELEMENT,d=Uint32Array.BYTES_PER_ELEMENT,c=Uint8Array.BYTES_PER_ELEMENT,h=16+a*(c+2*u)+p*(2*d),y=s._malloc(h);try{const c=y+16-y%16,h=c+a*u,m=h+a*u,f=m+p*d,g=f+p*d,_=()=>[s.HEAPF64.subarray(c>>3,(c>>3)+a),s.HEAPF64.subarray(h>>3,(h>>3)+a),s.HEAPU32.subarray(m>>2,(m>>2)+p),s.HEAPU32.subarray(f>>2,(f>>2)+p),s.HEAPU8.subarray(g,g+a)],[b,w,I,T,M]=_();b.set(n),w.set(r),I.set(i),T.set(o),M.set(t);const v=e(a,g,c,h,p,m,f);let x=null,A=null;if(v.value===l.Success){const e=s.getLayoutLinksTypes(),t=s.getLayoutLinksVerticesEndIndices(),n=s.getLayoutLinksVertices(),r=s.countLayoutLinksVertices();!p||e&&t?r&&!n?v.value=l.Error:(x={types:new Uint8Array(s.HEAPU8.subarray(e,e+p)),vertexEndIndex:new Uint32Array(s.HEAPU32.subarray(t>>2,(t>>2)+p)),vertices:new Float64Array(s.HEAPF64.subarray(n>>3,(n>>3)+2*r))},A=s.getAuxiliaryGraphicElements()):v.value=l.Error}const[E,S,N,C,L]=_();return n.set(E),r.set(S),i.set(N),o.set(C),t.set(L),{status:v.value,links:x,graphics:A}}finally{s._free(y),s.cleanupLayout()}}var m,f,g,_,b,w,I,T,M;!function(e){e.getMinIdealEdgeLength=function(){return s.getMinIdealEdgeLength()},e.apply=function(e,t,n,r,i,o,a=2,l=1,p=-1){return y(((t,n,r,i,o,u,d)=>s.applyForceDirectedLayout(e,t,n,r,i,o,u,d,a,l,p)),t,n,r,i,o)}}(m||(m={})),function(e){e.apply=function(e,t,n,r,i,o,a=2,l=1,p=-1){return y(((t,n,r,i,o,u,d)=>s.applyCommunityLayout(e,t,n,r,i,o,u,d,a,l,p)),t,n,r,i,o)}}(f||(f={})),function(e){e.apply=function(e,t,n,r,i,o){return y(((t,n,r,i,o,a,l)=>s.applySimpleLayout(e,t,n,r,i,o,a,l)),t,n,r,i,o)}}(g||(g={})),function(e){e.apply=function(e,t,n,r,i,o){return y(((t,n,r,i,o,a,l)=>s.applyHierarchicalLayout(e,t,n,r,i,o,a,l)),t,n,r,i,o)}}(_||(_={})),function(e){e.apply=function(e,t,n,r,i,o){return y(((t,n,r,i,o,a,l)=>s.applyRadialTreeLayout(e,t,n,r,i,o,a,l)),t,n,r,i,o)}}(b||(b={})),function(e){e.apply=function(e,t,n,r,i,o){return y(((t,n,r,i,o,a,l)=>s.applySmartTreeLayout(e,t,n,r,i,o,a,l)),t,n,r,i,o)}}(w||(w={})),function(e){e.apply=function(e,t,n,r,i,o,a,p,u,d,c,m){return y(((t,n,r,a,p,y,f)=>{if(i.length!==t)return{value:l.Error};if(o.length!==t)return{value:l.Error};if(u.length!==p)return{value:l.Error};if(d.length!==p)return{value:l.Error};const g=Float64Array.BYTES_PER_ELEMENT,_=16,b=s._malloc(_+t*g),w=s._malloc(_+t*g),I=s._malloc(_+p*g),T=s._malloc(_+p*g),M=b+_-b%_,v=w+_-w%_,x=I+_-I%_,A=T+_-T%_;try{return s.HEAPF64.subarray(M>>3,(M>>3)+t).set(i),s.HEAPF64.subarray(v>>3,(v>>3)+t).set(o),s.HEAPF64.subarray(x>>3,(x>>3)+p).set(u),s.HEAPF64.subarray(A>>3,(A>>3)+p).set(d),s.applyChronologicalLayout(e,t,n,r,a,M,v,p,y,f,x,A,c,h(m))}finally{s._free(b),s._free(w),s._free(I),s._free(T)}}),t,n,r,a,p)}}(I||(I={})),function(e){e[e.Undirected=0]="Undirected",e[e.Directed=1]="Directed",e[e.Reversed=2]="Reversed"}(T||(T={})),function(e){e[e.ByCC_Raw=0]="ByCC_Raw",e[e.ByCC_NormalizeGlobally=1]="ByCC_NormalizeGlobally",e[e.ByCC_NormalizeByCC=2]="ByCC_NormalizeByCC"}(M||(M={}))},73133:(e,t,n)=>{n.d(t,{j:()=>r});const r=(0,n(66552).O)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})},25927:(e,t,n)=>{n.d(t,{A:()=>p});var r=n(90237),i=n(10107),s=(n(44208),n(53966),n(87811),n(40608)),o=n(86738),a=n(54238);let l=class extends a.A{constructor(e){super(e),this.layoutGeometry=null}};(0,r._)([(0,i.MZ)({type:o.A,json:{write:!0}})],l.prototype,"layoutGeometry",void 0),l=(0,r._)([(0,s.$)("esri.rest.knowledgeGraph.Entity")],l);const p=l},54238:(e,t,n)=>{n.d(t,{A:()=>l});var r=n(90237),i=n(10107),s=(n(44208),n(53966),n(87811),n(40608)),o=n(77901);let a=class extends o.A{constructor(e){super(e),this.typeName=null,this.id=null}};(0,r._)([(0,i.MZ)({type:String,json:{write:!0}})],a.prototype,"typeName",void 0),(0,r._)([(0,i.MZ)({type:String,json:{write:!0}})],a.prototype,"id",void 0),a=(0,r._)([(0,s.$)("esri.rest.knowledgeGraph.GraphNamedObject")],a);const l=a},77901:(e,t,n)=>{n.d(t,{A:()=>l});var r=n(90237),i=n(25482),s=n(10107),o=(n(44208),n(53966),n(87811),n(40608));let a=class extends i.A{constructor(e){super(e),this.properties=null}};(0,r._)([(0,s.MZ)({json:{write:!0}})],a.prototype,"properties",void 0),a=(0,r._)([(0,o.$)("esri.rest.knowledgeGraph.GraphObject")],a);const l=a},42538:(e,t,n)=>{n.d(t,{A:()=>d});var r=n(90237),i=n(10107),s=(n(44208),n(53966),n(87811),n(40608)),o=n(16930),a=n(69622);let l=class extends a.A{constructor(e){super(e),this.openCypherQuery=""}};(0,r._)([(0,i.MZ)()],l.prototype,"openCypherQuery",void 0),l=(0,r._)([(0,s.$)("esri.rest.knowledgeGraph.GraphQuery")],l);const p=l;let u=class extends p{constructor(e){super(e),this.bindParameters=null,this.bindGeometryQuantizationParameters=null,this.outputQuantizationParameters=null,this.outputSpatialReference=null,this.provenanceBehavior=null}};(0,r._)([(0,i.MZ)()],u.prototype,"bindParameters",void 0),(0,r._)([(0,i.MZ)()],u.prototype,"bindGeometryQuantizationParameters",void 0),(0,r._)([(0,i.MZ)()],u.prototype,"outputQuantizationParameters",void 0),(0,r._)([(0,i.MZ)({type:o.A})],u.prototype,"outputSpatialReference",void 0),(0,r._)([(0,i.MZ)()],u.prototype,"provenanceBehavior",void 0),u=(0,r._)([(0,s.$)("esri.rest.knowledgeGraph.GraphQueryStreaming")],u);const d=u},40662:(e,t,n)=>{n.d(t,{A:()=>a});var r=n(90237),i=(n(53966),n(44208),n(87811),n(49186),n(40608)),s=n(77901);let o=class extends s.A{constructor(e){super(e)}};o=(0,r._)([(0,i.$)("esri.rest.knowledgeGraph.ObjectValue")],o);const a=o},42095:(e,t,n)=>{n.d(t,{A:()=>p});var r=n(90237),i=n(25482),s=n(10107),o=(n(44208),n(53966),n(87811),n(40608)),a=n(77901);let l=class extends i.A{constructor(e){super(e),this.path=[]}};(0,r._)([(0,s.MZ)({type:[a.A],json:{write:!0}})],l.prototype,"path",void 0),l=(0,r._)([(0,o.$)("esri.rest.knowledgeGraph.Path")],l);const p=l},23150:(e,t,n)=>{n.d(t,{A:()=>p});var r=n(90237),i=n(10107),s=(n(44208),n(53966),n(87811),n(40608)),o=n(82799),a=n(54238);let l=class extends a.A{constructor(e){super(e),this.originId=null,this.destinationId=null,this.layoutGeometry=null}};(0,r._)([(0,i.MZ)({type:String,json:{write:!0}})],l.prototype,"originId",void 0),(0,r._)([(0,i.MZ)({type:String,json:{write:!0}})],l.prototype,"destinationId",void 0),(0,r._)([(0,i.MZ)({type:o.A,json:{write:!0}})],l.prototype,"layoutGeometry",void 0),l=(0,r._)([(0,s.$)("esri.rest.knowledgeGraph.Relationship")],l);const p=l},62046:(e,t,n)=>{n.d(t,{Fe:()=>l,Nk:()=>s});var r=n(68197),i=n(93397);function s(e){const t=[];return o((0,i.lW)(e),t),t.length?new r.A((0,i.e6)(t[0])):null}function o(e,t){if(!e)return;let n;n="CIMTextSymbol"===e.type?e.symbol:e;const r="CIMPolygonSymbol"===e.type;if(n?.symbolLayers)for(const e of n.symbolLayers)if(!(e.colorLocked||r&&((0,i.mA)(e)||(0,i.MM)(e)&&e.markerPlacement&&(0,i.zr)(e.markerPlacement))))switch(e.type){case"CIMPictureMarker":case"CIMPictureStroke":case"CIMPictureFill":e.tintColor&&a(t,e.tintColor);break;case"CIMVectorMarker":e.markerGraphics?.forEach((e=>{o(e.symbol,t)}));break;case"CIMSolidStroke":case"CIMSolidFill":a(t,e.color);break;case"CIMHatchFill":o(e.lineSymbol,t)}}function a(e,t){for(const n of e)if(n.join(".")===t.join("."))return;e.push(t)}function l(e,t,n){t instanceof r.A||(t=new r.A(t));const s=(0,i.lW)(e);s&&p(s,t,n)}function p(e,t,n){if(!e)return;let r;r="CIMTextSymbol"===e.type?e.symbol:e;const s="CIMPolygonSymbol"===r?.type;if(r?.symbolLayers)for(const e of r.symbolLayers){if(e.colorLocked)continue;if(s)if(n){const{layersToColor:t}=n;if(((0,i.mA)(e)||(0,i.MM)(e)&&e.markerPlacement&&(0,i.zr)(e.markerPlacement))&&"fill"===t||(0,i.jn)(e)&&"outline"===t)continue}else if((0,i.mA)(e)||(0,i.MM)(e)&&e.markerPlacement&&(0,i.zr)(e.markerPlacement))continue;const r=t.toArray();switch(e.type){case"CIMPictureMarker":case"CIMPictureStroke":case"CIMPictureFill":e.tintColor=r;break;case"CIMVectorMarker":e.markerGraphics?.forEach((e=>{p(e.symbol,t,n)}));break;case"CIMSolidStroke":case"CIMSolidFill":e.color=r;break;case"CIMHatchFill":p(e.lineSymbol,t,n)}}}},37531:(e,t,n)=>{n.d(t,{dt:()=>h,GG:()=>_,UQ:()=>g,Sx:()=>d});var r=n(68197),i=n(60999),s=(n(44208),n(51850)),o=(n(76369),n(62046)),a=(n(2741),n(78888),n(66344));new Map([["dash",[4,3]],["dashdot",[4,3,1,3]],["dot",[1,3]],["longdash",[8,3]],["longdashdot",[8,3,1,3]],["longdashdotdot",[8,3,1,3,1,3]],["shortdash",[4,1]],["shortdashdot",[4,1,1,1]],["shortdashdotdot",[4,1,1,1,1,1]],["shortdot",[1,1]],["solid",[]]]),new a.q(1e3),new r.A([128,128,128]);var l=n(78504),p=n(33910);const u=new r.A("white");function d(e,t){if(!e)return null;let n=null;return(0,p.wk)(e)?n=function(e){const t=e.symbolLayers;if(!t)return null;let n=null;return t.forEach((e=>{"object"===e.type&&e.resource?.href||(n="water"===e.type?e.color:e.material?e.material.color:null)})),n?new r.A(n):null}(e):(0,p.$y)(e)&&(n="cim"===e.type?(0,o.Nk)(e):e.color?new r.A(e.color):null),n?c(n,t):null}function c(e,t){if(null==t||null==e)return e;const n=e.toRgba();return n[3]=n[3]*t,new r.A(n)}function h(e,t,n){e&&(t||null!=n)&&(t&&(t=new r.A(t)),(0,p.wk)(e)?function(e,t,n){const r=e.symbolLayers;if(!r)return;const i=e=>c(t=t??e??(null!=n?u:null),n);r.forEach((e=>{if("object"!==e.type||!e.resource?.href||t)if("water"===e.type)e.color=i(e.color);else{const t=null!=e.material?e.material.color:null,r=i(t);null==e.material?e.material=new l.N({color:r}):e.material.color=r,null!=n&&"outline"in e&&null!=e.outline?.color&&(e.outline.color=c(e.outline.color,n))}}))}(e,t,n):(0,p.$y)(e)&&function(e,t,n){(t=t??e.color)&&(e.color=c(t,n)),null!=n&&"outline"in e&&e.outline?.color&&(e.outline.color=c(e.outline.color,n))}(e,t,n))}function y(e){for(const t of e)if("number"==typeof t)return t;return null}function m(e,t,n){for(let r=0;r<3;r++){const i=e[r];switch(i){case"symbol-value":{const e=n[r];return null!=e?e/t[r]:1}case"proportional":break;default:if(i&&t[r])return i/t[r]}}return 1}function f(e,t,n,r){switch(e){case"proportional":return n*r;case"symbol-value":return null!=t?t:n;default:return e}}async function g(e,t){if(e&&t)return(0,p.wk)(e)?async function(e,t){const r=e.symbolLayers;r&&await(0,i.jJ)(r,(async e=>async function(e,t){switch(e.type){case"extrude":!function(e,t){e.size="number"==typeof t[2]?t[2]:0}(e,t);break;case"icon":case"line":case"text":!function(e,t){const n=y(t);null!=n&&(e.size=n)}(e,t);break;case"path":!function(e,t){const n=m(t,s.Un,[e.width,void 0,e.height]);e.width=f(t[0],e.width,1,n),e.height=f(t[2],e.height,1,n)}(e,t);break;case"object":await async function(e,t){const{resourceSize:r,symbolSize:i}=await async function(e){const{computeObjectLayerResourceSize:t}=await n.e(5404).then(n.bind(n,95404)),r=await t(e,10),{width:i,height:s,depth:o}=e,a=[i,o,s];let l=1;for(let e=0;e<3;e++){const t=a[e];if(null!=t){l=t/r[e];break}}for(let e=0;e<3;e++)null==a[e]&&(a[e]=r[e]*l);return{resourceSize:r,symbolSize:a}}(e),s=m(t,r,i);e.width=f(t[0],i[0],r[0],s),e.depth=f(t[1],i[1],r[1],s),e.height=f(t[2],i[2],r[2],s)}(e,t)}}(e,t)))}(e,t):void((0,p.$y)(e)&&function(e,t){const n=y(t);if(null!=n)switch(e.type){case"simple-marker":e.size=n;break;case"picture-marker":{const t=e.width/e.height;t>1?(e.width=n,e.height=n*t):(e.width=n*t,e.height=n);break}case"simple-line":e.width=n;break;case"text":e.font.size=n}}(e,t))}function _(e,t,n){if(e&&null!=t)if((0,p.wk)(e)){const r=e.symbolLayers;r&&r.forEach((e=>{if("object"===e.type)switch(n){case"tilt":e.tilt=(e.tilt??0)+t;break;case"roll":e.roll=(e.roll??0)+t;break;default:e.heading=(e.heading??0)+t}"icon"===e.type&&(e.angle+=t)}))}else(0,p.$y)(e)&&("simple-marker"!==e.type&&"picture-marker"!==e.type&&"text"!==e.type||(e.angle+=t))}},10184:(e,t,n)=>{n.d(t,{A:()=>c});var r=n(90237),i=n(69540),s=n(25482),o=n(88930),a=n(10107),l=(n(44208),n(53966),n(87811),n(93223)),p=n(40608),u=n(73133);let d=class extends(i.A.ClonableMixin(s.A)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,o.t)(this.value,this.unit,"milliseconds")}};(0,r._)([(0,l.e)(u.j,{nonNullable:!0})],d.prototype,"unit",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{write:!0},nonNullable:!0})],d.prototype,"value",void 0),d=(0,r._)([(0,p.$)("esri.time.TimeInterval")],d);const c=d}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[146,8256],{4902:(e,t,r)=>{r.d(t,{A:()=>u});var i=r(90237),s=r(40608);let o=0;const a=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+o++})}};return t=(0,i._)([(0,s.$)("esri.core.Identifiable")],t),t};let n=class extends(a(class{})){};var l;n=(0,i._)([(0,s.$)("esri.core.Identifiable")],n),(l=n||(n={})).IdentifiableMixin=a,l.NumericIdentifiableMixin=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:o++})}};return t=(0,i._)([(0,s.$)("esri.core.Identifiable.NumericIdentifiable")],t),t};const u=n},92071:(e,t,r)=>{r.d(t,{P:()=>m,L:()=>b});var i=r(90237),s=r(69622),o=r(76953),a=r(4718),n=r(35666);class l{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(n.AU),this._values=new Map,this.multipleOriginsSupported=!0}clone(e){const t=new l,r=this._originStores[n.Gr.DEFAULTS];r&&r.forEach(((e,r)=>{t.set(r,(0,a.o8)(e),n.Gr.DEFAULTS)}));for(let r=n.Gr.SERVICE;r<n.AU;r++){const i=this._originStores[r];i&&i.forEach(((i,s)=>{e&&e.has(s)||t.set(s,(0,a.o8)(i),r)}))}return t}get(e,t){const r=void 0===t?this._values:this._originStores[t];return r?r.get(e):void 0}keys(e){const t=null==e?this._values:this._originStores[e];return t?[...t.keys()]:[]}set(e,t,r=n.Gr.USER){let i=this._originStores[r];if(i||(i=new Map,this._originStores[r]=i),i.set(e,t),!this._values.has(e)||this._propertyOriginMap.get(e)<=r){const i=this._values.get(e);return this._values.set(e,t),this._propertyOriginMap.set(e,r),i!==t}return!1}delete(e,t=n.Gr.USER){const r=this._originStores[t];if(!r)return;const i=r.get(e);if(r.delete(e),this._values.has(e)&&this._propertyOriginMap.get(e)===t){this._values.delete(e);for(let r=t-1;r>=0;r--){const t=this._originStores[r];if(t&&t.has(e)){this._values.set(e,t.get(e)),this._propertyOriginMap.set(e,r);break}}}return i}has(e,t){const r=void 0===t?this._values:this._originStores[t];return!!r&&r.has(e)}revert(e,t){for(;t>0&&!this.has(e,t);)--t;const r=this._originStores[t],i=r?.get(e),s=this._values.get(e);return this._values.set(e,i),this._propertyOriginMap.set(e,t),s!==i}originOf(e){return this._propertyOriginMap.get(e)||n.Gr.DEFAULTS}forEach(e){this._values.forEach(e)}}var u=r(45917),p=r(88620),d=r(40608);const c=e=>{let t=class extends e{constructor(...e){super(...e);const t=(0,p.oY)(this),r=t.store,i=new l;t.store=i,(0,o.k)(t,r,i)}read(e,t){(0,u.L)(this,e,t)}getAtOrigin(e,t){const r=h(this),i=(0,n.aB)(t);if("string"==typeof e)return r.get(e,i);const s={};return e.forEach((e=>{s[e]=r.get(e,i)})),s}originOf(e){return(0,n.OL)(this.originIdOf(e))}originIdOf(e){return h(this).originOf(e)}revert(e,t){const r=h(this),i=(0,n.aB)(t),s=(0,p.oY)(this);let o;o="string"==typeof e?"*"===e?r.keys(i):[e]:e,o.forEach((e=>{s.invalidate(e),r.revert(e,i),s.commit(e)}))}};return t=(0,i._)([(0,d.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],t),t};function h(e){return(0,p.oY)(e).store}let y=class extends(c(s.A)){};y=(0,i._)([(0,d.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],y);var g=r(16649),f=r(49422);const v=e=>{let t=class extends e{constructor(...e){super(...e)}clear(e,t="user"){return _(this).delete(e,(0,n.aB)(t))}write(e,t){return(0,f.M)(this,e=e||{},t),e}setAtOrigin(e,t,r){(0,p.oY)(this).setAtOrigin(e,t,(0,n.aB)(r))}removeOrigin(e){const t=_(this),r=(0,n.aB)(e),i=t.keys(r);for(const e of i)t.originOf(e)===r&&t.set(e,t.get(e,r),n.Gr.USER)}updateOrigin(e,t){const r=_(this),i=(0,n.aB)(t),s=(0,g.Jt)(this,e);for(let t=i+1;t<n.AU;++t)r.delete(e,t);r.set(e,s,i)}toJSON(e){return this.write({},e)}};return t=(0,i._)([(0,d.$)("esri.core.MultiOriginJSONSupport.WriteableMultiOriginJSONSupport")],t),t.prototype.toJSON.isDefaultToJSON=!0,t};function _(e){return(0,p.oY)(e).store}const m=e=>{let t=class extends(v(c(e))){constructor(...e){super(...e)}};return t=(0,i._)([(0,d.$)("esri.core.MultiOriginJSONSupport")],t),t};let b=class extends(m(s.A)){};b=(0,i._)([(0,d.$)("esri.core.MultiOriginJSONSupport")],b)},4146:(e,t,r)=>{r.d(t,{A:()=>b});var i=r(90237),s=r(78888),o=r(49186),a=r(65529),n=r(4902),l=r(92474),u=r(53966),p=r(74887),d=r(84952),c=r(10107),h=(r(44208),r(87811),r(40608)),y=r(5443),g=r(16930),f=r(92602),v=r(79677);let _=0,m=class extends(a.A.EventedMixin(n.A.IdentifiableMixin(l.A))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new y.A(-180,-90,180,90,g.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+_++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=g.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await r.e(7982).then(r.bind(r,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:i}=await r.e(5613).then(r.bind(r,45613));try{return await i(t)}catch(e){const r=t?.portalItem,i=r?.id||"unset",s=r?.portal?.url||f.A.portalUrl;throw u.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+s+"', id: '"+i+"')",e),e}}(e)}initialize(){this.when().catch((e=>{(0,p.zf)(e)||u.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})}))}destroy(){const e=this.parent;if(e){const t=this;"layers"in e&&e.layers.includes(t)?e.layers.remove(t):"tables"in e&&e.tables.includes(t)?e.tables.remove(t):"baseLayers"in e&&e.baseLayers.includes(t)?e.baseLayers.remove(t):"referenceLayers"in e&&e.referenceLayers.includes(t)&&e.referenceLayers.remove(t),this._set("parent",null)}}get effectiveVisible(){let e=this.visible;const t=this.parent;return e&&t&&"effectiveVisible"in t&&(e&&=t.effectiveVisible),e}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,d.An)(this.url)}createLayerView(e,t){return Promise.reject(new o.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,s.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new o.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,i._)([(0,c.MZ)({type:String})],m.prototype,"attributionDataUrl",void 0),(0,i._)([(0,c.MZ)({readOnly:!0})],m.prototype,"effectiveVisible",null),(0,i._)([(0,c.MZ)({type:y.A})],m.prototype,"fullExtent",void 0),(0,i._)([(0,c.MZ)({readOnly:!0})],m.prototype,"hasAttributionData",null),(0,i._)([(0,c.MZ)({type:String,clonable:!1})],m.prototype,"id",void 0),(0,i._)([(0,c.MZ)({type:Boolean,nonNullable:!0})],m.prototype,"legendEnabled",void 0),(0,i._)([(0,c.MZ)({type:["show","hide","hide-children"]})],m.prototype,"listMode",void 0),(0,i._)([(0,c.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],m.prototype,"opacity",void 0),(0,i._)([(0,c.MZ)({clonable:!1})],m.prototype,"parent",void 0),(0,i._)([(0,c.MZ)({readOnly:!0})],m.prototype,"parsedUrl",null),(0,i._)([(0,c.MZ)({type:Boolean,readOnly:!0})],m.prototype,"persistenceEnabled",void 0),(0,i._)([(0,c.MZ)({type:Boolean})],m.prototype,"popupEnabled",void 0),(0,i._)([(0,c.MZ)({type:Boolean})],m.prototype,"attributionVisible",void 0),(0,i._)([(0,c.MZ)({type:g.A})],m.prototype,"spatialReference",void 0),(0,i._)([(0,c.MZ)({type:String})],m.prototype,"title",void 0),(0,i._)([(0,c.MZ)({readOnly:!0,json:{read:!1}})],m.prototype,"type",void 0),(0,i._)([(0,c.MZ)()],m.prototype,"url",void 0),(0,i._)([(0,c.MZ)({type:v.A})],m.prototype,"visibilityTimeExtent",void 0),(0,i._)([(0,c.MZ)({type:Boolean,nonNullable:!0})],m.prototype,"visible",void 0),m=(0,i._)([(0,h.$)("esri.layers.Layer")],m);const b=m},146:(e,t,r)=>{r.r(t),r.d(t,{default:()=>c});var i=r(90237),s=r(49186),o=r(92071),a=r(11932),n=r(10107),l=(r(44208),r(53966),r(87811),r(40608)),u=r(4146),p=r(8303);let d=class extends((0,p.A)((0,o.P)(u.A))){constructor(e){super(e),this.resourceInfo=null,this.type="unknown"}initialize(){this.addResolvingPromise(new Promise(((e,t)=>{(0,a._)((()=>{const e=this.resourceInfo&&(this.resourceInfo.layerType||this.resourceInfo.type);let r="Unknown layer type";e&&(r+=" "+e),t(new s.A("layer:unknown-layer-type",r,{layerType:e}))}))})))}read(e,t){super.read({resourceInfo:e},t)}write(e,t){return null}};(0,i._)([(0,n.MZ)({readOnly:!0})],d.prototype,"resourceInfo",void 0),(0,i._)([(0,n.MZ)({type:["show","hide"]})],d.prototype,"listMode",void 0),(0,i._)([(0,n.MZ)({json:{read:!1},readOnly:!0,value:"unknown"})],d.prototype,"type",void 0),d=(0,i._)([(0,l.$)("esri.layers.UnknownLayer")],d);const c=d},8303:(e,t,r)=>{r.d(t,{A:()=>I});var i=r(90237),s=r(92602),o=r(70333),a=r(78888),n=r(60999),l=r(49186),u=r(53966),p=r(97768),d=r(74887),c=r(84952),h=r(10107),y=(r(44208),r(87811),r(36005)),g=r(40608),f=r(43937),v=r(83531),_=r(20655),m=r(80812),b=r(41318),w=r(10407);const I=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,p.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new m.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:i}=await r.e(1204).then(r.bind(r,41204));return(0,d.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,d.zf)(e)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,d.QP)(e),!0))))}async setUserPrivileges(e,t){if(!s.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,d.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=!o.id?.findCredential(this.url),s=e===r.id;if(s&&r.portal.user)return this._getUserPrivileges(r,i);let a,n;if(s)a=r.portal.url;else try{a=await(0,v.wI)(this.url,t)}catch(e){(0,d.QP)(e)}if(!a||!(0,c.b8)(a,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;n=await(o.id?.getCredential(`${a}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,d.QP)(e)}const l=!0,u=!1,p=!1;if(!n)return{features:{edit:l,fullEdit:u},content:{updateItem:p}};try{if(s?await r.reload():(r=new m.default({id:e,portal:{url:a}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,i)}catch(e){(0,d.QP)(e)}return{features:{edit:l,fullEdit:u},content:{updateItem:p}}}_getUserPrivileges(e,t){const r=(0,w.It)(e);return t&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,d.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?o.id?.findCredential(this.url):null;if(!t)return!0;const r=M.credential===t?M.user:await this._fetchEditingUser(e);return M.credential=t,M.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=o.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,s=_.A.getDefault();if(s&&s.loaded&&(0,c.S8)(s.restUrl)===(0,c.S8)(i))return s.user;const l=`${i}/community/self`,u=null!=e?e.signal:null,p=await(0,n.Ke)((0,a.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?b.A.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,i=this.portalItem?.id&&(this.portalItem.portal||_.A.getDefault());return r&&i&&!(0,c.ut)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new l.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i._)([(0,h.MZ)({type:m.default})],t.prototype,"portalItem",null),(0,i._)([(0,y.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,f.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,h.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,h.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,i._)([(0,h.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,i._)([(0,h.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,i._)([(0,g.$)("esri.layers.mixins.PortalLayer")],t),t},M={credential:null,user:null}}}]);
|