@arcgis/core 4.32.0-next.20241220 → 4.32.0-next.20241221

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.
Files changed (70) hide show
  1. package/WebLinkChart.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/127c82cdb229434883b6.js +1 -0
  4. package/assets/esri/core/workers/chunks/16530347bd78dc6c2fcd.js +1 -0
  5. package/assets/esri/core/workers/chunks/{5119811063bfc97fb725.js → 1a713cc601c6fcd97d2f.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{48f6eb3b63fec1d3312d.js → 2d908c115ea18e813b95.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{11052103efe3d53a784e.js → 31d9f0a37a5d0a1c450b.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{e7c3199813070ff30a3d.js → 3bb94da29dac3367ecc6.js} +1 -1
  9. package/assets/esri/core/workers/chunks/3ed7c8138231de3a3b96.js +1 -0
  10. package/assets/esri/core/workers/chunks/{9cc9bac6e02ab241e852.js → 4746b7afa90ea3641e60.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{ce33d2b5f22a5c566661.js → 4b5dbdcad438cb2dd4bf.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{ee1ddf56549bb169509c.js → 6332da54159d72a6ce66.js} +1 -1
  13. package/assets/esri/core/workers/chunks/648d7d8fa19a2e772c89.js +1 -0
  14. package/assets/esri/core/workers/chunks/66b411119b8ffb99b9dc.js +1 -0
  15. package/assets/esri/core/workers/chunks/88c68881cbdf4e911832.js +1 -0
  16. package/assets/esri/core/workers/chunks/8e60de347b209a753c73.js +1 -0
  17. package/assets/esri/core/workers/chunks/{770d233254419b741616.js → 9ad7d095e614e7e8d7f5.js} +1 -1
  18. package/assets/esri/core/workers/chunks/9dd167db3f2e68b71cea.js +1 -0
  19. package/assets/esri/core/workers/chunks/{b15894bff153e0793ef4.js → 9f495ad57cdbfa90c5b8.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{d7b76bc7bff34abc2253.js → a0b3d70a1b0360084593.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{95af4dee29eb196b8ada.js → a90611cdc86190799560.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{e213f4a1c95a33f80cdc.js → aedff36d3fec86abb9fb.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{194013d377e7dd00845f.js → b611f46835edcd6eefcc.js} +1 -1
  24. package/assets/esri/core/workers/chunks/c1c216b0aebe86311fae.js +1 -0
  25. package/assets/esri/core/workers/chunks/{f2b195d04414417682d4.js → cbf57abb537e86c1dd7f.js} +1 -1
  26. package/assets/esri/core/workers/chunks/f9af0473878d960a02f2.js +1 -0
  27. package/assets/esri/core/workers/chunks/fa1c68f2ffcdff7986b6.js +1 -0
  28. package/assets/esri/core/workers/chunks/{0f1a7aeec18db5323365.js → fdd8a5eb07466541f1f9.js} +1 -1
  29. package/form/elements/GroupElement.js +1 -1
  30. package/form/elements/UtilityNetworkAssociationsElement.d.ts +4 -0
  31. package/form/elements/{UtilityNetworkAssociationElement.js → UtilityNetworkAssociationsElement.js} +1 -1
  32. package/form/elements.js +1 -1
  33. package/form/support/formUtils.js +1 -1
  34. package/interfaces.d.ts +178 -67
  35. package/layers/LinkChartLayer.js +1 -1
  36. package/layers/knowledgeGraph/supportUtils.js +1 -1
  37. package/layers/support/VideoElement.js +1 -1
  38. package/linkChart/OrganicLayoutSettings.js +1 -1
  39. package/package.json +1 -1
  40. package/portal/schemas/definitions.js +1 -1
  41. package/rest/knowledgeGraphService.js +1 -1
  42. package/rest/support/fileFormat.js +1 -1
  43. package/support/revision.js +1 -1
  44. package/views/3d/terrain/TileTexture.js +1 -1
  45. package/views/3d/webgl-engine/collections/Component/RenderSubmitSystem.js +1 -1
  46. package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
  47. package/views/3d/webgl-engine/lib/TextureCompressionWorker.js +1 -1
  48. package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
  49. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  50. package/views/support/TextureCompressionHelper.js +1 -1
  51. package/views/webgl/Texture.js +1 -1
  52. package/webscene/Slide.js +1 -1
  53. package/webscene/SlideLegend.d.ts +4 -0
  54. package/webscene/SlideLegend.js +5 -0
  55. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  56. package/widgets/FeatureForm.js +1 -1
  57. package/widgets/Print/PrintViewModel.js +1 -1
  58. package/widgets/Print/TemplateOptions.js +1 -1
  59. package/widgets/Print.js +1 -1
  60. package/assets/esri/core/workers/chunks/0e9bd990a8d0691fb9c8.js +0 -1
  61. package/assets/esri/core/workers/chunks/27933d6ffeebb5c13ab7.js +0 -1
  62. package/assets/esri/core/workers/chunks/2c084c0c324e3af56424.js +0 -1
  63. package/assets/esri/core/workers/chunks/48266c87363e7dcaefb3.js +0 -1
  64. package/assets/esri/core/workers/chunks/668679baf519ada9ae28.js +0 -1
  65. package/assets/esri/core/workers/chunks/737f381f2cfeddb96d15.js +0 -1
  66. package/assets/esri/core/workers/chunks/a68068b3151a14c4a0ad.js +0 -1
  67. package/assets/esri/core/workers/chunks/ad99308fb9678cdce917.js +0 -1
  68. package/assets/esri/core/workers/chunks/cc427e8f1b17744b6ea4.js +0 -1
  69. package/assets/esri/core/workers/chunks/dd4bd96dfb7f9921b774.js +0 -1
  70. package/assets/esri/core/workers/chunks/e1a03231e24293e66418.js +0 -1
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5356,5613],{22429:(e,a,r)=>{r.d(a,{v:()=>n});var t=r(24183);class n{constructor(){this._serviceMetadatas=new Map,this._itemDatas=new Map}async fetchServiceMetadata(e,a){const r=this._serviceMetadatas.get(e);if(r)return r;const n=await(0,t.V)(e,a);return this._serviceMetadatas.set(e,n),n}async fetchItemData(e){const{id:a}=e;if(!a)return null;const{_itemDatas:r}=this;if(r.has(a))return r.get(a);const t=await e.fetchData();return r.set(a,t),t}async fetchCustomParameters(e,a){const r=await this.fetchItemData(e);return r&&"object"==typeof r&&(a?a(r):r.customParameters)||null}}},60694:(e,a,r)=>{r.d(a,{Fi:()=>y,HZ:()=>S,Jf:()=>p,LS:()=>w,Wo:()=>m,bd:()=>h,cr:()=>L,iz:()=>d,qg:()=>u,yG:()=>f});var t=r(84952),n=r(97159);const i={mapserver:"MapServer",imageserver:"ImageServer",featureserver:"FeatureServer",knowledgegraphserver:"KnowledgeGraphServer",sceneserver:"SceneServer",streamserver:"StreamServer",vectortileserver:"VectorTileServer","3dtilesserver":"3DTilesServer",videoserver:"VideoServer"},s=Object.values(i),l=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/rest\\/services\\/(.+?)\\/(${s.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),c=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/([^/\\n]+)\\/(${s.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),o=/(.*?)\/(?:layers\/)?(\d+)\/?$/i;function y(e){return l.test(e)}function u(e){if(null==e)return null;const a=(0,t.An)(e),r=a?.path.match(l)||a?.path.match(c);if(!r)return null;const[,n,s,o,y]=r,u=s.indexOf("/");return{title:L(-1!==u?s.slice(u+1):s),serverType:i[o.toLowerCase()],sublayer:null!=y&&""!==y?parseInt(y,10):null,url:{path:n}}}function d(e){const a=(0,t.An)(e).path.match(o);return a?{serviceUrl:a[1],sublayerId:Number(a[2])}:null}function L(e){return(e=e.replaceAll(/\s*[/_]+\s*/g," "))[0].toUpperCase()+e.slice(1)}function f(e,a){const r=[];if(e){const a=u(e);null!=a&&a.title&&r.push(a.title)}if(a){const e=L(a);r.push(e)}if(2===r.length){if(r[0].toLowerCase().includes(r[1].toLowerCase()))return r[0];if(r[1].toLowerCase().includes(r[0].toLowerCase()))return r[1]}return r.join(" - ")}function m(e){let a=(0,t.$z)(e,!0);return!!a&&(a=a.toLowerCase(),a.endsWith(".arcgis.com")&&(a.startsWith("services")||a.startsWith("tiles")||a.startsWith("features")))}function p(e,a){return e?(0,t.UC)((0,t.zi)(e,a)):e}function S(e){let{url:a}=e;if(!a)return{url:a};a=(0,t.zi)(a,e.logger);const r=(0,t.An)(a),n=u(r.path);let i;if(null!=n)null!=n.sublayer&&null==e.layer.layerId&&(i=n.sublayer),a=n.url.path;else if(e.nonStandardUrlAllowed){const e=d(r.path);null!=e&&(a=e.serviceUrl,i=e.sublayerId)}return{url:(0,t.UC)(a),layerId:i}}function w(e,a,r,i,s){(0,n.w)(a,i,"url",s),i.url&&null!=e.layerId&&(i.url=(0,t.fj)(i.url,r,e.layerId.toString()))}function h(e){if(!e)return!1;const a=e.toLowerCase(),r=a.includes("/services/"),t=a.includes("/mapserver/wmsserver"),n=a.includes("/imageserver/wmsserver"),i=a.includes("/wmsserver");return r&&(t||n||i)}},92009:(e,a,r)=>{r.d(a,{L:()=>y});var t=r(70333),n=r(78888),i=r(49186),s=r(74887),l=r(60694),c=r(20655),o=r(80812);async function y(e,a){const r=(0,l.qg)(e);if(!r)throw new i.A("invalid-url","Invalid scene service url");const y={...a,sceneServerUrl:r.url.path,layerId:r.sublayer??void 0};if(y.sceneLayerItem??=await async function(e){const a=(await u(e)).serviceItemId;if(!a)return null;const r=new o.default({id:a,apiKey:e.apiKey}),i=await async function(e){const a=t.id?.findServerInfo(e.sceneServerUrl);if(a?.owningSystemUrl)return a.owningSystemUrl;const r=e.sceneServerUrl.replace(/(.*\/rest)\/.*/i,"$1")+"/info";try{const a=(await(0,n.A)(r,{query:{f:"json"},responseType:"json",signal:e.signal})).data.owningSystemUrl;if(a)return a}catch(e){(0,s.QP)(e)}return null}(e);null!=i&&(r.portal=new c.A({url:i}));try{return await r.load({signal:e.signal})}catch(e){return(0,s.QP)(e),null}}(y),null==y.sceneLayerItem)return d(y.sceneServerUrl.replace("/SceneServer","/FeatureServer"),y);const L=await async function({sceneLayerItem:e,signal:a}){if(!e)return null;try{const r=(await e.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},{signal:a})).find((e=>"Feature Service"===e.type))||null;if(!r)return null;const t=new o.default({portal:r.portal,id:r.id});return await t.load(),t}catch(e){return(0,s.QP)(e),null}}(y);if(!L?.url)throw new i.A("related-service-not-found","Could not find feature service through portal item relationship");y.featureServiceItem=L;const f=await d(L.url,y);return f.portalItem=L,f}async function u(e){if(e.rootDocument)return e.rootDocument;const a={query:{f:"json",...e.customParameters,token:e.apiKey},responseType:"json",signal:e.signal};try{const r=await(0,n.A)(e.sceneServerUrl,a);e.rootDocument=r.data}catch{e.rootDocument={}}return e.rootDocument}async function d(e,a){const r=(0,l.qg)(e);if(!r)throw new i.A("invalid-feature-service-url","Invalid feature service url");const t=r.url.path,s=a.layerId;if(null==s)return{serverUrl:t};const c=u(a),o=a.featureServiceItem?await a.featureServiceItem.fetchData("json"):null,y=(o?.layers?.[0]||o?.tables?.[0])?.customParameters,d=e=>{const r={query:{f:"json",...y},responseType:"json",authMode:e,signal:a.signal};return(0,n.A)(t,r)},L=d("anonymous").catch((()=>d("no-prompt"))),[f,m]=await Promise.all([L,c]),p=m?.layers,S=f.data&&f.data.layers;if(!Array.isArray(S))throw new Error("expected layers array");if(Array.isArray(p)){for(let e=0;e<Math.min(p.length,S.length);e++)if(p[e].id===s)return{serverUrl:t,layerId:S[e].id}}else if(null!=s&&s<S.length)return{serverUrl:t,layerId:S[s].id};throw new Error("could not find matching associated sublayer")}},23154:(e,a,r)=>{r.d(a,{K:()=>d,Q:()=>i});var t=r(24183);const n=new Set(["Catalog Layer","Feature Layer","Oriented Imagery Layer"]);async function i(e,a){const{loadContext:r,...n}=a||{},i=r?await r.fetchServiceMetadata(e,n):await(0,t.V)(e,n);u(i),c(i);const s={serviceJSON:i};if((i.currentVersion??0)<10.5)return s;const l=`${e}/layers`,o=r?await r.fetchServiceMetadata(l,n):await(0,t.V)(l,n);return u(o),c(o),s.layersJSON={layers:o.layers,tables:o.tables},s}function s(e){const{type:a}=e;return!!a&&n.has(a)}function l(e){return"Table"===e.type}function c(e){e.layers=e.layers?.filter(s),e.tables=e.tables?.filter(l)}function o(e){e.type||="Feature Layer"}function y(e){e.type||="Table"}function u(e){e.layers?.forEach(o),e.tables?.forEach(y)}function d(e){switch(e){case"Feature Layer":case"Table":return"FeatureLayer";case"Oriented Imagery Layer":return"OrientedImageryLayer";case"Catalog Layer":return"CatalogLayer"}return"FeatureLayer"}},75356:(e,a,r)=>{r.d(a,{N:()=>T,populateOperationalLayers:()=>y});var t=r(5503),n=(r(44208),r(22429)),i=r(4513),s=r(80812);function l(e,a){return!(!e.layerType||"ArcGISFeatureLayer"!==e.layerType)&&e.featureCollectionType===a}var c=r(45613),o=r(8947);async function y(e,a,r){if(!a)return;const t=a.map((e=>async function(e,a){return async function(e,a,r){const t=new e;return t.read(a,r.context),"group"===t.type&&("GroupLayer"===a.layerType?await T(t,a,r):b(a)?function(e,a,r){a.itemId&&(e.portalItem=new s.default({id:a.itemId,portal:r?.portal}),e.when((()=>{const t=t=>{const n=t.layerId;G(t,e,a,n,r);const i=a.featureCollection?.layers?.[n];i&&t.read(i,r)};e.layers?.forEach(t),e.tables?.forEach(t)})))}(t,a,r.context):v(a)&&await async function(e,a,r){const t=i.S.FeatureLayer,n=await t(),s=a.featureCollection,l=s?.showLegend,c=s?.layers?.map(((t,i)=>{const s=new n;s.read(t,r);const c={...r,ignoreDefaults:!0};return G(s,e,a,i,c),null!=l&&s.read({showLegend:l},c),s}));e.layers.addMany(c??[])}(t,a,r.context)),await(0,o.L)(t,r.context),t}(await I(e,a),e,a)}(e,r))),n=await Promise.allSettled(t);for(const a of n)"rejected"===a.status||a.value&&e.add(a.value)}const u={ArcGISDimensionLayer:"DimensionLayer",ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISSceneServiceLayer:"SceneLayer",ArcGISTiledElevationServiceLayer:"ElevationLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",BuildingSceneLayer:"BuildingSceneLayer",CatalogLayer:"CatalogLayer",CSV:"CSVLayer",DefaultTileLayer:"TileLayer",GeoJSON:"GeoJSONLayer",GroupLayer:"GroupLayer",IntegratedMesh3DTilesLayer:"IntegratedMesh3DTilesLayer",IntegratedMeshLayer:"IntegratedMeshLayer",KML:"KMLLayer",LineOfSightLayer:"LineOfSightLayer",MediaLayer:"MediaLayer",OGCFeatureLayer:"OGCFeatureLayer",OrientedImageryLayer:"OrientedImageryLayer",PointCloudLayer:"PointCloudLayer",RasterDataLayer:"UnsupportedLayer",VectorTileLayer:"VectorTileLayer",ViewshedLayer:"ViewshedLayer",Voxel:"VoxelLayer",WCS:"WCSLayer",WFS:"WFSLayer",WMS:"WMSLayer",WebTiledLayer:"WebTileLayer"},d={ArcGISTiledElevationServiceLayer:"ElevationLayer",DefaultTileLayer:"ElevationLayer",RasterDataElevationLayer:"UnsupportedLayer"},L={ArcGISFeatureLayer:"FeatureLayer"},f={ArcGISImageServiceLayer:"UnsupportedLayer",ArcGISMapServiceLayer:"UnsupportedLayer",ArcGISSceneServiceLayer:"SceneLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",DefaultTileLayer:"TileLayer",OpenStreetMap:"OpenStreetMapLayer",VectorTileLayer:"VectorTileLayer",WCS:"UnsupportedLayer",WMS:"UnsupportedLayer",WebTiledLayer:"WebTileLayer"},m={ArcGISAnnotationLayer:"UnsupportedLayer",ArcGISDimensionLayer:"UnsupportedLayer",ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",ArcGISImageServiceVectorLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISStreamLayer:"StreamLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",BingMapsAerial:"BingMapsLayer",BingMapsHybrid:"BingMapsLayer",BingMapsRoad:"BingMapsLayer",CatalogLayer:"CatalogLayer",CSV:"CSVLayer",DefaultTileLayer:"TileLayer",GeoJSON:"GeoJSONLayer",GeoRSS:"GeoRSSLayer",GroupLayer:"GroupLayer",KML:"KMLLayer",KnowledgeGraphLayer:"KnowledgeGraphLayer",MediaLayer:"MediaLayer",OGCFeatureLayer:"OGCFeatureLayer",OrientedImageryLayer:"OrientedImageryLayer",SubtypeGroupLayer:"SubtypeGroupLayer",VectorTileLayer:"VectorTileLayer",WCS:"WCSLayer",WFS:"WFSLayer",WMS:"WMSLayer",WebTiledLayer:"WebTileLayer"},p={ArcGISFeatureLayer:"FeatureLayer",SubtypeGroupTable:"UnsupportedLayer"},S={ArcGISImageServiceLayer:"ImageryLayer",ArcGISImageServiceVectorLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",BingMapsAerial:"BingMapsLayer",BingMapsHybrid:"BingMapsLayer",BingMapsRoad:"BingMapsLayer",DefaultTileLayer:"TileLayer",OpenStreetMap:"OpenStreetMapLayer",VectorTileLayer:"VectorTileLayer",WCS:"WCSLayer",WMS:"WMSLayer",WebTiledLayer:"WebTileLayer"},w={...m,LinkChartLayer:"LinkChartLayer"},h={...p},g={...S};async function I(e,a){const r=a.context,t=M(r);let o=e.layerType||e.type;!o&&a?.defaultLayerType&&(o=a.defaultLayerType);const y=t[o];let u=y?i.S[y]:i.S.UnknownLayer;if(b(e)){const a=r?.portal;if(e.itemId){const r=new s.default({id:e.itemId,portal:a});await r.load();const t=(await(0,c.n)(r,new n.v)).className||"UnknownLayer";u=i.S[t]}}else"ArcGISFeatureLayer"===o?function(e){return l(e,"notes")}(e)||function(e){return l(e,"markup")}(e)?u=i.S.MapNotesLayer:function(e){return l(e,"route")}(e)?u=i.S.RouteLayer:v(e)&&(u=i.S.GroupLayer):e.wmtsInfo?.url&&e.wmtsInfo.layerIdentifier?u=i.S.WMTSLayer:"WFS"===o&&"2.0.0"!==e.wfsInfo?.version&&(u=i.S.UnsupportedLayer);return u()}function v(e){return"ArcGISFeatureLayer"===e.layerType&&!b(e)&&(e.featureCollection?.layers?.length??0)>1}function b(e){return"Feature Collection"===e.type}function M(e){let a;switch(e.origin){case"web-scene":switch(e.layerContainerType){case"basemap":a=f;break;case"ground":a=d;break;case"tables":a=L;break;default:a=u}break;case"link-chart":switch(e.layerContainerType){case"basemap":a=g;break;case"tables":a=h;break;default:a=w}break;default:switch(e.layerContainerType){case"basemap":a=S;break;case"tables":a=p;break;default:a=m}}return a}async function T(e,a,r){const n=new t.A,i=y(n,Array.isArray(a.layers)?a.layers:[],r);try{try{if(await i,"group"===e.type)return e.layers.addMany(n),e}catch(a){e.destroy();for(const e of n)e.destroy();throw a}}catch(e){throw e}}function G(e,a,r,t,n){e.read({id:`${a.id}-sublayer-${t}`,visibility:r.visibleLayers?.includes(t)??!0},n)}},4513:(e,a,r)=>{r.d(a,{S:()=>t});const t={BingMapsLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(5178)]).then(r.bind(r,17029))).default,BuildingSceneLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(3874),r.e(1147),r.e(587),r.e(13),r.e(6311),r.e(5494),r.e(4796),r.e(3029),r.e(4111),r.e(777),r.e(3600),r.e(690),r.e(2944),r.e(9868),r.e(4654),r.e(6298),r.e(6676)]).then(r.bind(r,88303))).default,CSVLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(3874),r.e(1147),r.e(587),r.e(13),r.e(6311),r.e(5494),r.e(4796),r.e(3029),r.e(4111),r.e(777),r.e(3600),r.e(4727)]).then(r.bind(r,72256))).default,CatalogLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(3874),r.e(1147),r.e(587),r.e(13),r.e(6311),r.e(5494),r.e(4796),r.e(4111),r.e(777),r.e(893),r.e(2593),r.e(3334)]).then(r.bind(r,79003))).default,DimensionLayer:async()=>(await Promise.all([r.e(6131),r.e(1493)]).then(r.bind(r,71493))).default,ElevationLayer:async()=>(await Promise.all([r.e(6131),r.e(9186),r.e(8463)]).then(r.bind(r,68611))).default,FeatureLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(3874),r.e(1147),r.e(587),r.e(13),r.e(6311),r.e(5494),r.e(4796),r.e(3029),r.e(4111),r.e(777),r.e(3600),r.e(8928)]).then(r.bind(r,13600))).default,GeoJSONLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(3874),r.e(1147),r.e(587),r.e(13),r.e(6311),r.e(5494),r.e(4796),r.e(3029),r.e(6343)]).then(r.bind(r,17625))).default,GeoRSSLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(1147),r.e(587),r.e(3201)]).then(r.bind(r,63201))).default,GroupLayer:async()=>(await Promise.all([r.e(6131),r.e(5989),r.e(8256)]).then(r.bind(r,85989))).default,ImageryLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(3874),r.e(1147),r.e(587),r.e(13),r.e(6311),r.e(893),r.e(984),r.e(8301),r.e(8969)]).then(r.bind(r,87773))).default,ImageryTileLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(3874),r.e(1147),r.e(587),r.e(13),r.e(6311),r.e(984),r.e(6049),r.e(8301),r.e(8480),r.e(5943)]).then(r.bind(r,35943))).default,IntegratedMesh3DTilesLayer:async()=>(await Promise.all([r.e(6131),r.e(1528)]).then(r.bind(r,61528))).default,IntegratedMeshLayer:async()=>(await Promise.all([r.e(6131),r.e(6298),r.e(8003)]).then(r.bind(r,84453))).default,KMLLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(3874),r.e(1147),r.e(587),r.e(13),r.e(6311),r.e(5494),r.e(9465)]).then(r.bind(r,79465))).default,KnowledgeGraphLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(3874),r.e(1147),r.e(587),r.e(13),r.e(6311),r.e(5494),r.e(4796),r.e(3029),r.e(8368),r.e(7339),r.e(1402),r.e(3166),r.e(2083),r.e(8692)]).then(r.bind(r,28692))).default,LineOfSightLayer:async()=>(await Promise.all([r.e(6131),r.e(690),r.e(4374),r.e(9695)]).then(r.bind(r,49695))).default,LinkChartLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(3874),r.e(1147),r.e(587),r.e(13),r.e(6311),r.e(5494),r.e(4796),r.e(3029),r.e(8368),r.e(7339),r.e(1402),r.e(3166),r.e(2083),r.e(3812)]).then(r.bind(r,73812))).default,MapImageLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(3874),r.e(1147),r.e(587),r.e(13),r.e(6311),r.e(5494),r.e(4796),r.e(4111),r.e(893),r.e(4612),r.e(7656)]).then(r.bind(r,7656))).default,MapNotesLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(3874),r.e(1147),r.e(587),r.e(13),r.e(6311),r.e(5494),r.e(4796),r.e(3029),r.e(4111),r.e(777),r.e(3600),r.e(3166),r.e(2029)]).then(r.bind(r,96953))).default,MediaLayer:async()=>(await Promise.all([r.e(6131),r.e(183),r.e(7899)]).then(r.bind(r,87899))).default,OGCFeatureLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(3874),r.e(1147),r.e(587),r.e(13),r.e(6311),r.e(5494),r.e(4796),r.e(3029),r.e(821),r.e(1469)]).then(r.bind(r,87152))).default,OpenStreetMapLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(4405),r.e(349)]).then(r.bind(r,40349))).default,OrientedImageryLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(3874),r.e(1147),r.e(587),r.e(13),r.e(6311),r.e(5494),r.e(4796),r.e(3029),r.e(4111),r.e(777),r.e(3600),r.e(3618)]).then(r.bind(r,97927))).default,PointCloudLayer:async()=>(await Promise.all([r.e(6131),r.e(3874),r.e(7984),r.e(6742)]).then(r.bind(r,76742))).default,RouteLayer:async()=>(await Promise.all([r.e(6131),r.e(3874),r.e(1147),r.e(587),r.e(13),r.e(6311),r.e(5494),r.e(7550)]).then(r.bind(r,97550))).default,SceneLayer:async()=>(await Promise.all([r.e(6131),r.e(3874),r.e(1147),r.e(587),r.e(13),r.e(6311),r.e(5494),r.e(4796),r.e(690),r.e(2944),r.e(9868),r.e(4654),r.e(6298),r.e(2153)]).then(r.bind(r,13899))).default,StreamLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(3874),r.e(1147),r.e(587),r.e(13),r.e(6311),r.e(5494),r.e(4796),r.e(3029),r.e(9035)]).then(r.bind(r,60683))).default,SubtypeGroupLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(3874),r.e(1147),r.e(587),r.e(13),r.e(6311),r.e(5494),r.e(4796),r.e(4111),r.e(777),r.e(8958)]).then(r.bind(r,59929))).default,TileLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(3874),r.e(1147),r.e(587),r.e(13),r.e(6311),r.e(5494),r.e(4796),r.e(4111),r.e(893),r.e(9186),r.e(4612),r.e(1756)]).then(r.bind(r,71756))).default,UnknownLayer:async()=>(await r.e(146).then(r.bind(r,146))).default,UnsupportedLayer:async()=>(await r.e(5165).then(r.bind(r,45165))).default,VectorTileLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(9186),r.e(9949),r.e(5013),r.e(8153)]).then(r.bind(r,48757))).default,VideoLayer:async()=>(await Promise.all([r.e(183),r.e(1689)]).then(r.bind(r,1689))).default,ViewshedLayer:async()=>(await Promise.all([r.e(6131),r.e(690),r.e(4374),r.e(6650)]).then(r.bind(r,96650))).default,VoxelLayer:async()=>(await Promise.all([r.e(6131),r.e(3874),r.e(6183)]).then(r.bind(r,16183))).default,WCSLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(3874),r.e(1147),r.e(587),r.e(13),r.e(6311),r.e(984),r.e(6049),r.e(8301),r.e(8480),r.e(9547)]).then(r.bind(r,19547))).default,WFSLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(3874),r.e(1147),r.e(587),r.e(13),r.e(6311),r.e(5494),r.e(4796),r.e(3029),r.e(3582)]).then(r.bind(r,16350))).default,WMSLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(3874),r.e(1147),r.e(587),r.e(1904)]).then(r.bind(r,51904))).default,WMTSLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(4405),r.e(309)]).then(r.bind(r,20309))).default,WebTileLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(4405)]).then(r.bind(r,47314))).default}},66964:(e,a,r)=>{r.d(a,{Ju:()=>o,K8:()=>d,XH:()=>y,_r:()=>i,bO:()=>s,iK:()=>u,nu:()=>L,pJ:()=>l,rc:()=>c});var t=r(92009),n=r(23154);function i(e){const a={id:e.id,name:e.name},r=(0,n.K)(e.type);return"FeatureLayer"!==r&&(a.layerType=r),a}async function s(e,a,r){if(null==e?.layers||null==e?.tables){const t=await r.fetchServiceMetadata(a,{customParameters:l(e)?.customParameters});(e=e||{}).layers=e.layers||t?.layers?.map(i),e.tables=e.tables||t?.tables?.map(i)}return e}function l(e){if(!e)return null;const{layers:a,tables:r}=e;return a?.length?a[0]:r?.length?r[0]:null}function c(e,a){return null==a?null:[...e.layers||[],...e.tables||[]].find((e=>e.id===a))}function o(e,a){return[...e.layers||[],...e.tables||[]].filter((({layerType:e})=>e?e===a:"ArcGISFeatureLayer"===a))}function y(e){return(e?.layers?.length??0)+(e?.tables?.length??0)}function u(e){switch(e){case"catalog":return"CatalogLayer";case"feature":return"ArcGISFeatureLayer";case"oriented-imagery":return"OrientedImageryLayer";case"subtype-group":return"SubtypeGroupLayer"}return null}function d(e){switch(e){case"CatalogLayer":return"CatalogLayer";case"OrientedImageryLayer":return"OrientedImageryLayer";case"SubtypeGroupLayer":return"SubtypeGroupLayer"}return"FeatureLayer"}async function L(e,a,r){if(!e?.url)return a??{};if(a??={},!a.layers){const t=await r.fetchServiceMetadata(e.url);a.layers=t.layers?.map(i)}const{serverUrl:n,portalItem:s}=await(0,t.L)(e.url,{sceneLayerItem:e,customParameters:l(a)?.customParameters}).catch((()=>({serverUrl:null,portalItem:null})));if(null==n)return a.tables=[],a;if(!a.tables&&s){const e=await s.fetchData().catch((()=>null));if(e?.tables)a.tables=e.tables.map(i);else{const t=await r.fetchServiceMetadata(n,{customParameters:l(e)?.customParameters}).catch((()=>null));a.tables=t?.tables?.map(i)}}if(a.tables)for(const e of a.tables)e.url=`${n}/${e.id}`;return a}},10407:(e,a,r)=>{r.d(a,{It:()=>L,LG:()=>s,OM:()=>o,Sm:()=>y,Y:()=>l,bK:()=>c,mm:()=>d,sQ:()=>u});var t=r(57251),n=r(16930),i=r(28735);function s(e,a){if(!l(e,a)){const r=e.typeKeywords;r?r.push(a):e.typeKeywords=[a]}}function l(e,a){return!!e.typeKeywords?.includes(a)}function c(e){return l(e,d.HOSTED_SERVICE)}function o(e,a){const r=e.typeKeywords;if(r){const e=r.indexOf(a);e>-1&&r.splice(e,1)}}function y(e,a,r){r?s(e,a):o(e,a)}async function u(e){const a=e.clone().normalize();let r;if(a.length>1)for(const e of a)r?e.width>r.width&&(r=e):r=e;else r=a[0];return async function(e){const a=e.spatialReference;if(a.isWGS84)return e.clone();if(a.isWebMercator)return(0,i.ci)(e);const r=n.A.WGS84;return await(0,t.initializeProjection)(a,r),(0,t.project)(e,r)}(r)}const d={DEVELOPER_BASEMAP:"DeveloperBasemap",JSAPI:"ArcGIS API for JavaScript",METADATA:"Metadata",MULTI_LAYER:"Multilayer",SINGLE_LAYER:"Singlelayer",TABLE:"Table",HOSTED_SERVICE:"Hosted Service",LOCAL_SCENE:"ViewingMode-Local",TILED_IMAGERY:"Tiled Imagery",GROUP_LAYER_MAP:"Map",ORIENTED_IMAGERY_LAYER:"OrientedImageryLayer"};function L(e){const{portal:a,isOrgItem:r,itemControl:t}=e,n=a.user?.privileges;let i=!n||n.includes("features:user:edit"),s=!!r&&!!n?.includes("features:user:fullEdit");const l="update"===t||"admin"===t;return l?s=i=!0:s&&(i=!0),{features:{edit:i,fullEdit:s},content:{updateItem:l}}}},45613:(e,a,r)=>{r.d(a,{fromItem:()=>d,n:()=>L});var t=r(49186),n=r(92009),i=r(23154),s=r(22429),l=r(83531),c=r(4513),o=r(80812),y=r(66964),u=r(10407);async function d(e){let{portalItem:a}=e;!a||a instanceof o.default||(a=new o.default(a));const r=await async function(e){await e.load();const a=new s.v;return async function(e){const a=e.className,r=c.S[a];return{constructor:await r(),properties:e.properties}}(await L(e,a))}(a);return new(0,r.constructor)({portalItem:a,...r.properties})}async function L(e,a){switch(e.type){case"3DTiles Service":return{className:"IntegratedMesh3DTilesLayer"};case"CSV":return{className:"CSVLayer"};case"Feature Collection":return async function(e){await e.load();const a=(0,u.Y)(e,"Map Notes"),r=(0,u.Y)(e,"Markup");if(a||r)return{className:"MapNotesLayer"};if((0,u.Y)(e,"Route Layer"))return{className:"RouteLayer"};const t=await e.fetchData();return 1===(0,y.XH)(t)?{className:"FeatureLayer"}:{className:"GroupLayer"}}(e);case"Feature Service":return async function(e,a){const r=await f(e,a);if("object"==typeof r){const{sourceJSON:e,className:a}=r,t={sourceJSON:e};return null!=r.id&&(t.layerId=r.id),{className:a||"FeatureLayer",properties:t}}return{className:"GroupLayer"}}(e,a);case"Feed":case"Stream Service":return{className:"StreamLayer"};case"GeoJson":return{className:"GeoJSONLayer"};case"Group Layer":return{className:"GroupLayer"};case"Image Service":return async function(e,a){await e.load();const r=e.typeKeywords?.map((e=>e.toLowerCase()))??[];if(r.includes("elevation 3d layer"))return{className:"ElevationLayer"};if(r.includes("tiled imagery"))return{className:"ImageryTileLayer"};const t=await a.fetchItemData(e),n=t?.layerType;if("ArcGISTiledImageServiceLayer"===n)return{className:"ImageryTileLayer"};if("ArcGISImageServiceLayer"===n)return{className:"ImageryLayer"};const i=await a.fetchServiceMetadata(e.url,{customParameters:await a.fetchCustomParameters(e)}),s=i.cacheType?.toLowerCase(),l=i.capabilities?.toLowerCase().includes("tilesonly"),c=i.tileInfo?.format?.toLowerCase()??"",o=null==s&&["jpg","jpeg","png","png8","png24","png32","mixed"].includes(c);return"map"===s||o||l?{className:"ImageryTileLayer"}:{className:"ImageryLayer"}}(e,a);case"KML":return{className:"KMLLayer"};case"Knowledge Graph Layer":return{className:"KnowledgeGraphLayer"};case"Map Service":return async function(e,a){return await async function(e,a){const{tileInfo:r}=await a.fetchServiceMetadata(e.url,{customParameters:await a.fetchCustomParameters(e)});return r}(e,a)?{className:"TileLayer"}:{className:"MapImageLayer"}}(e,a);case"Media Layer":return{className:"MediaLayer"};case"Scene Service":return async function(e,a){const r=await f(e,a,(async()=>{try{if(!e.url)return[];const{serverUrl:r}=await(0,n.L)(e.url,{sceneLayerItem:e}),t=await a.fetchServiceMetadata(r);return t?.tables??[]}catch{return[]}}));if("object"==typeof r){const t={};let n;if(null!=r.id?(t.layerId=r.id,n=`${e.url}/layers/${r.id}`):n=e.url,e.typeKeywords?.length)for(const a of Object.keys(l.XX))if(e.typeKeywords.includes(a))return{className:l.XX[a]};const i=await a.fetchServiceMetadata(n,{customParameters:await a.fetchCustomParameters(e,(e=>(0,y.pJ)(e)?.customParameters))});return{className:l.XX[i?.layerType]||"SceneLayer",properties:t}}if(!1===r){const r=await a.fetchServiceMetadata(e.url);if("Voxel"===r?.layerType)return{className:"VoxelLayer"}}return{className:"GroupLayer"}}(e,a);case"Vector Tile Service":return{className:"VectorTileLayer"};case"WCS":return{className:"WCSLayer"};case"WFS":return{className:"WFSLayer"};case"WMS":return{className:"WMSLayer"};case"WMTS":return{className:"WMTSLayer"};default:throw new t.A("portal:unknown-item-type","Unknown item type '${type}'",{type:e.type})}}async function f(e,a,r){const{url:t,type:n}=e,s="Feature Service"===n;if(!t)return{};if(/\/\d+$/.test(t)){if(s){const r=await a.fetchServiceMetadata(t,{customParameters:await a.fetchCustomParameters(e,(e=>(0,y.pJ)(e)?.customParameters))});return{id:r.id,className:(0,i.K)(r.type),sourceJSON:r}}return{}}await e.load();let l=await a.fetchItemData(e);if(s){const e=await(0,y.bO)(l,t,a),r=m(e);if("object"==typeof r){const a=(0,y.rc)(e,r.id);r.className=(0,y.K8)(a?.layerType)}return r}if("Scene Service"===n&&(l=await(0,y.nu)(e,l,a)),(0,y.XH)(l)>0)return m(l);const c=await a.fetchServiceMetadata(t);return r&&(c.tables=await r()),m(c)}function m(e){return 1===(0,y.XH)(e)&&{id:(0,y.pJ)(e)?.id}}},8947:(e,a,r)=>{r.d(a,{L:()=>s});var t=r(60999),n=r(74887),i=r(67076);async function s(e,a,r){const s=e&&e.getAtOrigin&&e.getAtOrigin("renderer",a.origin);if(s&&"unique-value"===s.type&&s.styleOrigin){const l=await(0,t.Ke)(s.populateFromStyle());if((0,n.Te)(r),!1===l.ok){const r=l.error;a?.messages&&a.messages.push(new i.A("renderer:style-reference",`Failed to create unique value renderer from style reference: ${r.message}`,{error:r,context:a})),e.clear("renderer",a?.origin)}}}},24183:(e,a,r)=>{r.d(a,{V:()=>n});var t=r(78888);async function n(e,a){const{data:r}=await(0,t.A)(e,{responseType:"json",query:{f:"json",...a?.customParameters,token:a?.apiKey}});return r}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2083],{67996:(e,t,n)=>{n.d(t,{cZ:()=>D,XW:()=>F,fe:()=>B});var r,i,s=n(78888),o=n(49186),a=n(91869),l=(n(90708),n(92722)),u=(n(59456),n(16930));class p{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 u.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 v=[r.ELEMENTUID,r.TYPENAME];var T,I;!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"}(I||(I={}));var M,E,A,x,S=n(45724),N=n(35448);function k(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 C(e){const t=L(e);return t.geometryType=N.bV[e.geometry_type.value],t}function R(e){const t=new m;t.quantizeOriginPosition=E[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===x.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===x.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===x.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!==x.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 B(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,u=new t.GlobalIdArray,p=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),u.add_globalid(e)),p.add_identifier(e);d.set_oid_array(a),d.set_string_array(l),d.set_globalid_array(u),d.set_identifier_array(p),a.delete(),l.delete(),u.delete(),p.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 j(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 p;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 u=i.spatialReference,d=r.spatial_reference;u.wkid=d.wkid,u.latestWkid=d.latestWkid,u.vcsWkid=d.vcsWkid,u.latestVcsWkid=d.latestVcsWkid,u.wkt=d.wkt,i.transform=R(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 v)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=k(s),t.centroid=k(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=k(t);o.push(n),t.delete()}a.delete(),_.push(t),n.delete()}w.delete();const I=i.geometryFields,M=r.geometry_fields,E=M.size();for(let e=0;e<E;e++){const t=M.get(e),n=C(t);I.push(n),t.delete()}return M.delete(),t}(t.get_feature_collection());return t.delete(),r}(await t.data)}function O(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"}(M||(M={})),function(e){e[e.upperLeft=0]="upperLeft",e[e.lowerLeft=1]="lowerLeft"}(E||(E={})),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"}(x||(x={}));const F={fetchAndConvertSerializedLinkChart:e=>async function(e){const t=[],n={generateAllSublayers:!1,namedTypeDefinitions:new Map};return e.entitiesUrl&&t.push(j(e.entitiesUrl).then((e=>{O(e,n)}))),e.relationshipsUrl&&t.push(j(e.relationshipsUrl).then((e=>{O(e,n)}))),await Promise.all(t),n}(e)}},9775:(e,t,n)=>{n.d(t,{A:()=>s});var r=n(62788),i=n(95488);class s{constructor(e=e=>e.values().next().value){this._peeker=e,this._observable=new i.I,this._items=new Set}get length(){return(0,r.gc)(this._observable),this._items.size}clear(){0!==this.length&&(this._items.clear(),this._observable.notify())}last(){if(0===this.length)return;let e;for(e of this._items);return e}peek(){if(0!==this.length)return this._peeker(this._items)}push(e){this.contains(e)||(this._items.add(e),this._observable.notify())}contains(e){return(0,r.gc)(this._observable),this._items.has(e)}pop(){if(0===this.length)return;const e=this.peek();return this._items.delete(e),this._observable.notify(),e}popLast(){if(0===this.length)return;const e=this.last();return this._items.delete(e),this._observable.notify(),e}remove(e){this.contains(e)&&(this._items.delete(e),this._observable.notify())}filter(e){const t=this.length;return this._items.forEach((t=>{e(t)||this._items.delete(t)})),t!==this._items.size&&this._observable.notify(),this}*[Symbol.iterator](){(0,r.gc)(this._observable),yield*this._items}}},75503:(e,t,n)=>{n.d(t,{E:()=>E,w:()=>a});var r=n(4576),i=(n(44208),n(4718)),s=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(),v.prune(),T.prune(),I.prune(),M.prune()}all(e){l(this._data,e)}search(e,t){let n=this._data;const r=this._toBBox;if(b(e,n))for(v.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):v.push(s))}n=v.pop()}}collides(e){let t=this._data;const n=this._toBBox;if(!b(e,t))return!1;for(v.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;v.push(i)}}t=v.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 x([]),this}remove(e){if(!e)return this;let t,n=this._data,i=null,s=0,o=!1;const a=this._toBBox(e);for(I.clear(),M.clear();n||I.length>0;){if(n||(n=I.pop(),i=I.data[I.length-1],s=M.pop()??0,o=!0),n.leaf&&(t=(0,r.qh)(n.children,e,n.children.length,n.indexHint),-1!==t))return n.children.splice(t,1),I.push(n),this._condense(I),this;o||n.leaf||!_(n,a)?i?(s++,n=i.children[s],o=!1):n=null:(I.push(n),M.push(s),s=0,i=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 x(e.slice(t,n+1));return u(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 u(o,this._toBBox),o}_insert(e,t,n){const r=this._toBBox,i=n?e:r(e);I.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,I);for(s.children.push(e),d(s,i);t>=0&&I.data[t].children.length>this._maxEntries;)this._split(I,t),t--;!function(e,t,n){for(let r=n;r>=0;r--)d(t.data[r],e)}(i,I,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 x(o):new S(o);a.height=n.height,u(n,this._toBBox),u(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,u(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=p(e,0,o,this._toBBox),a=p(e,o,n,this._toBBox),l=g(t,a),u=y(t)+y(a);l<r?(r=l,s=o,i=u<i?u:i):l===r&&u<i&&(i=u,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=p(e,0,t,i),o=p(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 u(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 u(e,t){p(e,0,e.children.length,t,e)}function p(e,t,n,r,i){i||(i=new x([])),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 v=new s.A,T=new s.A,I=new s.A,M=new s.A({deallocator:void 0});class E{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class A extends E{constructor(){super(...arguments),this.height=1,this.indexHint=new r.vW}}class x extends A{constructor(e){super(),this.children=e,this.leaf=!0}}class S extends A{constructor(e){super(),this.children=e,this.leaf=!1}}},10382:(e,t,n)=>{n.d(t,{A:()=>u});var r=n(36563),i=(n(44208),n(74887)),s=n(9775),o=n(72457),a=n(52268),l=n(61322);class u{constructor(){this._inUseClients=new Array,this._clients=new Array,this._clientPromises=new Array,this._ongoingJobsQueue=new s.A}destroy(){this.close()}get closed(){return!this._clients?.length}open(e,t){return new Promise(((n,r)=>{let s=!0;const o=e=>{(0,i.Te)(t.signal),s&&(s=!1,e())};this._clients.length=e.length,this._clientPromises.length=e.length,this._inUseClients.length=e.length;for(let s=0;s<e.length;++s){const a=e[s];(0,i.$X)(a)?this._clientPromises[s]=a.then((e=>(this._clients[s]=new l.default(e,t,this._ongoingJobsQueue),o(n),this._clients[s])),(()=>(o(r),null))):(this._clients[s]=new l.default(a,t,this._ongoingJobsQueue),this._clientPromises[s]=Promise.resolve(this._clients[s]),o(n))}}))}broadcast(e,t,n){const r=new Array(this._clientPromises.length);for(let i=0;i<this._clientPromises.length;++i){const s=this._clientPromises[i];r[i]=s.then((r=>r?.invoke(e,t,n)))}return r}close(){let e;for(;e=this._ongoingJobsQueue.pop();)e.resolver.reject((0,i.NK)(`Worker closing, aborting job calling '${e.methodName}'`));for(const e of this._clientPromises)e.then((e=>e?.close()));this._clients.length=0,this._clientPromises.length=0,this._inUseClients.length=0,(0,o.h)(this)}invoke(e,t,n){return this.apply(e,[t],n)}apply(e,t,n){const r=(0,i.Tw)();this._ongoingJobsQueue.push({methodName:e,data:t,invokeOptions:n,resolver:r});for(let e=0;e<this._clientPromises.length;e++){const t=this._clients[e];t?t.jobAdded():this._clientPromises[e].then((e=>e?.jobAdded()))}return r.promise}createInvokeProxy(e){return(0,a.L)(this,e)}on(e,t){return Promise.all(this._clientPromises).then((()=>(0,r.vE)(this._clients.map((n=>n.on(e,t))))))}openPorts(){return new Promise((e=>{const t=new Array(this._clientPromises.length);let n=t.length;for(let r=0;r<this._clientPromises.length;++r)this._clientPromises[r].then((i=>{i&&(t[r]=i.openPort()),0==--n&&e(t)}))}))}get test(){}}},72457:(e,t,n)=>{n.d(t,{h:()=>s,k:()=>i});const r=new FinalizationRegistry((e=>{e.close()}));function i(e,t){r.register(e,t,t)}function s(e){r.unregister(e)}},29953:(e,t,n)=>{n.d(t,{ho:()=>U});var r=n(49186),i=n(44208),s=n(74887),o=n(10382),a=n(72457),l=n(61322),u=n(53966),p=n(97768),d=n(78888),c=n(84952);const h={async request(e,t){const n=e.options,r=n.responseType;n.signal=t?.signal,n.responseType="native"===r||"native-request-init"===r?"native-request-init":r&&["blob","json","text"].includes(r)&&(0,c.sC)(e.url)?.after?r:"array-buffer";const i=await(0,d.A)(e.url,n),s={data:i.data,httpStatus:i.httpStatus,ssl:i.ssl};switch(i.requestOptions?.responseType){case"native-request-init":return delete s.data.signal,s;case"blob":s.data=await s.data.arrayBuffer();break;case"json":s.data=(new TextEncoder).encode(JSON.stringify(s.data)).buffer;break;case"text":s.data=(new TextEncoder).encode(s.data).buffer}return{result:s,transferList:[s.data]}}};var y=n(8341),m=n(2741),f=n(92602),g=(n(47566),n(70333));const _={};var b=n(26390);class w{constructor(){const e=document.createDocumentFragment();["addEventListener","dispatchEvent","removeEventListener"].forEach((t=>{this[t]=(...n)=>e[t](...n)}))}}class v{constructor(){this._dispatcher=new w,this._workerPostMessage({type:y.Go.HANDSHAKE})}terminate(){}get onmessage(){return this._onmessageHandler}set onmessage(e){this._onmessageHandler&&this.removeEventListener("message",this._onmessageHandler),this._onmessageHandler=e,e&&this.addEventListener("message",e)}get onmessageerror(){return this._onmessageerrorHandler}set onmessageerror(e){this._onmessageerrorHandler&&this.removeEventListener("messageerror",this._onmessageerrorHandler),this._onmessageerrorHandler=e,e&&this.addEventListener("messageerror",e)}get onerror(){return this._onerrorHandler}set onerror(e){this._onerrorHandler&&this.removeEventListener("error",this._onerrorHandler),this._onerrorHandler=e,e&&this.addEventListener("error",e)}postMessage(e){(0,b.d)((()=>{this._workerMessageHandler(new MessageEvent("message",{data:e}))}))}dispatchEvent(e){return this._dispatcher.dispatchEvent(e)}addEventListener(e,t,n){this._dispatcher.addEventListener(e,t,n)}removeEventListener(e,t,n){this._dispatcher.removeEventListener(e,t,n)}_workerPostMessage(e){(0,b.d)((()=>{this.dispatchEvent(new MessageEvent("message",{data:e}))}))}async _workerMessageHandler(e){const t=(0,y.VI)(e);if(t&&t.type===y.Go.OPEN){const{modulePath:e,jobId:n}=t;let r=await l.default.loadWorker(e);r||(r=await import(e));const i=l.default.connect(r);this._workerPostMessage({type:y.Go.OPENED,jobId:n,data:i})}}}var T=n(73444),I=n(18357);const M=()=>u.A.getLogger("esri.core.workers.workerFactory"),{HANDSHAKE:E}=y.Go;let A,x;const S="Failed to create Worker. Fallback to execute module in main thread";async function N(e){return new Promise((t=>{function n(i){const s=(0,y.VI)(i);s&&s.type===E&&(e.removeEventListener("message",n),e.removeEventListener("error",r),t(e))}function r(t){t.preventDefault(),e.removeEventListener("message",n),e.removeEventListener("error",r),M().warn("Failed to create Worker. Fallback to execute module in main thread",t),(e=new v).addEventListener("message",n),e.addEventListener("error",r)}e.addEventListener("message",n),e.addEventListener("error",r)}))}let k=0;const{ABORT:L,INVOKE:C,OPEN:R,OPENED:D,RESPONSE:B}=y.Go;class j{static async create(e){const t=await async function(){if(!(0,i.A)("esri-workers"))return N(new v);if(!A&&!x)try{const e='let globalId=0;const outgoing=new Map,configuration={CONFIGURATION};self.esriConfig=configuration.esriConfig;const workerPath=self.esriConfig.workers.workerPath,HANDSHAKE=0,OPEN=1,OPENED=2,RESPONSE=3,INVOKE=4,ABORT=5;function createAbortError(){const e=new Error("Aborted");return e.name="AbortError",e}function receiveMessage(e){return e&&e.data?"string"==typeof e.data?JSON.parse(e.data):e.data:null}function invokeStaticMessage(e,o,r){const t=r&&r.signal,n=globalId++;let s=null;return new Promise(((r,i)=>{if(t){if(t.aborted)return i(createAbortError());s=()=>{outgoing.get(n)&&(outgoing.delete(n),self.postMessage({type:5,jobId:n}),i(createAbortError()))},t.addEventListener("abort",s)}outgoing.set(n,{resolve:r,reject:i}),self.postMessage({type:4,jobId:n,methodName:e,abortable:null!=t,data:o})})).finally((()=>{t&&t.removeEventListener("abort",s)}))}let workerRevisionChecked=!1;function checkWorkerRevision(e){if(!workerRevisionChecked&&e.kernelInfo){workerRevisionChecked=!0;const{revision:o,fullVersion:r}=configuration.kernelInfo,{revision:t,fullVersion:n,version:s}=e.kernelInfo;esriConfig.assetsPath!==esriConfig.defaultAssetsPath&&o!==t&&console.warn(`Version mismatch detected between ArcGIS Maps SDK for JavaScript modules and assets. For more information visit https://bit.ly/3QnsuSo.\nModules version: ${r}\nAssets version: ${n??s}\nAssets path: ${esriConfig.assetsPath}`)}}function messageHandler(e){const o=receiveMessage(e);if(!o)return;const r=o.jobId;switch(o.type){case 1:let n;function t(e){const o=n.connect(e);self.postMessage({type:2,jobId:r,data:o},[o])}"function"==typeof define&&define.amd?require([workerPath],(e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||new Promise((e=>{require([o.modulePath],e)})))).then(t)})):"System"in self&&"function"==typeof System.import?System.import(workerPath).then((e=>(n=e.default,checkWorkerRevision(n),n.loadWorker(o.modulePath)))).then((e=>e||System.import(o.modulePath))).then(t):esriConfig.workers.useDynamicImport?import(workerPath).then((e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||import(o.modulePath))).then(t)})):(self.RemoteClient||importScripts(workerPath),n=self.RemoteClient.default||self.RemoteClient,checkWorkerRevision(n),n.loadWorker(o.modulePath).then(t));break;case 3:if(outgoing.has(r)){const s=outgoing.get(r);outgoing.delete(r),o.error?s.reject(JSON.parse(o.error)):s.resolve(o.data)}}}self.dojoConfig=configuration.loaderConfig,esriConfig.workers.loaderUrl&&(self.importScripts(esriConfig.workers.loaderUrl),"function"==typeof require&&"function"==typeof require.config&&require.config(configuration.loaderConfig)),self.addEventListener("message",messageHandler),self.postMessage({type:0});'.split("{CONFIGURATION}").join(function(){let e;if(null!=f.A.default){const t={...f.A};delete t.default,e=JSON.parse(JSON.stringify(t))}else e=JSON.parse(JSON.stringify(f.A));e.assetsPath=(0,c.s2)(e.assetsPath),e.defaultAssetsPath=e.defaultAssetsPath?(0,c.s2)(e.defaultAssetsPath):void 0,e.request.interceptors=[],e.log.interceptors=[],e.locale=(0,T.JK)(),e.has={"esri-csp-restrictions":(0,i.A)("esri-csp-restrictions"),"esri-2d-debug":!1,"esri-2d-update-debug":(0,i.A)("esri-2d-update-debug"),"esri-2d-log-updating":(0,i.A)("esri-2d-log-updating"),"featurelayer-pbf":(0,i.A)("featurelayer-pbf"),"featurelayer-fast-triangulation-enabled":(0,i.A)("featurelayer-fast-triangulation-enabled"),"featurelayer-simplify-thresholds":(0,i.A)("featurelayer-simplify-thresholds"),"featurelayer-simplify-payload-size-factors":(0,i.A)("featurelayer-simplify-payload-size-factors"),"featurelayer-simplify-mobile-factor":(0,i.A)("featurelayer-simplify-mobile-factor"),"featurelayer-query-max-depth":(0,i.A)("featurelayer-query-max-depth"),"featurelayer-query-pausing-enabled":(0,i.A)("featurelayer-query-pausing-enabled"),"featurelayer-snapshot-enabled":(0,i.A)("featurelayer-snapshot-enabled"),"esri-atomics":(0,i.A)("esri-atomics"),"esri-shared-array-buffer":(0,i.A)("esri-shared-array-buffer"),"esri-tiles-debug":(0,i.A)("esri-tiles-debug"),"esri-workers-arraybuffer-transfer":(0,i.A)("esri-workers-arraybuffer-transfer"),"feature-polyline-generalization-factor":(0,i.A)("feature-polyline-generalization-factor"),"host-webworker":1},e.workers.loaderUrl&&(e.workers.loaderUrl=(0,c.s2)(e.workers.loaderUrl)),e.workers.workerPath?e.workers.workerPath=(0,c.s2)(e.workers.workerPath):e.workers.workerPath=(0,c.s2)((0,m.s)("esri/core/workers/RemoteClient.js")),e.workers.useDynamicImport=!1;const t=f.A.workers.loaderConfig,n=function(e){const t={async:e.async,isDebug:e.isDebug,locale:e.locale,baseUrl:e.baseUrl,has:{...e.has},map:{...e.map},packages:e.packages?.slice()||[],paths:{..._.paths,...e.paths}};return e.hasOwnProperty("async")||(t.async=!0),e.hasOwnProperty("isDebug")||(t.isDebug=!1),e.baseUrl||(t.baseUrl=_.baseUrl),t}({baseUrl:t?.baseUrl,locale:(0,T.JK)(),has:{"csp-restrictions":1,"dojo-test-sniff":0,"host-webworker":1,...t?.has},map:{...t?.map},paths:{...t?.paths},packages:t?.packages||[]}),r={buildDate:I.$,fullVersion:g.ol,revision:I.u};return JSON.stringify({esriConfig:e,loaderConfig:n,kernelInfo:r})}());A=URL.createObjectURL(new Blob([e],{type:"text/javascript"}))}catch(e){x=e||{}}let e;if(A)try{e=new Worker(A,{name:"esri-worker-"+k++})}catch(t){M().warn(S,x),e=new v}else M().warn(S,x),e=new v;return N(e)}();return new j(t,e)}constructor(e,t){this._outJobs=new Map,this._inJobs=new Map,this.worker=e,this.id=t,e.addEventListener("message",this._onMessage.bind(this)),e.addEventListener("error",(e=>{e.preventDefault(),u.A.getLogger("esri.core.workers.WorkerOwner").error(e)}))}terminate(){this.worker.terminate()}async open(e,t={}){const{signal:n}=t,r=(0,y.Jc)();return new Promise(((t,i)=>{const o={resolve:t,reject:i,abortHandle:(0,s.NY)(n,(()=>{this._outJobs.delete(r),this._post({type:L,jobId:r})}))};this._outJobs.set(r,o),this._post({type:R,jobId:r,modulePath:e})}))}_onMessage(e){const t=(0,y.VI)(e);if(t)switch(t.type){case D:this._onOpenedMessage(t);break;case B:this._onResponseMessage(t);break;case L:this._onAbortMessage(t);break;case C:this._onInvokeMessage(t)}}_onAbortMessage(e){const t=this._inJobs,n=e.jobId,r=t.get(n);r&&(r.controller&&r.controller.abort(),t.delete(n))}_onInvokeMessage(e){const{methodName:t,jobId:n,data:r,abortable:i}=e,o=i?new AbortController:null,a=this._inJobs,l=h[t];let u;try{if("function"!=typeof l)throw new TypeError(`${t} is not a function`);u=l.call(null,r,{signal:o?o.signal:null})}catch(e){return void this._post({type:B,jobId:n,error:(0,y.mF)(e)})}(0,s.$X)(u)?(a.set(n,{controller:o,promise:u}),u.then((e=>{a.has(n)&&(a.delete(n),this._post({type:B,jobId:n},e))}),(e=>{a.has(n)&&(a.delete(n),e||(e={message:"Error encountered at method"+t}),(0,s.zf)(e)||this._post({type:B,jobId:n,error:(0,y.mF)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:B,jobId:n},u)}_onOpenedMessage(e){const{jobId:t,data:n}=e,r=this._outJobs.get(t);r&&(this._outJobs.delete(t),(0,p.xt)(r.abortHandle),r.resolve(n))}_onResponseMessage(e){const{jobId:t,error:n,data:i}=e,s=this._outJobs.get(t);s&&(this._outJobs.delete(t),(0,p.xt)(s.abortHandle),n?s.reject(r.A.fromJSON(JSON.parse(n))):s.resolve(i))}_post(e,t,n){return(0,y.u1)(this.worker,e,t,n)}}const O=(0,i.A)("host-browser")?Math.min(navigator.hardwareConcurrency-1,(0,i.A)("workers-pool-size")??8):0;let F=(0,i.A)("esri-mobile")?Math.min(O,3):O;F||(F=(0,i.A)("safari")&&(0,i.A)("mac")?7:2);let P=0;const Z=[];async function q(e,t){const n=new o.A,{registryTarget:r,...i}=t;return await n.open(e,i),r&&(0,a.k)(r,n),n}async function U(e,t={}){if("string"!=typeof e)throw new r.A("workers:undefined-module","modulePath is missing");let n=t.strategy||"distributed";if((0,i.A)("host-webworker")&&!(0,i.A)("esri-workers")&&(n="local"),"local"===n){let n=await l.default.loadWorker(e);n||(n=await import(e)),(0,s.Te)(t.signal);const r=t.client||n;return q([l.default.connect(n,t.schedule)],{...t,client:r})}if(await async function(){if(G)return G;$=new AbortController;const e=[];for(let t=0;t<F;t++){const n=j.create(t).then((e=>(Z[t]=e,e)));e.push(n)}return G=Promise.all(e),G}(),(0,s.Te)(t.signal),"dedicated"===n){const n=P++%F;return q([await Z[n].open(e,t)],t)}if(t.maxNumWorkers&&t.maxNumWorkers>0){const n=Math.min(t.maxNumWorkers,F);if(n<F){const r=new Array(n);for(let i=0;i<n;++i){const n=P++%F;r[i]=Z[n].open(e,t)}return q(r,t)}}return q(Z.map((n=>n.open(e,t))),t)}let $,G=null},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),u=n(90708),p=n(6518),d=n(51441),c=n(37730);const h=(0,a.vt)();class y{constructor(e){this.geometryInfo=e,this._boundsStore=new p.F,this._featuresById=new Map,this.events=new s.A,this.featureAdapter=c.T}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()}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)):null!=this.onFeatureAdd&&this.onFeatureAdd(e),!e.geometry?.coords?.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);r=(0,u.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)}_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;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,u.jQ)((0,l.vt)(),r,this.geometryInfo.hasZ,this.geometryInfo.hasM)??null)),n}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._boundsStore.delete(t),this._featuresById.delete(t),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 u=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let p=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$${p++} {\n constructor() {\n ${n};\n }\n }\n `)();return()=>new r}catch(n){return()=>({[t]:null,...e})}}function c(e){return u.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}}}},89270:(e,t,n)=>{var r;n.d(t,{x:()=>r}),function(e){e.MULTIPLIER="multiplier",e.ABSOLUTE="absolute-value"}(r||(r={}))},80340:(e,t,n)=>{n.d(t,{P:()=>T});var r=n(90237),i=(n(59456),n(69622)),s=n(49186),o=n(53966),a=n(91869),l=n(74887),u=n(39516),p=n(10107),d=(n(44208),n(87811),n(40608)),c=n(39829),h=n(57251),y=n(21325),m=n(85342),f=n(69860),g=n(6080),_=n(71402),b=n(42538),w=n(61956),v=n(5443);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 f.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 w.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]===m.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[m.Cz]),i=this.memberIdTypeLookup.get(n.attributes[m.KQ]),s=this._isEndEntitySpatial(r,n,m.Cz),o=this._isEndEntitySpatial(i,n,m.KQ);n.attributes[m.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[m.BL]=1:n.attributes[m.BL]=0}n.attributes[m.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 "),u=(await(0,_.executeQueryStreaming)(this.knowledgeGraph,new b.A({openCypherQuery:l,bindParameters:o}),{signal:n?.signal})).resultRowsStream.getReader();for(;;){const{done:e,value:t}=await u.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,_.executeQueryStreaming)(this.knowledgeGraph,new b.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,u=(await(0,_.executeQueryStreaming)(this.knowledgeGraph,new b.A({openCypherQuery:a,bindParameters:s}),{signal:r?.signal})).resultRowsStream.getReader();for(;;){const{done:e,value:t}=await u.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 p=[];for(const[e,t]of l)for(const n of t)p.push({id:n,typeName:e});return p}async refreshCacheContent(e,t,n,r=!0,i){const o=f.A.getInstance(),u=[],p=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))p.has(t)?p.get(t)?.push(e):p.set(t,[e])})):this.inclusionModeDefinition?.namedTypeDefinitions?.forEach(((e,t)=>{e.useAllData?p.set(t,null):e.members&&e.members.forEach((e=>{p.has(t)&&null!==p.get(t)?p.get(t)?.push(e.id):p.set(t,[e.id])}))})):(this.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&p.set(e.name,null)})),this.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&p.set(e.name,null)})));for(const[e,l]of p){const p=new Set(l),c=new Promise(((u,c)=>{(async()=>{const u=new Set,c=[];let h,y="",f=!1;if(t||d.get(e)?.properties?.forEach((e=>{e.name&&u.add(e.name)})),n&&this.geographicLookup.has(e)){const t=this.geographicLookup.get(e)?.name;t&&u.add(t)}if(this.entityTypeNames.has(e))y=`MATCH (n:${e}) ${l?"WHERE id(n) IN $ids ":""}return ID(n)`,u.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?`);f=!0,y=`MATCH ()-[n:${e}]->() ${l?"WHERE id(n) IN $ids ":""}return ID(n), id(startNode(n)), id(endNode(n))`,u.forEach((e=>{y+=`, n.${e}`,c.push(e)}))}h=new b.A(l?{openCypherQuery:y,bindParameters:{ids:l}}:{openCypherQuery:y});const g=(await(0,_.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++,f&&(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];p.delete(o.id),i.push(o)}const s=o.writeToStore(i,m.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[m.dr],t),r&&!this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members.has(t.attributes[m.dr])&&(this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members.set(t.attributes[m.dr],{id:t.attributes[m.dr]}),(0,a.tE)(this.memberIdTypeLookup,t.attributes[m.dr],(()=>new Set)).add(e))}))}const w=this.inclusionModeDefinition?.namedTypeDefinitions.get(e);if(w)for(const e of p)w.members?.delete(e)})().then((()=>{u(null)})).catch((e=>{"AbortError"===e.name?u(null):c(e)}))}));u.push(c),this._processingCacheUpdatesLookup.get(e)?.push(c)}if(await Promise.all(u),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=f.A.getInstance(),i=new Set,o=[];let a,l="",p=[];const d="relationship"===t.graphType,w=this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData,T=t.parentCompositeLayer.sublayerIdsCache.get(t.objectType.name);let I=!w&&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&&(I=e.objectIds);else if(null!=e.objectIds&&I&&I.length>0){const t=e.objectIds;e.objectIds=I.filter((e=>t.includes(e)))}else if(null!=e.objectIds)I=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=I}if(null!=e.outFields){const n=e.outFields;n.includes("*")?t.fields.forEach((e=>{i.add(e.name)})):n.forEach((e=>{e!==m.dr&&e!==t.geometryFieldName&&i.add(e)}))}if(null!=e.geometry){const n=e.geometry;let r;const p=t.parentCompositeLayer.dataManager.knowledgeGraph.serviceDefinition,m=p?.spatialReference,f=p?.serviceCapabilities?.geometryCapabilities;let _=f?.geometryMaxBoundingRectangleSizeX,w=f?.geometryMaxBoundingRectangleSizeY;if("point"===n.type){let e=n;e.spatialReference?.isWGS84||(await(0,h.initializeProjection)(e.spatialReference,y.KK),e=(0,h.project)(e,y.KK)),r=new v.A({spatialReference:y.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,h.initializeProjection)(n.extent.spatialReference,y.KK),r=(0,h.project)(n.extent,y.KK)):r=n.extent;if(_&&w&&m){if(4326!==m.wkid){const e=new v.A({spatialReference:m,xmax:_,ymax:w}),t=(0,h.project)(e,y.KK);_=t.xmax,w=t.ymax}if(r.xmax-r.xmin>_)throw new s.A("knowledge-graph:layer-data-manager",`Extent x bounds should be within ${_}° latitude, limit exceeded`);if(r.ymax-r.ymin>w)throw new s.A("knowledge-graph:layer-data-manager",`Extent y bounds should be within ${w}° longitude, limit exceeded`)}if(null!=e.where&&"1=1"!==e.where){const n=await(0,u.G)(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 b.A({openCypherQuery:l,bindParameters:{param_filter_geom:new c.A({rings:(0,g.Wq)(r)})}})}else{let n="";if(null!=e.where&&"1=1"!==e.where){const r=await(0,u.G)(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;I&&(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 b.A(I?{openCypherQuery:r,bindParameters:{ids:I}}:{openCypherQuery:r})}const M=(await(0,_.executeQueryStreaming)(t.parentCompositeLayer.dataManager.knowledgeGraph,a,n)).resultRowsStream.getReader();for(;;){const{done:e,value:n}=await M.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)}p=p.concat(r.writeToStore(i,m.dr,t.parentCompositeLayer.dataManager.geographicLookup.get(t.objectType.name)?.name))}return p}_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,p.MZ)()],T.prototype,"knowledgeGraph",void 0),(0,r._)([(0,p.MZ)()],T.prototype,"inclusionModeDefinition",void 0),(0,r._)([(0,p.MZ)()],T.prototype,"entityTypeNames",void 0),(0,r._)([(0,p.MZ)()],T.prototype,"relationshipTypeNames",void 0),(0,r._)([(0,p.MZ)()],T.prototype,"geographicLookup",void 0),(0,r._)([(0,p.MZ)()],T.prototype,"sublayerCaches",void 0),(0,r._)([(0,p.MZ)()],T.prototype,"nodeConnectionsLookup",void 0),(0,r._)([(0,p.MZ)()],T.prototype,"relationshipConnectionsLookup",void 0),(0,r._)([(0,p.MZ)()],T.prototype,"memberIdTypeLookup",void 0),T=(0,r._)([(0,d.$)("esri.layers.knowledgeGraph.KnowledgeGraphLayerDataManager")],T)},70643:(e,t,n)=>{n.d(t,{A:()=>X});var r=n(90237),i=(n(59456),n(13874)),s=(n(86162),n(52464),n(65345),n(42980),n(20917),n(92438),n(96576),n(93618),n(65494)),o=n(15036),a=n(4718),l=n(92071),u=(n(29953),n(10107)),p=(n(44208),n(53966),n(40608)),d=n(43937),c=n(35666),h=n(57251),y=n(16930),m=n(21325),f=n(4146),g=n(83221),_=n(19730),b=n(64714);n(87811);const w=(0,n(17036).p)(),v=e=>{let t=class extends e{constructor(){super(...arguments),this.fields=[],this.fieldsIndex=null}};return(0,r._)([(0,u.MZ)(w.fields)],t.prototype,"fields",void 0),(0,r._)([(0,u.MZ)(w.fieldsIndex)],t.prototype,"fieldsIndex",void 0),t=(0,r._)([(0,p.$)("esri.layers.knowledgeGraph.KnowledgeGraphSublayerBase")],t),t};var T=n(85342),I=n(63074),M=n(87718),E=n(76294),A=n(32756),x=n(54310),S=n(25036),N=n(82935),k=n(10873),L=n(13213),C=n(20437),R=n(30524),D=n(81457),B=n(39383),j=n(96184),O=n(22671),F=n(61956),P=n(30291),Z=n(61322),q=n(5443),U=n(39829),$=n(82799),G=n(86738),H=n(50498);function z(e){if(!e.json)return e;e.json.write=Q(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=Q(e.write))}return e}function Q(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=J.call(this,e,t);return n.enabled?{...i,...n}:n}}(e)),e):!0===e?Y():e}function Y(){return{overridePolicy:J}}function J(e,t){const n=!!this.geometryType;let r={enabled:n};return n&&(r={...r,...W.call(this,e,t)}),r}function W(e,t){return{ignoreOrigin:this.originIdOf(t)>c.Gr.DEFAULTS}}let V=class extends(v((0,E.J)((0,M.F)((0,I.dM)((0,A.fY)((0,N.e)((0,S.j)((0,x.J)((0,l.P)(f.A)))))))))){constructor(e){super(e),this.blendMode="normal",this.capabilities=(0,b.f)(!1,!1),this.charts=null,this.definitionExpression=null,this.displayField="",this.effect=null,this.elevationInfo=null,this.featureEffect=null,this.graphType=null,this.labelsVisible=!0,this.labelingInfo=null,this.layerType=null,this.legendEnabled=!0,this.maxScale=0,this.minScale=0,this.objectIdField=T.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 Z.default(e.port1,{channel:e,client:{queryFeatures:(e,t={})=>{const n=F.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(C.A.fromJSON({name:t.name,type:n,alias:t.alias,defaultValue:t.defaultValue,editable:t.editable,nullable:t.nullable}))})),e.push(C.A.fromJSON({name:this.objectIdField,type:"esriFieldTypeString",alias:this.objectIdField,editable:!1}),C.A.fromJSON({name:T.M1,type:"esriFieldTypeInteger",alias:T.M1,editable:!1}),C.A.fromJSON({name:T.BL,type:"esriFieldTypeInteger",alias:T.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?H.g.fromJSON(t):null}get geometryFieldName(){if("link-chart"===this.parentCompositeLayer?.type)return T.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 renderer(e){(0,R.yp)(e,this.fieldsIndex),this._set("renderer",e)}get renderer(){return this._isOverridden("renderer")?this._get("renderer"):"link-chart"===this.parentCompositeLayer?.type?"relationship"===this.graphType?(0,s.r)((0,b.F0)(H.g.toJSON("polyline")).renderer):(0,s.r)((0,b.F0)(H.g.toJSON("point")).renderer):(0,s.r)((0,b.F0)(H.g.toJSON(this.geometryType)).renderer)}get spatialReference(){return this.parentCompositeLayer?.dataManager?.knowledgeGraph?.dataModel?.spatialReference??y.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,P.tn)(this,e)}createQuery(){return new F.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=O.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 q.A(s.extent):new q.A,{count:s.count,extent:o}}async queryObjectIds(e,t){const n=F.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 r.executeQueryForIds(n.toJSON(),t?.signal)}loadQueryEngine(e){const t=new g.A({geometryType:H.g.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ}),n=new _.do({fieldsIndex:this.fieldsIndex.toJSON(),geometryType:H.g.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 F.A({where:"1=1",outFields:[T.dr]}),this);this._cachedQueryEngine=this.loadQueryEngine(e)}load(e){return this.addResolvingPromise(this.parent.load(e).then((()=>(0,R.sv)(this.timeInfo,this.fieldsIndex)))),Promise.resolve(this)}async _setupQueryObjects(e,t){const n=F.A.from(e),r=n.geometry;if(r&&!r.spatialReference?.isWGS84&&(await(0,h.initializeProjection)(r.spatialReference,m.KK),n.geometry=(0,h.project)(r instanceof U.A||r instanceof $.A||r instanceof G.A?r:r.extent,m.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,u.MZ)(z((0,a.o8)(I.sU)))],V.prototype,"blendMode",void 0),(0,r._)([(0,u.MZ)()],V.prototype,"capabilities",void 0),(0,r._)([(0,u.MZ)({json:{origins:{"web-scene":{write:!1}},write:Y()}})],V.prototype,"charts",void 0),(0,r._)([(0,u.MZ)({readOnly:!0})],V.prototype,"defaultPopupTemplate",null),(0,r._)([(0,u.MZ)({type:String,json:{origins:{service:{read:!1}},name:"layerDefinition.definitionExpression",write:{ignoreOrigin:!0}}})],V.prototype,"definitionExpression",void 0),(0,r._)([(0,u.MZ)()],V.prototype,"displayField",void 0),(0,r._)([(0,u.MZ)(z((0,a.o8)(I.LF)))],V.prototype,"effect",void 0),(0,r._)([(0,u.MZ)()],V.prototype,"elevationInfo",void 0),(0,r._)([(0,u.MZ)(z((0,a.o8)(M.Y)))],V.prototype,"featureEffect",void 0),(0,r._)([(0,u.MZ)(z((0,a.o8)(L.d)))],V.prototype,"featureReduction",null),(0,r._)([(0,u.MZ)()],V.prototype,"fields",null),(0,r._)([(0,u.MZ)()],V.prototype,"geometryType",null),(0,r._)([(0,u.MZ)()],V.prototype,"geometryFieldName",null),(0,r._)([(0,u.MZ)({type:["entity","relationship"],nonNullable:!0,json:{write:{isRequired:!0,ignoreOrigin:!0}}})],V.prototype,"graphType",void 0),(0,r._)([(0,u.MZ)({type:String,nonNullable:!0,json:{write:{isRequired:!0,ignoreOrigin:!0}}})],V.prototype,"graphTypeName",null),(0,r._)([(0,u.MZ)()],V.prototype,"hasM",null),(0,r._)([(0,u.MZ)()],V.prototype,"hasZ",null),(0,r._)([(0,u.MZ)({type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0}}})],V.prototype,"id",void 0),(0,r._)([(0,u.MZ)(z((0,a.o8)(k.kF)))],V.prototype,"labelsVisible",void 0),(0,r._)([(0,u.MZ)({type:[D.A],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:B.w,write:Y()}})],V.prototype,"labelingInfo",void 0),(0,r._)([(0,u.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}}})],V.prototype,"layerType",void 0),(0,r._)([(0,u.MZ)(z((0,a.o8)(k.fV)))],V.prototype,"legendEnabled",void 0),(0,r._)([(0,u.MZ)(z((0,a.o8)(k.hG)))],V.prototype,"maxScale",void 0),(0,r._)([(0,u.MZ)(z((0,a.o8)(k.hn)))],V.prototype,"minScale",void 0),(0,r._)([(0,u.MZ)()],V.prototype,"objectIdField",void 0),(0,r._)([(0,u.MZ)()],V.prototype,"objectType",void 0),(0,r._)([(0,u.MZ)(z((0,a.o8)(k.ke)))],V.prototype,"opacity",void 0),(0,r._)([(0,u.MZ)(z((0,a.o8)(A.ne)))],V.prototype,"orderBy",void 0),(0,r._)([(0,u.MZ)({clonable:!1})],V.prototype,"parent",void 0),(0,r._)([(0,u.MZ)()],V.prototype,"parentCompositeLayer",void 0),(0,r._)([(0,u.MZ)(z((0,a.o8)(k.M6)))],V.prototype,"popupEnabled",void 0),(0,r._)([(0,u.MZ)({type:i.A,json:{name:"popupInfo",write:{ignoreOrigin:!0}}})],V.prototype,"popupTemplate",void 0),(0,r._)([(0,u.MZ)({type:Number,json:{write:{overridePolicy:W}}})],V.prototype,"refreshInterval",void 0),(0,r._)([(0,u.MZ)({types:o.H,json:{name:"layerDefinition.drawingInfo.renderer",write:Y()}})],V.prototype,"renderer",null),(0,r._)([(0,u.MZ)()],V.prototype,"source",void 0),(0,r._)([(0,u.MZ)()],V.prototype,"spatialReference",null),(0,r._)([(0,u.MZ)({type:j.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}}}})],V.prototype,"timeInfo",null),(0,r._)([(0,u.MZ)({type:String,json:{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],V.prototype,"title",null),(0,r._)([(0,d.K)("title")],V.prototype,"writeTitle",null),(0,r._)([(0,u.MZ)({json:{read:!1}})],V.prototype,"type",void 0),(0,r._)([(0,u.MZ)(z((0,a.o8)(N.B)))],V.prototype,"useViewTime",void 0),(0,r._)([(0,u.MZ)({type:Boolean,json:{name:"visibility",write:Y()}})],V.prototype,"visible",void 0),V=(0,r._)([(0,p.$)("esri.layers.knowledgeGraph.KnowledgeGraphSublayer")],V);const X=V},69860:(e,t,n)=>{n.d(t,{A:()=>a}),n(59456);var r=n(90708),i=n(43334),s=n(85342),o=n(65864);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,u=null;if(n&&e.properties[n]&&(u=(0,r.Ux)(e.properties[n])),"originId"in e&&"destinationId"in e&&(e.properties[s.Cz]=e.originId,e.properties[s.KQ]=e.destinationId),e.properties[t]=e.id,e.id&&this._featureLookup.has(e.id)&&this._featureLookup.get(e.id).attributes){const r=this._featureLookup.get(e.id),s=JSON.parse(JSON.stringify(Object.assign(r.attributes,e.properties)));n&&e.properties[n]&&(s[n]=(0,o.rS)(e.properties[n])),l=new i.Om(u?JSON.parse(JSON.stringify(u)):r?.geometry?JSON.parse(JSON.stringify(r.geometry)):null,s,null,e.properties[t])}else l=new i.Om(u?JSON.parse(JSON.stringify(u)):null,e.properties,null,e.properties[t]);this._featureLookup.set(`${e.typeName?`${e.typeName}__${e.id}`:e.id}`,l),a.push(l)})),a}}},85342:(e,t,n)=>{n.d(t,{BL:()=>u,Cz:()=>s,KQ:()=>o,M1:()=>l,T1:()=>a,dr:()=>i,qN:()=>c});var r=n(71402);const i="ESRI__ID",s="ESRI__OriginID",o="ESRI__DestID",a="ESRI__LayoutGeometry",l="ESRI__AggregationCount",u="LC.ESRI__IsSpatial",p={initializeLayersFromClientData:async(e,t,n)=>{if(t||(t=[...e.layers,...e.tables].map((e=>e.graphTypeName))),0===t?.length)return;const i=new Map;for(const n of t)i.set(n,d(e,n));const s=await(0,r.fetchClientDataAtKeys)(e.dataManager.knowledgeGraph,Array.from(i.values()),{requestOptions:{signal:n?.signal}});for(const t of[...e.layers,...e.tables]){const n=t.objectType.name;if(null===n)continue;const r=s.get(d(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"})}}}},d=(e,t)=>"knowledge-graph"===e.type?`${t}/Map`:`${t}/LinkChart/LinkChartSubLayer`;async function c(e,t,n){return p.initializeLayersFromClientData(e,t,n)}},6080:(e,t,n)=>{n.d(t,{o3:()=>E,k5:()=>M,aq:()=>I,Wq:()=>A}),n(59456),n(52106),n(61147);var r=n(49186),i=(n(94194),n(89270)),s=(n(85342),n(69860),n(8460),n(90237)),o=n(69540),a=n(25482),l=n(10107),u=n(56507),p=(n(87811),n(44208),n(93223)),d=n(40608),c=n(66552);const h=(0,c.O)()({none:"none",startAndEnd:"start-and-end",startOnly:"start-only"}),y=(0,c.O)()({absoluteValue:"absolute-value",multiplier:"multiplier"}),m=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"]]);let f=class extends(o.A.ClonableMixin(a.A)){constructor(e){super(e),this.durationLineWidth=5,this.entityPositionAtDurationRatio=1,this.eventsTicksVisualization="start-and-end",this.lineSeparationMultiplier=1,this.moveFirstBends=!0,this.secondBendRatio=.3,this.separateTimeOverlaps=!0,this.separateTimelineOverlaps=!0,this.separatedLineShapeRatio=0,this.showDurationLineForNonZeroDurationEntityEvents=!1,this.showNonZeroDurationIntervalBounds=!1,this.spaceSeparatedLinesEvenly=!1,this.timeBannerUTCOffsetInMinutes=0,this.timeDirection="right",this.useBezierCurves=!1}};(0,s._)([(0,l.MZ)({type:u.jz,range:{min:1,max:10},json:{write:!0}})],f.prototype,"durationLineWidth",void 0),(0,s._)([(0,l.MZ)({type:Number,range:{min:0,max:1},json:{write:!0}})],f.prototype,"entityPositionAtDurationRatio",void 0),(0,s._)([(0,p.e)(h)],f.prototype,"eventsTicksVisualization",void 0),(0,s._)([(0,l.MZ)({type:Number,range:{min:0},json:{write:!0}})],f.prototype,"lineSeparationMultiplier",void 0),(0,s._)([(0,l.MZ)({type:Boolean,json:{write:!0}})],f.prototype,"moveFirstBends",void 0),(0,s._)([(0,l.MZ)({type:Number,range:{min:0,max:1},json:{write:!0}})],f.prototype,"secondBendRatio",void 0),(0,s._)([(0,l.MZ)({type:Boolean,json:{write:!0}})],f.prototype,"separateTimeOverlaps",void 0),(0,s._)([(0,l.MZ)({type:Boolean,json:{write:!0}})],f.prototype,"separateTimelineOverlaps",void 0),(0,s._)([(0,l.MZ)({type:Number,range:{min:0,max:1},json:{write:!0}})],f.prototype,"separatedLineShapeRatio",void 0),(0,s._)([(0,l.MZ)({type:Boolean,json:{write:!0}})],f.prototype,"showDurationLineForNonZeroDurationEntityEvents",void 0),(0,s._)([(0,l.MZ)({type:Boolean,json:{write:!0}})],f.prototype,"showNonZeroDurationIntervalBounds",void 0),(0,s._)([(0,l.MZ)({type:Boolean,json:{write:!0}})],f.prototype,"spaceSeparatedLinesEvenly",void 0),(0,s._)([(0,l.MZ)({type:u.jz,json:{write:!0}})],f.prototype,"timeBannerUTCOffsetInMinutes",void 0),(0,s._)([(0,l.MZ)({type:["bottom","left","right","top"],json:{write:!0}})],f.prototype,"timeDirection",void 0),(0,s._)([(0,l.MZ)({type:Boolean,json:{write:!0}})],f.prototype,"useBezierCurves",void 0),f=(0,s._)([(0,d.$)("esri.linkChart.ChronologicalLayoutSettings")],f);const g=f;n(53966);let _=class extends(o.A.ClonableMixin(a.A)){constructor(e){super(e),this.absoluteIdealEdgeLength=1,this.autoRepulsionRadius=!0,this.idealEdgeLengthType="multiplier",this.multiplicativeIdealEdgeLength=1,this.repulsionRadiusMultiplier=1}};(0,s._)([(0,l.MZ)({type:Number,range:{min:0,max:360},json:{write:!0}})],_.prototype,"absoluteIdealEdgeLength",void 0),(0,s._)([(0,l.MZ)({type:Boolean,json:{write:!0}})],_.prototype,"autoRepulsionRadius",void 0),(0,s._)([(0,p.e)(y)],_.prototype,"idealEdgeLengthType",void 0),(0,s._)([(0,l.MZ)({type:Number,range:{min:0,max:5},json:{write:!0}})],_.prototype,"multiplicativeIdealEdgeLength",void 0),(0,s._)([(0,l.MZ)({type:Number,range:{min:1,max:99},json:{write:!0}})],_.prototype,"repulsionRadiusMultiplier",void 0),_=(0,s._)([(0,d.$)("esri.linkChart.OrganicLayoutSettings")],_);const b=_;let w=class extends(o.A.ClonableMixin(a.A)){constructor(e){super(e),this.chronologicalLayoutSettings=null,this.organicLayoutSettings=null}};(0,s._)([(0,l.MZ)({type:g,json:{write:!0}})],w.prototype,"chronologicalLayoutSettings",void 0),(0,s._)([(0,l.MZ)({type:b,json:{write:!0}})],w.prototype,"organicLayoutSettings",void 0),w=(0,s._)([(0,d.$)("esri.linkChart.LayoutSettings")],w);var v=n(71402),T=n(42538);async function I(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={},o=[];for(const[e,t]of i){if(t.length<1)continue;const n=`${e}_ids`;s[n]=t,o.push(`MATCH (n)-[r:${e}]->(m) WHERE id(r) in $${n} RETURN id(n), labels(n)[0], id(m), labels(m)[0]`)}if(0===o.length)return[];const a=o.join(" UNION "),l=new T.A({openCypherQuery:a,bindParameters:s}),u=(await(0,v.executeQueryStreaming)(t,l,n?.requestOptions)).resultRowsStream.getReader();for(;;){const{done:e,value:t}=await u.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(82799),n(94985),n(39829),n(68249),n(86738);const M=e=>m.get(e)??"radial-root-centric",E=(e,t)=>{const n=e?.chronologicalLayoutSettings,r=e?.organicLayoutSettings;return{chronologicalLayoutSettings:null!==n?n:void 0,organicLayoutSettings:r?{idealEdgeLengthType:"absolute-value"===r.idealEdgeLengthType?i.x.ABSOLUTE:i.x.MULTIPLIER,repulsionRadiusMultiplier:r.autoRepulsionRadius?void 0:r.repulsionRadiusMultiplier,idealEdgeLength:null==r.idealEdgeLengthType?void 0:"absolute-value"===r.idealEdgeLengthType?r.absoluteIdealEdgeLength:r.multiplicativeIdealEdgeLength,computationBudgetTime:t}:void 0}};function A(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]]))}},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),u=n(96184),p=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=p.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:u.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}},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),u=n(43937),p=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?p.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:p.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,u.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,u.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,supportedStatistics:void 0},i={analytics:{supportsCacheHint:!1},attachment:{supportsContentType:!1,supportsExifInfo:!1,supportsKeywords:!1,supportsName:!1,supportsSize:!1,supportsCacheHint:!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}}},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)}}}}},8460:(e,t,n)=>{n.d(t,{$C:()=>f,Hh:()=>o,J:()=>u,JT:()=>l,Tu:()=>y,Wg:()=>m,Xq:()=>_,i6:()=>b,pM:()=>h,tx:()=>a,vJ:()=>g});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,u,p,d,c,h,y,m,f,g,_,b,w,v;function T(e){const t=Object.keys(p).filter((e=>isNaN(parseInt(e,10)))).indexOf(e.timeDirection);let n=d.startAndEnd;switch(e.eventsTicksVisualization){case"start-only":n=d.startOnly;break;case"none":n=d.none}return{timeDirection:{value:t>-1?t:p.right},timeBannerUTCOffsetInMinutes:e.timeBannerUTCOffsetInMinutes,eventsTicksVisualization:{value:n},showDurationLineForNonZeroDurationEntityEvents:e.showDurationLineForNonZeroDurationEntityEvents,durationLineWidth:e.durationLineWidth,entityPositionAtDurationRatio:e.entityPositionAtDurationRatio,showNonZeroDurationIntervalBounds:e.showNonZeroDurationIntervalBounds,separateTimeOverlaps:e.separateTimeOverlaps,separateTimelineOverlaps:e.separateTimelineOverlaps,moveFirstBends:e.moveFirstBends,secondBendRatio:e.secondBendRatio,lineSeparationMultiplier:e.lineSeparationMultiplier,spaceSeparatedLinesEvenly:e.spaceSeparatedLinesEvenly,useBezierCurves:e.useBezierCurves,separatedLineShapeRatio:e.separatedLineShapeRatio}}function I(e,t,n,r,i,o){const a=n.length,u=i.length,p=Float64Array.BYTES_PER_ELEMENT,d=Uint32Array.BYTES_PER_ELEMENT,c=Uint8Array.BYTES_PER_ELEMENT,h=16+a*(c+2*p)+u*(2*d),y=s._malloc(h);try{const c=y+16-y%16,h=c+a*p,m=h+a*p,f=m+u*d,g=f+u*d,_=()=>[s.HEAPF64.subarray(c>>3,(c>>3)+a),s.HEAPF64.subarray(h>>3,(h>>3)+a),s.HEAPU32.subarray(m>>2,(m>>2)+u),s.HEAPU32.subarray(f>>2,(f>>2)+u),s.HEAPU8.subarray(g,g+a)],[b,w,v,T,I]=_();b.set(n),w.set(r),v.set(i),T.set(o),I.set(t);const M=e(a,g,c,h,u,m,f);let E=null,A=null;if(M.value===l.Success){const e=s.getLayoutLinksTypes(),t=s.getLayoutLinksVerticesEndIndices(),n=s.getLayoutLinksVertices(),r=s.countLayoutLinksVertices();!u||e&&t?r&&!n?M.value=l.Error:(E={types:new Uint8Array(s.HEAPU8.subarray(e,e+u)),vertexEndIndex:new Uint32Array(s.HEAPU32.subarray(t>>2,(t>>2)+u)),vertices:new Float64Array(s.HEAPF64.subarray(n>>3,(n>>3)+2*r))},A=s.getAuxiliaryGraphicElements()):M.value=l.Error}const[x,S,N,k,L]=_();return n.set(x),r.set(S),i.set(N),o.set(k),t.set(L),{status:M.value,links:E,graphics:A}}finally{s._free(y),s.cleanupLayout()}}(c=a||(a={}))[c.None=0]="None",c[c.IsMovable=1]="IsMovable",c[c.IsGeographic=2]="IsGeographic",c[c.IsRoot=4]="IsRoot",c[c.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"}(u||(u={})),function(e){e[e.right=0]="right",e[e.left=1]="left",e[e.top=2]="top",e[e.bottom=3]="bottom"}(p||(p={})),function(e){e[e.none=0]="none",e[e.startOnly=1]="startOnly",e[e.startAndEnd=2]="startAndEnd"}(d||(d={})),function(e){e.getMinIdealEdgeLength=function(){return s.getMinIdealEdgeLength()},e.apply=function(e,t,n,r,i,o,a=2,l=1,u=-1){return I(((t,n,r,i,o,p,d)=>s.applyForceDirectedLayout(e,t,n,r,i,o,p,d,a,l,u)),t,n,r,i,o)}}(h||(h={})),function(e){e.apply=function(e,t,n,r,i,o,a=2,l=1,u=-1){return I(((t,n,r,i,o,p,d)=>s.applyCommunityLayout(e,t,n,r,i,o,p,d,a,l,u)),t,n,r,i,o)}}(y||(y={})),function(e){e.apply=function(e,t,n,r,i,o){return I(((t,n,r,i,o,a,l)=>s.applySimpleLayout(e,t,n,r,i,o,a,l)),t,n,r,i,o)}}(m||(m={})),function(e){e.apply=function(e,t,n,r,i,o){return I(((t,n,r,i,o,a,l)=>s.applyHierarchicalLayout(e,t,n,r,i,o,a,l)),t,n,r,i,o)}}(f||(f={})),function(e){e.apply=function(e,t,n,r,i,o){return I(((t,n,r,i,o,a,l)=>s.applyRadialTreeLayout(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 I(((t,n,r,i,o,a,l)=>s.applySmartTreeLayout(e,t,n,r,i,o,a,l)),t,n,r,i,o)}}(_||(_={})),function(e){e.apply=function(e,t,n,r,i,o,a,u,c,h,y,m){const f={timeDirection:p.right,timeBannerUTCOffsetInMinutes:0,eventsTicksVisualization:d.startAndEnd,showDurationLineForNonZeroDurationEntityEvents:!0,durationLineWidth:5,entityPositionAtDurationRatio:1,showNonZeroDurationIntervalBounds:!1,separateTimeOverlaps:!0,separateTimelineOverlaps:!0,moveFirstBends:!0,secondBendRatio:.3,lineSeparationMultiplier:1,spaceSeparatedLinesEvenly:!1,useBezierCurves:!1,separatedLineShapeRatio:0};return I(((t,n,r,a,u,p,d)=>{if(i.length!==t)return{value:l.Error};if(o.length!==t)return{value:l.Error};if(c.length!==u)return{value:l.Error};if(h.length!==u)return{value:l.Error};const g=Float64Array.BYTES_PER_ELEMENT,_=16,b=s._malloc(_+t*g),w=s._malloc(_+t*g),v=s._malloc(_+u*g),I=s._malloc(_+u*g),M=b+_-b%_,E=w+_-w%_,A=v+_-v%_,x=I+_-I%_;try{s.HEAPF64.subarray(M>>3,(M>>3)+t).set(i),s.HEAPF64.subarray(E>>3,(E>>3)+t).set(o),s.HEAPF64.subarray(A>>3,(A>>3)+u).set(c),s.HEAPF64.subarray(x>>3,(x>>3)+u).set(h);const l=T(Object.assign(f,m));return s.applyChronologicalLayout(e,t,n,r,a,M,E,u,p,d,A,x,y,l)}finally{s._free(b),s._free(w),s._free(v),s._free(I)}}),t,n,r,a,u)}}(b||(b={})),function(e){e[e.Undirected=0]="Undirected",e[e.Directed=1]="Directed",e[e.Reversed=2]="Reversed"}(w||(w={})),function(e){e[e.ByCC_Raw=0]="ByCC_Raw",e[e.ByCC_NormalizeGlobally=1]="ByCC_NormalizeGlobally",e[e.ByCC_NormalizeByCC=2]="ByCC_NormalizeByCC"}(v||(v={}))},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:()=>u});var r=n(90237),i=(n(59456),n(10107)),s=(n(44208),n(53966),n(87811),n(40608)),o=n(54238),a=n(86738);let l=class extends o.A{constructor(e){super(e),this.layoutGeometry=null}};(0,r._)([(0,i.MZ)({type:a.A,json:{write:!0}})],l.prototype,"layoutGeometry",void 0),l=(0,r._)([(0,s.$)("esri.rest.knowledgeGraph.Entity")],l);const u=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:()=>p});var r=n(90237),i=n(10107),s=(n(44208),n(53966),n(87811),n(40608)),o=n(69622);let a=class extends o.A{constructor(e){super(e),this.openCypherQuery=""}};(0,r._)([(0,i.MZ)()],a.prototype,"openCypherQuery",void 0),a=(0,r._)([(0,s.$)("esri.rest.knowledgeGraph.GraphQuery")],a);const l=a;let u=class extends l{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)()],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 p=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:()=>u});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=null}};(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 u=l},23150:(e,t,n)=>{n.d(t,{A:()=>u});var r=n(90237),i=(n(59456),n(10107)),s=(n(44208),n(53966),n(87811),n(40608)),o=n(54238),a=n(82799);let l=class extends o.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:a.A,json:{write:!0}})],l.prototype,"layoutGeometry",void 0),l=(0,r._)([(0,s.$)("esri.rest.knowledgeGraph.Relationship")],l);const u=l},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)),u=n(40608),p=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)(p.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,u.$)("esri.time.TimeInterval")],d);const c=d}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2626],{9775:(e,t,r)=>{r.d(t,{A:()=>o});var s=r(62788),i=r(95488);class o{constructor(e=e=>e.values().next().value){this._peeker=e,this._observable=new i.I,this._items=new Set}get length(){return(0,s.gc)(this._observable),this._items.size}clear(){0!==this.length&&(this._items.clear(),this._observable.notify())}last(){if(0===this.length)return;let e;for(e of this._items);return e}peek(){if(0!==this.length)return this._peeker(this._items)}push(e){this.contains(e)||(this._items.add(e),this._observable.notify())}contains(e){return(0,s.gc)(this._observable),this._items.has(e)}pop(){if(0===this.length)return;const e=this.peek();return this._items.delete(e),this._observable.notify(),e}popLast(){if(0===this.length)return;const e=this.last();return this._items.delete(e),this._observable.notify(),e}remove(e){this.contains(e)&&(this._items.delete(e),this._observable.notify())}filter(e){const t=this.length;return this._items.forEach((t=>{e(t)||this._items.delete(t)})),t!==this._items.size&&this._observable.notify(),this}*[Symbol.iterator](){(0,s.gc)(this._observable),yield*this._items}}},10382:(e,t,r)=>{r.d(t,{A:()=>c});var s=r(36563),i=(r(44208),r(74887)),o=r(9775),n=r(72457),a=r(52268),l=r(61322);class c{constructor(){this._inUseClients=new Array,this._clients=new Array,this._clientPromises=new Array,this._ongoingJobsQueue=new o.A}destroy(){this.close()}get closed(){return!this._clients?.length}open(e,t){return new Promise(((r,s)=>{let o=!0;const n=e=>{(0,i.Te)(t.signal),o&&(o=!1,e())};this._clients.length=e.length,this._clientPromises.length=e.length,this._inUseClients.length=e.length;for(let o=0;o<e.length;++o){const a=e[o];(0,i.$X)(a)?this._clientPromises[o]=a.then((e=>(this._clients[o]=new l.default(e,t,this._ongoingJobsQueue),n(r),this._clients[o])),(()=>(n(s),null))):(this._clients[o]=new l.default(a,t,this._ongoingJobsQueue),this._clientPromises[o]=Promise.resolve(this._clients[o]),n(r))}}))}broadcast(e,t,r){const s=new Array(this._clientPromises.length);for(let i=0;i<this._clientPromises.length;++i){const o=this._clientPromises[i];s[i]=o.then((s=>s?.invoke(e,t,r)))}return s}close(){let e;for(;e=this._ongoingJobsQueue.pop();)e.resolver.reject((0,i.NK)(`Worker closing, aborting job calling '${e.methodName}'`));for(const e of this._clientPromises)e.then((e=>e?.close()));this._clients.length=0,this._clientPromises.length=0,this._inUseClients.length=0,(0,n.h)(this)}invoke(e,t,r){return this.apply(e,[t],r)}apply(e,t,r){const s=(0,i.Tw)();this._ongoingJobsQueue.push({methodName:e,data:t,invokeOptions:r,resolver:s});for(let e=0;e<this._clientPromises.length;e++){const t=this._clients[e];t?t.jobAdded():this._clientPromises[e].then((e=>e?.jobAdded()))}return s.promise}createInvokeProxy(e){return(0,a.L)(this,e)}on(e,t){return Promise.all(this._clientPromises).then((()=>(0,s.vE)(this._clients.map((r=>r.on(e,t))))))}openPorts(){return new Promise((e=>{const t=new Array(this._clientPromises.length);let r=t.length;for(let s=0;s<this._clientPromises.length;++s)this._clientPromises[s].then((i=>{i&&(t[s]=i.openPort()),0==--r&&e(t)}))}))}get test(){}}},35982:(e,t,r)=>{r.d(t,{B:()=>l});var s=r(4576),i=r(36563),o=r(53966),n=r(74887),a=r(29953);class l{constructor(e,t,r,s,i={}){this._mainMethod=t,this._transferLists=r,this._listeners=[],this._promise=(0,a.ho)(e,{...i,schedule:s}).then((e=>{if(void 0===this._thread){this._thread=e,this._promise=null,i.hasInitialize&&this.broadcast({},"initialize");for(const e of this._listeners)this._connectListener(e)}else e.close()})),this._promise.catch((t=>o.A.getLogger("esri.core.workers.WorkerHandle").error(`Failed to initialize ${e} worker: ${t}`)))}on(e,t){const r={removed:!1,eventName:e,callback:t,threadHandle:null};return this._listeners.push(r),this._connectListener(r),(0,i.hA)((()=>{r.removed=!0,(0,s.TF)(this._listeners,r),this._thread&&null!=r.threadHandle&&r.threadHandle.remove()}))}destroy(){this._thread&&(this._thread.close(),this._thread=null),this._promise=null,this._listeners.length=0,this._transferLists={}}invoke(e,t){return this.invokeMethod(this._mainMethod,e,t)}invokeMethod(e,t,r){if(this._thread){const s=this._transferLists[e],i=s?s(t):[];return this._thread.invoke(e,t,{transferList:i,signal:r})}return this._promise?this._promise.then((()=>((0,n.Te)(r),this.invokeMethod(e,t,r)))):Promise.reject(null)}broadcast(e,t){return this._thread?Promise.all(this._thread.broadcast(t,e)).then((()=>{})):this._promise?this._promise.then((()=>this.broadcast(e,t))):Promise.reject()}get promise(){return this._promise}_connectListener(e){this._thread&&this._thread.on(e.eventName,e.callback).then((t=>{e.removed||(e.threadHandle=t)}))}}},72457:(e,t,r)=>{r.d(t,{h:()=>o,k:()=>i});const s=new FinalizationRegistry((e=>{e.close()}));function i(e,t){s.register(e,t,t)}function o(e){s.unregister(e)}},29953:(e,t,r)=>{r.d(t,{ho:()=>j});var s=r(49186),i=r(44208),o=r(74887),n=r(10382),a=r(72457),l=r(61322),c=r(53966),h=r(97768),d=r(78888),u=r(84952);const p={async request(e,t){const r=e.options,s=r.responseType;r.signal=t?.signal,r.responseType="native"===s||"native-request-init"===s?"native-request-init":s&&["blob","json","text"].includes(s)&&(0,u.sC)(e.url)?.after?s:"array-buffer";const i=await(0,d.A)(e.url,r),o={data:i.data,httpStatus:i.httpStatus,ssl:i.ssl};switch(i.requestOptions?.responseType){case"native-request-init":return delete o.data.signal,o;case"blob":o.data=await o.data.arrayBuffer();break;case"json":o.data=(new TextEncoder).encode(JSON.stringify(o.data)).buffer;break;case"text":o.data=(new TextEncoder).encode(o.data).buffer}return{result:o,transferList:[o.data]}}};var _=r(8341),m=r(2741),g=r(92602),f=(r(47566),r(70333));const A={};var E=r(26390);class b{constructor(){const e=document.createDocumentFragment();["addEventListener","dispatchEvent","removeEventListener"].forEach((t=>{this[t]=(...r)=>e[t](...r)}))}}class R{constructor(){this._dispatcher=new b,this._workerPostMessage({type:_.Go.HANDSHAKE})}terminate(){}get onmessage(){return this._onmessageHandler}set onmessage(e){this._onmessageHandler&&this.removeEventListener("message",this._onmessageHandler),this._onmessageHandler=e,e&&this.addEventListener("message",e)}get onmessageerror(){return this._onmessageerrorHandler}set onmessageerror(e){this._onmessageerrorHandler&&this.removeEventListener("messageerror",this._onmessageerrorHandler),this._onmessageerrorHandler=e,e&&this.addEventListener("messageerror",e)}get onerror(){return this._onerrorHandler}set onerror(e){this._onerrorHandler&&this.removeEventListener("error",this._onerrorHandler),this._onerrorHandler=e,e&&this.addEventListener("error",e)}postMessage(e){(0,E.d)((()=>{this._workerMessageHandler(new MessageEvent("message",{data:e}))}))}dispatchEvent(e){return this._dispatcher.dispatchEvent(e)}addEventListener(e,t,r){this._dispatcher.addEventListener(e,t,r)}removeEventListener(e,t,r){this._dispatcher.removeEventListener(e,t,r)}_workerPostMessage(e){(0,E.d)((()=>{this.dispatchEvent(new MessageEvent("message",{data:e}))}))}async _workerMessageHandler(e){const t=(0,_.VI)(e);if(t&&t.type===_.Go.OPEN){const{modulePath:e,jobId:r}=t;let s=await l.default.loadWorker(e);s||(s=await import(e));const i=l.default.connect(s);this._workerPostMessage({type:_.Go.OPENED,jobId:r,data:i})}}}var T=r(73444),w=r(18357);const I=()=>c.A.getLogger("esri.core.workers.workerFactory"),{HANDSHAKE:v}=_.Go;let y,M;const P="Failed to create Worker. Fallback to execute module in main thread";async function x(e){return new Promise((t=>{function r(i){const o=(0,_.VI)(i);o&&o.type===v&&(e.removeEventListener("message",r),e.removeEventListener("error",s),t(e))}function s(t){t.preventDefault(),e.removeEventListener("message",r),e.removeEventListener("error",s),I().warn("Failed to create Worker. Fallback to execute module in main thread",t),(e=new R).addEventListener("message",r),e.addEventListener("error",s)}e.addEventListener("message",r),e.addEventListener("error",s)}))}let N=0;const{ABORT:C,INVOKE:S,OPEN:D,OPENED:k,RESPONSE:H}=_.Go;class U{static async create(e){const t=await async function(){if(!(0,i.A)("esri-workers"))return x(new R);if(!y&&!M)try{const e='let globalId=0;const outgoing=new Map,configuration={CONFIGURATION};self.esriConfig=configuration.esriConfig;const workerPath=self.esriConfig.workers.workerPath,HANDSHAKE=0,OPEN=1,OPENED=2,RESPONSE=3,INVOKE=4,ABORT=5;function createAbortError(){const e=new Error("Aborted");return e.name="AbortError",e}function receiveMessage(e){return e&&e.data?"string"==typeof e.data?JSON.parse(e.data):e.data:null}function invokeStaticMessage(e,o,r){const t=r&&r.signal,n=globalId++;let s=null;return new Promise(((r,i)=>{if(t){if(t.aborted)return i(createAbortError());s=()=>{outgoing.get(n)&&(outgoing.delete(n),self.postMessage({type:5,jobId:n}),i(createAbortError()))},t.addEventListener("abort",s)}outgoing.set(n,{resolve:r,reject:i}),self.postMessage({type:4,jobId:n,methodName:e,abortable:null!=t,data:o})})).finally((()=>{t&&t.removeEventListener("abort",s)}))}let workerRevisionChecked=!1;function checkWorkerRevision(e){if(!workerRevisionChecked&&e.kernelInfo){workerRevisionChecked=!0;const{revision:o,fullVersion:r}=configuration.kernelInfo,{revision:t,fullVersion:n,version:s}=e.kernelInfo;esriConfig.assetsPath!==esriConfig.defaultAssetsPath&&o!==t&&console.warn(`Version mismatch detected between ArcGIS Maps SDK for JavaScript modules and assets. For more information visit https://bit.ly/3QnsuSo.\nModules version: ${r}\nAssets version: ${n??s}\nAssets path: ${esriConfig.assetsPath}`)}}function messageHandler(e){const o=receiveMessage(e);if(!o)return;const r=o.jobId;switch(o.type){case 1:let n;function t(e){const o=n.connect(e);self.postMessage({type:2,jobId:r,data:o},[o])}"function"==typeof define&&define.amd?require([workerPath],(e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||new Promise((e=>{require([o.modulePath],e)})))).then(t)})):"System"in self&&"function"==typeof System.import?System.import(workerPath).then((e=>(n=e.default,checkWorkerRevision(n),n.loadWorker(o.modulePath)))).then((e=>e||System.import(o.modulePath))).then(t):esriConfig.workers.useDynamicImport?import(workerPath).then((e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||import(o.modulePath))).then(t)})):(self.RemoteClient||importScripts(workerPath),n=self.RemoteClient.default||self.RemoteClient,checkWorkerRevision(n),n.loadWorker(o.modulePath).then(t));break;case 3:if(outgoing.has(r)){const s=outgoing.get(r);outgoing.delete(r),o.error?s.reject(JSON.parse(o.error)):s.resolve(o.data)}}}self.dojoConfig=configuration.loaderConfig,esriConfig.workers.loaderUrl&&(self.importScripts(esriConfig.workers.loaderUrl),"function"==typeof require&&"function"==typeof require.config&&require.config(configuration.loaderConfig)),self.addEventListener("message",messageHandler),self.postMessage({type:0});'.split("{CONFIGURATION}").join(function(){let e;if(null!=g.A.default){const t={...g.A};delete t.default,e=JSON.parse(JSON.stringify(t))}else e=JSON.parse(JSON.stringify(g.A));e.assetsPath=(0,u.s2)(e.assetsPath),e.defaultAssetsPath=e.defaultAssetsPath?(0,u.s2)(e.defaultAssetsPath):void 0,e.request.interceptors=[],e.log.interceptors=[],e.locale=(0,T.JK)(),e.has={"esri-csp-restrictions":(0,i.A)("esri-csp-restrictions"),"esri-2d-debug":!1,"esri-2d-update-debug":(0,i.A)("esri-2d-update-debug"),"esri-2d-log-updating":(0,i.A)("esri-2d-log-updating"),"featurelayer-pbf":(0,i.A)("featurelayer-pbf"),"featurelayer-fast-triangulation-enabled":(0,i.A)("featurelayer-fast-triangulation-enabled"),"featurelayer-simplify-thresholds":(0,i.A)("featurelayer-simplify-thresholds"),"featurelayer-simplify-payload-size-factors":(0,i.A)("featurelayer-simplify-payload-size-factors"),"featurelayer-simplify-mobile-factor":(0,i.A)("featurelayer-simplify-mobile-factor"),"featurelayer-query-max-depth":(0,i.A)("featurelayer-query-max-depth"),"featurelayer-query-pausing-enabled":(0,i.A)("featurelayer-query-pausing-enabled"),"featurelayer-snapshot-enabled":(0,i.A)("featurelayer-snapshot-enabled"),"esri-atomics":(0,i.A)("esri-atomics"),"esri-shared-array-buffer":(0,i.A)("esri-shared-array-buffer"),"esri-tiles-debug":(0,i.A)("esri-tiles-debug"),"esri-workers-arraybuffer-transfer":(0,i.A)("esri-workers-arraybuffer-transfer"),"feature-polyline-generalization-factor":(0,i.A)("feature-polyline-generalization-factor"),"host-webworker":1},e.workers.loaderUrl&&(e.workers.loaderUrl=(0,u.s2)(e.workers.loaderUrl)),e.workers.workerPath?e.workers.workerPath=(0,u.s2)(e.workers.workerPath):e.workers.workerPath=(0,u.s2)((0,m.s)("esri/core/workers/RemoteClient.js")),e.workers.useDynamicImport=!1;const t=g.A.workers.loaderConfig,r=function(e){const t={async:e.async,isDebug:e.isDebug,locale:e.locale,baseUrl:e.baseUrl,has:{...e.has},map:{...e.map},packages:e.packages?.slice()||[],paths:{...A.paths,...e.paths}};return e.hasOwnProperty("async")||(t.async=!0),e.hasOwnProperty("isDebug")||(t.isDebug=!1),e.baseUrl||(t.baseUrl=A.baseUrl),t}({baseUrl:t?.baseUrl,locale:(0,T.JK)(),has:{"csp-restrictions":1,"dojo-test-sniff":0,"host-webworker":1,...t?.has},map:{...t?.map},paths:{...t?.paths},packages:t?.packages||[]}),s={buildDate:w.$,fullVersion:f.ol,revision:w.u};return JSON.stringify({esriConfig:e,loaderConfig:r,kernelInfo:s})}());y=URL.createObjectURL(new Blob([e],{type:"text/javascript"}))}catch(e){M=e||{}}let e;if(y)try{e=new Worker(y,{name:"esri-worker-"+N++})}catch(t){I().warn(P,M),e=new R}else I().warn(P,M),e=new R;return x(e)}();return new U(t,e)}constructor(e,t){this._outJobs=new Map,this._inJobs=new Map,this.worker=e,this.id=t,e.addEventListener("message",this._onMessage.bind(this)),e.addEventListener("error",(e=>{e.preventDefault(),c.A.getLogger("esri.core.workers.WorkerOwner").error(e)}))}terminate(){this.worker.terminate()}async open(e,t={}){const{signal:r}=t,s=(0,_.Jc)();return new Promise(((t,i)=>{const n={resolve:t,reject:i,abortHandle:(0,o.NY)(r,(()=>{this._outJobs.delete(s),this._post({type:C,jobId:s})}))};this._outJobs.set(s,n),this._post({type:D,jobId:s,modulePath:e})}))}_onMessage(e){const t=(0,_.VI)(e);if(t)switch(t.type){case k:this._onOpenedMessage(t);break;case H:this._onResponseMessage(t);break;case C:this._onAbortMessage(t);break;case S:this._onInvokeMessage(t)}}_onAbortMessage(e){const t=this._inJobs,r=e.jobId,s=t.get(r);s&&(s.controller&&s.controller.abort(),t.delete(r))}_onInvokeMessage(e){const{methodName:t,jobId:r,data:s,abortable:i}=e,n=i?new AbortController:null,a=this._inJobs,l=p[t];let c;try{if("function"!=typeof l)throw new TypeError(`${t} is not a function`);c=l.call(null,s,{signal:n?n.signal:null})}catch(e){return void this._post({type:H,jobId:r,error:(0,_.mF)(e)})}(0,o.$X)(c)?(a.set(r,{controller:n,promise:c}),c.then((e=>{a.has(r)&&(a.delete(r),this._post({type:H,jobId:r},e))}),(e=>{a.has(r)&&(a.delete(r),e||(e={message:"Error encountered at method"+t}),(0,o.zf)(e)||this._post({type:H,jobId:r,error:(0,_.mF)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:H,jobId:r},c)}_onOpenedMessage(e){const{jobId:t,data:r}=e,s=this._outJobs.get(t);s&&(this._outJobs.delete(t),(0,h.xt)(s.abortHandle),s.resolve(r))}_onResponseMessage(e){const{jobId:t,error:r,data:i}=e,o=this._outJobs.get(t);o&&(this._outJobs.delete(t),(0,h.xt)(o.abortHandle),r?o.reject(s.A.fromJSON(JSON.parse(r))):o.resolve(i))}_post(e,t,r){return(0,_.u1)(this.worker,e,t,r)}}const O=(0,i.A)("host-browser")?Math.min(navigator.hardwareConcurrency-1,(0,i.A)("workers-pool-size")??8):0;let L=(0,i.A)("esri-mobile")?Math.min(O,3):O;L||(L=(0,i.A)("safari")&&(0,i.A)("mac")?7:2);let G=0;const F=[];async function B(e,t){const r=new n.A,{registryTarget:s,...i}=t;return await r.open(e,i),s&&(0,a.k)(s,r),r}async function j(e,t={}){if("string"!=typeof e)throw new s.A("workers:undefined-module","modulePath is missing");let r=t.strategy||"distributed";if((0,i.A)("host-webworker")&&!(0,i.A)("esri-workers")&&(r="local"),"local"===r){let r=await l.default.loadWorker(e);r||(r=await import(e)),(0,o.Te)(t.signal);const s=t.client||r;return B([l.default.connect(r,t.schedule)],{...t,client:s})}if(await async function(){if(W)return W;X=new AbortController;const e=[];for(let t=0;t<L;t++){const r=U.create(t).then((e=>(F[t]=e,e)));e.push(r)}return W=Promise.all(e),W}(),(0,o.Te)(t.signal),"dedicated"===r){const r=G++%L;return B([await F[r].open(e,t)],t)}if(t.maxNumWorkers&&t.maxNumWorkers>0){const r=Math.min(t.maxNumWorkers,L);if(r<L){const s=new Array(r);for(let i=0;i<r;++i){const r=G++%L;s[i]=F[r].open(e,t)}return B(s,t)}}return B(F.map((r=>r.open(e,t))),t)}let X,W=null},36421:(e,t,r)=>{var s;r.d(t,{p:()=>s}),function(e){e[e.Texture=0]="Texture",e[e.RenderBuffer=1]="RenderBuffer"}(s||(s={}))},72626:(e,t,r)=>{r.d(t,{g:()=>h});var s=r(49186),i=(r(44208),r(44794));(r(53966),r(36708),r(35982)).B;new Set;var o=r(94656),n=r(63907),a=r(36421),l=r(67171);class c extends l.R{constructor(e,t){switch(super(),this.context=e,Object.assign(this,t),this.internalFormat){case n.H0.R16F:case n.H0.R16I:case n.H0.R16UI:case n.H0.R32F:case n.H0.R32I:case n.H0.R32UI:case n.H0.R8_SNORM:case n.H0.R8:case n.H0.R8I:case n.H0.R8UI:this.pixelFormat=n.Ab.RED}}static validate(e,t){return new c(e,t)}}let h=class e{constructor(e,t=null,r=null){if(this.type=a.p.Texture,this._glName=null,this._samplingModeDirty=!1,this._wrapModeDirty=!1,this._wasImmutablyAllocated=!1,this._isCompressing=(0,i.v)(!1),"context"in e)this._descriptor=e,r=t;else{const r=c.validate(e,t);if(!r)throw new s.A("Texture descriptor invalid");this._descriptor=r}this._compressionWorkerAbortController=new AbortController,this._descriptor.target===n.Ap.TEXTURE_CUBE_MAP?this._setDataCubeMap(r):this.setData(r)}get glName(){return this._glName}get descriptor(){return this._descriptor}get usedMemory(){return(0,l.e)(this._descriptor)}get cachedMemory(){return this.usedMemory}get isDirty(){return this._samplingModeDirty||this._wrapModeDirty}get isCompressing(){return this._isCompressing.value}dispose(){this._compressionWorkerAbortController.abort(),this._glName&&this._descriptor.context.instanceCounter.decrement(n.vt.Texture,this),this._descriptor.context.gl&&this._glName&&(this._descriptor.context.unbindTexture(this),this._descriptor.context.gl.deleteTexture(this._glName),this._glName=null)}release(){this.dispose()}resize(e,t){const r=this._descriptor;if(r.width!==e||r.height!==t){if(this._wasImmutablyAllocated)throw new s.A("Immutable textures can't be resized!");r.width=e,r.height=t,this._descriptor.target===n.Ap.TEXTURE_CUBE_MAP?this._setDataCubeMap(null):this.setData(null)}}enableCompression(e){this._descriptor.shouldCompress=e}_setDataCubeMap(e=null){for(let t=n.Ap.TEXTURE_CUBE_MAP_POSITIVE_X;t<=n.Ap.TEXTURE_CUBE_MAP_NEGATIVE_Z;t++)this._setData(e,t)}setData(e){return this.isCompressing&&(this._isCompressing.value=!1,this._compressionWorkerAbortController.abort()),!_(e)&&this._descriptor.internalFormat&&this._descriptor.internalFormat in n.CQ&&(this._descriptor.internalFormat=void 0),this._setData(e),this.isCompressing}compressOnWorker(e){const t=this._descriptor.context?.gl.getExtension("WEBGL_compressed_texture_etc"),r=this._descriptor.context?.gl.getExtension("WEBGL_compressed_texture_s3tc"),s=null,i=function(e,t=!1){const r=document.createElement("canvas"),s=r.getContext("2d");return r.width=e.width,r.height=e.height,t&&(s.translate(0,r.height),s.scale(1,-1)),s.drawImage(e,0,0),s.getImageData(0,0,r.width,r.height).data}(e,this.descriptor.flipped);if(s&&(t||r)){this._isCompressing.value=!0;const o={data:i,width:e.width,height:e.height,hasMipmap:this._descriptor.hasMipmap,hasETC:!!t,hasS3TC:!!r,buffer:[new ArrayBuffer(0)]};s.invoke(o,this._compressionWorkerAbortController.signal).then((e=>{this._descriptor.internalFormat=e.internalFormat,this._setData(e.compressedTexture),this._isCompressing.value=!1})).catch((()=>{this._isCompressing.value=!1}))}}_setData(t,r){const i=this._descriptor.context?.gl;if(!i)return;(0,o.Y2)(i),this._glName||(this._glName=i.createTexture(),this._glName&&this._descriptor.context.instanceCounter.increment(n.vt.Texture,this));const a=this._descriptor,l=r??a.target,c=g(l),h=this._descriptor.context.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);this._descriptor.context.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),d(a),this._configurePixelStorage(),(0,o.Y2)(i);const A=this._deriveInternalFormat();if(m(t)){let e="width"in t?t.width:t.codedWidth,r="height"in t?t.height:t.codedHeight;const s=1;t instanceof HTMLVideoElement&&(e=t.videoWidth,r=t.videoHeight),a.width&&a.height,c&&a.depth,a.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(l,A,a.hasMipmap,e,r,s),this._texImage(l,0,A,e,r,s,t),(0,o.Y2)(i),a.hasMipmap&&(this.generateMipmap(),(0,o.Y2)(i)),a.width||(a.width=e),a.height||(a.height=r),c&&!a.depth&&(a.depth=s)}else{const{width:e,height:r,depth:h}=a;if(null==e||null==r)throw new s.A("Width and height must be specified!");if(c&&null==h)throw new s.A("Depth must be specified!");if(a.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(l,A,a.hasMipmap,e,r,h),_(t)){const o=t.levels,c=f(l,e,r,h),d=Math.min(c,o.length)-1;i.texParameteri(a.target,this._descriptor.context.gl.TEXTURE_MAX_LEVEL,d);const u=A;if(!(u in n.CQ))throw new s.A("Attempting to use compressed data with an uncompressed format!");this._forEachMipmapLevel(((e,t,r,s)=>{const i=o[Math.min(e,o.length-1)];this._compressedTexImage(l,e,u,t,r,s,i)}),d)}else this._texImage(l,0,A,e,r,h,t),(0,o.Y2)(i),a.hasMipmap&&this.generateMipmap()}u(i,this._descriptor),p(i,this._descriptor),function(e,t){const r=e.capabilities.textureFilterAnisotropic;r&&e.gl.texParameterf(t.target,r.TEXTURE_MAX_ANISOTROPY,t.maxAnisotropy??1)}(this._descriptor.context,this._descriptor),(0,o.Y2)(i),this._descriptor.context.bindTexture(h,e.TEXTURE_UNIT_FOR_UPDATES)}updateData(t,r,i,o,n,a,l=0){a||console.error("An attempt to use uninitialized data!"),this._glName||console.error("An attempt to update uninitialized texture!");const c=this._descriptor,h=this._deriveInternalFormat(),{context:d,pixelFormat:u,dataType:p,target:g,isImmutable:f}=c;if(f&&!this._wasImmutablyAllocated)throw new s.A("Cannot update immutable texture before allocation!");const A=d.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES,!0);(r<0||i<0||r+o>c.width||i+n>c.height)&&console.error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();const{gl:E}=d;l&&E.pixelStorei(E.UNPACK_SKIP_ROWS,l),m(a)?E.texSubImage2D(g,t,r,i,o,n,u,p,a):_(a)?E.compressedTexSubImage2D(g,t,r,i,o,n,h,a.levels[t]):E.texSubImage2D(g,t,r,i,o,n,u,p,a),l&&E.pixelStorei(E.UNPACK_SKIP_ROWS,0),d.bindTexture(A,e.TEXTURE_UNIT_FOR_UPDATES)}updateData3D(t,r,i,o,n,a,l,c){c||console.error("An attempt to use uninitialized data!"),this._glName||console.error("An attempt to update uninitialized texture!");const h=this._descriptor,d=this._deriveInternalFormat(),{context:u,pixelFormat:p,dataType:m,isImmutable:f,target:A}=h;if(f&&!this._wasImmutablyAllocated)throw new s.A("Cannot update immutable texture before allocation!");g(A)||console.warn("Attempting to set 3D texture data on a non-3D texture");const E=u.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);u.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),(r<0||i<0||o<0||r+n>h.width||i+a>h.height||o+l>h.depth)&&console.error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();const{gl:b}=u;if(_(c))c=c.levels[t],b.compressedTexSubImage3D(A,t,r,i,o,n,a,l,d,c);else{const e=c;b.texSubImage3D(A,t,r,i,o,n,a,l,p,m,e)}u.bindTexture(E,e.TEXTURE_UNIT_FOR_UPDATES)}generateMipmap(){const t=this._descriptor;if(!t.hasMipmap){if(this._wasImmutablyAllocated)throw new s.A("Cannot add mipmaps to immutable texture after allocation");t.hasMipmap=!0,this._samplingModeDirty=!0,d(t)}t.samplingMode===n.Cj.LINEAR?(this._samplingModeDirty=!0,t.samplingMode=n.Cj.LINEAR_MIPMAP_NEAREST):t.samplingMode===n.Cj.NEAREST&&(this._samplingModeDirty=!0,t.samplingMode=n.Cj.NEAREST_MIPMAP_NEAREST);const r=this._descriptor.context.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);this._descriptor.context.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),this._descriptor.context.gl.generateMipmap(t.target),this._descriptor.context.bindTexture(r,e.TEXTURE_UNIT_FOR_UPDATES)}clearMipmap(){const e=this._descriptor;if(e.hasMipmap){if(this._wasImmutablyAllocated)throw new s.A("Cannot delete mipmaps to immutable texture after allocation");e.hasMipmap=!1,this._samplingModeDirty=!0,d(e)}e.samplingMode===n.Cj.LINEAR_MIPMAP_NEAREST?(this._samplingModeDirty=!0,e.samplingMode=n.Cj.LINEAR):e.samplingMode===n.Cj.NEAREST_MIPMAP_NEAREST&&(this._samplingModeDirty=!0,e.samplingMode=n.Cj.NEAREST)}setSamplingMode(e){e!==this._descriptor.samplingMode&&(this._descriptor.samplingMode=e,this._samplingModeDirty=!0)}setWrapMode(e){e!==this._descriptor.wrapMode&&(this._descriptor.wrapMode=e,d(this._descriptor),this._wrapModeDirty=!0)}applyChanges(){const e=this._descriptor,t=e.context.gl;this._samplingModeDirty&&(u(t,e),this._samplingModeDirty=!1),this._wrapModeDirty&&(p(t,e),this._wrapModeDirty=!1)}_deriveInternalFormat(){if(null!=this._descriptor.internalFormat)return this._descriptor.internalFormat===n.Ab.DEPTH_STENCIL&&(this._descriptor.internalFormat=n.Ab.DEPTH24_STENCIL8),this._descriptor.internalFormat;switch(this._descriptor.dataType){case n.ld.FLOAT:switch(this._descriptor.pixelFormat){case n.Ab.RGBA:return this._descriptor.internalFormat=n.H0.RGBA32F;case n.Ab.RGB:return this._descriptor.internalFormat=n.H0.RGB32F;default:throw new s.A("Unable to derive format")}case n.ld.UNSIGNED_BYTE:switch(this._descriptor.pixelFormat){case n.Ab.RGBA:return this._descriptor.internalFormat=n.H0.RGBA8;case n.Ab.RGB:return this._descriptor.internalFormat=n.H0.RGB8}}return this._descriptor.internalFormat=this._descriptor.pixelFormat===n.Ab.DEPTH_STENCIL?n.Ab.DEPTH24_STENCIL8:this._descriptor.pixelFormat}_configurePixelStorage(){const e=this._descriptor.context.gl,{unpackAlignment:t,flipped:r,preMultiplyAlpha:s}=this._descriptor;e.pixelStorei(e.UNPACK_ALIGNMENT,t),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,r?1:0),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,s?1:0)}_texStorage(e,t,r,i,o,a){const{gl:l}=this._descriptor.context;if(!(t in n.H0))throw new s.A("Immutable textures must have a sized internal format");if(!this._descriptor.isImmutable)return;const c=r?f(e,i,o,a):1;if(g(e)){if(null==a)throw new s.A("Missing depth dimension for 3D texture upload");l.texStorage3D(e,c,t,i,o,a)}else l.texStorage2D(e,c,t,i,o);this._wasImmutablyAllocated=!0}_texImage(e,t,r,i,o,n,a){const l=this._descriptor.context.gl,c=g(e),{isImmutable:h,pixelFormat:d,dataType:u}=this._descriptor;if(h){if(null!=a){const r=a;if(c){if(null==n)throw new s.A("Missing depth dimension for 3D texture upload");l.texSubImage3D(e,t,0,0,0,i,o,n,d,u,r)}else l.texSubImage2D(e,t,0,0,i,o,d,u,r)}}else{const h=a;if(c){if(null==n)throw new s.A("Missing depth dimension for 3D texture upload");l.texImage3D(e,t,r,i,o,n,0,d,u,h)}else l.texImage2D(e,t,r,i,o,0,d,u,h)}}_compressedTexImage(e,t,r,i,o,n,a){const l=this._descriptor.context.gl,c=g(e);if(this._descriptor.isImmutable){if(null!=a)if(c){if(null==n)throw new s.A("Missing depth dimension for 3D texture upload");l.compressedTexSubImage3D(e,t,0,0,0,i,o,n,r,a)}else l.compressedTexSubImage2D(e,t,0,0,i,o,r,a)}else if(c){if(null==n)throw new s.A("Missing depth dimension for 3D texture upload");l.compressedTexImage3D(e,t,r,i,o,n,0,a)}else l.compressedTexImage2D(e,t,r,i,o,0,a)}_forEachMipmapLevel(e,t=1/0){let{width:r,height:i,depth:o,hasMipmap:a,target:l}=this._descriptor;const c=l===n.Ap.TEXTURE_3D;if(null==r||null==i||c&&null==o)throw new s.A("Missing texture dimensions for mipmap calculation");for(let s=0;e(s,r,i,o),a&&(1!==r||1!==i||c&&1!==o)&&!(s>=t);++s)r=Math.max(1,r>>1),i=Math.max(1,i>>1),c&&(o=Math.max(1,o>>1))}};function d(e){(null!=e.width&&e.width<0||null!=e.height&&e.height<0||null!=e.depth&&e.depth<0)&&console.error("Negative dimension parameters are not allowed!")}function u(e,t){let r=t.samplingMode,s=t.samplingMode;r===n.Cj.LINEAR_MIPMAP_NEAREST||r===n.Cj.LINEAR_MIPMAP_LINEAR?(r=n.Cj.LINEAR,t.hasMipmap||(s=n.Cj.LINEAR)):r!==n.Cj.NEAREST_MIPMAP_NEAREST&&r!==n.Cj.NEAREST_MIPMAP_LINEAR||(r=n.Cj.NEAREST,t.hasMipmap||(s=n.Cj.NEAREST)),e.texParameteri(t.target,e.TEXTURE_MAG_FILTER,r),e.texParameteri(t.target,e.TEXTURE_MIN_FILTER,s)}function p(e,t){"number"==typeof t.wrapMode?(e.texParameteri(t.target,e.TEXTURE_WRAP_S,t.wrapMode),e.texParameteri(t.target,e.TEXTURE_WRAP_T,t.wrapMode)):(e.texParameteri(t.target,e.TEXTURE_WRAP_S,t.wrapMode.s),e.texParameteri(t.target,e.TEXTURE_WRAP_T,t.wrapMode.t))}function _(e){return null!=e&&"type"in e&&"compressed"===e.type}function m(e){return null!=e&&!_(e)&&!function(e){return null!=e&&"byteLength"in e}(e)}function g(e){return e===n.Ap.TEXTURE_3D||e===n.Ap.TEXTURE_2D_ARRAY}function f(e,t,r,s=1){let i=Math.max(t,r);return e===n.Ap.TEXTURE_3D&&(i=Math.max(i,s)),Math.floor(Math.log2(i))+1}h.TEXTURE_UNIT_FOR_UPDATES=0},67171:(e,t,r)=>{r.d(t,{R:()=>o,e:()=>n});var s=r(63907),i=r(42293);class o{constructor(e=0,t=e){this.width=e,this.height=t,this.target=s.Ap.TEXTURE_2D,this.pixelFormat=s.Ab.RGBA,this.dataType=s.ld.UNSIGNED_BYTE,this.samplingMode=s.Cj.LINEAR,this.wrapMode=s.pF.REPEAT,this.maxAnisotropy=1,this.flipped=!1,this.hasMipmap=!1,this.isOpaque=!1,this.unpackAlignment=4,this.preMultiplyAlpha=!1,this.shouldCompress=!1,this.depth=1,this.isImmutable=!1}}function n(e){return e.width<=0||e.height<=0?0:Math.round(e.width*e.height*e.depth*(e.hasMipmap?4/3:1)*(null==e.internalFormat?4:(0,i.IB)(e.internalFormat))*(e.target===s.Ap.TEXTURE_CUBE_MAP?6:1))}},42293:(e,t,r)=>{r.d(t,{Hi:()=>l,IB:()=>c,yu:()=>a}),r(44208);var s=r(94656),i=r(63907),o=r(62298);function n(e){const t=e.gl;switch(t.getError()){case t.NO_ERROR:return null;case t.INVALID_ENUM:return"An unacceptable value has been specified for an enumerated argument";case t.INVALID_VALUE:return"An unacceptable value has been specified for an argument";case t.INVALID_OPERATION:return"The specified command is not allowed for the current state";case t.INVALID_FRAMEBUFFER_OPERATION:return"The currently bound framebuffer is not framebuffer complete";case t.OUT_OF_MEMORY:return"Not enough memory is left to execute the command";case t.CONTEXT_LOST_WEBGL:return"WebGL context is lost"}return"Unknown error"}function a(e,t,r,i,a=0){const l=e.gl;e.bindBuffer(r);for(const r of i){const i=t.get(r.name);if(null==i){console.warn(`There is no location for vertex attribute '${r.name}' defined.`);continue}const c=a*r.stride;if(r.count<=4)l.vertexAttribPointer(i,r.count,r.type,r.normalized,r.stride,r.offset+c),l.enableVertexAttribArray(i),r.divisor>0&&e.gl.vertexAttribDivisor(i,r.divisor);else if(9===r.count)for(let t=0;t<3;t++)l.vertexAttribPointer(i+t,3,r.type,r.normalized,r.stride,r.offset+12*t+c),l.enableVertexAttribArray(i+t),r.divisor>0&&e.gl.vertexAttribDivisor(i+t,r.divisor);else if(16===r.count)for(let t=0;t<4;t++)l.vertexAttribPointer(i+t,4,r.type,r.normalized,r.stride,r.offset+16*t+c),l.enableVertexAttribArray(i+t),r.divisor>0&&e.gl?.vertexAttribDivisor(i+t,r.divisor);else console.error("Unsupported vertex attribute element count: "+r.count);if((0,s.en)()){const t=n(e),s=(0,o._)(r.type),i=r.offset,a=Math.round(s/i)!==s/i?`. Offset not a multiple of stride. DataType requires ${s} bytes, but descriptor has an offset of ${i}`:"";t&&console.error(`Unable to bind vertex attribute "${r.name}" with baseInstanceOffset ${c}${a}:`,t,r)}}}function l(e,t,r,s){const o=e.gl;e.bindBuffer(r);for(const r of s){const s=t.get(r.name);if(r.count<=4)o.disableVertexAttribArray(s),r.divisor&&r.divisor>0&&e.gl?.vertexAttribDivisor(s,0);else if(9===r.count)for(let t=0;t<3;t++)o.disableVertexAttribArray(s+t),r.divisor&&r.divisor>0&&e.gl?.vertexAttribDivisor(s+t,0);else if(16===r.count)for(let t=0;t<4;t++)o.disableVertexAttribArray(s+t),r.divisor&&r.divisor>0&&e.gl?.vertexAttribDivisor(s+t,0);else console.error("Unsupported vertex attribute element count: "+r.count)}e.unbindBuffer(i.NZ.ARRAY_BUFFER)}function c(e){switch(e){case i.Ab.ALPHA:case i.Ab.LUMINANCE:case i.Ab.RED:case i.Ab.RED_INTEGER:case i.H0.R8:case i.H0.R8I:case i.H0.R8UI:case i.H0.R8_SNORM:case i.yQ.STENCIL_INDEX8:return 1;case i.Ab.LUMINANCE_ALPHA:case i.Ab.RG:case i.Ab.RG_INTEGER:case i.H0.RGBA4:case i.H0.R16F:case i.H0.R16I:case i.H0.R16UI:case i.H0.RG8:case i.H0.RG8I:case i.H0.RG8UI:case i.H0.RG8_SNORM:case i.H0.RGB565:case i.H0.RGB5_A1:case i.yQ.DEPTH_COMPONENT16:return 2;case i.Ab.DEPTH_COMPONENT:case i.Ab.RGB:case i.Ab.RGB_INTEGER:case i.H0.RGB8:case i.H0.RGB8I:case i.H0.RGB8UI:case i.H0.RGB8_SNORM:case i.H0.SRGB8:case i.yQ.DEPTH_COMPONENT24:return 3;case i.Ab.DEPTH_STENCIL:case i.Ab.DEPTH24_STENCIL8:case i.Ab.RGBA:case i.Ab.RGBA_INTEGER:case i.H0.RGBA8:case i.H0.R32F:case i.H0.R11F_G11F_B10F:case i.H0.RG16F:case i.H0.R32I:case i.H0.R32UI:case i.H0.RG16I:case i.H0.RG16UI:case i.H0.RGBA8I:case i.H0.RGBA8UI:case i.H0.RGBA8_SNORM:case i.H0.SRGB8_ALPHA8:case i.H0.RGB9_E5:case i.H0.RGB10_A2UI:case i.H0.RGB10_A2:case i.yQ.DEPTH_STENCIL:case i.yQ.DEPTH_COMPONENT32F:case i.yQ.DEPTH24_STENCIL8:return 4;case i.yQ.DEPTH32F_STENCIL8:return 5;case i.H0.RGB16F:case i.H0.RGB16I:case i.H0.RGB16UI:return 6;case i.H0.RG32F:case i.H0.RG32I:case i.H0.RG32UI:case i.H0.RGBA16F:case i.H0.RGBA16I:case i.H0.RGBA16UI:return 8;case i.H0.RGB32F:case i.H0.RGB32I:case i.H0.RGB32UI:return 12;case i.H0.RGBA32F:case i.H0.RGBA32I:case i.H0.RGBA32UI:return 16;case i.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT:case i.CQ.COMPRESSED_RGBA_S3TC_DXT1_EXT:return.5;case i.CQ.COMPRESSED_RGBA_S3TC_DXT3_EXT:case i.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT:return 1;case i.CQ.COMPRESSED_R11_EAC:case i.CQ.COMPRESSED_SIGNED_R11_EAC:case i.CQ.COMPRESSED_RGB8_ETC2:case i.CQ.COMPRESSED_SRGB8_ETC2:case i.CQ.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:case i.CQ.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:return.5;case i.CQ.COMPRESSED_RG11_EAC:case i.CQ.COMPRESSED_SIGNED_RG11_EAC:case i.CQ.COMPRESSED_RGBA8_ETC2_EAC:case i.CQ.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:return 1}return 0}},94656:(e,t,r)=>{r.d(t,{Xc:()=>c,Y2:()=>h,en:()=>l});var s=r(49186),i=r(44208),o=r(53966);const n=()=>o.A.getLogger("esri.views.webgl.checkWebGLError"),a=!!(0,i.A)("enable-feature:webgl-debug");function l(){return a}function c(){return a}function h(e){if(l()){const t=e.getError();if(t){const r=function(e,t){switch(t){case e.INVALID_ENUM:return"Invalid Enum. An unacceptable value has been specified for an enumerated argument.";case e.INVALID_VALUE:return"Invalid Value. A numeric argument is out of range.";case e.INVALID_OPERATION:return"Invalid Operation. The specified command is not allowed for the current state.";case e.INVALID_FRAMEBUFFER_OPERATION:return"Invalid Framebuffer operation. The currently bound framebuffer is not framebuffer complete when trying to render to or to read from it.";case e.OUT_OF_MEMORY:return"Out of memory. Not enough memory is left to execute the command.";case e.CONTEXT_LOST_WEBGL:return"WebGL context has been lost";default:return"Unknown error"}}(e,t),i=(new Error).stack;n().error(new s.A("webgl-error","WebGL error occurred",{message:r,stack:i}))}}}},62298:(e,t,r)=>{r.d(t,{_:()=>i});var s=r(63907);function i(e){switch(e){case s.pe.BYTE:case s.pe.UNSIGNED_BYTE:return 1;case s.pe.SHORT:case s.pe.UNSIGNED_SHORT:case s.pe.HALF_FLOAT:return 2;case s.pe.FLOAT:case s.pe.INT:case s.pe.UNSIGNED_INT:return 4}}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3812],{73812:(e,t,a)=>{a.r(t),a.d(t,{default:()=>I});var i=a(90237),n=(a(59456),a(67996)),o=a(5503),s=a(49186),r=a(53966),l=a(91869),h=a(92071),d=a(74887),c=a(36708),u=a(10107),p=(a(44208),a(87811),a(40608)),y=a(35666),g=a(4146),m=a(90708),f=a(89270),L=a(80340),M=a(70643),b=a(85342),w=a(69860),k=a(6080),C=a(63074),T=a(16131),N=a(25036),x=a(8460),D=a(71402),v=a(5443),_=a(86738),A=a(82799);let E=class extends((0,T.q)((0,C.dM)((0,N.j)((0,h.P)(g.A))))){constructor(e){if(super(e),this.dataPreloadedInLocalCache=!1,this.defaultLinkChartConfig=null,this.membershipModified=!0,this._currentLinkChartConfig={layoutMode:"radial-root-centric"},this._graphTypeLookup=new Map,this.dataManager=null,this.knowledgeGraph=null,this.layers=new(o.A.ofType(M.A)),this.entityLinkChartDiagramLookup=new Map,this.relationshipLinkChartDiagramLookup=new Map,this.linkChartExtent=new v.A({xmin:-1e-7,ymin:-1e-7,xmax:1e-7,ymax:1e-7}),this.memberEntityTypes=null,this.memberRelationshipTypes=null,this.operationalLayerType="LinkChartLayer",this.sublayerIdsCache=new Map,this.tables=new(o.A.ofType(M.A)),this.type="link-chart",this.chronologicalAuxiliaryGraphics=null,this._originalInclusionList=e?.inclusionModeDefinition,e?.dataPreloadedInLocalCache&&!e?.inclusionModeDefinition)throw new s.A("knowledge-graph:linkchart-layer-constructor","If creating a link chart composite layer and configured that data is already loaded in the cache, you must specify an inclusion list so the Composite Layer knows what records belong to it");this.addHandles((0,c.wB)((()=>this.layers.concat(this.tables)),((e,t)=>this._handleSublayersChange(e,t)),c.OH))}normalizeCtorArgs(e){if(!e)return{};const{url:t,title:a,dataPreloadedInLocalCache:i,defaultLinkChartConfig:n}=e;return{url:t,title:a,dataPreloadedInLocalCache:i,defaultLinkChartConfig:n}}_initializeLayerProperties(e){if(!this.title&&this.url){const e=this.url.split("/");this.title=e[e.length-2]}const t=new Set;let a=[],i=[];if(e.inclusionModeDefinition&&(!e.inclusionModeDefinition.namedTypeDefinitions||e.inclusionModeDefinition.namedTypeDefinitions.size<1))throw new s.A("knowledge-graph:composite-layer-constructor","If an explicit inclusion definition is defined, at least one namedTypeDefinition must also be defined");e.inclusionModeDefinition?.generateAllSublayers?(a=e.knowledgeGraph.dataModel.entityTypes??[],i=e.knowledgeGraph.dataModel.relationshipTypes??[]):e.inclusionModeDefinition?.namedTypeDefinitions&&e.inclusionModeDefinition?.namedTypeDefinitions.size>0?e.inclusionModeDefinition?.namedTypeDefinitions.forEach(((n,o)=>{const s=this._graphTypeLookup.get(o);if(!s)return r.A.getLogger(this).warn(`A named type, ${o}, was in the inclusion list that wasn't in the data model and will be removed`),void e.inclusionModeDefinition?.namedTypeDefinitions.delete(o);"relationship"===s.type?t.has(o)||(t.add(o),i.push(s)):"entity"===s.type?t.has(o)||(t.add(o),a.push(s)):(r.A.getLogger(this).warn(`A named type, ${o}, was in the inclusion list that wasn't properly modeled and will be removed`),e.inclusionModeDefinition?.namedTypeDefinitions.delete(o))})):(a=e.knowledgeGraph.dataModel.entityTypes??[],i=e.knowledgeGraph.dataModel.relationshipTypes??[]);const n=new L.P({knowledgeGraph:e.knowledgeGraph,inclusionModeDefinition:e.inclusionModeDefinition});this.knowledgeGraph=e.knowledgeGraph,this.memberEntityTypes=a,this.memberRelationshipTypes=i,this.dataManager=n}load(e){const t=async()=>{const e=[],t=[];this.loadLayerAssumingLocalCache(),await(0,b.qN)(this),this.dataManager.inclusionModeDefinition&&(this.dataManager.inclusionModeDefinition.generateAllSublayers=!1),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.forEach((e=>{e.useAllData=!1})),await this._initializeDiagram(),this.layers.forEach((a=>{t.push(a.refreshCachedQueryEngine()),e.push(new Promise((e=>{a.on("layerview-create",(()=>{e(null)}))})))})),this.tables.forEach((e=>{t.push(e.refreshCachedQueryEngine())})),await Promise.all(t)};return this.addResolvingPromise(new Promise((a=>{(0,D.fetchKnowledgeGraph)(this.url).then((async i=>{i.dataModel.entityTypes?.forEach((e=>{e.name&&this._graphTypeLookup.set(e.name,e)})),i.dataModel.relationshipTypes?.forEach((e=>{e.name&&this._graphTypeLookup.set(e.name,e)}));const o=this.parent?.linkChartProperties;if(o?.originIdOf("entitiesUrl")===y.Gr.LINK_CHART&&(this.membershipModified=!1,this._originalInclusionList=await n.XW.fetchAndConvertSerializedLinkChart({entitiesUrl:this.parent.linkChartProperties.entitiesUrl,relationshipsUrl:this.parent.linkChartProperties.relationshipsUrl}),this._alignLayersDataModelAndInclusionDefinition(i.dataModel),this.defaultLinkChartConfig={layoutOptions:o?.layoutSettings?(0,k.o3)(o.layoutSettings,void 0):void 0,layoutMode:(0,k.k5)(o.layoutType)}),this._initializeLayerProperties({knowledgeGraph:i,inclusionModeDefinition:this._originalInclusionList}),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.size||(this.dataManager.inclusionModeDefinition={generateAllSublayers:!1,namedTypeDefinitions:new Map},this.dataManager.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.set(e.name,{useAllData:!0})})),this.dataManager.knowledgeGraph.dataModel.relationshipTypes?.forEach((e=>{e.name&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.set(e.name,{useAllData:!0})}))),this.dataPreloadedInLocalCache){const e=w.A.getInstance();for(const[t,a]of this.dataManager.inclusionModeDefinition?.namedTypeDefinitions??[])for(const i of a.members?.values()??[]){const a=e.readFromStoreById(`${t}__${i.id}`);a&&(0,l.tE)(this.dataManager.sublayerCaches,t,(()=>new Map)).set(i.id,a)}await t()}else{const a="geographic-organic-standard"===this.defaultLinkChartConfig?.layoutMode;this.addResolvingPromise(this.dataManager.refreshCacheContent(void 0,!1,a,!0).then((async()=>{(0,d.Te)(e),await t()})))}a(null)}))}))),Promise.resolve(this)}set inclusionModeDefinition(e){"loaded"!==this.loadStatus&&"failed"!==this.loadStatus?this._set("inclusionModeDefinition",e):r.A.getLogger(this).error("#inclusionModeDefinition","inclusionModeDefinition cannot be changed after the layer is loaded.")}async addRecords(e,t){let a=[];t?.cascadeAddRelationshipEndNodes&&this.dataManager.knowledgeGraph.dataModel&&(a=await(0,k.aq)(e,this.dataManager.knowledgeGraph));const i=e.concat(a).filter((e=>!this.sublayerIdsCache.get(e.typeName)?.has(e.id)));i.length>0&&(this.membershipModified=!0),await this._handleNewRecords(i,t)}async removeRecords(e,{cascadeRemoveRelationships:t=!0,recalculateLayout:a=!1,overrideMembershipCheck:i=!1}={cascadeRemoveRelationships:!0,recalculateLayout:!1,overrideMembershipCheck:!1}){let n=[];for(const t of e)(i||!1===this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.get(t.typeName)?.useAllData&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.get(t.typeName)?.members?.has(t.id))&&n.push(t);if(t){const e=new Set,t=[];for(const t of n)if(this.dataManager.nodeConnectionsLookup.has(t.id))for(const a of this.dataManager.nodeConnectionsLookup.get(t.id))e.add(a);for(const a of e)if(this.dataManager.memberIdTypeLookup.has(a))for(const e of this.dataManager.memberIdTypeLookup.get(a))this.dataManager.relationshipTypeNames.has(e)&&t.push({id:a,typeName:e});n=n.concat(t)}this.dataManager.removeFromLayer(n);for(const e of n)this.sublayerIdsCache.get(e.typeName)?.delete(e.id),this.dataManager.relationshipTypeNames.has(e.typeName)?this.relationshipLinkChartDiagramLookup.delete(e.id):this.entityLinkChartDiagramLookup.delete(e.id);a&&await this._calculateLayoutWithSublayerTimeInfo(this._currentLinkChartConfig.layoutMode,this._currentLinkChartConfig.layoutOptions),n.length>0&&(this.membershipModified=!0);const o=[];return this.layers.forEach((e=>{o.push(e.refreshCachedQueryEngine())})),await Promise.all(o),this._refreshNamedTypes(),n}async expand(e,t){let a=[];try{const i=await this.dataManager.getConnectedRecordIds(e,t?.relationshipTypeNames,t);a=i.filter((e=>!this.sublayerIdsCache.get(e.typeName)?.has(e.id))),await this._handleNewRecords(i,t),i.length>0&&(this.membershipModified=!0),(0,d.Te)(t?.signal)}catch(e){throw(0,d.zf)(e)&&a.length>0&&this.removeRecords(a,{overrideMembershipCheck:!0}),e}return{records:a}}loadLayerAssumingLocalCache(){const e=[...this.memberRelationshipTypes,...this.memberEntityTypes];this.originIdOf("layers")===y.Gr.DEFAULTS?this._createSublayers(e,this.layers,(e=>!!e.geometryType)):this._updateSublayers(e,this.layers),this.originIdOf("tables")===y.Gr.DEFAULTS?this._createSublayers(e,this.tables,(e=>!e.geometryType)):this._updateSublayers(e,this.tables),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.forEach(((e,t)=>{const a=(0,l.tE)(this.sublayerIdsCache,t,(()=>new Set));e.members?.forEach((({id:e,linkChartLocation:i})=>{if(a.add(e),i){const a="coords"in i&&"lengths"in i?i:(0,m.Ux)(i);this.dataManager.relationshipTypeNames.has(t)?this.relationshipLinkChartDiagramLookup.set(e,a):this.entityLinkChartDiagramLookup.set(e,a)}}))}))}async calculateLinkChartLayout(e="radial-root-centric",t){const a=[],i=[],n=[];this.dataManager.sublayerCaches.forEach(((e,t)=>{this.dataManager.entityTypeNames.has(t)?e.forEach((e=>{a.push({typeName:t,feature:e})})):this.dataManager.relationshipTypeNames.has(t)&&e.forEach((e=>{i.push({typeName:t,feature:e})}))})),this.entityLinkChartDiagramLookup=new Map,this.relationshipLinkChartDiagramLookup=new Map;const o=new Map,h=new Map,c=new Map,u=new Map,p=new Uint8Array(a.length),y=new Float64Array(a.length),g=new Float64Array(a.length),f=new Float64Array(a.length),L=new Float64Array(a.length),M=new Uint32Array(i.length),w=new Uint32Array(i.length),k=new Float64Array(i.length),C=new Float64Array(i.length),T=[],N=new v.A({xmin:-1e-7,ymin:-1e-7,xmax:1e-7,ymax:1e-7});let D,E="organic-standard",I=0,S=0;const R=x.i6.apply;switch(E="geographic-organic-standard"===e?"organic-standard":e,E){case"organic-standard":D=x.pM.apply;break;case"organic-community":D=x.Tu.apply;break;case"hierarchical-bottom-to-top":D=x.$C.apply;break;case"radial-root-centric":D=x.vJ.apply;break;case"tree-left-to-right":D=x.Xq.apply;break;default:D=x.Wg.apply}let G=!1;a.forEach((({typeName:a,feature:i})=>{if("chronological-mono-timeline"!==e&&"chronological-multi-timeline"!==e&&t?.lockedNodeLocations?.has(i.attributes[b.dr])){"geographic-organic-standard"===e&&this.dataManager.geographicLookup.has(a)?p[I]=x.tx.IsGeographic:p[I]=x.tx.None;const n=t.lockedNodeLocations.get(i.attributes[b.dr]);y[I]=n.x,g[I]=n.y}else if("geographic-organic-standard"===e&&this.dataManager.geographicLookup.has(a)){p[I]=x.tx.IsGeographic;let e=null;const t=i.attributes[this.dataManager.geographicLookup.get(a).name],n=this.dataManager.geographicLookup.get(a)?.geometryType;switch(n){case"esriGeometryPoint":y[I]=t?.x,g[I]=t?.y;break;case"esriGeometryPolygon":e=t?.centroid,null!=e?.x&&null!=e?.y?(y[I]=e.x,g[I]=e.y):p[I]=x.tx.IsMovable;break;case"esriGeometryPolyline":case"esriGeometryMultipoint":e=t?.extent?.center,null!=e?.x&&null!=e?.y?(y[I]=e.x,g[I]=e.y):p[I]=x.tx.IsMovable;break;default:p[I]=x.tx.IsMovable}(null==y[I]||null==g[I]||Number.isNaN(y[I])||Number.isNaN(g[I]))&&(p[I]=x.tx.IsMovable,y[I]=0,g[I]=0)}else if("chronological-mono-timeline"===e||"chronological-multi-timeline"===e){!G&&t?.lockedNodeLocations?.has(i.attributes[b.dr])&&(G=!0);const e=t?.timeInfoByTypeName?.get(a),n=e?.startField,o=n&&e?.startField?i.attributes[n]:null;f[I]=o?new Date(o).getTime():NaN;const s=e?.endField,r=s&&e?.endField?i.attributes[s]:null;L[I]=r?new Date(r).getTime():NaN,y[I]=0,g[I]=0,p[I]=x.tx.IsMovable}else p[I]=x.tx.IsMovable,y[I]=0,g[I]=0;u.set(i.attributes[b.dr],I),T[I]={feature:i,typeName:a},I++})),G&&r.A.getLogger(this).warn("Locked node locations are not supported for chronological layout at this time. Requested node locations were ignored");let P=!1;const F=new Map;i.forEach((a=>{const i=a.feature.attributes[b.Cz],o=a.feature.attributes[b.KQ],s=u.get(i),r=u.get(o),l=t?.timeInfoByTypeName?.get(a.typeName),h=t?.timeInfoByTypeName?l?.startField:null,d=h?a.feature.attributes[h]:null,c=l?.endField,p=c?a.feature.attributes[c]:null;if(void 0!==s&&void 0!==r){let t=i+"-"+o;"chronological-mono-timeline"!==e&&"chronological-multi-timeline"!==e||(t=t+"-"+d+"-"+p);const l=F.get(t),h=l?.has(a.typeName);h||(M[S]=s,w[S]=r,"chronological-mono-timeline"!==e&&"chronological-multi-timeline"!==e||(k[S]=d?new Date(d).getTime():NaN,C[S]=p?new Date(p).getTime():NaN),void 0===l?F.set(t,new Map([[a.typeName,S]])):l.set(a.typeName,S),S++),n.push(a)}else P=!0,this.relationshipLinkChartDiagramLookup.set(i,null)})),P&&r.A.getLogger(this).warn("A relationship is a member of this layer that has either origin or destination entity nodes that are not members. The diagram geometry will be set to null");const z=this._validateLayoutSettings(e,t),B=this._convertLayoutSettingsToCalculationSettings(z);await(0,x.Hh)();let Z=x.JT.Error,U=null;if("chronological-mono-timeline"===e||"chronological-multi-timeline"===e){let a;({status:Z,links:U,graphics:a}=R((()=>t?.signal?.aborted??!1),p,y,g,f,L,M.subarray(0,S),w.subarray(0,S),k.subarray(0,S),C.subarray(0,S),"chronological-multi-timeline"===e,t?.chronologicalLayoutSettings??{})),Z===x.JT.Success&&(this.chronologicalAuxiliaryGraphics=a)}else({status:Z,links:U}=D((()=>t?.signal?.aborted??!1),p,y,g,M.subarray(0,S),w.subarray(0,S),B.computationBudgetTime,B.idealEdgeLengthMultiplier,B.repulsionRadiusMultiplier));if((0,d.Te)(t?.signal),Z===x.JT.Error)throw new s.A("knowledge-graph:layout-failed","Attempting to arrange the records in the specified layout failed");if(Z===x.JT.Canceled)throw(0,d.NK)();for(let e=0;e<T.length;e++){if(g[e]>84.9999?g[e]=84.9999:g[e]<-84.9999&&(g[e]=-84.9999),y[e]>179.9999?y[e]=179.9999:y[e]<-179.9999&&(y[e]=-179.9999),T[e].feature.attributes[b.T1]=new _.A(y[e],g[e]),o.has(T[e].typeName)){const t=o.get(T[e].typeName);t?.set(T[e].feature.attributes[b.dr],T[e].feature)}else{const t=new Map;t.set(T[e].feature.attributes[b.dr],T[e].feature),o.set(T[e].typeName,t)}c.set(T[e].feature.attributes[b.dr],T[e].feature);const t=(0,m.Ux)(T[e].feature.attributes[b.T1]);this.entityLinkChartDiagramLookup.set(T[e].feature.attributes[b.dr],T[e].feature.attributes[b.T1]?t:null);const a=(0,l.tE)(this.dataManager.inclusionModeDefinition.namedTypeDefinitions,T[e].typeName,(()=>({useAllData:!1,members:new Map})));(0,l.tE)(a.members,T[e].feature.attributes[b.dr],(()=>({id:T[e].feature.attributes[b.dr],linkChartLocation:void 0}))).linkChartLocation=T[e].feature.attributes[b.T1],T[e].feature.attributes[b.T1].x<N.xmin&&(N.xmin=T[e].feature.attributes[b.T1].x),T[e].feature.attributes[b.T1].x>N.xmax&&(N.xmax=T[e].feature.attributes[b.T1].x),T[e].feature.attributes[b.T1].y<N.ymin&&(N.ymin=T[e].feature.attributes[b.T1].y),T[e].feature.attributes[b.T1].y>N.ymax&&(N.ymax=T[e].feature.attributes[b.T1].y)}if(this.linkChartExtent.xmin=N.xmin,this.linkChartExtent.xmax=N.xmax,this.linkChartExtent.ymin=N.ymin,this.linkChartExtent.ymax=N.ymax,!U)throw new s.A("knowledge-graph:layout-failed","Attempting to retrieve link geometry from diagram engine failed");const O=new Map,j=new Map,W=new Map,Q=new Set;for(let a=0;a<n.length;a++){const i=[],o=n[a],s=o.feature.attributes[b.Cz],d=o.feature.attributes[b.KQ];let p=s+"-"+d;if("chronological-mono-timeline"===e||"chronological-multi-timeline"===e){const e=t?.timeInfoByTypeName?.get(o.typeName),a=t?.timeInfoByTypeName?e?.startField:null,i=a?o.feature.attributes[a]:null,n=e?.endField;p+="-"+i+"-"+(n?o.feature.attributes[n]:null)}const y=F.get(p).get(o.typeName),g=0===y?0:U?.vertexEndIndex[y-1];if(!Q.has(y)){if(Q.add(y),U.types[y]===x.J.Recursive){const e=[U.vertices[2*g],U.vertices[2*g+1]],t=[U.vertices[2*(g+1)],U.vertices[2*(g+1)+1]],a=[.5*(e[0]+t[0]),.5*(e[1]+t[1])],n=[a[0]-e[0],a[1]-e[1]],o=[a[0]+n[1],a[1]-n[0]],s=[a[0]-n[1],a[1]+n[0]];i.push(e),i.push(o),i.push(t),i.push(s),i.push(e)}else{if(U.types[y]!==x.J.Regular){r.A.getLogger(this).warn("A relationship generated an unsupported link geometry type. It will not be rendered");continue}for(let e=g;e<U.vertexEndIndex[y];e++)i.push([U.vertices[2*e],U.vertices[2*e+1]])}if("chronological-mono-timeline"!==e&&"chronological-multi-timeline"!==e){const e=T[u.get(s)]?.feature.attributes[b.T1],t=T[u.get(d)]?.feature.attributes[b.T1];i[0][0]===e.x&&i[0][1]===e.y||(i[0]=[e.x,e.y]),i[i.length-1][0]===t.x&&i[i.length-1][1]===t.y||(i[i.length-1]=[t.x,t.y])}for(let e=1;e<i.length-1;e++)i[e][1]>85.5?i[e][1]=85.5:i[e][1]<-85.5&&(i[e][1]=-85.5),i[e][0]>179.9999?i[e][0]=179.9999:i[e][0]<-179.9999&&(i[e][0]=-179.9999);O.has(p)?O.get(p).push(i):O.set(p,[i])}const f=O.get(p);j.has(p)||(j.set(p,new Map),W.set(p,new Map));const L=j.get(p),M=W.get(p);L.has(o.typeName)||(L.set(o.typeName,f.shift()),M.set(o.typeName,0));const w=L.get(o.typeName);M.set(o.typeName,M.get(o.typeName)+1);const k=new A.A({paths:[w]});if(o.feature.attributes[b.T1]=k,h.has(o.typeName)){const e=h.get(o.typeName);e?.set(o.feature.attributes[b.dr],o.feature)}else{const e=new Map;e.set(o.feature.attributes[b.dr],o.feature),h.set(o.typeName,e)}c.set(o.feature.attributes[b.dr],o.feature);const C=(0,m.Ux)(o.feature.attributes[b.T1]);this.relationshipLinkChartDiagramLookup.set(o.feature.attributes[b.dr],o.feature.attributes[b.T1]?C:null);const N=(0,l.tE)(this.dataManager.inclusionModeDefinition.namedTypeDefinitions,o.typeName,(()=>({useAllData:!1,members:new Map})));(0,l.tE)(N.members,o.feature.attributes[b.dr],(()=>({id:o.feature.attributes[b.dr],linkChartLocation:void 0}))).linkChartLocation=o.feature.attributes[b.T1]}for(const e of n)e.feature.attributes[b.M1]=W.get(e.feature.attributes[b.Cz]+"-"+e.feature.attributes[b.KQ])?.get(e.typeName)??null;return this._currentLinkChartConfig={layoutMode:e,layoutOptions:z},{nodes:o,links:h,idMap:c}}async applyNewLinkChartLayout(e="radial-root-centric",t){const a=[];await this._calculateLayoutWithSublayerTimeInfo(e,t),this.layers.forEach((e=>{a.push(e.refreshCachedQueryEngine())})),this.membershipModified=!0,await Promise.all(a),this._refreshNamedTypes()}getCurrentNodeLocations(){const e=new Map;for(const[t,a]of this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.entries()??[])this.dataManager.relationshipTypeNames.has(t)||a?.members?.forEach((t=>{const a=t.linkChartLocation;let i;const n=t.id;a&&(i="x"in a?{x:a.x,y:a.y}:{x:a.coords[0],y:a.coords[1]},e.set(n,new _.A({x:i.x,y:i.y})))}));return e}async refreshLinkChartCache(e){await this.dataManager.refreshCacheContent(e);const t=[];this.layers.forEach((e=>{t.push(e.refreshCachedQueryEngine())})),await Promise.all(t),this._refreshNamedTypes()}async connectBetweenEntities(e,t){if(!e.length)return{records:[]};let a=[];try{let i=[];for(const e of this.dataManager.relationshipTypeNames){const t=this.sublayerIdsCache.get(e);t&&(i=i.concat(Array.from(t.keys())))}a=await this.dataManager.getRelationshipsBetweenNodes(e,i,t),await this._handleNewRecords(a,t),(0,d.Te)(t)}catch(e){throw(0,d.zf)(e)&&this.removeRecords(a),e}return{records:a}}async connectFromEntities(e,t){if(!e.length)return{records:[]};let a=[];try{let i=[];for(const e of this.dataManager.relationshipTypeNames){const t=this.sublayerIdsCache.get(e);t&&(i=i.concat(Array.from(t.keys())))}let n=[];for(const e of this.dataManager.entityTypeNames){const t=this.sublayerIdsCache.get(e);t&&(n=n.concat(Array.from(t)))}a=await this.dataManager.getRelationshipsFromNodes(e,n,i,t),await this._handleNewRecords(a,t),a.length>0&&(this.membershipModified=!0),(0,d.Te)(t)}catch(e){throw(0,d.zf)(e)&&this.removeRecords(a),e}return{records:a}}getCurrentLayout(){return this._currentLinkChartConfig.layoutMode}async _calculateLayoutWithSublayerTimeInfo(e="radial-root-centric",t){const a=new Map;this.layers.forEach((e=>{a.set(e.objectType.name,e.timeInfo)})),await this.calculateLinkChartLayout(e,{timeInfoByTypeName:a,...t})}async _handleNewRecords(e,t){const a=[];this.dataManager.addToLayer(e);for(const t of e)this.sublayerIdsCache.has(t.typeName)||(this.sublayerIdsCache.set(t.typeName,new Set),a.push(t.typeName)),this.sublayerIdsCache.get(t.typeName).add(t.id);for(const e of a){const t=this._graphTypeLookup.get(e);if(t){const a=this._createSublayer(t);"entity"===t.type?this.dataManager.entityTypeNames.add(e):this.dataManager.relationshipTypeNames.add(e),a.geometryType?this.layers.push(a):this.tables.push(a),this.dataManager.sublayerCaches.set(e,new Map)}}await(0,b.qN)(this,a,t),await this.dataManager.refreshCacheContent(e.map((e=>e.id)),void 0,void 0,void 0,t);const i=Object.assign({},this._currentLinkChartConfig.layoutOptions);i.lockedNodeLocations=new Map;for(const[e,t]of this.entityLinkChartDiagramLookup.entries())t&&i.lockedNodeLocations.set(e,new _.A(t.coords[0],t.coords[1]));await this.applyNewLinkChartLayout(this._currentLinkChartConfig.layoutMode,i)}_createSublayers(e,t,a){e.forEach((e=>{const i=this._createSublayer(e);a(i)&&t.push(i),this._updateSublayerCaches(e)}))}_updateSublayers(e,t){t.forEach((t=>{t.parentCompositeLayer=this;const a=e.find((e=>e.type===t.graphType&&e.name===t.graphTypeName));a&&(t.objectType=a,t.read({title:a.name},{origin:"service"}),this._updateSublayerCaches(a))}))}_updateSublayerCaches(e){const t=this.dataManager.sublayerCaches;t.has(e.name)||t.set(e.name,new Map)}async _initializeDiagram(){this.defaultLinkChartConfig?this.defaultLinkChartConfig.doNotRecalculateLayout?(this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.forEach(((e,t)=>{e?.members?.forEach((e=>{const a=e.linkChartLocation;let i;const n=e.id;if(!a)return;i="x"in a?{x:a.x,y:a.y}:{x:a.coords[0],y:a.coords[1]};const o=(0,m.Ux)(i);this.dataManager.relationshipTypeNames.has(t)?this.relationshipLinkChartDiagramLookup.set(n,o):this.entityLinkChartDiagramLookup.set(n,o),this.linkChartExtent.xmin>i.x&&(this.linkChartExtent.xmin=i.x),this.linkChartExtent.xmax<i.x&&(this.linkChartExtent.xmax=i.x),this.linkChartExtent.ymin>i.y&&(this.linkChartExtent.ymin=i.y),this.linkChartExtent.ymax<i.y&&(this.linkChartExtent.ymax=i.y)}))})),this.memberRelationshipTypes.forEach((e=>{e.name&&this.dataManager.sublayerCaches.get(e.name)?.forEach((e=>{const t=this.relationshipLinkChartDiagramLookup.get(e.attributes[b.Cz]),a=this.relationshipLinkChartDiagramLookup.get(e.attributes[b.KQ]);if(t&&a){const i=(0,m.Ux)(new A.A({paths:[[[t.coords[0],t.coords[1]],[a.coords[0],a.coords[1]]]]}));this.relationshipLinkChartDiagramLookup.set(e.attributes[b.dr],i)}else this.relationshipLinkChartDiagramLookup.set(e.attributes[b.dr],null)}))}))):await this._calculateLayoutWithSublayerTimeInfo(this.defaultLinkChartConfig.layoutMode,{lockedNodeLocations:this.getCurrentNodeLocations(),...this.defaultLinkChartConfig.layoutOptions||{}}):await this._calculateLayoutWithSublayerTimeInfo("radial-root-centric",{lockedNodeLocations:this.getCurrentNodeLocations()})}_refreshNamedTypes(){for(const e of this.layers)e.emit("refresh",{dataChanged:!0});for(const e of this.tables)e.emit("refresh",{dataChanged:!0})}_validateLayoutSettings(e,t){const a=e=>"number"==typeof e&&!isNaN(e),i={organicLayoutSettings:{},chronologicalLayoutSettings:{}};if(!new Set(["organic-standard","organic-community","geographic-organic-standard","chronological-multi-timeline","chronological-mono-timeline"]).has(e)||!t)return i;t.organicLayoutSettings??={};const{computationBudgetTime:n,repulsionRadiusMultiplier:o,idealEdgeLength:s,idealEdgeLengthType:l}=t.organicLayoutSettings;if((e=>a(e)&&e>=1)(n)?i.organicLayoutSettings.computationBudgetTime=n:void 0!==n&&r.A.getLogger(this).warn("Invalid layout computationBudgetTime setting, will revert to default setting"),(e=>a(e)&&e>=1)(o)?i.organicLayoutSettings.repulsionRadiusMultiplier=o:void 0!==o&&r.A.getLogger(this).warn("Invalid layout repulsionRadiusMultiplier setting, will revert to default setting"),"geographic-organic-standard"===e&&(void 0!==s||void 0!==l)&&((e=>Object.values(f.x).includes(e))(l)?i.organicLayoutSettings.idealEdgeLengthType=l:void 0!==l&&r.A.getLogger(this).warn('Invalid layout idealEdgeLengthType setting, will revert to "multiplier" setting'),(e=>a(e)&&e>=0)(s)?i.organicLayoutSettings.idealEdgeLength=s:void 0!==s&&r.A.getLogger(this).warn("Invalid layout idealEdgeLength setting, will revert to default setting")),("chronological-multi-timeline"===e||"chronological-mono-timeline"===e)&&t.chronologicalLayoutSettings){const e=t.chronologicalLayoutSettings;e.durationLineWidth&&e.durationLineWidth<0&&r.A.getLogger(this).warn("Invalid layout durationLineWidth setting, will revert to default setting")}return i}_convertLayoutSettingsToCalculationSettings(e){e.organicLayoutSettings??={};let t=e.organicLayoutSettings.idealEdgeLength;return e.organicLayoutSettings.idealEdgeLengthType===f.x.ABSOLUTE&&(void 0===t?t=-1:t*=-1),{computationBudgetTime:e.organicLayoutSettings.computationBudgetTime,repulsionRadiusMultiplier:e.organicLayoutSettings.repulsionRadiusMultiplier,idealEdgeLengthMultiplier:t}}_createSublayer(e){return new M.A({objectType:e,parentCompositeLayer:this,graphType:e.type})}_handleSublayersChange(e,t){t&&(t.forEach((e=>{e.parent=null})),this.removeHandles("sublayers-owner")),e&&(e.forEach((e=>{e.parent=this})),this.addHandles([e.on("after-add",(({item:e})=>{e.parent=this})),e.on("after-remove",(({item:e})=>{e.parent=null}))],"sublayers-owner"))}_alignLayersDataModelAndInclusionDefinition(e){const t=new Set((e.entityTypes??[]).map((e=>e.name)).concat((e.relationshipTypes??[]).map((e=>e.name)))),a=new Set((e.entityTypes??[]).map((e=>e.name))),i=new Set((e.relationshipTypes??[]).map((e=>e.name)));if(this.layers){for(const e of this.layers)!e.graphType&&t.has(e.graphTypeName)&&(e.graphType=a.has(e.graphTypeName)?"entity":"relationship");this.layers=this.layers.filter((e=>t.has(e.graphTypeName)&&("entity"===e.graphType?a.has(e.graphTypeName):i.has(e.graphTypeName))))}else this.layers=new o.A;if(this.layers&&this._originalInclusionList){const e=new Set(this._originalInclusionList.namedTypeDefinitions.keys()),t=this.tables?.map((e=>e.graphTypeName))??[],a=this.layers.map((e=>e.graphTypeName)).concat(t);for(const t of a)e.has(t)||this._originalInclusionList.namedTypeDefinitions.set(t,{useAllData:!1,members:new Map});const i=[];for(const e of this._originalInclusionList.namedTypeDefinitions.keys())a.includes(e)||(r.A.getLogger(this).warn(`A named type, ${e}, was in the serialized feature collection but did not have a sublayer config in the item, so will be removed`),i.push(e));for(const e of i)this._originalInclusionList.namedTypeDefinitions.delete(e)}}};(0,i._)([(0,u.MZ)()],E.prototype,"dataPreloadedInLocalCache",void 0),(0,i._)([(0,u.MZ)()],E.prototype,"defaultLinkChartConfig",void 0),(0,i._)([(0,u.MZ)()],E.prototype,"membershipModified",void 0),(0,i._)([(0,u.MZ)()],E.prototype,"dataManager",void 0),(0,i._)([(0,u.MZ)()],E.prototype,"inclusionModeDefinition",null),(0,i._)([(0,u.MZ)()],E.prototype,"knowledgeGraph",void 0),(0,i._)([(0,u.MZ)({type:o.A.ofType(M.A),json:{write:{ignoreOrigin:!0}}})],E.prototype,"layers",void 0),(0,i._)([(0,u.MZ)()],E.prototype,"entityLinkChartDiagramLookup",void 0),(0,i._)([(0,u.MZ)()],E.prototype,"relationshipLinkChartDiagramLookup",void 0),(0,i._)([(0,u.MZ)()],E.prototype,"linkChartExtent",void 0),(0,i._)([(0,u.MZ)()],E.prototype,"memberEntityTypes",void 0),(0,i._)([(0,u.MZ)()],E.prototype,"memberRelationshipTypes",void 0),(0,i._)([(0,u.MZ)({type:["LinkChartLayer"]})],E.prototype,"operationalLayerType",void 0),(0,i._)([(0,u.MZ)()],E.prototype,"sublayerIdsCache",void 0),(0,i._)([(0,u.MZ)({type:o.A.ofType(M.A),json:{write:{ignoreOrigin:!0}}})],E.prototype,"tables",void 0),(0,i._)([(0,u.MZ)({json:{read:!1}})],E.prototype,"type",void 0),(0,i._)([(0,u.MZ)({json:{read:!1}})],E.prototype,"chronologicalAuxiliaryGraphics",void 0),E=(0,i._)([(0,p.$)("esri.layers.LinkChartLayer")],E);const I=E}}]);