@arcgis/core 4.33.0-next.20250320 → 4.33.0-next.20250322

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 (48) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/1034155c525d2b7baaa1.js +1 -0
  3. package/assets/esri/core/workers/chunks/2b9ce6648823f6962f58.js +1 -0
  4. package/assets/esri/core/workers/chunks/{9e11307b4cc3b523d178.js → 9cfce9414b874878d761.js} +1 -1
  5. package/assets/esri/core/workers/chunks/{285e573aa6f3acf70b32.js → accd0661a6dd297fab6b.js} +1 -1
  6. package/assets/esri/themes/base/_mixins.scss +4 -0
  7. package/assets/esri/themes/dark/main.css +1 -1
  8. package/assets/esri/themes/light/main.css +1 -1
  9. package/assets/esri/themes/light/view.css +1 -1
  10. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable.json +1 -1
  11. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_en.json +1 -1
  12. package/chunks/BlendLayers.glsl.js +5 -1
  13. package/chunks/BloomBlur.glsl.js +7 -7
  14. package/chunks/BloomComposition.glsl.js +2 -2
  15. package/geometry/support/buffer/BufferView.js +1 -1
  16. package/interfaces.d.ts +12 -0
  17. package/layers/support/layerUtils.js +1 -1
  18. package/package.json +1 -1
  19. package/rest/knowledgeGraph/wasmInterface/updateToWasmEncodedFactories.js +1 -1
  20. package/support/revision.js +1 -1
  21. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  22. package/views/3d/layers/graphics/deconflictorDebug.js +1 -1
  23. package/views/3d/state/ViewState.js +1 -1
  24. package/views/3d/state/ViewStateManager.js +1 -1
  25. package/views/3d/support/buffer/InterleavedLayout.js +1 -1
  26. package/views/3d/terrain/TerrainRenderer.js +1 -1
  27. package/views/3d/terrain/TileRenderer.js +1 -1
  28. package/views/3d/webgl-engine/core/shaderLibrary/terrain/TerrainTexture.glsl.js +12 -7
  29. package/views/3d/webgl-engine/core/shaderLibrary/util/BlendLayers.glsl.js +1 -1
  30. package/views/3d/webgl-engine/effects/bloom/BloomBlur.glsl.js +1 -1
  31. package/views/3d/webgl-engine/effects/bloom/BloomComposition.glsl.js +1 -1
  32. package/views/3d/webgl-engine/effects/bloom/BloomPresets.glsl.js +5 -0
  33. package/views/3d/webgl-engine/effects/bloom/BloomRenderNode.js +1 -1
  34. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  35. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  36. package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
  37. package/views/webgl/textureUtils.js +1 -1
  38. package/widgets/Daylight.js +1 -1
  39. package/widgets/ElevationProfile/support/visualizationUtils.js +1 -1
  40. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  41. package/widgets/FeatureTable/Grid/Grid.js +1 -1
  42. package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
  43. package/widgets/FeatureTable.js +1 -1
  44. package/widgets/ShadowCast.js +1 -1
  45. package/widgets/support/globalCss.js +1 -1
  46. package/widgets/support/timeWidgetUtils.js +1 -1
  47. package/assets/esri/core/workers/chunks/657ae4a0461d45044b28.js +0 -1
  48. package/assets/esri/core/workers/chunks/c528a2ca3b1b73df5a5d.js +0 -1
@@ -1 +1 @@
1
- {"widgetLabel":"Feature table","header":"{title} (Total: {count} | Selection: {selected})","headerNoSelection":"{title} (Total: {count})","untitled":"Untitled","relatedRecords":"Related records","attachments":"Attachments","loading":"Loading...","syncing":"Syncing...","errorData":"Data error.","errorLayer":"Layer error.","errorUpdateFailed":"Update failed.","errorDomainType":"Domain type is not supported.","show":"Show","hide":"Hide","menu":"Menu","options":"Options","allColums":"All columns","sortAsc":"Sort ascending","sortDesc":"Sort descending","toggleColumns":"Show/hide columns","clearSelection":"Clear selection","centerOnSelection":"Center on selection","showSelected":"Show selection","filter":"Filter","addField":"Add field","refreshData":"Refresh data","date":"Date","number":"Number","string":"String","showAllRecords":"Show all","zoomToSelection":"Zoom to selection","deleteSelection":"Delete selection","deleteSelectionCount":"Delete selection: {count}","deleteRecordsRemoved":"These records will be permanently removed","keepRecords":"Keep records","recordsCount":"Records ({count})","noLayer":"No layer","exitRelatedRecords":"Exit related records","showAllTables":"Show all tables","selectALayer":"Select a layer","exportSelectionCSV":"Export selection to CSV","noValue":"No value","editingPreventedColumn":"Editing is prevented for cells in this column.","subtypes":{"changeWarning":"The subtype {newType} may have different default values from {originalType}. Keeping the current values may cause unexpected results.","changeWarningTitle":"Subtype changed","useDefaultValuesOption":"Use default values","keepCurrentValuesOption":"Keep current values","unsupportedDomainGroupTitle":"Unsupported","fieldOutOfSubtypeDomainWarning":"This field's value is out of range for its domain."},"addAttachment":"Add attachment","attachmentsCount":"Attachments ({count})","attachmentThumbnail":"Attachment thumbnail","deleteAttachment":"Delete attachment","deleteAttachmentConfirmation":"Are you sure you want to delete the attachments?","deleteAttachmentCount":"Delete attachments ({count})","downloadAttachment":"Download attachment","dragAndDropToUpload":"Drag and drop file to upload an attachment.","editingDisabled":"Editing is disabled","editingRestricted":"Editing is restricted","errorFileName":"Upload failed. File name is too long.","errorFileSize":"Upload failed. File size too large","errorFileUnsupported":"Upload failed. File type not supported","errorOccured":"An error occurred","exitAttachments":"Exit attachments view","fileName":"File name","noAttachments":"There are no attachments","noFeature":"No feature provided","replaceFile":"Replace file","selectedCount":"Selected: {count}","selectFile":"Select file","size":"Size","updateAttachment":"Update attachment","viewAttachment":"View attachment","viewAttachments":"View attachments"}
1
+ {"widgetLabel":"Feature table","header":"{title} (Total: {count} | Selection: {selected})","headerNoSelection":"{title} (Total: {count})","untitled":"Untitled","relatedRecords":"Related records","attachments":"Attachments","loading":"Loading...","syncing":"Syncing...","errorData":"Data error.","errorLayer":"Layer error.","errorUpdateFailed":"Update failed.","errorDomainType":"Domain type is not supported.","show":"Show","hide":"Hide","menu":"Menu","options":"Options","allColums":"All columns","sortAsc":"Sort ascending","sortDesc":"Sort descending","toggleColumns":"Show/hide columns","clearSelection":"Clear selection","centerOnSelection":"Center on selection","showSelected":"Show selection","filter":"Filter","addField":"Add field","refreshData":"Refresh data","date":"Date","number":"Number","string":"String","showAllRecords":"Show all","zoomToSelection":"Zoom to selection","deleteSelection":"Delete selection","deleteSelectionCount":"Delete selection: {count}","deleteRecordsRemoved":"These records will be permanently removed","keepRecords":"Keep records","recordsCount":"Records ({count})","noLayer":"No layer","exitRelatedRecords":"Exit related records","showAllTables":"Show all tables","selectALayer":"Select a layer","exportSelectionCSV":"Export selection to CSV","noValue":"No value","editingPreventedColumn":"Editing is prevented for cells in this column.","subtypes":{"changeWarning":"The subtype {newType} may have different default values from {originalType}. Keeping the current values may cause unexpected results.","changeWarningTitle":"Subtype changed","useDefaultValuesOption":"Use default values","keepCurrentValuesOption":"Keep current values","unsupportedDomainGroupTitle":"Unsupported","fieldOutOfSubtypeDomainWarning":"This field's value is out of range for its domain."},"addAttachment":"Add attachment","attachmentsCount":"Attachments ({count})","attachmentThumbnail":"Attachment thumbnail","deleteAttachment":"Delete attachment","deleteAttachmentConfirmation":"Are you sure you want to delete the attachments?","deleteAttachmentCount":"Delete attachments ({count})","downloadAttachment":"Download attachment","dragAndDropToUpload":"Drag and drop file to upload an attachment.","editingDisabled":"Editing is disabled","editingRestricted":"Editing is restricted","errorFileName":"Upload failed. File name is too long.","errorFileSize":"Upload failed. File size too large","errorFileUnsupported":"Upload failed. File type not supported","errorOccured":"An error occurred","exitAttachments":"Exit attachments view","fileName":"File name","noAttachments":"There are no attachments","noFeature":"No feature provided","replaceFile":"Replace file","selectedCount":"Selected: {count}","selectFile":"Select file","size":"Size","updateAttachment":"Update attachment","viewAttachment":"View attachment","viewAttachments":"View attachments","noDataFound":"No data found"}
@@ -1 +1 @@
1
- {"widgetLabel":"Feature table","header":"{title} (Total: {count} | Selection: {selected})","headerNoSelection":"{title} (Total: {count})","untitled":"Untitled","relatedRecords":"Related records","attachments":"Attachments","loading":"Loading...","syncing":"Syncing...","errorData":"Data error.","errorLayer":"Layer error.","errorUpdateFailed":"Update failed.","errorDomainType":"Domain type is not supported.","show":"Show","hide":"Hide","menu":"Menu","options":"Options","allColums":"All columns","sortAsc":"Sort ascending","sortDesc":"Sort descending","toggleColumns":"Show/hide columns","clearSelection":"Clear selection","centerOnSelection":"Center on selection","showSelected":"Show selection","filter":"Filter","addField":"Add field","refreshData":"Refresh data","date":"Date","number":"Number","string":"String","showAllRecords":"Show all","zoomToSelection":"Zoom to selection","deleteSelection":"Delete selection","deleteSelectionCount":"Delete selection: {count}","deleteRecordsRemoved":"These records will be permanently removed","keepRecords":"Keep records","recordsCount":"Records ({count})","noLayer":"No layer","exitRelatedRecords":"Exit related records","showAllTables":"Show all tables","selectALayer":"Select a layer","exportSelectionCSV":"Export selection to CSV","noValue":"No value","editingPreventedColumn":"Editing is prevented for cells in this column.","subtypes":{"changeWarning":"The subtype {newType} may have different default values from {originalType}. Keeping the current values may cause unexpected results.","changeWarningTitle":"Subtype changed","useDefaultValuesOption":"Use default values","keepCurrentValuesOption":"Keep current values","unsupportedDomainGroupTitle":"Unsupported","fieldOutOfSubtypeDomainWarning":"This field's value is out of range for its domain."},"addAttachment":"Add attachment","attachmentsCount":"Attachments ({count})","attachmentThumbnail":"Attachment thumbnail","deleteAttachment":"Delete attachment","deleteAttachmentConfirmation":"Are you sure you want to delete the attachments?","deleteAttachmentCount":"Delete attachments ({count})","downloadAttachment":"Download attachment","dragAndDropToUpload":"Drag and drop file to upload an attachment.","editingDisabled":"Editing is disabled","editingRestricted":"Editing is restricted","errorFileName":"Upload failed. File name is too long.","errorFileSize":"Upload failed. File size too large","errorFileUnsupported":"Upload failed. File type not supported","errorOccured":"An error occurred","exitAttachments":"Exit attachments view","fileName":"File name","noAttachments":"There are no attachments","noFeature":"No feature provided","replaceFile":"Replace file","selectedCount":"Selected: {count}","selectFile":"Select file","size":"Size","updateAttachment":"Update attachment","viewAttachment":"View attachment","viewAttachments":"View attachments"}
1
+ {"widgetLabel":"Feature table","header":"{title} (Total: {count} | Selection: {selected})","headerNoSelection":"{title} (Total: {count})","untitled":"Untitled","relatedRecords":"Related records","attachments":"Attachments","loading":"Loading...","syncing":"Syncing...","errorData":"Data error.","errorLayer":"Layer error.","errorUpdateFailed":"Update failed.","errorDomainType":"Domain type is not supported.","show":"Show","hide":"Hide","menu":"Menu","options":"Options","allColums":"All columns","sortAsc":"Sort ascending","sortDesc":"Sort descending","toggleColumns":"Show/hide columns","clearSelection":"Clear selection","centerOnSelection":"Center on selection","showSelected":"Show selection","filter":"Filter","addField":"Add field","refreshData":"Refresh data","date":"Date","number":"Number","string":"String","showAllRecords":"Show all","zoomToSelection":"Zoom to selection","deleteSelection":"Delete selection","deleteSelectionCount":"Delete selection: {count}","deleteRecordsRemoved":"These records will be permanently removed","keepRecords":"Keep records","recordsCount":"Records ({count})","noLayer":"No layer","exitRelatedRecords":"Exit related records","showAllTables":"Show all tables","selectALayer":"Select a layer","exportSelectionCSV":"Export selection to CSV","noValue":"No value","editingPreventedColumn":"Editing is prevented for cells in this column.","subtypes":{"changeWarning":"The subtype {newType} may have different default values from {originalType}. Keeping the current values may cause unexpected results.","changeWarningTitle":"Subtype changed","useDefaultValuesOption":"Use default values","keepCurrentValuesOption":"Keep current values","unsupportedDomainGroupTitle":"Unsupported","fieldOutOfSubtypeDomainWarning":"This field's value is out of range for its domain."},"addAttachment":"Add attachment","attachmentsCount":"Attachments ({count})","attachmentThumbnail":"Attachment thumbnail","deleteAttachment":"Delete attachment","deleteAttachmentConfirmation":"Are you sure you want to delete the attachments?","deleteAttachmentCount":"Delete attachments ({count})","downloadAttachment":"Download attachment","dragAndDropToUpload":"Drag and drop file to upload an attachment.","editingDisabled":"Editing is disabled","editingRestricted":"Editing is restricted","errorFileName":"Upload failed. File name is too long.","errorFileSize":"Upload failed. File size too large","errorFileUnsupported":"Upload failed. File type not supported","errorOccured":"An error occurred","exitAttachments":"Exit attachments view","fileName":"File name","noAttachments":"There are no attachments","noFeature":"No feature provided","replaceFile":"Replace file","selectedCount":"Selected: {count}","selectFile":"Select file","size":"Size","updateAttachment":"Update attachment","viewAttachment":"View attachment","viewAttachments":"View attachments","noDataFound":"No data found"}
@@ -2,4 +2,8 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{BackgroundGrid as e}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/BackgroundGrid.glsl.js";import{BlendLayersOutput as r}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/BlendLayersOutput.js";import{TileBackground as o}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/TileBackground.glsl.js";import{TileComposite as i}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/TileComposite.glsl.js";import{Float3PassUniform as n}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{FloatPassUniform as a}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as s}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DPassUniform as l}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{ShaderBuilder as d}from"../views/webgl/ShaderBuilder.js";var t;function u(u){const g=new d,c=g.fragment;if(g.include(i),u.background===t.Only){const o=u.output===r.ColorComposite;return o?c.uniforms.add(new n("backgroundColor",(e=>e.backgroundColor))):c.include(e),c.main.add(s`fragColor = vec4(${o?s`backgroundColor`:s`gridColor(uv)`}, 1.0);`),g}return g.include(o,u),c.uniforms.add(new l("tex",(e=>e.texture)),new a("opacity",(e=>e.opacity))),c.main.add(s`fragColor = blendLayers(uv, texture(tex, uv), opacity);`),g}!function(e){e[e.BelowLayer=0]="BelowLayer",e[e.Only=1]="Only",e[e.COUNT=2]="COUNT"}(t||(t={}));const g=Object.freeze(Object.defineProperty({__proto__:null,get BackgroundMode(){return t},build:u},Symbol.toStringTag,{value:"Module"}));export{g as B,t as a,u as b};
5
+ import{BackgroundGrid as e}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/BackgroundGrid.glsl.js";import{BlendLayersOutput as r}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/BlendLayersOutput.js";import{TileBackground as o}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/TileBackground.glsl.js";import{TileComposite as i}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/TileComposite.glsl.js";import{BooleanPassUniform as n}from"../views/3d/webgl-engine/core/shaderModules/BooleanPassUniform.js";import{Float3PassUniform as l}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{FloatPassUniform as s}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as a}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DPassUniform as t}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{ShaderBuilder as d}from"../views/webgl/ShaderBuilder.js";import{isCompressedWithPremultiplyAlpha as u}from"../views/webgl/textureUtils.js";var g;function m(m){const c=new d,w=c.fragment;if(c.include(i),m.background===g.Only){const o=m.output===r.ColorComposite;return o?w.uniforms.add(new l("backgroundColor",(e=>e.backgroundColor))):w.include(e),w.main.add(a`fragColor = vec4(${o?a`backgroundColor`:a`gridColor(uv)`}, 1.0);`),c}return c.include(o,m),w.uniforms.add(new t("tex",(e=>e.texture)),new s("opacity",(e=>e.opacity)),new n("premultiplyAlpha",(e=>u(e.texture)))),w.main.add(a`vec4 color = texture(tex, uv);
6
+ if(premultiplyAlpha) {
7
+ color.rgb *= color.a;
8
+ }
9
+ fragColor = blendLayers(uv, color, opacity);`),c}!function(e){e[e.BelowLayer=0]="BelowLayer",e[e.Only=1]="Only",e[e.COUNT=2]="COUNT"}(g||(g={}));const c=Object.freeze(Object.defineProperty({__proto__:null,get BackgroundMode(){return g},build:m},Symbol.toStringTag,{value:"Module"}));export{c as B,g as a,m as b};
@@ -2,9 +2,9 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{gauss as e}from"../core/mathUtils.js";import{ScreenSpacePass as r}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{Gamma as o}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import{FloatPassUniform as t}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as s}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DPassUniform as i}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{NoParameters as l}from"../views/webgl/NoParameters.js";import{ShaderBuilder as n}from"../views/webgl/ShaderBuilder.js";var a;!function(e){e[e.Horizontal=0]="Horizontal",e[e.Vertical=1]="Vertical",e[e.COUNT=2]="COUNT"}(a||(a={}));const c={sunny:5e-4,cloudy:5e-4,rainy:.0022,snowy:.0022,foggy:.0022};class u extends l{constructor(){super(...arguments),this.blurRadius=c.sunny}}function d(l){const c=new n,u=c.fragment;c.include(r),c.include(o),u.uniforms.add(new i("colorTexture",(e=>e.color)),new t("blurRadius",(e=>e.blurRadius)));let d="";const m=15;for(let e=0;e<m;e++){d+=`locations1D[${e}] = ${(e/(m-1)*2-1).toFixed(3).toString()};`}const v=2;let f="";for(let r=0;r<m;r++){f+=`locations1DWeights[${r}] = ${e(r-Math.floor(m/2),v).toFixed(7).toString()};`}const g=l.bloomStage===a.Horizontal;return u.code.add(s`
6
- float locations1D[${s.int(m)}];
7
- float locations1DWeights[${s.int(m)}];
5
+ import{gauss as e}from"../core/mathUtils.js";import{ScreenSpacePass as r}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{Gamma as o}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import{FloatPassUniform as t}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as s}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DPassUniform as i}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{blurRadiusPresets as l}from"../views/3d/webgl-engine/effects/bloom/BloomPresets.glsl.js";import{NoParameters as n}from"../views/webgl/NoParameters.js";import{ShaderBuilder as a}from"../views/webgl/ShaderBuilder.js";var c;!function(e){e[e.Horizontal=0]="Horizontal",e[e.Vertical=1]="Vertical",e[e.COUNT=2]="COUNT"}(c||(c={}));class u extends n{constructor(){super(...arguments),this.blurRadius=l.sunny}}function m(l){const n=new a,u=n.fragment;n.include(r),n.include(o),u.uniforms.add(new i("colorTexture",(e=>e.color)),new t("blurRadius",(e=>e.blurRadius)));let m="";const d=15;for(let e=0;e<d;e++){m+=`locations1D[${e}] = ${(e/(d-1)*2-1).toFixed(3).toString()};`}const f=2;let v="";for(let r=0;r<d;r++){v+=`locations1DWeights[${r}] = ${e(r-Math.floor(d/2),f).toFixed(7).toString()};`}const g=l.bloomStage===c.Horizontal;return u.code.add(s`
6
+ float locations1D[${s.int(d)}];
7
+ float locations1DWeights[${s.int(d)}];
8
8
 
9
9
  vec4 blurUniformSamples(sampler2D toBlur) {
10
10
  vec4 res = vec4(0.0);
@@ -12,11 +12,11 @@ import{gauss as e}from"../core/mathUtils.js";import{ScreenSpacePass as r}from"..
12
12
  vec2 aspectCorrection = vec2(1.0, size.x / size.y);
13
13
  vec2 uvInPixel = uv * size;
14
14
 
15
- ${d}
16
- ${f}
15
+ ${m}
16
+ ${v}
17
17
  vec2 pixelCenterShift = 0.5 / size;
18
18
 
19
- for(int i=0;i < ${s.int(m)}; i++) {
19
+ for(int i=0;i < ${s.int(d)}; i++) {
20
20
  float uv1D = locations1D[i] + ${g?"pixelCenterShift.x":"pixelCenterShift.y"};
21
21
  vec2 uvOffset = ${g?"vec2(uv1D, 0.0)":"vec2(0.0, uv1D)"};
22
22
 
@@ -29,4 +29,4 @@ import{gauss as e}from"../core/mathUtils.js";import{ScreenSpacePass as r}from"..
29
29
 
30
30
  return res;
31
31
  }
32
- `).main.add(s`fragColor = blurUniformSamples(colorTexture);`),c}const m=Object.freeze(Object.defineProperty({__proto__:null,BloomBlurPassParameters:u,get BlurDirection(){return a},blurRadiusPresets:c,build:d},Symbol.toStringTag,{value:"Module"}));export{m as B,a,u as b,c,d};
32
+ `).main.add(s`fragColor = blurUniformSamples(colorTexture);`),n}const d=Object.freeze(Object.defineProperty({__proto__:null,BloomBlurPassParameters:u,get BlurDirection(){return c},build:m},Symbol.toStringTag,{value:"Module"}));export{d as B,c as a,u as b,m as c};
@@ -2,7 +2,7 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{ScreenSpacePass as o}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{ReadDepth as e}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js";import{Gamma as r}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import{Float2BindUniform as l}from"../views/3d/webgl-engine/core/shaderModules/Float2BindUniform.js";import{FloatPassUniform as t}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{FloatsPassUniform as a}from"../views/3d/webgl-engine/core/shaderModules/FloatsPassUniform.js";import{glsl as s}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{IntegerPassUniform as d}from"../views/3d/webgl-engine/core/shaderModules/IntegerPassUniform.js";import{Texture2DBindUniform as i}from"../views/3d/webgl-engine/core/shaderModules/Texture2DBindUniform.js";import{Texture2DPassUniform as m}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{NoParameters as n}from"../views/webgl/NoParameters.js";import{ShaderBuilder as c}from"../views/webgl/ShaderBuilder.js";class u extends n{constructor(o=p.sunny,e=[1,.8,.6,.4,.2],r=[.15,.05,.01,0,0]){super(),this.exposure=o,this.lodFactors=e,this.lodFactorsFront=r}}const p={sunny:25,cloudy:25,rainy:15,snowy:15,foggy:15},f=new u;class g extends u{constructor(){super(...arguments),this.bloomLod=-1}}function F(){const n=new c,u=n.fragment;return n.include(o),n.include(r),u.include(e),u.uniforms.add(new m("colorTexture",(o=>o.color)),new m("bloomTexture0",(o=>o.bloomTexture0)),new m("bloomTexture1",(o=>o.bloomTexture1)),new m("bloomTexture2",(o=>o.bloomTexture2)),new m("bloomTexture3",(o=>o.bloomTexture3)),new m("bloomTexture4",(o=>o.bloomTexture4)),new t("exposure",(o=>o.exposure)),new d("bloomLod",(o=>o.bloomLod)),new i("depthTexture",(o=>o.mainDepth)),new l("nearFar",(o=>o.camera.nearFar)),new a("lodFactors",(o=>o.lodFactors),5),new a("lodFactorsFront",(o=>o.lodFactorsFront),5)).code.add(s`vec3 simpleExposureTonemap(vec3 hdrColor, float exposure) {
5
+ import{ScreenSpacePass as o}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{ReadDepth as e}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js";import{Gamma as r}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import{Float2BindUniform as l}from"../views/3d/webgl-engine/core/shaderModules/Float2BindUniform.js";import{FloatPassUniform as t}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{FloatsPassUniform as a}from"../views/3d/webgl-engine/core/shaderModules/FloatsPassUniform.js";import{glsl as s}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{IntegerPassUniform as d}from"../views/3d/webgl-engine/core/shaderModules/IntegerPassUniform.js";import{Texture2DBindUniform as i}from"../views/3d/webgl-engine/core/shaderModules/Texture2DBindUniform.js";import{Texture2DPassUniform as m}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{exposurePresets as n,lodFactorsPresets as c}from"../views/3d/webgl-engine/effects/bloom/BloomPresets.glsl.js";import{NoParameters as u}from"../views/webgl/NoParameters.js";import{ShaderBuilder as p}from"../views/webgl/ShaderBuilder.js";class f extends u{constructor(o=n.sunny,e=c.sunny.far,r=c.sunny.near){super(),this.exposure=o,this.lodFactors=e,this.lodFactorsFront=r}}const g=new f;class b extends f{constructor(){super(...arguments),this.bloomLod=-1}}function F(){const n=new p,c=n.fragment;return n.include(o),n.include(r),c.include(e),c.uniforms.add(new m("colorTexture",(o=>o.color)),new m("bloomTexture0",(o=>o.bloomTexture0)),new m("bloomTexture1",(o=>o.bloomTexture1)),new m("bloomTexture2",(o=>o.bloomTexture2)),new m("bloomTexture3",(o=>o.bloomTexture3)),new m("bloomTexture4",(o=>o.bloomTexture4)),new t("exposure",(o=>o.exposure)),new d("bloomLod",(o=>o.bloomLod)),new i("depthTexture",(o=>o.mainDepth)),new l("nearFar",(o=>o.camera.nearFar)),new a("lodFactors",(o=>o.lodFactors),5),new a("lodFactorsFront",(o=>o.lodFactorsFront),5)).code.add(s`vec3 simpleExposureTonemap(vec3 hdrColor, float exposure) {
6
6
  vec3 mapped = vec3(1.0) - exp(-hdrColor * exposure);
7
7
  return mapped;
8
8
  }`).main.add(s`vec4 color = texture(colorTexture, uv);
@@ -29,4 +29,4 @@ fragColor += mix(lodFactors[4], lodFactorsFront[4], modifierFactors) * lod4;
29
29
  fragColor = bloomLod == 0 ? lodFactors[0] * lod0 : bloomLod == 1 ? lodFactors[1] * lod1 : bloomLod == 2 ? lodFactors[2] * lod2 : bloomLod == 3 ? lodFactors[3] * lod3 : bloomLod == 4 ? lodFactors[4] * lod4 : fragColor;
30
30
  fragColor = vec4(simpleExposureTonemap(fragColor.rgb, exposure), fragColor.a);
31
31
  fragColor += color;
32
- fragColor = delinearizeGamma(fragColor);`),n}const x=Object.freeze(Object.defineProperty({__proto__:null,BloomCompositionPassParameters:g,build:F,defaultCompositionParameters:f,exposurePresets:p},Symbol.toStringTag,{value:"Module"}));export{x as B,g as a,F as b,f as d,p as e};
32
+ fragColor = delinearizeGamma(fragColor);`),n}const w=Object.freeze(Object.defineProperty({__proto__:null,BloomCompositionPassParameters:b,build:F,defaultCompositionParameters:g},Symbol.toStringTag,{value:"Module"}));export{w as B,b as a,F as b,g as d};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{Float16Array as e}from"@petamoriken/float16";import{BufferViewMat3Impl as t}from"./internals/Mat3.js";import{BufferViewMat4Impl as r}from"./internals/Mat4.js";import{BufferViewScalarImpl as s}from"./internals/Scalar.js";import{BufferViewVec2Impl as f}from"./internals/Vec2.js";import{BufferViewVec3Impl as n}from"./internals/Vec3.js";import{BufferViewVec4Impl as i}from"./internals/Vec4.js";class y extends s{constructor(e,t=0,r,s){super(Float32Array,e,t,r,s),this.elementType="f32"}static fromTypedArray(e,t){return new y(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f32"}}class c extends f{constructor(t,r=0,s,f){super(e,t,r,s,f),this.elementType="f16"}slice(e,t){return this.sliceBuffer(c,e,t)}static fromTypedArray(e,t){return new c(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f16"}}class u extends f{constructor(e,t=0,r,s){super(Float32Array,e,t,r,s),this.elementType="f32"}slice(e,t){return this.sliceBuffer(u,e,t)}static fromTypedArray(e,t){return new u(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f32"}}class a extends n{constructor(e,t=0,r,s){super(Float32Array,e,t,r,s),this.elementType="f32"}slice(e,t){return this.sliceBuffer(a,e,t)}static fromTypedArray(e,t){return new a(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f32"}}class l extends i{constructor(e,t=0,r,s){super(Float32Array,e,t,r,s),this.elementType="f32"}slice(e,t){return this.sliceBuffer(l,e,t)}static fromTypedArray(e,t){return new l(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f32"}}class p extends t{constructor(e,t=0,r,s){super(Float32Array,e,t,r,s),this.elementType="f32"}slice(e,t){return this.sliceBuffer(p,e,t)}static fromTypedArray(e,t){return new p(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f32"}}class b extends t{constructor(e,t=0,r,s){super(Float64Array,e,t,r,s),this.elementType="f64"}slice(e,t){return this.sliceBuffer(b,e,t)}static fromTypedArray(e,t){return new b(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f64"}}class h extends r{constructor(e,t=0,r,s){super(Float32Array,e,t,r,s),this.elementType="f32"}slice(e,t){return this.sliceBuffer(h,e,t)}static fromTypedArray(e,t){return new h(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f32"}}class o extends r{constructor(e,t=0,r,s){super(Float64Array,e,t,r,s),this.elementType="f64"}slice(e,t){return this.sliceBuffer(o,e,t)}static fromTypedArray(e,t){return new o(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f64"}}class m extends s{constructor(e,t=0,r,s){super(Float64Array,e,t,r,s),this.elementType="f64"}slice(e,t){return this.sliceBuffer(m,e,t)}static fromTypedArray(e,t){return new m(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f64"}}class T extends f{constructor(e,t=0,r,s){super(Float64Array,e,t,r,s),this.elementType="f64"}slice(e,t){return this.sliceBuffer(T,e,t)}static fromTypedArray(e,t){return new T(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f64"}}class d extends n{constructor(e,t=0,r,s){super(Float64Array,e,t,r,s),this.elementType="f64"}slice(e,t){return this.sliceBuffer(d,e,t)}static fromTypedArray(e,t){return new d(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f64"}}class O extends i{constructor(e,t=0,r,s){super(Float64Array,e,t,r,s),this.elementType="f64"}slice(e,t){return this.sliceBuffer(O,e,t)}static fromTypedArray(e,t){return new O(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f64"}}class A extends s{constructor(e,t=0,r,s){super(Uint8Array,e,t,r,s),this.elementType="u8"}slice(e,t){return this.sliceBuffer(A,e,t)}static fromTypedArray(e,t){return new A(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="u8"}}class x extends f{constructor(e,t=0,r,s){super(Uint8Array,e,t,r,s),this.elementType="u8"}slice(e,t){return this.sliceBuffer(x,e,t)}static fromTypedArray(e,t){return new x(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="u8"}}class g extends n{constructor(e,t=0,r,s){super(Uint8Array,e,t,r,s),this.elementType="u8"}slice(e,t){return this.sliceBuffer(g,e,t)}static fromTypedArray(e,t){return new g(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="u8"}}class w extends i{constructor(e,t=0,r,s){super(Uint8Array,e,t,r,s),this.elementType="u8"}slice(e,t){return this.sliceBuffer(w,e,t)}static fromTypedArray(e,t){return new w(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="u8"}}class E extends s{constructor(e,t=0,r,s){super(Uint16Array,e,t,r,s),this.elementType="u16"}slice(e,t){return this.sliceBuffer(E,e,t)}static fromTypedArray(e,t){return new E(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="u16"}}class L extends f{constructor(e,t=0,r,s){super(Uint16Array,e,t,r,s),this.elementType="u16"}slice(e,t){return this.sliceBuffer(L,e,t)}static fromTypedArray(e,t){return new L(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="u16"}}class B extends n{constructor(e,t=0,r,s){super(Uint16Array,e,t,r,s),this.elementType="u16"}slice(e,t){return this.sliceBuffer(B,e,t)}static fromTypedArray(e,t){return new B(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="u16"}}class F extends i{constructor(e,t=0,r,s){super(Uint16Array,e,t,r,s),this.elementType="u16"}slice(e,t){return this.sliceBuffer(F,e,t)}static fromTypedArray(e,t){return new F(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="u16"}}class I extends s{constructor(e,t=0,r,s){super(Uint32Array,e,t,r,s),this.elementType="u32"}slice(e,t){return this.sliceBuffer(I,e,t)}static fromTypedArray(e,t){return new I(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="u32"}}class U extends f{constructor(e,t=0,r,s){super(Uint32Array,e,t,r,s),this.elementType="u32"}slice(e,t){return this.sliceBuffer(U,e,t)}static fromTypedArray(e,t){return new U(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="u32"}}class j extends n{constructor(e,t=0,r,s){super(Uint32Array,e,t,r,s),this.elementType="u32"}slice(e,t){return this.sliceBuffer(j,e,t)}static fromTypedArray(e,t){return new j(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="u32"}}class V extends i{constructor(e,t=0,r,s){super(Uint32Array,e,t,r,s),this.elementType="u32"}slice(e,t){return this.sliceBuffer(V,e,t)}static fromTypedArray(e,t){return new V(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="u32"}}class M extends s{constructor(e,t=0,r,s){super(Int8Array,e,t,r,s),this.elementType="i8"}slice(e,t){return this.sliceBuffer(M,e,t)}static fromTypedArray(e,t){return new M(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="i8"}}class k extends f{constructor(e,t=0,r,s){super(Int8Array,e,t,r,s),this.elementType="i8"}slice(e,t){return this.sliceBuffer(k,e,t)}static fromTypedArray(e,t){return new k(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="i8"}}class S extends n{constructor(e,t=0,r,s){super(Int8Array,e,t,r,s),this.elementType="i8"}slice(e,t){return this.sliceBuffer(S,e,t)}static fromTypedArray(e,t){return new S(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="i8"}}class q extends i{constructor(e,t=0,r,s){super(Int8Array,e,t,r,s),this.elementType="i8"}slice(e,t){return this.sliceBuffer(q,e,t)}static fromTypedArray(e,t){return new q(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="i8"}}class v extends s{constructor(e,t=0,r,s){super(Int16Array,e,t,r,s),this.elementType="i16"}slice(e,t){return this.sliceBuffer(v,e,t)}static fromTypedArray(e,t){return new v(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="i16"}}class z extends f{constructor(e,t=0,r,s){super(Int16Array,e,t,r,s),this.elementType="i16"}slice(e,t){return this.sliceBuffer(z,e,t)}static fromTypedArray(e,t){return new z(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="i16"}}class C extends n{constructor(e,t=0,r,s){super(Int16Array,e,t,r,s),this.elementType="i16"}slice(e,t){return this.sliceBuffer(C,e,t)}static fromTypedArray(e,t){return new C(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="i16"}}class D extends i{constructor(e,t=0,r,s){super(Int16Array,e,t,r,s),this.elementType="i16"}slice(e,t){return this.sliceBuffer(D,e,t)}static fromTypedArray(e,t){return new D(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="i16"}}class G extends s{constructor(e,t=0,r,s){super(Int32Array,e,t,r,s),this.elementType="i32"}slice(e,t){return this.sliceBuffer(G,e,t)}static fromTypedArray(e,t){return new G(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="i32"}}class H extends f{constructor(e,t=0,r,s){super(Int32Array,e,t,r,s),this.elementType="i32"}slice(e,t){return this.sliceBuffer(H,e,t)}static fromTypedArray(e,t){return new H(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="i32"}}class J extends n{constructor(e,t=0,r,s){super(Int32Array,e,t,r,s),this.elementType="i32"}slice(e,t){return this.sliceBuffer(J,e,t)}static fromTypedArray(e,t){return new J(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="i32"}}class K extends i{constructor(e,t=0,r,s){super(Int32Array,e,t,r,s),this.elementType="i32"}slice(e,t){return this.sliceBuffer(K,e,t)}static fromTypedArray(e,t){return new K(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="i32"}}export{y as BufferViewFloat,m as BufferViewFloat64,v as BufferViewInt16,G as BufferViewInt32,M as BufferViewInt8,p as BufferViewMat3f,b as BufferViewMat3f64,h as BufferViewMat4f,o as BufferViewMat4f64,E as BufferViewUint16,I as BufferViewUint32,A as BufferViewUint8,u as BufferViewVec2f,c as BufferViewVec2f16,T as BufferViewVec2f64,z as BufferViewVec2i16,H as BufferViewVec2i32,k as BufferViewVec2i8,L as BufferViewVec2u16,U as BufferViewVec2u32,x as BufferViewVec2u8,a as BufferViewVec3f,d as BufferViewVec3f64,C as BufferViewVec3i16,J as BufferViewVec3i32,S as BufferViewVec3i8,B as BufferViewVec3u16,j as BufferViewVec3u32,g as BufferViewVec3u8,l as BufferViewVec4f,O as BufferViewVec4f64,D as BufferViewVec4i16,K as BufferViewVec4i32,q as BufferViewVec4i8,F as BufferViewVec4u16,V as BufferViewVec4u32,w as BufferViewVec4u8};
5
+ import{Float16Array as e}from"@petamoriken/float16";import{BufferViewMat3Impl as t}from"./internals/Mat3.js";import{BufferViewMat4Impl as r}from"./internals/Mat4.js";import{BufferViewScalarImpl as s}from"./internals/Scalar.js";import{BufferViewVec2Impl as f}from"./internals/Vec2.js";import{BufferViewVec3Impl as n}from"./internals/Vec3.js";import{BufferViewVec4Impl as i}from"./internals/Vec4.js";class y extends s{constructor(t,r=0,s,f){super(e,t,r,s,f),this.elementType="f16"}static fromTypedArray(e,t){return new y(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f16"}}class c extends s{constructor(e,t=0,r,s){super(Float32Array,e,t,r,s),this.elementType="f32"}static fromTypedArray(e,t){return new c(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f32"}}class u extends f{constructor(t,r=0,s,f){super(e,t,r,s,f),this.elementType="f16"}slice(e,t){return this.sliceBuffer(u,e,t)}static fromTypedArray(e,t){return new u(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f16"}}class a extends f{constructor(e,t=0,r,s){super(Float32Array,e,t,r,s),this.elementType="f32"}slice(e,t){return this.sliceBuffer(a,e,t)}static fromTypedArray(e,t){return new a(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f32"}}class l extends n{constructor(e,t=0,r,s){super(Float32Array,e,t,r,s),this.elementType="f32"}slice(e,t){return this.sliceBuffer(l,e,t)}static fromTypedArray(e,t){return new l(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f32"}}class p extends i{constructor(t,r=0,s,f){super(e,t,r,s,f),this.elementType="f16"}slice(e,t){return this.sliceBuffer(p,e,t)}static fromTypedArray(e,t){return new p(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f16"}}class b extends i{constructor(e,t=0,r,s){super(Float32Array,e,t,r,s),this.elementType="f32"}slice(e,t){return this.sliceBuffer(b,e,t)}static fromTypedArray(e,t){return new b(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f32"}}class h extends t{constructor(e,t=0,r,s){super(Float32Array,e,t,r,s),this.elementType="f32"}slice(e,t){return this.sliceBuffer(h,e,t)}static fromTypedArray(e,t){return new h(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f32"}}class o extends t{constructor(e,t=0,r,s){super(Float64Array,e,t,r,s),this.elementType="f64"}slice(e,t){return this.sliceBuffer(o,e,t)}static fromTypedArray(e,t){return new o(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f64"}}class m extends r{constructor(e,t=0,r,s){super(Float32Array,e,t,r,s),this.elementType="f32"}slice(e,t){return this.sliceBuffer(m,e,t)}static fromTypedArray(e,t){return new m(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f32"}}class T extends r{constructor(e,t=0,r,s){super(Float64Array,e,t,r,s),this.elementType="f64"}slice(e,t){return this.sliceBuffer(T,e,t)}static fromTypedArray(e,t){return new T(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f64"}}class d extends s{constructor(e,t=0,r,s){super(Float64Array,e,t,r,s),this.elementType="f64"}slice(e,t){return this.sliceBuffer(d,e,t)}static fromTypedArray(e,t){return new d(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f64"}}class O extends f{constructor(e,t=0,r,s){super(Float64Array,e,t,r,s),this.elementType="f64"}slice(e,t){return this.sliceBuffer(O,e,t)}static fromTypedArray(e,t){return new O(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f64"}}class A extends n{constructor(e,t=0,r,s){super(Float64Array,e,t,r,s),this.elementType="f64"}slice(e,t){return this.sliceBuffer(A,e,t)}static fromTypedArray(e,t){return new A(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f64"}}class x extends i{constructor(e,t=0,r,s){super(Float64Array,e,t,r,s),this.elementType="f64"}slice(e,t){return this.sliceBuffer(x,e,t)}static fromTypedArray(e,t){return new x(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f64"}}class g extends s{constructor(e,t=0,r,s){super(Uint8Array,e,t,r,s),this.elementType="u8"}slice(e,t){return this.sliceBuffer(g,e,t)}static fromTypedArray(e,t){return new g(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="u8"}}class w extends f{constructor(e,t=0,r,s){super(Uint8Array,e,t,r,s),this.elementType="u8"}slice(e,t){return this.sliceBuffer(w,e,t)}static fromTypedArray(e,t){return new w(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="u8"}}class E extends n{constructor(e,t=0,r,s){super(Uint8Array,e,t,r,s),this.elementType="u8"}slice(e,t){return this.sliceBuffer(E,e,t)}static fromTypedArray(e,t){return new E(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="u8"}}class L extends i{constructor(e,t=0,r,s){super(Uint8Array,e,t,r,s),this.elementType="u8"}slice(e,t){return this.sliceBuffer(L,e,t)}static fromTypedArray(e,t){return new L(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="u8"}}class B extends s{constructor(e,t=0,r,s){super(Uint16Array,e,t,r,s),this.elementType="u16"}slice(e,t){return this.sliceBuffer(B,e,t)}static fromTypedArray(e,t){return new B(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="u16"}}class F extends f{constructor(e,t=0,r,s){super(Uint16Array,e,t,r,s),this.elementType="u16"}slice(e,t){return this.sliceBuffer(F,e,t)}static fromTypedArray(e,t){return new F(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="u16"}}class I extends n{constructor(e,t=0,r,s){super(Uint16Array,e,t,r,s),this.elementType="u16"}slice(e,t){return this.sliceBuffer(I,e,t)}static fromTypedArray(e,t){return new I(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="u16"}}class U extends i{constructor(e,t=0,r,s){super(Uint16Array,e,t,r,s),this.elementType="u16"}slice(e,t){return this.sliceBuffer(U,e,t)}static fromTypedArray(e,t){return new U(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="u16"}}class j extends s{constructor(e,t=0,r,s){super(Uint32Array,e,t,r,s),this.elementType="u32"}slice(e,t){return this.sliceBuffer(j,e,t)}static fromTypedArray(e,t){return new j(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="u32"}}class V extends f{constructor(e,t=0,r,s){super(Uint32Array,e,t,r,s),this.elementType="u32"}slice(e,t){return this.sliceBuffer(V,e,t)}static fromTypedArray(e,t){return new V(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="u32"}}class M extends n{constructor(e,t=0,r,s){super(Uint32Array,e,t,r,s),this.elementType="u32"}slice(e,t){return this.sliceBuffer(M,e,t)}static fromTypedArray(e,t){return new M(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="u32"}}class k extends i{constructor(e,t=0,r,s){super(Uint32Array,e,t,r,s),this.elementType="u32"}slice(e,t){return this.sliceBuffer(k,e,t)}static fromTypedArray(e,t){return new k(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="u32"}}class S extends s{constructor(e,t=0,r,s){super(Int8Array,e,t,r,s),this.elementType="i8"}slice(e,t){return this.sliceBuffer(S,e,t)}static fromTypedArray(e,t){return new S(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="i8"}}class q extends f{constructor(e,t=0,r,s){super(Int8Array,e,t,r,s),this.elementType="i8"}slice(e,t){return this.sliceBuffer(q,e,t)}static fromTypedArray(e,t){return new q(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="i8"}}class v extends n{constructor(e,t=0,r,s){super(Int8Array,e,t,r,s),this.elementType="i8"}slice(e,t){return this.sliceBuffer(v,e,t)}static fromTypedArray(e,t){return new v(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="i8"}}class z extends i{constructor(e,t=0,r,s){super(Int8Array,e,t,r,s),this.elementType="i8"}slice(e,t){return this.sliceBuffer(z,e,t)}static fromTypedArray(e,t){return new z(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="i8"}}class C extends s{constructor(e,t=0,r,s){super(Int16Array,e,t,r,s),this.elementType="i16"}slice(e,t){return this.sliceBuffer(C,e,t)}static fromTypedArray(e,t){return new C(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="i16"}}class D extends f{constructor(e,t=0,r,s){super(Int16Array,e,t,r,s),this.elementType="i16"}slice(e,t){return this.sliceBuffer(D,e,t)}static fromTypedArray(e,t){return new D(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="i16"}}class G extends n{constructor(e,t=0,r,s){super(Int16Array,e,t,r,s),this.elementType="i16"}slice(e,t){return this.sliceBuffer(G,e,t)}static fromTypedArray(e,t){return new G(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="i16"}}class H extends i{constructor(e,t=0,r,s){super(Int16Array,e,t,r,s),this.elementType="i16"}slice(e,t){return this.sliceBuffer(H,e,t)}static fromTypedArray(e,t){return new H(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="i16"}}class J extends s{constructor(e,t=0,r,s){super(Int32Array,e,t,r,s),this.elementType="i32"}slice(e,t){return this.sliceBuffer(J,e,t)}static fromTypedArray(e,t){return new J(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="i32"}}class K extends f{constructor(e,t=0,r,s){super(Int32Array,e,t,r,s),this.elementType="i32"}slice(e,t){return this.sliceBuffer(K,e,t)}static fromTypedArray(e,t){return new K(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="i32"}}class N extends n{constructor(e,t=0,r,s){super(Int32Array,e,t,r,s),this.elementType="i32"}slice(e,t){return this.sliceBuffer(N,e,t)}static fromTypedArray(e,t){return new N(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="i32"}}class P extends i{constructor(e,t=0,r,s){super(Int32Array,e,t,r,s),this.elementType="i32"}slice(e,t){return this.sliceBuffer(P,e,t)}static fromTypedArray(e,t){return new P(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="i32"}}export{c as BufferViewFloat,y as BufferViewFloat16,d as BufferViewFloat64,C as BufferViewInt16,J as BufferViewInt32,S as BufferViewInt8,h as BufferViewMat3f,o as BufferViewMat3f64,m as BufferViewMat4f,T as BufferViewMat4f64,B as BufferViewUint16,j as BufferViewUint32,g as BufferViewUint8,a as BufferViewVec2f,u as BufferViewVec2f16,O as BufferViewVec2f64,D as BufferViewVec2i16,K as BufferViewVec2i32,q as BufferViewVec2i8,F as BufferViewVec2u16,V as BufferViewVec2u32,w as BufferViewVec2u8,l as BufferViewVec3f,A as BufferViewVec3f64,G as BufferViewVec3i16,N as BufferViewVec3i32,v as BufferViewVec3i8,I as BufferViewVec3u16,M as BufferViewVec3u32,E as BufferViewVec3u8,b as BufferViewVec4f,p as BufferViewVec4f16,x as BufferViewVec4f64,H as BufferViewVec4i16,P as BufferViewVec4i32,z as BufferViewVec4i8,U as BufferViewVec4u16,k as BufferViewVec4u32,L as BufferViewVec4u8};
package/interfaces.d.ts CHANGED
@@ -114354,6 +114354,12 @@ declare namespace __esri {
114354
114354
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#multiSortEnabled Read more...}
114355
114355
  */
114356
114356
  multiSortEnabled: boolean;
114357
+ /**
114358
+ * This property can be used to override the text displayed when the table is fully loaded but no rows are available.
114359
+ *
114360
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#noDataMessage Read more...}
114361
+ */
114362
+ noDataMessage: string | nullish;
114357
114363
  /**
114358
114364
  * An array of field names from the table's data source to include when the table requests data.
114359
114365
  *
@@ -114880,6 +114886,12 @@ declare namespace __esri {
114880
114886
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#multiSortEnabled Read more...}
114881
114887
  */
114882
114888
  multiSortEnabled?: boolean;
114889
+ /**
114890
+ * This property can be used to override the text displayed when the table is fully loaded but no rows are available.
114891
+ *
114892
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#noDataMessage Read more...}
114893
+ */
114894
+ noDataMessage?: string | nullish;
114883
114895
  /**
114884
114896
  * This property accepts and returns a collection of feature object IDs.
114885
114897
  *
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{id as e}from"../../kernel.js";import t from"../../request.js";function n(e){return y(e)||o(e)}function r(e){return null!=e&&"object"==typeof e&&"type"in e&&"feature"===e.type}function i(e){return null!=e&&"object"==typeof e&&"type"in e&&"graphics"===e.type}function u(e){return null!=e&&"object"==typeof e&&"type"in e&&"map-notes"===e.type&&"sublayers"in e}function s(e){return null!=e&&"object"==typeof e&&"type"in e&&"knowledge-graph"===e.type&&"layers"in e}function a(e){return null!=e&&"object"==typeof e&&"type"in e&&"link-chart"===e.type&&"layers"in e}function o(e){return"scene"===e?.type}function c(e){return null!=e&&"object"==typeof e&&"type"in e&&"subtype-group"===e.type&&"sublayers"in e}function l(e){return"subtype-sublayer"===e?.type}function y(e){const t=e?.type;return"imagery-tile"===t||"tile"===t||"open-street-map"===t||"vector-tile"===t||"web-tile"===t||"wmts"===t}function f(e){const t=e?.type;return"base-tile"===t||"tile"===t||"elevation"===t||"imagery-tile"===t||"base-elevation"===t||"open-street-map"===t||"wcs"===t||"web-tile"===t||"wmts"===t||"vector-tile"===t}function p(e){return null!=e&&"type"in e&&"group"===e.type}const g={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function b(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function d(e){return"IntegratedMeshLayer"===e||"IntegratedMesh3DTilesLayer"===e}function m(e){return"integrated-mesh"===e||"integrated-mesh-3dtiles"===e}function h(e){return"voxel"===e?.type}function v(e){return"imagery-tile"===e?.type}function j(e){return null!=e?.parent&&"declaredClass"in e.parent&&"esri.Basemap"===e.parent.declaredClass&&e.parent.baseLayers.includes(e)}function w(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function L(e){const t=e?.type;return("feature"===t||"subtype-group"===t||"oriented-imagery"===t)&&"feature-layer"===e?.source?.type}function E(e){return"feature"===e?.type&&"feature-layer"===e.source?.type}function S(e){const t=/[:;]/,n=[];let r=!1;if(e&&(e.forEach(((e,i)=>{n.push([i,e]),!r&&t.test(e)&&(r=!0)})),n.length>0)){let e;if(r){const t={};n.forEach((e=>{t[e[0]]=e[1]})),e=JSON.stringify(t)}else{const t=[];n.forEach((e=>{t.push(e[0]+":"+e[1])})),e=t.join(";")}return e}return null}function C(e){if(!e)return;const t=[];return e.forEach(((e,n)=>{t.push('"'+n+'":'+JSON.stringify(e))})),t.length?"{"+t.join(",")+"}":void 0}function M(e){if(e.activeLayer){const t=e.activeLayer.tileMatrixSet;if(t)return t;const n=e.activeLayer.tileMatrixSets;if(n)return n}return null}async function x(n,r){const i=e?.findServerInfo(n);if(null!=i?.currentVersion)return i.owningSystemUrl||null;const u=n.toLowerCase().indexOf("/rest/services");if(-1===u)return null;const s=`${n.slice(0,u)}/rest/info`,a=null!=r?r.signal:null,{data:o}=await t(s,{query:{f:"json"},responseType:"json",signal:a});return o?.owningSystemUrl||null}function I(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"catalog-footprint":case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}function k(e){return null!=e&&"object"==typeof e&&"isTable"in e&&!!e.isTable}function O(e){return I(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function T(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":return!0;default:return!1}}function B(e){return!!T(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}function P(e){if(!e)return[];return("subtypes"in e?e.subtypes:c(e.parent)?e.parent.subtypes:[])??[]}function q(e){return("imagery"===e.type||"imagery-tile"===e.type)&&"flow"===e.renderer?.type}export{B as getEffectiveEditingEnabled,O as getEffectiveLayerCapabilities,x as getOwningPortalUrl,P as getSubtypesFromLayer,M as getTileMaxtrixSetFromActiveLayer,j as isBaseLayer,n as isBasemap3DSupportedLayer,y as isBasemapSupportedTiledLayer,w as isFeatureCollectionLayer,r as isFeatureLayer,E as isFeatureServiceLayer,i as isGraphicsLayer,p as isGroupLayer,v as isImageryTileLayer,m as isIntegratedMeshLayer,d as isIntegratedMeshOperationalLayer,s as isKnowledgeGraphLayer,I as isLayerWithFeatureCapabilities,L as isLayerWithFeatureLayerSource,q as isLayerWithFlowRenderer,a as isLinkChartLayer,u as isMapNotesLayer,o as isSceneLayer,b as isSceneServiceLayer,c as isSubtypeGroupLayer,l as isSubtypeSublayer,k as isTable,f as isTiledLayer,h as isVoxelLayer,g as sceneServiceLayerTypeToClassName,S as serializeLayerDefinitions,C as serializeTimeOptions};
5
+ import{id as e}from"../../kernel.js";import t from"../../request.js";function n(e){return y(e)||o(e)}function r(e){return null!=e&&"object"==typeof e&&"type"in e&&"feature"===e.type}function i(e){return null!=e&&"object"==typeof e&&"type"in e&&"graphics"===e.type}function u(e){return null!=e&&"object"==typeof e&&"type"in e&&"map-notes"===e.type&&"sublayers"in e}function s(e){return null!=e&&"object"==typeof e&&"type"in e&&"knowledge-graph"===e.type&&"layers"in e}function a(e){return null!=e&&"object"==typeof e&&"type"in e&&"link-chart"===e.type&&"layers"in e}function o(e){return"scene"===e?.type}function c(e){return null!=e&&"object"==typeof e&&"type"in e&&"subtype-group"===e.type&&"sublayers"in e}function l(e){return"subtype-sublayer"===e?.type}function y(e){const t=e?.type;return"imagery-tile"===t||"tile"===t||"open-street-map"===t||"vector-tile"===t||"web-tile"===t||"wmts"===t}function f(e){const t=e?.type;return"base-tile"===t||"tile"===t||"elevation"===t||"imagery-tile"===t||"base-elevation"===t||"open-street-map"===t||"wcs"===t||"web-tile"===t||"wmts"===t||"vector-tile"===t}function p(e){return null!=e&&"type"in e&&"group"===e.type}const g={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function b(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function d(e){return"IntegratedMeshLayer"===e||"IntegratedMesh3DTilesLayer"===e}function m(e){return"integrated-mesh"===e||"integrated-mesh-3dtiles"===e}function h(e){return"voxel"===e?.type}function v(e){return"imagery-tile"===e?.type}function j(e,t){return null!=e?.parent&&"declaredClass"in e.parent&&"esri.Basemap"===e.parent.declaredClass&&e.parent[t].includes(e)}function w(e){return j(e,"baseLayers")}function L(e){return j(e,"referenceLayers")}function E(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function S(e){const t=e?.type;return("feature"===t||"subtype-group"===t||"oriented-imagery"===t)&&"feature-layer"===e?.source?.type}function C(e){return"feature"===e?.type&&"feature-layer"===e.source?.type}function M(e){const t=/[:;]/,n=[];let r=!1;if(e&&(e.forEach(((e,i)=>{n.push([i,e]),!r&&t.test(e)&&(r=!0)})),n.length>0)){let e;if(r){const t={};n.forEach((e=>{t[e[0]]=e[1]})),e=JSON.stringify(t)}else{const t=[];n.forEach((e=>{t.push(e[0]+":"+e[1])})),e=t.join(";")}return e}return null}function x(e){if(!e)return;const t=[];return e.forEach(((e,n)=>{t.push('"'+n+'":'+JSON.stringify(e))})),t.length?"{"+t.join(",")+"}":void 0}function I(e){if(e.activeLayer){const t=e.activeLayer.tileMatrixSet;if(t)return t;const n=e.activeLayer.tileMatrixSets;if(n)return n}return null}async function k(n,r){const i=e?.findServerInfo(n);if(null!=i?.currentVersion)return i.owningSystemUrl||null;const u=n.toLowerCase().indexOf("/rest/services");if(-1===u)return null;const s=`${n.slice(0,u)}/rest/info`,a=null!=r?r.signal:null,{data:o}=await t(s,{query:{f:"json"},responseType:"json",signal:a});return o?.owningSystemUrl||null}function O(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"catalog-footprint":case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}function T(e){return null!=e&&"object"==typeof e&&"isTable"in e&&!!e.isTable}function B(e){return O(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function P(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":return!0;default:return!1}}function q(e){return!!P(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}function D(e){if(!e)return[];return("subtypes"in e?e.subtypes:c(e.parent)?e.parent.subtypes:[])??[]}function J(e){return("imagery"===e.type||"imagery-tile"===e.type)&&"flow"===e.renderer?.type}export{q as getEffectiveEditingEnabled,B as getEffectiveLayerCapabilities,k as getOwningPortalUrl,D as getSubtypesFromLayer,I as getTileMaxtrixSetFromActiveLayer,w as isBaseLayer,n as isBasemap3DSupportedLayer,y as isBasemapSupportedTiledLayer,E as isFeatureCollectionLayer,r as isFeatureLayer,C as isFeatureServiceLayer,i as isGraphicsLayer,p as isGroupLayer,v as isImageryTileLayer,m as isIntegratedMeshLayer,d as isIntegratedMeshOperationalLayer,s as isKnowledgeGraphLayer,O as isLayerWithFeatureCapabilities,S as isLayerWithFeatureLayerSource,J as isLayerWithFlowRenderer,a as isLinkChartLayer,u as isMapNotesLayer,L as isReferenceLayer,o as isSceneLayer,b as isSceneServiceLayer,c as isSubtypeGroupLayer,l as isSubtypeSublayer,T as isTable,f as isTiledLayer,h as isVoxelLayer,g as sceneServiceLayerTypeToClassName,M as serializeLayerDefinitions,x as serializeTimeOptions};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/core",
3
- "version": "4.33.0-next.20250320",
3
+ "version": "4.33.0-next.20250322",
4
4
  "homepage": "https://js.arcgis.com",
5
5
  "description": "ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API",
6
6
  "keywords": [
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../core/Error.js";import t from"../../../geometry/Geometry.js";import o from"../Entity.js";import i from"../Relationship.js";import{geometryToWasm as n}from"./queryToWasmEncodedFactories.js";function r(t,n){if(!t.typeName)throw new e("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits");if(t instanceof o){const e=new n.EntityValue;e.deleteLater(),e.type_name=t.typeName;for(const[o,i]of Object.entries(t.properties))e.set_key_value(o,a(i,n));return t.id&&e.set_id(t.id),e}if(t instanceof i){const e=new n.RelationshipValue;e.deleteLater(),e.type_name=t.typeName;for(const[o,i]of Object.entries(t.properties))e.set_key_value(o,a(i,n));return t.id&&e.set_id(t.id),t.originId&&t.destinationId&&e.set_related_entity_ids(t.originId,t.destinationId),e}throw new e("knowledge-graph:applyEdits-encoding-failure","Could not determine the type of a named graph object passed to the encoder")}function s(e){return{xy_resolution:e.xyResolution,x_false_origin:e.xFalseOrigin,y_false_origin:e.yFalseOrigin,z_resolution:e.zResolution,z_false_origin:e.zFalseOrigin,m_resolution:e.mResolution,m_false_origin:e.mFalseOrigin}}function a(e,o){return null==e?null:"object"!=typeof e||e instanceof Date?e:e instanceof t?n(e,o):null}export{s as inputQuantizationParametersToWasmFormat,r as namedObjectToWasm};
5
+ import e from"../../../core/Error.js";import t from"../../../geometry/Geometry.js";import{geometryToWasm as i}from"./queryToWasmEncodedFactories.js";function n(t,i){if(!t.typeName)throw new e("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits");if(!("originId"in t)){const e=new i.EntityValue;e.deleteLater(),e.type_name=t.typeName;for(const[n,o]of Object.entries(t.properties))e.set_key_value(n,r(o,i));return t.id&&e.set_id(t.id),e}if("originId"in t&&"destinationId"in t){const e=new i.RelationshipValue;e.deleteLater(),e.type_name=t.typeName;for(const[n,o]of Object.entries(t.properties))e.set_key_value(n,r(o,i));return t.id&&e.set_id(t.id),t.originId&&t.destinationId&&e.set_related_entity_ids(t.originId,t.destinationId),e}throw new e("knowledge-graph:applyEdits-encoding-failure","Could not determine the type of a named graph object passed to the encoder")}function o(e){return{xy_resolution:e.xyResolution,x_false_origin:e.xFalseOrigin,y_false_origin:e.yFalseOrigin,z_resolution:e.zResolution,z_false_origin:e.zFalseOrigin,m_resolution:e.mResolution,m_false_origin:e.mFalseOrigin}}function r(e,n){return null==e?null:"object"!=typeof e||e instanceof Date?e:e instanceof t?i(e,n):null}export{o as inputQuantizationParametersToWasmFormat,n as namedObjectToWasm};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- const b="20250320",e="03eb049d7ffb642209be27a0cb5e4d8f9a34846c";export{b as buildDate,e as commitHash};
5
+ const a="20250322",e="aefdb1e0a7ca6a8797c71febf06d79f1ce7a8214";export{a as buildDate,e as commitHash};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as i}from"../../../../chunks/tslib.es6.js";import t from"../../../../core/Accessor.js";import{lerp as e}from"../../../../core/mathUtils.js";import s from"../../../../core/PooledArray.js";import{property as r}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as a}from"../../../../core/accessorSupport/decorators/subclass.js";import{transpose as o}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as c}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{t as l,j as h,h as p,i as u,c as d}from"../../../../chunks/vec32.js";import{ZEROS as f,create as _}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{s as m,t as b,b as g}from"../../../../chunks/vec42.js";import{create as v}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{UpdatingHandles as y}from"../../../../core/support/UpdatingHandles.js";import{getReferenceEllipsoid as G}from"../../../../geometry/ellipsoidUtils.js";import{create as w,empty as S,offset as D,width as N,height as B,expand as I,intersects as j}from"../../../../geometry/support/aaBoundingRect.js";import{d as T,a as C,e as P}from"../../../../chunks/boundedPlane.js";import{create as V}from"../../../../geometry/support/ray.js";import{a as A,h as x,j as O,c as M}from"../../../../chunks/sphere.js";import{drawAccelerationStruct as E,prepare as z,drawPoly as F}from"./deconflictorDebug.js";import{VisibilityGroup as L,VisibilityFlag as X}from"./enums.js";import R from"../../webgl/RenderCamera.js";import{newIntersector as Y}from"../../webgl-engine/lib/Intersector.js";import{StoreResults as H}from"../../webgl-engine/lib/IntersectorInterfaces.js";import{applyPrecomputedScaleFactor as W}from"../../webgl-engine/lib/screenSizePerspectiveUtils.js";import{VertexAttribute as U}from"../../webgl-engine/lib/VertexAttribute.js";import{HUDMaterial as k}from"../../webgl-engine/materials/HUDMaterial.js";import{ScaleInfo as q}from"../../webgl-engine/materials/ScaleInfo.js";const J=_(),K=_(),Q=v(),Z=v(),$=_(),ii=c(),ti=M(),ei=V(),si=_(),ri=w();class ai{constructor(){this.aabr=w(),this.distance=0,this.distanceToTerrain=0,this.culled=!1,this.visible=!1}}class oi{constructor(i,t){this.graphics3DGraphic=i,this.slicePlaneEnabled=t,this.info={}}}var ci;!function(i){i[i.Idle=0]="Idle",i[i.Process=1]="Process",i[i.Sort=2]="Sort",i[i.Deconflict=3]="Deconflict",i[i.NumStates=4]="NumStates"}(ci||(ci={}));class ni{constructor(){this.camera=new R,this.slicePlane=T(),this.slicePlaneEnabled=!1}copyFrom(i){this.camera.copyFrom(i.camera),C(i.slicePlane,this.slicePlane),this.slicePlaneEnabled=i.slicePlaneEnabled}}let li=class extends t{get dirty(){return this._dirty}get state(){return this._state}constructor(i){super(i),this._dirty=!1,this._viewState=new ni,this._state=ci.Idle,this._active=new Map,this._visible=new Map,this._iterators=new fi,this._accBinsNumX=15,this._accBinsNumY=20,this._accBinsSizeX=0,this._accBinsSizeY=0,this._accBins=null,this.accNumTests=0,this._updatingHandles=new y}destroy(){this._updatingHandles.destroy(),this._active.clear(),this._visible.clear(),this._iterators=null}setDirty(){!this._dirty&&this._active.size>0&&(this._dirty=!0,this.notifyChange("updating"))}get updating(){return this._state!==ci.Idle||this._dirty||this._updatingHandles.updating}get updatingProgress(){if(!this.updating)return 1;const i=this._state/ci.NumStates;return this._dirty?.5*i:i}get running(){return this.view.ready&&null!=this.view.state&&this.updating}runTask(i){switch(this._state){case ci.Idle:this._startUpdate(),i.madeProgress();case ci.Process:if(this._state=ci.Process,!this._processActiveGraphics(i))return;case ci.Sort:if(this._state=ci.Sort,!this._sortVisibleGraphics(i))return;case ci.Deconflict:if(this._state=ci.Deconflict,!this._deconflictVisibleGraphics(i))return;default:E(this,this._visible),this._state=ci.Idle,this.notifyChange("updating")}}modifyGraphics(i,t){t?i.forEach((i=>this.addToActiveGraphics(i))):i.forEach((i=>this.removeFromActiveGraphics(i))),this.setDirty()}layerSupportsDeconfliction(i){if(null==i||"object3d"!==i.type)return!1;const t=i.stageObject;if(1!==(t?.geometries.length??0))return!1;const e=t?.geometries[0],s=e?.material;return s instanceof k}_startUpdate(){z(this.view),this._dirty=!1,this._viewState.copyFrom(this.viewState);const{fullWidth:i,fullHeight:t}=this._viewState.camera;this._initBins(i,t),this._resetIterators()}addToActiveGraphics(i){i.info[this.visibilityGroup]=new ai,this._active.set(i.graphics3DGraphic.graphic.uid,i),this.setDirty()}removeFromActiveGraphics(i){this._visible.delete(i.graphics3DGraphic.graphic.uid),hi(i,this.visibilityGroup),delete i.info[this.visibilityGroup],this._active.delete(i.graphics3DGraphic.graphic.uid),this.setDirty()}_createTerrainIntersector(){const i=Y(this.view.state.viewingMode);i.options.store=H.MIN;const t=this.view.basemapTerrain,e=this.view.state.camera;return o(ii,this._viewState.camera.viewInverseTransposeMatrix),s=>{l(K,s,ii),i.reset(e.eye,K,e),t.intersect(i,null,e.eye,K);const r=i.results.ground.dist;return null!=r?r*h(K,e.eye):0}}_processActiveGraphics(i){const t=this._ensureActiveGraphicsIterator(),e=this._viewState.camera.inverseProjectionMatrix,s="global"===this.view.viewingMode&&1===this.view.map.ground.opacity&&this._viewState.camera.relativeElevation>0,r=this.view.map.ground.opacity>0?this._createTerrainIntersector():null,a=s?ti:null;let o=0;for(null!=a&&(l(A(a),f,this._viewState.camera.viewMatrix),a[3]=G(this.view.spatialReference).radius,o=x(a,f));!i.done;){i.madeProgress();const s=t.next();if(!0===s.done)return this._resetActiveGraphicsIterator(),!0;const c=s.value,n=c?.info[this.visibilityGroup];n&&(this._collectGraphics3DGraphics(c,e,a,o,r),n.culled?(this._setGraphicVisibility(c,!1),this._visible.delete(c.graphics3DGraphic.graphic.uid)):this._visible.set(c.graphics3DGraphic.graphic.uid,c))}return!1}_sortVisibleGraphics(i){const t=this._ensureSortGraphicsIterator();for(;!i.done;){const e=t.next();if(i.madeProgress(),!0===e.done)return this._resetSortGraphicsIterator(),!0}return!1}_deconflictVisibleGraphics(i){const t=this._ensureVisibleGraphicsIterator(),e=this.visibilityGroup===L.LABEL;for(;!i.done;){i.madeProgress();const s=t.next();if(!0===s.done)return this._resetVisibleGraphicsIterator(),!0;const r=s.value,a=r.info[this.visibilityGroup];if(!a||a.culled){this._setGraphicVisibility(r,!1);continue}const o=r.graphics3DGraphic,c=!e||o.isVisible();a.visible=c&&!this._isConflicted(r),a.visible&&this._addToBins(r),this._setGraphicVisibility(r,a.visible),F(a,a.visible)}return!1}_resetIterators(){this._iterators.active=null,this._iterators.visible=null,this._iterators.sort=null}_ensureActiveGraphicsIterator(){return this._iterators.active||(this._iterators.active=pi(this._active)),this._iterators.active}_resetActiveGraphicsIterator(){this._iterators.active=null}_ensureVisibleGraphicsIterator(){return this._iterators.visible||(this._iterators.visible=pi(this._visible)),this._iterators.visible}_resetVisibleGraphicsIterator(){this._iterators.visible=null}_ensureSortGraphicsIterator(){return this._iterators.sort||(this._iterators.sort=ui(this._visible,this._iterators.sortArray,this.visibilityGroup)),this._iterators.sort}_resetSortGraphicsIterator(){this._iterators.sort=null}_collectGraphics3DGraphics(i,t,e,s,r){const a=i.graphics3DGraphic;if(a.destroyed)return;const o=i.info[this.visibilityGroup];if(!a.isVisible(L.GRAPHIC,X.DECONFLICTION))return void(o.culled=!0);const c=this.getGraphicsLayers(a);S(o.aabr);let n=null;for(const l of c){if(!this.layerSupportsDeconfliction(l))continue;const a=l.stageObject.geometries[0].material;if(null==n){if(n=gi,this._getProjectionInfo(l,t,n),n.isOutsideScreen||this._isCulledBySlice(i,J)||null!=e&&bi(n,e,s))return void(o.culled=!0);n.distanceToTerrain=r?.(n.positionView)??0}this._expandBoundingRect(o,l,a,n)}null==n?o.culled=!0:(o.distance=n.distance,o.distanceToTerrain=n.distanceToTerrain,o.culled=!1)}_getProjectionInfo(i,t,e){const s=this._viewState.camera,r=i.stageObject,a=r.geometries[0],o=a.material,c=A(r.boundingVolumeWorldSpace.bounds);l(J,c,s.viewMatrix);const n=a.attributes,h=n.get(U.NORMAL).data,d=n.get(U.CENTEROFFSETANDDISTANCE).data;o.applyShaderOffsetsView(J,h,r.transformation,d,s,e.scaleInfo,J),m(Q,J[0],J[1],J[2],1),b(Z,Q,s.projectionMatrix),p(e.positionNDC,Z,1/Z[3]),o.applyShaderOffsetsNDC(e.positionNDC,d,s,e.positionNDC,$),e.distanceWithoutPolygonOffset=s.depthNDCToWorld($[2]),e.distance=$[2]===e.positionNDC[2]?e.distanceWithoutPolygonOffset:s.depthNDCToWorld(e.positionNDC[2]),m(Z,e.positionNDC[0],e.positionNDC[1],e.positionNDC[2],1),b(Q,Z,t),g(Q,Q,1/Q[3]),u(e.positionView,J[0],J[1],J[2])}_isCulledBySlice(i,t){return i.slicePlaneEnabled&&this._viewState.slicePlaneEnabled&&P(this._viewState.slicePlane,t)}_expandBoundingRect(i,t,s,{positionNDC:r,scaleInfo:a}){const o=this._viewState.camera,c=t.getScreenSize(_i);W(c,a.factor,c),c[0]*=o.pixelRatio,c[1]*=o.pixelRatio;const n=D(s.calculateRelativeScreenBounds(c,a.factorAlignment.scale,ri),e(0,o.fullWidth,.5+.5*r[0]),e(0,o.fullHeight,.5+.5*r[1])),l=this.marginFactor;if(0!==l){const i=l*Math.min(N(n),B(n));n[0]-=i,n[1]-=i,n[2]+=i,n[3]+=i}I(i.aabr,n,i.aabr)}_isConflicted(i){const t=i.graphics3DGraphic.graphic.uid,e=i.info[this.visibilityGroup];let s=!0;for(let r=Math.floor(e.aabr[0]/this._accBinsSizeX);r<=Math.floor(e.aabr[2]/this._accBinsSizeX);r++)if(!(r<0||r>=this._accBinsNumX))for(let i=Math.floor(e.aabr[1]/this._accBinsSizeY);i<=Math.floor(e.aabr[3]/this._accBinsSizeY);i++){if(i<0||i>=this._accBinsNumY)continue;s=!1;const a=this._accBins[r][i];for(let i=0;i<a.length;i++){const s=a.data[i],r=s.info[this.visibilityGroup];if(r&&r.visible&&s.graphics3DGraphic.graphic.uid!==t&&(this.accNumTests++,j(r.aabr,e.aabr)))return!0}}return s}_initBins(i,t){if(null==this._accBins){this._accBins=[];for(let i=0;i<this._accBinsNumX;i++){this._accBins.push([]);const i=this._accBins[this._accBins.length-1];for(let t=0;t<this._accBinsNumY;t++)i.push(new s)}}else for(let e=0;e<this._accBinsNumX;e++)for(let i=0;i<this._accBinsNumY;i++)this._accBins[e][i].clear();this._accBinsSizeX=i/this._accBinsNumX,this._accBinsSizeY=t/this._accBinsNumY,this.accNumTests=0}_addToBins(i){const t=i.info[this.visibilityGroup],e=Math.floor(t.aabr[0]/this._accBinsSizeX),s=Math.floor(t.aabr[2]/this._accBinsSizeX),r=Math.floor(t.aabr[1]/this._accBinsSizeY),a=Math.floor(t.aabr[3]/this._accBinsSizeY);for(let o=e;o<=s;o++)if(!(o<0||o>=this._accBinsNumX))for(let t=r;t<=a;t++)t<0||t>=this._accBinsNumY||this._accBins[o][t].push(i)}_setGraphicVisibility(i,t){const e=i.graphics3DGraphic;e.destroyed||(e.setVisibilityFlag(this.visibilityGroup,X.DECONFLICTION,t),this.visibilityGroup===L.LABEL&&this.view.labeler.setLabelGraphicVisibility(e,t))}};function hi(i,t){const e=i.graphics3DGraphic;e.destroyed||e.setVisibilityFlag(t,X.DECONFLICTION,!0)}function*pi(i){if(Map.prototype.entries){const t=i.entries();for(let i=t.next();!i.done;i=t.next())yield i.value[1]}else yield*i.values()}function*ui(i,t,e){t.clear(),i.forEach(((i,s)=>{const r=t.pushNew();r.id=s,r.visible=i.graphics3DGraphic.getVisibilityFlag(e,X.DECONFLICTION);const a=i.info?.[e];r.prio=i.graphics3DGraphic.deconflictionPriority,r.distance=a?a.distance:Number.MAX_VALUE,r.behindTerrain=!!a&&0!==a.distanceToTerrain&&a.distance>a.distanceToTerrain})),yield;const s=t.iterableSort(((i,t)=>i.behindTerrain!==t.behindTerrain?+i.behindTerrain-+t.behindTerrain:i.prio!==t.prio?t.prio-i.prio:i.distance!==t.distance?i.distance-t.distance:i.visible!==t.visible?+t.visible-+i.visible:i.id-t.id));for(let r=s.next();!r.done;r=s.next())yield;t.forAll((t=>{const e=i.get(t.id);e&&(i.delete(t.id),i.set(t.id,e))})),t.clear()}i([r({constructOnly:!0})],li.prototype,"view",void 0),i([r({type:Boolean,readOnly:!0})],li.prototype,"updating",null),i([r({readOnly:!0})],li.prototype,"_updatingHandles",void 0),li=i([a("esri.views.3d.layers.graphics.Deconflictor")],li);class di{constructor(){this.id=0,this.visible=!1,this.behindTerrain=!1,this.prio=0,this.distance=0}}class fi{constructor(i=null,t=null,e=null){this.active=i,this.visible=t,this.sort=e,this.sortArray=new s({allocator:i=>i||new di})}}const _i=n();class mi{constructor(){this.positionView=_(),this.positionNDC=_(),this.distance=0,this.distanceToTerrain=0,this.distanceWithoutPolygonOffset=0,this.scaleInfo=new q}get isOutsideScreen(){const i=this.positionNDC;return i[0]<-1||i[1]<-1||i[2]<-1||i[0]>=1||i[1]>=1||i[2]>=1}}function bi(i,t,e){return d(ei.direction,i.positionView),u(ei.origin,0,0,0),!!O(t,ei,si)&&i.distanceWithoutPolygonOffset>e}const gi=new mi;export{li as Deconflictor,oi as DeconflictorGraphic,ni as DeconflictorViewState,ci as State};
5
+ import{_ as i}from"../../../../chunks/tslib.es6.js";import t from"../../../../core/Accessor.js";import{lerp as s}from"../../../../core/mathUtils.js";import e from"../../../../core/PooledArray.js";import{property as r}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as a}from"../../../../core/accessorSupport/decorators/subclass.js";import{transpose as o}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as c}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{t as l,j as h,h as p,i as u,c as d}from"../../../../chunks/vec32.js";import{ZEROS as _,create as f}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{s as m,t as b,b as g}from"../../../../chunks/vec42.js";import{create as v}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{UpdatingHandles as y}from"../../../../core/support/UpdatingHandles.js";import{getReferenceEllipsoid as G}from"../../../../geometry/ellipsoidUtils.js";import{create as w,empty as S,offset as B,width as N,height as D,expand as I,intersects as T}from"../../../../geometry/support/aaBoundingRect.js";import{d as j,a as C,e as P}from"../../../../chunks/boundedPlane.js";import{create as V}from"../../../../geometry/support/ray.js";import{a as A,h as x,j as O,c as M}from"../../../../chunks/sphere.js";import{drawAccelerationStruct as E,prepare as z,drawPoly as X}from"./deconflictorDebug.js";import{VisibilityGroup as Y,VisibilityFlag as F}from"./enums.js";import L from"../../webgl/RenderCamera.js";import{newIntersector as R}from"../../webgl-engine/lib/Intersector.js";import{StoreResults as H}from"../../webgl-engine/lib/IntersectorInterfaces.js";import{applyPrecomputedScaleFactor as W}from"../../webgl-engine/lib/screenSizePerspectiveUtils.js";import{VertexAttribute as U}from"../../webgl-engine/lib/VertexAttribute.js";import{HUDMaterial as k}from"../../webgl-engine/materials/HUDMaterial.js";import{ScaleInfo as q}from"../../webgl-engine/materials/ScaleInfo.js";const J=f(),K=f(),Q=v(),Z=v(),$=f(),ii=c(),ti=M(),si=V(),ei=f(),ri=w();class ai{constructor(){this.aabr=w(),this.distance=0,this.distanceToTerrain=0,this.culled=!1,this.visible=!1}}class oi{constructor(i,t){this.graphics3DGraphic=i,this.slicePlaneEnabled=t,this.info={}}}var ci;!function(i){i[i.Idle=0]="Idle",i[i.Process=1]="Process",i[i.Sort=2]="Sort",i[i.Deconflict=3]="Deconflict",i[i.NumStates=4]="NumStates"}(ci||(ci={}));class ni{constructor(){this.camera=new L,this.slicePlane=j(),this.slicePlaneEnabled=!1}copyFrom(i){this.camera.copyFrom(i.camera),C(i.slicePlane,this.slicePlane),this.slicePlaneEnabled=i.slicePlaneEnabled}}let li=class extends t{get dirty(){return this._dirty}get state(){return this._state}constructor(i){super(i),this._dirty=!1,this._viewState=new ni,this._state=ci.Idle,this._active=new Map,this._visible=new Map,this._iterators=new _i,this._accBinsNumX=15,this._accBinsNumY=20,this._accBinsSizeX=0,this._accBinsSizeY=0,this._accBins=null,this._accNumTests=0,this._updatingHandles=new y}destroy(){this._updatingHandles.destroy(),this._active.clear(),this._visible.clear(),this._iterators=null}setDirty(){!this._dirty&&this._active.size>0&&(this._dirty=!0,this.notifyChange("updating"))}get updating(){return this._state!==ci.Idle||this._dirty||this._updatingHandles.updating}get updatingProgress(){if(!this.updating)return 1;const i=this._state/ci.NumStates;return this._dirty?.5*i:i}get running(){return this.view.ready&&null!=this.view.state&&this.updating}runTask(i){switch(this._state){case ci.Idle:this._startUpdate(),i.madeProgress();case ci.Process:if(this._state=ci.Process,!this._processActiveGraphics(i))return;case ci.Sort:if(this._state=ci.Sort,!this._sortVisibleGraphics(i))return;case ci.Deconflict:if(this._state=ci.Deconflict,!this._deconflictVisibleGraphics(i))return;default:E((()=>({bins:this._accBins,numX:this._accBinsNumX,numY:this._accBinsNumY,sizeX:this._accBinsSizeX,sizeY:this._accBinsSizeY,numTests:this._accNumTests,numVisible:this._visible.size}))),this._state=ci.Idle,this.notifyChange("updating")}}modifyGraphics(i,t){t?i.forEach((i=>this.addToActiveGraphics(i))):i.forEach((i=>this.removeFromActiveGraphics(i))),this.setDirty()}layerSupportsDeconfliction(i){if(null==i||"object3d"!==i.type)return!1;const t=i.stageObject;if(1!==(t?.geometries.length??0))return!1;const s=t?.geometries[0],e=s?.material;return e instanceof k}_startUpdate(){z(this.view),this._dirty=!1,this._viewState.copyFrom(this.viewState);const{fullWidth:i,fullHeight:t}=this._viewState.camera;this._initBins(i,t),this._resetIterators()}addToActiveGraphics(i){i.info[this.visibilityGroup]=new ai,this._active.set(i.graphics3DGraphic.graphic.uid,i),this.setDirty()}removeFromActiveGraphics(i){this._visible.delete(i.graphics3DGraphic.graphic.uid),hi(i,this.visibilityGroup),delete i.info[this.visibilityGroup],this._active.delete(i.graphics3DGraphic.graphic.uid),this.setDirty()}_createTerrainIntersector(){const i=R(this.view.state.viewingMode);i.options.store=H.MIN;const t=this.view.basemapTerrain,s=this.view.state.camera;return o(ii,this._viewState.camera.viewInverseTransposeMatrix),e=>{l(K,e,ii),i.reset(s.eye,K,s),t.intersect(i,null,s.eye,K);const r=i.results.ground.dist;return null!=r?r*h(K,s.eye):0}}_processActiveGraphics(i){const t=this._ensureActiveGraphicsIterator(),s=this._viewState.camera.inverseProjectionMatrix,e="global"===this.view.viewingMode&&1===this.view.map.ground.opacity&&this._viewState.camera.relativeElevation>0,r=this.view.map.ground.opacity>0?this._createTerrainIntersector():null,a=e?ti:null;let o=0;for(null!=a&&(l(A(a),_,this._viewState.camera.viewMatrix),a[3]=G(this.view.spatialReference).radius,o=x(a,_));!i.done;){i.madeProgress();const e=t.next();if(!0===e.done)return this._resetActiveGraphicsIterator(),!0;const c=e.value,n=c?.info[this.visibilityGroup];n&&(this._collectGraphics3DGraphics(c,s,a,o,r),n.culled?(this._setGraphicVisibility(c,!1),this._visible.delete(c.graphics3DGraphic.graphic.uid)):this._visible.set(c.graphics3DGraphic.graphic.uid,c))}return!1}_sortVisibleGraphics(i){const t=this._ensureSortGraphicsIterator();for(;!i.done;){const s=t.next();if(i.madeProgress(),!0===s.done)return this._resetSortGraphicsIterator(),!0}return!1}_deconflictVisibleGraphics(i){const t=this._ensureVisibleGraphicsIterator(),s=this.visibilityGroup===Y.LABEL;for(;!i.done;){i.madeProgress();const e=t.next();if(!0===e.done)return this._resetVisibleGraphicsIterator(),!0;const r=e.value,a=r.info[this.visibilityGroup];if(!a||a.culled){this._setGraphicVisibility(r,!1);continue}const o=r.graphics3DGraphic,c=!s||o.isVisible();a.visible=c&&!this._isConflicted(r),a.visible&&this._addToBins(r),this._setGraphicVisibility(r,a.visible),X(a,a.visible)}return!1}_resetIterators(){this._iterators.active=null,this._iterators.visible=null,this._iterators.sort=null}_ensureActiveGraphicsIterator(){return this._iterators.active||(this._iterators.active=pi(this._active)),this._iterators.active}_resetActiveGraphicsIterator(){this._iterators.active=null}_ensureVisibleGraphicsIterator(){return this._iterators.visible||(this._iterators.visible=pi(this._visible)),this._iterators.visible}_resetVisibleGraphicsIterator(){this._iterators.visible=null}_ensureSortGraphicsIterator(){return this._iterators.sort||(this._iterators.sort=ui(this._visible,this._iterators.sortArray,this.visibilityGroup)),this._iterators.sort}_resetSortGraphicsIterator(){this._iterators.sort=null}_collectGraphics3DGraphics(i,t,s,e,r){const a=i.graphics3DGraphic;if(a.destroyed)return;const o=i.info[this.visibilityGroup];if(!a.isVisible(Y.GRAPHIC,F.DECONFLICTION))return void(o.culled=!0);const c=this.getGraphicsLayers(a);S(o.aabr);let n=null;for(const l of c){if(!this.layerSupportsDeconfliction(l))continue;const a=l.stageObject.geometries[0].material;if(null==n){if(n=gi,this._getProjectionInfo(l,t,n),n.isOutsideScreen||this._isCulledBySlice(i,J)||null!=s&&bi(n,s,e))return void(o.culled=!0);n.distanceToTerrain=r?.(n.positionView)??0}this._expandBoundingRect(o,l,a,n)}null==n?o.culled=!0:(o.distance=n.distance,o.distanceToTerrain=n.distanceToTerrain,o.culled=!1)}_getProjectionInfo(i,t,s){const e=this._viewState.camera,r=i.stageObject,a=r.geometries[0],o=a.material,c=A(r.boundingVolumeWorldSpace.bounds);l(J,c,e.viewMatrix);const n=a.attributes,h=n.get(U.NORMAL).data,d=n.get(U.CENTEROFFSETANDDISTANCE).data;o.applyShaderOffsetsView(J,h,r.transformation,d,e,s.scaleInfo,J),m(Q,J[0],J[1],J[2],1),b(Z,Q,e.projectionMatrix),p(s.positionNDC,Z,1/Z[3]),o.applyShaderOffsetsNDC(s.positionNDC,d,e,s.positionNDC,$),s.distanceWithoutPolygonOffset=e.depthNDCToWorld($[2]),s.distance=$[2]===s.positionNDC[2]?s.distanceWithoutPolygonOffset:e.depthNDCToWorld(s.positionNDC[2]),m(Z,s.positionNDC[0],s.positionNDC[1],s.positionNDC[2],1),b(Q,Z,t),g(Q,Q,1/Q[3]),u(s.positionView,J[0],J[1],J[2])}_isCulledBySlice(i,t){return i.slicePlaneEnabled&&this._viewState.slicePlaneEnabled&&P(this._viewState.slicePlane,t)}_expandBoundingRect(i,t,e,{positionNDC:r,scaleInfo:a}){const o=this._viewState.camera,c=t.getScreenSize(fi);W(c,a.factor,c),c[0]*=o.pixelRatio,c[1]*=o.pixelRatio;const n=B(e.calculateRelativeScreenBounds(c,a.factorAlignment.scale,ri),s(0,o.fullWidth,.5+.5*r[0]),s(0,o.fullHeight,.5+.5*r[1])),l=this.marginFactor;if(0!==l){const i=l*Math.min(N(n),D(n));n[0]-=i,n[1]-=i,n[2]+=i,n[3]+=i}I(i.aabr,n,i.aabr)}_isConflicted(i){const t=i.graphics3DGraphic.graphic.uid,s=i.info[this.visibilityGroup];let e=!0;for(let r=Math.floor(s.aabr[0]/this._accBinsSizeX);r<=Math.floor(s.aabr[2]/this._accBinsSizeX);r++)if(!(r<0||r>=this._accBinsNumX))for(let i=Math.floor(s.aabr[1]/this._accBinsSizeY);i<=Math.floor(s.aabr[3]/this._accBinsSizeY);i++){if(i<0||i>=this._accBinsNumY)continue;e=!1;const a=this._accBins[r][i];for(let i=0;i<a.length;i++){const e=a.data[i],r=e.info[this.visibilityGroup];if(r&&r.visible&&e.graphics3DGraphic.graphic.uid!==t&&(this._accNumTests++,T(r.aabr,s.aabr)))return!0}}return e}_initBins(i,t){if(null==this._accBins){this._accBins=[];for(let i=0;i<this._accBinsNumX;i++){this._accBins.push([]);const i=this._accBins[this._accBins.length-1];for(let t=0;t<this._accBinsNumY;t++)i.push(new e)}}else for(let s=0;s<this._accBinsNumX;s++)for(let i=0;i<this._accBinsNumY;i++)this._accBins[s][i].clear();this._accBinsSizeX=i/this._accBinsNumX,this._accBinsSizeY=t/this._accBinsNumY,this._accNumTests=0}_addToBins(i){const t=i.info[this.visibilityGroup],s=Math.floor(t.aabr[0]/this._accBinsSizeX),e=Math.floor(t.aabr[2]/this._accBinsSizeX),r=Math.floor(t.aabr[1]/this._accBinsSizeY),a=Math.floor(t.aabr[3]/this._accBinsSizeY);for(let o=s;o<=e;o++)if(!(o<0||o>=this._accBinsNumX))for(let t=r;t<=a;t++)t<0||t>=this._accBinsNumY||this._accBins[o][t].push(i)}_setGraphicVisibility(i,t){const s=i.graphics3DGraphic;s.destroyed||(s.setVisibilityFlag(this.visibilityGroup,F.DECONFLICTION,t),this.visibilityGroup===Y.LABEL&&this.view.labeler.setLabelGraphicVisibility(s,t))}};function hi(i,t){const s=i.graphics3DGraphic;s.destroyed||s.setVisibilityFlag(t,F.DECONFLICTION,!0)}function*pi(i){if(Map.prototype.entries){const t=i.entries();for(let i=t.next();!i.done;i=t.next())yield i.value[1]}else yield*i.values()}function*ui(i,t,s){t.clear(),i.forEach(((i,e)=>{const r=t.pushNew();r.id=e,r.visible=i.graphics3DGraphic.getVisibilityFlag(s,F.DECONFLICTION);const a=i.info?.[s];r.prio=i.graphics3DGraphic.deconflictionPriority,r.distance=a?a.distance:Number.MAX_VALUE,r.behindTerrain=!!a&&0!==a.distanceToTerrain&&a.distance>a.distanceToTerrain})),yield;const e=t.iterableSort(((i,t)=>i.behindTerrain!==t.behindTerrain?+i.behindTerrain-+t.behindTerrain:i.prio!==t.prio?t.prio-i.prio:i.distance!==t.distance?i.distance-t.distance:i.visible!==t.visible?+t.visible-+i.visible:i.id-t.id));for(let r=e.next();!r.done;r=e.next())yield;t.forAll((t=>{const s=i.get(t.id);s&&(i.delete(t.id),i.set(t.id,s))})),t.clear()}i([r({constructOnly:!0})],li.prototype,"view",void 0),i([r({type:Boolean,readOnly:!0})],li.prototype,"updating",null),i([r({readOnly:!0})],li.prototype,"_updatingHandles",void 0),li=i([a("esri.views.3d.layers.graphics.Deconflictor")],li);class di{constructor(){this.id=0,this.visible=!1,this.behindTerrain=!1,this.prio=0,this.distance=0}}class _i{constructor(i=null,t=null,s=null){this.active=i,this.visible=t,this.sort=s,this.sortArray=new e({allocator:i=>i||new di})}}const fi=n();class mi{constructor(){this.positionView=f(),this.positionNDC=f(),this.distance=0,this.distanceToTerrain=0,this.distanceWithoutPolygonOffset=0,this.scaleInfo=new q}get isOutsideScreen(){const i=this.positionNDC;return i[0]<-1||i[1]<-1||i[2]<-1||i[0]>=1||i[1]>=1||i[2]>=1}}function bi(i,t,s){return d(si.direction,i.positionView),u(si.origin,0,0,0),!!O(t,si,ei)&&i.distanceWithoutPolygonOffset>s}const gi=new mi;export{li as Deconflictor,oi as DeconflictorGraphic,ni as DeconflictorViewState,ci as State};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{debugFlags as t}from"../../support/debugFlags.js";let e,n,i=!1,l=!1,o=!1,s=!1,a=null;function c(t,e){if(!l||!n)return;u();const i=n;let o=0;for(let n=0;n<t.accBinsNumX;n++)for(let e=0;e<t.accBinsNumY;e++){const l=t.accBins[n][t.accBinsNumY-1-e];o+=l.length;const s=n*t.accBinsSizeX,a=(n+1)*t.accBinsSizeX,c=e*t.accBinsSizeY,r=(e+1)*t.accBinsSizeY;i.fillText(l.length.toFixed(),s+5,c+15),h(s,a,c,r,"blue")}i.fillText("total totalShownLabels: "+o,70,40),i.fillText("total visible labels: "+e.size,70,50),i.fillText("total numTests: "+t.accNumTests,70,30)}function r(n){o=t.DECONFLICTOR_SHOW_VISIBLE,s=t.DECONFLICTOR_SHOW_INVISIBLE,i=o||s,l=t.DECONFLICTOR_SHOW_GRID,a=null,i||l?a=()=>p(n):e&&(e.parentElement.removeChild(e),e=null)}function u(){a&&(a(),a=null)}function p(t){null==e&&(e=document.createElement("canvas"),e.setAttribute("id","debugCanvas2d"),t.surface.parentElement.style.position="relative",t.surface.parentElement.appendChild(e));const{state:i}=t,{camera:l,pixelRatio:o}=i,{width:s,height:a}=l,c=s*o,r=a*o;e.setAttribute("width",`${c}px`),e.setAttribute("height",`${r}px`),e.setAttribute("style",`position:absolute;left:0px;top:0px;display:block;pointer-events:none;width:${s}px;height:${a}px`),n=e.getContext("2d"),n.clearRect(0,0,s,a),n.font="12px Arial"}function h(t,i,l,o,s){u();const a=e.height,c=n;c.beginPath(),c.lineWidth=1,c.strokeStyle=s,c.moveTo(t,a-l),c.lineTo(i,a-l),c.stroke(),c.lineTo(i,a-o),c.stroke(),c.lineTo(i,a-l),c.stroke(),c.lineTo(t,a-l),c.stroke(),c.lineTo(t,a-l),c.stroke(),c.closePath()}function f(t,e){i&&(e&&o||!e&&s)&&h(t.aabr[0],t.aabr[2],t.aabr[1],t.aabr[3],e?"green":"red")}export{c as drawAccelerationStruct,f as drawPoly,r as prepare};
5
+ import{debugFlags as e}from"../../support/debugFlags.js";let t,l,n=!1,i=!1,o=!1,s=!1,a=null;function r(e){const t=i?e():null;if(!t?.bins)return;c();const n=l;let o=0;for(let l=0;l<t.numX;l++)for(let e=0;e<t.numY;e++){const i=t.bins[l][t.numY-1-e];o+=i.length;const s=l*t.sizeX,a=(l+1)*t.sizeX,r=e*t.sizeY,u=(e+1)*t.sizeY;n.fillText(i.length.toFixed(),s+5,r+15),b(s,a,r,u,"blue")}n.fillText("total totalShownLabels: "+o,70,40),n.fillText("total visible labels: "+t.numVisible,70,50),n.fillText("total numTests: "+t.numTests,70,30)}function u(r){o=e.DECONFLICTOR_SHOW_VISIBLE,s=e.DECONFLICTOR_SHOW_INVISIBLE,n=o||s,i=e.DECONFLICTOR_SHOW_GRID,a=null,n||i?(l&&t&&l.clearRect(0,0,t.width,t.height),a=()=>h(r)):t&&(t.parentElement.removeChild(t),t=null)}function c(){a&&(a(),a=null)}function h(e){null==t&&(t=document.createElement("canvas"),t.setAttribute("id","debugCanvas2d"),e.surface.parentElement.style.position="relative",e.surface.parentElement.appendChild(t),t.style.position="absolute",t.style.width="100%",t.style.height="100%",t.style.display="block",t.style.pointerEvents="none",l=t.getContext("2d"),l.font="12px Arial");const{width:n,height:i}=e.state.camera;t.width=n,t.height=i}function b(e,n,i,o,s){c();const a=t.height,r=l;r.beginPath(),r.lineWidth=1,r.strokeStyle=s,r.moveTo(e,a-i),r.lineTo(n,a-i),r.stroke(),r.lineTo(n,a-o),r.stroke(),r.lineTo(e,a-o),r.stroke(),r.lineTo(e,a-i),r.stroke(),r.closePath()}function d(e,t){n&&(t&&o||!t&&s)&&b(e.aabr[0],e.aabr[2],e.aabr[1],e.aabr[3],t?"green":"red")}export{r as drawAccelerationStruct,d as drawPoly,u as prepare};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Accessor.js";import r from"../../../core/Evented.js";import{when as o}from"../../../core/reactiveUtils.js";import{property as a}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as i}from"../../../core/accessorSupport/decorators/subclass.js";import{afterDispatch as s}from"../../../core/accessorSupport/watch.js";import{fromValues as n}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as l}from"../../../geometry/ellipsoidUtils.js";import p from"../../ViewAnimation.js";import{ViewingMode as c,viewingModeFromString as m}from"../../ViewingMode.js";import{Constraints as h}from"./Constraints.js";import{AnimationController as d}from"./controllers/AnimationController.js";import{State as u}from"./controllers/CameraController.js";import g from"../webgl/RenderCamera.js";import{PaddingSide as y}from"../webgl-engine/lib/rendererUtils.js";import{maximumHighlights as C}from"../../support/HighlightDefaults.js";import{PropertiesPool as f}from"../../support/PropertiesPool.js";import{RenderState as w}from"../../support/RenderState.js";let _=class extends t{constructor(e){super(e),this._propertiesPool=new f({camera:g},this),this._lastSeenCameraProjectionValues=new g,this.mode=w.ANIMATING,this._cssCamera=new g,this._camera=new g,this.rasterPixelRatio=1,this.contentPixelRatio=1,this.constraints=new h({state:this}),this.events=new r,this._cameraChanged=!1,this._updateQueue=new Array,this._processingUpdates=!1}reset(){this.cameraController=null,this._propertiesPool.destroy(),this._propertiesPool=new f({camera:g},this)}destroy(){this.cameraController=null,this._propertiesPool?.destroy(),this._propertiesPool=null}createInitialCamera(){if(this.viewingMode===c.Global){const e=l(this.spatialReference).radius;this.camera=new g({eye:n(4*e,0,0),center:n(e,0,0),up:n(0,0,1)})}else this.camera=new g({eye:n(0,0,100),center:n(0,0,0),up:n(0,1,0)})}get animation(){return this.cameraController instanceof d&&null!=this.cameraController.viewAnimation?this.cameraController.viewAnimation:null}get cssCamera(){const e=this._cssCamera.copyFrom(this.camera),{height:t,width:r,pixelRatio:o}=this.camera;return e.pixelRatio=1,e.height=Math.round(t/o),e.width=Math.round(r/o),e}get camera(){return this._camera}set camera(e){e!==O&&O.copyFrom(e),O.computeUp(this.viewingMode),this.events.emit("before-camera-change",O);const t=this._camera;if(j(this._lastSeenCameraProjectionValues,O)&&(this._lastSeenCameraProjectionValues.copyFrom(O),this.events.emit("camera-projection-changed",this._lastSeenCameraProjectionValues)),!t.equals(O)&&(this._camera=this._propertiesPool.get("camera").copyFrom(O),this._cameraChanged=!t.almostEquals(O),this._cameraChanged)){const e=s((()=>{this._cameraChanged=!1,e.remove()}))}}get pixelRatio(){return this.camera.pixelRatio}get alignPixelEnabled(){return this.pixelRatio===this.rasterPixelRatio&&this.mode===w.IDLE}get updating(){return this.mode!==w.IDLE}get contentCamera(){return this._contentCamera??this.camera}set contentCamera(e){this._contentCamera=null!=e?e.clone():null}get fixedContentCamera(){return null!=this._contentCamera}get isGlobal(){return this.viewingMode===c.Global}get isLocal(){return this.viewingMode===c.Local}get viewingMode(){return m(this.view.viewingMode)}get spatialReference(){return this.view.spatialReference}get highlights(){const e=this.view.highlights.items.slice(0,C);for(let t=0;t<e.length;){const r=e[t],o=e.findIndex((e=>e.name===r.name));o>=0&&t>o?e.splice(t,1):++t}return e}get highlightOrderMap(){const e=new Map;return this.highlights.forEach(((t,r)=>e.set(t.name,r))),e}get navigating(){return!!this.cameraController?.isInteractive}get stationary(){return!this._cameraChanged&&!this.navigating}get cameraController(){return this._get("cameraController")}set cameraController(e){this.stopActiveCameraController()?(this.cameraController?.destroy(),e&&(this.removeHandles(P),this.addHandles(o((()=>e.state===u.Finished||e.state===u.Stopped),(()=>{this._set("cameraController",null),this.updateCamera((t=>e.onControllerEnd(t)))}),{sync:!0,once:!0}),P),e.onControllerStart(this.camera)),this._set("cameraController",e)):e&&(e.state=u.Rejected)}switchCameraController(e){this.cameraController=e}stopActiveCameraController(){return!this.cameraController||this.cameraController.stopController()}updateCamera(e){this._updateQueue.push(e),this._processUpdateQueue()}_processUpdateQueue(){if(0===this._updateQueue.length||this._processingUpdates)return;this._processingUpdates=!0;const e=this._updateQueue.shift();O.copyFrom(this._get("camera")),e(O),this.camera=O,this._processingUpdates=!1,this._processUpdateQueue()}};e([a({constructOnly:!0})],_.prototype,"view",void 0),e([a()],_.prototype,"mode",void 0),e([a({readOnly:!0,type:p})],_.prototype,"animation",null),e([a({type:g})],_.prototype,"cssCamera",null),e([a()],_.prototype,"_cssCamera",void 0),e([a({type:g})],_.prototype,"camera",null),e([a()],_.prototype,"_camera",void 0),e([a({readOnly:!0})],_.prototype,"pixelRatio",null),e([a()],_.prototype,"rasterPixelRatio",void 0),e([a()],_.prototype,"contentPixelRatio",void 0),e([a({readOnly:!0})],_.prototype,"alignPixelEnabled",null),e([a({readOnly:!0})],_.prototype,"updating",null),e([a({})],_.prototype,"_contentCamera",void 0),e([a({type:g})],_.prototype,"contentCamera",null),e([a({readOnly:!0})],_.prototype,"fixedContentCamera",null),e([a({readOnly:!0})],_.prototype,"events",void 0),e([a({readOnly:!0})],_.prototype,"isGlobal",null),e([a({readOnly:!0})],_.prototype,"isLocal",null),e([a({readOnly:!0})],_.prototype,"viewingMode",null),e([a({readOnly:!0})],_.prototype,"highlights",null),e([a({readOnly:!0})],_.prototype,"highlightOrderMap",null),e([a({readOnly:!0})],_.prototype,"navigating",null),e([a({readOnly:!0})],_.prototype,"stationary",null),e([a()],_.prototype,"_cameraChanged",void 0),e([a()],_.prototype,"cameraController",null),_=e([i("esri.views.3d.state.ViewState")],_);const v=_;function j(e,t){return e.fov!==t.fov||(e.fullViewport[0]!==t.fullViewport[0]||e.fullViewport[1]!==t.fullViewport[1]||e.fullViewport[2]!==t.fullViewport[2]||e.fullViewport[3]!==t.fullViewport[3]||(e.padding[y.TOP]!==t.padding[y.TOP]||e.padding[y.RIGHT]!==t.padding[y.RIGHT]||e.padding[y.BOTTOM]!==t.padding[y.BOTTOM]||e.padding[y.LEFT]!==t.padding[y.LEFT]))}const O=new g,P="ViewStateHandles";export{v as default};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Accessor.js";import r from"../../../core/Evented.js";import{when as o}from"../../../core/reactiveUtils.js";import{property as a}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as i}from"../../../core/accessorSupport/decorators/subclass.js";import{afterDispatch as s}from"../../../core/accessorSupport/watch.js";import{fromValues as n}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as l}from"../../../geometry/ellipsoidUtils.js";import p from"../../ViewAnimation.js";import{ViewingMode as c,viewingModeFromString as m}from"../../ViewingMode.js";import{Constraints as h}from"./Constraints.js";import{AnimationController as d}from"./controllers/AnimationController.js";import{State as u}from"./controllers/CameraController.js";import g from"../webgl/RenderCamera.js";import{PaddingSide as C}from"../webgl-engine/lib/rendererUtils.js";import{maximumHighlights as y}from"../../support/HighlightDefaults.js";import{PropertiesPool as f}from"../../support/PropertiesPool.js";import{RenderState as w}from"../../support/RenderState.js";let _=class extends t{constructor(e){super(e),this._propertiesPool=new f({camera:g},this),this._lastSeenCameraProjectionValues=new g,this.mode=w.ANIMATING,this._cssCamera=new g,this._camera=new g,this.rasterPixelRatio=1,this.contentPixelRatio=1,this.constraints=new h({state:this}),this.events=new r,this._cameraChanged=!1,this._updateQueue=new Array,this._processingUpdates=!1}reset(){this.cameraController=null,this._propertiesPool.destroy(),this._propertiesPool=new f({camera:g},this)}destroy(){this.cameraController=null,this._propertiesPool?.destroy(),this._propertiesPool=null}createInitialCamera(){if(this.viewingMode===c.Global){const e=l(this.spatialReference).radius;this.camera=new g({eye:n(4*e,0,0),center:n(e,0,0),up:n(0,0,1)})}else this.camera=new g({eye:n(0,0,100),center:n(0,0,0),up:n(0,1,0)})}get animation(){return this.cameraController instanceof d&&null!=this.cameraController.viewAnimation?this.cameraController.viewAnimation:null}get cssCamera(){const e=this._cssCamera.copyFrom(this.camera),{height:t,width:r,pixelRatio:o}=this.camera;return e.pixelRatio=1,e.height=Math.round(t/o),e.width=Math.round(r/o),e}get camera(){return this._camera}set camera(e){e!==O&&O.copyFrom(e),O.computeUp(this.viewingMode),this.events.emit("before-camera-change",O);const t=this._camera;if(j(this._lastSeenCameraProjectionValues,O)&&(this._lastSeenCameraProjectionValues.copyFrom(O),this.events.emit("camera-projection-changed",this._lastSeenCameraProjectionValues)),!t.equals(O)&&(this._camera=this._propertiesPool.get("camera").copyFrom(O),this._cameraChanged=!t.almostEquals(O),this._cameraChanged)){const e=s((()=>{this._cameraChanged=!1,e.remove()}))}}get pixelRatio(){return this.camera.pixelRatio}get alignPixelEnabled(){return this.pixelRatio===this.rasterPixelRatio&&this.mode===w.IDLE}get updating(){return this.mode!==w.IDLE}get contentCamera(){return this._contentCamera??this.camera}set contentCamera(e){if(null==e)return void(this._contentCamera=null);const t=e.clone();this.view.state.events.emit("before-camera-change",t),this._contentCamera=t}get fixedContentCamera(){return null!=this._contentCamera}get isGlobal(){return this.viewingMode===c.Global}get isLocal(){return this.viewingMode===c.Local}get viewingMode(){return m(this.view.viewingMode)}get spatialReference(){return this.view.spatialReference}get highlights(){const e=this.view.highlights.items.slice(0,y);for(let t=0;t<e.length;){const r=e[t],o=e.findIndex((e=>e.name===r.name));o>=0&&t>o?e.splice(t,1):++t}return e}get highlightOrderMap(){const e=new Map;return this.highlights.forEach(((t,r)=>e.set(t.name,r))),e}get navigating(){return!!this.cameraController?.isInteractive}get stationary(){return!this._cameraChanged&&!this.navigating}get cameraController(){return this._get("cameraController")}set cameraController(e){this.stopActiveCameraController()?(this.cameraController?.destroy(),e&&(this.removeHandles(P),this.addHandles(o((()=>e.state===u.Finished||e.state===u.Stopped),(()=>{this._set("cameraController",null),this.updateCamera((t=>e.onControllerEnd(t)))}),{sync:!0,once:!0}),P),e.onControllerStart(this.camera)),this._set("cameraController",e)):e&&(e.state=u.Rejected)}switchCameraController(e){this.cameraController=e}stopActiveCameraController(){return!this.cameraController||this.cameraController.stopController()}updateCamera(e){this._updateQueue.push(e),this._processUpdateQueue()}_processUpdateQueue(){if(0===this._updateQueue.length||this._processingUpdates)return;this._processingUpdates=!0;const e=this._updateQueue.shift();O.copyFrom(this._get("camera")),e(O),this.camera=O,this._processingUpdates=!1,this._processUpdateQueue()}};e([a({constructOnly:!0})],_.prototype,"view",void 0),e([a()],_.prototype,"mode",void 0),e([a({readOnly:!0,type:p})],_.prototype,"animation",null),e([a({type:g})],_.prototype,"cssCamera",null),e([a()],_.prototype,"_cssCamera",void 0),e([a({type:g})],_.prototype,"camera",null),e([a()],_.prototype,"_camera",void 0),e([a({readOnly:!0})],_.prototype,"pixelRatio",null),e([a()],_.prototype,"rasterPixelRatio",void 0),e([a()],_.prototype,"contentPixelRatio",void 0),e([a({readOnly:!0})],_.prototype,"alignPixelEnabled",null),e([a({readOnly:!0})],_.prototype,"updating",null),e([a({})],_.prototype,"_contentCamera",void 0),e([a({type:g})],_.prototype,"contentCamera",null),e([a({readOnly:!0})],_.prototype,"fixedContentCamera",null),e([a({readOnly:!0})],_.prototype,"events",void 0),e([a({readOnly:!0})],_.prototype,"isGlobal",null),e([a({readOnly:!0})],_.prototype,"isLocal",null),e([a({readOnly:!0})],_.prototype,"viewingMode",null),e([a({readOnly:!0})],_.prototype,"highlights",null),e([a({readOnly:!0})],_.prototype,"highlightOrderMap",null),e([a({readOnly:!0})],_.prototype,"navigating",null),e([a({readOnly:!0})],_.prototype,"stationary",null),e([a()],_.prototype,"_cameraChanged",void 0),e([a()],_.prototype,"cameraController",null),_=e([i("esri.views.3d.state.ViewState")],_);const v=_;function j(e,t){return e.fov!==t.fov||(e.fullViewport[0]!==t.fullViewport[0]||e.fullViewport[1]!==t.fullViewport[1]||e.fullViewport[2]!==t.fullViewport[2]||e.fullViewport[3]!==t.fullViewport[3]||(e.padding[C.TOP]!==t.padding[C.TOP]||e.padding[C.RIGHT]!==t.padding[C.RIGHT]||e.padding[C.BOTTOM]!==t.padding[C.BOTTOM]||e.padding[C.LEFT]!==t.padding[C.LEFT]))}const O=new g,P="ViewStateHandles";export{v as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../Camera.js";import i from"../../../Viewpoint.js";import r from"../../../core/Accessor.js";import a from"../../../core/Logger.js";import{destroyMaybe as s}from"../../../core/maybe.js";import{on as n,watch as o,sync as h,when as l}from"../../../core/reactiveUtils.js";import{addFrameTask as p}from"../../../core/scheduling.js";import{createScreenPoint as c}from"../../../core/screenUtils.js";import{property as m}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/RandomLCG.js";import{subclass as d}from"../../../core/accessorSupport/decorators/subclass.js";import{s as v}from"../../../chunks/vec32.js";import{fromArray as u}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{s as w}from"../../../chunks/vec42.js";import{create as g}from"../../../core/libs/gl-matrix-2/factories/vec4f64.js";import _ from"../../../geometry/Extent.js";import y from"../../../geometry/Point.js";import f from"../../../geometry/Polygon.js";import{isLoadedOrLoadFor as C,requiresLoad as x}from"../../../geometry/projection.js";import{ViewingMode as R}from"../../ViewingMode.js";import{applyAll as P}from"../camera/constraintUtils.js";import{cameraOnContentAlongViewDirection as S,surfaceElevationBelowRenderLocation as O}from"../camera/intersectionUtils.js";import{ConstraintsManager as T}from"./ConstraintsManager.js";import{Frustum as b}from"./Frustum.js";import{GoToOperation as j}from"./GoToOperation.js";import{SurfaceCollisionCorrectionController as I}from"./controllers/SurfaceCollisionCorrectionController.js";import{internalToExternal as M,externalToInternal as z,toArea as E,toExtent as A,applyTiltAdjustToScale as L,scaleToZoom as H,fromExtentSync as N,OrientationMode as V,getObserverForPointAtDistanceSync as B,viewScaleToCameraDistance as D,zoomToScale as G}from"../support/cameraUtils.js";import{fromCamera as U,toCameraSync as F}from"../support/viewpointUtils.js";import k from"../webgl/RenderCamera.js";import{PaddingSide as q}from"../webgl-engine/lib/rendererUtils.js";import{RenderFeature as W}from"../webgl-engine/lib/RenderFeature.js";import{PropertiesPool as J}from"../../support/PropertiesPool.js";import{RenderState as K}from"../../support/RenderState.js";import{ensureAttachmentMaxSize as Z}from"../../webgl/FramebufferObject.js";let Q=class extends r{constructor(e){super(e),this.ready=!1,this._windowDevicePixelRatio=1,this._devicePixelRatioOverride=null,this._idleTimeout=ne,this.test={viewStateManager:this,contentCameraResetState:new Map,setDevicePixelRatio:e=>this._devicePixelRatioOverride=e,renderState:null,get maximumPixelRatio(){return this.viewStateManager.view.qualitySettings.maximumPixelRatio},get updatingIgnoreRenderState(){return null!=this.renderState},get idleTimeoutEnabled(){return this.viewStateManager._idleTimeout>0},set idleTimeoutEnabled(e){this.viewStateManager._idleTimeout=e?ne:0}},this._propertiesPool=new J({frustum:b},this),this._cameraSetByUser=!1,this._gotoOperation=null,this._cameraChangeTime=0,this._tmpCanvasSize=new X}initialize(){this._cameraChangeTime=performance.now(),this.addHandles([n((()=>this.view.state.events),"before-camera-change",(e=>e&&this._updateElevation(e))),o((()=>this.view.state?.camera),((e,t)=>this._cameraChangedHandler(e,t)),h)]),l((()=>this.view.state?.camera),(e=>this._updateElevation(e)),{once:!0,sync:!0}),this.addHandles([p({prepare:()=>this._prepareFrame()}),o((()=>this.view.state.cameraController),(()=>{this._cameraSetByUser=!0,this.removeHandles(ae)})),n((()=>this.view.state.events),"camera-projection-changed",(()=>this.notifyChange("scale")))])}destroy(){this.exit(),this._propertiesPool=s(this._propertiesPool)}get camera(){const e=this._get("camera");if(!this.ready)return e;const t=M(this.view,this.view.state.camera,te);return t&&e&&t.equals(e)?e:t.clone()}set camera(e){this._updatePropertyBeforeReady("camera",e)||(this.view.elevationProvider?.enableCache(!0),this.setStateCamera(z(this.view,e),{applyConstraints:!1})||a.getLogger(this).error("#camera=","Invalid camera",e),this.view.elevationProvider?.enableCache(!1))}get contentCamera(){const e=this._get("contentCamera");if(!this.ready)return e;const t=M(this.view,this.view.state.contentCamera,te);return t&&e&&t.equals(e)?e:t.clone()}set contentCamera(e){if(this._updatePropertyBeforeReady("contentCamera",e))return;const t=z(this.view,e);null!=t?(this._updateElevation(t),this.view.state.contentCamera=t):this.view.state.contentCamera=null}installContentCameraReset(e){if(this.removeHandles(se),this.test.contentCameraResetState.clear(),!this.view.state.fixedContentCamera)return!1;const t=this.zoom,i=this.view.state.camera.distance**2,r=u(this.view.state.camera.center),a=e.sticky?this.contentCamera.clone():null;return this.addHandles([o((()=>this.contentCamera),(()=>{e.sticky||(this.removeHandles(se),this.test.contentCameraResetState.clear())})),o((()=>this.zoom),(e=>{void 0!==e&&void 0!==t&&(this.test.contentCameraResetState.set("view.zoom",Math.abs(e-t)/2),Math.abs(e-t)>2?this.contentCamera=null:this.view.state.fixedContentCamera||(this.contentCamera=a))})),o((()=>this.view.state.camera),(e=>{const t=v(r,e.center);this.test.contentCameraResetState.set("camera.center",t/i),t>i?this.contentCamera=null:this.view.state.fixedContentCamera||(this.contentCamera=a)}))],se),!0}get center(){return this.ready?this.view.pointsOfInterest.centerOnContent.location:this._get("center")}set center(e){this._updatePropertyBeforeReady("center",e)||(e?this.isCompatible(e)?this.setStateCamera(this._centerToCamera(e),{applyConstraints:!0})?this.view.pointsOfInterest.centerOnContent.runTask():a.getLogger(this).error("#center=","Invalid center",e):a.getLogger(this).error("#center=","Center has an incompatible spatial reference (center: "+(e.spatialReference?e.spatialReference.wkid:"none")+", view: "+this.view.spatialReference?.wkid+")",e):a.getLogger(this).error("#center=","Center may not be null or undefined"))}get visibleArea(){if(!this.ready){const e=this._get("extent");return e?f.fromExtent(e):null}return E(this.view,this.view.pointsOfInterest.focus.renderLocation)}get extent(){if(!this.ready)return this._get("extent");const e=this.view,t=A(e,e.state.camera,e.pointsOfInterest.centerOnContent.renderLocation);return null!=t?t:this._get("extent")}set extent(e){this._updatePropertyBeforeReady("extent",e)||(e?this.isCompatible(e)?this.setStateCamera(this._extentToCamera(e),{applyConstraints:!0})||a.getLogger(this).error("#extent=","Invalid extent",e):a.getLogger(this).error("#extent=","Extent has an incompatible spatial reference (extent: "+(e.spatialReference?e.spatialReference.wkid:"none")+", view: "+this.view.spatialReference?.wkid+")",e):a.getLogger(this).error("#extent=","Extent may not be null or undefined"))}get frustum(){const e=this._propertiesPool.get("frustum");return e.renderCoordsHelper=this.view.renderCoordsHelper,e.update(this.view.state.camera),e}get constraintsManager(){return this._constraintsManager}get _initialViewpoint(){const e=this.view.map;return e&&"initialViewProperties"in e?e.initialViewProperties?.viewpoint:void 0}get hasInitialView(){return!!this._initialViewpoint}get scale(){if(!this.ready)return this._get("scale");const e=this.view.basemapTerrain.tilingScheme,t=this.view.pointsOfInterest.cameraOnSurface.scale;return e&&t?L(this.view,t,this.view.state.contentCamera,e):this._get("scale")}set scale(e){this._updatePropertyBeforeReady("scale",e)||this.setStateCamera(this._scaleToCamera(e),{applyConstraints:!0})||a.getLogger(this).error("#scale=","Invalid scale",e)}get padding(){if(!this.ready)return this._get("padding");const e=this.view.state.camera,t=e.padding,i=e.pixelRatio,r=this._get("padding"),a=Math.round(t[q.TOP]/i),s=Math.round(t[q.RIGHT]/i),n=Math.round(t[q.BOTTOM]/i),o=Math.round(t[q.LEFT]/i);return null!=r&&r.top===a&&r.right===s&&r.bottom===n&&r.left===o?r:{top:a,right:s,bottom:n,left:o}}set padding(e){this._updatePropertyBeforeReady("padding",e)||(this._paddingToArray(e,this.view.state.camera.pixelRatio,re),this.view.state.updateCamera((e=>e.padding=re)))}_paddingToArray(e,t,i){e?w(i,e.top||0,e.right||0,e.bottom||0,e.left||0):w(i,0,0,0,0);for(let r=0;r<4;r++)i[r]=Math.round(i[r]*t)}get screenCenter(){const e=this.padding;return c((this.view.width-(e.left+e.right))/2+e.left,(this.view.height-(e.top+e.bottom))/2+e.top)}get viewpoint(){return this.ready?U(this.view,this.camera):this._get("viewpoint")}set viewpoint(e){if(!this._updatePropertyBeforeReady("viewpoint",e))if(e)if(this.isCompatible(e))this.setStateCamera(this._viewpointToCamera(e),{applyConstraints:!e.camera})||a.getLogger(this).error("#viewpoint=","Invalid viewpoint",e);else{const t=null!=e.camera?e.camera.position:e.targetGeometry,i=null!=t&&t.spatialReference;a.getLogger(this).error("#viewpoint=","Viewpoint has an incompatible spatial reference (viewpoint: "+(i?i.wkid:"none")+", view: "+this.view.spatialReference?.wkid+")",e)}else a.getLogger(this).error("#viewpoint=","Viewpoint may not be null or undefined")}get zoom(){return this.ready?H(this.view,this.scale):this._get("zoom")}set zoom(e){this._updatePropertyBeforeReady("zoom",e)||void 0===e||this.setStateCamera(this._zoomToCamera(e),{applyConstraints:!0})||a.getLogger(this).error("#zoom=","Invalid zoom",e)}_computeCanvasSize(){if(this._devicePixelRatioOverride)return this.view.state.contentPixelRatio=this._devicePixelRatioOverride,this._tmpCanvasSize.width=Math.round(this.view.surface.clientWidth*this._devicePixelRatioOverride),this._tmpCanvasSize.height=Math.round(this.view.surface.clientHeight*this._devicePixelRatioOverride),this._tmpCanvasSize.pixelRatio=this._devicePixelRatioOverride,this._tmpCanvasSize;const e=Math.min(this._windowDevicePixelRatio,this.view.qualitySettings.maximumPixelRatio),t=(this._usePhysicalPixelRendering?this._windowDevicePixelRatio:e)*this.view.resolutionScale;this._tmpCanvasSize.width=Math.round(this.view.surface.clientWidth*t),this._tmpCanvasSize.height=Math.round(this.view.surface.clientHeight*t);const i=this.view.stage.renderView.renderingContext?.parameters.maxTextureSize;return i&&Z(this._tmpCanvasSize,i),this._tmpCanvasSize.pixelRatio=this._tmpCanvasSize.width>0?this._tmpCanvasSize.width/this.view.surface.clientWidth*.5+this._tmpCanvasSize.height/this.view.surface.clientHeight*.5:t,this.view.state&&(this.view.state.contentPixelRatio=Math.min(this._windowDevicePixelRatio,this.view.qualitySettings.maximumPixelRatio)),this._tmpCanvasSize}get _rasterPixelRatio(){return null!=this._devicePixelRatioOverride?this._devicePixelRatioOverride:this._usePhysicalPixelRenderingAny?this._windowDevicePixelRatio:Math.min(this._windowDevicePixelRatio,this.view.qualitySettings.maximumPixelRatio)}get _usePhysicalPixelRendering(){return this.view?.stage?.renderer.isFeatureEnabled(W.PhysicalPixelRendering)??!1}get _usePhysicalPixelRenderingAny(){const e=this.view?.stage?.renderer;return e&&(e.isFeatureEnabled(W.PhysicalPixelRendering,K.IDLE)||e.isFeatureEnabled(W.PhysicalPixelRendering,K.INTERACTING)||e.isFeatureEnabled(W.PhysicalPixelRendering,K.ANIMATING))}preinit(e){return!(this._isOverridden("center")&&!C(this.center.spatialReference,e))&&(!(this._isOverridden("camera")&&!C(this.camera.position.spatialReference,e))&&(!(this._isOverridden("extent")&&!C(this.extent.spatialReference,e))&&!!(!this._isOverridden("viewpoint")||C(this.viewpoint.targetGeometry?.spatialReference,e)&&C(this.viewpoint.camera?.position?.spatialReference,e))))}init(){this._constraintsManager=new T({view:this.view}),this._prepareFrame();const e=this._getInitialProperties();this._cameraSetByUser=!1,this._set("ready",!0);for(const t of e)this.set(t.name,t.value);if(!this._cameraSetByUser){const e=this._initialViewpoint||this.view.initialExtent;e&&this.isCompatible(e)?this._setInitialView(e):this.view.state.viewingMode===R.Local&&this.addHandles(l((()=>this.view.basemapTerrain.ready),(()=>{this.removeHandles(ae),this._setInitialView(this.view.dataExtent)}),{once:!0,initial:!0}),ae)}}exit(){this._cancelGoToOperation(),this.ready&&(this._override("padding",this.padding),this._set("ready",!1),this._clearOverride("hasInitialView"),this._cameraSetByUser=!1,this.removeHandles(ae),this._constraintsManager=s(this._constraintsManager))}async goTo(e,t){return t={animate:!0,...t},null!=this._gotoOperation&&this._gotoOperation.abort(t.animate),this._gotoOperation=new j(e,t,this.view),this.view.resourceController.scheduler.stopFrame(),this._gotoOperation.promise}debugSetCameraOnContent(){this.setStateCamera(S(this.view),{applyConstraints:!1})}step(e){const t=this.view.state,i=t?.cameraController;i&&(t.updateCamera((t=>i.stepController(e,t))),i.steppingFinished&&i.finishController())}_cancelGoToOperation(){null!=this._gotoOperation&&(this._gotoOperation.abort(),this._gotoOperation=null)}_getInitialProperties(){const e=new Set,t=[];for(const{propertyName:i,overrides:r}of $){const a=e.has(i),s=this._isOverridden(i);!a&&s&&t.push({name:i,value:this._get(i)}),this._clearOverride(i),(a||s)&&r.forEach((t=>e.add(t)))}return t}_setInitialView(e){if(null==e||this._cameraSetByUser)return;if(e instanceof t)return void this.setStateCamera(z(this.view,e),{applyConstraints:!1});if(e instanceof i){if(e.targetGeometry instanceof _){const t=N(this.view,e.targetGeometry,0,.5,V.LOCKED);return void(null!=t&&this.setStateCamera(z(this.view,t),{applyConstraints:!0}))}const t={applyConstraints:!e.camera},i=this._viewpointToCamera(e);return void this.setStateCamera(i,t)}const r=N(this.view,e,0,.5,V.LOCKED);null!=r&&this.setStateCamera(z(this.view,r),{applyConstraints:!0})}_updatePropertyBeforeReady(e,t){return!this.ready&&(this._override(e,t),t&&Y.has(e)&&this._override("hasInitialView",!0),!0)}isCompatible(e){return null!=e&&(e instanceof i?e.camera?this.isCompatible(e.camera):this.isCompatible(e.targetGeometry):e instanceof t?this.isCompatible(e.position):e.spatialReference&&!x(e.spatialReference,this.view.spatialReference))}_getPreservingHeadingTilt(e=ee){return this._cameraSetByUser?(e.heading=this.camera.heading,e.tilt=this.camera.tilt):(e.heading=0,e.tilt=.5),e}_centerPointAtDistanceToCamera(e,t,i=ie){const{heading:r,tilt:a}=this._getPreservingHeadingTilt(),s=B(this.view,r,a,e,t,V.ADJUST);return null==s?null:(i.copyFrom(this.view.state.camera),i.eye=s.eye,i.center=s.center,i.up=s.up,i)}_centerToCamera(e){let t;if(e.hasZ)t=this.view.state.camera.distance;else{const{centerOnContent:e}=this.view.pointsOfInterest;e.runTask(),t=e.distance}return this._centerPointAtDistanceToCamera(e,t)}_extentToCamera(e){const{heading:t,tilt:i}=this._getPreservingHeadingTilt(),r=N(this.view,e,t,i,V.ADJUST,te);return r?z(this.view,r):null}_scaleToCamera(e){if(null==e)return null;const t=this.view,i=t.pointsOfInterest.centerOnContent;i.runTask();const r=i.renderLocation,a=t.pointsOfInterest.cameraOnSurface.renderLocation,s=D(t,e,t.state.contentCamera,r,a);return this._centerPointAtDistanceToCamera(r,s)}_zoomToCamera(e){return this._scaleToCamera(G(this.view,e))}_viewpointToCamera(e){return z(this.view,F(this.view,e))}setStateCamera(e,t){return!(null==e||!this.view.state.stopActiveCameraController())&&(this._cameraSetByUser=!0,t.doNotCancelGoToOperation||this._cancelGoToOperation(),this.view.state.updateCamera((i=>{t.positionAndOrientationOnly?(i.eye=e.eye,i.center=e.center,i.up=e.up,i.fov=e.fov):i.copyFrom(e),t.applyConstraints&&P(this.view,i)})),t.applyConstraints||(this.view.state.cameraController=new I({view:this.view,desiredCamera:e})),!0)}_prepareFrame(){const{surface:e,canvas:t}=this.view;if(!e||!t)return;this._windowDevicePixelRatio=window.devicePixelRatio;const i=this._computeCanvasSize();if(0!==i.width&&0!==i.height&&(t.width===i.width&&t.height===i.height||(t.width=i.width,t.height=i.height),this.view.state)){const e=this.view.state.camera;e.fullWidth===i.width&&e.fullHeight===i.height&&e.pixelRatio===i.pixelRatio||(ie.copyFrom(e),ie.pixelRatio!==i.pixelRatio&&(this._paddingToArray(this.padding,i.pixelRatio,re),ie.padding=re),ie.fullWidth=i.width,ie.fullHeight=i.height,ie.pixelRatio=i.pixelRatio,this.view.state.camera=ie),this._updateViewState()}}_updateElevation(e){const t=this.view.basemapTerrain?.spatialReference,i=this.view.renderCoordsHelper?.getAltitude(e.eye)??0,r=t?O(this.view,e.eye):0;e.relativeElevation=i-r}_updateViewState(){null!=this.test.renderState?this.view.state.mode=this.test.renderState:this.view.animation?this.view.state.mode=K.ANIMATING:this.view.interacting?this.view.state.mode=K.INTERACTING:(this.view.state.mode===K.ANIMATING&&(this._cameraChangeTime=0),performance.now()-this._cameraChangeTime<this._idleTimeout?this.view.state.mode=K.INTERACTING:this.view.state.mode=K.IDLE),this.view.state.rasterPixelRatio=this._rasterPixelRatio}_cameraChangedHandler(e,t){e&&t&&e.almostEquals(t)||(this._cameraChangeTime=performance.now(),this._updateViewState())}};e([m({type:t,dependsOn:["view.state.camera","ready"]})],Q.prototype,"camera",null),e([m({type:t,dependsOn:["view.state.contentCamera","ready"]})],Q.prototype,"contentCamera",null),e([m({type:y})],Q.prototype,"center",null),e([m()],Q.prototype,"visibleArea",null),e([m({type:_})],Q.prototype,"extent",null),e([m({readOnly:!0})],Q.prototype,"frustum",null),e([m()],Q.prototype,"_constraintsManager",void 0),e([m({readOnly:!0})],Q.prototype,"constraintsManager",null),e([m()],Q.prototype,"_initialViewpoint",null),e([m({readOnly:!0})],Q.prototype,"hasInitialView",null),e([m({readOnly:!0,type:Boolean})],Q.prototype,"ready",void 0),e([m({type:Number})],Q.prototype,"scale",null),e([m()],Q.prototype,"padding",null),e([m({readOnly:!0})],Q.prototype,"screenCenter",null),e([m({constructOnly:!0})],Q.prototype,"view",void 0),e([m({type:i})],Q.prototype,"viewpoint",null),e([m({type:Number})],Q.prototype,"zoom",null),e([m({readOnly:!0})],Q.prototype,"_rasterPixelRatio",null),e([m({readOnly:!0})],Q.prototype,"_usePhysicalPixelRendering",null),e([m({readOnly:!0})],Q.prototype,"_usePhysicalPixelRenderingAny",null),e([m()],Q.prototype,"_windowDevicePixelRatio",void 0),e([m()],Q.prototype,"_devicePixelRatioOverride",void 0),Q=e([d("esri.views.3d.state.ViewStateManager")],Q);class X{constructor(){this.width=0,this.height=0,this.pixelRatio=1}}const Y=new Set(["camera","viewpoint","extent","scale","center","zoom"]),$=[{propertyName:"camera",overrides:["viewpoint"]},{propertyName:"viewpoint",overrides:["extent"]},{propertyName:"extent",overrides:["center","scale"]},{propertyName:"center",overrides:[]},{propertyName:"scale",overrides:["zoom"]},{propertyName:"zoom",overrides:[]},{propertyName:"padding",overrides:[]}],ee={heading:0,tilt:0},te=new t,ie=new k,re=g(),ae="pending-initial-view",se="content-camera-reset",ne=300,oe=100;export{Q as ViewStateManager,oe as interactingTimeout};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../Camera.js";import i from"../../../Viewpoint.js";import r from"../../../core/Accessor.js";import a from"../../../core/Logger.js";import{destroyMaybe as s}from"../../../core/maybe.js";import{on as n,watch as o,sync as h,when as l}from"../../../core/reactiveUtils.js";import{addFrameTask as p}from"../../../core/scheduling.js";import{createScreenPoint as c}from"../../../core/screenUtils.js";import{property as m}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/RandomLCG.js";import{subclass as d}from"../../../core/accessorSupport/decorators/subclass.js";import{s as v}from"../../../chunks/vec32.js";import{fromArray as u}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{s as w}from"../../../chunks/vec42.js";import{create as g}from"../../../core/libs/gl-matrix-2/factories/vec4f64.js";import y from"../../../geometry/Extent.js";import _ from"../../../geometry/Point.js";import f from"../../../geometry/Polygon.js";import{isLoadedOrLoadFor as C,requiresLoad as x}from"../../../geometry/projection.js";import{ViewingMode as R}from"../../ViewingMode.js";import{applyAll as P}from"../camera/constraintUtils.js";import{cameraOnContentAlongViewDirection as S,surfaceElevationBelowRenderLocation as O}from"../camera/intersectionUtils.js";import{ConstraintsManager as T}from"./ConstraintsManager.js";import{Frustum as b}from"./Frustum.js";import{GoToOperation as j}from"./GoToOperation.js";import{SurfaceCollisionCorrectionController as I}from"./controllers/SurfaceCollisionCorrectionController.js";import{internalToExternal as M,externalToInternal as z,toArea as A,toExtent as E,applyTiltAdjustToScale as L,scaleToZoom as H,fromExtentSync as N,OrientationMode as V,getObserverForPointAtDistanceSync as B,viewScaleToCameraDistance as D,zoomToScale as G}from"../support/cameraUtils.js";import{fromCamera as U,toCameraSync as F}from"../support/viewpointUtils.js";import k from"../webgl/RenderCamera.js";import{PaddingSide as q}from"../webgl-engine/lib/rendererUtils.js";import{RenderFeature as W}from"../webgl-engine/lib/RenderFeature.js";import{PropertiesPool as J}from"../../support/PropertiesPool.js";import{RenderState as K}from"../../support/RenderState.js";import{ensureAttachmentMaxSize as Z}from"../../webgl/FramebufferObject.js";let Q=class extends r{constructor(e){super(e),this.ready=!1,this._windowDevicePixelRatio=1,this._devicePixelRatioOverride=null,this._idleTimeout=ne,this.test={viewStateManager:this,contentCameraResetState:new Map,setDevicePixelRatio:e=>this._devicePixelRatioOverride=e,renderState:null,get maximumPixelRatio(){return this.viewStateManager.view.qualitySettings.maximumPixelRatio},get updatingIgnoreRenderState(){return null!=this.renderState},get idleTimeoutEnabled(){return this.viewStateManager._idleTimeout>0},set idleTimeoutEnabled(e){this.viewStateManager._idleTimeout=e?ne:0}},this._propertiesPool=new J({frustum:b},this),this._cameraSetByUser=!1,this._gotoOperation=null,this._cameraChangeTime=0,this._tmpCanvasSize=new X}initialize(){this._cameraChangeTime=performance.now(),this.addHandles([n((()=>this.view.state.events),"before-camera-change",(e=>e&&this._updateElevation(e))),o((()=>this.view.state?.camera),((e,t)=>this._cameraChangedHandler(e,t)),h)]),l((()=>this.view.state?.camera),(e=>this._updateElevation(e)),{once:!0,sync:!0}),this.addHandles([p({prepare:()=>this._prepareFrame()}),o((()=>this.view.state.cameraController),(()=>{this._cameraSetByUser=!0,this.removeHandles(ae)})),n((()=>this.view.state.events),"camera-projection-changed",(()=>this.notifyChange("scale")))])}destroy(){this.exit(),this._propertiesPool=s(this._propertiesPool)}get camera(){const e=this._get("camera");if(!this.ready)return e;const t=M(this.view,this.view.state.camera,te);return t&&e&&t.equals(e)?e:t.clone()}set camera(e){this._updatePropertyBeforeReady("camera",e)||(this.view.elevationProvider?.enableCache(!0),this.setStateCamera(z(this.view,e),{applyConstraints:!1})||a.getLogger(this).error("#camera=","Invalid camera",e),this.view.elevationProvider?.enableCache(!1))}get contentCamera(){const e=this._get("contentCamera");if(!this.ready)return e;const t=M(this.view,this.view.state.contentCamera,te);return t&&e&&t.equals(e)?e:t.clone()}set contentCamera(e){if(this._updatePropertyBeforeReady("contentCamera",e))return;const t=z(this.view,e);this.view.state.contentCamera=null!=t?t:null}installContentCameraReset(e){if(this.removeHandles(se),this.test.contentCameraResetState.clear(),!this.view.state.fixedContentCamera)return!1;const t=this.zoom,i=this.view.state.camera.distance**2,r=u(this.view.state.camera.center),a=e.sticky?this.contentCamera.clone():null;return this.addHandles([o((()=>this.contentCamera),(()=>{e.sticky||(this.removeHandles(se),this.test.contentCameraResetState.clear())})),o((()=>this.zoom),(e=>{void 0!==e&&void 0!==t&&(this.test.contentCameraResetState.set("view.zoom",Math.abs(e-t)/2),Math.abs(e-t)>2?this.contentCamera=null:this.view.state.fixedContentCamera||(this.contentCamera=a))})),o((()=>this.view.state.camera),(e=>{const t=v(r,e.center);this.test.contentCameraResetState.set("camera.center",t/i),t>i?this.contentCamera=null:this.view.state.fixedContentCamera||(this.contentCamera=a)}))],se),!0}get center(){return this.ready?this.view.pointsOfInterest.centerOnContent.location:this._get("center")}set center(e){this._updatePropertyBeforeReady("center",e)||(e?this.isCompatible(e)?this.setStateCamera(this._centerToCamera(e),{applyConstraints:!0})?this.view.pointsOfInterest.centerOnContent.runTask():a.getLogger(this).error("#center=","Invalid center",e):a.getLogger(this).error("#center=","Center has an incompatible spatial reference (center: "+(e.spatialReference?e.spatialReference.wkid:"none")+", view: "+this.view.spatialReference?.wkid+")",e):a.getLogger(this).error("#center=","Center may not be null or undefined"))}get visibleArea(){if(!this.ready){const e=this._get("extent");return e?f.fromExtent(e):null}return A(this.view,this.view.pointsOfInterest.focus.renderLocation)}get extent(){if(!this.ready)return this._get("extent");const e=this.view,t=E(e,e.state.camera,e.pointsOfInterest.centerOnContent.renderLocation);return null!=t?t:this._get("extent")}set extent(e){this._updatePropertyBeforeReady("extent",e)||(e?this.isCompatible(e)?this.setStateCamera(this._extentToCamera(e),{applyConstraints:!0})||a.getLogger(this).error("#extent=","Invalid extent",e):a.getLogger(this).error("#extent=","Extent has an incompatible spatial reference (extent: "+(e.spatialReference?e.spatialReference.wkid:"none")+", view: "+this.view.spatialReference?.wkid+")",e):a.getLogger(this).error("#extent=","Extent may not be null or undefined"))}get frustum(){const e=this._propertiesPool.get("frustum");return e.renderCoordsHelper=this.view.renderCoordsHelper,e.update(this.view.state.camera),e}get constraintsManager(){return this._constraintsManager}get _initialViewpoint(){const e=this.view.map;return e&&"initialViewProperties"in e?e.initialViewProperties?.viewpoint:void 0}get hasInitialView(){return!!this._initialViewpoint}get scale(){if(!this.ready)return this._get("scale");const e=this.view.basemapTerrain.tilingScheme,t=this.view.pointsOfInterest.cameraOnSurface.scale;return e&&t?L(this.view,t,this.view.state.contentCamera,e):this._get("scale")}set scale(e){this._updatePropertyBeforeReady("scale",e)||this.setStateCamera(this._scaleToCamera(e),{applyConstraints:!0})||a.getLogger(this).error("#scale=","Invalid scale",e)}get padding(){if(!this.ready)return this._get("padding");const e=this.view.state.camera,t=e.padding,i=e.pixelRatio,r=this._get("padding"),a=Math.round(t[q.TOP]/i),s=Math.round(t[q.RIGHT]/i),n=Math.round(t[q.BOTTOM]/i),o=Math.round(t[q.LEFT]/i);return null!=r&&r.top===a&&r.right===s&&r.bottom===n&&r.left===o?r:{top:a,right:s,bottom:n,left:o}}set padding(e){this._updatePropertyBeforeReady("padding",e)||(this._paddingToArray(e,this.view.state.camera.pixelRatio,re),this.view.state.updateCamera((e=>e.padding=re)))}_paddingToArray(e,t,i){e?w(i,e.top||0,e.right||0,e.bottom||0,e.left||0):w(i,0,0,0,0);for(let r=0;r<4;r++)i[r]=Math.round(i[r]*t)}get screenCenter(){const e=this.padding;return c((this.view.width-(e.left+e.right))/2+e.left,(this.view.height-(e.top+e.bottom))/2+e.top)}get viewpoint(){return this.ready?U(this.view,this.camera):this._get("viewpoint")}set viewpoint(e){if(!this._updatePropertyBeforeReady("viewpoint",e))if(e)if(this.isCompatible(e))this.setStateCamera(this._viewpointToCamera(e),{applyConstraints:!e.camera})||a.getLogger(this).error("#viewpoint=","Invalid viewpoint",e);else{const t=null!=e.camera?e.camera.position:e.targetGeometry,i=null!=t&&t.spatialReference;a.getLogger(this).error("#viewpoint=","Viewpoint has an incompatible spatial reference (viewpoint: "+(i?i.wkid:"none")+", view: "+this.view.spatialReference?.wkid+")",e)}else a.getLogger(this).error("#viewpoint=","Viewpoint may not be null or undefined")}get zoom(){return this.ready?H(this.view,this.scale):this._get("zoom")}set zoom(e){this._updatePropertyBeforeReady("zoom",e)||void 0===e||this.setStateCamera(this._zoomToCamera(e),{applyConstraints:!0})||a.getLogger(this).error("#zoom=","Invalid zoom",e)}_computeCanvasSize(){if(this._devicePixelRatioOverride)return this.view.state.contentPixelRatio=this._devicePixelRatioOverride,this._tmpCanvasSize.width=Math.round(this.view.surface.clientWidth*this._devicePixelRatioOverride),this._tmpCanvasSize.height=Math.round(this.view.surface.clientHeight*this._devicePixelRatioOverride),this._tmpCanvasSize.pixelRatio=this._devicePixelRatioOverride,this._tmpCanvasSize;const e=Math.min(this._windowDevicePixelRatio,this.view.qualitySettings.maximumPixelRatio),t=(this._usePhysicalPixelRendering?this._windowDevicePixelRatio:e)*this.view.resolutionScale;this._tmpCanvasSize.width=Math.round(this.view.surface.clientWidth*t),this._tmpCanvasSize.height=Math.round(this.view.surface.clientHeight*t);const i=this.view.stage.renderView.renderingContext?.parameters.maxTextureSize;return i&&Z(this._tmpCanvasSize,i),this._tmpCanvasSize.pixelRatio=this._tmpCanvasSize.width>0?this._tmpCanvasSize.width/this.view.surface.clientWidth*.5+this._tmpCanvasSize.height/this.view.surface.clientHeight*.5:t,this.view.state&&(this.view.state.contentPixelRatio=Math.min(this._windowDevicePixelRatio,this.view.qualitySettings.maximumPixelRatio)),this._tmpCanvasSize}get _rasterPixelRatio(){return null!=this._devicePixelRatioOverride?this._devicePixelRatioOverride:this._usePhysicalPixelRenderingAny?this._windowDevicePixelRatio:Math.min(this._windowDevicePixelRatio,this.view.qualitySettings.maximumPixelRatio)}get _usePhysicalPixelRendering(){return this.view?.stage?.renderer.isFeatureEnabled(W.PhysicalPixelRendering)??!1}get _usePhysicalPixelRenderingAny(){const e=this.view?.stage?.renderer;return e&&(e.isFeatureEnabled(W.PhysicalPixelRendering,K.IDLE)||e.isFeatureEnabled(W.PhysicalPixelRendering,K.INTERACTING)||e.isFeatureEnabled(W.PhysicalPixelRendering,K.ANIMATING))}preinit(e){return!(this._isOverridden("center")&&!C(this.center.spatialReference,e))&&(!(this._isOverridden("camera")&&!C(this.camera.position.spatialReference,e))&&(!(this._isOverridden("extent")&&!C(this.extent.spatialReference,e))&&!!(!this._isOverridden("viewpoint")||C(this.viewpoint.targetGeometry?.spatialReference,e)&&C(this.viewpoint.camera?.position?.spatialReference,e))))}init(){this._constraintsManager=new T({view:this.view}),this._prepareFrame();const e=this._getInitialProperties();this._cameraSetByUser=!1,this._set("ready",!0);for(const t of e)this.set(t.name,t.value);if(!this._cameraSetByUser){const e=this._initialViewpoint||this.view.initialExtent;e&&this.isCompatible(e)?this._setInitialView(e):this.view.state.viewingMode===R.Local&&this.addHandles(l((()=>this.view.basemapTerrain.ready),(()=>{this.removeHandles(ae),this._setInitialView(this.view.dataExtent)}),{once:!0,initial:!0}),ae)}}exit(){this._cancelGoToOperation(),this.ready&&(this._override("padding",this.padding),this._set("ready",!1),this._clearOverride("hasInitialView"),this._cameraSetByUser=!1,this.removeHandles(ae),this._constraintsManager=s(this._constraintsManager))}async goTo(e,t){return t={animate:!0,...t},null!=this._gotoOperation&&this._gotoOperation.abort(t.animate),this._gotoOperation=new j(e,t,this.view),this.view.resourceController.scheduler.stopFrame(),this._gotoOperation.promise}debugSetCameraOnContent(){this.setStateCamera(S(this.view),{applyConstraints:!1})}step(e){const t=this.view.state,i=t?.cameraController;i&&(t.updateCamera((t=>i.stepController(e,t))),i.steppingFinished&&i.finishController())}_cancelGoToOperation(){null!=this._gotoOperation&&(this._gotoOperation.abort(),this._gotoOperation=null)}_getInitialProperties(){const e=new Set,t=[];for(const{propertyName:i,overrides:r}of $){const a=e.has(i),s=this._isOverridden(i);!a&&s&&t.push({name:i,value:this._get(i)}),this._clearOverride(i),(a||s)&&r.forEach((t=>e.add(t)))}return t}_setInitialView(e){if(null==e||this._cameraSetByUser)return;if(e instanceof t)return void this.setStateCamera(z(this.view,e),{applyConstraints:!1});if(e instanceof i){if(e.targetGeometry instanceof y){const t=N(this.view,e.targetGeometry,0,.5,V.LOCKED);return void(null!=t&&this.setStateCamera(z(this.view,t),{applyConstraints:!0}))}const t={applyConstraints:!e.camera},i=this._viewpointToCamera(e);return void this.setStateCamera(i,t)}const r=N(this.view,e,0,.5,V.LOCKED);null!=r&&this.setStateCamera(z(this.view,r),{applyConstraints:!0})}_updatePropertyBeforeReady(e,t){return!this.ready&&(this._override(e,t),t&&Y.has(e)&&this._override("hasInitialView",!0),!0)}isCompatible(e){return null!=e&&(e instanceof i?e.camera?this.isCompatible(e.camera):this.isCompatible(e.targetGeometry):e instanceof t?this.isCompatible(e.position):e.spatialReference&&!x(e.spatialReference,this.view.spatialReference))}_getPreservingHeadingTilt(e=ee){return this._cameraSetByUser?(e.heading=this.camera.heading,e.tilt=this.camera.tilt):(e.heading=0,e.tilt=.5),e}_centerPointAtDistanceToCamera(e,t,i=ie){const{heading:r,tilt:a}=this._getPreservingHeadingTilt(),s=B(this.view,r,a,e,t,V.ADJUST);return null==s?null:(i.copyFrom(this.view.state.camera),i.eye=s.eye,i.center=s.center,i.up=s.up,i)}_centerToCamera(e){let t;if(e.hasZ)t=this.view.state.camera.distance;else{const{centerOnContent:e}=this.view.pointsOfInterest;e.runTask(),t=e.distance}return this._centerPointAtDistanceToCamera(e,t)}_extentToCamera(e){const{heading:t,tilt:i}=this._getPreservingHeadingTilt(),r=N(this.view,e,t,i,V.ADJUST,te);return r?z(this.view,r):null}_scaleToCamera(e){if(null==e)return null;const t=this.view,i=t.pointsOfInterest.centerOnContent;i.runTask();const r=i.renderLocation,a=t.pointsOfInterest.cameraOnSurface.renderLocation,s=D(t,e,t.state.contentCamera,r,a);return this._centerPointAtDistanceToCamera(r,s)}_zoomToCamera(e){return this._scaleToCamera(G(this.view,e))}_viewpointToCamera(e){return z(this.view,F(this.view,e))}setStateCamera(e,t){return!(null==e||!this.view.state.stopActiveCameraController())&&(this._cameraSetByUser=!0,t.doNotCancelGoToOperation||this._cancelGoToOperation(),this.view.state.updateCamera((i=>{t.positionAndOrientationOnly?(i.eye=e.eye,i.center=e.center,i.up=e.up,i.fov=e.fov):i.copyFrom(e),t.applyConstraints&&P(this.view,i)})),t.applyConstraints||(this.view.state.cameraController=new I({view:this.view,desiredCamera:e})),!0)}_prepareFrame(){const{surface:e,canvas:t}=this.view;if(!e||!t)return;this._windowDevicePixelRatio=window.devicePixelRatio;const i=this._computeCanvasSize();if(0!==i.width&&0!==i.height&&(t.width===i.width&&t.height===i.height||(t.width=i.width,t.height=i.height),this.view.state)){const e=this.view.state.camera;e.fullWidth===i.width&&e.fullHeight===i.height&&e.pixelRatio===i.pixelRatio||(ie.copyFrom(e),ie.pixelRatio!==i.pixelRatio&&(this._paddingToArray(this.padding,i.pixelRatio,re),ie.padding=re),ie.fullWidth=i.width,ie.fullHeight=i.height,ie.pixelRatio=i.pixelRatio,this.view.state.camera=ie),this._updateViewState()}}_updateElevation(e){const t=this.view.basemapTerrain?.spatialReference,i=this.view.renderCoordsHelper?.getAltitude(e.eye)??0,r=t?O(this.view,e.eye):0;e.relativeElevation=i-r}_updateViewState(){null!=this.test.renderState?this.view.state.mode=this.test.renderState:this.view.animation?this.view.state.mode=K.ANIMATING:this.view.interacting?this.view.state.mode=K.INTERACTING:(this.view.state.mode===K.ANIMATING&&(this._cameraChangeTime=0),performance.now()-this._cameraChangeTime<this._idleTimeout?this.view.state.mode=K.INTERACTING:this.view.state.mode=K.IDLE),this.view.state.rasterPixelRatio=this._rasterPixelRatio}_cameraChangedHandler(e,t){e&&t&&e.almostEquals(t)||(this._cameraChangeTime=performance.now(),this._updateViewState())}};e([m({type:t,dependsOn:["view.state.camera","ready"]})],Q.prototype,"camera",null),e([m({type:t,dependsOn:["view.state.contentCamera","ready"]})],Q.prototype,"contentCamera",null),e([m({type:_})],Q.prototype,"center",null),e([m()],Q.prototype,"visibleArea",null),e([m({type:y})],Q.prototype,"extent",null),e([m({readOnly:!0})],Q.prototype,"frustum",null),e([m()],Q.prototype,"_constraintsManager",void 0),e([m({readOnly:!0})],Q.prototype,"constraintsManager",null),e([m()],Q.prototype,"_initialViewpoint",null),e([m({readOnly:!0})],Q.prototype,"hasInitialView",null),e([m({readOnly:!0,type:Boolean})],Q.prototype,"ready",void 0),e([m({type:Number})],Q.prototype,"scale",null),e([m()],Q.prototype,"padding",null),e([m({readOnly:!0})],Q.prototype,"screenCenter",null),e([m({constructOnly:!0})],Q.prototype,"view",void 0),e([m({type:i})],Q.prototype,"viewpoint",null),e([m({type:Number})],Q.prototype,"zoom",null),e([m({readOnly:!0})],Q.prototype,"_rasterPixelRatio",null),e([m({readOnly:!0})],Q.prototype,"_usePhysicalPixelRendering",null),e([m({readOnly:!0})],Q.prototype,"_usePhysicalPixelRenderingAny",null),e([m()],Q.prototype,"_windowDevicePixelRatio",void 0),e([m()],Q.prototype,"_devicePixelRatioOverride",void 0),Q=e([d("esri.views.3d.state.ViewStateManager")],Q);class X{constructor(){this.width=0,this.height=0,this.pixelRatio=1}}const Y=new Set(["camera","viewpoint","extent","scale","center","zoom"]),$=[{propertyName:"camera",overrides:["viewpoint"]},{propertyName:"viewpoint",overrides:["extent"]},{propertyName:"extent",overrides:["center","scale"]},{propertyName:"center",overrides:[]},{propertyName:"scale",overrides:["zoom"]},{propertyName:"zoom",overrides:[]},{propertyName:"padding",overrides:[]}],ee={heading:0,tilt:0},te=new t,ie=new k,re=g(),ae="pending-initial-view",se="content-camera-reset",ne=300,oe=100;export{Q as ViewStateManager,oe as interactingTimeout};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{BufferViewVec2f16 as e,BufferViewVec2f as t,BufferViewVec2f64 as i,BufferViewVec3f as s,BufferViewVec3f64 as r,BufferViewVec4f as n,BufferViewVec4f64 as h,BufferViewMat3f as d,BufferViewMat3f64 as u,BufferViewMat4f as f,BufferViewMat4f64 as o,BufferViewVec4u8 as l,BufferViewFloat as p,BufferViewFloat64 as c,BufferViewUint8 as a,BufferViewUint16 as _,BufferViewInt8 as y,BufferViewVec2i8 as F,BufferViewVec2i16 as m,BufferViewVec2u8 as b,BufferViewVec4u16 as g,BufferViewUint32 as w,BufferViewVec3u8 as v,BufferViewVec2u16 as E,BufferViewVec3u16 as M,BufferViewVec2u32 as T,BufferViewVec3u32 as A,BufferViewVec4u32 as B,BufferViewVec3i8 as U,BufferViewVec4i8 as C,BufferViewInt16 as L,BufferViewVec3i16 as j,BufferViewVec4i16 as x,BufferViewInt32 as z,BufferViewVec2i32 as $,BufferViewVec3i32 as V,BufferViewVec4i32 as k}from"../../../../geometry/support/buffer/BufferView.js";import{elementTypeSize as q}from"../../../../geometry/support/buffer/types.js";import{assert as D}from"../../webgl-engine/lib/Util.js";class G{constructor(e,t){this.layout=e,this.buffer="number"==typeof t?new ArrayBuffer(t*e.stride):t;for(const i of e.fields.keys()){const t=e.fields.get(i);this[i]=new t.constructor(this.buffer,t.offset,this.stride)}}get stride(){return this.layout.stride}get count(){return this.buffer.byteLength/this.stride}get byteLength(){return this.buffer.byteLength}getField(e,t){const i=this[e];return i&&i.elementCount===t.ElementCount&&i.elementType===t.ElementType?i:null}slice(e,t){return new G(this.layout,this.buffer.slice(e*this.stride,t*this.stride))}copyFrom(e,t=0,i=0,s=e.count){const r=this.stride;if(r%4==0){const n=new Uint32Array(e.buffer,t*r,s*r/4);new Uint32Array(this.buffer,i*r,s*r/4).set(n)}else{const n=new Uint8Array(e.buffer,t*r,s*r);new Uint8Array(this.buffer,i*r,s*r).set(n)}return this}get cachedMemory(){return this.byteLength}dispose(){}}class H{constructor(e){this._stride=0,this._fields=new Map,e&&(this._stride=e.stride,e.fields.forEach((e=>this._fields.set(e[0],{...e[1],constructor:O(e[1].constructor)}))))}freeze(){return this}vec2f16(t,i){return this._appendField(t,e,i),this}vec2f(e,i){return this._appendField(e,t,i),this}vec2f64(e,t){return this._appendField(e,i,t),this}vec3f(e,t){return this._appendField(e,s,t),this}vec3f64(e,t){return this._appendField(e,r,t),this}vec4f(e,t){return this._appendField(e,n,t),this}vec4f64(e,t){return this._appendField(e,h,t),this}mat3f(e,t){return this._appendField(e,d,t),this}mat3f64(e,t){return this._appendField(e,u,t),this}mat4f(e,t){return this._appendField(e,f,t),this}mat4f64(e,t){return this._appendField(e,o,t),this}vec4u8(e,t){return this._appendField(e,l,t),this}f32(e,t){return this._appendField(e,p,t),this}f64(e,t){return this._appendField(e,c,t),this}u8(e,t){return this._appendField(e,a,t),this}u16(e,t){return this._appendField(e,_,t),this}i8(e,t){return this._appendField(e,y,t),this}vec2i8(e,t){return this._appendField(e,F,t),this}vec2i16(e,t){return this._appendField(e,m,t),this}vec2u8(e,t){return this._appendField(e,b,t),this}vec4u16(e,t){return this._appendField(e,g,t),this}u32(e,t){return this._appendField(e,w,t),this}_appendField(e,t,i){if(this._fields.has(e))return void D(!1,`${e} already added to vertex buffer layout`);const s=t.ElementCount*q(t.ElementType),r=this._stride;this._fields.set(e,{constructor:t,size:s,offset:r,optional:i}),this._alignFields()}_alignFields(){let e=0,t=1;this._fields.forEach((i=>{const s=q(i.constructor.ElementType);e=Math.floor((e+s-1)/s)*s,i.offset=e,e+=i.size,t=Math.max(t,s)})),e=Math.floor((e+t-1)/t)*t,this._stride=e}createBuffer(e){return new G(this,e)}createView(e){return new G(this,e)}clone(){const e=new H;return e._stride=this._stride,e._fields=new Map,this._fields.forEach(((t,i)=>e._fields.set(i,t))),e.BufferType=this.BufferType,e}get stride(){return this._stride}get fields(){return this._fields}}function I(){return new H}class J{constructor(e){this.fields=new Array,e.fields.forEach(((e,t)=>{const i={...e,constructor:N(e.constructor)};this.fields.push([t,i])})),this.stride=e.stride}}const K=[p,t,s,n,d,f,c,i,r,h,u,o,a,b,v,l,_,E,M,g,w,T,A,B,y,F,U,C,L,m,j,x,z,$,V,k];function N(e){return`${e.ElementType}_${e.ElementCount}`}function O(e){return P.get(e)}const P=new Map;K.forEach((e=>P.set(N(e),e)));export{G as InterleavedBuffer,H as InterleavedLayout,J as PackedLayout,I as newLayout};
5
+ import{BufferViewVec2f16 as e,BufferViewVec2f as t,BufferViewVec2f64 as i,BufferViewVec3f as s,BufferViewVec3f64 as r,BufferViewVec4f16 as n,BufferViewVec4f as h,BufferViewVec4f64 as d,BufferViewMat3f as u,BufferViewMat3f64 as f,BufferViewMat4f as o,BufferViewMat4f64 as l,BufferViewVec4u8 as p,BufferViewFloat16 as c,BufferViewFloat as a,BufferViewFloat64 as _,BufferViewUint8 as y,BufferViewUint16 as F,BufferViewInt8 as m,BufferViewVec2i8 as b,BufferViewVec2i16 as g,BufferViewVec2u8 as w,BufferViewVec4u16 as v,BufferViewUint32 as E,BufferViewVec3u8 as M,BufferViewVec2u16 as T,BufferViewVec3u16 as A,BufferViewVec2u32 as B,BufferViewVec3u32 as U,BufferViewVec4u32 as C,BufferViewVec3i8 as L,BufferViewVec4i8 as j,BufferViewInt16 as x,BufferViewVec3i16 as z,BufferViewVec4i16 as $,BufferViewInt32 as V,BufferViewVec2i32 as k,BufferViewVec3i32 as q,BufferViewVec4i32 as D}from"../../../../geometry/support/buffer/BufferView.js";import{elementTypeSize as G}from"../../../../geometry/support/buffer/types.js";import{assert as H}from"../../webgl-engine/lib/Util.js";class I{constructor(e,t){this.layout=e,this.buffer="number"==typeof t?new ArrayBuffer(t*e.stride):t;for(const i of e.fields.keys()){const t=e.fields.get(i);this[i]=new t.constructor(this.buffer,t.offset,this.stride)}}get stride(){return this.layout.stride}get count(){return this.buffer.byteLength/this.stride}get byteLength(){return this.buffer.byteLength}getField(e,t){const i=this[e];return i&&i.elementCount===t.ElementCount&&i.elementType===t.ElementType?i:null}slice(e,t){return new I(this.layout,this.buffer.slice(e*this.stride,t*this.stride))}copyFrom(e,t=0,i=0,s=e.count){const r=this.stride;if(r%4==0){const n=new Uint32Array(e.buffer,t*r,s*r/4);new Uint32Array(this.buffer,i*r,s*r/4).set(n)}else{const n=new Uint8Array(e.buffer,t*r,s*r);new Uint8Array(this.buffer,i*r,s*r).set(n)}return this}get cachedMemory(){return this.byteLength}dispose(){}}class J{constructor(e){this._stride=0,this._fields=new Map,e&&(this._stride=e.stride,e.fields.forEach((e=>this._fields.set(e[0],{...e[1],constructor:Q(e[1].constructor)}))))}freeze(){return this}vec2f16(t,i){return this._appendField(t,e,i),this}vec2f(e,i){return this._appendField(e,t,i),this}vec2f64(e,t){return this._appendField(e,i,t),this}vec3f(e,t){return this._appendField(e,s,t),this}vec3f64(e,t){return this._appendField(e,r,t),this}vec4f16(e,t){return this._appendField(e,n,t),this}vec4f(e,t){return this._appendField(e,h,t),this}vec4f64(e,t){return this._appendField(e,d,t),this}mat3f(e,t){return this._appendField(e,u,t),this}mat3f64(e,t){return this._appendField(e,f,t),this}mat4f(e,t){return this._appendField(e,o,t),this}mat4f64(e,t){return this._appendField(e,l,t),this}vec4u8(e,t){return this._appendField(e,p,t),this}f16(e,t){return this._appendField(e,c,t),this}f32(e,t){return this._appendField(e,a,t),this}f64(e,t){return this._appendField(e,_,t),this}u8(e,t){return this._appendField(e,y,t),this}u16(e,t){return this._appendField(e,F,t),this}i8(e,t){return this._appendField(e,m,t),this}vec2i8(e,t){return this._appendField(e,b,t),this}vec2i16(e,t){return this._appendField(e,g,t),this}vec2u8(e,t){return this._appendField(e,w,t),this}vec4u16(e,t){return this._appendField(e,v,t),this}u32(e,t){return this._appendField(e,E,t),this}_appendField(e,t,i){if(this._fields.has(e))return void H(!1,`${e} already added to vertex buffer layout`);const s=t.ElementCount*G(t.ElementType),r=this._stride;this._fields.set(e,{constructor:t,size:s,offset:r,optional:i}),this._alignFields()}_alignFields(){let e=0,t=1;this._fields.forEach((i=>{const s=G(i.constructor.ElementType);e=Math.floor((e+s-1)/s)*s,i.offset=e,e+=i.size,t=Math.max(t,s)})),e=Math.floor((e+t-1)/t)*t,this._stride=e}createBuffer(e){return new I(this,e)}createView(e){return new I(this,e)}clone(){const e=new J;return e._stride=this._stride,e._fields=new Map,this._fields.forEach(((t,i)=>e._fields.set(i,t))),e.BufferType=this.BufferType,e}get stride(){return this._stride}get fields(){return this._fields}}function K(){return new J}class N{constructor(e){this.fields=new Array,e.fields.forEach(((e,t)=>{const i={...e,constructor:P(e.constructor)};this.fields.push([t,i])})),this.stride=e.stride}}const O=[a,t,s,h,u,o,_,i,r,d,f,l,y,w,M,p,F,T,A,v,E,B,U,C,m,b,L,j,x,g,z,$,V,k,q,D];function P(e){return`${e.ElementType}_${e.ElementCount}`}function Q(e){return R.get(e)}const R=new Map;O.forEach((e=>R.set(P(e),e)));export{I as InterleavedBuffer,J as InterleavedLayout,N as PackedLayout,K as newLayout};