@arcgis/core 5.0.0-next.39 → 5.0.0-next.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Basemap.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/02d1c48e874dfd985bc4.js +1 -0
- package/assets/esri/core/workers/chunks/0429ca6ba562ae29897e.js +1 -0
- package/assets/esri/core/workers/chunks/{a6324f5f560ffadc6e5d.js → 061def9163a09c804b5c.js} +1 -1
- package/assets/esri/core/workers/chunks/0e4d0213d568f50c231f.js +1 -0
- package/assets/esri/core/workers/chunks/{1de216d9850c39c1735d.js → 1357cc637524cd254974.js} +1 -1
- package/assets/esri/core/workers/chunks/13839d220e5c62404923.js +1 -0
- package/assets/esri/core/workers/chunks/1c0fb4795a52204882a8.js +1 -0
- package/assets/esri/core/workers/chunks/1e286fb7bb833f00dd88.js +1 -0
- package/assets/esri/core/workers/chunks/{52ecbaa2d32692d6d8df.js → 1f6ead46b723630db897.js} +1 -1
- package/assets/esri/core/workers/chunks/218b2b767b40d85fb713.js +1 -0
- package/assets/esri/core/workers/chunks/2c9865e34f32fb5683e5.js +1 -0
- package/assets/esri/core/workers/chunks/{48d1a443b324753921de.js → 2db7a7607657f1d669f7.js} +1 -1
- package/assets/esri/core/workers/chunks/2f8cf7d9ff1f4de19a4c.js +1 -0
- package/assets/esri/core/workers/chunks/{6330d8767ba1d5329daa.js → 31b074ae2162a3508d2a.js} +1 -1
- package/assets/esri/core/workers/chunks/338570424337be05cef5.js +1 -0
- package/assets/esri/core/workers/chunks/{a59433c78ed01febca6d.js → 3767617c0dfc7d801441.js} +1 -1
- package/assets/esri/core/workers/chunks/3a16347e17312556e02c.js +1 -0
- package/assets/esri/core/workers/chunks/3ac8de121a07c70bae0f.js +1 -0
- package/assets/esri/core/workers/chunks/3f33708eb39c7169a226.js +1 -0
- package/assets/esri/core/workers/chunks/4278b35fb6fd578c403e.js +1 -0
- package/assets/esri/core/workers/chunks/{3f8849c49f0e3ce7eb6b.js → 44f036cc21e3a2308f69.js} +1 -1
- package/assets/esri/core/workers/chunks/46daa1ff5b412a97edc9.js +1 -0
- package/assets/esri/core/workers/chunks/{a5d25c71aa4dfaa878cf.js → 4c4a55be41ba105c091c.js} +1 -1
- package/assets/esri/core/workers/chunks/537de53ef1e9101468f5.js +1 -0
- package/assets/esri/core/workers/chunks/679088064420a906aa7f.js +1 -0
- package/assets/esri/core/workers/chunks/6e8c20ff1d28ef2fe72c.js +1 -0
- package/assets/esri/core/workers/chunks/75643711d9585ee26a15.js +1 -0
- package/assets/esri/core/workers/chunks/7ba13b52fce1060fbb2a.js +1 -0
- package/assets/esri/core/workers/chunks/800c91302eaad7f00877.js +1 -0
- package/assets/esri/core/workers/chunks/804958f3f4ff47a4eff5.js +1 -0
- package/assets/esri/core/workers/chunks/816227de5bd42b437df4.js +1 -0
- package/assets/esri/core/workers/chunks/926c2a0e21b7aa1a86e4.js +1 -0
- package/assets/esri/core/workers/chunks/933dce4d4ff8b90219c8.js +1 -0
- package/assets/esri/core/workers/chunks/93d11075f65a5b6625ea.js +1 -0
- package/assets/esri/core/workers/chunks/9c0efd06c9000ccbd62d.js +1 -0
- package/assets/esri/core/workers/chunks/9f1d3c0b53bef07e39bf.js +1 -0
- package/assets/esri/core/workers/chunks/9f2a8445a5848502c7e7.js +1 -0
- package/assets/esri/core/workers/chunks/9f6c63a580b28ab715bd.js +1 -0
- package/assets/esri/core/workers/chunks/a96742e678a506c461ab.js +1 -0
- package/assets/esri/core/workers/chunks/b7bcff9a64f41a0a0b6a.js +1 -0
- package/assets/esri/core/workers/chunks/c0b15510a8cab98df77f.js +1 -0
- package/assets/esri/core/workers/chunks/c367c7e553be3682f2db.js +1 -0
- package/assets/esri/core/workers/chunks/cfd2839e218610a222e5.js +1 -0
- package/assets/esri/core/workers/chunks/{014dbe6fa93a277b08f7.js → d0014b4a8c013f59b113.js} +1 -1
- package/assets/esri/core/workers/chunks/d08ee45c501102deea20.js +1 -0
- package/assets/esri/core/workers/chunks/d42273394f575e71dd55.js +1 -0
- package/assets/esri/core/workers/chunks/d723619579cc8f5ef2cd.js +1 -0
- package/assets/esri/core/workers/chunks/da1e61f355fb943085dc.js +1 -0
- package/assets/esri/core/workers/chunks/dddb6cb44cbe4dc1af97.js +1 -0
- package/assets/esri/core/workers/chunks/efc293c8bbc12156096d.js +1 -0
- package/assets/esri/core/workers/chunks/f65f1798f398bc549463.js +1 -0
- package/assets/esri/core/workers/chunks/f93f0586ce10cb5d98b3.js +1 -0
- package/assets/esri/core/workers/chunks/{06462b267ff8d5984882.js → fb9643b74cf35221ff98.js} +1 -1
- package/chunks/Envelope.js +1 -1
- package/chunks/GaussianSplat.glsl.js +2 -2
- package/chunks/MultiPathImpl.js +1 -1
- package/chunks/Point2D.js +1 -1
- package/chunks/UnitFactory.js +1 -1
- package/config.js +1 -1
- package/core/has.js +1 -1
- package/form/FormTemplate.js +1 -1
- package/form/elements/GroupElement.js +1 -1
- package/form/elements/inputs/attachments/AttachmentInput.js +1 -1
- package/geometry/FlatGeometry.js +5 -0
- package/geometry/operators/gx/operatorShapePreservingProject.js +1 -1
- package/geometry/operators/support/jsonConverter.js +1 -1
- package/geometry/support/aaBoundingBox.js +1 -1
- package/geometry/support/aaBoundingRect.js +1 -1
- package/geometry/support/boundsUtils.js +1 -1
- package/interfaces.d.ts +259 -7
- package/kernel.js +1 -1
- package/layers/BaseElevationLayer.js +1 -1
- package/layers/BaseTileLayer.js +1 -1
- package/layers/CSVLayer.js +1 -1
- package/layers/FeatureLayer.js +1 -1
- package/layers/GeoJSONLayer.js +1 -1
- package/layers/GroupLayer.js +1 -1
- package/layers/MapImageLayer.js +1 -1
- package/layers/MediaLayer.js +1 -1
- package/layers/OrientedImageryLayer.js +1 -1
- package/layers/ParquetLayer.js +1 -1
- package/layers/VectorTileLayer.js +1 -1
- package/layers/VideoLayer.js +1 -1
- package/layers/WMSLayer.js +1 -1
- package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
- package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/layers/mixins/ImageryTileMixin.js +1 -1
- package/layers/mixins/PortalLayer.js +1 -1
- package/layers/mixins/TemporalLayer.js +1 -1
- package/layers/mixins/operationalLayerModuleMap.js +1 -1
- package/layers/mixins/operationalLayers.js +1 -1
- package/layers/support/LocalMediaElementSource.js +1 -1
- package/layers/support/ParquetEncodingBase.js +1 -1
- package/layers/support/ParquetEncodingLocation.js +1 -1
- package/layers/support/ParquetEncodingWkb.js +1 -1
- package/layers/support/Sublayer.js +1 -1
- package/layers/support/WMSSublayer.js +1 -1
- package/layers/support/layersCreator.js +1 -1
- package/layers/support/lazyLayerLoader.js +1 -1
- package/layers/support/parquetUtils.js +1 -1
- package/libs/parquet/parquet.js +1 -1
- package/package.json +2 -2
- package/renderers/FlowRenderer.js +1 -1
- package/renderers/VectorFieldRenderer.js +1 -1
- package/renderers/visualVariables/support/ColorSizeStop.js +1 -1
- package/renderers/visualVariables/support/SizeStop.js +1 -1
- package/support/LayersMixin.js +1 -1
- package/support/TablesMixin.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/edges/Edges3D.js +1 -1
- package/versionManagement/VersionManager.d.ts +4 -0
- package/versionManagement/VersionManager.js +5 -0
- package/views/2d/engine/webgl/OverlayMultipoint.js +1 -1
- package/views/2d/layers/LayerView2D.js +1 -1
- package/views/3d/GroundView3D.js +1 -1
- package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatAtlasPages.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatFadeTexture.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatOrderTexture.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js +1 -1
- package/views/input/gamepad/GamepadInputDevice.js +1 -1
- package/views/layers/support/{Geometry.js → GeometryClipArea.js} +1 -1
- package/views/webgl/capabilities/Capabilities.js +1 -1
- package/views/webgl/capabilities/load.js +1 -1
- package/webdoc/support/writeUtils.js +1 -1
- package/widgets/FeatureTable/FieldColumn.js +1 -1
- package/widgets/VersionManagement/VersionManagementViewModel.js +1 -1
- package/assets/esri/core/workers/chunks/09ac2bbc7327e6e6b5a2.js +0 -1
- package/assets/esri/core/workers/chunks/1432e789aa4cba627337.js +0 -1
- package/assets/esri/core/workers/chunks/1a9ed3c59a9a8bafb251.js +0 -1
- package/assets/esri/core/workers/chunks/1c857191e5898aba50fe.js +0 -1
- package/assets/esri/core/workers/chunks/234ffd08c2be03a0b9fe.js +0 -1
- package/assets/esri/core/workers/chunks/2d0d8243ed0c21f8a498.js +0 -1
- package/assets/esri/core/workers/chunks/31675811cacdb6fd96cf.js +0 -1
- package/assets/esri/core/workers/chunks/39d2b540738431adec98.js +0 -1
- package/assets/esri/core/workers/chunks/48820e12d94eb49c0a65.js +0 -1
- package/assets/esri/core/workers/chunks/4c278fb2d51ca6226050.js +0 -1
- package/assets/esri/core/workers/chunks/4d6706d6dbe578653c28.js +0 -1
- package/assets/esri/core/workers/chunks/4ff40eea70d19c934504.js +0 -1
- package/assets/esri/core/workers/chunks/59ce992d3a5e7c32b9fb.js +0 -1
- package/assets/esri/core/workers/chunks/5e30acfda04f7fc2b676.js +0 -1
- package/assets/esri/core/workers/chunks/6052eccb9395c8efb295.js +0 -1
- package/assets/esri/core/workers/chunks/61369838aa337d0156c5.js +0 -1
- package/assets/esri/core/workers/chunks/690a40d2eef52bfc149f.js +0 -1
- package/assets/esri/core/workers/chunks/6b820f14c110d9da118e.js +0 -1
- package/assets/esri/core/workers/chunks/7fd2366ee1fc81fa8c56.js +0 -1
- package/assets/esri/core/workers/chunks/8d9e622cec13f5cea726.js +0 -1
- package/assets/esri/core/workers/chunks/9110287f272141f60c35.js +0 -1
- package/assets/esri/core/workers/chunks/98997841ec3955287ba2.js +0 -1
- package/assets/esri/core/workers/chunks/a716b8fdeda4e16f03ab.js +0 -1
- package/assets/esri/core/workers/chunks/a9577a700b6a7b69d6aa.js +0 -1
- package/assets/esri/core/workers/chunks/ad4fcb73cfe9a1e4b710.js +0 -1
- package/assets/esri/core/workers/chunks/aead7c9830fa310e5b53.js +0 -1
- package/assets/esri/core/workers/chunks/b48aceaeefa07214e430.js +0 -1
- package/assets/esri/core/workers/chunks/bcfa98b6866a96c194cb.js +0 -1
- package/assets/esri/core/workers/chunks/c052fb8c952cda0b5d13.js +0 -1
- package/assets/esri/core/workers/chunks/c0d6f8e55349f4f5cd58.js +0 -1
- package/assets/esri/core/workers/chunks/c1a4d1ec0125617374b4.js +0 -1
- package/assets/esri/core/workers/chunks/c582fb447c89d732cfff.js +0 -1
- package/assets/esri/core/workers/chunks/cb500d673ca7ec1ef945.js +0 -1
- package/assets/esri/core/workers/chunks/ce99abfdcd71ff9e4e36.js +0 -1
- package/assets/esri/core/workers/chunks/cf0e2c91b330b1d0ef77.js +0 -1
- package/assets/esri/core/workers/chunks/d764b6273974f4bca31b.js +0 -1
- package/assets/esri/core/workers/chunks/d87dc2eeffabd3507143.js +0 -1
- package/assets/esri/core/workers/chunks/dca6a61fd239cf1ff90c.js +0 -1
- package/assets/esri/core/workers/chunks/edc3d98f33d7bf959154.js +0 -1
- package/assets/esri/core/workers/chunks/f1381c5a2a1de1ef9139.js +0 -1
- package/assets/esri/core/workers/chunks/f6148611d883a59f8fb8.js +0 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatDepthTechnique.js +0 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8948],{6518:(e,t,n)=>{n.d(t,{F:()=>a});var i=n(44208),r=n(75503),o=n(19419);const s={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 r.wq(9,(0,i.A)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach((n,i)=>{e[t++]=i}),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,o.Ie)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,n){(function(e){s.minX=e[0],s.minY=e[1],s.maxX=e[2],s.maxY=e[3]})(t),e.search(s,n)}(this._index,e,e=>t(this._idByBounds.get(e)))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},8460:(e,t,n)=>{n.d(t,{$C:()=>y,Hh:()=>s,Tu:()=>c,Wg:()=>h,Xq:()=>f,i6:()=>g,pM:()=>u,vJ:()=>m});var i=n(2741);let r,o=null;function s(){return r||(r=n.e(3666).then(n.bind(n,3666)).then(e=>e.l).then(({default:e})=>e({locateFile:e=>(0,i.s)(`esri/libs/linkchartlayout/${e}`)})).then(e=>{!function(e){o=e}(e)}),r)}const a={right:0,left:1,top:2,bottom:3},l={none:0,"start-only":1,"start-and-end":2};function p(e){const t={timeDirection:"right",timeBannerUTCOffsetInMinutes:0,eventsTicksVisualization:"start-and-end",showDurationLineForNonZeroDurationEntityEvents:!0,durationLineWidth:5,entityPositionAtDurationRatio:1,showNonZeroDurationIntervalBounds:!1,separateTimeOverlaps:!0,separateTimelineOverlaps:!0,moveFirstBends:!0,secondBendRatio:.3,lineSeparationMultiplier:1,spaceSeparatedLinesEvenly:!1,useBezierCurves:!1,separatedLineShapeRatio:0,...e?.toJSON(),eventsTicksVisualization:e?.eventsTicksVisualization??"start-and-end"};return{...t,timeDirection:{value:a[t.timeDirection]??a.right},eventsTicksVisualization:{value:l[t.eventsTicksVisualization]??l["start-and-end"]}}}function d(e,t,n,i,r,s){const a=n.length,l=r.length,p=Float64Array.BYTES_PER_ELEMENT,d=Uint32Array.BYTES_PER_ELEMENT,u=Uint8Array.BYTES_PER_ELEMENT,c=16+a*(u+2*p)+l*(2*d),h=o._malloc(c);try{const u=h+16-h%16,c=u+a*p,y=c+a*p,m=y+l*d,f=m+l*d,g=()=>[o.HEAPF64.subarray(u>>3,(u>>3)+a),o.HEAPF64.subarray(c>>3,(c>>3)+a),o.HEAPU32.subarray(y>>2,(y>>2)+l),o.HEAPU32.subarray(m>>2,(m>>2)+l),o.HEAPU8.subarray(f,f+a)],[b,w,_,M,I]=g();b.set(n),w.set(i),_.set(r),M.set(s),I.set(t);const T=e(a,f,u,c,l,y,m);let C=null,v=null;if(0===T.value){const e=o.getLayoutLinksTypes(),t=o.getLayoutLinksVerticesEndIndices(),n=o.getLayoutLinksVertices(),i=o.countLayoutLinksVertices();!l||e&&t?i&&!n?T.value=1:(C={types:new Uint8Array(o.HEAPU8.subarray(e,e+l)),vertexEndIndex:new Uint32Array(o.HEAPU32.subarray(t>>2,(t>>2)+l)),vertices:new Float64Array(o.HEAPF64.subarray(n>>3,(n>>3)+2*i))},v=o.getAuxiliaryGraphicElements()):T.value=1}const[A,x,E,S,k]=g();return n.set(A),i.set(x),r.set(E),s.set(S),t.set(k),{status:T.value,links:C,graphics:v}}finally{o._free(h),o.cleanupLayout()}}var u,c,h,y,m,f,g,b;(b=u||(u={})).getMinIdealEdgeLength=function(){return o.getMinIdealEdgeLength()},b.apply=function(e,t,n,i,r,s,a=2,l=1,p=-1){return d((t,n,i,r,s,d,u)=>o.applyForceDirectedLayout(e,t,n,i,r,s,d,u,a,l,p),t,n,i,r,s)},function(e){e.apply=function(e,t,n,i,r,s,a=2,l=1,p=-1){return d((t,n,i,r,s,d,u)=>o.applyCommunityLayout(e,t,n,i,r,s,d,u,a,l,p),t,n,i,r,s)}}(c||(c={})),function(e){e.apply=function(e,t,n,i,r,s){return d((t,n,i,r,s,a,l)=>o.applySimpleLayout(e,t,n,i,r,s,a,l),t,n,i,r,s)}}(h||(h={})),function(e){e.apply=function(e,t,n,i,r,s){return d((t,n,i,r,s,a,l)=>o.applyHierarchicalLayout(e,t,n,i,r,s,a,l),t,n,i,r,s)}}(y||(y={})),function(e){e.apply=function(e,t,n,i,r,s){return d((t,n,i,r,s,a,l)=>o.applyRadialTreeLayout(e,t,n,i,r,s,a,l),t,n,i,r,s)}}(m||(m={})),function(e){e.apply=function(e,t,n,i,r,s){return d((t,n,i,r,s,a,l)=>o.applySmartTreeLayout(e,t,n,i,r,s,a,l),t,n,i,r,s)}}(f||(f={})),function(e){e.apply=function(e,t,n,i,r,s,a,l,u,c,h,y){return d((t,n,i,a,l,d,m)=>{if(r.length!==t)return{value:1};if(s.length!==t)return{value:1};if(u.length!==l)return{value:1};if(c.length!==l)return{value:1};const f=Float64Array.BYTES_PER_ELEMENT,g=16,b=o._malloc(g+t*f),w=o._malloc(g+t*f),_=o._malloc(g+l*f),M=o._malloc(g+l*f),I=b+g-b%g,T=w+g-w%g,C=_+g-_%g,v=M+g-M%g;try{return o.HEAPF64.subarray(I>>3,(I>>3)+t).set(r),o.HEAPF64.subarray(T>>3,(T>>3)+t).set(s),o.HEAPF64.subarray(C>>3,(C>>3)+l).set(u),o.HEAPF64.subarray(v>>3,(v>>3)+l).set(c),o.applyChronologicalLayout(e,t,n,i,a,I,T,l,d,m,C,v,h,p(y))}finally{o._free(b),o._free(w),o._free(_),o._free(M)}},t,n,i,a,l)}}(g||(g={}))},15375:(e,t,n)=>{n.d(t,{BL:()=>l,Cz:()=>r,KQ:()=>o,M1:()=>a,T1:()=>s,dr:()=>i});const i="ESRI__ID",r="ESRI__OriginID",o="ESRI__DestID",s="ESRI__LayoutGeometry",a="ESRI__AggregationCount",l="LC.ESRI__IsSpatial"},23150:(e,t,n)=>{n.d(t,{A:()=>a});var i=n(31635),r=n(91429),o=n(82799),s=n(54238);let a=class extends s.A{constructor(e){super(e),this.originId=null,this.destinationId=null,this.layoutGeometry=null}};(0,i.Cg)([(0,r.MZ)({type:String,json:{write:!0}})],a.prototype,"originId",void 0),(0,i.Cg)([(0,r.MZ)({type:String,json:{write:!0}})],a.prototype,"destinationId",void 0),(0,i.Cg)([(0,r.MZ)({type:o.A,json:{write:!0}})],a.prototype,"layoutGeometry",void 0),a=(0,i.Cg)([(0,r.$K)("esri.rest.knowledgeGraph.Relationship")],a)},24137:(e,t,n)=>{n.d(t,{P:()=>I});var i=n(31635),r=n(69622),o=n(49186),s=n(53966),a=n(91869),l=n(74887),p=n(39516),d=n(91429),u=n(5443),c=n(39829),h=n(91218),y=n(21325),m=n(15375);const f=(e,t)=>{if("column-reference"===e.type)return e.column===t.systemOidFieldName?"ID(n)":`n.${e.column}`;if("string"===e.type)return`'${e.value}'`;if("number"===e.type)return`${e.value}`;if("binary-expression"===e.type&&t.supportedSqlTypes.has(e.left.type)&&t.supportedSqlTypes.has(e.right.type)&&t.supportedSqlOperators.has(e.operator))return`${f(e.left,t)} ${e.operator} ${f(e.right,t)}`;if("binary-expression"===e.type&&"LIKE"===e.operator){let n="";if("function"===e.left.type&&"column-reference"===e.left.args.value[0].type)n+=`lower(n.${e.left.args.value[0].column})`;else{if("column-reference"!==e.left.type)return t.unsupportedOperationFound=!0,"";n+=`lower(n.${e.left.column})`}if(n+=" CONTAINS (","string"!==e.right.type)return t.unsupportedOperationFound=!0,"";{let t=e.right.value;t.startsWith("%")&&(t=t.slice(1)),t.endsWith("%")&&(t=t.slice(0,-1)),n+=`'${t.toLowerCase()}')`}return n}return t.unsupportedOperationFound=!0,""};var g=n(69860),b=n(30504),w=n(48441),_=n(42538),M=n(61956);let I=class extends r.A{constructor(e){super(e),this._processingCacheUpdatesLookup=new Map,this.knowledgeGraph=null,this.inclusionModeDefinition={generateAllSublayers:!0,namedTypeDefinitions:new Map},this.entityTypeNames=new Set,this.relationshipTypeNames=new Set,this.geographicLookup=new Map,this.sublayerCaches=new Map,this.nodeConnectionsLookup=new Map,this.relationshipConnectionsLookup=new Map,this.memberIdTypeLookup=new Map;const t=new Map;e.knowledgeGraph.dataModel.entityTypes?.forEach(n=>{n.name&&(t.set(n.name,"entity"),this._processingCacheUpdatesLookup.set(n.name,[]),e.inclusionModeDefinition&&!e.inclusionModeDefinition?.generateAllSublayers||this.entityTypeNames.add(n.name),n.properties?.forEach(e=>{e.geometryType&&"esriGeometryNull"!==e.geometryType&&this.geographicLookup.set(n.name,{name:e.name??"",geometryType:e.geometryType})}))}),e.knowledgeGraph.dataModel.relationshipTypes?.forEach(n=>{n.name&&(t.set(n.name,"relationship"),this._processingCacheUpdatesLookup.set(n.name,[]),e.inclusionModeDefinition&&!e.inclusionModeDefinition?.generateAllSublayers||this.relationshipTypeNames.add(n.name),n.properties?.forEach(e=>{e.geometryType&&"esriGeometryNull"!==e.geometryType&&this.geographicLookup.set(n.name,{name:e.name??"",geometryType:e.geometryType})}))}),e.inclusionModeDefinition?.namedTypeDefinitions.forEach((n,i)=>{if("entity"===t.get(i))this.entityTypeNames.add(i);else{if("relationship"!==t.get(i))return s.A.getLogger(this).warn(`A named type, ${i}, was in the inclusion list that wasn't in the data model and will be removed`),void e.inclusionModeDefinition?.namedTypeDefinitions.delete(i);this.relationshipTypeNames.add(i)}const r=new Map;n.members?.forEach(e=>{(0,a.tE)(this.memberIdTypeLookup,e.id,()=>new Set).add(i)}),this.sublayerCaches.set(i,r)})}addToLayer(e){e.forEach(({typeName:e,id:t})=>{if(!this.inclusionModeDefinition)throw new o.A("knowledge-graph:layer-data-manager","You cannot add to a layer's exclusion list if it was not created with an exclusion list originally");if(this.inclusionModeDefinition.namedTypeDefinitions.has(e)){if(this.inclusionModeDefinition.namedTypeDefinitions.has(e)){const n=this.inclusionModeDefinition.namedTypeDefinitions.get(e);n.members||(n.members=new Map),n.members.set(t,{id:t}),(0,a.tE)(this.memberIdTypeLookup,t,()=>new Set).add(e)}}else{const n=new Map;n.set(t,{id:t}),this.inclusionModeDefinition.namedTypeDefinitions.set(e,{useAllData:!1,members:n}),(0,a.tE)(this.memberIdTypeLookup,t,()=>new Set).add(e)}})}getById(e){return g.A.getInstance().readFromStoreById(e)}async getData(e,t,n){if(t.objectType.name&&this.inclusionModeDefinition?.namedTypeDefinitions&&this.inclusionModeDefinition.namedTypeDefinitions.size>0&&!this.inclusionModeDefinition.namedTypeDefinitions.has(t.objectType.name))return[];let i;if(i=e||new M.A({where:"1=1",outFields:["*"]}),"link-chart"===t.parentCompositeLayer.type){const e=t.parentCompositeLayer,n=this._processingCacheUpdatesLookup.get(t.objectType.name??""),r=i.outFields;r&&1===r.length&&r[0]===m.dr&&"1=1"===i.where||await Promise.all(n??[]);const o=this.sublayerCaches.has(t.objectType.name??"")?Array.from(this.sublayerCaches.get(t.objectType.name)?.values()):[],s=[];return o.forEach(n=>{if(this.relationshipTypeNames.has(t.objectType.name)){n.geometry=e.relationshipLinkChartDiagramLookup.get(n.attributes[t.objectIdField]);const i=this.memberIdTypeLookup.get(n.attributes[m.Cz]),r=this.memberIdTypeLookup.get(n.attributes[m.KQ]),o=this._isEndEntitySpatial(i,n,m.Cz),s=this._isEndEntitySpatial(r,n,m.KQ);n.attributes[m.BL]=Number(o&&s)}else{n.geometry=e.entityLinkChartDiagramLookup.get(n.attributes[t.objectIdField]);const i=this.geographicLookup.get(t.objectType.name);i&&n.attributes[i.name]?n.attributes[m.BL]=1:n.attributes[m.BL]=0}n.attributes[m.T1]=n.geometry,s.push(n)}),s}return this.retrieveDataFromService(i,t,n)}async getConnectedRecordIds(e,t,n){const i=[];let r="";const o=this._getNamedTypeIdMapFromNodeIds(e);if(t&&0!==t?.length){for(const e of t)r=r+e+"|";r=r.slice(0,-1)}const s={},a=[];for(const[e,n]of o){const i=`${e}_ids`;s[i]=n,t&&0!==t?.length?a.push(`MATCH (n:${e}) WHERE id(n) IN $${i} WITH n MATCH (n)-[r:${r}]-(m) RETURN id(r), type(r), id(m), labels(m)[0]`):a.push(`MATCH (n:${e}) WHERE id(n) IN $${i} WITH n MATCH (n)-[r]-(m) RETURN id(r), type(r), id(m), labels(m)[0]`)}if(!a.length)return i;const l=a.join(" UNION "),p=(await(0,w.executeQueryStreaming)(this.knowledgeGraph,new _.A({openCypherQuery:l,bindParameters:s}),{signal:n?.signal})).resultRowsStream.getReader();for(;;){const{done:e,value:t}=await p.read();if(e)break;for(let e=0;e<t.length;e++){const n=t[e];i.push({id:n[0],typeName:n[1]}),i.push({id:n[2],typeName:n[3]})}}return i}async getRelationshipsBetweenNodes(e,t,n){const i=this._getNamedTypeIdMapFromNodeIds(e);if(0===i.size)return[];const r={relationshipExclusionIds:t,possibleConnectionEntityIds:e},o=[];for(const[e,t]of i.entries()){const n=`${e}_ids`;r[n]=t,o.push(`MATCH (n:${e}) WHERE id(n) IN $${n} WITH n MATCH (n)-[r]->(m) WHERE id(m) IN $possibleConnectionEntityIds AND NOT id(r) IN $relationshipExclusionIds RETURN id(r), type(r)`)}const s=o.join(" UNION "),a=[],l=(await(0,w.executeQueryStreaming)(this.knowledgeGraph,new _.A({openCypherQuery:s,bindParameters:r}),{signal:n?.signal})).resultRowsStream.getReader();for(;;){const{done:e,value:t}=await l.read();if(e)break;for(let e=0;e<t.length;e++){const n=t[e];a.push({id:n[0],typeName:n[1]})}}return a}async getRelationshipsFromNodes(e,t,n,i){const r=this._getNamedTypeIdMapFromNodeIds(e);if(0===r.size||0===t.length)return[];const o={relationshipExclusionIds:n,possibleConnectionEntityIds:t},s=[];for(const[e,t]of r.entries()){const n=`${e}_ids`;o[n]=t,s.push(`MATCH (n:${e}) WHERE id(n) IN $${n} WITH n MATCH (n)-[r]-(m) WHERE id(m) IN $possibleConnectionEntityIds AND NOT id(r) IN $relationshipExclusionIds RETURN id(r), type(r)`)}const a=s.join(" UNION "),l=new Map,p=(await(0,w.executeQueryStreaming)(this.knowledgeGraph,new _.A({openCypherQuery:a,bindParameters:o}),{signal:i?.signal})).resultRowsStream.getReader();for(;;){const{done:e,value:t}=await p.read();if(e)break;for(let e=0;e<t.length;e++){const n=t[e];let i=l.get(n[1]);i||(i=new Set,l.set(n[1],i)),i.add(n[0])}}const d=[];for(const[e,t]of l)for(const n of t)d.push({id:n,typeName:e});return d}async refreshCacheContent(e,t,n,i=!0,r){const s=g.A.getInstance(),p=[],d=new Map,u=new Map;this.knowledgeGraph.dataModel.entityTypes?.forEach(e=>{e.name&&u.set(e.name,e)}),this.knowledgeGraph.dataModel.relationshipTypes?.forEach(e=>{e.name&&u.set(e.name,e)}),e||this.inclusionModeDefinition?e?e.forEach(e=>{if(this.memberIdTypeLookup.has(e))for(const t of this.memberIdTypeLookup.get(e))d.has(t)?d.get(t)?.push(e):d.set(t,[e])}):this.inclusionModeDefinition?.namedTypeDefinitions?.forEach((e,t)=>{e.useAllData?d.set(t,null):e.members&&e.members.forEach(e=>{d.has(t)&&null!==d.get(t)?d.get(t)?.push(e.id):d.set(t,[e.id])})}):(this.knowledgeGraph.dataModel.entityTypes?.forEach(e=>{e.name&&d.set(e.name,null)}),this.knowledgeGraph.dataModel.entityTypes?.forEach(e=>{e.name&&d.set(e.name,null)}));for(const[e,l]of d){const d=new Set(l),c=new Promise((p,c)=>{(async()=>{const p=new Set,c=[];let h,y="",f=!1;if(t||u.get(e)?.properties?.forEach(e=>{e.name&&p.add(e.name)}),n&&this.geographicLookup.has(e)){const t=this.geographicLookup.get(e)?.name;t&&p.add(t)}if(this.entityTypeNames.has(e))y=`MATCH (n:${e}) ${l?"WHERE id(n) IN $ids ":""}return ID(n)`,p.forEach(e=>{y+=`, n.${e}`,c.push(e)});else{if(!this.relationshipTypeNames.has(e))throw new o.A("knowledge-graph:layer-data-manager",`The graph type of ${e} could not be determined. Was this type set in the KG data model and inclusion definition?`);f=!0,y=`MATCH ()-[n:${e}]->() ${l?"WHERE id(n) IN $ids ":""}return ID(n), id(startNode(n)), id(endNode(n))`,p.forEach(e=>{y+=`, n.${e}`,c.push(e)})}h=new _.A(l?{openCypherQuery:y,bindParameters:{ids:l}}:{openCypherQuery:y});const g=(await(0,w.executeQueryStreaming)(this.knowledgeGraph,h,{signal:r?.signal})).resultRowsStream.getReader();for(;;){const{done:t,value:n}=await g.read();if(t)break;const r=[];for(let e=0;e<n.length;e++){const t=n[e];let i=0,o=0;const s={properties:{}};for(s.id=t[i],i++,o++,f&&(s.originId=t[i],i++,o++,s.destinationId=t[i],i++,o++,(0,a.tE)(this.nodeConnectionsLookup,s.originId,()=>new Set).add(s.id),(0,a.tE)(this.nodeConnectionsLookup,s.destinationId,()=>new Set).add(s.id),(0,a.tE)(this.relationshipConnectionsLookup,s.id,()=>[s.originId,s.destinationId]));i<t.length;i++)s.properties[c[i-o]]=t[i];d.delete(s.id),r.push(s)}const o=s.writeToStore(r,m.dr,this.geographicLookup.get(e)?.name);this.sublayerCaches.has(e)||this.sublayerCaches.set(e,new Map),i&&!this.inclusionModeDefinition?.namedTypeDefinitions.has(e)&&this.inclusionModeDefinition?.namedTypeDefinitions.set(e,{useAllData:!1,members:new Map}),i&&!this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members&&(this.inclusionModeDefinition.namedTypeDefinitions.get(e).members=new Map);const l=this.sublayerCaches.get(e);o.forEach(t=>{l?.set(t.attributes[m.dr],t),i&&!this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members.has(t.attributes[m.dr])&&(this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members.set(t.attributes[m.dr],{id:t.attributes[m.dr]}),(0,a.tE)(this.memberIdTypeLookup,t.attributes[m.dr],()=>new Set).add(e))})}const b=this.inclusionModeDefinition?.namedTypeDefinitions.get(e);if(b)for(const e of d)b.members?.delete(e)})().then(()=>{p(null)}).catch(e=>{"AbortError"===e.name?p(null):c(e)})});p.push(c),this._processingCacheUpdatesLookup.get(e)?.push(c)}if(await Promise.all(p),r?.signal?.aborted)throw(0,l.NK)()}removeFromLayer(e){const t=new Set,n=new Set(e.map(e=>e.id));for(const n of e)t.add(n.typeName),1===this.memberIdTypeLookup.get(n.id)?.size?this.memberIdTypeLookup.delete(n.id):this.memberIdTypeLookup.get(n.id)?.delete(n.typeName),this.inclusionModeDefinition?.namedTypeDefinitions.forEach((e,t)=>{t===n.typeName&&e.members?.has(n.id)&&e.members.delete(n.id)});t.forEach(e=>{this.sublayerCaches.get(e)?.forEach((t,i)=>{n.has(i)&&this.sublayerCaches.get(e)?.delete(i)})})}async retrieveDataFromService(e,t,n){const i=g.A.getInstance(),r=new Set,s=[];let a,l="",d=[];const M="relationship"===t.graphType,I=this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData,T=t.parentCompositeLayer.sublayerIdsCache.get(t.objectType.name);let C=!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&&(C=e.objectIds);else if(null!=e.objectIds&&C&&C.length>0){const t=e.objectIds;e.objectIds=C.filter(e=>t.includes(e))}else if(null!=e.objectIds)C=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=C}if(null!=e.outFields){const n=e.outFields;n.includes("*")?t.fields.forEach(e=>{r.add(e.name)}):n.forEach(e=>{e!==m.dr&&e!==t.geometryFieldName&&r.add(e)})}if(null!=e.geometry){const n=e.geometry;let i;const d=t.parentCompositeLayer.dataManager.knowledgeGraph.serviceDefinition,m=d?.spatialReference,f=d?.serviceCapabilities?.geometryCapabilities;let g=f?.geometryMaxBoundingRectangleSizeX,w=f?.geometryMaxBoundingRectangleSizeY;if("point"===n.type){let e=n;e.spatialReference?.isWGS84||(await(0,h.initializeProjection)(e.spatialReference,y.KK),e=(0,h.project)(e,y.KK)),i=new u.A({spatialReference:y.KK,xmin:e.x-1e-4,ymin:e.y-1e-4,xmax:e.x+1e-4,ymax:e.y+1e-4})}else n?.extent?.spatialReference&&!n.spatialReference?.isWGS84?(await(0,h.initializeProjection)(n.extent.spatialReference,y.KK),i=(0,h.project)(n.extent,y.KK)):i=n.extent;if(g&&w&&m){if(4326!==m.wkid){const e=new u.A({spatialReference:m,xmax:g,ymax:w}),t=(0,h.project)(e,y.KK);g=t.xmax,w=t.ymax}if(i.xmax-i.xmin>g)throw new o.A("knowledge-graph:layer-data-manager",`Extent x bounds should be within ${g}° latitude, limit exceeded`);if(i.ymax-i.ymin>w)throw new o.A("knowledge-graph:layer-data-manager",`Extent y bounds should be within ${w}° longitude, limit exceeded`)}if(null!=e.where&&"1=1"!==e.where){const n=await(0,p.GP)(e.where.toUpperCase(),t.fieldsIndex);t.fields.forEach(e=>{n.fieldNames.includes(e.name)&&r.add(e.name)})}l=M?`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&&r.add(t.geometryFieldName),r.forEach(e=>{l+=`, n.${e}`,s.push(e)}),a=new _.A({openCypherQuery:l,bindParameters:{param_filter_geom:new c.A({rings:(0,b.Wq)(i)})}})}else{let n="";if(null!=e.where&&"1=1"!==e.where){const i=await(0,p.GP)(e.where,t.fieldsIndex);t.fields.forEach(e=>{i.fieldNames.includes(e.name)&&r.add(e.name)});const o={systemOidFieldName:m.dr,supportedSqlTypes:new Set(["column-reference","string","number","binary-expression"]),supportedSqlOperators:new Set(["=","<","<=","<>",">",">=","AND","OR","LIKE"]),unsupportedOperationFound:!1};n=f(i.parseTree,o),o.unsupportedOperationFound&&(n="")}let i="";i=M?`Match ()-[n:${t.objectType.name}]->()`:`Match (n:${t.objectType.name})`;let o=!1;C&&(o=!0,i+=" WHERE ID(n) IN $ids"),n&&(i+=o?" AND":" WHERE",i+=` ${n}`),i+=" return ID(n)",M&&(i+=", id(startNode(n)), id(endNode(n))"),e.returnGeometry&&t.geometryFieldName&&r.add(t.geometryFieldName),r.forEach(e=>{i+=`, n.${e}`,s.push(e)}),a=new _.A(C?{openCypherQuery:i,bindParameters:{ids:C}}:{openCypherQuery:i})}const v=(await(0,w.executeQueryStreaming)(t.parentCompositeLayer.dataManager.knowledgeGraph,a,n)).resultRowsStream.getReader();for(;;){const{done:e,value:n}=await v.read();if(e)break;const r=[];for(let e=0;e<n.length;e++){const t=n[e];let i=0,o=0;const a={properties:{}};for(a.id=t[i],i++,o++,M&&(a.originId=t[i],i++,o++,a.destinationId=t[i],i++,o++);i<t.length;i++)a.properties[s[i-o]]=t[i];r.push(a)}d=d.concat(i.writeToStore(r,m.dr,t.parentCompositeLayer.dataManager.geographicLookup.get(t.objectType.name)?.name))}return d}_isEndEntitySpatial(e,t,n){for(const i of e??[])if(this.entityTypeNames.has(i)){const e=this.geographicLookup.get(i),r=e&&this.sublayerCaches.get(i)?.get(t.attributes[n]);if(e&&r?.attributes[e.name])return!0}return!1}_getNamedTypeIdMapFromNodeIds(e){const t=new Map;return e.forEach(e=>{if(this.memberIdTypeLookup.has(e))for(const n of this.memberIdTypeLookup.get(e)){if(!this.entityTypeNames.has(n))return;t.has(n)?t.get(n)?.push(e):t.set(n,[e])}}),t}};(0,i.Cg)([(0,d.MZ)()],I.prototype,"knowledgeGraph",void 0),(0,i.Cg)([(0,d.MZ)()],I.prototype,"inclusionModeDefinition",void 0),(0,i.Cg)([(0,d.MZ)()],I.prototype,"entityTypeNames",void 0),(0,i.Cg)([(0,d.MZ)()],I.prototype,"relationshipTypeNames",void 0),(0,i.Cg)([(0,d.MZ)()],I.prototype,"geographicLookup",void 0),(0,i.Cg)([(0,d.MZ)()],I.prototype,"sublayerCaches",void 0),(0,i.Cg)([(0,d.MZ)()],I.prototype,"nodeConnectionsLookup",void 0),(0,i.Cg)([(0,d.MZ)()],I.prototype,"relationshipConnectionsLookup",void 0),(0,i.Cg)([(0,d.MZ)()],I.prototype,"memberIdTypeLookup",void 0),I=(0,i.Cg)([(0,d.$K)("esri.layers.knowledgeGraph.KnowledgeGraphLayerDataManager")],I)},25927:(e,t,n)=>{n.d(t,{A:()=>a});var i=n(31635),r=n(91429),o=n(86738),s=n(54238);let a=class extends s.A{constructor(e){super(e),this.layoutGeometry=null}};(0,i.Cg)([(0,r.MZ)({type:o.A,json:{write:!0}})],a.prototype,"layoutGeometry",void 0),a=(0,i.Cg)([(0,r.$K)("esri.rest.knowledgeGraph.Entity")],a)},30504:(e,t,n)=>{n.d(t,{k5:()=>p,aq:()=>l,Wq:()=>d}),n(52106);var i=n(49186),r=(n(86738),n(39829),n(82799),n(94194),n(69860),n(8460),n(66552));(0,r.O)()({none:"none",startAndEnd:"start-and-end",startOnly:"start-only"}),(0,r.O)()({absoluteValue:"absolute-value",multiplier:"multiplier"});const o=new Map([["basic-grid","basic-grid"],["geographic-organic-standard","geographic-organic-standard"],["hierarchical-bottom-to-top","hierarchical-bottom-to-top"],["hierarchical-top-to-bottom","hierarchical-bottom-to-top"],["organic-community","organic-community"],["organic-fusiform","organic-standard"],["organic-leaf-circle","organic-standard"],["organic-standard","organic-standard"],["radial-node-centric","radial-root-centric"],["radial-root-centric","radial-root-centric"],["tree-bottom-to-top","tree-left-to-right"],["tree-left-to-right","tree-left-to-right"],["tree-right-to-left","tree-left-to-right"],["tree-top-to-bottom","tree-left-to-right"],["chronological-mono-timeline","chronological-mono-timeline"],["chronological-multi-timeline","chronological-multi-timeline"]]);var s=n(48441),a=n(42538);async function l(e,t,n){const i=[],r=function(e,t){const n=new Map;if(t.dataModel?.relationshipTypes)for(const e of t.dataModel.relationshipTypes)e.name&&n.set(e.name,[]);for(const t of e)n.has(t.typeName)&&n.get(t.typeName)?.push(t.id);return n}(e,t),o={},l=[];for(const[e,t]of r){if(t.length<1)continue;const n=`${e}_ids`;o[n]=t,l.push(`MATCH (n)-[r:${e}]->(m) WHERE id(r) in $${n} RETURN id(n), labels(n)[0], id(m), labels(m)[0]`)}if(0===l.length)return[];const p=l.join(" UNION "),d=new a.A({openCypherQuery:p,bindParameters:o}),u=(await(0,s.executeQueryStreaming)(t,d,n?.requestOptions)).resultRowsStream.getReader();for(;;){const{done:e,value:t}=await u.read();if(e)break;for(const e of t)i.push({id:e[0],typeName:e[1]}),i.push({id:e[2],typeName:e[3]})}return i}n(40863),n(94985),n(68249);const p=e=>o.get(e)??"radial-root-centric";function d(e){if(!e.spatialReference.isWGS84)throw new i.A("knowledge-graph:layer-support-utils","The utilsExtentToInBoundsRings function only supports WGS84 spatial references.");return e.clone().normalize().map(e=>[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]])}},37531:(e,t,n)=>{n.d(t,{dt:()=>c,GG:()=>g,UQ:()=>f,Sx:()=>d});var i=n(68197),r=n(60999),o=(n(44208),n(51850)),s=(n(76369),n(62046)),a=(n(2741),n(11254),n(66344));new Map([["dash",[4,3]],["dashdot",[4,3,1,3]],["dot",[1,3]],["longdash",[8,3]],["longdashdot",[8,3,1,3]],["longdashdotdot",[8,3,1,3,1,3]],["shortdash",[4,1]],["shortdashdot",[4,1,1,1]],["shortdashdotdot",[4,1,1,1,1,1]],["shortdot",[1,1]],["solid",[]]]),new a.q(1e3),new i.A([128,128,128]);var l=n(28975),p=n(33910);function d(e,t){if(!e)return null;let n=null;return(0,p.wk)(e)?n=function(e){const t=e.symbolLayers;if(!t)return null;let n=null;return t.forEach(e=>{"object"===e.type&&e.resource?.href||(n="water"===e.type?e.color:e.material?e.material.color:null)}),n?new i.A(n):null}(e):(0,p.$y)(e)&&(n="cim"===e.type?(0,s.Nk)(e):e.color?new i.A(e.color):null),n?u(n,t):null}function u(e,t){if(null==t||null==e)return e;const n=e.toRgba();return n[3]=n[3]*t,new i.A(n)}function c(e,t,n){e&&(t||null!=n)&&(t&&(t=new i.A(t)),(0,p.wk)(e)?function(e,t,n){const r=e.symbolLayers;if(!r)return;const o=(e,r=!1)=>{let o=t??e??null;return null!=n?.override&&(!o&&r&&(o=new i.A([255,255,255])),o&&(o.a=n.override)),u(o,n?.add)};r.forEach(e=>{if("water"===e.type)return void(e.color=u(e.color,n?.add));const t=null!=e.material?e.material.color:null,i=o(t,"icon"===e.type&&null!=e.resource?.href);null==e.material?e.material=new l.N({color:i}):e.material.color=i,"outline"in e&&e.outline?.color&&null!=n?.add&&(e.outline.color=u(e.outline.color,n.add)),"marker"in e&&null!=e.marker&&(e.marker.color=o(e.marker.color))})}(e,t,n):(0,p.$y)(e)&&function(e,t,n){t=t??e.color,null!=n?.override&&t&&(t.a=n.override),t&&(e.color=u(t,n?.add)),"outline"in e&&e.outline?.color&&(e.outline.color=u(e.outline.color,n?.add))}(e,t,n))}function h(e){for(const t of e)if("number"==typeof t)return t;return null}function y(e,t,n){for(let i=0;i<3;i++){const r=e[i];switch(r){case"symbol-value":{const e=n[i];return null!=e?e/t[i]:1}case"proportional":break;default:if(r&&t[i])return r/t[i]}}return null}function m(e,t,n,i){switch(e){case"proportional":return n*i;case"symbol-value":return null!=t?t:n;default:return e}}async function f(e,t){if(e&&t)return(0,p.wk)(e)?async function(e,t){const i=e.symbolLayers;i&&await(0,r.jJ)(i,async e=>async function(e,t){switch(e.type){case"extrude":!function(e,t){const n=t[2];"number"==typeof n&&(e.size=n)}(e,t);break;case"icon":case"line":case"text":!function(e,t){const n=h(t);null!=n&&(e.size=n)}(e,t);break;case"path":!function(e,t){const n=y(t,o.Un,[e.width,void 0,e.height]);null!=n&&(e.width=m(t[0],e.width,1,n),e.height=m(t[2],e.height,1,n))}(e,t);break;case"object":await async function(e,t){const{resourceSize:i,symbolSize:r}=await async function(e){const{computeObjectLayerResourceSize:t}=await n.e(5404).then(n.bind(n,95404)),i=await t(e,10),{width:r,height:o,depth:s}=e,a=[r,s,o];let l=1;for(let e=0;e<3;e++){const t=a[e];if(null!=t){l=t/i[e];break}}for(let e=0;e<3;e++)null==a[e]&&(a[e]=i[e]*l);return{resourceSize:i,symbolSize:a}}(e),o=y(t,i,r);null!=o&&(e.width=m(t[0],r[0],i[0],o),e.depth=m(t[1],r[1],i[1],o),e.height=m(t[2],r[2],i[2],o))}(e,t)}}(e,t))}(e,t):void((0,p.$y)(e)&&function(e,t){const n=h(t);if(null!=n)switch(e.type){case"simple-marker":e.size=n;break;case"picture-marker":{const t=e.width/e.height;t>1?(e.width=n,e.height=n*t):(e.width=n*t,e.height=n);break}case"simple-line":e.width=n;break;case"text":e.font.size=n}}(e,t))}function g(e,t,n){if(e&&null!=t)if((0,p.wk)(e)){const i=e.symbolLayers;i&&i.forEach(e=>{if("object"===e.type)switch(n){case"tilt":e.tilt=(e.tilt??0)+t;break;case"roll":e.roll=(e.roll??0)+t;break;default:e.heading=(e.heading??0)+t}"icon"===e.type&&(e.angle+=t)})}else if((0,p.$y)(e))switch(e.type){case"simple-marker":case"picture-marker":case"text":e.angle+=t;break;case"cim":(0,s.KU)(e,t,!0)}}},37730:(e,t,n)=>{n.d(t,{T:()=>r});var i=n(43334);const r={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t)=>new i.Om(t,e.attributes,null,e.objectId),getGeometry:e=>e.geometry,getCentroid:(e,t)=>e.ensureCentroid(t)}},40662:(e,t,n)=>{n.d(t,{A:()=>s});var i=n(31635),r=n(91429),o=n(77901);let s=class extends o.A{constructor(e){super(e)}};s=(0,i.Cg)([(0,r.$K)("esri.rest.knowledgeGraph.ObjectValue")],s)},42095:(e,t,n)=>{n.d(t,{A:()=>a});var i=n(31635),r=n(25482),o=n(91429),s=n(77901);let a=class extends r.o{constructor(e){super(e),this.path=[]}};(0,i.Cg)([(0,o.MZ)({type:[s.A],json:{write:!0}})],a.prototype,"path",void 0),a=(0,i.Cg)([(0,o.$K)("esri.rest.knowledgeGraph.Path")],a)},42538:(e,t,n)=>{n.d(t,{A:()=>l});var i=n(31635),r=n(91429),o=n(16930),s=n(69622);let a=class extends s.A{constructor(e){super(e),this.openCypherQuery=""}};(0,i.Cg)([(0,r.MZ)()],a.prototype,"openCypherQuery",void 0),a=(0,i.Cg)([(0,r.$K)("esri.rest.knowledgeGraph.GraphQuery")],a);let l=class extends a{constructor(e){super(e),this.bindParameters=null,this.bindGeometryQuantizationParameters=null,this.outputQuantizationParameters=null,this.outputSpatialReference=null,this.provenanceBehavior=null}};(0,i.Cg)([(0,r.MZ)()],l.prototype,"bindParameters",void 0),(0,i.Cg)([(0,r.MZ)()],l.prototype,"bindGeometryQuantizationParameters",void 0),(0,i.Cg)([(0,r.MZ)()],l.prototype,"outputQuantizationParameters",void 0),(0,i.Cg)([(0,r.MZ)({type:o.A})],l.prototype,"outputSpatialReference",void 0),(0,i.Cg)([(0,r.MZ)()],l.prototype,"provenanceBehavior",void 0),l=(0,i.Cg)([(0,r.$K)("esri.rest.knowledgeGraph.GraphQueryStreaming")],l)},54238:(e,t,n)=>{n.d(t,{A:()=>s});var i=n(31635),r=n(91429),o=n(77901);let s=class extends o.A{constructor(e){super(e),this.typeName=null,this.id=null}};(0,i.Cg)([(0,r.MZ)({type:String,json:{write:!0}})],s.prototype,"typeName",void 0),(0,i.Cg)([(0,r.MZ)({type:String,json:{write:!0}})],s.prototype,"id",void 0),s=(0,i.Cg)([(0,r.$K)("esri.rest.knowledgeGraph.GraphNamedObject")],s)},54898:(e,t,n)=>{n.d(t,{Gz:()=>$,O9:()=>G,hZ:()=>P,CP:()=>q,dD:()=>Z,UT:()=>R,MY:()=>F,Td:()=>D,iW:()=>j,e$:()=>B,qN:()=>k});var i=n(68197),r=n(49186),o=n(91869),s=(n(85105),n(58769));n(39410),n(33421),n(21774),n(93885);const a=s.A;var l=n(965),p=n(91218),d=n(16930),u=n(17136),c=n(99352),h=n(15375),y=n(29005),m=n(46499),f=n(73913),g=n(77548),b=n(48441),w=n(25927),_=n(31635),M=n(69622),I=n(91429);let T=class extends M.A{constructor(e){super(e),this.entityAdds=void 0,this.entityUpdates=void 0,this.entityDeletes=void 0,this.relationshipAdds=void 0,this.relationshipUpdates=void 0,this.relationshipDeletes=void 0,this.options=void 0}};(0,_.Cg)([(0,I.MZ)()],T.prototype,"entityAdds",void 0),(0,_.Cg)([(0,I.MZ)()],T.prototype,"entityUpdates",void 0),(0,_.Cg)([(0,I.MZ)()],T.prototype,"entityDeletes",void 0),(0,_.Cg)([(0,I.MZ)()],T.prototype,"relationshipAdds",void 0),(0,_.Cg)([(0,I.MZ)()],T.prototype,"relationshipUpdates",void 0),(0,_.Cg)([(0,I.MZ)()],T.prototype,"relationshipDeletes",void 0),(0,_.Cg)([(0,I.MZ)()],T.prototype,"options",void 0),T=(0,_.Cg)([(0,I.$K)("esri.rest.knowledgeGraph.GraphApplyEdits")],T);var C=n(23150),v=n(54218),A=n(40863),x=n(68249);const E={initializeLayersFromClientData:async(e,t,n)=>{if(t||(t=[...e.layers,...e.tables].map(e=>e.graphTypeName)),0===t?.length)return;const i=new Map;for(const n of t)i.set(n,S(e,n));const r=await(0,b.fetchClientDataAtKeys)(e.dataManager.knowledgeGraph,Array.from(i.values()),{requestOptions:{signal:n?.signal}});for(const t of[...e.layers,...e.tables]){const n=t.objectType.name;if(null==n)continue;const i=r.get(S(e,n));if(i){const e=JSON.parse(i);null===e||"object"!=typeof e||e.hasOwnProperty("showLabels")||(e.showLabels=!1),t.read(e,{origin:"service"})}}},getInclusionDefinitionFromCypherResults:async(e,t,n)=>{const i=U(e.dataModel),r=(await(0,b.executeQueryStreaming)(e,t,n)).resultRowsStream.getReader();for(;;){const{done:e,value:t}=await r.read();if(e)break;for(const e of t)for(const t of e)z(t,i)}return i},getInclusionDefinitionFromIdTypePairs:(e,t)=>{const n=U(e.dataModel);for(const{id:e,typeName:i}of t){const t=n.namedTypeDefinitions.get(i);if(!t)throw new r.A("WebLinkChart:data-model-desync","The provided id-type pairs contained a named type not reflected in the provided knowledge graph data model.");t.members?.set(e,{id:e})}return n}},S=(e,t)=>"knowledge-graph"===e.type?`${t}/Map`:`${t}/LinkChart/LinkChartSubLayer`;async function k(e,t,n){return E.initializeLayersFromClientData(e,t,n)}const N=["#4a0932","#b31515","#18382e","#a64f1b","#102432","#8c213f","#ed9310","#2c6954","#144d59","#ffc730","#75351e","#454f4b","#78b1c2","#191921","#8f8f82","#9be0c0","#dbb658","#87b051","#11495c","#c43541","#9c5596","#44498b","#ad9d63","#86afb3","#5c98ca","#b0bfa2","#73241f","#b86b53","#d9d78c","#3e756d","#f260a1","#a0d17d","#c27c30","#eb82eb","#ffdf3c","#ffb259","#ab52b3","#3cccb4","#0095ba","#d92b30"],L="#8f8f82";function D(e){return e<0||e>=N.length?new i.A(L):new i.A(N[e])}function R(e){const t=e.toArray();return new A.A({data:{type:"CIMSymbolReference",symbol:{type:"CIMLineSymbol",symbolLayers:[{type:"CIMSolidStroke",enable:!0,style:"solid",width:.75,color:t},{type:"CIMVectorMarker",enable:!0,size:6,markerPlacement:{type:"CIMMarkerPlacementOnLine",angleToLine:!0,relativeTo:"LineMiddle"},frame:{xmin:-10,ymin:-5,xmax:0,ymax:5},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{rings:[[[-12,-3.47],[-12,3.6],[1.96,-.03],[-12,-3.47]]]},symbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:t}]}}]}]}}})}function F(e){let t="ESRI__ID",n=4;for(const i of e)if(i.name){if("name"===i.name.toLowerCase()){t=i.name;break}i.name.toLowerCase().includes("name")?(t=i.name,n=2):"esriFieldTypeString"===i.fieldType&&n>3&&(t=i.name,n=3)}return t}function j(e,t,n){const i={color:[80,80,80],haloColor:[255,255,255],haloSize:.7,font:{size:10,weight:"normal"}},r=new m.A({labelExpressionInfo:new f.A({expression:"ESRI__ID"===n?`${t}`:`$feature.${n}`}),labelPlacement:"above-center",symbol:new x.A(i)}),o=new m.A({labelExpressionInfo:new f.A({expression:`'${t}' + IIf($feature.ESRI__AggregationCount>1, ' (' + $feature.ESRI__AggregationCount + ')', '')`}),labelPlacement:"center-along",labelPosition:"parallel",repeatLabel:!1,symbol:new x.A({...i,yoffset:"12px"})});return"entity"===e?[r]:[o]}function B(e,t,n){const i={color:[255,255,255],haloColor:[0,0,0],haloSize:.7,font:{size:10,weight:"bold"}},r="ESRI__ID"===n?`${e}`:`$feature.${n}`;return"point"===t?[new m.A({labelExpressionInfo:new f.A({expression:r}),labelPlacement:"above-center",symbol:new x.A(i)})]:"polyline"===t?[new m.A({labelExpressionInfo:new f.A({expression:r}),labelPlacement:"center-along",repeatLabel:!0,symbol:new x.A(i)})]:"polygon"===t?[new m.A({labelExpressionInfo:new f.A({expression:r}),labelPlacement:"always-horizontal",symbol:new x.A(i)})]:null}const O={capabilities:[],allowGeometryUpdates:!1,serviceCapabilities:{geometryCapabilities:{supportsZValues:!1,supportsMValues:!1}}};function P(e){const{capabilities:t,allowGeometryUpdates:n,serviceCapabilities:{geometryCapabilities:{supportsZValues:i,supportsMValues:r}}}=e?.serviceDefinition||O,o=e?.dataModel.arcgisManaged?t:t.filter(e=>"Query"===e),s=new Set(o);return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:r,supportsZ:i},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:s.has("Create"),supportsDelete:s.has("Delete"),supportsEditing:s.has("Editing"),supportsChangeTracking:!1,supportsQuery:s.has("Query"),supportsQueryBins:!1,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:s.has("Update"),supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},query:c.F,queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:c.P,editing:{supportsGeometryUpdate:!!e?.dataModel.arcgisManaged&&n,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:s.has("Delete"),supportsUpdateByAnonymous:!1,supportsUpdateByOthers:s.has("Update"),supportsAsyncApplyEdits:!1,zDefault:void 0}}}async function G(e,t){const n=new T,i=t.graphTypeName,r=t.graphType,s="knowledge-graph"===t.parentCompositeLayer.type?t.geometryFieldName:null,a=!!t.fieldsIndex.get(s)?.editable,l=e=>{const n={...e};for(const e of t.fields)e.editable||delete n[e.name];for(const t of Object.keys(e))t.includes("ESRI__")&&delete n[t];return n},c=async e=>{await(0,p.initializeProjection)(e.spatialReference,d.A.WGS84);const t=(0,p.project)(e,d.A.WGS84);return"point"===t.type?t.normalize():(await(0,u.el)(t))[0]};for(const t of e.addFeatures??[]){const e=l(t.attributes);(0,g.UC)(t.sourceLayer)&&t.sourceLayer.graphTypeName===i&&("entity"===r?(n.entityAdds||(n.entityAdds=[]),s&&t.geometry&&(e[s]=await c(t.geometry)),n.entityAdds.push(new w.A({properties:e,typeName:i}))):(n.relationshipAdds||(n.relationshipAdds=[]),n.relationshipAdds.push(new C.A({properties:e,typeName:i}))))}for(const t of e.updateFeatures??[]){const e=t.attributes[h.dr],o=l(t.attributes);(0,g.UC)(t.sourceLayer)&&t.sourceLayer.graphTypeName===i&&("entity"===r?(n.entityUpdates||(n.entityUpdates=[]),s&&a&&t.geometry&&(o[s]=await c(t.geometry)),n.entityUpdates.push(new w.A({id:e,properties:o,typeName:i}))):(n.relationshipUpdates||(n.relationshipUpdates=[]),n.relationshipUpdates.push(new C.A({id:e,properties:o,typeName:i}))))}const y=new Map;for(const t of e.deleteFeatures??[])if((0,v.DU)(t)){const e=t,n=(0,o.tE)(y,e.sourceLayer.graphTypeName,()=>({typeName:e.sourceLayer.graphTypeName,ids:[]}));e.sourceLayer.graphTypeName===i&&n.ids.push(e.attributes[h.dr])}else t.objectId&&"string"==typeof t.objectId&&(0,o.tE)(y,i,()=>({typeName:i,ids:[]})).ids.push(t.objectId);for(const e of y.values())e.ids.length>0&&("entity"===r?(n.entityDeletes||(n.entityDeletes=[]),n.entityDeletes.push({typeName:e.typeName,ids:e.ids})):(n.relationshipDeletes||(n.relationshipDeletes=[]),n.relationshipDeletes.push({typeName:e.typeName,ids:e.ids})));return n}function $(e,t){const n={addFeatureResults:[],updateFeatureResults:[],deleteFeatureResults:[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]};for(const i of e.editResults)if(i.typeName===t){for(const e of i.adds)n.addFeatureResults.push({objectId:e.id,globalId:e.id});for(const e of i.updates)n.updateFeatureResults.push({objectId:e.id,globalId:e.id});for(const e of i.deletes)n.deleteFeatureResults.push({objectId:e.id,globalId:e.id})}return n}function Z(e){if(!e.objectType)return null;const t=[];for(const n of e.fields)!n.name.includes("ESRI__")&&n.editable&&"geometry"!==n.type&&t.push(new a({fieldName:n.name}));return new l.A({elements:t})}function q(e){if(!e.objectType)return null;let t=null;switch(e.geometryType){case"point":case"multipoint":t="point";break;case"polyline":t="line";break;case"polygon":t="polygon";break;default:t=null}return[new y.A({name:e.graphTypeName,drawingTool:t,prototype:{}})]}function U(e){const t={namedTypeDefinitions:new Map,generateAllSublayers:!1},{entityTypes:n,relationshipTypes:i}=e,r=[...n,...i];for(const e of r)t.namedTypeDefinitions.set(e.name,{useAllData:!1,members:new Map});return t}function z(e,t){if(e&&"object"==typeof e)if(function(e){return!(!e||"object"!=typeof e||Array.isArray(e))&&"id"in e&&"typeName"in e}(e)){const n=t.namedTypeDefinitions.get(e.typeName);if(!n)throw new r.A("WebLinkChart:data-model-desync","The query result contained a named type not reflected in the provided knowledge graph data model.");n.members.set(e.id,{id:e.id})}else if(function(e){return!(!e||"object"!=typeof e||Array.isArray(e))&&e&&"path"in e&&Array.isArray(e.path)}(e))for(const n of e.path)z(n,t);else if(Array.isArray(e))for(const n of e)z(n,t);else if(function(e){return!(!e||"object"!=typeof e||Array.isArray(e)||"id"in e)&&"properties"in e&&"object"==typeof e.properties}(e))for(const n of Object.values(e.properties??{}))z(n,t)}},62046:(e,t,n)=>{n.d(t,{Fe:()=>d,KU:()=>y,Nk:()=>o});var i=n(68197),r=n(93397);function o(e){const t=[];return s((0,r.lW)(e),t),t.length?new i.A((0,r.e6)(t[0])):null}function s(e,t){if(!e)return;let n;n="CIMTextSymbol"===e.type?e.symbol:e;const i="CIMPolygonSymbol"===e.type;if(n?.symbolLayers)for(const e of n.symbolLayers)if(!(e.colorLocked||i&&((0,r.mA)(e)||(0,r.MM)(e)&&e.markerPlacement&&(0,r.zr)(e.markerPlacement))))switch(e.type){case"CIMPictureMarker":case"CIMPictureStroke":case"CIMPictureFill":e.tintColor&&a(t,e.tintColor);break;case"CIMVectorMarker":e.markerGraphics?.forEach(e=>{s(e.symbol,t)});break;case"CIMSolidStroke":case"CIMSolidFill":a(t,e.color);break;case"CIMGradientFill":l(t,e);break;case"CIMHatchFill":s(e.lineSymbol,t)}}function a(e,t){for(const n of e)if(n.join(".")===t.join("."))return;e.push(t)}function l(e,t){const n=t.colorRamp?.type;switch(n){case"CIMMultipartColorRamp":t.colorRamp.colorRamps?.forEach(t=>{"CIMLinearContinuousColorRamp"===t.type&&p(e,t)});break;case"CIMLinearContinuousColorRamp":case"CIMPolarContinuousColorRamp":p(e,t.colorRamp)}}function p(e,t){t&&(t.fromColor&&a(e,t.fromColor),t.toColor&&a(e,t.toColor))}function d(e,t,n){t instanceof i.A||(t=new i.A(t));const o=(0,r.lW)(e);o&&u(o,t,n)}function u(e,t,n){if(!e)return;let i;i="CIMTextSymbol"===e.type?e.symbol:e;const o="CIMPolygonSymbol"===i?.type;if(i?.symbolLayers)for(const e of i.symbolLayers){if(e.colorLocked)continue;if(o)if(n){const{layersToColor:t}=n;if(((0,r.mA)(e)||(0,r.MM)(e)&&e.markerPlacement&&(0,r.zr)(e.markerPlacement))&&"fill"===t||(0,r.jn)(e)&&"outline"===t)continue}else if((0,r.mA)(e)||(0,r.MM)(e)&&e.markerPlacement&&(0,r.zr)(e.markerPlacement))continue;const i=t.toArray();switch(e.type){case"CIMPictureMarker":case"CIMPictureStroke":case"CIMPictureFill":e.tintColor=i;break;case"CIMVectorMarker":e.markerGraphics?.forEach(e=>{u(e.symbol,t,n)});break;case"CIMSolidStroke":case"CIMSolidFill":e.color=i;break;case"CIMGradientFill":c(e,t);break;case"CIMHatchFill":u(e.lineSymbol,t,n)}}}function c(e,t){const n=e.colorRamp?.type;switch(n){case"CIMMultipartColorRamp":e.colorRamp.colorRamps?.forEach(e=>{"CIMLinearContinuousColorRamp"===e.type&&h(e,t)});break;case"CIMLinearContinuousColorRamp":case"CIMPolarContinuousColorRamp":h(e.colorRamp,t)}}function h(e,t){if(e&&(e.fromColor&&(e.fromColor=t.toArray()),e.toColor)){const n=t.clone();n.a=0,e.toColor=n.toArray()}}function y(e,t,n=!1){const i=(0,r.lW)(e);if(n&&(t=360-t),"CIMTextSymbol"!==i?.type){if("CIMPointSymbol"===i?.type&&i.symbolLayers){const e=t-(i.angle||0);for(const t of i.symbolLayers)if((0,r.MM)(t)){let n=t.rotation||0;t.rotateClockwise?n-=e:n+=e,t.rotation=n}i.angle=t}}else i.angle=t}},62796:(e,t,n)=>{n.d(t,{A:()=>ce});var i=n(31635),r=n(37838),o=n(49186),s=n(4718),a=n(53966),l=n(25728),p=n(91429),d=(n(29953),n(5443)),u=n(86738),c=n(39829),h=n(82799),y=n(91218),m=n(16930),f=n(21325),g=n(50498),b=n(55156),w=n(60950),_=n(89808),M=n(99959);const I=Symbol("isKnowledgeGraphGraphicOriginSymbol");var T;class C extends M.A{get[(T=I,w.ym)](){return this.sublayer}get[b.e](){return this.sublayer}get[_.Q](){return this.sublayer}constructor(e,t){super(),this[T]=!0,this.type="knowledge-graph",this.layer=e,this.sublayer=t}get id(){return this.layer.id}}const v=Symbol("isLinkChartGraphicOriginSymbol");var A;class x extends M.A{get[(A=v,_.Q)](){return this.layer}constructor(e,t){super(),this[A]=!0,this.type="link-chart",this.layer=e,this.sublayer=t}get id(){return`${this.layer.id}:__${this.sublayer.id}__`}}var E=n(4146),S=n(83221),k=n(56390),N=n(64714),L=n(15375);const D=(0,n(17036).p)(),R=e=>{const t=e;let n=class extends t{constructor(){super(...arguments),this.fields=[],this.fieldsIndex=null}};return(0,i.Cg)([(0,p.MZ)(D.fields)],n.prototype,"fields",void 0),(0,i.Cg)([(0,p.MZ)(D.fieldsIndex)],n.prototype,"fieldsIndex",void 0),n=(0,i.Cg)([(0,p.$K)("esri.layers.knowledgeGraph.KnowledgeGraphSublayerBase")],n),n};var F=n(54898),j=n(63074),B=n(6455),O=n(87718),P=n(56658),G=n(32756),$=n(54310),Z=n(25036),q=n(82935),U=n(10873),z=n(13213),Q=n(20437),Y=n(30524),H=n(46499),W=n(39383),K=n(96184),X=n(96576),V=n(65494),J=n(41214),ee=n(48441),te=n(22671),ne=n(61956),ie=n(30291),re=n(37531),oe=n(61322),se=n(43937);function ae(e){if(!e.json)return e;e.json.write=le(e.json.write);const t=e.json.origins;if(!t)return e;let n;for(n in t){const e=t[n];e&&(e.write=le(e.write))}return e}function le(e){return"object"==typeof e&&e?(!1!==e.enabled&&(e.overridePolicy=function(e){const{target:t,writer:n,overridePolicy:i,...r}=e;return function(e,t){const n=de.call(this,e,t);return n.enabled?{...r,...n}:n}}(e)),e):!0===e?pe():e}function pe(){return{overridePolicy:de}}function de(e,t){const n=!!this.geometryType;let i={enabled:n};return n&&(i={...i,...ue.call(this,e,t)}),i}function ue(e,t){return{ignoreOrigin:this.originIdOf(t)>0}}let ce=class extends(R((0,B.FJ)((0,P.J)((0,O.F)((0,j.dM)((0,G.fY)((0,q.e)((0,Z.j)((0,$.J)((0,l.P)(E.A))))))))))){constructor(e){super(e),this.blendMode="normal",this.charts=null,this.definitionExpression=null,this.displayFilterEnabled=!0,this.displayFilterInfo=null,this.effect=null,this.elevationInfo=null,this.featureEffect=null,this.graphType=null,this.labelsVisible=!0,this.layerType=null,this.legendEnabled=!0,this.maxScale=0,this.minScale=0,this.objectIdField=L.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 oe.default(e.port1,{channel:e,client:{queryFeatures:(e,t={})=>{const n=ne.A.fromJSON(e);return this.queryFeaturesJSON(n,t)}}}),[e.port2]})},this.type="knowledge-graph-sublayer",this.useViewTime=!0,this.visible=!0}get capabilities(){return this.parent?this.parent.sublayerCapabilities:(0,F.hZ)(null)}get userHasUpdateItemPrivileges(){return!!this.parent?.userHasUpdateItemPrivileges}get editingEnabled(){return this._isOverridden("editingEnabled")?this._get("editingEnabled"):this.capabilities.operations.supportsEditing}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get isTable(){return"link-chart"!==this.parentCompositeLayer?.type&&null==this.geometryFieldName}get defaultPopupTemplate(){return this.createPopupTemplate()}set featureReduction(e){const t=this._normalizeFeatureReduction(e);this._set("featureReduction",t)}get fields(){const e=[];return this.objectType?.properties?.forEach(t=>{const n="esriFieldTypeOID"===t.fieldType?"esriFieldTypeInteger":t.fieldType;e.push(Q.A.fromJSON({name:t.name,type:n,alias:t.alias,defaultValue:t.defaultValue,editable:t.editable,nullable:t.nullable}))}),e.push(Q.A.fromJSON({name:this.objectIdField,type:"esriFieldTypeString",alias:this.objectIdField,editable:!1}),Q.A.fromJSON({name:L.M1,type:"esriFieldTypeInteger",alias:L.M1,editable:!1}),Q.A.fromJSON({name:L.BL,type:"esriFieldTypeInteger",alias:L.BL,editable:!1})),e}get formTemplate(){return this._isOverridden("formTemplate")?this._get("formTemplate"):(0,F.dD)(this)}set formTemplate(e){this._overrideIfSome("formTemplate",e)}get geometryType(){if("link-chart"===this.parentCompositeLayer?.type)return"relationship"===this.graphType?"polyline":"point";const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.geometryType;return t&&"esriGeometryNull"!==t?g.gy.fromJSON(t):null}get geometryFieldName(){if("link-chart"===this.parentCompositeLayer?.type)return L.T1;const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name);return e?.name??null}get graphicOrigin(){if(!this.parent)return null;switch(this.parent.type){case"knowledge-graph":return new C(this.parent,this);case"link-chart":return new x(this.parent,this)}}get graphTypeName(){return this.objectType?.name}set graphTypeName(e){this._set("graphTypeName",e)}get hasM(){const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.name,n=t?this.objectType?.properties?.[t]:null;return n?.hasM??!1}get hasZ(){const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.name,n=t?this.objectType?.properties?.[t]:null;return n?.hasZ??!1}set labelingInfo(e){this._set("labelingInfo",e)}get labelingInfo(){if(this._isOverridden("labelingInfo"))return this._get("labelingInfo");if(!this.objectType||!this.parentCompositeLayer||!this.graphTypeName)return null;const e=this.objectType.properties?(0,F.MY)(this.objectType.properties):"ESRI__ID";return"link-chart"===this.parentCompositeLayer.type?(0,F.iW)(this.graphType,this.graphTypeName,e):(0,F.e$)(this.graphTypeName,this.geometryType,e)}set renderer(e){(0,Y.yp)(e,this.fieldsIndex),this._set("renderer",e)}get renderer(){if(this._isOverridden("renderer"))return this._get("renderer");const e=this.parentCompositeLayer?.dataManager?.knowledgeGraph?.dataModel,t=[...e?.entityTypes??[],...e?.relationshipTypes??[]].map(e=>e.name).indexOf(this.graphTypeName),n=(0,F.Td)(t);if("link-chart"===this.parentCompositeLayer?.type){if("relationship"===this.graphType)return new X.A({type:"simple",symbol:(0,F.UT)(n)});const e=(0,V.r)((0,N.F0)(g.gy.toJSON("point")).renderer);return(0,re.dt)(e.symbol,n),e}const i=(0,V.r)((0,N.F0)(g.gy.toJSON(this.geometryType)).renderer);return(0,re.dt)(i.symbol,n),i}get spatialReference(){return this.parentCompositeLayer?.dataManager?.knowledgeGraph?.dataModel?.spatialReference??m.A.WGS84}get templates(){return this._isOverridden("templates")?this._get("templates"):(0,F.CP)(this)}set templates(e){this._overrideIfSome("templates",e)}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,ie.tn)(this,e)}createQuery(){return new ne.A({where:"1=1",outFields:["*"]})}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){return null}async queryFeatures(e,t){await this.load();const{resolvedQuery:n,queryEngine:i}=await this._setupQueryObjects(e),r=this.graphicOrigin,o=te.A.fromJSON(await i.executeQuery(n.toJSON(),t?.signal));return o.features.forEach(e=>{e.sourceLayer=this,e.origin=r}),o}async queryFeaturesJSON(e,t){await this.load();const{resolvedQuery:n,queryEngine:i}=await this._setupQueryObjects(e);return await i.executeQuery(n.toJSON(),t?.signal)}async queryFeatureCount(e,t){await this.load();const{resolvedQuery:n,queryEngine:i}=await this._setupQueryObjects(e);return i.executeQueryForCount(n.toJSON(),t?.signal)}async queryExtent(e={},t){await this.load();const n={...e,returnGeometry:!0},{resolvedQuery:i,queryEngine:r}=await this._setupQueryObjects(n),o=await r.executeQueryForExtent(i.toJSON(),t?.signal);let s;return s=null!=o.extent?.xmin&&null!=o.extent?.xmax&&null!=o.extent?.ymin&&null!=o.extent?.ymax?new d.A(o.extent):new d.A,{count:o.count,extent:s}}async queryObjectIds(e,t){await this.load();const n=ne.A.from(e);let i;if("link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)i=this._cachedQueryEngine;else{const e=await this.parentCompositeLayer.dataManager.getData(n,this,t);i=this.loadQueryEngine(e)}return await i.executeQueryForIds(n.toJSON(),t?.signal)}async applyEdits(e){if(!this.parentCompositeLayer.dataManager.knowledgeGraph)throw new o.A("knowledge-graph-sublayer:no-knowledge-graph","ApplyEdits cannot be executed because the parent does not have a Knowledge Graph model. This is usually caused by the layer not yet being loaded");const t=await(0,F.O9)(e,this);t.options={cascadeDelete:!0,cascadeProvenanceDelete:!!this.parent?.knowledgeGraph.serviceDefinition.supportsProvenance||void 0};const n=await(0,ee.executeApplyEdits)(this.parentCompositeLayer.dataManager.knowledgeGraph,t),i=(0,F.Gz)(n,this.graphTypeName),r={addedFeatures:i.addFeatureResults,updatedFeatures:i.updateFeatureResults,deletedFeatures:i.deleteFeatureResults,addedAttachments:i.addAttachmentResults,deletedAttachments:i.deleteAttachmentResults,updatedAttachments:i.updateAttachmentResults,exceededTransferLimit:!1,historicMoment:new Date,edits:void 0};return this.emit("edits",r),this.emit("apply-edits",{result:Promise.resolve(r)}),"link-chart"===this.parentCompositeLayer.type&&await this.parentCompositeLayer.refreshLinkChartCache([...r.addedFeatures.map(e=>e.globalId),...r.updatedFeatures.map(e=>e.globalId),...r.deletedFeatures.map(e=>e.globalId)]),i}loadQueryEngine(e){const t=new S.A({geometryType:g.gy.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ}),n=new k.do({fieldsIndex:this.fieldsIndex.toJSON(),geometryType:g.gy.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ,featureIdInfo:{type:"object-id",fieldName:this.objectIdField},spatialReference:this.spatialReference.toJSON(),timeInfo:this.timeInfo?.toJSON(),featureStore:t});return n.featureStore.addMany(e),n}async refreshCachedQueryEngine(){const e=await this.parentCompositeLayer.dataManager.getData(new ne.A({where:"1=1",outFields:[L.dr]}),this);this._cachedQueryEngine=this.loadQueryEngine(e)}load(e){return this.addResolvingPromise(this.parent.load(e).then(()=>(0,Y.sv)(this.timeInfo,this.fieldsIndex))),Promise.resolve(this)}async _setupQueryObjects(e,t){const n=ne.A.from(e),i=n.geometry;if(i&&!i.spatialReference?.isWGS84&&(await(0,y.initializeProjection)(i.spatialReference,f.KK),n.geometry=(0,y.project)(i instanceof c.A||i instanceof h.A||i instanceof u.A?i:i.extent,f.KK)),"link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)return{resolvedQuery:n,queryEngine:this._cachedQueryEngine};const r=await this.parentCompositeLayer.dataManager.getData(n,this,t);return{resolvedQuery:n,queryEngine:this.loadQueryEngine(r)}}};(0,i.Cg)([(0,p.MZ)(ae((0,s.o8)(j.sU)))],ce.prototype,"blendMode",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],ce.prototype,"capabilities",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],ce.prototype,"userHasUpdateItemPrivileges",null),(0,i.Cg)([(0,p.MZ)({type:Boolean})],ce.prototype,"editingEnabled",null),(0,i.Cg)([(0,p.MZ)()],ce.prototype,"isTable",null),(0,i.Cg)([(0,p.MZ)({json:{origins:{"web-scene":{write:!1}},write:pe()}})],ce.prototype,"charts",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],ce.prototype,"defaultPopupTemplate",null),(0,i.Cg)([(0,p.MZ)({type:String,json:{origins:{service:{read:!1}},name:"layerDefinition.definitionExpression",write:{ignoreOrigin:!0}}})],ce.prototype,"definitionExpression",void 0),(0,i.Cg)([(0,p.MZ)(ae((0,s.o8)(B.Dp)))],ce.prototype,"displayFilterEnabled",void 0),(0,i.Cg)([(0,p.MZ)(ae((0,s.o8)(B.KV)))],ce.prototype,"displayFilterInfo",void 0),(0,i.Cg)([(0,p.MZ)(ae((0,s.o8)(j.LF)))],ce.prototype,"effect",void 0),(0,i.Cg)([(0,p.MZ)()],ce.prototype,"elevationInfo",void 0),(0,i.Cg)([(0,p.MZ)(ae((0,s.o8)(O.Y)))],ce.prototype,"featureEffect",void 0),(0,i.Cg)([(0,p.MZ)(ae((0,s.o8)(z.d)))],ce.prototype,"featureReduction",null),(0,i.Cg)([(0,p.MZ)()],ce.prototype,"fields",null),(0,i.Cg)([(0,p.MZ)()],ce.prototype,"formTemplate",null),(0,i.Cg)([(0,p.MZ)()],ce.prototype,"geometryType",null),(0,i.Cg)([(0,p.MZ)()],ce.prototype,"geometryFieldName",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],ce.prototype,"graphicOrigin",null),(0,i.Cg)([(0,p.MZ)({type:["entity","relationship"],nonNullable:!0,json:{write:{isRequired:!0,ignoreOrigin:!0}}})],ce.prototype,"graphType",void 0),(0,i.Cg)([(0,p.MZ)({type:String,nonNullable:!0,json:{write:{isRequired:!0,ignoreOrigin:!0}}})],ce.prototype,"graphTypeName",null),(0,i.Cg)([(0,p.MZ)()],ce.prototype,"hasM",null),(0,i.Cg)([(0,p.MZ)()],ce.prototype,"hasZ",null),(0,i.Cg)([(0,p.MZ)({type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0}}})],ce.prototype,"id",void 0),(0,i.Cg)([(0,p.MZ)({type:Boolean,value:!0,nonNullable:!0,json:{name:"showLabels",default:!1,write:{overridePolicy(){return{enabled:!!this.geometryType,alwaysWriteDefaults:!0,ignoreOrigin:!0}}}}})],ce.prototype,"labelsVisible",void 0),(0,i.Cg)([(0,p.MZ)({type:[H.A],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:function(e,t,n){const i=[["ESRI__AGGREGATION_COUNT",L.M1],["ESRI__ORIGIN_ID",L.Cz],["ESRI__DESTINATION_ID",L.KQ],["ESRI__LAYOUT_GEOMETRY",L.T1]];try{for(const t of e)for(const[e,n]of i)t.labelExpression=t.labelExpression?.replaceAll(e,n),t.labelExpressionInfo?.expression&&(t.labelExpressionInfo.expression=t.labelExpressionInfo.expression.replaceAll(e,n))}catch(e){a.A.getLogger(this).warn("Error updating labelingInfo",e)}return(0,W.w)(e,t,n)},write:pe()}})],ce.prototype,"labelingInfo",null),(0,i.Cg)([(0,p.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}}})],ce.prototype,"layerType",void 0),(0,i.Cg)([(0,p.MZ)(ae((0,s.o8)(U.fV)))],ce.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,p.MZ)(ae((0,s.o8)(U.hG)))],ce.prototype,"maxScale",void 0),(0,i.Cg)([(0,p.MZ)(ae((0,s.o8)(U.hn)))],ce.prototype,"minScale",void 0),(0,i.Cg)([(0,p.MZ)()],ce.prototype,"objectIdField",void 0),(0,i.Cg)([(0,p.MZ)()],ce.prototype,"objectType",void 0),(0,i.Cg)([(0,p.MZ)(ae((0,s.o8)(U.ke)))],ce.prototype,"opacity",void 0),(0,i.Cg)([(0,p.MZ)(ae((0,s.o8)(G.ne)))],ce.prototype,"orderBy",void 0),(0,i.Cg)([(0,p.MZ)({clonable:!1})],ce.prototype,"parent",void 0),(0,i.Cg)([(0,p.MZ)()],ce.prototype,"parentCompositeLayer",void 0),(0,i.Cg)([(0,p.MZ)(ae((0,s.o8)(U.M6)))],ce.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,p.MZ)({type:r.A,json:{name:"popupInfo",write:{ignoreOrigin:!0}}})],ce.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,p.MZ)({type:Number,json:{write:{overridePolicy:ue}}})],ce.prototype,"refreshInterval",void 0),(0,i.Cg)([(0,p.MZ)({types:J.Hg,json:{name:"layerDefinition.drawingInfo.renderer",write:pe()}})],ce.prototype,"renderer",null),(0,i.Cg)([(0,p.MZ)()],ce.prototype,"source",void 0),(0,i.Cg)([(0,p.MZ)()],ce.prototype,"spatialReference",null),(0,i.Cg)([(0,p.MZ)()],ce.prototype,"templates",null),(0,i.Cg)([(0,p.MZ)({type:K.A,json:{name:"layerDefinition.timeInfo",write:{overridePolicy:ue},origins:{"web-document":{name:"layerDefinition.timeInfo",read:!0,write:{overridePolicy:ue}},"portal-item":{name:"layerDefinition.timeInfo",read:!0,write:{overridePolicy:ue}}}}})],ce.prototype,"timeInfo",null),(0,i.Cg)([(0,p.MZ)({type:String,json:{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],ce.prototype,"title",null),(0,i.Cg)([(0,se.K)("title")],ce.prototype,"writeTitle",null),(0,i.Cg)([(0,p.MZ)({json:{read:!1}})],ce.prototype,"type",void 0),(0,i.Cg)([(0,p.MZ)(ae((0,s.o8)(q.B)))],ce.prototype,"useViewTime",void 0),(0,i.Cg)([(0,p.MZ)({type:Boolean,json:{name:"visibility",write:pe()}})],ce.prototype,"visible",void 0),ce=(0,i.Cg)([(0,p.$K)("esri.layers.knowledgeGraph.KnowledgeGraphSublayer")],ce)},64714:(e,t,n)=>{n.d(t,{F0:()=>a,Vx:()=>d,e2:()=>c,f:()=>h});var i=n(44208),r=n(4718),o=n(99352),s=n(93470);function a(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?s.Cb:"esriGeometryPolyline"===e?s.yM:s.WR}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let p=1;function d(e,t){if((0,i.A)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let n=`this${u(t)} = null;`;for(const t in e)n+=`this${u(t)} = ${JSON.stringify(e[t])};`;const i=new Function(`\n return class AttributesClass$${p++} {\n constructor() {\n ${n};\n }\n }\n `)();return()=>new i}catch(n){return()=>({[t]:null,...e})}}function u(e){return l.test(e)?`.${e}`:`["${e}"]`}function c(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,r.o8)(e)}}]}function h(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:!0,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:o.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:o.P,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}}}},67996:(e,t,n)=>{n.d(t,{cZ:()=>S,XW:()=>D,fe:()=>k});var i=n(11254),r=n(49186),o=n(91869),s=(n(90708),n(92722)),a=n(16930);class l{constructor(){this.version="",this.queryResult=new p}}class p{constructor(){this.featureResult=new d}}class d{constructor(){this.objectIdFieldName="",this.uniqueIdField=new u,this.globalIdFieldName="",this.geohashFieldName="",this.geometryProperties=new c,this.geometryType=null,this.spatialReference=new a.A,this.exceededTransferLimit=!1,this.hasZ=!1,this.hasM=!1,this.transform=new h,this.fields=[],this.fieldNameToAttributeIndexMap={},this.values=[],this.features=[],this.geometryFields=[]}}class u{constructor(){this.name="",this.isSystemMaintained=!1}}class c{constructor(){this.shapeAreaFieldName="",this.shapeLengthFieldName="",this.units=""}}class h{constructor(){this.quantizeOriginPosition="upperLeft",this.scale=new y,this.translate=new m}}class y{constructor(){this.xScale=0,this.yScale=0,this.mScale=0,this.zScale=0}}class m{constructor(){this.xTranslate=0,this.yTranslate=0,this.mTranslate=0,this.zTranslate=0}}class f{constructor(){this.name="",this.fieldType="esriFieldTypeString",this.alias="",this.sqlType="sqlTypeVarchar",this.domain="",this.defaultValue=""}}class g{constructor(){this.attributes=[],this.compressedGeometry=new b,this.centroid=new b,this.aggregateGeometries=[]}}class b{constructor(){this.geometryType=null,this.lengths=[],this.coords=[]}}const w=["ELEMENTUID","TYPENAME"];var _=n(45724),M=n(35448);const I={upperLeft:0,lowerLeft:1},T={sqlTypeBigInt:0,sqlTypeBinary:1,sqlTypeBit:2,sqlTypeChar:3,sqlTypeDate:4,sqlTypeDecimal:5,sqlTypeDouble:6,sqlTypeFloat:7,sqlTypeGeometry:8,sqlTypeGUID:9,sqlTypeInteger:10,sqlTypeLongNVarchar:11,sqlTypeLongVarbinary:12,sqlTypeLongVarchar:13,sqlTypeNChar:14,sqlTypeNVarChar:15,sqlTypeOther:16,sqlTypeReal:17,sqlTypeSmallInt:18,sqlTypeSqlXml:19,sqlTypeTime:20,sqlTypeTimestamp:21,sqlTypeTimestamp2:22,sqlTypeTinyInt:23,sqlTypeVarbinary:24,sqlTypeVarchar:25};var C=n(93637);function v(e){const t=new b;t.geometryType=(0,C.i7)(M.bV,e.geometry_type.value);const n=[],i=[];for(let t=0;t<e.lengths.length;t++)n.push(e.lengths[t]);for(let t=0;t<e.coords.length;t++)i.push(e.coords[t]);return t.lengths=n,t.coords=i,t}function A(e){const t=new f;return t.name=e.name,t.alias=e.alias,t.fieldType=(0,C.i7)(M.r5,e.field_type.value),t.sqlType=(0,C.i7)(T,e.sql_type.value),t.domain=e.domain,t.defaultValue=e.default_value,t}function x(e){const t=A(e);return t.geometryType=(0,C.i7)(M.bV,e.geometry_type.value),t}function E(e){const t=new h;t.quantizeOriginPosition=(0,C.i7)(I,e.quantizeOriginPosition.value);const n=t.scale,i=e.scale;n.xScale=i.xScale,n.yScale=i.yScale,n.mScale=i.mScale,n.zScale=i.zScale;const r=t.translate,o=e.translate;return r.xTranslate=o.xTranslate,r.yTranslate=o.yTranslate,r.mTranslate=o.mTranslate,r.zTranslate=o.zTranslate,t}async function S(e,t,n){t??=!1;const s={generateAllSublayers:t,namedTypeDefinitions:new Map};return await async function(e,t){const n=await(0,i.A)(e,{responseType:"array-buffer",signal:t?.signal}),o=await n.data;return async function(e){const t=new((await(0,_.I)()).MapOfObjectIdentifierSetsDecoder),n=t.decode(new Uint8Array(e)),i=new Map;if(0!==n.error_code)throw new r.A("knowledge-graph:layer-support-utils",n.error_message);const o=t.get_map_of_identifier_sets(),s=o.keys,a=s.size();for(let e=0;e<a;e++){const t=s.get(e),n=o.query_identifier_set(t),a=[];if(1===n.id_array_type.value){const e=n.get_globalid_array(),t=e.count();for(let n=0;n<t;n++)a.push(e.get_globalid_at(n))}else if(3===n.id_array_type.value){const e=n.get_identifier_array(),t=e.count();for(let n=0;n<t;n++)a.push(e.get_identifier_at(n).toString())}else if(2===n.id_array_type.value){const e=n.get_string_array(),t=e.count();for(let n=0;n<t;n++)a.push(e.get_string_at(n))}else{if(0!==n.id_array_type.value)throw new r.A("knowledge-graph:layer-support-utils","Tried to encode an unexpected ID Array type.");{const e=n.get_oid_array(),t=e.count();for(let n=0;n<t;n++)a.push(e.get_objectid_at(n).toString())}}i.set(t,a)}return t.delete(),i}(new Uint8Array(o))}(e,n).then(e=>{!function(e,t){for(const[n,i]of e){const e=(0,o.tE)(t.namedTypeDefinitions,n,()=>({useAllData:!1,members:new Map}));for(const t of i)e.members.has(t)||e.members.set(t,{id:t})}}(e,s)}),s}async function k(e){const t=await(0,_.I)(),n=new t.MapOfObjectIdentifierSets;!function(e,t,n){for(const[i,r]of n.namedTypeDefinitions){if(!r.members||r.useAllData)continue;const n=r.members.keys();let o=!1,s=!0;const a=new t.ObjectIdArray,l=new t.StringArray,p=new t.GlobalIdArray,d=new t.IdentifierArray,u=new t.ObjectIdentifierSet;for(const e of n)s&&(o=!isNaN(Number(e)),s=!1),o?a.add_objectid(Number(e)):(l.add_string(e),p.add_globalid(e)),d.add_identifier(e);u.set_oid_array(a),u.set_string_array(l),u.set_globalid_array(p),u.set_identifier_array(d),a.delete(),l.delete(),p.delete(),d.delete(),e.put_identifier_set(i,u),u.delete()}}(n,t,e);const i=new t.MapOfObjectIdentifierSetsEncoder;try{i.set_map_of_identifier_sets(n),i.encode();const e=i.get_encoding_result();if(0!==e.error.error_code)throw new r.A("knowledge-graph:layer-support-utils",e.error.error_message);const t=structuredClone(e.get_byte_buffer());return i.delete(),t}finally{n.delete()}}async function N(e,t){const n=await(0,i.A)(e,{responseType:"array-buffer",signal:t?.signal});return async function(e){const t=new((await(0,_.I)()).FeatureCollectionDecoder),n=t.decode(new Uint8Array(e));if(0!==n.error_code)throw new r.A("knowledge-graph:layer-support-utils",n.error_message);const i=function(e){const t=new l;t.version=e.version;const n=e.get_query_result();if(0!==n.results_type.value)throw new Error("Got a non-feature collection type");const i=n.get_feature_result(),r=t.queryResult.featureResult;r.objectIdFieldName=i.objectid_field_name,r.exceededTransferLimit=i.exceeded_transfer_limit,r.hasM=i.has_m,r.hasZ=i.has_z,r.geometryType=(0,C.i7)(M.bV,i.geometry_type.value),r.globalIdFieldName=i.globalid_field_name,r.geohashFieldName=i.geohash_field_name;const o=r.uniqueIdField,s=i.unique_id_field;o.name=s.name,o.isSystemMaintained=s.isSystemMaintained;const a=r.geometryProperties,p=i.geometry_properties;a.shapeAreaFieldName=p.shapeAreaFieldName,a.shapeLengthFieldName=p.shapeLengthFieldName,a.units=p.units;const d=r.spatialReference,u=i.spatial_reference;d.wkid=u.wkid,d.latestWkid=u.latestWkid,d.vcsWkid=u.vcsWkid,d.latestVcsWkid=u.latestVcsWkid,d.wkt=u.wkt,r.transform=E(i.transform);const c=r.fields,h=r.fieldNameToAttributeIndexMap,y=i.fields,m=y.size();for(let e=0;e<m;e++){const t=y.get(e),n=A(t);c.push(n),h[n.name]=e,t.delete()}y.delete();const f=r.values,b=i.values_count();for(let e=0;e<b;e++)f.push(i.get_value_at(e));const _=r.features,I=i.features,T=I.size();if(T>0)for(const e of w)if(void 0===h[e])throw new Error(`Feature collection missing required attribute: ${e}`);for(let e=0;e<T;e++){const t=new g,n=I.get(e),i=t.attributes,r=n.attributes_count();for(let e=0;e<r;e++)i.push(n.get_attribute_at(e));const o=n.get_compressed_geometry();o&&(t.compressedGeometry=v(o),t.centroid=v(n.get_centroid()));const s=t.aggregateGeometries,a=n.aggregate_geometries,l=a.size();for(let e=0;e<l;e++){const t=a.get(e),n=v(t);s.push(n),t.delete()}a.delete(),_.push(t),n.delete()}I.delete();const S=r.geometryFields,k=i.geometry_fields,N=k.size();for(let e=0;e<N;e++){const t=k.get(e),n=x(t);S.push(n),t.delete()}return k.delete(),t}(t.get_feature_collection());return t.delete(),i}(await n.data)}function L(e,t){if(!e?.queryResult?.featureResult)return t;const{hasZ:n,hasM:i}=e.queryResult.featureResult,r=e.queryResult.featureResult.fieldNameToAttributeIndexMap;for(const a of e.queryResult.featureResult.features){const e=a.attributes[r.TYPENAME],l=(0,o.tE)(t.namedTypeDefinitions,e,()=>({useAllData:!1,members:new Map})),p=a.attributes[r.ELEMENTUID];if(a.compressedGeometry?.coords?.length>0){let e=a.compressedGeometry.lengths;"esriGeometryPoint"===a.compressedGeometry.geometryType&&(e=[]),l.members.set(p,{id:p,linkChartLocation:new s.A(e,a.compressedGeometry.coords,n,i)})}else l.members.set(p,{id:p})}return t}const D={fetchAndConvertSerializedLinkChart:(e,t)=>async function(e,t){const n=[],i={generateAllSublayers:!1,namedTypeDefinitions:new Map};return e.entitiesUrl&&n.push(N(e.entitiesUrl,t).then(e=>{L(e,i)})),e.relationshipsUrl&&n.push(N(e.relationshipsUrl,t).then(e=>{L(e,i)})),await Promise.all(n),i}(e,t)}},69860:(e,t,n)=>{n.d(t,{A:()=>a});var i=n(65864),r=n(90708),o=n(43334),s=n(15375);class a{constructor(){this._featureLookup=new Map}static getInstance(){return a.instance||(a.instance=new a),a.instance}static resetInstance(){a.instance&&(a.instance=null)}deleteFromStore(e){e.forEach(e=>{this._featureLookup.delete(e)})}readFromStoreByList(e){const t=[];return e.forEach(e=>{const n=this.readFromStoreById(e);n&&t.push(n)}),t}readFromStoreById(e){return this._featureLookup.get(e)??null}writeToStore(e,t,n){const a=[];return e.forEach(e=>{if(!e?.id)return;e.properties||(e.properties=[]);let l=null;n&&e.properties[n]&&(l=(0,r.Ux)(e.properties[n])),"originId"in e&&"destinationId"in e&&(e.properties[s.Cz]=e.originId,e.properties[s.KQ]=e.destinationId),e.properties[t]=e.id;let p=e.properties;if(e.id){const t=this._featureLookup.get(e.id);if(t?.attributes){p={...t.attributes,...p};const e=n&&p[n];null!=e&&(p[n]=(0,i.rS)(e)),l=l??t.geometry}}const d=new o.Om(l?.clone(),p,null,e.id);this._featureLookup.set(`${e.typeName?`${e.typeName}__${e.id}`:e.id}`,d),a.push(d)}),a}}},75503:(e,t,n)=>{n.d(t,{EC:()=>v,wq:()=>a});var i=n(4576),r=n(21818),o=(n(44208),n(15142)),s=n(11006);class a{constructor(e=9,t){this._compareMinX=c,this._compareMinY=h,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),M.prune(),I.prune(),T.prune(),C.prune()}all(e){l(this._data,e)}search(e,t){let n=this._data;const i=this._toBBox;if(w(e,n))for(M.clear();n;){for(let r=0,o=n.children.length;r<o;r++){const o=n.children[r],s=n.leaf?i(o):o;w(e,s)&&(n.leaf?t(o):b(e,s)?l(o,t):M.push(o))}n=M.pop()}}collides(e){let t=this._data;const n=this._toBBox;if(!w(e,t))return!1;for(M.clear();t;){for(let i=0,r=t.children.length;i<r;i++){const r=t.children[i],o=t.leaf?n(r):r;if(w(e,o)){if(t.leaf||b(e,o))return!0;M.push(r)}}t=M.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,n=e.length;t<n;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new x([]),this}remove(e){if(!e)return this;let t,n=this._data,o=null,s=0,a=!1;const l=this._toBBox(e);for(T.clear(),C.clear();n||T.length>0;){if(n||(n=T.pop(),o=T.data[T.length-1],s=C.pop()??0,a=!0),n.leaf&&(t=(0,i.qh)(n.children,(0,r.zI)(e),n.children.length,n.indexHint),-1!==t))return n.children.splice(t,1),T.push(n),this._condense(T),this;a||n.leaf||!b(n,l)?o?(s++,n=o.children[s],a=!1):n=null:(T.push(n),C.push(s),s=0,o=n,n=n.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,n,i){const r=n-t+1;let o=this._maxEntries;if(r<=o){const i=new x(e.slice(t,n+1));return p(i,this._toBBox),i}i||(i=Math.ceil(Math.log(r)/Math.log(o)),o=Math.ceil(r/o**(i-1)));const s=new E([]);s.height=i;const a=Math.ceil(r/o),l=a*Math.ceil(Math.sqrt(o));_(e,t,n,l,this._compareMinX);for(let r=t;r<=n;r+=l){const t=Math.min(r+l-1,n);_(e,r,t,a,this._compareMinY);for(let n=r;n<=t;n+=a){const r=Math.min(n+a-1,t);s.children.push(this._build(e,n,r,i-1))}}return p(s,this._toBBox),s}_insert(e,t,n){const i=this._toBBox,r=n?e:i(e);T.clear();const o=function(e,t,n,i){for(;i.push(t),!0!==t.leaf&&i.length-1!==n;){let n,i=1/0,r=1/0;for(let o=0,s=t.children.length;o<s;o++){const s=t.children[o],a=y(s),l=f(e,s)-a;l<r?(r=l,i=a<i?a:i,n=s):l===r&&a<i&&(i=a,n=s)}t=n||t.children[0]}return t}(r,this._data,t,T);for(o.children.push(e),u(o,r);t>=0&&T.data[t].children.length>this._maxEntries;)this._split(T,t),t--;!function(e,t,n){for(let i=n;i>=0;i--)u(t.data[i],e)}(r,T,t)}_split(e,t){const n=e.data[t],i=n.children.length,r=this._minEntries;this._chooseSplitAxis(n,r,i);const o=this._chooseSplitIndex(n,r,i);if(!o)return;const s=n.children.splice(o,n.children.length-o),a=n.leaf?new x(s):new E(s);a.height=n.height,p(n,this._toBBox),p(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(n,a)}_splitRoot(e,t){this._data=new E([e,t]),this._data.height=e.height+1,p(this._data,this._toBBox)}_chooseSplitIndex(e,t,n){let i,r,o;i=r=1/0;for(let s=t;s<=n-t;s++){const t=d(e,0,s,this._toBBox),a=d(e,s,n,this._toBBox),l=g(t,a),p=y(t)+y(a);l<i?(i=l,o=s,r=p<r?p:r):l===i&&p<r&&(r=p,o=s)}return o}_chooseSplitAxis(e,t,n){const i=e.leaf?this._compareMinX:c,r=e.leaf?this._compareMinY:h;this._allDistMargin(e,t,n,i)<this._allDistMargin(e,t,n,r)&&e.children.sort(i)}_allDistMargin(e,t,n,i){e.children.sort(i);const r=this._toBBox,o=d(e,0,t,r),s=d(e,n-t,n,r);let a=m(o)+m(s);for(let i=t;i<n-t;i++){const t=e.children[i];u(o,e.leaf?r(t):t),a+=m(o)}for(let i=n-t-1;i>=t;i--){const t=e.children[i];u(s,e.leaf?r(t):t),a+=m(s)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const n=e.data[t];if(0===n.children.length)if(t>0){const r=e.data[t-1],o=r.children;o.splice((0,i.qh)(o,n,o.length,r.indexHint),1)}else this.clear();else p(n,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function l(e,t){let n=e;for(I.clear();n;){if(!0===n.leaf)for(const e of n.children)t((0,r.zI)(e));else I.pushArray(n.children);n=I.pop()??null}}function p(e,t){d(e,0,e.children.length,t,e)}function d(e,t,n,i,r){r||(r=new x([])),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(let o,s=t;s<n;s++)o=e.children[s],u(r,e.leaf?i(o):o);return r}function u(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function c(e,t){return e.minX-t.minX}function h(e,t){return e.minY-t.minY}function y(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function m(e){return e.maxX-e.minX+(e.maxY-e.minY)}function f(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function g(e,t){const n=Math.max(e.minX,t.minX),i=Math.max(e.minY,t.minY),r=Math.min(e.maxX,t.maxX),o=Math.min(e.maxY,t.maxY);return Math.max(0,r-n)*Math.max(0,o-i)}function b(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function w(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function _(e,t,n,i,r){const o=[t,n];for(;o.length;){const t=o.pop(),n=o.pop();if(t-n<=i)continue;const a=n+Math.ceil((t-n)/i/2)*i;(0,s.q)(e,a,n,t,r),o.push(n,a,a,t)}}const M=new o.A,I=new o.A,T=new o.A,C=new o.A({deallocator:void 0});class v{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class A extends v{constructor(){super(...arguments),this.height=1,this.indexHint=new i.vW}}class x extends A{constructor(e){super(),this.children=e,this.leaf=!0}}class E extends A{constructor(e){super(),this.children=e,this.leaf=!1}}},77901:(e,t,n)=>{n.d(t,{A:()=>s});var i=n(31635),r=n(25482),o=n(91429);let s=class extends r.o{constructor(e){super(e),this.properties=null}};(0,i.Cg)([(0,o.MZ)({json:{write:!0}})],s.prototype,"properties",void 0),s=(0,i.Cg)([(0,o.$K)("esri.rest.knowledgeGraph.GraphObject")],s)},83221:(e,t,n)=>{n.d(t,{A:()=>y});var i=n(4576),r=n(49186),o=n(65529),s=n(53966),a=n(70328),l=n(19419),p=n(90708),d=n(6518),u=n(51441),c=n(37730);const h=(0,a.vt)();class y{constructor(e){this.geometryInfo=e,this._boundsStore=new d.F,this._featuresById=new Map,this._usedMemory=0,this.events=new o.bk,this.featureAdapter=c.T}get usedMemory(){return this._usedMemory}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach(t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)}),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,n,i,r]=this.fullBounds;return{xmin:t,ymin:n,xmax:i,ymax:r,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(i.Ru)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged(),this._usedMemory=0}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const n of e){const e=this._boundsStore.get(n.objectId);e&&t((0,a.Jt)(h,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach(t=>e(t))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,e=>{t(this._featuresById.get(e))})}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void s.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new r.A("featurestore:invalid-feature","feature id is missing",{feature:e}));const n=this._featuresById.get(t);let i;if(n?(e.displayId=n.displayId,i=this._boundsStore.get(t),this._boundsStore.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(n)??0):null!=this.onFeatureAdd&&this.onFeatureAdd(e),!e.geometry?.coords?.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);i=(0,p.jQ)(null!=i?i:(0,l.vt)(),e.geometry),null!=i&&this._boundsStore.set(t,i),this._featuresById.set(t,e),this._usedMemory+=this.estimateFeatureUsedMemory?.(e)??0}_upsert(e){const t=e?.objectId;if(null==t)return s.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new r.A("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const n=this._featuresById.get(t);if(!n)return this._add(e),e;this._usedMemory-=this.estimateFeatureUsedMemory?.(n)??0;const{geometry:i,attributes:o}=e;for(const e in o)n.attributes[e]=o[e];return i&&(n.geometry=i,this._boundsStore.set(t,(0,p.jQ)((0,l.vt)(),i)??null)),this._usedMemory+=this.estimateFeatureUsedMemory?.(n)??0,n}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._boundsStore.delete(t),this._featuresById.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(e)??0,e}}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8948],{6518:(e,t,n)=>{n.d(t,{F:()=>a});var i=n(44208),r=n(75503),o=n(19419);const s={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 r.wq(9,(0,i.A)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach((n,i)=>{e[t++]=i}),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,o.Ie)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,n){(function(e){s.minX=e[0],s.minY=e[1],s.maxX=e[2],s.maxY=e[3]})(t),e.search(s,n)}(this._index,e,e=>t(this._idByBounds.get(e)))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},8460:(e,t,n)=>{n.d(t,{$C:()=>y,Hh:()=>s,Tu:()=>c,Wg:()=>h,Xq:()=>f,i6:()=>g,pM:()=>u,vJ:()=>m});var i=n(2741);let r,o=null;function s(){return r||(r=n.e(3666).then(n.bind(n,3666)).then(e=>e.l).then(({default:e})=>e({locateFile:e=>(0,i.s)(`esri/libs/linkchartlayout/${e}`)})).then(e=>{!function(e){o=e}(e)}),r)}const a={right:0,left:1,top:2,bottom:3},l={none:0,"start-only":1,"start-and-end":2};function p(e){const t={timeDirection:"right",timeBannerUTCOffsetInMinutes:0,eventsTicksVisualization:"start-and-end",showDurationLineForNonZeroDurationEntityEvents:!0,durationLineWidth:5,entityPositionAtDurationRatio:1,showNonZeroDurationIntervalBounds:!1,separateTimeOverlaps:!0,separateTimelineOverlaps:!0,moveFirstBends:!0,secondBendRatio:.3,lineSeparationMultiplier:1,spaceSeparatedLinesEvenly:!1,useBezierCurves:!1,separatedLineShapeRatio:0,...e?.toJSON(),eventsTicksVisualization:e?.eventsTicksVisualization??"start-and-end"};return{...t,timeDirection:{value:a[t.timeDirection]??a.right},eventsTicksVisualization:{value:l[t.eventsTicksVisualization]??l["start-and-end"]}}}function d(e,t,n,i,r,s){const a=n.length,l=r.length,p=Float64Array.BYTES_PER_ELEMENT,d=Uint32Array.BYTES_PER_ELEMENT,u=Uint8Array.BYTES_PER_ELEMENT,c=16+a*(u+2*p)+l*(2*d),h=o._malloc(c);try{const u=h+16-h%16,c=u+a*p,y=c+a*p,m=y+l*d,f=m+l*d,g=()=>[o.HEAPF64.subarray(u>>3,(u>>3)+a),o.HEAPF64.subarray(c>>3,(c>>3)+a),o.HEAPU32.subarray(y>>2,(y>>2)+l),o.HEAPU32.subarray(m>>2,(m>>2)+l),o.HEAPU8.subarray(f,f+a)],[b,w,_,M,I]=g();b.set(n),w.set(i),_.set(r),M.set(s),I.set(t);const T=e(a,f,u,c,l,y,m);let C=null,v=null;if(0===T.value){const e=o.getLayoutLinksTypes(),t=o.getLayoutLinksVerticesEndIndices(),n=o.getLayoutLinksVertices(),i=o.countLayoutLinksVertices();!l||e&&t?i&&!n?T.value=1:(C={types:new Uint8Array(o.HEAPU8.subarray(e,e+l)),vertexEndIndex:new Uint32Array(o.HEAPU32.subarray(t>>2,(t>>2)+l)),vertices:new Float64Array(o.HEAPF64.subarray(n>>3,(n>>3)+2*i))},v=o.getAuxiliaryGraphicElements()):T.value=1}const[A,x,E,S,k]=g();return n.set(A),i.set(x),r.set(E),s.set(S),t.set(k),{status:T.value,links:C,graphics:v}}finally{o._free(h),o.cleanupLayout()}}var u,c,h,y,m,f,g,b;(b=u||(u={})).getMinIdealEdgeLength=function(){return o.getMinIdealEdgeLength()},b.apply=function(e,t,n,i,r,s,a=2,l=1,p=-1){return d((t,n,i,r,s,d,u)=>o.applyForceDirectedLayout(e,t,n,i,r,s,d,u,a,l,p),t,n,i,r,s)},function(e){e.apply=function(e,t,n,i,r,s,a=2,l=1,p=-1){return d((t,n,i,r,s,d,u)=>o.applyCommunityLayout(e,t,n,i,r,s,d,u,a,l,p),t,n,i,r,s)}}(c||(c={})),function(e){e.apply=function(e,t,n,i,r,s){return d((t,n,i,r,s,a,l)=>o.applySimpleLayout(e,t,n,i,r,s,a,l),t,n,i,r,s)}}(h||(h={})),function(e){e.apply=function(e,t,n,i,r,s){return d((t,n,i,r,s,a,l)=>o.applyHierarchicalLayout(e,t,n,i,r,s,a,l),t,n,i,r,s)}}(y||(y={})),function(e){e.apply=function(e,t,n,i,r,s){return d((t,n,i,r,s,a,l)=>o.applyRadialTreeLayout(e,t,n,i,r,s,a,l),t,n,i,r,s)}}(m||(m={})),function(e){e.apply=function(e,t,n,i,r,s){return d((t,n,i,r,s,a,l)=>o.applySmartTreeLayout(e,t,n,i,r,s,a,l),t,n,i,r,s)}}(f||(f={})),function(e){e.apply=function(e,t,n,i,r,s,a,l,u,c,h,y){return d((t,n,i,a,l,d,m)=>{if(r.length!==t)return{value:1};if(s.length!==t)return{value:1};if(u.length!==l)return{value:1};if(c.length!==l)return{value:1};const f=Float64Array.BYTES_PER_ELEMENT,g=16,b=o._malloc(g+t*f),w=o._malloc(g+t*f),_=o._malloc(g+l*f),M=o._malloc(g+l*f),I=b+g-b%g,T=w+g-w%g,C=_+g-_%g,v=M+g-M%g;try{return o.HEAPF64.subarray(I>>3,(I>>3)+t).set(r),o.HEAPF64.subarray(T>>3,(T>>3)+t).set(s),o.HEAPF64.subarray(C>>3,(C>>3)+l).set(u),o.HEAPF64.subarray(v>>3,(v>>3)+l).set(c),o.applyChronologicalLayout(e,t,n,i,a,I,T,l,d,m,C,v,h,p(y))}finally{o._free(b),o._free(w),o._free(_),o._free(M)}},t,n,i,a,l)}}(g||(g={}))},15375:(e,t,n)=>{n.d(t,{BL:()=>l,Cz:()=>r,KQ:()=>o,M1:()=>a,T1:()=>s,dr:()=>i});const i="ESRI__ID",r="ESRI__OriginID",o="ESRI__DestID",s="ESRI__LayoutGeometry",a="ESRI__AggregationCount",l="LC.ESRI__IsSpatial"},23150:(e,t,n)=>{n.d(t,{A:()=>a});var i=n(31635),r=n(91429),o=n(82799),s=n(54238);let a=class extends s.A{constructor(e){super(e),this.originId=null,this.destinationId=null,this.layoutGeometry=null}};(0,i.Cg)([(0,r.MZ)({type:String,json:{write:!0}})],a.prototype,"originId",void 0),(0,i.Cg)([(0,r.MZ)({type:String,json:{write:!0}})],a.prototype,"destinationId",void 0),(0,i.Cg)([(0,r.MZ)({type:o.A,json:{write:!0}})],a.prototype,"layoutGeometry",void 0),a=(0,i.Cg)([(0,r.$K)("esri.rest.knowledgeGraph.Relationship")],a)},24137:(e,t,n)=>{n.d(t,{P:()=>I});var i=n(31635),r=n(69622),o=n(49186),s=n(53966),a=n(91869),l=n(74887),p=n(39516),d=n(91429),u=n(5443),c=n(39829),h=n(91218),y=n(21325),m=n(15375);const f=(e,t)=>{if("column-reference"===e.type)return e.column===t.systemOidFieldName?"ID(n)":`n.${e.column}`;if("string"===e.type)return`'${e.value}'`;if("number"===e.type)return`${e.value}`;if("binary-expression"===e.type&&t.supportedSqlTypes.has(e.left.type)&&t.supportedSqlTypes.has(e.right.type)&&t.supportedSqlOperators.has(e.operator))return`${f(e.left,t)} ${e.operator} ${f(e.right,t)}`;if("binary-expression"===e.type&&"LIKE"===e.operator){let n="";if("function"===e.left.type&&"column-reference"===e.left.args.value[0].type)n+=`lower(n.${e.left.args.value[0].column})`;else{if("column-reference"!==e.left.type)return t.unsupportedOperationFound=!0,"";n+=`lower(n.${e.left.column})`}if(n+=" CONTAINS (","string"!==e.right.type)return t.unsupportedOperationFound=!0,"";{let t=e.right.value;t.startsWith("%")&&(t=t.slice(1)),t.endsWith("%")&&(t=t.slice(0,-1)),n+=`'${t.toLowerCase()}')`}return n}return t.unsupportedOperationFound=!0,""};var g=n(69860),b=n(30504),w=n(48441),_=n(42538),M=n(61956);let I=class extends r.A{constructor(e){super(e),this._processingCacheUpdatesLookup=new Map,this.knowledgeGraph=null,this.inclusionModeDefinition={generateAllSublayers:!0,namedTypeDefinitions:new Map},this.entityTypeNames=new Set,this.relationshipTypeNames=new Set,this.geographicLookup=new Map,this.sublayerCaches=new Map,this.nodeConnectionsLookup=new Map,this.relationshipConnectionsLookup=new Map,this.memberIdTypeLookup=new Map;const t=new Map;e.knowledgeGraph.dataModel.entityTypes?.forEach(n=>{n.name&&(t.set(n.name,"entity"),this._processingCacheUpdatesLookup.set(n.name,[]),e.inclusionModeDefinition&&!e.inclusionModeDefinition?.generateAllSublayers||this.entityTypeNames.add(n.name),n.properties?.forEach(e=>{e.geometryType&&"esriGeometryNull"!==e.geometryType&&this.geographicLookup.set(n.name,{name:e.name??"",geometryType:e.geometryType})}))}),e.knowledgeGraph.dataModel.relationshipTypes?.forEach(n=>{n.name&&(t.set(n.name,"relationship"),this._processingCacheUpdatesLookup.set(n.name,[]),e.inclusionModeDefinition&&!e.inclusionModeDefinition?.generateAllSublayers||this.relationshipTypeNames.add(n.name),n.properties?.forEach(e=>{e.geometryType&&"esriGeometryNull"!==e.geometryType&&this.geographicLookup.set(n.name,{name:e.name??"",geometryType:e.geometryType})}))}),e.inclusionModeDefinition?.namedTypeDefinitions.forEach((n,i)=>{if("entity"===t.get(i))this.entityTypeNames.add(i);else{if("relationship"!==t.get(i))return s.A.getLogger(this).warn(`A named type, ${i}, was in the inclusion list that wasn't in the data model and will be removed`),void e.inclusionModeDefinition?.namedTypeDefinitions.delete(i);this.relationshipTypeNames.add(i)}const r=new Map;n.members?.forEach(e=>{(0,a.tE)(this.memberIdTypeLookup,e.id,()=>new Set).add(i)}),this.sublayerCaches.set(i,r)})}addToLayer(e){e.forEach(({typeName:e,id:t})=>{if(!this.inclusionModeDefinition)throw new o.A("knowledge-graph:layer-data-manager","You cannot add to a layer's exclusion list if it was not created with an exclusion list originally");if(this.inclusionModeDefinition.namedTypeDefinitions.has(e)){if(this.inclusionModeDefinition.namedTypeDefinitions.has(e)){const n=this.inclusionModeDefinition.namedTypeDefinitions.get(e);n.members||(n.members=new Map),n.members.set(t,{id:t}),(0,a.tE)(this.memberIdTypeLookup,t,()=>new Set).add(e)}}else{const n=new Map;n.set(t,{id:t}),this.inclusionModeDefinition.namedTypeDefinitions.set(e,{useAllData:!1,members:n}),(0,a.tE)(this.memberIdTypeLookup,t,()=>new Set).add(e)}})}getById(e){return g.A.getInstance().readFromStoreById(e)}async getData(e,t,n){if(t.objectType.name&&this.inclusionModeDefinition?.namedTypeDefinitions&&this.inclusionModeDefinition.namedTypeDefinitions.size>0&&!this.inclusionModeDefinition.namedTypeDefinitions.has(t.objectType.name))return[];let i;if(i=e||new M.A({where:"1=1",outFields:["*"]}),"link-chart"===t.parentCompositeLayer.type){const e=t.parentCompositeLayer,n=this._processingCacheUpdatesLookup.get(t.objectType.name??""),r=i.outFields;r&&1===r.length&&r[0]===m.dr&&"1=1"===i.where||await Promise.all(n??[]);const o=this.sublayerCaches.has(t.objectType.name??"")?Array.from(this.sublayerCaches.get(t.objectType.name)?.values()):[],s=[];return o.forEach(n=>{if(this.relationshipTypeNames.has(t.objectType.name)){n.geometry=e.relationshipLinkChartDiagramLookup.get(n.attributes[t.objectIdField]);const i=this.memberIdTypeLookup.get(n.attributes[m.Cz]),r=this.memberIdTypeLookup.get(n.attributes[m.KQ]),o=this._isEndEntitySpatial(i,n,m.Cz),s=this._isEndEntitySpatial(r,n,m.KQ);n.attributes[m.BL]=Number(o&&s)}else{n.geometry=e.entityLinkChartDiagramLookup.get(n.attributes[t.objectIdField]);const i=this.geographicLookup.get(t.objectType.name);i&&n.attributes[i.name]?n.attributes[m.BL]=1:n.attributes[m.BL]=0}n.attributes[m.T1]=n.geometry,s.push(n)}),s}return this.retrieveDataFromService(i,t,n)}async getConnectedRecordIds(e,t,n){const i=[];let r="";const o=this._getNamedTypeIdMapFromNodeIds(e);if(t&&0!==t?.length){for(const e of t)r=r+e+"|";r=r.slice(0,-1)}const s={},a=[];for(const[e,n]of o){const i=`${e}_ids`;s[i]=n,t&&0!==t?.length?a.push(`MATCH (n:${e}) WHERE id(n) IN $${i} WITH n MATCH (n)-[r:${r}]-(m) RETURN id(r), type(r), id(m), labels(m)[0]`):a.push(`MATCH (n:${e}) WHERE id(n) IN $${i} WITH n MATCH (n)-[r]-(m) RETURN id(r), type(r), id(m), labels(m)[0]`)}if(!a.length)return i;const l=a.join(" UNION "),p=(await(0,w.executeQueryStreaming)(this.knowledgeGraph,new _.A({openCypherQuery:l,bindParameters:s}),{signal:n?.signal})).resultRowsStream.getReader();for(;;){const{done:e,value:t}=await p.read();if(e)break;for(let e=0;e<t.length;e++){const n=t[e];i.push({id:n[0],typeName:n[1]}),i.push({id:n[2],typeName:n[3]})}}return i}async getRelationshipsBetweenNodes(e,t,n){const i=this._getNamedTypeIdMapFromNodeIds(e);if(0===i.size)return[];const r={relationshipExclusionIds:t,possibleConnectionEntityIds:e},o=[];for(const[e,t]of i.entries()){const n=`${e}_ids`;r[n]=t,o.push(`MATCH (n:${e}) WHERE id(n) IN $${n} WITH n MATCH (n)-[r]->(m) WHERE id(m) IN $possibleConnectionEntityIds AND NOT id(r) IN $relationshipExclusionIds RETURN id(r), type(r)`)}const s=o.join(" UNION "),a=[],l=(await(0,w.executeQueryStreaming)(this.knowledgeGraph,new _.A({openCypherQuery:s,bindParameters:r}),{signal:n?.signal})).resultRowsStream.getReader();for(;;){const{done:e,value:t}=await l.read();if(e)break;for(let e=0;e<t.length;e++){const n=t[e];a.push({id:n[0],typeName:n[1]})}}return a}async getRelationshipsFromNodes(e,t,n,i){const r=this._getNamedTypeIdMapFromNodeIds(e);if(0===r.size||0===t.length)return[];const o={relationshipExclusionIds:n,possibleConnectionEntityIds:t},s=[];for(const[e,t]of r.entries()){const n=`${e}_ids`;o[n]=t,s.push(`MATCH (n:${e}) WHERE id(n) IN $${n} WITH n MATCH (n)-[r]-(m) WHERE id(m) IN $possibleConnectionEntityIds AND NOT id(r) IN $relationshipExclusionIds RETURN id(r), type(r)`)}const a=s.join(" UNION "),l=new Map,p=(await(0,w.executeQueryStreaming)(this.knowledgeGraph,new _.A({openCypherQuery:a,bindParameters:o}),{signal:i?.signal})).resultRowsStream.getReader();for(;;){const{done:e,value:t}=await p.read();if(e)break;for(let e=0;e<t.length;e++){const n=t[e];let i=l.get(n[1]);i||(i=new Set,l.set(n[1],i)),i.add(n[0])}}const d=[];for(const[e,t]of l)for(const n of t)d.push({id:n,typeName:e});return d}async refreshCacheContent(e,t,n,i=!0,r){const s=g.A.getInstance(),p=[],d=new Map,u=new Map;this.knowledgeGraph.dataModel.entityTypes?.forEach(e=>{e.name&&u.set(e.name,e)}),this.knowledgeGraph.dataModel.relationshipTypes?.forEach(e=>{e.name&&u.set(e.name,e)}),e||this.inclusionModeDefinition?e?e.forEach(e=>{if(this.memberIdTypeLookup.has(e))for(const t of this.memberIdTypeLookup.get(e))d.has(t)?d.get(t)?.push(e):d.set(t,[e])}):this.inclusionModeDefinition?.namedTypeDefinitions?.forEach((e,t)=>{e.useAllData?d.set(t,null):e.members&&e.members.forEach(e=>{d.has(t)&&null!==d.get(t)?d.get(t)?.push(e.id):d.set(t,[e.id])})}):(this.knowledgeGraph.dataModel.entityTypes?.forEach(e=>{e.name&&d.set(e.name,null)}),this.knowledgeGraph.dataModel.entityTypes?.forEach(e=>{e.name&&d.set(e.name,null)}));for(const[e,l]of d){const d=new Set(l),c=new Promise((p,c)=>{(async()=>{const p=new Set,c=[];let h,y="",f=!1;if(t||u.get(e)?.properties?.forEach(e=>{e.name&&p.add(e.name)}),n&&this.geographicLookup.has(e)){const t=this.geographicLookup.get(e)?.name;t&&p.add(t)}if(this.entityTypeNames.has(e))y=`MATCH (n:${e}) ${l?"WHERE id(n) IN $ids ":""}return ID(n)`,p.forEach(e=>{y+=`, n.${e}`,c.push(e)});else{if(!this.relationshipTypeNames.has(e))throw new o.A("knowledge-graph:layer-data-manager",`The graph type of ${e} could not be determined. Was this type set in the KG data model and inclusion definition?`);f=!0,y=`MATCH ()-[n:${e}]->() ${l?"WHERE id(n) IN $ids ":""}return ID(n), id(startNode(n)), id(endNode(n))`,p.forEach(e=>{y+=`, n.${e}`,c.push(e)})}h=new _.A(l?{openCypherQuery:y,bindParameters:{ids:l}}:{openCypherQuery:y});const g=(await(0,w.executeQueryStreaming)(this.knowledgeGraph,h,{signal:r?.signal})).resultRowsStream.getReader();for(;;){const{done:t,value:n}=await g.read();if(t)break;const r=[];for(let e=0;e<n.length;e++){const t=n[e];let i=0,o=0;const s={properties:{}};for(s.id=t[i],i++,o++,f&&(s.originId=t[i],i++,o++,s.destinationId=t[i],i++,o++,(0,a.tE)(this.nodeConnectionsLookup,s.originId,()=>new Set).add(s.id),(0,a.tE)(this.nodeConnectionsLookup,s.destinationId,()=>new Set).add(s.id),(0,a.tE)(this.relationshipConnectionsLookup,s.id,()=>[s.originId,s.destinationId]));i<t.length;i++)s.properties[c[i-o]]=t[i];d.delete(s.id),r.push(s)}const o=s.writeToStore(r,m.dr,this.geographicLookup.get(e)?.name);this.sublayerCaches.has(e)||this.sublayerCaches.set(e,new Map),i&&!this.inclusionModeDefinition?.namedTypeDefinitions.has(e)&&this.inclusionModeDefinition?.namedTypeDefinitions.set(e,{useAllData:!1,members:new Map}),i&&!this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members&&(this.inclusionModeDefinition.namedTypeDefinitions.get(e).members=new Map);const l=this.sublayerCaches.get(e);o.forEach(t=>{l?.set(t.attributes[m.dr],t),i&&!this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members.has(t.attributes[m.dr])&&(this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members.set(t.attributes[m.dr],{id:t.attributes[m.dr]}),(0,a.tE)(this.memberIdTypeLookup,t.attributes[m.dr],()=>new Set).add(e))})}const b=this.inclusionModeDefinition?.namedTypeDefinitions.get(e);if(b)for(const e of d)b.members?.delete(e)})().then(()=>{p(null)}).catch(e=>{"AbortError"===e.name?p(null):c(e)})});p.push(c),this._processingCacheUpdatesLookup.get(e)?.push(c)}if(await Promise.all(p),r?.signal?.aborted)throw(0,l.NK)()}removeFromLayer(e){const t=new Set,n=new Set(e.map(e=>e.id));for(const n of e)t.add(n.typeName),1===this.memberIdTypeLookup.get(n.id)?.size?this.memberIdTypeLookup.delete(n.id):this.memberIdTypeLookup.get(n.id)?.delete(n.typeName),this.inclusionModeDefinition?.namedTypeDefinitions.forEach((e,t)=>{t===n.typeName&&e.members?.has(n.id)&&e.members.delete(n.id)});t.forEach(e=>{this.sublayerCaches.get(e)?.forEach((t,i)=>{n.has(i)&&this.sublayerCaches.get(e)?.delete(i)})})}async retrieveDataFromService(e,t,n){const i=g.A.getInstance(),r=new Set,s=[];let a,l="",d=[];const M="relationship"===t.graphType,I=this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData,T=t.parentCompositeLayer.sublayerIdsCache.get(t.objectType.name);let C=!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&&(C=e.objectIds);else if(null!=e.objectIds&&C&&C.length>0){const t=e.objectIds;e.objectIds=C.filter(e=>t.includes(e))}else if(null!=e.objectIds)C=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=C}if(null!=e.outFields){const n=e.outFields;n.includes("*")?t.fields.forEach(e=>{r.add(e.name)}):n.forEach(e=>{e!==m.dr&&e!==t.geometryFieldName&&r.add(e)})}if(null!=e.geometry){const n=e.geometry;let i;const d=t.parentCompositeLayer.dataManager.knowledgeGraph.serviceDefinition,m=d?.spatialReference,f=d?.serviceCapabilities?.geometryCapabilities;let g=f?.geometryMaxBoundingRectangleSizeX,w=f?.geometryMaxBoundingRectangleSizeY;if("point"===n.type){let e=n;e.spatialReference?.isWGS84||(await(0,h.initializeProjection)(e.spatialReference,y.KK),e=(0,h.project)(e,y.KK)),i=new u.A({spatialReference:y.KK,xmin:e.x-1e-4,ymin:e.y-1e-4,xmax:e.x+1e-4,ymax:e.y+1e-4})}else n?.extent?.spatialReference&&!n.spatialReference?.isWGS84?(await(0,h.initializeProjection)(n.extent.spatialReference,y.KK),i=(0,h.project)(n.extent,y.KK)):i=n.extent;if(g&&w&&m){if(4326!==m.wkid){const e=new u.A({spatialReference:m,xmax:g,ymax:w}),t=(0,h.project)(e,y.KK);g=t.xmax,w=t.ymax}if(i.xmax-i.xmin>g)throw new o.A("knowledge-graph:layer-data-manager",`Extent x bounds should be within ${g}° latitude, limit exceeded`);if(i.ymax-i.ymin>w)throw new o.A("knowledge-graph:layer-data-manager",`Extent y bounds should be within ${w}° longitude, limit exceeded`)}if(null!=e.where&&"1=1"!==e.where){const n=await(0,p.GP)(e.where.toUpperCase(),t.fieldsIndex);t.fields.forEach(e=>{n.fieldNames.includes(e.name)&&r.add(e.name)})}l=M?`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&&r.add(t.geometryFieldName),r.forEach(e=>{l+=`, n.${e}`,s.push(e)}),a=new _.A({openCypherQuery:l,bindParameters:{param_filter_geom:new c.A({rings:(0,b.Wq)(i)})}})}else{let n="";if(null!=e.where&&"1=1"!==e.where){const i=await(0,p.GP)(e.where,t.fieldsIndex);t.fields.forEach(e=>{i.fieldNames.includes(e.name)&&r.add(e.name)});const o={systemOidFieldName:m.dr,supportedSqlTypes:new Set(["column-reference","string","number","binary-expression"]),supportedSqlOperators:new Set(["=","<","<=","<>",">",">=","AND","OR","LIKE"]),unsupportedOperationFound:!1};n=f(i.parseTree,o),o.unsupportedOperationFound&&(n="")}let i="";i=M?`Match ()-[n:${t.objectType.name}]->()`:`Match (n:${t.objectType.name})`;let o=!1;C&&(o=!0,i+=" WHERE ID(n) IN $ids"),n&&(i+=o?" AND":" WHERE",i+=` ${n}`),i+=" return ID(n)",M&&(i+=", id(startNode(n)), id(endNode(n))"),e.returnGeometry&&t.geometryFieldName&&r.add(t.geometryFieldName),r.forEach(e=>{i+=`, n.${e}`,s.push(e)}),a=new _.A(C?{openCypherQuery:i,bindParameters:{ids:C}}:{openCypherQuery:i})}const v=(await(0,w.executeQueryStreaming)(t.parentCompositeLayer.dataManager.knowledgeGraph,a,n)).resultRowsStream.getReader();for(;;){const{done:e,value:n}=await v.read();if(e)break;const r=[];for(let e=0;e<n.length;e++){const t=n[e];let i=0,o=0;const a={properties:{}};for(a.id=t[i],i++,o++,M&&(a.originId=t[i],i++,o++,a.destinationId=t[i],i++,o++);i<t.length;i++)a.properties[s[i-o]]=t[i];r.push(a)}d=d.concat(i.writeToStore(r,m.dr,t.parentCompositeLayer.dataManager.geographicLookup.get(t.objectType.name)?.name))}return d}_isEndEntitySpatial(e,t,n){for(const i of e??[])if(this.entityTypeNames.has(i)){const e=this.geographicLookup.get(i),r=e&&this.sublayerCaches.get(i)?.get(t.attributes[n]);if(e&&r?.attributes[e.name])return!0}return!1}_getNamedTypeIdMapFromNodeIds(e){const t=new Map;return e.forEach(e=>{if(this.memberIdTypeLookup.has(e))for(const n of this.memberIdTypeLookup.get(e)){if(!this.entityTypeNames.has(n))return;t.has(n)?t.get(n)?.push(e):t.set(n,[e])}}),t}};(0,i.Cg)([(0,d.MZ)()],I.prototype,"knowledgeGraph",void 0),(0,i.Cg)([(0,d.MZ)()],I.prototype,"inclusionModeDefinition",void 0),(0,i.Cg)([(0,d.MZ)()],I.prototype,"entityTypeNames",void 0),(0,i.Cg)([(0,d.MZ)()],I.prototype,"relationshipTypeNames",void 0),(0,i.Cg)([(0,d.MZ)()],I.prototype,"geographicLookup",void 0),(0,i.Cg)([(0,d.MZ)()],I.prototype,"sublayerCaches",void 0),(0,i.Cg)([(0,d.MZ)()],I.prototype,"nodeConnectionsLookup",void 0),(0,i.Cg)([(0,d.MZ)()],I.prototype,"relationshipConnectionsLookup",void 0),(0,i.Cg)([(0,d.MZ)()],I.prototype,"memberIdTypeLookup",void 0),I=(0,i.Cg)([(0,d.$K)("esri.layers.knowledgeGraph.KnowledgeGraphLayerDataManager")],I)},25927:(e,t,n)=>{n.d(t,{A:()=>a});var i=n(31635),r=n(91429),o=n(86738),s=n(54238);let a=class extends s.A{constructor(e){super(e),this.layoutGeometry=null}};(0,i.Cg)([(0,r.MZ)({type:o.A,json:{write:!0}})],a.prototype,"layoutGeometry",void 0),a=(0,i.Cg)([(0,r.$K)("esri.rest.knowledgeGraph.Entity")],a)},30504:(e,t,n)=>{n.d(t,{k5:()=>p,aq:()=>l,Wq:()=>d}),n(52106);var i=n(49186),r=(n(86738),n(39829),n(82799),n(94194),n(69860),n(8460),n(66552));(0,r.O)()({none:"none",startAndEnd:"start-and-end",startOnly:"start-only"}),(0,r.O)()({absoluteValue:"absolute-value",multiplier:"multiplier"});const o=new Map([["basic-grid","basic-grid"],["geographic-organic-standard","geographic-organic-standard"],["hierarchical-bottom-to-top","hierarchical-bottom-to-top"],["hierarchical-top-to-bottom","hierarchical-bottom-to-top"],["organic-community","organic-community"],["organic-fusiform","organic-standard"],["organic-leaf-circle","organic-standard"],["organic-standard","organic-standard"],["radial-node-centric","radial-root-centric"],["radial-root-centric","radial-root-centric"],["tree-bottom-to-top","tree-left-to-right"],["tree-left-to-right","tree-left-to-right"],["tree-right-to-left","tree-left-to-right"],["tree-top-to-bottom","tree-left-to-right"],["chronological-mono-timeline","chronological-mono-timeline"],["chronological-multi-timeline","chronological-multi-timeline"]]);var s=n(48441),a=n(42538);async function l(e,t,n){const i=[],r=function(e,t){const n=new Map;if(t.dataModel?.relationshipTypes)for(const e of t.dataModel.relationshipTypes)e.name&&n.set(e.name,[]);for(const t of e)n.has(t.typeName)&&n.get(t.typeName)?.push(t.id);return n}(e,t),o={},l=[];for(const[e,t]of r){if(t.length<1)continue;const n=`${e}_ids`;o[n]=t,l.push(`MATCH (n)-[r:${e}]->(m) WHERE id(r) in $${n} RETURN id(n), labels(n)[0], id(m), labels(m)[0]`)}if(0===l.length)return[];const p=l.join(" UNION "),d=new a.A({openCypherQuery:p,bindParameters:o}),u=(await(0,s.executeQueryStreaming)(t,d,n?.requestOptions)).resultRowsStream.getReader();for(;;){const{done:e,value:t}=await u.read();if(e)break;for(const e of t)i.push({id:e[0],typeName:e[1]}),i.push({id:e[2],typeName:e[3]})}return i}n(40863),n(94985),n(68249);const p=e=>o.get(e)??"radial-root-centric";function d(e){if(!e.spatialReference.isWGS84)throw new i.A("knowledge-graph:layer-support-utils","The utilsExtentToInBoundsRings function only supports WGS84 spatial references.");return e.clone().normalize().map(e=>[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]])}},37531:(e,t,n)=>{n.d(t,{dt:()=>c,GG:()=>g,UQ:()=>f,Sx:()=>d});var i=n(68197),r=n(60999),o=(n(44208),n(51850)),s=(n(76369),n(62046)),a=(n(2741),n(11254),n(66344));new Map([["dash",[4,3]],["dashdot",[4,3,1,3]],["dot",[1,3]],["longdash",[8,3]],["longdashdot",[8,3,1,3]],["longdashdotdot",[8,3,1,3,1,3]],["shortdash",[4,1]],["shortdashdot",[4,1,1,1]],["shortdashdotdot",[4,1,1,1,1,1]],["shortdot",[1,1]],["solid",[]]]),new a.q(1e3),new i.A([128,128,128]);var l=n(28975),p=n(33910);function d(e,t){if(!e)return null;let n=null;return(0,p.wk)(e)?n=function(e){const t=e.symbolLayers;if(!t)return null;let n=null;return t.forEach(e=>{"object"===e.type&&e.resource?.href||(n="water"===e.type?e.color:e.material?e.material.color:null)}),n?new i.A(n):null}(e):(0,p.$y)(e)&&(n="cim"===e.type?(0,s.Nk)(e):e.color?new i.A(e.color):null),n?u(n,t):null}function u(e,t){if(null==t||null==e)return e;const n=e.toRgba();return n[3]=n[3]*t,new i.A(n)}function c(e,t,n){e&&(t||null!=n)&&(t&&(t=new i.A(t)),(0,p.wk)(e)?function(e,t,n){const r=e.symbolLayers;if(!r)return;const o=(e,r=!1)=>{let o=t??e??null;return null!=n?.override&&(!o&&r&&(o=new i.A([255,255,255])),o&&(o.a=n.override)),u(o,n?.add)};r.forEach(e=>{if("water"===e.type)return void(e.color=u(e.color,n?.add));const t=null!=e.material?e.material.color:null,i=o(t,"icon"===e.type&&null!=e.resource?.href);null==e.material?e.material=new l.N({color:i}):e.material.color=i,"outline"in e&&e.outline?.color&&null!=n?.add&&(e.outline.color=u(e.outline.color,n.add)),"marker"in e&&null!=e.marker&&(e.marker.color=o(e.marker.color))})}(e,t,n):(0,p.$y)(e)&&function(e,t,n){t=t??e.color,null!=n?.override&&t&&(t.a=n.override),t&&(e.color=u(t,n?.add)),"outline"in e&&e.outline?.color&&(e.outline.color=u(e.outline.color,n?.add))}(e,t,n))}function h(e){for(const t of e)if("number"==typeof t)return t;return null}function y(e,t,n){for(let i=0;i<3;i++){const r=e[i];switch(r){case"symbol-value":{const e=n[i];return null!=e?e/t[i]:1}case"proportional":break;default:if(r&&t[i])return r/t[i]}}return null}function m(e,t,n,i){switch(e){case"proportional":return n*i;case"symbol-value":return null!=t?t:n;default:return e}}async function f(e,t){if(e&&t)return(0,p.wk)(e)?async function(e,t){const i=e.symbolLayers;i&&await(0,r.jJ)(i,async e=>async function(e,t){switch(e.type){case"extrude":!function(e,t){const n=t[2];"number"==typeof n&&(e.size=n)}(e,t);break;case"icon":case"line":case"text":!function(e,t){const n=h(t);null!=n&&(e.size=n)}(e,t);break;case"path":!function(e,t){const n=y(t,o.Un,[e.width,void 0,e.height]);null!=n&&(e.width=m(t[0],e.width,1,n),e.height=m(t[2],e.height,1,n))}(e,t);break;case"object":await async function(e,t){const{resourceSize:i,symbolSize:r}=await async function(e){const{computeObjectLayerResourceSize:t}=await n.e(5404).then(n.bind(n,95404)),i=await t(e,10),{width:r,height:o,depth:s}=e,a=[r,s,o];let l=1;for(let e=0;e<3;e++){const t=a[e];if(null!=t){l=t/i[e];break}}for(let e=0;e<3;e++)null==a[e]&&(a[e]=i[e]*l);return{resourceSize:i,symbolSize:a}}(e),o=y(t,i,r);null!=o&&(e.width=m(t[0],r[0],i[0],o),e.depth=m(t[1],r[1],i[1],o),e.height=m(t[2],r[2],i[2],o))}(e,t)}}(e,t))}(e,t):void((0,p.$y)(e)&&function(e,t){const n=h(t);if(null!=n)switch(e.type){case"simple-marker":e.size=n;break;case"picture-marker":{const t=e.width/e.height;t>1?(e.width=n,e.height=n*t):(e.width=n*t,e.height=n);break}case"simple-line":e.width=n;break;case"text":e.font.size=n}}(e,t))}function g(e,t,n){if(e&&null!=t)if((0,p.wk)(e)){const i=e.symbolLayers;i&&i.forEach(e=>{if("object"===e.type)switch(n){case"tilt":e.tilt=(e.tilt??0)+t;break;case"roll":e.roll=(e.roll??0)+t;break;default:e.heading=(e.heading??0)+t}"icon"===e.type&&(e.angle+=t)})}else if((0,p.$y)(e))switch(e.type){case"simple-marker":case"picture-marker":case"text":e.angle+=t;break;case"cim":(0,s.KU)(e,t,!0)}}},37730:(e,t,n)=>{n.d(t,{T:()=>r});var i=n(43334);const r={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t)=>new i.Om(t,e.attributes,null,e.objectId),getGeometry:e=>e.geometry,getCentroid:(e,t)=>e.ensureCentroid(t)}},40662:(e,t,n)=>{n.d(t,{A:()=>s});var i=n(31635),r=n(91429),o=n(77901);let s=class extends o.A{constructor(e){super(e)}};s=(0,i.Cg)([(0,r.$K)("esri.rest.knowledgeGraph.ObjectValue")],s)},42095:(e,t,n)=>{n.d(t,{A:()=>a});var i=n(31635),r=n(25482),o=n(91429),s=n(77901);let a=class extends r.o{constructor(e){super(e),this.path=[]}};(0,i.Cg)([(0,o.MZ)({type:[s.A],json:{write:!0}})],a.prototype,"path",void 0),a=(0,i.Cg)([(0,o.$K)("esri.rest.knowledgeGraph.Path")],a)},42538:(e,t,n)=>{n.d(t,{A:()=>l});var i=n(31635),r=n(91429),o=n(16930),s=n(69622);let a=class extends s.A{constructor(e){super(e),this.openCypherQuery=""}};(0,i.Cg)([(0,r.MZ)()],a.prototype,"openCypherQuery",void 0),a=(0,i.Cg)([(0,r.$K)("esri.rest.knowledgeGraph.GraphQuery")],a);let l=class extends a{constructor(e){super(e),this.bindParameters=null,this.bindGeometryQuantizationParameters=null,this.outputQuantizationParameters=null,this.outputSpatialReference=null,this.provenanceBehavior=null}};(0,i.Cg)([(0,r.MZ)()],l.prototype,"bindParameters",void 0),(0,i.Cg)([(0,r.MZ)()],l.prototype,"bindGeometryQuantizationParameters",void 0),(0,i.Cg)([(0,r.MZ)()],l.prototype,"outputQuantizationParameters",void 0),(0,i.Cg)([(0,r.MZ)({type:o.A})],l.prototype,"outputSpatialReference",void 0),(0,i.Cg)([(0,r.MZ)()],l.prototype,"provenanceBehavior",void 0),l=(0,i.Cg)([(0,r.$K)("esri.rest.knowledgeGraph.GraphQueryStreaming")],l)},54238:(e,t,n)=>{n.d(t,{A:()=>s});var i=n(31635),r=n(91429),o=n(77901);let s=class extends o.A{constructor(e){super(e),this.typeName=null,this.id=null}};(0,i.Cg)([(0,r.MZ)({type:String,json:{write:!0}})],s.prototype,"typeName",void 0),(0,i.Cg)([(0,r.MZ)({type:String,json:{write:!0}})],s.prototype,"id",void 0),s=(0,i.Cg)([(0,r.$K)("esri.rest.knowledgeGraph.GraphNamedObject")],s)},54898:(e,t,n)=>{n.d(t,{Gz:()=>$,O9:()=>G,hZ:()=>P,CP:()=>q,dD:()=>Z,UT:()=>R,MY:()=>F,Td:()=>D,iW:()=>j,e$:()=>B,qN:()=>k});var i=n(68197),r=n(49186),o=n(91869),s=(n(85105),n(58769));n(39410),n(33421),n(21774),n(93885);const a=s.A;var l=n(965),p=n(91218),d=n(16930),u=n(17136),c=n(99352),h=n(15375),y=n(29005),m=n(46499),f=n(73913),g=n(77548),b=n(48441),w=n(25927),_=n(31635),M=n(69622),I=n(91429);let T=class extends M.A{constructor(e){super(e),this.entityAdds=void 0,this.entityUpdates=void 0,this.entityDeletes=void 0,this.relationshipAdds=void 0,this.relationshipUpdates=void 0,this.relationshipDeletes=void 0,this.options=void 0}};(0,_.Cg)([(0,I.MZ)()],T.prototype,"entityAdds",void 0),(0,_.Cg)([(0,I.MZ)()],T.prototype,"entityUpdates",void 0),(0,_.Cg)([(0,I.MZ)()],T.prototype,"entityDeletes",void 0),(0,_.Cg)([(0,I.MZ)()],T.prototype,"relationshipAdds",void 0),(0,_.Cg)([(0,I.MZ)()],T.prototype,"relationshipUpdates",void 0),(0,_.Cg)([(0,I.MZ)()],T.prototype,"relationshipDeletes",void 0),(0,_.Cg)([(0,I.MZ)()],T.prototype,"options",void 0),T=(0,_.Cg)([(0,I.$K)("esri.rest.knowledgeGraph.GraphApplyEdits")],T);var C=n(23150),v=n(54218),A=n(40863),x=n(68249);const E={initializeLayersFromClientData:async(e,t,n)=>{if(t||(t=[...e.layers,...e.tables].map(e=>e.graphTypeName)),0===t?.length)return;const i=new Map;for(const n of t)i.set(n,S(e,n));const r=await(0,b.fetchClientDataAtKeys)(e.dataManager.knowledgeGraph,Array.from(i.values()),{requestOptions:{signal:n?.signal}});for(const t of[...e.layers,...e.tables]){const n=t.objectType.name;if(null==n)continue;const i=r.get(S(e,n));if(i){const e=JSON.parse(i);null===e||"object"!=typeof e||e.hasOwnProperty("showLabels")||(e.showLabels=!1),t.read(e,{origin:"service"})}}},getInclusionDefinitionFromCypherResults:async(e,t,n)=>{const i=U(e.dataModel),r=(await(0,b.executeQueryStreaming)(e,t,n)).resultRowsStream.getReader();for(;;){const{done:e,value:t}=await r.read();if(e)break;for(const e of t)for(const t of e)z(t,i)}return i},getInclusionDefinitionFromIdTypePairs:(e,t)=>{const n=U(e.dataModel);for(const{id:e,typeName:i}of t){const t=n.namedTypeDefinitions.get(i);if(!t)throw new r.A("WebLinkChart:data-model-desync","The provided id-type pairs contained a named type not reflected in the provided knowledge graph data model.");t.members?.set(e,{id:e})}return n}},S=(e,t)=>"knowledge-graph"===e.type?`${t}/Map`:`${t}/LinkChart/LinkChartSubLayer`;async function k(e,t,n){return E.initializeLayersFromClientData(e,t,n)}const N=["#4a0932","#b31515","#18382e","#a64f1b","#102432","#8c213f","#ed9310","#2c6954","#144d59","#ffc730","#75351e","#454f4b","#78b1c2","#191921","#8f8f82","#9be0c0","#dbb658","#87b051","#11495c","#c43541","#9c5596","#44498b","#ad9d63","#86afb3","#5c98ca","#b0bfa2","#73241f","#b86b53","#d9d78c","#3e756d","#f260a1","#a0d17d","#c27c30","#eb82eb","#ffdf3c","#ffb259","#ab52b3","#3cccb4","#0095ba","#d92b30"],L="#8f8f82";function D(e){return e<0||e>=N.length?new i.A(L):new i.A(N[e])}function R(e){const t=e.toArray();return new A.A({data:{type:"CIMSymbolReference",symbol:{type:"CIMLineSymbol",symbolLayers:[{type:"CIMSolidStroke",enable:!0,style:"solid",width:.75,color:t},{type:"CIMVectorMarker",enable:!0,size:6,markerPlacement:{type:"CIMMarkerPlacementOnLine",angleToLine:!0,relativeTo:"LineMiddle"},frame:{xmin:-10,ymin:-5,xmax:0,ymax:5},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{rings:[[[-12,-3.47],[-12,3.6],[1.96,-.03],[-12,-3.47]]]},symbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:t}]}}]}]}}})}function F(e){let t="ESRI__ID",n=4;for(const i of e)if(i.name){if("name"===i.name.toLowerCase()){t=i.name;break}i.name.toLowerCase().includes("name")?(t=i.name,n=2):"esriFieldTypeString"===i.fieldType&&n>3&&(t=i.name,n=3)}return t}function j(e,t,n){const i={color:[80,80,80],haloColor:[255,255,255],haloSize:.7,font:{size:10,weight:"normal"}},r=new m.A({labelExpressionInfo:new f.A({expression:"ESRI__ID"===n?`${t}`:`$feature.${n}`}),labelPlacement:"above-center",symbol:new x.A(i)}),o=new m.A({labelExpressionInfo:new f.A({expression:`'${t}' + IIf($feature.ESRI__AggregationCount>1, ' (' + $feature.ESRI__AggregationCount + ')', '')`}),labelPlacement:"center-along",labelPosition:"parallel",repeatLabel:!1,symbol:new x.A({...i,yoffset:"12px"})});return"entity"===e?[r]:[o]}function B(e,t,n){const i={color:[255,255,255],haloColor:[0,0,0],haloSize:.7,font:{size:10,weight:"bold"}},r="ESRI__ID"===n?`${e}`:`$feature.${n}`;return"point"===t?[new m.A({labelExpressionInfo:new f.A({expression:r}),labelPlacement:"above-center",symbol:new x.A(i)})]:"polyline"===t?[new m.A({labelExpressionInfo:new f.A({expression:r}),labelPlacement:"center-along",repeatLabel:!0,symbol:new x.A(i)})]:"polygon"===t?[new m.A({labelExpressionInfo:new f.A({expression:r}),labelPlacement:"always-horizontal",symbol:new x.A(i)})]:null}const O={capabilities:[],allowGeometryUpdates:!1,serviceCapabilities:{geometryCapabilities:{supportsZValues:!1,supportsMValues:!1}}};function P(e){const{capabilities:t,allowGeometryUpdates:n,serviceCapabilities:{geometryCapabilities:{supportsZValues:i,supportsMValues:r}}}=e?.serviceDefinition||O,o=e?.dataModel.arcgisManaged?t:t.filter(e=>"Query"===e),s=new Set(o);return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:r,supportsZ:i},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:s.has("Create"),supportsDelete:s.has("Delete"),supportsEditing:s.has("Editing"),supportsChangeTracking:!1,supportsQuery:s.has("Query"),supportsQueryBins:!1,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:s.has("Update"),supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},query:c.F,queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:c.P,editing:{supportsGeometryUpdate:!!e?.dataModel.arcgisManaged&&n,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:s.has("Delete"),supportsUpdateByAnonymous:!1,supportsUpdateByOthers:s.has("Update"),supportsAsyncApplyEdits:!1,zDefault:void 0}}}async function G(e,t){const n=new T,i=t.graphTypeName,r=t.graphType,s="knowledge-graph"===t.parentCompositeLayer.type?t.geometryFieldName:null,a=!!t.fieldsIndex.get(s)?.editable,l=e=>{const n={...e};for(const e of t.fields)e.editable||delete n[e.name];for(const t of Object.keys(e))t.includes("ESRI__")&&delete n[t];return n},c=async e=>{await(0,p.initializeProjection)(e.spatialReference,d.A.WGS84);const t=(0,p.project)(e,d.A.WGS84);return"point"===t.type?t.normalize():(await(0,u.el)(t))[0]};for(const t of e.addFeatures??[]){const e=l(t.attributes);(0,g.UC)(t.sourceLayer)&&t.sourceLayer.graphTypeName===i&&("entity"===r?(n.entityAdds||(n.entityAdds=[]),s&&t.geometry&&(e[s]=await c(t.geometry)),n.entityAdds.push(new w.A({properties:e,typeName:i}))):(n.relationshipAdds||(n.relationshipAdds=[]),n.relationshipAdds.push(new C.A({properties:e,typeName:i}))))}for(const t of e.updateFeatures??[]){const e=t.attributes[h.dr],o=l(t.attributes);(0,g.UC)(t.sourceLayer)&&t.sourceLayer.graphTypeName===i&&("entity"===r?(n.entityUpdates||(n.entityUpdates=[]),s&&a&&t.geometry&&(o[s]=await c(t.geometry)),n.entityUpdates.push(new w.A({id:e,properties:o,typeName:i}))):(n.relationshipUpdates||(n.relationshipUpdates=[]),n.relationshipUpdates.push(new C.A({id:e,properties:o,typeName:i}))))}const y=new Map;for(const t of e.deleteFeatures??[])if((0,v.DU)(t)){const e=t,n=(0,o.tE)(y,e.sourceLayer.graphTypeName,()=>({typeName:e.sourceLayer.graphTypeName,ids:[]}));e.sourceLayer.graphTypeName===i&&n.ids.push(e.attributes[h.dr])}else t.objectId&&"string"==typeof t.objectId&&(0,o.tE)(y,i,()=>({typeName:i,ids:[]})).ids.push(t.objectId);for(const e of y.values())e.ids.length>0&&("entity"===r?(n.entityDeletes||(n.entityDeletes=[]),n.entityDeletes.push({typeName:e.typeName,ids:e.ids})):(n.relationshipDeletes||(n.relationshipDeletes=[]),n.relationshipDeletes.push({typeName:e.typeName,ids:e.ids})));return n}function $(e,t){const n={addFeatureResults:[],updateFeatureResults:[],deleteFeatureResults:[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]};for(const i of e.editResults)if(i.typeName===t){for(const e of i.adds)n.addFeatureResults.push({objectId:e.id,globalId:e.id});for(const e of i.updates)n.updateFeatureResults.push({objectId:e.id,globalId:e.id});for(const e of i.deletes)n.deleteFeatureResults.push({objectId:e.id,globalId:e.id})}return n}function Z(e){if(!e.objectType)return null;const t=[];for(const n of e.fields)!n.name.includes("ESRI__")&&n.editable&&"geometry"!==n.type&&t.push(new a({fieldName:n.name}));return new l.A({elements:t})}function q(e){if(!e.objectType)return null;let t=null;switch(e.geometryType){case"point":case"multipoint":t="point";break;case"polyline":t="line";break;case"polygon":t="polygon";break;default:t=null}return[new y.A({name:e.graphTypeName,drawingTool:t,prototype:{}})]}function U(e){const t={namedTypeDefinitions:new Map,generateAllSublayers:!1},{entityTypes:n,relationshipTypes:i}=e,r=[...n,...i];for(const e of r)t.namedTypeDefinitions.set(e.name,{useAllData:!1,members:new Map});return t}function z(e,t){if(e&&"object"==typeof e)if(function(e){return!(!e||"object"!=typeof e||Array.isArray(e))&&"id"in e&&"typeName"in e}(e)){const n=t.namedTypeDefinitions.get(e.typeName);if(!n)throw new r.A("WebLinkChart:data-model-desync","The query result contained a named type not reflected in the provided knowledge graph data model.");n.members.set(e.id,{id:e.id})}else if(function(e){return!(!e||"object"!=typeof e||Array.isArray(e))&&e&&"path"in e&&Array.isArray(e.path)}(e))for(const n of e.path)z(n,t);else if(Array.isArray(e))for(const n of e)z(n,t);else if(function(e){return!(!e||"object"!=typeof e||Array.isArray(e)||"id"in e)&&"properties"in e&&"object"==typeof e.properties}(e))for(const n of Object.values(e.properties??{}))z(n,t)}},62046:(e,t,n)=>{n.d(t,{Fe:()=>d,KU:()=>y,Nk:()=>o});var i=n(68197),r=n(93397);function o(e){const t=[];return s((0,r.lW)(e),t),t.length?new i.A((0,r.e6)(t[0])):null}function s(e,t){if(!e)return;let n;n="CIMTextSymbol"===e.type?e.symbol:e;const i="CIMPolygonSymbol"===e.type;if(n?.symbolLayers)for(const e of n.symbolLayers)if(!(e.colorLocked||i&&((0,r.mA)(e)||(0,r.MM)(e)&&e.markerPlacement&&(0,r.zr)(e.markerPlacement))))switch(e.type){case"CIMPictureMarker":case"CIMPictureStroke":case"CIMPictureFill":e.tintColor&&a(t,e.tintColor);break;case"CIMVectorMarker":e.markerGraphics?.forEach(e=>{s(e.symbol,t)});break;case"CIMSolidStroke":case"CIMSolidFill":a(t,e.color);break;case"CIMGradientFill":l(t,e);break;case"CIMHatchFill":s(e.lineSymbol,t)}}function a(e,t){for(const n of e)if(n.join(".")===t.join("."))return;e.push(t)}function l(e,t){const n=t.colorRamp?.type;switch(n){case"CIMMultipartColorRamp":t.colorRamp.colorRamps?.forEach(t=>{"CIMLinearContinuousColorRamp"===t.type&&p(e,t)});break;case"CIMLinearContinuousColorRamp":case"CIMPolarContinuousColorRamp":p(e,t.colorRamp)}}function p(e,t){t&&(t.fromColor&&a(e,t.fromColor),t.toColor&&a(e,t.toColor))}function d(e,t,n){t instanceof i.A||(t=new i.A(t));const o=(0,r.lW)(e);o&&u(o,t,n)}function u(e,t,n){if(!e)return;let i;i="CIMTextSymbol"===e.type?e.symbol:e;const o="CIMPolygonSymbol"===i?.type;if(i?.symbolLayers)for(const e of i.symbolLayers){if(e.colorLocked)continue;if(o)if(n){const{layersToColor:t}=n;if(((0,r.mA)(e)||(0,r.MM)(e)&&e.markerPlacement&&(0,r.zr)(e.markerPlacement))&&"fill"===t||(0,r.jn)(e)&&"outline"===t)continue}else if((0,r.mA)(e)||(0,r.MM)(e)&&e.markerPlacement&&(0,r.zr)(e.markerPlacement))continue;const i=t.toArray();switch(e.type){case"CIMPictureMarker":case"CIMPictureStroke":case"CIMPictureFill":e.tintColor=i;break;case"CIMVectorMarker":e.markerGraphics?.forEach(e=>{u(e.symbol,t,n)});break;case"CIMSolidStroke":case"CIMSolidFill":e.color=i;break;case"CIMGradientFill":c(e,t);break;case"CIMHatchFill":u(e.lineSymbol,t,n)}}}function c(e,t){const n=e.colorRamp?.type;switch(n){case"CIMMultipartColorRamp":e.colorRamp.colorRamps?.forEach(e=>{"CIMLinearContinuousColorRamp"===e.type&&h(e,t)});break;case"CIMLinearContinuousColorRamp":case"CIMPolarContinuousColorRamp":h(e.colorRamp,t)}}function h(e,t){if(e&&(e.fromColor&&(e.fromColor=t.toArray()),e.toColor)){const n=t.clone();n.a=0,e.toColor=n.toArray()}}function y(e,t,n=!1){const i=(0,r.lW)(e);if(n&&(t=360-t),"CIMTextSymbol"!==i?.type){if("CIMPointSymbol"===i?.type&&i.symbolLayers){const e=t-(i.angle||0);for(const t of i.symbolLayers)if((0,r.MM)(t)){let n=t.rotation||0;t.rotateClockwise?n-=e:n+=e,t.rotation=n}i.angle=t}}else i.angle=t}},62796:(e,t,n)=>{n.d(t,{A:()=>me});var i=n(31635),r=n(37838),o=n(49186),s=n(4718),a=n(53966),l=n(25728),p=n(91429),d=(n(29953),n(965)),u=n(5443),c=n(86738),h=n(39829),y=n(82799),m=n(91218),f=n(16930),g=n(21325),b=n(50498),w=n(55156),_=n(60950),M=n(89808),I=n(99959);const T=Symbol("isKnowledgeGraphGraphicOriginSymbol");var C;class v extends I.A{get[(C=T,_.ym)](){return this.sublayer}get[w.e](){return this.sublayer}get[M.Q](){return this.sublayer}constructor(e,t){super(),this[C]=!0,this.type="knowledge-graph",this.layer=e,this.sublayer=t}get id(){return this.layer.id}}const A=Symbol("isLinkChartGraphicOriginSymbol");var x;class E extends I.A{get[(x=A,M.Q)](){return this.layer}constructor(e,t){super(),this[x]=!0,this.type="link-chart",this.layer=e,this.sublayer=t}get id(){return`${this.layer.id}:__${this.sublayer.id}__`}}var S=n(4146),k=n(83221),N=n(56390),L=n(64714),D=n(15375);const R=(0,n(17036).p)(),F=e=>{const t=e;let n=class extends t{constructor(){super(...arguments),this.fields=[],this.fieldsIndex=null}};return(0,i.Cg)([(0,p.MZ)(R.fields)],n.prototype,"fields",void 0),(0,i.Cg)([(0,p.MZ)(R.fieldsIndex)],n.prototype,"fieldsIndex",void 0),n=(0,i.Cg)([(0,p.$K)("esri.layers.knowledgeGraph.KnowledgeGraphSublayerBase")],n),n};var j=n(54898),B=n(63074),O=n(6455),P=n(87718),G=n(56658),$=n(32756),Z=n(54310),q=n(25036),U=n(82935),z=n(10873),Q=n(13213),Y=n(29005),H=n(20437),W=n(30524),K=n(46499),X=n(39383),V=n(96184),J=n(96576),ee=n(65494),te=n(41214),ne=n(48441),ie=n(22671),re=n(61956),oe=n(30291),se=n(88625),ae=n(37531),le=n(61322),pe=n(43937);function de(e){if(!e.json)return e;e.json.write=ue(e.json.write);const t=e.json.origins;if(!t)return e;let n;for(n in t){const e=t[n];e&&(e.write=ue(e.write))}return e}function ue(e){return"object"==typeof e&&e?(!1!==e.enabled&&(e.overridePolicy=function(e){const{target:t,writer:n,overridePolicy:i,...r}=e;return function(e,t){const n=he.call(this,e,t);return n.enabled?{...r,...n}:n}}(e)),e):!0===e?ce():e}function ce(){return{overridePolicy:he}}function he(e,t){const n=!!this.geometryType;let i={enabled:n};return n&&(i={...i,...ye.call(this,e,t)}),i}function ye(e,t){return{ignoreOrigin:this.originIdOf(t)>0}}let me=class extends(F((0,O.FJ)((0,G.J)((0,P.F)((0,B.dM)((0,$.fY)((0,U.e)((0,q.j)((0,Z.J)((0,l.P)(S.A))))))))))){constructor(e){super(e),this.blendMode="normal",this.charts=null,this.definitionExpression=null,this.displayFilterEnabled=!0,this.displayFilterInfo=null,this.effect=null,this.elevationInfo=null,this.featureEffect=null,this.graphType=null,this.labelsVisible=!0,this.layerType=null,this.legendEnabled=!0,this.maxScale=0,this.minScale=0,this.objectIdField=D.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 le.default(e.port1,{channel:e,client:{queryFeatures:(e,t={})=>{const n=re.A.fromJSON(e);return this.queryFeaturesJSON(n,t)}}}),[e.port2]})},this.type="knowledge-graph-sublayer",this.useViewTime=!0,this.visible=!0}get capabilities(){return this.parent?this.parent.sublayerCapabilities:(0,j.hZ)(null)}get userHasUpdateItemPrivileges(){return!!this.parent?.userHasUpdateItemPrivileges}get editingEnabled(){return this._isOverridden("editingEnabled")?this._get("editingEnabled"):this.capabilities.operations.supportsEditing}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get isTable(){return"link-chart"!==this.parentCompositeLayer?.type&&null==this.geometryFieldName}get defaultPopupTemplate(){return this.createPopupTemplate()}set featureReduction(e){const t=this._normalizeFeatureReduction(e);this._set("featureReduction",t)}get fields(){const e=[],t=new Map;for(const e of this.parent?.knowledgeGraph.dataModel.domains??[])t.set(e.name,e);return this.objectType?.properties?.forEach(n=>{const i="esriFieldTypeOID"===n.fieldType?"esriFieldTypeInteger":n.fieldType,r=H.A.fromJSON({name:n.name,type:i,alias:n.alias,defaultValue:n.defaultValue,editable:n.editable,nullable:n.nullable,domain:n.domain&&t.has(n.domain)?t.get(n.domain).toJSON():void 0});e.push(r)}),e.push(H.A.fromJSON({name:this.objectIdField,type:"esriFieldTypeString",alias:this.objectIdField,editable:!1}),H.A.fromJSON({name:D.M1,type:"esriFieldTypeInteger",alias:D.M1,editable:!1}),H.A.fromJSON({name:D.BL,type:"esriFieldTypeInteger",alias:D.BL,editable:!1})),e}get formTemplate(){return this._isOverridden("formTemplate")?this._get("formTemplate"):(0,j.dD)(this)}set formTemplate(e){this._overrideIfSome("formTemplate",e)}get geometryType(){if("link-chart"===this.parentCompositeLayer?.type)return"relationship"===this.graphType?"polyline":"point";const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.geometryType;return t&&"esriGeometryNull"!==t?b.gy.fromJSON(t):null}get geometryFieldName(){if("link-chart"===this.parentCompositeLayer?.type)return D.T1;const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name);return e?.name??null}get graphicOrigin(){if(!this.parent)return null;switch(this.parent.type){case"knowledge-graph":return new v(this.parent,this);case"link-chart":return new E(this.parent,this)}}get graphTypeName(){return this.objectType?.name}set graphTypeName(e){this._set("graphTypeName",e)}get hasM(){const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.name,n=t?this.objectType?.properties?.[t]:null;return n?.hasM??!1}get hasZ(){const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.name,n=t?this.objectType?.properties?.[t]:null;return n?.hasZ??!1}set labelingInfo(e){this._set("labelingInfo",e)}get labelingInfo(){if(this._isOverridden("labelingInfo"))return this._get("labelingInfo");if(!this.objectType||!this.parentCompositeLayer||!this.graphTypeName)return null;const e=this.objectType.properties?(0,j.MY)(this.objectType.properties):"ESRI__ID";return"link-chart"===this.parentCompositeLayer.type?(0,j.iW)(this.graphType,this.graphTypeName,e):(0,j.e$)(this.graphTypeName,this.geometryType,e)}set renderer(e){(0,W.yp)(e,this.fieldsIndex),this._set("renderer",e)}get renderer(){if(this._isOverridden("renderer"))return this._get("renderer");const e=this.parentCompositeLayer?.dataManager?.knowledgeGraph?.dataModel,t=[...e?.entityTypes??[],...e?.relationshipTypes??[]].map(e=>e.name).indexOf(this.graphTypeName),n=(0,j.Td)(t);if("link-chart"===this.parentCompositeLayer?.type){if("relationship"===this.graphType)return new J.A({type:"simple",symbol:(0,j.UT)(n)});const e=(0,ee.r)((0,L.F0)(b.gy.toJSON("point")).renderer);return(0,ae.dt)(e.symbol,n),e}const i=(0,ee.r)((0,L.F0)(b.gy.toJSON(this.geometryType)).renderer);return(0,ae.dt)(i.symbol,n),i}get spatialReference(){return this.parentCompositeLayer?.dataManager?.knowledgeGraph?.dataModel?.spatialReference??f.A.WGS84}get templates(){return this._isOverridden("templates")?this._get("templates"):(0,j.CP)(this)}set templates(e){this._overrideIfSome("templates",e)}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,oe.tn)(this,e)}createQuery(){return new re.A({where:"1=1",outFields:["*"]})}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){return this.fields.find(t=>t.name===e)?.domain||null}async queryFeatures(e,t){await this.load();const{resolvedQuery:n,queryEngine:i}=await this._setupQueryObjects(e),r=this.graphicOrigin,o=ie.A.fromJSON(await i.executeQuery(n.toJSON(),t?.signal));return o.features.forEach(e=>{e.sourceLayer=this,e.origin=r}),o}async queryFeaturesJSON(e,t){await this.load();const{resolvedQuery:n,queryEngine:i}=await this._setupQueryObjects(e);return await i.executeQuery(n.toJSON(),t?.signal)}async queryFeatureCount(e,t){await this.load();const{resolvedQuery:n,queryEngine:i}=await this._setupQueryObjects(e);return i.executeQueryForCount(n.toJSON(),t?.signal)}async queryExtent(e={},t){await this.load();const n={...e,returnGeometry:!0},{resolvedQuery:i,queryEngine:r}=await this._setupQueryObjects(n),o=await r.executeQueryForExtent(i.toJSON(),t?.signal);let s;return s=null!=o.extent?.xmin&&null!=o.extent?.xmax&&null!=o.extent?.ymin&&null!=o.extent?.ymax?new u.A(o.extent):new u.A,{count:o.count,extent:s}}async queryObjectIds(e,t){await this.load();const n=re.A.from(e);let i;if("link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)i=this._cachedQueryEngine;else{const e=await this.parentCompositeLayer.dataManager.getData(n,this,t);i=this.loadQueryEngine(e)}return await i.executeQueryForIds(n.toJSON(),t?.signal)}async applyEdits(e){if(!this.parentCompositeLayer.dataManager.knowledgeGraph)throw new o.A("knowledge-graph-sublayer:no-knowledge-graph","ApplyEdits cannot be executed because the parent does not have a Knowledge Graph model. This is usually caused by the layer not yet being loaded");const t=await(0,j.O9)(e,this);t.options={cascadeDelete:!0,cascadeProvenanceDelete:!!this.parent?.knowledgeGraph.serviceDefinition.supportsProvenance||void 0};const n=await(0,ne.executeApplyEdits)(this.parentCompositeLayer.dataManager.knowledgeGraph,t),i=(0,j.Gz)(n,this.graphTypeName),r={addedFeatures:i.addFeatureResults,updatedFeatures:i.updateFeatureResults,deletedFeatures:i.deleteFeatureResults,addedAttachments:i.addAttachmentResults,deletedAttachments:i.deleteAttachmentResults,updatedAttachments:i.updateAttachmentResults,exceededTransferLimit:!1,historicMoment:new Date,edits:void 0};return this.emit("edits",r),this.emit("apply-edits",{result:Promise.resolve(r)}),"link-chart"===this.parentCompositeLayer.type&&await this.parentCompositeLayer.refreshLinkChartCache([...r.addedFeatures.map(e=>e.globalId),...r.updatedFeatures.map(e=>e.globalId),...r.deletedFeatures.map(e=>e.globalId)]),i}loadQueryEngine(e){const t=new k.A({geometryType:b.gy.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ}),n=new N.do({fieldsIndex:this.fieldsIndex.toJSON(),geometryType:b.gy.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ,featureIdInfo:{type:"object-id",fieldName:this.objectIdField},spatialReference:this.spatialReference.toJSON(),timeInfo:this.timeInfo?.toJSON(),featureStore:t});return n.featureStore.addMany(e),n}async refreshCachedQueryEngine(){const e=await this.parentCompositeLayer.dataManager.getData(new re.A({where:"1=1",outFields:[D.dr]}),this);this._cachedQueryEngine=this.loadQueryEngine(e)}load(e){return this.addResolvingPromise(this.parent.load(e).then(()=>(0,W.sv)(this.timeInfo,this.fieldsIndex))),Promise.resolve(this)}async _setupQueryObjects(e,t){const n=re.A.from(e),i=n.geometry;if(i&&!i.spatialReference?.isWGS84&&(await(0,m.initializeProjection)(i.spatialReference,g.KK),n.geometry=(0,m.project)(i instanceof h.A||i instanceof y.A||i instanceof c.A?i:i.extent,g.KK)),"link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)return{resolvedQuery:n,queryEngine:this._cachedQueryEngine};const r=await this.parentCompositeLayer.dataManager.getData(n,this,t);return{resolvedQuery:n,queryEngine:this.loadQueryEngine(r)}}};(0,i.Cg)([(0,p.MZ)(de((0,s.o8)(B.sU)))],me.prototype,"blendMode",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],me.prototype,"capabilities",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],me.prototype,"userHasUpdateItemPrivileges",null),(0,i.Cg)([(0,p.MZ)({type:Boolean})],me.prototype,"editingEnabled",null),(0,i.Cg)([(0,p.MZ)()],me.prototype,"isTable",null),(0,i.Cg)([(0,p.MZ)({json:{origins:{"web-scene":{write:!1}},write:ce()}})],me.prototype,"charts",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],me.prototype,"defaultPopupTemplate",null),(0,i.Cg)([(0,p.MZ)({type:String,json:{origins:{service:{read:!1}},name:"layerDefinition.definitionExpression",write:{ignoreOrigin:!0}}})],me.prototype,"definitionExpression",void 0),(0,i.Cg)([(0,p.MZ)(de((0,s.o8)(O.Dp)))],me.prototype,"displayFilterEnabled",void 0),(0,i.Cg)([(0,p.MZ)(de((0,s.o8)(O.KV)))],me.prototype,"displayFilterInfo",void 0),(0,i.Cg)([(0,p.MZ)(de((0,s.o8)(B.LF)))],me.prototype,"effect",void 0),(0,i.Cg)([(0,p.MZ)({type:se.A})],me.prototype,"elevationInfo",void 0),(0,i.Cg)([(0,p.MZ)(de((0,s.o8)(P.Y)))],me.prototype,"featureEffect",void 0),(0,i.Cg)([(0,p.MZ)(de((0,s.o8)(Q.d)))],me.prototype,"featureReduction",null),(0,i.Cg)([(0,p.MZ)()],me.prototype,"fields",null),(0,i.Cg)([(0,p.MZ)({type:d.A})],me.prototype,"formTemplate",null),(0,i.Cg)([(0,p.MZ)()],me.prototype,"geometryType",null),(0,i.Cg)([(0,p.MZ)()],me.prototype,"geometryFieldName",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],me.prototype,"graphicOrigin",null),(0,i.Cg)([(0,p.MZ)({type:["entity","relationship"],nonNullable:!0,json:{write:{isRequired:!0,ignoreOrigin:!0}}})],me.prototype,"graphType",void 0),(0,i.Cg)([(0,p.MZ)({type:String,nonNullable:!0,json:{write:{isRequired:!0,ignoreOrigin:!0}}})],me.prototype,"graphTypeName",null),(0,i.Cg)([(0,p.MZ)()],me.prototype,"hasM",null),(0,i.Cg)([(0,p.MZ)()],me.prototype,"hasZ",null),(0,i.Cg)([(0,p.MZ)({type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0}}})],me.prototype,"id",void 0),(0,i.Cg)([(0,p.MZ)({type:Boolean,value:!0,nonNullable:!0,json:{name:"showLabels",default:!1,write:{overridePolicy(){return{enabled:!!this.geometryType,alwaysWriteDefaults:!0,ignoreOrigin:!0}}}}})],me.prototype,"labelsVisible",void 0),(0,i.Cg)([(0,p.MZ)({type:[K.A],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:function(e,t,n){const i=[["ESRI__AGGREGATION_COUNT",D.M1],["ESRI__ORIGIN_ID",D.Cz],["ESRI__DESTINATION_ID",D.KQ],["ESRI__LAYOUT_GEOMETRY",D.T1]];try{for(const t of e)for(const[e,n]of i)t.labelExpression=t.labelExpression?.replaceAll(e,n),t.labelExpressionInfo?.expression&&(t.labelExpressionInfo.expression=t.labelExpressionInfo.expression.replaceAll(e,n))}catch(e){a.A.getLogger(this).warn("Error updating labelingInfo",e)}return(0,X.w)(e,t,n)},write:ce()}})],me.prototype,"labelingInfo",null),(0,i.Cg)([(0,p.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}}})],me.prototype,"layerType",void 0),(0,i.Cg)([(0,p.MZ)(de((0,s.o8)(z.fV)))],me.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,p.MZ)(de((0,s.o8)(z.hG)))],me.prototype,"maxScale",void 0),(0,i.Cg)([(0,p.MZ)(de((0,s.o8)(z.hn)))],me.prototype,"minScale",void 0),(0,i.Cg)([(0,p.MZ)()],me.prototype,"objectIdField",void 0),(0,i.Cg)([(0,p.MZ)()],me.prototype,"objectType",void 0),(0,i.Cg)([(0,p.MZ)(de((0,s.o8)(z.ke)))],me.prototype,"opacity",void 0),(0,i.Cg)([(0,p.MZ)(de((0,s.o8)($.ne)))],me.prototype,"orderBy",void 0),(0,i.Cg)([(0,p.MZ)({clonable:!1})],me.prototype,"parent",void 0),(0,i.Cg)([(0,p.MZ)()],me.prototype,"parentCompositeLayer",void 0),(0,i.Cg)([(0,p.MZ)(de((0,s.o8)(z.M6)))],me.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,p.MZ)({type:r.A,json:{name:"popupInfo",write:{ignoreOrigin:!0}}})],me.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,p.MZ)({type:Number,json:{write:{overridePolicy:ye}}})],me.prototype,"refreshInterval",void 0),(0,i.Cg)([(0,p.MZ)({types:te.Hg,json:{name:"layerDefinition.drawingInfo.renderer",write:ce()}})],me.prototype,"renderer",null),(0,i.Cg)([(0,p.MZ)()],me.prototype,"source",void 0),(0,i.Cg)([(0,p.MZ)()],me.prototype,"spatialReference",null),(0,i.Cg)([(0,p.MZ)({type:Y.A})],me.prototype,"templates",null),(0,i.Cg)([(0,p.MZ)({type:V.A,json:{name:"layerDefinition.timeInfo",write:{overridePolicy:ye},origins:{"web-document":{name:"layerDefinition.timeInfo",read:!0,write:{overridePolicy:ye}},"portal-item":{name:"layerDefinition.timeInfo",read:!0,write:{overridePolicy:ye}}}}})],me.prototype,"timeInfo",null),(0,i.Cg)([(0,p.MZ)({type:String,json:{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],me.prototype,"title",null),(0,i.Cg)([(0,pe.K)("title")],me.prototype,"writeTitle",null),(0,i.Cg)([(0,p.MZ)({json:{read:!1}})],me.prototype,"type",void 0),(0,i.Cg)([(0,p.MZ)(de((0,s.o8)(U.B)))],me.prototype,"useViewTime",void 0),(0,i.Cg)([(0,p.MZ)({type:Boolean,json:{name:"visibility",write:ce()}})],me.prototype,"visible",void 0),me=(0,i.Cg)([(0,p.$K)("esri.layers.knowledgeGraph.KnowledgeGraphSublayer")],me)},64714:(e,t,n)=>{n.d(t,{F0:()=>a,Vx:()=>d,e2:()=>c,f:()=>h});var i=n(44208),r=n(4718),o=n(99352),s=n(93470);function a(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?s.Cb:"esriGeometryPolyline"===e?s.yM:s.WR}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let p=1;function d(e,t){if((0,i.A)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let n=`this${u(t)} = null;`;for(const t in e)n+=`this${u(t)} = ${JSON.stringify(e[t])};`;const i=new Function(`\n return class AttributesClass$${p++} {\n constructor() {\n ${n};\n }\n }\n `)();return()=>new i}catch(n){return()=>({[t]:null,...e})}}function u(e){return l.test(e)?`.${e}`:`["${e}"]`}function c(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,r.o8)(e)}}]}function h(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:!0,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:o.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:o.P,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}}}},67996:(e,t,n)=>{n.d(t,{cZ:()=>S,XW:()=>D,fe:()=>k});var i=n(11254),r=n(49186),o=n(91869),s=(n(90708),n(92722)),a=n(16930);class l{constructor(){this.version="",this.queryResult=new p}}class p{constructor(){this.featureResult=new d}}class d{constructor(){this.objectIdFieldName="",this.uniqueIdField=new u,this.globalIdFieldName="",this.geohashFieldName="",this.geometryProperties=new c,this.geometryType=null,this.spatialReference=new a.A,this.exceededTransferLimit=!1,this.hasZ=!1,this.hasM=!1,this.transform=new h,this.fields=[],this.fieldNameToAttributeIndexMap={},this.values=[],this.features=[],this.geometryFields=[]}}class u{constructor(){this.name="",this.isSystemMaintained=!1}}class c{constructor(){this.shapeAreaFieldName="",this.shapeLengthFieldName="",this.units=""}}class h{constructor(){this.quantizeOriginPosition="upperLeft",this.scale=new y,this.translate=new m}}class y{constructor(){this.xScale=0,this.yScale=0,this.mScale=0,this.zScale=0}}class m{constructor(){this.xTranslate=0,this.yTranslate=0,this.mTranslate=0,this.zTranslate=0}}class f{constructor(){this.name="",this.fieldType="esriFieldTypeString",this.alias="",this.sqlType="sqlTypeVarchar",this.domain="",this.defaultValue=""}}class g{constructor(){this.attributes=[],this.compressedGeometry=new b,this.centroid=new b,this.aggregateGeometries=[]}}class b{constructor(){this.geometryType=null,this.lengths=[],this.coords=[]}}const w=["ELEMENTUID","TYPENAME"];var _=n(45724),M=n(35448);const I={upperLeft:0,lowerLeft:1},T={sqlTypeBigInt:0,sqlTypeBinary:1,sqlTypeBit:2,sqlTypeChar:3,sqlTypeDate:4,sqlTypeDecimal:5,sqlTypeDouble:6,sqlTypeFloat:7,sqlTypeGeometry:8,sqlTypeGUID:9,sqlTypeInteger:10,sqlTypeLongNVarchar:11,sqlTypeLongVarbinary:12,sqlTypeLongVarchar:13,sqlTypeNChar:14,sqlTypeNVarChar:15,sqlTypeOther:16,sqlTypeReal:17,sqlTypeSmallInt:18,sqlTypeSqlXml:19,sqlTypeTime:20,sqlTypeTimestamp:21,sqlTypeTimestamp2:22,sqlTypeTinyInt:23,sqlTypeVarbinary:24,sqlTypeVarchar:25};var C=n(93637);function v(e){const t=new b;t.geometryType=(0,C.i7)(M.bV,e.geometry_type.value);const n=[],i=[];for(let t=0;t<e.lengths.length;t++)n.push(e.lengths[t]);for(let t=0;t<e.coords.length;t++)i.push(e.coords[t]);return t.lengths=n,t.coords=i,t}function A(e){const t=new f;return t.name=e.name,t.alias=e.alias,t.fieldType=(0,C.i7)(M.r5,e.field_type.value),t.sqlType=(0,C.i7)(T,e.sql_type.value),t.domain=e.domain,t.defaultValue=e.default_value,t}function x(e){const t=A(e);return t.geometryType=(0,C.i7)(M.bV,e.geometry_type.value),t}function E(e){const t=new h;t.quantizeOriginPosition=(0,C.i7)(I,e.quantizeOriginPosition.value);const n=t.scale,i=e.scale;n.xScale=i.xScale,n.yScale=i.yScale,n.mScale=i.mScale,n.zScale=i.zScale;const r=t.translate,o=e.translate;return r.xTranslate=o.xTranslate,r.yTranslate=o.yTranslate,r.mTranslate=o.mTranslate,r.zTranslate=o.zTranslate,t}async function S(e,t,n){t??=!1;const s={generateAllSublayers:t,namedTypeDefinitions:new Map};return await async function(e,t){const n=await(0,i.A)(e,{responseType:"array-buffer",signal:t?.signal}),o=await n.data;return async function(e){const t=new((await(0,_.I)()).MapOfObjectIdentifierSetsDecoder),n=t.decode(new Uint8Array(e)),i=new Map;if(0!==n.error_code)throw new r.A("knowledge-graph:layer-support-utils",n.error_message);const o=t.get_map_of_identifier_sets(),s=o.keys,a=s.size();for(let e=0;e<a;e++){const t=s.get(e),n=o.query_identifier_set(t),a=[];if(1===n.id_array_type.value){const e=n.get_globalid_array(),t=e.count();for(let n=0;n<t;n++)a.push(e.get_globalid_at(n))}else if(3===n.id_array_type.value){const e=n.get_identifier_array(),t=e.count();for(let n=0;n<t;n++)a.push(e.get_identifier_at(n).toString())}else if(2===n.id_array_type.value){const e=n.get_string_array(),t=e.count();for(let n=0;n<t;n++)a.push(e.get_string_at(n))}else{if(0!==n.id_array_type.value)throw new r.A("knowledge-graph:layer-support-utils","Tried to encode an unexpected ID Array type.");{const e=n.get_oid_array(),t=e.count();for(let n=0;n<t;n++)a.push(e.get_objectid_at(n).toString())}}i.set(t,a)}return t.delete(),i}(new Uint8Array(o))}(e,n).then(e=>{!function(e,t){for(const[n,i]of e){const e=(0,o.tE)(t.namedTypeDefinitions,n,()=>({useAllData:!1,members:new Map}));for(const t of i)e.members.has(t)||e.members.set(t,{id:t})}}(e,s)}),s}async function k(e){const t=await(0,_.I)(),n=new t.MapOfObjectIdentifierSets;!function(e,t,n){for(const[i,r]of n.namedTypeDefinitions){if(!r.members||r.useAllData)continue;const n=r.members.keys();let o=!1,s=!0;const a=new t.ObjectIdArray,l=new t.StringArray,p=new t.GlobalIdArray,d=new t.IdentifierArray,u=new t.ObjectIdentifierSet;for(const e of n)s&&(o=!isNaN(Number(e)),s=!1),o?a.add_objectid(Number(e)):(l.add_string(e),p.add_globalid(e)),d.add_identifier(e);u.set_oid_array(a),u.set_string_array(l),u.set_globalid_array(p),u.set_identifier_array(d),a.delete(),l.delete(),p.delete(),d.delete(),e.put_identifier_set(i,u),u.delete()}}(n,t,e);const i=new t.MapOfObjectIdentifierSetsEncoder;try{i.set_map_of_identifier_sets(n),i.encode();const e=i.get_encoding_result();if(0!==e.error.error_code)throw new r.A("knowledge-graph:layer-support-utils",e.error.error_message);const t=structuredClone(e.get_byte_buffer());return i.delete(),t}finally{n.delete()}}async function N(e,t){const n=await(0,i.A)(e,{responseType:"array-buffer",signal:t?.signal});return async function(e){const t=new((await(0,_.I)()).FeatureCollectionDecoder),n=t.decode(new Uint8Array(e));if(0!==n.error_code)throw new r.A("knowledge-graph:layer-support-utils",n.error_message);const i=function(e){const t=new l;t.version=e.version;const n=e.get_query_result();if(0!==n.results_type.value)throw new Error("Got a non-feature collection type");const i=n.get_feature_result(),r=t.queryResult.featureResult;r.objectIdFieldName=i.objectid_field_name,r.exceededTransferLimit=i.exceeded_transfer_limit,r.hasM=i.has_m,r.hasZ=i.has_z,r.geometryType=(0,C.i7)(M.bV,i.geometry_type.value),r.globalIdFieldName=i.globalid_field_name,r.geohashFieldName=i.geohash_field_name;const o=r.uniqueIdField,s=i.unique_id_field;o.name=s.name,o.isSystemMaintained=s.isSystemMaintained;const a=r.geometryProperties,p=i.geometry_properties;a.shapeAreaFieldName=p.shapeAreaFieldName,a.shapeLengthFieldName=p.shapeLengthFieldName,a.units=p.units;const d=r.spatialReference,u=i.spatial_reference;d.wkid=u.wkid,d.latestWkid=u.latestWkid,d.vcsWkid=u.vcsWkid,d.latestVcsWkid=u.latestVcsWkid,d.wkt=u.wkt,r.transform=E(i.transform);const c=r.fields,h=r.fieldNameToAttributeIndexMap,y=i.fields,m=y.size();for(let e=0;e<m;e++){const t=y.get(e),n=A(t);c.push(n),h[n.name]=e,t.delete()}y.delete();const f=r.values,b=i.values_count();for(let e=0;e<b;e++)f.push(i.get_value_at(e));const _=r.features,I=i.features,T=I.size();if(T>0)for(const e of w)if(void 0===h[e])throw new Error(`Feature collection missing required attribute: ${e}`);for(let e=0;e<T;e++){const t=new g,n=I.get(e),i=t.attributes,r=n.attributes_count();for(let e=0;e<r;e++)i.push(n.get_attribute_at(e));const o=n.get_compressed_geometry();o&&(t.compressedGeometry=v(o),t.centroid=v(n.get_centroid()));const s=t.aggregateGeometries,a=n.aggregate_geometries,l=a.size();for(let e=0;e<l;e++){const t=a.get(e),n=v(t);s.push(n),t.delete()}a.delete(),_.push(t),n.delete()}I.delete();const S=r.geometryFields,k=i.geometry_fields,N=k.size();for(let e=0;e<N;e++){const t=k.get(e),n=x(t);S.push(n),t.delete()}return k.delete(),t}(t.get_feature_collection());return t.delete(),i}(await n.data)}function L(e,t){if(!e?.queryResult?.featureResult)return t;const{hasZ:n,hasM:i}=e.queryResult.featureResult,r=e.queryResult.featureResult.fieldNameToAttributeIndexMap;for(const a of e.queryResult.featureResult.features){const e=a.attributes[r.TYPENAME],l=(0,o.tE)(t.namedTypeDefinitions,e,()=>({useAllData:!1,members:new Map})),p=a.attributes[r.ELEMENTUID];if(a.compressedGeometry?.coords?.length>0){let e=a.compressedGeometry.lengths;"esriGeometryPoint"===a.compressedGeometry.geometryType&&(e=[]),l.members.set(p,{id:p,linkChartLocation:new s.A(e,a.compressedGeometry.coords,n,i)})}else l.members.set(p,{id:p})}return t}const D={fetchAndConvertSerializedLinkChart:(e,t)=>async function(e,t){const n=[],i={generateAllSublayers:!1,namedTypeDefinitions:new Map};return e.entitiesUrl&&n.push(N(e.entitiesUrl,t).then(e=>{L(e,i)})),e.relationshipsUrl&&n.push(N(e.relationshipsUrl,t).then(e=>{L(e,i)})),await Promise.all(n),i}(e,t)}},69860:(e,t,n)=>{n.d(t,{A:()=>a});var i=n(65864),r=n(90708),o=n(43334),s=n(15375);class a{constructor(){this._featureLookup=new Map}static getInstance(){return a.instance||(a.instance=new a),a.instance}static resetInstance(){a.instance&&(a.instance=null)}deleteFromStore(e){e.forEach(e=>{this._featureLookup.delete(e)})}readFromStoreByList(e){const t=[];return e.forEach(e=>{const n=this.readFromStoreById(e);n&&t.push(n)}),t}readFromStoreById(e){return this._featureLookup.get(e)??null}writeToStore(e,t,n){const a=[];return e.forEach(e=>{if(!e?.id)return;e.properties||(e.properties=[]);let l=null;n&&e.properties[n]&&(l=(0,r.Ux)(e.properties[n])),"originId"in e&&"destinationId"in e&&(e.properties[s.Cz]=e.originId,e.properties[s.KQ]=e.destinationId),e.properties[t]=e.id;let p=e.properties;if(e.id){const t=this._featureLookup.get(e.id);if(t?.attributes){p={...t.attributes,...p};const e=n&&p[n];null!=e&&(p[n]=(0,i.rS)(e)),l=l??t.geometry}}const d=new o.Om(l?.clone(),p,null,e.id);this._featureLookup.set(`${e.typeName?`${e.typeName}__${e.id}`:e.id}`,d),a.push(d)}),a}}},75503:(e,t,n)=>{n.d(t,{EC:()=>v,wq:()=>a});var i=n(4576),r=n(21818),o=(n(44208),n(15142)),s=n(11006);class a{constructor(e=9,t){this._compareMinX=c,this._compareMinY=h,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),M.prune(),I.prune(),T.prune(),C.prune()}all(e){l(this._data,e)}search(e,t){let n=this._data;const i=this._toBBox;if(w(e,n))for(M.clear();n;){for(let r=0,o=n.children.length;r<o;r++){const o=n.children[r],s=n.leaf?i(o):o;w(e,s)&&(n.leaf?t(o):b(e,s)?l(o,t):M.push(o))}n=M.pop()}}collides(e){let t=this._data;const n=this._toBBox;if(!w(e,t))return!1;for(M.clear();t;){for(let i=0,r=t.children.length;i<r;i++){const r=t.children[i],o=t.leaf?n(r):r;if(w(e,o)){if(t.leaf||b(e,o))return!0;M.push(r)}}t=M.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,n=e.length;t<n;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new x([]),this}remove(e){if(!e)return this;let t,n=this._data,o=null,s=0,a=!1;const l=this._toBBox(e);for(T.clear(),C.clear();n||T.length>0;){if(n||(n=T.pop(),o=T.data[T.length-1],s=C.pop()??0,a=!0),n.leaf&&(t=(0,i.qh)(n.children,(0,r.zI)(e),n.children.length,n.indexHint),-1!==t))return n.children.splice(t,1),T.push(n),this._condense(T),this;a||n.leaf||!b(n,l)?o?(s++,n=o.children[s],a=!1):n=null:(T.push(n),C.push(s),s=0,o=n,n=n.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,n,i){const r=n-t+1;let o=this._maxEntries;if(r<=o){const i=new x(e.slice(t,n+1));return p(i,this._toBBox),i}i||(i=Math.ceil(Math.log(r)/Math.log(o)),o=Math.ceil(r/o**(i-1)));const s=new E([]);s.height=i;const a=Math.ceil(r/o),l=a*Math.ceil(Math.sqrt(o));_(e,t,n,l,this._compareMinX);for(let r=t;r<=n;r+=l){const t=Math.min(r+l-1,n);_(e,r,t,a,this._compareMinY);for(let n=r;n<=t;n+=a){const r=Math.min(n+a-1,t);s.children.push(this._build(e,n,r,i-1))}}return p(s,this._toBBox),s}_insert(e,t,n){const i=this._toBBox,r=n?e:i(e);T.clear();const o=function(e,t,n,i){for(;i.push(t),!0!==t.leaf&&i.length-1!==n;){let n,i=1/0,r=1/0;for(let o=0,s=t.children.length;o<s;o++){const s=t.children[o],a=y(s),l=f(e,s)-a;l<r?(r=l,i=a<i?a:i,n=s):l===r&&a<i&&(i=a,n=s)}t=n||t.children[0]}return t}(r,this._data,t,T);for(o.children.push(e),u(o,r);t>=0&&T.data[t].children.length>this._maxEntries;)this._split(T,t),t--;!function(e,t,n){for(let i=n;i>=0;i--)u(t.data[i],e)}(r,T,t)}_split(e,t){const n=e.data[t],i=n.children.length,r=this._minEntries;this._chooseSplitAxis(n,r,i);const o=this._chooseSplitIndex(n,r,i);if(!o)return;const s=n.children.splice(o,n.children.length-o),a=n.leaf?new x(s):new E(s);a.height=n.height,p(n,this._toBBox),p(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(n,a)}_splitRoot(e,t){this._data=new E([e,t]),this._data.height=e.height+1,p(this._data,this._toBBox)}_chooseSplitIndex(e,t,n){let i,r,o;i=r=1/0;for(let s=t;s<=n-t;s++){const t=d(e,0,s,this._toBBox),a=d(e,s,n,this._toBBox),l=g(t,a),p=y(t)+y(a);l<i?(i=l,o=s,r=p<r?p:r):l===i&&p<r&&(r=p,o=s)}return o}_chooseSplitAxis(e,t,n){const i=e.leaf?this._compareMinX:c,r=e.leaf?this._compareMinY:h;this._allDistMargin(e,t,n,i)<this._allDistMargin(e,t,n,r)&&e.children.sort(i)}_allDistMargin(e,t,n,i){e.children.sort(i);const r=this._toBBox,o=d(e,0,t,r),s=d(e,n-t,n,r);let a=m(o)+m(s);for(let i=t;i<n-t;i++){const t=e.children[i];u(o,e.leaf?r(t):t),a+=m(o)}for(let i=n-t-1;i>=t;i--){const t=e.children[i];u(s,e.leaf?r(t):t),a+=m(s)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const n=e.data[t];if(0===n.children.length)if(t>0){const r=e.data[t-1],o=r.children;o.splice((0,i.qh)(o,n,o.length,r.indexHint),1)}else this.clear();else p(n,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function l(e,t){let n=e;for(I.clear();n;){if(!0===n.leaf)for(const e of n.children)t((0,r.zI)(e));else I.pushArray(n.children);n=I.pop()??null}}function p(e,t){d(e,0,e.children.length,t,e)}function d(e,t,n,i,r){r||(r=new x([])),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(let o,s=t;s<n;s++)o=e.children[s],u(r,e.leaf?i(o):o);return r}function u(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function c(e,t){return e.minX-t.minX}function h(e,t){return e.minY-t.minY}function y(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function m(e){return e.maxX-e.minX+(e.maxY-e.minY)}function f(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function g(e,t){const n=Math.max(e.minX,t.minX),i=Math.max(e.minY,t.minY),r=Math.min(e.maxX,t.maxX),o=Math.min(e.maxY,t.maxY);return Math.max(0,r-n)*Math.max(0,o-i)}function b(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function w(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function _(e,t,n,i,r){const o=[t,n];for(;o.length;){const t=o.pop(),n=o.pop();if(t-n<=i)continue;const a=n+Math.ceil((t-n)/i/2)*i;(0,s.q)(e,a,n,t,r),o.push(n,a,a,t)}}const M=new o.A,I=new o.A,T=new o.A,C=new o.A({deallocator:void 0});class v{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class A extends v{constructor(){super(...arguments),this.height=1,this.indexHint=new i.vW}}class x extends A{constructor(e){super(),this.children=e,this.leaf=!0}}class E extends A{constructor(e){super(),this.children=e,this.leaf=!1}}},77901:(e,t,n)=>{n.d(t,{A:()=>s});var i=n(31635),r=n(25482),o=n(91429);let s=class extends r.o{constructor(e){super(e),this.properties=null}};(0,i.Cg)([(0,o.MZ)({json:{write:!0}})],s.prototype,"properties",void 0),s=(0,i.Cg)([(0,o.$K)("esri.rest.knowledgeGraph.GraphObject")],s)},83221:(e,t,n)=>{n.d(t,{A:()=>y});var i=n(4576),r=n(49186),o=n(65529),s=n(53966),a=n(70328),l=n(19419),p=n(90708),d=n(6518),u=n(51441),c=n(37730);const h=(0,a.vt)();class y{constructor(e){this.geometryInfo=e,this._boundsStore=new d.F,this._featuresById=new Map,this._usedMemory=0,this.events=new o.bk,this.featureAdapter=c.T}get usedMemory(){return this._usedMemory}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach(t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)}),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,n,i,r]=this.fullBounds;return{xmin:t,ymin:n,xmax:i,ymax:r,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(i.Ru)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged(),this._usedMemory=0}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const n of e){const e=this._boundsStore.get(n.objectId);e&&t((0,a.Jt)(h,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach(t=>e(t))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,e=>{t(this._featuresById.get(e))})}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void s.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new r.A("featurestore:invalid-feature","feature id is missing",{feature:e}));const n=this._featuresById.get(t);let i;if(n?(e.displayId=n.displayId,i=this._boundsStore.get(t),this._boundsStore.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(n)??0):null!=this.onFeatureAdd&&this.onFeatureAdd(e),!e.geometry?.coords?.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);i=(0,p.jQ)(null!=i?i:(0,l.vt)(),e.geometry),null!=i&&this._boundsStore.set(t,i),this._featuresById.set(t,e),this._usedMemory+=this.estimateFeatureUsedMemory?.(e)??0}_upsert(e){const t=e?.objectId;if(null==t)return s.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new r.A("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const n=this._featuresById.get(t);if(!n)return this._add(e),e;this._usedMemory-=this.estimateFeatureUsedMemory?.(n)??0;const{geometry:i,attributes:o}=e;for(const e in o)n.attributes[e]=o[e];return i&&(n.geometry=i,this._boundsStore.set(t,(0,p.jQ)((0,l.vt)(),i)??null)),this._usedMemory+=this.estimateFeatureUsedMemory?.(n)??0,n}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._boundsStore.delete(t),this._featuresById.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(e)??0,e}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9573],{8303:(e,t,r)=>{r.d(t,{A:()=>b});var l=r(31635),s=r(92602),i=r(70333),o=r(11254),n=r(60999),a=r(49186),u=r(53966),p=r(97768),c=r(74887),d=r(84952),h=r(91429),y=r(77548),f=r(20655),g=r(80812),m=r(41318),v=r(10407),w=r(36005),A=r(43937);const b=e=>{const t=e;let b=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,p.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}get portalItem(){return this._get("portalItem")}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new g.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:l}=await r.e(1204).then(r.bind(r,41204));return(0,c.Te)(t),await l({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,c.zf)(e)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch(e=>((0,c.QP)(e),!0)))}async setUserPrivileges(e,t){if(!s.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:l},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",l),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,c.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const l=!i.id?.findCredential(this.url),s=e===r.id;if(s&&r.portal.user)return this._getUserPrivileges(r,l);let o,n;if(s)o=r.portal.url;else try{o=await(0,y.wI)(this.url,t)}catch(e){(0,c.QP)(e)}if(!o||!(0,d.b8)(o,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;n=await(i.id?.getCredential(`${o}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.QP)(e)}const a=!0,u=!1,p=!1;if(!n)return{features:{edit:a,fullEdit:u},content:{updateItem:p}};try{if(s?await r.reload():(r=new g.default({id:e,portal:{url:o}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,l)}catch(e){(0,c.QP)(e)}return{features:{edit:a,fullEdit:u},content:{updateItem:p}}}_getUserPrivileges(e,t){const r=(0,v.It)(e);return t&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,c.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?i.id?.findCredential(this.url):null;if(!t)return!0;const r=I.credential===t?I.user:await this._fetchEditingUser(e);return I.credential=t,I.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=i.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const l=`${r.owningSystemUrl}/sharing/rest`,s=f.A.getDefault();if(s&&s.loaded&&(0,d.S8)(s.restUrl)===(0,d.S8)(l))return s.user;const a=`${l}/community/self`,u=null!=e?e.signal:null,p=await(0,n.Ke)((0,o.A)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?m.A.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,l=this.portalItem?.id&&(this.portalItem.portal||f.A.getDefault());return r&&l&&!(0,d.ut)(l.restUrl,r.restUrl)?(t.messages&&t.messages.push(new a.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,l.Cg)([(0,h.MZ)({type:g.default})],b.prototype,"portalItem",null),(0,l.Cg)([(0,w.w)("web-document","portalItem",["itemId"])],b.prototype,"readPortalItem",null),(0,l.Cg)([(0,A.K)("web-document","portalItem",{itemId:{type:String}})],b.prototype,"writePortalItem",null),(0,l.Cg)([(0,h.MZ)({clonable:!1})],b.prototype,"resourceReferences",void 0),(0,l.Cg)([(0,h.MZ)({type:Boolean,readOnly:!0})],b.prototype,"userHasEditingPrivileges",void 0),(0,l.Cg)([(0,h.MZ)({type:Boolean,readOnly:!0})],b.prototype,"userHasFullEditingPrivileges",void 0),(0,l.Cg)([(0,h.MZ)({type:Boolean,readOnly:!0})],b.prototype,"userHasUpdateItemPrivileges",void 0),b=(0,l.Cg)([(0,h.$K)("esri.layers.mixins.PortalLayer")],b),b},I={credential:null,user:null}},10407:(e,t,r)=>{r.d(t,{It:()=>h,LG:()=>o,OM:()=>u,Sm:()=>p,Y:()=>n,bK:()=>a,mm:()=>d,sQ:()=>c});var l=r(91218),s=r(16930),i=r(28735);function o(e,t){if(!n(e,t)){const r=e.typeKeywords;r?r.push(t):e.typeKeywords=[t]}}function n(e,t){return!!e.typeKeywords?.includes(t)}function a(e){return n(e,d.HOSTED_SERVICE)}function u(e,t){const r=e.typeKeywords;if(r){const e=r.indexOf(t);e>-1&&r.splice(e,1)}}function p(e,t,r){r?o(e,t):u(e,t)}async function c(e){const t=e.clone().normalize();let r;if(t.length>1)for(const e of t)r?e.width>r.width&&(r=e):r=e;else r=t[0];return async function(e){const t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,i.ci)(e);const r=s.A.WGS84;return await(0,l.initializeProjection)(t,r),(0,l.project)(e,r)}(r)}const d={CHARTS:"Charts",DYNAMIC:"Dynamic",DEVELOPER_BASEMAP:"DeveloperBasemap",GROUP_LAYER_MAP:"Map",HOSTED_SERVICE:"Hosted Service",JSAPI:"ArcGIS API for JavaScript",LOCAL_SCENE:"ViewingMode-Local",METADATA:"Metadata",MULTI_LAYER:"Multilayer",ORIENTED_IMAGERY_LAYER:"OrientedImageryLayer",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery"};function h(e){const{portal:t,isOrgItem:r,itemControl:l}=e,s=t.user?.privileges;let i=!s||s.includes("features:user:edit"),o=!!r&&!!s?.includes("features:user:fullEdit");const n="update"===l||"admin"===l;return n?o=i=!0:o&&(i=!0),{features:{edit:i,fullEdit:o},content:{updateItem:n}}}},33446:(e,t,r)=>{r.d(t,{C:()=>o,m:()=>i});var l=r(49186),s=r(74887);async function i(e,t,r){let i;try{i=await createImageBitmap(e)}catch(e){throw new l.A("request:server",`Unable to load ${t}`,{url:t,error:e})}return(0,s.Te)(r),i}async function o(e,t,r,i,o){let n;try{n=await createImageBitmap(e)}catch(e){throw new l.A("request:server",`Unable to load tile ${t}/${r}/${i}`,{error:e,level:t,row:r,col:i})}return(0,s.Te)(o),n}},47314:(e,t,r)=>{r.r(t),r.d(t,{default:()=>T});var l,s=r(31635),i=r(11254),o=r(49186),n=r(25728),a=r(799),u=r(84952),p=r(91429),c=r(5443),d=r(86738),h=r(16930),y=r(4146),f=r(63074),g=r(16131),m=r(8303),v=r(54310),w=r(25036),A=r(33446),b=r(91806),I=r(87045),C=r(83703),P=r(36005),M=r(43937);let T=l=class extends((0,f.dM)((0,v.J)((0,w.j)((0,g.q)((0,m.A)((0,n.P)(y.A))))))){constructor(...e){super(...e),this.copyright="",this.fullExtent=new c.A(-20037508.342787,-20037508.34278,20037508.34278,20037508.342787,h.A.WebMercator),this.legendEnabled=!1,this.isReference=null,this.popupEnabled=!1,this.spatialReference=h.A.WebMercator,this.subDomains=null,this.tileInfo=new I.A({size:[256,256],dpi:96,format:"png8",compressionQuality:0,origin:new d.A({x:-20037508.342787,y:20037508.342787,spatialReference:h.A.WebMercator}),spatialReference:h.A.WebMercator,lods:[new b.A({level:0,scale:591657527.591555,resolution:156543.033928}),new b.A({level:1,scale:295828763.795777,resolution:78271.5169639999}),new b.A({level:2,scale:147914381.897889,resolution:39135.7584820001}),new b.A({level:3,scale:73957190.948944,resolution:19567.8792409999}),new b.A({level:4,scale:36978595.474472,resolution:9783.93962049996}),new b.A({level:5,scale:18489297.737236,resolution:4891.96981024998}),new b.A({level:6,scale:9244648.868618,resolution:2445.98490512499}),new b.A({level:7,scale:4622324.434309,resolution:1222.99245256249}),new b.A({level:8,scale:2311162.217155,resolution:611.49622628138}),new b.A({level:9,scale:1155581.108577,resolution:305.748113140558}),new b.A({level:10,scale:577790.554289,resolution:152.874056570411}),new b.A({level:11,scale:288895.277144,resolution:76.4370282850732}),new b.A({level:12,scale:144447.638572,resolution:38.2185141425366}),new b.A({level:13,scale:72223.819286,resolution:19.1092570712683}),new b.A({level:14,scale:36111.909643,resolution:9.55462853563415}),new b.A({level:15,scale:18055.954822,resolution:4.77731426794937}),new b.A({level:16,scale:9027.977411,resolution:2.38865713397468}),new b.A({level:17,scale:4513.988705,resolution:1.19432856685505}),new b.A({level:18,scale:2256.994353,resolution:.597164283559817}),new b.A({level:19,scale:1128.497176,resolution:.298582141647617}),new b.A({level:20,scale:564.248588,resolution:.14929107082380833}),new b.A({level:21,scale:282.124294,resolution:.07464553541190416}),new b.A({level:22,scale:141.062147,resolution:.03732276770595208}),new b.A({level:23,scale:70.5310735,resolution:.01866138385297604})]}),this.type="web-tile",this.urlTemplate=null,this.wmtsInfo=null}normalizeCtorArgs(e,t){return"string"==typeof e?{urlTemplate:e,...t}:e}load(e){const t=this.loadFromPortal({supportedTypes:["WMTS"]},e).then(()=>{let e="";if(this.urlTemplate)if(this.spatialReference.equals(this.tileInfo.spatialReference)){const t=new u.s0(this.urlTemplate);!(this.subDomains&&this.subDomains.length>0)&&t.authority?.includes("{subDomain}")&&(e="is missing 'subDomains' property")}else e="spatialReference must match tileInfo.spatialReference";else e="is missing the required 'urlTemplate' property value";if(e)throw new o.A("web-tile-layer:load",`WebTileLayer (title: '${this.title}', id: '${this.id}') ${e}`)});return this.addResolvingPromise(t),Promise.resolve(this)}get levelValues(){const e=[];if(!this.tileInfo)return null;for(const t of this.tileInfo.lods)e[t.level]=t.levelValue||t.level;return e}get loaded(){return super.loaded}readSpatialReference(e,t){return e||h.A.fromJSON(t.fullExtent?.spatialReference)}get tileServers(){if(!this.urlTemplate)return null;const e=[],{urlTemplate:t,subDomains:r}=this,l=new u.s0(t),s=l.scheme?l.scheme+"://":"//",i=s+l.authority+"/",o=l.authority;if(o?.includes("{subDomain}")){if(r&&r.length>0&&o.split(".").length>1)for(const t of r)e.push(s+o.replaceAll(/\{subDomain\}/gi,t)+"/")}else e.push(i);return e.map(u.Il)}get urlPath(){if(!this.urlTemplate)return null;const e=this.urlTemplate,t=new u.s0(e),r=(t.scheme?t.scheme+"://":"//")+t.authority+"/";return e.slice(r.length)}readUrlTemplate(e,t){return e||t.templateUrl}writeUrlTemplate(e,t){(0,u.BQ)(e)&&(e="https:"+e),e&&(e=e.replaceAll(/\{z\}/gi,"{level}").replaceAll(/\{x\}/gi,"{col}").replaceAll(/\{y\}/gi,"{row}"),e=(0,u.S8)(e)),t.templateUrl=e}fetchTile(e,t,r,l={}){const{signal:s}=l,o=this.getTileUrl(e,t,r),n={responseType:"image",signal:s,query:{...this.refreshParameters}};return(0,i.A)(o,n).then(e=>e.data)}async fetchImageBitmapTile(e,t,r,s={}){const{signal:o}=s;if(this.fetchTile!==l.prototype.fetchTile){const l=await this.fetchTile(e,t,r,s);return(0,A.C)(l,e,t,r,o)}const n=this.getTileUrl(e,t,r),a={responseType:"blob",signal:o,query:{...this.refreshParameters}},{data:u}=await(0,i.A)(n,a);return(0,A.C)(u,e,t,r,o)}getTileUrl(e,t,r){const{levelValues:l,tileServers:s,urlPath:i}=this;if(!l||!s||!i)return"";const o=l[e];return s[t%s.length]+(0,a.HC)(i,{level:o,z:o,col:r,x:r,row:t,y:t})}};(0,s.Cg)([(0,p.MZ)({type:String,value:"",json:{write:!0}})],T.prototype,"copyright",void 0),(0,s.Cg)([(0,p.MZ)({type:c.A,json:{write:!0},nonNullable:!0})],T.prototype,"fullExtent",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0,json:{read:!1,write:!1}})],T.prototype,"legendEnabled",void 0),(0,s.Cg)([(0,p.MZ)({type:["show","hide"]})],T.prototype,"listMode",void 0),(0,s.Cg)([(0,p.MZ)({json:{read:!0,write:!0}})],T.prototype,"blendMode",void 0),(0,s.Cg)([(0,p.MZ)()],T.prototype,"levelValues",null),(0,s.Cg)([(0,p.MZ)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],T.prototype,"isReference",void 0),(0,s.Cg)([(0,p.MZ)({type:["WebTiledLayer"],value:"WebTiledLayer"})],T.prototype,"operationalLayerType",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0,json:{read:!1,write:!1}})],T.prototype,"popupEnabled",void 0),(0,s.Cg)([(0,p.MZ)({type:h.A})],T.prototype,"spatialReference",void 0),(0,s.Cg)([(0,P.w)("spatialReference",["spatialReference","fullExtent.spatialReference"])],T.prototype,"readSpatialReference",null),(0,s.Cg)([(0,p.MZ)({type:[String],json:{write:!0}})],T.prototype,"subDomains",void 0),(0,s.Cg)([(0,p.MZ)({type:I.A,json:{write:!0}})],T.prototype,"tileInfo",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0})],T.prototype,"tileServers",null),(0,s.Cg)([(0,p.MZ)({json:{read:!1}})],T.prototype,"type",void 0),(0,s.Cg)([(0,p.MZ)()],T.prototype,"urlPath",null),(0,s.Cg)([(0,p.MZ)({type:String,json:{origins:{"portal-item":{read:{source:"url"}}}}})],T.prototype,"urlTemplate",void 0),(0,s.Cg)([(0,P.w)("urlTemplate",["urlTemplate","templateUrl"])],T.prototype,"readUrlTemplate",null),(0,s.Cg)([(0,M.K)("urlTemplate",{templateUrl:{type:String}})],T.prototype,"writeUrlTemplate",null),(0,s.Cg)([(0,p.MZ)({type:C.x,json:{write:!0}})],T.prototype,"wmtsInfo",void 0),T=l=(0,s.Cg)([(0,p.$K)("esri.layers.WebTileLayer")],T)},60999:(e,t,r)=>{r.d(t,{DZ:()=>y,Ke:()=>h,Tj:()=>p,UT:()=>f,aD:()=>m,jJ:()=>u});var l=r(31635),s=r(69622),i=r(97768),o=r(74887),n=r(10107),a=r(64108);function u(e,t,r){return(0,o.Lx)(e.map((e,l)=>t.apply(r,[e,l])))}async function p(e,t,r){return(await(0,o.Lx)(e.map((e,l)=>t.apply(r,[e,l])))).map(e=>e.value)}function c(e){return{ok:!0,value:e}}function d(e){return{ok:!1,error:e}}async function h(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return c(await e)}catch(e){return d(e)}}async function y(e){try{return c(await e)}catch(e){return(0,o.QP)(e),d(e)}}function f(e,t){return new g(e,t)}let g=class extends s.A{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,i.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:r}=this._abortController;this.promise=e(r),this.promise.then(e=>{this._result=c(e),this._cleanup()},e=>{this._result=d(e),this._cleanup()}),this._abortHandle=(0,o.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,i.xt)(this._abortHandle),this._abortController=null}};(0,l.Cg)([(0,n.MZ)()],g.prototype,"value",null),(0,l.Cg)([(0,n.MZ)()],g.prototype,"error",null),(0,l.Cg)([(0,n.MZ)()],g.prototype,"finished",null),(0,l.Cg)([(0,n.MZ)()],g.prototype,"promise",void 0),(0,l.Cg)([(0,n.MZ)()],g.prototype,"_result",void 0),g=(0,l.Cg)([(0,a.$)("esri.core.asyncUtils.ReactiveTask")],g);class m{constructor(){this._sequence=Promise.resolve()}async acquire(){let e;this._sequence=new Promise(t=>{e=this._sequence.then(()=>t,()=>t)});const t=await e;return{[Symbol.dispose]:t}}async run(e){const t={stack:[],error:void 0,hasError:!1};try{return(0,l.mS)(t,await this.acquire(),!1),await e()}catch(e){t.error=e,t.hasError=!0}finally{(0,l.hk)(t)}}}},69540:(e,t,r)=>{r.d(t,{OU:()=>p,Pw:()=>c});var l=r(31635),s=r(69622),i=(r(44208),r(4718)),o=(r(53966),r(97768)),n=r(88620),a=r(64108);const u=Symbol("ClonableMixin"),p=e=>{var t;const r=e;let s=class extends r{constructor(){super(...arguments),this[t]=!0}static{t=u}clone(e){const t=(0,n.oY)(this);(0,o.Lw)(t,"unable to clone instance of non-accessor class");const r=t.metadata,l=t.store,s={},a=new Map;for(const t in r){const o=r[t],n=l?.originOf(t),u=o.clonable;if(o.readOnly||!1===u||7!==n&&0!==n&&5!==n&&4!==n)continue;const p=this[t];let c=null;if("function"==typeof u)c=u(p,e);else if("reference"===u)c=p;else if(c=(0,i.TU)(p,e),null!=p&&null==c)continue;0===n?a.set(t,c):s[t]=c}const u=new(0,Object.getPrototypeOf(this).constructor)(s);if(a.size){const e=(0,n.oY)(u)?.store;if(e)for(const[t,r]of a)e.set(t,r,0)}return u}};return s=(0,l.Cg)([(0,a.$)("esri.core.Clonable")],s),s},c=p(s.A)},78553:(e,t,r)=>{r.d(t,{D:()=>i,p:()=>s});var l=r(56507);function s(e){const t=(0,l.Vr)(100*(1-e));return Math.max(0,Math.min(t,100))}function i(e){const t=1-e/100;return Math.max(0,Math.min(t,1))}},83703:(e,t,r)=>{r.d(t,{x:()=>a});var l,s=r(31635),i=r(25482),o=r(4718),n=r(91429);let a=l=class extends i.o{constructor(e){super(e)}clone(){return new l({customLayerParameters:(0,o.o8)(this.customLayerParameters),customParameters:(0,o.o8)(this.customParameters),layerIdentifier:this.layerIdentifier,tileMatrixSet:this.tileMatrixSet,url:this.url})}};(0,s.Cg)([(0,n.MZ)({json:{type:Object,write:!0}})],a.prototype,"customLayerParameters",void 0),(0,s.Cg)([(0,n.MZ)({json:{type:Object,write:!0}})],a.prototype,"customParameters",void 0),(0,s.Cg)([(0,n.MZ)({type:String,json:{write:!0}})],a.prototype,"layerIdentifier",void 0),(0,s.Cg)([(0,n.MZ)({type:String,json:{write:!0}})],a.prototype,"tileMatrixSet",void 0),(0,s.Cg)([(0,n.MZ)({type:String,json:{write:!0}})],a.prototype,"url",void 0),a=l=(0,s.Cg)([(0,n.$K)("esri.layers.support.WMTSLayerInfo")],a)}}]);
|