@arcgis/core 5.1.0-next.44 → 5.1.0-next.46

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 (178) hide show
  1. package/applications/Components/featureUtils.d.ts +11 -7
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/{9aa1ad8b436b5b0dd5f5.js → 08d76c600926d7642a8b.js} +1 -1
  4. package/assets/esri/core/workers/chunks/{54db91c0a3bd1946e026.js → 0d59f5cd3fdd7d6fd693.js} +1 -1
  5. package/assets/esri/core/workers/chunks/128799741dd3c6fc69b9.js +1 -0
  6. package/assets/esri/core/workers/chunks/13eb0162d95b4d27389c.js +1 -0
  7. package/assets/esri/core/workers/chunks/1a481f3ae3146682eb00.js +1 -0
  8. package/assets/esri/core/workers/chunks/1cce2f8837ad765acf44.js +1 -0
  9. package/assets/esri/core/workers/chunks/{288082ae7b19837a3d38.js → 20e715e3aeb1c3265901.js} +1 -1
  10. package/assets/esri/core/workers/chunks/2379c64b0ca30814a815.js +1 -0
  11. package/assets/esri/core/workers/chunks/23a9070e9362b8439770.js +1 -0
  12. package/assets/esri/core/workers/chunks/2b3a8a53cd68f666676b.js +1 -0
  13. package/assets/esri/core/workers/chunks/{4d16b6ac52e25bd7e6aa.js → 32a51ce8e1a362115c89.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{392941013107bbd96503.js → 365ad1ffd496ed86637b.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{45cf181c1945e6c77a4b.js → 3a7c02616d942c81257d.js} +1 -1
  16. package/assets/esri/core/workers/chunks/3e9700445518b8f9ae1b.js +1 -0
  17. package/assets/esri/core/workers/chunks/{eab74d830c2eaa9d133b.js → 4869e2f35aaf6b058281.js} +1 -1
  18. package/assets/esri/core/workers/chunks/4b3545965b11a54184d4.js +2 -0
  19. package/assets/esri/core/workers/chunks/{10941b50f5933d168df6.js → 521a671182b0f79e3624.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{c2f3fc1b34a6782b431f.js → 5351e71ce7839636d06d.js} +1 -1
  21. package/assets/esri/core/workers/chunks/569e4479707bc6881d97.js +1 -0
  22. package/assets/esri/core/workers/chunks/5b515b5741733bcb4645.js +1 -0
  23. package/assets/esri/core/workers/chunks/{1669f1bf959c4e3083da.js → 5c0b3c76a7bc971c61dc.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{5f81f9e586b3ba0c34d4.js → 5c830cce32710d70dfa6.js} +1 -1
  25. package/assets/esri/core/workers/chunks/5e9bd5ed6ecee5b15127.js +1 -0
  26. package/assets/esri/core/workers/chunks/617328964d480d4a3a45.js +1 -0
  27. package/assets/esri/core/workers/chunks/650614a9e4871714c42e.js +1 -0
  28. package/assets/esri/core/workers/chunks/66baacbef23291eab853.js +1 -0
  29. package/assets/esri/core/workers/chunks/{c9f5d72b86ecb2a30587.js → 6c49ac7888679b9f7823.js} +1 -1
  30. package/assets/esri/core/workers/chunks/7278cc37e85f0242f19b.js +1 -0
  31. package/assets/esri/core/workers/chunks/{3c597d8ef898627b8f93.js → 768bbc910be6c65ac107.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{a1f36240a31057f998da.js → 79dc7045d9a2d43ba8df.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{4140d4c8b6b122fc2cd4.js → 7b48c102a44606291f82.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{f9da5c81535eaffc8b9c.js → 7f07f490c6fcc794c8d9.js} +1 -1
  35. package/assets/esri/core/workers/chunks/{2b386374330d96387aec.js → 851fc5290497991ba001.js} +1 -1
  36. package/assets/esri/core/workers/chunks/{30cdb2d1d9f018f1642d.js → 9032c040b214b5af775b.js} +1 -1
  37. package/assets/esri/core/workers/chunks/{ff8ec6369c8a1bee9bb4.js → 908f171b9c512d738dea.js} +1 -1
  38. package/assets/esri/core/workers/chunks/{c7799ba861ac5af08e6a.js → 92d4e962284e13ba2fc5.js} +1 -1
  39. package/assets/esri/core/workers/chunks/970d971551e42f7ae08d.js +1 -0
  40. package/assets/esri/core/workers/chunks/9802770413ad814dab29.js +1 -0
  41. package/assets/esri/core/workers/chunks/{6cc5c37d6bdaf5483bd4.js → a422cfe1e2afe0722acd.js} +1 -1
  42. package/assets/esri/core/workers/chunks/{6e8cfe69617876ee0dac.js → a69f1879735a031f62e9.js} +1 -1
  43. package/assets/esri/core/workers/chunks/{af804beb43d4d10c54d9.js → a9f35127c3f5bf42036b.js} +1 -1
  44. package/assets/esri/core/workers/chunks/{fb69a0bb025b7a5ec588.js → b45fdc04d399d2849d63.js} +1 -1
  45. package/assets/esri/core/workers/chunks/{c0cc4ca138db47052845.js → b49b608c0d58a9b55fa2.js} +1 -1
  46. package/assets/esri/core/workers/chunks/b744b950999b92393e37.js +1 -0
  47. package/assets/esri/core/workers/chunks/beb53b372d356800f333.js +1 -0
  48. package/assets/esri/core/workers/chunks/c2aa3b1344b42a904234.js +1 -0
  49. package/assets/esri/core/workers/chunks/cdeb6aec578a1c07d663.js +1 -0
  50. package/assets/esri/core/workers/chunks/{1a3f874700f86b750390.js → ce0a6bc9df30af778ac9.js} +2 -2
  51. package/assets/esri/core/workers/chunks/cf5e4cf9b1aa37eeb6b0.js +1 -0
  52. package/assets/esri/core/workers/chunks/d0adf059085ddf7151dd.js +1 -0
  53. package/assets/esri/core/workers/chunks/d2af5342fbe80e2d8c60.js +1 -0
  54. package/assets/esri/core/workers/chunks/e4e0c5a45cf32973d5d5.js +1 -0
  55. package/assets/esri/core/workers/chunks/{465cc0e00f03cdb640b2.js → e7402dfd683f82878360.js} +1 -1
  56. package/assets/esri/core/workers/chunks/{8838ff9668b472af16a1.js → ef0eae13408cbf83a64f.js} +1 -1
  57. package/assets/esri/core/workers/chunks/f1767b8ba82fdd9bd947.js +1 -0
  58. package/assets/esri/core/workers/chunks/{b86cb84c03b76e824213.js → f9fe89ced41b49608667.js} +1 -1
  59. package/assets/esri/core/workers/chunks/{3c7ee71f0d8582e6d78f.js → ff75fb0fce51ac12e656.js} +1 -1
  60. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  61. package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
  62. package/assets/esri/libs/vxl/vxlLayer.wasm +0 -0
  63. package/assets/esri/themes/base/widgets/_Grid.scss +5 -0
  64. package/assets/esri/themes/dark/main.css +1 -1
  65. package/assets/esri/themes/light/main.css +1 -1
  66. package/assets/esri/themes/light/view.css +1 -1
  67. package/chunks/GaussianSplat.glsl.js +2 -2
  68. package/chunks/HUDMaterial.glsl.js +1 -1
  69. package/chunks/Jpg.js +1 -1
  70. package/chunks/LineCallout.glsl.js +1 -1
  71. package/chunks/PointRenderer.glsl.js +1 -1
  72. package/chunks/Terrain.glsl.js +4 -4
  73. package/chunks/Zlib.js +1 -1
  74. package/chunks/lyr3DMain.js +1 -1
  75. package/chunks/lyr3DWorker.js +1 -1
  76. package/chunks/vxlLayer.js +1 -1
  77. package/config.js +1 -1
  78. package/geometry/support/zscale.js +1 -1
  79. package/kernel.js +1 -1
  80. package/layers/IntegratedMesh3DTilesLayer.d.ts +2 -1
  81. package/layers/IntegratedMesh3DTilesLayer.js +1 -1
  82. package/layers/Lyr3DWasmPerSceneView.js +1 -1
  83. package/layers/graphics/featureConversionUtils.js +1 -1
  84. package/layers/knowledgeGraph/dataModelVisualizationUtils.js +1 -1
  85. package/layers/ogc/ogcFeatureUtils.js +1 -1
  86. package/layers/raster/formats/ImageCanvasDecoder.js +1 -1
  87. package/layers/raster/formats/JpgPlus.js +1 -1
  88. package/layers/raster/formats/RasterCodec.js +1 -1
  89. package/layers/raster/formats/TiffDecoder.js +1 -1
  90. package/layers/save/featureLayerUtils.js +1 -1
  91. package/layers/save/groupLayerUtils.js +1 -1
  92. package/layers/save/mapImageLayerUtils.js +1 -1
  93. package/layers/support/SubtypeSublayer.js +1 -1
  94. package/layers/support/layerUtils.js +1 -1
  95. package/layers/support/schemaValidator.js +1 -1
  96. package/libs/ajv/ajv.bundle-wrapper.js +2 -0
  97. package/package.json +3 -3
  98. package/renderers/visualVariables/SizeVariable.js +1 -1
  99. package/rest/locator/locationToAddress.js +1 -1
  100. package/rest/query/operations/pbfFeatureSetUtils.js +1 -1
  101. package/rest/query/operations/pbfFlatFeatureSet.js +1 -1
  102. package/rest/query/operations/pbfOptimizedFeatureSet.js +1 -1
  103. package/rest/support/LocationToAddressParameters.d.ts +62 -2
  104. package/rest/support/types.d.ts +6 -0
  105. package/support/revision.js +1 -1
  106. package/third-party-notices.txt +2 -2
  107. package/views/2d/analysis/AreaMeasurement/AreaMeasurementTool.js +1 -1
  108. package/views/2d/engine/ManagedCanvas.js +1 -1
  109. package/views/2d/engine/vectorTiles/Placement.js +1 -1
  110. package/views/2d/engine/vectorTiles/VTLPainter3D.js +1 -1
  111. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  112. package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
  113. package/views/2d/layers/TileLayerView2D.js +1 -1
  114. package/views/2d/layers/features/FeaturePipelineWorker.js +1 -1
  115. package/views/2d/layers/features/Processor.js +1 -1
  116. package/views/2d/layers/features/processor/AProcessorStrategy.js +1 -1
  117. package/views/2d/layers/features/processor/ClusterStrategy.js +1 -1
  118. package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
  119. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  120. package/views/3d/layers/i3s/I3SClientMaterialUtil.js +1 -1
  121. package/views/3d/terrain/OverlayRenderer.js +1 -1
  122. package/views/3d/terrain/TerrainRenderer.js +1 -1
  123. package/views/3d/terrain/TileCompositor.js +1 -1
  124. package/views/3d/webgl-engine/collections/Component/ComponentDrawParameters.js +1 -1
  125. package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
  126. package/views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js +3 -3
  127. package/views/3d/webgl-engine/effects/WeatherFader.js +1 -1
  128. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
  129. package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
  130. package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
  131. package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
  132. package/views/3d/webgl-engine/lib/RenderContext.js +1 -1
  133. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  134. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  135. package/views/3d/webgl-engine/shaders/GaussianSplat.glsl.js +1 -1
  136. package/views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js +1 -1
  137. package/views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js +1 -1
  138. package/views/interactive/GraphicManipulator.js +1 -1
  139. package/views/webgl/InstanceCounter.js +1 -1
  140. package/webscene/support/schemaValidator.js +1 -1
  141. package/widgets/AreaMeasurement2D/AreaMeasurement2DTool.js +1 -1
  142. package/widgets/DistanceMeasurement2D/DistanceMeasurement2DTool.js +1 -1
  143. package/widgets/Editor/EditorViewModel.d.ts +1 -1
  144. package/widgets/Editor/workflowUtils.js +1 -1
  145. package/widgets/Editor.d.ts +2 -1
  146. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  147. package/widgets/FeatureTable.js +1 -1
  148. package/widgets/Sketch/SketchViewModel.js +1 -1
  149. package/widgets/Sketch/support/PluginManager.js +1 -1
  150. package/assets/esri/core/workers/chunks/02a0a58ca5916db1db19.js +0 -1
  151. package/assets/esri/core/workers/chunks/03c8453ae72a4e190252.js +0 -1
  152. package/assets/esri/core/workers/chunks/0e669a04999feb9f98c9.js +0 -1
  153. package/assets/esri/core/workers/chunks/244dd7a948ca8a7dc6ef.js +0 -1
  154. package/assets/esri/core/workers/chunks/26cafd20c8d03c274389.js +0 -1
  155. package/assets/esri/core/workers/chunks/2cd0934163cb627ce251.js +0 -1
  156. package/assets/esri/core/workers/chunks/2fa86dacc8a12a6a6c43.js +0 -1
  157. package/assets/esri/core/workers/chunks/385f1bb9164b2d488b2d.js +0 -1
  158. package/assets/esri/core/workers/chunks/3e26f9af6b8c75bad97a.js +0 -1
  159. package/assets/esri/core/workers/chunks/5a6a6e7151085a3cd3dd.js +0 -1
  160. package/assets/esri/core/workers/chunks/5eb9fdb076488de9cd83.js +0 -1
  161. package/assets/esri/core/workers/chunks/65865c25487d23dd2e31.js +0 -1
  162. package/assets/esri/core/workers/chunks/65ea5028eb12457a3aeb.js +0 -1
  163. package/assets/esri/core/workers/chunks/73d7337ac9efdbad14a4.js +0 -1
  164. package/assets/esri/core/workers/chunks/8333561a938bcdf6c2e6.js +0 -1
  165. package/assets/esri/core/workers/chunks/848c6989a6a222c7a1d8.js +0 -2
  166. package/assets/esri/core/workers/chunks/91718795fc4ca6516ac7.js +0 -1
  167. package/assets/esri/core/workers/chunks/9b80569819cd1c72a9ff.js +0 -1
  168. package/assets/esri/core/workers/chunks/a4a2e7bc3369434c5cfa.js +0 -1
  169. package/assets/esri/core/workers/chunks/b056b4c79bcd542dd1d2.js +0 -1
  170. package/assets/esri/core/workers/chunks/b553264db0f10bb8c5f7.js +0 -1
  171. package/assets/esri/core/workers/chunks/c4f64195e44986644993.js +0 -1
  172. package/assets/esri/core/workers/chunks/ca6012135929b028ea1b.js +0 -1
  173. package/assets/esri/core/workers/chunks/de79645e559a2d1ffa67.js +0 -1
  174. package/assets/esri/core/workers/chunks/df5788d42787ee8bf523.js +0 -1
  175. package/assets/esri/core/workers/chunks/f0e6a26a3625068b08ab.js +0 -1
  176. package/assets/esri/core/workers/chunks/f36a234ef35faf8ca04d.js +0 -1
  177. package/chunks/ajv.bundle.js +0 -2
  178. /package/assets/esri/core/workers/chunks/{848c6989a6a222c7a1d8.js.LICENSE.txt → 4b3545965b11a54184d4.js.LICENSE.txt} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/core",
3
- "version": "5.1.0-next.44",
3
+ "version": "5.1.0-next.46",
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": [
@@ -18,8 +18,8 @@
18
18
  ],
19
19
  "license": "SEE LICENSE IN LICENSE.md",
20
20
  "dependencies": {
21
- "@amcharts/amcharts5": "~5.16.1",
22
- "@arcgis/toolkit": "^5.1.0-next.44",
21
+ "@amcharts/amcharts5": "~5.16.2",
22
+ "@arcgis/toolkit": "^5.1.0-next.46",
23
23
  "@esri/arcgis-html-sanitizer": "~4.1.0",
24
24
  "@esri/calcite-components": "^5.0.2",
25
25
  "@vaadin/grid": "~25.0.8",
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{JSONMap as t}from"../../core/jsonMap.js";import i from"../../core/Logger.js";import{property as s,subclass as r}from"../../core/accessorSupport/decorators.js";import n from"./VisualVariable.js";import{castSizeFromStringOrNumber as a}from"./support/castSizeVariable.js";import o from"./support/SizeStop.js";import l from"./support/SizeVariableLegendOptions.js";import{isSizeVariable as p,getInputValueType as u,getTransformationType as m}from"./support/sizeVariableUtils.js";import{viewScaleRE as h}from"./support/visualVariableUtils.js";import{addPropertyUnsupportedError as d,addUnsupportedMessage as y}from"../../webdoc/support/unsupportedErrors.js";import{reader as c}from"../../core/accessorSupport/decorators/reader.js";import{writer as S}from"../../core/accessorSupport/decorators/writer.js";var z;const x=new t({width:"width",depth:"depth",height:"height",widthAndDepth:"width-and-depth",all:"all"}),w=new t({unknown:"unknown",inch:"inches",foot:"feet",yard:"yards",mile:"miles","nautical-mile":"nautical-miles",millimeter:"millimeters",centimeter:"centimeters",decimeter:"decimeters",meter:"meters",kilometer:"kilometers"});function v(e){if(null!=e)return"string"==typeof e||"number"==typeof e?a(e):"size"===e.type?p(e)?e:(delete(e={...e}).type,new V(e)):void 0}function g(e,t,i){if("object"!=typeof e)return e;if("web-scene"===i.origin)return;const s=new V;return s.read(e,i),s}function f(e,t,i,s){"number"!=typeof e?"web-scene"!==s?.origin?t[i]=e.toJSON(s):y(s,"error","property",`Size variable '${i}' can only be a number in web scenes.`):t[i]=e}let V=z=class extends n{constructor(e){super(e),this.axis=null,this.legendOptions=null,this.normalizationField=null,this.scaleBy=null,this.target=null,this.type="size",this.useSymbolValue=null,this.valueExpression=null,this.valueRepresentation=null,this.valueUnit=null}get cache(){return{ipData:this._interpolateData(),hasExpression:!!this.valueExpression,compiledFunc:null,isScaleDriven:null!=this.valueExpression&&h.test(this.valueExpression)}}set index(e){p(this.maxSize)&&(this.maxSize.index=`visualVariables[${e}].maxSize`),p(this.minSize)&&(this.minSize.index=`visualVariables[${e}].minSize`),this._set("index",e)}get inputValueType(){return u(this)}set maxDataValue(e){e&&this.stops&&(i.getLogger(this).warn("cannot set maxDataValue when stops is not null."),e=null),this._set("maxDataValue",e)}get maxSize(){return this._get("maxSize")}set maxSize(e){e&&this.stops&&(i.getLogger(this).warn("cannot set maxSize when stops is not null."),e=null),this._set("maxSize",v(e))}readMaxSize(e,t,i){return g(e,t,i)}writeMaxSize(e,t,i,s){return f(e,t,i,s)}set minDataValue(e){e&&this.stops&&(i.getLogger(this).warn("cannot set minDataValue when stops is not null."),e=null),this._set("minDataValue",e)}get minSize(){return this._get("minSize")}set minSize(e){e&&this.stops&&(i.getLogger(this).warn("cannot set minSize when stops is not null."),e=null),this._set("minSize",v(e))}readMinSize(e,t,i){return g(e,t,i)}writeMinSize(e,t,i,s){return f(e,t,i,s)}get arcadeRequired(){return!!this.valueExpression||(null!=this.minSize&&"object"==typeof this.minSize&&this.minSize.arcadeRequired||null!=this.maxSize&&"object"==typeof this.maxSize&&this.maxSize.arcadeRequired)}set stops(e){null==this.minDataValue&&null==this.maxDataValue&&null==this.minSize&&null==this.maxSize?e&&Array.isArray(e)&&(e=e.filter(e=>!!e)).sort((e,t)=>e.value-t.value):e&&(i.getLogger(this).warn("cannot set stops when one of minDataValue, maxDataValue, minSize or maxSize is not null."),e=null),this._set("stops",e)}get transformationType(){return m(this,this.inputValueType)}readValueExpression(e,t){return e||t.expression&&"$view.scale"}writeValueExpressionWebScene(e,t,i,s){if("$view.scale"===e){if(s?.messages){const e=this.index;d(s,`visualVariables[${"string"==typeof e?e:`visualVariables[${e}]`}].valueExpression`,"SizeVariable with '$view.scale' valueExpression is not supported in Web Scene. Please remove this property to save the Web Scene.")}}else t[i]=e}readValueUnit(e){return e?w.read(e):null}clone(){return new z({axis:this.axis,field:this.field,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,maxDataValue:this.maxDataValue,maxSize:p(this.maxSize)?this.maxSize.clone():this.maxSize,minDataValue:this.minDataValue,minSize:p(this.minSize)?this.minSize.clone():this.minSize,normalizationField:this.normalizationField,stops:this.stops?.map(e=>e.clone()),target:this.target,useSymbolValue:this.useSymbolValue,valueRepresentation:this.valueRepresentation,valueUnit:this.valueUnit,legendOptions:this.legendOptions?.clone()})}flipSizes(){if("clamped-linear"===this.transformationType){const{minSize:e,maxSize:t}=this;return this.minSize=t,this.maxSize=e,this}if("stops"===this.transformationType){const e=this.stops;if(!e)return this;const t=e.map(e=>e.size).reverse(),i=e.length;for(let s=0;s<i;s++)e[s].size=t[s];return this}return this}getAttributeHash(){return`${super.getAttributeHash()}-${this.target}-${this.normalizationField}`}_interpolateData(){return this.stops?.map(e=>e.value||0)}};e([s({readOnly:!0})],V.prototype,"cache",null),e([s({type:x.apiValues,json:{type:x.jsonValues,origins:{"web-map":{read:!1}},read:x.read,write:x.write}})],V.prototype,"axis",void 0),e([s()],V.prototype,"index",null),e([s({type:String,readOnly:!0})],V.prototype,"inputValueType",null),e([s({type:l,json:{write:!0}})],V.prototype,"legendOptions",void 0),e([s({type:Number,value:null,json:{write:!0}})],V.prototype,"maxDataValue",null),e([s({type:Number,useTypeForAutocast:!1,value:null,json:{write:!0}})],V.prototype,"maxSize",null),e([c("maxSize")],V.prototype,"readMaxSize",null),e([S("maxSize")],V.prototype,"writeMaxSize",null),e([s({type:Number,value:null,json:{write:!0}})],V.prototype,"minDataValue",null),e([s({type:Number,useTypeForAutocast:!1,value:null,json:{write:!0}})],V.prototype,"minSize",null),e([c("minSize")],V.prototype,"readMinSize",null),e([S("minSize")],V.prototype,"writeMinSize",null),e([s({type:String,json:{write:!0}})],V.prototype,"normalizationField",void 0),e([s({readOnly:!0})],V.prototype,"arcadeRequired",null),e([s({type:String})],V.prototype,"scaleBy",void 0),e([s({type:[o],value:null,json:{write:!0}})],V.prototype,"stops",null),e([s({type:["outline"],json:{write:!0}})],V.prototype,"target",void 0),e([s({type:String,readOnly:!0})],V.prototype,"transformationType",null),e([s({type:["size"],json:{type:["sizeInfo"]}})],V.prototype,"type",void 0),e([s({type:Boolean,json:{write:!0,origins:{"web-map":{read:!1}}}})],V.prototype,"useSymbolValue",void 0),e([s({type:String,json:{write:!0}})],V.prototype,"valueExpression",void 0),e([c("valueExpression",["valueExpression","expression"])],V.prototype,"readValueExpression",null),e([S("web-scene","valueExpression")],V.prototype,"writeValueExpressionWebScene",null),e([s({type:["radius","diameter","area","width","distance"],json:{write:!0}})],V.prototype,"valueRepresentation",void 0),e([s({type:w.apiValues,json:{write:w.write,origins:{"web-map":{read:!1},"web-scene":{write:!0},"portal-item":{write:!0}}}})],V.prototype,"valueUnit",void 0),e([c("valueUnit")],V.prototype,"readValueUnit",null),V=z=e([r("esri.renderers.visualVariables.SizeVariable")],V);export{V as default};
2
+ import{__decorate as e}from"tslib";import{JSONMap as t}from"../../core/jsonMap.js";import i from"../../core/Logger.js";import{property as s,subclass as r}from"../../core/accessorSupport/decorators.js";import n from"./VisualVariable.js";import{castSizeFromStringOrNumber as a}from"./support/castSizeVariable.js";import o from"./support/SizeStop.js";import l from"./support/SizeVariableLegendOptions.js";import{isSizeVariable as p,getInputValueType as u,getTransformationType as m}from"./support/sizeVariableUtils.js";import{viewScaleRE as h}from"./support/visualVariableUtils.js";import{addPropertyUnsupportedError as d,addUnsupportedMessage as y}from"../../webdoc/support/unsupportedErrors.js";import{reader as c}from"../../core/accessorSupport/decorators/reader.js";import{writer as S}from"../../core/accessorSupport/decorators/writer.js";var z;const x=new t({width:"width",depth:"depth",height:"height",widthAndDepth:"width-and-depth",all:"all"}),w=new t({unknown:"unknown",inch:"inches",foot:"feet",yard:"yards",mile:"miles","nautical-mile":"nautical-miles",millimeter:"millimeters",centimeter:"centimeters",decimeter:"decimeters",meter:"meters",kilometer:"kilometers"});function v(e){if(null!=e)return"string"==typeof e||"number"==typeof e?a(e):"size"===e.type?p(e)?e:(delete(e={...e}).type,new V(e)):void 0}function g(e,t,i){if("object"!=typeof e)return e;if("web-scene"===i.origin)return;const s=new V;return s.read(e,i),s}function f(e,t,i,s){"number"!=typeof e?"web-scene"!==s?.origin?t[i]=e.toJSON(s):y(s,"error","property",`Size variable '${i}' can only be a number in web scenes.`):t[i]=e}let V=z=class extends n{constructor(e){super(e),this.axis=null,this.legendOptions=null,this.normalizationField=null,this.scaleBy=null,this.target=null,this.type="size",this.useSymbolValue=null,this.valueExpression=null,this.valueRepresentation=null,this.valueUnit=null}get cache(){return{ipData:this._interpolateData(),hasExpression:!!this.valueExpression,compiledFunc:null,isScaleDriven:null!=this.valueExpression&&h.test(this.valueExpression)}}set index(e){p(this.maxSize)&&(this.maxSize.index=`visualVariables[${e}].maxSize`),p(this.minSize)&&(this.minSize.index=`visualVariables[${e}].minSize`),this._set("index",e)}get inputValueType(){return u(this)}set maxDataValue(e){e&&this.stops&&(i.getLogger(this).warn("cannot set maxDataValue when stops is not null."),e=null),this._set("maxDataValue",e)}get maxSize(){return this._get("maxSize")}set maxSize(e){e&&this.stops&&(i.getLogger(this).warn("cannot set maxSize when stops is not null."),e=null),this._set("maxSize",v(e))}readMaxSize(e,t,i){return g(e,t,i)}writeMaxSize(e,t,i,s){return f(e,t,i,s)}set minDataValue(e){e&&this.stops&&(i.getLogger(this).warn("cannot set minDataValue when stops is not null."),e=null),this._set("minDataValue",e)}get minSize(){return this._get("minSize")}set minSize(e){e&&this.stops&&(i.getLogger(this).warn("cannot set minSize when stops is not null."),e=null),this._set("minSize",v(e))}readMinSize(e,t,i){return g(e,t,i)}writeMinSize(e,t,i,s){return f(e,t,i,s)}get arcadeRequired(){return!!this.valueExpression||(null!=this.minSize&&"object"==typeof this.minSize&&this.minSize.arcadeRequired||null!=this.maxSize&&"object"==typeof this.maxSize&&this.maxSize.arcadeRequired)}set stops(e){null==this.minDataValue&&null==this.maxDataValue&&null==this.minSize&&null==this.maxSize?e&&Array.isArray(e)&&(e=e.filter(e=>!!e)).sort((e,t)=>e.value-t.value):e&&(i.getLogger(this).warn("cannot set stops when one of minDataValue, maxDataValue, minSize or maxSize is not null."),e=null),this._set("stops",e)}get transformationType(){return m(this,this.inputValueType)}readValueExpression(e,t){return e||t.expression&&"$view.scale"}writeValueExpressionWebScene(e,t,i,s){if(h.test(e)){if(s?.messages){const e=this.index;d(s,`visualVariables[${"string"==typeof e?e:`visualVariables[${e}]`}].valueExpression`,"SizeVariable with '$view.scale' valueExpression is not supported in Web Scene. Please remove this property to save the Web Scene.")}}else t[i]=e}readValueUnit(e){return e?w.read(e):null}clone(){return new z({axis:this.axis,field:this.field,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,maxDataValue:this.maxDataValue,maxSize:p(this.maxSize)?this.maxSize.clone():this.maxSize,minDataValue:this.minDataValue,minSize:p(this.minSize)?this.minSize.clone():this.minSize,normalizationField:this.normalizationField,stops:this.stops?.map(e=>e.clone()),target:this.target,useSymbolValue:this.useSymbolValue,valueRepresentation:this.valueRepresentation,valueUnit:this.valueUnit,legendOptions:this.legendOptions?.clone()})}flipSizes(){if("clamped-linear"===this.transformationType){const{minSize:e,maxSize:t}=this;return this.minSize=t,this.maxSize=e,this}if("stops"===this.transformationType){const e=this.stops;if(!e)return this;const t=e.map(e=>e.size).reverse(),i=e.length;for(let s=0;s<i;s++)e[s].size=t[s];return this}return this}getAttributeHash(){return`${super.getAttributeHash()}-${this.target}-${this.normalizationField}`}_interpolateData(){return this.stops?.map(e=>e.value||0)}};e([s({readOnly:!0})],V.prototype,"cache",null),e([s({type:x.apiValues,json:{type:x.jsonValues,origins:{"web-map":{read:!1}},read:x.read,write:x.write}})],V.prototype,"axis",void 0),e([s()],V.prototype,"index",null),e([s({type:String,readOnly:!0})],V.prototype,"inputValueType",null),e([s({type:l,json:{write:!0}})],V.prototype,"legendOptions",void 0),e([s({type:Number,value:null,json:{write:!0}})],V.prototype,"maxDataValue",null),e([s({type:Number,useTypeForAutocast:!1,value:null,json:{write:!0}})],V.prototype,"maxSize",null),e([c("maxSize")],V.prototype,"readMaxSize",null),e([S("maxSize")],V.prototype,"writeMaxSize",null),e([s({type:Number,value:null,json:{write:!0}})],V.prototype,"minDataValue",null),e([s({type:Number,useTypeForAutocast:!1,value:null,json:{write:!0}})],V.prototype,"minSize",null),e([c("minSize")],V.prototype,"readMinSize",null),e([S("minSize")],V.prototype,"writeMinSize",null),e([s({type:String,json:{write:!0}})],V.prototype,"normalizationField",void 0),e([s({readOnly:!0})],V.prototype,"arcadeRequired",null),e([s({type:String})],V.prototype,"scaleBy",void 0),e([s({type:[o],value:null,json:{write:!0}})],V.prototype,"stops",null),e([s({type:["outline"],json:{write:!0}})],V.prototype,"target",void 0),e([s({type:String,readOnly:!0})],V.prototype,"transformationType",null),e([s({type:["size"],json:{type:["sizeInfo"]}})],V.prototype,"type",void 0),e([s({type:Boolean,json:{write:!0,origins:{"web-map":{read:!1}}}})],V.prototype,"useSymbolValue",void 0),e([s({type:String,json:{write:!0}})],V.prototype,"valueExpression",void 0),e([c("valueExpression",["valueExpression","expression"])],V.prototype,"readValueExpression",null),e([S("web-scene","valueExpression")],V.prototype,"writeValueExpressionWebScene",null),e([s({type:["radius","diameter","area","width","distance"],json:{write:!0}})],V.prototype,"valueRepresentation",void 0),e([s({type:w.apiValues,json:{write:w.write,origins:{"web-map":{read:!1},"web-scene":{write:!0},"portal-item":{write:!0}}}})],V.prototype,"valueUnit",void 0),e([c("valueUnit")],V.prototype,"readValueUnit",null),V=z=e([r("esri.renderers.visualVariables.SizeVariable")],V);export{V as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import o from"../../request.js";import r from"../../core/Error.js";import{parseUrl as e}from"../utils.js";import t from"../support/AddressCandidate.js";import a from"../support/LocationToAddressParameters.js";async function n(n,s,d){const u=e(n),{path:c,query:p}=u,l=a.from(s);if(!l.location)throw new r("location-to-address:location-required","The location parameter is required");const f={...d,query:{...p,...i(l),f:"json"}},m=`${c}/reverseGeocode`,{data:j}=await o(m,f),{address:y,location:S}=j;return t.fromJSON({address:y?.Match_addr??"",attributes:y,location:S,score:100})}function i(o){const r=o.toJSON(),{featureTypes:e,forStorage:t,langCode:a,location:n,locationType:i,outFields:s,outSR:d,preferredLabelValues:u,returnInputLocation:c,token:p}=r;return{featureTypes:e?.join(","),forStorage:t,langCode:a,location:JSON.stringify(n),locationType:i,outFields:s?.join(","),outSR:d?.wkid??void 0,preferredLabelValues:u,returnInputLocation:c,token:p}}export{n as locationToAddress};
2
+ import o from"../../request.js";import r from"../../core/Error.js";import{parseUrl as e}from"../utils.js";import t from"../support/AddressCandidate.js";import a from"../support/LocationToAddressParameters.js";async function n(n,s,d){const u=e(n),{path:c,query:p}=u,l=a.from(s);if(!l.location)throw new r("location-to-address:location-required","The location parameter is required");const f=i(l),m={...d,query:{...p,...f,f:"json",...d?.query}},y=`${c}/reverseGeocode`,{data:j}=await o(y,m),{address:S,location:q}=j;return t.fromJSON({address:S?.Match_addr??"",attributes:S,location:q,score:100})}function i(o){const r=o.toJSON(),{featureTypes:e,forStorage:t,langCode:a,location:n,locationType:i,outFields:s,outSR:d,preferredLabelValues:u,returnInputLocation:c,token:p}=r;return{featureTypes:e?.join(","),forStorage:t,langCode:a,location:JSON.stringify(n),locationType:i,outFields:s?.join(","),outSR:d?.wkid??void 0,preferredLabelValues:u,returnInputLocation:c,token:p}}export{n as locationToAddress};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import r from"../../../core/Logger.js";function t(r){return class{constructor(){for(const t of r)this[t]=null}}}function e(r,t=1){const{transform:e,hasZ:o,hasM:s}=r;if(null==e)return o&&1!==t?r=>{r[2]*=t}:null;const[i,u]=n(e,o,s,t),f=r.hasZ?3:2;return r=>{for(let t=0;t<r.length&&(t!==f||0!==r[t]);++t)r[t]=r[t]*i[t]+u[t]}}function n(r,t,e,n){let{scale:o,translate:s,originPosition:i}=r;return"upperLeft"===i&&(o=o.map((r,t)=>1===t?-r:r)),t&&(o=o.map((r,t)=>2===t?r*n:r)),!t&&e&&(o=o.filter((r,t)=>2!==t),s=s.filter((r,t)=>2!==t)),[o,s]}function o(){return r.getLogger("esri.rest.query.operations.pbfFeatureServiceParser")}export{o as getLogger,t as makeAttributesClass,e as makeVertexTransformer};
2
+ import r from"../../../core/Logger.js";function t(r){return class{constructor(){for(const t of r)this[t]=null}}}function e(r,t=1){const{transform:e,hasZ:o,hasM:s}=r;if(null==e)return o&&1!==t?r=>{r[2]*=t}:null;const[i,u]=n(e,o,s,t),a=r.hasZ?3:2;return r=>{for(let t=0;t<r.length&&(t!==a||0!==r[t]);++t)r[t]=r[t]*i[t]+u[t]}}function n(r,t,e,n){let{scale:o,translate:s,originPosition:i}=r;return"upperLeft"===i&&(o=o.map((r,t)=>1===t?-r:r)),t&&(o=o.map((r,t)=>2===t?r*n:r),s=s.map((r,t)=>2===t?r*n:r)),!t&&e&&(o=o.filter((r,t)=>2!==t),s=s.filter((r,t)=>2!==t)),[o,s]}function o(){return r.getLogger("esri.rest.query.operations.pbfFeatureServiceParser")}export{o as getLogger,t as makeAttributesClass,e as makeVertexTransformer};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{allocateFlatGeometry as t,writeBezierCurveSegment as e,writeCircularArcSegment as s,writeEllipticArc7Segment as r}from"../../../geometry/FlatGeometry.js";import{featureGeometryTypeKebabDictionary as i}from"../../../geometry/support/typeUtils.js";import{zScale as h}from"../../../geometry/support/zscale.js";import{FlatFeature as o}from"../../../layers/graphics/FlatFeature.js";import{FlatFeatureSet as a}from"../../../layers/graphics/FlatFeatureSet.js";import _ from"../../../layers/graphics/OptimizedGeometry.js";import{createFeatureId as n}from"../../../layers/graphics/data/createFeatureId.js";import{makeAttributesClass as f,makeVertexTransformer as m}from"./pbfFeatureSetUtils.js";class u{constructor(t){this._options=t,this.featureSet=new a,this.parseOnly=null,this._idInfo=null,this._transformInPlace=null,this._transformInPlaceXY=null,this._push=u._pushXY,this._attributesClass=null,this._previousX=0,this._previousY=0,this._vertex=[],this._i=0,this._geometry=null,this._iVertex=0,this._iPart=0,this._isPolygon=!1,this._ringEndsAt=-1}queryGeometryType(){return this.featureSet.queryGeometryType}queryGeometry(){return this.featureSet.queryGeometry}idField(t){"string"==typeof t?this._idInfo??={type:"object-id",fieldName:t}:this._idInfo={type:"unique-id-simple",fieldName:t.name}}finish(){if(this._idInfo)for(const s of this.featureSet.features)s.objectId=n(s,this._idInfo);const{spatialReference:t,features:e}=this.featureSet;if(t)for(const{geometry:s}of e)s&&(s.spatialReference=t);this.featureSet.transform=null}feature(){this._attributesClass??=f(this.featureSet.fields?.map(t=>t.name)??[]),this.featureSet.features.push(new o(null,new this._attributesClass,null,0)),this._setVertexTransformer()}centroid(t){const{hasZ:e,hasM:s}=this.featureSet;this.featureSet.features.at(-1).centroid=new _([],t,e,s)}geometry(e,s,r){this._previousX=this._previousY=0,this._i=this._iVertex=this._iPart=0;let{hasZ:h,hasM:o}=this.featureSet;h??=!1,o??=!1,this._vertex=[0,0],h&&this._vertex.push(0),o&&this._vertex.push(0);const a=i.fromJSON(s);this._isPolygon="polygon"===a;const _=Number(this._isPolygon),n="point"===a?1:r.reduce((t,e)=>t+e-_,0),f=r.length;if(this._geometry=t(a,n,f,h,o,!1),this._push=h?o?u._pushXYZM:u._pushXYZ:o?u._pushXYM:u._pushXY,this._geometry.isMultipart()){this._geometry.partOffsets[0]=0;for(let t=0;t<f;++t)this._geometry.partOffsets[t+1]=this._geometry.partOffsets[t]+r[t]-_}this._ringEndsAt=_?this._geometry.partOffsets.at(1)??0:-1,1===e?(this.featureSet.queryGeometry=this._geometry,this.featureSet.queryGeometryType=s):this.featureSet.features.at(-1).geometry=this._geometry}coord(t){const e=this._vertex;e[this._i++]=t,this._i<e.length||(this._i=0,e[0]+=this._previousX,e[1]+=this._previousY,[this._previousX,this._previousY]=e,this._iVertex===this._ringEndsAt&&(++this._iPart,this._ringEndsAt=this._geometry.partOffsets[this._iPart+1],this._previousX=this._previousY=0,this._isPolygon)||(this._transformInPlace?.(e),this._push(this)))}curvedGeometry(e,s,r,h){let{hasZ:o,hasM:a}=this.featureSet;o??=!1,a??=!1,this._i=this._iVertex=this._iPart=0;const _=i.fromJSON(e);this._isPolygon="polygon"===_;const n=Number(!this._isPolygon),f=s.length;let m=0,u=0,l=n*f;for(let t=0;t<r.length;++t)switch(l+=h[t],r[t]){case 1:case 3:m+=h[t];continue;case 2:u+=h[t]}this._geometry=t(_,l,f,o,a,!0,m,u);const{partOffsets:p}=this._geometry;p[0]=0;for(let t=0,i=0;t<f;++t){p[t+1]=p[t]+n;for(let e=0;e<s[t];++e)p[t+1]+=h[i++]}switch(e){case"esriGeometryPoint":case"esriGeometryMultipoint":throw new Error(`Curved ${e} does not make sense`)}this.featureSet.features.at(-1).geometry=this._geometry}startCurvedPart(t){}finishCurvedPart(t){this._isPolygon||(this._transform(t,this._vertex),this._push(this)),++this._iPart}lineSegment(t,e){this._transform(t,this._vertex),this._push(this)}bezierSegment(t,s,r,i){this._transform(t,this._vertex),this._push(this),this._transformXY(s,y.b[0]),this._transformXY(r,y.b[1]),this._transformXY(i,y.b[2]),this._i=e(this._vertex,y,this._geometry,this._iVertex-1,this._i)}circularArcSegment(t,e,r){this._transform(t,this._vertex),this._push(this),this._transformXY(e,l.c[0]),this._transformXY(r,l.c[1]),this._i=s(this._vertex,l,this._geometry,this._iVertex-1,this._i)}ellipticArcSegment(t,e,s,i,h,o,a,_){this._transform(t,this._vertex),this._push(this),this._transformXY(e,p.a[0]),this._transformXY(s,p.a[1]),p.a[2]=i,p.a[3]=h,p.a[4]=o,p.a[5]=a,p.a[6]=_,this._i=r(this._vertex,p,this._geometry,this._iVertex-1,this._i)}static _pushXY(t){const e=t._iVertex++,{vertexXY:s}=t._geometry;[s[2*e],s[2*e+1]]=t._vertex}static _pushXYZ(t){const e=t._iVertex++,{vertexXY:s,vertexZ:r}=t._geometry;[s[2*e],s[2*e+1],r[e]]=t._vertex}static _pushXYM(t){const e=t._iVertex++,{vertexXY:s,vertexM:r}=t._geometry;[s[2*e],s[2*e+1],r[e]]=t._vertex}static _pushXYZM(t){const e=t._iVertex++,{vertexXY:s,vertexM:r,vertexZ:i}=t._geometry;[s[2*e],s[2*e+1],i[e],r[e]]=t._vertex}_setVertexTransformer(){const{sourceSpatialReference:t}=this._options,{spatialReference:e,hasZ:s,transform:r}=this.featureSet,i=s?h(t,e):1;this._transformInPlace??=m(this.featureSet,i),this._transformInPlaceXY??=m({transform:r})}_transform(t,e){for(let s=0;s<t.length;++s)e[s]=t[s];this._transformInPlace?.(e)}_transformXY(t,e){e[0]=t[0],e[1]=t[1],this._transformInPlaceXY?.(e)}}const l={c:[[0,0],[0,0]]},p={a:[[0,0],[0,0],0,0,0,0,0]},y={b:[[0,0],[0,0],[0,0]]};export{u as FlatFeatureSetParserContext};
2
+ import{allocateFlatGeometry as t,writeBezierCurveSegment as e,writeCircularArcSegment as s,writeEllipticArc7Segment as r}from"../../../geometry/FlatGeometry.js";import{featureGeometryTypeKebabDictionary as i}from"../../../geometry/support/typeUtils.js";import{zScale as h}from"../../../geometry/support/zscale.js";import{FlatFeature as o}from"../../../layers/graphics/FlatFeature.js";import{FlatFeatureSet as a}from"../../../layers/graphics/FlatFeatureSet.js";import _ from"../../../layers/graphics/OptimizedGeometry.js";import{createFeatureId as n}from"../../../layers/graphics/data/createFeatureId.js";import{makeAttributesClass as f,makeVertexTransformer as m}from"./pbfFeatureSetUtils.js";class u{constructor(t){this._options=t,this.featureSet=new a,this.parseOnly=null,this._idInfo=null,this._transformInPlace=null,this._transformInPlaceXY=null,this._push=u._pushXY,this._attributesClass=null,this._previousX=0,this._previousY=0,this._vertex=[],this._i=0,this._geometry=null,this._iVertex=0,this._iPart=0,this._isPolygon=!1,this._ringEndsAt=-1}queryGeometryType(){return this.featureSet.queryGeometryType}queryGeometry(){return this.featureSet.queryGeometry}idField(t){"string"==typeof t?this._idInfo??={type:"object-id",fieldName:t}:this._idInfo={type:"unique-id-simple",fieldName:t.name}}finish(){if(this._idInfo)for(const s of this.featureSet.features)s.objectId=n(s,this._idInfo);const{spatialReference:t,features:e}=this.featureSet;if(t)for(const{geometry:s}of e)s&&(s.spatialReference=t);this.featureSet.transform=null}feature(){this._attributesClass??=f(this.featureSet.fields?.map(t=>t.name)??[]),this.featureSet.features.push(new o(null,new this._attributesClass,null,0)),this._setVertexTransformer()}centroid(t){const{hasZ:e,hasM:s}=this.featureSet;this.featureSet.features.at(-1).centroid=new _([],t,e,s)}geometry(e,s,r){this._previousX=this._previousY=0,this._i=this._iVertex=this._iPart=0;let{hasZ:h,hasM:o}=this.featureSet;h??=!1,o??=!1,this._vertex=[0,0],h&&this._vertex.push(0),o&&this._vertex.push(0);const a=i.fromJSON(s);this._isPolygon="polygon"===a;const _=Number(this._isPolygon),n="point"===a?1:r.reduce((t,e)=>t+e-_,0),f="point"===a?0:r.length;if(this._geometry=t(a,n,f,h,o,!1),this._push=h?o?u._pushXYZM:u._pushXYZ:o?u._pushXYM:u._pushXY,this._geometry.isMultipart()){this._geometry.partOffsets[0]=0;for(let t=0;t<f;++t)this._geometry.partOffsets[t+1]=this._geometry.partOffsets[t]+r[t]-_}this._ringEndsAt=_?this._geometry.partOffsets.at(1)??0:-1,1===e?(this.featureSet.queryGeometry=this._geometry,this.featureSet.queryGeometryType=s):this.featureSet.features.at(-1).geometry=this._geometry}coord(t){const e=this._vertex;e[this._i++]=t,this._i<e.length||(this._i=0,e[0]+=this._previousX,e[1]+=this._previousY,[this._previousX,this._previousY]=e,this._iVertex===this._ringEndsAt&&(++this._iPart,this._ringEndsAt=this._geometry.partOffsets[this._iPart+1],this._previousX=this._previousY=0,this._isPolygon)||(this._transformInPlace?.(e),this._push(this)))}curvedGeometry(e,s,r,h){let{hasZ:o,hasM:a}=this.featureSet;o??=!1,a??=!1,this._i=this._iVertex=this._iPart=0;const _=i.fromJSON(e);this._isPolygon="polygon"===_;const n=Number(!this._isPolygon),f=s.length;let m=0,u=0,p=n*f;for(let t=0;t<r.length;++t)switch(p+=h[t],r[t]){case 1:case 3:m+=h[t];continue;case 2:u+=h[t]}this._geometry=t(_,p,f,o,a,!0,m,u);const{partOffsets:l}=this._geometry;l[0]=0;for(let t=0,i=0;t<f;++t){l[t+1]=l[t]+n;for(let e=0;e<s[t];++e)l[t+1]+=h[i++]}switch(e){case"esriGeometryPoint":case"esriGeometryMultipoint":throw new Error(`Curved ${e} does not make sense`)}this.featureSet.features.at(-1).geometry=this._geometry}startCurvedPart(t){}finishCurvedPart(t){this._isPolygon||(this._transform(t,this._vertex),this._push(this)),++this._iPart}lineSegment(t,e){this._transform(t,this._vertex),this._push(this)}bezierSegment(t,s,r,i){this._transform(t,this._vertex),this._push(this),this._transformXY(s,y.b[0]),this._transformXY(r,y.b[1]),this._transformXY(i,y.b[2]),this._i=e(this._vertex,y,this._geometry,this._iVertex-1,this._i)}circularArcSegment(t,e,r){this._transform(t,this._vertex),this._push(this),this._transformXY(e,p.c[0]),this._transformXY(r,p.c[1]),this._i=s(this._vertex,p,this._geometry,this._iVertex-1,this._i)}ellipticArcSegment(t,e,s,i,h,o,a,_){this._transform(t,this._vertex),this._push(this),this._transformXY(e,l.a[0]),this._transformXY(s,l.a[1]),l.a[2]=i,l.a[3]=h,l.a[4]=o,l.a[5]=a,l.a[6]=_,this._i=r(this._vertex,l,this._geometry,this._iVertex-1,this._i)}static _pushXY(t){const e=t._iVertex++,{vertexXY:s}=t._geometry;[s[2*e],s[2*e+1]]=t._vertex}static _pushXYZ(t){const e=t._iVertex++,{vertexXY:s,vertexZ:r}=t._geometry;[s[2*e],s[2*e+1],r[e]]=t._vertex}static _pushXYM(t){const e=t._iVertex++,{vertexXY:s,vertexM:r}=t._geometry;[s[2*e],s[2*e+1],r[e]]=t._vertex}static _pushXYZM(t){const e=t._iVertex++,{vertexXY:s,vertexM:r,vertexZ:i}=t._geometry;[s[2*e],s[2*e+1],i[e],r[e]]=t._vertex}_setVertexTransformer(){const{sourceSpatialReference:t}=this._options,{spatialReference:e,hasZ:s,transform:r}=this.featureSet,i=s?h(t,e):1;this._transformInPlace??=m(this.featureSet,i),this._transformInPlaceXY??=m({transform:r})}_transform(t,e){for(let s=0;s<t.length;++s)e[s]=t[s];this._transformInPlace?.(e)}_transformXY(t,e){e[0]=t[0],e[1]=t[1],this._transformInPlaceXY?.(e)}}const p={c:[[0,0],[0,0]]},l={a:[[0,0],[0,0],0,0,0,0,0]},y={b:[[0,0],[0,0],[0,0]]};export{u as FlatFeatureSetParserContext};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{zScale as e}from"../../../geometry/support/zscale.js";import{OptimizedFeature as t}from"../../../layers/graphics/OptimizedFeature.js";import r from"../../../layers/graphics/OptimizedFeatureSet.js";import s from"../../../layers/graphics/OptimizedGeometry.js";import{createFeatureId as i}from"../../../layers/graphics/data/createFeatureId.js";class o{constructor(e){this._options=e,this.featureSet=new r,this.parseOnly=null,this._idInfo=null,this._coords=null}queryGeometryType(){return this.featureSet.queryGeometryType}queryGeometry(){return this.featureSet.queryGeometry}idField(e){"string"==typeof e?this._idInfo??={type:"object-id",fieldName:e}:this._idInfo={type:"unique-id-simple",fieldName:e.name}}finish(){if(this._idInfo)for(const e of this.featureSet.features)e.objectId=i(e,this._idInfo);const{hasZ:t,hasM:r,spatialReference:s}=this.featureSet,{sourceSpatialReference:o}=this._options,a=t?e(o,s):1;if(1!==a){const e=2+Number(t)+Number(r);for(let t=2;t<this._coords.length;t+=e)this._coords[t]*=a}}feature(){this.featureSet.features.push(new t(null,{},null,0))}centroid(e){const{hasZ:t,hasM:r}=this.featureSet;this.featureSet.features.at(-1).centroid=new s([],e,t,r)}geometry(e,t,r){this._coords=[];const{hasZ:i,hasM:o}=this.featureSet,a=new s(r,this._coords,i,o);return 1===e?(this.featureSet.queryGeometry=a,this.featureSet.queryGeometryType=t):this.featureSet.features.at(-1).geometry=a,0}coord(e){this._coords?.push(e)}}export{o as OptimizedFeatureSetParserContext};
2
+ import{zScale as e}from"../../../geometry/support/zscale.js";import{OptimizedFeature as t}from"../../../layers/graphics/OptimizedFeature.js";import r from"../../../layers/graphics/OptimizedFeatureSet.js";import s from"../../../layers/graphics/OptimizedGeometry.js";import{createFeatureId as i}from"../../../layers/graphics/data/createFeatureId.js";class o{constructor(e){this._options=e,this.featureSet=new r,this.parseOnly=null,this._idInfo=null,this._coords=null}queryGeometryType(){return this.featureSet.queryGeometryType}queryGeometry(){return this.featureSet.queryGeometry}idField(e){"string"==typeof e?this._idInfo??={type:"object-id",fieldName:e}:this._idInfo={type:"unique-id-simple",fieldName:e.name}}finish(){if(this._idInfo)for(const e of this.featureSet.features)e.objectId=i(e,this._idInfo);const{hasZ:t,hasM:r,spatialReference:s}=this.featureSet,{sourceSpatialReference:o}=this._options,a=t?e(o,s):1;if(1!==a){const e=2+Number(t)+Number(r);for(let t=2;t<this._coords.length;t+=e)this._coords[t]*=a}}feature(){this.featureSet.features.push(new t(null,{},null,0))}centroid(e){const{hasZ:t,hasM:r}=this.featureSet;this.featureSet.features.at(-1).centroid=new s([],e,t,r)}geometry(e,t,r){this._coords=[];const{hasZ:i,hasM:o}=this.featureSet;"esriGeometryPoint"===t&&(r=[]);const a=new s(r,this._coords,i,o);if(1===e?(this.featureSet.queryGeometry=a,this.featureSet.queryGeometryType=t):this.featureSet.features.at(-1).geometry=a,"esriGeometryPoint"!==t)return 0}coord(e){this._coords?.push(e)}}export{o as OptimizedFeatureSetParserContext};
@@ -2,11 +2,12 @@ import type Point from "../../geometry/Point.js";
2
2
  import type SpatialReference from "../../geometry/SpatialReference.js";
3
3
  import type { JSONSupport } from "../../core/JSONSupport.js";
4
4
  import type { LocationType } from "../types.js";
5
+ import type { GeocodeFeatureType, GeocodePreferredLabel } from "./types.js";
5
6
  import type { PointProperties } from "../../geometry/Point.js";
6
7
  import type { SpatialReferenceProperties } from "../../geometry/SpatialReference.js";
7
8
 
8
9
  /** @since 5.0 */
9
- export interface LocationToAddressParametersProperties extends Partial<Pick<LocationToAddressParameters, "locationType">> {
10
+ export interface LocationToAddressParametersProperties extends Partial<Pick<LocationToAddressParameters, "apiKey" | "featureTypes" | "language" | "locationType" | "preferredLabelValues" | "returnInputLocation">> {
10
11
  /**
11
12
  * The point at which to search for the closest address. The location
12
13
  * should be in the same spatial reference as that of the geocode service.
@@ -26,9 +27,44 @@ export interface LocationToAddressParametersProperties extends Partial<Pick<Loca
26
27
  outSpatialReference?: SpatialReferenceProperties | null;
27
28
  }
28
29
 
29
- /** @since 5.0 */
30
+ /**
31
+ * Input parameters for [locationToAddress()](https://developers.arcgis.com/javascript/latest/references/core/rest/locator/#locationToAddress).
32
+ *
33
+ * @since 5.0
34
+ * @module esri/rest/support/LocationToAddressParameters
35
+ * @see module:esri/rest/locator
36
+ */
30
37
  export default class LocationToAddressParameters extends JSONSupport {
31
38
  constructor(properties?: LocationToAddressParametersProperties);
39
+ /**
40
+ * An authorization string used to access a resource or service.
41
+ * [API keys](https://developers.arcgis.com/documentation/security-and-authentication/api-key-authentication/) are generated and managed in the portal.
42
+ * An API key is tied explicitly to an ArcGIS account; it is also used to monitor service usage.
43
+ * Setting a fine-grained API key on a specific class overrides the [global API key](esri-config.html#apiKey).
44
+ *
45
+ * @since 5.1
46
+ * @see [API keys](https://developers.arcgis.com/documentation/security-and-authentication/api-key-authentication/)
47
+ * @see [Display a map tutorial - get an access token](https://developers.arcgis.com/javascript/latest/display-a-map/#get-an-access-token)
48
+ * @see [ArcGIS REST APIs | reverseGeocode | token](https://developers.arcgis.com/rest/geocode/reverse-geocode/#token)
49
+ */
50
+ accessor apiKey: string | null | undefined;
51
+ /**
52
+ * The property limits the possible match types returned by the reverseGeocode operation.
53
+ *
54
+ * @since 5.1
55
+ * @see [ArcGIS REST APIs | reverseGeocode | featureTypes](https://developers.arcgis.com/rest/geocode/reverse-geocode/#featuretypes)
56
+ */
57
+ accessor featureTypes: GeocodeFeatureType[] | null | undefined;
58
+ /**
59
+ * This property sets the language in which reverse-geocoded addresses are returned. Addresses in many countries are
60
+ * available in more than one language; in these cases, this property can be used to specify which language should be
61
+ * used for addresses returned by the reverseGeocode operation.
62
+ *
63
+ * @since 5.1
64
+ * @see [ArcGIS REST APIs | reverseGeocode | langCode](https://developers.arcgis.com/rest/geocode/reverse-geocode/#langcode)
65
+ * @see [ArcGIS REST APIs | reverseGeocode | Supported language codes](https://developers.arcgis.com/rest/geocode/geocode-coverage/#supported-language-codes)
66
+ */
67
+ accessor language: string | null | undefined;
32
68
  /**
33
69
  * The point at which to search for the closest address. The location
34
70
  * should be in the same spatial reference as that of the geocode service.
@@ -57,4 +93,28 @@ export default class LocationToAddressParameters extends JSONSupport {
57
93
  */
58
94
  get outSpatialReference(): SpatialReference | null;
59
95
  set outSpatialReference(value: SpatialReferenceProperties | null);
96
+ /**
97
+ * Defines how city names are resolved when ambiguity exists.
98
+ *
99
+ * Possible Value | Description
100
+ * ------------------------|------------------------
101
+ * local-city | Include the primary local city name in geocoding response output fields. This is the name of the city that the address is within, and may be different than the postal city.
102
+ * postal-city | Include the primary postal city value in geocoding response output fields. This is the primary name assigned to the postal code of the address.
103
+ *
104
+ * @since 5.1
105
+ * @see [ArcGIS REST APIs | reverseGeocode | preferredLabelValues](https://developers.arcgis.com/rest/geocode/reverse-geocode/#preferredlabelvalues)
106
+ */
107
+ preferredLabelValues?: GeocodePreferredLabel | null;
108
+ /**
109
+ * Specifies what the type of the location returned.
110
+ *
111
+ * Possible Value | Description
112
+ * ------------------------|------------------------
113
+ * false | The response will include the reverse geocoded location. This is the default.
114
+ * true | The response will include the input location.
115
+ *
116
+ * @since 5.1
117
+ * @see [ArcGIS REST APIs | reverseGeocode | returnInputLocation](https://developers.arcgis.com/rest/geocode/reverse-geocode/#returninputlocation)
118
+ */
119
+ accessor returnInputLocation: boolean | null | undefined;
60
120
  }
@@ -129,6 +129,12 @@ export type JobStatus = "job-cancelled" | "job-cancelling" | "job-deleted" | "jo
129
129
  /** @since 5.0 */
130
130
  export type NetworkDate = Date | "now";
131
131
 
132
+ /** @since 5.1 */
133
+ export type GeocodeFeatureType = "distance-marker" | "locality" | "poi" | "point-address" | "postal" | "street-address" | "street-intersection" | "street-name" | "sub-address";
134
+
135
+ /** @since 5.1 */
136
+ export type GeocodePreferredLabel = "local-city" | "postal-city";
137
+
132
138
  /** @since 5.0 */
133
139
  export type PrintReportTemplate = "attribute-list-letter-ansi-a-landscape" | "attribute-list-letter-ansi-a-portrait" | "attribute-list-with-group-letter-ansi-a-landscape" | "attribute-list-with-group-letter-ansi-a-portrait" | "page-per-feature-letter-ansi-a-landscape" | "page-per-feature-letter-ansi-a-portrait";
134
140
 
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- const a="20260317",e="0ef336ad8d94307d964a50ef0b09a6a67e60a207";export{a as buildDate,e as commitHash};
2
+ const c="20260319",f="4d1cac45dc930071b24203195aef607c7cf99c5f";export{c as buildDate,f as commitHash};
@@ -1091,7 +1091,7 @@ IN THE SOFTWARE.
1091
1091
 
1092
1092
  --------------------------------------------------------------------------------
1093
1093
 
1094
- esri/layers/rasterFormats/Jpg.js
1094
+ esri/layers/rasterFormats/Jpg.mjs
1095
1095
 
1096
1096
  Extracted from pdf.js project.
1097
1097
  pdf.js: A general-purpose, web standards-based platform for parsing and rendering PDFs.
@@ -1254,7 +1254,7 @@ You may obtain a copy of the License at
1254
1254
 
1255
1255
  -------------------------------------------------------------------------------
1256
1256
 
1257
- esri/layers/rasterFormats/Zlib.js
1257
+ esri/layers/rasterFormats/Zlib.mjs
1258
1258
 
1259
1259
  Extracted from png.js project
1260
1260
  png.js: A (animated) PNG decoder in JavaScript for the HTML5 canvas element and Node.js.
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{multiplyOpacity as i}from"../../../../core/colorUtils.js";import{makeHandle as s}from"../../../../core/handleUtils.js";import{isAborted as a,ignoreAbortErrors as r}from"../../../../core/promiseUtils.js";import{watch as o,initial as n}from"../../../../core/reactiveUtils.js";import{property as l,subclass as h}from"../../../../core/accessorSupport/decorators.js";import{UpdatingHandles as p}from"../../../../core/support/UpdatingHandles.js";import c from"../../../../symbols/SimpleFillSymbol.js";import m from"../../../../symbols/SimpleLineSymbol.js";import{ExclusiveOperationManager as d}from"../../../analysis/ExclusiveOperationManager.js";import u from"../../../../widgets/Sketch/SketchViewModel.js";function y(e){return"polygon"===e?.type}let w=class extends t{constructor(e){super(e),this._invisibleAreaSymbol=new c({color:null,outline:null}),this._operationManager=new d,this._updatingHandles=new p}initialize(){this._sketchViewModel=new u({defaultCreateOptions:{mode:"click"},defaultUpdateOptions:{enableMoveAllGraphics:!1,enableRotation:!1,enableScaling:!1,enableZ:!1,highlightOptions:{enabled:!1},multipleSelectionEnabled:!1,reshapeOptions:{edgeOperation:"none",shapeOperation:"none"},toggleToolOnClick:!1,tool:"reshape"},updateOnGraphicClick:!1,view:this.view}),this.addHandles([o(()=>({interactive:this.measurementViewData.interactive,visible:this.measurementViewData.visible}),({interactive:e,visible:t})=>{t&&e&&this._analysis.geometry?"place"!==this._operationManager.currentOperationType&&this.reshape():this._operationManager.stop()}),o(()=>this.measurementViewData.analysis.geometry,e=>{e||(this._operationManager.stop(),this._sketchViewModel?.cancel(),this.measurementViewData.sketchGraphicsLayer?.removeAll())}),o(()=>this.measurementViewData.snappingOptions,e=>{this._sketchViewModel&&(this._sketchViewModel.snappingOptions=e)},n),o(()=>this.view.effectiveTheme.accentColor,e=>{this._areaSymbol=new c({color:i(e,.3),outline:new m({color:e,width:2})})},n)])}destroy(){this._areaSymbol?.destroy(),this._invisibleAreaSymbol.destroy(),this._operationManager.destroy(),this._sketchViewModel?.destroy(),this._updatingHandles.destroy()}get state(){if(!this.measurementViewData.visible||!this._operationManager.currentOperationType)return"idle";switch(this._operationManager.currentOperationType){case"place":return"placing";case"reshape":return"reshaping"}}get updating(){return!this._sketchViewModel||this._sketchViewModel.updating||this._updatingHandles.updating}async place(e){return this._operationManager.start("place",async t=>{if(!this._sketchViewModel||!this.measurementViewData.sketchGraphicsLayer)return;const i=this._analysis.clone(),o=this._sketchViewModel.on("create",e=>{switch(e.state){case"start":case"active":{const t=e.graphic?.geometry;"polygon"===t?.type&&(this._analysis.geometry=t);break}case"cancel":case"complete":t.stop(),this.reshape()}});t.handles.push(o,s(()=>{o.remove(),this._sketchViewModel?.cancel(),this.measurementViewData.sketchGraphicsLayer?.removeAll();const s=this._analysis;return s.valid?a(e)||i.equals(s)?t.reject():void t.resolve({}):(s.clear(),t.reject())})),this._sketchViewModel.polygonSymbol=this._invisibleAreaSymbol,this._sketchViewModel.layer=this.measurementViewData.sketchGraphicsLayer,this._updatingHandles.consumePromise(r(this._sketchViewModel.create("polygon")))},e)}async reshape(e){return this._operationManager.start("reshape",async t=>{if(!this._sketchViewModel)return;const i=()=>this._areaSymbol&&this._sketchViewModel&&this.measurementViewData.manipulatorGraphic&&this.measurementViewData.manipulatorGraphicsLayer?(this._sketchViewModel.polygonSymbol=this._areaSymbol,this._sketchViewModel.layer=this.measurementViewData.manipulatorGraphicsLayer,this._updatingHandles.addPromise(r(this._sketchViewModel.update(this.measurementViewData.manipulatorGraphic,{tool:"reshape"})))):Promise.resolve(),o=this._sketchViewModel.on("update",e=>{const s=e.graphics[0]?.geometry;this._analysis.geometry=y(s)?s:null,"complete"===e.state&&(this.measurementViewData.interactive?i():t.stop())});t.handles.push(o,s(()=>{if(o.remove(),this._sketchViewModel?.cancel(),a(e))return t.reject();t.resolve()})),await i()},e)}get _analysis(){return this.measurementViewData.analysis}};e([l()],w.prototype,"_sketchViewModel",void 0),e([l()],w.prototype,"measurementViewData",void 0),e([l()],w.prototype,"state",null),e([l()],w.prototype,"updating",null),e([l()],w.prototype,"view",void 0),w=e([h("esri.views.2d.analysis.AreaMeasurement.AreaMeasurementTool")],w);export{w as AreaMeasurementTool};
2
+ import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{multiplyOpacity as i}from"../../../../core/colorUtils.js";import{makeHandle as s}from"../../../../core/handleUtils.js";import{isAborted as a,ignoreAbortErrors as r}from"../../../../core/promiseUtils.js";import{watch as o,initial as n}from"../../../../core/reactiveUtils.js";import{property as l,subclass as h}from"../../../../core/accessorSupport/decorators.js";import{UpdatingHandles as c}from"../../../../core/support/UpdatingHandles.js";import p from"../../../../symbols/SimpleFillSymbol.js";import m from"../../../../symbols/SimpleLineSymbol.js";import{ExclusiveOperationManager as d}from"../../../analysis/ExclusiveOperationManager.js";import u from"../../../../widgets/Sketch/SketchViewModel.js";function y(e){return"polygon"===e?.type}let w=class extends t{constructor(e){super(e),this._invisibleAreaSymbol=new p({color:null,outline:null}),this._operationManager=new d,this._updatingHandles=new c}initialize(){this._sketchViewModel=new u({defaultCreateOptions:{mode:"click"},defaultUpdateOptions:{enableMoveAllGraphics:!1,enableRotation:!1,enableScaling:!1,enableZ:!1,highlightOptions:{enabled:!1},multipleSelectionEnabled:!1,reshapeOptions:{edgeOperation:"none",shapeOperation:"none"},toggleToolOnClick:!1,tool:"reshape"},updateOnGraphicClick:!1,view:this.view}),this.addHandles([o(()=>({interactive:this.measurementViewData.interactive,visible:this.measurementViewData.visible}),({interactive:e,visible:t})=>{t&&e&&this._analysis.geometry?"place"!==this._operationManager.currentOperationType&&this.reshape():this._operationManager.stop()}),o(()=>this.measurementViewData.analysis.geometry,e=>{e||(this._operationManager.stop(),this._sketchViewModel?.cancel(),this.measurementViewData.sketchGraphicsLayer?.removeAll())}),o(()=>this.measurementViewData.snappingOptions,e=>{this._sketchViewModel&&(this._sketchViewModel.snappingOptions=e)},n),o(()=>this.view.effectiveTheme.accentColor,e=>{this._areaSymbol=new p({color:i(e,.3),outline:new m({color:e,width:2})})},n)])}destroy(){this._areaSymbol?.destroy(),this._invisibleAreaSymbol.destroy(),this._operationManager.destroy(),this._sketchViewModel?.destroy(),this._updatingHandles.destroy()}get state(){if(!this.measurementViewData.visible||!this._operationManager.currentOperationType)return"idle";switch(this._operationManager.currentOperationType){case"place":return"placing";case"reshape":return"reshaping"}}get updating(){return!this._sketchViewModel||this._sketchViewModel.updating||this._updatingHandles.updating}async place(e){return this._operationManager.start("place",async t=>{if(!this._sketchViewModel||!this.measurementViewData.sketchGraphicsLayer)return;const i=this._analysis.clone(),o=e=>{const i="state"in e?e.state:"active",s="graphic"in e?e.graphic:e.graphics?.at(0);switch(i){case"start":case"active":{const e=s?.geometry;"polygon"===e?.type&&(this._analysis.geometry=e);break}case"cancel":case"complete":t.stop(),this.reshape()}},n=this._sketchViewModel.on(["create","undo","redo"],o);t.handles.push(n,s(()=>{n.remove(),this._sketchViewModel?.cancel(),this.measurementViewData.sketchGraphicsLayer?.removeAll();const s=this._analysis;return s.valid?a(e)||i.equals(s)?t.reject():void t.resolve({}):(s.clear(),t.reject())})),this._sketchViewModel.polygonSymbol=this._invisibleAreaSymbol,this._sketchViewModel.layer=this.measurementViewData.sketchGraphicsLayer,this._updatingHandles.consumePromise(r(this._sketchViewModel.create("polygon")))},e)}async reshape(e){return this._operationManager.start("reshape",async t=>{if(!this._sketchViewModel)return;const i=()=>this._areaSymbol&&this._sketchViewModel&&this.measurementViewData.manipulatorGraphic&&this.measurementViewData.manipulatorGraphicsLayer?(this._sketchViewModel.polygonSymbol=this._areaSymbol,this._sketchViewModel.layer=this.measurementViewData.manipulatorGraphicsLayer,this._updatingHandles.addPromise(r(this._sketchViewModel.update(this.measurementViewData.manipulatorGraphic,{tool:"reshape"})))):Promise.resolve(),o=this._sketchViewModel.on("update",e=>{const s=e.graphics[0]?.geometry;this._analysis.geometry=y(s)?s:null,"complete"===e.state&&(this.measurementViewData.interactive?i():t.stop())});t.handles.push(o,s(()=>{if(o.remove(),this._sketchViewModel?.cancel(),a(e))return t.reject();t.resolve()})),await i()},e)}get _analysis(){return this.measurementViewData.analysis}};e([l()],w.prototype,"_sketchViewModel",void 0),e([l()],w.prototype,"measurementViewData",void 0),e([l()],w.prototype,"state",null),e([l()],w.prototype,"updating",null),e([l()],w.prototype,"view",void 0),w=e([h("esri.views.2d.analysis.AreaMeasurement.AreaMeasurementTool")],w);export{w as AreaMeasurementTool};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{EventEmitter as e}from"../../../core/Evented.js";import{on as t}from"../../../core/events.js";import{handlesGroup as a}from"../../../core/handleUtils.js";import has from"../../../core/has.js";import{deg2rad as s}from"../../../core/mathUtils.js";import{identity as r,scale as n,rotate as i,translate as o}from"../../../core/libs/gl-matrix-2/math/mat2d.js";import{create as h}from"../../../core/libs/gl-matrix-2/factories/mat2df64.js";class c{constructor(s,r={}){this.events=new e,this._hasMajorPerformanceCaveat=!1,this._lastRenderFrameCounter=0,null!=s?(this._canvas=document.createElement("canvas"),this._canvas.setAttribute("style","width: 100%; height:100%; display:block; willChange:transform"),s.contains(this._canvas)||s.appendChild(this._canvas)):null!=r.canvas&&(this._canvas=r.canvas);const n={failIfMajorPerformanceCaveat:!0,alpha:!0,antialias:!1,depth:!0,stencil:!0,powerPreference:"high-performance"};let i=this._canvas.getContext("webgl2",n);i||(i=this._canvas.getContext("webgl2",{...n,failIfMajorPerformanceCaveat:!1}),this._hasMajorPerformanceCaveat=!0),this._gl=i,this._handles=a([t(this._canvas,"webglcontextlost",e=>this.events.emit("webgl-context-lost",e))])}destroy(){this._canvas.remove(),this._canvas=null,this._handles.remove(),this._gl=null}get gl(){return this._gl}get canvas(){return this._canvas}render(e,t){if(this._hasMajorPerformanceCaveat||has("esri-force-performance-mode")){if(++this._lastRenderFrameCounter>=has("esri-performance-mode-frames-between-render")&&(t(),this._lastRenderViewState=e.state.clone(),this._lastRenderFrameCounter=0),this._lastRenderViewState){const[t,a,s,r,n,i]=this._computeViewTransform(this._lastRenderViewState,e.state);this._canvas.style.transform=`matrix(${t}, ${a}, ${s}, ${r}, ${n}, ${i})`}}else t()}resize(e){const t=this._canvas,a=t.style,{state:{size:s},pixelRatio:r}=e,n=s[0],i=s[1],o=Math.round(n*r),h=Math.round(i*r);t.width===o&&t.height===h||(t.width=o,t.height=h),a.width=n+"px",a.height=i+"px"}_computeViewTransform(e,t){const[a,c]=e.center,[l,m]=t.center,[f,_]=e.toScreen([0,0],l,m),[d,v]=e.toScreen([0,0],a,c),p=d-f,g=v-_,u=e.scale/t.scale,w=t.rotation-e.rotation,j=h();return r(j),n(j,j,[u,u]),i(j,j,s(w)),o(j,j,[p,g]),j}}export{c as ManagedCanvas};
2
+ import{EventEmitter as e}from"../../../core/Evented.js";import{on as t}from"../../../core/events.js";import{handlesGroup as a}from"../../../core/handleUtils.js";import has from"../../../core/has.js";import{deg2rad as s}from"../../../core/mathUtils.js";import{identity as r,scale as n,rotate as i,translate as o}from"../../../core/libs/gl-matrix-2/math/mat2d.js";import{create as h}from"../../../core/libs/gl-matrix-2/factories/mat2df64.js";class c{constructor(s,r={}){this.events=new e,this._hasMajorPerformanceCaveat=!1,this._lastRenderFrameCounter=0,null!=s?(this._canvas=document.createElement("canvas"),this._canvas.setAttribute("style","width: 100%; height:100%; display:block; willChange:transform"),s.contains(this._canvas)||s.appendChild(this._canvas)):null!=r.canvas&&(this._canvas=r.canvas);const n={failIfMajorPerformanceCaveat:!0,alpha:!0,antialias:!1,depth:!0,stencil:!0,powerPreference:"high-performance"};let i=this._canvas.getContext("webgl2",n);i||(i=this._canvas.getContext("webgl2",{...n,failIfMajorPerformanceCaveat:!1}),this._hasMajorPerformanceCaveat=!0,has.add("mapview-transitions-duration",0,!0,!0)),this._gl=i,this._handles=a([t(this._canvas,"webglcontextlost",e=>this.events.emit("webgl-context-lost",e))])}destroy(){this._canvas.remove(),this._canvas=null,this._handles.remove(),this._gl=null}get gl(){return this._gl}get canvas(){return this._canvas}render(e,t){if(this._hasMajorPerformanceCaveat||has("esri-force-performance-mode")){if(++this._lastRenderFrameCounter>=has("esri-performance-mode-frames-between-render")&&(t(),this._lastRenderViewState=e.state.clone(),this._lastRenderFrameCounter=0),this._lastRenderViewState){const[t,a,s,r,n,i]=this._computeViewTransform(this._lastRenderViewState,e.state);this._canvas.style.transform=`matrix(${t}, ${a}, ${s}, ${r}, ${n}, ${i})`}}else t()}resize(e){const t=this._canvas,a=t.style,{state:{size:s},pixelRatio:r}=e,n=s[0],i=s[1],o=Math.round(n*r),h=Math.round(i*r);t.width===o&&t.height===h||(t.width=o,t.height=h),a.width=n+"px",a.height=i+"px"}_computeViewTransform(e,t){const[a,c]=e.center,[l,m]=t.center,[d,f]=e.toScreen([0,0],l,m),[v,_]=e.toScreen([0,0],a,c),p=v-d,g=_-f,u=e.scale/t.scale,w=t.rotation-e.rotation,j=h();return r(j),n(j,j,[u,u]),i(j,j,s(w)),o(j,j,[p,g]),j}}export{c as ManagedCanvas};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{Point as e}from"../../../../geometry/support/TileClipper.js";import{tilePixelRatio as t}from"./constants.js";import{cDegToRad as i,cPi as n,cInfinity as s,positiveMod as a,radToByte as o,c2pi as h}from"./GeometryUtils.js";import{TextShaping as l,sdfGlyphSize as r,sdfGlyphBaseline as c}from"./TextShaping.js";const g=.5,x=2;class m{constructor(e,t,i=0,n=-1,s=g){this.x=e,this.y=t,this.angle=i,this.segment=n,this.minzoom=s}}class d{constructor(e,t,i,n,a,o=g,h=s){this.anchor=e,this.labelAngle=t,this.glyphAngle=i,this.page=n,this.alternateVerticalGlyph=a,this.minzoom=o,this.maxzoom=h}}class p{constructor(e,t,i,n,s,a,o,h,l,r,c,g){this.tl=e,this.tr=t,this.bl=i,this.br=n,this.mosaicRect=s,this.labelAngle=a,this.minAngle=o,this.maxAngle=h,this.anchor=l,this.minzoom=r,this.maxzoom=c,this.page=g}}class w{constructor(e){this.shapes=e}}class y{getIconPlacement(t,s,a){const o=new e(t.x,t.y),h=0===a.rotationAlignment,l=a.keepUpright;let r=a.rotate*i;h&&(r+=t.angle);const c=new w([]);return c.iconColliders=[],this._addIconPlacement(c,o,s,a,r),h&&l&&this._addIconPlacement(c,o,s,a,r+n),c}_addIconPlacement(t,i,n,a,o){const h=n.rasterizationScale,l=n.width/h,r=n.height/h,c=a.offset;let x=c[0],m=c[1];switch(a.anchor){case 0:x-=l/2,m-=r/2;break;case 1:m-=r/2;break;case 2:x-=l,m-=r/2;break;case 3:x-=l/2;break;case 4:x-=l/2,m-=r;break;case 5:break;case 7:m-=r;break;case 6:x-=l;break;case 8:x-=l,m-=r}const d=n.rect,w=2/h,y=x-w,f=m-w,b=y+d.width/h,u=f+d.height/h,I=new e(y,f),T=new e(b,u),k=new e(y,u),P=new e(b,f);if(0!==o){const e=Math.cos(o),t=Math.sin(o);I.rotate(e,t),T.rotate(e,t),k.rotate(e,t),P.rotate(e,t)}const N=new p(I,P,k,T,d,o,0,256,i,g,s,0);t.shapes.push(N);{const e=a.size,n=a.padding,h={xTile:i.x,yTile:i.y,dxPixels:x*e-n,dyPixels:m*e-n,hard:!a.optional,partIndex:0,width:l*e+2*n,height:r*e+2*n,angle:o,minLod:g,maxLod:s};t.iconColliders.push(h)}}getTextPlacement(a,o,h,m){const y=new e(a.x,a.y),{keepUpright:f,rotate:b,rotationAlignment:u,size:I}=m,T=b*i,k=0===u,P=f,N=m.padding;let z=g;const A=!k?0:a.angle,_=a.segment>=0&&k,G=[],M=[],E=4,L=!_;let V=Number.POSITIVE_INFINITY,v=Number.NEGATIVE_INFINITY,j=V,C=v;const F=(_||k)&&P,S=I/r;let Y=!1;for(const e of o)if(e.vertical){Y=!0;break}let q,U=0,O=0;if(!_&&Y){const e=l.getTextBox(o,m.lineHeight*r);switch(m.anchor){case 1:U=e.height/2,O=-e.width/2;break;case 2:U=-e.height/2,O=e.width/2;break;case 3:U=e.height/2,O=e.width/2;break;case 4:U=-e.height/2,O=-e.width/2;break;case 5:U=e.height;break;case 7:O=-e.width;break;case 6:O=e.width;break;case 8:U=-e.height}}U+=m.offset[0]*r,O+=m.offset[1]*r;for(const i of o){const o=i.glyphMosaicItem;if(!o||o.rect.isEmpty)continue;const l=o.rect,r=o.metrics,w=o.page;if(G&&L){if(void 0!==q&&q!==i.y){let e,t,i,n;Y?(e=-C+U,t=V+O,i=C-j,n=v-V):(e=V+U,t=j+O,i=v-V,n=C-j);const o={xTile:a.x,yTile:a.y,dxPixels:e*S-N,dyPixels:t*S-N,hard:!m.optional,partIndex:1,width:i*S+2*N,height:n*S+2*N,angle:T,minLod:g,maxLod:s};G.push(o),V=Number.POSITIVE_INFINITY,v=Number.NEGATIVE_INFINITY,j=V,C=v}q=i.y}const f=[];if(_){const e=.5*o.metrics.width,n=(i.x+r.left-E+e)*S*t;if(z=this._placeGlyph(a,z,n,h,a.segment,1,i.vertical,w,f),P&&(z=this._placeGlyph(a,z,n,h,a.segment,-1,i.vertical,w,f)),z>=x)break}else f.push(new d(y,A,A,w,!1)),k&&P&&f.push(new d(y,A+n,A+n,w,!1));const b=i.x+r.left,u=i.y-c-r.top,I=b+r.width,B=u+r.height;let H,R,D,J,K,Q,W,X;if(!_&&Y)if(i.vertical){const t=(b+I)/2-r.height/2,i=(u+B)/2+r.width/2;H=new e(-i-E+U,t-E+O),R=new e(H.x+l.width,H.y+l.height),D=new e(H.x,R.y),J=new e(R.x,H.y)}else H=new e(-u+E+U,b-E+O),R=new e(H.x-l.height,H.y+l.width),D=new e(R.x,H.y),J=new e(H.x,R.y);else H=new e(b-E+U,u-E+O),R=new e(H.x+l.width,H.y+l.height),D=new e(H.x,R.y),J=new e(R.x,H.y);for(const t of f){let n,s,o,h;if(t.alternateVerticalGlyph){if(!K){const t=(u+B)/2+O;K=new e((b+I)/2+U-r.height/2-E,t+r.width/2+E),Q=new e(K.x+l.height,K.y-l.width),W=new e(Q.x,K.y),X=new e(K.x,Q.y)}n=K,s=W,o=X,h=Q}else n=H,s=D,o=J,h=R;const c=u,g=B,d=t.glyphAngle+T;if(0!==d){const e=Math.cos(d),t=Math.sin(d);n=n.clone(),s=s?.clone(),o=o?.clone(),h=h?.clone(),n.rotate(e,t),h?.rotate(e,t),s?.rotate(e,t),o?.rotate(e,t)}let w=0,y=256;if(_&&Y?i.vertical?t.alternateVerticalGlyph?(w=32,y=96):(w=224,y=32):(w=224,y=96):(w=192,y=64),M.push(new p(n,o,s,h,l,t.labelAngle,w,y,t.anchor,t.minzoom,t.maxzoom,t.page)),G&&(!F||this._legible(t.labelAngle)))if(L)b<V&&(V=b),c<j&&(j=c),I>v&&(v=I),g>C&&(C=g);else if(t.minzoom<x){const e={xTile:a.x,yTile:a.y,dxPixels:(b+U)*S-N,dyPixels:(c+U)*S-N,hard:!m.optional,partIndex:1,width:(I-b)*S+2*N,height:(g-c)*S+2*N,angle:d,minLod:t.minzoom,maxLod:t.maxzoom};G.push(e)}}}if(z>=x)return null;if(G&&L){let e,t,i,n;Y?(e=-C+U,t=V+O,i=C-j,n=v-V):(e=V+U,t=j+O,i=v-V,n=C-j);const o={xTile:a.x,yTile:a.y,dxPixels:e*S-N,dyPixels:t*S-N,hard:!m.optional,partIndex:1,width:i*S+2*N,height:n*S+2*N,angle:T,minLod:g,maxLod:s};G.push(o)}const B=new w(M);return G&&G.length>0&&(B.textColliders=G),B}_legible(e){const t=o(e);return t<65||t>=193}_placeGlyph(t,i,o,l,r,c,g,x,m){let p=c;const w=p<0?a(t.angle+n,h):t.angle;let y=0;o<0&&(p*=-1,o*=-1,y=n),p>0&&++r;let f=new e(t.x,t.y),b=l[r],u=s;if(l.length<=r)return u;for(;;){const e=b.x-f.x,t=b.y-f.y,n=Math.sqrt(e*e+t*t),s=Math.max(o/n,i),c=e/n,I=t/n,T=a(Math.atan2(I,c)+y,h);if(m.push(new d(f,w,T,x,!1,s,u)),g&&m.push(new d(f,w,T,x,!0,s,u)),s<=i)return s;f=b.clone();do{if(r+=p,l.length<=r||r<0)return s;b=l[r]}while(f.isEqual(b));let k=b.x-f.x,P=b.y-f.y;const N=Math.sqrt(k*k+P*P);k*=n/N,P*=n/N,f.x-=k,f.y-=P,u=s}}}export{m as Anchor,p as PlacedSymbol,w as Placement,y as PlacementEngine};
2
+ import{Point as e}from"../../../../geometry/support/TileClipper.js";import{tilePixelRatio as t}from"./constants.js";import{cDegToRad as i,cPi as n,cInfinity as s,positiveMod as o,radToByte as a,c2pi as h}from"./GeometryUtils.js";import{TextShaping as l,sdfGlyphSize as r,sdfGlyphBaseline as c}from"./TextShaping.js";import{sdfBufferServer as g}from"../webgl/definitions.js";const m=.5,x=2;class d{constructor(e,t,i=0,n=-1,s=m){this.x=e,this.y=t,this.angle=i,this.segment=n,this.minzoom=s}}class p{constructor(e,t,i,n,o,a=m,h=s){this.anchor=e,this.labelAngle=t,this.glyphAngle=i,this.page=n,this.alternateVerticalGlyph=o,this.minzoom=a,this.maxzoom=h}}class w{constructor(e,t,i,n,s,o,a,h,l,r,c,g){this.tl=e,this.tr=t,this.bl=i,this.br=n,this.mosaicRect=s,this.labelAngle=o,this.minAngle=a,this.maxAngle=h,this.anchor=l,this.minzoom=r,this.maxzoom=c,this.page=g}}class y{constructor(e){this.shapes=e}}class f{getIconPlacement(t,s,o){const a=new e(t.x,t.y),h=0===o.rotationAlignment,l=o.keepUpright;let r=o.rotate*i;h&&(r+=t.angle);const c=new y([]);return c.iconColliders=[],this._addIconPlacement(c,a,s,o,r),h&&l&&this._addIconPlacement(c,a,s,o,r+n),c}_addIconPlacement(t,i,n,o,a){const h=n.rasterizationScale,l=n.width/h,r=n.height/h,c=o.offset;let g=c[0],x=c[1];switch(o.anchor){case 0:g-=l/2,x-=r/2;break;case 1:x-=r/2;break;case 2:g-=l,x-=r/2;break;case 3:g-=l/2;break;case 4:g-=l/2,x-=r;break;case 5:break;case 7:x-=r;break;case 6:g-=l;break;case 8:g-=l,x-=r}const d=n.rect,p=2/h,y=g-p,f=x-p,b=y+d.width/h,u=f+d.height/h,I=new e(y,f),T=new e(b,u),k=new e(y,u),P=new e(b,f);if(0!==a){const e=Math.cos(a),t=Math.sin(a);I.rotate(e,t),T.rotate(e,t),k.rotate(e,t),P.rotate(e,t)}const N=new w(I,P,k,T,d,a,0,256,i,m,s,0);t.shapes.push(N);{const e=o.size,n=o.padding,h={xTile:i.x,yTile:i.y,dxPixels:g*e-n,dyPixels:x*e-n,hard:!o.optional,partIndex:0,width:l*e+2*n,height:r*e+2*n,angle:a,minLod:m,maxLod:s};t.iconColliders.push(h)}}getTextPlacement(o,a,h,d){const f=new e(o.x,o.y),{keepUpright:b,rotate:u,rotationAlignment:I,size:T}=d,k=u*i,P=0===I,N=b,z=d.padding;let A=m;const _=!P?0:o.angle,G=o.segment>=0&&P,M=[],E=[],L=g,V=!G;let v=Number.POSITIVE_INFINITY,j=Number.NEGATIVE_INFINITY,C=v,F=j;const S=(G||P)&&N,Y=T/r;let q=!1;for(const e of a)if(e.vertical){q=!0;break}let U,O=0,B=0;if(!G&&q){const e=l.getTextBox(a,d.lineHeight*r);switch(d.anchor){case 1:O=e.height/2,B=-e.width/2;break;case 2:O=-e.height/2,B=e.width/2;break;case 3:O=e.height/2,B=e.width/2;break;case 4:O=-e.height/2,B=-e.width/2;break;case 5:O=e.height;break;case 7:B=-e.width;break;case 6:B=e.width;break;case 8:O=-e.height}}O+=d.offset[0]*r,B+=d.offset[1]*r;for(const i of a){const a=i.glyphMosaicItem;if(!a||a.rect.isEmpty)continue;const l=a.rect,r=a.metrics,g=a.page;if(M&&V){if(void 0!==U&&U!==i.y){let e,t,i,n;q?(e=-F+O,t=v+B,i=F-C,n=j-v):(e=v+O,t=C+B,i=j-v,n=F-C);const a={xTile:o.x,yTile:o.y,dxPixels:e*Y-z,dyPixels:t*Y-z,hard:!d.optional,partIndex:1,width:i*Y+2*z,height:n*Y+2*z,angle:k,minLod:m,maxLod:s};M.push(a),v=Number.POSITIVE_INFINITY,j=Number.NEGATIVE_INFINITY,C=v,F=j}U=i.y}const y=[];if(G){const e=.5*a.metrics.width,n=(i.x+r.left-L+e)*Y*t;if(A=this._placeGlyph(o,A,n,h,o.segment,1,i.vertical,g,y),N&&(A=this._placeGlyph(o,A,n,h,o.segment,-1,i.vertical,g,y)),A>=x)break}else y.push(new p(f,_,_,g,!1)),P&&N&&y.push(new p(f,_+n,_+n,g,!1));const b=i.x+r.left,u=i.y-c-r.top,I=b+r.width,T=u+r.height;let H,R,D,J,K,Q,W,X;if(!G&&q)if(i.vertical){const t=(b+I)/2-r.height/2,i=(u+T)/2+r.width/2;H=new e(-i-L+O,t-L+B),R=new e(H.x+l.width,H.y+l.height),D=new e(H.x,R.y),J=new e(R.x,H.y)}else H=new e(-u+L+O,b-L+B),R=new e(H.x-l.height,H.y+l.width),D=new e(R.x,H.y),J=new e(H.x,R.y);else H=new e(b-L+O,u-L+B),R=new e(H.x+l.width,H.y+l.height),D=new e(H.x,R.y),J=new e(R.x,H.y);for(const t of y){let n,s,a,h;if(t.alternateVerticalGlyph){if(!K){const t=(u+T)/2+B;K=new e((b+I)/2+O-r.height/2-L,t+r.width/2+L),Q=new e(K.x+l.height,K.y-l.width),W=new e(Q.x,K.y),X=new e(K.x,Q.y)}n=K,s=W,a=X,h=Q}else n=H,s=D,a=J,h=R;const c=u,g=T,m=t.glyphAngle+k;if(0!==m){const e=Math.cos(m),t=Math.sin(m);n=n.clone(),s=s?.clone(),a=a?.clone(),h=h?.clone(),n.rotate(e,t),h?.rotate(e,t),s?.rotate(e,t),a?.rotate(e,t)}let p=0,y=256;if(G&&q?i.vertical?t.alternateVerticalGlyph?(p=32,y=96):(p=224,y=32):(p=224,y=96):(p=192,y=64),E.push(new w(n,a,s,h,l,t.labelAngle,p,y,t.anchor,t.minzoom,t.maxzoom,t.page)),M&&(!S||this._legible(t.labelAngle)))if(V)b<v&&(v=b),c<C&&(C=c),I>j&&(j=I),g>F&&(F=g);else if(t.minzoom<x){const e={xTile:o.x,yTile:o.y,dxPixels:(b+O)*Y-z,dyPixels:(c+O)*Y-z,hard:!d.optional,partIndex:1,width:(I-b)*Y+2*z,height:(g-c)*Y+2*z,angle:m,minLod:t.minzoom,maxLod:t.maxzoom};M.push(e)}}}if(A>=x)return null;if(M&&V){let e,t,i,n;q?(e=-F+O,t=v+B,i=F-C,n=j-v):(e=v+O,t=C+B,i=j-v,n=F-C);const a={xTile:o.x,yTile:o.y,dxPixels:e*Y-z,dyPixels:t*Y-z,hard:!d.optional,partIndex:1,width:i*Y+2*z,height:n*Y+2*z,angle:k,minLod:m,maxLod:s};M.push(a)}const H=new y(E);return M&&M.length>0&&(H.textColliders=M),H}_legible(e){const t=a(e);return t<65||t>=193}_placeGlyph(t,i,a,l,r,c,g,m,x){let d=c;const w=d<0?o(t.angle+n,h):t.angle;let y=0;a<0&&(d*=-1,a*=-1,y=n),d>0&&++r;let f=new e(t.x,t.y),b=l[r],u=s;if(l.length<=r)return u;for(;;){const e=b.x-f.x,t=b.y-f.y,n=Math.sqrt(e*e+t*t),s=Math.max(a/n,i),c=e/n,I=t/n,T=o(Math.atan2(I,c)+y,h);if(x.push(new p(f,w,T,m,!1,s,u)),g&&x.push(new p(f,w,T,m,!0,s,u)),s<=i)return s;f=b.clone();do{if(r+=d,l.length<=r||r<0)return s;b=l[r]}while(f.isEqual(b));let k=b.x-f.x,P=b.y-f.y;const N=Math.sqrt(k*k+P*P);k*=n/N,P*=n/N,f.x-=k,f.y-=P,u=s}}}export{d as Anchor,w as PlacedSymbol,y as Placement,f as PlacementEngine};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{RenderingDevice as e}from"../webgl/RenderingDevice.js";import{simplePipelineState as t}from"../webgl/shaderGraph/utils.js";import{VTLTechniquesRepo as i}from"../webgl/shaderGraph/techniques/vectorTiles/VTLTechniques.js";const s=1e-6;class n{constructor(s,n){this.spriteMosaic=s,this.glyphMosaic=n,this._vtlTechniques=new i,this._context=null,this._vtlTechniques.startup(),this._renderingDevice=new e,this._pipelineState=t}dispose(){this._vtlTechniques&&this._vtlTechniques.shutdown(this._context),this.spriteMosaic.dispose(),this.glyphMosaic.dispose(),this._renderingDevice.dispose(),this._context=null}drawSymbols(e,t,i){const n=i.layers;e.renderPass="translucent";const a=this._vtlTechniques.getTechnique(3);r[0]=t;for(let l=0;l<n.length;l++){const t=n[l];if(3!==t.type)continue;const i=t.getLayoutProperty("visibility");if(i&&1===i.getValue())continue;const o=e.displayLevel;void 0!==t.minzoom&&t.minzoom>o+s||void 0!==t.maxzoom&&t.maxzoom<=o-s||(e.styleLayerUID=t.uid,e.styleLayer=t,a.render(e,{tiles:r}))}r[0]=null}drawBackground(e,t,i){if(0===i.backgroundBucketIds.length)return;const{displayLevel:n,requiredLevel:a}=e;t.key.level=a,this._renderingDevice.setPipelineState({...this._pipelineState,color:{write:[!0,!0,!0,!0],blendMode:"composite"},stencil:!1,depth:!1}),e.renderPass="background";const l=this._vtlTechniques.getTechnique(0);r[0]=t,i.backgroundBucketIds.forEach(t=>{const a=i.getLayerById(t);if(0!==a.type)return;const o=a.getLayoutProperty("visibility");o&&1===o.getValue()||void 0!==a.minzoom&&a.minzoom>n+s||void 0!==a.maxzoom&&a.maxzoom<=n-s||(e.styleLayerUID=a.uid,e.styleLayer=a,l.render(e,{tiles:r}))}),r[0]=null}drawTile(e,i,s,n){const r=s.layers,{context:a}=e,l=a.getPipelineState(),{depthWrite:o}=l;let c=0,h=1;o&&void 0!==o.zNear&&void 0!==o.zFar&&(c=o.zNear,h=o.zFar),this._pipelineState={...t,color:{write:[!0,!0,!0,!0],blendMode:"none"},depth:{write:{zNear:c,zFar:h},test:515}},this._renderingDevice.setPipelineState(this._pipelineState);const u=r.filter(e=>{if(null!=n&&n!==e.type||!i.layerData.has(e.uid))return!1;const t=e.getLayoutProperty("visibility");return 1!==t?.getValue()});e.renderPass="opaque";for(let t=u.length-1;t>=0;--t)this._renderStyleLayer(u[t],e,i);this._pipelineState={...t,color:{write:[!0,!0,!0,!0],blendMode:"composite"},depth:{write:!1,test:515}},this._renderingDevice.setPipelineState(this._pipelineState),e.renderPass="translucent",u.forEach(t=>this._renderStyleLayer(t,e,i)),this._renderingDevice.setPipelineState({...this._pipelineState,depth:!1}),this._context||(this._context=e.context)}setShader(e){return this._renderingDevice.setShader(e)}setPipelineState(e){return this._renderingDevice.setPipelineState(e)}getPipelineState(){return this._renderingDevice.getPipelineState()}submitDraw(e,t,i){return this._renderingDevice.submitDraw(e,t,i)}submitDrawMesh(e,t,i,s){this._renderingDevice.submitDrawMesh(e,t,i,s)}submitDrawMeshUntyped(e,t,i,s){this._renderingDevice.submitDrawMeshUntyped(e,t,i,s)}updatePipelineState(e){return this._renderingDevice.updatePipelineState(e)}setStencilRef(e,t){return this._renderingDevice.setStencilRef(e,t)}_renderStyleLayer(e,t,i){const{renderPass:n}=t;let a;switch(e.type){case 0:if("background"!==n)return;a=this._vtlTechniques.getTechnique(0);break;case 1:if("opaque"!==n&&"translucent"!==t.renderPass)return;a=this._vtlTechniques.getTechnique(1);break;case 2:if("translucent"!==n)return;a=this._vtlTechniques.getTechnique(2);break;case 4:if("translucent"!==n)return;a=this._vtlTechniques.getTechnique(4);break;case 3:if("translucent"!==n)return;a=this._vtlTechniques.getTechnique(3)}const{displayLevel:l}=t,{minzoom:o,maxzoom:c}=e;void 0!==o&&o>l+s||void 0!==c&&c<=l-s||!a||(this._renderingDevice.setPipelineState({...this._pipelineState,stencil:{write:{mask:0},test:!1}}),t.styleLayerUID=e.uid,t.styleLayer=e,r[0]=i,a.render(t,{tiles:r}),r[0]=null)}}const r=[null];export{n as default};
2
+ import{RenderingDevice as e}from"../webgl/RenderingDevice.js";import{simplePipelineState as t}from"../webgl/shaderGraph/utils.js";import{VTLTechniquesRepo as i}from"../webgl/shaderGraph/techniques/vectorTiles/VTLTechniques.js";const s=1e-6;class n{constructor(s,n){this.spriteMosaic=s,this.glyphMosaic=n,this._vtlTechniques=new i,this._context=null,this._vtlTechniques.startup(),this._renderingDevice=new e,this._pipelineState=t}dispose(){this._vtlTechniques&&this._vtlTechniques.shutdown(this._context),this.spriteMosaic.dispose(),this.glyphMosaic.dispose(),this._renderingDevice.dispose(),this._context=null}drawSymbols(e,t,i){const n=i.layers;e.renderPass="translucent";const a=this._vtlTechniques.getTechnique(3);r[0]=t;for(let l=0;l<n.length;l++){const t=n[l];if(3!==t.type)continue;const i=t.getLayoutProperty("visibility");if(i&&1===i.getValue())continue;const o=e.displayLevel;void 0!==t.minzoom&&t.minzoom>o+s||void 0!==t.maxzoom&&t.maxzoom<=o-s||(e.styleLayerUID=t.uid,e.styleLayer=t,a.render(e,{tiles:r}))}r[0]=null}drawBackground(e,t,i){if(0===i.backgroundBucketIds.length)return;const{displayLevel:n,requiredLevel:a}=e;t.key.level=a,this._renderingDevice.setPipelineState({...this._pipelineState,color:{write:[!0,!0,!0,!0],blendMode:"composite"},stencil:!1,depth:!1}),e.renderPass="background";const l=this._vtlTechniques.getTechnique(0);r[0]=t,i.backgroundBucketIds.forEach(t=>{const a=i.getLayerById(t);if(0!==a.type)return;const o=a.getLayoutProperty("visibility");o&&1===o.getValue()||void 0!==a.minzoom&&a.minzoom>n+s||void 0!==a.maxzoom&&a.maxzoom<=n-s||(e.styleLayerUID=a.uid,e.styleLayer=a,l.render(e,{tiles:r}))}),r[0]=null}drawTile(e,i,s,n){const r=s.layers,{context:a}=e,l=a.getPipelineState(),{depthWrite:o}=l;let c=0,h=1;void 0!==o?.zNear&&void 0!==o.zFar&&(c=o.zNear,h=o.zFar),this._pipelineState={...t,color:{write:[!0,!0,!0,!0],blendMode:"none"},depth:{write:{zNear:c,zFar:h},test:515}},this._renderingDevice.setPipelineState(this._pipelineState);const u=r.filter(e=>{if(null!=n&&n!==e.type||!i.layerData.has(e.uid))return!1;const t=e.getLayoutProperty("visibility");return 1!==t?.getValue()});e.renderPass="opaque";for(let t=u.length-1;t>=0;--t)this._renderStyleLayer(u[t],e,i);this._pipelineState={...t,color:{write:[!0,!0,!0,!0],blendMode:"composite"},depth:{write:!1,test:515}},this._renderingDevice.setPipelineState(this._pipelineState),e.renderPass="translucent",u.forEach(t=>this._renderStyleLayer(t,e,i)),this._renderingDevice.setPipelineState({...this._pipelineState,depth:!1}),this._context||(this._context=e.context)}setShader(e){return this._renderingDevice.setShader(e)}setPipelineState(e){return this._renderingDevice.setPipelineState(e)}getPipelineState(){return this._renderingDevice.getPipelineState()}submitDraw(e,t,i){return this._renderingDevice.submitDraw(e,t,i)}submitDrawMesh(e,t,i,s){this._renderingDevice.submitDrawMesh(e,t,i,s)}submitDrawMeshUntyped(e,t,i,s){this._renderingDevice.submitDrawMeshUntyped(e,t,i,s)}updatePipelineState(e){return this._renderingDevice.updatePipelineState(e)}setStencilRef(e,t){return this._renderingDevice.setStencilRef(e,t)}_renderStyleLayer(e,t,i){const{renderPass:n}=t;let a;switch(e.type){case 0:if("background"!==n)return;a=this._vtlTechniques.getTechnique(0);break;case 1:if("opaque"!==n&&"translucent"!==t.renderPass)return;a=this._vtlTechniques.getTechnique(1);break;case 2:if("translucent"!==n)return;a=this._vtlTechniques.getTechnique(2);break;case 4:if("translucent"!==n)return;a=this._vtlTechniques.getTechnique(4);break;case 3:if("translucent"!==n)return;a=this._vtlTechniques.getTechnique(3)}const{displayLevel:l}=t,{minzoom:o,maxzoom:c}=e;void 0!==o&&o>l+s||void 0!==c&&c<=l-s||!a||(this._renderingDevice.setPipelineState({...this._pipelineState,stencil:{write:{mask:0},test:!1}}),t.styleLayerUID=e.uid,t.styleLayer=e,r[0]=i,a.render(t,{tiles:r}),r[0]=null)}}const r=[null];export{n as default};