@arcgis/core 4.32.0-next.20241021 → 4.32.0-next.20241022

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 (95) hide show
  1. package/applications/MapViewer/templateUtils.d.ts +4 -0
  2. package/applications/MapViewer/templateUtils.js +5 -0
  3. package/assets/esri/core/workers/RemoteClient.js +1 -1
  4. package/assets/esri/core/workers/chunks/{1ba1d9c867ec6a492af9.js → 0f3912bca9fe25eea75c.js} +1 -1
  5. package/assets/esri/core/workers/chunks/{842ebde78db9bfcaf07b.js → 1678d1d0ecb9b2af69a8.js} +1 -1
  6. package/assets/esri/core/workers/chunks/1d16ca7791f64dd7c7fb.js +1 -0
  7. package/assets/esri/core/workers/chunks/{b292758308dfac4ba8ee.js → 2d8aa31dc96bbd014036.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{88bd9e023764da377aa7.js → 2ee26f77d8e8c15a51ea.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{53f648321c5fde26bfe4.js → 319e06888467f9f460ab.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{303f39b9b7bd33109df8.js → 587df97288a83721d251.js} +1 -1
  11. package/assets/esri/core/workers/chunks/5caa02a7a85d05e253b4.js +1 -0
  12. package/assets/esri/core/workers/chunks/5cfecb320e1dcd258b2e.js +1 -0
  13. package/assets/esri/core/workers/chunks/67018ef25736f0722f6e.js +1 -0
  14. package/assets/esri/core/workers/chunks/{03eba36affe6ed1f5a11.js → 757fe331381da1b7edad.js} +2 -2
  15. package/assets/esri/core/workers/chunks/772cc80923d5e2c6436d.js +1 -0
  16. package/assets/esri/core/workers/chunks/89f74819ac1b5884c149.js +1 -0
  17. package/assets/esri/core/workers/chunks/92b2d81ef16877341f97.js +1 -0
  18. package/assets/esri/core/workers/chunks/{e6e77cbdeb99d90caad1.js → 97f62fad6d416a666319.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{63719f892a7d1025c7d3.js → b42c1ab7579a3c464f72.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{c71304c88fce556340ef.js → c859f73b57a764e99b02.js} +1 -1
  21. package/assets/esri/core/workers/chunks/e71fa25ed45bae5a1adb.js +320 -0
  22. package/core/MemCache.js +1 -1
  23. package/core/MemCachePool.js +1 -1
  24. package/geometry/Mesh.js +1 -1
  25. package/geometry/support/MeshVertexAttributes.js +1 -1
  26. package/interfaces.d.ts +128 -0
  27. package/layers/LinkChartLayer.js +1 -1
  28. package/layers/SceneLayer.js +1 -1
  29. package/layers/knowledgeGraph/supportUtils.js +1 -1
  30. package/layers/support/ElevationQueryTileCache.js +1 -1
  31. package/layers/support/ElevationTileData.js +1 -1
  32. package/layers/support/mediaUtils.js +1 -1
  33. package/layers/support/rasterFunctions/ClipFunction.js +1 -1
  34. package/layers/support/rasterFunctions/clipUtils.js +1 -1
  35. package/layers/support/rasterFunctions/localUtils.js +1 -1
  36. package/linkChart/LinkChartProperties.js +1 -1
  37. package/package.json +1 -1
  38. package/smartMapping/raster/renderers/classBreaks.js +1 -1
  39. package/smartMapping/raster/renderers/rgb.js +1 -1
  40. package/smartMapping/raster/renderers/stretch.js +1 -1
  41. package/smartMapping/raster/support/adapters/ImageryTileLayerAdapter.js +1 -1
  42. package/smartMapping/raster/support/adapters/RasterLayerAdapter.js +1 -1
  43. package/smartMapping/renderers/support/rendererUtils.d.ts +4 -0
  44. package/support/revision.js +1 -1
  45. package/views/2d/engine/vectorTiles/RenderBucket.js +1 -1
  46. package/views/2d/engine/vectorTiles/TileHandler3D.js +1 -1
  47. package/views/2d/engine/vectorTiles/VectorTile.js +1 -1
  48. package/views/2d/grid/GridView2D.js +1 -1
  49. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  50. package/views/3d/camera/constraintUtils/tilt.js +1 -1
  51. package/views/3d/glTF/loader.js +1 -1
  52. package/views/3d/layers/I3SMeshView3D.js +1 -1
  53. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  54. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  55. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  56. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  57. package/views/3d/layers/graphics/Graphics3DSymbol.js +1 -1
  58. package/views/3d/layers/graphics/Graphics3DWebStyleSymbol.js +1 -1
  59. package/views/3d/layers/graphics/ObjectResourceCache.js +1 -1
  60. package/views/3d/layers/graphics/wosrLoader.js +1 -1
  61. package/views/3d/layers/i3s/CachedMeshData.js +5 -0
  62. package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
  63. package/views/3d/layers/i3s/I3SOverrides.js +1 -1
  64. package/views/3d/layers/i3s/PointRenderer.js +1 -1
  65. package/views/3d/layers/support/FeatureTile.js +1 -1
  66. package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
  67. package/views/3d/support/buffer/InterleavedLayout.js +1 -1
  68. package/views/3d/terrain/Tile.js +1 -1
  69. package/views/3d/terrain/TileTexture.js +1 -1
  70. package/views/3d/webgl/ManagedFBO.js +1 -1
  71. package/views/3d/webgl/ManagedFBOAttachment.js +1 -1
  72. package/views/3d/webgl-engine/core/FBOCache.js +1 -1
  73. package/views/3d/webgl-engine/core/FBOPool.js +1 -1
  74. package/views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js +1 -1
  75. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  76. package/views/3d/webgl-engine/materials/ProceduralTextureRepository.js +1 -1
  77. package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
  78. package/views/webgl/Texture.js +1 -1
  79. package/views/webgl/VertexArrayObject.js +1 -1
  80. package/webdoc/support/webdocSaveUtils.js +1 -1
  81. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  82. package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
  83. package/widgets/FeatureTable/support/columnUtils.js +1 -1
  84. package/widgets/FeatureTable/support/tableUtils.js +1 -1
  85. package/widgets/FeatureTable/support/templateUtils.js +5 -0
  86. package/widgets/support/GridControls/GridControlsViewModel.js +1 -1
  87. package/widgets/support/GridControls.js +1 -1
  88. package/assets/esri/core/workers/chunks/0c40cac18711f79f0a7d.js +0 -1
  89. package/assets/esri/core/workers/chunks/1a97f98facfc62a9fc69.js +0 -1
  90. package/assets/esri/core/workers/chunks/1fc064e37d030e449d5e.js +0 -1
  91. package/assets/esri/core/workers/chunks/77d129134c2a66cd86d8.js +0 -1
  92. package/assets/esri/core/workers/chunks/92ce57cb12d9a7a3699e.js +0 -1
  93. package/assets/esri/core/workers/chunks/a5675c989d00b7400f98.js +0 -1
  94. package/assets/esri/core/workers/chunks/c06c5c815b5e37717fa1.js +0 -1
  95. package/assets/esri/core/workers/chunks/ce8c1208916f54af7e68.js +0 -320
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8943],{9775:(e,t,r)=>{r.d(t,{A:()=>i});var s=r(62788),n=r(95488);class i{constructor(e=e=>e.values().next().value){this._peeker=e,this._observable=new n.I,this._items=new Set}get length(){return(0,s.gc)(this._observable),this._items.size}clear(){0!==this.length&&(this._items.clear(),this._observable.notify())}last(){if(0===this.length)return;let e;for(e of this._items);return e}peek(){if(0!==this.length)return this._peeker(this._items)}push(e){this.contains(e)||(this._items.add(e),this._observable.notify())}contains(e){return(0,s.gc)(this._observable),this._items.has(e)}pop(){if(0===this.length)return;const e=this.peek();return this._items.delete(e),this._observable.notify(),e}popLast(){if(0===this.length)return;const e=this.last();return this._items.delete(e),this._observable.notify(),e}remove(e){this.contains(e)&&(this._items.delete(e),this._observable.notify())}filter(e){const t=this.length;return this._items.forEach((t=>{e(t)||this._items.delete(t)})),t!==this._items.size&&this._observable.notify(),this}*[Symbol.iterator](){(0,s.gc)(this._observable),yield*this._items}}},75503:(e,t,r)=>{r.d(t,{E:()=>M,w:()=>o});var s=r(4576),n=(r(44208),r(3694)),i=r(11006);class o{constructor(e=9,t){this._compareMinX=u,this._compareMinY=h,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),w.prune(),I.prune(),T.prune(),v.prune()}all(e){a(this._data,e)}search(e,t){let r=this._data;const s=this._toBBox;if(_(e,r))for(w.clear();r;){for(let n=0,i=r.children.length;n<i;n++){const i=r.children[n],o=r.leaf?s(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 s=0,n=t.children.length;s<n;s++){const n=t.children[s],i=t.leaf?r(n):n;if(_(e,i)){if(t.leaf||g(e,i))return!0;w.push(n)}}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-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,n=null,i=0,o=!1;const a=this._toBBox(e);for(T.clear(),v.clear();r||T.length>0;){if(r||(r=T.pop(),n=T.data[T.length-1],i=v.pop()??0,o=!0),r.leaf&&(t=(0,s.qh)(r.children,e,r.children.length,r.indexHint),-1!==t))return r.children.splice(t,1),T.push(r),this._condense(T),this;o||r.leaf||!g(r,a)?n?(i++,r=n.children[i],o=!1):r=null:(T.push(r),v.push(i),i=0,n=r,r=r.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,r,s){const n=r-t+1;let i=this._maxEntries;if(n<=i){const s=new A(e.slice(t,r+1));return l(s,this._toBBox),s}s||(s=Math.ceil(Math.log(n)/Math.log(i)),i=Math.ceil(n/i**(s-1)));const o=new x([]);o.height=s;const a=Math.ceil(n/i),d=a*Math.ceil(Math.sqrt(i));b(e,t,r,d,this._compareMinX);for(let n=t;n<=r;n+=d){const t=Math.min(n+d-1,r);b(e,n,t,a,this._compareMinY);for(let r=n;r<=t;r+=a){const n=Math.min(r+a-1,t);o.children.push(this._build(e,r,n,s-1))}}return l(o,this._toBBox),o}_insert(e,t,r){const s=this._toBBox,n=r?e:s(e);T.clear();const i=function(e,t,r,s){for(;s.push(t),!0!==t.leaf&&s.length-1!==r;){let r,s=1/0,n=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<n?(n=l,s=a<s?a:s,r=o):l===n&&a<s&&(s=a,r=o)}t=r||t.children[0]}return t}(n,this._data,t,T);for(i.children.push(e),p(i,n);t>=0&&T.data[t].children.length>this._maxEntries;)this._split(T,t),t--;!function(e,t,r){for(let s=r;s>=0;s--)p(t.data[s],e)}(n,T,t)}_split(e,t){const r=e.data[t],s=r.children.length,n=this._minEntries;this._chooseSplitAxis(r,n,s);const i=this._chooseSplitIndex(r,n,s);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 s,n,i;s=n=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),p=c(t)+c(a);l<s?(s=l,i=o,n=p<n?p:n):l===s&&p<n&&(n=p,i=o)}return i}_chooseSplitAxis(e,t,r){const s=e.leaf?this._compareMinX:u,n=e.leaf?this._compareMinY:h;this._allDistMargin(e,t,r,s)<this._allDistMargin(e,t,r,n)&&e.children.sort(s)}_allDistMargin(e,t,r,s){e.children.sort(s);const n=this._toBBox,i=d(e,0,t,n),o=d(e,r-t,r,n);let a=y(i)+y(o);for(let s=t;s<r-t;s++){const t=e.children[s];p(i,e.leaf?n(t):t),a+=y(i)}for(let s=r-t-1;s>=t;s--){const t=e.children[s];p(o,e.leaf?n(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 n=e.data[t-1],i=n.children;i.splice((0,s.qh)(i,r,i.length,n.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,s,n){n||(n=new A([])),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(let i,o=t;o<r;o++)i=e.children[o],p(n,e.leaf?s(i):i);return n}function p(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 h(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),s=Math.max(e.minY,t.minY),n=Math.min(e.maxX,t.maxX),i=Math.min(e.maxY,t.maxY);return Math.max(0,n-r)*Math.max(0,i-s)}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,s,n){const o=[t,r];for(;o.length;){const t=o.pop(),r=o.pop();if(t-r<=s)continue;const a=r+Math.ceil((t-r)/s/2)*s;(0,i.q)(e,a,r,t,n),o.push(r,a,a,t)}}const w=new n.A,I=new n.A,T=new n.A,v=new n.A({deallocator:void 0});class M{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class E extends M{constructor(){super(...arguments),this.height=1,this.indexHint=new s.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 s=r(36563),n=(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,s)=>{let i=!0;const o=e=>{(0,n.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,n.$X)(a)?this._clientPromises[i]=a.then((e=>(this._clients[i]=new l.default(e,t,this._ongoingJobsQueue),o(r),this._clients[i])),(()=>(o(s),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 s=new Array(this._clientPromises.length);for(let n=0;n<this._clientPromises.length;++n){const i=this._clientPromises[n];s[n]=i.then((s=>s?.invoke(e,t,r)))}return s}close(){let e;for(;e=this._ongoingJobsQueue.pop();)e.resolver.reject((0,n.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 s=(0,n.Tw)();this._ongoingJobsQueue.push({methodName:e,data:t,invokeOptions:r,resolver:s});for(let e=0;e<this._clientPromises.length;e++){const t=this._clients[e];t?t.jobAdded():this._clientPromises[e].then((e=>e?.jobAdded()))}return s.promise}createInvokeProxy(e){return(0,a.L)(this,e)}on(e,t){return Promise.all(this._clientPromises).then((()=>(0,s.vE)(this._clients.map((r=>r.on(e,t))))))}openPorts(){return new Promise((e=>{const t=new Array(this._clientPromises.length);let r=t.length;for(let s=0;s<this._clientPromises.length;++s)this._clientPromises[s].then((n=>{n&&(t[s]=n.openPort()),0==--r&&e(t)}))}))}get test(){}}},72457:(e,t,r)=>{r.d(t,{h:()=>i,k:()=>n});const s=new FinalizationRegistry((e=>{e.close()}));function n(e,t){s.register(e,t,t)}function i(e){s.unregister(e)}},29953:(e,t,r)=>{r.d(t,{ho:()=>$});var s=r(49186),n=r(44208),i=r(74887),o=r(10382),a=r(72457),l=r(61322),d=r(53966),p=r(97768),u=r(78888),h=r(84952);const c={async request(e,t){const r=e.options,s=r.responseType;r.signal=t?.signal,r.responseType="native"===s||"native-request-init"===s?"native-request-init":s&&["blob","json","text"].includes(s)&&(0,h.sC)(e.url)?.after?s:"array-buffer";const n=await(0,u.A)(e.url,r),i={data:n.data,httpStatus:n.httpStatus,ssl:n.ssl};switch(n.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 s=await l.default.loadWorker(e);s||(s=await import(e));const n=l.default.connect(s);this._workerPostMessage({type:y.Go.OPENED,jobId:r,data:n})}}}var T=r(73444),v=r(18357);const M=()=>d.A.getLogger("esri.core.workers.workerFactory"),{HANDSHAKE:E}=y.Go;let A,x;const N="Failed to create Worker. Fallback to execute module in main thread";async function k(e){return new Promise((t=>{function r(n){const i=(0,y.VI)(n);i&&i.type===E&&(e.removeEventListener("message",r),e.removeEventListener("error",s),t(e))}function s(t){t.preventDefault(),e.removeEventListener("message",r),e.removeEventListener("error",s),M().warn("Failed to create Worker. Fallback to execute module in main thread",t),(e=new I).addEventListener("message",r),e.addEventListener("error",s)}e.addEventListener("message",r),e.addEventListener("error",s)}))}let S=0;const{ABORT:L,INVOKE:C,OPEN:R,OPENED:D,RESPONSE:B}=y.Go;class O{static async create(e){const t=await async function(){if(!(0,n.A)("esri-workers"))return k(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,h.s2)(e.assetsPath),e.defaultAssetsPath=e.defaultAssetsPath?(0,h.s2)(e.defaultAssetsPath):void 0,e.request.interceptors=[],e.log.interceptors=[],e.locale=(0,T.JK)(),e.has={"esri-csp-restrictions":(0,n.A)("esri-csp-restrictions"),"esri-2d-debug":!1,"esri-2d-update-debug":(0,n.A)("esri-2d-update-debug"),"esri-2d-log-updating":(0,n.A)("esri-2d-log-updating"),"featurelayer-pbf":(0,n.A)("featurelayer-pbf"),"featurelayer-fast-triangulation-enabled":(0,n.A)("featurelayer-fast-triangulation-enabled"),"featurelayer-simplify-thresholds":(0,n.A)("featurelayer-simplify-thresholds"),"featurelayer-simplify-payload-size-factors":(0,n.A)("featurelayer-simplify-payload-size-factors"),"featurelayer-simplify-mobile-factor":(0,n.A)("featurelayer-simplify-mobile-factor"),"featurelayer-query-max-depth":(0,n.A)("featurelayer-query-max-depth"),"featurelayer-query-pausing-enabled":(0,n.A)("featurelayer-query-pausing-enabled"),"featurelayer-snapshot-enabled":(0,n.A)("featurelayer-snapshot-enabled"),"esri-atomics":(0,n.A)("esri-atomics"),"esri-shared-array-buffer":(0,n.A)("esri-shared-array-buffer"),"esri-tiles-debug":(0,n.A)("esri-tiles-debug"),"esri-workers-arraybuffer-transfer":(0,n.A)("esri-workers-arraybuffer-transfer"),"feature-polyline-generalization-factor":(0,n.A)("feature-polyline-generalization-factor"),"host-webworker":1},e.workers.loaderUrl&&(e.workers.loaderUrl=(0,h.s2)(e.workers.loaderUrl)),e.workers.workerPath?e.workers.workerPath=(0,h.s2)(e.workers.workerPath):e.workers.workerPath=(0,h.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?.slice()||[],paths:{..._.paths,...e.paths}};return e.hasOwnProperty("async")||(t.async=!0),e.hasOwnProperty("isDebug")||(t.isDebug=!1),e.baseUrl||(t.baseUrl=_.baseUrl),t}({baseUrl:t?.baseUrl,locale:(0,T.JK)(),has:{"csp-restrictions":1,"dojo-test-sniff":0,"host-webworker":1,...t?.has},map:{...t?.map},paths:{...t?.paths},packages:t?.packages||[]}),s={buildDate:v.$,fullVersion:g.ol,revision:v.u};return JSON.stringify({esriConfig:e,loaderConfig:r,kernelInfo:s})}());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){M().warn(N,x),e=new I}else M().warn(N,x),e=new I;return k(e)}();return new O(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,s=(0,y.Jc)();return new Promise(((t,n)=>{const o={resolve:t,reject:n,abortHandle:(0,i.NY)(r,(()=>{this._outJobs.delete(s),this._post({type:L,jobId:s})}))};this._outJobs.set(s,o),this._post({type:R,jobId:s,modulePath:e})}))}_onMessage(e){const t=(0,y.VI)(e);if(t)switch(t.type){case D:this._onOpenedMessage(t);break;case B:this._onResponseMessage(t);break;case L:this._onAbortMessage(t);break;case C:this._onInvokeMessage(t)}}_onAbortMessage(e){const t=this._inJobs,r=e.jobId,s=t.get(r);s&&(s.controller&&s.controller.abort(),t.delete(r))}_onInvokeMessage(e){const{methodName:t,jobId:r,data:s,abortable:n}=e,o=n?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,s,{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,s=this._outJobs.get(t);s&&(this._outJobs.delete(t),(0,p.xt)(s.abortHandle),s.resolve(r))}_onResponseMessage(e){const{jobId:t,error:r,data:n}=e,i=this._outJobs.get(t);i&&(this._outJobs.delete(t),(0,p.xt)(i.abortHandle),r?i.reject(s.A.fromJSON(JSON.parse(r))):i.resolve(n))}_post(e,t,r){return(0,y.u1)(this.worker,e,t,r)}}const j=(0,n.A)("host-browser")?Math.min(navigator.hardwareConcurrency-1,(0,n.A)("workers-pool-size")??8):0;let F=(0,n.A)("esri-mobile")?Math.min(j,3):j;F||(F=(0,n.A)("safari")&&(0,n.A)("mac")?7:2);let P=0;const q=[];async function G(e,t){const r=new o.A,{registryTarget:s,...n}=t;return await r.open(e,n),s&&(0,a.k)(s,r),r}async function $(e,t={}){if("string"!=typeof e)throw new s.A("workers:undefined-module","modulePath is missing");let r=t.strategy||"distributed";if((0,n.A)("host-webworker")&&!(0,n.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 s=t.client||r;return G([l.default.connect(r,t.schedule)],{...t,client:s})}if(await async function(){if(H)return H;Z=new AbortController;const e=[];for(let t=0;t<F;t++){const r=O.create(t).then((e=>(q[t]=e,e)));e.push(r)}return H=Promise.all(e),H}(),(0,i.Te)(t.signal),"dedicated"===r){const r=P++%F;return G([await q[r].open(e,t)],t)}if(t.maxNumWorkers&&t.maxNumWorkers>0){const r=Math.min(t.maxNumWorkers,F);if(r<F){const s=new Array(r);for(let n=0;n<r;++n){const r=P++%F;s[n]=q[r].open(e,t)}return G(s,t)}}return G(q.map((r=>r.open(e,t))),t)}let Z,H=null},43334:(e,t,r)=>{r.d(t,{N3:()=>i,Om:()=>n});var s=r(92722);class n{constructor(e=null,t={},r,s){this.geometry=e,this.attributes=t,this.centroid=r,this.objectId=s,this.displayId=0,this.geohashX=0,this.geohashY=0}static fromJSON(e,t){const r=e.geometry?s.A.fromJSON(e.geometry):null,i=e.centroid?s.A.fromJSON(e.centroid):null,o=e.attributes[t];return new n(r,e.attributes,i,o)}weakClone(){const e=new n(this.geometry,this.attributes,this.centroid,this.objectId);return e.displayId=this.displayId,e.geohashX=this.geohashX,e.geohashY=this.geohashY,e}clone(){const e=this.geometry?.clone(),t=new n(e,{...this.attributes},this.centroid?.clone(),this.objectId);return t.displayId=this.displayId,t.geohashX=this.geohashX,t.geohashY=this.geohashY,t}}function i(e){return!!e.geometry?.coords?.length}},58512:(e,t,r)=>{r.d(t,{A:()=>s});class s{constructor(){this.objectIdFieldName=null,this.globalIdFieldName=null,this.geohashFieldName=null,this.geometryProperties=null,this.geometryType=null,this.spatialReference=null,this.hasZ=!1,this.hasM=!1,this.features=[],this.fields=[],this.transform=null,this.exceededTransferLimit=!1,this.uniqueIdField=null,this.queryGeometryType=null,this.queryGeometry=null}weakClone(){const e=new s;return e.objectIdFieldName=this.objectIdFieldName,e.globalIdFieldName=this.globalIdFieldName,e.geohashFieldName=this.geohashFieldName,e.geometryProperties=this.geometryProperties,e.geometryType=this.geometryType,e.spatialReference=this.spatialReference,e.hasZ=this.hasZ,e.hasM=this.hasM,e.features=this.features,e.fields=this.fields,e.transform=this.transform,e.exceededTransferLimit=this.exceededTransferLimit,e.uniqueIdField=this.uniqueIdField,e.queryGeometry=this.queryGeometry,e.queryGeometryType=this.queryGeometryType,e}}},92722:(e,t,r)=>{r.d(t,{A:()=>s});class s{constructor(e=[],t=[]){this.lengths=e??[],this.coords=t??[]}static fromJSON(e){return new s(e.lengths,e.coords)}static fromRect(e){const[t,r,n,i]=e,o=n-t,a=i-r;return new s([5],[t,r,o,0,0,a,-o,0,0,-a])}get isPoint(){return 0===this.lengths.length}get maxLength(){return Math.max(...this.lengths)}get size(){return this.lengths.reduce(((e,t)=>e+t))}forEachVertex(e){let t=0;this.lengths.length||e(this.coords[0],this.coords[1]);for(let r=0;r<this.lengths.length;r++){const s=this.lengths[r];for(let r=0;r<s;r++)e(this.coords[2*(r+t)],this.coords[2*(r+t)+1]);t+=s}}deltaDecode(){const e=this.clone(),{coords:t,lengths:r}=e;let s=0;for(const e of r){for(let r=1;r<e;r++)t[2*(s+r)]+=t[2*(s+r)-2],t[2*(s+r)+1]+=t[2*(s+r)-1];s+=e}return e}clone(e){if(0===this.lengths.length)return new s([],[this.coords[0],this.coords[1]]);const t=2*(0===this.lengths.length?1:this.lengths.reduce(((e,t)=>e+t))),r=this.coords.slice(0,t);return e?(e.set(r),new s(this.lengths,e)):new s(Array.from(this.lengths),Array.from(r))}}},6518:(e,t,r)=>{r.d(t,{F:()=>a});var s=r(44208),n=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 n.w(9,(0,s.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,s)=>{e[t++]=s})),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 s=r(4576),n=r(49186),i=r(65529),o=r(53966),a=r(70328),l=r(19419),d=r(90708),p=r(6518),u=r(51441),h=r(37730);const c=(0,a.vt)();class y{constructor(e){this.geometryInfo=e,this._boundsStore=new p.F,this._featuresById=new Map,this.events=new i.A,this.featureAdapter=h.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,s,n]=this.fullBounds;return{xmin:t,ymin:r,xmax:s,ymax:n,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(s.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))}))}_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 n.A("featurestore:invalid-feature","feature id is missing",{feature:e}));const r=this._featuresById.get(t);let s;if(r?(e.displayId=r.displayId,s=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);s=(0,d.jQ)(null!=s?s:(0,l.vt)(),e.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),null!=s&&this._boundsStore.set(t,s),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 n.A("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const r=this._featuresById.get(t);if(!r)return this._add(e),e;const{geometry:s,attributes:i}=e;for(const e in i)r.attributes[e]=i[e];return s&&(r.geometry=s,this._boundsStore.set(t,(0,d.jQ)((0,l.vt)(),s,this.geometryInfo.hasZ,this.geometryInfo.hasM)??null)),r}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._boundsStore.delete(t),this._featuresById.delete(t),e}}},37730:(e,t,r)=>{r.d(t,{T:()=>o});var s=r(27647),n=r(43334),i=r(92722);const o={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t)=>new n.Om(t,e.attributes,null,e.objectId),getGeometry:e=>e.geometry,getCentroid:(e,t)=>(null==e.centroid&&(e.centroid=(0,s.Q)(new i.A,e.geometry,t.hasZ,t.hasM)),e.centroid)}},64714:(e,t,r)=>{r.d(t,{F0:()=>l,Vx:()=>u,e2:()=>c,f:()=>y});var s=r(44208),n=r(4718),i=r(99352),o=r(4071),a=r(93470);function l(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?a.Cb:"esriGeometryPolyline"===e?a.yM:a.WR}}}const d=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let p=1;function u(e,t){if((0,s.A)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let r=`this${h(t)} = null;`;for(const t in e)r+=`this${h(t)} = ${JSON.stringify(e[t])};`;const s=new Function(`\n return class AttributesClass$${p++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new s}catch(r){return()=>({[t]:null,...e})}}function h(e){return d.test(e)?`.${e}`:`["${e}"]`}function c(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,n.o8)(e)}}]}function y(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:i.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryBins:o.$,editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},80340:(e,t,r)=>{r.d(t,{P:()=>I});var s=r(90237),n=(r(59456),r(69622)),i=r(49186),o=r(53966),a=r(91869),l=r(39516),d=r(10107),p=(r(44208),r(87811),r(40608)),u=r(39829),h=r(57251),c=r(21325),y=r(85342),m=r(69860),f=r(45654),g=r(71402),_=r(42538),b=r(61956),w=r(5443);let I=class extends n.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,s)=>{if("entity"===t.get(s))this.entityTypeNames.add(s);else{if("relationship"!==t.get(s))return o.A.getLogger(this).warn(`A named type, ${s}, was in the inclusion list that wasn't in the data model and will be removed`),void e.inclusionModeDefinition?.namedTypeDefinitions.delete(s);this.relationshipTypeNames.add(s)}const n=new Map;r.members?.forEach((e=>{(0,a.tE)(this.memberIdTypeLookup,e.id,(()=>new Set)).add(s);const t=this.getById(e.id);t&&n.set(e.id,t)})),this.sublayerCaches.set(s,n)}))}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 m.A.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 s;if(s=e||new b.A({where:"1=1",outFields:["*"]}),"link-chart"===t.parentCompositeLayer.type){const e=t.parentCompositeLayer,r=this._processingCacheUpdatesLookup.get(t.objectType.name??""),n=s.outFields;n&&1===n.length&&n[0]===y.dr&&"1=1"===s.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=>{if(this.relationshipTypeNames.has(t.objectType.name)){r.geometry=e.relationshipLinkChartDiagramLookup.get(r.attributes[t.objectIdField]);const s=this.memberIdTypeLookup.get(r.attributes[y.Cz]),n=this.memberIdTypeLookup.get(r.attributes[y.KQ]),i=this._isEndEntitySpatial(s,r,y.Cz),o=this._isEndEntitySpatial(n,r,y.KQ);r.attributes[y.BL]=Number(i&&o)}else{r.geometry=e.entityLinkChartDiagramLookup.get(r.attributes[t.objectIdField]);const s=this.geographicLookup.get(t.objectType.name);s&&r.attributes[s.name]?r.attributes[y.BL]=1:r.attributes[y.BL]=0}r.attributes[y.T1]=r.geometry,o.push(r)})),o}return this.retrieveDataFromService(s,t,r)}async getConnectedRecordIds(e,t){const r=[];let s="";const n=this._getNamedTypeIdMapFromNodeIds(e);if(t&&0!==t?.length){for(const e of t)s=s+e+"|";s=s.slice(0,-1)}const i={},a=[];for(const[e,r]of n){const n=`${e}_ids`;i[n]=r,t&&0!==t?.length?a.push(`MATCH (n:${e}) WHERE id(n) IN $${n} WITH n MATCH (n)-[r:${s}]-(m) RETURN id(r), type(r), id(m), labels(m)[0]`):a.push(`MATCH (n:${e}) WHERE id(n) IN $${n} WITH n MATCH (n)-[r]-(m) RETURN id(r), type(r), id(m), labels(m)[0]`)}if(!a.length)return r;const l=a.join(" UNION "),d=(await(0,g.executeQueryStreaming)(this.knowledgeGraph,new _.A({openCypherQuery:l,bindParameters:i}))).resultRowsStream.getReader();try{for(;;){const{done:e,value:t}=await d.read();if(e)break;for(let e=0;e<t.length;e++){const s=t[e];r.push({id:s[0],typeName:s[1]}),r.push({id:s[2],typeName:s[3]})}}}catch(e){if("AbortError"!==e.name)throw e;o.A.getLogger(this).info("Request aborted as expected")}return r}async getRelationshipsBetweenNodes(e,t){const r=this._getNamedTypeIdMapFromNodeIds(e);if(0===r.size)return[];const s={relationshipExclusionIds:t,possibleConnectionEntityIds:e},n=[];for(const[e,t]of r.entries()){const r=`${e}_ids`;s[r]=t,n.push(`MATCH (n:${e}) WHERE id(n) IN $${r} WITH n MATCH (n)-[r]->(m) WHERE id(m) IN $possibleConnectionEntityIds AND NOT id(r) IN $relationshipExclusionIds RETURN id(r), type(r)`)}const i=n.join(" UNION "),a=[],l=(await(0,g.executeQueryStreaming)(this.knowledgeGraph,new _.A({openCypherQuery:i,bindParameters:s}))).resultRowsStream.getReader();try{for(;;){const{done:e,value:t}=await l.read();if(e)break;for(let e=0;e<t.length;e++){const r=t[e];a.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 a}async getRelationshipsFromNodes(e,t,r){const s=this._getNamedTypeIdMapFromNodeIds(e);if(0===s.size||0===t.length)return[];const n={relationshipExclusionIds:r,possibleConnectionEntityIds:t},i=[];for(const[e,t]of s.entries()){const r=`${e}_ids`;n[r]=t,i.push(`MATCH (n:${e}) WHERE id(n) IN $${r} WITH n MATCH (n)-[r]-(m) WHERE id(m) IN $possibleConnectionEntityIds AND NOT id(r) IN $relationshipExclusionIds RETURN id(r), type(r)`)}const a=i.join(" UNION "),l=new Map,d=(await(0,g.executeQueryStreaming)(this.knowledgeGraph,new _.A({openCypherQuery:a,bindParameters:n}))).resultRowsStream.getReader();try{for(;;){const{done:e,value:t}=await d.read();if(e)break;for(let e=0;e<t.length;e++){const r=t[e];let s=l.get(r[1]);s||(s=new Set,l.set(r[1],s)),s.add(r[0])}}}catch(e){if("AbortError"!==e.name)throw e;o.A.getLogger(this).info("Request aborted as expected")}const p=[];for(const[e,t]of l)for(const r of t)p.push({id:r,typeName:e});return p}async refreshCacheContent(e,t,r,s=!0){const n=m.A.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,p]of l){const l=new Promise((o=>{(async()=>{const o=new Set,l=[];let u,h="",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))h=`MATCH (n:${e}) ${p?"WHERE id(n) IN $ids ":""}return ID(n)`,o.forEach((e=>{h+=`, 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,h=`MATCH ()-[n:${e}]->() ${p?"WHERE id(n) IN $ids ":""}return ID(n), id(startNode(n)), id(endNode(n))`,o.forEach((e=>{h+=`, n.${e}`,l.push(e)}))}u=new _.A(p?{openCypherQuery:h,bindParameters:{ids:p}}:{openCypherQuery:h});const m=(await(0,g.executeQueryStreaming)(this.knowledgeGraph,u)).resultRowsStream.getReader();for(;;){const{done:t,value:r}=await m.read();if(t)break;const i=[];for(let e=0;e<r.length;e++){const t=r[e];let s=0,n=0;const o={properties:{}};for(o.id=t[s],s++,n++,c&&(o.originId=t[s],s++,n++,o.destinationId=t[s],s++,n++,(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])));s<t.length;s++)o.properties[l[s-n]]=t[s];i.push(o)}const o=n.writeToStore(i,y.dr,this.geographicLookup.get(e)?.name);this.sublayerCaches.has(e)||this.sublayerCaches.set(e,new Map),s&&!this.inclusionModeDefinition?.namedTypeDefinitions.has(e)&&this.inclusionModeDefinition?.namedTypeDefinitions.set(e,{useAllData:!1,members:new Map}),s&&!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[y.dr],t),s&&!this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members.has(t.attributes[y.dr])&&(this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members.set(t.attributes[y.dr],{id:t.attributes[y.dr]}),(0,a.tE)(this.memberIdTypeLookup,t.attributes[y.dr],(()=>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,s)=>{r.has(s)&&this.sublayerCaches.get(e)?.delete(s)}))}))}async retrieveDataFromService(e,t,r){const s=m.A.getInstance(),n=new Set,o=[];let a,d="",p=[];const b="relationship"===t.graphType,I=this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData,T=t.parentCompositeLayer.sublayerIdsCache.get(t.objectType.name);let v=!I&&T?Array.from(T).sort():null;if(this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData)this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData&&null!=e.objectIds&&(v=e.objectIds);else if(null!=e.objectIds&&v&&v.length>0){const t=e.objectIds;e.objectIds=v.filter((e=>t.includes(e)))}else if(null!=e.objectIds)v=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=v}if(null!=e.outFields){const r=e.outFields;r.includes("*")?t.fields.forEach((e=>{n.add(e.name)})):r.forEach((e=>{e!==y.dr&&e!==t.geometryFieldName&&n.add(e)}))}if(null!=e.geometry){const r=e.geometry;let s;const p=t.parentCompositeLayer.dataManager.knowledgeGraph.serviceDefinition,y=p?.spatialReference,m=p?.serviceCapabilities?.geometryCapabilities;let g=m?.geometryMaxBoundingRectangleSizeX,I=m?.geometryMaxBoundingRectangleSizeY;if("point"===r.type){let e=r;e.spatialReference?.isWGS84||(await(0,h.initializeProjection)(e.spatialReference,c.KK),e=(0,h.project)(e,c.KK)),s=new w.A({spatialReference:c.KK,xmin:e.x-1e-4,ymin:e.y-1e-4,xmax:e.x+1e-4,ymax:e.y+1e-4})}else r?.extent?.spatialReference&&!r.spatialReference?.isWGS84?(await(0,h.initializeProjection)(r.extent.spatialReference,c.KK),s=(0,h.project)(r.extent,c.KK)):s=r.extent;if(g&&I&&y){if(4326!==y.wkid){const e=new w.A({spatialReference:y,xmax:g,ymax:I}),t=(0,h.project)(e,c.KK);g=t.xmax,I=t.ymax}if(s.xmax-s.xmin>g)throw new i.A("knowledge-graph:layer-data-manager",`Extent x bounds should be within ${g}° latitude, limit exceeded`);if(s.ymax-s.ymin>I)throw new i.A("knowledge-graph:layer-data-manager",`Extent y bounds should be within ${I}° longitude, limit exceeded`)}if(null!=e.where&&"1=1"!==e.where){const r=await(0,l.G)(e.where.toUpperCase(),t.fieldsIndex);t.fields.forEach((e=>{r.fieldNames.includes(e.name)&&n.add(e.name)}))}d=b?`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&&n.add(t.geometryFieldName),n.forEach((e=>{d+=`, n.${e}`,o.push(e)})),a=new _.A({openCypherQuery:d,bindParameters:{param_filter_geom:new u.A({rings:(0,f.DX)(s)})}})}else{let r="";if(null!=e.where&&"1=1"!==e.where){const s=await(0,l.G)(e.where,t.fieldsIndex);t.fields.forEach((e=>{s.fieldNames.includes(e.name)&&n.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(s.parseTree),a&&(r="")}let s="";s=b?`Match ()-[n:${t.objectType.name}]->()`:`Match (n:${t.objectType.name})`;let i=!1;v&&(i=!0,s+=" WHERE ID(n) IN $ids"),r&&(s+=i?" AND":" WHERE",s+=` ${r}`),s+=" return ID(n)",b&&(s+=", id(startNode(n)), id(endNode(n))"),e.returnGeometry&&t.geometryFieldName&&n.add(t.geometryFieldName),n.forEach((e=>{s+=`, n.${e}`,o.push(e)})),a=new _.A(v?{openCypherQuery:s,bindParameters:{ids:v}}:{openCypherQuery:s})}const M=(await(0,g.executeQueryStreaming)(t.parentCompositeLayer.dataManager.knowledgeGraph,a,r)).resultRowsStream.getReader();for(;;){const{done:e,value:r}=await M.read();if(e)break;const n=[];for(let e=0;e<r.length;e++){const t=r[e];let s=0,i=0;const a={properties:{}};for(a.id=t[s],s++,i++,b&&(a.originId=t[s],s++,i++,a.destinationId=t[s],s++,i++);s<t.length;s++)a.properties[o[s-i]]=t[s];n.push(a)}p=p.concat(s.writeToStore(n,y.dr,t.parentCompositeLayer.dataManager.geographicLookup.get(t.objectType.name)?.name))}return p}_isEndEntitySpatial(e,t,r){for(const s of e??[])if(this.entityTypeNames.has(s)){const e=this.geographicLookup.get(s),n=e&&this.sublayerCaches.get(s)?.get(t.attributes[r]);if(e&&n?.attributes[e.name])return!0}return!1}_getNamedTypeIdMapFromNodeIds(e){const t=new Map;return e.forEach((e=>{if(this.memberIdTypeLookup.has(e))for(const r of this.memberIdTypeLookup.get(e)){if(!this.entityTypeNames.has(r))return;t.has(r)?t.get(r)?.push(e):t.set(r,[e])}})),t}};(0,s._)([(0,d.MZ)()],I.prototype,"knowledgeGraph",void 0),(0,s._)([(0,d.MZ)()],I.prototype,"inclusionModeDefinition",void 0),(0,s._)([(0,d.MZ)()],I.prototype,"entityTypeNames",void 0),(0,s._)([(0,d.MZ)()],I.prototype,"relationshipTypeNames",void 0),(0,s._)([(0,d.MZ)()],I.prototype,"geographicLookup",void 0),(0,s._)([(0,d.MZ)()],I.prototype,"sublayerCaches",void 0),(0,s._)([(0,d.MZ)()],I.prototype,"nodeConnectionsLookup",void 0),(0,s._)([(0,d.MZ)()],I.prototype,"relationshipConnectionsLookup",void 0),(0,s._)([(0,d.MZ)()],I.prototype,"memberIdTypeLookup",void 0),I=(0,s._)([(0,p.$)("esri.layers.knowledgeGraph.KnowledgeGraphLayerDataManager")],I)},70643:(e,t,r)=>{r.d(t,{A:()=>V});var s=r(90237),n=(r(59456),r(13874)),i=(r(86162),r(94409),r(65345),r(42980),r(20917),r(92438),r(96576),r(93618),r(65494)),o=r(15036),a=r(4718),l=r(92071),d=(r(29953),r(10107)),p=(r(44208),r(53966),r(40608)),u=r(43937),h=r(35666),c=r(57251),y=r(16930),m=r(21325),f=r(4146),g=r(83221),_=r(88856),b=r(64714);r(87811);const w=(0,r(17036).p)(),I=e=>{let t=class extends e{constructor(){super(...arguments),this.fields=[],this.fieldsIndex=null}};return(0,s._)([(0,d.MZ)(w.fields)],t.prototype,"fields",void 0),(0,s._)([(0,d.MZ)(w.fieldsIndex)],t.prototype,"fieldsIndex",void 0),t=(0,s._)([(0,p.$)("esri.layers.knowledgeGraph.KnowledgeGraphSublayerBase")],t),t};var T=r(85342),v=r(63074),M=r(87718),E=r(76294),A=r(32756),x=r(54310),N=r(25036),k=r(82935),S=r(10873),L=r(13213),C=r(20437),R=r(30524),D=r(81457),B=r(39383),O=r(96184),j=r(22671),F=r(61956),P=r(30291),q=r(61322),G=r(5443),$=r(39829),Z=r(82799),H=r(86738),Q=r(50498);function Y(e){if(!e.json)return e;e.json.write=U(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=U(e.write))}return e}function U(e){return"object"==typeof e&&e?(!1!==e.enabled&&(e.overridePolicy=function(e){const{target:t,writer:r,overridePolicy:s,...n}=e;return function(e,t){const r=z.call(this,e,t);return r.enabled?{...n,...r}:r}}(e)),e):!0===e?J():e}function J(){return{overridePolicy:z}}function z(e,t){const r=!!this.geometryType;let s={enabled:r};return r&&(s={...s,...X.call(this,e,t)}),s}function X(e,t){return{ignoreOrigin:this.originIdOf(t)>h.Gr.DEFAULTS}}let W=class extends(I((0,E.J)((0,M.F)((0,v.dM)((0,A.f)((0,k.e)((0,N.j)((0,x.J)((0,l.P)(f.A)))))))))){constructor(e){super(e),this.blendMode="normal",this.capabilities=(0,b.f)(!1,!1),this.charts=null,this.definitionExpression=null,this.displayField="",this.effect=null,this.elevationInfo=null,this.featureEffect=null,this.graphType=null,this.labelsVisible=!0,this.labelingInfo=null,this.layerType=null,this.legendEnabled=!0,this.maxScale=0,this.minScale=0,this.objectIdField=T.dr,this.objectType=null,this.opacity=1,this.orderBy=null,this.parent=null,this.parentCompositeLayer=null,this.persistenceEnabled=!0,this.popupEnabled=!0,this.popupTemplate=null,this.refreshInterval=0,this.source={openPorts:()=>this.load().then((()=>{const e=new MessageChannel;return new q.default(e.port1,{channel:e,client:{queryFeatures:(e,t={})=>{const r=F.A.fromJSON(e);return this.queryFeaturesJSON(r,t)}}}),[e.port2]}))},this.type="knowledge-graph-sublayer",this.useViewTime=!0,this.visible=!0}get defaultPopupTemplate(){return this.createPopupTemplate()}set featureReduction(e){const t=this._normalizeFeatureReduction(e);this._set("featureReduction",t)}get fields(){const e=[];return this.objectType?.properties?.forEach((t=>{const 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:T.M1,type:"esriFieldTypeInteger",alias:T.M1,editable:!1}),C.A.fromJSON({name:T.BL,type:"esriFieldTypeInteger",alias:T.BL,editable:!1})),e}get geometryType(){if("link-chart"===this.parentCompositeLayer?.type)return"relationship"===this.graphType?"polyline":"point";const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.geometryType;return t&&"esriGeometryNull"!==t?Q.g.fromJSON(t):null}get geometryFieldName(){if("link-chart"===this.parentCompositeLayer?.type)return T.T1;const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name);return e?.name??null}get graphTypeName(){return this.objectType?.name}get hasM(){const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.name,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,R.yp)(e,this.fieldsIndex),this._set("renderer",e)}get renderer(){return this._isOverridden("renderer")?this._get("renderer"):"link-chart"===this.parentCompositeLayer?.type?"relationship"===this.graphType?(0,i.r)((0,b.F0)(Q.g.toJSON("polyline")).renderer):(0,i.r)((0,b.F0)(Q.g.toJSON("point")).renderer):(0,i.r)((0,b.F0)(Q.g.toJSON(this.geometryType)).renderer)}get spatialReference(){return this.parentCompositeLayer?.dataManager?.knowledgeGraph?.dataModel?.spatialReference??y.A.WGS84}set timeInfo(e){this._set("timeInfo",e)}get title(){return this._isOverridden("title")?this._get("title"):this.graphTypeName}set title(e){this._set("title",e)}writeTitle(e,t){t.title=e??"Layer"}createPopupTemplate(e){return(0,P.tn)(this,e)}createQuery(){return new F.A({where:"1=1",outFields:["*"]})}getField(e){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:s}=await this._setupQueryObjects(e),n=j.A.fromJSON(await s.executeQuery(r.toJSON(),t?.signal));return n.features.forEach((e=>{e.sourceLayer=this})),n}async queryFeaturesJSON(e,t){const{resolvedQuery:r,queryEngine:s}=await this._setupQueryObjects(e);return await s.executeQuery(r.toJSON(),t?.signal)}async queryFeatureCount(e,t){const{resolvedQuery:r,queryEngine:s}=await this._setupQueryObjects(e);return s.executeQueryForCount(r.toJSON(),t?.signal)}async queryExtent(e={},t){const r={...e,returnGeometry:!0},{resolvedQuery:s,queryEngine:n}=await this._setupQueryObjects(r),i=await n.executeQueryForExtent(s.toJSON(),t?.signal);let o;return o=null!=i.extent?.xmin&&null!=i.extent?.xmax&&null!=i.extent?.ymin&&null!=i.extent?.ymax?new G.A(i.extent):new G.A,{count:i.count,extent:o}}async queryObjectIds(e,t){const r=F.A.from(e);let s;if("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 s.executeQueryForIds(r.toJSON(),t?.signal)}loadQueryEngine(e){const t=new g.A({geometryType:Q.g.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ}),r=new _.d({fieldsIndex:this.fieldsIndex.toJSON(),geometryType:Q.g.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ,objectIdField:this.objectIdField,spatialReference:this.spatialReference.toJSON(),timeInfo:this.timeInfo?.toJSON(),featureStore:t});return r.featureStore.addMany(e),r}async refreshCachedQueryEngine(){const e=await this.parentCompositeLayer.dataManager.getData(new F.A({where:"1=1",outFields:[T.dr]}),this);this._cachedQueryEngine=this.loadQueryEngine(e)}load(e){return this.addResolvingPromise(this.parent.load(e).then((()=>{(0,R.sv)(this.timeInfo,this.fieldsIndex)}))),Promise.resolve(this)}async _setupQueryObjects(e,t){const r=F.A.from(e),s=r.geometry;let n;if(s&&!s.spatialReference?.isWGS84&&(await(0,c.initializeProjection)(s.spatialReference,m.KK),r.geometry=(0,c.project)(s instanceof $.A||s instanceof Z.A||s instanceof H.A?s:s.extent,m.KK)),"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{resolvedQuery:r,queryEngine:n}}};(0,s._)([(0,d.MZ)(Y((0,a.o8)(v.sU)))],W.prototype,"blendMode",void 0),(0,s._)([(0,d.MZ)()],W.prototype,"capabilities",void 0),(0,s._)([(0,d.MZ)({json:{origins:{"web-scene":{write:!1}},write:J()}})],W.prototype,"charts",void 0),(0,s._)([(0,d.MZ)({readOnly:!0})],W.prototype,"defaultPopupTemplate",null),(0,s._)([(0,d.MZ)({type:String,json:{origins:{service:{read:!1}},name:"layerDefinition.definitionExpression",write:{ignoreOrigin:!0}}})],W.prototype,"definitionExpression",void 0),(0,s._)([(0,d.MZ)()],W.prototype,"displayField",void 0),(0,s._)([(0,d.MZ)(Y((0,a.o8)(v.LF)))],W.prototype,"effect",void 0),(0,s._)([(0,d.MZ)()],W.prototype,"elevationInfo",void 0),(0,s._)([(0,d.MZ)(Y((0,a.o8)(M.Y)))],W.prototype,"featureEffect",void 0),(0,s._)([(0,d.MZ)(Y((0,a.o8)(L.d)))],W.prototype,"featureReduction",null),(0,s._)([(0,d.MZ)()],W.prototype,"fields",null),(0,s._)([(0,d.MZ)()],W.prototype,"geometryType",null),(0,s._)([(0,d.MZ)()],W.prototype,"geometryFieldName",null),(0,s._)([(0,d.MZ)({type:["entity","relationship"],nonNullable:!0,json:{write:{isRequired:!0,ignoreOrigin:!0}}})],W.prototype,"graphType",void 0),(0,s._)([(0,d.MZ)({type:String,nonNullable:!0,json:{write:{isRequired:!0,ignoreOrigin:!0}}})],W.prototype,"graphTypeName",null),(0,s._)([(0,d.MZ)()],W.prototype,"hasM",null),(0,s._)([(0,d.MZ)()],W.prototype,"hasZ",null),(0,s._)([(0,d.MZ)({type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0}}})],W.prototype,"id",void 0),(0,s._)([(0,d.MZ)(Y((0,a.o8)(S.kF)))],W.prototype,"labelsVisible",void 0),(0,s._)([(0,d.MZ)({type:[D.A],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:B.w,write:J()}})],W.prototype,"labelingInfo",void 0),(0,s._)([(0,d.MZ)({readOnly:!0,json:{read:!1,write:{writer(e,t){switch(this.parentCompositeLayer.type){case"link-chart":t.layerType="LinkChartSubLayer";break;case"knowledge-graph":t.layerType=this.geometryType?"KnowledgeGraphSubLayer":"KnowledgeGraphSubTable"}},isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],W.prototype,"layerType",void 0),(0,s._)([(0,d.MZ)(Y((0,a.o8)(S.fV)))],W.prototype,"legendEnabled",void 0),(0,s._)([(0,d.MZ)(Y((0,a.o8)(S.hG)))],W.prototype,"maxScale",void 0),(0,s._)([(0,d.MZ)(Y((0,a.o8)(S.hn)))],W.prototype,"minScale",void 0),(0,s._)([(0,d.MZ)()],W.prototype,"objectIdField",void 0),(0,s._)([(0,d.MZ)()],W.prototype,"objectType",void 0),(0,s._)([(0,d.MZ)(Y((0,a.o8)(S.ke)))],W.prototype,"opacity",void 0),(0,s._)([(0,d.MZ)(Y((0,a.o8)(A.n)))],W.prototype,"orderBy",void 0),(0,s._)([(0,d.MZ)({clonable:!1})],W.prototype,"parent",void 0),(0,s._)([(0,d.MZ)()],W.prototype,"parentCompositeLayer",void 0),(0,s._)([(0,d.MZ)(Y((0,a.o8)(S.M6)))],W.prototype,"popupEnabled",void 0),(0,s._)([(0,d.MZ)({type:n.A,json:{name:"popupInfo",write:{ignoreOrigin:!0}}})],W.prototype,"popupTemplate",void 0),(0,s._)([(0,d.MZ)({type:Number,json:{write:{overridePolicy:X}}})],W.prototype,"refreshInterval",void 0),(0,s._)([(0,d.MZ)({types:o.H,json:{name:"layerDefinition.drawingInfo.renderer",write:J()}})],W.prototype,"renderer",null),(0,s._)([(0,d.MZ)()],W.prototype,"source",void 0),(0,s._)([(0,d.MZ)()],W.prototype,"spatialReference",null),(0,s._)([(0,d.MZ)({type:O.A,json:{name:"layerDefinition.timeInfo",write:!0,origins:{"web-document":{name:"layerDefinition.timeInfo",read:!0,write:!0},"portal-item":{name:"layerDefinition.timeInfo",read:!0,write:!0}}}})],W.prototype,"timeInfo",null),(0,s._)([(0,d.MZ)({type:String,json:{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],W.prototype,"title",null),(0,s._)([(0,u.K)("title")],W.prototype,"writeTitle",null),(0,s._)([(0,d.MZ)({json:{read:!1}})],W.prototype,"type",void 0),(0,s._)([(0,d.MZ)(Y((0,a.o8)(k.B)))],W.prototype,"useViewTime",void 0),(0,s._)([(0,d.MZ)({type:Boolean,json:{name:"visibility",write:J()}})],W.prototype,"visible",void 0),W=(0,s._)([(0,p.$)("esri.layers.knowledgeGraph.KnowledgeGraphSublayer")],W);const V=W},69860:(e,t,r)=>{r.d(t,{A:()=>a}),r(59456);var s=r(90708),n=r(43334),i=r(85342),o=r(65864);class a{constructor(){this._featureLookup=new Map}static getInstance(){return a.instance||(a.instance=new a),a.instance}static resetInstance(){a.instance&&(a.instance=null)}deleteFromStore(e){e.forEach((e=>{this._featureLookup.delete(e)}))}readFromStoreByList(e){const t=[];return e.forEach((e=>{const r=this.readFromStoreById(e);r&&t.push(r)})),t}readFromStoreById(e){return this._featureLookup.get(e)??null}writeToStore(e,t,r){const a=[];return e.forEach((e=>{if(!e?.id)return;e.properties||(e.properties=[]);let l,d=null;if(r&&e.properties[r]&&(d=(0,s.Ux)(e.properties[r])),"originId"in e&&"destinationId"in e&&(e.properties[i.Cz]=e.originId,e.properties[i.KQ]=e.destinationId),e.properties[t]=e.id,e.id&&this._featureLookup.has(e.id)&&this._featureLookup.get(e.id).attributes){const s=this._featureLookup.get(e.id),i=JSON.parse(JSON.stringify(Object.assign(s.attributes,e.properties)));r&&e.properties[r]&&(i[r]=(0,o.rS)(e.properties[r])),l=new n.Om(d?JSON.parse(JSON.stringify(d)):s?.geometry?JSON.parse(JSON.stringify(s.geometry)):null,i,null,e.properties[t])}else l=new n.Om(d?JSON.parse(JSON.stringify(d)):null,e.properties,null,e.properties[t]);this._featureLookup.set(`${e.typeName?`${e.typeName}__${e.id}`:e.id}`,l),a.push(l)})),a}}},85342:(e,t,r)=>{r.d(t,{BL:()=>d,Cz:()=>i,KQ:()=>o,M1:()=>l,T1:()=>a,dr:()=>n,qN:()=>h});var s=r(71402);const n="ESRI__ID",i="ESRI__OriginID",o="ESRI__DestID",a="ESRI__LayoutGeometry",l="ESRI__AggregationCount",d="LC.ESRI__IsSpatial",p={initializeLayersFromClientData:async(e,t)=>{if(t||(t=[...e.layers,...e.tables].map((e=>e.graphTypeName))),0===t?.length)return;const r=new Map;for(const s of t)r.set(s,u(e,s));const n=await(0,s.fetchClientDataAtKeys)(e.dataManager.knowledgeGraph,Array.from(r.values()));for(const t of[...e.layers,...e.tables]){const r=t.objectType.name;if(null===r)continue;const s=n.get(u(e,r));if(s){const e=JSON.parse(s);null===e||"object"!=typeof e||e.hasOwnProperty("showLabels")||(e.showLabels=!1),t.read(e,{origin:"service"})}}}},u=(e,t)=>"knowledge-graph"===e.type?`${t}/Map`:`${t}/LinkChart/LinkChartSubLayer`;async function h(e,t){return p.initializeLayersFromClientData(e,t)}},45654:(e,t,r)=>{r.d(t,{DX:()=>_,_s:()=>w,aq:()=>b,fe:()=>I}),r(59456),r(52106);var s,n,i,o,a=r(78888),l=(r(61147),r(49186)),d=r(91869),p=(r(94194),r(90708),r(85342),r(69860),r(8460),r(71402)),u=r(42538);r(16930),(n=s||(s={})).ELEMENTUID="ELEMENTUID",n.TYPENAME="TYPENAME",s.ELEMENTUID,s.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 h,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=[],s=function(e,t){const r=new Map;if(t.dataModel?.relationshipTypes)for(const e of t.dataModel.relationshipTypes)e.name&&r.set(e.name,[]);for(const t of e)r.has(t.typeName)&&r.get(t.typeName)?.push(t.id);return r}(e,t),n={},i=[];for(const[e,t]of s){if(t.length<1)continue;const r=`${e}_ids`;n[r]=t,i.push(`MATCH (n)-[r:${e}]->(m) WHERE id(r) in $${r} RETURN id(n), labels(n)[0], id(m), labels(m)[0]`)}if(0===i.length)return[];const o=i.join(" UNION "),a=new u.A({openCypherQuery:o,bindParameters:n}),l=(await(0,p.executeQueryStreaming)(t,a)).resultRowsStream.getReader();for(;;){const{done:e,value:t}=await l.read();if(e)break;for(const e of t)r.push({id:e[0],typeName:e[1]}),r.push({id:e[2],typeName:e[3]})}return r}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)),s=new Map;if(0!==r.error_code)throw new l.A("knowledge-graph:layer-support-utils",r.error_message);const n=t.get_map_of_identifier_sets(),i=n.keys,o=i.size();for(let e=0;e<o;e++){const t=i.get(e),r=n.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){const e=r.get_identifier_array(),t=e.count();for(let r=0;r<t;r++)o.push(e.get_identifier_at(r).toString())}else if(r.id_array_type.value===m.STRING_ARRAY){const e=r.get_string_array(),t=e.count();for(let r=0;r<t;r++)o.push(e.get_string_at(r))}else{if(r.id_array_type.value!==m.OID_ARRAY)throw new l.A("knowledge-graph:layer-support-utils","Tried to encode an unexpected ID Array type.");{const e=r.get_oid_array(),t=e.count();for(let r=0;r<t;r++)o.push(e.get_objectid_at(r).toString())}}s.set(t,o)}return t.delete(),s}(new Uint8Array(r))}(e).then((e=>{!function(e,t){for(const[r,s]of e){const e=(0,d.tE)(t.namedTypeDefinitions,r,(()=>({useAllData:!1,members:new Map})));for(const t of s)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[s,n]of r.namedTypeDefinitions){if(!n.members||n.useAllData)continue;const r=n.members.keys();let i=!1,o=!0;const a=new t.ObjectIdArray,l=new t.StringArray,d=new t.GlobalIdArray,p=new t.IdentifierArray,u=new t.ObjectIdentifierSet;for(const e of r)o&&(i=!isNaN(Number(e)),o=!1),i?a.add_objectid(Number(e)):(l.add_string(e),d.add_globalid(e)),p.add_identifier(e);u.set_oid_array(a),u.set_string_array(l),u.set_globalid_array(d),u.set_identifier_array(p),a.delete(),l.delete(),d.delete(),p.delete(),e.put_identifier_set(s,u),u.delete()}}(r,t,e);const s=new t.MapOfObjectIdentifierSetsEncoder;try{s.set_map_of_identifier_sets(r),s.encode();const e=s.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 s.delete(),t}finally{r.delete()}}r(35448),(f=h||(h={}))[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(40863),r(82799),r(94985),r(39829),r(68249),r(86738)},32756:(e,t,r)=>{r.d(t,{f:()=>d,n:()=>l});var s=r(90237),n=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 s=e.find((e=>!!e.field));if(!s)return null;const n=new a.A;return n.read(s,r),[n]}},write:{writer:function(e,t,r,s){const i=e.find((e=>!!e.field));i&&(0,n.sM)(r,[i.toJSON()],t)}}}},d=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return(0,s._)([(0,i.MZ)(l)],t.prototype,"orderBy",void 0),t=(0,s._)([(0,o.$)("esri.layers.mixins.OrderedLayer")],t),t}},91880:(e,t,r)=>{r.d(t,{A:()=>u});var s,n=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 p=s=class extends o.oY{constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new s({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,n._)([(0,a.MZ)({type:String,json:{write:!0}})],p.prototype,"field",void 0),(0,n._)([(0,a.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],p.prototype,"valueExpression",void 0),(0,n._)([(0,a.MZ)({type:d.apiValues,json:{type:d.jsonValues,read:d.read,write:d.write}})],p.prototype,"order",void 0),p=s=(0,n._)([(0,l.$)("esri.layers.support.OrderByInfo")],p);const u=p},4071:(e,t,r)=>{r.d(t,{$:()=>s,P:()=>n});const s={supportsDate:!1,supportsFixedInterval:!1,supportsAutoInterval:!1,supportsFixedBoundaries:!1,supportedStatistics:void 0},n={analytics:{supportsCacheHint:!1},attachment:{supportsContentType:!1,supportsExifInfo:!1,supportsKeywords:!1,supportsName:!1,supportsSize:!1,supportsCacheHint:!1,supportsResize:!1},data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsAsyncApplyEdits:!1,zDefault:void 0},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryBins:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryBins:s,query:{maxRecordCount:0,maxRecordCountFactor:0,standardMaxRecordCount:0,supportsCacheHint:!1,supportsCentroid:!1,supportsCompactGeometry:!1,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsSqlExpression:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsStatistics:!1,tileMaxRecordCount:0}}},8460:(e,t,r)=>{r.d(t,{$C:()=>m,Hh:()=>o,J:()=>l,Tu:()=>c,Wg:()=>y,Xq:()=>g,i6:()=>_,pM:()=>h,tx:()=>a,vJ:()=>f});var s=r(2741);let n,i=null;function o(){return n||(n=r.e(3666).then(r.bind(r,3666)).then((e=>e.l)).then((({default:e})=>e({locateFile:e=>(0,s.s)(`esri/libs/linkchartlayout/${e}`)}))).then((e=>{!function(e){i=e}(e)})),n)}var a,l,d,p,u,h,c,y,m,f,g,_,b,w;function I(e){const t=Object.keys(d).filter((e=>isNaN(parseInt(e,10)))).indexOf(e.timeDirection),r=Object.keys(p).filter((e=>isNaN(parseInt(e,10)))).indexOf(e.eventsTicksVisualization);return{timeDirection:{value:t>-1?t:d.right},timeBannerUTCOffsetInMinutes:e.timeBannerUTCOffsetInMinutes,eventsTicksVisualization:{value:r>-1?r:p.startAndEnd},showDurationLineForNonZeroDurationEntityEvents:e.showDurationLineForNonZeroDurationEntityEvents,durationLineWidth:e.durationLineWidth,entityPositionAtDurationRatio:e.entityPositionAtDurationRatio,showNonZeroDurationIntervalBounds:e.showNonZeroDurationIntervalBounds,separateTimeOverlaps:e.separateTimeOverlaps,separateTimelineOverlaps:e.separateTimelineOverlaps,moveFirstBends:e.moveFirstBends,secondBendRatio:e.secondBendRatio,lineSeparationMultiplier:e.lineSeparationMultiplier,spaceSeparatedLinesEvenly:e.spaceSeparatedLinesEvenly,useBezierCurves:e.useBezierCurves,separatedLineShapeRatio:e.separatedLineShapeRatio}}function T(e,t,r,s,n,o){const a=r.length,l=n.length,d=Float64Array.BYTES_PER_ELEMENT,p=Uint32Array.BYTES_PER_ELEMENT,u=Uint8Array.BYTES_PER_ELEMENT,h=16+a*(u+2*d)+l*(2*p),c=i._malloc(h);try{const u=c+16-c%16,h=u+a*d,y=h+a*d,m=y+l*p,f=m+l*p,g=()=>[i.HEAPF64.subarray(u>>3,(u>>3)+a),i.HEAPF64.subarray(h>>3,(h>>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,T]=g();_.set(r),b.set(s),w.set(n),I.set(o),T.set(t);let v=e(a,f,u,h,l,y,m),M=null,E=null;if(v){const e=i.getLayoutLinksTypes(),t=i.getLayoutLinksVerticesEndIndices(),r=i.getLayoutLinksVertices(),s=i.countLayoutLinksVertices();!l||e&&t?s&&!r?v=!1:(M={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*s))},E=i.getAuxiliaryGraphicElements()):v=!1}const[A,x,N,k,S]=g();return r.set(A),s.set(x),n.set(N),o.set(k),t.set(S),{success:v,links:M,graphics:E}}finally{i._free(c),i.cleanupLayout()}}(u=a||(a={}))[u.None=0]="None",u[u.IsMovable=1]="IsMovable",u[u.IsGeographic=2]="IsGeographic",u[u.IsRoot=4]="IsRoot",u[u.IsOld=8]="IsOld",function(e){e[e.Regular=0]="Regular",e[e.Curved=1]="Curved",e[e.Recursive=2]="Recursive"}(l||(l={})),function(e){e[e.right=0]="right",e[e.left=1]="left",e[e.top=2]="top",e[e.bottom=3]="bottom"}(d||(d={})),function(e){e[e.none=0]="none",e[e.startOnly=1]="startOnly",e[e.startAndEnd=2]="startAndEnd"}(p||(p={})),function(e){e.getMinIdealEdgeLength=function(){return i.getMinIdealEdgeLength()},e.apply=function(e,t,r,s,n,o=2,a=1,l=-1){return T(((e,t,r,s,n,d,p)=>i.applyForceDirectedLayout(e,t,r,s,n,d,p,o,a,l)),e,t,r,s,n)}}(h||(h={})),function(e){e.apply=function(e,t,r,s,n,o=2,a=1,l=-1){return T(((e,t,r,s,n,d,p)=>i.applyCommunityLayout(e,t,r,s,n,d,p,o,a,l)),e,t,r,s,n)}}(c||(c={})),function(e){e.apply=function(e,t,r,s,n){return T(i.applySimpleLayout,e,t,r,s,n)}}(y||(y={})),function(e){e.apply=function(e,t,r,s,n){return T(i.applyHierarchicalLayout,e,t,r,s,n)}}(m||(m={})),function(e){e.apply=function(e,t,r,s,n){return T(i.applyRadialTreeLayout,e,t,r,s,n)}}(f||(f={})),function(e){e.apply=function(e,t,r,s,n){return T(i.applySmartTreeLayout,e,t,r,s,n)}}(g||(g={})),function(e){e.apply=function(e,t,r,s,n,o,a,l,u,h,c){const y={timeDirection:d.right,timeBannerUTCOffsetInMinutes:0,eventsTicksVisualization:p.startAndEnd,showDurationLineForNonZeroDurationEntityEvents:!0,durationLineWidth:5,entityPositionAtDurationRatio:1,showNonZeroDurationIntervalBounds:!1,separateTimeOverlaps:!0,separateTimelineOverlaps:!0,moveFirstBends:!0,secondBendRatio:.3,lineSeparationMultiplier:1,spaceSeparatedLinesEvenly:!1,useBezierCurves:!1,separatedLineShapeRatio:0};return T(((e,t,r,o,a,d,p)=>{if(s.length!==e)return!1;if(n.length!==e)return!1;if(l.length!==a)return!1;if(u.length!==a)return!1;const m=Float64Array.BYTES_PER_ELEMENT,f=16,g=i._malloc(f+e*m),_=i._malloc(f+e*m),b=i._malloc(f+a*m),w=i._malloc(f+a*m),T=g+f-g%f,v=_+f-_%f,M=b+f-b%f,E=w+f-w%f;try{i.HEAPF64.subarray(T>>3,(T>>3)+e).set(s),i.HEAPF64.subarray(v>>3,(v>>3)+e).set(n),i.HEAPF64.subarray(M>>3,(M>>3)+a).set(l),i.HEAPF64.subarray(E>>3,(E>>3)+a).set(u);const m=I(Object.assign(y,c));return i.applyChronologicalLayout(e,t,r,o,T,v,a,d,p,M,E,h,m)}finally{i._free(g),i._free(_),i._free(b),i._free(w)}}),e,t,r,o,a)}}(_||(_={})),function(e){e[e.Undirected=0]="Undirected",e[e.Directed=1]="Directed",e[e.Reversed=2]="Reversed"}(b||(b={})),function(e){e[e.ByCC_Raw=0]="ByCC_Raw",e[e.ByCC_NormalizeGlobally=1]="ByCC_NormalizeGlobally",e[e.ByCC_NormalizeByCC=2]="ByCC_NormalizeByCC"}(w||(w={}))},25927:(e,t,r)=>{r.d(t,{A:()=>d});var s=r(90237),n=(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,s._)([(0,n.MZ)({type:a.A,json:{write:!0}})],l.prototype,"layoutGeometry",void 0),l=(0,s._)([(0,i.$)("esri.rest.knowledgeGraph.Entity")],l);const d=l},54238:(e,t,r)=>{r.d(t,{A:()=>l});var s=r(90237),n=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,s._)([(0,n.MZ)({type:String,json:{write:!0}})],a.prototype,"typeName",void 0),(0,s._)([(0,n.MZ)({type:String,json:{write:!0}})],a.prototype,"id",void 0),a=(0,s._)([(0,i.$)("esri.rest.knowledgeGraph.GraphNamedObject")],a);const l=a},77901:(e,t,r)=>{r.d(t,{A:()=>l});var s=r(90237),n=r(25482),i=r(10107),o=(r(44208),r(53966),r(87811),r(40608));let a=class extends n.oY{constructor(e){super(e),this.properties=null}};(0,s._)([(0,i.MZ)({json:{write:!0}})],a.prototype,"properties",void 0),a=(0,s._)([(0,o.$)("esri.rest.knowledgeGraph.GraphObject")],a);const l=a},42538:(e,t,r)=>{r.d(t,{A:()=>p});var s=r(90237),n=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,s._)([(0,n.MZ)()],a.prototype,"openCypherQuery",void 0),a=(0,s._)([(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,s._)([(0,n.MZ)()],d.prototype,"bindParameters",void 0),(0,s._)([(0,n.MZ)()],d.prototype,"bindGeometryQuantizationParameters",void 0),(0,s._)([(0,n.MZ)()],d.prototype,"outputQuantizationParameters",void 0),(0,s._)([(0,n.MZ)()],d.prototype,"outputSpatialReference",void 0),(0,s._)([(0,n.MZ)()],d.prototype,"provenanceBehavior",void 0),d=(0,s._)([(0,i.$)("esri.rest.knowledgeGraph.GraphQueryStreaming")],d);const p=d},40662:(e,t,r)=>{r.d(t,{A:()=>a});var s=r(90237),n=(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,s._)([(0,n.$)("esri.rest.knowledgeGraph.ObjectValue")],o);const a=o},42095:(e,t,r)=>{r.d(t,{A:()=>d});var s=r(90237),n=r(25482),i=r(10107),o=(r(44208),r(53966),r(87811),r(40608)),a=r(77901);let l=class extends n.oY{constructor(e){super(e),this.path=null}};(0,s._)([(0,i.MZ)({type:[a.A],json:{write:!0}})],l.prototype,"path",void 0),l=(0,s._)([(0,o.$)("esri.rest.knowledgeGraph.Path")],l);const d=l},23150:(e,t,r)=>{r.d(t,{A:()=>d});var s=r(90237),n=(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,s._)([(0,n.MZ)({type:String,json:{write:!0}})],l.prototype,"originId",void 0),(0,s._)([(0,n.MZ)({type:String,json:{write:!0}})],l.prototype,"destinationId",void 0),(0,s._)([(0,n.MZ)({type:a.A,json:{write:!0}})],l.prototype,"layoutGeometry",void 0),l=(0,s._)([(0,i.$)("esri.rest.knowledgeGraph.Relationship")],l);const d=l}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1737],{4902:(e,t,r)=>{r.d(t,{PH:()=>a,sA:()=>o});var i=r(90237),s=r(40608);let n=0;const o=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+n++})}};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:n++})}};return t=(0,i._)([(0,s.$)("esri.core.Identifiable.NumericIdentifiable")],t),t};let l=class extends(o(class{})){};l=(0,i._)([(0,s.$)("esri.core.Identifiable")],l)},80200:(e,t,r)=>{r.d(t,{T:()=>i,d:()=>f});const i={Base64:0,Hex:1,String:2,Raw:3},s=8,n=(1<<s)-1;function o(e,t){const r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function a(e){const t=[];for(let r=0,i=e.length*s;r<i;r+=s)t[r>>5]|=(e.charCodeAt(r/s)&n)<<r%32;return t}function l(e){const t=[];for(let r=0,i=32*e.length;r<i;r+=s)t.push(String.fromCharCode(e[r>>5]>>>r%32&n));return t.join("")}function d(e,t,r,i,s,n){return o(function(e,t){return e<<t|e>>>32-t}(o(o(t,e),o(i,n)),s),r)}function u(e,t,r,i,s,n,o){return d(t&r|~t&i,e,t,s,n,o)}function p(e,t,r,i,s,n,o){return d(t&i|r&~i,e,t,s,n,o)}function c(e,t,r,i,s,n,o){return d(t^r^i,e,t,s,n,o)}function h(e,t,r,i,s,n,o){return d(r^(t|~i),e,t,s,n,o)}function y(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;let r=1732584193,i=-271733879,s=-1732584194,n=271733878;for(let t=0;t<e.length;t+=16){const a=r,l=i,d=s,y=n;r=u(r,i,s,n,e[t],7,-680876936),n=u(n,r,i,s,e[t+1],12,-389564586),s=u(s,n,r,i,e[t+2],17,606105819),i=u(i,s,n,r,e[t+3],22,-1044525330),r=u(r,i,s,n,e[t+4],7,-176418897),n=u(n,r,i,s,e[t+5],12,1200080426),s=u(s,n,r,i,e[t+6],17,-1473231341),i=u(i,s,n,r,e[t+7],22,-45705983),r=u(r,i,s,n,e[t+8],7,1770035416),n=u(n,r,i,s,e[t+9],12,-1958414417),s=u(s,n,r,i,e[t+10],17,-42063),i=u(i,s,n,r,e[t+11],22,-1990404162),r=u(r,i,s,n,e[t+12],7,1804603682),n=u(n,r,i,s,e[t+13],12,-40341101),s=u(s,n,r,i,e[t+14],17,-1502002290),i=u(i,s,n,r,e[t+15],22,1236535329),r=p(r,i,s,n,e[t+1],5,-165796510),n=p(n,r,i,s,e[t+6],9,-1069501632),s=p(s,n,r,i,e[t+11],14,643717713),i=p(i,s,n,r,e[t],20,-373897302),r=p(r,i,s,n,e[t+5],5,-701558691),n=p(n,r,i,s,e[t+10],9,38016083),s=p(s,n,r,i,e[t+15],14,-660478335),i=p(i,s,n,r,e[t+4],20,-405537848),r=p(r,i,s,n,e[t+9],5,568446438),n=p(n,r,i,s,e[t+14],9,-1019803690),s=p(s,n,r,i,e[t+3],14,-187363961),i=p(i,s,n,r,e[t+8],20,1163531501),r=p(r,i,s,n,e[t+13],5,-1444681467),n=p(n,r,i,s,e[t+2],9,-51403784),s=p(s,n,r,i,e[t+7],14,1735328473),i=p(i,s,n,r,e[t+12],20,-1926607734),r=c(r,i,s,n,e[t+5],4,-378558),n=c(n,r,i,s,e[t+8],11,-2022574463),s=c(s,n,r,i,e[t+11],16,1839030562),i=c(i,s,n,r,e[t+14],23,-35309556),r=c(r,i,s,n,e[t+1],4,-1530992060),n=c(n,r,i,s,e[t+4],11,1272893353),s=c(s,n,r,i,e[t+7],16,-155497632),i=c(i,s,n,r,e[t+10],23,-1094730640),r=c(r,i,s,n,e[t+13],4,681279174),n=c(n,r,i,s,e[t],11,-358537222),s=c(s,n,r,i,e[t+3],16,-722521979),i=c(i,s,n,r,e[t+6],23,76029189),r=c(r,i,s,n,e[t+9],4,-640364487),n=c(n,r,i,s,e[t+12],11,-421815835),s=c(s,n,r,i,e[t+15],16,530742520),i=c(i,s,n,r,e[t+2],23,-995338651),r=h(r,i,s,n,e[t],6,-198630844),n=h(n,r,i,s,e[t+7],10,1126891415),s=h(s,n,r,i,e[t+14],15,-1416354905),i=h(i,s,n,r,e[t+5],21,-57434055),r=h(r,i,s,n,e[t+12],6,1700485571),n=h(n,r,i,s,e[t+3],10,-1894986606),s=h(s,n,r,i,e[t+10],15,-1051523),i=h(i,s,n,r,e[t+1],21,-2054922799),r=h(r,i,s,n,e[t+8],6,1873313359),n=h(n,r,i,s,e[t+15],10,-30611744),s=h(s,n,r,i,e[t+6],15,-1560198380),i=h(i,s,n,r,e[t+13],21,1309151649),r=h(r,i,s,n,e[t+4],6,-145523070),n=h(n,r,i,s,e[t+11],10,-1120210379),s=h(s,n,r,i,e[t+2],15,718787259),i=h(i,s,n,r,e[t+9],21,-343485551),r=o(r,a),i=o(i,l),s=o(s,d),n=o(n,y)}return[r,i,s,n]}function f(e,t=i.Hex){const r=t||i.Base64,n=y(a(e),e.length*s);switch(r){case i.Raw:return n;case i.Hex:return function(e){const t="0123456789abcdef",r=[];for(let i=0,s=4*e.length;i<s;i++)r.push(t.charAt(e[i>>2]>>i%4*8+4&15)+t.charAt(e[i>>2]>>i%4*8&15));return r.join("")}(n);case i.String:return l(n);case i.Base64:return function(e){const t=[];for(let r=0,i=4*e.length;r<i;r+=3){const i=(e[r>>2]>>r%4*8&255)<<16|(e[r+1>>2]>>(r+1)%4*8&255)<<8|e[r+2>>2]>>(r+2)%4*8&255;for(let s=0;s<4;s++)8*r+6*s>32*e.length?t.push("="):t.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(i>>6*(3-s)&63))}return t.join("")}(n)}}},92071:(e,t,r)=>{r.d(t,{P:()=>w,L:()=>b});var i=r(90237),s=r(69622),n=r(76953),o=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,o.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,o.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 d=r(45917),u=r(88620),p=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,n.k)(t,r,i)}read(e,t){(0,d.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 n;n="string"==typeof e?"*"===e?r.keys(i):[e]:e,n.forEach((e=>{s.invalidate(e),r.revert(e,i),s.commit(e)}))}};return t=(0,i._)([(0,p.$)("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,p.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],y);var f=r(16649),m=r(49422);const g=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,m.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,f.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,p.$)("esri.core.MultiOriginJSONSupport.WriteableMultiOriginJSONSupport")],t),t.prototype.toJSON.isDefaultToJSON=!0,t};function v(e){return(0,u.oY)(e).store}const w=e=>{let t=class extends(g(c(e))){constructor(...e){super(...e)}};return t=(0,i._)([(0,p.$)("esri.core.MultiOriginJSONSupport")],t),t};let b=class extends(w(s.A)){};b=(0,i._)([(0,p.$)("esri.core.MultiOriginJSONSupport")],b)},87024:(e,t,r)=>{r.d(t,{P:()=>h});var i=r(49186),s=r(80200),n=r(76553),o=r(84952),a=r(13069),l=r(96156),d=r(35666),u=r(10107),p=r(85648),c=r(97159);function h(e){const t=e?.origins??[void 0];return(r,i)=>{const s=function(e,t,r){if("resource"===e?.type)return function(e,t,r){const i=(0,l.z4)(t,r);return{type:String,read:(e,t,r)=>{const s=(0,c.r)(e,t,r);return i.type===String?s:"function"==typeof i.type?new i.type({url:s}):void 0},write:{writer(t,s,a,l){if(!l?.resources)return"string"==typeof t?void(s[a]=(0,c.t)(t,l)):void(s[a]=t.write({},l));const u=function(e){return null==e?null:"string"==typeof e?e:e.url}(t),h=(0,c.t)(u,{...l,verifyItemRelativeUrls:l?.verifyItemRelativeUrls?{writtenUrls:l.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},c.M.NO),g=i.type!==String&&(!(0,n.H)(this)||l?.origin&&this.originIdOf(r)>(0,d.aB)(l.origin)),v={object:this,propertyName:r,value:t,targetUrl:h,dest:s,targetPropertyName:a,context:l,params:e};l?.portalItem&&h&&!(0,o.oP)(h)?g&&e?.contentAddressed?y(v):g?function(e){const{context:t,targetUrl:r,params:i,value:s,dest:n,targetPropertyName:a}=e;if(!t.portalItem)return;const l=t.portalItem.resourceFromPath(r),d=m(s,r,t),u=(0,p.n)(d),c=(0,o.Zo)(l.path),h=i?.compress??!1;u===c?(t.resources&&f({...e,resource:l,content:d,compress:h,updates:t.resources.toUpdate}),n[a]=r):y(e)}(v):function({context:e,targetUrl:t,dest:r,targetPropertyName:i}){e.portalItem&&e.resources&&(e.resources.toKeep.push({resource:e.portalItem.resourceFromPath(t),compress:!1}),r[i]=t)}(v):l?.portalItem&&(null==h||null!=(0,c.i)(h)||(0,o.w8)(h)||g)?y(v):s[a]=h}}}}(e,t,r);switch(e?.type??"other"){case"other":return{read:!0,write:!0};case"url":{const{read:e,write:t}=c.b;return{read:e,write:t}}}}(e,r,i);for(const e of t){const t=(0,u.rM)(r,e,i);for(const e in s)t[e]=s[e]}}}function y(e){const{targetUrl:t,params:r,value:n,context:l,dest:d,targetPropertyName:u}=e;if(!l.portalItem)return;const h=(0,c.p)(t),y=m(n,t,l);if(r?.contentAddressed&&"json"!==y.type)return void l.messages?.push(new i.A("persistable:contentAddressingUnsupported",`Property "${u}" is trying to serializing a resource with content of type ${y.type} with content addressing. Content addressing is only supported for json resources.`,{content:y}));const g=r?.contentAddressed&&"json"===y.type?(0,s.d)(y.jsonString):h?.filename??(0,a.lk)(),v=(0,o.fj)(r?.prefix??h?.prefix,g),w=`${v}.${(0,p.n)(y)}`;if(r?.contentAddressed&&l.resources&&"json"===y.type){const e=l.resources.toKeep.find((({resource:e})=>e.path===w))??l.resources.toAdd.find((({resource:e})=>e.path===w));if(e)return void(d[u]=e.resource.itemRelativeUrl)}const b=l.portalItem.resourceFromPath(w);(0,o.w8)(t)&&l.resources&&l.resources.pendingOperations.push((0,o.tk)(t).then((e=>{b.path=`${v}.${(0,p.n)({type:"blob",blob:e})}`,d[u]=b.itemRelativeUrl})).catch((()=>{})));const _=r?.compress??!1;l.resources&&f({...e,resource:b,content:y,compress:_,updates:l.resources.toAdd}),d[u]=b.itemRelativeUrl}function f({object:e,propertyName:t,updates:r,resource:i,content:s,compress:n}){r.push({resource:i,content:s,compress:n,finish:r=>{!function(e,t,r){"string"==typeof e[t]?e[t]=r.url:e[t].url=r.url}(e,t,r)}})}function m(e,t,r){return"string"==typeof e?{type:"url",url:t}:{type:"json",jsonString:JSON.stringify(e.toJSON(r))}}},54239:(e,t,r)=>{r.d(t,{A:()=>w});var i,s=r(90237),n=r(4576),o=r(66552),a=r(25482),l=r(83047),d=r(67076),u=r(10107),p=(r(44208),r(53966),r(36005)),c=r(40608),h=r(43937);const y=(0,o.O)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),f=y.jsonValues.slice();(0,n.Xy)(f,"orthometric");const m=(0,o.O)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let g=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 d.A("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:r})),null)}readHeightUnit(e,t,r){return m.read(e)||(r?.messages&&r.messages.push(v(e,{context:r})),null)}readHeightUnitService(e,t,r){return(0,l.LA)(e)||m.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 d.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:f,default:"ellipsoidal"}}}})],g.prototype,"heightModel",void 0),(0,s._)([(0,h.K)("web-scene","heightModel")],g.prototype,"writeHeightModel",null),(0,s._)([(0,p.w)(["web-scene","service"],"heightModel")],g.prototype,"readHeightModel",null),(0,s._)([(0,u.MZ)({type:m.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:m.jsonValues,write:m.write}}}})],g.prototype,"heightUnit",void 0),(0,s._)([(0,p.w)("web-scene","heightUnit")],g.prototype,"readHeightUnit",null),(0,s._)([(0,p.w)("service","heightUnit")],g.prototype,"readHeightUnitService",null),(0,s._)([(0,u.MZ)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],g.prototype,"vertCRS",void 0),(0,s._)([(0,p.w)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],g.prototype,"readVertCRS",null),g=i=(0,s._)([(0,c.$)("esri.geometry.HeightModelInfo")],g);const w=g},4146:(e,t,r)=>{r.d(t,{A:()=>b});var i=r(90237),s=(r(59456),r(78888)),n=r(49186),o=r(65529),a=r(4902),l=r(92474),d=r(53966),u=r(74887),p=r(84952),c=r(10107),h=(r(44208),r(87811),r(40608)),y=r(92602),f=r(79677),m=r(5443),g=r(16930);let v=0,w=class extends(o.A.EventedMixin((0,a.sA)(l.A))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new m.A(-180,-90,180,90,g.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=g.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await r.e(7982).then(r.bind(r,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:i}=await r.e(5613).then(r.bind(r,45613));try{return await i(t)}catch(e){const r=t?.portalItem,i=r?.id||"unset",s=r?.portal?.url||y.A.portalUrl;throw d.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,u.zf)(e)||d.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})}))}destroy(){const e=this.parent;if(e){const t=this;"layers"in e&&e.layers.includes(t)?e.layers.remove(t):"tables"in e&&e.tables.includes(t)?e.tables.remove(t):"baseLayers"in e&&e.baseLayers.includes(t)?e.baseLayers.remove(t):"referenceLayers"in e&&e.referenceLayers.includes(t)&&e.referenceLayers.remove(t),this._set("parent",null)}}get effectiveVisible(){let e=this.visible;const t=this.parent;return e&&t&&"effectiveVisible"in t&&(e&&=t.effectiveVisible),e}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,p.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,c.MZ)({type:String})],w.prototype,"attributionDataUrl",void 0),(0,i._)([(0,c.MZ)({readOnly:!0})],w.prototype,"effectiveVisible",null),(0,i._)([(0,c.MZ)({type:m.A})],w.prototype,"fullExtent",void 0),(0,i._)([(0,c.MZ)({readOnly:!0})],w.prototype,"hasAttributionData",null),(0,i._)([(0,c.MZ)({type:String,clonable:!1})],w.prototype,"id",void 0),(0,i._)([(0,c.MZ)({type:Boolean,nonNullable:!0})],w.prototype,"legendEnabled",void 0),(0,i._)([(0,c.MZ)({type:["show","hide","hide-children"]})],w.prototype,"listMode",void 0),(0,i._)([(0,c.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],w.prototype,"opacity",void 0),(0,i._)([(0,c.MZ)({clonable:!1})],w.prototype,"parent",void 0),(0,i._)([(0,c.MZ)({readOnly:!0})],w.prototype,"parsedUrl",null),(0,i._)([(0,c.MZ)({type:Boolean,readOnly:!0})],w.prototype,"persistenceEnabled",void 0),(0,i._)([(0,c.MZ)({type:Boolean})],w.prototype,"popupEnabled",void 0),(0,i._)([(0,c.MZ)({type:Boolean})],w.prototype,"attributionVisible",void 0),(0,i._)([(0,c.MZ)({type:g.A})],w.prototype,"spatialReference",void 0),(0,i._)([(0,c.MZ)({type:String})],w.prototype,"title",void 0),(0,i._)([(0,c.MZ)({readOnly:!0,json:{read:!1}})],w.prototype,"type",void 0),(0,i._)([(0,c.MZ)()],w.prototype,"url",void 0),(0,i._)([(0,c.MZ)({type:f.A})],w.prototype,"visibilityTimeExtent",void 0),(0,i._)([(0,c.MZ)({type:Boolean,nonNullable:!0})],w.prototype,"visible",void 0),w=(0,i._)([(0,h.$)("esri.layers.Layer")],w);const b=w},13899:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Ee});var i=r(90237),s=r(52106),n=r(13874),o=(r(86162),r(94409),r(65345),r(42980),r(20917),r(92438),r(96576),r(93618),r(65494),r(15036)),a=r(69540),l=r(5503),d=r(49186),u=r(53966),p=r(92071),c=r(74887),h=r(36708),y=r(10107),f=(r(44208),r(87811),r(88620)),m=r(36005),g=r(40608),v=r(35666),w=r(40036),b=r(86738),_=r(4146),I=r(55726),S=r(52136),A=r(18768),M=r(69208),F=r(47685),x=r(16131),L=r(8303),O=r(25036),E=r(58947),j=r(82935),T=r(25482),Z=r(30524);function U({associatedLayer:e,serviceUpdateTimeStamp:t}){const r=e?.editingInfo?.lastEditDate,i=e?.serverGens,s=null!=r,n=null!=t,o=s&&n&&t.lastUpdate!==r.getTime();return s&&(o||!n&&i?.minServerGen!==i?.serverGen)}var P=r(96184),R=r(79677),$=r(10184);const N=e=>{let t=class extends e{constructor(){super(...arguments),this.serviceTimeInfo=null}get timeInfo(){const e=this.associatedLayer?.timeInfo;if(null==e)return null;const t=e.clone();return(0,Z.sv)(t,this.fieldsIndex),t}set timeInfo(e){(0,Z.sv)(e,this.fieldsIndex),this._override("timeInfo",e)}get timeExtent(){return this.associatedLayer?.timeExtent}set timeExtent(e){this._override("timeExtent",e)}get timeOffset(){return this.associatedLayer?.timeOffset}set timeOffset(e){this._override("timeOffset",e)}get datesInUnknownTimezone(){return this.associatedLayer?.datesInUnknownTimezone??!1}set datesInUnknownTimezone(e){this._override("datesInUnknownTimezone",e)}async loadTimeInfoFromService(e){const{serviceTimeInfo:t}=this;if(null==t)return;const{startTimeField:r,endTimeField:i}=t;if(null==r&&null==i)return;if(U({associatedLayer:this.associatedLayer,serviceUpdateTimeStamp:this.serviceUpdateTimeStamp}))return;const s=async t=>{let i=null;try{const r=await(this.fetchStatistics?.(t,e));i=r?.stats}catch{}if(null==i)return null;const{minTimeStr:s,min:n,maxTimeStr:o,max:a}=i,l=t===r?s??n:o??a;return null!=l?new Date(l):null},[n,o]=await Promise.all([s(r),s(i)]);if(null!=r&&null==n||null!=i&&null==o)return;const a=new R.A({start:n,end:o});this.setAtOrigin("timeInfo",new P.A({endField:i,startField:r,fullTimeExtent:a}),"service")}};return(0,i._)([(0,y.MZ)({type:P.A,json:{read:!1,write:!1}})],t.prototype,"timeInfo",null),(0,i._)([(0,y.MZ)({type:R.A,json:{read:!1,write:!1}})],t.prototype,"timeExtent",null),(0,i._)([(0,y.MZ)({type:$.A,json:{read:!1,write:!1}})],t.prototype,"timeOffset",null),(0,i._)([(0,y.MZ)({type:Boolean,nonNullable:!0,json:{read:!1,write:!1}})],t.prototype,"datesInUnknownTimezone",null),(0,i._)([(0,y.MZ)({type:D,readOnly:!0,json:{read:{source:"timeInfo"}}})],t.prototype,"serviceTimeInfo",void 0),t=(0,i._)([(0,g.$)("esri.layers.mixins.TemporalSceneLayer")],t),t};let D=class extends T.oY{constructor(){super(...arguments),this.endTimeField=null,this.startTimeField=null}};(0,i._)([(0,y.MZ)({type:String})],D.prototype,"endTimeField",void 0),(0,i._)([(0,y.MZ)({type:String})],D.prototype,"startTimeField",void 0),D=(0,i._)([(0,g.$)("esri.layers.mixins.TemporalSceneLayer.SceneServiceTimeInfo")],D);var C=r(60694),k=r(92009),H=r(4071),V=r(10873),q=r(15426),G=r(40530),J=r(67202),B=r(17036),K=r(95466),Q=r(50805),W=r(20557),z=r(81457),Y=r(39383),X=r(37352),ee=r(4513);let te=class extends T.oY{constructor(){super(...arguments),this.name=null,this.field=null,this.currentRangeExtent=null,this.fullRangeExtent=null,this.type="rangeInfo"}};(0,i._)([(0,y.MZ)({type:String,json:{read:!0,write:!0}})],te.prototype,"name",void 0),(0,i._)([(0,y.MZ)({type:String,json:{read:!0,write:!0}})],te.prototype,"field",void 0),(0,i._)([(0,y.MZ)({type:[Number],json:{read:!0,write:!0}})],te.prototype,"currentRangeExtent",void 0),(0,i._)([(0,y.MZ)({type:[Number],json:{read:!0,write:!0}})],te.prototype,"fullRangeExtent",void 0),(0,i._)([(0,y.MZ)({type:["rangeInfo"],readOnly:!0,json:{read:!1,write:!0}})],te.prototype,"type",void 0),te=(0,i._)([(0,g.$)("esri.layers.support.RangeInfo")],te);var re,ie=r(78888),se=r(4718),ne=r(87024),oe=r(67076),ae=r(39829),le=r(57251);let de=re=class extends((0,T.Te)(l.A.ofType(ae.A))){constructor(e){super(e)}clone(){return new re(this.items.map((e=>e.clone())))}write(e,t){return this.toJSON(t)}toJSON(e){const t=e?.layer?.spatialReference;return t?this.toArray().map((r=>{if(!t.equals(r.spatialReference)){if(!(0,le.canProjectWithoutEngine)(r.spatialReference,t))return e?.messages?.push(new oe.A("scenefilter:unsupported","Scene filters with incompatible spatial references are not supported",{modification:this,spatialReference:e.layer.spatialReference,context:e})),null;const i=new ae.A;(0,le.projectPolygon)(r,i,t),r=i}const i=r.toJSON(e);return delete i.spatialReference,i})).filter((e=>null!=e)):(e?.messages?.push(new oe.A("scenefilter:unsupported","Writing Scene filters without context layer is not supported",{modification:this,spatialReference:e.layer.spatialReference,context:e})),this.toArray().map((t=>t.toJSON(e))))}static fromJSON(e,t){const r=new re;return e.forEach((e=>r.add(ae.A.fromJSON(e,t)))),r}};de=re=(0,i._)([(0,g.$)("esri.layers.support.PolygonCollection")],de);const ue=de;var pe,ce=r(97159);let he=pe=class extends T.oY{constructor(e){super(e),this.spatialRelationship="disjoint",this.geometries=new ue,this._geometriesSource=null}initialize(){this.addHandles((0,h.on)((()=>this.geometries),"after-changes",(()=>this.geometries=this.geometries),h.OH))}readGeometries(e,t,r){Array.isArray(e)?this.geometries=ue.fromJSON(e,r):this._geometriesSource={url:(0,ce.f)(e,r),context:r}}async loadGeometries(e,t){if(null==this._geometriesSource)return;const{url:r,context:i}=this._geometriesSource,s=await(0,ie.A)(r,{responseType:"json",signal:t?.signal}),n=e.toJSON(),o=s.data.map((e=>({...e,spatialReference:n})));this.geometries=ue.fromJSON(o,i),this._geometriesSource=null}clone(){const e=new pe({geometries:(0,se.o8)(this.geometries),spatialRelationship:this.spatialRelationship});return e._geometriesSource=this._geometriesSource,e}};(0,i._)([(0,y.MZ)({type:["disjoint","contains"],nonNullable:!0,json:{write:!0}})],he.prototype,"spatialRelationship",void 0),(0,i._)([(0,y.MZ)({type:ue,nonNullable:!0,json:{write:!0}}),(0,ne.P)({origins:["web-scene","portal-item"],type:"resource",prefix:"geometries",contentAddressed:!0})],he.prototype,"geometries",void 0),(0,i._)([(0,m.w)(["web-scene","portal-item"],"geometries")],he.prototype,"readGeometries",null),he=pe=(0,i._)([(0,g.$)("esri.layers.support.SceneFilter")],he);const ye=he;var fe=r(84952),me=r(8947),ge=r(61956),ve=r(24212),we=r(30291);async function be(e){const t=[];for(const r of e)r.name.toLowerCase().endsWith(".zip")?t.push(_e(r)):t.push(Promise.resolve(r));return(await Promise.all(t)).flat()}async function _e(e){const{BlobReader:t,ZipReader:i,BlobWriter:s}=await Promise.all([r.e(8392),r.e(9588)]).then(r.bind(r,9588)),n=[],o=new i(new t(e));return(await o.getEntries()).forEach((e=>{if(e.directory||/^__MACOS/i.test(e.filename))return;const t=new s,r=e.getData?.(t).then((t=>new File([t],e.filename)));r&&n.push(r)})),Promise.all(n)}var Ie=r(4654),Se=r(45671),Ae=r(78553);const Me=new Set(["3DObject","Point"]),Fe=(0,B.p)();let xe=class extends(N((0,F.w6)((0,E.w6)((0,A.b)((0,x.q)((0,L.A)((0,O.j)((0,p.P)((0,M.d)((0,S.p)((0,a.O)(_.A)))))))))))){constructor(...e){super(...e),this.featureReduction=null,this.rangeInfos=null,this.operationalLayerType="ArcGISSceneServiceLayer",this.type="scene",this.fields=null,this.floorInfo=null,this.outFields=null,this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.excludeObjectIds=new l.A,this.definitionExpression=null,this.filter=null,this.path=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.priority=null,this.semantic=null,this.cachedDrawingInfo={color:!1},this.popupEnabled=!0,this.popupTemplate=null,this.objectIdField=null,this.globalIdField=null,this._fieldUsageInfo={},this.screenSizePerspectiveEnabled=!0,this.serviceItemId=void 0}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._set("renderer",null)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=this.getFeatureType(t?.feature)?.domains?.[e];return r&&"inherited"!==r.type?r:this.getField(e)?.domain??null}getFeatureType(e){return e&&this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return this.associatedLayer?.types??[]}get typeIdField(){return this.associatedLayer?.typeIdField??null}get templates(){return this.associatedLayer?.templates??null}get formTemplate(){return this.associatedLayer?.formTemplate??null}get attributeTableTemplate(){return this.associatedLayer?.attributeTableTemplate??null}get fieldsIndex(){return new K.A(this.fields)}readNodePages(e,t,r){return"Point"===t.layerType&&(e=t.pointNodePages),null==e||"object"!=typeof e?null:Q.W4.fromJSON(e,r)}set elevationInfo(e){this._set("elevationInfo",e),this.loaded&&this._validateElevationInfo()}get effectiveCapabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.effectiveCapabilities)}get effectiveEditingEnabled(){return null!=this.associatedLayer&&(0,q.C$)(this.associatedLayer)}get geometryType(){return Oe[this.profile]||"mesh"}set renderer(e){(0,Z.yp)(e,this.fieldsIndex),this._set("renderer",e)}readCachedDrawingInfo(e){return null!=e&&"object"==typeof e||(e={}),null==e.color&&(e.color=!1),e}get capabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.capabilities)}_capabilitiesFromAssociatedFeatureLayer(e){e=null!=e?e:H.P;const{query:t,queryRelated:r,editing:{supportsGlobalId:i,supportsRollbackOnFailure:s,supportsUploadWithItemId:n,supportsGeometryUpdate:o,supportsReturnServiceEditsInSourceSpatialReference:a},data:{supportsZ:l,supportsM:d,isVersioned:u,supportsAttachment:p},operations:{supportsEditing:c,supportsAdd:h,supportsUpdate:y,supportsDelete:f,supportsQuery:m,supportsQueryAttachments:g,supportsAsyncConvert3D:v}}=e,w=e.operations.supportsChangeTracking,b=!!this.associatedLayer?.infoFor3D;return{query:t,queryRelated:r,editing:{supportsGlobalId:i,supportsReturnServiceEditsInSourceSpatialReference:a,supportsRollbackOnFailure:s,supportsGeometryUpdate:b&&o,supportsUploadWithItemId:n},data:{supportsAttachment:p,supportsZ:l,supportsM:d,isVersioned:u},operations:{supportsQuery:m,supportsQueryAttachments:g,supportsEditing:c&&w,supportsAdd:b&&h&&w,supportsDelete:b&&f&&w,supportsUpdate:y&&w,supportsAsyncConvert3D:v}}}get editingEnabled(){return this._isOverridden("editingEnabled")?this._get("editingEnabled"):this.associatedLayer?.editingEnabled??!1}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get infoFor3D(){return this.associatedLayer?.infoFor3D??null}get relationships(){return this.associatedLayer?.relationships}get defaultPopupTemplate(){return this.associatedLayer||this.attributeStorageInfo?this.createPopupTemplate():null}readObjectIdField(e,t){return!e&&t.fields&&t.fields.some((t=>("esriFieldTypeOID"===t.type&&(e=t.name),!!e))),e||void 0}readGlobalIdField(e,t){return!e&&t.fields&&t.fields.some((t=>("esriFieldTypeGlobalID"===t.type&&(e=t.name),!!e))),e||void 0}get displayField(){return this.associatedLayer?.displayField??null}readProfile(e,t){const r=t.store.profile;return null!=r&&Le[r]?Le[r]:(u.A.getLogger(this).error("Unknown or missing profile",{profile:r,layer:this}),"mesh-pyramids")}get useViewTime(){return this.associatedLayer?.useViewTime??!0}set useViewTime(e){this._override("useViewTime",e)}load(e){return this.addResolvingPromise(this._load(e)),Promise.resolve(this)}async _load(e){const t=null!=e?e.signal:null;await this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(c.QP),await this._fetchService(t),await Promise.all([this._fetchIndexAndUpdateExtent(this.nodePages,t),this._setAssociatedFeatureLayer(t),this._loadFilterGeometries()]),this._validateElevationInfo(),this._applyAssociatedLayerOverrides(),this._populateFieldUsageInfo(),await this.loadTimeInfoFromService(e),await(0,me.L)(this,{origin:"service"},t),(0,Z.yp)(this.renderer,this.fieldsIndex),await this.finishLoadEditablePortalLayer(e)}async beforeSave(){null!=this.filter&&(this.filter=this.filter.clone(),await this.load())}async _loadFilterGeometries(){if(this.filter)try{await this.filter.loadGeometries(this.spatialReference)}catch(e){u.A.getLogger(this).error("#_loadFilterGeometries()",this,"Failed to load filter geometries. Geometry filter will not be applied for this layer.",{error:e}),this.filter=null}}createQuery(){const e=new ge.A;return"mesh"===this.geometryType?this.associatedLayer?.infoFor3D&&(e.returnGeometry=!0):(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e.outFields=["*"],e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryExtent(e||this.createQuery(),t)))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryFeatureCount(e||this.createQuery(),t)))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryFeatures(e||this.createQuery(),t))).then((e=>{if(e?.features)for(const t of e.features)t.layer=this,t.sourceLayer=this;return e}))}async queryRelatedFeatures(e,t){if(await this.load(),!this.associatedLayer)throw new d.A("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeatures(e,t)}async queryRelatedFeaturesCount(e,t){if(await this.load(),!this.associatedLayer)throw new d.A("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeaturesCount(e,t)}async queryCachedAttributes(e,t){const r=(0,Z.hL)(this.fieldsIndex,await(0,Se.TO)(this,(0,Se.D8)(this)));return(0,Ie.s1)(this.parsedUrl?.path??"",this.attributeStorageInfo??[],e,t,r,this.apiKey,this.customParameters)}async queryCachedFeature(e,t){const r=await this.queryCachedAttributes(e,[t]);if(!r||0===r.length)throw new d.A("scenelayer:feature-not-in-cached-data","Feature not found in cached data");const i=new s.A;return i.attributes=r[0],i.layer=this,i.sourceLayer=this,i}queryObjectIds(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryObjectIds(e||this.createQuery(),t)))}queryAttachments(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryAttachments(e,t)))}getFieldUsageInfo(e){const t={supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1};return this.loaded?this._fieldUsageInfo[e]||t:(u.A.getLogger(this).error("#getFieldUsageInfo()","Unavailable until layer is loaded"),t)}createPopupTemplate(e){return(0,we.tn)(this,e)}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return e?.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),!this.associatedLayer)throw new d.A("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new d.A("scenelayer:query-not-available","SceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}hasCachedStatistics(e){return null!=this.statisticsInfo&&this.statisticsInfo.some((t=>t.name===e))}async queryCachedStatistics(e,t){return await this.load(t),await this.fetchStatistics(e,t)}async saveAs(e,t){return this._debouncedSaveOperations(E.Xh.SAVE_AS,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"};return this._debouncedSaveOperations(E.Xh.SAVE,e)}async applyEdits(e,t){const{applyEdits:i}=await r.e(6247).then(r.bind(r,78628));let s=t;await this.load();const n=this.associatedLayer;if(!n)throw new d.A(`${this.type}-layer:not-editable`,"Service is not editable");await n.load();const{globalIdField:o}=n,a=!!n.infoFor3D,l=s?.globalIdUsed??!0;if(a&&null==o)throw new d.A(`${this.type}-layer:not-editable`,"Valid globalIdField expected on editable SceneLayer");if(a&&!l)throw new d.A(`${this.type}-layer:globalid-required`,"globalIdUsed must not be false for SceneLayer editing as globalIds are required.");return(0,C.Wo)(n.url)&&a&&null!=e.deleteFeatures&&null!=o&&(s={...s,globalIdToObjectId:await(0,q.GA)(n,e.deleteFeatures,o)}),i(this,n.source,e,s)}async uploadAssets(e,t){if(await this.load(),null==this.associatedLayer)throw new d.A(`${this.type}-layer:not-editable`,"Service is not editable");return await this.associatedLayer.load(),this.associatedLayer.uploadAssets(e,t)}on(e,t){return super.on(e,t)}async convertMesh(e,t){t??={};const r=e=>{throw u.A.getLogger(this).error(".convertMesh()",e.message),e};await this.load(),this.infoFor3D||r(new d.A("invalid:layer","SceneLayer has no capability for mesh conversion"));const i=await this.extractAndFilterFiles(e),s=i.reduce(((e,t)=>(0,W.oF)(this.infoFor3D,t)?e+1:e),0);0===s&&r(new I.VP),s>1&&r(new I.XQ);const n=this.spatialReference,o=t.location??new b.A({x:0,y:0,z:0,spatialReference:n}),a=o.spatialReference.isGeographic?"local":"georeferenced",l=w.A.createWithExternalSource(o,i,{vertexSpace:a}),[p]=await this.uploadAssets([l],{...t,useAssetOrigin:!t.location});return p}async extractAndFilterFiles(e){await this.load();const t=this.infoFor3D;return t?(await be(e)).filter((e=>(0,W.fu)(t,e))):e}validateLayer(e){if(e.layerType&&!Me.has(e.layerType))throw new d.A("scenelayer:layer-type-not-supported","SceneLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new d.A("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});if(this.version.major>2)throw new d.A("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});!function(e,t){let r=!1,i=!1;if(null==e)r=!0,i=!0;else{const s=t&&t.isGeographic;switch(e){case"east-north-up":case"earth-centered":r=!0,i=s;break;case"vertex-reference-frame":r=!0,i=!s;break;default:r=!1}}if(!r)throw new d.A("scenelayer:unsupported-normal-reference-frame","Normal reference frame is invalid.");if(!i)throw new d.A("scenelayer:incompatible-normal-reference-frame","Normal reference frame is incompatible with layer spatial reference.")}(this.normalReferenceFrame,this.spatialReference)}_getTypeKeywords(){const e=[];if("points"===this.profile)e.push("Point");else{if("mesh-pyramids"!==this.profile)throw new d.A("scenelayer:unknown-profile","SceneLayer:save() encountered an unknown SceneLayer profile: "+this.profile);e.push("3DObject")}return e}_populateFieldUsageInfo(){if(this._fieldUsageInfo={},this.fields)for(const e of this.fields){const t=!!this.attributeStorageInfo?.some((t=>t.name===e.name)),r=!!this.associatedLayer?.fields?.some((t=>t&&e.name===t.name)),i={supportsLabelingInfo:t,supportsRenderer:t,supportsPopupTemplate:t||r,supportsLayerQuery:r};this._fieldUsageInfo[e.name]=i}}_applyAssociatedLayerOverrides(){this._applyAssociatedLayerFieldsOverrides(),this._applyAssociatedLayerPopupOverrides(),this._applyAssociatedLayerExtentOverride(),this._applyAssociatedLayerPrivileges()}_applyAssociatedLayerFieldsOverrides(){if(!this.associatedLayer?.fields)return;let e=null;for(const t of this.associatedLayer.fields){const r=this.getField(t.name);r?(!r.domain&&t.domain&&(r.domain=t.domain.clone()),r.editable=t.editable,r.nullable=t.nullable,r.length=t.length):(e||(e=this.fields?this.fields.slice():[]),e.push(t.clone()))}e&&this._set("fields",e)}_applyAssociatedLayerPopupOverrides(){if(!this.associatedLayer)return;const e=["popupTemplate","popupEnabled"],t=(0,f.oY)(this);for(let r=0;r<e.length;r++){const i=e[r],s=this.originIdOf(i),n=this.associatedLayer.originIdOf(i);s<n&&(n===v.Gr.SERVICE||n===v.Gr.PORTAL_ITEM)&&t.setAtOrigin(i,this.associatedLayer[i],n)}}_applyAssociatedLayerExtentOverride(){const e=this.associatedLayer?.getAtOrigin("fullExtent","service");null!=this.associatedLayer?.infoFor3D&&e&&(0,C.Wo)(this.associatedLayer?.url)&&U(this)&&(0,f.oY)(this).setAtOrigin("fullExtent",e.clone(),v.Gr.SERVICE)}_applyAssociatedLayerPrivileges(){const e=this.associatedLayer;e&&(this._set("userHasEditingPrivileges",e.userHasEditingPrivileges),this._set("userHasFullEditingPrivileges",e.userHasFullEditingPrivileges),this._set("userHasUpdateItemPrivileges",e.userHasUpdateItemPrivileges))}async _setAssociatedFeatureLayer(e){if(["mesh-pyramids","points"].includes(this.profile))try{const{serverUrl:t,layerId:r,portalItem:i}=await(0,k.L)(`${this.url}/layers/${this.layerId}`,{sceneLayerItem:this.portalItem,customParameters:this.customParameters,apiKey:this.apiKey,signal:e}),s=await ee.S.FeatureLayer();this.associatedLayer=new s({url:t,customParameters:this.customParameters,layerId:r,portalItem:i}),await this.associatedLayer.load()}catch(e){(0,c.zf)(e)||this._logWarningOnPopupEnabled()}}async _logWarningOnPopupEnabled(){await(0,h.C_)((()=>this.popupEnabled&&null!=this.popupTemplate));const e=`this SceneLayer: ${this.title}`;null==this.attributeStorageInfo?u.A.getLogger(this).warn(`Associated FeatureLayer could not be loaded and no binary attributes found. Popups will not work on ${e}`):u.A.getLogger(this).info(`Associated FeatureLayer could not be loaded. Falling back to binary attributes for Popups on ${e}`)}_validateElevationInfo(){const e=this.elevationInfo;"mesh-pyramids"===this.profile&&(0,ve.XF)(u.A.getLogger(this),(0,ve.$7)("Mesh scene layers","relative-to-scene",e)),(0,ve.XF)(u.A.getLogger(this),(0,ve.tW)("Scene layers",e))}async fetchStatistics(e,t){return await async function({fieldName:e,statisticsInfo:t,errorContext:r,fieldsIndex:i,path:s,customParameters:n,apiKey:o,signal:a}){if(null==t)throw new d.A(`${r}:no-cached-statistics`,"Cached statistics are not available for this layer");const l=i.get(e);if(null==l)throw new d.A(`${r}:field-unexisting`,`Field '${e}' does not exist on the layer`);const u=t.find((e=>e.name===l.name));if(null==u)throw new d.A(`${r}:no-cached-statistics`,"Cached statistics for this attribute are not available");const p=(0,fe.fj)(s,u.href),{data:c}=await(0,ie.A)(p,{query:{f:"json",...n,token:o},responseType:"json",signal:a});return c}({fieldName:e,statisticsInfo:this.statisticsInfo,errorContext:"scenelayer",fieldsIndex:this.fieldsIndex,path:this.parsedUrl?.path??"",customParameters:this.customParameters,apiKey:this.apiKey,signal:t?.signal})}};(0,i._)([(0,y.MZ)({types:{key:"type",base:G.c,typeMap:{selection:J.A}},json:{origins:{"web-scene":{name:"layerDefinition.featureReduction",write:!0},"portal-item":{name:"layerDefinition.featureReduction",write:!0}}}})],xe.prototype,"featureReduction",void 0),(0,i._)([(0,y.MZ)({type:[te],json:{read:!1,origins:{"web-scene":{name:"layerDefinition.rangeInfos",write:!0},"portal-item":{name:"layerDefinition.rangeInfos",write:!0}}}})],xe.prototype,"rangeInfos",void 0),(0,i._)([(0,y.MZ)({json:{read:!1}})],xe.prototype,"associatedLayer",void 0),(0,i._)([(0,y.MZ)({type:["show","hide"]})],xe.prototype,"listMode",void 0),(0,i._)([(0,y.MZ)({type:["ArcGISSceneServiceLayer"]})],xe.prototype,"operationalLayerType",void 0),(0,i._)([(0,y.MZ)({json:{read:!1},readOnly:!0})],xe.prototype,"type",void 0),(0,i._)([(0,y.MZ)({...Fe.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],xe.prototype,"fields",void 0),(0,i._)([(0,y.MZ)()],xe.prototype,"types",null),(0,i._)([(0,y.MZ)()],xe.prototype,"typeIdField",null),(0,i._)([(0,y.MZ)()],xe.prototype,"templates",null),(0,i._)([(0,y.MZ)()],xe.prototype,"formTemplate",null),(0,i._)([(0,y.MZ)()],xe.prototype,"attributeTableTemplate",null),(0,i._)([(0,y.MZ)({readOnly:!0,clonable:!1})],xe.prototype,"fieldsIndex",null),(0,i._)([(0,y.MZ)({type:X.A,json:{read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo"}}})],xe.prototype,"floorInfo",void 0),(0,i._)([(0,y.MZ)(Fe.outFields)],xe.prototype,"outFields",void 0),(0,i._)([(0,y.MZ)({type:Q.W4,readOnly:!0,json:{read:!1}})],xe.prototype,"nodePages",void 0),(0,i._)([(0,m.w)("service","nodePages",["nodePages","pointNodePages"])],xe.prototype,"readNodePages",null),(0,i._)([(0,y.MZ)({type:[Q.uV],readOnly:!0})],xe.prototype,"materialDefinitions",void 0),(0,i._)([(0,y.MZ)({type:[Q.Ot],readOnly:!0})],xe.prototype,"textureSetDefinitions",void 0),(0,i._)([(0,y.MZ)({type:[Q.L0],readOnly:!0})],xe.prototype,"geometryDefinitions",void 0),(0,i._)([(0,y.MZ)({readOnly:!0})],xe.prototype,"serviceUpdateTimeStamp",void 0),(0,i._)([(0,y.MZ)({readOnly:!0})],xe.prototype,"attributeStorageInfo",void 0),(0,i._)([(0,y.MZ)({readOnly:!0})],xe.prototype,"statisticsInfo",void 0),(0,i._)([(0,y.MZ)({type:l.A.ofType(Number),nonNullable:!0,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.excludeObjectIds",write:{enabled:!0}}})],xe.prototype,"excludeObjectIds",void 0),(0,i._)([(0,y.MZ)({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],xe.prototype,"definitionExpression",void 0),(0,i._)([(0,y.MZ)({type:ye,json:{name:"layerDefinition.polygonFilter",write:{enabled:!0,allowNull:!0},origins:{service:{read:!1,write:!1}}}})],xe.prototype,"filter",void 0),(0,i._)([(0,y.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],xe.prototype,"path",void 0),(0,i._)([(0,y.MZ)(V.Yj)],xe.prototype,"elevationInfo",null),(0,i._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],xe.prototype,"effectiveCapabilities",null),(0,i._)([(0,y.MZ)({readOnly:!0})],xe.prototype,"effectiveEditingEnabled",null),(0,i._)([(0,y.MZ)({type:String})],xe.prototype,"geometryType",null),(0,i._)([(0,y.MZ)(V.kF)],xe.prototype,"labelsVisible",void 0),(0,i._)([(0,y.MZ)({type:[z.A],json:{origins:{service:{name:"drawingInfo.labelingInfo",read:{reader:Y.w},write:!1}},name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:Y.w},write:!0}})],xe.prototype,"labelingInfo",void 0),(0,i._)([(0,y.MZ)(V.fV)],xe.prototype,"legendEnabled",void 0),(0,i._)([(0,y.MZ)({type:Number,json:{origins:{"web-document":{default:1,write:{enabled:!0,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}},read:{source:["opacity","layerDefinition.drawingInfo.transparency"],reader(e,t){if("number"==typeof e&&e>=0&&e<=1)return e;const r=t.layerDefinition?.drawingInfo?.transparency;return void 0!==r?(0,Ae.D)(r):void 0}}},"portal-item":{write:!0},service:{read:!1}}}})],xe.prototype,"opacity",void 0),(0,i._)([(0,y.MZ)({type:["Low","High"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],xe.prototype,"priority",void 0),(0,i._)([(0,y.MZ)({type:["Labels"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],xe.prototype,"semantic",void 0),(0,i._)([(0,y.MZ)({types:o.X,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],xe.prototype,"renderer",null),(0,i._)([(0,y.MZ)({json:{read:!1}})],xe.prototype,"cachedDrawingInfo",void 0),(0,i._)([(0,m.w)("service","cachedDrawingInfo")],xe.prototype,"readCachedDrawingInfo",null),(0,i._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],xe.prototype,"capabilities",null),(0,i._)([(0,y.MZ)({type:Boolean,json:{read:!1}})],xe.prototype,"editingEnabled",null),(0,i._)([(0,y.MZ)({readOnly:!0,json:{write:!1,read:!1}})],xe.prototype,"infoFor3D",null),(0,i._)([(0,y.MZ)({readOnly:!0,json:{write:!1,read:!1}})],xe.prototype,"relationships",null),(0,i._)([(0,y.MZ)(V.M6)],xe.prototype,"popupEnabled",void 0),(0,i._)([(0,y.MZ)({type:n.A,json:{name:"popupInfo",write:!0}})],xe.prototype,"popupTemplate",void 0),(0,i._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],xe.prototype,"defaultPopupTemplate",null),(0,i._)([(0,y.MZ)({type:String,json:{read:!1}})],xe.prototype,"objectIdField",void 0),(0,i._)([(0,m.w)("service","objectIdField",["objectIdField","fields"])],xe.prototype,"readObjectIdField",null),(0,i._)([(0,y.MZ)({type:String,json:{read:!1}})],xe.prototype,"globalIdField",void 0),(0,i._)([(0,m.w)("service","globalIdField",["globalIdField","fields"])],xe.prototype,"readGlobalIdField",null),(0,i._)([(0,y.MZ)({readOnly:!0,type:String,json:{read:!1}})],xe.prototype,"displayField",null),(0,i._)([(0,y.MZ)({type:String,json:{read:!1}})],xe.prototype,"profile",void 0),(0,i._)([(0,m.w)("service","profile",["store.profile"])],xe.prototype,"readProfile",null),(0,i._)([(0,y.MZ)({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],xe.prototype,"normalReferenceFrame",void 0),(0,i._)([(0,y.MZ)(V.PY)],xe.prototype,"screenSizePerspectiveEnabled",void 0),(0,i._)([(0,y.MZ)({json:{read:!1,origins:{service:{read:!0}}}})],xe.prototype,"serviceItemId",void 0),(0,i._)([(0,y.MZ)(j.B)],xe.prototype,"useViewTime",null),xe=(0,i._)([(0,g.$)("esri.layers.SceneLayer")],xe);const Le={"mesh-pyramids":"mesh-pyramids",meshpyramids:"mesh-pyramids","features-meshes":"mesh-pyramids",points:"points","features-points":"points",lines:"lines","features-lines":"lines",polygons:"polygons","features-polygons":"polygons"},Oe={"mesh-pyramids":"mesh",points:"point"},Ee=xe},55726:(e,t,r)=>{r.d(t,{$1:()=>d,H2:()=>h,MT:()=>y,VP:()=>f,WF:()=>u,Wt:()=>o,XQ:()=>m,hK:()=>c,nS:()=>p,uh:()=>a,xY:()=>l});var i=r(49186);const s="upload-assets",n=()=>new Error;class o extends i.A{constructor(){super(`${s}:unsupported`,"Layer does not support asset uploads.",n())}}class a extends i.A{constructor(){super(`${s}:no-glb-support`,"Layer does not support glb.",n())}}class l extends i.A{constructor(){super(`${s}:no-supported-source`,"No supported external source found",n())}}class d extends i.A{constructor(){super(`${s}:not-base-64`,"Expected gltf data in base64 format after conversion.",n())}}class u extends i.A{constructor(){super(`${s}:unable-to-prepare-options`,"Unable to prepare uploadAsset request options.",n())}}class p extends i.A{constructor(e,t){super(`${s}:bad-response`,`Bad response. Uploaded ${e} items and received ${t} results.`,n())}}class c extends i.A{constructor(e,t){super(`${s}-layer:upload-failed`,`Failed to upload mesh file ${e}. Error code: ${t?.code??"-1"}. Error message: ${t?.messages??"unknown"}`,n())}}class h extends i.A{constructor(e){super(`${s}-layer:unsupported-format`,`The service allowed us to upload an asset of FormatID ${e}, but it does not list it in its supported formats.`,n())}}class y extends i.A{constructor(){super(`${s}:convert3D-failed`,"convert3D failed.")}}class f extends i.A{constructor(){super("invalid-input:no-model","No supported model found")}}class m extends i.A{constructor(){super("invalid-input:multiple-models","Multiple supported models found")}}},52136:(e,t,r)=>{r.d(t,{p:()=>o});var i=r(90237),s=r(10107),n=(r(44208),r(53966),r(87811),r(40608));const o=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,n.$)("esri.layers.mixins.APIKeyMixin")],t),t}},18768:(e,t,r)=>{r.d(t,{b:()=>l});var i=r(90237),s=r(53966),n=r(10107),o=(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,n.MZ)()],t.prototype,"title",null),(0,i._)([(0,n.MZ)({type:String})],t.prototype,"url",null),t=(0,i._)([(0,o.$)("esri.layers.mixins.ArcGISService")],t),t}},69208:(e,t,r)=>{r.d(t,{d:()=>o});var i=r(90237),s=r(10107),n=(r(44208),r(53966),r(87811),r(40608));const o=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,n.$)("esri.layers.mixins.CustomParametersMixin")],t),t}},47685:(e,t,r)=>{r.d(t,{Mk:()=>h,Zk:()=>p,w6:()=>m});var i=r(90237),s=r(65529),n=r(4718),o=r(74887),a=r(10107),l=(r(44208),r(53966),r(40608)),d=r(20816);const u=new s.A.EventEmitter;function p(e,t,r=null,i=!1){const s=(0,o.Tw)();return i=null==t||i,u.emit("apply-edits",{serviceUrl:e,layerId:t,gdbVersion:r,mayReceiveServiceEdits:i,result:s.promise}),s}const c=Symbol();function h(e){return null!=e&&"object"==typeof e&&c in e}function y(e){return null!=e&&"object"==typeof e&&"gdbVersion"in e}function f(e,t,r){const i=new URL(e).host,s=d.Z3.get(i),n=e=>!e||e===s;return n(t)&&n(r)||t===r}const m=e=>{var t;let r=class extends e{constructor(...e){super(...e),this[t]=!0,this._applyEditsHandler=e=>{const{serviceUrl:t,layerId:r,gdbVersion:i,mayReceiveServiceEdits:s,result:o}=e,a=t===this.url,l=null!=r&&null!=this.layerId&&r===this.layerId,d=y(this),u=y(this)&&f(t,i,this.gdbVersion);if(!a||d&&!u||!l&&!s)return;const p=o.then((e=>{if(this.lastEditsEventDate=new Date,l&&(e.addedFeatures.length||e.updatedFeatures.length||e.deletedFeatures.length||e.addedAttachments.length||e.updatedAttachments.length||e.deletedAttachments.length))return this.emit("edits",(0,n.o8)(e)),e;const r=e.editedFeatures?.find((({layerId:e})=>e===this.layerId));if(r){const{adds:t,updates:i,deletes:s}=r.editedFeatures,o={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:t?t.map((({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))):[],deletedFeatures:s?s.map((({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))):[],updatedFeatures:i?i.map((({current:{attributes:e}})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))):[],editedFeatures:(0,n.o8)(e.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,n.o8)(e.historicMoment)};return this.emit("edits",o),o}const s={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:[],deletedFeatures:[],updatedFeatures:[],editedFeatures:(0,n.o8)(e.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,n.o8)(e.historicMoment)};return"historicMoment"in this&&this._shouldUpdateHistoricMoment(t,i,s.historicMoment)&&this.emit("edits",s),s})).then((e=>("historicMoment"in this&&this._shouldUpdateHistoricMoment(t,i,e.historicMoment)&&(this.historicMoment=e.historicMoment),e)));this.emit("apply-edits",{result:p})},this._updateMomentHandler=e=>{const{serviceUrl:t,gdbVersion:r,moment:i}=e,s=t===this.url,n=y(this),o=y(this)&&f(t,r,this.gdbVersion),a=y(this)&&!f(t,this.gdbVersion,null);s&&n&&o&&a&&"historicMoment"in this&&this.historicMoment!==i&&(this.historicMoment=i)},this.when().then((()=>{this.addHandles(function(e){return u.on("apply-edits",new WeakRef(e))}(this._applyEditsHandler)),"historicMoment"in this&&this.addHandles(function(e){return u.on("update-moment",new WeakRef(e))}(this._updateMomentHandler))}),(()=>{}))}_shouldUpdateHistoricMoment(e,t,r){return"historicMoment"in this&&this.historicMoment!==r&&(0,d.w5)(e,t)}};return t=c,(0,i._)([(0,a.MZ)()],r.prototype,"lastEditsEventDate",void 0),r=(0,i._)([(0,l.$)("esri.layers.mixins.EditBusLayer")],r),r}},8303:(e,t,r)=>{r.d(t,{A:()=>I});var i=r(90237),s=r(92602),n=r(70333),o=r(78888),a=r(60999),l=r(49186),d=r(53966),u=r(97768),p=r(74887),c=r(84952),h=r(10107),y=(r(44208),r(87811),r(36005)),f=r(40608),m=r(43937),g=r(83531),v=r(20655),w=r(80812),b=r(41318),_=r(10407);const I=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,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 w.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,p.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,p.zf)(e)||d.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,p.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,p.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,_.It)(r);let s,o;if(i)s=r.portal.url;else try{s=await(0,g.wI)(this.url,t)}catch(e){(0,p.QP)(e)}if(!s||!(0,c.b8)(s,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;o=await(n.id?.getCredential(`${s}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,p.QP)(e)}const a=!0,l=!1,d=!1;if(!o)return{features:{edit:a,fullEdit:l},content:{updateItem:d}};try{if(i?await r.reload():(r=new w.default({id:e,portal:{url:s}}),await r.load(t)),r.portal.user)return(0,_.It)(r)}catch(e){(0,p.QP)(e)}return{features:{edit:a,fullEdit:l},content:{updateItem:d}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,p.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?n.id?.findCredential(this.url):null;if(!t)return!0;const r=S.credential===t?S.user:await this._fetchEditingUser(e);return S.credential=t,S.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=n.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,s=v.A.getDefault();if(s&&s.loaded&&(0,c.S8)(s.restUrl)===(0,c.S8)(i))return s.user;const l=`${i}/community/self`,d=null!=e?e.signal:null,u=await(0,a.Ke)((0,o.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:d}));return u.ok?b.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:w.default})],t.prototype,"portalItem",null),(0,i._)([(0,y.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,m.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,f.$)("esri.layers.mixins.PortalLayer")],t),t},S={credential:null,user:null}},25036:(e,t,r)=>{r.d(t,{j:()=>o});var i=r(90237),s=r(10107),n=(r(44208),r(53966),r(87811),r(40608));const o=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,n.$)("esri.layers.mixins.ScaleRangeLayer")],t),t}},82935:(e,t,r)=>{r.d(t,{B:()=>h,e:()=>y});var i=r(90237),s=r(10107),n=(r(44208),r(53966),r(87811),r(36005)),o=r(40608),a=r(89317),l=r(30524),d=r(96184),u=r(73133),p=r(79677),c=r(10184);const h={type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation",layerContainerTypes:a.K}}},y=e=>{let t=class extends e{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const r=t.timeInfo.exportOptions;if(!r)return null;const i=r.timeOffset,s=u.j.fromJSON(r.timeOffsetUnits);return i&&s?new c.A({value:i,unit:s}):null}set timeInfo(e){(0,l.sv)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,i._)([(0,s.MZ)({type:p.A,json:{write:!1}})],t.prototype,"timeExtent",void 0),(0,i._)([(0,s.MZ)({type:c.A})],t.prototype,"timeOffset",void 0),(0,i._)([(0,n.w)("service","timeOffset",["timeInfo.exportOptions"])],t.prototype,"readOffset",null),(0,i._)([(0,s.MZ)({value:null,type:d.A,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],t.prototype,"timeInfo",null),(0,i._)([(0,s.MZ)(h)],t.prototype,"useViewTime",void 0),t=(0,i._)([(0,o.$)("esri.layers.mixins.TemporalLayer")],t),t}},40530:(e,t,r)=>{r.d(t,{c:()=>a});var i=r(90237),s=r(25482),n=r(10107),o=(r(44208),r(53966),r(87811),r(40608));let a=class extends s.oY{constructor(){super(...arguments),this.type=null}};(0,i._)([(0,n.MZ)({type:["selection","cluster","binning"],readOnly:!0,json:{read:!1,write:!0}})],a.prototype,"type",void 0),a=(0,i._)([(0,o.$)("esri.layers.support.FeatureReduction")],a)},67202:(e,t,r)=>{r.d(t,{A:()=>d});var i,s=r(90237),n=r(10107),o=(r(44208),r(53966),r(87811),r(40608)),a=r(40530);let l=i=class extends a.c{constructor(e){super(e),this.type="selection"}clone(){return new i}};(0,s._)([(0,n.MZ)({type:["selection"]})],l.prototype,"type",void 0),l=i=(0,s._)([(0,o.$)("esri.layers.support.FeatureReductionSelection")],l);const d=l},37352:(e,t,r)=>{r.d(t,{A:()=>u});var i,s=r(90237),n=r(5503),o=r(25482),a=r(10107),l=(r(44208),r(53966),r(87811),r(40608));let d=i=class extends o.oY{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new n.A}clone(){return new i({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,s._)([(0,a.MZ)({type:String,json:{write:!0}})],d.prototype,"floorField",void 0),(0,s._)([(0,a.MZ)({json:{read:!1,write:!1}})],d.prototype,"viewAllMode",void 0),(0,s._)([(0,a.MZ)({json:{read:!1,write:!1}})],d.prototype,"viewAllLevelIds",void 0),d=i=(0,s._)([(0,l.$)("esri.layers.support.LayerFloorInfo")],d);const u=d},96184:(e,t,r)=>{r.d(t,{A:()=>f});var i=r(90237),s=r(69540),n=r(25482),o=r(10107),a=(r(44208),r(53966),r(87811),r(36005)),l=r(40608),d=r(43937),u=r(79677),p=r(10184),c=r(56400);function h(e,t){return p.A.fromJSON({value:e,unit:t})}let y=class extends((0,s.O)(n.oY)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeZone=null,this.trackIdField=null,this.useTime=!0,this.stops=null}readFullTimeExtent(e,t){return t.timeExtent&&Array.isArray(t.timeExtent)&&2===t.timeExtent.length?u.A.fromArray(t.timeExtent):null}writeFullTimeExtent(e,t){null!=e?.start&&null!=e.end?t.timeExtent=e.toArray():t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?h(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?h(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,i._)([(0,o.MZ)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],y.prototype,"cumulative",void 0),(0,i._)([(0,o.MZ)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],y.prototype,"endField",void 0),(0,i._)([(0,o.MZ)({type:u.A,json:{write:{enabled:!0,allowNull:!0}}})],y.prototype,"fullTimeExtent",void 0),(0,i._)([(0,a.w)("fullTimeExtent",["timeExtent"])],y.prototype,"readFullTimeExtent",null),(0,i._)([(0,d.K)("fullTimeExtent")],y.prototype,"writeFullTimeExtent",null),(0,i._)([(0,o.MZ)({type:Boolean,json:{write:!0}})],y.prototype,"hasLiveData",void 0),(0,i._)([(0,o.MZ)({type:p.A,json:{write:{enabled:!0,allowNull:!0}}})],y.prototype,"interval",void 0),(0,i._)([(0,a.w)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],y.prototype,"readInterval",null),(0,i._)([(0,d.K)("interval")],y.prototype,"writeInterval",null),(0,i._)([(0,o.MZ)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],y.prototype,"startField",void 0),(0,i._)([(0,o.MZ)((0,c.P6)("timeReference",!0))],y.prototype,"timeZone",void 0),(0,i._)([(0,o.MZ)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],y.prototype,"trackIdField",void 0),(0,i._)([(0,o.MZ)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],y.prototype,"useTime",void 0),(0,i._)([(0,o.MZ)({type:[Date],json:{read:!1}})],y.prototype,"stops",void 0),y=(0,i._)([(0,l.$)("esri.layers.support.TimeInfo")],y);const f=y},17036:(e,t,r)=>{r.d(t,{p:()=>l});var i=r(44208),s=r(53966),n=r(20437),o=r(95466),a=r(30524);function l(){return{fields:{type:[n.A],value:null,set:function(e){if(e&&(0,i.A)("big-integer-warning-enabled")){const t=e.filter((e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8));if(t.length){const e=t.map((e=>`'${e.name}'`)).join(", ");s.A.getLogger(this).warn("#fields",`Layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}') references big-integer field(s): ${e}, support for which is experimental. Only integers less than ${Number.MAX_SAFE_INTEGER} (Number.MAX_SAFE_INTEGER) are supported.`)}}this._set("fields",e)}},fieldsIndex:{readOnly:!0,get(){return o.A.fromLayer(this)}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){const e=this._userOutFields;if(!e?.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(const t of e){const r=this.fieldsIndex?.has(t);r||s.A.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e})}return(0,a.DB)(this.fieldsIndex,e)}}}}},20557:(e,t,r)=>{r.d(t,{CW:()=>h,Fm:()=>l,JQ:()=>c,JZ:()=>b,ND:()=>f,R_:()=>o,U9:()=>p,fu:()=>s,nr:()=>y,oF:()=>n,rq:()=>d,z$:()=>u});const i=[["binary","application/octet-stream","bin",""]];function s(e,t){return null!=g(t.name,e?.supportedFormats??[])}function n(e,t){if(!e)return!1;const r=d(t,e.supportedFormats??[]);return null!=r&&e.editFormats.includes(r)}function o(e,t){return v(function(e,t){const r=e.toLowerCase();return m(t).find((e=>w(e)===r))}(e,t))}function a(e,t){return v(g(e,t))}function l(e,t){return w(function(e,t){return m(t).find((t=>v(t)===e))}(e,t))}function d(e,t){return a(e.name,t)??o(e.type,t)}function u(e,t,r){return o(e,r)??a(t,r)}function p({supportedFormats:e}){return u("model/gltf-binary","glb",e)}function c(e){const t=p(e);return null!=t&&e.editFormats.includes(t)}function h({supportedFormats:e}){return u("model/gltf+json","gltf",e)}function y({supportedFormats:e}){return u("application/esri3do-SR_world","wld",e)}function f({supportedFormats:e}){return u("application/esri3do-SR_prj","prj",e)}function m(e){return[...i,...e]}function g(e,t){const r=e.toLowerCase();return m(t).find((e=>function(e){return e?.[2].split(",").map((e=>e.toLowerCase()))??[]}(e).some((e=>r.endsWith(e)))))}function v(e){return e?.[0]}function w(e){return e?.[1].toLowerCase()}function b(e){return e.tables?.find((e=>"assetMaps"===e.role))}},85648:(e,t,r)=>{r.d(t,{n:()=>s});var i=r(84952);function s(e){return n[function(e){return"json"===e.type?"application/json":"blob"===e.type?e.blob.type:function(e){const t=(0,i.Zo)(e);return l[t]||o}(e.url)}(e)]||a}const n={},o="text/plain",a=n[o],l={png:"image/png",jpeg:"image/jpeg",jpg:"image/jpg",bmp:"image/bmp",gif:"image/gif",json:"application/json",txt:"text/plain",xml:"application/xml",svg:"image/svg+xml",zip:"application/zip",pbf:"application/vnd.mapbox-vector-tile",gz:"application/gzip","bin.gz":"application/octet-stream"};for(const e in l)n[l[e]]=e},73133:(e,t,r)=>{r.d(t,{j:()=>i});const i=(0,r(66552).O)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})},8947:(e,t,r)=>{r.d(t,{L:()=>o});var i=r(60999),s=r(74887),n=r(67076);async function o(e,t,r){const o=e&&e.getAtOrigin&&e.getAtOrigin("renderer",t.origin);if(o&&"unique-value"===o.type&&o.styleOrigin){const a=await(0,i.Ke)(o.populateFromStyle());if((0,s.Te)(r),!1===a.ok){const r=a.error;t?.messages&&t.messages.push(new n.A("renderer:style-reference",`Failed to create unique value renderer from style reference: ${r.message}`,{error:r,context:t})),e.clear("renderer",t?.origin)}}}},10184:(e,t,r)=>{r.d(t,{A:()=>c});var i=r(90237),s=r(69540),n=r(25482),o=r(88930),a=r(10107),l=(r(44208),r(53966),r(87811),r(93223)),d=r(40608),u=r(73133);let p=class extends((0,s.O)(n.oY)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,o.t)(this.value,this.unit,"milliseconds")}};(0,i._)([(0,l.e)(u.j,{nonNullable:!0})],p.prototype,"unit",void 0),(0,i._)([(0,a.MZ)({type:Number,json:{write:!0},nonNullable:!0})],p.prototype,"value",void 0),p=(0,i._)([(0,d.$)("esri.time.TimeInterval")],p);const c=p},20816:(e,t,r)=>{r.d(t,{TA:()=>s,We:()=>a,Z3:()=>n,ZJ:()=>l,w5:()=>d});var i=r(78888);const s=(0,r(13069).vD)(),n=new Map,o=new Map;async function a(e,t,r){if(!e||!r)return!1;if(!t)return!0;const s=new URL(e).host;let o=n.get(s);if(!o){const t=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,"");o=(await(0,i.A)(t,{responseType:"json",query:{f:"json"}})).data.defaultVersionName}return o===t}async function l(e,t,i=!1){if(!e||!t)return!0;const n=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),a=o.get(n)?.entries();if(a)for(const[e,o]of a)if(o.name===t){const t=!o.stack?.hasForwardEdits();if(!t&&i){const[{deleteForwardEdits:t},{default:i}]=await Promise.all([r.e(2186).then(r.bind(r,32186)),r.e(2558).then(r.bind(r,32558))]),a=await t(n,e,new i({sessionId:s,moment:o.moment}));return a.success&&o.stack?.clearForwardEdits(),a.success}return t}return!0}function d(e,t){if(!e)return!1;const r=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),i=o.get(r)?.entries();if(i)for(const[e,r]of i)if(r.name===t)return"edit"===r.lockType;return!1}new Map}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1728],{71728:(e,t,a)=>{a.r(t),a.d(t,{default:()=>O});var i,n,s=a(90237),o=(a(59456),a(5503)),r=a(49186),l=a(53966),h=a(91869),d=a(92071),u=a(74887),c=a(36708),y=a(10107),p=(a(44208),a(87811),a(40608)),g=a(35666),f=a(4146),m=a(90708),L=a(92722);(n=i||(i={})).MULTIPLIER="multiplier",n.ABSOLUTE="absoluteValue";var C=a(80340),M=a(70643),w=a(85342),b=a(69860),T=a(45654),k=a(63074),E=a(16131),N=a(25036),I=a(8460),A=a(71402),x=a(5443),_=a(86738),D=a(82799);let R=class extends((0,E.q)((0,k.dM)((0,N.j)((0,d.P)(f.A))))){constructor(e){if(super(e),this.dataPreloadedInLocalCache=!1,this.defaultLinkChartConfig=null,this._currentLinkChartConfig={layoutMode:"RADIAL_TREE"},this._graphTypeLookup=new Map,this.dataManager=null,this.knowledgeGraph=null,this.layers=new(o.A.ofType(M.A)),this.entityLinkChartDiagramLookup=new Map,this.relationshipLinkChartDiagramLookup=new Map,this.linkChartExtent=new x.A({xmin:-1e-7,ymin:-1e-7,xmax:1e-7,ymax:1e-7}),this.memberEntityTypes=null,this.memberRelationshipTypes=null,this.operationalLayerType="LinkChartLayer",this.sublayerIdsCache=new Map,this.tables=new(o.A.ofType(M.A)),this.type="link-chart",this.chronologicalAuxiliaryGraphics=null,this._originalInclusionList=e?.inclusionModeDefinition,e?.dataPreloadedInLocalCache&&!e?.inclusionModeDefinition)throw new r.A("knowledge-graph:linkchart-layer-constructor","If creating a link chart composite layer and configured that data is already loaded in the cache, you must specify an inclusion list so the Composite Layer knows what records belong to it");this.addHandles((0,c.wB)((()=>this.layers.concat(this.tables)),((e,t)=>this._handleSublayersChange(e,t)),c.OH))}normalizeCtorArgs(e){if(!e)return{};const{url:t,title:a,dataPreloadedInLocalCache:i,defaultLinkChartConfig:n}=e;return{url:t,title:a,dataPreloadedInLocalCache:i,defaultLinkChartConfig:n}}_initializeLayerProperties(e){if(!this.title&&this.url){const e=this.url.split("/");this.title=e[e.length-2]}const t=new Set;let a=[],i=[];if(e.inclusionModeDefinition&&(!e.inclusionModeDefinition.namedTypeDefinitions||e.inclusionModeDefinition.namedTypeDefinitions.size<1))throw new r.A("knowledge-graph:composite-layer-constructor","If an explicit inclusion definition is defined, at least one namedTypeDefinition must also be defined");e.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&this._graphTypeLookup.set(e.name,e)})),e.knowledgeGraph.dataModel.relationshipTypes?.forEach((e=>{e.name&&this._graphTypeLookup.set(e.name,e)})),e.inclusionModeDefinition?.generateAllSublayers?(a=e.knowledgeGraph.dataModel.entityTypes??[],i=e.knowledgeGraph.dataModel.relationshipTypes??[]):e.inclusionModeDefinition?.namedTypeDefinitions&&e.inclusionModeDefinition?.namedTypeDefinitions.size>0?e.inclusionModeDefinition?.namedTypeDefinitions.forEach(((n,s)=>{const o=this._graphTypeLookup.get(s);if(!o)return l.A.getLogger(this).warn(`A named type, ${s}, was in the inclusion list that wasn't in the data model and will be removed`),void e.inclusionModeDefinition?.namedTypeDefinitions.delete(s);"relationship"===o.type?t.has(s)||(t.add(s),i.push(o)):"entity"===o.type?t.has(s)||(t.add(s),a.push(o)):(l.A.getLogger(this).warn(`A named type, ${s}, was in the inclusion list that wasn't properly modeled and will be removed`),e.inclusionModeDefinition?.namedTypeDefinitions.delete(s))})):(a=e.knowledgeGraph.dataModel.entityTypes??[],i=e.knowledgeGraph.dataModel.relationshipTypes??[]);const n=new C.P({knowledgeGraph:e.knowledgeGraph,inclusionModeDefinition:e.inclusionModeDefinition});this.knowledgeGraph=e.knowledgeGraph,this.memberEntityTypes=a,this.memberRelationshipTypes=i,this.dataManager=n}load(e){const t=async()=>{const e=[],t=[];this.loadLayerAssumingLocalCache(),await(0,w.qN)(this),this.dataManager.inclusionModeDefinition&&(this.dataManager.inclusionModeDefinition.generateAllSublayers=!1),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.forEach((e=>{e.useAllData=!1})),await this._initializeDiagram(),this.layers.forEach((a=>{t.push(a.refreshCachedQueryEngine()),e.push(new Promise((e=>{a.on("layerview-create",(()=>{e(null)}))})))})),this.tables.forEach((e=>{t.push(e.refreshCachedQueryEngine())})),await Promise.all(t)};return this.addResolvingPromise(new Promise((a=>{(0,A.fetchKnowledgeGraph)(this.url).then((async i=>{if(this._initializeLayerProperties({knowledgeGraph:i,inclusionModeDefinition:this._originalInclusionList}),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.size||(this.dataManager.inclusionModeDefinition={generateAllSublayers:!1,namedTypeDefinitions:new Map},this.dataManager.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.set(e.name,{useAllData:!0})})),this.dataManager.knowledgeGraph.dataModel.relationshipTypes?.forEach((e=>{e.name&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.set(e.name,{useAllData:!0})}))),this.dataPreloadedInLocalCache){const e=b.A.getInstance();for(const[t,a]of this.dataManager.inclusionModeDefinition?.namedTypeDefinitions??[])for(const i of a.members?.values()??[]){const a=e.readFromStoreById(`${t}__${i.id}`);a&&(0,h.tE)(this.dataManager.sublayerCaches,t,(()=>new Map)).set(i.id,a)}await t()}else{const a="GEOGRAPHIC"===this.defaultLinkChartConfig?.layoutMode;this.addResolvingPromise(this.dataManager.refreshCacheContent(void 0,!1,a,!0).then((async()=>{(0,u.Te)(e),await t()})))}a(null)}))}))),Promise.resolve(this)}async addRecords(e,t){let a=[];t?.cascadeAddRelationshipEndNodes&&this.dataManager.knowledgeGraph.dataModel&&(a=await(0,T.aq)(e,this.dataManager.knowledgeGraph));const i=e.concat(a).filter((e=>!this.sublayerIdsCache.get(e.typeName)?.has(e.id)));await this._handleNewRecords(i)}async removeRecords(e,{cascadeRemoveRelationships:t=!0,recalculateLayout:a=!1}={cascadeRemoveRelationships:!0,recalculateLayout:!1}){let i=[];for(const t of e)!1===this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.get(t.typeName)?.useAllData&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.get(t.typeName)?.members?.has(t.id)&&i.push(t);if(t){const e=new Set,t=[];for(const t of i)if(this.dataManager.nodeConnectionsLookup.has(t.id))for(const a of this.dataManager.nodeConnectionsLookup.get(t.id))e.add(a);for(const a of e)if(this.dataManager.memberIdTypeLookup.has(a))for(const e of this.dataManager.memberIdTypeLookup.get(a))this.dataManager.relationshipTypeNames.has(e)&&t.push({id:a,typeName:e});i=i.concat(t)}this.dataManager.removeFromLayer(i);for(const e of i)this.sublayerIdsCache.get(e.typeName)?.delete(e.id),this.dataManager.relationshipTypeNames.has(e.typeName)?this.relationshipLinkChartDiagramLookup.delete(e.id):this.entityLinkChartDiagramLookup.delete(e.id);a&&await this._calculateLayoutWithSublayerTimeInfo(this._currentLinkChartConfig.layoutMode,this._currentLinkChartConfig.layoutOptions);const n=[];return this.layers.forEach((e=>{n.push(e.refreshCachedQueryEngine())})),await Promise.all(n),this._refreshNamedTypes(),i}async expand(e,t){const a=await this.dataManager.getConnectedRecordIds(e,t),i=a.filter((e=>!this.sublayerIdsCache.get(e.typeName)?.has(e.id)));return await this._handleNewRecords(a),{records:i}}loadLayerAssumingLocalCache(){const e=[...this.memberRelationshipTypes,...this.memberEntityTypes];this.originIdOf("layers")===g.Gr.DEFAULTS?this._createSublayers(e,this.layers,(e=>!!e.geometryType)):this._updateSublayers(e,this.layers),this.originIdOf("tables")===g.Gr.DEFAULTS?this._createSublayers(e,this.tables,(e=>!e.geometryType)):this._updateSublayers(e,this.tables),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.forEach(((e,t)=>{const a=(0,h.tE)(this.sublayerIdsCache,t,(()=>new Set));e.members?.forEach((({id:e,linkChartLocation:i})=>{if(a.add(e),i){const a=i instanceof L.A?i:(0,m.Ux)(i);this.dataManager.relationshipTypeNames.has(t)?this.relationshipLinkChartDiagramLookup.set(e,a):this.entityLinkChartDiagramLookup.set(e,a)}}))}))}async calculateLinkChartLayout(e="RADIAL_TREE",t){const a=[],i=[],n=[];this.dataManager.sublayerCaches.forEach(((e,t)=>{this.dataManager.entityTypeNames.has(t)?e.forEach((e=>{a.push({typeName:t,feature:e})})):this.dataManager.relationshipTypeNames.has(t)&&e.forEach((e=>{i.push({typeName:t,feature:e})}))})),this.entityLinkChartDiagramLookup=new Map,this.relationshipLinkChartDiagramLookup=new Map;const s=new Map,o=new Map,h=new Map,d=new Map,u=new Uint8Array(a.length),c=new Float64Array(a.length),y=new Float64Array(a.length),p=new Float64Array(a.length),g=new Float64Array(a.length),f=new Uint32Array(i.length),L=new Uint32Array(i.length),C=new Float64Array(i.length),M=new Float64Array(i.length),b=[],T=new x.A({xmin:-1e-7,ymin:-1e-7,xmax:1e-7,ymax:1e-7});let k,E="FORCE_DIRECTED",N=0,A=0;const R=I.i6.apply;switch(E="GEOGRAPHIC"===e?"FORCE_DIRECTED":e,E){case"FORCE_DIRECTED":k=I.pM.apply;break;case"COMMUNITY":k=I.Tu.apply;break;case"HIERARCHICAL":k=I.$C.apply;break;case"RADIAL_TREE":k=I.vJ.apply;break;case"SMART_TREE":k=I.Xq.apply;break;default:k=I.Wg.apply}let O=!1;a.forEach((({typeName:a,feature:i})=>{if("CHRONOLOGICAL_SINGLE"!==e&&"CHRONOLOGICAL_MULTIPLE"!==e&&t?.lockedNodeLocations?.has(i.attributes[w.dr])){"GEOGRAPHIC"===e&&this.dataManager.geographicLookup.has(a)?u[N]=I.tx.IsGeographic:u[N]=I.tx.None;const n=t.lockedNodeLocations.get(i.attributes[w.dr]);c[N]=n.x,y[N]=n.y}else if("GEOGRAPHIC"===e&&this.dataManager.geographicLookup.has(a)){u[N]=I.tx.IsGeographic;let e=null;const t=i.attributes[this.dataManager.geographicLookup.get(a).name],n=this.dataManager.geographicLookup.get(a)?.geometryType;switch(n){case"esriGeometryPoint":c[N]=t?.x,y[N]=t?.y;break;case"esriGeometryPolygon":e=t?.centroid,null!=e?.x&&null!=e?.y?(c[N]=e.x,y[N]=e.y):u[N]=I.tx.IsMovable;break;case"esriGeometryPolyline":case"esriGeometryMultipoint":e=t?.extent?.center,null!=e?.x&&null!=e?.y?(c[N]=e.x,y[N]=e.y):u[N]=I.tx.IsMovable;break;default:u[N]=I.tx.IsMovable}(null==c[N]||null==y[N]||Number.isNaN(c[N])||Number.isNaN(y[N]))&&(u[N]=I.tx.IsMovable,c[N]=0,y[N]=0)}else if("CHRONOLOGICAL_SINGLE"===e||"CHRONOLOGICAL_MULTIPLE"===e){!O&&t?.lockedNodeLocations?.has(i.attributes[w.dr])&&(O=!0);const e=t?.timeInfoByTypeName?.get(a),n=e?.startField,s=n&&e?.startField?i.attributes[n]:null;p[N]=s?new Date(s).getTime():NaN;const o=e?.endField,r=o&&e?.endField?i.attributes[o]:null;g[N]=r?new Date(r).getTime():NaN,c[N]=0,y[N]=0,u[N]=I.tx.IsMovable}else u[N]=I.tx.IsMovable,c[N]=0,y[N]=0;d.set(i.attributes[w.dr],N),b[N]={feature:i,typeName:a},N++})),O&&l.A.getLogger(this).warn("Locked node locations are not supported for chronological layout at this time. Requested node locations were ignored");let v=!1;const G=new Map;i.forEach((a=>{const i=a.feature.attributes[w.Cz],s=a.feature.attributes[w.KQ],o=d.get(i),r=d.get(s),l=t?.timeInfoByTypeName?.get(a.typeName),h=t?.timeInfoByTypeName?l?.startField:null,u=h?a.feature.attributes[h]:null,c=l?.endField,y=c?a.feature.attributes[c]:null;if(void 0!==o&&void 0!==r){let t=i+"-"+s;"CHRONOLOGICAL_SINGLE"!==e&&"CHRONOLOGICAL_MULTIPLE"!==e||(t=t+"-"+u+"-"+y);const l=G.get(t),h=l?.has(a.typeName);h||(f[A]=o,L[A]=r,"CHRONOLOGICAL_SINGLE"!==e&&"CHRONOLOGICAL_MULTIPLE"!==e||(C[A]=u?new Date(u).getTime():NaN,M[A]=y?new Date(y).getTime():NaN),void 0===l?G.set(t,new Map([[a.typeName,A]])):l.set(a.typeName,A),A++),n.push(a)}else v=!0,this.relationshipLinkChartDiagramLookup.set(i,null)})),v&&l.A.getLogger(this).warn("A relationship is a member of this layer that has either origin or destination entity nodes that are not members. The diagram geometry will be set to null");const S=this._validateLayoutSettings(e,t),P=this._convertLayoutSettingsToCalculationSettings(S);await(0,I.Hh)();let H=!1,U=null;if("CHRONOLOGICAL_SINGLE"===e||"CHRONOLOGICAL_MULTIPLE"===e){let a;({success:H,links:U,graphics:a}=R(u,c,y,p,g,f.subarray(0,A),L.subarray(0,A),C.subarray(0,A),M.subarray(0,A),"CHRONOLOGICAL_MULTIPLE"===e,t?.chronologicalLayoutSettings??{})),H&&(this.chronologicalAuxiliaryGraphics=a)}else({success:H,links:U}=k(u,c,y,f.subarray(0,A),L.subarray(0,A),P.computationBudgetTime,P.idealEdgeLengthMultiplier,P.repulsionRadiusMultiplier));if(!H)throw new r.A("knowledge-graph:layout-failed","Attempting to arrange the records in the specified layout failed");for(let e=0;e<b.length;e++){if(y[e]>84.9999?y[e]=84.9999:y[e]<-84.9999&&(y[e]=-84.9999),c[e]>179.9999?c[e]=179.9999:c[e]<-179.9999&&(c[e]=-179.9999),b[e].feature.attributes[w.T1]=new _.A(c[e],y[e]),s.has(b[e].typeName)){const t=s.get(b[e].typeName);t?.set(b[e].feature.attributes[w.dr],b[e].feature)}else{const t=new Map;t.set(b[e].feature.attributes[w.dr],b[e].feature),s.set(b[e].typeName,t)}h.set(b[e].feature.attributes[w.dr],b[e].feature);const t=(0,m.Ux)(b[e].feature.attributes[w.T1]);this.entityLinkChartDiagramLookup.set(b[e].feature.attributes[w.dr],b[e].feature.attributes[w.T1]?t:null),b[e].feature.attributes[w.T1].x<T.xmin&&(T.xmin=b[e].feature.attributes[w.T1].x),b[e].feature.attributes[w.T1].x>T.xmax&&(T.xmax=b[e].feature.attributes[w.T1].x),b[e].feature.attributes[w.T1].y<T.ymin&&(T.ymin=b[e].feature.attributes[w.T1].y),b[e].feature.attributes[w.T1].y>T.ymax&&(T.ymax=b[e].feature.attributes[w.T1].y)}if(this.linkChartExtent.xmin=T.xmin,this.linkChartExtent.xmax=T.xmax,this.linkChartExtent.ymin=T.ymin,this.linkChartExtent.ymax=T.ymax,!U)throw new r.A("knowledge-graph:layout-failed","Attempting to retrieve link geometry from diagram engine failed");const F=new Map,B=new Map,Z=new Map,z=new Set;for(let a=0;a<n.length;a++){const i=[],s=n[a],r=s.feature.attributes[w.Cz],u=s.feature.attributes[w.KQ];let c=r+"-"+u;if("CHRONOLOGICAL_SINGLE"===e||"CHRONOLOGICAL_MULTIPLE"===e){const e=t?.timeInfoByTypeName?.get(s.typeName),a=t?.timeInfoByTypeName?e?.startField:null,i=a?s.feature.attributes[a]:null,n=e?.endField;c+="-"+i+"-"+(n?s.feature.attributes[n]:null)}const y=G.get(c).get(s.typeName),p=0===y?0:U?.vertexEndIndex[y-1];if(!z.has(y)){if(z.add(y),U.types[y]===I.J.Recursive){const e=[U.vertices[2*p],U.vertices[2*p+1]],t=[U.vertices[2*(p+1)],U.vertices[2*(p+1)+1]],a=[.5*(e[0]+t[0]),.5*(e[1]+t[1])],n=[a[0]-e[0],a[1]-e[1]],s=[a[0]+n[1],a[1]-n[0]],o=[a[0]-n[1],a[1]+n[0]];i.push(e),i.push(s),i.push(t),i.push(o),i.push(e)}else{if(U.types[y]!==I.J.Regular){l.A.getLogger(this).warn("A relationship generated an unsupported link geometry type. It will not be rendered");continue}for(let e=p;e<U.vertexEndIndex[y];e++)i.push([U.vertices[2*e],U.vertices[2*e+1]])}if("CHRONOLOGICAL_SINGLE"!==e&&"CHRONOLOGICAL_MULTIPLE"!==e){const e=b[d.get(r)]?.feature.attributes[w.T1],t=b[d.get(u)]?.feature.attributes[w.T1];i[0][0]===e.x&&i[0][1]===e.y||(i[0]=[e.x,e.y]),i[i.length-1][0]===t.x&&i[i.length-1][1]===t.y||(i[i.length-1]=[t.x,t.y])}for(let e=1;e<i.length-1;e++)i[e][1]>85.5?i[e][1]=85.5:i[e][1]<-85.5&&(i[e][1]=-85.5),i[e][0]>179.9999?i[e][0]=179.9999:i[e][0]<-179.9999&&(i[e][0]=-179.9999);F.has(c)?F.get(c).push(i):F.set(c,[i])}const g=F.get(c);B.has(c)||(B.set(c,new Map),Z.set(c,new Map));const f=B.get(c),L=Z.get(c);f.has(s.typeName)||(f.set(s.typeName,g.shift()),L.set(s.typeName,0));const C=f.get(s.typeName);L.set(s.typeName,L.get(s.typeName)+1);const M=new D.A({paths:[C]});if(s.feature.attributes[w.T1]=M,o.has(s.typeName)){const e=o.get(s.typeName);e?.set(s.feature.attributes[w.dr],s.feature)}else{const e=new Map;e.set(s.feature.attributes[w.dr],s.feature),o.set(s.typeName,e)}h.set(s.feature.attributes[w.dr],s.feature);const T=(0,m.Ux)(s.feature.attributes[w.T1]);this.relationshipLinkChartDiagramLookup.set(s.feature.attributes[w.dr],s.feature.attributes[w.T1]?T:null)}for(const e of n)e.feature.attributes[w.M1]=Z.get(e.feature.attributes[w.Cz]+"-"+e.feature.attributes[w.KQ])?.get(e.typeName)??null;return this._currentLinkChartConfig={layoutMode:e,layoutOptions:S},{nodes:s,links:o,idMap:h}}async applyNewLinkChartLayout(e="RADIAL_TREE",t){const a=[];await this._calculateLayoutWithSublayerTimeInfo(e,t),this.layers.forEach((e=>{a.push(e.refreshCachedQueryEngine())})),await Promise.all(a),this._refreshNamedTypes()}getCurrentNodeLocations(){const e=new Map;return this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.forEach((t=>{t?.members?.forEach((t=>{const a=t.linkChartLocation;let i;const n=t.id;a&&(i="x"in a?{x:a.x,y:a.y}:{x:a.coords[0],y:a.coords[1]},e.set(n,new _.A({x:i.x,y:i.y})))}))})),e}async synchronizeInclusionListWithCache(){return new Promise((e=>{this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.forEach(((e,t)=>{if(e.useAllData=!1,e.members&&e.members.size>0){if(!this.dataManager.sublayerCaches.get(t))return;const a=new Set(Array.from(this.dataManager.sublayerCaches.get(t).keys()));Array.from(e.members.keys()).filter((e=>!a.has(e))).forEach((t=>{e.members?.delete(t)}))}})),e()}))}async refreshLinkChartCache(e){await this.dataManager.refreshCacheContent(e);const t=[];this.layers.forEach((e=>{t.push(e.refreshCachedQueryEngine())})),await Promise.all(t),this._refreshNamedTypes()}async connectBetweenEntities(e){if(!e.length)return{records:[]};let t=[];for(const e of this.dataManager.relationshipTypeNames){const a=this.sublayerIdsCache.get(e);a&&(t=t.concat(Array.from(a.keys())))}const a=await this.dataManager.getRelationshipsBetweenNodes(e,t);return await this._handleNewRecords(a),{records:a}}async connectFromEntities(e){if(!e.length)return{records:[]};let t=[];for(const e of this.dataManager.relationshipTypeNames){const a=this.sublayerIdsCache.get(e);a&&(t=t.concat(Array.from(a.keys())))}let a=[];for(const e of this.dataManager.entityTypeNames){const t=this.sublayerIdsCache.get(e);t&&(a=a.concat(Array.from(t)))}const i=await this.dataManager.getRelationshipsFromNodes(e,a,t);return await this._handleNewRecords(i),{records:i}}getCurrentLayout(){return this._currentLinkChartConfig.layoutMode}async _calculateLayoutWithSublayerTimeInfo(e="RADIAL_TREE",t){const a=new Map;this.layers.forEach((e=>{a.set(e.objectType.name,e.timeInfo)})),await this.calculateLinkChartLayout(e,{timeInfoByTypeName:a,...t})}async _handleNewRecords(e){const t=[];this.dataManager.addToLayer(e);for(const a of e)this.sublayerIdsCache.has(a.typeName)||(this.sublayerIdsCache.set(a.typeName,new Set),t.push(a.typeName)),this.sublayerIdsCache.get(a.typeName).add(a.id);for(const e of t){const t=this._graphTypeLookup.get(e);if(t){const a=this._createSublayer(t);"entity"===t.type?this.dataManager.entityTypeNames.add(e):this.dataManager.relationshipTypeNames.add(e),a.geometryType?this.layers.push(a):this.tables.push(a),this.dataManager.sublayerCaches.set(e,new Map)}}await(0,w.qN)(this,t),await this.dataManager.refreshCacheContent(e.map((e=>e.id)));const a=Object.assign({},this._currentLinkChartConfig.layoutOptions);a.lockedNodeLocations=new Map;for(const[e,t]of this.entityLinkChartDiagramLookup.entries())t&&a.lockedNodeLocations.set(e,new _.A(t.coords[0],t.coords[1]));await this.applyNewLinkChartLayout(this._currentLinkChartConfig.layoutMode,a)}_createSublayers(e,t,a){e.forEach((e=>{const i=this._createSublayer(e);a(i)&&t.push(i),this._updateSublayerCaches(e)}))}_updateSublayers(e,t){t.forEach((t=>{t.parentCompositeLayer=this;const a=e.find((e=>e.type===t.graphType&&e.name===t.graphTypeName));a&&(t.objectType=a,t.read({title:a.name},{origin:"service"}),this._updateSublayerCaches(a))}))}_updateSublayerCaches(e){const t=this.dataManager.sublayerCaches;t.has(e.name)||t.set(e.name,new Map)}async _initializeDiagram(){this.defaultLinkChartConfig?this.defaultLinkChartConfig.doNotRecalculateLayout?(this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.forEach(((e,t)=>{e?.members?.forEach((e=>{const a=e.linkChartLocation;let i;const n=e.id;if(!a)return;i="x"in a?{x:a.x,y:a.y}:{x:a.coords[0],y:a.coords[1]};const s=(0,m.Ux)(i);this.dataManager.relationshipTypeNames.has(t)?this.relationshipLinkChartDiagramLookup.set(n,s):this.entityLinkChartDiagramLookup.set(n,s),this.linkChartExtent.xmin>i.x&&(this.linkChartExtent.xmin=i.x),this.linkChartExtent.xmax<i.x&&(this.linkChartExtent.xmax=i.x),this.linkChartExtent.ymin>i.y&&(this.linkChartExtent.ymin=i.y),this.linkChartExtent.ymax<i.y&&(this.linkChartExtent.ymax=i.y)}))})),this.memberRelationshipTypes.forEach((e=>{e.name&&this.dataManager.sublayerCaches.get(e.name)?.forEach((e=>{const t=this.relationshipLinkChartDiagramLookup.get(e.attributes[w.Cz]),a=this.relationshipLinkChartDiagramLookup.get(e.attributes[w.KQ]);if(t&&a){const i=(0,m.Ux)(new D.A({paths:[[[t.coords[0],t.coords[1]],[a.coords[0],a.coords[1]]]]}));this.relationshipLinkChartDiagramLookup.set(e.attributes[w.dr],i)}else this.relationshipLinkChartDiagramLookup.set(e.attributes[w.dr],null)}))}))):await this._calculateLayoutWithSublayerTimeInfo(this.defaultLinkChartConfig.layoutMode,{lockedNodeLocations:this.getCurrentNodeLocations(),...this.defaultLinkChartConfig.layoutOptions||{}}):await this._calculateLayoutWithSublayerTimeInfo("RADIAL_TREE",{lockedNodeLocations:this.getCurrentNodeLocations()})}_refreshNamedTypes(){for(const e of this.layers)e.emit("refresh",{dataChanged:!0});for(const e of this.tables)e.emit("refresh",{dataChanged:!0})}_validateLayoutSettings(e,t){const a=e=>"number"==typeof e&&!isNaN(e),n={organicLayoutSettings:{},chronologicalLayoutSettings:{}};if(!new Set(["FORCE_DIRECTED","COMMUNITY","GEOGRAPHIC","CHRONOLOGICAL_MULTIPLE","CHRONOLOGICAL_SINGLE"]).has(e)||!t)return n;t.organicLayoutSettings??={};const{computationBudgetTime:s,repulsionRadiusMultiplier:o,idealEdgeLength:r,idealEdgeLengthType:h}=t.organicLayoutSettings;if((e=>a(e)&&e>=1)(s)?n.organicLayoutSettings.computationBudgetTime=s:void 0!==s&&l.A.getLogger(this).warn("Invalid layout computationBudgetTime setting, will revert to default setting"),(e=>a(e)&&e>=1)(o)?n.organicLayoutSettings.repulsionRadiusMultiplier=o:void 0!==o&&l.A.getLogger(this).warn("Invalid layout repulsionRadiusMultiplier setting, will revert to default setting"),"GEOGRAPHIC"===e&&(void 0!==r||void 0!==h)&&((e=>Object.values(i).includes(e))(h)?n.organicLayoutSettings.idealEdgeLengthType=h:void 0!==h&&l.A.getLogger(this).warn('Invalid layout idealEdgeLengthType setting, will revert to "multiplier" setting'),(e=>a(e)&&e>=0)(r)?n.organicLayoutSettings.idealEdgeLength=r:void 0!==r&&l.A.getLogger(this).warn("Invalid layout idealEdgeLength setting, will revert to default setting")),("CHRONOLOGICAL_MULTIPLE"===e||"CHRONOLOGICAL_SINGLE"===e)&&t.chronologicalLayoutSettings){const e=t.chronologicalLayoutSettings;e.durationLineWidth&&e.durationLineWidth<0&&l.A.getLogger(this).warn("Invalid layout durationLineWidth setting, will revert to default setting")}return n}_convertLayoutSettingsToCalculationSettings(e){e.organicLayoutSettings??={};let t=e.organicLayoutSettings.idealEdgeLength;return e.organicLayoutSettings.idealEdgeLengthType===i.ABSOLUTE&&(void 0===t?t=-1:t*=-1),{computationBudgetTime:e.organicLayoutSettings.computationBudgetTime,repulsionRadiusMultiplier:e.organicLayoutSettings.repulsionRadiusMultiplier,idealEdgeLengthMultiplier:t}}_createSublayer(e){return new M.A({objectType:e,parentCompositeLayer:this,graphType:e.type})}_handleSublayersChange(e,t){t&&(t.forEach((e=>{e.parent=null})),this.removeHandles("sublayers-owner")),e&&(e.forEach((e=>{e.parent=this})),this.addHandles([e.on("after-add",(({item:e})=>{e.parent=this})),e.on("after-remove",(({item:e})=>{e.parent=null}))],"sublayers-owner"))}};(0,s._)([(0,y.MZ)()],R.prototype,"dataPreloadedInLocalCache",void 0),(0,s._)([(0,y.MZ)()],R.prototype,"defaultLinkChartConfig",void 0),(0,s._)([(0,y.MZ)()],R.prototype,"dataManager",void 0),(0,s._)([(0,y.MZ)()],R.prototype,"knowledgeGraph",void 0),(0,s._)([(0,y.MZ)({type:o.A.ofType(M.A),json:{write:{ignoreOrigin:!0}}})],R.prototype,"layers",void 0),(0,s._)([(0,y.MZ)()],R.prototype,"entityLinkChartDiagramLookup",void 0),(0,s._)([(0,y.MZ)()],R.prototype,"relationshipLinkChartDiagramLookup",void 0),(0,s._)([(0,y.MZ)()],R.prototype,"linkChartExtent",void 0),(0,s._)([(0,y.MZ)()],R.prototype,"memberEntityTypes",void 0),(0,s._)([(0,y.MZ)()],R.prototype,"memberRelationshipTypes",void 0),(0,s._)([(0,y.MZ)({type:["LinkChartLayer"]})],R.prototype,"operationalLayerType",void 0),(0,s._)([(0,y.MZ)()],R.prototype,"sublayerIdsCache",void 0),(0,s._)([(0,y.MZ)({type:o.A.ofType(M.A),json:{write:{ignoreOrigin:!0}}})],R.prototype,"tables",void 0),(0,s._)([(0,y.MZ)({json:{read:!1}})],R.prototype,"type",void 0),(0,s._)([(0,y.MZ)({json:{read:!1}})],R.prototype,"chronologicalAuxiliaryGraphics",void 0),R=(0,s._)([(0,p.$)("esri.layers.LinkChartLayer")],R);const O=R}}]);