@arcgis/core 5.2.0-next.136 → 5.2.0-next.137

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 (57) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/468fa166608ffc9108d9.js +1 -0
  3. package/assets/esri/core/workers/chunks/{bb51cf52b8ea8283f4f8.js → 55ae00f33f5240a73a50.js} +1 -1
  4. package/assets/esri/core/workers/chunks/5fd099ca1024707387b2.js +1 -0
  5. package/assets/esri/core/workers/chunks/{5f4feca26102088ea565.js → 96c3900685cfb2a8ca12.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{06da3409992bb1fa85b0.js → a8b7e6198c2d0c37c9a0.js} +37 -29
  7. package/assets/esri/core/workers/chunks/{152fe3d6ad7aebbd23d1.js → d4f55e2b1ace7867a3b8.js} +1 -1
  8. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.en.json +1 -1
  9. package/chunks/GlobalIllumination.glsl.js +3 -3
  10. package/chunks/RibbonLine.glsl.js +1 -1
  11. package/config.js +1 -1
  12. package/editing/sharedTemplates/templateDefinitions/TemplateDefinitionBase.js +1 -1
  13. package/geometry/support/ellipseUtils.js +2 -0
  14. package/kernel.js +1 -1
  15. package/layers/orientedImagery/core/coverageUtils.js +1 -1
  16. package/layers/orientedImagery/queries.js +1 -1
  17. package/package.json +2 -2
  18. package/support/revision.js +1 -1
  19. package/support/tests/serviceMockDependencies.js +1 -1
  20. package/support/tests/setupServiceMocksMesh.js +1 -1
  21. package/symbols/cim/callouts/calloutAnalysisUtils.js +1 -1
  22. package/symbols/cim/callouts/effects/BackgroundCallout.js +1 -1
  23. package/symbols/cim/callouts/effects/BalloonCallout.js +1 -1
  24. package/symbols/cim/callouts/effects/PointSymbolCallout.js +1 -1
  25. package/symbols/cim/callouts/effects/calloutUtils.js +1 -1
  26. package/symbols/cim/cimAnalyzer.js +1 -1
  27. package/views/2d/engine/vectorTiles/decluttering/CollisionJob.js +1 -1
  28. package/views/2d/engine/vectorTiles/decluttering/SymbolFader.js +1 -1
  29. package/views/2d/engine/vectorTiles/decluttering/jobsUtil.js +1 -1
  30. package/views/2d/engine/webgl/collisions/LabelMetric.js +1 -1
  31. package/views/2d/engine/webgl/shaderGraph/techniques/markers/ComputedMarkerParams.js +1 -1
  32. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/CalloutMeshWriterPolicy.js +1 -1
  33. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/AFeatureShader.js +1 -1
  34. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
  35. package/views/2d/layers/features/layerAdapters/labelingUtils.js +1 -1
  36. package/views/2d/layers/features/schema/processor/LabelMatcherSchema.js +1 -1
  37. package/views/2d/layers/features/schema/processor/MatcherSchema.js +1 -1
  38. package/views/2d/layers/features/schema/processor/symbols/SymbolSchema.js +1 -1
  39. package/views/2d/layers/support/vectorTileDebugUtils.js +1 -1
  40. package/views/2d/layers/support/visualVariableSimpleUtils.js +1 -1
  41. package/views/3d/analysis/Viewshed/ViewshedObserverManipulatedObject3D.js +1 -1
  42. package/views/3d/analysis/Viewshed/ViewshedPlacementController.js +1 -1
  43. package/views/3d/input/handlers/ground/GroundNavigation.js +1 -1
  44. package/views/3d/interactive/editingTools/tooltipUtils3D.js +1 -1
  45. package/views/3d/state/controllers/GroundNavigationController.js +1 -1
  46. package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +14 -6
  47. package/views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js +5 -1
  48. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.glsl.js +1 -1
  49. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
  50. package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
  51. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  52. package/widgets/OrientedImageryViewer/components/OrientedImageryVideoViewModel.js +1 -1
  53. package/widgets/OrientedImageryViewer/support/VideoFeatureCache.js +2 -0
  54. package/widgets/OrientedImageryViewer.js +2 -2
  55. package/widgets/PanoramicViewer/PanoramicVideoViewerViewModel.js +1 -1
  56. package/assets/esri/core/workers/chunks/078dcd17f46403d44b24.js +0 -1
  57. package/assets/esri/core/workers/chunks/3ef367c9b7bf1588307d.js +0 -1
@@ -1 +1 @@
1
- {"title":"Oriented imagery viewer","currentFootprint":"Current footprint","accuracy":"Accuracy","accuracyInformation":"Accuracy is calculated using the Orientation Accuracy property defined in the oriented imagery layer's service.","additionalFootprints":"Additional footprints","additionalCameraLocations":"Additional camera locations","basemap":"Basemap","groundArea":"Ground area","groundDistance":"Ground distance","imageAttributes":"Image attributes","imageEnhancement":"Image enhancement","videoEnhancement":"Video enhancement","imageGallery":"Image gallery","float":"Float","dock":"Dock","footprint":"Footprint","heightAboveGround":"Height above ground","groundLocation":"Ground location","noImageError":"No image available for the selected location.","onLoadMessage":"Select a location on map to view imagery.","imageLoadError":"Error occurred while loading the image.","measurementTools":"Image measurement tools","measurementTable":"Measurement table","mapImageConversionTool":"Map-image location tool","brightness":"Brightness","contrast":"Contrast","sharpness":"Sharpness","navigationTool":"Navigation tool","noLocalPort":"A value for local port is not provided. Local port is required to load local images.","noAttachment":"No image or attachment available for the selected location.","noImageAtElevation":"No image available at the selected elevation.","currentFootprintTooltip":"Toggle visibility of the displayed image's footprint.","additionalFootprintsTooltip":"Toggle visibility of all additional footprints containing the location of interest.","additionalCameraLocationsTooltip":"Toggle visibility of all additional camera locations of images containing the location of interest.","navigationTooltip":"Explore returned images in relation to the location of interest.","imageEnhancementTooltip":"Adjust image brightness, contrast, and sharpening.","imageGalleryTooltip":"Explore thumbnails of all images depicting the location of interest.","mapImageConversionTooltip":"Click on the image to see where that location is on the map, and vice versa.","newMeasurement":"New measurement","unsupportedPanoramicImageryError":"Viewer currently does not support visualizing {datasetFormat} 360-degree imagery.","showPopups":"Show pop-ups","startMeasurement":"Start measuring","selectUnitSystem":"Select Unit System","overlayCameraLocations":"Overlay camera locations","overlayMapFeatures":"Overlay map features","imageOverlays":"Image overlays","invalidCameraHeadingWarningTitle":"Invalid CameraHeading","invalidCameraHeadingWarningDescription":"CameraHeading value is invalid for the selected image. All the oriented imagery viewer tools using CameraHeading value are disabled. Assign a valid value for the field in the attribute table to enable the tools.","createFeaturesFromImage":"Create features from image","showAllFeatures":"Show all features","showFeatures":"Show features from image","decimalDegrees":"Decimal degrees","value":"Value","xy":"XY","xyz":"XYZ (meters)","xyzFeet":"XYZ (feet)","x":"X","y":"Y","z":"Z","type":"Type","slope":"Slope","aspect":"Aspect","distance":"Distance","horizontal":"Horizontal","vertical":"Vertical","measurementViewerHeading":"Triangulated Measurement - Second View","triangularMeasurementHeading":"Triangulated Measurements","triangulatedDistanceHeading":"Triangulated Distance","triangulatedAreaHeading":"Triangulated Area","triangulatedLocationHeading":"Triangulated Location","configureImageNavigation":"Configure image navigation","configureNavigation":"Configure navigation","preserveHeading":"Preserve heading","preserveHeadingDescription":"Preserve the camera heading when navigating to the next image.","preservePitch":"Preserve pitch","preservePitchDescription":"Preserve the camera pitch when navigating to the next image.","boundingBoxSize":"Bounding box size","thresholdLabel":"Threshold (+/-) degrees","noActiveViewerFound":"No active viewer found. Please load an image to enable the viewer.","noImageLoaded":"No image loaded.","selectImageForNavigation":"Please select an image to navigate.","noLayerSelected":"No layer selected. Please select an oriented imagery layer to enable the viewer.","navigationError":"The following error occurred while navigating to the image: {error}.","imageNavigation":"Image navigation","imageNavigationDescription":"Select an option to navigate between images either sequentially or in any direction of the current image view.","sequentialNavigation":"Sequential navigation","sequentialNavigationDescription":"Navigate to the next image in the sequence.","directionalNavigation":"Directional navigation","directionalNavigationDescription":"Navigate to the next image in the relative direction of the current image view.","previous":"Previous","next":"Next","start":"Go to start","end":"Go to end","skipForward":"Skip forward","skipBackward":"Skip backward","Play":"Play","Pause":"Pause","mute":"Mute","unmute":"Unmute","featuresCapturedFromImage":"Display all features captured from the current image.","noFeatureFoundWithObjectId":"Cannot show the image associated as no feature found with the provided Object ID {objectId}.","depthImageNotSupportedTitle":"Unsupported Depth Image","depthImageNotSupportedDescription":"Only COG/MRF formats are supported for depth images.","sequentialNavigationWarning":"No image found in the sequence to navigate.","dataCaptureSave":"A new feature has been created.","dataCaptureDelete":"The feature has been deleted.","exploreImages":"Explore images","exploreImages3D":"Explore images 3D","utilityTools":"Utilities","graphicTools":"Graphic tools","searchTools":"Search tools","displayImages":"Display images","overlays":"Overlays","superimposeSettings":"Superimpose settings","superimposeSliderTitle":"Adjust Mesh Position","superimposeSliderTooltip":"Use the slider to move the mesh between the near and far distance ranges.","releaseCameraLock":"Release camera lock","enableCameraLock":"Enable camera lock","superimposeView":"Superimpose view","superimposeImageDescription":"Image in superimposed view"}
1
+ {"title":"Oriented imagery viewer","currentFootprint":"Current footprint","accuracy":"Accuracy","accuracyInformation":"Accuracy is calculated using the Orientation Accuracy property defined in the oriented imagery layer's service.","additionalFootprints":"Additional footprints","additionalCameraLocations":"Additional camera locations","basemap":"Basemap","groundArea":"Ground area","groundDistance":"Ground distance","imageAttributes":"Image attributes","imageEnhancement":"Image enhancement","videoEnhancement":"Video enhancement","imageGallery":"Image gallery","float":"Float","dock":"Dock","footprint":"Footprint","heightAboveGround":"Height above ground","groundLocation":"Ground location","noImageError":"No image available for the selected location.","onLoadMessage":"Select a location on map to view imagery.","imageLoadError":"Error occurred while loading the image.","measurementTools":"Image measurement tools","measurementTable":"Measurement table","mapImageConversionTool":"Map-image location tool","brightness":"Brightness","contrast":"Contrast","sharpness":"Sharpness","navigationTool":"Navigation tool","noLocalPort":"A value for local port is not provided. Local port is required to load local images.","noAttachment":"No image or attachment available for the selected location.","noImageAtElevation":"No image available at the selected elevation.","currentFootprintTooltip":"Toggle visibility of the displayed image's footprint.","additionalFootprintsTooltip":"Toggle visibility of all additional footprints containing the location of interest.","additionalCameraLocationsTooltip":"Toggle visibility of all additional camera locations of images containing the location of interest.","navigationTooltip":"Explore returned images in relation to the location of interest.","imageEnhancementTooltip":"Adjust image brightness, contrast, and sharpening.","imageGalleryTooltip":"Explore thumbnails of all images depicting the location of interest.","mapImageConversionTooltip":"Click on the image to see where that location is on the map, and vice versa.","newMeasurement":"New measurement","unsupportedPanoramicImageryError":"Viewer currently does not support visualizing {datasetFormat} 360-degree imagery.","showPopups":"Show pop-ups","startMeasurement":"Start measuring","selectUnitSystem":"Select Unit System","overlayCameraLocations":"Overlay camera locations","overlayMapFeatures":"Overlay map features","imageOverlays":"Image overlays","invalidCameraHeadingWarningTitle":"Invalid CameraHeading","invalidCameraHeadingWarningDescription":"CameraHeading value is invalid for the selected image. All the oriented imagery viewer tools using CameraHeading value are disabled. Assign a valid value for the field in the attribute table to enable the tools.","createFeaturesFromImage":"Create features from image","showAllFeatures":"Show all features","showFeatures":"Show features from image","decimalDegrees":"Decimal degrees","value":"Value","xy":"XY","xyz":"XYZ (meters)","xyzFeet":"XYZ (feet)","x":"X","y":"Y","z":"Z","type":"Type","slope":"Slope","aspect":"Aspect","distance":"Distance","horizontal":"Horizontal","vertical":"Vertical","measurementViewerHeading":"Triangulated Measurement - Second View","triangularMeasurementHeading":"Triangulated Measurements","triangulatedDistanceHeading":"Triangulated Distance","triangulatedAreaHeading":"Triangulated Area","triangulatedLocationHeading":"Triangulated Location","configureImageNavigation":"Configure image navigation","configureNavigation":"Configure navigation","preserveHeading":"Preserve heading","preserveHeadingDescription":"Preserve the camera heading when navigating to the next image.","preservePitch":"Preserve pitch","preservePitchDescription":"Preserve the camera pitch when navigating to the next image.","boundingBoxSize":"Bounding box size","thresholdLabel":"Threshold (+/-) degrees","noActiveViewerFound":"No active viewer found. Please load an image to enable the viewer.","noImageLoaded":"No image loaded.","selectImageForNavigation":"Please select an image to navigate.","noLayerSelected":"No layer selected. Please select an oriented imagery layer to enable the viewer.","navigationError":"The following error occurred while navigating to the image: {error}.","imageNavigation":"Image navigation","imageNavigationDescription":"Select an option to navigate between images either sequentially or in any direction of the current image view.","sequentialNavigation":"Sequential navigation","sequentialNavigationDescription":"Navigate to the next image in the sequence.","directionalNavigation":"Directional navigation","directionalNavigationDescription":"Navigate to the next image in the relative direction of the current image view.","previous":"Previous","next":"Next","start":"Go to start","end":"Go to end","skipForward":"Skip forward","skipBackward":"Skip backward","Play":"Play","Pause":"Pause","mute":"Mute","unmute":"Unmute","featuresCapturedFromImage":"Display all features captured from the current image.","noFeatureFoundWithObjectId":"Cannot show the image associated as no feature found with the provided Object ID {objectId}.","depthImageNotSupportedTitle":"Unsupported Depth Image","depthImageNotSupportedDescription":"Only COG/MRF formats are supported for depth images.","sequentialNavigationWarning":"No image found in the sequence to navigate.","dataCaptureSave":"A new feature has been created.","dataCaptureDelete":"The feature has been deleted.","exploreImages":"Explore images","exploreImages3D":"Explore images 3D","search3DFilters":"Configure search option","verticalRange":"Enable Vertical Search Range","frustumRange":"Enable Frustum Search Range","utilityTools":"Utilities","graphicTools":"Graphic tools","searchTools":"Search tools","displayImages":"Display images","overlays":"Overlays","superimposeSettings":"Superimpose settings","superimposeSliderTitle":"Adjust Mesh Position","superimposeSliderTooltip":"Use the slider to move the mesh between the near and far distance ranges.","releaseCameraLock":"Release camera lock","enableCameraLock":"Enable camera lock","superimposeView":"Superimpose view","superimposeImageDescription":"Image in superimposed view"}
@@ -1,5 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{ScreenSpacePass as e}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{ReadDepthLastFrame as t}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadDepthLastFrame.glsl.js";import{Gamma as n}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import{mainLightDirection as r}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{ScreenSpaceRayMarching as i}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ScreenSpaceRayMarching.glsl.js";import{CameraSpace as a}from"../views/3d/webgl-engine/core/shaderLibrary/util/CameraSpace.glsl.js";import{viewMatrix as o}from"../views/3d/webgl-engine/core/shaderLibrary/util/cameraUniforms.js";import{FloatBindUniform as s}from"../views/3d/webgl-engine/core/shaderModules/FloatBindUniform.js";import{FloatPassUniform as c}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as l,If as u}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Matrix4BindUniform as d}from"../views/3d/webgl-engine/core/shaderModules/Matrix4BindUniform.js";import{Texture2DBindUniform as f}from"../views/3d/webgl-engine/core/shaderModules/Texture2DBindUniform.js";import{Texture2DPassUniform as p}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{GlobalIlluminationColorQuantization as m}from"../views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationColorQuantization.glsl.js";import{floatBlendReductionFactor as h}from"../views/3d/webgl-engine/shaders/floatBlendScale.glsl.js";import{ToneMapping as g}from"../views/3d/webgl-engine/shaders/ToneMapping.glsl.js";import{ColorAttachment1 as _,SizedPixelFormat as v}from"../views/webgl/enums.js";import{NoParameters as y}from"../views/webgl/NoParameters.js";import{ShaderBuilder as b}from"../views/webgl/ShaderBuilder.js";const x=2.5,S=.15,C=25,w=.15,T=.5,E=1,D=1,O=16;class k extends y{constructor(){super(...arguments),this.projScale=1,this.resolutionScale=1,this.accumulatedFrames=0,this.temporalSampleFrame=0,this.rayMarchMinReach=w,this.rayMarchMaxReach=T,this.rayMarchWorldReach=25,this.rayMarchMinReachEmissionWeight=1,this.rayMarchMaxReachEmissionWeight=1,this.rayMarchMaxSteps=16,this.colorBleedWeight=S,this.highQualityIdleColorBlendStart=.3,this.emissionBoostFactor=x}}function A(y){let x=new b,S=x.fragment;x.include(e),x.include(a),S.include(t),S.include(n),S.include(m),S.include(g),x.include(i,y),S.uniforms.add(r,o,new p(`normalMap`,e=>e.normalTexture),new p(`depthMap`,e=>e.depthTexture),new p(`lastFrameGlobalIlluminationTexture`,(e,t)=>e.globalIllumination??t.globalIllumination?.getTexture()),new p(`lastFrameGlobalIlluminationWeightTexture`,(e,t)=>e.globalIlluminationWeights??t.globalIllumination?.getTexture(_)),new f(`lastFrameColorTexture`,e=>e.reprojection.lastFrameColor?.getTexture()),new f(`lastFrameDepthTexture`,e=>e.reprojection.lastFrameDepth?.attachment),new d(`reprojectionProjectionMatrix`,e=>e.reprojection.lastFrameCamera.projectionMatrix),new d(`reprojectionViewMatrix`,e=>e.reprojection.viewMatrix),new c(`accumulatedFrames`,e=>e.accumulatedFrames),new c(`temporalSampleFrame`,e=>e.temporalSampleFrame),new c(`resolutionScale`,e=>e.resolutionScale)),S.uniforms.add(new c(`rayMarchMinReach`,e=>e.rayMarchMinReach),new c(`rayMarchMaxReach`,e=>e.rayMarchMaxReach),new c(`rayMarchWorldReach`,e=>e.rayMarchWorldReach),new c(`rayMarchMinReachEmissionWeight`,e=>e.rayMarchMinReachEmissionWeight),new c(`rayMarchMaxReachEmissionWeight`,e=>e.rayMarchMaxReachEmissionWeight),new c(`rayMarchMaxSteps`,e=>e.rayMarchMaxSteps),new c(`colorBleedWeight`,e=>e.colorBleedWeight),new c(`highQualityIdleColorBlendStart`,e=>e.highQualityIdleColorBlendStart),new c(`emissionBoostFactor`,e=>e.emissionBoostFactor));let{hasEmission:C,hasColor:w}=y;return C&&(S.uniforms.add(new s(`inputScale`,e=>e.reprojection.lastFrameEmission?.getTexture()?.descriptor.internalFormat===v.RGBA8?h:1),new f(`lastFrameEmissionTexture`,e=>e.reprojection.lastFrameEmission?.getTexture())),S.code.add(l`bool hasHitReprojectionMismatch(vec3 hit, vec2 hitReprojectedCoordinate, float colorBlendWeight) {
2
+ import{ScreenSpacePass as e}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{ReadDepthLastFrame as t}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadDepthLastFrame.glsl.js";import{Gamma as n}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import{mainLightDirection as r}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{ScreenSpaceRayMarching as i}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ScreenSpaceRayMarching.glsl.js";import{CameraSpace as a}from"../views/3d/webgl-engine/core/shaderLibrary/util/CameraSpace.glsl.js";import{viewMatrix as o}from"../views/3d/webgl-engine/core/shaderLibrary/util/cameraUniforms.js";import{FloatBindUniform as s}from"../views/3d/webgl-engine/core/shaderModules/FloatBindUniform.js";import{FloatPassUniform as c}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as l,If as u}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Matrix4BindUniform as d}from"../views/3d/webgl-engine/core/shaderModules/Matrix4BindUniform.js";import{Texture2DBindUniform as f}from"../views/3d/webgl-engine/core/shaderModules/Texture2DBindUniform.js";import{Texture2DPassUniform as p}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{GlobalIlluminationColorQuantization as m}from"../views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationColorQuantization.glsl.js";import{floatBlendReductionFactor as h}from"../views/3d/webgl-engine/shaders/floatBlendScale.glsl.js";import{ToneMapping as g}from"../views/3d/webgl-engine/shaders/ToneMapping.glsl.js";import{ColorAttachment1 as _,SizedPixelFormat as v}from"../views/webgl/enums.js";import{NoParameters as y}from"../views/webgl/NoParameters.js";import{ShaderBuilder as b}from"../views/webgl/ShaderBuilder.js";const x=2.5,S=0,C=.8,w=25,T=.15,E=.5,D=1,O=1,k=16;class A extends y{constructor(){super(...arguments),this.projScale=1,this.resolutionScale=1,this.accumulatedFrames=0,this.temporalSampleFrame=0,this.glowBoost=0,this.rayMarchMinReach=T,this.rayMarchMaxReach=E,this.rayMarchWorldReach=25,this.rayMarchMinReachEmissionWeight=1,this.rayMarchMaxReachEmissionWeight=1,this.rayMarchMaxSteps=16,this.colorBleedWeight=0,this.highQualityIdleColorBlendStart=.3,this.emissionBoostFactor=x,this.factorDaylightDirectional=C}}function j(y){let x=new b,S=x.fragment;x.include(e),x.include(a),S.include(t),S.include(n),S.include(m),S.include(g),x.include(i,y),S.uniforms.add(r,o,new p(`normalMap`,e=>e.normalTexture),new p(`depthMap`,e=>e.depthTexture),new p(`lastFrameGlobalIlluminationTexture`,(e,t)=>e.globalIllumination??t.globalIllumination?.getTexture()),new p(`lastFrameGlobalIlluminationWeightTexture`,(e,t)=>e.globalIlluminationWeights??t.globalIllumination?.getTexture(_)),new f(`lastFrameColorTexture`,e=>e.reprojection.lastFrameColor?.getTexture()),new f(`lastFrameDepthTexture`,e=>e.reprojection.lastFrameDepth?.attachment),new d(`reprojectionProjectionMatrix`,e=>e.reprojection.lastFrameCamera.projectionMatrix),new d(`reprojectionViewMatrix`,e=>e.reprojection.viewMatrix),new c(`accumulatedFrames`,e=>e.accumulatedFrames),new c(`temporalSampleFrame`,e=>e.temporalSampleFrame),new c(`resolutionScale`,e=>e.resolutionScale)),S.uniforms.add(new c(`rayMarchMinReach`,e=>e.rayMarchMinReach),new c(`rayMarchMaxReach`,e=>e.rayMarchMaxReach),new c(`rayMarchWorldReach`,e=>e.rayMarchWorldReach),new c(`rayMarchMinReachEmissionWeight`,e=>e.rayMarchMinReachEmissionWeight),new c(`rayMarchMaxReachEmissionWeight`,e=>e.rayMarchMaxReachEmissionWeight),new c(`rayMarchMaxSteps`,e=>e.rayMarchMaxSteps),new c(`colorBleedWeight`,e=>e.colorBleedWeight),new c(`highQualityIdleColorBlendStart`,e=>e.highQualityIdleColorBlendStart),new c(`emissionBoostFactor`,e=>e.emissionBoostFactor+e.glowBoost),new c(`factorDaylightDirectional`,e=>e.factorDaylightDirectional));let{hasEmission:C,hasColor:w}=y;return C&&(S.uniforms.add(new s(`inputScale`,e=>e.reprojection.lastFrameEmission?.getTexture()?.descriptor.internalFormat===v.RGBA8?h:1),new f(`lastFrameEmissionTexture`,e=>e.reprojection.lastFrameEmission?.getTexture())),S.code.add(l`bool hasHitReprojectionMismatch(vec3 hit, vec2 hitReprojectedCoordinate, float colorBlendWeight) {
3
3
  if (colorBlendWeight != 1.0) {
4
4
  return false;
5
5
  }
@@ -207,7 +207,7 @@ return value * 2.0 - 1.0;
207
207
  vec4 viewMainLightDirection = view * vec4(mainLightDirection, 0.0);
208
208
  float skyModulation = pow(max(dot(rayDirection, viewMainLightDirection.xyz), 0.0), 3.0) * 5.5;
209
209
  float skyFacingWeight = clamp(3.5 * dot(viewMainLightDirection.xyz, normal), 0.0, 1.0);
210
- skyModulation = mix(1.0, skyModulation * 0.2 + 0.8, skyFacingWeight);
210
+ skyModulation = mix(1.0, skyModulation * (1.0 - factorDaylightDirectional) + factorDaylightDirectional, skyFacingWeight);
211
211
  fragGlobalIllumination.a += (1.0 - hitOpacity) * skyModulation * stepSize;
212
212
  }
213
213
  }
@@ -245,4 +245,4 @@ return value * 2.0 - 1.0;
245
245
  fragGlobalIllumination.a = mix(lastFrameGlobalIllumination.a + accumulationDither, fragGlobalIllumination.a, occlusionBlendWeight);
246
246
 
247
247
  fragWeight = vec2(occlusionBlendWeight, colorBlendWeight * storedColorBlendWeightScale);
248
- `),x}const j=Object.freeze(Object.defineProperty({__proto__:null,GlobalIlluminationPassParameters:k,build:A,defaultColorBleedWeight:S,defaultEmissionBoostFactor:x,defaultRayMarchMaxReach:T,defaultRayMarchMaxReachEmissionWeight:1,defaultRayMarchMaxSteps:16,defaultRayMarchMinReach:w,defaultRayMarchMinReachEmissionWeight:1,defaultRayMarchWorldReach:25},Symbol.toStringTag,{value:`Module`}));export{k as G,j as a,O as b,A as c,T as d,S as e,x as f,D as g,w as h,E as i,C as j};
248
+ `),x}const M=Object.freeze(Object.defineProperty({__proto__:null,GlobalIlluminationPassParameters:A,build:j,defaultColorBleedWeight:0,defaultEmissionBoostFactor:x,defaultFactorDaylightDirectional:C,defaultRayMarchMaxReach:E,defaultRayMarchMaxReachEmissionWeight:1,defaultRayMarchMaxSteps:16,defaultRayMarchMinReach:T,defaultRayMarchMinReachEmissionWeight:1,defaultRayMarchWorldReach:25},Symbol.toStringTag,{value:`Module`}));export{A as G,M as a,k as b,j as c,E as d,S as e,x as f,C as g,O as h,T as i,D as j,w as k};
@@ -424,7 +424,7 @@ if (capCoverage < alphaCutoff) {
424
424
  discard;
425
425
  }`),Y?P.main.add(S`
426
426
  vec2 stipplePosition = vec2(
427
- min(getStippleSDF() * 2.0 - 1.0, 0.0),
427
+ min(getStippleCapDistance(), 0.0),
428
428
  ${Z?S`lineDistance / lineWidth`:S`lineDistanceNorm`}
429
429
  );
430
430
  float stippleRadius = length(stipplePosition * lineWidth);
package/config.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"./core/has.js";import{deepMerge as e}from"./core/object.js";const t={apiKey:void 0,apiKeys:{scopes:[]},applicationName:``,applicationUrl:globalThis.location?.href,assetsPath:``,fontsUrl:`https://static.arcgis.com/fonts`,geometryServiceUrl:`https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer`,geoRSSServiceUrl:`https://utility.arcgis.com/sharing/rss`,kmlServiceUrl:`https://utility.arcgis.com/sharing/kml`,userPrivilegesApplied:!0,portalUrl:`https://www.arcgis.com`,respectPrefersReducedMotion:!0,routeServiceUrl:`https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World`,workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:[`arcgis.com`,`arcgisonline.com`,`esrikr.com`,`premiumservices.blackbridge.com`,`esripremium.accuweather.com`,`gbm.digitalglobe.com`,`firstlook.digitalglobe.com`,`msi.digitalglobe.com`],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:`high`,proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};globalThis.esriConfig&&(e(t,globalThis.esriConfig,!0),delete t.has),!t.assetsPath&&(t.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@5.2.0-next.136/assets`,t.defaultAssetsPath=t.assetsPath);export{t as default};
2
+ import"./core/has.js";import{deepMerge as e}from"./core/object.js";const t={apiKey:void 0,apiKeys:{scopes:[]},applicationName:``,applicationUrl:globalThis.location?.href,assetsPath:``,fontsUrl:`https://static.arcgis.com/fonts`,geometryServiceUrl:`https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer`,geoRSSServiceUrl:`https://utility.arcgis.com/sharing/rss`,kmlServiceUrl:`https://utility.arcgis.com/sharing/kml`,userPrivilegesApplied:!0,portalUrl:`https://www.arcgis.com`,respectPrefersReducedMotion:!0,routeServiceUrl:`https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World`,workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:[`arcgis.com`,`arcgisonline.com`,`esrikr.com`,`premiumservices.blackbridge.com`,`esripremium.accuweather.com`,`gbm.digitalglobe.com`,`firstlook.digitalglobe.com`,`msi.digitalglobe.com`],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:`high`,proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};globalThis.esriConfig&&(e(t,globalThis.esriConfig,!0),delete t.has),!t.assetsPath&&(t.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@5.2.0-next.137/assets`,t.defaultAssetsPath=t.assetsPath);export{t as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../core/Error.js";import{JSONSupport as n}from"../../../core/JSONSupport.js";import{LoadableMixin as r}from"../../../core/Loadable.js";import{EsriPromiseMixin as i}from"../../../core/Promise.js";import{property as a,subclass as o}from"../../../core/accessorSupport/decorators.js";import{getSharedTemplateProvider as s}from"../SharedTemplateProvider.js";import{SharedTemplateDefinitionRequiredPropsNotSetError as c}from"../support/sharedTemplateErrors.js";import{namedEditingToolGUIDDict as l}from"../support/toolNames.js";import{reader as u}from"../../../core/accessorSupport/decorators/reader.js";import{writer as d}from"../../../core/accessorSupport/decorators/writer.js";let f=class extends r(i(n)){constructor(){super(...arguments),this.excludedTools=[],this.featureService=null,this.makeSharedTemplateFromJSON=null,this.view=null}readExcludedTools(e){let t=e.map(e=>l.fromJSON(e));return Array.from(new Set(t))}writeExcludedTools(e,t){e?.length&&(t.excludedTools=e.map(e=>l.toJSON(e.toLowerCase())))}load(e){return this.addResolvingPromise(this._load(e)),Promise.resolve(this)}async _load(e){let n=this.allParts,{featureService:r,makeSharedTemplateFromJSON:i,view:a}=this;if(r==null||i==null||a==null)throw new c;for(let e of n)e.assertIsSupportedPart();let o=s(a,{makeSharedTemplateFromJSON:i}),l=n.filter(e=>e.template==null),u=await o.getTemplates({templateIds:l.map(e=>e.templateId),featureService:r,signal:e?.signal}),d=new Map(u.map(e=>[e.templateId,e]));for(let e of l){let n=d.get(e.templateId);if(n==null)throw new t(`internal:missing-template`,`Failed to retrieve template for template ID ${e.templateId}`);e.template=n}await Promise.all(n.map(t=>t.template?.load(e)))}};e([a({readOnly:!0})],f.prototype,`type`,void 0),e([a({constructOnly:!0})],f.prototype,`excludedTools`,void 0),e([u(`excludedTools`)],f.prototype,`readExcludedTools`,null),e([d(`excludedTools`)],f.prototype,`writeExcludedTools`,null),e([a()],f.prototype,`featureService`,void 0),e([a()],f.prototype,`makeSharedTemplateFromJSON`,void 0),e([a()],f.prototype,`view`,void 0),f=e([o(`esri.editing.sharedTemplates.templateDefinitions.TemplateDefinitionBase`)],f);export{f as TemplateDefinitionBase};
2
+ import{__decorate as e}from"tslib";import t from"../../../core/Error.js";import{JSONSupport as n}from"../../../core/JSONSupport.js";import{LoadableMixin as r}from"../../../core/Loadable.js";import{EsriPromiseMixin as i}from"../../../core/Promise.js";import{property as a,subclass as o}from"../../../core/accessorSupport/decorators.js";import{getSharedTemplateProvider as s}from"../SharedTemplateProvider.js";import{SharedTemplateDefinitionRequiredPropsNotSetError as c}from"../support/sharedTemplateErrors.js";import{namedEditingToolGUIDDict as l}from"../support/toolNames.js";import{reader as u}from"../../../core/accessorSupport/decorators/reader.js";import{writer as d}from"../../../core/accessorSupport/decorators/writer.js";let f=class extends r(i(n)){constructor(){super(...arguments),this.excludedTools=[],this.featureService=null,this.makeSharedTemplateFromJSON=null,this.view=null}readExcludedTools(e){let t=e.map(e=>l.fromJSON(e.toLowerCase()));return Array.from(new Set(t))}writeExcludedTools(e,t){e?.length&&(t.excludedTools=e.map(e=>l.toJSON(e.toLowerCase())))}load(e){return this.addResolvingPromise(this._load(e)),Promise.resolve(this)}async _load(e){let n=this.allParts,{featureService:r,makeSharedTemplateFromJSON:i,view:a}=this;if(r==null||i==null||a==null)throw new c;for(let e of n)e.assertIsSupportedPart();let o=s(a,{makeSharedTemplateFromJSON:i}),l=n.filter(e=>e.template==null),u=await o.getTemplates({templateIds:l.map(e=>e.templateId),featureService:r,signal:e?.signal}),d=new Map(u.map(e=>[e.templateId,e]));for(let e of l){let n=d.get(e.templateId);if(n==null)throw new t(`internal:missing-template`,`Failed to retrieve template for template ID ${e.templateId}`);e.template=n}await Promise.all(n.map(t=>t.template?.load(e)))}};e([a({readOnly:!0})],f.prototype,`type`,void 0),e([a({constructOnly:!0})],f.prototype,`excludedTools`,void 0),e([u(`excludedTools`)],f.prototype,`readExcludedTools`,null),e([d(`excludedTools`)],f.prototype,`writeExcludedTools`,null),e([a()],f.prototype,`featureService`,void 0),e([a()],f.prototype,`makeSharedTemplateFromJSON`,void 0),e([a()],f.prototype,`view`,void 0),f=e([o(`esri.editing.sharedTemplates.templateDefinitions.TemplateDefinitionBase`)],f);export{f as TemplateDefinitionBase};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ function e(e,t){let n=.5*(e.xmin+e.xmax),r=.5*(e.ymin+e.ymax),i=.5*(e.xmax-e.xmin),a=.5*(e.ymax-e.ymin),o=1/Math.sqrt(t.x*t.x/(i*i)+t.y*t.y/(a*a));return{x:n+t.x*o,y:r+t.y*o}}function t(e,t,n){let r=.5*(e.xmin+e.xmax),i=.5*(e.ymin+e.ymax),a=.5*(e.xmax-e.xmin),o=.5*(e.ymax-e.ymin),s=t.x-r,c=t.y-i,l=n.x-t.x,u=n.y-t.y,d=l*l/(a*a)+u*u/(o*o),f=2*(s*l/(a*a)+c*u/(o*o)),p=s*s/(a*a)+c*c/(o*o)-1,m=Math.max(f*f-4*d*p,0),h=(-f-Math.sqrt(m))/(2*d),g=(-f+Math.sqrt(m))/(2*d),_=h>=0&&h<=1?h:g;return{x:t.x+l*_,y:t.y+u*_}}export{e as intersectEllipseDirection,t as intersectEllipseSegment};
package/kernel.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import has from"./core/has.js";import{addQueryParameter as e}from"./core/urlUtils.js";export{buildDate,revision}from"./support/revision.js";Symbol.dispose??=Symbol(`Symbol.dispose`),Symbol.asyncDispose??=Symbol(`Symbol.asyncDispose`);const t=`5.2`;let n=`5.2`;n=`5.2.0-next.136`;let r;function i(e){r=e}function a(t){let n=r?.findCredential(t);return n?.token?e(t,`token`,n.token):t}has(`host-webworker`)||globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),has(`host-webworker`);export{a as addTokenParameter,n as fullVersion,r as id,i as setId,t as version};
2
+ import has from"./core/has.js";import{addQueryParameter as e}from"./core/urlUtils.js";export{buildDate,revision}from"./support/revision.js";Symbol.dispose??=Symbol(`Symbol.dispose`),Symbol.asyncDispose??=Symbol(`Symbol.asyncDispose`);const t=`5.2`;let n=`5.2`;n=`5.2.0-next.137`;let r;function i(e){r=e}function a(t){let n=r?.findCredential(t);return n?.token?e(t,`token`,n.token):t}has(`host-webworker`)||globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),has(`host-webworker`);export{a as addTokenParameter,n as fullVersion,r as id,i as setId,t as version};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{throwIfAborted as e}from"../../../core/promiseUtils.js";import{create as t}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{zeros as n}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{transpose as r}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{sub as i,add as a}from"../../../core/libs/gl-matrix-2/math/vec3.js";import o from"../../../geometry/Circle.js";import s from"../../../geometry/Mesh.js";import c from"../../../geometry/Multipoint.js";import l from"../../../geometry/Polygon.js";import{projectAsync as u}from"../../../geometry/projectionUtils.js";import d from"../../../geometry/SpatialReference.js";import{polygonCentroidPoint as f}from"../../../geometry/support/centroid.js";import{earth as p}from"../../../geometry/support/Ellipsoid.js";import m from"../../../geometry/support/MeshComponent.js";import{createSphere as h}from"../../../geometry/support/meshUtils.js";import g from"../../../geometry/support/MeshVertexAttributes.js";import{create as _,fromArray as v,intersectRay as y}from"../../../geometry/support/plane.js";import{isWebMercator as b}from"../../../geometry/support/spatialReferenceUtils.js";import{convertToSRUnits as x,getWebMercatorScalingFactor as S,createRotationMatrixFromHPR as C,transformMat3 as w,scaleAndAddWithFactor as T,scaleWithFactor as E,computeHFOVAndVFOV as D,projectiveTransform as O}from"../transformations/utils.js";const k=Math.PI/180;function A(e,t,n){let r=x(e,t.spatialReference);return r.cameraHeight=(t.z??r.cameraHeight)-n,e.isSpherical?F(r,t):j(r,t)}function j(e,t){let{horizontalFieldOfView:n,verticalFieldOfView:r,cameraHeading:i}=e,a=S(t.y,t.spatialReference),o=e.cameraPitch,s=e.cameraRoll??0,c=150;n>150&&(o=90,s=0,c=5);let u=Math.ceil(n/c),d=M(u,i,n),f=e.farDistance?e.farDistance*a:e.cameraHeight*a/Math.cos(o*k);e.cameraPitch+r/2>=90&&(f=(e.farDistance||20)*a);let p=new l({spatialReference:t?.spatialReference});p.imageID=e.objectId;let m=null;for(let i of d)m=N(i,o,e.cameraHeight,t,f,a,r,n,u,p,s,e.nearDistance);return m.imageID=e.objectId,{polygon:p,frustum:m}}function M(e,t,n){let r=[];if(e%2==0)for(let i=0;i<e/2;i++)r.push(t-n/e*(i+.5),t+n/e*(i+.5));else{r.push(t);for(let i=1;i<e/2;i++)r.push(t-n/e*i,t+n/e*i)}return r.sort(),r}function N(e,o,s,c,l,u,d,f,p,m,h=0,g=0){let _=r(t(),C([e,o,h??0])),v=R({cameraHeight:s,cameraPitch:o,farDistance:l,location:c,horizontalFieldOfView:f,nearDistance:g,verticalFieldOfView:d},_),y=w([0,0,-1],_),{x:b,y:x}=c,S=T([b,x,c.z??s],y,l,u),D=2*Math.tan(d*k/2)*l,O=2*Math.tan(f/p*k/2)*l,A=w([0,1,0],_),j=w([1,0,0],_),M=E(A,D/2,u),N=E(j,O/2,u),F=i(n(),M,N),I=a(n(),M,N),L=P([a(n(),S,F),a(n(),S,I),i(n(),S,F),i(n(),S,I)],s,c,u);return L.push(L[0]),m.addRing(L),v}function P(e,t,n,r){return e.map(e=>z(e,t,n,r))}function F(e,t){let{farDistance:n,objectId:r,nearDistance:i,cameraHeight:a}=e,s=S(t.y,t.spatialReference),c=new o({center:t.clone(),radius:n*s});if(c.imageID=r,i){let e=new o({center:t.clone(),radius:i*s});c.addRing(e.rings[0])}let l=t.clone();l.z=(t.z??a)-n*s;let u=h(l,{size:2*n*s});return u.imageID=r,{polygon:c,frustum:u}}function I(e,t){return e.contains(t)}function L(e,t){return Math.sign(e)!==Math.sign(t)}function R(e,t,r){let{cameraHeight:o,cameraPitch:c,farDistance:l,location:u,horizontalFieldOfView:d,nearDistance:f,verticalFieldOfView:p}=e,m=u.z??o,h=m-o,_=V(u),v=!(c+p/2>=90),y=2*Math.tan(p*k/2)*f,b=2*Math.tan(d*k/2)*f,x=2*Math.tan(p*k/2)*l,S=2*Math.tan(d*k/2)*l,C,D=[0,0,-1];D=w(D,t),C=T([u.x,u.y,m],D,l,_),v&&(C[2]=h);let O=T([u.x,u.y,m],D,f,_),A=[0,1,0];A=w(A,t);let j=[1,0,0];j=w(j,t);let M=[],N=[];f?(N=[{faces:[4,0,3,4,7,3]},{faces:[5,1,2,5,6,2]},{faces:[4,0,1,4,5,1]},{faces:[6,2,3,6,7,3]}],M=M.concat(a(n(),O,i(n(),E(A,y/2,_),E(j,b/2,_)))),M=M.concat(a(n(),O,a(n(),E(A,y/2,_),E(j,b/2,_)))),M=M.concat(i(n(),O,i(n(),E(A,y/2,_),E(j,b/2,_)))),M=M.concat(i(n(),O,a(n(),E(A,y/2,_),E(j,b/2,_))))):(M=[u.x,u.y,m],N=[{faces:[0,1,2,0,2,3,0,3,4,0,4,1]}]),M=M.concat(a(n(),C,i(n(),E(A,x/2,_),E(j,S/2,_)))),M=M.concat(a(n(),C,a(n(),E(A,x/2,_),E(j,S/2,_)))),M=M.concat(i(n(),C,i(n(),E(A,x/2,_),E(j,S/2,_)))),M=M.concat(i(n(),C,a(n(),E(A,x/2,_),E(j,S/2,_))));let P=new g({position:Float64Array.from(M)});return new s({vertexAttributes:P,components:N,spatialReference:u.spatialReference})}function z(e,t,r,a){{let o=r.z??t,s=o-t,c=Math.sqrt((e[2]-o)**2+(Math.sqrt((e[0]-r.x)**2+(e[1]-r.y)**2)/a)**2)*a,l=E(i(n(),[e[0],e[1],e[2]],[r.x,r.y,o]),1/c,1/a),u=t/(o-e[2]),d={x:(1-u)*r.x+u*e[0],y:(1-u)*r.y+u*e[1],z:(1-u)*o+u*e[2]},f=Math.sqrt((d.z-o)**2+(Math.sqrt((d.x-r.x)**2+(d.y-r.y)**2)/a)**2)*a,p=E(i(n(),[d.x,d.y,d.z],[r.x,r.y,o]),1/f,1/a);return L(l[0],p[0])&&L(l[1],p[1])&&L(l[2],p[2])||e[2]>=s?[e[0],e[1],s]:[d.x,d.y,d.z]}}function B(e){let{spatialReference:t,x:n,y:r}=e.geometry,{cameraHeading:i,cameraPitch:a,farDistance:o,nearDistance:s}=e,c=V(e.geometry),u=new l({spatialReference:t}),d=Math.abs(1.44*o*c),f=Math.abs(1.44*s*c);(a<20||i==null)&&(f=d);let p=[];return p[0]={x:n+d*Math.sin((i-45)*k),y:r+d*Math.cos((i-45)*k)},p[1]={x:n+d*Math.sin((i+45)*k),y:r+d*Math.cos((i+45)*k)},p[2]={x:n+f*Math.sin((i+135)*k),y:r+f*Math.cos((i+135)*k)},p[3]={x:n+f*Math.sin((i+225)*k),y:r+f*Math.cos((i+225)*k)},u.addRing([[p[0].x,p[0].y,0],[p[1].x,p[1].y,0],[p[2].x,p[2].y,0],[p[3].x,p[3].y,0],[p[0].x,p[0].y,0]]),u}function V(e){return e&&b(e?.spatialReference)?1/Math.cos(Math.PI/2-2*Math.atan(Math.exp(-1*e.y/p.radius))):1}function H(e,t){let r=1+t/100;if(e.declaredClass===`esri.geometry.Circle`){let{radius:t,center:n}=e,i=t*r,a=new o({radius:i,center:n});return e.rings.length>1&&a.addRing(e.rings[1]),a}if(e.declaredClass===`esri.geometry.Polygon`){let t=new l({spatialReference:e.spatialReference}),a=f(e);if(a){let o=[];for(let t=0;t<e.rings[0].length;t++){let s=Math.sqrt((a.x-e.rings[0][t][0])**2+(a.y-e.rings[0][t][1])**2),c=E(i(n(),[e.rings[0][t][0],e.rings[0][t][1],0],[a.x,a.y,0]),1/s,1),l=T([a.x,a.y,0],c,s*r,1);o.push({x:l[0],y:l[1]})}t.addRing([[o[0].x,o[0].y,0],[o[1].x,o[1].y,0],[o[2].x,o[2].y,0],[o[3].x,o[3].y,0],[o[0].x,o[0].y,0]])}return t}return e}async function U(e,t,n){let{cameraHeight:r,cameraLocation:i,cameraPitch:a,frustumVertices:o,horizontalFieldOfView:s,imageHeight:c,imageWidth:l,inSRS:u,outSRS:f,verticalFieldOfView:p,cameraRoll:m,options:h}=n,g=new d(u),_=new d(f),v=D(s,p,m??0),y=o.length>15;return a+v.vfov/2>=90?await ee(o,e,l,c,g,_,y,h):await W(o,e,t,i,r,y,g,_,h)}async function W(e,t,n,r,i,a,o,c,l){let u=G(e,t,n,r,i);if(!u)return;let{farPlane:d,nearPlane:f}=u,p=await J([...f?.vertexPositions??e.slice(0,3),...d.vertexPositions],o,c,l),m=$(p);return new s({vertexAttributes:new g({position:p}),components:Q(a?X(m,!0):Z(m,!0)),spatialReference:c})}function G(e,t,n,r,i){let a=Y(e),o=Y(e,`near`);if(!a)return;let s=t.length;for(let e=0;e<s;e++){let t=Array.from(n[e]),s=[t[0]-r[0],t[1]-r[1],t[2]-(r[2]??i)];q(r,s,e,o),K(r,s,e,a)}return{farPlane:a,nearPlane:o}}function K(e,t,r,i){let{coefficients:a,vertexPositions:o}=i,s=n();y(a,{origin:e,direction:t},s)&&o.splice(r*3,3,...s)}function q(e,t,r,i){if(!i)return;let a=n();y(i.coefficients,{origin:e,direction:t},a)&&i.vertexPositions.splice(r*3,3,...a)}async function ee(e,t,n,r,i,a,o,c){let l=o?[]:[e[0],e[1],e[2]],u,d=[];for(let i of t)o?(u=O([i[0],i[1],1],[[0,0,1],[n,0,1],[n,r,1],[0,r,1]],[[e[0],e[1],e[2]],[e[3],e[4],e[5]],[e[6],e[7],e[8]],[e[9],e[10],e[11]]]),l=l.concat(...u),u=O([i[0],i[1],1],[[0,0,1],[n,0,1],[n,r,1],[0,r,1]],[[e[12],e[13],e[14]],[e[15],e[16],e[17]],[e[18],e[19],e[20]],[e[21],e[22],e[23]]]),d=d.concat(...u)):(u=O([i[0],i[1],1],[[0,0,1],[n,0,1],[n,r,1],[0,r,1]],[[e[3],e[4],e[5]],[e[6],e[7],e[8]],[e[9],e[10],e[11]],[e[12],e[13],e[14]]]),l=l.concat(...u));l=l.concat(d);let f=await J(l,i,a,c),p=$(f);return new s({vertexAttributes:new g({position:f}),components:Q(o?X(p,!0):Z(p,!0)),spatialReference:a})}async function J(t,n,r,i){if(n.equals(r))return t;let a=t.reduce((e,t,n)=>{let r=Math.floor(n/3);return e[r]||(e[r]=[]),e[r].push(t),e},[]),{points:o}=await u(new c({points:a,spatialReference:n}),r,i);return e(i),o.flat()}function Y(e,t=`far`){let n=_(),r;switch(t){case`far`:if(r=Array.from(e.length===15?e.slice(3):e.slice(12)),v(n,r,!1))return{coefficients:n,vertexPositions:r};break;case`near`:return r=Array.from(e.slice(0,12)),e.length===15||!v(n,r,!1)?void 0:{coefficients:n,vertexPositions:r}}}const X=(e,t=!1)=>{if(t&&e-2<=4||e<=4||e%2!=0)throw Error(`Invalid number of vertices`);let n=[],r=e/2,i=Math.round((t?e-2:e)/2);for(let a=0;a<i;a++){let i=a+r,o=t?i+1:i,s=o%e,c=(t?i:o+1)%e;n.push({faces:new Uint32Array([a,c,s,a,a+1,s])})}return n};function Z(e,t=!1){if(e<3||t&&e-1<3)throw Error(`Invalid number of vertices`);let n=[],r=t?e-2:e-1;for(let e=0;e<r;e++)n.push({faces:new Uint32Array([0,e+1,e+2])});return n}const Q=e=>e.map(e=>new m(e)),$=e=>e.length/3;export{I as checkIfPolygonContainsSelectedPoint,B as computePolygonForInspection,A as createCoveragePolygon,P as limitZToGround,J as projectVertices,H as resizePolygon,U as updateFrustum};
2
+ import{deg2rad as e}from"../../../core/mathUtils.js";import{throwIfAborted as t}from"../../../core/promiseUtils.js";import{create as n}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{zeros as r}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{transpose as i}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{sub as a,add as o,length as s,dot as c}from"../../../core/libs/gl-matrix-2/math/vec3.js";import l from"../../../geometry/Circle.js";import u from"../../../geometry/Mesh.js";import d from"../../../geometry/Multipoint.js";import f from"../../../geometry/Polygon.js";import{projectAsync as p}from"../../../geometry/projectionUtils.js";import m from"../../../geometry/SpatialReference.js";import{polygonCentroidPoint as h}from"../../../geometry/support/centroid.js";import{earth as g}from"../../../geometry/support/Ellipsoid.js";import _ from"../../../geometry/support/MeshComponent.js";import{createSphere as v}from"../../../geometry/support/meshUtils.js";import y from"../../../geometry/support/MeshVertexAttributes.js";import{create as b,fromArray as x,intersectRay as S}from"../../../geometry/support/plane.js";import{isWebMercator as C}from"../../../geometry/support/spatialReferenceUtils.js";import{getMetersPerUnitOfSR as w}from"./utils.js";import{convertToSRUnits as T,getWebMercatorScalingFactor as E,createRotationMatrixFromHPR as D,transformMat3 as O,scaleAndAddWithFactor as k,scaleWithFactor as A,computeHFOVAndVFOV as j,projectiveTransform as M}from"../transformations/utils.js";const N=Math.PI/180;function P(e,t,n){let r=T(e,t.spatialReference);return r.cameraHeight=(t.z??r.cameraHeight)-n,e.isSpherical?z(r,t):F(r,t)}function F(e,t){let{horizontalFieldOfView:n,verticalFieldOfView:r,cameraHeading:i}=e,a=E(t.y,t.spatialReference),o=e.cameraPitch,s=e.cameraRoll??0,c=150;n>150&&(o=90,s=0,c=5);let l=Math.ceil(n/c),u=I(l,i,n),d=K(e)*a,p=new f({spatialReference:t?.spatialReference});p.imageID=e.objectId;let m=null;for(let i of u)m=L(i,o,e.cameraHeight,t,d,a,r,n,l,p,s,e.nearDistance);return m.imageID=e.objectId,{polygon:p,frustum:m}}function I(e,t,n){let r=[];if(e%2==0)for(let i=0;i<e/2;i++)r.push(t-n/e*(i+.5),t+n/e*(i+.5));else{r.push(t);for(let i=1;i<e/2;i++)r.push(t-n/e*i,t+n/e*i)}return r.sort(),r}function L(e,t,s,c,l,u,d,f,p,m,h=0,g=0){let _=i(n(),D([e,t,h??0])),v=U({cameraHeight:s,cameraPitch:t,farDistance:l,location:c,horizontalFieldOfView:f,nearDistance:g,verticalFieldOfView:d},_),y=O([0,0,-1],_),{x:b,y:x}=c,S=k([b,x,c.z??s],y,l,u),C=2*Math.tan(d*N/2)*l,w=2*Math.tan(f/p*N/2)*l,T=O([0,1,0],_),E=O([1,0,0],_),j=A(T,C/2,u),M=A(E,w/2,u),P=a(r(),j,M),F=o(r(),j,M),I=R([o(r(),S,P),o(r(),S,F),a(r(),S,P),a(r(),S,F)],s,c,u);return I.push(I[0]),m.addRing(I),v}function R(e,t,n,r){return e.map(e=>W(e,t,n,r))}function z(e,t){let{farDistance:n,objectId:r,nearDistance:i,cameraHeight:a}=e,o=E(t.y,t.spatialReference),s=new l({center:t.clone(),radius:n*o});if(s.imageID=r,i){let e=new l({center:t.clone(),radius:i*o});s.addRing(e.rings[0])}let c=t.clone();c.z=(t.z??a)-n*o;let u=v(c,{size:2*n*o});return u.imageID=r,{polygon:s,frustum:u}}function B(e,t){return e.contains(t)}function V(e,t){let r=T(e,e.location.spatialReference);if(t.z==null)return!1;let{horizontalFieldOfView:a,location:o,nearDistance:l=0,verticalFieldOfView:u}=r,d=K(r);if(a==null||u==null||d<=0)return!1;let f=E(o.y,o.spatialReference),p=o.z??0,m=[(t.x-o.x)/f,(t.y-o.y)/f,t.z-p];if(r.isSpherical){let e=s(m);return l<=e&&e<=d}let h=i(n(),D([r.cameraHeading,r.cameraPitch,r.cameraRoll??0])),g=O([0,0,-1],h),_=c(m,g);return _>0&&_>=l&&_<=d}function H(e,t){return Math.sign(e)!==Math.sign(t)}function U(e,t,n){let{cameraHeight:i,cameraPitch:s,farDistance:c,location:l,horizontalFieldOfView:d,nearDistance:f,verticalFieldOfView:p}=e,m=l.z??i,h=m-i,g=q(l),_=!(s+p/2>=90),v=2*Math.tan(p*N/2)*f,b=2*Math.tan(d*N/2)*f,x=2*Math.tan(p*N/2)*c,S=2*Math.tan(d*N/2)*c,C,w=[0,0,-1];w=O(w,t),C=k([l.x,l.y,m],w,c,g),_&&(C[2]=h);let T=k([l.x,l.y,m],w,f,g),E=[0,1,0];E=O(E,t);let D=[1,0,0];D=O(D,t);let j=[],M=[];f?(M=[{faces:[4,0,3,4,7,3]},{faces:[5,1,2,5,6,2]},{faces:[4,0,1,4,5,1]},{faces:[6,2,3,6,7,3]}],j=j.concat(o(r(),T,a(r(),A(E,v/2,g),A(D,b/2,g)))),j=j.concat(o(r(),T,o(r(),A(E,v/2,g),A(D,b/2,g)))),j=j.concat(a(r(),T,a(r(),A(E,v/2,g),A(D,b/2,g)))),j=j.concat(a(r(),T,o(r(),A(E,v/2,g),A(D,b/2,g))))):(j=[l.x,l.y,m],M=[{faces:[0,1,2,0,2,3,0,3,4,0,4,1]}]),j=j.concat(o(r(),C,a(r(),A(E,x/2,g),A(D,S/2,g)))),j=j.concat(o(r(),C,o(r(),A(E,x/2,g),A(D,S/2,g)))),j=j.concat(a(r(),C,a(r(),A(E,x/2,g),A(D,S/2,g)))),j=j.concat(a(r(),C,o(r(),A(E,x/2,g),A(D,S/2,g))));let P=new y({position:Float64Array.from(j)});return new u({vertexAttributes:P,components:M,spatialReference:l.spatialReference})}function W(e,t,n,i){{let o=n.z??t,s=o-t,c=Math.sqrt((e[2]-o)**2+(Math.sqrt((e[0]-n.x)**2+(e[1]-n.y)**2)/i)**2)*i,l=A(a(r(),[e[0],e[1],e[2]],[n.x,n.y,o]),1/c,1/i),u=t/(o-e[2]),d={x:(1-u)*n.x+u*e[0],y:(1-u)*n.y+u*e[1],z:(1-u)*o+u*e[2]},f=Math.sqrt((d.z-o)**2+(Math.sqrt((d.x-n.x)**2+(d.y-n.y)**2)/i)**2)*i,p=A(a(r(),[d.x,d.y,d.z],[n.x,n.y,o]),1/f,1/i);return H(l[0],p[0])&&H(l[1],p[1])&&H(l[2],p[2])||e[2]>=s?[e[0],e[1],s]:[d.x,d.y,d.z]}}function G(e){let{spatialReference:t,x:n,y:r}=e.geometry,{cameraHeading:i,cameraPitch:a,farDistance:o,nearDistance:s}=e,c=q(e.geometry),l=new f({spatialReference:t}),u=Math.abs(1.44*o*c),d=Math.abs(1.44*s*c);(a<20||i==null)&&(d=u);let p=[];return p[0]={x:n+u*Math.sin((i-45)*N),y:r+u*Math.cos((i-45)*N)},p[1]={x:n+u*Math.sin((i+45)*N),y:r+u*Math.cos((i+45)*N)},p[2]={x:n+d*Math.sin((i+135)*N),y:r+d*Math.cos((i+135)*N)},p[3]={x:n+d*Math.sin((i+225)*N),y:r+d*Math.cos((i+225)*N)},l.addRing([[p[0].x,p[0].y,0],[p[1].x,p[1].y,0],[p[2].x,p[2].y,0],[p[3].x,p[3].y,0],[p[0].x,p[0].y,0]]),l}function K(t){let{cameraHeight:n,cameraPitch:r,farDistance:i,location:a,verticalFieldOfView:o}=t;return i??(r+o/2>=90?20/w(a.spatialReference):n/Math.cos(e(r)))}function q(e){return e&&C(e?.spatialReference)?1/Math.cos(Math.PI/2-2*Math.atan(Math.exp(-1*e.y/g.radius))):1}function ee(e,t){let n=1+t/100;if(e.declaredClass===`esri.geometry.Circle`){let{radius:t,center:r}=e,i=t*n,a=new l({radius:i,center:r});return e.rings.length>1&&a.addRing(e.rings[1]),a}if(e.declaredClass===`esri.geometry.Polygon`){let t=new f({spatialReference:e.spatialReference}),i=h(e);if(i){let o=[];for(let t=0;t<e.rings[0].length;t++){let s=Math.sqrt((i.x-e.rings[0][t][0])**2+(i.y-e.rings[0][t][1])**2),c=A(a(r(),[e.rings[0][t][0],e.rings[0][t][1],0],[i.x,i.y,0]),1/s,1),l=k([i.x,i.y,0],c,s*n,1);o.push({x:l[0],y:l[1]})}t.addRing([[o[0].x,o[0].y,0],[o[1].x,o[1].y,0],[o[2].x,o[2].y,0],[o[3].x,o[3].y,0],[o[0].x,o[0].y,0]])}return t}return e}async function te(e,t,n){let{cameraHeight:r,cameraLocation:i,cameraPitch:a,frustumVertices:o,horizontalFieldOfView:s,imageHeight:c,imageWidth:l,inSRS:u,outSRS:d,verticalFieldOfView:f,cameraRoll:p,options:h}=n,g=new m(u),_=new m(d),v=j(s,f,p??0),y=o.length>15;return a+v.vfov/2>=90?await oe(o,e,l,c,g,_,y,h):await ne(o,e,t,i,r,y,g,_,h)}async function ne(e,t,n,r,i,a,o,s,c){let l=re(e,t,n,r,i);if(!l)return;let{farPlane:d,nearPlane:f}=l,p=await J([...f?.vertexPositions??e.slice(0,3),...d.vertexPositions],o,s,c),m=$(p);return new u({vertexAttributes:new y({position:p}),components:Q(a?X(m,!0):Z(m,!0)),spatialReference:s})}function re(e,t,n,r,i){let a=Y(e),o=Y(e,`near`);if(!a)return;let s=t.length;for(let e=0;e<s;e++){let t=Array.from(n[e]),s=[t[0]-r[0],t[1]-r[1],t[2]-(r[2]??i)];ae(r,s,e,o),ie(r,s,e,a)}return{farPlane:a,nearPlane:o}}function ie(e,t,n,i){let{coefficients:a,vertexPositions:o}=i,s=r();S(a,{origin:e,direction:t},s)&&o.splice(n*3,3,...s)}function ae(e,t,n,i){if(!i)return;let a=r();S(i.coefficients,{origin:e,direction:t},a)&&i.vertexPositions.splice(n*3,3,...a)}async function oe(e,t,n,r,i,a,o,s){let c=o?[]:[e[0],e[1],e[2]],l,d=[];for(let i of t)o?(l=M([i[0],i[1],1],[[0,0,1],[n,0,1],[n,r,1],[0,r,1]],[[e[0],e[1],e[2]],[e[3],e[4],e[5]],[e[6],e[7],e[8]],[e[9],e[10],e[11]]]),c=c.concat(...l),l=M([i[0],i[1],1],[[0,0,1],[n,0,1],[n,r,1],[0,r,1]],[[e[12],e[13],e[14]],[e[15],e[16],e[17]],[e[18],e[19],e[20]],[e[21],e[22],e[23]]]),d=d.concat(...l)):(l=M([i[0],i[1],1],[[0,0,1],[n,0,1],[n,r,1],[0,r,1]],[[e[3],e[4],e[5]],[e[6],e[7],e[8]],[e[9],e[10],e[11]],[e[12],e[13],e[14]]]),c=c.concat(...l));c=c.concat(d);let f=await J(c,i,a,s),p=$(f);return new u({vertexAttributes:new y({position:f}),components:Q(o?X(p,!0):Z(p,!0)),spatialReference:a})}async function J(e,n,r,i){if(n.equals(r))return e;let a=e.reduce((e,t,n)=>{let r=Math.floor(n/3);return e[r]||(e[r]=[]),e[r].push(t),e},[]),{points:o}=await p(new d({points:a,spatialReference:n}),r,i);return t(i),o.flat()}function Y(e,t=`far`){let n=b(),r;switch(t){case`far`:if(r=Array.from(e.length===15?e.slice(3):e.slice(12)),x(n,r,!1))return{coefficients:n,vertexPositions:r};break;case`near`:return r=Array.from(e.slice(0,12)),e.length===15||!x(n,r,!1)?void 0:{coefficients:n,vertexPositions:r}}}const X=(e,t=!1)=>{if(t&&e-2<=4||e<=4||e%2!=0)throw Error(`Invalid number of vertices`);let n=[],r=e/2,i=Math.round((t?e-2:e)/2);for(let a=0;a<i;a++){let i=a+r,o=t?i+1:i,s=o%e,c=(t?i:o+1)%e;n.push({faces:new Uint32Array([a,c,s,a,a+1,s])})}return n};function Z(e,t=!1){if(e<3||t&&e-1<3)throw Error(`Invalid number of vertices`);let n=[],r=t?e-2:e-1;for(let e=0;e<r;e++)n.push({faces:new Uint32Array([0,e+1,e+2])});return n}const Q=e=>e.map(e=>new _(e)),$=e=>e.length/3;export{V as checkIfFrustumContainsSelectedPoint,B as checkIfPolygonContainsSelectedPoint,G as computePolygonForInspection,P as createCoveragePolygon,R as limitZToGround,J as projectVertices,ee as resizePolygon,te as updateFrustum};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import e from"../../core/Error.js";import{throwIfAborted as t}from"../../core/promiseUtils.js";import n from"../../geometry/SpatialReference.js";import{isPoint as r}from"../../geometry/support/typeUtils.js";import i from"../OrientedImageryLayer.js";import a from"./core/ExposurePoint.js";import{convertGeographicToWebMercator as o}from"./core/utils.js";import s from"../../rest/support/Query.js";import{createExtentAroundPoint as c}from"../../widgets/OrientedImageryViewer/navigation/utils.js";const l={};async function u(e,n){let{point:r,queryParams:i}=e;d(r,i);let a=h(e.layerInstanceOrURL);await a.load(n);let o=f(a,r,i),s=await a.queryFeatures(o,n);return t(n),m(a)(s)}function d(t,n){if(!r(t)&&n?.geometry==null)throw new e(`invalid-parameters`,`searchImages requires a point and query parameters to be provided.`);return!0}function f(e,t,r){let i=t?o(t):null,a=r?.maximumDistance??e.maximumDistance??1e3,l=r?.geometry??(i?c(i,a):null),u=r?.timeExtent??e.timeExtent??null;return new s({outSpatialReference:r?.outSpatialReference??e.spatialReference.isGeographic?n.WebMercator:e.spatialReference,returnGeometry:r?.returnGeometry??!0,outFields:r?.outFields??[`*`],geometry:l,where:r?.where??`1=1`,returnZ:e.hasZ,orderByFields:r?.orderByFields,maxRecordCountFactor:r?.maxRecordCountFactor??5,timeExtent:u})}async function p(e,t){let n=new s;n.where=`1=1`,n.outFields=[`*`],n.orderByFields=[`OffsetFromStart ASC`],n.outSpatialReference=t,n.returnGeometry=!0;let r=await e.queryFeatures(n);return m(e)(r)}function m(e){return t=>(t.features.forEach(t=>{let n=a.fromJSON({...t.toJSON(),layer:e});n&&(t.attributes=n)}),t)}function h(e){return typeof e==`string`?(l.layer?.url!==e&&(l.layer?.destroy(),l.layer=new i({url:e})),l.layer):e}export{p as getSortedLayerFeatures,u as searchImages};
2
+ import e from"../../core/Error.js";import{throwIfAborted as t}from"../../core/promiseUtils.js";import n from"../../geometry/SpatialReference.js";import{isPoint as r}from"../../geometry/support/typeUtils.js";import i from"../OrientedImageryLayer.js";import a from"./core/ExposurePoint.js";import{convertGeographicToWebMercator as o}from"./core/utils.js";import s from"../../rest/support/Query.js";import{createExtentAroundPoint as c}from"../../widgets/OrientedImageryViewer/navigation/utils.js";const l={};async function u(e,n){let{point:r,queryParams:i}=e;d(r,i);let a=g(e.layerInstanceOrURL);await a.load(n);let o=f(a,r,i),s=await a.queryFeatures(o,n);return t(n),h(a)(s)}function d(t,n){if(!r(t)&&n?.geometry==null)throw new e(`invalid-parameters`,`searchImages requires a point and query parameters to be provided.`);return!0}function f(e,t,r){let i=t?o(t):null,a=r?.maximumDistance??e.maximumDistance??1e3,l=r?.geometry??(i?c(i,a):null),u=r?.timeExtent??e.timeExtent??null;return new s({outSpatialReference:r?.outSpatialReference??e.spatialReference.isGeographic?n.WebMercator:e.spatialReference,returnGeometry:r?.returnGeometry??!0,outFields:r?.outFields??[`*`],geometry:l,where:r?.where??`1=1`,returnZ:e.hasZ,orderByFields:r?.orderByFields,maxRecordCountFactor:r?.maxRecordCountFactor??5,timeExtent:u})}async function p(e){let t=new s;t.where=`1=1`,t.outFields=[e.objectIdField,`OffsetFromStart`],t.orderByFields=[`OffsetFromStart ASC`],t.returnGeometry=!1;let n=await e.queryFeatures(t),r=[];return n.features.forEach(t=>{let n=t.attributes?.[e.objectIdField],i=Number(m(t.attributes,`OffsetFromStart`));n!=null&&Number.isFinite(i)&&r.push({objectId:n,offsetFromStart:i})}),r}function m(e,t){if(!e)return;let n=t.toLowerCase();for(let t in e)if(t.toLowerCase()===n)return e[t]}function h(e){return t=>(t.features.forEach(t=>{let n=a.fromJSON({...t.toJSON(),layer:e});n&&(t.attributes=n)}),t)}function g(e){return typeof e==`string`?(l.layer?.url!==e&&(l.layer?.destroy(),l.layer=new i({url:e})),l.layer):e}export{p as getSortedLayerFeatureIndex,u as searchImages};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/core",
3
- "version": "5.2.0-next.136",
3
+ "version": "5.2.0-next.137",
4
4
  "description": "ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API",
5
5
  "keywords": [
6
6
  "ArcGIS",
@@ -20,7 +20,7 @@
20
20
  "license": "SEE LICENSE IN LICENSE.md",
21
21
  "dependencies": {
22
22
  "@amcharts/amcharts5": "~5.20.8",
23
- "@arcgis/toolkit": "5.2.0-next.136",
23
+ "@arcgis/toolkit": "5.2.0-next.137",
24
24
  "@esri/arcgis-html-sanitizer": "~4.2.0-next.2",
25
25
  "@esri/calcite-components": "^5.2.0-next.80",
26
26
  "@vaadin/grid": "~25.3.2",
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- const e=`20261006`,t=`1c11b4912d4ee56a33b2b2309a5b90e4d2c36151`;export{e as buildDate,t as revision};
2
+ const e=`20261007`,t=`b41bbe471c6611da705fcb4b85be7edabfb35f5b`;export{e as buildDate,t as revision};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{parseWhereClause as e}from"../../core/sql.js";import{load as t,project as n}from"../../geometry/projectionUtils.js";import r from"../../geometry/SpatialReference.js";import{containsExecute as i}from"../../geometry/operators/containsOperator.js";import{crossesExecute as a}from"../../geometry/operators/crossesOperator.js";import{generalizeExecute as o}from"../../geometry/operators/generalizeOperator.js";import{intersectsExecute as s,intersectsAccelerateGeometry as c}from"../../geometry/operators/intersectsOperator.js";import{overlapsExecute as l}from"../../geometry/operators/overlapsOperator.js";import{touchesExecute as u}from"../../geometry/operators/touchesOperator.js";import{withinExecute as d}from"../../geometry/operators/withinOperator.js";import{getGeometryExtent as f}from"../../geometry/support/extentUtils.js";import{fromJSON as p}from"../../geometry/support/jsonUtils.js";import{quantizeGeometry as m}from"../../geometry/support/quantizationUtils.js";import{isGeographic as h,equals as g}from"../../geometry/support/spatialReferenceUtils.js";import{densifyCurvedGeometry as _}from"../../geometry/support/curves/densifyCurvedGeometry.js";import v from"../../layers/support/FieldsIndex.js";function y(){let y=new WeakMap,b=new WeakMap;function x(e,t){let n=y.get(e);if(n)return n;let i=p(e);return i.spatialReference=t instanceof r?t:r.fromJSON(t),y.set(e,i),c(i),i}function S(e,t,n){return!e||g(t,n)?e:C(e,t,n)?.toJSON()}function C(e,t,i){if(!e)return;let a=b.get(e);if(a&&g(a.spatialReference,i))return a.geometry;let o=!g(t,i),s=o?n(x(e,t),r.fromJSON(i),{zConversionDisabled:!0}):x(e,t);return o&&c(s),b.set(e,{spatialReference:i,geometry:s}),s}function w(e,t,n,r){return{aGeometry:x(e,t),bGeometry:C(n,r,t)}}return{sql:{async createTestFeature(t,n){let r=await e(t,new v(n));return e=>r.testFeature(e)}},projection:{load:t,project:S},geometry:{isGeographic:h,quantize(e,t){return m(e,t)},operations:{intersects(e,t,n,r){let{aGeometry:i,bGeometry:a}=w(e,t,n,r);return s(i,a)},contains(e,t,n,r){let{aGeometry:a,bGeometry:o}=w(e,t,n,r);return i(a,o)},overlaps(e,t,n,r){let{aGeometry:i,bGeometry:a}=w(e,t,n,r);return l(i,a)},crosses(e,t,n,r){let{aGeometry:i,bGeometry:o}=w(e,t,n,r);return a(i,o)},touches(e,t,n,r){let{aGeometry:i,bGeometry:a}=w(e,t,n,r);return u(i,a)},within(e,t,n,r){let{aGeometry:i,bGeometry:a}=w(e,t,n,r);return d(i,a)},generalize(e,t,n,r){return o(x(e,t),n,{removeDegenerateParts:r})?.toJSON()},densifyCurves(e){return _(e)}},extentFromGeometry:e=>f(e),extentFromGLB:async(e,t,n,r)=>{let{extentFromGLB:i}=await import(`./setupServiceMocksMesh.js`);return i(e,t,n,r)},nodeDataFromGLB:async(e,t,n,r)=>{let{nodeDataFromGLB:i}=await import(`./setupServiceMocksMesh.js`);return i(e,t,n,r)}}}}export{y as getServiceMockDependencies};
2
+ import{parseWhereClause as e}from"../../core/sql.js";import{load as t,project as n}from"../../geometry/projectionUtils.js";import r from"../../geometry/SpatialReference.js";import{containsExecute as i}from"../../geometry/operators/containsOperator.js";import{crossesExecute as a}from"../../geometry/operators/crossesOperator.js";import{generalizeExecute as o}from"../../geometry/operators/generalizeOperator.js";import{intersectsExecute as s,intersectsAccelerateGeometry as c}from"../../geometry/operators/intersectsOperator.js";import{overlapsExecute as l}from"../../geometry/operators/overlapsOperator.js";import{touchesExecute as u}from"../../geometry/operators/touchesOperator.js";import{withinExecute as d}from"../../geometry/operators/withinOperator.js";import{getGeometryExtent as f}from"../../geometry/support/extentUtils.js";import{fromJSON as p}from"../../geometry/support/jsonUtils.js";import{quantizeGeometry as m}from"../../geometry/support/quantizationUtils.js";import{isGeographic as h,equals as g}from"../../geometry/support/spatialReferenceUtils.js";import{densifyCurvedGeometry as _}from"../../geometry/support/curves/densifyCurvedGeometry.js";import v from"../../layers/support/FieldsIndex.js";function y(){let y=new WeakMap,b=new WeakMap;function x(e,t){let n=y.get(e);if(n)return n;let i=p(e);return i.spatialReference=t instanceof r?t:r.fromJSON(t),y.set(e,i),c(i),i}function S(e,t,n){return!e||g(t,n)?e:C(e,t,n)?.toJSON()}function C(e,t,i){if(!e)return;let a=b.get(e);if(a&&g(a.spatialReference,i))return a.geometry;let o=!g(t,i),s=o?n(x(e,t),r.fromJSON(i),{zConversionDisabled:!0}):x(e,t);return o&&c(s),b.set(e,{spatialReference:i,geometry:s}),s}function w(e,t,n,r){return{aGeometry:x(e,t),bGeometry:C(n,r,t)}}return{sql:{async createTestFeature(t,n){let r=await e(t,new v(n));return e=>r.testFeature(e)}},projection:{load:t,project:S},geometry:{isGeographic:h,quantize(e,t){return m(e,t)},operations:{intersects(e,t,n,r){let{aGeometry:i,bGeometry:a}=w(e,t,n,r);return s(i,a)},contains(e,t,n,r){let{aGeometry:a,bGeometry:o}=w(e,t,n,r);return i(a,o)},overlaps(e,t,n,r){let{aGeometry:i,bGeometry:a}=w(e,t,n,r);return l(i,a)},crosses(e,t,n,r){let{aGeometry:i,bGeometry:o}=w(e,t,n,r);return a(i,o)},touches(e,t,n,r){let{aGeometry:i,bGeometry:a}=w(e,t,n,r);return u(i,a)},within(e,t,n,r){let{aGeometry:i,bGeometry:a}=w(e,t,n,r);return d(i,a)},generalize(e,t,n,r){return o(x(e,t),n,{removeDegenerateParts:r})?.toJSON()},densifyCurves(e){return _(e)}},extentFromGeometry:e=>f(e),extentFromGLB:async(e,t,n)=>{let{extentFromGLB:r}=await import(`./setupServiceMocksMesh.js`);return r(e,t,n)},nodeDataFromGLB:async(e,t,n)=>{let{nodeDataFromGLB:r}=await import(`./setupServiceMocksMesh.js`);return r(e,t,n)}}}}export{y as getServiceMockDependencies};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import e from"../../geometry/Point.js";import t from"../../geometry/support/MeshMaterialMetallicRoughness.js";import n from"../../geometry/support/MeshTransform.js";import{createFromGLTF as r}from"../../geometry/support/meshUtils.js";import{loadImage as i}from"../../request/loadImage.js";import{meshMakeAbsolute as a}from"./meshUtils.js";import{isEncodedMeshTexture as o}from"../../views/3d/glTF/internal/resourceUtils.js";async function s(t,i,a,o){let s=URL.createObjectURL(new Blob([t]));try{let t=e.fromJSON(i),a=await r(t,s,{vertexSpace:t.spatialReference.isGeographic?`local`:`georeferenced`}),{rotationAxis:c,rotationAngle:l,translation:u,scale:d}=o;return a.transform=new n({rotationAngle:l??0,rotationAxis:c==null?[0,0,1]:[c[0],c[1],c[2]],translation:u==null?[0,0,0]:[u[0],u[1],u[2]],scale:d==null?[1,1,1]:[d[0],d[1],d[2]]}),a}finally{URL.revokeObjectURL(s)}}async function c(e,t,n,r){let i=await s(e,t,n,r),a=i.extent.toJSON();return i.destroy(),a}async function l(e,n,r,i){let o=await s(e,n,r,i),{components:c}=o;if(c==null)throw Error(`Mesh has no components`);let{transform:l}=o;if(l==null)throw Error(`Mesh has no transform`);let d=a(o);if(!d)throw Error(`failed to project`);let f=c.map(async e=>{let{faces:n,material:r}=e,i=r instanceof t,a={pbrMetallicRoughness:{baseColorFactor:r?.color?.toUnitRGBA()??[1,1,1,1],baseColorTexture:await u(r?.colorTexture),metallicFactor:i?r.metallic:void 0,roughnessFactor:i?r.roughness:void 0,metallicRoughnessTexture:i&&r.metallicRoughnessTexture!=null?await u(r.metallicRoughnessTexture):void 0},normalTexture:r?.normalTexture==null?void 0:await u(r.normalTexture),occlusionTexture:i&&r.occlusionTexture!=null?await u(r.occlusionTexture):void 0,emissiveTexture:i&&r.emissiveTexture!=null?await u(r.emissiveTexture):void 0,emissiveFactor:i&&r.emissiveColor?.toUnitRGB()||void 0,alphaMode:(r?.alphaMode===`auto`?`blend`:r?.alphaMode)??`opaque`,alphaCutoff:r?.alphaCutoff??.1,doubleSided:r?.doubleSided??!0,cullFace:r?.doubleSided??!0?`none`:`back`};return{geometry:{position:d.vertexAttributes.position,faces:n,normal:e.shading===`source`?d.vertexAttributes.normal:void 0,uv:d.vertexAttributes.uv,color:d.vertexAttributes.color},material:a}});return Promise.all(f)}async function u(e){if(e==null)return;let{url:t,data:n}=e,r=`image/png`,i=typeof e.wrap==`string`?e.wrap===`clamp`?`none`:e.wrap:`repeat`;if(n!=null){if(o(n))throw Error(`Cannot bake encoded textures`);if(n instanceof HTMLVideoElement)throw Error(`Cannot bake video textures`);if(n instanceof HTMLImageElement){let e=await(await d(await f(n),r)).arrayBuffer();return{type:r,width:n.width,wrap:i,data:e}}if(n instanceof HTMLCanvasElement){let e=await(await d(n,r)).arrayBuffer();return{type:r,width:n.width,wrap:i,data:e}}let e=await(await d(p(n),r)).arrayBuffer();return{type:r,width:n.width,wrap:i,data:e}}if(t!=null){let e=await m(t),n=await(await d(await f(e),r)).arrayBuffer();return{type:r,width:e.width,wrap:i,data:n}}}async function d(e,t){return new Promise((n,r)=>e.toBlob(e=>e==null?r(Error(`Failed to load image content`)):n(e),t))}async function f(e){await e.decode();let t=document.createElement(`canvas`);t.width=e.width,t.height=e.height;let n=t.getContext(`2d`);if(n==null)throw Error(`Failed to create 2d context`);return n.drawImage(e,0,0),t}function p(e){let t=document.createElement(`canvas`);t.width=e.width,t.height=e.height;let n=t.getContext(`2d`);if(n==null)throw Error(`Failed to create 2d context`);return n.putImageData(e,0,0),t}function m(e){let t=new Image;return t.src=e,i(t,t.src,!1,void 0)}export{c as extentFromGLB,l as nodeDataFromGLB};
2
+ import e from"../../geometry/Point.js";import t from"../../geometry/support/MeshMaterialMetallicRoughness.js";import n from"../../geometry/support/MeshTransform.js";import{createFromGLTF as r}from"../../geometry/support/meshUtils.js";import{loadImage as i}from"../../request/loadImage.js";import{meshMakeAbsolute as a}from"./meshUtils.js";import{isEncodedMeshTexture as o}from"../../views/3d/glTF/internal/resourceUtils.js";async function s(t,i,a){let o=URL.createObjectURL(new Blob([t]));try{let t=e.fromJSON(i),s=await r(t,o,{vertexSpace:t.spatialReference.isGeographic?`local`:`georeferenced`}),{rotationAxis:c,rotationAngle:l,translation:u,scale:d}=a;return s.transform=new n({rotationAngle:l??0,rotationAxis:c==null?[0,0,1]:[c[0],c[1],c[2]],translation:u==null?[0,0,0]:[u[0],u[1],u[2]],scale:d==null?[1,1,1]:[d[0],d[1],d[2]]}),s}finally{URL.revokeObjectURL(o)}}async function c(e,t,n){let r=await s(e,t,n),i=r.extent.toJSON();return r.destroy(),i}async function l(e,n,r){let i=await s(e,n,r),{components:o}=i;if(o==null)throw Error(`Mesh has no components`);let{transform:c}=i;if(c==null)throw Error(`Mesh has no transform`);let l=a(i);if(!l)throw Error(`failed to project`);let d=o.map(async e=>{let{faces:n,material:r}=e,i=r instanceof t,a={pbrMetallicRoughness:{baseColorFactor:r?.color?.toUnitRGBA()??[1,1,1,1],baseColorTexture:await u(r?.colorTexture),metallicFactor:i?r.metallic:void 0,roughnessFactor:i?r.roughness:void 0,metallicRoughnessTexture:i&&r.metallicRoughnessTexture!=null?await u(r.metallicRoughnessTexture):void 0},normalTexture:r?.normalTexture==null?void 0:await u(r.normalTexture),occlusionTexture:i&&r.occlusionTexture!=null?await u(r.occlusionTexture):void 0,emissiveTexture:i&&r.emissiveTexture!=null?await u(r.emissiveTexture):void 0,emissiveFactor:i&&r.emissiveColor?.toUnitRGB()||void 0,alphaMode:(r?.alphaMode===`auto`?`blend`:r?.alphaMode)??`opaque`,alphaCutoff:r?.alphaCutoff??.1,doubleSided:r?.doubleSided??!0,cullFace:r?.doubleSided??!0?`none`:`back`};return{geometry:{position:l.vertexAttributes.position,faces:n,normal:e.shading===`source`?l.vertexAttributes.normal:void 0,uv:l.vertexAttributes.uv,color:l.vertexAttributes.color},material:a}});return Promise.all(d)}async function u(e){if(e==null)return;let{url:t,data:n}=e,r=`image/png`,i=typeof e.wrap==`string`?e.wrap===`clamp`?`none`:e.wrap:`repeat`;if(n!=null){if(o(n))throw Error(`Cannot bake encoded textures`);if(n instanceof HTMLVideoElement)throw Error(`Cannot bake video textures`);if(n instanceof HTMLImageElement){let e=await(await d(await f(n),r)).arrayBuffer();return{type:r,width:n.width,wrap:i,data:e}}if(n instanceof HTMLCanvasElement){let e=await(await d(n,r)).arrayBuffer();return{type:r,width:n.width,wrap:i,data:e}}let e=await(await d(p(n),r)).arrayBuffer();return{type:r,width:n.width,wrap:i,data:e}}if(t!=null){let e=await m(t),n=await(await d(await f(e),r)).arrayBuffer();return{type:r,width:e.width,wrap:i,data:n}}}async function d(e,t){return new Promise((n,r)=>e.toBlob(e=>e==null?r(Error(`Failed to load image content`)):n(e),t))}async function f(e){await e.decode();let t=document.createElement(`canvas`);t.width=e.width,t.height=e.height;let n=t.getContext(`2d`);if(n==null)throw Error(`Failed to create 2d context`);return n.drawImage(e,0,0),t}function p(e){let t=document.createElement(`canvas`);t.width=e.width,t.height=e.height;let n=t.getContext(`2d`);if(n==null)throw Error(`Failed to create 2d context`);return n.putImageData(e,0,0),t}function m(e){let t=new Image;return t.src=e,i(t,t.src,!1,void 0)}export{c as extentFromGLB,l as nodeDataFromGLB};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{create as e}from"../../../geometry/support/aaBoundingRect.js";import{getRingsOrPathsBounds as t}from"../../../geometry/support/boundsUtils.js";import{isCurvedGeometry as n}from"../../../geometry/support/curves/curveUtils.js";import{getExtent as r}from"../SDFHelper.js";import{getNumericValue as i}from"../utils.js";function a(e){return e.type===`CIMSimpleLineCallout`||e.type===`CIMBackgroundCallout`||e.type===`CIMBalloonCallout`||e.type===`CIMPointSymbolCallout`||e.type===`CIMCompositeCallout`}function o(e,t){let n=i(e.angle,0);return n===0?t:[...t,{offsetX:0,offsetY:0,rotation:n,size:0,frameHeight:0,rotateClockWise:!1,absoluteAnchorPoint:!1,scaleSymbolsProportionally:!1}]}function s(e){let t=e.symbolLayers?.filter(e=>e.type===`CIMVectorMarker`&&e.enable!==!1);if(!t?.length)return{contentWidthRatio:1,contentHeightRatio:1,contentRequiresRadialFit:!1};let r=1,i=1,a=!1;for(let o of t){let t=o.markerGraphics,s=o.frame;if(!s||t?.length!==1)return{contentWidthRatio:1,contentHeightRatio:1,contentRequiresRadialFit:!1};let u=t[0].geometry;if(`vertexAttributes`in u&&`components`in u)throw Error(`InternalError: point symbol callout marker geometry cannot be a mesh`);let d=n(u),f=c(u)??l(u),p=s.xmax-s.xmin,m=s.ymax-s.ymin;if(!f||p<=0||m<=0)return{contentWidthRatio:1,contentHeightRatio:1,contentRequiresRadialFit:!1};let h=((e.angle??0)+(o.rotation??0))*Math.PI/180,g=Math.abs(Math.cos(h)),_=Math.abs(Math.sin(h)),v=f[2]-f[0],y=f[3]-f[1],b=v*g+y*_,x=v*_+y*g,S=p*g+m*_,C=p*_+m*g;r=Math.min(r,b/S),i=Math.min(i,x/C),a||=d}return{contentWidthRatio:r,contentHeightRatio:i,contentRequiresRadialFit:a}}function c(e){let t=e.curveRings??e.rings;if(t?.length!==2)return null;let n=u([t[0]]),r=u([t[1]]);return!n||!r?null:d(n,r)?r:d(r,n)?n:null}function l(e){let t=e.curveRings??e.curvePaths;return t?u(t):r(e)}function u(n){let r=t(e(),n);return r?[r[0],r[1],r[2],r[3]]:null}function d(e,t){return e[0]<t[0]&&e[1]<t[1]&&e[2]>t[2]&&e[3]>t[3]}function f(e,t){return t===`marker`?s(e):null}function p(e){switch(e){case`RoundedRectangle`:return 1;case`Oval`:return 2;case`Rectangle`:return 0;default:return typeof e==`number`?e:0}}function m(e){switch(e){case`MidPoint`:return 1;case`ThreePoint`:return 2;case`FourPoint`:return 3;case`Underline`:return 4;case`CircularCW`:return 5;case`CircularCCW`:return 6;case`Base`:return 0;default:return e==null||typeof e==`number`?e:0}}function h(e){if(typeof e==`number`)return e;switch(e){case`PropUniform`:return 1;case`PropNonuniform`:return 2;case`DifUniform`:return 3;case`DifNonuniform`:return 4;case`None`:return 0;default:return 0}}export{s as getPointSymbolCalloutContentRatios,f as getPointSymbolCalloutFitProperties,o as getPointSymbolCalloutTransforms,a as isSupportedCallout,p as normalizeBalloonCalloutStyle,m as normalizeLeaderLineStyle,h as normalizePointSymbolCalloutScale};
2
+ import{create as e}from"../../../geometry/support/aaBoundingRect.js";import{getRingsOrPathsBounds as t}from"../../../geometry/support/boundsUtils.js";import{isCurvedGeometry as n}from"../../../geometry/support/curves/curveUtils.js";import{getExtent as r}from"../SDFHelper.js";import{getNumericValue as i}from"../utils.js";function a(e){return e.type===`CIMSimpleLineCallout`||e.type===`CIMBackgroundCallout`||e.type===`CIMBalloonCallout`||e.type===`CIMPointSymbolCallout`||e.type===`CIMCompositeCallout`}function o(e,t){let n=i(e.angle,0);return n===0?t:[...t,{offsetX:0,offsetY:0,rotation:n,size:0,frameHeight:0,rotateClockWise:!1,absoluteAnchorPoint:!1,scaleSymbolsProportionally:!1}]}function s(e){let t=e.symbolLayers?.filter(e=>e.type===`CIMVectorMarker`&&e.enable!==!1);if(!t?.length)return{contentWidthRatio:1,contentHeightRatio:1,contentRequiresRadialFit:!1};let r=1,i=1,a=!1;for(let o of t){let t=o.markerGraphics,s=o.frame;if(!s||t?.length!==1)return{contentWidthRatio:1,contentHeightRatio:1,contentRequiresRadialFit:!1};let u=t[0].geometry;if(`vertexAttributes`in u&&`components`in u)throw Error(`InternalError: point symbol callout marker geometry cannot be a mesh`);let d=n(u),f=c(u)??l(u),p=s.xmax-s.xmin,m=s.ymax-s.ymin;if(!f||p<=0||m<=0)return{contentWidthRatio:1,contentHeightRatio:1,contentRequiresRadialFit:!1};let h=((e.angle??0)+(o.rotation??0))*Math.PI/180,g=Math.abs(Math.cos(h)),_=Math.abs(Math.sin(h)),v=f[2]-f[0],y=f[3]-f[1],b=v*g+y*_,x=v*_+y*g,S=p*g+m*_,C=p*_+m*g;r=Math.min(r,b/S),i=Math.min(i,x/C),a||=d}return{contentWidthRatio:r,contentHeightRatio:i,contentRequiresRadialFit:a}}function c(e){let t=e.curveRings??e.rings;if(t?.length!==2)return null;let n=u([t[0]]),r=u([t[1]]);return!n||!r?null:d(n,r)?r:d(r,n)?n:null}function l(e){let t=e.curveRings??e.curvePaths;return t?u(t):r(e)}function u(n){let r=t(e(),n);return r?[r[0],r[1],r[2],r[3]]:null}function d(e,t){return e[0]<t[0]&&e[1]<t[1]&&e[2]>t[2]&&e[3]>t[3]}function f(e,t){return t===`marker`?s(e):null}function p(e){switch(e){case`RoundedRectangle`:return 1;case`Oval`:return 2;case`Rectangle`:return 0;default:return typeof e==`number`?e:0}}function m(e){switch(e){case`MidPoint`:return 1;case`ThreePoint`:return 2;case`FourPoint`:return 3;case`Underline`:return 4;case`CircularCW`:return 5;case`CircularCCW`:return 6;case`Base`:return 0;default:return e==null||typeof e==`number`?e:0}}function h(e){switch(e){case 1:case`PropUniform`:return 1;case 3:case`DifUniform`:return 3;default:return 0}}export{s as getPointSymbolCalloutContentRatios,f as getPointSymbolCalloutFitProperties,o as getPointSymbolCalloutTransforms,a as isSupportedCallout,p as normalizeBalloonCalloutStyle,m as normalizeLeaderLineStyle,h as normalizePointSymbolCalloutScale};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{scaleMargins as e,extractCalloutData as t,inflateBounds as n,contains as r,distance as i,autoSnap as a,createLeaderPath as o,createRectangle as s,createAccentBar as c}from"./calloutUtils.js";class l{constructor(){this.type=`CIMBackgroundCallout`}static{this.instance=null}static local(){return l.instance===null&&(l.instance=new l),l.instance}execute(e,t,n){if(t?.type!==`CIMBackgroundCallout`)throw Error(`Invalid effect type for BackgroundCalloutEffect`);return new u(e,t,n)}}class u{constructor(t,n,r){let{geomUnitsPerPoint:i}=r;if(!i)throw Error(`geomUnitsPerPoint is required in EffectExecutionContext for BackgroundCalloutEffect`);let a=i*(r.scaleFactor??1);this._inputGeometries=t,this._part=n.part,this._leaderTolerance=(n.leaderTolerance??0)*a,this._leaderOffset=(n.leaderOffset??0)*a,this._gap=(n.gap??0)*a,this._lineStyle=n.lineStyle,this._margins=e(n.margin,a),this._calloutContext=r.callout}next(){let e;for(;e=this._inputGeometries.next();){let l=t(e,this._calloutContext);if(!l)continue;let u=n(l.bounds,this._margins);switch(this._part){case`accent-bar`:return c(u,l.layoutAnchor,this._gap,e.yFactor);case`background`:return s(u,e.yFactor);default:return r(u,l.layoutAnchor)||i(a(u,l.layoutAnchor),l.layoutAnchor)<this._leaderTolerance?null:o(u,l.layoutAnchor,this._lineStyle,this._leaderOffset,e.yFactor,l.anchor)}}return null}}export{l as default};
2
+ import{scaleMargins as e,extractCalloutData as t,inflateBounds as n,contains as r,getLeaderConnectionPoint as i,distance as a,createLeaderPath as o,createRectangle as s,createAccentBar as c}from"./calloutUtils.js";class l{constructor(){this.type=`CIMBackgroundCallout`}static{this.instance=null}static local(){return l.instance===null&&(l.instance=new l),l.instance}execute(e,t,n){if(t?.type!==`CIMBackgroundCallout`)throw Error(`Invalid effect type for BackgroundCalloutEffect`);return new u(e,t,n)}}class u{constructor(t,n,r){let{geomUnitsPerPoint:i}=r;if(!i)throw Error(`geomUnitsPerPoint is required in EffectExecutionContext for BackgroundCalloutEffect`);let a=i*(r.scaleFactor??1);this._inputGeometries=t,this._part=n.part,this._leaderTolerance=(n.leaderTolerance??0)*a,this._leaderOffset=(n.leaderOffset??0)*a,this._gap=(n.gap??0)*a,this._geomUnitsPerPoint=a,this._hasAccentBar=n.hasAccentBar===!0,this._lineStyle=n.lineStyle,this._margins=e(n.margin,a),this._calloutContext=r.callout}next(){let e;for(;e=this._inputGeometries.next();){let l=t(e,this._calloutContext);if(!l)continue;let u=n(l.bounds,this._margins);switch(this._part){case`accent-bar`:return c(u,l.anchor,this._gap,e.yFactor,this._lineStyle,l.bounds);case`background`:return s(u,e.yFactor);default:{if(r(u,l.anchor))return null;let t=i(u,l.anchor,this._lineStyle,this._gap,this._hasAccentBar,l.bounds);return a(t,l.anchor)<this._leaderTolerance?null:o(u,l.anchor,this._lineStyle,this._leaderOffset,this._gap,e.yFactor,this._geomUnitsPerPoint,this._hasAccentBar,l.bounds)}}}return null}}export{l as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{scaleMargins as e,extractCalloutData as t,createBalloonGeometry as n,inflateBounds as r}from"./calloutUtils.js";class i{constructor(){this.type=`CIMBalloonCallout`}static{this.instance=null}static local(){return i.instance===null&&(i.instance=new i),i.instance}execute(e,t,n){if(t?.type!==`CIMBalloonCallout`)throw Error(`Invalid effect type for BalloonCalloutEffect`);return new a(e,t,n)}}class a{constructor(t,n,r){let{geomUnitsPerPoint:i}=r;if(!i)throw Error(`geomUnitsPerPoint is required in EffectExecutionContext for BalloonCalloutEffect`);let a=i*(r.scaleFactor??1);this._inputGeometries=t,this._balloonStyle=n.balloonStyle,this._dartWidth=n.dartWidth==null?null:n.dartWidth*a,this._leaderTolerance=(n.leaderTolerance??0)*a,this._margins=e(n.margin,a),this._calloutContext=r.callout}next(){let e;for(;e=this._inputGeometries.next();){let i=t(e,this._calloutContext);if(i)return n(r(i.bounds,this._margins),i.anchor,this._balloonStyle,this._leaderTolerance,e.yFactor,this._dartWidth,i.layoutAnchor)}return null}}export{i as default};
2
+ import{scaleMargins as e,extractCalloutData as t,inflateBounds as n,createBalloonDartGeometry as r,createBalloonGeometry as i}from"./calloutUtils.js";class a{constructor(){this.type=`CIMBalloonCallout`}static{this.instance=null}static local(){return a.instance===null&&(a.instance=new a),a.instance}execute(e,t,n){if(t?.type!==`CIMBalloonCallout`)throw Error(`Invalid effect type for BalloonCalloutEffect`);return new o(e,t,n)}}class o{constructor(t,n,r){let{geomUnitsPerPoint:i}=r;if(!i)throw Error(`geomUnitsPerPoint is required in EffectExecutionContext for BalloonCalloutEffect`);let a=i*(r.scaleFactor??1);this._inputGeometries=t,this._balloonStyle=n.balloonStyle,this._dartWidth=n.dartWidth==null?null:n.dartWidth*a,this._part=n.part,this._separateDart=n.separateDart===!0,this._leaderTolerance=(n.leaderTolerance??0)*a,this._margins=e(n.margin,a),this._calloutContext=r.callout}next(){let e;for(;e=this._inputGeometries.next();){let a=t(e,this._calloutContext);if(!a)continue;let o=n(a.bounds,this._margins);if(this._part===`dart`){let t=r(o,a.anchor,this._balloonStyle,this._leaderTolerance,e.yFactor,this._dartWidth,a.layoutAnchor);if(t)return t;continue}return i(o,a.anchor,this._balloonStyle,this._leaderTolerance,e.yFactor,this._dartWidth,a.layoutAnchor,!this._separateDart)}return null}}export{a as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{extractCalloutData as e,createPointGeometry as t,center as n,contains as r,distance as i,autoSnap as a,createLeaderPath as o}from"./calloutUtils.js";class s{constructor(){this.type=`CIMPointSymbolCallout`}static{this.instance=null}static local(){return s.instance===null&&(s.instance=new s),s.instance}execute(e,t,n){if(t?.type!==`CIMPointSymbolCallout`)throw Error(`Invalid effect type for PointSymbolCalloutEffect`);return new c(e,t,n)}}class c{constructor(e,t,n){let{geomUnitsPerPoint:r}=n;if(!r)throw Error(`geomUnitsPerPoint is required in EffectExecutionContext for PointSymbolCalloutEffect`);let i=r*(n.scaleFactor??1);this._inputGeometries=e,this._part=t.part,this._leaderTolerance=(t.leaderTolerance??0)*i,this._leaderOffset=(t.leaderOffset??0)*i,this._lineStyle=t.lineStyle,this._calloutContext=n.callout}next(){let s;for(;s=this._inputGeometries.next();){let c=e(s,this._calloutContext);if(c)return this._part===`marker`?t(n(c.bounds),s.yFactor):r(c.bounds,c.layoutAnchor)||i(a(c.bounds,c.layoutAnchor),c.layoutAnchor)<this._leaderTolerance?null:o(c.bounds,c.layoutAnchor,this._lineStyle,this._leaderOffset,s.yFactor,c.anchor)}return null}}export{s as default};
2
+ import{extractCalloutData as e,createPointGeometry as t,center as n,contains as r,getLeaderConnectionPoint as i,distance as a,createLeaderPath as o}from"./calloutUtils.js";class s{constructor(){this.type=`CIMPointSymbolCallout`}static{this.instance=null}static local(){return s.instance===null&&(s.instance=new s),s.instance}execute(e,t,n){if(t?.type!==`CIMPointSymbolCallout`)throw Error(`Invalid effect type for PointSymbolCalloutEffect`);return new c(e,t,n)}}class c{constructor(e,t,n){let{geomUnitsPerPoint:r}=n;if(!r)throw Error(`geomUnitsPerPoint is required in EffectExecutionContext for PointSymbolCalloutEffect`);let i=r*(n.scaleFactor??1);this._inputGeometries=e,this._part=t.part,this._leaderTolerance=(t.leaderTolerance??0)*i,this._leaderOffset=(t.leaderOffset??0)*i,this._gap=(t.gap??0)*i,this._geomUnitsPerPoint=i,this._lineStyle=t.lineStyle,this._calloutContext=n.callout}next(){let s;for(;s=this._inputGeometries.next();){let c=e(s,this._calloutContext);if(!c)continue;if(this._part===`marker`)return t(n(c.bounds),s.yFactor);if(r(c.bounds,c.anchor))return null;let l=i(c.bounds,c.anchor,this._lineStyle,this._gap);return a(l,c.anchor)<this._leaderTolerance?null:o(c.bounds,c.anchor,this._lineStyle,this._leaderOffset,this._gap,s.yFactor,this._geomUnitsPerPoint)}return null}}export{s as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{GeometryCursor as e}from"../../../../geometry/GeometryCursor.js";function t(e,t){let{relativeAnchor:n,relativeLayoutAnchor:r,absoluteAnchor:i,bodyBounds:a}=t??{},o=e.clone();if(o.geometryType===`esriGeometryPoint`||o.geometryType===`esriGeometryMultipoint`){if(!o.nextPath()||(o.seekPathStart(),!o.nextPoint()))return null;let e=i??(n?{x:o.x+n.x,y:o.y+n.y}:{x:o.x,y:o.y});return{anchor:e,layoutAnchor:i??(r?{x:o.x+r.x,y:o.y+r.y}:e),bounds:a?s(a,o.x,o.y):{xmin:o.x,ymin:o.y,xmax:o.x,ymax:o.y}}}if(a&&o.totalSize===1&&o.totalPoints===1){if(!o.seekPath(0)||(o.seekPathStart(),!o.nextPoint()))return null;let e=i??(n?{x:o.x+n.x,y:o.y+n.y}:{x:o.x,y:o.y});return{anchor:e,layoutAnchor:i??(r?{x:o.x+r.x,y:o.y+r.y}:e),bounds:s(a,o.x,o.y)}}if(o.totalSize<2)return null;function s(e,t,n){return{xmin:e.xmin+t,ymin:e.ymin+n,xmax:e.xmax+t,ymax:e.ymax+n}}let c=o.totalSize-1,l={xmin:1/0,ymin:1/0,xmax:-1/0,ymax:-1/0};for(let e=0;e<c;e++){if(!o.seekPath(e))return null;for(o.seekPathStart();o.nextPoint();)g(l,o.x,o.y)}return!_(l)||!o.seekPath(c)||(o.seekPathStart(),!o.nextPoint())?null:{anchor:i??{x:o.x,y:o.y},layoutAnchor:i??{x:o.x,y:o.y},bounds:l}}function n(e,t){return{left:(e?.left??0)*t,right:(e?.right??0)*t,top:(e?.top??0)*t,bottom:(e?.bottom??0)*t}}function r(e,t){return{xmin:e.xmin-t.left,ymin:e.ymin-t.bottom,xmax:e.xmax+t.right,ymax:e.ymax+t.top}}function i(e,t){return t.x>=e.xmin&&t.x<=e.xmax&&t.y>=e.ymin&&t.y<=e.ymax}function a(e){return{x:.5*(e.xmin+e.xmax),y:.5*(e.ymin+e.ymax)}}function o(e,t){let n,r,i=.5*(e.xmin+e.xmax),a=.5*(e.ymin+e.ymax);return n=t.x<e.xmin?e.xmin:t.x>e.xmax?e.xmax:t.x<i?Math.abs(t.x-e.xmin)<Math.abs(t.x-i)?e.xmin:i:Math.abs(t.x-e.xmax)<Math.abs(t.x-i)?e.xmax:i,r=t.y<e.ymin?e.ymin:t.y>e.ymax?e.ymax:t.y<a?Math.abs(t.y-e.ymin)<Math.abs(t.y-a)?e.ymin:a:Math.abs(t.y-e.ymax)<Math.abs(t.y-a)?e.ymax:a,{x:n,y:r}}function s(e,t){let n=.5*(e.xmin+e.xmax),r=.5*(e.ymin+e.ymax);if(t.x>=e.xmin&&t.x<=e.xmax){if(t.y<=e.ymin)return`bottom`;if(t.y>=e.ymax)return`top`}else if(t.x<e.xmin)return`left`;else if(t.x>e.xmax)return`right`;let i=[{side:`left`,distance:Math.abs(t.x-e.xmin)},{side:`right`,distance:Math.abs(t.x-e.xmax)},{side:`bottom`,distance:Math.abs(t.y-e.ymin)},{side:`top`,distance:Math.abs(t.y-e.ymax)}];return i.sort((e,t)=>e.distance-t.distance),i[0].distance===i[1].distance?t.x<n?`left`:t.y<r?`bottom`:`top`:i[0].side}function c(e,t,n,r,i,a=t){let c=n??0,l=s(e,t),u=c===4?N(e,t,l):o(e,t);return v(I(M(r>0?F(u,l,r):u,a,e,l,c,r)),i)}function l(e,t){return y([{x:e.xmin,y:e.ymin},{x:e.xmin,y:e.ymax},{x:e.xmax,y:e.ymax},{x:e.xmax,y:e.ymin},{x:e.xmin,y:e.ymin}],t)}function u(e,t,n,r){switch(i(e,t)?`left`:s(e,t)){case`left`:return v([{x:e.xmin-n,y:e.ymin},{x:e.xmin-n,y:e.ymax}],r);case`top`:return v([{x:e.xmin,y:e.ymax+n},{x:e.xmax,y:e.ymax+n}],r);case`right`:return v([{x:e.xmax+n,y:e.ymax},{x:e.xmax+n,y:e.ymin}],r);case`bottom`:return v([{x:e.xmax,y:e.ymin-n},{x:e.xmin,y:e.ymin-n}],r)}}function d(t,n){let r=e.createEmptyOptimizedCIM(`esriGeometryPoint`,!1,!1,n);return r.startPath(),r.pushXY(t.x,n*t.y),r.reset(),r}function f(e,t,n,r,a,o=null,s=t){let c=p(e,n),l=i(c,s)?null:D(c,s,t,n,r,o);switch(n){case 1:return x(c,l,a);case 2:return w(c,l,a);default:return b(c,l,a)}}function p(e,t){if(t!==2)return e;let n=.5*(e.xmin+e.xmax),r=.5*(e.ymin+e.ymax),i=.5*(e.xmax-e.xmin)*Math.SQRT2,a=.5*(e.ymax-e.ymin)*Math.SQRT2;return{xmin:n-i,ymin:r-a,xmax:n+i,ymax:r+a}}function m(e,t){return t===1?Math.min(e.xmax-e.xmin,e.ymax-e.ymin)/8:0}function h(e,t){return Math.hypot(t.x-e.x,t.y-e.y)}function g(e,t,n){e.xmin=Math.min(e.xmin,t),e.ymin=Math.min(e.ymin,n),e.xmax=Math.max(e.xmax,t),e.ymax=Math.max(e.ymax,n)}function _(e){return Number.isFinite(e.xmin)&&Number.isFinite(e.ymin)&&Number.isFinite(e.xmax)&&Number.isFinite(e.ymax)}function v(t,n){let r=e.createEmptyOptimizedCIM(`esriGeometryPolyline`,!1,!1,n);r.startPath();for(let e of t)r.pushXY(e.x,n*e.y);return r.reset(),r}function y(t,n){let r=e.createEmptyOptimizedCIM(`esriGeometryPolygon`,!1,!1,n);r.startPath();for(let e of L(t))r.pushXY(e.x,n*e.y);return r.reset(),r}function b(e,t,n){let r=[{x:e.xmin,y:e.ymin},{x:e.xmin,y:e.ymax},{x:e.xmax,y:e.ymax},{x:e.xmax,y:e.ymin},{x:e.xmin,y:e.ymin}];return t&&k(r,t),y(r,n)}function x(e,t,n){let r=S(e);return t&&k(r,t),y(r,n)}function S(e){let t=m(e,1),n=[{x:e.xmin+t,y:e.ymin}];return O(n,e.xmin+t,e.ymin+t,t,-Math.PI/2,-Math.PI),n.push({x:e.xmin,y:e.ymax-t}),O(n,e.xmin+t,e.ymax-t,t,Math.PI,Math.PI/2),n.push({x:e.xmax-t,y:e.ymax}),O(n,e.xmax-t,e.ymax-t,t,Math.PI/2,0),n.push({x:e.xmax,y:e.ymin+t}),O(n,e.xmax-t,e.ymin+t,t,0,-Math.PI/2),n.push(n[0]),n}function C(e,t){return y(T(e),t)}function w(e,t,n){if(!t)return C(e,n);let r=T(e),i=r.length,a=E(r,t.points[0]),o=E(r,t.points[t.points.length-1]),s=(o-a+i)%i,c=i-s;return s<=c?r.splice(a+1,Math.max(s-1,0),...t.points):r.splice(o+1,Math.max(c-1,0),...t.points.slice().reverse()),y(r,n)}function T(e){let t=.5*(e.xmin+e.xmax),n=.5*(e.ymin+e.ymax),r=.5*(e.xmax-e.xmin),i=.5*(e.ymax-e.ymin),a=[];for(let e=0;e<32;e++){let o=2*Math.PI*e/32;a.push({x:t+r*Math.cos(o),y:n+i*Math.sin(o)})}return a}function E(e,t){let n=0,r=1/0;for(let i=0;i<e.length;i++){let a=h(e[i],t);a<r&&(r=a,n=i)}return n}function D(e,t,n,r,i,a){let o=e.xmax-e.xmin,s=e.ymax-e.ymin,c=e.xmin+o/2,l=e.ymin+s/2,u=-1;if(t.x>=e.xmin&&t.x<=e.xmax?t.y<=e.ymin?u=t.x<=c?7:6:t.y>=e.ymax&&(u=t.x<=c?2:3):u=t.x<e.xmin?t.y<=l?0:1:t.y<=l?5:4,u<0)return null;let d=j(e)[u];if(h(d,t)<i)return null;let f,p,g=m(e,r),_=r===1?o/4-g:o/2,v=r===1?s/4-g:s/2,y=a==null?o/8:Math.min(a/2,Math.max(_,0)),b=a==null?s/8:Math.min(a/2,Math.max(v,0));switch(u){case 0:case 1:f={x:d.x,y:d.y-b},p={x:d.x,y:d.y+b};break;case 2:case 3:f={x:d.x-y,y:d.y},p={x:d.x+y,y:d.y};break;case 4:case 5:f={x:d.x,y:d.y+b},p={x:d.x,y:d.y-b};break;default:f={x:d.x+y,y:d.y},p={x:d.x-y,y:d.y}}return{index:u,points:[f,n,p]}}function O(e,t,n,r,i,a){for(let o=1;o<=4;o++){let s=i+(a-i)*o/4;e.push({x:t+r*Math.cos(s),y:n+r*Math.sin(s)})}}function k(e,t){let[n,,r]=t.points;for(let i=0;i<e.length-1;i++)if(A(n,e[i],e[i+1])&&A(r,e[i],e[i+1])){e.splice(i+1,0,...t.points);return}}function A(e,t,n){let r=1e-9,i=(e.x-t.x)*(n.y-t.y)-(e.y-t.y)*(n.x-t.x);return Math.abs(i)>r?!1:e.x>=Math.min(t.x,n.x)-r&&e.x<=Math.max(t.x,n.x)+r&&e.y>=Math.min(t.y,n.y)-r&&e.y<=Math.max(t.y,n.y)+r}function j(e){let t=e.xmax-e.xmin,n=e.ymax-e.ymin;return[{x:e.xmin,y:e.ymin+n/4},{x:e.xmin,y:e.ymax-n/4},{x:e.xmin+t/4,y:e.ymax},{x:e.xmax-t/4,y:e.ymax},{x:e.xmax,y:e.ymax-n/4},{x:e.xmax,y:e.ymin+n/4},{x:e.xmax-t/4,y:e.ymin},{x:e.xmin+t/4,y:e.ymin}]}function M(e,t,n,r,i,a){let o=Math.max(a,Math.min(n.xmax-n.xmin,n.ymax-n.ymin)/4);switch(i){case 1:{if(r===`left`||r===`right`){let n=.5*(e.x+t.x);return[e,{x:n,y:e.y},{x:n,y:t.y},t]}let n=.5*(e.y+t.y);return[e,{x:e.x,y:n},{x:t.x,y:n},t]}case 2:{let n=F(e,r,o);return[e,n,P(n,t,r),t]}case 3:{let n=F(e,r,o);if(r===`left`||r===`right`){let r=.5*(n.x+t.x);return[e,n,{x:r,y:n.y},{x:r,y:t.y},t]}let i=.5*(n.y+t.y);return[e,n,{x:n.x,y:i},{x:t.x,y:i},t]}case 4:{let e=r===`top`?n.ymax:n.ymin;return[{x:n.xmin,y:e},{x:n.xmax,y:e},t]}case 5:case 6:{let n=i===5?-1:1,a=h(e,t)/4||o,s={x:.5*(e.x+t.x),y:.5*(e.y+t.y)};return r===`left`||r===`right`?[e,{x:s.x,y:s.y+n*a},t]:[e,{x:s.x+n*a,y:s.y},t]}default:return[e,t]}}function N(e,t,n){return n===`left`||n===`right`?{x:n===`left`?e.xmin:e.xmax,y:e.ymin}:{x:R(t.x,e.xmin,e.xmax),y:n===`top`?e.ymax:e.ymin}}function P(e,t,n){return n===`left`||n===`right`?{x:e.x,y:t.y}:{x:t.x,y:e.y}}function F(e,t,n){switch(t){case`left`:return{x:e.x-n,y:e.y};case`top`:return{x:e.x,y:e.y+n};case`right`:return{x:e.x+n,y:e.y};case`bottom`:return{x:e.x,y:e.y-n}}}function I(e){return e.filter((t,n)=>n===0||t.x!==e[n-1].x||t.y!==e[n-1].y)}function L(e){if(!e.length)return e;let t=e[0],n=e[e.length-1];return t.x===n.x&&t.y===n.y?e:[...e,t]}function R(e,t,n){return Math.max(t,Math.min(n,e))}export{o as autoSnap,a as center,i as contains,u as createAccentBar,f as createBalloonGeometry,c as createLeaderPath,d as createPointGeometry,l as createRectangle,h as distance,g as expandBounds,t as extractCalloutData,p as getBalloonBodyBounds,m as getBalloonCornerRadius,r as inflateBounds,_ as isFiniteBounds,s as resolveLeaderSide,n as scaleMargins};
2
+ import{GeometryCursor as e}from"../../../../geometry/GeometryCursor.js";import{intersectEllipseDirection as t,intersectEllipseSegment as n}from"../../../../geometry/support/ellipseUtils.js";function r(e,t){let{relativeAnchor:n,relativeLayoutAnchor:r,absoluteAnchor:i,bodyBounds:a}=t??{},o=e.clone();if(o.geometryType===`esriGeometryPoint`||o.geometryType===`esriGeometryMultipoint`){if(!o.nextPath()||(o.seekPathStart(),!o.nextPoint()))return null;let e=i??(n?{x:o.x+n.x,y:o.y+n.y}:{x:o.x,y:o.y});return{anchor:e,layoutAnchor:i??(r?{x:o.x+r.x,y:o.y+r.y}:e),bounds:a?s(a,o.x,o.y):{xmin:o.x,ymin:o.y,xmax:o.x,ymax:o.y}}}if(a&&o.totalSize===1&&o.totalPoints===1){if(!o.seekPath(0)||(o.seekPathStart(),!o.nextPoint()))return null;let e=i??(n?{x:o.x+n.x,y:o.y+n.y}:{x:o.x,y:o.y});return{anchor:e,layoutAnchor:i??(r?{x:o.x+r.x,y:o.y+r.y}:e),bounds:s(a,o.x,o.y)}}if(o.totalSize<2)return null;function s(e,t,n){return{xmin:e.xmin+t,ymin:e.ymin+n,xmax:e.xmax+t,ymax:e.ymax+n}}let c=o.totalSize-1,l={xmin:1/0,ymin:1/0,xmax:-1/0,ymax:-1/0};for(let e=0;e<c;e++){if(!o.seekPath(e))return null;for(o.seekPathStart();o.nextPoint();)b(l,o.x,o.y)}return!x(l)||!o.seekPath(c)||(o.seekPathStart(),!o.nextPoint())?null:{anchor:i??{x:o.x,y:o.y},layoutAnchor:i??{x:o.x,y:o.y},bounds:l}}function i(e,t){return{left:(e?.left??0)*t,right:(e?.right??0)*t,top:(e?.top??0)*t,bottom:(e?.bottom??0)*t}}function a(e,t){return{xmin:e.xmin-t.left,ymin:e.ymin-t.bottom,xmax:e.xmax+t.right,ymax:e.ymax+t.top}}function o(e,t){return t.x>=e.xmin&&t.x<=e.xmax&&t.y>=e.ymin&&t.y<=e.ymax}function s(e){return{x:.5*(e.xmin+e.xmax),y:.5*(e.ymin+e.ymax)}}function c(e,t,n=0){let r,i,a=e.xmin-n,o=e.ymin-n,s=e.xmax+n,c=e.ymax+n,l=.5*(a+s),u=.5*(o+c);return r=t.x<a?a:t.x>s?s:t.x<l?Math.abs(t.x-a)<Math.abs(t.x-l)?a:l:Math.abs(t.x-s)<Math.abs(t.x-l)?s:l,i=t.y<o?o:t.y>c?c:t.y<u?Math.abs(t.y-o)<Math.abs(t.y-u)?o:u:Math.abs(t.y-c)<Math.abs(t.y-u)?c:u,{x:r,y:i}}function l(e,t,n,r,i,a,o=1,s=!1,c=e){let l=B(e,t,n??0,i,9*o,s,c);return S(q(r>0?K(l,r):l),a)}function u(e,t,n,r,i=!1,a=e){let o=n??0;return o===0&&!i?c(e,t,r):d(V(e,t,o,r,a),t,o)}function d(e,t,n){let r=H(e.start,e.end);switch(n){case 1:case 2:case 3:return r;case 4:return t.y>r.y?e.end:e.start;case 5:case 6:return y(e.start,t)>y(e.end,t)?e.end:e.start;default:return y(e.start,t)<y(e.end,t)?e.start:e.end}}function f(e,t){return C([{x:e.xmin,y:e.ymin},{x:e.xmin,y:e.ymax},{x:e.xmax,y:e.ymax},{x:e.xmax,y:e.ymin},{x:e.xmin,y:e.ymin}],t)}function p(e,t,n,r,i=null,a=e){let{start:o,end:s}=V(e,t,i??0,n,a);return S([o,s],r)}function m(t,n){let r=e.createEmptyOptimizedCIM(`esriGeometryPoint`,!1,!1,n);return r.startPath(),r.pushXY(t.x,n*t.y),r.reset(),r}function h(e,t,n,r,i,a=null,s=t,c=!0){let l=_(e,n),u=!c||o(l,s)?null:P(l,e,s,t,n,r,a);switch(n){case 1:return T(l,u,i);case 2:return O(l,u,i);default:return w(l,u,i)}}function g(e,t,n,r,i,a=null,s=t){let c=_(e,n),l=o(c,s)?null:P(c,e,s,t,n,r,a);return l?C(l.points,i):null}function _(e,t){if(t!==2)return e;let n=.5*(e.xmin+e.xmax),r=.5*(e.ymin+e.ymax),i=.5*(e.ymax-e.ymin),a=Math.max(.5*(e.xmax-e.xmin)*Math.SQRT2,1.25*i);return{xmin:n-a,ymin:r-i,xmax:n+a,ymax:r+i}}function v(e,t){return t===1?Math.min(e.xmax-e.xmin,e.ymax-e.ymin)/8:0}function y(e,t){return Math.hypot(t.x-e.x,t.y-e.y)}function b(e,t,n){e.xmin=Math.min(e.xmin,t),e.ymin=Math.min(e.ymin,n),e.xmax=Math.max(e.xmax,t),e.ymax=Math.max(e.ymax,n)}function x(e){return Number.isFinite(e.xmin)&&Number.isFinite(e.ymin)&&Number.isFinite(e.xmax)&&Number.isFinite(e.ymax)}function S(t,n){let r=e.createEmptyOptimizedCIM(`esriGeometryPolyline`,!1,!1,n);r.startPath();for(let e of t)r.pushXY(e.x,n*e.y);return r.reset(),r}function C(t,n){let r=e.createEmptyOptimizedCIM(`esriGeometryPolygon`,!1,!1,n);r.startPath();for(let e of J(t))r.pushXY(e.x,n*e.y);return r.reset(),r}function w(e,t,n){let r=[{x:e.xmin,y:e.ymin},{x:e.xmin,y:e.ymax},{x:e.xmax,y:e.ymax},{x:e.xmax,y:e.ymin},{x:e.xmin,y:e.ymin}];return t&&L(r,t),C(r,n)}function T(e,t,n){let r=E(e);return t&&L(r,t),C(r,n)}function E(e){let t=v(e,1),n=[{x:e.xmin+t,y:e.ymin}];return I(n,e.xmin+t,e.ymin+t,t,-Math.PI/2,-Math.PI),n.push({x:e.xmin,y:e.ymax-t}),I(n,e.xmin+t,e.ymax-t,t,Math.PI,Math.PI/2),n.push({x:e.xmax-t,y:e.ymax}),I(n,e.xmax-t,e.ymax-t,t,Math.PI/2,0),n.push({x:e.xmax,y:e.ymin+t}),I(n,e.xmax-t,e.ymin+t,t,0,-Math.PI/2),n.push(n[0]),n}function D(e,t){return C(A(e),t)}function O(e,t,n){if(!t)return D(e,n);let r=j(e,t.points[0]),i=j(e,t.points[t.points.length-1]),a=N(i-r),o=Math.min(a,2*Math.PI-a),s=a<=Math.PI?t.points.slice():[t.points[t.points.length-1],t.points[1],t.points[0]],c=a<=Math.PI?i:r,l=2*Math.PI-o,u=Math.max(1,Math.ceil(k*l/(2*Math.PI)));for(let t=1;t<u;t++)s.push(M(e,c+l*t/u));return C(s,n)}const k=32;function A(e){let t=[];for(let n=0;n<32;n++)t.push(M(e,2*Math.PI*n/32));return t}function j(e,t){let n=.5*(e.xmin+e.xmax),r=.5*(e.ymin+e.ymax),i=.5*(e.xmax-e.xmin),a=.5*(e.ymax-e.ymin);return N(Math.atan2((t.y-r)/a,(t.x-n)/i))}function M(e,t){let n=.5*(e.xmin+e.xmax),r=.5*(e.ymin+e.ymax),i=.5*(e.xmax-e.xmin),a=.5*(e.ymax-e.ymin);return{x:n+i*Math.cos(t),y:r+a*Math.sin(t)}}function N(e){let t=e%(2*Math.PI);return t<0?t+2*Math.PI:t}function P(e,t,n,r,i,a,o){if(i===2)return F(e,t,n,r,a,o);let s=e.xmax-e.xmin,c=e.ymax-e.ymin,l=e.xmin+s/2,u=e.ymin+c/2,d=-1;if(n.x>=e.xmin&&n.x<=e.xmax?n.y<=e.ymin?d=n.x<=l?7:6:n.y>=e.ymax&&(d=n.x<=l?2:3):d=n.x<e.xmin?n.y<=u?0:1:n.y<=u?5:4,d<0)return null;let f=z(e)[d];if(y(f,n)<a)return null;let p,m,h=v(e,i),g=i===1?s/4-h:s/2,_=i===1?c/4-h:c/2,b=o==null?s/8:Math.min(o/2,Math.max(g,0)),x=o==null?c/8:Math.min(o/2,Math.max(_,0));switch(d){case 0:case 1:p={x:f.x,y:f.y-x},m={x:f.x,y:f.y+x};break;case 2:case 3:p={x:f.x-b,y:f.y},m={x:f.x+b,y:f.y};break;case 4:case 5:p={x:f.x,y:f.y+x},m={x:f.x,y:f.y-x};break;default:p={x:f.x+b,y:f.y},m={x:f.x-b,y:f.y}}return{index:d,points:[p,r,m]}}function F(e,r,i,a,o,s){let c={x:.5*(e.xmin+e.xmax),y:.5*(e.ymin+e.ymax)},l=i.x-c.x,u=i.y-c.y,d=Math.hypot(l,u);if(d===0)return null;let f={x:l/d,y:u/d};if(y(t(e,f),i)<o)return null;let p={x:-f.y,y:f.x},m=y(c,t(e,p)),h=Math.min(r.xmax-r.xmin,r.ymax-r.ymin)/8,g=Math.min(s==null?h:s/2,m),_={x:c.x+p.x*g,y:c.y+p.y*g},v={x:c.x-p.x*g,y:c.y-p.y*g};return{index:-1,points:[n(e,i,_),a,n(e,i,v)]}}function I(e,t,n,r,i,a){for(let o=1;o<=4;o++){let s=i+(a-i)*o/4;e.push({x:t+r*Math.cos(s),y:n+r*Math.sin(s)})}}function L(e,t){let[n,,r]=t.points;for(let i=0;i<e.length-1;i++)if(R(n,e[i],e[i+1])&&R(r,e[i],e[i+1])){e.splice(i+1,0,...t.points);return}}function R(e,t,n){let r=1e-9,i=(e.x-t.x)*(n.y-t.y)-(e.y-t.y)*(n.x-t.x);return Math.abs(i)>r?!1:e.x>=Math.min(t.x,n.x)-r&&e.x<=Math.max(t.x,n.x)+r&&e.y>=Math.min(t.y,n.y)-r&&e.y<=Math.max(t.y,n.y)+r}function z(e){let t=e.xmax-e.xmin,n=e.ymax-e.ymin;return[{x:e.xmin,y:e.ymin+n/4},{x:e.xmin,y:e.ymax-n/4},{x:e.xmin+t/4,y:e.ymax},{x:e.xmax-t/4,y:e.ymax},{x:e.xmax,y:e.ymax-n/4},{x:e.xmax,y:e.ymin+n/4},{x:e.xmax-t/4,y:e.ymin},{x:e.xmin+t/4,y:e.ymin}]}function B(e,t,n,r,i,a,o){if(n===0&&!a)return[c(e,t,r),t];let s=V(e,t,n,r,o),l=d(s,t,n);switch(n){case 1:return[l,t];case 2:return[l,U(l,s.onLeft,i),t];case 3:{let e=U(l,s.onLeft,i),n=y(s.start,t)<y(s.end,t)?s.start:s.end;return[l,e,{x:e.x,y:n.y},t]}case 4:return[{x:s.onLeft?e.xmax:e.xmin,y:l.y},l,t];case 5:case 6:return W(l,t,n===5);default:return[l,t]}}function V(e,t,n,r,i){let a=t.x<=.5*(i.xmin+i.xmax);n===3&&(a=!a);let o=a?e.xmin-r:e.xmax+r;return{start:{x:o,y:e.ymin},end:{x:o,y:e.ymax},onLeft:a}}function H(e,t){return{x:.5*(e.x+t.x),y:.5*(e.y+t.y)}}function U(e,t,n){return{x:e.x+(t?-n:n),y:e.y}}function W(e,t,n){let r=y(e,t);if(r===0)return[e];let i=.75*r,a=H(e,t),o=Math.sqrt(i*i-.25*r*r),s=-(t.y-e.y)/r,c=(t.x-e.x)/r,l=n?-1:1,u=a.x+l*o*s,d=a.y+l*o*c,f=Math.atan2(e.y-d,e.x-u),p=Math.atan2(t.y-d,t.x-u)-f;n&&p>0?p-=2*Math.PI:!n&&p<0&&(p+=2*Math.PI);let m=[e];for(let e=1;e<=12;e++){let t=f+p*e/12;m.push({x:u+i*Math.cos(t),y:d+i*Math.sin(t)})}return m[12]=t,m}function G(e,t){let n=t;for(let t=1;t<e.length;t++){let r=e[t-1],i=e[t],a=y(r,i);if(n<a){let o=n/a;return[{x:r.x+o*(i.x-r.x),y:r.y+o*(i.y-r.y)},...e.slice(t)]}n-=a}return[e[e.length-1]]}function K(e,t){return G(e.slice().reverse(),t).reverse()}function q(e){return e.filter((t,n)=>n===0||t.x!==e[n-1].x||t.y!==e[n-1].y)}function J(e){if(!e.length)return e;let t=e[0],n=e[e.length-1];return t.x===n.x&&t.y===n.y?e:[...e,t]}export{c as autoSnap,s as center,o as contains,p as createAccentBar,g as createBalloonDartGeometry,h as createBalloonGeometry,l as createLeaderPath,m as createPointGeometry,f as createRectangle,y as distance,b as expandBounds,r as extractCalloutData,_ as getBalloonBodyBounds,v as getBalloonCornerRadius,u as getLeaderConnectionPoint,a as inflateBounds,x as isFiniteBounds,i as scaleMargins};