@arcgis/core 5.2.0-next.169 → 5.2.0-next.170

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/18e7fa4d3e0b1a084cc6.js +1 -0
  3. package/assets/esri/core/workers/chunks/6de64abd9e2b51fa2872.js +1 -0
  4. package/assets/esri/core/workers/chunks/7697bbbaf3724f8c4445.js +1 -0
  5. package/assets/esri/core/workers/chunks/86524ae8926228898d95.js +1 -0
  6. package/assets/esri/core/workers/chunks/{1b24a40c0fa197014873.js → 9c33e67bb6f93f6529bb.js} +1 -1
  7. package/assets/esri/core/workers/chunks/b71029a2ab7dbb3706f9.js +1 -0
  8. package/assets/esri/core/workers/chunks/b7c4bb0f3f9662bac726.js +1 -0
  9. package/assets/esri/core/workers/chunks/bc6fdd9faf8ed54be0cb.js +1 -0
  10. package/assets/esri/core/workers/chunks/bec375ff37c25a49e080.js +1 -0
  11. package/assets/esri/views/3d/environment/resources/milkyway-band.avif +0 -0
  12. package/chunks/EmissionComposite.glsl.js +1 -1
  13. package/chunks/Fog.glsl.js +1 -1
  14. package/chunks/RibbonLine.glsl.js +176 -95
  15. package/config.d.ts +12 -9
  16. package/config.js +1 -1
  17. package/core/Collection.js +1 -1
  18. package/form/FormTemplate.d.ts +1 -1
  19. package/form/elements/AttachmentElement.d.ts +2 -0
  20. package/form/elements/FieldElement.d.ts +2 -2
  21. package/form/elements/FieldElement.js +1 -1
  22. package/form/elements/RelationshipElement.d.ts +1 -1
  23. package/form/elements/TextElement.d.ts +2 -2
  24. package/form/elements/UtilityNetworkAssociationsElement.d.ts +1 -1
  25. package/form/elements/inputs/inputUtils.js +1 -1
  26. package/form/elements/inputs/types.d.ts +19 -0
  27. package/form/elements/inputs.d.ts +3 -2
  28. package/form/elements/inputs.js +1 -1
  29. package/kernel.js +1 -1
  30. package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
  31. package/layers/save/parquetLayerUtils.js +1 -1
  32. package/package.json +2 -2
  33. package/rest/route.d.ts +1 -1
  34. package/rest/support/AreasAndLengthsParameters.d.ts +1 -1
  35. package/rest/support/LengthsParameters.d.ts +1 -1
  36. package/smartMapping/support/adapters/support/histogramUtils.js +1 -1
  37. package/views/2d/layers/GeospatialPDFLayerView2D.js +1 -1
  38. package/views/3d/terrain/ExtentHelper.js +1 -1
  39. package/views/3d/terrain/TerrainRenderer.js +1 -1
  40. package/views/3d/terrain/TerrainSurface.js +1 -1
  41. package/views/3d/terrain/tileUtils.js +1 -1
  42. package/views/3d/webgl-engine/effects/fog/Fog.js +1 -1
  43. package/views/3d/webgl-engine/effects/glow/applyEmissiveGlow.glsl.js +3 -3
  44. package/views/3d/webgl-engine/effects/stars/Stars.js +1 -1
  45. package/views/3d/webgl-engine/lib/GaussianSplatRenderer.js +1 -1
  46. package/views/3d/webgl-engine/shaders/EmissiveTechniqueConfiguration.js +1 -1
  47. package/views/input/InputManager.js +1 -1
  48. package/views/layers/LayerView.d.ts +10 -2
  49. package/widgets/BatchAttributeForm/inputs/FieldInput.d.ts +2 -2
  50. package/widgets/Editor/EditorViewModel.d.ts +10 -12
  51. package/widgets/FeatureTable/support/EditableColumnTemplateMixin.js +1 -1
  52. package/widgets/HistogramRangeSlider.d.ts +1 -1
  53. package/widgets/OrientedImageryViewer/adapters/view/SceneViewAdapter.js +1 -1
  54. package/assets/esri/core/workers/chunks/6f897b4e7ddd1dd1672b.js +0 -1
  55. package/assets/esri/core/workers/chunks/9e04703ee5f5ec47db43.js +0 -1
  56. package/assets/esri/core/workers/chunks/9f358c7b052cdc0ac06f.js +0 -1
  57. package/assets/esri/core/workers/chunks/a43b33955aa78a2a8deb.js +0 -1
  58. package/assets/esri/core/workers/chunks/b5b9d42e1f84ee82429c.js +0 -1
  59. package/assets/esri/core/workers/chunks/c9feffb9884cfed52c4b.js +0 -1
  60. package/assets/esri/core/workers/chunks/cdacc3e42f01c3b852d6.js +0 -1
  61. package/assets/esri/core/workers/chunks/feb6e041dd0aa1c59c31.js +0 -1
  62. package/layers/geospatialPDF/CIM2DLayerview.js +0 -2
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import e from"../../../../Graphic.js";import{isSome as t}from"../../../../core/arrayUtils.js";import{clamp as n}from"../../../../core/mathUtils.js";import{throwIfAborted as r,waitTick as i}from"../../../../core/promiseUtils.js";import{subtract as a,length as o,normalize as s}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as c}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import l from"../../../../geometry/Mesh.js";import u from"../../../../geometry/Point.js";import{projectAsync as d}from"../../../../geometry/projectionUtils.js";import{projectPointToVector as f}from"../../../../geometry/projection/projectPointToVector.js";import p from"../../../../geometry/support/MeshVertexAttributes.js";import{projectVertices as m,updateFrustum as h}from"../../../../layers/orientedImagery/core/coverageUtils.js";import g from"../../../../layers/orientedImagery/transformations/updateElevation.js";import{toRenderCamera as _}from"../../../../views/3d/webgl.js";import{directionToHeadingTilt as v}from"../../../../views/3d/support/viewingModeUtils.js";import{getPointerActions as y,eventMatchesMousePointerActions as b}from"../../../../views/input/handlers/support.js";import{fixedImageSize as x,invalidCameraHeading as S}from"../../constants.js";import{createFeatureCoverage as C}from"../../featureCoverage.js";import{activeFrustumSymbol as w,additionalFrustumSymbol as T}from"../../symbols.js";import{getDefaultSuperimposeFov as E,panoramicSuperimposeMaxFov as D,panoramicSuperimposeMinFov as O,panoramicSuperimposeZoomOutFactor as k,panoramicSuperimposeZoomInFactor as A,getViewCameraFieldOfView as j,panoramicSuperimposeMaxTilt as M,panoramicSuperimposeMinTilt as N,panoramicSuperimposeKeyboardAngleStep as P}from"../../support/superimposeUtils.js";class F{constructor(u){this.viewModel=u,this._defaultSuperimposeSecondaryDragAction=null,this._defaultSuperimposeNavigationHandles=[],this._panoramicSuperimposeAnchor=null,this._panoramicSuperimposeLastScreenPoint=null,this._panoramicSuperimposeNavigationHandles=[],this.createFootprints=async n=>{let{coverageFrustums:i,currentBestFeature:a,isAdditionalCoverageVisible:o,view:s}=this.viewModel,c=i.filter(t);for(let t of c){let i=t.clone();if(!s.spatialReference.equals(i.spatialReference)){let{components:e,spatialReference:t,origin:a,vertexAttributes:o,vertexSpace:c}=i;if(c.type===`local`){let e=await d(a,s.spatialReference,n);r(n),i.centerAt(e)}else{let a=o.position,c=Float64Array.from(await m([...a],t.clone(),s.spatialReference.clone(),n));r(n),i=new l({vertexAttributes:new p({position:c}),components:e,spatialReference:s.spatialReference.clone()})}}t.imageID===a.attributes.objectId?this.viewModel.bestFeatureFootprint=new e({attributes:{imageID:t.imageID},geometry:i,symbol:w.clone(),visible:!1}):this.viewModel.additionalFootprints.push(new e({attributes:{imageID:t.imageID},geometry:i,symbol:T.clone(),visible:o}))}},this.updateFootprint=async(n,i,a)=>{let{bestFeatureFootprint:o,currentBestFeature:s,activeViewer:c,footprintExtent:l,view:u,mode:f}=this.viewModel,p=f===`video`?x:c?.imageSize,m=i??s;if(!s||!o?.geometry||!p||!l||!m||!u?.spatialReference){this.viewModel.updateCurrentCoveragePolygon(null);return}let{attributes:{cameraHeight:g,location:_,cameraPitch:v,horizontalFieldOfView:y,verticalFieldOfView:b,cameraRoll:S}}=m,C=null;i&&(C=await this._computeFeatureFootprint(i,a));let T=m.attributes.location.toArray(),{vertexAttributes:{position:E},spatialReference:D}=(i&&C?C:o).geometry,O=await I(E,D,_.spatialReference),k=await this.viewModel.getMapPoint(n);r(a);let A=k.filter(t);if(!A.length)return;A[0].spatialReference.equals(_.spatialReference)||(A=await Promise.all(A.map(async e=>{let t=await d(e,_.spatialReference,a);return r(a),t})));let j=await h(n.map(({x:e,y:t})=>[e,t]),A.map(e=>e.toArray()),{cameraHeight:g,cameraLocation:T,cameraPitch:v,frustumVertices:O,horizontalFieldOfView:y,imageHeight:p[1],imageWidth:p[0],inSRS:{wkid:_.spatialReference.wkid},outSRS:{wkid:u.spatialReference.wkid},verticalFieldOfView:b,cameraRoll:S??0,options:a});this.viewModel.updateCurrentCoveragePolygon(new e({attributes:{imageID:m.attributes.objectId},geometry:j,symbol:w.clone(),visible:this.viewModel.currentCoverageVisible}))},this.updateVideoFootprint=async n=>{let{points:i,feature:a,scale:o,options:s}=n,{bestFeatureFootprint:c,currentBestFeature:l,activeViewer:u,footprintExtent:f,view:p,mode:m}=this.viewModel,g=m===`video`?x:u?.imageSize,_=a??l;if(!l||!c?.geometry||!g||!f||!_||!p?.spatialReference||m===`none`){this.viewModel.updateCurrentCoveragePolygon(null);return}let{attributes:{cameraHeight:v,location:y,cameraPitch:b,horizontalFieldOfView:S,verticalFieldOfView:C,cameraRoll:T}}=_,E=null;a&&(E=await this._computeFeatureFootprint(a,s));let D=_.attributes.location.toArray(),{vertexAttributes:{position:O},spatialReference:k}=(a&&E?E:c).geometry,A=await I(O,k,y.spatialReference),j={feature:_,mode:m,imageSize:g,footprintExtent:f},M=await this.viewModel.getMapPointForFeature(i,j,s);r(s);let N=M.filter(t);if(!N.length)return;N[0].spatialReference.equals(y.spatialReference)||(N=await Promise.all(N.map(async e=>{let t=await d(e,y.spatialReference,s);return r(s),t})));let P=await h(i.map(({x:e,y:t})=>[e,t]),N.map(e=>e.toArray()),{cameraHeight:v,cameraLocation:D,cameraPitch:b,frustumVertices:A,horizontalFieldOfView:S,imageHeight:g[1],imageWidth:g[0],inSRS:{wkid:y.spatialReference.wkid},outSRS:{wkid:p.spatialReference.wkid},verticalFieldOfView:C,cameraRoll:T??0,options:s});if(o&&P){let e=R(P);P.scale(o,{origin:e})}this.viewModel.updateCurrentCoveragePolygon(new e({attributes:{imageID:_.attributes.objectId},geometry:P,symbol:w.clone(),visible:this.viewModel.currentCoverageVisible}))},this.updateFootprintPanorama=async(t,n)=>{await i(n);let{horizontalFieldOfView:r,pitch:a,verticalFieldOfView:o,yaw:s,feature:c}=t,l=c?.clone()??this.viewModel.currentBestFeature?.clone();if(!l)return;let{attributes:u}=l;u.orientedImageryType=null,u.cameraHeading=s,u.cameraPitch=a,u.horizontalFieldOfView=r,u.verticalFieldOfView=o,u.cameraRoll=0;let{frustum:f}=C(u);if(!f){this.viewModel.updateCurrentCoveragePolygon(null);return}let p=this.viewModel.view?.spatialReference.equals(f.spatialReference)?f.clone():await d(f.clone(),this.viewModel.view?.spatialReference,n);this.viewModel.updateCurrentCoveragePolygon(new e({attributes:{imageID:u.objectId},geometry:p,symbol:w.clone(),visible:this.viewModel.currentCoverageVisible}))},this.updatePanoramicSuperimposeCamera=async(e,t)=>{let{camera:n,currentBestFeature:i}=e,{view:a}=this.viewModel;if(a?.type!==`3d`)return;let o=i.attributes.location,s=o.spatialReference.equals(a.spatialReference)?o:await d(o,a.spatialReference,t);if(r(t),!s)return;let c=n.clone();c.position=s.clone(),a.camera=c,this._enablePanoramicSuperimposeNavigation(s)},this.updateDefaultSuperimposeCamera=async(e,t)=>{let{currentBestFeature:i,target:l}=e,{view:u}=this.viewModel;if(u?.type!==`3d`)return;let{cameraHeading:p,cameraPitch:m,cameraRoll:h,horizontalFieldOfView:g,location:y,verticalFieldOfView:b}=i.attributes,x=y.spatialReference.equals(u.spatialReference)?y.clone():await d(y,u.spatialReference,t);if(r(t),!x)return;let C=E(u,g,b,h??0),w=u.camera.clone();if(w.position=x,w.fov=n(w.fov,O,D),p!=null&&p!==S&&(w.heading=p),m!=null&&(w.tilt=m),C!=null&&(w.fov=C),l){let e=_(u,w),t=c();if(e&&f(l,t,u.renderSpatialReference)&&(a(t,t,e.eye),o(t)>0)){s(t,t);let{heading:n,tilt:r}=v(u,e.eye,t,e.up);w.heading=n,w.tilt=r}}u.camera=w},this.enableDefaultSuperimposeNavigation=()=>{let{view:e}=this.viewModel;if(e?.type!==`3d`)return;let t=e.navigation.actionMap;this._defaultSuperimposeSecondaryDragAction??=t.dragSecondary,t.dragSecondary!==`none`&&(t.dragSecondary=`none`),this._defaultSuperimposeNavigationHandles.length||(this._defaultSuperimposeNavigationHandles=[e.on(`drag`,this._handleDefaultSuperimposeDrag)])},this.disableDefaultSuperimposeNavigation=()=>{let{view:e}=this.viewModel,t=this._defaultSuperimposeSecondaryDragAction;if(this._defaultSuperimposeNavigationHandles.forEach(e=>e.remove()),this._defaultSuperimposeNavigationHandles=[],e?.type!==`3d`||t==null){this._defaultSuperimposeSecondaryDragAction=null;return}e.navigation.actionMap.dragSecondary=t,this._defaultSuperimposeSecondaryDragAction=null},this.disablePanoramicSuperimposeNavigation=()=>{this._panoramicSuperimposeNavigationHandles.forEach(e=>e.remove()),this._panoramicSuperimposeNavigationHandles=[],this._panoramicSuperimposeAnchor=null,this._panoramicSuperimposeLastScreenPoint=null},this._handleDefaultSuperimposeDrag=e=>{let{view:t}=this.viewModel;if(!t||t.type!==`3d`)return;let n=y(`rotate`,t.navigation.actionMap);b(e,n)&&e.stopPropagation()},this._handlePanoramicSuperimposeDoubleClick=e=>{let{view:t}=this.viewModel;if(!t||t.type!==`3d`||!this._panoramicSuperimposeAnchor)return;e.stopPropagation();let r=t.camera.clone(),i=e.native.ctrlKey?k:A;r.position=this._panoramicSuperimposeAnchor.clone(),r.fov=n(r.fov*i,O,D),t.camera=r},this._handlePanoramicSuperimposeDrag=e=>{let{view:t}=this.viewModel;if(t&&t.type===`3d`&&this._panoramicSuperimposeAnchor)switch(e.stopPropagation(),e.action){case`start`:this._panoramicSuperimposeLastScreenPoint={x:e.x,y:e.y};return;case`update`:{let r=this._panoramicSuperimposeLastScreenPoint;if(!r){this._panoramicSuperimposeLastScreenPoint={x:e.x,y:e.y};return}let i=r.x-e.x,a=e.y-r.y;this._panoramicSuperimposeLastScreenPoint={x:e.x,y:e.y};let o=t.camera.clone(),{horizontal:s,vertical:c}=j(t);o.position=this._panoramicSuperimposeAnchor.clone(),o.heading+=s*i/Math.max(t.width,1),o.tilt=n(o.tilt+c*a/Math.max(t.height,1),N,M),t.camera=o;return}case`end`:this._panoramicSuperimposeLastScreenPoint=null;return}},this._handlePanoramicSuperimposeKeyDown=e=>{let{view:t}=this.viewModel;if(!t||t.type!==`3d`||!this._panoramicSuperimposeAnchor)return;let r=t.camera.clone(),i=!0;switch(r.position=this._panoramicSuperimposeAnchor.clone(),e.key){case`ArrowLeft`:r.heading-=P;break;case`ArrowRight`:r.heading+=P;break;case`ArrowUp`:r.tilt=n(r.tilt-P,N,M);break;case`ArrowDown`:r.tilt=n(r.tilt+P,N,M);break;default:i=!1}i&&(e.stopPropagation(),t.camera=r)},this._handlePanoramicSuperimposeWheel=e=>{let{view:t}=this.viewModel;if(!t||t.type!==`3d`||!this._panoramicSuperimposeAnchor)return;e.stopPropagation();let r=t.camera.clone();r.position=this._panoramicSuperimposeAnchor.clone(),r.fov=n(r.fov*(e.deltaY>0?k:A),O,D),t.camera=r}}async _computeFeatureFootprint(e,t){let{currentBestFeature:n,view:i}=this.viewModel,a=n?.elevationSample;if(a?.extent&&!a.extent.contains(e.geometry)&&(a=await this.viewModel.processFeatureElevation([e],e.geometry.clone(),t)??a),a){let n=await g(e.geometry.clone(),{elevationSample:a},t);r(t),e.attributes.elevation=n.z}return L(e,i.spatialReference,t)}_enablePanoramicSuperimposeNavigation(e){let{view:t}=this.viewModel;t&&t.type===`3d`&&(this.disablePanoramicSuperimposeNavigation(),this._panoramicSuperimposeAnchor=e.clone(),this._panoramicSuperimposeNavigationHandles=[t.on(`drag`,this._handlePanoramicSuperimposeDrag),t.on(`mouse-wheel`,this._handlePanoramicSuperimposeWheel),t.on(`double-click`,this._handlePanoramicSuperimposeDoubleClick),t.on(`key-down`,this._handlePanoramicSuperimposeKeyDown)])}}async function I(e,t,n,r){return Float64Array.from((await Promise.all(e.reduce((e,t,n)=>{let r=Math.floor(n/3);return e[r]=e[r]??[],e[r].push(t),e},[]).map(async e=>(await d(new u(e,t),n,r)).toArray()))).flat())}const L=async(t,n,i)=>{let{frustum:a}=C(t.attributes),o=a.clone();if(!n.equals(o.spatialReference)){let{components:e,spatialReference:t,origin:a,vertexAttributes:s,vertexSpace:c}=o;if(c.type===`local`){let e=await d(a,n,i);r(i),o.centerAt(e)}else{let a=s.position,c=Float64Array.from(await m([...a],t.clone(),n.clone(),i));r(i),o=new l({vertexAttributes:new p({position:c}),components:e,spatialReference:n.clone()})}}return new e({attributes:{imageID:a.imageID},geometry:o,symbol:w.clone(),visible:!1})},R=e=>{let t=e.vertexAttributes.position,n=0,r=0,i=0,a=t.length/3;for(let e=0;e<t.length;e+=3)n+=t[e],r+=t[e+1],i+=t[e+2];return new u({x:n/a,y:r/a,z:i/a,spatialReference:e.spatialReference})};export{F as default};
2
+ import e from"../../../../Graphic.js";import{isSome as t}from"../../../../core/arrayUtils.js";import n from"../../../../core/Error.js";import{clamp as r}from"../../../../core/mathUtils.js";import{throwIfAborted as i,waitTick as a}from"../../../../core/promiseUtils.js";import{subtract as o,length as s,normalize as c}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as l}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import u from"../../../../geometry/Mesh.js";import d from"../../../../geometry/Point.js";import{projectAsync as f}from"../../../../geometry/projectionUtils.js";import{projectPointToVector as p}from"../../../../geometry/projection/projectPointToVector.js";import m from"../../../../geometry/support/MeshGeoreferencedVertexSpace.js";import h from"../../../../geometry/support/MeshVertexAttributes.js";import{convertVertexSpace as g}from"../../../../geometry/support/meshUtils/vertexSpaceConversion.js";import{updateFrustum as _,projectVertices as v}from"../../../../layers/orientedImagery/core/coverageUtils.js";import y from"../../../../layers/orientedImagery/transformations/updateElevation.js";import{toRenderCamera as b}from"../../../../views/3d/webgl.js";import{directionToHeadingTilt as x}from"../../../../views/3d/support/viewingModeUtils.js";import{getPointerActions as S,eventMatchesMousePointerActions as C}from"../../../../views/input/handlers/support.js";import{fixedImageSize as w,invalidCameraHeading as T}from"../../constants.js";import{createFeatureCoverage as E}from"../../featureCoverage.js";import{activeFrustumSymbol as D,additionalFrustumSymbol as O}from"../../symbols.js";import{getDefaultSuperimposeFov as k,panoramicSuperimposeMaxFov as A,panoramicSuperimposeMinFov as j,panoramicSuperimposeZoomOutFactor as M,panoramicSuperimposeZoomInFactor as N,getViewCameraFieldOfView as P,panoramicSuperimposeMaxTilt as F,panoramicSuperimposeMinTilt as I,panoramicSuperimposeKeyboardAngleStep as L}from"../../support/superimposeUtils.js";class R{constructor(n){this.viewModel=n,this._defaultSuperimposeSecondaryDragAction=null,this._defaultSuperimposeNavigationHandles=[],this._panoramicSuperimposeAnchor=null,this._panoramicSuperimposeLastScreenPoint=null,this._panoramicSuperimposeNavigationHandles=[],this.createFootprints=async n=>{let{coverageFrustums:r,currentBestFeature:a,isAdditionalCoverageVisible:o,view:s}=this.viewModel,c=r.filter(t);for(let t of c){let r=await V(t,s.spatialReference,n);i(n),t.imageID===a.attributes.objectId?this.viewModel.bestFeatureFootprint=new e({attributes:{imageID:t.imageID},geometry:r,symbol:D.clone(),visible:!1}):this.viewModel.additionalFootprints.push(new e({attributes:{imageID:t.imageID},geometry:r,symbol:O.clone(),visible:o}))}},this.updateFootprint=async(n,r,a)=>{let{bestFeatureFootprint:o,currentBestFeature:s,activeViewer:c,footprintExtent:l,view:u,mode:d}=this.viewModel,p=d===`video`?w:c?.imageSize,m=r??s;if(!s||!o?.geometry||!p||!l||!m||!u?.spatialReference){this.viewModel.updateCurrentCoveragePolygon(null);return}let{attributes:{cameraHeight:h,location:g,cameraPitch:v,horizontalFieldOfView:y,verticalFieldOfView:b,cameraRoll:x}}=m,S=null;r&&(S=await this._computeFeatureFootprint(r,a));let C=m.attributes.location.toArray(),{vertexAttributes:{position:T},spatialReference:E}=(r&&S?S:o).geometry,O=await z(T,E,g.spatialReference),k=await this.viewModel.getMapPoint(n);i(a);let A=k.filter(t);if(!A.length)return;A[0].spatialReference.equals(g.spatialReference)||(A=await Promise.all(A.map(async e=>{let t=await f(e,g.spatialReference,a);return i(a),t})));let j=await _(n.map(({x:e,y:t})=>[e,t]),A.map(e=>e.toArray()),{cameraHeight:h,cameraLocation:C,cameraPitch:v,frustumVertices:O,horizontalFieldOfView:y,imageHeight:p[1],imageWidth:p[0],inSRS:{wkid:g.spatialReference.wkid},outSRS:{wkid:u.spatialReference.wkid},verticalFieldOfView:b,cameraRoll:x??0,options:a});this.viewModel.updateCurrentCoveragePolygon(new e({attributes:{imageID:m.attributes.objectId},geometry:j,symbol:D.clone(),visible:this.viewModel.currentCoverageVisible}))},this.updateVideoFootprint=async n=>{let{points:r,feature:a,scale:o,options:s}=n,{bestFeatureFootprint:c,currentBestFeature:l,activeViewer:u,footprintExtent:d,view:p,mode:m}=this.viewModel,h=m===`video`?w:u?.imageSize,g=a??l;if(!l||!c?.geometry||!h||!d||!g||!p?.spatialReference||m===`none`){this.viewModel.updateCurrentCoveragePolygon(null);return}let{attributes:{cameraHeight:v,location:y,cameraPitch:b,horizontalFieldOfView:x,verticalFieldOfView:S,cameraRoll:C}}=g,T=null;a&&(T=await this._computeFeatureFootprint(a,s));let E=g.attributes.location.toArray(),{vertexAttributes:{position:O},spatialReference:k}=(a&&T?T:c).geometry,A=await z(O,k,y.spatialReference),j={feature:g,mode:m,imageSize:h,footprintExtent:d},M=await this.viewModel.getMapPointForFeature(r,j,s);i(s);let N=M.filter(t);if(!N.length)return;N[0].spatialReference.equals(y.spatialReference)||(N=await Promise.all(N.map(async e=>{let t=await f(e,y.spatialReference,s);return i(s),t})));let P=await _(r.map(({x:e,y:t})=>[e,t]),N.map(e=>e.toArray()),{cameraHeight:v,cameraLocation:E,cameraPitch:b,frustumVertices:A,horizontalFieldOfView:x,imageHeight:h[1],imageWidth:h[0],inSRS:{wkid:y.spatialReference.wkid},outSRS:{wkid:p.spatialReference.wkid},verticalFieldOfView:S,cameraRoll:C??0,options:s});if(o&&P){let e=H(P);P.scale(o,{origin:e})}this.viewModel.updateCurrentCoveragePolygon(new e({attributes:{imageID:g.attributes.objectId},geometry:P,symbol:D.clone(),visible:this.viewModel.currentCoverageVisible}))},this.updateFootprintPanorama=async(t,n)=>{await a(n);let{horizontalFieldOfView:r,pitch:o,verticalFieldOfView:s,yaw:c,feature:l}=t,u=l?.clone()??this.viewModel.currentBestFeature?.clone();if(!u)return;let{attributes:d}=u;d.orientedImageryType=null,d.cameraHeading=c,d.cameraPitch=o,d.horizontalFieldOfView=r,d.verticalFieldOfView=s,d.cameraRoll=0;let{frustum:f}=E(d);if(!f){this.viewModel.updateCurrentCoveragePolygon(null);return}let p=await V(f,this.viewModel.view.spatialReference,n);i(n),this.viewModel.updateCurrentCoveragePolygon(new e({attributes:{imageID:d.objectId},geometry:p,symbol:D.clone(),visible:this.viewModel.currentCoverageVisible}))},this.updatePanoramicSuperimposeCamera=async(e,t)=>{let{camera:n,currentBestFeature:r}=e,{view:a}=this.viewModel;if(a?.type!==`3d`)return;let o=r.attributes.location,s=o.spatialReference.equals(a.spatialReference)?o:await f(o,a.spatialReference,t);if(i(t),!s)return;let c=n.clone();c.position=s.clone(),a.camera=c,this._enablePanoramicSuperimposeNavigation(s)},this.updateDefaultSuperimposeCamera=async(e,t)=>{let{currentBestFeature:n,target:a}=e,{view:u}=this.viewModel;if(u?.type!==`3d`)return;let{cameraHeading:d,cameraPitch:m,cameraRoll:h,horizontalFieldOfView:g,location:_,verticalFieldOfView:v}=n.attributes,y=_.spatialReference.equals(u.spatialReference)?_.clone():await f(_,u.spatialReference,t);if(i(t),!y)return;let S=k(u,g,v,h??0),C=u.camera.clone();if(C.position=y,C.fov=r(C.fov,j,A),d!=null&&d!==T&&(C.heading=d),m!=null&&(C.tilt=m),S!=null&&(C.fov=S),a){let e=b(u,C),t=l();if(e&&p(a,t,u.renderSpatialReference)&&(o(t,t,e.eye),s(t)>0)){c(t,t);let{heading:n,tilt:r}=x(u,e.eye,t,e.up);C.heading=n,C.tilt=r}}u.camera=C},this.enableDefaultSuperimposeNavigation=()=>{let{view:e}=this.viewModel;if(e?.type!==`3d`)return;let t=e.navigation?.actionMap;t&&(this._defaultSuperimposeSecondaryDragAction??=t.dragSecondary,t.dragSecondary!==`none`&&(t.dragSecondary=`none`),this._defaultSuperimposeNavigationHandles.length||(this._defaultSuperimposeNavigationHandles=[e.on(`drag`,this._handleDefaultSuperimposeDrag)]))},this.disableDefaultSuperimposeNavigation=()=>{let{view:e}=this.viewModel,t=this._defaultSuperimposeSecondaryDragAction;this._defaultSuperimposeNavigationHandles.forEach(e=>e.remove()),this._defaultSuperimposeNavigationHandles=[],this._defaultSuperimposeSecondaryDragAction=null;let n=e?.type===`3d`?e.navigation?.actionMap:null;n&&t!=null&&(n.dragSecondary=t)},this.disablePanoramicSuperimposeNavigation=()=>{this._panoramicSuperimposeNavigationHandles.forEach(e=>e.remove()),this._panoramicSuperimposeNavigationHandles=[],this._panoramicSuperimposeAnchor=null,this._panoramicSuperimposeLastScreenPoint=null},this._handleDefaultSuperimposeDrag=e=>{let{view:t}=this.viewModel;if(!t||t.type!==`3d`)return;let n=t.navigation?.actionMap;if(!n)return;let r=S(`rotate`,n);C(e,r)&&e.stopPropagation()},this._handlePanoramicSuperimposeDoubleClick=e=>{let{view:t}=this.viewModel;if(!t||t.type!==`3d`||!this._panoramicSuperimposeAnchor)return;e.stopPropagation();let n=t.camera.clone(),i=e.native.ctrlKey?M:N;n.position=this._panoramicSuperimposeAnchor.clone(),n.fov=r(n.fov*i,j,A),t.camera=n},this._handlePanoramicSuperimposeDrag=e=>{let{view:t}=this.viewModel;if(t&&t.type===`3d`&&this._panoramicSuperimposeAnchor)switch(e.stopPropagation(),e.action){case`start`:this._panoramicSuperimposeLastScreenPoint={x:e.x,y:e.y};return;case`update`:{let n=this._panoramicSuperimposeLastScreenPoint;if(!n){this._panoramicSuperimposeLastScreenPoint={x:e.x,y:e.y};return}let i=n.x-e.x,a=e.y-n.y;this._panoramicSuperimposeLastScreenPoint={x:e.x,y:e.y};let o=t.camera.clone(),{horizontal:s,vertical:c}=P(t);o.position=this._panoramicSuperimposeAnchor.clone(),o.heading+=s*i/Math.max(t.width,1),o.tilt=r(o.tilt+c*a/Math.max(t.height,1),I,F),t.camera=o;return}case`end`:this._panoramicSuperimposeLastScreenPoint=null;return}},this._handlePanoramicSuperimposeKeyDown=e=>{let{view:t}=this.viewModel;if(!t||t.type!==`3d`||!this._panoramicSuperimposeAnchor)return;let n=t.camera.clone(),i=!0;switch(n.position=this._panoramicSuperimposeAnchor.clone(),e.key){case`ArrowLeft`:n.heading-=L;break;case`ArrowRight`:n.heading+=L;break;case`ArrowUp`:n.tilt=r(n.tilt-L,I,F);break;case`ArrowDown`:n.tilt=r(n.tilt+L,I,F);break;default:i=!1}i&&(e.stopPropagation(),t.camera=n)},this._handlePanoramicSuperimposeWheel=e=>{let{view:t}=this.viewModel;if(!t||t.type!==`3d`||!this._panoramicSuperimposeAnchor)return;e.stopPropagation();let n=t.camera.clone();n.position=this._panoramicSuperimposeAnchor.clone(),n.fov=r(n.fov*(e.deltaY>0?M:N),j,A),t.camera=n}}async _computeFeatureFootprint(e,t){let{currentBestFeature:n,view:r}=this.viewModel,a=n?.elevationSample;if(a?.extent&&!a.extent.contains(e.geometry)&&(a=await this.viewModel.processFeatureElevation([e],e.geometry.clone(),t)??a),a){let n=await y(e.geometry.clone(),{elevationSample:a},t);i(t),e.attributes.elevation=n.z}return B(e,r.spatialReference,t)}_enablePanoramicSuperimposeNavigation(e){let{view:t}=this.viewModel;t&&t.type===`3d`&&(this.disablePanoramicSuperimposeNavigation(),this._panoramicSuperimposeAnchor=e.clone(),this._panoramicSuperimposeNavigationHandles=[t.on(`drag`,this._handlePanoramicSuperimposeDrag),t.on(`mouse-wheel`,this._handlePanoramicSuperimposeWheel),t.on(`double-click`,this._handlePanoramicSuperimposeDoubleClick),t.on(`key-down`,this._handlePanoramicSuperimposeKeyDown)])}}async function z(e,t,n,r){return Float64Array.from((await Promise.all(e.reduce((e,t,n)=>{let r=Math.floor(n/3);return e[r]=e[r]??[],e[r].push(t),e},[]).map(async e=>(await f(new d(e,t),n,r)).toArray()))).flat())}const B=async(t,n,r)=>{let{frustum:i}=E(t.attributes),a=await V(i,n,r);return new e({attributes:{imageID:i.imageID},geometry:a,symbol:D.clone(),visible:!1})},V=async(e,t,r)=>{let a=e.clone();if(!t.equals(a.spatialReference)){let{components:e,spatialReference:o,origin:s,vertexAttributes:c,vertexSpace:l}=a;if(l.type===`local`){let e=await f(s,t,r);i(r),a.centerAt(e)}else{let s=l.origin?g(a,m.absolute):c;if(!s)throw new n(`oriented-imagery:project-frustum`,`Could not resolve absolute frustum vertices`);let d=s.position,f=Float64Array.from(await v([...d],o.clone(),t.clone(),r));i(r),a=new u({vertexAttributes:new h({position:f}),components:e,spatialReference:t.clone()})}}return a},H=e=>{let t=e.vertexAttributes.position,n=0,r=0,i=0,a=t.length/3;for(let e=0;e<t.length;e+=3)n+=t[e],r+=t[e+1],i+=t[e+2];return new d({x:n/a,y:r/a,z:i/a,spatialReference:e.spatialReference})};export{R as default};
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4581,6553],{46130(e,t,r){r.d(t,{v:()=>i});var a=r(76553);function i(e){e?.writtenProperties&&e.writtenProperties.forEach(({target:e,propName:t,newOrigin:r})=>{(0,a.H)(e)&&r&&e.originOf(t)!==r&&e.updateOrigin(t,r)})}},76553(e,t,r){function a(e){return e&&"getAtOrigin"in e&&"originOf"in e}r.d(t,{H:()=>a})},64581(e,t,r){r.d(t,{save:()=>u,saveAs:()=>p});var a=r(71530),i=r(10407);const n="Parquet Feature Layer";function o(e){return{isValid:"parquet"===e.type,errorMessage:"Layer.type should be 'parquet'"}}function l(e){let t=e.layerJSON;return Promise.resolve(t&&Object.keys(t).length?t:null)}async function s(e,t){let{title:r,fullExtent:a}=e;t.title||=r,t.extent=a?await(0,i.sQ)(a):null,(0,i.OM)(t,i.mm.METADATA)}async function u(e,t){return(0,a.UN)({layer:e,itemType:n,validateLayer:o,createItemData:l,errorNamePrefix:"parquet-layer-save"},t)}async function p(e,t,r){return(0,a.Uh)({layer:e,itemType:n,validateLayer:o,createItemData:l,errorNamePrefix:"parquet-layer-save-as",newItem:t,setItemProperties:s},r)}},71530(e,t,r){r.d(t,{UN:()=>I,Uh:()=>h});var a=r(49186),i=r(46130),n=r(20655),o=r(80812),l=r(88788),s=r(10407),u=r(26121);async function p(e){let{layer:t,errorNamePrefix:r,validateLayer:i}=e;await t.load(),function(e,t,r){let i=r(e);if(!i.isValid)throw new a.A(`${t}:invalid-parameters`,i.errorMessage,{layer:e})}(t,r,i)}function m(e,t){return`Layer (title: ${e.title}, id: ${e.id}) of type '${e.declaredClass}' ${t}`}function c(e){let{item:t,errorNamePrefix:r,layer:i,validateItem:n}=e;if(function(e){let{item:t,itemType:r,additionalItemType:i,errorNamePrefix:n,layer:o}=e,l=[r];if(i&&l.push(i),!l.includes(t.type)){let e=l.map(e=>`'${e}'`).join(", ");throw new a.A(`${n}:portal-item-wrong-type`,`Portal item type should be one of: "${e}"`,{item:t,layer:o})}}(e),n){let e=n(t);if(!e.isValid)throw new a.A(`${r}:invalid-parameters`,e.errorMessage,{layer:i})}}function f(e){let{layer:t,errorNamePrefix:r}=e,{portalItem:i}=t;if(!i)throw new a.A(`${r}:portal-item-not-set`,m(t,"requires the portalItem property to be set"));if(!i.loaded)throw new a.A(`${r}:portal-item-not-loaded`,m(t,"cannot be saved to a portal item that does not exist or is inaccessible"));c({...e,item:i})}function d(e){let{newItem:t,itemType:r}=e,a=o.default.from(t);return a.id&&(a=a.clone(),a.id=null),a.type??=r,a.portal??=n.A.getDefault(),c({...e,item:a}),a}function y(e){return(0,l.m)(e,"portal-item")}async function w(e,t,r){"beforeSave"in e&&"function"==typeof e.beforeSave&&await e.beforeSave();let a=e.write({},t);return await Promise.all(t.resources?.pendingOperations??[]),(0,u.ci)(t,{errorName:"layer-write:unsupported"},r),a}function v(e){(0,s.LG)(e,s.mm.JSAPI),e.typeKeywords&&=e.typeKeywords.filter((e,t,r)=>r.indexOf(e)===t)}async function I(e,t){let{layer:r,createItemData:a,createJSONContext:n,setItemProperties:o,saveResources:l,supplementalUnsupportedErrors:s}=e;await p(e),f(e);let u=r.portalItem,m=n?n(u):y(u),c=await a({layer:r,layerJSON:await w(r,m,{...t,supplementalUnsupportedErrors:s})},u);return await(o?.(r,u,c)),v(u),await u.update({data:c}),(0,i.v)(m),await(l?.(u,m)),u}async function h(e,t){let{layer:r,createItemData:a,createJSONContext:n,setItemProperties:o,saveResources:l,supplementalUnsupportedErrors:s}=e;await p(e);let u=d(e),m=n?n(u):y(u),c=await a({layer:r,layerJSON:await w(r,m,{...t,supplementalUnsupportedErrors:s})},u);return await o(r,u,c),v(u),await async function(e,t,r){let a=e.portal;await a.signIn(),await a.user.addItem({item:e,data:t,folder:r?.folder})}(u,c,t),r.portalItem=u,(0,i.v)(m),await(l?.(u,m)),u}},88788(e,t,r){r.d(t,{m:()=>o,v:()=>n});var a=r(84952),i=r(20655);function n(e,t){return{...l(e,t),readResourcePaths:[]}}function o(e,t,r){let i=(0,a.An)(r?.forceNewItemContext?null:e.itemUrl);return{...l(e,t,r),messages:[],writtenProperties:[],blockedRelativeUrls:[],verifyItemRelativeUrls:i?{rootPath:i.path,writtenUrls:[]}:null,resources:r?.withResources?{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}:null}}function l(e,t,r){return{origin:t,url:(0,a.An)(r?.forceNewItemContext?null:e.itemUrl),portal:e.portal||i.A.getDefault(),portalItem:e}}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1737],{40876(e,t,n){n.d(t,{Eq:()=>m,G1:()=>g,Q6:()=>b,TS:()=>l,V6:()=>r,Vm:()=>f,ay:()=>o,c1:()=>p,c4:()=>a,j5:()=>u,lT:()=>d,oW:()=>h,xV:()=>_});const i={transparent:[0,0,0,0],black:[0,0,0,1],silver:[192,192,192,1],gray:[128,128,128,1],white:[255,255,255,1],maroon:[128,0,0,1],red:[255,0,0,1],purple:[128,0,128,1],fuchsia:[255,0,255,1],green:[0,128,0,1],lime:[0,255,0,1],olive:[128,128,0,1],yellow:[255,255,0,1],navy:[0,0,128,1],blue:[0,0,255,1],teal:[0,128,128,1],aqua:[0,255,255,1],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],blanchedalmond:[255,235,205,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],oldlace:[253,245,230,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],rebeccapurple:[102,51,153,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],whitesmoke:[245,245,245,1],yellowgreen:[154,205,50,1]};function r(e){return!!i[e]||!!i[e.toLowerCase()]}function l(e){return i[e]??i[e.toLowerCase()]}function a(e){return[...l(e)]}function s(e,t,n){n<0&&++n,n>1&&--n;let i=6*n;return i<1?e+(t-e)*i:2*n<1?t:3*n<2?e+(t-e)*(2/3-n)*6:e}function o(e,t,n,i=1){let r=(e%360+360)%360/360,l=n<=.5?n*(t+1):n+t-n*t,a=2*n-l;return[Math.round(255*s(a,l,r+1/3)),Math.round(255*s(a,l,r)),Math.round(255*s(a,l,r-1/3)),i]}function u(e){let t=e.length>5,n=t?8:4,i=(1<<n)-1,r=t?1:17,l=t?9===e.length:5===e.length,a=Number("0x"+e.slice(1));if(isNaN(a))return null;let s,o=[0,0,0,1];return l&&(s=a&i,a>>=n,o[3]=r*s/255),s=a&i,a>>=n,o[2]=r*s,s=a&i,a>>=n,o[1]=r*s,s=a&i,a>>=n,o[0]=r*s,o}function h(e){if(!e.startsWith("#")||isNaN(Number(`0x${e.slice(1)}`)))return null;switch(e.length){case 4:case 5:{let t=parseInt(e.slice(1,2),16),n=parseInt(e.slice(2,3),16),i=parseInt(e.slice(3,4),16),r=4===e.length?15:parseInt(e.slice(4),16);return[t+16*t,n+16*n,i+16*i,(r+16*r)/255]}case 7:case 9:return[parseInt(e.slice(1,3),16),parseInt(e.slice(3,5),16),parseInt(e.slice(5,7),16),(7===e.length?255:parseInt(e.slice(7),16))/255];default:return null}}function d(e){let t=e.toLowerCase().match(/^(rgba?|hsla?)\(([\s.\-,%0-9]+)\)/);if(t){let e=t[2].split(/\s*,\s*/),n=t[1];if("rgb"===n&&3===e.length||"rgba"===n&&4===e.length){if(e[0].endsWith("%")){let t=e.map(e=>2.56*parseFloat(e));return 4===e.length&&(t[3]=parseFloat(e[3])),c(t)}return c(e.map(e=>parseFloat(e)))}if("hsl"===n&&3===e.length||"hsla"===n&&4===e.length)return o(parseFloat(e[0]),parseFloat(e[1])/100,parseFloat(e[2])/100,parseFloat(e[3]??"1"))}return null}function c(e){return e[0]=p(e[0]),e[1]=p(e[1]),e[2]=p(e[2]),e[3]=4===e.length?g(e[3]):1,e}function m(e){let t=r(e)?l(e):null;return t??=d(e),t??=h(e),t}function f(e){let t=m(e);return null==t?null:[t[0]/255,t[1]/255,t[2]/255,t[3]]}function g(e){return y(e,0,1)}function p(e){return Math.round(y(e,0,255))}function y(e,t,n){return e=Number(e),isNaN(e)?n:e<t?t:e>n?n:e}const v=1/2.2;function b(e){return e**2.2}function _(e){return e**v}n.d(t,["iw",0,v])},7762(e,t,n){var i,r=n(32198),l=n(98291),a=n(4576),s=n(65529),o=n(36563),u=n(4718),h=n(53966),d=n(93687),c=n(76030),m=n(78888),f=n(62788),g=n(10107),p=n(7695),y=n(64108),v=n(95488),b=n(12195);class _{constructor(){this.target=null,this.cancellable=!1,this.defaultPrevented=!1,this.item=void 0,this.type=void 0}preventDefault(){this.cancellable&&(this.defaultPrevented=!0)}reset(e){this.defaultPrevented=!1,this.item=e}}class M{constructor(e,t,n,i,r){this.target=e,this.added=t,this.removed=n,this.start=i,this.deleteCount=r}}const w=new d.A(()=>new _,void 0,e=>{e.item=null,e.target=null,e.defaultPrevented=!1,e.cancellable=!1});function T(e){e&&"object"==typeof e&&"destroy"in e&&"function"==typeof e.destroy&&e.destroy()}function x(e){return e?e instanceof N?e.toArray():e.length?Array.prototype.slice.apply(e):[]:[]}function F(e){if(e?.length)return e[0]}function C(e,t,n,i){let r=Math.min(e.length-n,t.length-i),l=0;for(;l<r&&e[n+l]===t[i+l];)l++;return l}function S(e,t,n,i){t&&t.forEach((t,r,l)=>{e.push(t),S(e,n.call(i,t,r,l),n,i)})}const z=new Set,V=new Set,D=new Set,I=new Map;let k=0,N=i=class extends s.nJ{static ofType(e){if(!e)return i;if(I.has(e))return I.get(e);let t=null;if("function"==typeof e)t=e.prototype.declaredClass;else if(e.base)t=e.base.prototype.declaredClass;else for(let n in e.typeMap){let i=e.typeMap[n].prototype.declaredClass;t?t+=` | ${i}`:t=i}let n=class extends i{};return(0,r.Cg)([(0,p.u)({Type:e,ensureType:"function"==typeof e?(0,m.dp)(e):(0,m.aq)(e)})],n.prototype,"itemType",void 0),n=(0,r.Cg)([(0,y.$)(`esri.core.Collection<${t}>`)],n),I.set(e,n),n}static isCollection(e){return null!=e&&e instanceof i}constructor(e){super(e),this._chgListeners=[],this._notifications=null,this._updating=!1,this._timer=null,this._observable=new v.I,this._length=0,this._items=[],Object.defineProperty(this,"uid",{value:k++})}normalizeCtorArgs(e){return e?(0,a.yc)(e)||e instanceof i?{items:e}:e:{}}destroy(){this._removeAllRaw(),this._timer&&this._timer.remove(),super.destroy(),this._notifications=null}*[Symbol.iterator](){yield*this.items}get length(){return this._length}set length(e){e>this._length?h.A.getLogger(this).error("#length=","Cannot increase the length of the collection by assigning to the length property."):this.splice(e,Math.max(0,this._length-e))}get items(){return(0,f.gc)(this._observable),this._items}set items(e){this._emitBeforeChanges(1)||(this._splice(0,this.length,x(e)),this._emitAfterChanges(1))}hasEventListener(e){return!this.destroyed&&("change"===e?this._chgListeners.length>0:super.hasEventListener(e))}on(e,t){if(this.destroyed)return(0,o.hA)();if("change"===e){let e=this._chgListeners,n={removed:!1,callback:t};return e.push(n),this._notifications&&this._notifications.push({listeners:e.slice(),items:this._items.slice(),changes:[]}),(0,o.hA)(()=>{n.removed=!0,e.splice(e.indexOf(n),1)})}return super.on(e,t)}once(e,t){let n="deref"in t?()=>t.deref():()=>t,i=this.on(e,e=>{n()?.call(null,e),i.remove()});return i}add(e,t){if((0,f.gc)(this._observable),this._emitBeforeChanges(1))return this;let n=this.getNextIndex(t??null);return this._splice(n,0,[e]),this._emitAfterChanges(1),this}addMany(e,t=this._items.length){if((0,f.gc)(this._observable),!e?.length||this._emitBeforeChanges(1))return this;let n=this.getNextIndex(t);return this._splice(n,0,x(e)),this._emitAfterChanges(1),this}at(e){if((0,f.gc)(this._observable),(e=Math.trunc(e)||0)<0&&(e+=this.length),!(e<0||e>=this.length))return this._items[e]}removeAll(){if((0,f.gc)(this._observable),!this.length||this._emitBeforeChanges(2))return[];let e=this._removeAllRaw();return this._emitAfterChanges(2),e}_removeAllRaw(){return 0===this.length?[]:this._splice(0,this.length)||[]}clone(){return(0,f.gc)(this._observable),this._createNewInstance({items:this._items.map(u.o8)})}concat(...e){(0,f.gc)(this._observable);let t=e.map(x);return this._createNewInstance({items:this._items.concat(...t)})}drain(e,t){if((0,f.gc)(this._observable),!this.length||this._emitBeforeChanges(2))return;let n=this._splice(0,this.length),i=n.length;for(let r=0;r<i;r++)e.call(t,n[r],r,n);this._emitAfterChanges(2)}destroyAll(){this.drain(T)}destroyMany(e){let t=this.removeMany(e);return t.forEach(T),t}every(e,t){return(0,f.gc)(this._observable),this._items.every(e,t)}filter(e,t){(0,f.gc)(this._observable);let n=2===arguments.length?this._items.filter(e,t):this._items.filter(e);return this._createNewInstance({items:n})}find(e,t){return(0,f.gc)(this._observable),this._items.find(e,t)}findIndex(e,t){return(0,f.gc)(this._observable),this._items.findIndex(e,t)}findLast(e,t){return(0,f.gc)(this._observable),this._items.findLast(e,t)}findLastIndex(e,t){return(0,f.gc)(this._observable),this._items.findLastIndex(e,t)}flatten(e,t){(0,f.gc)(this._observable);let n=[];return S(n,this,e,t),new i(n)}forEach(e,t){return(0,f.gc)(this._observable),this._items.forEach(e,t)}getItemAt(e){return(0,f.gc)(this._observable),this._items[e]}getNextIndex(e){(0,f.gc)(this._observable);let t=this.length;return e??=t,e<0?e=0:e>t&&(e=t),e}includes(e,t=0){return(0,f.gc)(this._observable),this._items.includes(e,t)}indexOf(e,t=0){return(0,f.gc)(this._observable),this._items.indexOf(e,t)}join(e=","){return(0,f.gc)(this._observable),this._items.join(e)}lastIndexOf(e,t=this.length-1){return(0,f.gc)(this._observable),this._items.lastIndexOf(e,t)}map(e,t){(0,f.gc)(this._observable);let n=this._items.map(e,t);return new i({items:n})}reorder(e,t=this.length-1){(0,f.gc)(this._observable);let n=this.indexOf(e);if(-1!==n){if(t<0?t=0:t>=this.length&&(t=this.length-1),n!==t){if(this._emitBeforeChanges(4))return e;this._splice(n,1),this._splice(t,0,[e]),this._emitAfterChanges(4)}return e}}pop(){if((0,f.gc)(this._observable),!this.length||this._emitBeforeChanges(2))return;let e=F(this._splice(this.length-1,1));return this._emitAfterChanges(2),e}push(...e){return(0,f.gc)(this._observable),this._emitBeforeChanges(1)||(this._splice(this.length,0,e),this._emitAfterChanges(1)),this.length}reduce(e,t){(0,f.gc)(this._observable);let n=this._items;return 2===arguments.length?n.reduce(e,t):n.reduce(e)}reduceRight(e,t){(0,f.gc)(this._observable);let n=this._items;return 2===arguments.length?n.reduceRight(e,t):n.reduceRight(e)}remove(e){return(0,f.gc)(this._observable),this.removeAt(this.indexOf(e))}removeAt(e){if((0,f.gc)(this._observable),e<0||e>=this.length||this._emitBeforeChanges(2))return;let t=F(this._splice(e,1));return this._emitAfterChanges(2),t}removeMany(e){if((0,f.gc)(this._observable),!e?.length||this._emitBeforeChanges(2))return[];let t=e instanceof i?e.toArray():e,n=this._items,r=[],l=t.length;for(let e=0;e<l;e++){let i=t[e],l=n.indexOf(i);if(l>-1){let i=1+C(t,n,e+1,l+1),a=this._splice(l,i);a&&a.length>0&&r.push.apply(r,a),e+=i-1}}return this._emitAfterChanges(2),r}reverse(){if((0,f.gc)(this._observable),this._emitBeforeChanges(4))return this;let e=this._splice(0,this.length);return e&&(e.reverse(),this._splice(0,0,e)),this._emitAfterChanges(4),this}shift(){if((0,f.gc)(this._observable),!this.length||this._emitBeforeChanges(2))return;let e=F(this._splice(0,1));return this._emitAfterChanges(2),e}slice(e=0,t=this.length){return(0,f.gc)(this._observable),this._createNewInstance({items:this._items.slice(e,t)})}some(e,t){return(0,f.gc)(this._observable),this._items.some(e,t)}sort(e){if((0,f.gc)(this._observable),!this.length||this._emitBeforeChanges(4)||!this._requiresSort(e))return this;let t=this._splice(0,this.length);return arguments.length?t.sort(e):t.sort(),this._splice(0,0,t),this._emitAfterChanges(4),this}_requiresSort(e=(e,t)=>e===t?0:e<t?-1:1){let t=this.length-1;for(let n=0;n<t;n++)if(e(this.items[n],this.items[n+1])>0)return!0;return!1}splice(e,t,...n){(0,f.gc)(this._observable),1===arguments.length&&(t=this.length),t??=0;let i=(t?2:0)|!!n.length;if(this._emitBeforeChanges(i))return[];let r=this._splice(e,t,n)||[];return this._emitAfterChanges(i),r}toArray(){return(0,f.gc)(this._observable),this._items.slice()}toJSON(e){return(0,f.gc)(this._observable),this.toArray().map(t=>(0,b.W)(t)?t.toJSON(e):t)}toLocaleString(){return(0,f.gc)(this._observable),this._items.toLocaleString()}toString(){return(0,f.gc)(this._observable),this._items.toString()}unshift(...e){return(0,f.gc)(this._observable),!e.length||this._emitBeforeChanges(1)||(this._splice(0,0,e),this._emitAfterChanges(1)),this.length}_createNewInstance(e){return new this.constructor(e)}_splice(e,t,n){let i,r,l=this._items,a=this.itemType;if(!this._notifications&&this.hasEventListener("change")&&(this._notifications=[{listeners:this._chgListeners.slice(),items:this._items.slice(),changes:[]}],this._timer&&this._timer.remove(),this._updating=!0,this._timer=(0,c._)(()=>this._dispatchChange())),e<0&&(e+=this.length),t){if(r=l.splice(e,t),this.hasEventListener("before-remove")){let t=w.acquire();t.target=this,t.cancellable=!0;for(let n=0,a=r.length;n<a;n++)i=r[n],t.reset(i),this.emit("before-remove",t),t.defaultPrevented&&(r.splice(n,1),l.splice(e,0,i),e+=1,--n,--a);w.release(t)}if(this._length=this._items.length,this.hasEventListener("after-remove")){let e=w.acquire();e.target=this,e.cancellable=!1;let t=r.length;for(let n=0;n<t;n++)e.reset(r[n]),this.emit("after-remove",e);w.release(e)}}if(n?.length){if(a){let e=[];for(let t of n){let n=a.ensureType(t);(null!=n||null==t)&&e.push(n)}n=e}let t=this.hasEventListener("before-add"),i=this.hasEventListener("after-add"),r=e===this.length;if(t||i){let a=w.acquire();a.target=this,a.cancellable=!0;let s=w.acquire();s.target=this,s.cancellable=!1;for(let o of n)t?(a.reset(o),this.emit("before-add",a),a.defaultPrevented||(r?l.push(o):l.splice(e++,0,o),this._length=l.length,i&&(s.reset(o),this.emit("after-add",s)))):(r?l.push(o):l.splice(e++,0,o),this._length=l.length,s.reset(o),this.emit("after-add",s));w.release(s),w.release(a)}else{if(r)for(let e of n)l.push(e);else l.splice(e,0,...n);this._length=l.length}}if((n?.length||r?.length)&&this._notifyChangeEvent(n,r),this.hasEventListener("after-splice")){let i=new M(this,n,r,e,t);this.emit("after-splice",i)}return r}_emitBeforeChanges(e){let t=!1;if(this.hasEventListener("before-changes")){let n=w.acquire();n.target=this,n.cancellable=!0,n.type=e,this.emit("before-changes",n),t=n.defaultPrevented,w.release(n)}return t}_emitAfterChanges(e){if(this.hasEventListener("after-changes")){let t=w.acquire();t.target=this,t.cancellable=!1,t.type=e,this.emit("after-changes",t),w.release(t)}this._observable.notify()}_notifyChangeEvent(e,t){this.hasEventListener("change")&&this._notifications&&this._notifications[this._notifications.length-1].changes.push({added:e,removed:t})}get updating(){return this._updating}_dispatchChange(){if(this._timer&&=(this._timer.remove(),null),this._updating=!1,!this._notifications)return;let e=this._notifications;this._notifications=null;for(let t of e){let e=t.changes;z.clear(),V.clear(),D.clear();for(let{added:t,removed:n}of e){if(t)if(0===D.size&&0===V.size)for(let e of t)z.add(e);else for(let e of t)V.has(e)?(D.add(e),V.delete(e)):D.has(e)||z.add(e);if(n)if(0===D.size&&0===z.size)for(let e of n)V.add(e);else for(let e of n)z.has(e)?z.delete(e):(D.delete(e),V.add(e))}let n=l.A.acquire();z.forEach(e=>{n.push(e)});let i=l.A.acquire();V.forEach(e=>{i.push(e)});let r=this._items,a=t.items,s=l.A.acquire();if(D.forEach(e=>{a.indexOf(e)!==r.indexOf(e)&&s.push(e)}),t.listeners&&(n.length||i.length||s.length)){let e={target:this,added:n,removed:i,moved:s},r=t.listeners.length;for(let n=0;n<r;n++){let i=t.listeners[n];i.removed||i.callback.call(this,e)}}l.A.release(n),l.A.release(i),l.A.release(s)}z.clear(),V.clear(),D.clear()}};(0,r.Cg)([(0,g.MZ)()],N.prototype,"_updating",void 0),(0,r.Cg)([(0,g.MZ)()],N.prototype,"_length",void 0),(0,r.Cg)([(0,g.MZ)()],N.prototype,"length",null),(0,r.Cg)([(0,g.MZ)()],N.prototype,"items",null),(0,r.Cg)([(0,g.MZ)({readOnly:!0})],N.prototype,"updating",null),N=i=(0,r.Cg)([(0,y.$)("esri.core.Collection")],N);const L=N;n.d(t,["A",0,L])},7695(e,t,n){function i(e){return(t,n)=>{t[n]=e}}n.d(t,{u:()=>i})},91829(e,t,n){function i(){return[0,0,0,0]}function r(e,t,n,i){return[e,t,n,i]}function l(){return r(1,1,1,1)}function a(){return r(1,0,0,0)}function s(){return r(0,1,0,0)}function o(){return r(0,0,1,0)}function u(){return r(0,0,0,1)}n.d(t,{_Y:()=>u,fA:()=>r,vt:()=>i});const h=[0,0,0,0],d=l(),c=a(),m=s(),f=o(),g=u();Object.freeze(Object.defineProperty({__proto__:null,ONES:d,UNIT_W:g,UNIT_X:c,UNIT_Y:m,UNIT_Z:f,ZEROS:h,clone:function(e){return[e[0],e[1],e[2],e[3]]},create:i,freeze:function(e,t,n,i){return[e,t,n,i]},fromArray:function(e,t=[0,0,0,0]){let n=Math.min(4,e.length);for(let i=0;i<n;++i)t[i]=e[i];return t},fromValues:r,ones:l,unitW:u,unitX:a,unitY:s,unitZ:o,zeros:function(){return[0,0,0,0]}},Symbol.toStringTag,{value:"Module"})),n.d(t,["Un",0,d,"uY",0,h])},78955(e,t,n){n.d(t,{Bw:()=>p,C:()=>r,Cc:()=>_,LI:()=>c,Om:()=>b,S8:()=>v,T9:()=>d,WQ:()=>a,Z0:()=>M,aI:()=>T,hG:()=>g,hZ:()=>l,hs:()=>m,jk:()=>h,m3:()=>y,t2:()=>w});var i=n(34304);function r(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function l(e,t,n,i,r){return e[0]=t,e[1]=n,e[2]=i,e[3]=r,e}function a(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e[3]=t[3]+n[3],e}function s(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e[3]=t[3]-n[3],e}function o(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e[2]=t[2]*n[2],e[3]=t[3]*n[3],e}function u(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e[2]=t[2]/n[2],e[3]=t[3]/n[3],e}function h(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e[2]=Math.min(t[2],n[2]),e[3]=Math.min(t[3],n[3]),e}function d(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e[2]=Math.max(t[2],n[2]),e[3]=Math.max(t[3],n[3]),e}function c(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e[3]=Math.round(t[3]),e}function m(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e}function f(e,t){let n=t[0]-e[0],i=t[1]-e[1],r=t[2]-e[2],l=t[3]-e[3];return Math.sqrt(n*n+i*i+r*r+l*l)}function g(e,t){let n=t[0]-e[0],i=t[1]-e[1],r=t[2]-e[2],l=t[3]-e[3];return n*n+i*i+r*r+l*l}function p(e){let t=e[0],n=e[1],i=e[2],r=e[3];return Math.sqrt(t*t+n*n+i*i+r*r)}function y(e){let t=e[0],n=e[1],i=e[2],r=e[3];return t*t+n*n+i*i+r*r}function v(e,t){let n=t[0],i=t[1],r=t[2],l=t[3],a=n*n+i*i+r*r+l*l;return a>0&&(a=1/Math.sqrt(a),e[0]=n*a,e[1]=i*a,e[2]=r*a,e[3]=l*a),e}function b(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function _(e,t,n,i){let r=t[0],l=t[1],a=t[2],s=t[3];return e[0]=r+i*(n[0]-r),e[1]=l+i*(n[1]-l),e[2]=a+i*(n[2]-a),e[3]=s+i*(n[3]-s),e}function M(e,t,n){let i=t[0],r=t[1],l=t[2],a=t[3];return e[0]=n[0]*i+n[4]*r+n[8]*l+n[12]*a,e[1]=n[1]*i+n[5]*r+n[9]*l+n[13]*a,e[2]=n[2]*i+n[6]*r+n[10]*l+n[14]*a,e[3]=n[3]*i+n[7]*r+n[11]*l+n[15]*a,e}function w(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}function T(e,t){let n=e[0],r=e[1],l=e[2],a=e[3],s=t[0],o=t[1],u=t[2],h=t[3],d=(0,i.FD)();return Math.abs(n-s)<=d*Math.max(1,Math.abs(n),Math.abs(s))&&Math.abs(r-o)<=d*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(l-u)<=d*Math.max(1,Math.abs(l),Math.abs(u))&&Math.abs(a-h)<=d*Math.max(1,Math.abs(a),Math.abs(h))}const x=s,F=o,C=u,S=f,z=g,V=p,D=y;Object.freeze(Object.defineProperty({__proto__:null,add:a,ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e[3]=Math.ceil(t[3]),e},copy:r,copyVec3:function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},dist:S,distance:f,div:C,divide:u,dot:b,equals:T,exactEquals:w,floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e[3]=Math.floor(t[3]),e},inverse:function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e[3]=1/t[3],e},len:V,length:p,lerp:_,max:d,min:h,mul:F,multiply:o,negate:function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e},normalize:v,random:function(e,t=1){let n,r,l,a,s,o,u=i.Ov;do{n=2*u()-1,r=2*u()-1,s=n*n+r*r}while(s>=1);do{l=2*u()-1,a=2*u()-1,o=l*l+a*a}while(o>=1);let h=Math.sqrt((1-s)/o);return e[0]=t*n,e[1]=t*r,e[2]=t*l*h,e[3]=t*a*h,e},round:c,scale:m,scaleAndAdd:function(e,t,n,i){return e[0]=t[0]+n[0]*i,e[1]=t[1]+n[1]*i,e[2]=t[2]+n[2]*i,e[3]=t[3]+n[3]*i,e},set:l,sqrDist:z,sqrLen:D,squaredDistance:g,squaredLength:y,str:function(e){return"vec4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"},sub:x,subtract:s,transformMat4:M,transformQuat:function(e,t,n){let i=t[0],r=t[1],l=t[2],a=n[0],s=n[1],o=n[2],u=n[3],h=u*i+s*l-o*r,d=u*r+o*i-a*l,c=u*l+a*r-s*i,m=-a*i-s*r-o*l;return e[0]=h*u+m*-a+d*-o-c*-s,e[1]=d*u+m*-s+c*-a-h*-o,e[2]=c*u+m*-o+h*-s-d*-a,e[3]=t[3],e}},Symbol.toStringTag,{value:"Module"}))},90629(e,t,n){n.d(t,{Lz:()=>r,PN:()=>l,cr:()=>a,gs:()=>o,r_:()=>u,tc:()=>s}),n(39829);const i=/^-?(\d+(\.\d+)?)\s*((px)|(pt))?$/i;function r(e){return e?e/72*96:0}function l(e){return e?72*e/96:0}function a(e){if("string"==typeof e){let t=e.match(i);if(t){let n=Number(t[1]),i=t[3]&&t[3].toLowerCase(),r=e.startsWith("-"),a="px"===i?l(n):n;return r?-a:a}return console.warn("screenUtils.toPt: input not recognized!"),null}return e}function s(e=0,t=0){return{x:e,y:t}}function o(e=0,t=0){return[e,t]}function u(e=0,t=0,n=0){return[e,t,n]}},88930(e,t,n){n.d(t,{S1:()=>s,VW:()=>o,lL:()=>u,rb:()=>h,t:()=>d});var i=n(97770),r=(n(98623),n(34747));const l=/^(?<hh>([01][0-9])|(2[0-3])):(?<mm>[0-5][0-9])(:(?<ss>[0-5][0-9]))?(\.(?<ms>\d+))?$/,a={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8,unknown:NaN};function s(e,t,n,l="system"){if("unknown"===n)return e;let a=new r.oh((0,i.wj)(l)),s=r.c9.fromJSDate(e,{zone:a}),o="decades"===n||"centuries"===n?"year":function(e){switch(e){case"milliseconds":return"millisecond";case"seconds":return"second";case"minutes":return"minute";case"hours":return"hour";case"days":return"day";case"weeks":return"week";case"months":return"month";case"years":return"year"}}(n);return"decades"===n&&(t*=10),"centuries"===n&&(t*=100),s.plus({[o]:t}).toJSDate()}function o(e,t,n="milliseconds"){let i=e.getTime(),r=d(t,n,"milliseconds");return new Date(i+r)}function u(e,t,n="system"){let{unit:l}=t,a=Math.max(1,Math.trunc(t.value)),s=new r.oh((0,i.wj)(n)),o=r.c9.fromJSDate(e,{zone:s}),u=e=>e-e%a;switch(l){case"milliseconds":return o.startOf("second").plus({millisecond:u(o.millisecond)}).toJSDate();case"seconds":return o.startOf("minute").plus({second:u(o.second)}).toJSDate();case"minutes":return o.startOf("hour").plus({minute:u(o.minute)}).toJSDate();case"hours":return o.startOf("day").plus({hour:u(o.hour)}).toJSDate();case"days":return o.startOf("month").plus({day:u(o.day-1)}).toJSDate();case"weeks":{let e=o.startOf("year").startOf("week"),t=Math.floor(o.diff(e,"weeks").weeks);return e.plus({week:u(t)}).toJSDate()}case"months":return o.startOf("year").plus({month:u(o.month-1)}).toJSDate();case"years":case"decades":case"centuries":{let e=o.startOf("year"),t=("decades"===l?10:"centuries"===l?100:1)*a,n=e.year-e.year%t;return e.set({year:n}).toJSDate()}case"unknown":return e}}function h(e){let t=l.exec(e);if(!t)return null;let{hh:n,mm:i,ss:r,ms:s}=t.groups;return Number(n)*a.hours+Number(i)*a.minutes+Number(r||0)*a.seconds+Number(s||0)}function d(e,t,n){return 0===e?0:e*a[t]/a[n]}},62577(e,t,n){function i(e){return e?{originPosition:"upper-left"===e.originPosition?"upperLeft":"lower-left"===e.originPosition?"lowerLeft":e.originPosition,scale:e.tolerance?[e.tolerance,e.tolerance,1,1]:[1,1,1,1],translate:null==e.extent?[0,0,0,0]:[e.extent.xmin,e.extent.ymax,e.extent.zmin??0,e.extent.mmin??0]}:null}function r(e){if(function(e){return"lowerLeft"===e.originPosition&&4===e.scale.length&&4===e.translate.length}(e))return e;let{originPosition:t,scale:n,translate:i}=e,r=n[0]??1,l=n[1]??1;return{originPosition:"lowerLeft",scale:[r,"lowerLeft"===t?l:-l,n[2]??1,n[3]??1],translate:[i[0]??0,i[1]??0,i[2]??0,i[3]??0]}}function l({scale:e,translate:t},n){return Math.round((n-t[0])/e[0])}function a({scale:e,translate:t},n){return Math.round((n-t[1])/e[1])}function s({scale:e,translate:t},n){return n*e[0]+t[0]}function o({scale:e,translate:t},n){return n*e[1]+t[1]}function u({scale:e,translate:t},n){return(n??0)*e[2]+t[2]}function h({scale:e,translate:t},n){return n?n*e[3]+t[3]:0}function d(e,t){return e&&t?g:e&&!t?m:!e&&t?f:c}n.d(t,{$X:()=>_,B2:()=>a,Gy:()=>y,IE:()=>l,P5:()=>M,Q1:()=>r,SW:()=>v,Tr:()=>b,VV:()=>i});const c=(e,t)=>{let n=Array(t.length);if(!t.length)return n;let i=t[0],r=s(e,i[0]),l=o(e,i[1]);n[0]=[r,l];let{scale:a,originPosition:u}=e,h=a[0],d="lowerLeft"===u?a[1]:-a[1];for(let e=1;e<t.length;e++){let[i,a]=t[e];r+=h*i,l+=d*a,n[e]=[r,l]}return n},m=(e,t)=>{let n=Array(t.length);if(!t.length)return n;let i=t[0],r=s(e,i[0]),l=o(e,i[1]);n[0]=[r,l,u(e,i[2])];let{scale:a,originPosition:h}=e,d=a[0],c="lowerLeft"===h?a[1]:-a[1];for(let i=1;i<t.length;i++){let[a,s,o]=t[i];r+=d*a,l+=c*s,n[i]=[r,l,u(e,o)]}return n},f=(e,t)=>{let n=Array(t.length);if(!t.length)return n;let i=t[0],r=s(e,i[0]),l=o(e,i[1]);n[0]=[r,l,h(e,i[2])];let{scale:a,originPosition:u}=e,d=a[0],c="lowerLeft"===u?a[1]:-a[1];for(let i=1;i<t.length;i++){let[a,s,o]=t[i];r+=d*a,l+=c*s,n[i]=[r,l,h(e,o)]}return n},g=(e,t)=>{let n=Array(t.length);if(!t.length)return n;let i=t[0],r=s(e,i[0]),l=o(e,i[1]);n[0]=[r,l,u(e,i[2]),h(e,i[3])];let{scale:a,originPosition:d}=e,c=a[0],m="lowerLeft"===d?a[1]:-a[1];for(let i=1;i<t.length;i++){let[a,s,o,d]=t[i];r+=c*a,l+=m*s,n[i]=[r,l,u(e,o),h(e,d)]}return n};function p(e,t,n){let i=Array(n.length);for(let r=0;r<n.length;r++)i[r]=t(e,n[r]);return i}function y(e,t,n){let i=r(e);return t.x=l(i,n.x),t.y=a(i,n.y),null!=n.z&&(t.z=function({scale:e,translate:t},n){return Math.round(((n??0)-t[2])/e[2])}(i,n.z)),null!=n.m&&(t.m=function({scale:e,translate:t},n){return n?Math.round((n-t[3])/e[3]):0}(i,n.m)),t}function v(e,t,n,i=n?.hasZ??!1,l=n?.hasM??!1){if(null!=n){let a=r(e);t.points=d(i,l)(a,n.points),t.hasZ=i,t.hasM=l}return t}function b(e,t,n,i=null!=n?.z,l=null!=n?.m){if(null==n)return t;let a=r(e);return t.x=s(a,n.x),t.y=o(a,n.y),i&&(t.z=u(a,n.z)),l&&(t.m=h(a,n.m)),t}function _(e,t,n,i=n?.hasZ??!1,l=n?.hasM??!1){return null!=n&&(t.rings=p(r(e),d(i,l),n.rings),t.hasZ=i,t.hasM=l),t}function M(e,t,n,i=n?.hasZ??!1,l=n?.hasM??!1){return null!=n&&(t.paths=p(r(e),d(i,l),n.paths),t.hasZ=i,t.hasM=l),t}},97770(e,t,n){n.d(t,{Ey:()=>D,F8:()=>V,J2:()=>F,Yq:()=>S,_m:()=>C,iS:()=>z,wj:()=>I});var i=n(66552),r=n(73444),l=n(98623),a=n(34747);const s={dateStyle:void 0,year:void 0,month:void 0,day:void 0,weekday:void 0},o={timeStyle:void 0,hour12:void 0,hourCycle:void 0,hour:void 0,minute:void 0,second:void 0},u={timeZone:"UTC"},h={year:"numeric",month:"numeric",day:"numeric"},d={year:"numeric",month:"long",day:"numeric"},c={year:"numeric",month:"short",day:"numeric"},m={year:"numeric",month:"long",weekday:"long",day:"numeric"},f={hour:"numeric",minute:"numeric"},g={...f,second:"numeric"},p={hourCycle:"h23"},y={...f,...p},v={...g,...p},b={"short-date":h,"short-date-short-time":{...h,...f},"short-date-short-time-24":{...h,...y},"short-date-long-time":{...h,...g},"short-date-long-time-24":{...h,...v},"short-date-le":h,"short-date-le-short-time":{...h,...f},"short-date-le-short-time-24":{...h,...y},"short-date-le-long-time":{...h,...g},"short-date-le-long-time-24":{...h,...v},"long-month-day-year":d,"long-month-day-year-short-time":{...d,...f},"long-month-day-year-short-time-24":{...d,...y},"long-month-day-year-long-time":{...d,...g},"long-month-day-year-long-time-24":{...d,...v},"day-short-month-year":c,"day-short-month-year-short-time":{...c,...f},"day-short-month-year-short-time-24":{...c,...y},"day-short-month-year-long-time":{...c,...g},"day-short-month-year-long-time-24":{...c,...v},"long-date":m,"long-date-short-time":{...m,...f},"long-date-short-time-24":{...m,...y},"long-date-long-time":{...m,...g},"long-date-long-time-24":{...m,...v},"long-month-year":{month:"long",year:"numeric"},"short-month-year":{month:"short",year:"numeric"},year:{year:"numeric"},"short-time":f,"long-time":g},_=(0,i.O)()({shortDate:"short-date",shortDateShortTime:"short-date-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLongTime:"short-date-long-time",shortDateLongTime24:"short-date-long-time-24",shortDateLE:"short-date-le",shortDateLEShortTime:"short-date-le-short-time",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLELongTime:"short-date-le-long-time",shortDateLELongTime24:"short-date-le-long-time-24",longMonthDayYear:"long-month-day-year",longMonthDayYearShortTime:"long-month-day-year-short-time",longMonthDayYearShortTime24:"long-month-day-year-short-time-24",longMonthDayYearLongTime:"long-month-day-year-long-time",longMonthDayYearLongTime24:"long-month-day-year-long-time-24",dayShortMonthYear:"day-short-month-year",dayShortMonthYearShortTime:"day-short-month-year-short-time",dayShortMonthYearShortTime24:"day-short-month-year-short-time-24",dayShortMonthYearLongTime:"day-short-month-year-long-time",dayShortMonthYearLongTime24:"day-short-month-year-long-time-24",longDate:"long-date",longDateShortTime:"long-date-short-time",longDateShortTime24:"long-date-short-time-24",longDateLongTime:"long-date-long-time",longDateLongTime24:"long-date-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year",year:"year"}),M={ar:"ar-u-nu-latn-ca-gregory",nn:"no-NN"};function w(){let e=(0,r.lR)();return(e&&M[e])??(0,r.QC)()}"mart"!==new Intl.DateTimeFormat("bs",{month:"long"}).formatToParts(new Date(2025,2)).find(({type:e})=>"month"===e)?.value.toLowerCase()&&(M.bs="sr-Latn-CS");let T=new WeakMap;const x=b["short-date-short-time"];function F(e){return b[e]}function C(e){let{dateStyle:t,timeStyle:n,hour12:i,year:r,month:l}=e,a={};return t?a.dateStyle=t:r&&(a.year=r,a.month=l||void 0),n&&!a.year&&(a.timeStyle=n,a.hour12="auto"===i?void 0:"always"===i),a}function S(e,t=x){return function(e){let t=T.get(e);if(!t){let n=w(),i=I(e.timeZone??"system"),r={...e,timeZone:i};t=new Intl.DateTimeFormat(n,r),T.set(e,t)}return t}(t).format(e)}function z(e,t=x){return S(new Date(e),{...t,...u,...o})}function V(e,t=x){return S(new Date(`1970-01-01T${e}Z`),{...t,...u,...s})}function D(e,t=x){let n=a.c9.fromISO(e,{setZone:!0});if(!n.isValid)return e;if(t.timeZone)return S(n.toJSDate(),t);let i=0===n.offset?"UTC":t.timeZone,r={...t,timeZone:i};return n.toLocaleString(r,{locale:w()})}function I(e){switch(e){case"system":return l.N;case l.L:return"UTC";default:return e}}(0,r.Ml)(()=>{T=new WeakMap}),n.d(t,["_v",0,_])},73444(e,t,n){n.d(t,{JK:()=>o,Ml:()=>p,QC:()=>d,lR:()=>h,oQ:()=>f});var i=n(36563);let r;n(44208);const l=globalThis.esriConfig?.locale,a=globalThis.document?.documentElement;function s(){let e=a?.getAttribute("lang"),t=globalThis.navigator?.language;return l??e??t??"en"}function o(){return void 0===r&&(r=s()),r}const u=/^(?<language>[a-z]{2,3})(?:-(?<extlang>[a-z]{3}))?(?:-[A-Z][a-z]{3})?(?:-(?<region>[A-Z]{2}|\d{3}))?(?:-.*)?$/;function h(e=o()){return c(e)?.language}function d(e=o()){let t=c(e);return t?.language&&t?.extlang?e.replace(`${t.language}-`,""):e}function c(e=o()){return u.exec(e)?.groups}const m=[];function f(e){return m.push(e),(0,i.hA)(()=>{m.splice(m.indexOf(e),1)})}new Map;const g=[];function p(e){return g.push(e),(0,i.hA)(()=>g.splice(g.indexOf(e),1))}function y(){let e=s();r!==e&&([...g].forEach(t=>t(e)),r=e,[...m].forEach(t=>t(e)))}globalThis.addEventListener?.("languagechange",y),a&&new MutationObserver(()=>{y()}).observe(a,{attributeFilter:["lang"]})},95466(e,t,n){n.d(t,{A:()=>u});var i=n(49186),r=n(53966),l=n(12195),a=n(30524),s=n(98623),o=n(56400);class u{static fromJSON(e){return new u(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new u(e.fields??[],d(e))}static fromLayerJSON(e){return new u(e.fields??[],d(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;let n=[];for(let e of this.fields){let t=e?.name,i=(0,a.GZ)(t);if(t&&i){let r=(0,a.NF)(t);this._fieldsMap.set(t,e),this._fieldsMap.set(r,e),this._normalizedFieldsMap.set(i,e),n.push(`${r}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,a.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,a.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),!(0,a.te)(e)&&!(0,a.Xz)(e)&&(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}n.sort(),this.uid=n.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(let e of this.fields)!(0,a.te)(e)&&!(0,a.Xz)(e)&&!e.nullable&&void 0===(0,a.lD)(e)&&this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){return(0,a.Vb)({fieldName:e,fieldsMap:this._fieldsMap,normalizedFieldsMap:this._normalizedFieldsMap})}getTimeZone(e){let t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(r.A.getLogger("esri.layers.support.FieldsIndex").errorOnce(new i.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),"UTC"):h.has(t.type)?s.L:null:null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,a.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map(e=>(0,l.W)(e)?e.toJSON():e),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}const h=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function d(e){let t=new Map;if(!e.fields)return t;let n=!0===e.datesInUnknownTimezone,{timeInfo:i,editFieldsInfo:r}=e,l=(i?"startField"in i?i.startField:i.startTimeField:"")??"",u=(i?"endField"in i?i.endField:i.endTimeField:"")??"",d=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,o.ZS)(e.dateFieldsTimeReference):null,c=r?function(e){return"timeZone"in e}(r)?r.timeZone??d:r.dateFieldsTimeReference?(0,o.ZS)(r.dateFieldsTimeReference):d??"UTC":null,m=i?function(e){return"timeZone"in e}(i)?i.timeZone??d:i.timeReference?(0,o.ZS)(i.timeReference):d:null,f=new Map([[(0,a.NF)(r?.creationDateField??""),c],[(0,a.NF)(r?.editDateField??""),c],[(0,a.NF)(l),m],[(0,a.NF)(u),m]]);for(let{name:i,type:r}of e.fields)if(h.has(r))t.set(i,s.L);else if("date"!==r&&"esriFieldTypeDate"!==r)t.set(i,null);else if(n)t.set(i,s.L);else{let e=f.get((0,a.NF)(i??""))??d;t.set(i,e)}return t}},61760(e,t,n){n.d(t,{PU:()=>l,YW:()=>s,hv:()=>a,zp:()=>r}),n(34727);var i=n(90629);function r(e){return(0,i.PN)(2.4*e)}function l(e){return(0,i.Lz)(e)/2.4}function a(e,t,n){let i=Math.sqrt(e**2+t**2)/n;return i>1?0:3/(Math.PI*n**2)*(1-i**2)**2}function s(e){return"function"==typeof e?e:e?t=>+t[e]:()=>1}n(78955),n(91829)},9760(e,t,n){n.d(t,{A:()=>h});var i=n(32198),r=n(66552),l=n(25482),a=n(91429),s=n(93223);const o=new r.J({esriClassifyEqualInterval:"equal-interval",esriClassifyManual:"manual",esriClassifyNaturalBreaks:"natural-breaks",esriClassifyQuantile:"quantile",esriClassifyStandardDeviation:"standard-deviation",esriClassifyDefinedInterval:"defined-interval"}),u=new r.J({esriNormalizeByLog:"log",esriNormalizeByPercentOfTotal:"percent-of-total",esriNormalizeByField:"field"});let h=class extends l.o{constructor(e){super(e),this.type="class-breaks-definition",this.breakCount=null,this.classificationField=null,this.classificationMethod=null,this.normalizationField=null,this.normalizationType=null}set standardDeviationInterval(e){"standard-deviation"===this.classificationMethod&&this._set("standardDeviationInterval",e)}set definedInterval(e){"defined-interval"===this.classificationMethod&&this._set("definedInterval",e)}};(0,i.Cg)([(0,s.e)({classBreaksDef:"class-breaks-definition"})],h.prototype,"type",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],h.prototype,"breakCount",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],h.prototype,"classificationField",void 0),(0,i.Cg)([(0,a.MZ)({type:String,json:{read:o.read,write:o.write}})],h.prototype,"classificationMethod",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],h.prototype,"normalizationField",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:u.read,write:u.write}})],h.prototype,"normalizationType",void 0),(0,i.Cg)([(0,a.MZ)({value:null,json:{write:!0}})],h.prototype,"standardDeviationInterval",null),(0,i.Cg)([(0,a.MZ)({value:null,json:{write:!0}})],h.prototype,"definedInterval",null),h=(0,i.Cg)([(0,a.$K)("esri.rest.support.ClassBreaksDefinition")],h)},84892(e,t,n){n.d(t,{t:()=>l});var i=n(53966);function r(e,t){return Number(e.toFixed(t))}function l(e,t){let{normalizationTotal:n}=e;return{classBreaks:a(e,t),normalizationTotal:n}}function a(e,t){let n=e.definition,{classificationMethod:i,normalizationType:l,definedInterval:a}=n,u=n.breakCount??1,h=[],d=e.values;if(0===d.length)return[];d=d.sort((e,t)=>e-t);let[c,m]=t??[d.at(0),d.at(-1)];if("equal-interval"===i)if(d.length>=u){let e=(m-c)/u,t=c;for(let n=1;n<u;n++){let i=r(c+n*e,6);h.push({minValue:t,maxValue:i,label:s(t,i,l)}),t=i}h.push({minValue:t,maxValue:m,label:s(t,m,l)})}else d.forEach(e=>{h.push({minValue:e,maxValue:e,label:s(e,e,l)})});else if("natural-breaks"===i){let t=function(e){let t=[],n=[],i=Number.MIN_VALUE,r=1,l=-1;for(let a=0;a<e.length;a++){let s=e[a];s===i?(r++,n[l]=r):null!==s&&(t.push(s),i=s,r=1,n.push(r),l++)}return{uniqueValues:t,valueFrequency:n}}(d),n=e.valueFrequency||t.valueFrequency,i=o(t.uniqueValues,n,u),a=c;for(let e=1;e<u;e++)if(t.uniqueValues.length>e){let n=r(t.uniqueValues[i[e]],6);h.push({minValue:a,maxValue:n,label:s(a,n,l)}),a=n}h.push({minValue:a,maxValue:m,label:s(a,m,l)})}else if("quantile"===i)if(d.length>=u&&c!==m){let e=c,t=Math.ceil(d.length/u),n=0;for(let i=1;i<u;i++){let r=t+n-1;r>d.length&&(r=d.length-1),r<0&&(r=0),h.push({minValue:e,maxValue:d[r],label:s(e,d[r],l)}),e=d[r],n+=t,t=Math.ceil((d.length-n)/(u-i))}h.push({minValue:e,maxValue:m,label:s(e,m,l)})}else{let e=-1;for(let t=0;t<d.length;t++){let n=d[t];n!==e&&(e=n,h.push({minValue:e,maxValue:n,label:s(e,n,l)}),e=n)}}else if("standard-deviation"===i){let e=function(e){let t=0;for(let n=0;n<e.length;n++)t+=e[n];return t/=e.length,t}(d),t=function(e,t){let n=0;for(let i=0;i<e.length;i++){let r=e[i];n+=(r-t)*(r-t)}return n/=e.length,Math.sqrt(n)}(d,e);if(0===t)h.push({minValue:d[0],maxValue:d[0],label:s(d[0],d[0],l)});else{let n=function(e,t,n,i,r){let l=Math.max(i-e,t-i)/r/n;return l=l>=1?1:l>=.5?.5:.25,l}(c,m,u,e,t)*t,i=0,a=c;for(let t=u;t>=1;t--){let o=r(e-(t-.5)*n,6);h.push({minValue:a,maxValue:o,label:s(a,o,l)}),a=o,i++}let o=r(e+.5*n,6);h.push({minValue:a,maxValue:o,label:s(a,o,l)}),a=o,i++;for(let t=1;t<=u;t++)o=i===2*u?m:r(e+(t+.5)*n,6),h.push({minValue:a,maxValue:o,label:s(a,o,l)}),a=o,i++}}else if("defined-interval"===i){if(!a)return h;let[e,n]=t??[d.at(0),d.at(-1)],i=Math.ceil((n-e)/a),o=e;for(let t=1;t<i;t++){let n=r(e+t*a,6);h.push({minValue:o,maxValue:n,label:s(o,n,l)}),o=n}h.push({minValue:o,maxValue:n,label:s(o,n,l)})}return h}function s(e,t,n){let i=null;return i=e===t?n&&"percent-of-total"===n?e+"%":e.toString():n&&"percent-of-total"===n?e+"% - "+t+"%":e+" - "+t,i}function o(e,t,n){let i=e.length,r=[];n>i&&(n=i);for(let e=0;e<n;e++)r.push(Math.round(e*i/n-1));r.push(i-1);let l=u(r,e,t,n);return function(e,t,n,i,r,l){let a=0,s=0,o=0,u=0,d=!0;for(let c=0;c<2&&d;c++){0===c&&(d=!1);for(let c=0;c<l-1;c++)for(;n[c+1]+1!==n[c+2];){n[c+1]=n[c+1]+1;let l=h(c,n,i,r);o=l.sbMean,a=l.sbSdcm;let m=h(c+1,n,i,r);if(u=m.sbMean,s=m.sbSdcm,!(a+s<t[c]+t[c+1])){n[c+1]=n[c+1]-1;break}t[c]=a,t[c+1]=s,e[c]=o,e[c+1]=u,d=!0}for(let c=l-1;c>0;c--)for(;n[c]!==n[c-1]+1;){n[c]=n[c]-1;let l=h(c-1,n,i,r);o=l.sbMean,a=l.sbSdcm;let m=h(c,n,i,r);if(u=m.sbMean,s=m.sbSdcm,!(a+s<t[c-1]+t[c])){n[c]=n[c]+1;break}t[c-1]=a,t[c]=s,e[c-1]=o,e[c]=u,d=!0}}return d}(l.mean,l.sdcm,r,e,t,n)&&(l=u(r,e,t,n)),r}function u(e,t,n,i){let r=[],l=[],a=[],s=0,o=[],u=[];for(let r=0;r<i;r++){let i=h(r,e,t,n);o.push(i.sbMean),u.push(i.sbSdcm),s+=u[r]}let d,c=s,m=!0;for(;m||s<c;){m=!1,r=[];for(let t=0;t<i;t++)r.push(e[t]);for(let n=0;n<i;n++)for(let r=e[n]+1;r<=e[n+1];r++)if(d=t[r],n>0&&r!==e[n+1]&&Math.abs(d-o[n])>Math.abs(d-o[n-1]))e[n]=r;else if(n<i-1&&e[n]!==r-1&&Math.abs(d-o[n])>Math.abs(d-o[n+1])){e[n+1]=r-1;break}c=s,s=0,l=[],a=[];for(let r=0;r<i;r++){l.push(o[r]),a.push(u[r]);let i=h(r,e,t,n);o[r]=i.sbMean,u[r]=i.sbSdcm,s+=u[r]}}if(s>c){for(let t=0;t<i;t++)e[t]=r[t],o[t]=l[t],u[t]=a[t];s=c}return{mean:o,sdcm:u}}function h(e,t,n,r){let l=0,a=0;for(let i=t[e]+1;i<=t[e+1];i++){let e=r[i];l+=n[i]*e,a+=e}a<=0&&i.A.getLogger("esri.rest.support.generateRendererUtils").warn("Exception in Natural Breaks calculation");let s=l/a,o=0;for(let i=t[e]+1;i<=t[e+1];i++)o+=r[i]*(n[i]-s)**2;return{sbMean:s,sbSdcm:o}}},26412(e,t,n){n.r(t),n.d(t,{classBreaks:()=>b,heatmapStatistics:()=>M,histogram:()=>_,summaryStatistics:()=>y,uniqueValues:()=>v}),n(49186);var i=n(90629),r=n(88930),l=n(86738),a=n(16930),s=n(62577),o=n(21325),u=n(95466),h=n(30524),d=n(61760),c=n(4560),m=n(1873),f=n(43668);let g;async function p(e,t,n=!0){if(!t)return[];let i,{field:l,field2:s,field3:o,fieldDelimiter:d,sqlExpression:p,fieldInfos:y,timeZone:v}=e,b=l&&y?.find(e=>e.name.toLowerCase()===l.toLowerCase()),_=!!b&&(0,h.OH)(b),M=!!b&&(0,c.fs)(b),w=e.valueExpression,T=e.normalizationType,x=e.normalizationField,F=e.normalizationTotal,C=[],S=e.viewInfoParams,z=null;if(w){if(!g){let{arcadeUtils:e}=await(0,f.l)();g=e}g.hasGeometryOperations(w)&&await g.enableGeometryOperations(),z=g.createFunction(w),i=S?g.getViewInfo({viewingMode:S.viewingMode,scale:S.scale,spatialReference:new a.A(S.spatialReference)}):null}let V=e.fieldInfos,D=t[0]&&"declaredClass"in t[0]&&"esri.Graphic"===t[0].declaredClass||!V?null:{fields:V};for await(let e of t){let t,a=e.attributes;if(p){let n=await(0,c.j4)(p,new u.A(V));n&&(t=n.calculateValue(e.attributes))}else if(w){let n=D?Object.assign({},e,{layer:D}):e,r=g.createExecContext(n,i,v);t=g.executeFunction(z,r)}else a&&(t=a[l],s?(t=`${(0,m.gJ)(t)}${d}${(0,m.gJ)(a[s])}`,o&&(t=`${t}${d}${(0,m.gJ)(a[o])}`)):"string"==typeof t&&n&&(M?t=t?new Date(t).getTime():null:_&&(t=t?(0,r.rb)(t):null)));if(T&&"number"==typeof t&&isFinite(t)){let e=a&&parseFloat(a[x]);t=(0,m.zS)(t,T,e,F)}C.push(t)}return C}async function y(e){let{attribute:t,features:n}=e,{normalizationType:i,normalizationField:r,minValue:l,maxValue:a,fieldType:s,outStatisticTypes:o}=t,u=await p({field:t.field,valueExpression:t.valueExpression,normalizationType:i,normalizationField:r,normalizationTotal:t.normalizationTotal,viewInfoParams:t.viewInfoParams,timeZone:t.timeZone,fieldInfos:t.fieldInfos},n),h=(0,m.Vb)({normalizationType:i,normalizationField:r,minValue:l,maxValue:a}),d={value:.5,fieldType:s},c="esriFieldTypeString"===s?(0,m.z9)({values:u,supportsNullCount:h,percentileParams:d,outStatisticTypes:o}):(0,m.G_)({values:u,minValue:l,maxValue:a,useSampleStdDev:!i,supportsNullCount:h,percentileParams:d,outStatisticTypes:o});return(0,m.oZ)(c,o,"esriFieldTypeDate"===s)}async function v(e){let{attribute:t,features:n}=e,i=await p({field:t.field,field2:t.field2,field3:t.field3,fieldDelimiter:t.fieldDelimiter,valueExpression:t.valueExpression,viewInfoParams:t.viewInfoParams,timeZone:t.timeZone,fieldInfos:t.fieldInfos},n,!1),r=(0,m.b3)(i);return(0,m.lv)(r,t.domains,t.returnAllCodedValues,t.fieldDelimiter)}async function b(e){let{attribute:t,features:n}=e,{field:i,normalizationType:r,normalizationField:l,normalizationTotal:a,classificationMethod:s}=t,o=await p({field:i,valueExpression:t.valueExpression,normalizationType:r,normalizationField:l,normalizationTotal:a,viewInfoParams:t.viewInfoParams,timeZone:t.timeZone,fieldInfos:t.fieldInfos},n),u=(0,m.Rw)(o,{field:i,normalizationType:r,normalizationField:l,normalizationTotal:a,classificationMethod:s,standardDeviationInterval:t.standardDeviationInterval,numClasses:t.numClasses,minValue:t.minValue,maxValue:t.maxValue});return(0,m.jM)(u,s)}async function _(e){let{attribute:t,features:n}=e,{field:i,normalizationType:r,normalizationField:l,normalizationTotal:a,classificationMethod:s}=t,o=await p({field:i,valueExpression:t.valueExpression,sqlExpression:t.sqlExpression,normalizationType:r,normalizationField:l,normalizationTotal:a,viewInfoParams:t.viewInfoParams,timeZone:t.timeZone,fieldInfos:t.fieldInfos},n);return(0,m.$y)(o,{field:i,normalizationType:r,normalizationField:l,normalizationTotal:a,classificationMethod:s,standardDeviationInterval:t.standardDeviationInterval,numBins:t.numBins,minValue:t.minValue,maxValue:t.maxValue})}async function M(e){let{attribute:t,features:n}=e,{field:r,radius:a,transform:u,spatialReference:h}=t,c=t.size??[0,0],m=function(e,t,n,i){let r=(0,o.d9)(n)?(0,o.Vp)(n):null,a=r?Math.round((r.valid[1]-r.valid[0])/t.scale[0]):null;return e.map(e=>{let n=new l.A(e.geometry);return(0,s.Gy)(t,n,n),e.geometry=r?function(e,t,n){return e.x<0?e.x+=t:e.x>n&&(e.x-=t),e}(n,a??0,i[0]):n,e})}(n??[],u,h,c);return function(e,t=18,n,r,l){let a=new Float64Array(r*l);t=Math.round((0,i.Lz)(t));let s=1/0,o=-1/0,u=(0,d.YW)(n);for(let{geometry:n,attributes:i}of e){let{x:e,y:h}=n,c=Math.max(0,e-t),m=Math.max(0,h-t),f=Math.min(l,h+t),g=Math.min(r,e+t),p=+u(i);for(let n=m;n<f;n++)for(let i=c;i<g;i++){let l=n*r+i,u=(0,d.hv)(i-e,n-h,t)*p,c=a[l]+=u;s=Math.min(s,c),o=Math.max(o,c)}}return{min:s,max:o}}(m,a??void 0,r,c[0],c[1])}},4560(e,t,n){n.d(t,{i0:()=>u,j4:()=>o,fs:()=>s});var i=n(97770),r=n(30524);n(7762),n(84952),n(27865),n(43281),n(98623);var l=n(56400);let a;function s(e){return(0,r.vE)(e)||(0,r.zD)(e)||(0,r.Ah)(e)}async function o(e,t){return e?(a||=new(await Promise.all([n.e(9696),n.e(4123)]).then(()=>n(44123)).then(e=>e.WhereClauseCache))(50,500),a.get(e,t)):null}function u(e,t){let n,r,{format:a,fieldFormat:s,timeZoneOptions:o,fieldType:u}=t??{},h=s?(0,i._m)(s):null;if(o&&({timeZone:n,timeZoneName:r}=(0,l.hv)(o.layerTimeZone,o.datesInUnknownTimezone,o.viewTimeZone,h||(0,i.J2)(a||"short-date-short-time"),u)),"string"==typeof e&&isNaN(Date.parse("time-only"===u?`1970-01-01T${e}Z`:e)))return e;switch(u){case"date-only":{let t=h||(0,i.J2)(a||"short-date");return"string"==typeof e?(0,i.iS)(e,{...t}):(0,i.Yq)(e,{...t,timeZone:"UTC"})}case"time-only":{let t=h||(0,i.J2)(a||"short-time");return"string"==typeof e?(0,i.F8)(e,t):(0,i.Yq)(e,{...t,timeZone:"UTC"})}case"timestamp-offset":{let t=a||h||o?h||(0,i.J2)(a||"short-date-short-time"):void 0,l=t?{...t,timeZone:n,timeZoneName:r}:void 0;return"string"==typeof e?(0,i.Ey)(e,l):(0,i.Yq)(e,l)}default:{let t=a||h||o?h||(0,i.J2)(a||"short-date-short-time"):void 0;return(0,i.Yq)("string"==typeof e?new Date(e):e,t?{...t,timeZone:n,timeZoneName:r}:void 0)}}}new Set(["integer","small-integer"])},1873(e,t,n){n.d(t,{$y:()=>L,Ak:()=>A,FM:()=>f,G_:()=>c,Rw:()=>k,Vb:()=>h,b3:()=>z,gJ:()=>u,jM:()=>N,lv:()=>D,oZ:()=>S,qg:()=>m,sU:()=>Z,z9:()=>d,zS:()=>I});var i=n(9760),r=n(84892);const l=/\s*(\+|-)?((\d+(\.\d+)?)|(\.\d+))\s*/gi,a=new Set(["esriFieldTypeDate","esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeLong","esriFieldTypeOID","esriFieldTypeBigInteger"]),s=new Set(["esriFieldTypeTimeOnly","esriFieldTypeDateOnly"]),o=["min","max","avg","stddev","count","sum","variance","nullcount","median"];function u(e){return null==e||"string"==typeof e&&!e?"<Null>":e}function h(e){let t=null!=e.normalizationField||null!=e.normalizationType,n=null!=e.minValue||null!=e.maxValue,i=!!e.sqlExpression&&e.supportsSQLExpression;return!t&&!n&&!i}function d(e){let{outStatisticTypes:t}=e,n=e.returnDistinct?[...new Set(e.values)]:e.values,i=n.filter(e=>null!=e).sort(),r=i.length,l={count:r,min:i[0],max:i[r-1]};return e.supportsNullCount&&(l.nullcount=n.length-r),e.percentileParams&&(!t?.include?.length||t.include.includes("median"))&&(!t?.exclude?.length||!t.exclude.includes("median"))&&(l.median=m(n,e.percentileParams)),l}function c(e){let{values:t,useSampleStdDev:n,supportsNullCount:i,outStatisticTypes:r}=e,l=1/0,a=-1/0,s=null,o=null,u=null,h=null,d=0,c=null==e.minValue?-1/0:e.minValue,f=null==e.maxValue?1/0:e.maxValue;for(let e of t)Number.isFinite(e)?e>=c&&e<=f&&(s=null===s?e:s+e,l=Math.min(l,e),a=Math.max(a,e),d++):"string"==typeof e&&d++;if(d&&null!=s){o=s/d;let e=0;for(let n of t)Number.isFinite(n)&&n>=c&&n<=f&&(e+=(n-o)**2);h=n?d>1?e/(d-1):0:d>0?e/d:0,u=Math.sqrt(h)}else l=null,a=null;let g={avg:o,count:d,max:a,min:l,stddev:u,sum:s,variance:h};return i&&(g.nullcount=t.length-d),e.percentileParams&&(!r?.include?.length||r.include.includes("median"))&&(!r?.exclude?.length||!r.exclude.includes("median"))&&(g.median=m(t,e.percentileParams)),g}function m(e,t){let{fieldType:n,value:i,orderBy:r,isDiscrete:l}=t,a=f(n,"desc"===r,"case-insensitive");if(e=[...e].filter(e=>null!=e).sort((e,t)=>a(e,t)),0===e.length)return null;if(i<=0)return e[0];if(i>=1)return e[e.length-1];let s=(e.length-1)*i,o=Math.floor(s),u=o+1,h=s%1,d=e[o],c=e[u];return u>=e.length||l||"string"==typeof d||"string"==typeof c?d:d*(1-h)+c*h}function f(e,t,n="case-sensitive"){if(e){if(a.has(e))return F(t);if(s.has(e))return w(t,!0);if("esriFieldTypeTimestampOffset"===e)return function(e){return e?b:v}(t);let i=w(t,"case-sensitive"===n);if("esriFieldTypeString"===e)return i;if("esriFieldTypeGUID"===e||"esriFieldTypeGlobalID"===e)return(e,t)=>i(C(e),C(t))}let i=t?1:-1,r=F(t),l=w(t,"case-sensitive"===n),o=y(t);return(e,t)=>"number"==typeof e&&"number"==typeof t?r(e,t):"string"==typeof e&&"string"==typeof t?l(e,t):o(e,t)??i}const g=(e,t)=>null==e?null==t?0:1:null==t?-1:null,p=(e,t)=>null==e?null==t?0:-1:null==t?1:null;function y(e){return e?g:p}const v=(e,t)=>p(e,t)??(e===t?0:new Date(e).getTime()-new Date(t).getTime()),b=(e,t)=>g(e,t)??(e===t?0:new Date(t).getTime()-new Date(e).getTime()),_=(e,t)=>p(e,t)??(e===t?0:e<t?-1:1),M=(e,t)=>g(e,t)??(e===t?0:e<t?1:-1);function w(e,t){if(t)return e?M:_;let n=y(e);return e?(e,t)=>n(e,t)??((e=e.toUpperCase())>(t=t.toUpperCase())?-1:+(e<t)):(e,t)=>n(e,t)??((e=e.toUpperCase())<(t=t.toUpperCase())?-1:+(e>t))}const T=(e,t)=>g(e,t)??t-e,x=(e,t)=>p(e,t)??e-t;function F(e){return e?T:x}function C(e){return e.slice(24,36)+e.slice(19,23)+e.slice(16,18)+e.slice(14,16)+e.slice(11,13)+e.slice(9,11)+e.slice(6,8)+e.slice(4,6)+e.slice(2,4)+e.slice(0,2)}function S(e,t,n){let i;for(i in e)t?.include?.length&&!t.include.includes(i)||t?.exclude?.length&&t.exclude.includes(i)?delete e[i]:o.includes(i)&&(Number.isFinite(e[i])||(e[i]=null));return n&&["avg","stddev","variance"].forEach(t=>{null!=e[t]&&(e[t]=Math.ceil(e[t]??0))}),e}function z(e){let t={};for(let n of e)(null==n||"string"==typeof n&&""===n.trim())&&(n=null),null==t[n]?t[n]={count:1,data:n}:t[n].count++;return{count:t}}function V(e){return"coded-value"===e?.type?e.codedValues.map(e=>e.code):[]}function D(e,t,n,i){let r=e.count,l=[];if(n&&t){let e=[],n=V(t[0]);for(let r of n)if(t[1]){let n=V(t[1]);for(let l of n)if(t[2]){let n=V(t[2]);for(let t of n)e.push(`${u(r)}${i}${u(l)}${i}${u(t)}`)}else e.push(`${u(r)}${i}${u(l)}`)}else e.push(r);for(let t of e)r.hasOwnProperty(t)||(r[t]={data:t,count:0})}for(let e in r){let t=r[e];l.push({value:t.data,count:t.count,label:t.label})}return{uniqueValueInfos:l}}function I(e,t,n,i){let r=null;switch(t){case"log":0!==e&&(r=Math.log(e)*Math.LOG10E);break;case"percent-of-total":Number.isFinite(i)&&0!==i&&(r=e/i*100);break;case"field":Number.isFinite(n)&&0!==n&&(r=e/n);break;case"natural-log":e>0&&(r=Math.log(e));break;case"square-root":e>0&&(r=e**.5)}return r}function k(e,t,n){let l=function(e){let{breakCount:t,field:n,normalizationField:r,normalizationType:l}=e,a=e.classificationMethod||"equal-interval",s="standard-deviation"===a?e.standardDeviationInterval||1:void 0,o="defined-interval"===a?e.definedInterval:void 0;return new i.A({breakCount:t,classificationField:n,classificationMethod:a,normalizationField:"field"===l?r:void 0,normalizationType:l,standardDeviationInterval:s,definedInterval:o})}({field:t.field,normalizationType:t.normalizationType,normalizationField:t.normalizationField,classificationMethod:t.classificationMethod,standardDeviationInterval:t.standardDeviationInterval,definedInterval:t.definedInterval,breakCount:t.numClasses||5});return e=function(e,t,n){let i=t??-1/0,r=n??1/0;return e.filter(e=>Number.isFinite(e)&&e>=i&&e<=r)}(e,t.minValue,t.maxValue),(0,r.t)({definition:l,values:e,normalizationTotal:t.normalizationTotal},n)}function N(e,t){let n=e.classBreaks,i=n.length,r=n[0]?.minValue,a=n[i-1]?.maxValue,s="standard-deviation"===t,o=l;return n=n.map(e=>{let t=e.label,n={minValue:e.minValue,maxValue:e.maxValue,label:t};if(s&&t){let e=t.match(o)?.map(e=>+e.trim())??[];2===e.length?(n.minStdDev=e[0],n.maxStdDev=e[1],e[0]<0&&e[1]>0&&(n.hasAvg=!0)):1===e.length&&(t.includes("<")?(n.minStdDev=null,n.maxStdDev=e[0]):t.includes(">")&&(n.minStdDev=e[0],n.maxStdDev=null))}return n}),{minValue:r,maxValue:a,classBreakInfos:n,normalizationTotal:e.normalizationTotal}}function L(e,t){let n=Z(e,t);if(null==n.min&&null==n.max)return{bins:[],minValue:n.min,maxValue:n.max,normalizationTotal:t.normalizationTotal};let i=n.intervals,r=n.min??0,l=n.max??0,a=i.map((e,t)=>({minValue:i[t][0],maxValue:i[t][1],count:0}));for(let t of e)if(null!=t&&t>=r&&t<=l){let e=A(i,t);e>-1&&a[e].count++}return{bins:a,minValue:r,maxValue:l,normalizationTotal:t.normalizationTotal}}function Z(e,t,n=!1){let{field:i,classificationMethod:r,standardDeviationInterval:l,definedInterval:a,normalizationType:s,normalizationField:o,normalizationTotal:u,minValue:d,maxValue:m}=t,f=t.numBins||10,g=null,p=null,y=null;if(r&&"equal-interval"!==r||s){let{classBreaks:t}=k(e,{field:i,normalizationType:s,normalizationField:o,normalizationTotal:u,classificationMethod:r,standardDeviationInterval:l,definedInterval:a,minValue:d,maxValue:m,numClasses:f},null!=d&&null!=m?[d,m]:void 0);g=t[0]?.minValue,p=t[t.length-1]?.maxValue,y=t.map(e=>[e.minValue,e.maxValue])}else{if(null!=d&&null!=m)g=d,p=m;else{let t=c({values:e,minValue:d,maxValue:m,useSampleStdDev:!s,supportsNullCount:h({normalizationType:s,normalizationField:o,minValue:d,maxValue:m})});g=t.min??null,p=t.max??null}y=function(e,t,n){let i,r=(t-e)/n,l=[],a=e;for(let e=1;e<=n;e++)i=a+r,i=Number(i.toFixed(16)),l.push([a,e===n?t:i]),a=i;return l}(g??0,p??0,f)}if(n&&y.length){let e=y.at(-1)[1];y.push([e,e])}return{min:g,max:p,intervals:y}}function A(e,t){let n=-1;for(let i=e.length-1;i>=0;i--)if(t>=e[i][0]){n=i;break}return n}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4934],{67996(e,t,r){r.d(t,{cZ:()=>S,XW:()=>F,fe:()=>k});var i=r(56507),n=r(49186),s=r(91869),a=(r(90708),r(92722)),o=r(16930);class l{constructor(){this.version="",this.queryResult=new p}}class p{constructor(){this.featureResult=new u}}class u{constructor(){this.objectIdFieldName="",this.uniqueIdField=new d,this.globalIdFieldName="",this.geohashFieldName="",this.geometryProperties=new h,this.geometryType=null,this.spatialReference=new o.A,this.exceededTransferLimit=!1,this.hasZ=!1,this.hasM=!1,this.transform=new c,this.fields=[],this.fieldNameToAttributeIndexMap={},this.values=[],this.features=[],this.geometryFields=[]}}class d{constructor(){this.name="",this.isSystemMaintained=!1}}class h{constructor(){this.shapeAreaFieldName="",this.shapeLengthFieldName="",this.units=""}}class c{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 M=r(45724),I=r(93637),C=r(49403);const _={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};function v(e){let t=new l;t.version=e.version;let r=e.get_query_result();if(0!==r.results_type.value)throw Error("Got a non-feature collection type");let i=r.get_feature_result(),n=t.queryResult.featureResult;n.objectIdFieldName=i.objectid_field_name,n.exceededTransferLimit=i.exceeded_transfer_limit,n.hasM=i.has_m,n.hasZ=i.has_z,n.geometryType=(0,I.i7)(C.bV,i.geometry_type.value),n.globalIdFieldName=i.globalid_field_name,n.geohashFieldName=i.geohash_field_name;let s=n.uniqueIdField,a=i.unique_id_field;s.name=a.name,s.isSystemMaintained=a.isSystemMaintained;let o=n.geometryProperties,p=i.geometry_properties;o.shapeAreaFieldName=p.shapeAreaFieldName,o.shapeLengthFieldName=p.shapeLengthFieldName,o.units=p.units;let u=n.spatialReference,d=i.spatial_reference;u.wkid=d.wkid,u.latestWkid=d.latestWkid,u.vcsWkid=d.vcsWkid,u.latestVcsWkid=d.latestVcsWkid,u.wkt=d.wkt,n.transform=function(e){let t=new c;t.quantizeOriginPosition=(0,I.i7)(_,e.quantizeOriginPosition.value);let r=t.scale,i=e.scale;r.xScale=i.xScale,r.yScale=i.yScale,r.mScale=i.mScale,r.zScale=i.zScale;let n=t.translate,s=e.translate;return n.xTranslate=s.xTranslate,n.yTranslate=s.yTranslate,n.mTranslate=s.mTranslate,n.zTranslate=s.zTranslate,t}(i.transform);let h=n.fields,y=n.fieldNameToAttributeIndexMap,m=i.fields,f=m.size();for(let e=0;e<f;e++){let t=m.get(e),r=E(t);h.push(r),y[r.name]=e,t.delete()}m.delete();let b=n.values,M=i.values_count();for(let e=0;e<M;e++)b.push(i.get_value_at(e));let T=n.features,v=i.features,S=v.size();if(S>0)for(let e of w)if(void 0===y[e])throw Error(`Feature collection missing required attribute: ${e}`);for(let e=0;e<S;e++){let t=new g,r=v.get(e),i=t.attributes,n=r.attributes_count();for(let e=0;e<n;e++)i.push(r.get_attribute_at(e));let s=r.get_compressed_geometry();s&&(t.compressedGeometry=A(s),t.centroid=A(r.get_centroid()));let a=t.aggregateGeometries,o=r.aggregate_geometries,l=o.size();for(let e=0;e<l;e++){let t=o.get(e),r=A(t);a.push(r),t.delete()}o.delete(),T.push(t),r.delete()}v.delete();let k=n.geometryFields,L=i.geometry_fields,N=L.size();for(let e=0;e<N;e++){let t=L.get(e),r=x(t);k.push(r),t.delete()}return L.delete(),t}function A(e){let t=new b;t.geometryType=(0,I.i7)(C.bV,e.geometry_type.value);let r=[],i=[];for(let t=0;t<e.lengths.length;t++)r.push(e.lengths[t]);for(let t=0;t<e.coords.length;t++)i.push(e.coords[t]);return t.lengths=r,t.coords=i,t}function E(e){let t=new f;return t.name=e.name,t.alias=e.alias,t.fieldType=(0,I.i7)(C.r5,e.field_type.value),t.sqlType=(0,I.i7)(T,e.sql_type.value),t.domain=e.domain,t.defaultValue=e.default_value,t}function x(e){let t=E(e);return t.geometryType=(0,I.i7)(C.bV,e.geometry_type.value),t}async function S(e,t,r){t??=!1;let a={generateAllSublayers:t,namedTypeDefinitions:new Map};return await async function(e,t){let r=await(await(0,i.A)(e,{responseType:"array-buffer",signal:t?.signal})).data;return async function(e){let t=new((await(0,M.I)()).MapOfObjectIdentifierSetsDecoder),r=t.decode(new Uint8Array(e)),i=new Map;if(0!==r.error_code)throw new n.A("knowledge-graph:layer-support-utils",r.error_message);let s=t.get_map_of_identifier_sets(),a=s.keys,o=a.size();for(let e=0;e<o;e++){let t=a.get(e),r=s.query_identifier_set(t),o=[];if(1===r.id_array_type.value){let e=r.get_globalid_array(),t=e.count();for(let r=0;r<t;r++)o.push(e.get_globalid_at(r))}else if(3===r.id_array_type.value){let e=r.get_identifier_array(),t=e.count();for(let r=0;r<t;r++)o.push(e.get_identifier_at(r).toString())}else if(2===r.id_array_type.value){let e=r.get_string_array(),t=e.count();for(let r=0;r<t;r++)o.push(e.get_string_at(r))}else{if(0!==r.id_array_type.value)throw new n.A("knowledge-graph:layer-support-utils","Tried to encode an unexpected ID Array type.");{let e=r.get_oid_array(),t=e.count();for(let r=0;r<t;r++)o.push(e.get_objectid_at(r).toString())}}i.set(t,o)}return t.delete(),i}(new Uint8Array(r))}(e,r).then(e=>{!function(e,t){for(let[r,i]of e){let e=(0,s.tE)(t.namedTypeDefinitions,r,()=>({useAllData:!1,members:new Map}));for(let t of i)e.members.has(t)||e.members.set(t,{id:t})}}(e,a)}),a}async function k(e){let t=await(0,M.I)(),r=new t.MapOfObjectIdentifierSets;!function(e,t,r){for(let[i,n]of r.namedTypeDefinitions){if(!n.members||n.useAllData)continue;let r=n.members.keys(),s=!1,a=!0,o=new t.ObjectIdArray,l=new t.StringArray,p=new t.GlobalIdArray,u=new t.IdentifierArray,d=new t.ObjectIdentifierSet;for(let e of r)a&&=(s=!isNaN(Number(e)),!1),s?o.add_objectid(Number(e)):(l.add_string(e),p.add_globalid(e)),u.add_identifier(e);d.set_oid_array(o),d.set_string_array(l),d.set_globalid_array(p),d.set_identifier_array(u),o.delete(),l.delete(),p.delete(),u.delete(),e.put_identifier_set(i,d),d.delete()}}(r,t,e);let i=new t.MapOfObjectIdentifierSetsEncoder;try{i.set_map_of_identifier_sets(r),i.encode();let e=i.get_encoding_result();if(0!==e.error.error_code)throw new n.A("knowledge-graph:layer-support-utils",e.error.error_message);let t=structuredClone(e.get_byte_buffer());return i.delete(),t}finally{r.delete()}}async function L(e,t){return async function(e){let t=new((await(0,M.I)()).FeatureCollectionDecoder),r=t.decode(new Uint8Array(e));if(0!==r.error_code)throw new n.A("knowledge-graph:layer-support-utils",r.error_message);let i=v(t.get_feature_collection());return t.delete(),i}(await(await(0,i.A)(e,{responseType:"array-buffer",signal:t?.signal})).data)}function N(e,t){if(!e?.queryResult?.featureResult)return t;let{hasZ:r,hasM:i}=e.queryResult.featureResult,n=e.queryResult.featureResult.fieldNameToAttributeIndexMap;for(let o of e.queryResult.featureResult.features){let e=o.attributes[n.TYPENAME],l=(0,s.tE)(t.namedTypeDefinitions,e,()=>({useAllData:!1,members:new Map})),p=o.attributes[n.ELEMENTUID];if(o.compressedGeometry?.coords?.length>0){let e=o.compressedGeometry.lengths;"esriGeometryPoint"===o.compressedGeometry.geometryType&&(e=[]),l.members.set(p,{id:p,linkChartLocation:new a.A(e,o.compressedGeometry.coords,r,i)})}else l.members.set(p,{id:p})}return t}const F={fetchAndConvertSerializedLinkChart:(e,t)=>async function(e,t){let r=[],i={generateAllSublayers:!1,namedTypeDefinitions:new Map};return e.entitiesUrl&&r.push(L(e.entitiesUrl,t).then(e=>{N(e,i)})),e.relationshipsUrl&&r.push(L(e.relationshipsUrl,t).then(e=>{N(e,i)})),await Promise.all(r),i}(e,t)}},75503(e,t,r){r.d(t,{wq:()=>o});var i=r(4576),n=r(21818),s=(r(44208),r(15142)),a=r(11006);class o{constructor(e=9,t){this._compareMinX=h,this._compareMinY=c,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),I.prune(),C.prune(),_.prune(),T.prune()}all(e){l(this._data,e)}search(e,t){let r=this._data,i=this._toBBox;if(w(e,r))for(I.clear();r;){for(let n=0,s=r.children.length;n<s;n++){let s=r.children[n],a=r.leaf?i(s):s;w(e,a)&&(r.leaf?t(s):b(e,a)?l(s,t):I.push(s))}r=I.pop()}}collides(e){let t=this._data,r=this._toBBox;if(!w(e,t))return!1;for(I.clear();t;){for(let i=0,n=t.children.length;i<n;i++){let n=t.children[i],s=t.leaf?r(n):n;if(w(e,s)){if(t.leaf||b(e,s))return!0;I.push(n)}}t=I.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,r=e.length;t<r;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){let e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new E([]),this}remove(e){if(!e)return this;let t,r=this._data,s=null,a=0,o=!1,l=this._toBBox(e);for(_.clear(),T.clear();r||_.length>0;){if(r||(r=_.pop(),s=_.data[_.length-1],a=T.pop()??0,o=!0),r.leaf&&(t=(0,i.qh)(r.children,(0,n.z)(e),r.children.length,r.indexHint),-1!==t))return r.children.splice(t,1),_.push(r),this._condense(_),this;o||r.leaf||!b(r,l)?s?(a++,r=s.children[a],o=!1):r=null:(_.push(r),T.push(a),a=0,s=r,r=r.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,r,i){let n=r-t+1,s=this._maxEntries;if(n<=s){let i=new E(e.slice(t,r+1));return p(i,this._toBBox),i}i||(i=Math.ceil(Math.log(n)/Math.log(s)),s=Math.ceil(n/s**(i-1)));let a=new x([]);a.height=i;let o=Math.ceil(n/s),l=o*Math.ceil(Math.sqrt(s));M(e,t,r,l,this._compareMinX);for(let n=t;n<=r;n+=l){let t=Math.min(n+l-1,r);M(e,n,t,o,this._compareMinY);for(let r=n;r<=t;r+=o){let n=Math.min(r+o-1,t);a.children.push(this._build(e,r,n,i-1))}}return p(a,this._toBBox),a}_insert(e,t,r){let i=this._toBBox,n=r?e:i(e);_.clear();let s=function(e,t,r,i){for(;i.push(t),!0!==t.leaf&&i.length-1!==r;){let r,i=1/0,n=1/0;for(let s=0,a=t.children.length;s<a;s++){let a=t.children[s],o=y(a),l=f(e,a)-o;l<n?(n=l,i=o<i?o:i,r=a):l===n&&o<i&&(i=o,r=a)}t=r||t.children[0]}return t}(n,this._data,t,_);for(s.children.push(e),d(s,n);t>=0&&_.data[t].children.length>this._maxEntries;)this._split(_,t),t--;!function(e,t,r){for(let i=r;i>=0;i--)d(t.data[i],e)}(n,_,t)}_split(e,t){let r=e.data[t],i=r.children.length,n=this._minEntries;this._chooseSplitAxis(r,n,i);let s=this._chooseSplitIndex(r,n,i);if(!s)return;let a=r.children.splice(s,r.children.length-s),o=r.leaf?new E(a):new x(a);o.height=r.height,p(r,this._toBBox),p(o,this._toBBox),t?e.data[t-1].children.push(o):this._splitRoot(r,o)}_splitRoot(e,t){this._data=new x([e,t]),this._data.height=e.height+1,p(this._data,this._toBBox)}_chooseSplitIndex(e,t,r){let i,n,s;i=n=1/0;for(let a=t;a<=r-t;a++){let t=u(e,0,a,this._toBBox),o=u(e,a,r,this._toBBox),l=g(t,o),p=y(t)+y(o);l<i?(i=l,s=a,n=p<n?p:n):l===i&&p<n&&(n=p,s=a)}return s}_chooseSplitAxis(e,t,r){let i=e.leaf?this._compareMinX:h,n=e.leaf?this._compareMinY:c;this._allDistMargin(e,t,r,i)<this._allDistMargin(e,t,r,n)&&e.children.sort(i)}_allDistMargin(e,t,r,i){e.children.sort(i);let n=this._toBBox,s=u(e,0,t,n),a=u(e,r-t,r,n),o=m(s)+m(a);for(let i=t;i<r-t;i++){let t=e.children[i];d(s,e.leaf?n(t):t),o+=m(s)}for(let i=r-t-1;i>=t;i--){let t=e.children[i];d(a,e.leaf?n(t):t),o+=m(a)}return o}_condense(e){for(let t=e.length-1;t>=0;t--){let r=e.data[t];if(0===r.children.length)if(t>0){let n=e.data[t-1],s=n.children;s.splice((0,i.qh)(s,r,s.length,n.indexHint),1)}else this.clear();else p(r,this._toBBox)}}_initFormat(e){let t=["return a"," - b",";"];this._compareMinX=Function("a","b",t.join(e[0])),this._compareMinY=Function("a","b",t.join(e[1])),this._toBBox=Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function l(e,t){let r=e;for(C.clear();r;){if(!0===r.leaf)for(let e of r.children)t((0,n.z)(e));else C.pushArray(r.children);r=C.pop()??null}}function p(e,t){u(e,0,e.children.length,t,e)}function u(e,t,r,i,n){n||=new E([]),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(let s,a=t;a<r;a++)s=e.children[a],d(n,e.leaf?i(s):s);return n}function d(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function h(e,t){return e.minX-t.minX}function c(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){let r=Math.max(e.minX,t.minX),i=Math.max(e.minY,t.minY),n=Math.min(e.maxX,t.maxX),s=Math.min(e.maxY,t.maxY);return Math.max(0,n-r)*Math.max(0,s-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 M(e,t,r,i,n){let s=[t,r];for(;s.length;){let t=s.pop(),r=s.pop();if(t-r<=i)continue;let o=r+Math.ceil((t-r)/i/2)*i;(0,a.q)(e,o,r,t,n),s.push(r,o,o,t)}}const I=new s.A,C=new s.A,_=new s.A,T=new s.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 E extends A{constructor(e){super(),this.children=e,this.leaf=!0}}class x extends A{constructor(e){super(),this.children=e,this.leaf=!1}}},69397(e,t,r){r.d(t,{Qf:()=>o,Qh:()=>s,lM:()=>n});var i=r(34275);function n(e){if(!e)return 0;let t=p;for(let r in e)e.hasOwnProperty(r)&&(t+=a(e[r],!1));return t}function s(e){if(!e)return 0;if("number"==typeof e[0])return o(e);if(Array.isArray(e))return function(e){let t=e.length;if(0===t||"number"==typeof e[0])return l(e,8);let r=u;for(let i=0;i<t;i++)r+=a(e[i]);return r}(e);let t=p;for(let r in e)e.hasOwnProperty(r)&&(t+=a(e[r]));return t}function a(e,t=!0){switch(typeof e){case"object":return t?s(e):p;case"string":return function(e){return 32+e.length}(e);case"number":return 16;case"boolean":return 4;default:return 8}}function o(...e){return e.reduce((e,t)=>e+(t?(0,i.iu)(t)?t.byteLength+d:Array.isArray(t)?l(t,16):0:0),0)}function l(e,t){return u+e.length*t}const p=32,u=16,d=145},15795(e,t,r){r.d(t,{A:()=>d});var i=r(32198),n=r(91429),s=r(58318),a=r(4146),o=r(63074),l=r(25036),p=r(98809),u=r(88625);let d=class extends((0,o.dM)((0,l.j)(a.A))){constructor(e){super(e),this.elevationInfo=null,this.graphics=new p.Y,this.screenSizePerspectiveEnabled=!0,this.type="graphics",this.internal=!1}destroy(){this.removeAll(),this.graphics.destroy()}get loaded(){return super.loaded}add(e){return this.graphics.add(e),this}addMany(e){return this.graphics.addMany(e),this}removeAll(){return this.graphics.removeAll(),this}remove(e){this.graphics.remove(e)}removeMany(e){this.graphics.removeMany(e)}graphicChanged(e){this.emit("graphic-update",e)}};(0,i.Cg)([(0,n.MZ)({type:u.A})],d.prototype,"elevationInfo",void 0),(0,i.Cg)([(0,n.MZ)((0,s.C)(p.Y,"graphics"))],d.prototype,"graphics",void 0),(0,i.Cg)([(0,n.MZ)({type:["show","hide"]})],d.prototype,"listMode",void 0),(0,i.Cg)([(0,n.MZ)()],d.prototype,"screenSizePerspectiveEnabled",void 0),(0,i.Cg)([(0,n.MZ)({readOnly:!0})],d.prototype,"type",void 0),(0,i.Cg)([(0,n.MZ)({constructOnly:!0})],d.prototype,"internal",void 0),d=(0,i.Cg)([(0,n.$K)("esri.layers.GraphicsLayer")],d)},6518(e,t,r){r.d(t,{F:()=>o});var i=r(44208),n=r(75503),s=r(19419);const a={minX:0,minY:0,maxX:0,maxY:0};class o{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new n.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){let e=Array(this._idByBounds.size),t=0;this._idByBounds.forEach((r,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;let e=(0,s.Ie)();for(let 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){let t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,r){(function(e){a.minX=e[0],a.minY=e[1],a.maxX=e[2],a.maxY=e[3]})(t),e.search(a,r)}(this._index,e,e=>t(this._idByBounds.get(e)))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){let t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},83221(e,t,r){r.d(t,{A:()=>y});var i=r(4576),n=r(49186),s=r(65529),a=r(53966),o=r(70328),l=r(19419),p=r(90708),u=r(6518),d=r(51441),h=r(37730);const c=(0,o.vt)();class y{constructor(e){this.geometryInfo=e,this._boundsStore=new u.F,this._featuresById=new Map,this._usedMemory=0,this.events=new s.bk,this.featureAdapter=h.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;let[t,r,i,n]=this.fullBounds;return{xmin:t,ymin:r,xmax:i,ymax:n,spatialReference:(0,d.ag)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(let t of e)this._add(t);this._emitChanged()}upsertMany(e){let 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){let t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(let t of e){let e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(let r of e){let e=this._boundsStore.get(r.objectId);e&&t((0,o.Jt)(c,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach(t=>e(t))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,e=>{t(this._featuresById.get(e))})}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;let t=e.objectId;if(null==t)return void a.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.A("featurestore:invalid-feature","feature id is missing",{feature:e}));let r,i=this._featuresById.get(t);if(i?(e.displayId=i.displayId,r=this._boundsStore.get(t),this._boundsStore.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(i)??0):null!=this.onFeatureAdd&&this.onFeatureAdd(e),!e.geometry?.coords?.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);r=(0,p.jQ)(r??(0,l.vt)(),e.geometry),null!=r&&this._boundsStore.set(t,r),this._featuresById.set(t,e),this._usedMemory+=this.estimateFeatureUsedMemory?.(e)??0}_upsert(e){let t=e?.objectId;if(null==t)return a.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.A("featurestore:invalid-feature","feature id is missing",{feature:e})),null;let r=this._featuresById.get(t);if(!r)return this._add(e),e;this._usedMemory-=this.estimateFeatureUsedMemory?.(r)??0;let{geometry:i,attributes:s}=e;for(let e in s)r.attributes[e]=s[e];return i&&(r.geometry=i,this._boundsStore.set(t,(0,p.jQ)((0,l.vt)(),i)??null)),this._usedMemory+=this.estimateFeatureUsedMemory?.(r)??0,r}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);let t=e.objectId;return this._boundsStore.delete(t),this._featuresById.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(e)??0,e}}},37730(e,t,r){var i=r(43334);const n={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t,r)=>new i.Om(t,e.attributes,null,e.objectId,e.displayId,e.distance,e.vertexCount),getGeometry:e=>e.geometry,getCentroid:(e,t)=>e.ensureCentroid(t)};r.d(t,["T",0,n])},64714(e,t,r){r.d(t,{F0:()=>o,Vx:()=>u,e2:()=>h,f:()=>m});var i=r(44208),n=r(4718),s=r(99352),a=r(93470);function o(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?a.Cb:"esriGeometryPolyline"===e?a.yM:a.WR}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let p=1;function u(e,t){if((0,i.A)("esri-csp-restrictions"))return()=>t?{[t]:null,...e}:{...e};try{let r="";t&&(r+=`this${d(t)} = null;`);for(let t in e)r+=`this${d(t)} = ${JSON.stringify(e[t])};`;let i=Function(`\n return class AttributesClass$${p++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new i}catch{return()=>t?{[t]:null,...e}:{...e}}}function d(e){return l.test(e)?`.${e}`:`[${JSON.stringify(e)}]`}function h(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,n.o8)(e)}}]}const c={...s.F,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!1,supportsDistance:!1,supportsExtent:!1,supportsQuantization:!1,supportsQueryGeometry:!1,supportsDisjointSpatialRelationship:!1},y={...s.P,supportedStatistics:{...s.P.supportedStatistics,envelope:!1,centroid:!1,convexHull:!1}};function m(e,t,r=!1){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:!1,supportsTrueCurve:!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:r?c:s.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:r?y:s.P,editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsTrueCurveUpdate:t,supportsTrueCurveUpdateByTrueCurveClientsOnly:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},24137(e,t,r){r.d(t,{P:()=>C});var i=r(32198),n=r(69622),s=r(49186),a=r(53966),o=r(91869),l=r(17676),p=r(39516),u=r(91429),d=r(5443),h=r(39829),c=r(99917),y=r(21325),m=r(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 r="";if("function"===e.left.type&&"column-reference"===e.left.args.value[0].type)r+=`lower(n.${e.left.args.value[0].column})`;else{if("column-reference"!==e.left.type)return t.unsupportedOperationFound=!0,"";r+=`lower(n.${e.left.column})`}if(r+=" 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)),r+=`'${t.toLowerCase()}')`}return r}return t.unsupportedOperationFound=!0,""};var g=r(69860),b=r(99916),w=r(53902),M=r(42538),I=r(97552);let C=class extends n.A{constructor(e){super(e),this._processingCacheUpdatesLookup=new Map,this.knowledgeGraph=null,this.inclusionModeDefinition={generateAllSublayers:!0,namedTypeDefinitions:new Map},this.entityTypeNames=new Set,this.relationshipTypeNames=new Set,this.geographicLookup=new Map,this.sublayerCaches=new Map,this.nodeConnectionsLookup=new Map,this.relationshipConnectionsLookup=new Map,this.memberIdTypeLookup=new Map;let t=new Map;e.knowledgeGraph.dataModel.entityTypes?.forEach(r=>{r.name&&(t.set(r.name,"entity"),this._processingCacheUpdatesLookup.set(r.name,[]),(!e.inclusionModeDefinition||e.inclusionModeDefinition?.generateAllSublayers)&&this.entityTypeNames.add(r.name),r.properties?.forEach(e=>{e.geometryType&&"esriGeometryNull"!==e.geometryType&&this.geographicLookup.set(r.name,{name:e.name??"",geometryType:e.geometryType})}))}),e.knowledgeGraph.dataModel.relationshipTypes?.forEach(r=>{r.name&&(t.set(r.name,"relationship"),this._processingCacheUpdatesLookup.set(r.name,[]),(!e.inclusionModeDefinition||e.inclusionModeDefinition?.generateAllSublayers)&&this.relationshipTypeNames.add(r.name),r.properties?.forEach(e=>{e.geometryType&&"esriGeometryNull"!==e.geometryType&&this.geographicLookup.set(r.name,{name:e.name??"",geometryType:e.geometryType})}))}),e.inclusionModeDefinition?.namedTypeDefinitions.forEach((r,i)=>{if("entity"===t.get(i))this.entityTypeNames.add(i);else{if("relationship"!==t.get(i))return a.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)}let n=new Map;r.members?.forEach(e=>{(0,o.tE)(this.memberIdTypeLookup,e.id,()=>new Set).add(i)}),this.sublayerCaches.set(i,n)})}addToLayer(e){e.forEach(({typeName:e,id:t})=>{if(!this.inclusionModeDefinition)throw new s.A("knowledge-graph:layer-data-manager","You cannot add to a layer's exclusion list if it was not created with an exclusion list originally");if(this.inclusionModeDefinition.namedTypeDefinitions.has(e)){if(this.inclusionModeDefinition.namedTypeDefinitions.has(e)){let r=this.inclusionModeDefinition.namedTypeDefinitions.get(e);r.members||=new Map,r.members.set(t,{id:t}),(0,o.tE)(this.memberIdTypeLookup,t,()=>new Set).add(e)}}else{let r=new Map;r.set(t,{id:t}),this.inclusionModeDefinition.namedTypeDefinitions.set(e,{useAllData:!1,members:r}),(0,o.tE)(this.memberIdTypeLookup,t,()=>new Set).add(e)}})}getById(e){return g.A.getInstance().readFromStoreById(e)}async getData(e,t,r,i){if(t.objectType.name&&this.inclusionModeDefinition?.namedTypeDefinitions&&this.inclusionModeDefinition.namedTypeDefinitions.size>0&&!this.inclusionModeDefinition.namedTypeDefinitions.has(t.objectType.name))return{features:[],cypherTranslationApplied:!1};let n;if(n=e||new I.A({where:"1=1",outFields:["*"]}),"link-chart"===r.type){let e=r,i=this._processingCacheUpdatesLookup.get(t.objectType.name??""),s=n.outFields;s&&1===s.length&&s[0]===m.dr&&"1=1"===n.where||await Promise.all(i??[]);let a=this.sublayerCaches.has(t.objectType.name??"")?Array.from(this.sublayerCaches.get(t.objectType.name)?.values()):[],o=[];return a.forEach(r=>{if(this.relationshipTypeNames.has(t.objectType.name)){r.geometry=e.relationshipLinkChartDiagramLookup.get(r.attributes[t.objectIdField]);let i=this.memberIdTypeLookup.get(r.attributes[m.Cz]),n=this.memberIdTypeLookup.get(r.attributes[m.KQ]),s=this._isEndEntitySpatial(i,r,m.Cz),a=this._isEndEntitySpatial(n,r,m.KQ);r.attributes[m.BL]=Number(s&&a)}else{r.geometry=e.entityLinkChartDiagramLookup.get(r.attributes[t.objectIdField]);let i=this.geographicLookup.get(t.objectType.name);i&&r.attributes[i.name]?r.attributes[m.BL]=1:r.attributes[m.BL]=0}r.attributes[m.T1]=r.geometry,o.push(r)}),{features:o,cypherTranslationApplied:!1}}return this.retrieveDataFromService(n,t,r,i)}async getConnectedRecordIds(e,t,r){let i=[],n="",s=this._getNamedTypeIdMapFromNodeIds(e);if(t&&0!==t?.length){for(let e of t)n=n+e+"|";n=n.slice(0,-1)}let a={},o=[];for(let[e,r]of s){let i=`${e}_ids`;a[i]=r,t&&0!==t?.length?o.push(`MATCH (n:${e}) WHERE id(n) IN $${i} WITH n MATCH (n)-[r:${n}]-(m) RETURN id(r), type(r), id(m), labels(m)[0]`):o.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(!o.length)return i;let l=o.join(" UNION "),p=(await(0,w.executeQueryStreaming)(this.knowledgeGraph,new M.A({openCypherQuery:l,bindParameters:a}),{signal:r?.signal})).resultRowsStream.getReader();for(;;){let{done:e,value:t}=await p.read();if(e)break;for(let e=0;e<t.length;e++){let r=t[e];i.push({id:r[0],typeName:r[1]}),i.push({id:r[2],typeName:r[3]})}}return i}async getRelationshipsBetweenNodes(e,t,r){let i=this._getNamedTypeIdMapFromNodeIds(e);if(0===i.size)return[];let n={relationshipExclusionIds:t,possibleConnectionEntityIds:e},s=[];for(let[e,t]of i.entries()){let r=`${e}_ids`;n[r]=t,s.push(`MATCH (n:${e}) WHERE id(n) IN $${r} WITH n MATCH (n)-[r]->(m) WHERE id(m) IN $possibleConnectionEntityIds AND NOT id(r) IN $relationshipExclusionIds RETURN id(r), type(r)`)}let a=s.join(" UNION "),o=[],l=(await(0,w.executeQueryStreaming)(this.knowledgeGraph,new M.A({openCypherQuery:a,bindParameters:n}),{signal:r?.signal})).resultRowsStream.getReader();for(;;){let{done:e,value:t}=await l.read();if(e)break;for(let e=0;e<t.length;e++){let r=t[e];o.push({id:r[0],typeName:r[1]})}}return o}async getRelationshipsFromNodes(e,t,r,i){let n=this._getNamedTypeIdMapFromNodeIds(e);if(0===n.size||0===t.length)return[];let s={relationshipExclusionIds:r,possibleConnectionEntityIds:t},a=[];for(let[e,t]of n.entries()){let r=`${e}_ids`;s[r]=t,a.push(`MATCH (n:${e}) WHERE id(n) IN $${r} WITH n MATCH (n)-[r]-(m) WHERE id(m) IN $possibleConnectionEntityIds AND NOT id(r) IN $relationshipExclusionIds RETURN id(r), type(r)`)}let o=a.join(" UNION "),l=new Map,p=(await(0,w.executeQueryStreaming)(this.knowledgeGraph,new M.A({openCypherQuery:o,bindParameters:s}),{signal:i?.signal})).resultRowsStream.getReader();for(;;){let{done:e,value:t}=await p.read();if(e)break;for(let e=0;e<t.length;e++){let r=t[e],i=l.get(r[1]);i||(i=new Set,l.set(r[1],i)),i.add(r[0])}}let u=[];for(let[e,t]of l)for(let r of t)u.push({id:r,typeName:e});return u}async refreshCacheContent(e,t,r,i=!0,n){let a=g.A.getInstance(),p=[],u=new Map,d=new Map;this.knowledgeGraph.dataModel.entityTypes?.forEach(e=>{e.name&&d.set(e.name,e)}),this.knowledgeGraph.dataModel.relationshipTypes?.forEach(e=>{e.name&&d.set(e.name,e)}),e||this.inclusionModeDefinition?e?e.forEach(e=>{if(this.memberIdTypeLookup.has(e))for(let t of this.memberIdTypeLookup.get(e))u.has(t)?u.get(t)?.push(e):u.set(t,[e])}):this.inclusionModeDefinition?.namedTypeDefinitions?.forEach((e,t)=>{e.useAllData?u.set(t,null):e.members&&e.members.forEach(e=>{u.has(t)&&null!==u.get(t)?u.get(t)?.push(e.id):u.set(t,[e.id])})}):(this.knowledgeGraph.dataModel.entityTypes?.forEach(e=>{e.name&&u.set(e.name,null)}),this.knowledgeGraph.dataModel.entityTypes?.forEach(e=>{e.name&&u.set(e.name,null)}));for(let[e,l]of u){let u=new Set(l),h=new Promise((p,h)=>{(async()=>{let p,h=new Set,c=[],y="",f=!1;if(t||d.get(e)?.properties?.forEach(e=>{e.name&&h.add(e.name)}),r&&this.geographicLookup.has(e)){let t=this.geographicLookup.get(e)?.name;t&&h.add(t)}if(this.entityTypeNames.has(e))y=`MATCH (n:${e}) ${l?"WHERE id(n) IN $ids ":""}return ID(n)`,h.forEach(e=>{y+=`, n.${e}`,c.push(e)});else{if(!this.relationshipTypeNames.has(e))throw new s.A("knowledge-graph:layer-data-manager",`The graph type of ${e} could not be determined. Was this type set in the KG data model and inclusion definition?`);f=!0,y=`MATCH ()-[n:${e}]->() ${l?"WHERE id(n) IN $ids ":""}return ID(n), id(startNode(n)), id(endNode(n))`,h.forEach(e=>{y+=`, n.${e}`,c.push(e)})}p=l?new M.A({openCypherQuery:y,bindParameters:{ids:l}}):new M.A({openCypherQuery:y});let g=(await(0,w.executeQueryStreaming)(this.knowledgeGraph,p,{signal:n?.signal})).resultRowsStream.getReader();for(;;){let{done:t,value:r}=await g.read();if(t)break;let n=[];for(let e=0;e<r.length;e++){let t=r[e],i=0,s=0,a={properties:{}};for(a.id=t[i],i++,s++,f&&(a.originId=t[i],i++,s++,a.destinationId=t[i],i++,s++,(0,o.tE)(this.nodeConnectionsLookup,a.originId,()=>new Set).add(a.id),(0,o.tE)(this.nodeConnectionsLookup,a.destinationId,()=>new Set).add(a.id),(0,o.tE)(this.relationshipConnectionsLookup,a.id,()=>[a.originId,a.destinationId]));i<t.length;i++)a.properties[c[i-s]]=t[i];u.delete(a.id),n.push(a)}let s=a.writeToStore(n,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);let l=this.sublayerCaches.get(e);s.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,o.tE)(this.memberIdTypeLookup,t.attributes[m.dr],()=>new Set).add(e))})}let b=this.inclusionModeDefinition?.namedTypeDefinitions.get(e);if(b)for(let e of u)b.members?.delete(e)})().then(()=>{p(null)}).catch(e=>{"AbortError"===e.name?p(null):h(e)})});p.push(h),this._processingCacheUpdatesLookup.get(e)?.push(h)}if(await Promise.all(p),n?.signal?.aborted)throw(0,l.NK)()}removeFromLayer(e){let t=new Set,r=new Set(e.map(e=>e.id));for(let r of e)t.add(r.typeName),1===this.memberIdTypeLookup.get(r.id)?.size?this.memberIdTypeLookup.delete(r.id):this.memberIdTypeLookup.get(r.id)?.delete(r.typeName),this.inclusionModeDefinition?.namedTypeDefinitions.forEach((e,t)=>{t===r.typeName&&e.members?.has(r.id)&&e.members.delete(r.id)});t.forEach(e=>{this.sublayerCaches.get(e)?.forEach((t,i)=>{r.has(i)&&this.sublayerCaches.get(e)?.delete(i)})})}async retrieveDataFromService(e,t,r,i){let n,o=g.A.getInstance(),l=new Set,u=[],I="",C=[],_=!1,T="relationship"===t.graphType,v=this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData,A=r.sublayerIdsCache.get(t.objectType.name),E=!v&&A?Array.from(A).sort():null,x={systemOidFieldName:m.dr,supportedSqlTypes:new Set(["column-reference","string","number","binary-expression"]),supportedSqlOperators:new Set(["=","<","<=","<>",">",">=","AND","OR","LIKE"]),unsupportedOperationFound:!1};if(this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData)this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData&&null!=e.objectIds&&(E=e.objectIds);else if(null!=e.objectIds&&E&&E.length>0){let t=e.objectIds;e.objectIds=E.filter(e=>t.includes(e))}else if(null!=e.objectIds)E=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=[],{features:[],cypherTranslationApplied:_};e.objectIds=E}if(null!=e.outFields){let r=e.outFields;r.includes("*")?t.fields.forEach(e=>{l.add(e.name)}):r.forEach(e=>{e!==m.dr&&e!==t.geometryFieldName&&l.add(e)})}if(null!=e.geometry){let i,a=e.geometry,o=r.dataManager.knowledgeGraph.serviceDefinition,m=o?.spatialReference,f=o?.serviceCapabilities?.geometryCapabilities,g=f?.geometryMaxBoundingRectangleSizeX,w=f?.geometryMaxBoundingRectangleSizeY;if("point"===a.type){let e=a;e.spatialReference?.isWGS84||(await(0,c.initializeProjection)(e.spatialReference,y.KK),e=(0,c.project)(e,y.KK)),i=new d.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 a?.extent?.spatialReference&&!a.spatialReference?.isWGS84?(await(0,c.initializeProjection)(a.extent.spatialReference,y.KK),i=(0,c.project)(a.extent,y.KK)):i=a.extent;if(g&&w&&m){if(4326!==m.wkid){let e=new d.A({spatialReference:m,xmax:g,ymax:w}),t=(0,c.project)(e,y.KK);g=t.xmax,w=t.ymax}if(i.xmax-i.xmin>g)throw new s.A("knowledge-graph:layer-data-manager",`Extent x bounds should be within ${g}° latitude, limit exceeded`);if(i.ymax-i.ymin>w)throw new s.A("knowledge-graph:layer-data-manager",`Extent y bounds should be within ${w}° longitude, limit exceeded`)}if(null!=e.where&&"1=1"!==e.where){let r=await(0,p.GP)(e.where.toUpperCase(),t.fieldsIndex);t.fields.forEach(e=>{r.fieldNames.includes(e.name)&&l.add(e.name)})}I=T?`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&&l.add(t.geometryFieldName),l.forEach(e=>{I+=`, n.${e}`,u.push(e)}),n=new M.A({openCypherQuery:I,bindParameters:{param_filter_geom:new h.A({rings:(0,b.Wq)(i)})}})}else{let r="";if(null!=e.where&&"1=1"!==e.where){let i=await(0,p.GP)(e.where,t.fieldsIndex);t.fields.forEach(e=>{i.fieldNames.includes(e.name)&&l.add(e.name)}),r=f(i.parseTree,x),x.unsupportedOperationFound&&(r="")}let i="";i=T?`Match ()-[n:${t.objectType.name}]->()`:`Match (n:${t.objectType.name})`;let s=!1;E&&(s=!0,i+=" WHERE ID(n) IN $ids"),r&&(i+=s?" AND":" WHERE",i+=` ${r}`),i+=" return ID(n)",T&&(i+=", id(startNode(n)), id(endNode(n))"),e.returnGeometry&&t.geometryFieldName&&l.add(t.geometryFieldName),l.forEach(e=>{i+=`, n.${e}`,u.push(e)}),x.unsupportedOperationFound||(i=((e,t)=>{let r=e;return t.orderByFields?.length&&(r=function(e,t){let r=e.trimEnd();if(/\border\s+by\b/i.test(r))return a.A.getLogger("cypherUtils").warn("Query already contains an ORDER BY clause. Skipping addition of new ORDER BY."),e;let i=t.map(e=>e.trim()).filter(e=>!!e).map(e=>{let[t,r]=e.split(/\s+/);return t?`${t===m.dr?"ID(n)":`n.${t}`} ${"DESC"===r?.toUpperCase()?"DESC":"ASC"}`:null}).filter(e=>!!e);return i.length?`${r} ORDER BY ${i.join(", ")}`:e}(r,t.orderByFields)),null!=t.start&&(r=function(e,t){let r=e.trimEnd();return/\bskip\s+(\$\w+|\d+)\b/i.test(r)?(a.A.getLogger("cypherUtils").warn("Query already contains a SKIP clause. Skipping addition of new SKIP."),e):`${r} SKIP ${t}`}(r,t.start)),null!=t.num&&(r=function(e,t){let r=e.trimEnd();return/\blimit\s+(\$\w+|\d+)\b/i.test(r)?(a.A.getLogger("cypherUtils").warn("Query already contains a LIMIT clause. Skipping addition of new LIMIT."),e):`${r} LIMIT ${t}`}(r,t.num)),r})(i,e),_=!0),n=E?new M.A({openCypherQuery:i,bindParameters:{ids:E}}):new M.A({openCypherQuery:i})}let S=(await(0,w.executeQueryStreaming)(r.dataManager.knowledgeGraph,n,i)).resultRowsStream.getReader();for(;;){let{done:e,value:i}=await S.read();if(e)break;let n=[];for(let e=0;e<i.length;e++){let t=i[e],r=0,s=0,a={properties:{}};for(a.id=t[r],r++,s++,T&&(a.originId=t[r],r++,s++,a.destinationId=t[r],r++,s++);r<t.length;r++)a.properties[u[r-s]]=t[r];n.push(a)}C=C.concat(o.writeToStore(n,m.dr,r.dataManager.geographicLookup.get(t.objectType.name)?.name))}return{features:C,cypherTranslationApplied:_}}_isEndEntitySpatial(e,t,r){for(let i of e??[])if(this.entityTypeNames.has(i)){let e=this.geographicLookup.get(i),n=e&&this.sublayerCaches.get(i)?.get(t.attributes[r]);if(e&&n?.attributes[e.name])return!0}return!1}_getNamedTypeIdMapFromNodeIds(e){let t=new Map;return e.forEach(e=>{if(this.memberIdTypeLookup.has(e))for(let r of this.memberIdTypeLookup.get(e)){if(!this.entityTypeNames.has(r))return;t.has(r)?t.get(r)?.push(e):t.set(r,[e])}}),t}};(0,i.Cg)([(0,u.MZ)()],C.prototype,"knowledgeGraph",void 0),(0,i.Cg)([(0,u.MZ)()],C.prototype,"inclusionModeDefinition",void 0),(0,i.Cg)([(0,u.MZ)()],C.prototype,"entityTypeNames",void 0),(0,i.Cg)([(0,u.MZ)()],C.prototype,"relationshipTypeNames",void 0),(0,i.Cg)([(0,u.MZ)()],C.prototype,"geographicLookup",void 0),(0,i.Cg)([(0,u.MZ)()],C.prototype,"sublayerCaches",void 0),(0,i.Cg)([(0,u.MZ)()],C.prototype,"nodeConnectionsLookup",void 0),(0,i.Cg)([(0,u.MZ)()],C.prototype,"relationshipConnectionsLookup",void 0),(0,i.Cg)([(0,u.MZ)()],C.prototype,"memberIdTypeLookup",void 0),C=(0,i.Cg)([(0,u.$K)("esri.layers.knowledgeGraph.KnowledgeGraphLayerDataManager")],C)},62796(e,t,r){r.d(t,{A:()=>fe});var i=r(32198),n=r(40124),s=r(49186),a=r(4718),o=r(53966),l=r(25728),p=r(91429),u=(r(29953),r(78247)),d=r(5443),h=r(86738),c=r(39829),y=r(82799),m=r(99917),f=r(16930),g=r(21325),b=r(50498),w=r(41910),M=r(55156),I=r(60950),C=r(89808),_=r(99959);const T=Symbol("isKnowledgeGraphGraphicOriginSymbol");var v;class A extends _.A{get[(v=T,I.ym)](){return this.sublayer}get[M.e](){return this.sublayer}get[C.Q](){return this.sublayer}get[w.e7](){return this.sublayer}constructor(e,t){super(),this[v]=!0,this.type="knowledge-graph",this.layer=e,this.sublayer=t}get id(){return this.layer.id}}const E=Symbol("isLinkChartGraphicOriginSymbol");var x;class S extends _.A{get[(x=E,I.ym)](){return this.sublayer}get[M.e](){return this.sublayer}get[C.Q](){return this.sublayer}get[w.e7](){return this.sublayer}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 k=r(4146),L=r(83221),N=r(75752),F=r(64714),R=r(15375);const O=(0,r(17036).p)(),D=e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.fields=[],this.fieldsIndex=null}};return(0,i.Cg)([(0,p.MZ)(O.fields)],r.prototype,"fields",void 0),(0,i.Cg)([(0,p.MZ)(O.fieldsIndex)],r.prototype,"fieldsIndex",void 0),r=(0,i.Cg)([(0,p.$K)("esri.layers.knowledgeGraph.KnowledgeGraphSublayerBase")],r),r};var P=r(40736),j=r(63074),B=r(6455),G=r(87718),$=r(56658),Z=r(32756),Q=r(54310),q=r(25036),U=r(82935),z=r(10873),Y=r(20569),H=r(29005),X=r(20437),W=r(30524),K=r(46499),V=r(39383),J=r(96184),ee=r(96576),te=r(65494),re=r(41214),ie=r(53902),ne=r(22671),se=r(97552),ae=r(30291),oe=r(88625),le=r(37531),pe=r(50343),ue=r(43937);function de(e){if(!e.json)return e;e.json.write=he(e.json.write);let t,r=e.json.origins;if(!r)return e;for(t in r){let e=r[t];e&&(e.write=he(e.write))}return e}function he(e){return"object"==typeof e&&e?(!1!==e.enabled&&(e.overridePolicy=function(e){let{target:t,writer:r,overridePolicy:i,...n}=e;return function(e,t){let r=ye.call(this,e,t);return r.enabled?{...n,...r}:r}}(e)),e):!0===e?ce():e}function ce(){return{overridePolicy:ye}}function ye(e,t){let r=!!this.geometryType,i={enabled:r};return r&&(i={...i,...me.call(this,e,t)}),i}function me(e,t){return{allowNull:this.originIdOf(t)>=3,ignoreOrigin:this.originIdOf(t)>0}}let fe=class extends(D((0,B.FJ)((0,$.J)((0,G.F)((0,j.dM)((0,Z.fY)((0,U.e)((0,q.j)((0,Q.J)((0,l.M)(k.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=R.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(()=>{let e=new MessageChannel;return new pe.default(e.port1,{channel:e,client:{queryFeatures:(e,t={})=>{let r=se.A.fromJSON(e);return this.queryFeaturesJSON(r,t)}}}),[e.port2]})},this.type="knowledge-graph-sublayer",this.useViewTime=!0,this.visible=!0}get capabilities(){return this.parent?this.parent.sublayerCapabilities:(0,P.hZ)(null)}get isTable(){return"link-chart"!==this.parentCompositeLayer?.type&&null==this.geometryFieldName}get defaultPopupTemplate(){return this.createPopupTemplate()}get editingEnabled(){return this.capabilities.operations.supportsEditing&&this.userHasEditingPrivileges}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get effectiveCapabilities(){let e=(0,a.o8)(this.capabilities),{operations:t,editing:r}=e;return this.userHasUpdateItemPrivileges&&(t.supportsAdd=t.supportsDelete=t.supportsEditing=t.supportsQuery=t.supportsUpdate=r.supportsDeleteByOthers=r.supportsGeometryUpdate=r.supportsUpdateByOthers=!0),this.userHasFullEditingPrivileges&&t.supportsEditing&&(t.supportsAdd=t.supportsDelete=t.supportsUpdate=r.supportsGeometryUpdate=!0),e}get effectiveEditingEnabled(){return this.userHasUpdateItemPrivileges||this.editingEnabled}set featureReduction(e){let t=this._normalizeFeatureReduction(e);this._set("featureReduction",t)}get fields(){let e=[],t=new Map;for(let e of this.parent?.knowledgeGraph.dataModel.domains??[])t.set(e.name,e);return this.objectType?.properties?.forEach(r=>{let i="esriFieldTypeOID"===r.fieldType?"esriFieldTypeInteger":r.fieldType,n=X.A.fromJSON({name:r.name,type:i,alias:r.alias,defaultValue:r.defaultValue,editable:r.editable,nullable:r.nullable,domain:r.domain&&t.has(r.domain)?t.get(r.domain).toJSON():void 0});e.push(n)}),e.push(X.A.fromJSON({name:this.objectIdField,type:"esriFieldTypeString",alias:this.objectIdField,editable:!1}),X.A.fromJSON({name:R.M1,type:"esriFieldTypeInteger",alias:R.M1,editable:!1}),X.A.fromJSON({name:R.BL,type:"esriFieldTypeInteger",alias:R.BL,editable:!1})),e}get formTemplate(){return this._isOverridden("formTemplate")?this._get("formTemplate"):(0,P.dD)(this)}set formTemplate(e){this._overrideIfSome("formTemplate",e)}get geometryType(){if("link-chart"===this.parentCompositeLayer?.type)return"relationship"===this.graphType?"polyline":"point";let e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name)?.geometryType;return e&&"esriGeometryNull"!==e?b.gy.fromJSON(e):null}get geometryFieldName(){return"link-chart"===this.parentCompositeLayer?.type?R.T1:this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name)?.name??null}get graphicOrigin(){if(!this.parent)return null;switch(this.parent.type){case"knowledge-graph":return new A(this.parent,this);case"link-chart":return new S(this.parent,this)}}get graphTypeName(){return this.objectType?.name}set graphTypeName(e){this._set("graphTypeName",e)}get hasM(){let e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name)?.name;return(e?this.objectType?.properties?.[e]:null)?.hasM??!1}get hasZ(){let e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name)?.name;return(e?this.objectType?.properties?.[e]:null)?.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;let e=this.objectType.properties?(0,P.MY)(this.objectType.properties):"ESRI__ID";return"link-chart"===this.parentCompositeLayer.type?(0,P.iW)(this.graphType,this.graphTypeName,e):(0,P.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");let e=this.parentCompositeLayer?.dataManager?.knowledgeGraph?.dataModel,t=[...e?.entityTypes??[],...e?.relationshipTypes??[]].map(e=>e.name).indexOf(this.graphTypeName),r=(0,P.Td)(t);if("link-chart"===this.parentCompositeLayer?.type){if("relationship"===this.graphType)return new ee.A({type:"simple",symbol:(0,P.UT)(r)});let e=(0,te.r)((0,F.F0)(b.gy.toJSON("point")).renderer);return(0,le.dt)(e.symbol,r),e}let i=(0,te.r)((0,F.F0)(b.gy.toJSON(this.geometryType)).renderer);return(0,le.dt)(i.symbol,r),i}get spatialReference(){return this.parentCompositeLayer?.dataManager?.knowledgeGraph?.dataModel?.spatialReference??f.A.WGS84}get templates(){return this._isOverridden("templates")?this._get("templates"):(0,P.CP)(this)}set templates(e){this._overrideIfSome("templates",e)}set timeInfo(e){this._set("timeInfo",e)}get dateFieldsTimeZone(){return this.parentCompositeLayer?.dateFieldsTimeZone}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"}get userHasEditingPrivileges(){return!this.parent||this.parent.userHasEditingPrivileges}get userHasFullEditingPrivileges(){return!!this.parent&&this.parent.userHasFullEditingPrivileges}get userHasUpdateItemPrivileges(){return!!this.parent&&this.parent.userHasUpdateItemPrivileges}createPopupTemplate(e){return(0,ae.tn)(this,e)}createQuery(){return new se.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();let{resolvedQuery:r,queryEngine:i,cypherTranslationApplied:n}=await this._setupQueryObjects(e),s=this.graphicOrigin,a=ne.A.fromJSON(await i.executeQuery(this._createQueryEngineQueryJSON(r,n),t?.signal));return a.features.forEach(e=>{e.sourceLayer=this,e.origin=s}),a}async queryFeaturesJSON(e,t){await this.load();let{resolvedQuery:r,queryEngine:i,cypherTranslationApplied:n}=await this._setupQueryObjects(e);return await i.executeQuery(this._createQueryEngineQueryJSON(r,n),t?.signal)}async queryFeatureCount(e,t){await this.load();let{resolvedQuery:r,queryEngine:i,cypherTranslationApplied:n}=await this._setupQueryObjects(e);return i.executeQueryForCount(this._createQueryEngineQueryJSON(r,n),t?.signal)}async queryExtent(e={},t){await this.load();let r,i={...e,returnGeometry:!0},{resolvedQuery:n,queryEngine:s,cypherTranslationApplied:a}=await this._setupQueryObjects(i),o=await s.executeQueryForExtent(this._createQueryEngineQueryJSON(n,a),t?.signal);return r=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:r}}async queryObjectIds(e,t){await this.load();let r,i=se.A.from(e);if(this.parentCompositeLayer){if("link-chart"!==this.parentCompositeLayer.type||!this._cachedQueryEngine){let{features:e,cypherTranslationApplied:n}=await this.parentCompositeLayer.dataManager.getData(i,this,this.parentCompositeLayer,t);return r=this.loadQueryEngine(e),await r.executeQueryForIds(this._createQueryEngineQueryJSON(i,n),t?.signal)}r=this._cachedQueryEngine}else o.A.getLogger(this).warn("Attempting to query for object IDs with no features failed because the parent composite layer is missing or not yet loaded."),r=this.loadQueryEngine([]);return await r.executeQueryForIds(this._createQueryEngineQueryJSON(i,!1),t?.signal)}async applyEdits(e){if(!this.parentCompositeLayer?.dataManager.knowledgeGraph)throw new s.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");let t=await(0,P.O9)(e,this,this.parentCompositeLayer);t.options={cascadeDelete:!0,cascadeProvenanceDelete:!!this.parent?.knowledgeGraph.serviceDefinition.supportsProvenance||void 0};let r=await(0,ie.executeApplyEdits)(this.parentCompositeLayer.dataManager.knowledgeGraph,t),i=(0,P.Gz)(r,this.graphTypeName),n={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",n),this.emit("apply-edits",{result:Promise.resolve(n)}),"link-chart"===this.parentCompositeLayer.type&&await this.parentCompositeLayer.refreshLinkChartCache([...n.addedFeatures.map(e=>e.globalId),...n.updatedFeatures.map(e=>e.globalId),...n.deletedFeatures.map(e=>e.globalId)]),i}loadQueryEngine(e){let t=new L.A({geometryType:b.gy.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ}),r=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 r.featureStore.addMany(e),r}async refreshCachedQueryEngine(){if(!this.parentCompositeLayer)return o.A.getLogger(this).warn("Attempting to refresh the cached query engine with no features failed because the parent composite layer is missing or not yet loaded."),void(this._cachedQueryEngine=this.loadQueryEngine([]));let{features:e}=await this.parentCompositeLayer.dataManager.getData(new se.A({where:"1=1",outFields:[R.dr]}),this,this.parentCompositeLayer);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)}_createQueryEngineQueryJSON(e,t){let r=e.toJSON();return t&&delete r.resultOffset,r}async _setupQueryObjects(e,t){let r=se.A.from(e),i=r.geometry;if(i&&!i.spatialReference?.isWGS84&&(await(0,m.initializeProjection)(i.spatialReference,g.KK),r.geometry=i instanceof c.A||i instanceof y.A||i instanceof h.A?(0,m.project)(i,g.KK):(0,m.project)(i.extent,g.KK)),!this.parentCompositeLayer)return o.A.getLogger(this).warn("Attempting to execute a query with no features failed because the parent composite layer is missing or not yet loaded."),{resolvedQuery:r,queryEngine:this.loadQueryEngine([]),cypherTranslationApplied:!1};if("link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)return{resolvedQuery:r,queryEngine:this._cachedQueryEngine,cypherTranslationApplied:!1};let{features:n,cypherTranslationApplied:s}=await this.parentCompositeLayer.dataManager.getData(r,this,this.parentCompositeLayer,t);return{resolvedQuery:r,queryEngine:this.loadQueryEngine(n),cypherTranslationApplied:s}}};(0,i.Cg)([(0,p.MZ)(de((0,a.o8)(j.sU)))],fe.prototype,"blendMode",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],fe.prototype,"capabilities",null),(0,i.Cg)([(0,p.MZ)()],fe.prototype,"isTable",null),(0,i.Cg)([(0,p.MZ)({json:{origins:{"web-scene":{write:!1}},write:ce()}})],fe.prototype,"charts",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],fe.prototype,"defaultPopupTemplate",null),(0,i.Cg)([(0,p.MZ)({type:String,json:{origins:{service:{read:!1}},name:"layerDefinition.definitionExpression",write:{ignoreOrigin:!0}}})],fe.prototype,"definitionExpression",void 0),(0,i.Cg)([(0,p.MZ)(de((0,a.o8)(B.Dp)))],fe.prototype,"displayFilterEnabled",void 0),(0,i.Cg)([(0,p.MZ)(de((0,a.o8)(B.KV)))],fe.prototype,"displayFilterInfo",void 0),(0,i.Cg)([(0,p.MZ)()],fe.prototype,"editingEnabled",null),(0,i.Cg)([(0,p.MZ)(de((0,a.o8)(j.LF)))],fe.prototype,"effect",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],fe.prototype,"effectiveCapabilities",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],fe.prototype,"effectiveEditingEnabled",null),(0,i.Cg)([(0,p.MZ)({type:oe.A})],fe.prototype,"elevationInfo",void 0),(0,i.Cg)([(0,p.MZ)(de((0,a.o8)(G.Y)))],fe.prototype,"featureEffect",void 0),(0,i.Cg)([(0,p.MZ)(de((0,a.o8)(Y.d)))],fe.prototype,"featureReduction",null),(0,i.Cg)([(0,p.MZ)()],fe.prototype,"fields",null),(0,i.Cg)([(0,p.MZ)({type:u.A})],fe.prototype,"formTemplate",null),(0,i.Cg)([(0,p.MZ)()],fe.prototype,"geometryType",null),(0,i.Cg)([(0,p.MZ)()],fe.prototype,"geometryFieldName",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],fe.prototype,"graphicOrigin",null),(0,i.Cg)([(0,p.MZ)({type:["entity","relationship"],nonNullable:!0,json:{write:{isRequired:!0,ignoreOrigin:!0}}})],fe.prototype,"graphType",void 0),(0,i.Cg)([(0,p.MZ)({type:String,nonNullable:!0,json:{write:{isRequired:!0,ignoreOrigin:!0}}})],fe.prototype,"graphTypeName",null),(0,i.Cg)([(0,p.MZ)()],fe.prototype,"hasM",null),(0,i.Cg)([(0,p.MZ)()],fe.prototype,"hasZ",null),(0,i.Cg)([(0,p.MZ)({type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0}}})],fe.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}}}}})],fe.prototype,"labelsVisible",void 0),(0,i.Cg)([(0,p.MZ)({type:[K.A],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:function(e,t,r){let i=[["ESRI__AGGREGATION_COUNT",R.M1],["ESRI__ORIGIN_ID",R.Cz],["ESRI__DESTINATION_ID",R.KQ],["ESRI__LAYOUT_GEOMETRY",R.T1]];try{for(let t of e)for(let[e,r]of i)t.labelExpression=t.labelExpression?.replaceAll(e,r),t.labelExpressionInfo?.expression&&(t.labelExpressionInfo.expression=t.labelExpressionInfo.expression.replaceAll(e,r))}catch(e){o.A.getLogger(this).warn("Error updating labelingInfo",e)}return V.w.call(this,e,t,r)},write:ce()}})],fe.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}}})],fe.prototype,"layerType",void 0),(0,i.Cg)([(0,p.MZ)(de((0,a.o8)(z.fV)))],fe.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,p.MZ)(de((0,a.o8)(z.hG)))],fe.prototype,"maxScale",void 0),(0,i.Cg)([(0,p.MZ)(de((0,a.o8)(z.hn)))],fe.prototype,"minScale",void 0),(0,i.Cg)([(0,p.MZ)()],fe.prototype,"objectIdField",void 0),(0,i.Cg)([(0,p.MZ)()],fe.prototype,"objectType",void 0),(0,i.Cg)([(0,p.MZ)(de((0,a.o8)(z.ke)))],fe.prototype,"opacity",void 0),(0,i.Cg)([(0,p.MZ)(de((0,a.o8)(Z.ne)))],fe.prototype,"orderBy",void 0),(0,i.Cg)([(0,p.MZ)({clonable:!1})],fe.prototype,"parent",void 0),(0,i.Cg)([(0,p.MZ)()],fe.prototype,"parentCompositeLayer",void 0),(0,i.Cg)([(0,p.MZ)(de((0,a.o8)(z.M6)))],fe.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,p.MZ)({type:n.A,json:{name:"popupInfo",write:{ignoreOrigin:!0}}})],fe.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,p.MZ)({type:Number,json:{write:{overridePolicy:me}}})],fe.prototype,"refreshInterval",void 0),(0,i.Cg)([(0,p.MZ)({types:re.Hg,json:{name:"layerDefinition.drawingInfo.renderer",write:ce()}})],fe.prototype,"renderer",null),(0,i.Cg)([(0,p.MZ)()],fe.prototype,"source",void 0),(0,i.Cg)([(0,p.MZ)()],fe.prototype,"spatialReference",null),(0,i.Cg)([(0,p.MZ)({type:H.A})],fe.prototype,"templates",null),(0,i.Cg)([(0,p.MZ)({type:J.A,json:{name:"layerDefinition.timeInfo",write:{overridePolicy:me},origins:{"web-document":{name:"layerDefinition.timeInfo",read:!0,write:{overridePolicy:me}},"portal-item":{name:"layerDefinition.timeInfo",read:!0,write:{overridePolicy:me}}}}})],fe.prototype,"timeInfo",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],fe.prototype,"dateFieldsTimeZone",null),(0,i.Cg)([(0,p.MZ)({type:String,json:{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],fe.prototype,"title",null),(0,i.Cg)([(0,ue.K)("title")],fe.prototype,"writeTitle",null),(0,i.Cg)([(0,p.MZ)({json:{read:!1}})],fe.prototype,"type",void 0),(0,i.Cg)([(0,p.MZ)(de((0,a.o8)(U.B)))],fe.prototype,"useViewTime",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],fe.prototype,"userHasEditingPrivileges",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],fe.prototype,"userHasFullEditingPrivileges",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],fe.prototype,"userHasUpdateItemPrivileges",null),(0,i.Cg)([(0,p.MZ)({type:Boolean,json:{name:"visibility",write:ce()}})],fe.prototype,"visible",void 0),fe=(0,i.Cg)([(0,p.$K)("esri.layers.knowledgeGraph.KnowledgeGraphSublayer")],fe)},69860(e,t,r){r.d(t,{A:()=>o});var i=r(65864),n=r(90708),s=r(43334),a=r(15375);class o{constructor(){this._featureLookup=new Map}static getInstance(){return o.instance||=new o,o.instance}static resetInstance(){o.instance&&=null}deleteFromStore(e){e.forEach(e=>{this._featureLookup.delete(e)})}readFromStoreByList(e){let t=[];return e.forEach(e=>{let r=this.readFromStoreById(e);r&&t.push(r)}),t}readFromStoreById(e){return this._featureLookup.get(e)??null}writeToStore(e,t,r){let o=[];return e.forEach(e=>{if(!e?.id)return;e.properties||=[];let l=null;r&&e.properties[r]&&(l=(0,n.Ux)(e.properties[r])),"originId"in e&&"destinationId"in e&&(e.properties[a.Cz]=e.originId,e.properties[a.KQ]=e.destinationId),e.properties[t]=e.id;let p=e.properties;if(e.id){let t=this._featureLookup.get(e.id);if(t?.attributes){p={...t.attributes,...p};let e=r&&p[r];null!=e&&(p[r]=(0,i.rS)(e)),l??=t.geometry}}let u=new s.Om(l?.clone(),p,null,e.id);this._featureLookup.set(`${e.typeName?`${e.typeName}__${e.id}`:e.id}`,u),o.push(u)}),o}}},15375(e,t,r){r.d(t,["BL",0,"LC.ESRI__IsSpatial","Cz",0,"ESRI__OriginID","KQ",0,"ESRI__DestID","M1",0,"ESRI__AggregationCount","T1",0,"ESRI__LayoutGeometry","dr",0,"ESRI__ID"])},40736(e,t,r){r.d(t,{Gz:()=>Q,O9:()=>Z,hZ:()=>$,CP:()=>U,dD:()=>q,UT:()=>O,MY:()=>D,Td:()=>R,iW:()=>P,e$:()=>j,$L:()=>z,N1:()=>B,qN:()=>N});var i=r(68197),n=r(92602),s=r(70333),a=(r(49186),r(91869)),o=r(17676),l=r(78247),p=r(89909),u=r(99917),d=r(16930),h=r(52039),c=r(99352),y=r(15375),m=r(29005),f=r(46499),g=r(73913),b=r(77548),w=r(80812),M=r(10407),I=r(53902),C=r(25927),_=r(32198),T=r(69622),v=r(91429);let A=class extends T.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,v.MZ)()],A.prototype,"entityAdds",void 0),(0,_.Cg)([(0,v.MZ)()],A.prototype,"entityUpdates",void 0),(0,_.Cg)([(0,v.MZ)()],A.prototype,"entityDeletes",void 0),(0,_.Cg)([(0,v.MZ)()],A.prototype,"relationshipAdds",void 0),(0,_.Cg)([(0,v.MZ)()],A.prototype,"relationshipUpdates",void 0),(0,_.Cg)([(0,v.MZ)()],A.prototype,"relationshipDeletes",void 0),(0,_.Cg)([(0,v.MZ)()],A.prototype,"options",void 0),A=(0,_.Cg)([(0,v.$K)("esri.rest.knowledgeGraph.GraphApplyEdits")],A);var E=r(23150),x=r(94128),S=r(40863),k=r(68249);const L=(e,t)=>"knowledge-graph"===e.type?`${t}/Map`:`${t}/LinkChart/LinkChartSubLayer`;async function N(e,t,r){return(async(e,t,r)=>{if(t||=[...e.layers,...e.tables].map(e=>e.graphTypeName),0===t?.length)return;let i=new Map;for(let r of t)i.set(r,L(e,r));let n=await(0,I.fetchClientDataAtKeys)(e.dataManager.knowledgeGraph,Array.from(i.values()),{requestOptions:{signal:r?.signal}});for(let t of[...e.layers,...e.tables]){let r=t.objectType.name;if(null==r)continue;let i=n.get(L(e,r));if(i){let e=JSON.parse(i);"object"==typeof e&&e&&!e.hasOwnProperty("showLabels")&&(e.showLabels=!1),t.read(e,{origin:"service"})}}})(e,t,r)}const F="#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".split(".");function R(e){return e<0||e>=F.length?new i.A("#8f8f82"):new i.A(F[e])}function O(e){let t=e.toArray();return new S.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 D(e){let t="ESRI__ID",r=4;for(let i of e)if(i.name){if("name"===i.name.toLowerCase()){t=i.name;break}i.name.toLowerCase().includes("name")?(t=i.name,r=2):"esriFieldTypeString"===i.fieldType&&r>3&&(t=i.name,r=3)}return t}function P(e,t,r){let i={color:[80,80,80],haloColor:[255,255,255],haloSize:.7,font:{size:10,weight:"normal"}},n=new f.A({labelExpressionInfo:new g.A({expression:"ESRI__ID"===r?`${t}`:`$feature.${r}`}),labelPlacement:"above-center",symbol:new k.A(i)}),s=new f.A({labelExpressionInfo:new g.A({expression:`'${t}' + IIf($feature.ESRI__AggregationCount>1, ' (' + $feature.ESRI__AggregationCount + ')', '')`}),labelPlacement:"center-along",labelPosition:"parallel",repeatLabel:!1,symbol:new k.A({...i,yoffset:"12px"})});return"entity"===e?[n]:[s]}function j(e,t,r){let i={color:[255,255,255],haloColor:[0,0,0],haloSize:.7,font:{size:10,weight:"bold"}},n="ESRI__ID"===r?`${e}`:`$feature.${r}`;return"point"===t?[new f.A({labelExpressionInfo:new g.A({expression:n}),labelPlacement:"above-center",symbol:new k.A(i)})]:"polyline"===t?[new f.A({labelExpressionInfo:new g.A({expression:n}),labelPlacement:"center-along",repeatLabel:!0,symbol:new k.A(i)})]:"polygon"===t?[new f.A({labelExpressionInfo:new g.A({expression:n}),labelPlacement:"always-horizontal",symbol:new k.A(i)})]:null}async function B(e,t,r){return(async(e,t,r)=>{let i=!0,a=!1,o=!1;if(!n.A.userPrivilegesApplied)return{edit:i,fullEdit:a,updateItem:o};let l=await(0,b.wI)(t,r);if(!l||!s.id?.getCredential(`${l}/sharing`,{...r,prompt:!1}))return{edit:i,fullEdit:a,updateItem:o};let p=new w.default({id:e,portal:{url:l}});return await p.load(r),({features:{edit:i,fullEdit:a},content:{updateItem:o}}=(0,M.It)(p)),{edit:i,fullEdit:a,updateItem:o}})(e,t,r).catch(e=>((0,o.QP)(e),{edit:!0,fullEdit:!1,updateItem:!1}))}const G={capabilities:[],allowGeometryUpdates:!1,serviceCapabilities:{geometryCapabilities:{supportsZValues:!1,supportsMValues:!1}}};function $(e){let{capabilities:t,allowGeometryUpdates:r,serviceCapabilities:{geometryCapabilities:{supportsZValues:i,supportsMValues:n}}}=e?.serviceDefinition||G,s=e?.dataModel.arcgisManaged?t:t.filter(e=>"Query"===e),a=new Set(s);return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:n,supportsTrueCurve:!1,supportsZ:i},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:a.has("Create"),supportsDelete:a.has("Delete"),supportsEditing:a.has("Editing"),supportsChangeTracking:!1,supportsQuery:a.has("Query"),supportsQueryBins:!1,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:a.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&&r,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsTrueCurveUpdate:!1,supportsTrueCurveUpdateByTrueCurveClientsOnly:!0,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:a.has("Delete"),supportsUpdateByAnonymous:!1,supportsUpdateByOthers:a.has("Update"),supportsAsyncApplyEdits:!1,zDefault:void 0}}}async function Z(e,t,r){let i=new A,n=t.graphTypeName,s=t.graphType,o="knowledge-graph"===r.type?t.geometryFieldName:null,l=!!t.fieldsIndex.get(o)?.editable,p=e=>{let r={...e};for(let e of t.fields)e.editable||delete r[e.name];for(let t of Object.keys(e))t.includes("ESRI__")&&delete r[t];return r},c=async e=>{await(0,u.initializeProjection)(e.spatialReference,d.A.WGS84);let t=(0,u.project)(e,d.A.WGS84);return"point"===t.type?t.normalize():(await(0,h.el)(t))[0]};for(let t of e.addFeatures??[]){let e=p(t.attributes);(0,b.UC)(t.sourceLayer)&&t.sourceLayer.graphTypeName===n&&("entity"===s?(i.entityAdds||=[],o&&t.geometry&&(e[o]=await c(t.geometry)),i.entityAdds.push(new C.A({properties:e,typeName:n}))):(i.relationshipAdds||=[],i.relationshipAdds.push(new E.A({properties:e,typeName:n}))))}for(let t of e.updateFeatures??[]){let e=t.attributes[y.dr],r=p(t.attributes);(0,b.UC)(t.sourceLayer)&&t.sourceLayer.graphTypeName===n&&("entity"===s?(i.entityUpdates||=[],o&&l&&t.geometry&&(r[o]=await c(t.geometry)),i.entityUpdates.push(new C.A({id:e,properties:r,typeName:n}))):(i.relationshipUpdates||=[],i.relationshipUpdates.push(new E.A({id:e,properties:r,typeName:n}))))}let m=new Map;for(let t of e.deleteFeatures??[])if((0,x.D)(t)){let e=t,r=(0,a.tE)(m,e.sourceLayer.graphTypeName,()=>({typeName:e.sourceLayer.graphTypeName,ids:[]}));e.sourceLayer.graphTypeName===n&&r.ids.push(e.attributes[y.dr])}else t.objectId&&"string"==typeof t.objectId&&(0,a.tE)(m,n,()=>({typeName:n,ids:[]})).ids.push(t.objectId);for(let e of m.values())e.ids.length>0&&("entity"===s?(i.entityDeletes||=[],i.entityDeletes.push({typeName:e.typeName,ids:e.ids})):(i.relationshipDeletes||=[],i.relationshipDeletes.push({typeName:e.typeName,ids:e.ids})));return i}function Q(e,t){let r={addFeatureResults:[],updateFeatureResults:[],deleteFeatureResults:[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]};for(let i of e.editResults)if(i.typeName===t){for(let e of i.adds)r.addFeatureResults.push({objectId:e.id,globalId:e.id});for(let e of i.updates)r.updateFeatureResults.push({objectId:e.id,globalId:e.id});for(let e of i.deletes)r.deleteFeatureResults.push({objectId:e.id,globalId:e.id})}return r}function q(e){if(!e.objectType)return null;let t=[];for(let r of e.fields)!r.name.includes("ESRI__")&&r.editable&&"geometry"!==r.type&&t.push(new p.A({fieldName:r.name}));return new l.A({elements:t})}function U(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 m.A({name:e.graphTypeName,drawingTool:t,prototype:{}})]}const z=e=>{let t="",r=e.split("/"),i=r.lastIndexOf("KnowledgeGraphServer");return i>0&&(t=r[i-1]),t}},99916(e,t,r){r.d(t,{Wq:()=>l,aq:()=>o}),r(52106);var i=r(49186),n=(r(86738),r(39829),r(82799),r(15795),r(69860),r(8460),r(69647)),s=r(53902),a=r(42538);async function o(e,t,r){let i=[],n=function(e,t){let r=new Map;if(t.dataModel?.relationshipTypes)for(let e of t.dataModel.relationshipTypes)e.name&&r.set(e.name,[]);for(let t of e)r.has(t.typeName)&&r.get(t.typeName)?.push(t.id);return r}(e,t),o={},l=[];for(let[e,t]of n){if(t.length<1)continue;let r=`${e}_ids`;o[r]=t,l.push(`MATCH (n)-[r:${e}]->(m) WHERE id(r) in $${r} RETURN id(n), labels(n)[0], id(m), labels(m)[0]`)}if(0===l.length)return[];let p=l.join(" UNION "),u=new a.A({openCypherQuery:p,bindParameters:o}),d=(await(0,s.executeQueryStreaming)(t,u,r?.requestOptions)).resultRowsStream.getReader();for(;;){let{done:e,value:t}=await d.read();if(e)break;for(let e of t)i.push({id:e[0],typeName:e[1]}),i.push({id:e[2],typeName:e[3]})}return i}function l(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]])}r(40863),r(94985),r(68249),r.d(t,["k5",0,e=>n.P_.get(e)??"radial-root-centric"])},82935(e,t,r){var i=r(32198),n=r(91429),s=r(30524),a=r(96184),o=r(73133),l=r(79677),p=r(10184),u=r(36005);const d={type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation"}}};r.d(t,["B",0,d,"e",0,e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){let r=t.timeInfo.exportOptions;if(!r)return null;let i=r.timeOffset,n=o.j.fromJSON(r.timeOffsetUnits);return i&&n?new p.A({value:i,unit:n}):null}get timeInfo(){return this._get("timeInfo")}set timeInfo(e){(0,s.sv)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,i.Cg)([(0,n.MZ)({type:l.A,json:{write:!1}})],r.prototype,"timeExtent",void 0),(0,i.Cg)([(0,n.MZ)({type:p.A})],r.prototype,"timeOffset",void 0),(0,i.Cg)([(0,u.w)("service","timeOffset",["timeInfo.exportOptions"])],r.prototype,"readOffset",null),(0,i.Cg)([(0,n.MZ)({value:null,type:a.A,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],r.prototype,"timeInfo",null),(0,i.Cg)([(0,n.MZ)(d)],r.prototype,"useViewTime",void 0),r=(0,i.Cg)([(0,n.$K)("esri.layers.mixins.TemporalLayer")],r),r}])},17036(e,t,r){r.d(t,{p:()=>l});var i=r(44208),n=r(53966),s=r(20437),a=r(95466),o=r(30524);function l(){return{fields:{type:[s.A],value:null,set:function(e){if(e&&(0,i.A)("big-integer-warning-enabled")){let t=e.filter(e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8);if(t.length){let e=t.map(e=>`'${e.name}'`).join(", ");n.A.getLogger(this).warn("#fields",`Layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}') references big-integer field(s): ${e}, support for which is experimental. Only integers less than ${2**53-1} (Number.MAX_SAFE_INTEGER) are supported.`)}}this._set("fields",e)}},fieldsIndex:{readOnly:!0,get(){return a.A.fromLayer(this)}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){let e=this._userOutFields;if(!e?.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(let t of e)this.fieldsIndex?.has(t)||n.A.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e});return(0,o.DB)(this.fieldsIndex,e)}}}}},8460(e,t,r){r.d(t,{$C:()=>m,Hh:()=>a,Tu:()=>c,Wg:()=>y,Xq:()=>g,i6:()=>b,pM:()=>d,vJ:()=>f});var i=r(2741);let n,s=null;function a(){return n||(n=r.e(3666).then(()=>r(3666)).then(({default:e})=>e({locateFile:e=>(0,i.s)(`esri/libs/linkchartlayout/${e}`)})).then(e=>{!function(e){s=e}(e)}),n)}const o={right:0,left:1,top:2,bottom:3},l={none:0,"start-only":1,"start-and-end":2};function p(e){let 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:o[t.timeDirection]??o.right},eventsTicksVisualization:{value:l[t.eventsTicksVisualization]??l["start-and-end"]}}}function u(e,t,r,i,n,a){let o=r.length,l=n.length,p=Float64Array.BYTES_PER_ELEMENT,u=Uint32Array.BYTES_PER_ELEMENT,d=Uint8Array.BYTES_PER_ELEMENT,h=16+o*(d+2*p)+2*u*l,c=s._malloc(h);try{let d=c+16-c%16,h=d+o*p,y=h+o*p,m=y+l*u,f=m+l*u,g=()=>[s.HEAPF64.subarray(d>>3,(d>>3)+o),s.HEAPF64.subarray(h>>3,(h>>3)+o),s.HEAPU32.subarray(y>>2,(y>>2)+l),s.HEAPU32.subarray(m>>2,(m>>2)+l),s.HEAPU8.subarray(f,f+o)],[b,w,M,I,C]=g();b.set(r),w.set(i),M.set(n),I.set(a),C.set(t);let _=e(o,f,d,h,l,y,m),T=null,v=null;if(0===_.value){let e=s.getLayoutLinksTypes(),t=s.getLayoutLinksVerticesEndIndices(),r=s.getLayoutLinksVertices(),i=s.countLayoutLinksVertices();l&&(!e||!t)||i&&!r?_.value=1:(T={types:new Uint8Array(s.HEAPU8.subarray(e,e+l)),vertexEndIndex:new Uint32Array(s.HEAPU32.subarray(t>>2,(t>>2)+l)),vertices:new Float64Array(s.HEAPF64.subarray(r>>3,(r>>3)+2*i))},v=s.getAuxiliaryGraphicElements())}let[A,E,x,S,k]=g();return r.set(A),i.set(E),n.set(x),a.set(S),t.set(k),{status:_.value,links:T,graphics:v}}finally{s._free(c),s.cleanupLayout()}}var d,h,c,y,m,f,g,b;(h=d||={}).getMinIdealEdgeLength=function(){return s.getMinIdealEdgeLength()},h.apply=function(e,t,r,i,n,a,o=2,l=1,p=-1){return u((t,r,i,n,a,u,d)=>s.applyForceDirectedLayout(e,t,r,i,n,a,u,d,o,l,p),t,r,i,n,a)},function(e){e.apply=function(e,t,r,i,n,a,o=2,l=1,p=-1){return u((t,r,i,n,a,u,d)=>s.applyCommunityLayout(e,t,r,i,n,a,u,d,o,l,p),t,r,i,n,a)}}(c||={}),function(e){e.apply=function(e,t,r,i,n,a){return u((t,r,i,n,a,o,l)=>s.applySimpleLayout(e,t,r,i,n,a,o,l),t,r,i,n,a)}}(y||={}),function(e){e.apply=function(e,t,r,i,n,a){return u((t,r,i,n,a,o,l)=>s.applyHierarchicalLayout(e,t,r,i,n,a,o,l),t,r,i,n,a)}}(m||={}),function(e){e.apply=function(e,t,r,i,n,a){return u((t,r,i,n,a,o,l)=>s.applyRadialTreeLayout(e,t,r,i,n,a,o,l),t,r,i,n,a)}}(f||={}),function(e){e.apply=function(e,t,r,i,n,a){return u((t,r,i,n,a,o,l)=>s.applySmartTreeLayout(e,t,r,i,n,a,o,l),t,r,i,n,a)}}(g||={}),function(e){e.apply=function(e,t,r,i,n,a,o,l,d,h,c,y){return u((t,r,i,o,l,u,m)=>{if(n.length!==t||a.length!==t||d.length!==l||h.length!==l)return{value:1};let f=Float64Array.BYTES_PER_ELEMENT,g=s._malloc(16+t*f),b=s._malloc(16+t*f),w=s._malloc(16+l*f),M=s._malloc(16+l*f),I=g+16-g%16,C=b+16-b%16,_=w+16-w%16,T=M+16-M%16;try{return s.HEAPF64.subarray(I>>3,(I>>3)+t).set(n),s.HEAPF64.subarray(C>>3,(C>>3)+t).set(a),s.HEAPF64.subarray(_>>3,(_>>3)+l).set(d),s.HEAPF64.subarray(T>>3,(T>>3)+l).set(h),s.applyChronologicalLayout(e,t,r,i,o,I,C,l,u,m,_,T,c,p(y))}finally{s._free(g),s._free(b),s._free(w),s._free(M)}},t,r,i,o,l)}}(b||={})},69647(e,t,r){var i=r(66552);const n=(0,i.O)()({none:"none",startAndEnd:"start-and-end",startOnly:"start-only"}),s=(0,i.O)()({absoluteValue:"absolute-value",multiplier:"multiplier"}),a=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"]]);r.d(t,["P_",0,a,"SJ",0,n,"lg",0,s])},54628(e,t,r){r.d(t,{lV:()=>s,zI:()=>n});var i=r(56507);async function n(e,t,r){if(!e||!t||!e.includes("/resources"))return!1;let n=t+"/resources",s=e.includes("/resources/")?e.split("/resources/")[1]:e;if(!s)return!1;let a=1;for(;-1!==a;){let e=(await(0,i.A)(n,{query:{f:"json",start:a,num:100}})).data,t=e?.resources??[];for(let e of t)if(e.resource===s)return"number"==typeof r&&e.created===r;if(null==e.nextStart||!t.length)break;a=e.nextStart}return!1}async function s(e,t){if(!e.length||!t)return new Map;let r=t+"/resources",n=1,s=new Map;for(;-1!==n;){let e=(await(0,i.A)(r,{query:{f:"json",start:n,num:100}})).data,t=e?.resources??[];for(let e of t)"number"==typeof e.created&&s.set(e.resource,e.created);if(null==e.nextStart||!t.length)break;n=e.nextStart}let a=new Map;for(let t of e){let e=t.includes("/resources/")?t.split("/resources/")[1]:t,r=s.get(e);null!=r&&a.set(t,r)}return a}r(49186),r(53966),r(17676),r(86738),r(8460)},25927(e,t,r){r.d(t,{A:()=>o});var i=r(32198),n=r(91429),s=r(86738),a=r(54238);let o=class extends a.A{constructor(e){super(e),this.layoutGeometry=null}};(0,i.Cg)([(0,n.MZ)({type:s.A,json:{write:!0}})],o.prototype,"layoutGeometry",void 0),o=(0,i.Cg)([(0,n.$K)("esri.rest.knowledgeGraph.Entity")],o)},54238(e,t,r){r.d(t,{A:()=>a});var i=r(32198),n=r(91429),s=r(77901);let a=class extends s.A{constructor(e){super(e),this.typeName=null,this.id=null}};(0,i.Cg)([(0,n.MZ)({type:String,json:{write:!0}})],a.prototype,"typeName",void 0),(0,i.Cg)([(0,n.MZ)({type:String,json:{write:!0}})],a.prototype,"id",void 0),a=(0,i.Cg)([(0,n.$K)("esri.rest.knowledgeGraph.GraphNamedObject")],a)},77901(e,t,r){r.d(t,{A:()=>a});var i=r(32198),n=r(25482),s=r(91429);let a=class extends n.o{constructor(e){super(e),this.properties={}}};(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],a.prototype,"properties",void 0),a=(0,i.Cg)([(0,s.$K)("esri.rest.knowledgeGraph.GraphObject")],a)},42538(e,t,r){r.d(t,{A:()=>l});var i=r(32198),n=r(91429),s=r(16930),a=r(69622);let o=class extends a.A{constructor(e){super(e),this.openCypherQuery=""}};(0,i.Cg)([(0,n.MZ)()],o.prototype,"openCypherQuery",void 0),o=(0,i.Cg)([(0,n.$K)("esri.rest.knowledgeGraph.GraphQuery")],o);let l=class extends o{constructor(e){super(e),this.bindParameters=null,this.bindGeometryQuantizationParameters=null,this.outputQuantizationParameters=null,this.outputSpatialReference=null,this.provenanceBehavior=null}};(0,i.Cg)([(0,n.MZ)()],l.prototype,"bindParameters",void 0),(0,i.Cg)([(0,n.MZ)()],l.prototype,"bindGeometryQuantizationParameters",void 0),(0,i.Cg)([(0,n.MZ)()],l.prototype,"outputQuantizationParameters",void 0),(0,i.Cg)([(0,n.MZ)({type:s.A})],l.prototype,"outputSpatialReference",void 0),(0,i.Cg)([(0,n.MZ)()],l.prototype,"provenanceBehavior",void 0),l=(0,i.Cg)([(0,n.$K)("esri.rest.knowledgeGraph.GraphQueryStreaming")],l)},40662(e,t,r){r.d(t,{A:()=>a});var i=r(32198),n=r(91429),s=r(77901);let a=class extends s.A{constructor(e){super(e)}};a=(0,i.Cg)([(0,n.$K)("esri.rest.knowledgeGraph.ObjectValue")],a)},42095(e,t,r){r.d(t,{A:()=>o});var i=r(32198),n=r(25482),s=r(91429),a=r(77901);let o=class extends n.o{constructor(e){super(e),this.path=[]}};(0,i.Cg)([(0,s.MZ)({type:[a.A],json:{write:!0}})],o.prototype,"path",void 0),o=(0,i.Cg)([(0,s.$K)("esri.rest.knowledgeGraph.Path")],o)},23150(e,t,r){r.d(t,{A:()=>o});var i=r(32198),n=r(91429),s=r(82799),a=r(54238);let o=class extends a.A{constructor(e){super(e),this.originId=null,this.destinationId=null,this.layoutGeometry=null}};(0,i.Cg)([(0,n.MZ)({type:String,json:{write:!0}})],o.prototype,"originId",void 0),(0,i.Cg)([(0,n.MZ)({type:String,json:{write:!0}})],o.prototype,"destinationId",void 0),(0,i.Cg)([(0,n.MZ)({type:s.A,json:{write:!0}})],o.prototype,"layoutGeometry",void 0),o=(0,i.Cg)([(0,n.$K)("esri.rest.knowledgeGraph.Relationship")],o)},2272(e,t,r){r.d(t,{Dl:()=>p,gf:()=>d,jV:()=>l,lF:()=>u});var i=r(92602),n=r(70333),s=r(4718),a=r(84952),o=r(926);function l(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function p(e){return"string"==typeof e?(0,a.An)(e):(0,s.o8)(e)}function u(e,t,r){let i={};for(let n in e){if("declaredClass"===n)continue;let s=e[n];if(null!=s&&"function"!=typeof s)if(Array.isArray(s))i[n]=s.map(e=>u(e));else if("object"==typeof s)if(s.toJSON){let e=s.toJSON(r?.[n]);i[n]=t?e:JSON.stringify(e)}else i[n]=t?s:JSON.stringify(s);else i[n]=s}return i}async function d(e,t,s){return function(e,t){return e?t&&(0,o.Qc)(e)?t:(0,o.getApiKey)(e)??n.id?.findCredential(e)?.token:null}(e,t)||(!n.id&&i.A.request.useIdentity&&await Promise.all([r.e(6361),r.e(6475),r.e(7715)]).then(()=>r(50148)),(await n.id.getCredential(e,s))?.token)}},62046(e,t,r){r.d(t,{Fe:()=>y,KU:()=>b,Nk:()=>p,X5:()=>s});var i=r(68197),n=r(93397);function s(e,t,r){if(!e)return;let i=(0,n.lW)(e),s=function(e){let t=(0,n.lW)(e);if("CIMTextSymbol"===t?.type)return t.height??0;let r=0;if(t?.symbolLayers)for(let e of t.symbolLayers)(0,n.MM)(e)&&null!=e.size&&e.size>r?r=e.size:(0,n.mA)(e)&&null!=e.width&&e.width>r?r=e.width:(0,n.jn)(e);return r}(e);0!==s?a(i,t/s,!1,r):function(e,t){if(e){if("CIMTextSymbol"===e.type)return void(e.height=t);if(e.symbolLayers)for(let r of e.symbolLayers)switch(r.type){case"CIMPictureMarker":case"CIMVectorMarker":r.size=t;break;case"CIMPictureStroke":case"CIMSolidStroke":case"CIMGradientStroke":r.width=t}}}(i,t)}function a(e,t,r,i){if(e){if("CIMTextSymbol"===e.type)return void(null!=e.height&&(e.height*=t));if(r&&e.effects)for(let r of e.effects)l(r,t);if(e.symbolLayers)for(let r of e.symbolLayers){switch(r.type){case"CIMPictureMarker":case"CIMVectorMarker":o(r,t,i);break;case"CIMPictureStroke":case"CIMSolidStroke":case"CIMGradientStroke":!i?.preserveOutlineWidth&&r.width&&(r.width*=t);break;case"CIMPictureFill":r.height&&(r.height*=t),r.offsetX&&(r.offsetX*=t),r.offsetY&&(r.offsetY*=t);break;case"CIMHatchFill":a(r.lineSymbol,t,!0,{...i,preserveOutlineWidth:!1}),r.offsetX&&(r.offsetX*=t),r.offsetY&&(r.offsetY*=t),r.separation&&(r.separation*=t)}if(r.effects)for(let e of r.effects)l(e,t)}}}function o(e,t,r){if(e&&(e.markerPlacement&&function(e,t){switch((0,n.zr)(e)&&e.offset&&(e.offset*=t),e.type){case"CIMMarkerPlacementAlongLineRandomSize":case"CIMMarkerPlacementAlongLineSameSize":e.customEndingOffset&&(e.customEndingOffset*=t),e.offsetAlongLine&&(e.offsetAlongLine*=t),e.placementTemplate&&e.placementTemplate.length&&(e.placementTemplate=e.placementTemplate.map(e=>e*t));break;case"CIMMarkerPlacementAlongLineVariableSize":e.maxRandomOffset&&(e.maxRandomOffset*=t),e.placementTemplate&&e.placementTemplate.length&&(e.placementTemplate=e.placementTemplate.map(e=>e*t));break;case"CIMMarkerPlacementOnLine":e.startPointOffset&&(e.startPointOffset*=t);break;case"CIMMarkerPlacementAtExtremities":e.offsetAlongLine&&(e.offsetAlongLine*=t);break;case"CIMMarkerPlacementAtMeasuredUnits":case"CIMMarkerPlacementOnVertices":break;case"CIMMarkerPlacementAtRatioPositions":e.beginPosition&&(e.beginPosition*=t),e.endPosition&&(e.endPosition*=t);break;case"CIMMarkerPlacementPolygonCenter":e.offsetX&&(e.offsetX*=t),e.offsetY&&(e.offsetY*=t);break;case"CIMMarkerPlacementInsidePolygon":e.offsetX&&(e.offsetX*=t),e.offsetY&&(e.offsetY*=t),e.stepX&&(e.stepX*=t),e.stepY&&(e.stepY*=t)}}(e.markerPlacement,t),e.offsetX&&(e.offsetX*=t),e.offsetY&&(e.offsetY*=t),e.anchorPoint&&"Absolute"===e.anchorPointUnits&&(e.anchorPoint={x:e.anchorPoint.x*t,y:e.anchorPoint.y*t}),e.size=null==e.size?0:e.size*t,"CIMVectorMarker"===e.type&&e.markerGraphics))for(let i of e.markerGraphics)e.scaleSymbolsProportionally||a(i.symbol,t,!0,r)}function l(e,t){if(!(0,n.Kq)(e))switch(e.type){case"CIMGeometricEffectArrow":case"CIMGeometricEffectDonut":e.width&&(e.width*=t);break;case"CIMGeometricEffectBuffer":e.size&&(e.size*=t);break;case"CIMGeometricEffectCut":e.beginCut&&(e.beginCut*=t),e.endCut&&(e.endCut*=t),e.middleCut&&(e.middleCut*=t);break;case"CIMGeometricEffectDashes":e.customEndingOffset&&(e.customEndingOffset*=t),e.offsetAlongLine&&(e.offsetAlongLine*=t),e.dashTemplate&&e.dashTemplate.length&&(e.dashTemplate=e.dashTemplate.map(e=>e*t));break;case"CIMGeometricEffectExtension":case"CIMGeometricEffectJog":case"CIMGeometricEffectRadial":e.length&&(e.length*=t);break;case"CIMGeometricEffectMove":e.offsetX&&(e.offsetX*=t),e.offsetY&&(e.offsetY*=t);break;case"CIMGeometricEffectOffset":case"CIMGeometricEffectOffsetTangent":e.offset&&(e.offset*=t);break;case"CIMGeometricEffectRegularPolygon":e.radius&&(e.radius*=t);break;case"CIMGeometricEffectTaperedPolygon":e.fromWidth&&(e.fromWidth*=t),e.length&&(e.length*=t),e.toWidth&&(e.toWidth*=t);break;case"CIMGeometricEffectWave":e.amplitude&&(e.amplitude*=t),e.period&&(e.period*=t)}}function p(e){let t=[];return u((0,n.lW)(e),t),t.length?new i.A((0,n.e6)(t[0])):null}function u(e,t){if(!e)return;let r;r="CIMTextSymbol"===e.type?e.symbol:e;let i="CIMPolygonSymbol"===e.type;if(r?.symbolLayers)for(let e of r.symbolLayers)if(!(e.colorLocked||i&&((0,n.mA)(e)||(0,n.MM)(e)&&e.markerPlacement&&(0,n.zr)(e.markerPlacement))))switch(e.type){case"CIMPictureMarker":case"CIMPictureStroke":case"CIMPictureFill":e.tintColor&&d(t,e.tintColor);break;case"CIMVectorMarker":e.markerGraphics?.forEach(e=>{u(e.symbol,t)});break;case"CIMSolidStroke":case"CIMSolidFill":d(t,e.color);break;case"CIMGradientFill":h(t,e);break;case"CIMHatchFill":u(e.lineSymbol,t)}}function d(e,t){for(let r of e)if(r.join(".")===t.join("."))return;e.push(t)}function h(e,t){switch(t.colorRamp?.type){case"CIMMultipartColorRamp":t.colorRamp.colorRamps?.forEach(t=>{"CIMLinearContinuousColorRamp"===t.type&&c(e,t)});break;case"CIMLinearContinuousColorRamp":case"CIMPolarContinuousColorRamp":c(e,t.colorRamp)}}function c(e,t){t&&(t.fromColor&&d(e,t.fromColor),t.toColor&&d(e,t.toColor))}function y(e,t,r){t instanceof i.A||(t=new i.A(t));let s=(0,n.lW)(e);s&&m(s,t,r)}function m(e,t,r){if(!e)return;let i;i="CIMTextSymbol"===e.type?e.symbol:e;let s="CIMPolygonSymbol"===i?.type;if(i?.symbolLayers)for(let e of i.symbolLayers){if(e.colorLocked)continue;if(s)if(r){let{layersToColor:t}=r;if(((0,n.mA)(e)||(0,n.MM)(e)&&e.markerPlacement&&(0,n.zr)(e.markerPlacement))&&"fill"===t||(0,n.jn)(e)&&"outline"===t)continue}else if((0,n.mA)(e)||(0,n.MM)(e)&&e.markerPlacement&&(0,n.zr)(e.markerPlacement))continue;let i=t.toArray();switch(e.type){case"CIMPictureMarker":case"CIMPictureStroke":case"CIMPictureFill":e.tintColor=i;break;case"CIMVectorMarker":e.markerGraphics?.forEach(e=>{m(e.symbol,t,r)});break;case"CIMSolidStroke":case"CIMSolidFill":e.color=i;break;case"CIMGradientFill":f(e,t);break;case"CIMHatchFill":m(e.lineSymbol,t,r)}}}function f(e,t){switch(e.colorRamp?.type){case"CIMMultipartColorRamp":e.colorRamp.colorRamps?.forEach(e=>{"CIMLinearContinuousColorRamp"===e.type&&g(e,t)});break;case"CIMLinearContinuousColorRamp":case"CIMPolarContinuousColorRamp":g(e.colorRamp,t)}}function g(e,t){if(e&&(e.fromColor&&=t.toArray(),e.toColor)){let r=t.clone();r.a=0,e.toColor=r.toArray()}}function b(e,t,r=!1){let i=(0,n.lW)(e);if(r&&(t=360-t),"CIMTextSymbol"!==i?.type){if("CIMPointSymbol"===i?.type&&i.symbolLayers){let e=t-(i.angle||0);for(let t of i.symbolLayers)if((0,n.MM)(t)){let r=t.rotation||0;t.rotateClockwise?r-=e:r+=e,t.rotation=r}i.angle=t}}else i.angle=t}},37531(e,t,r){r.d(t,{dt:()=>h,GG:()=>g,UQ:()=>f,Sx:()=>u});var i=r(68197),n=r(60999),s=(r(90629),r(51850)),a=(r(76369),r(62046)),o=(r(2741),r(56507),r(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 o.q(1e3),new i.A([128,128,128]);var l=r(28975),p=r(33910);function u(e,t){if(!e)return null;let r=null;return(0,p.wk)(e)?r=function(e){let t=e.symbolLayers;if(!t)return null;let r=null;return t.forEach(e=>{"object"===e.type&&e.resource?.href||(r="water"===e.type?e.color:e.material?e.material.color:null)}),r?new i.A(r):null}(e):(0,p.$y)(e)&&(r="cim"===e.type?(0,a.Nk)(e):e.color?new i.A(e.color):null),r?d(r,t):null}function d(e,t){if(null==t||null==e)return e;let r=e.toRgba();return r[3]*=t,new i.A(r)}function h(e,t,r){e&&(t||null!=r)&&(t&&=new i.A(t),(0,p.wk)(e)?function(e,t,r){let n=e.symbolLayers;if(!n)return;let s=(e,n=!1)=>{let s=t??e??null;return null!=r?.override&&(!s&&n&&(s=new i.A([255,255,255])),s&&(s.a=r.override)),d(s,r?.add)};n.forEach(e=>{if("water"===e.type)return void(e.color=d(e.color,r?.add));let t=null==e.material?null:e.material.color,i=s(t,"icon"===e.type&&null!=e.resource?.href);null==e.material?e.material=new l.A({color:i}):e.material.color=i,"outline"in e&&e.outline?.color&&null!=r?.add&&(e.outline.color=d(e.outline.color,r.add)),"marker"in e&&null!=e.marker&&(e.marker.color=s(e.marker.color))})}(e,t,r):(0,p.$y)(e)&&function(e,t,r){t??=e.color,null!=r?.override&&t&&(t.a=r.override),t&&(e.color=d(t,r?.add)),"outline"in e&&e.outline?.color&&(e.outline.color=d(e.outline.color,r?.add))}(e,t,r))}function c(e){for(let t of e)if("number"==typeof t)return t;return null}function y(e,t,r){for(let i=0;i<3;i++){let n=e[i];switch(n){case"symbol-value":{let e=r[i];return null==e?1:e/t[i]}case"proportional":break;default:if(null!=n&&t[i])return n/t[i]}}return null}function m(e,t,r,i){switch(e){case"proportional":return r*i;case"symbol-value":return t??r;default:return e}}async function f(e,t){if(e&&t){if((0,p.wk)(e))return async function(e,t){let i=e.symbolLayers;i&&await(0,n.jJ)(i,async e=>async function(e,t){switch(e.type){case"extrude":!function(e,t){let r=t[2];"number"==typeof r&&(e.size=r)}(e,t);break;case"icon":case"line":case"text":!function(e,t){let r=c(t);null!=r&&(e.size=r)}(e,t);break;case"path":!function(e,t){let r=y(t,s.Un,[e.width,void 0,e.height]);null!=r&&(e.width=m(t[0],e.width,1,r),e.height=m(t[2],e.height,1,r))}(e,t);break;case"object":await async function(e,t){let{resourceSize:i,symbolSize:n}=await async function(e){let{computeObjectLayerResourceSize:t}=await r.e(5404).then(()=>r(95404)),i=await t(e,10),{width:n,height:s,depth:a}=e,o=[n,a,s],l=1;for(let e=0;e<3;e++){let t=o[e];if(null!=t){l=t/i[e];break}}for(let e=0;e<3;e++)o[e]??(o[e]=i[e]*l);return{resourceSize:i,symbolSize:o}}(e),s=y(t,i,n);null!=s&&(e.width=m(t[0],n[0],i[0],s),e.depth=m(t[1],n[1],i[1],s),e.height=m(t[2],n[2],i[2],s))}(e,t)}}(e,t))}(e,t);(0,p.$y)(e)&&function(e,t){let r=c(t);if(null!=r)switch(e.type){case"simple-marker":e.size=r;break;case"picture-marker":{let t=e.width/e.height;t>1?(e.width=r,e.height=r*t):(e.width=r*t,e.height=r);break}case"simple-line":e.width=r;break;case"text":e.font.size=r;break;case"simple-fill":case"picture-fill":break;case"cim":(0,a.X5)(e,r,{preserveOutlineWidth:!1})}}(e,t)}}function g(e,t,r){if(e&&null!=t)if((0,p.wk)(e)){let i=e.symbolLayers;i&&i.forEach(e=>{if("object"===e.type)switch(r){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,a.KU)(e,t,!0)}}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3318],{52106(e,t,i){i.d(t,{A:()=>A});var r,s,n=i(32198),o=i(40124),l=i(69540),a=i(51447),h=i(25482),u=i(53966),g=i(36708),m=i(24326),c=i(91429),f=i(12195),d=i(65864),p=i(50498),y=i(55156),_=i(60950),b=i(54339),v=i(94128),M=i(33910);const C=Symbol("meshGeometryHandles");function T(e){if(null==e)return null;let t={};for(let i in e){let r=e[i];r&&(t[i]=r.toJSON())}return 0===Object.keys(t).length?null:t}let A=class extends((0,l.OU)(h.o)){static{r=v.Z}static{s=this}constructor(e){super(e),this[r]=!0,this.distance=null,this.isAggregate=!1,this.layer=null,this.origin=null,this.sourceLayer=null,this.statisticsAggregatedIds=void 0,this._version=0,Object.defineProperty(this,"uid",{value:(0,m.c)(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&(0,a.eF)(u.A.getLogger(this),"Graphic",{version:"4.30"})}set aggregateGeometries(e){let t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){let t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){let t=this._get("geometry");t!==e&&(this._set("geometry",e),this._watchMeshGeometryChanges(),this._notifyLayer("geometry",t,e))}set popupTemplate(e){let t=this._get("popupTemplate");t!==e&&(this._set("popupTemplate",e),this._notifyLayer("popupTemplate",t,e))}set symbol(e){let t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}get version(){return this._version}set visible(e){let t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new s({aggregateGeometries:this.aggregateGeometries,statisticsAggregatedIds:this.statisticsAggregatedIds,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;let t=(0,_.E_)(this.origin);if(t)return t.popupTemplate??(e?t.defaultPopupTemplate:null)??null;let i=this.origin&&"layer"in this.origin?this.origin.layer:null;for(let t of[i,this.sourceLayer,this.layer])if(t&&"object"==typeof t){if("popupTemplate"in t&&t.popupTemplate)return t.popupTemplate;if(e&&"defaultPopupTemplate"in t&&null!=t.defaultPopupTemplate)return t.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){let i=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",i,t,e)}else this.attributes={[e]:t}}getObjectId(){let e=(0,y.I)(this.origin);if(e)return(0,b.r)(this,e);let t=this.sourceLayer??this.layer;return t?(0,b.r)(this,t):null}getGlobalId(){let e=(0,y.I)(this.origin);if(e?.globalIdField)return this.getAttribute(e.globalIdField);let t=this.sourceLayer??this.layer;return t&&"globalIdField"in t&&t.globalIdField?this.getAttribute(t.globalIdField):null}toJSON(){let e={aggregateGeometries:T(this.aggregateGeometries),geometry:this.geometry?.toJSON()??null,symbol:this.symbol?.toJSON()??null,attributes:(0,f.W)(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null};return this.statisticsAggregatedIds?.length&&(e.aggregateIds=[...this.statisticsAggregatedIds]),null!=this.distance&&(e.distance=this.distance),e}notifyMeshTransformChanged(e={}){let{geometry:t}=this;if("mesh"===t?.type){let i={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",i,i,e.action)}}_notifyLayer(e,t,i,r){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;let s={graphic:this,property:e,oldValue:t,newValue:i};"origin-transform"===e&&(s.action=r),"attributes"===e&&(s.attributeName=r),this.layer.graphicChanged(s)}_watchMeshGeometryChanges(){this.removeHandles(C);let e=this.geometry;"mesh"===e?.type&&this.addHandles([(0,g.z7)(()=>e.vertexSpace.origin?{localMatrix:e.transform?.localMatrix,origin:e.vertexSpace.origin}:void 0,({localMatrix:e,origin:t})=>{(this._lastMeshTransform.localMatrix!==e||this._lastMeshTransform.origin!==t)&&(this._lastMeshTransform.localMatrix=e,this._lastMeshTransform.origin=t,this.notifyMeshTransformChanged())}),(0,g.z7)(()=>({vertexAttributes:e.vertexAttributes}),()=>{e.vertexSpace.origin?(this._lastMeshTransform.localMatrix=e.transform?.localMatrix,this._lastMeshTransform.origin=e.vertexSpace.origin):(this._lastMeshTransform.localMatrix=void 0,this._lastMeshTransform.origin=void 0),this._notifyLayer("geometry",e,e)},{equals:(e,t)=>e===t,sync:!0})],C)}};(0,n.Cg)([(0,c.MZ)({value:null,json:{read:function(e){if(!e)return null;let t={};for(let i in e){let r=(0,d.rS)(e[i]);r&&(t[i]=r)}return 0===Object.keys(t).length?null:t}}})],A.prototype,"aggregateGeometries",null),(0,n.Cg)([(0,c.MZ)({value:null})],A.prototype,"attributes",null),(0,n.Cg)([(0,c.MZ)({value:null,types:p.yR,json:{read:d.rS}})],A.prototype,"geometry",null),(0,n.Cg)([(0,c.MZ)()],A.prototype,"distance",void 0),(0,n.Cg)([(0,c.MZ)({type:Boolean})],A.prototype,"isAggregate",void 0),(0,n.Cg)([(0,c.MZ)({clonable:!1})],A.prototype,"layer",void 0),(0,n.Cg)([(0,c.MZ)({clonable:"reference"})],A.prototype,"origin",void 0),(0,n.Cg)([(0,c.MZ)({type:o.A,value:null})],A.prototype,"popupTemplate",null),(0,n.Cg)([(0,c.MZ)({clonable:"reference"})],A.prototype,"sourceLayer",void 0),(0,n.Cg)([(0,c.MZ)({json:{name:"aggregateIds",read:e=>e?.map(e=>Array.isArray(e)?JSON.stringify(e):e)}})],A.prototype,"statisticsAggregatedIds",void 0),(0,n.Cg)([(0,c.MZ)({value:null,types:M.Es})],A.prototype,"symbol",null),(0,n.Cg)([(0,c.MZ)({clonable:!1,json:{read:!1,write:!1}})],A.prototype,"_version",void 0),(0,n.Cg)([(0,c.MZ)({type:Boolean,value:!0})],A.prototype,"visible",null),A=s=(0,n.Cg)([(0,c.$K)("esri.Graphic")],A)},7762(e,t,i){var r,s=i(32198),n=i(98291),o=i(4576),l=i(65529),a=i(36563),h=i(4718),u=i(53966),g=i(93687),m=i(76030),c=i(78888),f=i(62788),d=i(10107),p=i(7695),y=i(64108),_=i(95488),b=i(12195);class v{constructor(){this.target=null,this.cancellable=!1,this.defaultPrevented=!1,this.item=void 0,this.type=void 0}preventDefault(){this.cancellable&&(this.defaultPrevented=!0)}reset(e){this.defaultPrevented=!1,this.item=e}}class M{constructor(e,t,i,r,s){this.target=e,this.added=t,this.removed=i,this.start=r,this.deleteCount=s}}const C=new g.A(()=>new v,void 0,e=>{e.item=null,e.target=null,e.defaultPrevented=!1,e.cancellable=!1});function T(e){e&&"object"==typeof e&&"destroy"in e&&"function"==typeof e.destroy&&e.destroy()}function A(e){return e?e instanceof P?e.toArray():e.length?Array.prototype.slice.apply(e):[]:[]}function x(e){if(e?.length)return e[0]}function S(e,t,i,r){let s=Math.min(e.length-i,t.length-r),n=0;for(;n<s&&e[i+n]===t[r+n];)n++;return n}function w(e,t,i,r){t&&t.forEach((t,s,n)=>{e.push(t),w(e,i.call(r,t,s,n),i,r)})}const L=new Set,I=new Set,O=new Set,N=new Map;let Z=0,P=r=class extends l.nJ{static ofType(e){if(!e)return r;if(N.has(e))return N.get(e);let t=null;if("function"==typeof e)t=e.prototype.declaredClass;else if(e.base)t=e.base.prototype.declaredClass;else for(let i in e.typeMap){let r=e.typeMap[i].prototype.declaredClass;t?t+=` | ${r}`:t=r}let i=class extends r{};return(0,s.Cg)([(0,p.u)({Type:e,ensureType:"function"==typeof e?(0,c.dp)(e):(0,c.aq)(e)})],i.prototype,"itemType",void 0),i=(0,s.Cg)([(0,y.$)(`esri.core.Collection<${t}>`)],i),N.set(e,i),i}static isCollection(e){return null!=e&&e instanceof r}constructor(e){super(e),this._chgListeners=[],this._notifications=null,this._updating=!1,this._timer=null,this._observable=new _.I,this._length=0,this._items=[],Object.defineProperty(this,"uid",{value:Z++})}normalizeCtorArgs(e){return e?(0,o.yc)(e)||e instanceof r?{items:e}:e:{}}destroy(){this._removeAllRaw(),this._timer&&this._timer.remove(),super.destroy(),this._notifications=null}*[Symbol.iterator](){yield*this.items}get length(){return this._length}set length(e){e>this._length?u.A.getLogger(this).error("#length=","Cannot increase the length of the collection by assigning to the length property."):this.splice(e,Math.max(0,this._length-e))}get items(){return(0,f.gc)(this._observable),this._items}set items(e){this._emitBeforeChanges(1)||(this._splice(0,this.length,A(e)),this._emitAfterChanges(1))}hasEventListener(e){return!this.destroyed&&("change"===e?this._chgListeners.length>0:super.hasEventListener(e))}on(e,t){if(this.destroyed)return(0,a.hA)();if("change"===e){let e=this._chgListeners,i={removed:!1,callback:t};return e.push(i),this._notifications&&this._notifications.push({listeners:e.slice(),items:this._items.slice(),changes:[]}),(0,a.hA)(()=>{i.removed=!0,e.splice(e.indexOf(i),1)})}return super.on(e,t)}once(e,t){let i="deref"in t?()=>t.deref():()=>t,r=this.on(e,e=>{i()?.call(null,e),r.remove()});return r}add(e,t){if((0,f.gc)(this._observable),this._emitBeforeChanges(1))return this;let i=this.getNextIndex(t??null);return this._splice(i,0,[e]),this._emitAfterChanges(1),this}addMany(e,t=this._items.length){if((0,f.gc)(this._observable),!e?.length||this._emitBeforeChanges(1))return this;let i=this.getNextIndex(t);return this._splice(i,0,A(e)),this._emitAfterChanges(1),this}at(e){if((0,f.gc)(this._observable),(e=Math.trunc(e)||0)<0&&(e+=this.length),!(e<0||e>=this.length))return this._items[e]}removeAll(){if((0,f.gc)(this._observable),!this.length||this._emitBeforeChanges(2))return[];let e=this._removeAllRaw();return this._emitAfterChanges(2),e}_removeAllRaw(){return 0===this.length?[]:this._splice(0,this.length)||[]}clone(){return(0,f.gc)(this._observable),this._createNewInstance({items:this._items.map(h.o8)})}concat(...e){(0,f.gc)(this._observable);let t=e.map(A);return this._createNewInstance({items:this._items.concat(...t)})}drain(e,t){if((0,f.gc)(this._observable),!this.length||this._emitBeforeChanges(2))return;let i=this._splice(0,this.length),r=i.length;for(let s=0;s<r;s++)e.call(t,i[s],s,i);this._emitAfterChanges(2)}destroyAll(){this.drain(T)}destroyMany(e){let t=this.removeMany(e);return t.forEach(T),t}every(e,t){return(0,f.gc)(this._observable),this._items.every(e,t)}filter(e,t){(0,f.gc)(this._observable);let i=2===arguments.length?this._items.filter(e,t):this._items.filter(e);return this._createNewInstance({items:i})}find(e,t){return(0,f.gc)(this._observable),this._items.find(e,t)}findIndex(e,t){return(0,f.gc)(this._observable),this._items.findIndex(e,t)}findLast(e,t){return(0,f.gc)(this._observable),this._items.findLast(e,t)}findLastIndex(e,t){return(0,f.gc)(this._observable),this._items.findLastIndex(e,t)}flatten(e,t){(0,f.gc)(this._observable);let i=[];return w(i,this,e,t),new r(i)}forEach(e,t){return(0,f.gc)(this._observable),this._items.forEach(e,t)}getItemAt(e){return(0,f.gc)(this._observable),this._items[e]}getNextIndex(e){(0,f.gc)(this._observable);let t=this.length;return e??=t,e<0?e=0:e>t&&(e=t),e}includes(e,t=0){return(0,f.gc)(this._observable),this._items.includes(e,t)}indexOf(e,t=0){return(0,f.gc)(this._observable),this._items.indexOf(e,t)}join(e=","){return(0,f.gc)(this._observable),this._items.join(e)}lastIndexOf(e,t=this.length-1){return(0,f.gc)(this._observable),this._items.lastIndexOf(e,t)}map(e,t){(0,f.gc)(this._observable);let i=this._items.map(e,t);return new r({items:i})}reorder(e,t=this.length-1){(0,f.gc)(this._observable);let i=this.indexOf(e);if(-1!==i){if(t<0?t=0:t>=this.length&&(t=this.length-1),i!==t){if(this._emitBeforeChanges(4))return e;this._splice(i,1),this._splice(t,0,[e]),this._emitAfterChanges(4)}return e}}pop(){if((0,f.gc)(this._observable),!this.length||this._emitBeforeChanges(2))return;let e=x(this._splice(this.length-1,1));return this._emitAfterChanges(2),e}push(...e){return(0,f.gc)(this._observable),this._emitBeforeChanges(1)||(this._splice(this.length,0,e),this._emitAfterChanges(1)),this.length}reduce(e,t){(0,f.gc)(this._observable);let i=this._items;return 2===arguments.length?i.reduce(e,t):i.reduce(e)}reduceRight(e,t){(0,f.gc)(this._observable);let i=this._items;return 2===arguments.length?i.reduceRight(e,t):i.reduceRight(e)}remove(e){return(0,f.gc)(this._observable),this.removeAt(this.indexOf(e))}removeAt(e){if((0,f.gc)(this._observable),e<0||e>=this.length||this._emitBeforeChanges(2))return;let t=x(this._splice(e,1));return this._emitAfterChanges(2),t}removeMany(e){if((0,f.gc)(this._observable),!e?.length||this._emitBeforeChanges(2))return[];let t=e instanceof r?e.toArray():e,i=this._items,s=[],n=t.length;for(let e=0;e<n;e++){let r=t[e],n=i.indexOf(r);if(n>-1){let r=1+S(t,i,e+1,n+1),o=this._splice(n,r);o&&o.length>0&&s.push.apply(s,o),e+=r-1}}return this._emitAfterChanges(2),s}reverse(){if((0,f.gc)(this._observable),this._emitBeforeChanges(4))return this;let e=this._splice(0,this.length);return e&&(e.reverse(),this._splice(0,0,e)),this._emitAfterChanges(4),this}shift(){if((0,f.gc)(this._observable),!this.length||this._emitBeforeChanges(2))return;let e=x(this._splice(0,1));return this._emitAfterChanges(2),e}slice(e=0,t=this.length){return(0,f.gc)(this._observable),this._createNewInstance({items:this._items.slice(e,t)})}some(e,t){return(0,f.gc)(this._observable),this._items.some(e,t)}sort(e){if((0,f.gc)(this._observable),!this.length||this._emitBeforeChanges(4)||!this._requiresSort(e))return this;let t=this._splice(0,this.length);return arguments.length?t.sort(e):t.sort(),this._splice(0,0,t),this._emitAfterChanges(4),this}_requiresSort(e=(e,t)=>e===t?0:e<t?-1:1){let t=this.length-1;for(let i=0;i<t;i++)if(e(this.items[i],this.items[i+1])>0)return!0;return!1}splice(e,t,...i){(0,f.gc)(this._observable),1===arguments.length&&(t=this.length),t??=0;let r=(t?2:0)|!!i.length;if(this._emitBeforeChanges(r))return[];let s=this._splice(e,t,i)||[];return this._emitAfterChanges(r),s}toArray(){return(0,f.gc)(this._observable),this._items.slice()}toJSON(e){return(0,f.gc)(this._observable),this.toArray().map(t=>(0,b.W)(t)?t.toJSON(e):t)}toLocaleString(){return(0,f.gc)(this._observable),this._items.toLocaleString()}toString(){return(0,f.gc)(this._observable),this._items.toString()}unshift(...e){return(0,f.gc)(this._observable),!e.length||this._emitBeforeChanges(1)||(this._splice(0,0,e),this._emitAfterChanges(1)),this.length}_createNewInstance(e){return new this.constructor(e)}_splice(e,t,i){let r,s,n=this._items,o=this.itemType;if(!this._notifications&&this.hasEventListener("change")&&(this._notifications=[{listeners:this._chgListeners.slice(),items:this._items.slice(),changes:[]}],this._timer&&this._timer.remove(),this._updating=!0,this._timer=(0,m._)(()=>this._dispatchChange())),e<0&&(e+=this.length),t){if(s=n.splice(e,t),this.hasEventListener("before-remove")){let t=C.acquire();t.target=this,t.cancellable=!0;for(let i=0,o=s.length;i<o;i++)r=s[i],t.reset(r),this.emit("before-remove",t),t.defaultPrevented&&(s.splice(i,1),n.splice(e,0,r),e+=1,--i,--o);C.release(t)}if(this._length=this._items.length,this.hasEventListener("after-remove")){let e=C.acquire();e.target=this,e.cancellable=!1;let t=s.length;for(let i=0;i<t;i++)e.reset(s[i]),this.emit("after-remove",e);C.release(e)}}if(i?.length){if(o){let e=[];for(let t of i){let i=o.ensureType(t);(null!=i||null==t)&&e.push(i)}i=e}let t=this.hasEventListener("before-add"),r=this.hasEventListener("after-add"),s=e===this.length;if(t||r){let o=C.acquire();o.target=this,o.cancellable=!0;let l=C.acquire();l.target=this,l.cancellable=!1;for(let a of i)t?(o.reset(a),this.emit("before-add",o),o.defaultPrevented||(s?n.push(a):n.splice(e++,0,a),this._length=n.length,r&&(l.reset(a),this.emit("after-add",l)))):(s?n.push(a):n.splice(e++,0,a),this._length=n.length,l.reset(a),this.emit("after-add",l));C.release(l),C.release(o)}else{if(s)for(let e of i)n.push(e);else n.splice(e,0,...i);this._length=n.length}}if((i?.length||s?.length)&&this._notifyChangeEvent(i,s),this.hasEventListener("after-splice")){let r=new M(this,i,s,e,t);this.emit("after-splice",r)}return s}_emitBeforeChanges(e){let t=!1;if(this.hasEventListener("before-changes")){let i=C.acquire();i.target=this,i.cancellable=!0,i.type=e,this.emit("before-changes",i),t=i.defaultPrevented,C.release(i)}return t}_emitAfterChanges(e){if(this.hasEventListener("after-changes")){let t=C.acquire();t.target=this,t.cancellable=!1,t.type=e,this.emit("after-changes",t),C.release(t)}this._observable.notify()}_notifyChangeEvent(e,t){this.hasEventListener("change")&&this._notifications&&this._notifications[this._notifications.length-1].changes.push({added:e,removed:t})}get updating(){return this._updating}_dispatchChange(){if(this._timer&&=(this._timer.remove(),null),this._updating=!1,!this._notifications)return;let e=this._notifications;this._notifications=null;for(let t of e){let e=t.changes;L.clear(),I.clear(),O.clear();for(let{added:t,removed:i}of e){if(t)if(0===O.size&&0===I.size)for(let e of t)L.add(e);else for(let e of t)I.has(e)?(O.add(e),I.delete(e)):O.has(e)||L.add(e);if(i)if(0===O.size&&0===L.size)for(let e of i)I.add(e);else for(let e of i)L.has(e)?L.delete(e):(O.delete(e),I.add(e))}let i=n.A.acquire();L.forEach(e=>{i.push(e)});let r=n.A.acquire();I.forEach(e=>{r.push(e)});let s=this._items,o=t.items,l=n.A.acquire();if(O.forEach(e=>{o.indexOf(e)!==s.indexOf(e)&&l.push(e)}),t.listeners&&(i.length||r.length||l.length)){let e={target:this,added:i,removed:r,moved:l},s=t.listeners.length;for(let i=0;i<s;i++){let r=t.listeners[i];r.removed||r.callback.call(this,e)}}n.A.release(i),n.A.release(r),n.A.release(l)}L.clear(),I.clear(),O.clear()}};(0,s.Cg)([(0,d.MZ)()],P.prototype,"_updating",void 0),(0,s.Cg)([(0,d.MZ)()],P.prototype,"_length",void 0),(0,s.Cg)([(0,d.MZ)()],P.prototype,"length",null),(0,s.Cg)([(0,d.MZ)()],P.prototype,"items",null),(0,s.Cg)([(0,d.MZ)({readOnly:!0})],P.prototype,"updating",null),P=r=(0,s.Cg)([(0,y.$)("esri.core.Collection")],P);const R=P;i.d(t,["A",0,R])},69052(e,t,i){i.d(t,{hr:()=>s});var r=i(34727);class s{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,i=!1){return n(this.range,this.min,this.max,e,t,i)}clamp(e,t=0){return(0,r.qE)(e-t,this.min,this.max)+t}monotonic(e,t,i){return e<t?t:t+o(this.range,e-t,i)}minimalMonotonic(e,t,i){return n(this.range,e,e+this.range,t,i)}center(e,t,i){return t=this.monotonic(e,t,i),this.normalize((e+t)/2,i)}diff(e,t,i){return this.monotonic(e,t,i)-e}shortestSignedDiff(e,t){e=this.normalize(e);let i=(t=this.normalize(t))-e,r=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(i)<Math.abs(r)?i:r}contains(e,t,i){return t=this.minimalMonotonic(e,t),(i=this.minimalMonotonic(e,i))>e&&i<t}}function n(e,t,i,r,s=0,n=!1){return(r-=s)<t?r+=o(e,t-r):r>i&&(r-=o(e,r-i)),n&&r===i&&(r=t),r+s}function o(e,t,i=0){return Math.ceil((t-i)/e)*e+i}const l=new s(0,2*Math.PI),a=(new s(-Math.PI,Math.PI),new s(0,360));i.d(t,["ie",0,a,"uC",0,l])},4902(e,t,i){var r=i(32198),s=i(64108);let n=0;const o=e=>{let t=e,i=class extends t{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+n++})}};return i=(0,r.Cg)([(0,s.$)("esri.core.Identifiable")],i),i};o(class{}),i.d(t,["s",0,o])},7695(e,t,i){function r(e){return(t,i)=>{t[i]=e}}i.d(t,{u:()=>r})},18370(e,t,i){i.d(t,{z:()=>s});class r{constructor(e){this._import=e,this.module=null,this._promise=null}getImportPromise(){return this._promise??=this._import().then(async e=>(this.module=e,e)),this._promise}}function s(e){return new r(e)}},36708(e,t,i){i.d(t,{C_:()=>m,on:()=>g,wB:()=>a,z7:()=>h});var r=i(37955),s=i(36563),n=i(97768),o=i(17676),l=i(14012);function a(e,t,i={}){return u(e,t,i,c)}function h(e,t,i={}){return u(e,t,i,f)}function u(e,t,i={},r){let s=null,o=i.once?(e,i)=>{r(e)&&((0,n.xt)(s),t(e,i))}:(e,i)=>{r(e)&&t(e,i)};if(s=(0,l.Cn)(e,o,i.sync,i.equals),i.initial){let t=e();o(t,t)}return s}function g(e,t,i,o={}){let l=null,h=null,u=null;function g(){l&&h&&(h.remove(),o.onListenerRemove?.(l),l=null,h=null)}function m(e){o.once&&o.once&&(0,n.xt)(u),i(e)}let c=a(e,(e,i)=>{g(),(0,r.wb)(e)&&(l=e,h=(0,r.on)(e,t,m),o.onListenerAdd?.(e))},{sync:o.sync,initial:!0});return u=(0,s.hA)(()=>{c.remove(),g()}),u}function m(e,t){return function(e,t,i){if((0,o.G4)(i))return Promise.reject((0,o.NK)());let r=e();if(t?.(r))return Promise.resolve(r);let l=null;function a(){l=(0,n.xt)(l)}return new Promise((r,n)=>{l=(0,s.vE)([(0,o.u7)(i,()=>{a(),n((0,o.NK)())}),u(e,e=>{a(),r(e)},{sync:!1,once:!0},t??c)])})}(e,f,t)}function c(e){return!0}function f(e){return!!e}i(80559),i.d(t,["OH",0,{sync:!0},"Vh",0,{initial:!0},"pc",0,{sync:!0,initial:!0}])},52039(e,t,i){i.d(t,{O7:()=>m,el:()=>h});var r=i(69052),s=(i(49186),i(18370)),n=i(17676),o=(i(5443),i(39829)),l=(i(82799),i(16930)),a=(i(80754),i(21325));async function h(e,t,i){Array.isArray(e)||(e=[e]),"object"==typeof t&&t&&"authMode"in t&&(i=t);let r=null;for(let t of e)r??=t?.spatialReference;if(!r)return e;let s=(0,a.Vp)(r);if(!s)return e;if(1===e.length&&"extent"===e[0]?.type){let t=e[0].clone().normalizeAsSingleGeometry(s);return["xmin"in t?t:new o.A(t)]}let[l,h]=s.valid,m=!1;for(let t of e){if(!t)continue;if("point"===t.type){m||=t.x>=h,m||=t.x<=l;continue}let{extent:e}=t;if(null==e){m=!0;break}m||=e.xmin>=h,m||=e.xmin<=l,m||=e.xmax>=h,m||=e.xmax<=l}if(!m)return e;let[{foldInto360Range:c},f]=await(0,n.qr)(Promise.all([u.getImportPromise(),g.getImportPromise()]),i),d=f.fromSpatialReference(r);return e.map(e=>{if(null==e||"mesh"===e.type)return e;let t=f.fromGeometry(e),i=f.toGeometry(c(t,d),r);return"extent"===e.type&&1===i?.rings.length?i.extent:i})}const u=(0,s.z)(()=>i.e(4144).then(()=>i(4144)).then(e=>e.load().then(()=>e))),g=(0,s.z)(()=>Promise.all([i.e(9187),i.e(8885),i.e(9117),i.e(3299),i.e(1550)]).then(()=>i(78125)));function m(e,t,i){let r=(0,a.Vp)(i);if(null==r)return e;let[s,n]=r.valid,o=2*n,l=0,h=0;t>n?l=Math.ceil(Math.abs(t-n)/o):t<s&&(l=-Math.ceil(Math.abs(t-s)/o)),e>n?h=Math.ceil(Math.abs(e-n)/o):e<s&&(h=-Math.ceil(Math.abs(e-s)/o));let u=e+(l-h)*o,g=u-t;return g>n?u-=o:g<s&&(u+=o),u}function c(e){let t=(0,a.Vp)(e);if(null==t)return null;let[i,s]=t.valid;return new r.hr(i,s)}const f=c(l.A.WGS84);c(l.A.WebMercator),i.d(t,["Y_",0,f])},80754(e,t,i){i.d(t,{kS:()=>h,kd:()=>a});var r=i(82799),s=i(16930),n=i(60408),o=i(52006);const l={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new r.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:s.A.WebMercator}),minus180Line:new r.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:s.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new r.A({paths:[[[180,-180],[180,180]]],spatialReference:s.A.WGS84}),minus180Line:new r.A({paths:[[[-180,-180],[-180,180]]],spatialReference:s.A.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function h(e,t){if((0,o.Ed)(e))for(let i of function(e){return(0,n.Bi)(e)?e.curveRings:e.curvePaths}(e))for(let e of i){if((0,o.aO)(e)){let[i,r]=e.c;i[0]+=t,r[0]+=t;continue}if((0,o.FG)(e)){let[i,r]=e.a;i[0]+=t,r[0]+=t;continue}if((0,o.n1)(e)){let[i,r,s]=e.b;i[0]+=t,r[0]+=t,s[0]+=t;continue}e[0]+=t}for(let i of function(e){return(0,n.Bi)(e)?e.rings:e.paths}(e))for(let e of i)e[0]+=t;return e}i.d(t,["j7",0,l])},55156(e,t,i){i.d(t,{I:()=>s});const r=Symbol("idFieldsProviderSymbol");function s(e){return(t=e)&&r in t?e[r]:void 0;var t}i.d(t,["e",0,r])},97770(e,t,i){i.d(t,{Ey:()=>O,F8:()=>I,J2:()=>x,Yq:()=>w,_m:()=>S,iS:()=>L,wj:()=>N});var r=i(66552),s=i(73444),n=i(98623),o=i(34747);const l={dateStyle:void 0,year:void 0,month:void 0,day:void 0,weekday:void 0},a={timeStyle:void 0,hour12:void 0,hourCycle:void 0,hour:void 0,minute:void 0,second:void 0},h={timeZone:"UTC"},u={year:"numeric",month:"numeric",day:"numeric"},g={year:"numeric",month:"long",day:"numeric"},m={year:"numeric",month:"short",day:"numeric"},c={year:"numeric",month:"long",weekday:"long",day:"numeric"},f={hour:"numeric",minute:"numeric"},d={...f,second:"numeric"},p={hourCycle:"h23"},y={...f,...p},_={...d,...p},b={"short-date":u,"short-date-short-time":{...u,...f},"short-date-short-time-24":{...u,...y},"short-date-long-time":{...u,...d},"short-date-long-time-24":{...u,..._},"short-date-le":u,"short-date-le-short-time":{...u,...f},"short-date-le-short-time-24":{...u,...y},"short-date-le-long-time":{...u,...d},"short-date-le-long-time-24":{...u,..._},"long-month-day-year":g,"long-month-day-year-short-time":{...g,...f},"long-month-day-year-short-time-24":{...g,...y},"long-month-day-year-long-time":{...g,...d},"long-month-day-year-long-time-24":{...g,..._},"day-short-month-year":m,"day-short-month-year-short-time":{...m,...f},"day-short-month-year-short-time-24":{...m,...y},"day-short-month-year-long-time":{...m,...d},"day-short-month-year-long-time-24":{...m,..._},"long-date":c,"long-date-short-time":{...c,...f},"long-date-short-time-24":{...c,...y},"long-date-long-time":{...c,...d},"long-date-long-time-24":{...c,..._},"long-month-year":{month:"long",year:"numeric"},"short-month-year":{month:"short",year:"numeric"},year:{year:"numeric"},"short-time":f,"long-time":d},v=(0,r.O)()({shortDate:"short-date",shortDateShortTime:"short-date-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLongTime:"short-date-long-time",shortDateLongTime24:"short-date-long-time-24",shortDateLE:"short-date-le",shortDateLEShortTime:"short-date-le-short-time",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLELongTime:"short-date-le-long-time",shortDateLELongTime24:"short-date-le-long-time-24",longMonthDayYear:"long-month-day-year",longMonthDayYearShortTime:"long-month-day-year-short-time",longMonthDayYearShortTime24:"long-month-day-year-short-time-24",longMonthDayYearLongTime:"long-month-day-year-long-time",longMonthDayYearLongTime24:"long-month-day-year-long-time-24",dayShortMonthYear:"day-short-month-year",dayShortMonthYearShortTime:"day-short-month-year-short-time",dayShortMonthYearShortTime24:"day-short-month-year-short-time-24",dayShortMonthYearLongTime:"day-short-month-year-long-time",dayShortMonthYearLongTime24:"day-short-month-year-long-time-24",longDate:"long-date",longDateShortTime:"long-date-short-time",longDateShortTime24:"long-date-short-time-24",longDateLongTime:"long-date-long-time",longDateLongTime24:"long-date-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year",year:"year"}),M={ar:"ar-u-nu-latn-ca-gregory",nn:"no-NN"};function C(){let e=(0,s.lR)();return(e&&M[e])??(0,s.QC)()}"mart"!==new Intl.DateTimeFormat("bs",{month:"long"}).formatToParts(new Date(2025,2)).find(({type:e})=>"month"===e)?.value.toLowerCase()&&(M.bs="sr-Latn-CS");let T=new WeakMap;const A=b["short-date-short-time"];function x(e){return b[e]}function S(e){let{dateStyle:t,timeStyle:i,hour12:r,year:s,month:n}=e,o={};return t?o.dateStyle=t:s&&(o.year=s,o.month=n||void 0),i&&!o.year&&(o.timeStyle=i,o.hour12="auto"===r?void 0:"always"===r),o}function w(e,t=A){return function(e){let t=T.get(e);if(!t){let i=C(),r=N(e.timeZone??"system"),s={...e,timeZone:r};t=new Intl.DateTimeFormat(i,s),T.set(e,t)}return t}(t).format(e)}function L(e,t=A){return w(new Date(e),{...t,...h,...a})}function I(e,t=A){return w(new Date(`1970-01-01T${e}Z`),{...t,...h,...l})}function O(e,t=A){let i=o.c9.fromISO(e,{setZone:!0});if(!i.isValid)return e;if(t.timeZone)return w(i.toJSDate(),t);let r=0===i.offset?"UTC":t.timeZone,s={...t,timeZone:r};return i.toLocaleString(s,{locale:C()})}function N(e){switch(e){case"system":return n.N;case n.L:return"UTC";default:return e}}(0,s.Ml)(()=>{T=new WeakMap}),i.d(t,["_v",0,v])},54339(e,t,i){function r(e,t){switch(t.type){case"object-id":case"unique-id-simple":return e.attributes[t.fieldName];case"unique-id-composite":{let i=[];for(let r of t.fieldNames)i.push(e.attributes[r]??null);return JSON.stringify(i)}}}function s(e,t){if("uniqueIdFields"in t&&t.uniqueIdFields?.length){if(1===t.uniqueIdFields.length)return e.attributes?.[t.uniqueIdFields[0]];let i=t.uniqueIdFields.map(t=>e.attributes?.[t]);return JSON.stringify(i)}return"objectIdField"in t&&t.objectIdField?e.attributes?.[t.objectIdField]:null}i.d(t,{W:()=>r,r:()=>s})},73133(e,t,i){const r=(0,i(66552).O)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:"unknown"});i.d(t,["j",0,r])},22671(e,t,i){i.d(t,{A:()=>_});var r,s=i(32198),n=i(52106),o=i(66552),l=i(25482),a=i(4718),h=i(91429),u=i(16930),g=i(60408),m=i(65864),c=i(50498),f=i(20437),d=i(36005),p=i(43937);const y=new o.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let _=r=class extends l.o{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,n.A)}writeGeometryType(e,t,i,r){if(e)return void y.write(e,t,i,r);let{features:s}=this;if(s)for(let e of s)if(null!=e?.geometry)return void y.write(e.geometry.type,t,i,r)}readQueryGeometry(e,t){if(!e)return null;let i=!!e.spatialReference,r=(0,m.rS)(e);return r&&!i&&t.spatialReference&&(r.spatialReference=u.A.fromJSON(t.spatialReference)),r}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());let{features:i}=this;if(i)for(let e of i)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new r(this.cloneProperties())}cloneProperties(){return(0,a.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){let t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let i=0;i<t.features.length;i++){let r=t.features[i];r.geometry&&=(e?.[i])?.toJSON()||r.geometry}return t}quantize(e){let{scale:[t,i],translate:[r,s]}=e,n=this.features,o=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-r)/t),e=>Math.round((s-e)/i));for(let e=0,t=n.length;e<t;e++)o?.(n[e].geometry)||(n.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){let{geometryType:e,features:t,transform:i}=this;if(!i)return this;let{translate:[r,s],scale:[n,o]}=i,l=null,a=null;if(this.hasZ&&null!=i?.scale?.[2]){let{translate:[,,e],scale:[,,t]}=i;l=i=>i*t+e}if(this.hasM&&null!=i?.scale?.[3]){let{translate:[,,,e],scale:[,,,t]}=i;a=i=>null==i?i:i*t+e}let h=this._getHydrationFunction(e,e=>e*n+r,e=>s-e*o,l,a);for(let{geometry:e}of t)null!=e&&h&&h(e);return this.transform=null,this}readFeaturesWithClass(e,t,i){let r=u.A.fromJSON(t.spatialReference),s=[];for(let t=0;t<e.length;t++){let n=e[t],o=i.fromJSON(n),l=n.geometry?.spatialReference;null!=o.geometry&&!l&&(o.geometry.spatialReference=r);let a=n.aggregateGeometries,h=o.aggregateGeometries;if(a&&null!=h)for(let e in h){let t=h[e],i=a[e]?.spatialReference;null!=t&&!i&&(t.spatialReference=r)}s.push(o)}return s}_quantizePoints(e,t,i){let r,s,n=[];for(let o=0,l=e.length;o<l;o++){let l=e[o];if(o>0){let e=t(l[0]),o=i(l[1]);(e!==r||o!==s)&&(n.push([e-r,o-s]),r=e,s=o)}else r=t(l[0]),s=i(l[1]),n.push([r,s])}return n.length>0?n:null}_getQuantizationFunction(e,t,i){return"point"===e?e=>(e.x=t(e.x),e.y=i(e.y),e):"polyline"===e||"polygon"===e?e=>{let r=(0,g.Bi)(e)?e.rings:e.paths,s=[];for(let e=0,n=r.length;e<n;e++){let n=r[e],o=this._quantizePoints(n,t,i);o&&s.push(o)}return s.length>0?((0,g.Bi)(e)?e.rings=s:e.paths=s,e):null}:"multipoint"===e?e=>{let r=this._quantizePoints(e.points,t,i);return r&&r.length>0?(e.points=r,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,i,r,s){return"point"===e?e=>{e.x=t(e.x),e.y=i(e.y),r&&(e.z=r(e.z))}:"polyline"===e||"polygon"===e?e=>{let n,o,l=(0,g.Bi)(e)?e.rings:e.paths;for(let e=0,r=l.length;e<r;e++){let r=l[e];for(let e=0,s=r.length;e<s;e++){let s=r[e];e>0?(n+=s[0],o+=s[1]):(n=s[0],o=s[1]),s[0]=t(n),s[1]=i(o)}}if(r&&s)for(let e=0,t=l.length;e<t;e++){let t=l[e];for(let e=0,i=t.length;e<i;e++){let i=t[e];i[2]=r(i[2]),i[3]=s(i[3])}}else if(r)for(let e=0,t=l.length;e<t;e++){let t=l[e];for(let e=0,i=t.length;e<i;e++){let i=t[e];i[2]=r(i[2])}}else if(s)for(let e=0,t=l.length;e<t;e++){let t=l[e];for(let e=0,i=t.length;e<i;e++){let i=t[e];i[2]=s(i[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=i(e.ymin),e.xmax=t(e.xmax),e.ymax=i(e.ymax),r&&null!=e.zmax&&null!=e.zmin&&(e.zmax=r(e.zmax),e.zmin=r(e.zmin)),s&&null!=e.mmax&&null!=e.mmin&&(e.mmax=s(e.mmax),e.mmin=s(e.mmin))}:"multipoint"===e?e=>{let n,o,l=e.points;for(let e=0,r=l.length;e<r;e++){let r=l[e];e>0?(n+=r[0],o+=r[1]):(n=r[0],o=r[1]),r[0]=t(n),r[1]=i(o)}if(r&&s)for(let e=0,t=l.length;e<t;e++){let t=l[e];t[2]=r(t[2]),t[3]=s(t[3])}else if(r)for(let e=0,t=l.length;e<t;e++){let t=l[e];t[2]=r(t[2])}else if(s)for(let e=0,t=l.length;e<t;e++){let t=l[e];t[2]=s(t[2])}}:null}};(0,s.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],_.prototype,"displayFieldName",void 0),(0,s.Cg)([(0,h.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"exceededTransferLimit",void 0),(0,s.Cg)([(0,h.MZ)({type:[n.A],json:{write:!0}})],_.prototype,"features",void 0),(0,s.Cg)([(0,d.w)("features")],_.prototype,"readFeatures",null),(0,s.Cg)([(0,h.MZ)({type:[f.A],json:{write:!0}})],_.prototype,"fields",void 0),(0,s.Cg)([(0,h.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:y.read}}})],_.prototype,"geometryType",void 0),(0,s.Cg)([(0,p.K)("geometryType")],_.prototype,"writeGeometryType",null),(0,s.Cg)([(0,h.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"hasM",void 0),(0,s.Cg)([(0,h.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"hasZ",void 0),(0,s.Cg)([(0,h.MZ)({types:c.yR,json:{write:!0}})],_.prototype,"queryGeometry",void 0),(0,s.Cg)([(0,d.w)("queryGeometry")],_.prototype,"readQueryGeometry",null),(0,s.Cg)([(0,h.MZ)({type:u.A,json:{write:!0}})],_.prototype,"spatialReference",void 0),(0,s.Cg)([(0,p.K)("spatialReference")],_.prototype,"writeSpatialReference",null),(0,s.Cg)([(0,h.MZ)({json:{write:!0}})],_.prototype,"transform",void 0),_=r=(0,s.Cg)([(0,h.$K)("esri.rest.support.FeatureSet")],_),_.prototype.toJSON.isDefaultToJSON=!0}}]);