@arcgis/core 4.31.0-next.20240607 → 4.31.0-next.20240610

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 (100) hide show
  1. package/README.md +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/06ea3bb071a83a54f1b2.js +1 -0
  4. package/assets/esri/core/workers/chunks/{fa5e171c8ce844363b6c.js → 465c718f0b9f7ba0f1ea.js} +1 -1
  5. package/assets/esri/core/workers/chunks/{342426c8a8c9f5f84811.js → 491f402da260293592ff.js} +1 -1
  6. package/assets/esri/core/workers/chunks/4e2943968517e385bd12.js +1 -0
  7. package/assets/esri/core/workers/chunks/5f3600a6d7159228731d.js +1 -0
  8. package/assets/esri/core/workers/chunks/77a360d1c9ecce4d4bed.js +1 -0
  9. package/assets/esri/core/workers/chunks/ace3297f0f314c3724da.js +1 -0
  10. package/assets/esri/core/workers/chunks/c660649465058ef82045.js +1 -0
  11. package/assets/esri/core/workers/chunks/{6a943f384fcd0af5888b.js → e66ebcfffd081f847efe.js} +1 -1
  12. package/assets/esri/core/workers/chunks/ec06875eac992c640057.js +1 -0
  13. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  14. package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
  15. package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core-simd.wasm +0 -0
  16. package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core.wasm +0 -0
  17. package/assets/esri/themes/base/widgets/_BasemapLayerList.scss +8 -0
  18. package/assets/esri/themes/base/widgets/_CatalogLayerList.scss +8 -0
  19. package/assets/esri/themes/base/widgets/_LayerList.scss +8 -0
  20. package/assets/esri/themes/base/widgets/_Print.scss +12 -0
  21. package/assets/esri/themes/base/widgets/_TableList.scss +8 -0
  22. package/assets/esri/themes/dark/main.css +1 -1
  23. package/assets/esri/themes/light/main.css +1 -1
  24. package/assets/esri/themes/light/view.css +1 -1
  25. package/chunks/Terrain.glsl.js +3 -1
  26. package/chunks/lyr3DWorker.js +1 -1
  27. package/interfaces.d.ts +152 -32
  28. package/layers/CatalogLayer.js +1 -1
  29. package/layers/IntegratedMeshLayer.js +1 -1
  30. package/layers/MapImageLayer.js +1 -1
  31. package/layers/SceneLayer.js +1 -1
  32. package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
  33. package/layers/support/Sublayer.js +1 -1
  34. package/layers/support/arcgisLayers.js +1 -1
  35. package/package.json +1 -1
  36. package/smartMapping/renderers/size.js +1 -1
  37. package/support/elevationInfoUtils.js +1 -1
  38. package/support/featureFlags.js +1 -1
  39. package/support/revision.js +1 -1
  40. package/symbols/support/styleUtils.js +1 -1
  41. package/views/2d/engine/webgl/mesh/bufcut.js +1 -1
  42. package/views/3d/analysis/Viewshed/FieldOfViewManipulation.js +1 -1
  43. package/views/3d/analysis/Viewshed/ScaleOrientManipulation.js +1 -1
  44. package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
  45. package/views/3d/interactive/editingTools/manipulatorUtils.js +1 -1
  46. package/views/3d/interactive/editingTools/originGeometryVisualElementUtils.js +1 -1
  47. package/views/3d/layers/BuildingSceneLayerView3D.js +1 -1
  48. package/views/3d/layers/FeatureLayerView3D.js +1 -1
  49. package/views/3d/layers/SceneLayerView3D.js +1 -1
  50. package/views/3d/layers/TiledLayerView3D.js +1 -1
  51. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  52. package/views/3d/layers/i3s/I3SIndex.js +1 -1
  53. package/views/3d/layers/i3s/I3SOverrides.js +1 -1
  54. package/views/3d/layers/support/FeatureTileVisibility3D.js +1 -1
  55. package/views/3d/layers/support/featureTileQuery3D.js +1 -1
  56. package/views/3d/state/NearFarHeuristic.js +1 -1
  57. package/views/3d/terrain/OverlayRenderer.js +1 -1
  58. package/views/3d/webgl-engine/effects/RenderPlugin.js +1 -1
  59. package/views/3d/webgl-engine/effects/RenderPluginManager.js +1 -1
  60. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
  61. package/views/3d/webgl-engine/lib/PathGeometryData.js +1 -1
  62. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  63. package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
  64. package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
  65. package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
  66. package/webdoc/support/webdocSaveUtils.js +1 -1
  67. package/webscene/support/schemaValidator.js +1 -1
  68. package/widgets/BasemapLayerList/css.js +1 -1
  69. package/widgets/BasemapLayerList.js +1 -1
  70. package/widgets/CatalogLayerList/css.js +1 -1
  71. package/widgets/CatalogLayerList.js +1 -1
  72. package/widgets/Editor/UpdateRecordWorkflow.js +1 -1
  73. package/widgets/Feature/support/featureUtils.js +1 -1
  74. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  75. package/widgets/FeatureTable/FieldColumn.js +1 -1
  76. package/widgets/FeatureTable/Grid/Column.js +1 -1
  77. package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
  78. package/widgets/FeatureTable/RelationshipColumn.js +1 -1
  79. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  80. package/widgets/FeatureTable/support/tableUtils.js +1 -1
  81. package/widgets/FeatureTable.js +1 -1
  82. package/widgets/Features/FeaturesViewModel.js +1 -1
  83. package/widgets/Fullscreen.js +1 -1
  84. package/widgets/LayerList/css.js +1 -1
  85. package/widgets/LayerList.js +1 -1
  86. package/widgets/Locate.js +1 -1
  87. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  88. package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
  89. package/widgets/Print/PrintViewModel.js +1 -1
  90. package/widgets/Print.js +1 -1
  91. package/widgets/TableList/css.js +1 -1
  92. package/widgets/TableList.js +1 -1
  93. package/widgets/Track.js +1 -1
  94. package/assets/esri/core/workers/chunks/230429bc1be19dd4944b.js +0 -1
  95. package/assets/esri/core/workers/chunks/441f3eaef3b703dd1026.js +0 -1
  96. package/assets/esri/core/workers/chunks/4d7578131569e65caedc.js +0 -1
  97. package/assets/esri/core/workers/chunks/4faf7055457c04dc9fc1.js +0 -1
  98. package/assets/esri/core/workers/chunks/ba988cd3a49987a0fb83.js +0 -1
  99. package/assets/esri/core/workers/chunks/c70683b7183458b338f8.js +0 -1
  100. package/assets/esri/core/workers/chunks/d03ada1212b13e76bff4.js +0 -1
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8003],{60945:(e,t,r)=>{r.d(t,{A:()=>m});var i,s=r(90237),o=r(25482),n=r(88930),a=r(10107),l=(r(44208),r(53966),r(87811),r(36005)),p=r(40608),u=r(43937),d=r(56400);let c=i=class extends o.oY{static get allTime(){return h}static get empty(){return y}static fromArray(e){return new i({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new i({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,i=e.start?.getTime()??e.start,s=e.end?.getTime()??e.end;return t===i&&r===s}expandTo(e,t=d.qU){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,n.lL)(r,e,t));let s=this.end;if(s){const r=(0,n.lL)(s,e,t);s=s.getTime()===r.getTime()?r:(0,n.S1)(r,1,e,t)}return new i({start:r,end:s})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return i.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,s=e.start?.getTime()??-1/0,o=e.end?.getTime()??1/0;let n,a;return s>=t&&s<=r?n=s:t>=s&&t<=o&&(n=t),r>=s&&r<=o?a=r:o>=t&&o<=r&&(a=o),null==n||null==a||isNaN(n)||isNaN(a)?i.empty:new i({start:n===-1/0?null:new Date(n),end:a===1/0?null:new Date(a)})}offset(e,t,r=d.qU){if(this.isEmpty||this.isAllTime)return this.clone();const s=new i,{start:o,end:a}=this;return null!=o&&(s.start=(0,n.S1)(o,e,t,r)),null!=a&&(s.end=(0,n.S1)(a,e,t,r)),s}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return h.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new i({start:t,end:r})}};(0,s._)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"end",void 0),(0,s._)([(0,l.w)("end")],c.prototype,"readEnd",null),(0,s._)([(0,u.K)("end")],c.prototype,"writeEnd",null),(0,s._)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],c.prototype,"isAllTime",null),(0,s._)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],c.prototype,"isEmpty",null),(0,s._)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"start",void 0),(0,s._)([(0,l.w)("start")],c.prototype,"readStart",null),(0,s._)([(0,u.K)("start")],c.prototype,"writeStart",null),c=i=(0,s._)([(0,p.$)("esri.TimeExtent")],c);const h=new c,y=new c({start:void 0,end:void 0}),m=c},4902:(e,t,r)=>{r.d(t,{PH:()=>a,sA:()=>n});var i=r(90237),s=r(40608);let o=0;const n=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+o++})}};return t=(0,i._)([(0,s.$)("esri.core.Identifiable")],t),t},a=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:o++})}};return t=(0,i._)([(0,s.$)("esri.core.Identifiable.NumericIdentifiable")],t),t};let l=class extends(n(class{})){};l=(0,i._)([(0,s.$)("esri.core.Identifiable")],l)},92071:(e,t,r)=>{r.d(t,{P:()=>_,L:()=>S});var i=r(90237),s=r(69622),o=r(76953),n=r(4718),a=r(35666);class l{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(a.AU),this._values=new Map,this.multipleOriginsSupported=!0}clone(e){const t=new l,r=this._originStores[a.Gr.DEFAULTS];r&&r.forEach(((e,r)=>{t.set(r,(0,n.o8)(e),a.Gr.DEFAULTS)}));for(let r=a.Gr.SERVICE;r<a.AU;r++){const i=this._originStores[r];i&&i.forEach(((i,s)=>{e&&e.has(s)||t.set(s,(0,n.o8)(i),r)}))}return t}get(e,t){const r=void 0===t?this._values:this._originStores[t];return r?r.get(e):void 0}keys(e){const t=null==e?this._values:this._originStores[e];return t?[...t.keys()]:[]}set(e,t,r=a.Gr.USER){let i=this._originStores[r];if(i||(i=new Map,this._originStores[r]=i),i.set(e,t),!this._values.has(e)||this._propertyOriginMap.get(e)<=r){const i=this._values.get(e);return this._values.set(e,t),this._propertyOriginMap.set(e,r),i!==t}return!1}delete(e,t=a.Gr.USER){const r=this._originStores[t];if(!r)return;const i=r.get(e);if(r.delete(e),this._values.has(e)&&this._propertyOriginMap.get(e)===t){this._values.delete(e);for(let r=t-1;r>=0;r--){const t=this._originStores[r];if(t&&t.has(e)){this._values.set(e,t.get(e)),this._propertyOriginMap.set(e,r);break}}}return i}has(e,t){const r=void 0===t?this._values:this._originStores[t];return!!r&&r.has(e)}revert(e,t){for(;t>0&&!this.has(e,t);)--t;const r=this._originStores[t],i=r?.get(e),s=this._values.get(e);return this._values.set(e,i),this._propertyOriginMap.set(e,t),s!==i}originOf(e){return this._propertyOriginMap.get(e)||a.Gr.DEFAULTS}forEach(e){this._values.forEach(e)}}var p=r(45917),u=r(88620),d=r(40608);const c=e=>{let t=class extends e{constructor(...e){super(...e);const t=(0,u.oY)(this),r=t.store,i=new l;t.store=i,(0,o.k)(t,r,i)}read(e,t){(0,p.L)(this,e,t)}getAtOrigin(e,t){const r=h(this),i=(0,a.aB)(t);if("string"==typeof e)return r.get(e,i);const s={};return e.forEach((e=>{s[e]=r.get(e,i)})),s}originOf(e){return(0,a.OL)(this.originIdOf(e))}originIdOf(e){return h(this).originOf(e)}revert(e,t){const r=h(this),i=(0,a.aB)(t),s=(0,u.oY)(this);let o;o="string"==typeof e?"*"===e?r.keys(i):[e]:e,o.forEach((e=>{s.invalidate(e),r.revert(e,i),s.commit(e)}))}};return t=(0,i._)([(0,d.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],t),t};function h(e){return(0,u.oY)(e).store}let y=class extends(c(s.A)){};y=(0,i._)([(0,d.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],y);var m=r(16649),g=r(49422);const f=e=>{let t=class extends e{constructor(...e){super(...e)}clear(e,t="user"){return v(this).delete(e,(0,a.aB)(t))}write(e,t){return(0,g.M)(this,e=e||{},t),e}setAtOrigin(e,t,r){(0,u.oY)(this).setAtOrigin(e,t,(0,a.aB)(r))}removeOrigin(e){const t=v(this),r=(0,a.aB)(e),i=t.keys(r);for(const e of i)t.originOf(e)===r&&t.set(e,t.get(e,r),a.Gr.USER)}updateOrigin(e,t){const r=v(this),i=(0,a.aB)(t),s=(0,m.Jt)(this,e);for(let t=i+1;t<a.AU;++t)r.delete(e,t);r.set(e,s,i)}toJSON(e){return this.write({},e)}};return t=(0,i._)([(0,d.$)("esri.core.MultiOriginJSONSupport.WriteableMultiOriginJSONSupport")],t),t.prototype.toJSON.isDefaultToJSON=!0,t};function v(e){return(0,u.oY)(e).store}const _=e=>{let t=class extends(f(c(e))){constructor(...e){super(...e)}};return t=(0,i._)([(0,d.$)("esri.core.MultiOriginJSONSupport")],t),t};let S=class extends(_(s.A)){};S=(0,i._)([(0,d.$)("esri.core.MultiOriginJSONSupport")],S)},36708:(e,t,r)=>{r.d(t,{C_:()=>c,OH:()=>m,Vh:()=>g,on:()=>d,pc:()=>f,wB:()=>l,z7:()=>p}),r(60999),r(5503);var i=r(37955),s=r(36563),o=r(97768),n=r(74887),a=r(14012);function l(e,t,r={}){return u(e,t,r,h)}function p(e,t,r={}){return u(e,t,r,y)}function u(e,t,r={},i){let s=null;const n=r.once?(e,r)=>{i(e)&&((0,o.xt)(s),t(e,r))}:(e,r)=>{i(e)&&t(e,r)};if(s=(0,a.Cn)(e,n,r.sync,r.equals),r.initial){const t=e();n(t,t)}return s}function d(e,t,r,n={}){let a=null,p=null,u=null;function d(){a&&p&&(p.remove(),n.onListenerRemove?.(a),a=null,p=null)}function c(e){n.once&&n.once&&(0,o.xt)(u),r(e)}const h=l(e,((e,r)=>{d(),(0,i.wb)(e)&&(a=e,p=(0,i.on)(e,t,c),n.onListenerAdd?.(e))}),{sync:n.sync,initial:!0});return u=(0,s.hA)((()=>{h.remove(),d()})),u}function c(e,t){return function(e,t,r){if((0,n.G4)(r))return Promise.reject((0,n.NK)());const i=e();if(t?.(i))return Promise.resolve(i);let a=null;function l(){a=(0,o.xt)(a)}return new Promise(((i,o)=>{a=(0,s.vE)([(0,n.u7)(r,(()=>{l(),o((0,n.NK)())})),u(e,(e=>{l(),i(e)}),{sync:!1,once:!0},t??h)])}))}(e,y,t)}function h(e){return!0}function y(e){return!!e}r(80559);const m={sync:!0},g={initial:!0},f={sync:!0,initial:!0}},54239:(e,t,r)=>{r.d(t,{A:()=>_});var i,s=r(90237),o=r(4576),n=r(66552),a=r(25482),l=r(83047),p=r(67076),u=r(10107),d=(r(44208),r(53966),r(36005)),c=r(40608),h=r(43937);const y=(0,n.O)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),m=y.jsonValues.slice();(0,o.Xy)(m,"orthometric");const g=(0,n.O)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let f=i=class extends a.oY{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,r){return y.write(e,t,r)}readHeightModel(e,t,r){return y.read(e)||(r?.messages&&r.messages.push(function(e,t){return new p.A("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:r})),null)}readHeightUnit(e,t,r){return g.read(e)||(r?.messages&&r.messages.push(v(e,{context:r})),null)}readHeightUnitService(e,t,r){return(0,l.LA)(e)||g.read(e)||(r?.messages&&r.messages.push(v(e,{context:r})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new i({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const r=(0,l.k1)(t);return new i({heightModel:e.heightModel,heightUnit:r??void 0,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new i;return t.read(e,{origin:"web-scene"}),t}};function v(e,t){return new p.A("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,s._)([(0,u.MZ)({type:y.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:m,default:"ellipsoidal"}}}})],f.prototype,"heightModel",void 0),(0,s._)([(0,h.K)("web-scene","heightModel")],f.prototype,"writeHeightModel",null),(0,s._)([(0,d.w)(["web-scene","service"],"heightModel")],f.prototype,"readHeightModel",null),(0,s._)([(0,u.MZ)({type:g.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:g.jsonValues,write:g.write}}}})],f.prototype,"heightUnit",void 0),(0,s._)([(0,d.w)("web-scene","heightUnit")],f.prototype,"readHeightUnit",null),(0,s._)([(0,d.w)("service","heightUnit")],f.prototype,"readHeightUnitService",null),(0,s._)([(0,u.MZ)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],f.prototype,"vertCRS",void 0),(0,s._)([(0,d.w)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],f.prototype,"readVertCRS",null),f=i=(0,s._)([(0,c.$)("esri.geometry.HeightModelInfo")],f);const _=f},84453:(e,t,r)=>{r.r(t),r.d(t,{default:()=>F});var i,s=r(90237),o=r(49186),n=r(53966),a=r(92071),l=r(74887),p=r(36708),u=r(10107),d=(r(44208),r(87811),r(36005)),c=r(40608),h=r(87024),y=r(4146),m=r(52136),g=r(18768),f=r(69208),v=r(16131),_=r(8303),S=r(25036),M=r(58947),w=r(10873),b=r(50805),I=r(78888),x=r(5503),A=r(25482),Z=r(84952),O=(r(59456),r(4718)),T=r(67076),E=r(43937),P=r(57251),U=r(39829);let R=i=class extends A.oY{constructor(e){super(e),this.geometry=null,this.type="clip"}writeGeometry(e,t,r,i){if(i.layer?.spatialReference&&!i.layer.spatialReference.equals(this.geometry.spatialReference)){if(!(0,P.canProjectWithoutEngine)(e.spatialReference,i.layer.spatialReference))return void(i?.messages&&i.messages.push(new T.A("scenemodification:unsupported","Scene modifications with incompatible spatial references are not supported",{modification:this,spatialReference:i.layer.spatialReference,context:i})));const s=new U.A;(0,P.projectPolygon)(e,s,i.layer.spatialReference),t[r]=s.toJSON(i)}else t[r]=e.toJSON(i);delete t[r].spatialReference}clone(){return new i({geometry:(0,O.o8)(this.geometry),type:this.type})}};(0,s._)([(0,u.MZ)({type:U.A}),(0,h.P)()],R.prototype,"geometry",void 0),(0,s._)([(0,E.K)(["web-scene","portal-item"],"geometry")],R.prototype,"writeGeometry",null),(0,s._)([(0,u.MZ)({type:["clip","mask","replace"],nonNullable:!0}),(0,h.P)()],R.prototype,"type",void 0),R=i=(0,s._)([(0,c.$)("esri.layers.support.SceneModification")],R);const L=R;var N;let D=N=class extends((0,A.Te)(x.A.ofType(L))){constructor(e){super(e),this.url=null}clone(){return new N({url:this.url,items:this.items.map((e=>e.clone()))})}toJSON(e){return this.toArray().map((t=>t.toJSON(e))).filter((e=>!!e.geometry))}static fromJSON(e,t){const r=new N;for(const i of e)r.add(L.fromJSON(i,t));return r}static async fromUrl(e,t,r){const i={url:(0,Z.An)(e),origin:"service"},s=await(0,I.A)(e,{responseType:"json",signal:r?.signal}),o=t.toJSON(),n=[];for(const e of s.data)n.push(L.fromJSON({...e,geometry:{...e.geometry,spatialReference:o}},i));return new N({url:e,items:n})}};(0,s._)([(0,u.MZ)({type:String})],D.prototype,"url",void 0),D=N=(0,s._)([(0,c.$)("esri.layers.support.SceneModifications")],D);const $=D;var k=r(24212),j=r(97159);let C=class extends((0,M.w6)((0,g.b)((0,v.q)((0,_.A)((0,S.j)((0,a.P)((0,f.d)((0,m.p)(y.A))))))))){constructor(...e){super(...e),this.geometryType="mesh",this.operationalLayerType="IntegratedMeshLayer",this.type="integrated-mesh",this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.profile="mesh-pyramids",this.modifications=null,this._modificationsSource=null,this.path=null,this.definitionExpression=null}initialize(){this.addHandles((0,p.on)((()=>this.modifications),"after-changes",(()=>this.modifications=this.modifications),p.OH))}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}readModifications(e,t,r){this._modificationsSource={url:(0,j.f)(e,r),context:r}}set elevationInfo(e){this._set("elevationInfo",e),this._validateElevationInfo()}async load(e){return this.addResolvingPromise(this._doLoad(e)),this}async _doLoad(e){const t=e?.signal;try{await this.loadFromPortal({supportedTypes:["Scene Service"]},e)}catch(e){(0,l.QP)(e)}if(await this._fetchService(t),null!=this._modificationsSource){const t=await $.fromUrl(this._modificationsSource.url,this.spatialReference,e);this.setAtOrigin("modifications",t,this._modificationsSource.context.origin),this._modificationsSource=null}await this._fetchIndexAndUpdateExtent(this.nodePages,t)}beforeSave(){if(null!=this._modificationsSource)return this.load().then((()=>{}),(()=>{}))}async saveAs(e,t){return this._debouncedSaveOperations(M.Xh.SAVE_AS,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"integrated-mesh"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"integrated-mesh"};return this._debouncedSaveOperations(M.Xh.SAVE,e)}validateLayer(e){if(e.layerType&&"IntegratedMesh"!==e.layerType)throw new o.A("integrated-mesh-layer:layer-type-not-supported","IntegratedMeshLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new o.A("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x"});if(this.version.major>1)throw new o.A("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x"})}_getTypeKeywords(){return["IntegratedMeshLayer"]}_validateElevationInfo(){const e=this.elevationInfo,t="Integrated mesh layers";(0,k.XF)(n.A.getLogger(this),(0,k.B)(t,"absolute-height",e)),(0,k.XF)(n.A.getLogger(this),(0,k.tW)(t,e))}};(0,s._)([(0,u.MZ)({type:String,readOnly:!0})],C.prototype,"geometryType",void 0),(0,s._)([(0,u.MZ)({type:["show","hide"]})],C.prototype,"listMode",void 0),(0,s._)([(0,u.MZ)({type:["IntegratedMeshLayer"]})],C.prototype,"operationalLayerType",void 0),(0,s._)([(0,u.MZ)({json:{read:!1},readOnly:!0})],C.prototype,"type",void 0),(0,s._)([(0,u.MZ)({type:b.W4,readOnly:!0})],C.prototype,"nodePages",void 0),(0,s._)([(0,u.MZ)({type:[b.uV],readOnly:!0})],C.prototype,"materialDefinitions",void 0),(0,s._)([(0,u.MZ)({type:[b.Ot],readOnly:!0})],C.prototype,"textureSetDefinitions",void 0),(0,s._)([(0,u.MZ)({type:[b.L0],readOnly:!0})],C.prototype,"geometryDefinitions",void 0),(0,s._)([(0,u.MZ)({readOnly:!0})],C.prototype,"serviceUpdateTimeStamp",void 0),(0,s._)([(0,u.MZ)({type:$}),(0,h.P)({origins:["web-scene","portal-item"],type:"resource",prefix:"modifications"})],C.prototype,"modifications",void 0),(0,s._)([(0,d.w)(["web-scene","portal-item"],"modifications")],C.prototype,"readModifications",null),(0,s._)([(0,u.MZ)(w.Yj)],C.prototype,"elevationInfo",null),(0,s._)([(0,u.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0},"portal-item":{read:!0,write:!0}},read:!1}})],C.prototype,"path",void 0),C=(0,s._)([(0,c.$)("esri.layers.IntegratedMeshLayer")],C);const F=C},4146:(e,t,r)=>{r.d(t,{A:()=>S});var i=r(90237),s=(r(59456),r(78888)),o=r(60945),n=r(49186),a=r(65529),l=r(4902),p=r(92474),u=r(53966),d=r(74887),c=r(84952),h=r(10107),y=(r(44208),r(87811),r(40608)),m=r(92602),g=r(5443),f=r(16930);let v=0,_=class extends(a.A.EventedMixin((0,l.sA)(p.A))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new g.A(-180,-90,180,90,f.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+v++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=f.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await r.e(7982).then(r.bind(r,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:i}=await r.e(5613).then(r.bind(r,45613));try{return await i(t)}catch(e){const r=t?.portalItem,i=r?.id||"unset",s=r?.portal?.url||m.A.portalUrl;throw u.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+s+"', id: '"+i+"')",e),e}}(e)}initialize(){this.when().catch((e=>{(0,d.zf)(e)||u.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})}))}destroy(){const e=this.parent;if(e){const t=this;"layers"in e&&e.layers.includes(t)?e.layers.remove(t):"tables"in e&&e.tables.includes(t)?e.tables.remove(t):"baseLayers"in e&&e.baseLayers.includes(t)?e.baseLayers.remove(t):"referenceLayers"in e&&e.referenceLayers.includes(t)&&e.referenceLayers.remove(t),this._set("parent",null)}}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,c.An)(this.url)}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,s.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new n.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,i._)([(0,h.MZ)({type:String})],_.prototype,"attributionDataUrl",void 0),(0,i._)([(0,h.MZ)({type:g.A})],_.prototype,"fullExtent",void 0),(0,i._)([(0,h.MZ)({readOnly:!0})],_.prototype,"hasAttributionData",null),(0,i._)([(0,h.MZ)({type:String,clonable:!1})],_.prototype,"id",void 0),(0,i._)([(0,h.MZ)({type:Boolean,nonNullable:!0})],_.prototype,"legendEnabled",void 0),(0,i._)([(0,h.MZ)({type:["show","hide","hide-children"]})],_.prototype,"listMode",void 0),(0,i._)([(0,h.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],_.prototype,"opacity",void 0),(0,i._)([(0,h.MZ)({clonable:!1})],_.prototype,"parent",void 0),(0,i._)([(0,h.MZ)({readOnly:!0})],_.prototype,"parsedUrl",null),(0,i._)([(0,h.MZ)({type:Boolean,readOnly:!0})],_.prototype,"persistenceEnabled",void 0),(0,i._)([(0,h.MZ)({type:Boolean})],_.prototype,"popupEnabled",void 0),(0,i._)([(0,h.MZ)({type:Boolean})],_.prototype,"attributionVisible",void 0),(0,i._)([(0,h.MZ)({type:f.A})],_.prototype,"spatialReference",void 0),(0,i._)([(0,h.MZ)({type:String})],_.prototype,"title",void 0),(0,i._)([(0,h.MZ)({readOnly:!0,json:{read:!1}})],_.prototype,"type",void 0),(0,i._)([(0,h.MZ)()],_.prototype,"url",void 0),(0,i._)([(0,h.MZ)({type:o.A})],_.prototype,"visibilityTimeExtent",void 0),(0,i._)([(0,h.MZ)({type:Boolean,nonNullable:!0})],_.prototype,"visible",void 0),_=(0,i._)([(0,y.$)("esri.layers.Layer")],_);const S=_},52136:(e,t,r)=>{r.d(t,{p:()=>n});var i=r(90237),s=r(10107),o=(r(44208),r(53966),r(87811),r(40608));const n=e=>{let t=class extends e{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,i._)([(0,s.MZ)({type:String})],t.prototype,"apiKey",null),t=(0,i._)([(0,o.$)("esri.layers.mixins.APIKeyMixin")],t),t}},18768:(e,t,r)=>{r.d(t,{b:()=>l});var i=r(90237),s=r(53966),o=r(10107),n=(r(44208),r(87811),r(40608)),a=r(60694);const l=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,a.qg)(this.url);if(null!=e&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,a.Jf)(e,s.A.getLogger(this)))}};return(0,i._)([(0,o.MZ)()],t.prototype,"title",null),(0,i._)([(0,o.MZ)({type:String})],t.prototype,"url",null),t=(0,i._)([(0,n.$)("esri.layers.mixins.ArcGISService")],t),t}},69208:(e,t,r)=>{r.d(t,{d:()=>n});var i=r(90237),s=r(10107),o=(r(44208),r(53966),r(87811),r(40608));const n=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,i._)([(0,s.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,i._)([(0,o.$)("esri.layers.mixins.CustomParametersMixin")],t),t}},8303:(e,t,r)=>{r.d(t,{A:()=>w});var i=r(90237),s=r(92602),o=r(70333),n=r(78888),a=r(60999),l=r(49186),p=r(53966),u=r(97768),d=r(74887),c=r(84952),h=r(10107),y=(r(44208),r(87811),r(36005)),m=r(40608),g=r(43937),f=r(83531),v=r(20655),_=r(80812),S=r(41318),M=r(10407);const w=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,u.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new _.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:i}=await Promise.all([r.e(5356),r.e(1204)]).then(r.bind(r,41204));return(0,d.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,d.zf)(e)||p.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,d.QP)(e),!0))))}async setUserPrivileges(e,t){if(!s.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,d.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=e===r.id;if(i&&r.portal.user)return(0,M.It)(r);let s,n;if(i)s=r.portal.url;else try{s=await(0,f.wI)(this.url,t)}catch(e){(0,d.QP)(e)}if(!s||!(0,c.b8)(s,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;n=await(o.id?.getCredential(`${s}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,d.QP)(e)}const a=!0,l=!1,p=!1;if(!n)return{features:{edit:a,fullEdit:l},content:{updateItem:p}};try{if(i?await r.reload():(r=new _.default({id:e,portal:{url:s}}),await r.load(t)),r.portal.user)return(0,M.It)(r)}catch(e){(0,d.QP)(e)}return{features:{edit:a,fullEdit:l},content:{updateItem:p}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,d.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?o.id?.findCredential(this.url):null;if(!t)return!0;const r=b.credential===t?b.user:await this._fetchEditingUser(e);return b.credential=t,b.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=o.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,s=v.A.getDefault();if(s&&s.loaded&&(0,c.S8)(s.restUrl)===(0,c.S8)(i))return s.user;const l=`${i}/community/self`,p=null!=e?e.signal:null,u=await(0,a.Ke)((0,n.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:p}));return u.ok?S.A.fromJSON(u.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,i=this.portalItem?.id&&(this.portalItem.portal||v.A.getDefault());return r&&i&&!(0,c.ut)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new l.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i._)([(0,h.MZ)({type:_.default})],t.prototype,"portalItem",null),(0,i._)([(0,y.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,g.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,h.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,h.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,i._)([(0,h.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,i._)([(0,h.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,i._)([(0,m.$)("esri.layers.mixins.PortalLayer")],t),t},b={credential:null,user:null}},25036:(e,t,r)=>{r.d(t,{j:()=>n});var i=r(90237),s=r(10107),o=(r(44208),r(53966),r(87811),r(40608));const n=e=>{let t=class extends e{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){const e={minScale:this.minScale,maxScale:this.maxScale},t=this.parent;t&&"effectiveScaleRange"in t&&function(e,t){e.minScale=e.minScale>0?t.minScale>0?Math.min(e.minScale,t.minScale):e.minScale:t.minScale,e.maxScale=e.maxScale>0?t.maxScale>0?Math.max(e.maxScale,t.maxScale):e.maxScale:t.maxScale}(e,t.effectiveScaleRange);const r=this._get("effectiveScaleRange");return r&&r.minScale===e.minScale&&r.maxScale===e.maxScale?r:e}};return(0,i._)([(0,s.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"minScale",void 0),(0,i._)([(0,s.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"maxScale",void 0),(0,i._)([(0,s.MZ)({readOnly:!0})],t.prototype,"effectiveScaleRange",null),t=(0,i._)([(0,o.$)("esri.layers.mixins.ScaleRangeLayer")],t),t}},50805:(e,t,r)=>{r.d(t,{L0:()=>f,Ot:()=>h,W4:()=>l,uV:()=>d});var i=r(90237),s=r(25482),o=r(10107),n=(r(44208),r(53966),r(87811),r(93223)),a=r(40608);let l=class extends s.oY{constructor(){super(...arguments),this.nodesPerPage=null,this.rootIndex=0,this.lodSelectionMetricType=null}};(0,i._)([(0,o.MZ)({type:Number})],l.prototype,"nodesPerPage",void 0),(0,i._)([(0,o.MZ)({type:Number})],l.prototype,"rootIndex",void 0),(0,i._)([(0,o.MZ)({type:String})],l.prototype,"lodSelectionMetricType",void 0),l=(0,i._)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3SNodePageDefinition")],l);let p=class extends s.oY{constructor(){super(...arguments),this.factor=1}};(0,i._)([(0,o.MZ)({type:Number,json:{read:{source:"textureSetDefinitionId"}}})],p.prototype,"id",void 0),(0,i._)([(0,o.MZ)({type:Number})],p.prototype,"factor",void 0),p=(0,i._)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3SMaterialTexture")],p);let u=class extends s.oY{constructor(){super(...arguments),this.baseColorFactor=[1,1,1,1],this.baseColorTexture=null,this.metallicRoughnessTexture=null,this.metallicFactor=1,this.roughnessFactor=1}};(0,i._)([(0,o.MZ)({type:[Number]})],u.prototype,"baseColorFactor",void 0),(0,i._)([(0,o.MZ)({type:p})],u.prototype,"baseColorTexture",void 0),(0,i._)([(0,o.MZ)({type:p})],u.prototype,"metallicRoughnessTexture",void 0),(0,i._)([(0,o.MZ)({type:Number})],u.prototype,"metallicFactor",void 0),(0,i._)([(0,o.MZ)({type:Number})],u.prototype,"roughnessFactor",void 0),u=(0,i._)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3SMaterialPBRMetallicRoughness")],u);let d=class extends s.oY{constructor(){super(...arguments),this.alphaMode="opaque",this.alphaCutoff=.25,this.doubleSided=!1,this.cullFace="none",this.normalTexture=null,this.occlusionTexture=null,this.emissiveTexture=null,this.emissiveFactor=null,this.pbrMetallicRoughness=null}};(0,i._)([(0,n.e)({opaque:"opaque",mask:"mask",blend:"blend"})],d.prototype,"alphaMode",void 0),(0,i._)([(0,o.MZ)({type:Number})],d.prototype,"alphaCutoff",void 0),(0,i._)([(0,o.MZ)({type:Boolean})],d.prototype,"doubleSided",void 0),(0,i._)([(0,n.e)({none:"none",back:"back",front:"front"})],d.prototype,"cullFace",void 0),(0,i._)([(0,o.MZ)({type:p})],d.prototype,"normalTexture",void 0),(0,i._)([(0,o.MZ)({type:p})],d.prototype,"occlusionTexture",void 0),(0,i._)([(0,o.MZ)({type:p})],d.prototype,"emissiveTexture",void 0),(0,i._)([(0,o.MZ)({type:[Number]})],d.prototype,"emissiveFactor",void 0),(0,i._)([(0,o.MZ)({type:u})],d.prototype,"pbrMetallicRoughness",void 0),d=(0,i._)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3SMaterialDefinition")],d);let c=class extends s.oY{};(0,i._)([(0,o.MZ)({type:String,json:{read:{source:["name","index"],reader:(e,t)=>null!=e?e:`${t.index}`}}})],c.prototype,"name",void 0),(0,i._)([(0,n.e)({jpg:"jpg",png:"png",dds:"dds","ktx-etc2":"ktx-etc2",ktx2:"ktx2",basis:"basis"})],c.prototype,"format",void 0),c=(0,i._)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3STextureFormat")],c);let h=class extends s.oY{constructor(){super(...arguments),this.atlas=!1}};(0,i._)([(0,o.MZ)({type:[c]})],h.prototype,"formats",void 0),(0,i._)([(0,o.MZ)({type:Boolean})],h.prototype,"atlas",void 0),h=(0,i._)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3STextureSetDefinition")],h);let y=class extends s.oY{};(0,i._)([(0,n.e)({Float32:"Float32",UInt64:"UInt64",UInt32:"UInt32",UInt16:"UInt16",UInt8:"UInt8"})],y.prototype,"type",void 0),(0,i._)([(0,o.MZ)({type:Number})],y.prototype,"component",void 0),y=(0,i._)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3SGeometryAttribute")],y);let m=class extends s.oY{};(0,i._)([(0,n.e)({draco:"draco"})],m.prototype,"encoding",void 0),(0,i._)([(0,o.MZ)({type:[String]})],m.prototype,"attributes",void 0),m=(0,i._)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3SGeometryCompressedAttributes")],m);let g=class extends s.oY{constructor(){super(...arguments),this.offset=0}};(0,i._)([(0,o.MZ)({type:Number})],g.prototype,"offset",void 0),(0,i._)([(0,o.MZ)({type:y})],g.prototype,"position",void 0),(0,i._)([(0,o.MZ)({type:y})],g.prototype,"normal",void 0),(0,i._)([(0,o.MZ)({type:y})],g.prototype,"uv0",void 0),(0,i._)([(0,o.MZ)({type:y})],g.prototype,"color",void 0),(0,i._)([(0,o.MZ)({type:y})],g.prototype,"uvRegion",void 0),(0,i._)([(0,o.MZ)({type:y})],g.prototype,"featureId",void 0),(0,i._)([(0,o.MZ)({type:y})],g.prototype,"faceRange",void 0),(0,i._)([(0,o.MZ)({type:m})],g.prototype,"compressedAttributes",void 0),g=(0,i._)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3SGeometryBuffer")],g);let f=class extends s.oY{};(0,i._)([(0,n.e)({triangle:"triangle"})],f.prototype,"topology",void 0),(0,i._)([(0,o.MZ)()],f.prototype,"geometryBuffers",void 0),f=(0,i._)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3SGeometryDefinition")],f)},24212:(e,t,r)=>{function i(e,t){return function(e,t){return t?.mode?t.mode:function(e){return e?l:p}(e).mode}(null!=e&&e.hasZ,t)}function s(e,t,r){return r&&r.mode!==t?`${e} only support ${t} elevation mode`:null}function o(e,t,r){return r?.mode===t?`${e} do not support ${t} elevation mode`:null}function n(e,t){return null!=t?.featureExpressionInfo&&"0"!==t.featureExpressionInfo.expression?`${e} do not support featureExpressionInfo`:null}function a(e,t){t&&e.warn(".elevationInfo=",t)}r.d(t,{$7:()=>o,B:()=>s,XF:()=>a,tW:()=>n,w7:()=>i}),r(83047),r(16271);const l={mode:"absolute-height",offset:0},p={mode:"on-the-ground",offset:null}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1363],{9775:(e,t,r)=>{r.d(t,{A:()=>i});var n=r(62788),s=r(95488);class i{constructor(e=(e=>e.values().next().value)){this._peeker=e,this._observable=new s.I,this._items=new Set}get length(){return(0,n.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,n.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,n.gc)(this._observable),yield*this._items}}},75503:(e,t,r)=>{r.d(t,{w:()=>o});var n=r(4576),s=(r(44208),r(3694)),i=r(11006);class o{constructor(e=9,t){this._compareMinX=u,this._compareMinY=p,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(),w.prune(),I.prune(),v.prune(),M.prune()}all(e){a(this._data,e)}search(e,t){let r=this._data;const n=this._toBBox;if(_(e,r))for(w.clear();r;){for(let s=0,i=r.children.length;s<i;s++){const i=r.children[s],o=r.leaf?n(i):i;_(e,o)&&(r.leaf?t(i):g(e,o)?a(i,t):w.push(i))}r=w.pop()}}collides(e){let t=this._data;const r=this._toBBox;if(!_(e,t))return!1;for(w.clear();t;){for(let n=0,s=t.children.length;n<s;n++){const s=t.children[n],i=t.leaf?r(s):s;if(_(e,i)){if(t.leaf||g(e,i))return!0;w.push(s)}}t=w.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,r=e.length;t<r;t++)this.insert(e[t]);return this}let t=this._build(e.slice(0,e.length),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 A([]),this}remove(e){if(!e)return this;let t,r=this._data,s=null,i=0,o=!1;const a=this._toBBox(e);for(v.clear(),M.clear();r||v.length>0;){if(r||(r=v.pop(),s=v.data[v.length-1],i=M.pop()??0,o=!0),r.leaf&&(t=(0,n.qh)(r.children,e,r.children.length,r.indexHint),-1!==t))return r.children.splice(t,1),v.push(r),this._condense(v),this;o||r.leaf||!g(r,a)?s?(i++,r=s.children[i],o=!1):r=null:(v.push(r),M.push(i),i=0,s=r,r=r.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,r,n){const s=r-t+1;let i=this._maxEntries;if(s<=i){const n=new A(e.slice(t,r+1));return l(n,this._toBBox),n}n||(n=Math.ceil(Math.log(s)/Math.log(i)),i=Math.ceil(s/i**(n-1)));const o=new x([]);o.height=n;const a=Math.ceil(s/i),d=a*Math.ceil(Math.sqrt(i));b(e,t,r,d,this._compareMinX);for(let s=t;s<=r;s+=d){const t=Math.min(s+d-1,r);b(e,s,t,a,this._compareMinY);for(let r=s;r<=t;r+=a){const s=Math.min(r+a-1,t);o.children.push(this._build(e,r,s,n-1))}}return l(o,this._toBBox),o}_insert(e,t,r){const n=this._toBBox,s=r?e:n(e);v.clear();const i=function(e,t,r,n){for(;n.push(t),!0!==t.leaf&&n.length-1!==r;){let r,n=1/0,s=1/0;for(let i=0,o=t.children.length;i<o;i++){const o=t.children[i],a=c(o),l=m(e,o)-a;l<s?(s=l,n=a<n?a:n,r=o):l===s&&a<n&&(n=a,r=o)}t=r||t.children[0]}return t}(s,this._data,t,v);for(i.children.push(e),h(i,s);t>=0&&v.data[t].children.length>this._maxEntries;)this._split(v,t),t--;!function(e,t,r){for(let n=r;n>=0;n--)h(t.data[n],e)}(s,v,t)}_split(e,t){const r=e.data[t],n=r.children.length,s=this._minEntries;this._chooseSplitAxis(r,s,n);const i=this._chooseSplitIndex(r,s,n);if(!i)return;const o=r.children.splice(i,r.children.length-i),a=r.leaf?new A(o):new x(o);a.height=r.height,l(r,this._toBBox),l(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(r,a)}_splitRoot(e,t){this._data=new x([e,t]),this._data.height=e.height+1,l(this._data,this._toBBox)}_chooseSplitIndex(e,t,r){let n,s,i;n=s=1/0;for(let o=t;o<=r-t;o++){const t=d(e,0,o,this._toBBox),a=d(e,o,r,this._toBBox),l=f(t,a),h=c(t)+c(a);l<n?(n=l,i=o,s=h<s?h:s):l===n&&h<s&&(s=h,i=o)}return i}_chooseSplitAxis(e,t,r){const n=e.leaf?this._compareMinX:u,s=e.leaf?this._compareMinY:p;this._allDistMargin(e,t,r,n)<this._allDistMargin(e,t,r,s)&&e.children.sort(n)}_allDistMargin(e,t,r,n){e.children.sort(n);const s=this._toBBox,i=d(e,0,t,s),o=d(e,r-t,r,s);let a=y(i)+y(o);for(let n=t;n<r-t;n++){const t=e.children[n];h(i,e.leaf?s(t):t),a+=y(i)}for(let n=r-t-1;n>=t;n--){const t=e.children[n];h(o,e.leaf?s(t):t),a+=y(o)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const r=e.data[t];if(0===r.children.length)if(t>0){const s=e.data[t-1],i=s.children;i.splice((0,n.qh)(i,r,i.length,s.indexHint),1)}else this.clear();else l(r,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 a(e,t){let r=e;for(I.clear();r;){if(!0===r.leaf)for(const e of r.children)t(e);else I.pushArray(r.children);r=I.pop()??null}}function l(e,t){d(e,0,e.children.length,t,e)}function d(e,t,r,n,s){s||(s=new A([])),s.minX=1/0,s.minY=1/0,s.maxX=-1/0,s.maxY=-1/0;for(let i,o=t;o<r;o++)i=e.children[o],h(s,e.leaf?n(i):i);return s}function h(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function u(e,t){return e.minX-t.minX}function p(e,t){return e.minY-t.minY}function c(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function y(e){return e.maxX-e.minX+(e.maxY-e.minY)}function m(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 f(e,t){const r=Math.max(e.minX,t.minX),n=Math.max(e.minY,t.minY),s=Math.min(e.maxX,t.maxX),i=Math.min(e.maxY,t.maxY);return Math.max(0,s-r)*Math.max(0,i-n)}function g(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function _(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function b(e,t,r,n,s){const o=[t,r];for(;o.length;){const t=o.pop(),r=o.pop();if(t-r<=n)continue;const a=r+Math.ceil((t-r)/n/2)*n;(0,i.q)(e,a,r,t,s),o.push(r,a,a,t)}}const w=new s.A,I=new s.A,v=new s.A,M=new s.A({deallocator:void 0});class T{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class E extends T{constructor(){super(...arguments),this.height=1,this.indexHint=new n.vW}}class A extends E{constructor(e){super(),this.children=e,this.leaf=!0}}class x extends E{constructor(e){super(),this.children=e,this.leaf=!1}}},10382:(e,t,r)=>{r.d(t,{A:()=>d});var n=r(36563),s=(r(44208),r(74887)),i=r(9775),o=r(72457),a=r(52268),l=r(61322);class d{constructor(){this._inUseClients=new Array,this._clients=new Array,this._clientPromises=new Array,this._ongoingJobsQueue=new i.A}destroy(){this.close()}get closed(){return!this._clients?.length}open(e,t){return new Promise(((r,n)=>{let i=!0;const o=e=>{(0,s.Te)(t.signal),i&&(i=!1,e())};this._clients.length=e.length,this._clientPromises.length=e.length,this._inUseClients.length=e.length;for(let i=0;i<e.length;++i){const a=e[i];(0,s.$X)(a)?this._clientPromises[i]=a.then((e=>(this._clients[i]=new l.default(e,t,this._ongoingJobsQueue),o(r),this._clients[i])),(()=>(o(n),null))):(this._clients[i]=new l.default(a,t,this._ongoingJobsQueue),this._clientPromises[i]=Promise.resolve(this._clients[i]),o(r))}}))}broadcast(e,t,r){const n=new Array(this._clientPromises.length);for(let s=0;s<this._clientPromises.length;++s){const i=this._clientPromises[s];n[s]=i.then((n=>n?.invoke(e,t,r)))}return n}close(){let e;for(;e=this._ongoingJobsQueue.pop();)e.resolver.reject((0,s.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,r){return this.apply(e,[t],r)}apply(e,t,r){const n=(0,s.Tw)();this._ongoingJobsQueue.push({methodName:e,data:t,invokeOptions:r,resolver:n});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 n.promise}createInvokeProxy(e){return(0,a.L)(this,e)}on(e,t){return Promise.all(this._clientPromises).then((()=>(0,n.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 n=0;n<this._clientPromises.length;++n)this._clientPromises[n].then((s=>{s&&(t[n]=s.openPort()),0==--r&&e(t)}))}))}get test(){}}},72457:(e,t,r)=>{r.d(t,{h:()=>i,k:()=>s});const n=new FinalizationRegistry((e=>{e.close()}));function s(e,t){n.register(e,t,t)}function i(e){n.unregister(e)}},29953:(e,t,r)=>{r.d(t,{ho:()=>Z});var n=r(49186),s=r(44208),i=r(74887),o=r(10382),a=r(72457),l=r(61322),d=r(53966),h=r(97768),u=r(78888),p=r(84952);const c={async request(e,t){const r=e.options,n=r.responseType;r.signal=t?.signal,r.responseType="native"===n||"native-request-init"===n?"native-request-init":n&&["blob","json","text"].includes(n)&&(0,p.sC)(e.url)?.after?n:"array-buffer";const s=await(0,u.A)(e.url,r),i={data:s.data,httpStatus:s.httpStatus,ssl:s.ssl};switch(s.requestOptions?.responseType){case"native-request-init":return delete i.data.signal,i;case"blob":i.data=await i.data.arrayBuffer();break;case"json":i.data=(new TextEncoder).encode(JSON.stringify(i.data)).buffer;break;case"text":i.data=(new TextEncoder).encode(i.data).buffer}return{result:i,transferList:[i.data]}}};var y=r(8341),m=r(2741),f=r(92602),g=(r(47566),r(70333));const _={};var b=r(26390);class w{constructor(){const e=document.createDocumentFragment();["addEventListener","dispatchEvent","removeEventListener"].forEach((t=>{this[t]=(...r)=>e[t](...r)}))}}class I{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,r){this._dispatcher.addEventListener(e,t,r)}removeEventListener(e,t,r){this._dispatcher.removeEventListener(e,t,r)}_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:r}=t;let n=await l.default.loadWorker(e);n||(n=await import(e));const s=l.default.connect(n);this._workerPostMessage({type:y.Go.OPENED,jobId:r,data:s})}}}var v=r(73444),M=r(18357);const T=()=>d.A.getLogger("esri.core.workers.workerFactory"),{HANDSHAKE:E}=y.Go;let A,x;const k="Failed to create Worker. Fallback to execute module in main thread";async function N(e){return new Promise((t=>{function r(s){const i=(0,y.VI)(s);i&&i.type===E&&(e.removeEventListener("message",r),e.removeEventListener("error",n),t(e))}function n(t){t.preventDefault(),e.removeEventListener("message",r),e.removeEventListener("error",n),T().warn("Failed to create Worker. Fallback to execute module in main thread",t),(e=new I).addEventListener("message",r),e.addEventListener("error",n)}e.addEventListener("message",r),e.addEventListener("error",n)}))}let S=0;const{ABORT:L,INVOKE:C,OPEN:D,OPENED:R,RESPONSE:B}=y.Go;class j{static async create(e){const t=await async function(){if(!(0,s.A)("esri-workers"))return N(new I);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,p.s2)(e.assetsPath),e.defaultAssetsPath=e.defaultAssetsPath?(0,p.s2)(e.defaultAssetsPath):void 0,e.request.interceptors=[],e.log.interceptors=[],e.locale=(0,v.JK)(),e.has={"esri-csp-restrictions":(0,s.A)("esri-csp-restrictions"),"esri-2d-debug":!1,"esri-2d-update-debug":(0,s.A)("esri-2d-update-debug"),"esri-2d-log-updating":(0,s.A)("esri-2d-log-updating"),"featurelayer-pbf":(0,s.A)("featurelayer-pbf"),"featurelayer-fast-triangulation-enabled":(0,s.A)("featurelayer-fast-triangulation-enabled"),"featurelayer-simplify-thresholds":(0,s.A)("featurelayer-simplify-thresholds"),"featurelayer-simplify-payload-size-factors":(0,s.A)("featurelayer-simplify-payload-size-factors"),"featurelayer-simplify-mobile-factor":(0,s.A)("featurelayer-simplify-mobile-factor"),"featurelayer-query-max-depth":(0,s.A)("featurelayer-query-max-depth"),"featurelayer-query-pausing-enabled":(0,s.A)("featurelayer-query-pausing-enabled"),"featurelayer-snapshot-enabled":(0,s.A)("featurelayer-snapshot-enabled"),"esri-atomics":(0,s.A)("esri-atomics"),"esri-shared-array-buffer":(0,s.A)("esri-shared-array-buffer"),"esri-tiles-debug":(0,s.A)("esri-tiles-debug"),"esri-workers-arraybuffer-transfer":(0,s.A)("esri-workers-arraybuffer-transfer"),"feature-polyline-generalization-factor":(0,s.A)("feature-polyline-generalization-factor"),"host-webworker":1},e.workers.loaderUrl&&(e.workers.loaderUrl=(0,p.s2)(e.workers.loaderUrl)),e.workers.workerPath?e.workers.workerPath=(0,p.s2)(e.workers.workerPath):e.workers.workerPath=(0,p.s2)((0,m.s)("esri/core/workers/RemoteClient.js")),e.workers.useDynamicImport=!1;const t=f.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?.concat()||[],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,v.JK)(),has:{"csp-restrictions":1,"dojo-test-sniff":0,"host-webworker":1,...t?.has},map:{...t?.map},paths:{...t?.paths},packages:t?.packages||[]}),n={buildDate:M.$,fullVersion:g.ol,revision:M.u};return JSON.stringify({esriConfig:e,loaderConfig:r,kernelInfo:n})}());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-"+S++})}catch(t){T().warn(k,x),e=new I}else T().warn(k,x),e=new I;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(),d.A.getLogger("esri.core.workers.WorkerOwner").error(e)}))}terminate(){this.worker.terminate()}async open(e,t={}){const{signal:r}=t,n=(0,y.Jc)();return new Promise(((t,s)=>{const o={resolve:t,reject:s,abortHandle:(0,i.NY)(r,(()=>{this._outJobs.delete(n),this._post({type:L,jobId:n})}))};this._outJobs.set(n,o),this._post({type:D,jobId:n,modulePath:e})}))}_onMessage(e){const t=(0,y.VI)(e);if(t)switch(t.type){case R: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,r=e.jobId,n=t.get(r);n&&(n.controller&&n.controller.abort(),t.delete(r))}_onInvokeMessage(e){const{methodName:t,jobId:r,data:n,abortable:s}=e,o=s?new AbortController:null,a=this._inJobs,l=c[t];let d;try{if("function"!=typeof l)throw new TypeError(`${t} is not a function`);d=l.call(null,n,{signal:o?o.signal:null})}catch(e){return void this._post({type:B,jobId:r,error:(0,y.mF)(e)})}(0,i.$X)(d)?(a.set(r,{controller:o,promise:d}),d.then((e=>{a.has(r)&&(a.delete(r),this._post({type:B,jobId:r},e))}),(e=>{a.has(r)&&(a.delete(r),e||(e={message:"Error encountered at method"+t}),(0,i.zf)(e)||this._post({type:B,jobId:r,error:(0,y.mF)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:B,jobId:r},d)}_onOpenedMessage(e){const{jobId:t,data:r}=e,n=this._outJobs.get(t);n&&(this._outJobs.delete(t),(0,h.xt)(n.abortHandle),n.resolve(r))}_onResponseMessage(e){const{jobId:t,error:r,data:s}=e,i=this._outJobs.get(t);i&&(this._outJobs.delete(t),(0,h.xt)(i.abortHandle),r?i.reject(n.A.fromJSON(JSON.parse(r))):i.resolve(s))}_post(e,t,r){return(0,y.u1)(this.worker,e,t,r)}}const O=(0,s.A)("host-browser")?Math.min(navigator.hardwareConcurrency-1,(0,s.A)("workers-pool-size")):0;let P=(0,s.A)("esri-mobile")?Math.min(O,3):O;P||(P=(0,s.A)("safari")&&(0,s.A)("mac")?7:2);let F=0;const q=[];async function G(e,t){const r=new o.A,{registryTarget:n,...s}=t;return await r.open(e,s),n&&(0,a.k)(n,r),r}async function Z(e,t={}){if("string"!=typeof e)throw new n.A("workers:undefined-module","modulePath is missing");let r=t.strategy||"distributed";if((0,s.A)("host-webworker")&&!(0,s.A)("esri-workers")&&(r="local"),"local"===r){let r=await l.default.loadWorker(e);r||(r=await import(e)),(0,i.Te)(t.signal);const n=t.client||r;return G([l.default.connect(r,t.schedule)],{...t,client:n})}if(await async function(){if(Y)return Y;$=new AbortController;const e=[];for(let t=0;t<P;t++){const r=j.create(t).then((e=>(q[t]=e,e)));e.push(r)}return Y=Promise.all(e),Y}(),(0,i.Te)(t.signal),"dedicated"===r){const r=F++%P;return G([await q[r].open(e,t)],t)}if(t.maxNumWorkers&&t.maxNumWorkers>0){const r=Math.min(t.maxNumWorkers,P);if(r<P){const n=new Array(r);for(let s=0;s<r;++s){const r=F++%P;n[s]=q[r].open(e,t)}return G(n,t)}}return G(q.map((r=>r.open(e,t))),t)}let $,Y=null},6518:(e,t,r)=>{r.d(t,{F:()=>a});var n=r(44208),s=r(75503),i=r(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 s.w(9,(0,n.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(((r,n)=>{e[t++]=n})),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,i.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,r){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,r)}(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,r)=>{r.d(t,{A:()=>y});var n=r(4576),s=r(49186),i=r(65529),o=r(53966),a=r(70328),l=r(19419),d=r(90708),h=r(6518),u=r(51441),p=r(37730);const c=(0,a.vt)();class y{constructor(e){this.geometryInfo=e,this._boundsStore=new h.F,this._featuresById=new Map,this._markedIds=new Set,this.events=new i.A,this.featureAdapter=p.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,r,n,s]=this.fullBounds;return{xmin:t,ymin:r,xmax:n,ymax:s,spatialReference:(0,u.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(n.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 r of e){const e=this._boundsStore.get(r.objectId);e&&t((0,a.Jt)(c,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))}))}startMarkingUsedFeatures(){this._boundsStore.invalidateIndex(),this._markedIds.clear()}sweep(){let e=!1;this._featuresById.forEach(((t,r)=>{this._markedIds.has(r)||(e=!0,this._remove(t))})),this._markedIds.clear(),e&&this._emitChanged()}_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 s.A("featurestore:invalid-feature","feature id is missing",{feature:e}));const r=this._featuresById.get(t);let n;if(this._markedIds.add(t),r?(e.displayId=r.displayId,n=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);n=(0,d.jQ)(null!=n?n:(0,l.vt)(),e.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),null!=n&&this._boundsStore.set(t,n),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 s.A("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const r=this._featuresById.get(t);if(!r)return this._add(e),e;this._markedIds.add(t);const{geometry:n,attributes:i}=e;for(const e in i)r.attributes[e]=i[e];return n&&(r.geometry=n,this._boundsStore.set(t,(0,d.jQ)((0,l.vt)(),n,this.geometryInfo.hasZ,this.geometryInfo.hasM)??null)),r}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._markedIds.delete(t),this._boundsStore.delete(t),this._featuresById.delete(t),e}}},64714:(e,t,r)=>{r.d(t,{F0:()=>a,Vx:()=>h,e2:()=>p,f:()=>c});var n=r(44208),s=r(4718),i=r(99352),o=r(93470);function a(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?o.Cb:"esriGeometryPolyline"===e?o.yM:o.WR}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let d=1;function h(e,t){if((0,n.A)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let r=`this${u(t)} = null;`;for(const t in e)r+=`this${u(t)} = ${JSON.stringify(e[t])};`;const n=new Function(`\n return class AttributesClass$${d++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new n}catch(r){return()=>({[t]:null,...e})}}function u(e){return l.test(e)?`.${e}`:`["${e}"]`}function p(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,s.o8)(e)}}]}function c(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!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,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:i.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},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}}}},61184:(e,t,r)=>{r.d(t,{PB:()=>k,d4:()=>x,ZL:()=>E,sZ:()=>A,yC:()=>M,Vr:()=>T});var n=r(90237),s=(r(59456),r(69622)),i=r(49186),o=r(53966),a=r(91869),l=r(39516),d=r(10107),h=(r(44208),r(87811),r(40608)),u=r(39829),p=r(57251),c=r(21325),y=r(90708),m=r(43334),f=r(65864);class g{constructor(){this._featureLookup=new Map}static getInstance(){return g.instance||(g.instance=new g),g.instance}static resetInstance(){g.instance&&(g.instance=null)}deleteFromStore(e){e.forEach((e=>{this._featureLookup.delete(e)}))}readFromStoreByList(e){const t=[];return e.forEach((e=>{const r=this.readFromStoreById(e);r&&t.push(r)})),t}readFromStoreById(e){return this._featureLookup.get(e)??null}writeToStore(e,t,r){const n=[];return e.forEach((e=>{if(!e?.id)return;e.properties||(e.properties=[]);let s,i=null;if(r&&e.properties[r]&&(i=(0,y.Ux)(e.properties[r])),"originId"in e&&"destinationId"in e&&(e.properties.ESRI__ORIGIN_ID=e.originId,e.properties.ESRI__DESTINATION_ID=e.destinationId),e.properties[t]=e.id,e.id&&this._featureLookup.has(e.id)&&this._featureLookup.get(e.id).attributes){const n=this._featureLookup.get(e.id),o=JSON.parse(JSON.stringify(Object.assign(n.attributes,e.properties)));r&&e.properties[r]&&(o[r]=(0,f.rS)(e.properties[r])),s=new m.Om(i?JSON.parse(JSON.stringify(i)):n?.geometry?JSON.parse(JSON.stringify(n.geometry)):null,o,null,e.properties[t])}else s=new m.Om(i?JSON.parse(JSON.stringify(i)):null,e.properties,null,e.properties[t]);this._featureLookup.set(e.id,s),n.push(s)})),n}}var _=r(45654),b=r(71932),w=r(42538),I=r(61956),v=r(5443);const M="ESRI__ID",T="ESRI__ORIGIN_ID",E="ESRI__DESTINATION_ID",A="ESRI__LAYOUT_GEOMETRY",x="ESRI__AGGREGATION_COUNT";let k=class extends s.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((r=>{r.name&&(t.set(r.name,"entity"),this._processingCacheUpdatesLookup.set(r.name,[]),e.inclusionModeDefinition&&!e.inclusionModeDefinition?.generateAllSublayers||this.entityTypeNames.add(r.name),r.properties?.forEach((e=>{e.geometryType&&"esriGeometryNull"!==e.geometryType&&this.geographicLookup.set(r.name,{name:e.name??"",geometryType:e.geometryType})})))})),e.knowledgeGraph.dataModel.relationshipTypes?.forEach((r=>{r.name&&(t.set(r.name,"relationship"),this._processingCacheUpdatesLookup.set(r.name,[]),e.inclusionModeDefinition&&!e.inclusionModeDefinition?.generateAllSublayers||this.relationshipTypeNames.add(r.name),r.properties?.forEach((e=>{e.geometryType&&"esriGeometryNull"!==e.geometryType&&this.geographicLookup.set(r.name,{name:e.name??"",geometryType:e.geometryType})})))})),e.inclusionModeDefinition?.namedTypeDefinitions.forEach(((r,n)=>{if("entity"===t.get(n))this.entityTypeNames.add(n);else{if("relationship"!==t.get(n))return o.A.getLogger(this).warn(`A named type, ${n}, was in the inclusion list that wasn't in the data model and will be removed`),void e.inclusionModeDefinition?.namedTypeDefinitions.delete(n);this.relationshipTypeNames.add(n)}const s=new Map;r.members?.forEach((e=>{(0,a.tE)(this.memberIdTypeLookup,e.id,(()=>new Set)).add(n);const t=this.getById(e.id);t&&s.set(e.id,t)})),this.sublayerCaches.set(n,s)}))}addToLayer(e){e.forEach((({typeName:e,id:t})=>{if(!this.inclusionModeDefinition)throw new i.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 r=this.inclusionModeDefinition.namedTypeDefinitions.get(e);r.members||(r.members=new Map),r.members.set(t,{id:t}),(0,a.tE)(this.memberIdTypeLookup,t,(()=>new Set)).add(e)}}else{const r=new Map;r.set(t,{id:t}),this.inclusionModeDefinition.namedTypeDefinitions.set(e,{useAllData:!1,members:r}),(0,a.tE)(this.memberIdTypeLookup,t,(()=>new Set)).add(e)}}))}getById(e){return g.getInstance().readFromStoreById(e)}async getData(e,t,r){if(t.objectType.name&&this.inclusionModeDefinition?.namedTypeDefinitions&&this.inclusionModeDefinition.namedTypeDefinitions.size>0&&!this.inclusionModeDefinition.namedTypeDefinitions.has(t.objectType.name))return[];let n;if(n=e||new I.A({where:"1=1",outFields:["*"]}),"link-chart"===t.parentCompositeLayer.type){const e=t.parentCompositeLayer,r=this._processingCacheUpdatesLookup.get(t.objectType.name??""),s=n.outFields;s&&1===s.length&&s[0]===M&&"1=1"===n.where||await Promise.all(r??[]);const i=this.sublayerCaches.has(t.objectType.name??"")?Array.from(this.sublayerCaches.get(t.objectType.name)?.values()):[],o=[];return i.forEach((r=>{this.relationshipTypeNames.has(t.objectType.name)?r.geometry=e.relationshipLinkChartDiagramLookup.get(r.attributes[t.objectIdField]):r.geometry=e.entityLinkChartDiagramLookup.get(r.attributes[t.objectIdField]),r.attributes[A]=r.geometry,o.push(r)})),o}return this.retrieveDataFromService(n,t,r)}async getConnectedRecordIds(e,t){const r=[];let n="";const s=[],i=new Map;if(e.forEach((e=>{if(this.memberIdTypeLookup.has(e))for(const t of this.memberIdTypeLookup.get(e)){if(!this.entityTypeNames.has(t))return;i.has(t)?i.get(t)?.push(e):i.set(t,[e])}})),t&&0!==t?.length){for(const e of t)n=n+e+"|";n=n.slice(0,-1)}return i.forEach(((e,i)=>{let a;a=t&&0!==t?.length?`MATCH (n:${i})-[r:${n}]-(m) WHERE id(n) IN $ids RETURN id(r), type(r), id(m), labels(m)[0]`:`MATCH (n:${i})-[r]-(m) WHERE id(n) IN $ids RETURN id(r), type(r), id(m), labels(m)[0]`;const l=new Promise((t=>{(async()=>{const t=(await(0,b.executeQueryStreaming)(this.knowledgeGraph,new w.A({openCypherQuery:a,bindParameters:{ids:e}}))).resultRowsStream.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;for(let e=0;e<n.length;e++){const t=n[e];r.push({id:t[0],typeName:t[1]}),r.push({id:t[2],typeName:t[3]})}}}catch(e){if("AbortError"!==e.name)throw e;o.A.getLogger(this).info("Request aborted as expected")}})().then((()=>{t()}))}));s.push(l)})),this.refreshCacheContent(),await Promise.all(s),r}async getRelationshipsBetweenNodes(e,t){const r=[],n=(await(0,b.executeQueryStreaming)(this.knowledgeGraph,new w.A({openCypherQuery:"MATCH (n)-[r]->(m) WHERE id(n) IN $nodeIds AND id(m) in $nodeIds AND NOT id(r) IN $relationshipExclusionIds return id(r), type(r)",bindParameters:{nodeIds:e,relationshipExclusionIds:t}}))).resultRowsStream.getReader();try{for(;;){const{done:e,value:t}=await n.read();if(e)break;for(let e=0;e<t.length;e++){const n=t[e];r.push({id:n[0],typeName:n[1]})}}}catch(e){if("AbortError"!==e.name)throw e;o.A.getLogger(this).info("Request aborted as expected")}return r}async getRelationshipsFromNodes(e,t,r){const n=[],s=(await(0,b.executeQueryStreaming)(this.knowledgeGraph,new w.A({openCypherQuery:"MATCH (n)-[r]-(m) WHERE id(n) IN $targetEntityIds AND id(m) in $possibleConnectionEntityIds AND NOT id(r) IN $relationshipExclusionIds return id(r), type(r)",bindParameters:{targetEntityIds:e,possibleConnectionEntityIds:t,relationshipExclusionIds:r}}))).resultRowsStream.getReader();try{for(;;){const{done:e,value:t}=await s.read();if(e)break;for(let e=0;e<t.length;e++){const r=t[e];n.push({id:r[0],typeName:r[1]})}}}catch(e){if("AbortError"!==e.name)throw e;o.A.getLogger(this).info("Request aborted as expected")}return n}async refreshCacheContent(e,t,r,n=!0){const s=g.getInstance(),o=[],l=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))l.has(t)?l.get(t)?.push(e):l.set(t,[e])})):this.inclusionModeDefinition?.namedTypeDefinitions?.forEach(((e,t)=>{e.useAllData?l.set(t,null):e.members&&e.members.forEach((e=>{l.has(t)&&null!==l.get(t)?l.get(t)?.push(e.id):l.set(t,[e.id])}))})):(this.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&l.set(e.name,null)})),this.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&l.set(e.name,null)})));for(const[e,h]of l){const l=new Promise((o=>{(async()=>{const o=new Set,l=[];let u,p="",c=!1;if(t||d.get(e)?.properties?.forEach((e=>{e.name&&o.add(e.name)})),r&&this.geographicLookup.has(e)){const t=this.geographicLookup.get(e)?.name;t&&o.add(t)}if(this.entityTypeNames.has(e))p=`MATCH (n:${e}) ${h?"WHERE id(n) IN $ids ":""}return ID(n)`,o.forEach((e=>{p+=`, n.${e}`,l.push(e)}));else{if(!this.relationshipTypeNames.has(e))throw new i.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?`);c=!0,p=`MATCH ()-[n:${e}]->() ${h?"WHERE id(n) IN $ids ":""}return ID(n), id(startNode(n)), id(endNode(n))`,o.forEach((e=>{p+=`, n.${e}`,l.push(e)}))}u=new w.A(h?{openCypherQuery:p,bindParameters:{ids:h}}:{openCypherQuery:p});const y=(await(0,b.executeQueryStreaming)(this.knowledgeGraph,u)).resultRowsStream.getReader();for(;;){const{done:t,value:r}=await y.read();if(t)break;const i=[];for(let e=0;e<r.length;e++){const t=r[e];let n=0,s=0;const o={properties:{}};for(o.id=t[n],n++,s++,c&&(o.originId=t[n],n++,s++,o.destinationId=t[n],n++,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])));n<t.length;n++)o.properties[l[n-s]]=t[n];i.push(o)}const o=s.writeToStore(i,M,this.geographicLookup.get(e)?.name);this.sublayerCaches.has(e)||this.sublayerCaches.set(e,new Map),n&&!this.inclusionModeDefinition?.namedTypeDefinitions.has(e)&&this.inclusionModeDefinition?.namedTypeDefinitions.set(e,{useAllData:!1,members:new Map}),n&&!this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members&&(this.inclusionModeDefinition.namedTypeDefinitions.get(e).members=new Map);const d=this.sublayerCaches.get(e);o.forEach((t=>{d?.set(t.attributes[M],t),n&&!this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members.has(t.attributes[M])&&(this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members.set(t.attributes[M],{id:t.attributes[M]}),(0,a.tE)(this.memberIdTypeLookup,t.attributes[M],(()=>new Set)).add(e))}))}})().then((()=>{o(null)}))}));o.push(l),this._processingCacheUpdatesLookup.get(e)?.push(l)}await Promise.all(o)}removeFromLayer(e){const t=new Set,r=new Set(e.map((e=>e.id)));for(const r of e)t.add(r.typeName),1===this.memberIdTypeLookup.get(r.id)?.size?this.memberIdTypeLookup.delete(r.id):this.memberIdTypeLookup.get(r.id)?.delete(r.typeName),this.inclusionModeDefinition?.namedTypeDefinitions.forEach(((e,t)=>{t===r.typeName&&e.members?.has(r.id)&&e.members.delete(r.id)}));t.forEach((e=>{this.sublayerCaches.get(e)?.forEach(((t,n)=>{r.has(n)&&this.sublayerCaches.get(e)?.delete(n)}))}))}async retrieveDataFromService(e,t,r){const n=g.getInstance(),s=new Set,o=[];let a,d="",h=[];const y="relationship"===t.graphType,m=this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData,f=t.parentCompositeLayer.sublayerIdsCache.get(t.objectType.name);let I=!m&&f?Array.from(f).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 r=e.outFields;r.includes("*")?t.fields.forEach((e=>{s.add(e.name)})):r.forEach((e=>{e!==M&&e!==t.geometryFieldName&&s.add(e)}))}if(null!=e.geometry){const r=e.geometry;let n;const h=t.parentCompositeLayer.dataManager.knowledgeGraph.serviceDefinition,m=h?.spatialReference,f=h?.serviceCapabilities?.geometryCapabilities;let g=f?.geometryMaxBoundingRectangleSizeX,b=f?.geometryMaxBoundingRectangleSizeY;if(r?.extent?.spatialReference&&!r.spatialReference?.isWGS84?(await(0,p.initializeProjection)(r.extent.spatialReference,c.KK),n=(0,p.project)(r.extent,c.KK)):n=r.extent,g&&b&&m){if(4326!==m.wkid){const e=new v.A({spatialReference:m,xmax:g,ymax:b}),t=(0,p.project)(e,c.KK);g=t.xmax,b=t.ymax}if(n.xmax-n.xmin>g)throw new i.A("knowledge-graph:layer-data-manager",`Extent x bounds should be within ${g}° latitude, limit exceeded`);if(n.ymax-n.ymin>b)throw new i.A("knowledge-graph:layer-data-manager",`Extent y bounds should be within ${b}° longitude, limit exceeded`)}if(null!=e.where&&"1=1"!==e.where){const r=await(0,l.G)(e.where.toUpperCase(),t.fieldsIndex);t.fields.forEach((e=>{r.fieldNames.includes(e.name)&&s.add(e.name)}))}d=y?`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&&s.add(t.geometryFieldName),s.forEach((e=>{d+=`, n.${e}`,o.push(e)})),a=new w.A({openCypherQuery:d,bindParameters:{param_filter_geom:new u.A({rings:(0,_.DX)(n)})}})}else{let r="";if(null!=e.where&&"1=1"!==e.where){const n=await(0,l.G)(e.where,t.fieldsIndex);t.fields.forEach((e=>{n.fieldNames.includes(e.name)&&s.add(e.name)}));const i=new Set(["column-reference","string","number","binary-expression"]),o=new Set(["=","<","<=","<>",">",">=","AND","OR","LIKE"]);let a=!1;const d=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&&i.has(e.left.type)&&i.has(e.right.type)&&o.has(e.operator))return`${d(e.left)} ${e.operator} ${d(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 r=e.right.value;"%"===r.charAt(0)&&(r=r.slice(1)),"%"===r.charAt(r.length-1)&&(r=r.slice(0,-1)),t+=`'${r.toLowerCase()}')`}return t}return a=!0,""};r=d(n.parseTree),a&&(r="")}let n="";n=y?`Match ()-[n:${t.objectType.name}]->()`:`Match (n:${t.objectType.name})`;let i=!1;I&&(i=!0,n+=" WHERE ID(n) IN $ids"),r&&(n+=i?" AND":" WHERE",n+=` ${r}`),n+=" return ID(n)",y&&(n+=", id(startNode(n)), id(endNode(n))"),e.returnGeometry&&t.geometryFieldName&&s.add(t.geometryFieldName),s.forEach((e=>{n+=`, n.${e}`,o.push(e)})),a=new w.A(I?{openCypherQuery:n,bindParameters:{ids:I}}:{openCypherQuery:n})}const T=(await(0,b.executeQueryStreaming)(t.parentCompositeLayer.dataManager.knowledgeGraph,a,r)).resultRowsStream.getReader();for(;;){const{done:e,value:r}=await T.read();if(e)break;const s=[];for(let e=0;e<r.length;e++){const t=r[e];let n=0,i=0;const a={properties:{}};for(a.id=t[n],n++,i++,y&&(a.originId=t[n],n++,i++,a.destinationId=t[n],n++,i++);n<t.length;n++)a.properties[o[n-i]]=t[n];s.push(a)}h=h.concat(n.writeToStore(s,M,t.parentCompositeLayer.dataManager.geographicLookup.get(t.objectType.name)?.name))}return h}};(0,n._)([(0,d.MZ)()],k.prototype,"knowledgeGraph",void 0),(0,n._)([(0,d.MZ)()],k.prototype,"inclusionModeDefinition",void 0),(0,n._)([(0,d.MZ)()],k.prototype,"entityTypeNames",void 0),(0,n._)([(0,d.MZ)()],k.prototype,"relationshipTypeNames",void 0),(0,n._)([(0,d.MZ)()],k.prototype,"geographicLookup",void 0),(0,n._)([(0,d.MZ)()],k.prototype,"sublayerCaches",void 0),(0,n._)([(0,d.MZ)()],k.prototype,"nodeConnectionsLookup",void 0),(0,n._)([(0,d.MZ)()],k.prototype,"relationshipConnectionsLookup",void 0),(0,n._)([(0,d.MZ)()],k.prototype,"memberIdTypeLookup",void 0),k=(0,n._)([(0,h.$)("esri.layers.knowledgeGraph.KnowledgeGraphLayerDataManager")],k)},70643:(e,t,r)=>{r.d(t,{A:()=>W});var n=r(90237),s=(r(59456),r(13874)),i=(r(86162),r(94409),r(65345),r(42980),r(39290),r(92438),r(96576),r(93618),r(65494)),o=r(15036),a=r(4718),l=r(92071),d=(r(29953),r(10107)),h=(r(44208),r(53966),r(40608)),u=r(43937),p=r(35666),c=r(57251),y=r(16930),m=r(21325),f=r(4146),g=r(83221),_=r(17970),b=r(64714),w=r(61184);r(87811);const I=(0,r(17036).p)(),v=e=>{let t=class extends e{constructor(){super(...arguments),this.fields=[],this.fieldsIndex=null}};return(0,n._)([(0,d.MZ)(I.fields)],t.prototype,"fields",void 0),(0,n._)([(0,d.MZ)(I.fieldsIndex)],t.prototype,"fieldsIndex",void 0),t=(0,n._)([(0,h.$)("esri.layers.knowledgeGraph.KnowledgeGraphSublayerBase")],t),t};var M=r(63074),T=r(87718),E=r(76294),A=r(32756),x=r(54310),k=r(25036),N=r(82935),S=r(10873),L=r(13213),C=r(20437),D=r(30524),R=r(81457),B=r(39383),j=r(22671),O=r(61956),P=r(30291),F=r(61322),q=r(5443),G=r(39829),Z=r(82799),$=r(50498);function Y(e){if(!e.json)return e;e.json.write=J(e.json.write);const t=e.json.origins;if(!t)return e;let r;for(r in t){const e=t[r];e&&(e.write=J(e.write))}return e}function J(e){return"object"==typeof e&&e?(!1!==e.enabled&&(e.overridePolicy=function(e){const{target:t,writer:r,overridePolicy:n,...s}=e;return function(e,t){const r=H.call(this,e,t);return r.enabled?{...s,...r}:r}}(e)),e):!0===e?U():e}function U(){return{overridePolicy:H}}function H(e,t){const r=!!this.geometryType;let n={enabled:r};return r&&(n={...n,...Q.call(this,e,t)}),n}function Q(e,t){return{ignoreOrigin:this.originIdOf(t)>p.Gr.DEFAULTS}}let X=class extends(v((0,E.J)((0,T.F)((0,M.dM)((0,A.f)((0,N.e)((0,k.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=w.yC,this.objectType=null,this.opacity=1,this.orderBy=null,this.parentCompositeLayer=null,this.popupEnabled=!0,this.popupTemplate=null,this.refreshInterval=0,this.source={openPorts:()=>this.load().then((()=>{const e=new MessageChannel;return new F.default(e.port1,{channel:e,client:{queryFeatures:(e,t={})=>{const r=O.A.fromJSON(e);return this.queryFeaturesJSON(r,t)}}}),[e.port2]}))},this.title=null,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 r="esriFieldTypeOID"===t.fieldType?"esriFieldTypeInteger":t.fieldType;e.push(C.A.fromJSON({name:t.name,type:r,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:w.d4,type:"esriFieldTypeInteger",alias:w.d4,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?$.g.fromJSON(t):null}get geometryFieldName(){if("link-chart"===this.parentCompositeLayer?.type)return w.sZ;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,r=t?this.objectType?.properties?.[t]:null;return r?.hasM??!1}get hasZ(){const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.name,r=t?this.objectType?.properties?.[t]:null;return r?.hasZ??!1}set renderer(e){(0,D.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,i.r)((0,b.F0)($.g.toJSON("polyline")).renderer):(0,i.r)((0,b.F0)($.g.toJSON("point")).renderer):(0,i.r)((0,b.F0)($.g.toJSON(this.geometryType)).renderer)}get spatialReference(){return this.parentCompositeLayer?.dataManager?.knowledgeGraph?.dataModel?.spatialReference??y.A.WGS84}writeTitle(e,t){t.title=e??"Layer"}createPopupTemplate(e){return(0,P.tn)(this,e)}createQuery(){return new O.A({where:"1=1",outFields:["*"]})}getField(e){for(let t=0;t<this.fields.length;t++)if(this.fields[t].name===e)return this.fields[t];return null}getFieldDomain(e,t){return null}async queryFeatures(e,t){const{resolvedQuery:r,queryEngine:n}=await this._setupQueryObjects(e),s=j.A.fromJSON(await n.executeQuery(r.toJSON(),t?.signal));return s.features.forEach((e=>{e.sourceLayer=this})),s}async queryFeaturesJSON(e,t){const{resolvedQuery:r,queryEngine:n}=await this._setupQueryObjects(e);return await n.executeQuery(r.toJSON(),t?.signal)}async queryFeatureCount(e,t){const{resolvedQuery:r,queryEngine:n}=await this._setupQueryObjects(e);return n.executeQueryForCount(r.toJSON(),t?.signal)}async queryExtent(e={},t){const r={...e,returnGeometry:!0},{resolvedQuery:n,queryEngine:s}=await this._setupQueryObjects(r),i=await s.executeQueryForExtent(n.toJSON(),t?.signal);let o;return o=null!=i.extent?.xmin&&null!=i.extent?.xmax&&null!=i.extent?.ymin&&null!=i.extent?.ymax?new q.A(i.extent):new q.A,{count:i.count,extent:o}}async queryObjectIds(e,t){const r=O.A.from(e);let n;if("link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)n=this._cachedQueryEngine;else{const e=await this.parentCompositeLayer.dataManager.getData(r,this,t);n=this.loadQueryEngine(e)}return n.executeQueryForIds(r.toJSON(),t?.signal)}loadQueryEngine(e){const t=new g.A({geometryType:$.g.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ}),r=new _.d({fieldsIndex:this.fieldsIndex.toJSON(),geometryType:$.g.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ,objectIdField:this.objectIdField,spatialReference:this.spatialReference.toJSON(),timeInfo:null,featureStore:t});return r.featureStore.addMany(e),r}async refreshCachedQueryEngine(){const e=await this.parentCompositeLayer.dataManager.getData(new O.A({where:"1=1",outFields:[w.yC]}),this);this._cachedQueryEngine=this.loadQueryEngine(e)}async _setupQueryObjects(e,t){const r=O.A.from(e),n=r.geometry;let s;if(n&&!n.spatialReference?.isWGS84&&(await(0,c.initializeProjection)(n.spatialReference,m.KK),r.geometry=(0,c.project)(n instanceof G.A||n instanceof Z.A?n:n.extent,m.KK)),"link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)s=this._cachedQueryEngine;else{const e=await this.parentCompositeLayer.dataManager.getData(r,this,t);s=this.loadQueryEngine(e)}return{resolvedQuery:r,queryEngine:s}}};(0,n._)([(0,d.MZ)(Y((0,a.o8)(M.sU)))],X.prototype,"blendMode",void 0),(0,n._)([(0,d.MZ)()],X.prototype,"capabilities",void 0),(0,n._)([(0,d.MZ)({json:{origins:{"web-scene":{write:!1}},write:U()}})],X.prototype,"charts",void 0),(0,n._)([(0,d.MZ)({readOnly:!0})],X.prototype,"defaultPopupTemplate",null),(0,n._)([(0,d.MZ)({type:String,json:{origins:{service:{read:!1}},name:"layerDefinition.definitionExpression",write:{ignoreOrigin:!0}}})],X.prototype,"definitionExpression",void 0),(0,n._)([(0,d.MZ)()],X.prototype,"displayField",void 0),(0,n._)([(0,d.MZ)(Y((0,a.o8)(M.LF)))],X.prototype,"effect",void 0),(0,n._)([(0,d.MZ)()],X.prototype,"elevationInfo",void 0),(0,n._)([(0,d.MZ)(Y((0,a.o8)(T.Y)))],X.prototype,"featureEffect",void 0),(0,n._)([(0,d.MZ)(Y((0,a.o8)(L.d)))],X.prototype,"featureReduction",null),(0,n._)([(0,d.MZ)()],X.prototype,"fields",null),(0,n._)([(0,d.MZ)()],X.prototype,"geometryType",null),(0,n._)([(0,d.MZ)()],X.prototype,"geometryFieldName",null),(0,n._)([(0,d.MZ)({type:["entity","relationship"],nonNullable:!0,json:{write:{isRequired:!0,ignoreOrigin:!0}}})],X.prototype,"graphType",void 0),(0,n._)([(0,d.MZ)({type:String,nonNullable:!0,json:{write:{isRequired:!0,ignoreOrigin:!0}}})],X.prototype,"graphTypeName",null),(0,n._)([(0,d.MZ)()],X.prototype,"hasM",null),(0,n._)([(0,d.MZ)()],X.prototype,"hasZ",null),(0,n._)([(0,d.MZ)({type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0}}})],X.prototype,"id",void 0),(0,n._)([(0,d.MZ)(Y((0,a.o8)(S.kF)))],X.prototype,"labelsVisible",void 0),(0,n._)([(0,d.MZ)({type:[R.A],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:B.w,write:U()}})],X.prototype,"labelingInfo",void 0),(0,n._)([(0,d.MZ)({readOnly:!0,json:{read:!1,write:{writer(e,t){t.layerType=this.geometryType?"KnowledgeGraphSubLayer":"KnowledgeGraphSubTable"},isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],X.prototype,"layerType",void 0),(0,n._)([(0,d.MZ)(Y((0,a.o8)(S.fV)))],X.prototype,"legendEnabled",void 0),(0,n._)([(0,d.MZ)(Y((0,a.o8)(S.hG)))],X.prototype,"maxScale",void 0),(0,n._)([(0,d.MZ)(Y((0,a.o8)(S.hn)))],X.prototype,"minScale",void 0),(0,n._)([(0,d.MZ)()],X.prototype,"objectIdField",void 0),(0,n._)([(0,d.MZ)()],X.prototype,"objectType",void 0),(0,n._)([(0,d.MZ)(Y((0,a.o8)(S.ke)))],X.prototype,"opacity",void 0),(0,n._)([(0,d.MZ)(Y((0,a.o8)(A.n)))],X.prototype,"orderBy",void 0),(0,n._)([(0,d.MZ)()],X.prototype,"parentCompositeLayer",void 0),(0,n._)([(0,d.MZ)(Y((0,a.o8)(S.M6)))],X.prototype,"popupEnabled",void 0),(0,n._)([(0,d.MZ)({type:s.A,json:{name:"popupInfo",write:{ignoreOrigin:!0}}})],X.prototype,"popupTemplate",void 0),(0,n._)([(0,d.MZ)({type:Number,json:{write:{overridePolicy:Q}}})],X.prototype,"refreshInterval",void 0),(0,n._)([(0,d.MZ)({types:o.H,json:{name:"layerDefinition.drawingInfo.renderer",write:U()}})],X.prototype,"renderer",null),(0,n._)([(0,d.MZ)()],X.prototype,"source",void 0),(0,n._)([(0,d.MZ)()],X.prototype,"spatialReference",null),(0,n._)([(0,d.MZ)({type:String,json:{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],X.prototype,"title",void 0),(0,n._)([(0,u.K)("title")],X.prototype,"writeTitle",null),(0,n._)([(0,d.MZ)({json:{read:!1}})],X.prototype,"type",void 0),(0,n._)([(0,d.MZ)(Y((0,a.o8)(N.B)))],X.prototype,"useViewTime",void 0),(0,n._)([(0,d.MZ)({type:Boolean,json:{name:"visibility",write:U()}})],X.prototype,"visible",void 0),X=(0,n._)([(0,h.$)("esri.layers.knowledgeGraph.KnowledgeGraphSublayer")],X);const W=X},45654:(e,t,r)=>{r.d(t,{DX:()=>_,_s:()=>w,aq:()=>b,fe:()=>I}),r(59456),r(52106);var n,s,i,o,a=r(78888),l=(r(61147),r(49186)),d=r(91869),h=(r(94194),r(90708),r(8460),r(71932)),u=r(42538);r(16930),(s=n||(n={})).ELEMENTUID="ELEMENTUID",s.TYPENAME="TYPENAME",n.ELEMENTUID,n.TYPENAME,function(e){e[e.ELEMENTUID=0]="ELEMENTUID",e[e.TYPENAME=1]="TYPENAME"}(i||(i={})),function(e){e[e.ELEMENTUID=0]="ELEMENTUID",e[e.TYPENAME=1]="TYPENAME",e[e.FROMUID=2]="FROMUID",e[e.TOUID=3]="TOUID"}(o||(o={}));var p,c,y,m,f,g=r(45724);function _(e){if(!e.spatialReference.isWGS84)throw new l.A("knowledge-graph:layer-support-utils","The extentToInBoundsRings 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]]))}async function b(e,t){const r=[],n=new Map,s=[];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);for(const[e,i]of n){if(i.length<1)continue;const n=new u.A({openCypherQuery:`MATCH (n)-[r:${e}]->(m) WHERE id(r) in $ids RETURN id(n), labels(n)[0], id(m), labels(m)[0]`,bindParameters:{ids:i}});s.push((0,h.executeQueryStreaming)(t,n).then((async e=>{const t=e.resultRowsStream.getReader();for(;;){const{done:e,value:n}=await t.read();if(e)break;for(const e of n)r.push({id:e[0],typeName:e[1]}),r.push({id:e[2],typeName:e[3]})}})))}return await Promise.all(s),r}async function w(e,t){t??=!1;const r={generateAllSublayers:t,namedTypeDefinitions:new Map};return await async function(e){const t=await(0,a.A)(e,{responseType:"array-buffer"}),r=await t.data;return async function(e){const t=new((await(0,g.I)()).MapOfObjectIdentifierSetsDecoder),r=t.decode(new Uint8Array(e)),n=new Map;if(0!==r.error_code)throw new l.A("knowledge-graph:layer-support-utils",r.error_message);const s=t.get_map_of_identifier_sets(),i=s.keys,o=i.size();for(let e=0;e<o;e++){const t=i.get(e),r=s.query_identifier_set(t),o=[];if(r.id_array_type.value===m.GLOBALID_ARRAY){const e=r.get_globalid_array(),t=e.count();for(let r=0;r<t;r++)o.push(e.get_globalid_at(r))}else{if(r.id_array_type.value!==m.IDENTIFIER_ARRAY)throw new l.A("knowledge-graph:layer-support-utils","Tried to encode an unexpected ID Array type.");{const e=r.get_identifier_array(),t=e.count();for(let r=0;r<t;r++)o.push(e.get_identifier_at(r).toString())}}n.set(t,o)}return t.delete(),n}(new Uint8Array(r))}(e).then((e=>{!function(e,t){for(const[r,n]of e){const e=(0,d.tE)(t.namedTypeDefinitions,r,(()=>({useAllData:!1,members:new Map})));for(const t of n)e.members.has(t)||e.members.set(t,{id:t})}}(e,r)})),r}async function I(e){const t=await(0,g.I)(),r=new t.MapOfObjectIdentifierSets;!function(e,t,r){for(const[n,s]of r.namedTypeDefinitions){if(!s.members||s.useAllData)continue;const r=s.members.keys(),i=new t.GlobalIdArray,o=new t.ObjectIdentifierSet;for(const e of r)i.add_globalid(e);o.set_globalid_array(i),i.delete(),e.put_identifier_set(n,o),o.delete()}}(r,t,e);const n=new t.MapOfObjectIdentifierSetsEncoder;try{n.set_map_of_identifier_sets(r),n.encode();const e=n.get_encoding_result();if(0!==e.error.error_code)throw new l.A("knowledge-graph:layer-support-utils",e.error.error_message);const t=structuredClone(e.get_byte_buffer());return n.delete(),t}finally{r.delete()}}r(35448),(f=p||(p={}))[f.featureResult=0]="featureResult",f[f.countResult=1]="countResult",f[f.idsResult=2]="idsResult",function(e){e[e.upperLeft=0]="upperLeft",e[e.lowerLeft=1]="lowerLeft"}(c||(c={})),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"}(y||(y={})),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"}(m||(m={})),r(31593),r(82799),r(94985),r(39829),r(68249),r(86738)},32756:(e,t,r)=>{r.d(t,{f:()=>d,n:()=>l});var n=r(90237),s=r(93637),i=r(10107),o=(r(44208),r(53966),r(87811),r(40608)),a=r(91880);const l={type:[a.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:function(e,t,r){if(!e)return null;const n=e.find((e=>!!e.field));if(!n)return null;const s=new a.A;return s.read(n,r),[s]}},write:{writer:function(e,t,r,n){const i=e.find((e=>!!e.field));i&&(0,s.sM)(r,[i.toJSON()],t)}}}},d=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return(0,n._)([(0,i.MZ)(l)],t.prototype,"orderBy",void 0),t=(0,n._)([(0,o.$)("esri.layers.mixins.OrderedLayer")],t),t}},54310:(e,t,r)=>{r.d(t,{J:()=>b});var n=r(90237),s=(r(44208),r(53966)),i=r(74887),o=r(10107),a=r(79901),l=(r(87811),r(40608)),d=r(89317),h=r(5503),u=(r(60999),r(49186),r(14012),r(80559));const p=new h.A,c=new WeakMap;function y(e){(function(e){return null!=e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e})(e)&&p.push(new WeakRef(e))}function m(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:m(t,e%t):0}let f=0,g=0;function _(){const e=Date.now();let t=!1;for(const r of p){const n=r.deref();n?n.refreshInterval&&e-(c.get(n)??0)+5>=6e4*n.refreshInterval&&(c.set(n,e),n.refresh(e)):t=!0}if(t)for(let e=p.length-1;e>=0;e--)p.at(e).deref()||p.removeAt(e)}(0,u.fm)((()=>{const e=Date.now();let t=0;for(const r of p){const n=r.deref();n&&(t=m(Math.round(6e4*n.refreshInterval),t),n.refreshInterval?c.get(n)||c.set(n,e):c.delete(n))}if(t!==g){if(g=t,clearInterval(f),0===g)return void(f=0);f=setInterval(_,g)}}));const b=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,i.sg)((()=>this.hasDataChanged())),this.when().then((()=>{this.destroyed||y(this)}),(()=>{}))}destroy(){!function(e){const t=p.find((t=>t.deref()===e));t&&p.remove(t)}(this)}castRefreshInterval(e){return e>=.1?e:e<=0?0:.1}get refreshParameters(){return{_ts:this.refreshTimestamp||null}}refresh(e=Date.now()){(0,i.QZ)(this._debounceHasDataChanged()).then((t=>{t&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:t})}),(e=>{s.A.getLogger(this).error(e),this.emit("refresh",{dataChanged:!1,error:e})}))}async hasDataChanged(){return!0}get test(){}};return(0,n._)([(0,o.MZ)({type:Number,json:{write:!0,origins:{"web-scene":{write:{enabled:!0,layerContainerTypes:d.K}}}}})],t.prototype,"refreshInterval",void 0),(0,n._)([(0,a.w)("refreshInterval")],t.prototype,"castRefreshInterval",null),(0,n._)([(0,o.MZ)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,n._)([(0,o.MZ)({readOnly:!0})],t.prototype,"refreshParameters",null),t=(0,n._)([(0,l.$)("esri.layers.mixins.RefreshableLayer")],t),t}},91880:(e,t,r)=>{r.d(t,{A:()=>u});var n,s=r(90237),i=r(66552),o=r(25482),a=r(10107),l=(r(44208),r(53966),r(87811),r(40608));const d=new i.J({asc:"ascending",desc:"descending"});let h=n=class extends o.oY{constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new n({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,s._)([(0,a.MZ)({type:String,json:{write:!0}})],h.prototype,"field",void 0),(0,s._)([(0,a.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],h.prototype,"valueExpression",void 0),(0,s._)([(0,a.MZ)({type:d.apiValues,json:{type:d.jsonValues,read:d.read,write:d.write}})],h.prototype,"order",void 0),h=n=(0,s._)([(0,l.$)("esri.layers.support.OrderByInfo")],h);const u=h},8460:(e,t,r)=>{r.d(t,{$C:()=>y,Hh:()=>o,J:()=>l,Tu:()=>p,Wg:()=>c,Xq:()=>f,i6:()=>g,pM:()=>u,tx:()=>a,vJ:()=>m});var n=r(2741);let s,i=null;function o(){return s||(s=r.e(3666).then(r.bind(r,3666)).then((e=>e.l)).then((({default:e})=>e({locateFile:e=>(0,n.s)(`esri/libs/linkchartlayout/${e}`)}))).then((e=>{!function(e){i=e}(e)})),s)}var a,l,d,h,u,p,c,y,m,f,g,_,b;function w(e,t,r,n,s,o){const a=r.length,l=s.length,d=Float64Array.BYTES_PER_ELEMENT,h=Uint32Array.BYTES_PER_ELEMENT,u=Uint8Array.BYTES_PER_ELEMENT,p=16+a*(u+2*d)+l*(2*h),c=i._malloc(p);try{const u=c+16-c%16,p=u+a*d,y=p+a*d,m=y+l*h,f=m+l*h,g=()=>[i.HEAPF64.subarray(u>>3,(u>>3)+a),i.HEAPF64.subarray(p>>3,(p>>3)+a),i.HEAPU32.subarray(y>>2,(y>>2)+l),i.HEAPU32.subarray(m>>2,(m>>2)+l),i.HEAPU8.subarray(f,f+a)],[_,b,w,I,v]=g();_.set(r),b.set(n),w.set(s),I.set(o),v.set(t);let M=e(a,f,u,p,l,y,m),T=null,E=null;if(M){const e=i.getLayoutLinksTypes(),t=i.getLayoutLinksVerticesEndIndices(),r=i.getLayoutLinksVertices(),n=i.countLayoutLinksVertices();!l||e&&t?n&&!r?M=!1:(T={types:new Uint8Array(i.HEAPU8.subarray(e,e+l)),vertexEndIndex:new Uint32Array(i.HEAPU32.subarray(t>>2,(t>>2)+l)),vertices:new Float64Array(i.HEAPF64.subarray(r>>3,(r>>3)+2*n))},E=i.getAuxiliaryGraphicElements()):M=!1}const[A,x,k,N,S]=g();return r.set(A),n.set(x),s.set(k),o.set(N),t.set(S),{success:M,links:T,graphics:E}}finally{i._free(c),i.cleanupLayout()}}(h=a||(a={}))[h.None=0]="None",h[h.IsMovable=1]="IsMovable",h[h.IsGeographic=2]="IsGeographic",h[h.IsRoot=4]="IsRoot",function(e){e[e.Regular=0]="Regular",e[e.Orthogonal=1]="Orthogonal",e[e.Curved=2]="Curved",e[e.Recursive=3]="Recursive"}(l||(l={})),function(e){e[e.Right=0]="Right",e[e.Left=1]="Left",e[e.Up=2]="Up",e[e.Down=3]="Down"}(d||(d={})),function(e){e.getMinIdealEdgeLength=function(){return i.getMinIdealEdgeLength()},e.apply=function(e,t,r,n,s,o=2,a=1,l=-1){return w(((e,t,r,n,s,d,h)=>i.applyForceDirectedLayout(e,t,r,n,s,d,h,o,a,l)),e,t,r,n,s)}}(u||(u={})),function(e){e.apply=function(e,t,r,n,s,o=2,a=1,l=-1){return w(((e,t,r,n,s,d,h)=>i.applyCommunityLayout(e,t,r,n,s,d,h,o,a,l)),e,t,r,n,s)}}(p||(p={})),function(e){e.apply=function(e,t,r,n,s){return w(i.applySimpleLayout,e,t,r,n,s)}}(c||(c={})),function(e){e.apply=function(e,t,r,n,s){return w(i.applyHierarchicalLayout,e,t,r,n,s)}}(y||(y={})),function(e){e.apply=function(e,t,r,n,s){return w(i.applyRadialTreeLayout,e,t,r,n,s)}}(m||(m={})),function(e){e.apply=function(e,t,r,n,s){return w(i.applySmartTreeLayout,e,t,r,n,s)}}(f||(f={})),function(e){e.apply=function(e,t,r,n,s,o,a,l,d){return w(((e,t,r,o,a,h,u)=>{if(n.length!==e)return!1;if(s.length!==e)return!1;if(l.length!==a)return!1;if(d.length!==a)return!1;const p=Float64Array.BYTES_PER_ELEMENT,c=16,y=i._malloc(c+e*p),m=i._malloc(c+e*p),f=i._malloc(c+a*p),g=i._malloc(c+a*p),_=y+c-y%c,b=m+c-m%c,w=f+c-f%c,I=g+c-g%c;try{return i.HEAPF64.subarray(_>>3,(_>>3)+e).set(n),i.HEAPF64.subarray(b>>3,(b>>3)+e).set(s),i.HEAPF64.subarray(w>>3,(w>>3)+a).set(l),i.HEAPF64.subarray(I>>3,(I>>3)+a).set(d),i.applyChronologicalLayout(e,t,r,o,_,b,a,h,u,w,I)}finally{i._free(y),i._free(m),i._free(f),i._free(g)}}),e,t,r,o,a)}}(g||(g={})),function(e){e[e.Undirected=0]="Undirected",e[e.Directed=1]="Directed",e[e.Reversed=2]="Reversed"}(_||(_={})),function(e){e[e.ByCC_Raw=0]="ByCC_Raw",e[e.ByCC_NormalizeGlobally=1]="ByCC_NormalizeGlobally",e[e.ByCC_NormalizeByCC=2]="ByCC_NormalizeByCC"}(b||(b={}))},25927:(e,t,r)=>{r.d(t,{A:()=>d});var n=r(90237),s=(r(59456),r(10107)),i=(r(44208),r(53966),r(87811),r(40608)),o=r(54238),a=r(86738);let l=class extends o.A{constructor(e){super(e),this.layoutGeometry=null}};(0,n._)([(0,s.MZ)({type:a.A,json:{write:!0}})],l.prototype,"layoutGeometry",void 0),l=(0,n._)([(0,i.$)("esri.rest.knowledgeGraph.Entity")],l);const d=l},54238:(e,t,r)=>{r.d(t,{A:()=>l});var n=r(90237),s=r(10107),i=(r(44208),r(53966),r(87811),r(40608)),o=r(77901);let a=class extends o.A{constructor(e){super(e),this.typeName=null,this.id=null}};(0,n._)([(0,s.MZ)({type:String,json:{write:!0}})],a.prototype,"typeName",void 0),(0,n._)([(0,s.MZ)({type:String,json:{write:!0}})],a.prototype,"id",void 0),a=(0,n._)([(0,i.$)("esri.rest.knowledgeGraph.GraphNamedObject")],a);const l=a},77901:(e,t,r)=>{r.d(t,{A:()=>l});var n=r(90237),s=r(25482),i=r(10107),o=(r(44208),r(53966),r(87811),r(40608));let a=class extends s.oY{constructor(e){super(e),this.properties=null}};(0,n._)([(0,i.MZ)({json:{write:!0}})],a.prototype,"properties",void 0),a=(0,n._)([(0,o.$)("esri.rest.knowledgeGraph.GraphObject")],a);const l=a},42538:(e,t,r)=>{r.d(t,{A:()=>h});var n=r(90237),s=r(10107),i=(r(44208),r(53966),r(87811),r(40608)),o=r(69622);let a=class extends o.A{constructor(e){super(e),this.openCypherQuery=""}};(0,n._)([(0,s.MZ)()],a.prototype,"openCypherQuery",void 0),a=(0,n._)([(0,i.$)("esri.rest.knowledgeGraph.GraphQuery")],a);const l=a;let d=class extends l{constructor(e){super(e),this.bindParameters=null,this.bindGeometryQuantizationParameters=null,this.outputQuantizationParameters=null,this.outputSpatialReference=null,this.provenanceBehavior=null}};(0,n._)([(0,s.MZ)()],d.prototype,"bindParameters",void 0),(0,n._)([(0,s.MZ)()],d.prototype,"bindGeometryQuantizationParameters",void 0),(0,n._)([(0,s.MZ)()],d.prototype,"outputQuantizationParameters",void 0),(0,n._)([(0,s.MZ)()],d.prototype,"outputSpatialReference",void 0),(0,n._)([(0,s.MZ)()],d.prototype,"provenanceBehavior",void 0),d=(0,n._)([(0,i.$)("esri.rest.knowledgeGraph.GraphQueryStreaming")],d);const h=d},40662:(e,t,r)=>{r.d(t,{A:()=>a});var n=r(90237),s=(r(53966),r(44208),r(87811),r(49186),r(40608)),i=r(77901);let o=class extends i.A{constructor(e){super(e)}};o=(0,n._)([(0,s.$)("esri.rest.knowledgeGraph.ObjectValue")],o);const a=o},42095:(e,t,r)=>{r.d(t,{A:()=>d});var n=r(90237),s=r(25482),i=r(10107),o=(r(44208),r(53966),r(87811),r(40608)),a=r(77901);let l=class extends s.oY{constructor(e){super(e),this.path=null}};(0,n._)([(0,i.MZ)({type:[a.A],json:{write:!0}})],l.prototype,"path",void 0),l=(0,n._)([(0,o.$)("esri.rest.knowledgeGraph.Path")],l);const d=l},23150:(e,t,r)=>{r.d(t,{A:()=>d});var n=r(90237),s=(r(59456),r(10107)),i=(r(44208),r(53966),r(87811),r(40608)),o=r(54238),a=r(82799);let l=class extends o.A{constructor(e){super(e),this.originId=null,this.destinationId=null,this.layoutGeometry=null}};(0,n._)([(0,s.MZ)({type:String,json:{write:!0}})],l.prototype,"originId",void 0),(0,n._)([(0,s.MZ)({type:String,json:{write:!0}})],l.prototype,"destinationId",void 0),(0,n._)([(0,s.MZ)({type:a.A,json:{write:!0}})],l.prototype,"layoutGeometry",void 0),l=(0,n._)([(0,i.$)("esri.rest.knowledgeGraph.Relationship")],l);const d=l}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1363],{9775:(e,t,r)=>{r.d(t,{A:()=>i});var n=r(62788),s=r(95488);class i{constructor(e=(e=>e.values().next().value)){this._peeker=e,this._observable=new s.I,this._items=new Set}get length(){return(0,n.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,n.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,n.gc)(this._observable),yield*this._items}}},75503:(e,t,r)=>{r.d(t,{w:()=>o});var n=r(4576),s=(r(44208),r(3694)),i=r(11006);class o{constructor(e=9,t){this._compareMinX=u,this._compareMinY=p,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(),w.prune(),I.prune(),v.prune(),M.prune()}all(e){a(this._data,e)}search(e,t){let r=this._data;const n=this._toBBox;if(_(e,r))for(w.clear();r;){for(let s=0,i=r.children.length;s<i;s++){const i=r.children[s],o=r.leaf?n(i):i;_(e,o)&&(r.leaf?t(i):g(e,o)?a(i,t):w.push(i))}r=w.pop()}}collides(e){let t=this._data;const r=this._toBBox;if(!_(e,t))return!1;for(w.clear();t;){for(let n=0,s=t.children.length;n<s;n++){const s=t.children[n],i=t.leaf?r(s):s;if(_(e,i)){if(t.leaf||g(e,i))return!0;w.push(s)}}t=w.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,r=e.length;t<r;t++)this.insert(e[t]);return this}let t=this._build(e.slice(0,e.length),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 A([]),this}remove(e){if(!e)return this;let t,r=this._data,s=null,i=0,o=!1;const a=this._toBBox(e);for(v.clear(),M.clear();r||v.length>0;){if(r||(r=v.pop(),s=v.data[v.length-1],i=M.pop()??0,o=!0),r.leaf&&(t=(0,n.qh)(r.children,e,r.children.length,r.indexHint),-1!==t))return r.children.splice(t,1),v.push(r),this._condense(v),this;o||r.leaf||!g(r,a)?s?(i++,r=s.children[i],o=!1):r=null:(v.push(r),M.push(i),i=0,s=r,r=r.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,r,n){const s=r-t+1;let i=this._maxEntries;if(s<=i){const n=new A(e.slice(t,r+1));return l(n,this._toBBox),n}n||(n=Math.ceil(Math.log(s)/Math.log(i)),i=Math.ceil(s/i**(n-1)));const o=new x([]);o.height=n;const a=Math.ceil(s/i),d=a*Math.ceil(Math.sqrt(i));b(e,t,r,d,this._compareMinX);for(let s=t;s<=r;s+=d){const t=Math.min(s+d-1,r);b(e,s,t,a,this._compareMinY);for(let r=s;r<=t;r+=a){const s=Math.min(r+a-1,t);o.children.push(this._build(e,r,s,n-1))}}return l(o,this._toBBox),o}_insert(e,t,r){const n=this._toBBox,s=r?e:n(e);v.clear();const i=function(e,t,r,n){for(;n.push(t),!0!==t.leaf&&n.length-1!==r;){let r,n=1/0,s=1/0;for(let i=0,o=t.children.length;i<o;i++){const o=t.children[i],a=c(o),l=m(e,o)-a;l<s?(s=l,n=a<n?a:n,r=o):l===s&&a<n&&(n=a,r=o)}t=r||t.children[0]}return t}(s,this._data,t,v);for(i.children.push(e),h(i,s);t>=0&&v.data[t].children.length>this._maxEntries;)this._split(v,t),t--;!function(e,t,r){for(let n=r;n>=0;n--)h(t.data[n],e)}(s,v,t)}_split(e,t){const r=e.data[t],n=r.children.length,s=this._minEntries;this._chooseSplitAxis(r,s,n);const i=this._chooseSplitIndex(r,s,n);if(!i)return;const o=r.children.splice(i,r.children.length-i),a=r.leaf?new A(o):new x(o);a.height=r.height,l(r,this._toBBox),l(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(r,a)}_splitRoot(e,t){this._data=new x([e,t]),this._data.height=e.height+1,l(this._data,this._toBBox)}_chooseSplitIndex(e,t,r){let n,s,i;n=s=1/0;for(let o=t;o<=r-t;o++){const t=d(e,0,o,this._toBBox),a=d(e,o,r,this._toBBox),l=f(t,a),h=c(t)+c(a);l<n?(n=l,i=o,s=h<s?h:s):l===n&&h<s&&(s=h,i=o)}return i}_chooseSplitAxis(e,t,r){const n=e.leaf?this._compareMinX:u,s=e.leaf?this._compareMinY:p;this._allDistMargin(e,t,r,n)<this._allDistMargin(e,t,r,s)&&e.children.sort(n)}_allDistMargin(e,t,r,n){e.children.sort(n);const s=this._toBBox,i=d(e,0,t,s),o=d(e,r-t,r,s);let a=y(i)+y(o);for(let n=t;n<r-t;n++){const t=e.children[n];h(i,e.leaf?s(t):t),a+=y(i)}for(let n=r-t-1;n>=t;n--){const t=e.children[n];h(o,e.leaf?s(t):t),a+=y(o)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const r=e.data[t];if(0===r.children.length)if(t>0){const s=e.data[t-1],i=s.children;i.splice((0,n.qh)(i,r,i.length,s.indexHint),1)}else this.clear();else l(r,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 a(e,t){let r=e;for(I.clear();r;){if(!0===r.leaf)for(const e of r.children)t(e);else I.pushArray(r.children);r=I.pop()??null}}function l(e,t){d(e,0,e.children.length,t,e)}function d(e,t,r,n,s){s||(s=new A([])),s.minX=1/0,s.minY=1/0,s.maxX=-1/0,s.maxY=-1/0;for(let i,o=t;o<r;o++)i=e.children[o],h(s,e.leaf?n(i):i);return s}function h(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function u(e,t){return e.minX-t.minX}function p(e,t){return e.minY-t.minY}function c(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function y(e){return e.maxX-e.minX+(e.maxY-e.minY)}function m(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 f(e,t){const r=Math.max(e.minX,t.minX),n=Math.max(e.minY,t.minY),s=Math.min(e.maxX,t.maxX),i=Math.min(e.maxY,t.maxY);return Math.max(0,s-r)*Math.max(0,i-n)}function g(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function _(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function b(e,t,r,n,s){const o=[t,r];for(;o.length;){const t=o.pop(),r=o.pop();if(t-r<=n)continue;const a=r+Math.ceil((t-r)/n/2)*n;(0,i.q)(e,a,r,t,s),o.push(r,a,a,t)}}const w=new s.A,I=new s.A,v=new s.A,M=new s.A({deallocator:void 0});class T{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class E extends T{constructor(){super(...arguments),this.height=1,this.indexHint=new n.vW}}class A extends E{constructor(e){super(),this.children=e,this.leaf=!0}}class x extends E{constructor(e){super(),this.children=e,this.leaf=!1}}},10382:(e,t,r)=>{r.d(t,{A:()=>d});var n=r(36563),s=(r(44208),r(74887)),i=r(9775),o=r(72457),a=r(52268),l=r(61322);class d{constructor(){this._inUseClients=new Array,this._clients=new Array,this._clientPromises=new Array,this._ongoingJobsQueue=new i.A}destroy(){this.close()}get closed(){return!this._clients?.length}open(e,t){return new Promise(((r,n)=>{let i=!0;const o=e=>{(0,s.Te)(t.signal),i&&(i=!1,e())};this._clients.length=e.length,this._clientPromises.length=e.length,this._inUseClients.length=e.length;for(let i=0;i<e.length;++i){const a=e[i];(0,s.$X)(a)?this._clientPromises[i]=a.then((e=>(this._clients[i]=new l.default(e,t,this._ongoingJobsQueue),o(r),this._clients[i])),(()=>(o(n),null))):(this._clients[i]=new l.default(a,t,this._ongoingJobsQueue),this._clientPromises[i]=Promise.resolve(this._clients[i]),o(r))}}))}broadcast(e,t,r){const n=new Array(this._clientPromises.length);for(let s=0;s<this._clientPromises.length;++s){const i=this._clientPromises[s];n[s]=i.then((n=>n?.invoke(e,t,r)))}return n}close(){let e;for(;e=this._ongoingJobsQueue.pop();)e.resolver.reject((0,s.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,r){return this.apply(e,[t],r)}apply(e,t,r){const n=(0,s.Tw)();this._ongoingJobsQueue.push({methodName:e,data:t,invokeOptions:r,resolver:n});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 n.promise}createInvokeProxy(e){return(0,a.L)(this,e)}on(e,t){return Promise.all(this._clientPromises).then((()=>(0,n.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 n=0;n<this._clientPromises.length;++n)this._clientPromises[n].then((s=>{s&&(t[n]=s.openPort()),0==--r&&e(t)}))}))}get test(){}}},72457:(e,t,r)=>{r.d(t,{h:()=>i,k:()=>s});const n=new FinalizationRegistry((e=>{e.close()}));function s(e,t){n.register(e,t,t)}function i(e){n.unregister(e)}},29953:(e,t,r)=>{r.d(t,{ho:()=>Z});var n=r(49186),s=r(44208),i=r(74887),o=r(10382),a=r(72457),l=r(61322),d=r(53966),h=r(97768),u=r(78888),p=r(84952);const c={async request(e,t){const r=e.options,n=r.responseType;r.signal=t?.signal,r.responseType="native"===n||"native-request-init"===n?"native-request-init":n&&["blob","json","text"].includes(n)&&(0,p.sC)(e.url)?.after?n:"array-buffer";const s=await(0,u.A)(e.url,r),i={data:s.data,httpStatus:s.httpStatus,ssl:s.ssl};switch(s.requestOptions?.responseType){case"native-request-init":return delete i.data.signal,i;case"blob":i.data=await i.data.arrayBuffer();break;case"json":i.data=(new TextEncoder).encode(JSON.stringify(i.data)).buffer;break;case"text":i.data=(new TextEncoder).encode(i.data).buffer}return{result:i,transferList:[i.data]}}};var y=r(8341),m=r(2741),f=r(92602),g=(r(47566),r(70333));const _={};var b=r(26390);class w{constructor(){const e=document.createDocumentFragment();["addEventListener","dispatchEvent","removeEventListener"].forEach((t=>{this[t]=(...r)=>e[t](...r)}))}}class I{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,r){this._dispatcher.addEventListener(e,t,r)}removeEventListener(e,t,r){this._dispatcher.removeEventListener(e,t,r)}_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:r}=t;let n=await l.default.loadWorker(e);n||(n=await import(e));const s=l.default.connect(n);this._workerPostMessage({type:y.Go.OPENED,jobId:r,data:s})}}}var v=r(73444),M=r(18357);const T=()=>d.A.getLogger("esri.core.workers.workerFactory"),{HANDSHAKE:E}=y.Go;let A,x;const k="Failed to create Worker. Fallback to execute module in main thread";async function N(e){return new Promise((t=>{function r(s){const i=(0,y.VI)(s);i&&i.type===E&&(e.removeEventListener("message",r),e.removeEventListener("error",n),t(e))}function n(t){t.preventDefault(),e.removeEventListener("message",r),e.removeEventListener("error",n),T().warn("Failed to create Worker. Fallback to execute module in main thread",t),(e=new I).addEventListener("message",r),e.addEventListener("error",n)}e.addEventListener("message",r),e.addEventListener("error",n)}))}let S=0;const{ABORT:L,INVOKE:C,OPEN:D,OPENED:R,RESPONSE:B}=y.Go;class j{static async create(e){const t=await async function(){if(!(0,s.A)("esri-workers"))return N(new I);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,p.s2)(e.assetsPath),e.defaultAssetsPath=e.defaultAssetsPath?(0,p.s2)(e.defaultAssetsPath):void 0,e.request.interceptors=[],e.log.interceptors=[],e.locale=(0,v.JK)(),e.has={"esri-csp-restrictions":(0,s.A)("esri-csp-restrictions"),"esri-2d-debug":!1,"esri-2d-update-debug":(0,s.A)("esri-2d-update-debug"),"esri-2d-log-updating":(0,s.A)("esri-2d-log-updating"),"featurelayer-pbf":(0,s.A)("featurelayer-pbf"),"featurelayer-fast-triangulation-enabled":(0,s.A)("featurelayer-fast-triangulation-enabled"),"featurelayer-simplify-thresholds":(0,s.A)("featurelayer-simplify-thresholds"),"featurelayer-simplify-payload-size-factors":(0,s.A)("featurelayer-simplify-payload-size-factors"),"featurelayer-simplify-mobile-factor":(0,s.A)("featurelayer-simplify-mobile-factor"),"featurelayer-query-max-depth":(0,s.A)("featurelayer-query-max-depth"),"featurelayer-query-pausing-enabled":(0,s.A)("featurelayer-query-pausing-enabled"),"featurelayer-snapshot-enabled":(0,s.A)("featurelayer-snapshot-enabled"),"esri-atomics":(0,s.A)("esri-atomics"),"esri-shared-array-buffer":(0,s.A)("esri-shared-array-buffer"),"esri-tiles-debug":(0,s.A)("esri-tiles-debug"),"esri-workers-arraybuffer-transfer":(0,s.A)("esri-workers-arraybuffer-transfer"),"feature-polyline-generalization-factor":(0,s.A)("feature-polyline-generalization-factor"),"host-webworker":1},e.workers.loaderUrl&&(e.workers.loaderUrl=(0,p.s2)(e.workers.loaderUrl)),e.workers.workerPath?e.workers.workerPath=(0,p.s2)(e.workers.workerPath):e.workers.workerPath=(0,p.s2)((0,m.s)("esri/core/workers/RemoteClient.js")),e.workers.useDynamicImport=!1;const t=f.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?.concat()||[],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,v.JK)(),has:{"csp-restrictions":1,"dojo-test-sniff":0,"host-webworker":1,...t?.has},map:{...t?.map},paths:{...t?.paths},packages:t?.packages||[]}),n={buildDate:M.$,fullVersion:g.ol,revision:M.u};return JSON.stringify({esriConfig:e,loaderConfig:r,kernelInfo:n})}());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-"+S++})}catch(t){T().warn(k,x),e=new I}else T().warn(k,x),e=new I;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(),d.A.getLogger("esri.core.workers.WorkerOwner").error(e)}))}terminate(){this.worker.terminate()}async open(e,t={}){const{signal:r}=t,n=(0,y.Jc)();return new Promise(((t,s)=>{const o={resolve:t,reject:s,abortHandle:(0,i.NY)(r,(()=>{this._outJobs.delete(n),this._post({type:L,jobId:n})}))};this._outJobs.set(n,o),this._post({type:D,jobId:n,modulePath:e})}))}_onMessage(e){const t=(0,y.VI)(e);if(t)switch(t.type){case R: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,r=e.jobId,n=t.get(r);n&&(n.controller&&n.controller.abort(),t.delete(r))}_onInvokeMessage(e){const{methodName:t,jobId:r,data:n,abortable:s}=e,o=s?new AbortController:null,a=this._inJobs,l=c[t];let d;try{if("function"!=typeof l)throw new TypeError(`${t} is not a function`);d=l.call(null,n,{signal:o?o.signal:null})}catch(e){return void this._post({type:B,jobId:r,error:(0,y.mF)(e)})}(0,i.$X)(d)?(a.set(r,{controller:o,promise:d}),d.then((e=>{a.has(r)&&(a.delete(r),this._post({type:B,jobId:r},e))}),(e=>{a.has(r)&&(a.delete(r),e||(e={message:"Error encountered at method"+t}),(0,i.zf)(e)||this._post({type:B,jobId:r,error:(0,y.mF)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:B,jobId:r},d)}_onOpenedMessage(e){const{jobId:t,data:r}=e,n=this._outJobs.get(t);n&&(this._outJobs.delete(t),(0,h.xt)(n.abortHandle),n.resolve(r))}_onResponseMessage(e){const{jobId:t,error:r,data:s}=e,i=this._outJobs.get(t);i&&(this._outJobs.delete(t),(0,h.xt)(i.abortHandle),r?i.reject(n.A.fromJSON(JSON.parse(r))):i.resolve(s))}_post(e,t,r){return(0,y.u1)(this.worker,e,t,r)}}const O=(0,s.A)("host-browser")?Math.min(navigator.hardwareConcurrency-1,(0,s.A)("workers-pool-size")):0;let P=(0,s.A)("esri-mobile")?Math.min(O,3):O;P||(P=(0,s.A)("safari")&&(0,s.A)("mac")?7:2);let F=0;const q=[];async function G(e,t){const r=new o.A,{registryTarget:n,...s}=t;return await r.open(e,s),n&&(0,a.k)(n,r),r}async function Z(e,t={}){if("string"!=typeof e)throw new n.A("workers:undefined-module","modulePath is missing");let r=t.strategy||"distributed";if((0,s.A)("host-webworker")&&!(0,s.A)("esri-workers")&&(r="local"),"local"===r){let r=await l.default.loadWorker(e);r||(r=await import(e)),(0,i.Te)(t.signal);const n=t.client||r;return G([l.default.connect(r,t.schedule)],{...t,client:n})}if(await async function(){if(Y)return Y;$=new AbortController;const e=[];for(let t=0;t<P;t++){const r=j.create(t).then((e=>(q[t]=e,e)));e.push(r)}return Y=Promise.all(e),Y}(),(0,i.Te)(t.signal),"dedicated"===r){const r=F++%P;return G([await q[r].open(e,t)],t)}if(t.maxNumWorkers&&t.maxNumWorkers>0){const r=Math.min(t.maxNumWorkers,P);if(r<P){const n=new Array(r);for(let s=0;s<r;++s){const r=F++%P;n[s]=q[r].open(e,t)}return G(n,t)}}return G(q.map((r=>r.open(e,t))),t)}let $,Y=null},6518:(e,t,r)=>{r.d(t,{F:()=>a});var n=r(44208),s=r(75503),i=r(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 s.w(9,(0,n.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(((r,n)=>{e[t++]=n})),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,i.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,r){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,r)}(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,r)=>{r.d(t,{A:()=>y});var n=r(4576),s=r(49186),i=r(65529),o=r(53966),a=r(70328),l=r(19419),d=r(90708),h=r(6518),u=r(51441),p=r(37730);const c=(0,a.vt)();class y{constructor(e){this.geometryInfo=e,this._boundsStore=new h.F,this._featuresById=new Map,this._markedIds=new Set,this.events=new i.A,this.featureAdapter=p.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,r,n,s]=this.fullBounds;return{xmin:t,ymin:r,xmax:n,ymax:s,spatialReference:(0,u.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(n.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 r of e){const e=this._boundsStore.get(r.objectId);e&&t((0,a.Jt)(c,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))}))}startMarkingUsedFeatures(){this._boundsStore.invalidateIndex(),this._markedIds.clear()}sweep(){let e=!1;this._featuresById.forEach(((t,r)=>{this._markedIds.has(r)||(e=!0,this._remove(t))})),this._markedIds.clear(),e&&this._emitChanged()}_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 s.A("featurestore:invalid-feature","feature id is missing",{feature:e}));const r=this._featuresById.get(t);let n;if(this._markedIds.add(t),r?(e.displayId=r.displayId,n=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);n=(0,d.jQ)(null!=n?n:(0,l.vt)(),e.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),null!=n&&this._boundsStore.set(t,n),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 s.A("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const r=this._featuresById.get(t);if(!r)return this._add(e),e;this._markedIds.add(t);const{geometry:n,attributes:i}=e;for(const e in i)r.attributes[e]=i[e];return n&&(r.geometry=n,this._boundsStore.set(t,(0,d.jQ)((0,l.vt)(),n,this.geometryInfo.hasZ,this.geometryInfo.hasM)??null)),r}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._markedIds.delete(t),this._boundsStore.delete(t),this._featuresById.delete(t),e}}},64714:(e,t,r)=>{r.d(t,{F0:()=>a,Vx:()=>h,e2:()=>p,f:()=>c});var n=r(44208),s=r(4718),i=r(99352),o=r(93470);function a(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?o.Cb:"esriGeometryPolyline"===e?o.yM:o.WR}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let d=1;function h(e,t){if((0,n.A)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let r=`this${u(t)} = null;`;for(const t in e)r+=`this${u(t)} = ${JSON.stringify(e[t])};`;const n=new Function(`\n return class AttributesClass$${d++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new n}catch(r){return()=>({[t]:null,...e})}}function u(e){return l.test(e)?`.${e}`:`["${e}"]`}function p(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,s.o8)(e)}}]}function c(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!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,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:i.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},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}}}},61184:(e,t,r)=>{r.d(t,{PB:()=>k,d4:()=>x,ZL:()=>E,sZ:()=>A,yC:()=>M,Vr:()=>T});var n=r(90237),s=(r(59456),r(69622)),i=r(49186),o=r(53966),a=r(91869),l=r(39516),d=r(10107),h=(r(44208),r(87811),r(40608)),u=r(39829),p=r(57251),c=r(21325),y=r(90708),m=r(43334),f=r(65864);class g{constructor(){this._featureLookup=new Map}static getInstance(){return g.instance||(g.instance=new g),g.instance}static resetInstance(){g.instance&&(g.instance=null)}deleteFromStore(e){e.forEach((e=>{this._featureLookup.delete(e)}))}readFromStoreByList(e){const t=[];return e.forEach((e=>{const r=this.readFromStoreById(e);r&&t.push(r)})),t}readFromStoreById(e){return this._featureLookup.get(e)??null}writeToStore(e,t,r){const n=[];return e.forEach((e=>{if(!e?.id)return;e.properties||(e.properties=[]);let s,i=null;if(r&&e.properties[r]&&(i=(0,y.Ux)(e.properties[r])),"originId"in e&&"destinationId"in e&&(e.properties.ESRI__ORIGIN_ID=e.originId,e.properties.ESRI__DESTINATION_ID=e.destinationId),e.properties[t]=e.id,e.id&&this._featureLookup.has(e.id)&&this._featureLookup.get(e.id).attributes){const n=this._featureLookup.get(e.id),o=JSON.parse(JSON.stringify(Object.assign(n.attributes,e.properties)));r&&e.properties[r]&&(o[r]=(0,f.rS)(e.properties[r])),s=new m.Om(i?JSON.parse(JSON.stringify(i)):n?.geometry?JSON.parse(JSON.stringify(n.geometry)):null,o,null,e.properties[t])}else s=new m.Om(i?JSON.parse(JSON.stringify(i)):null,e.properties,null,e.properties[t]);this._featureLookup.set(e.id,s),n.push(s)})),n}}var _=r(45654),b=r(71932),w=r(42538),I=r(61956),v=r(5443);const M="ESRI__ID",T="ESRI__ORIGIN_ID",E="ESRI__DESTINATION_ID",A="ESRI__LAYOUT_GEOMETRY",x="ESRI__AGGREGATION_COUNT";let k=class extends s.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((r=>{r.name&&(t.set(r.name,"entity"),this._processingCacheUpdatesLookup.set(r.name,[]),e.inclusionModeDefinition&&!e.inclusionModeDefinition?.generateAllSublayers||this.entityTypeNames.add(r.name),r.properties?.forEach((e=>{e.geometryType&&"esriGeometryNull"!==e.geometryType&&this.geographicLookup.set(r.name,{name:e.name??"",geometryType:e.geometryType})})))})),e.knowledgeGraph.dataModel.relationshipTypes?.forEach((r=>{r.name&&(t.set(r.name,"relationship"),this._processingCacheUpdatesLookup.set(r.name,[]),e.inclusionModeDefinition&&!e.inclusionModeDefinition?.generateAllSublayers||this.relationshipTypeNames.add(r.name),r.properties?.forEach((e=>{e.geometryType&&"esriGeometryNull"!==e.geometryType&&this.geographicLookup.set(r.name,{name:e.name??"",geometryType:e.geometryType})})))})),e.inclusionModeDefinition?.namedTypeDefinitions.forEach(((r,n)=>{if("entity"===t.get(n))this.entityTypeNames.add(n);else{if("relationship"!==t.get(n))return o.A.getLogger(this).warn(`A named type, ${n}, was in the inclusion list that wasn't in the data model and will be removed`),void e.inclusionModeDefinition?.namedTypeDefinitions.delete(n);this.relationshipTypeNames.add(n)}const s=new Map;r.members?.forEach((e=>{(0,a.tE)(this.memberIdTypeLookup,e.id,(()=>new Set)).add(n);const t=this.getById(e.id);t&&s.set(e.id,t)})),this.sublayerCaches.set(n,s)}))}addToLayer(e){e.forEach((({typeName:e,id:t})=>{if(!this.inclusionModeDefinition)throw new i.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 r=this.inclusionModeDefinition.namedTypeDefinitions.get(e);r.members||(r.members=new Map),r.members.set(t,{id:t}),(0,a.tE)(this.memberIdTypeLookup,t,(()=>new Set)).add(e)}}else{const r=new Map;r.set(t,{id:t}),this.inclusionModeDefinition.namedTypeDefinitions.set(e,{useAllData:!1,members:r}),(0,a.tE)(this.memberIdTypeLookup,t,(()=>new Set)).add(e)}}))}getById(e){return g.getInstance().readFromStoreById(e)}async getData(e,t,r){if(t.objectType.name&&this.inclusionModeDefinition?.namedTypeDefinitions&&this.inclusionModeDefinition.namedTypeDefinitions.size>0&&!this.inclusionModeDefinition.namedTypeDefinitions.has(t.objectType.name))return[];let n;if(n=e||new I.A({where:"1=1",outFields:["*"]}),"link-chart"===t.parentCompositeLayer.type){const e=t.parentCompositeLayer,r=this._processingCacheUpdatesLookup.get(t.objectType.name??""),s=n.outFields;s&&1===s.length&&s[0]===M&&"1=1"===n.where||await Promise.all(r??[]);const i=this.sublayerCaches.has(t.objectType.name??"")?Array.from(this.sublayerCaches.get(t.objectType.name)?.values()):[],o=[];return i.forEach((r=>{this.relationshipTypeNames.has(t.objectType.name)?r.geometry=e.relationshipLinkChartDiagramLookup.get(r.attributes[t.objectIdField]):r.geometry=e.entityLinkChartDiagramLookup.get(r.attributes[t.objectIdField]),r.attributes[A]=r.geometry,o.push(r)})),o}return this.retrieveDataFromService(n,t,r)}async getConnectedRecordIds(e,t){const r=[];let n="";const s=[],i=new Map;if(e.forEach((e=>{if(this.memberIdTypeLookup.has(e))for(const t of this.memberIdTypeLookup.get(e)){if(!this.entityTypeNames.has(t))return;i.has(t)?i.get(t)?.push(e):i.set(t,[e])}})),t&&0!==t?.length){for(const e of t)n=n+e+"|";n=n.slice(0,-1)}return i.forEach(((e,i)=>{let a;a=t&&0!==t?.length?`MATCH (n:${i})-[r:${n}]-(m) WHERE id(n) IN $ids RETURN id(r), type(r), id(m), labels(m)[0]`:`MATCH (n:${i})-[r]-(m) WHERE id(n) IN $ids RETURN id(r), type(r), id(m), labels(m)[0]`;const l=new Promise((t=>{(async()=>{const t=(await(0,b.executeQueryStreaming)(this.knowledgeGraph,new w.A({openCypherQuery:a,bindParameters:{ids:e}}))).resultRowsStream.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;for(let e=0;e<n.length;e++){const t=n[e];r.push({id:t[0],typeName:t[1]}),r.push({id:t[2],typeName:t[3]})}}}catch(e){if("AbortError"!==e.name)throw e;o.A.getLogger(this).info("Request aborted as expected")}})().then((()=>{t()}))}));s.push(l)})),this.refreshCacheContent(),await Promise.all(s),r}async getRelationshipsBetweenNodes(e,t){const r=[],n=(await(0,b.executeQueryStreaming)(this.knowledgeGraph,new w.A({openCypherQuery:"MATCH (n)-[r]->(m) WHERE id(n) IN $nodeIds AND id(m) in $nodeIds AND NOT id(r) IN $relationshipExclusionIds return id(r), type(r)",bindParameters:{nodeIds:e,relationshipExclusionIds:t}}))).resultRowsStream.getReader();try{for(;;){const{done:e,value:t}=await n.read();if(e)break;for(let e=0;e<t.length;e++){const n=t[e];r.push({id:n[0],typeName:n[1]})}}}catch(e){if("AbortError"!==e.name)throw e;o.A.getLogger(this).info("Request aborted as expected")}return r}async getRelationshipsFromNodes(e,t,r){const n=[],s=(await(0,b.executeQueryStreaming)(this.knowledgeGraph,new w.A({openCypherQuery:"MATCH (n)-[r]-(m) WHERE id(n) IN $targetEntityIds AND id(m) in $possibleConnectionEntityIds AND NOT id(r) IN $relationshipExclusionIds return id(r), type(r)",bindParameters:{targetEntityIds:e,possibleConnectionEntityIds:t,relationshipExclusionIds:r}}))).resultRowsStream.getReader();try{for(;;){const{done:e,value:t}=await s.read();if(e)break;for(let e=0;e<t.length;e++){const r=t[e];n.push({id:r[0],typeName:r[1]})}}}catch(e){if("AbortError"!==e.name)throw e;o.A.getLogger(this).info("Request aborted as expected")}return n}async refreshCacheContent(e,t,r,n=!0){const s=g.getInstance(),o=[],l=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))l.has(t)?l.get(t)?.push(e):l.set(t,[e])})):this.inclusionModeDefinition?.namedTypeDefinitions?.forEach(((e,t)=>{e.useAllData?l.set(t,null):e.members&&e.members.forEach((e=>{l.has(t)&&null!==l.get(t)?l.get(t)?.push(e.id):l.set(t,[e.id])}))})):(this.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&l.set(e.name,null)})),this.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&l.set(e.name,null)})));for(const[e,h]of l){const l=new Promise((o=>{(async()=>{const o=new Set,l=[];let u,p="",c=!1;if(t||d.get(e)?.properties?.forEach((e=>{e.name&&o.add(e.name)})),r&&this.geographicLookup.has(e)){const t=this.geographicLookup.get(e)?.name;t&&o.add(t)}if(this.entityTypeNames.has(e))p=`MATCH (n:${e}) ${h?"WHERE id(n) IN $ids ":""}return ID(n)`,o.forEach((e=>{p+=`, n.${e}`,l.push(e)}));else{if(!this.relationshipTypeNames.has(e))throw new i.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?`);c=!0,p=`MATCH ()-[n:${e}]->() ${h?"WHERE id(n) IN $ids ":""}return ID(n), id(startNode(n)), id(endNode(n))`,o.forEach((e=>{p+=`, n.${e}`,l.push(e)}))}u=new w.A(h?{openCypherQuery:p,bindParameters:{ids:h}}:{openCypherQuery:p});const y=(await(0,b.executeQueryStreaming)(this.knowledgeGraph,u)).resultRowsStream.getReader();for(;;){const{done:t,value:r}=await y.read();if(t)break;const i=[];for(let e=0;e<r.length;e++){const t=r[e];let n=0,s=0;const o={properties:{}};for(o.id=t[n],n++,s++,c&&(o.originId=t[n],n++,s++,o.destinationId=t[n],n++,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])));n<t.length;n++)o.properties[l[n-s]]=t[n];i.push(o)}const o=s.writeToStore(i,M,this.geographicLookup.get(e)?.name);this.sublayerCaches.has(e)||this.sublayerCaches.set(e,new Map),n&&!this.inclusionModeDefinition?.namedTypeDefinitions.has(e)&&this.inclusionModeDefinition?.namedTypeDefinitions.set(e,{useAllData:!1,members:new Map}),n&&!this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members&&(this.inclusionModeDefinition.namedTypeDefinitions.get(e).members=new Map);const d=this.sublayerCaches.get(e);o.forEach((t=>{d?.set(t.attributes[M],t),n&&!this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members.has(t.attributes[M])&&(this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members.set(t.attributes[M],{id:t.attributes[M]}),(0,a.tE)(this.memberIdTypeLookup,t.attributes[M],(()=>new Set)).add(e))}))}})().then((()=>{o(null)}))}));o.push(l),this._processingCacheUpdatesLookup.get(e)?.push(l)}await Promise.all(o)}removeFromLayer(e){const t=new Set,r=new Set(e.map((e=>e.id)));for(const r of e)t.add(r.typeName),1===this.memberIdTypeLookup.get(r.id)?.size?this.memberIdTypeLookup.delete(r.id):this.memberIdTypeLookup.get(r.id)?.delete(r.typeName),this.inclusionModeDefinition?.namedTypeDefinitions.forEach(((e,t)=>{t===r.typeName&&e.members?.has(r.id)&&e.members.delete(r.id)}));t.forEach((e=>{this.sublayerCaches.get(e)?.forEach(((t,n)=>{r.has(n)&&this.sublayerCaches.get(e)?.delete(n)}))}))}async retrieveDataFromService(e,t,r){const n=g.getInstance(),s=new Set,o=[];let a,d="",h=[];const y="relationship"===t.graphType,m=this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData,f=t.parentCompositeLayer.sublayerIdsCache.get(t.objectType.name);let I=!m&&f?Array.from(f).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 r=e.outFields;r.includes("*")?t.fields.forEach((e=>{s.add(e.name)})):r.forEach((e=>{e!==M&&e!==t.geometryFieldName&&s.add(e)}))}if(null!=e.geometry){const r=e.geometry;let n;const h=t.parentCompositeLayer.dataManager.knowledgeGraph.serviceDefinition,m=h?.spatialReference,f=h?.serviceCapabilities?.geometryCapabilities;let g=f?.geometryMaxBoundingRectangleSizeX,b=f?.geometryMaxBoundingRectangleSizeY;if(r?.extent?.spatialReference&&!r.spatialReference?.isWGS84?(await(0,p.initializeProjection)(r.extent.spatialReference,c.KK),n=(0,p.project)(r.extent,c.KK)):n=r.extent,g&&b&&m){if(4326!==m.wkid){const e=new v.A({spatialReference:m,xmax:g,ymax:b}),t=(0,p.project)(e,c.KK);g=t.xmax,b=t.ymax}if(n.xmax-n.xmin>g)throw new i.A("knowledge-graph:layer-data-manager",`Extent x bounds should be within ${g}° latitude, limit exceeded`);if(n.ymax-n.ymin>b)throw new i.A("knowledge-graph:layer-data-manager",`Extent y bounds should be within ${b}° longitude, limit exceeded`)}if(null!=e.where&&"1=1"!==e.where){const r=await(0,l.G)(e.where.toUpperCase(),t.fieldsIndex);t.fields.forEach((e=>{r.fieldNames.includes(e.name)&&s.add(e.name)}))}d=y?`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&&s.add(t.geometryFieldName),s.forEach((e=>{d+=`, n.${e}`,o.push(e)})),a=new w.A({openCypherQuery:d,bindParameters:{param_filter_geom:new u.A({rings:(0,_.DX)(n)})}})}else{let r="";if(null!=e.where&&"1=1"!==e.where){const n=await(0,l.G)(e.where,t.fieldsIndex);t.fields.forEach((e=>{n.fieldNames.includes(e.name)&&s.add(e.name)}));const i=new Set(["column-reference","string","number","binary-expression"]),o=new Set(["=","<","<=","<>",">",">=","AND","OR","LIKE"]);let a=!1;const d=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&&i.has(e.left.type)&&i.has(e.right.type)&&o.has(e.operator))return`${d(e.left)} ${e.operator} ${d(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 r=e.right.value;"%"===r.charAt(0)&&(r=r.slice(1)),"%"===r.charAt(r.length-1)&&(r=r.slice(0,-1)),t+=`'${r.toLowerCase()}')`}return t}return a=!0,""};r=d(n.parseTree),a&&(r="")}let n="";n=y?`Match ()-[n:${t.objectType.name}]->()`:`Match (n:${t.objectType.name})`;let i=!1;I&&(i=!0,n+=" WHERE ID(n) IN $ids"),r&&(n+=i?" AND":" WHERE",n+=` ${r}`),n+=" return ID(n)",y&&(n+=", id(startNode(n)), id(endNode(n))"),e.returnGeometry&&t.geometryFieldName&&s.add(t.geometryFieldName),s.forEach((e=>{n+=`, n.${e}`,o.push(e)})),a=new w.A(I?{openCypherQuery:n,bindParameters:{ids:I}}:{openCypherQuery:n})}const T=(await(0,b.executeQueryStreaming)(t.parentCompositeLayer.dataManager.knowledgeGraph,a,r)).resultRowsStream.getReader();for(;;){const{done:e,value:r}=await T.read();if(e)break;const s=[];for(let e=0;e<r.length;e++){const t=r[e];let n=0,i=0;const a={properties:{}};for(a.id=t[n],n++,i++,y&&(a.originId=t[n],n++,i++,a.destinationId=t[n],n++,i++);n<t.length;n++)a.properties[o[n-i]]=t[n];s.push(a)}h=h.concat(n.writeToStore(s,M,t.parentCompositeLayer.dataManager.geographicLookup.get(t.objectType.name)?.name))}return h}};(0,n._)([(0,d.MZ)()],k.prototype,"knowledgeGraph",void 0),(0,n._)([(0,d.MZ)()],k.prototype,"inclusionModeDefinition",void 0),(0,n._)([(0,d.MZ)()],k.prototype,"entityTypeNames",void 0),(0,n._)([(0,d.MZ)()],k.prototype,"relationshipTypeNames",void 0),(0,n._)([(0,d.MZ)()],k.prototype,"geographicLookup",void 0),(0,n._)([(0,d.MZ)()],k.prototype,"sublayerCaches",void 0),(0,n._)([(0,d.MZ)()],k.prototype,"nodeConnectionsLookup",void 0),(0,n._)([(0,d.MZ)()],k.prototype,"relationshipConnectionsLookup",void 0),(0,n._)([(0,d.MZ)()],k.prototype,"memberIdTypeLookup",void 0),k=(0,n._)([(0,h.$)("esri.layers.knowledgeGraph.KnowledgeGraphLayerDataManager")],k)},70643:(e,t,r)=>{r.d(t,{A:()=>W});var n=r(90237),s=(r(59456),r(13874)),i=(r(86162),r(94409),r(65345),r(42980),r(39290),r(92438),r(96576),r(93618),r(65494)),o=r(15036),a=r(4718),l=r(92071),d=(r(29953),r(10107)),h=(r(44208),r(53966),r(40608)),u=r(43937),p=r(35666),c=r(57251),y=r(16930),m=r(21325),f=r(4146),g=r(83221),_=r(17970),b=r(64714),w=r(61184);r(87811);const I=(0,r(17036).p)(),v=e=>{let t=class extends e{constructor(){super(...arguments),this.fields=[],this.fieldsIndex=null}};return(0,n._)([(0,d.MZ)(I.fields)],t.prototype,"fields",void 0),(0,n._)([(0,d.MZ)(I.fieldsIndex)],t.prototype,"fieldsIndex",void 0),t=(0,n._)([(0,h.$)("esri.layers.knowledgeGraph.KnowledgeGraphSublayerBase")],t),t};var M=r(63074),T=r(87718),E=r(76294),A=r(32756),x=r(54310),k=r(25036),N=r(82935),S=r(10873),L=r(13213),C=r(20437),D=r(30524),R=r(81457),B=r(39383),j=r(22671),O=r(61956),P=r(30291),F=r(61322),q=r(5443),G=r(39829),Z=r(82799),$=r(50498);function Y(e){if(!e.json)return e;e.json.write=J(e.json.write);const t=e.json.origins;if(!t)return e;let r;for(r in t){const e=t[r];e&&(e.write=J(e.write))}return e}function J(e){return"object"==typeof e&&e?(!1!==e.enabled&&(e.overridePolicy=function(e){const{target:t,writer:r,overridePolicy:n,...s}=e;return function(e,t){const r=H.call(this,e,t);return r.enabled?{...s,...r}:r}}(e)),e):!0===e?U():e}function U(){return{overridePolicy:H}}function H(e,t){const r=!!this.geometryType;let n={enabled:r};return r&&(n={...n,...Q.call(this,e,t)}),n}function Q(e,t){return{ignoreOrigin:this.originIdOf(t)>p.Gr.DEFAULTS}}let X=class extends(v((0,E.J)((0,T.F)((0,M.dM)((0,A.f)((0,N.e)((0,k.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=w.yC,this.objectType=null,this.opacity=1,this.orderBy=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 F.default(e.port1,{channel:e,client:{queryFeatures:(e,t={})=>{const r=O.A.fromJSON(e);return this.queryFeaturesJSON(r,t)}}}),[e.port2]}))},this.title=null,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 r="esriFieldTypeOID"===t.fieldType?"esriFieldTypeInteger":t.fieldType;e.push(C.A.fromJSON({name:t.name,type:r,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:w.d4,type:"esriFieldTypeInteger",alias:w.d4,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?$.g.fromJSON(t):null}get geometryFieldName(){if("link-chart"===this.parentCompositeLayer?.type)return w.sZ;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,r=t?this.objectType?.properties?.[t]:null;return r?.hasM??!1}get hasZ(){const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.name,r=t?this.objectType?.properties?.[t]:null;return r?.hasZ??!1}set renderer(e){(0,D.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,i.r)((0,b.F0)($.g.toJSON("polyline")).renderer):(0,i.r)((0,b.F0)($.g.toJSON("point")).renderer):(0,i.r)((0,b.F0)($.g.toJSON(this.geometryType)).renderer)}get spatialReference(){return this.parentCompositeLayer?.dataManager?.knowledgeGraph?.dataModel?.spatialReference??y.A.WGS84}writeTitle(e,t){t.title=e??"Layer"}createPopupTemplate(e){return(0,P.tn)(this,e)}createQuery(){return new O.A({where:"1=1",outFields:["*"]})}getField(e){for(let t=0;t<this.fields.length;t++)if(this.fields[t].name===e)return this.fields[t];return null}getFieldDomain(e,t){return null}async queryFeatures(e,t){const{resolvedQuery:r,queryEngine:n}=await this._setupQueryObjects(e),s=j.A.fromJSON(await n.executeQuery(r.toJSON(),t?.signal));return s.features.forEach((e=>{e.sourceLayer=this})),s}async queryFeaturesJSON(e,t){const{resolvedQuery:r,queryEngine:n}=await this._setupQueryObjects(e);return await n.executeQuery(r.toJSON(),t?.signal)}async queryFeatureCount(e,t){const{resolvedQuery:r,queryEngine:n}=await this._setupQueryObjects(e);return n.executeQueryForCount(r.toJSON(),t?.signal)}async queryExtent(e={},t){const r={...e,returnGeometry:!0},{resolvedQuery:n,queryEngine:s}=await this._setupQueryObjects(r),i=await s.executeQueryForExtent(n.toJSON(),t?.signal);let o;return o=null!=i.extent?.xmin&&null!=i.extent?.xmax&&null!=i.extent?.ymin&&null!=i.extent?.ymax?new q.A(i.extent):new q.A,{count:i.count,extent:o}}async queryObjectIds(e,t){const r=O.A.from(e);let n;if("link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)n=this._cachedQueryEngine;else{const e=await this.parentCompositeLayer.dataManager.getData(r,this,t);n=this.loadQueryEngine(e)}return n.executeQueryForIds(r.toJSON(),t?.signal)}loadQueryEngine(e){const t=new g.A({geometryType:$.g.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ}),r=new _.d({fieldsIndex:this.fieldsIndex.toJSON(),geometryType:$.g.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ,objectIdField:this.objectIdField,spatialReference:this.spatialReference.toJSON(),timeInfo:null,featureStore:t});return r.featureStore.addMany(e),r}async refreshCachedQueryEngine(){const e=await this.parentCompositeLayer.dataManager.getData(new O.A({where:"1=1",outFields:[w.yC]}),this);this._cachedQueryEngine=this.loadQueryEngine(e)}async _setupQueryObjects(e,t){const r=O.A.from(e),n=r.geometry;let s;if(n&&!n.spatialReference?.isWGS84&&(await(0,c.initializeProjection)(n.spatialReference,m.KK),r.geometry=(0,c.project)(n instanceof G.A||n instanceof Z.A?n:n.extent,m.KK)),"link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)s=this._cachedQueryEngine;else{const e=await this.parentCompositeLayer.dataManager.getData(r,this,t);s=this.loadQueryEngine(e)}return{resolvedQuery:r,queryEngine:s}}};(0,n._)([(0,d.MZ)(Y((0,a.o8)(M.sU)))],X.prototype,"blendMode",void 0),(0,n._)([(0,d.MZ)()],X.prototype,"capabilities",void 0),(0,n._)([(0,d.MZ)({json:{origins:{"web-scene":{write:!1}},write:U()}})],X.prototype,"charts",void 0),(0,n._)([(0,d.MZ)({readOnly:!0})],X.prototype,"defaultPopupTemplate",null),(0,n._)([(0,d.MZ)({type:String,json:{origins:{service:{read:!1}},name:"layerDefinition.definitionExpression",write:{ignoreOrigin:!0}}})],X.prototype,"definitionExpression",void 0),(0,n._)([(0,d.MZ)()],X.prototype,"displayField",void 0),(0,n._)([(0,d.MZ)(Y((0,a.o8)(M.LF)))],X.prototype,"effect",void 0),(0,n._)([(0,d.MZ)()],X.prototype,"elevationInfo",void 0),(0,n._)([(0,d.MZ)(Y((0,a.o8)(T.Y)))],X.prototype,"featureEffect",void 0),(0,n._)([(0,d.MZ)(Y((0,a.o8)(L.d)))],X.prototype,"featureReduction",null),(0,n._)([(0,d.MZ)()],X.prototype,"fields",null),(0,n._)([(0,d.MZ)()],X.prototype,"geometryType",null),(0,n._)([(0,d.MZ)()],X.prototype,"geometryFieldName",null),(0,n._)([(0,d.MZ)({type:["entity","relationship"],nonNullable:!0,json:{write:{isRequired:!0,ignoreOrigin:!0}}})],X.prototype,"graphType",void 0),(0,n._)([(0,d.MZ)({type:String,nonNullable:!0,json:{write:{isRequired:!0,ignoreOrigin:!0}}})],X.prototype,"graphTypeName",null),(0,n._)([(0,d.MZ)()],X.prototype,"hasM",null),(0,n._)([(0,d.MZ)()],X.prototype,"hasZ",null),(0,n._)([(0,d.MZ)({type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0}}})],X.prototype,"id",void 0),(0,n._)([(0,d.MZ)(Y((0,a.o8)(S.kF)))],X.prototype,"labelsVisible",void 0),(0,n._)([(0,d.MZ)({type:[R.A],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:B.w,write:U()}})],X.prototype,"labelingInfo",void 0),(0,n._)([(0,d.MZ)({readOnly:!0,json:{read:!1,write:{writer(e,t){t.layerType=this.geometryType?"KnowledgeGraphSubLayer":"KnowledgeGraphSubTable"},isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],X.prototype,"layerType",void 0),(0,n._)([(0,d.MZ)(Y((0,a.o8)(S.fV)))],X.prototype,"legendEnabled",void 0),(0,n._)([(0,d.MZ)(Y((0,a.o8)(S.hG)))],X.prototype,"maxScale",void 0),(0,n._)([(0,d.MZ)(Y((0,a.o8)(S.hn)))],X.prototype,"minScale",void 0),(0,n._)([(0,d.MZ)()],X.prototype,"objectIdField",void 0),(0,n._)([(0,d.MZ)()],X.prototype,"objectType",void 0),(0,n._)([(0,d.MZ)(Y((0,a.o8)(S.ke)))],X.prototype,"opacity",void 0),(0,n._)([(0,d.MZ)(Y((0,a.o8)(A.n)))],X.prototype,"orderBy",void 0),(0,n._)([(0,d.MZ)()],X.prototype,"parentCompositeLayer",void 0),(0,n._)([(0,d.MZ)(Y((0,a.o8)(S.M6)))],X.prototype,"popupEnabled",void 0),(0,n._)([(0,d.MZ)({type:s.A,json:{name:"popupInfo",write:{ignoreOrigin:!0}}})],X.prototype,"popupTemplate",void 0),(0,n._)([(0,d.MZ)({type:Number,json:{write:{overridePolicy:Q}}})],X.prototype,"refreshInterval",void 0),(0,n._)([(0,d.MZ)({types:o.H,json:{name:"layerDefinition.drawingInfo.renderer",write:U()}})],X.prototype,"renderer",null),(0,n._)([(0,d.MZ)()],X.prototype,"source",void 0),(0,n._)([(0,d.MZ)()],X.prototype,"spatialReference",null),(0,n._)([(0,d.MZ)({type:String,json:{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],X.prototype,"title",void 0),(0,n._)([(0,u.K)("title")],X.prototype,"writeTitle",null),(0,n._)([(0,d.MZ)({json:{read:!1}})],X.prototype,"type",void 0),(0,n._)([(0,d.MZ)(Y((0,a.o8)(N.B)))],X.prototype,"useViewTime",void 0),(0,n._)([(0,d.MZ)({type:Boolean,json:{name:"visibility",write:U()}})],X.prototype,"visible",void 0),X=(0,n._)([(0,h.$)("esri.layers.knowledgeGraph.KnowledgeGraphSublayer")],X);const W=X},45654:(e,t,r)=>{r.d(t,{DX:()=>_,_s:()=>w,aq:()=>b,fe:()=>I}),r(59456),r(52106);var n,s,i,o,a=r(78888),l=(r(61147),r(49186)),d=r(91869),h=(r(94194),r(90708),r(8460),r(71932)),u=r(42538);r(16930),(s=n||(n={})).ELEMENTUID="ELEMENTUID",s.TYPENAME="TYPENAME",n.ELEMENTUID,n.TYPENAME,function(e){e[e.ELEMENTUID=0]="ELEMENTUID",e[e.TYPENAME=1]="TYPENAME"}(i||(i={})),function(e){e[e.ELEMENTUID=0]="ELEMENTUID",e[e.TYPENAME=1]="TYPENAME",e[e.FROMUID=2]="FROMUID",e[e.TOUID=3]="TOUID"}(o||(o={}));var p,c,y,m,f,g=r(45724);function _(e){if(!e.spatialReference.isWGS84)throw new l.A("knowledge-graph:layer-support-utils","The extentToInBoundsRings 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]]))}async function b(e,t){const r=[],n=new Map,s=[];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);for(const[e,i]of n){if(i.length<1)continue;const n=new u.A({openCypherQuery:`MATCH (n)-[r:${e}]->(m) WHERE id(r) in $ids RETURN id(n), labels(n)[0], id(m), labels(m)[0]`,bindParameters:{ids:i}});s.push((0,h.executeQueryStreaming)(t,n).then((async e=>{const t=e.resultRowsStream.getReader();for(;;){const{done:e,value:n}=await t.read();if(e)break;for(const e of n)r.push({id:e[0],typeName:e[1]}),r.push({id:e[2],typeName:e[3]})}})))}return await Promise.all(s),r}async function w(e,t){t??=!1;const r={generateAllSublayers:t,namedTypeDefinitions:new Map};return await async function(e){const t=await(0,a.A)(e,{responseType:"array-buffer"}),r=await t.data;return async function(e){const t=new((await(0,g.I)()).MapOfObjectIdentifierSetsDecoder),r=t.decode(new Uint8Array(e)),n=new Map;if(0!==r.error_code)throw new l.A("knowledge-graph:layer-support-utils",r.error_message);const s=t.get_map_of_identifier_sets(),i=s.keys,o=i.size();for(let e=0;e<o;e++){const t=i.get(e),r=s.query_identifier_set(t),o=[];if(r.id_array_type.value===m.GLOBALID_ARRAY){const e=r.get_globalid_array(),t=e.count();for(let r=0;r<t;r++)o.push(e.get_globalid_at(r))}else{if(r.id_array_type.value!==m.IDENTIFIER_ARRAY)throw new l.A("knowledge-graph:layer-support-utils","Tried to encode an unexpected ID Array type.");{const e=r.get_identifier_array(),t=e.count();for(let r=0;r<t;r++)o.push(e.get_identifier_at(r).toString())}}n.set(t,o)}return t.delete(),n}(new Uint8Array(r))}(e).then((e=>{!function(e,t){for(const[r,n]of e){const e=(0,d.tE)(t.namedTypeDefinitions,r,(()=>({useAllData:!1,members:new Map})));for(const t of n)e.members.has(t)||e.members.set(t,{id:t})}}(e,r)})),r}async function I(e){const t=await(0,g.I)(),r=new t.MapOfObjectIdentifierSets;!function(e,t,r){for(const[n,s]of r.namedTypeDefinitions){if(!s.members||s.useAllData)continue;const r=s.members.keys(),i=new t.GlobalIdArray,o=new t.ObjectIdentifierSet;for(const e of r)i.add_globalid(e);o.set_globalid_array(i),i.delete(),e.put_identifier_set(n,o),o.delete()}}(r,t,e);const n=new t.MapOfObjectIdentifierSetsEncoder;try{n.set_map_of_identifier_sets(r),n.encode();const e=n.get_encoding_result();if(0!==e.error.error_code)throw new l.A("knowledge-graph:layer-support-utils",e.error.error_message);const t=structuredClone(e.get_byte_buffer());return n.delete(),t}finally{r.delete()}}r(35448),(f=p||(p={}))[f.featureResult=0]="featureResult",f[f.countResult=1]="countResult",f[f.idsResult=2]="idsResult",function(e){e[e.upperLeft=0]="upperLeft",e[e.lowerLeft=1]="lowerLeft"}(c||(c={})),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"}(y||(y={})),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"}(m||(m={})),r(31593),r(82799),r(94985),r(39829),r(68249),r(86738)},32756:(e,t,r)=>{r.d(t,{f:()=>d,n:()=>l});var n=r(90237),s=r(93637),i=r(10107),o=(r(44208),r(53966),r(87811),r(40608)),a=r(91880);const l={type:[a.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:function(e,t,r){if(!e)return null;const n=e.find((e=>!!e.field));if(!n)return null;const s=new a.A;return s.read(n,r),[s]}},write:{writer:function(e,t,r,n){const i=e.find((e=>!!e.field));i&&(0,s.sM)(r,[i.toJSON()],t)}}}},d=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return(0,n._)([(0,i.MZ)(l)],t.prototype,"orderBy",void 0),t=(0,n._)([(0,o.$)("esri.layers.mixins.OrderedLayer")],t),t}},54310:(e,t,r)=>{r.d(t,{J:()=>b});var n=r(90237),s=(r(44208),r(53966)),i=r(74887),o=r(10107),a=r(79901),l=(r(87811),r(40608)),d=r(89317),h=r(5503),u=(r(60999),r(49186),r(14012),r(80559));const p=new h.A,c=new WeakMap;function y(e){(function(e){return null!=e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e})(e)&&p.push(new WeakRef(e))}function m(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:m(t,e%t):0}let f=0,g=0;function _(){const e=Date.now();let t=!1;for(const r of p){const n=r.deref();n?n.refreshInterval&&e-(c.get(n)??0)+5>=6e4*n.refreshInterval&&(c.set(n,e),n.refresh(e)):t=!0}if(t)for(let e=p.length-1;e>=0;e--)p.at(e).deref()||p.removeAt(e)}(0,u.fm)((()=>{const e=Date.now();let t=0;for(const r of p){const n=r.deref();n&&(t=m(Math.round(6e4*n.refreshInterval),t),n.refreshInterval?c.get(n)||c.set(n,e):c.delete(n))}if(t!==g){if(g=t,clearInterval(f),0===g)return void(f=0);f=setInterval(_,g)}}));const b=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,i.sg)((()=>this.hasDataChanged())),this.when().then((()=>{this.destroyed||y(this)}),(()=>{}))}destroy(){!function(e){const t=p.find((t=>t.deref()===e));t&&p.remove(t)}(this)}castRefreshInterval(e){return e>=.1?e:e<=0?0:.1}get refreshParameters(){return{_ts:this.refreshTimestamp||null}}refresh(e=Date.now()){(0,i.QZ)(this._debounceHasDataChanged()).then((t=>{t&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:t})}),(e=>{s.A.getLogger(this).error(e),this.emit("refresh",{dataChanged:!1,error:e})}))}async hasDataChanged(){return!0}get test(){}};return(0,n._)([(0,o.MZ)({type:Number,json:{write:!0,origins:{"web-scene":{write:{enabled:!0,layerContainerTypes:d.K}}}}})],t.prototype,"refreshInterval",void 0),(0,n._)([(0,a.w)("refreshInterval")],t.prototype,"castRefreshInterval",null),(0,n._)([(0,o.MZ)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,n._)([(0,o.MZ)({readOnly:!0})],t.prototype,"refreshParameters",null),t=(0,n._)([(0,l.$)("esri.layers.mixins.RefreshableLayer")],t),t}},91880:(e,t,r)=>{r.d(t,{A:()=>u});var n,s=r(90237),i=r(66552),o=r(25482),a=r(10107),l=(r(44208),r(53966),r(87811),r(40608));const d=new i.J({asc:"ascending",desc:"descending"});let h=n=class extends o.oY{constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new n({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,s._)([(0,a.MZ)({type:String,json:{write:!0}})],h.prototype,"field",void 0),(0,s._)([(0,a.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],h.prototype,"valueExpression",void 0),(0,s._)([(0,a.MZ)({type:d.apiValues,json:{type:d.jsonValues,read:d.read,write:d.write}})],h.prototype,"order",void 0),h=n=(0,s._)([(0,l.$)("esri.layers.support.OrderByInfo")],h);const u=h},8460:(e,t,r)=>{r.d(t,{$C:()=>y,Hh:()=>o,J:()=>l,Tu:()=>p,Wg:()=>c,Xq:()=>f,i6:()=>g,pM:()=>u,tx:()=>a,vJ:()=>m});var n=r(2741);let s,i=null;function o(){return s||(s=r.e(3666).then(r.bind(r,3666)).then((e=>e.l)).then((({default:e})=>e({locateFile:e=>(0,n.s)(`esri/libs/linkchartlayout/${e}`)}))).then((e=>{!function(e){i=e}(e)})),s)}var a,l,d,h,u,p,c,y,m,f,g,_,b;function w(e,t,r,n,s,o){const a=r.length,l=s.length,d=Float64Array.BYTES_PER_ELEMENT,h=Uint32Array.BYTES_PER_ELEMENT,u=Uint8Array.BYTES_PER_ELEMENT,p=16+a*(u+2*d)+l*(2*h),c=i._malloc(p);try{const u=c+16-c%16,p=u+a*d,y=p+a*d,m=y+l*h,f=m+l*h,g=()=>[i.HEAPF64.subarray(u>>3,(u>>3)+a),i.HEAPF64.subarray(p>>3,(p>>3)+a),i.HEAPU32.subarray(y>>2,(y>>2)+l),i.HEAPU32.subarray(m>>2,(m>>2)+l),i.HEAPU8.subarray(f,f+a)],[_,b,w,I,v]=g();_.set(r),b.set(n),w.set(s),I.set(o),v.set(t);let M=e(a,f,u,p,l,y,m),T=null,E=null;if(M){const e=i.getLayoutLinksTypes(),t=i.getLayoutLinksVerticesEndIndices(),r=i.getLayoutLinksVertices(),n=i.countLayoutLinksVertices();!l||e&&t?n&&!r?M=!1:(T={types:new Uint8Array(i.HEAPU8.subarray(e,e+l)),vertexEndIndex:new Uint32Array(i.HEAPU32.subarray(t>>2,(t>>2)+l)),vertices:new Float64Array(i.HEAPF64.subarray(r>>3,(r>>3)+2*n))},E=i.getAuxiliaryGraphicElements()):M=!1}const[A,x,k,N,S]=g();return r.set(A),n.set(x),s.set(k),o.set(N),t.set(S),{success:M,links:T,graphics:E}}finally{i._free(c),i.cleanupLayout()}}(h=a||(a={}))[h.None=0]="None",h[h.IsMovable=1]="IsMovable",h[h.IsGeographic=2]="IsGeographic",h[h.IsRoot=4]="IsRoot",function(e){e[e.Regular=0]="Regular",e[e.Orthogonal=1]="Orthogonal",e[e.Curved=2]="Curved",e[e.Recursive=3]="Recursive"}(l||(l={})),function(e){e[e.Right=0]="Right",e[e.Left=1]="Left",e[e.Up=2]="Up",e[e.Down=3]="Down"}(d||(d={})),function(e){e.getMinIdealEdgeLength=function(){return i.getMinIdealEdgeLength()},e.apply=function(e,t,r,n,s,o=2,a=1,l=-1){return w(((e,t,r,n,s,d,h)=>i.applyForceDirectedLayout(e,t,r,n,s,d,h,o,a,l)),e,t,r,n,s)}}(u||(u={})),function(e){e.apply=function(e,t,r,n,s,o=2,a=1,l=-1){return w(((e,t,r,n,s,d,h)=>i.applyCommunityLayout(e,t,r,n,s,d,h,o,a,l)),e,t,r,n,s)}}(p||(p={})),function(e){e.apply=function(e,t,r,n,s){return w(i.applySimpleLayout,e,t,r,n,s)}}(c||(c={})),function(e){e.apply=function(e,t,r,n,s){return w(i.applyHierarchicalLayout,e,t,r,n,s)}}(y||(y={})),function(e){e.apply=function(e,t,r,n,s){return w(i.applyRadialTreeLayout,e,t,r,n,s)}}(m||(m={})),function(e){e.apply=function(e,t,r,n,s){return w(i.applySmartTreeLayout,e,t,r,n,s)}}(f||(f={})),function(e){e.apply=function(e,t,r,n,s,o,a,l,d){return w(((e,t,r,o,a,h,u)=>{if(n.length!==e)return!1;if(s.length!==e)return!1;if(l.length!==a)return!1;if(d.length!==a)return!1;const p=Float64Array.BYTES_PER_ELEMENT,c=16,y=i._malloc(c+e*p),m=i._malloc(c+e*p),f=i._malloc(c+a*p),g=i._malloc(c+a*p),_=y+c-y%c,b=m+c-m%c,w=f+c-f%c,I=g+c-g%c;try{return i.HEAPF64.subarray(_>>3,(_>>3)+e).set(n),i.HEAPF64.subarray(b>>3,(b>>3)+e).set(s),i.HEAPF64.subarray(w>>3,(w>>3)+a).set(l),i.HEAPF64.subarray(I>>3,(I>>3)+a).set(d),i.applyChronologicalLayout(e,t,r,o,_,b,a,h,u,w,I)}finally{i._free(y),i._free(m),i._free(f),i._free(g)}}),e,t,r,o,a)}}(g||(g={})),function(e){e[e.Undirected=0]="Undirected",e[e.Directed=1]="Directed",e[e.Reversed=2]="Reversed"}(_||(_={})),function(e){e[e.ByCC_Raw=0]="ByCC_Raw",e[e.ByCC_NormalizeGlobally=1]="ByCC_NormalizeGlobally",e[e.ByCC_NormalizeByCC=2]="ByCC_NormalizeByCC"}(b||(b={}))},25927:(e,t,r)=>{r.d(t,{A:()=>d});var n=r(90237),s=(r(59456),r(10107)),i=(r(44208),r(53966),r(87811),r(40608)),o=r(54238),a=r(86738);let l=class extends o.A{constructor(e){super(e),this.layoutGeometry=null}};(0,n._)([(0,s.MZ)({type:a.A,json:{write:!0}})],l.prototype,"layoutGeometry",void 0),l=(0,n._)([(0,i.$)("esri.rest.knowledgeGraph.Entity")],l);const d=l},54238:(e,t,r)=>{r.d(t,{A:()=>l});var n=r(90237),s=r(10107),i=(r(44208),r(53966),r(87811),r(40608)),o=r(77901);let a=class extends o.A{constructor(e){super(e),this.typeName=null,this.id=null}};(0,n._)([(0,s.MZ)({type:String,json:{write:!0}})],a.prototype,"typeName",void 0),(0,n._)([(0,s.MZ)({type:String,json:{write:!0}})],a.prototype,"id",void 0),a=(0,n._)([(0,i.$)("esri.rest.knowledgeGraph.GraphNamedObject")],a);const l=a},77901:(e,t,r)=>{r.d(t,{A:()=>l});var n=r(90237),s=r(25482),i=r(10107),o=(r(44208),r(53966),r(87811),r(40608));let a=class extends s.oY{constructor(e){super(e),this.properties=null}};(0,n._)([(0,i.MZ)({json:{write:!0}})],a.prototype,"properties",void 0),a=(0,n._)([(0,o.$)("esri.rest.knowledgeGraph.GraphObject")],a);const l=a},42538:(e,t,r)=>{r.d(t,{A:()=>h});var n=r(90237),s=r(10107),i=(r(44208),r(53966),r(87811),r(40608)),o=r(69622);let a=class extends o.A{constructor(e){super(e),this.openCypherQuery=""}};(0,n._)([(0,s.MZ)()],a.prototype,"openCypherQuery",void 0),a=(0,n._)([(0,i.$)("esri.rest.knowledgeGraph.GraphQuery")],a);const l=a;let d=class extends l{constructor(e){super(e),this.bindParameters=null,this.bindGeometryQuantizationParameters=null,this.outputQuantizationParameters=null,this.outputSpatialReference=null,this.provenanceBehavior=null}};(0,n._)([(0,s.MZ)()],d.prototype,"bindParameters",void 0),(0,n._)([(0,s.MZ)()],d.prototype,"bindGeometryQuantizationParameters",void 0),(0,n._)([(0,s.MZ)()],d.prototype,"outputQuantizationParameters",void 0),(0,n._)([(0,s.MZ)()],d.prototype,"outputSpatialReference",void 0),(0,n._)([(0,s.MZ)()],d.prototype,"provenanceBehavior",void 0),d=(0,n._)([(0,i.$)("esri.rest.knowledgeGraph.GraphQueryStreaming")],d);const h=d},40662:(e,t,r)=>{r.d(t,{A:()=>a});var n=r(90237),s=(r(53966),r(44208),r(87811),r(49186),r(40608)),i=r(77901);let o=class extends i.A{constructor(e){super(e)}};o=(0,n._)([(0,s.$)("esri.rest.knowledgeGraph.ObjectValue")],o);const a=o},42095:(e,t,r)=>{r.d(t,{A:()=>d});var n=r(90237),s=r(25482),i=r(10107),o=(r(44208),r(53966),r(87811),r(40608)),a=r(77901);let l=class extends s.oY{constructor(e){super(e),this.path=null}};(0,n._)([(0,i.MZ)({type:[a.A],json:{write:!0}})],l.prototype,"path",void 0),l=(0,n._)([(0,o.$)("esri.rest.knowledgeGraph.Path")],l);const d=l},23150:(e,t,r)=>{r.d(t,{A:()=>d});var n=r(90237),s=(r(59456),r(10107)),i=(r(44208),r(53966),r(87811),r(40608)),o=r(54238),a=r(82799);let l=class extends o.A{constructor(e){super(e),this.originId=null,this.destinationId=null,this.layoutGeometry=null}};(0,n._)([(0,s.MZ)({type:String,json:{write:!0}})],l.prototype,"originId",void 0),(0,n._)([(0,s.MZ)({type:String,json:{write:!0}})],l.prototype,"destinationId",void 0),(0,n._)([(0,s.MZ)({type:a.A,json:{write:!0}})],l.prototype,"layoutGeometry",void 0),l=(0,n._)([(0,i.$)("esri.rest.knowledgeGraph.Relationship")],l);const d=l}}]);