@arcgis/core 5.0.0-next.122 → 5.0.0-next.123

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 (190) hide show
  1. package/applications/Components/SketchTooltipControls.d.ts +3 -2
  2. package/applications/Components/SketchTooltipControls.js +1 -1
  3. package/assets/esri/core/workers/RemoteClient.js +1 -1
  4. package/assets/esri/core/workers/chunks/0184b4c0c92c76c60ab2.js +1 -0
  5. package/assets/esri/core/workers/chunks/{56a296cb5c1ae1ea5ab2.js → 08616877b58b518e7461.js} +1 -1
  6. package/assets/esri/core/workers/chunks/089cef7124173a5cd5f9.js +1 -0
  7. package/assets/esri/core/workers/chunks/{4d438627dd3509f65d5a.js → 0baa0d66003d23cc76a7.js} +1 -1
  8. package/assets/esri/core/workers/chunks/0e216f0075fd531c3a2b.js +1 -0
  9. package/assets/esri/core/workers/chunks/{d5314786df52b6be5307.js → 0e6ffb02a929130ddb50.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{0fe47bf45428100cc808.js → 0e8b4543e895b615c254.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{ae0a555b047b11aa68eb.js → 1219b588f983b4f35033.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{41fe4d8fe97388498f73.js → 13512a23655258fa77f4.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{ee34f14bbfe619b85a80.js → 13e913aa5f5113fceb16.js} +1 -1
  14. package/assets/esri/core/workers/chunks/1458ef3857be3b76be95.js +1 -0
  15. package/assets/esri/core/workers/chunks/{d621cdd0aef6d77986f0.js → 1469e6d1d0d4e310b8f8.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{b9e90875943703486227.js → 15ba0296403dd4152b88.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{7595c52b1647f092c61a.js → 16abc548724e428c325a.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{dddcae86e434d93b10c0.js → 189e22df73414a1a3989.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{90aeef17af12cfbecb36.js → 1d124a55f6804be19e09.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{63831996ad82bd3b1ca9.js → 1e29a114c1cfe21121c4.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{153a9d087e0fe7072af4.js → 1ede5fa7a16839ed9444.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{6b1e1fb4e9010873c171.js → 1f30558e3ad6ac68bdb8.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{9c06b803912fcafa7f52.js → 24dd404612c35f6a3fc3.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{b6e155b42a4a423139e7.js → 27d1f8279df34d8b15b5.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{401af6d07c9f458ae067.js → 2c69d8bb1c950b95278d.js} +1 -1
  26. package/assets/esri/core/workers/chunks/{22d12c309af9c19a1a48.js → 2c7e5b78d94e5850537b.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{120a5fa9b46084cd0c45.js → 2d376f82cdf020e1fca9.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{8c321c6bc344544ebb51.js → 2d52b137ee64469a46b2.js} +1 -1
  29. package/assets/esri/core/workers/chunks/{5b3f2bad61a0d993bf16.js → 2e63e18df96e5a2461de.js} +1 -1
  30. package/assets/esri/core/workers/chunks/{d4da3abbd3d88cd63cb9.js → 454150571b5b664b576a.js} +1 -1
  31. package/assets/esri/core/workers/chunks/4740d319f233b7f528fe.js +1 -0
  32. package/assets/esri/core/workers/chunks/{78ce6fcb72e97d3dc087.js → 499d594dc0d282dfe777.js} +1 -1
  33. package/assets/esri/core/workers/chunks/49d58bacb5b397246978.js +1 -0
  34. package/assets/esri/core/workers/chunks/4ba4aa6c75e3f8950e65.js +1 -0
  35. package/assets/esri/core/workers/chunks/{61ce373f00a0cad113ed.js → 4f2c29168c9de0b08741.js} +1 -1
  36. package/assets/esri/core/workers/chunks/{5789898948cc0da78b8b.js → 552e5c413828e181f89a.js} +1 -1
  37. package/assets/esri/core/workers/chunks/{5210bde0a05ab172ab28.js → 59f955c7d6b0589e7cc6.js} +1 -1
  38. package/assets/esri/core/workers/chunks/{5fe0bed2a0a9f8eadb28.js → 5a347b1d87eb6f710136.js} +1 -1
  39. package/assets/esri/core/workers/chunks/5b97cdeb5949822fbef3.js +1 -0
  40. package/assets/esri/core/workers/chunks/{178c91fabf4a87bbb50b.js → 620d7cd0b0885122aa0f.js} +1 -1
  41. package/assets/esri/core/workers/chunks/6321680c8070dffa3b6c.js +1 -0
  42. package/assets/esri/core/workers/chunks/6997b4d5bcc9c4755375.js +1 -0
  43. package/assets/esri/core/workers/chunks/{b79cceeee3ed46f218a0.js → 69ab42b965bccc3bad4f.js} +1 -1
  44. package/assets/esri/core/workers/chunks/{bb4c75479cfea67cf8a2.js → 6af14a0217077d9ab47f.js} +1 -1
  45. package/assets/esri/core/workers/chunks/{672542d0435fbfd0647c.js → 6b3d8280a24f7a3aac40.js} +1 -1
  46. package/assets/esri/core/workers/chunks/6e0cfb76f9c2a9ec6530.js +1 -0
  47. package/assets/esri/core/workers/chunks/6e8989d61204b0b5ff52.js +1 -0
  48. package/assets/esri/core/workers/chunks/{3d78e9b3c97c0ce21d16.js → 7017c2e621236c7a7da4.js} +1 -1
  49. package/assets/esri/core/workers/chunks/7407a1e0cef508116a0b.js +1 -0
  50. package/assets/esri/core/workers/chunks/{da188d0e22ba1639928e.js → 75907e5d009b71ce723b.js} +1 -1
  51. package/assets/esri/core/workers/chunks/{1ab4289195f5e46c6fe8.js → 78936c591fd49ff955a9.js} +1 -1
  52. package/assets/esri/core/workers/chunks/{f0b8de5b3cfbe9223df6.js → 796f5265747ce8be910e.js} +1 -1
  53. package/assets/esri/core/workers/chunks/{ac62411b9b4cf85a4722.js → 7a037fbfd91dd22e3bf0.js} +1 -1
  54. package/assets/esri/core/workers/chunks/{50661f65a9c191f528bc.js → 7ee7529fcbd0d169047c.js} +1 -1
  55. package/assets/esri/core/workers/chunks/7f9b0ef7f9b3f3fd3df9.js +1 -0
  56. package/assets/esri/core/workers/chunks/{82a446e8befe9d29c8f0.js → 822a115c7d718e4e3d2b.js} +1 -1
  57. package/assets/esri/core/workers/chunks/{6789ddaa61e6d8f20d04.js → 8eea620f770576d18809.js} +1 -1
  58. package/assets/esri/core/workers/chunks/{10c4f5afe14c0addc418.js → 9332db133a0925d522fe.js} +1 -1
  59. package/assets/esri/core/workers/chunks/{bc87890d00d6dba979b2.js → 99c9f35a29f9f6c9e4ce.js} +1 -1
  60. package/assets/esri/core/workers/chunks/a4b422dbb6d3cb2505e1.js +1 -0
  61. package/assets/esri/core/workers/chunks/{455fbddd814e4681f0c0.js → a5e91cf150f6cf6a5d2a.js} +1 -1
  62. package/assets/esri/core/workers/chunks/{eb4a2dc5efdb873a7f25.js → aef2832902b270f1a594.js} +1 -1
  63. package/assets/esri/core/workers/chunks/{b5fc0a2480a229e8891a.js → b5f291e8ed7f7cac158d.js} +1 -1
  64. package/assets/esri/core/workers/chunks/bc32a4baeb0ecabb68cc.js +1 -0
  65. package/assets/esri/core/workers/chunks/bd05e68b00b9878d0266.js +1 -0
  66. package/assets/esri/core/workers/chunks/{9a43065e51df9c21c9fa.js → bdb4f216ae8881b98604.js} +1 -1
  67. package/assets/esri/core/workers/chunks/{bf9b2aa2e67ca746ec7c.js → c15f0769a64863cccef0.js} +1 -1
  68. package/assets/esri/core/workers/chunks/c6e0ada6f2ad74fddfec.js +1 -0
  69. package/assets/esri/core/workers/chunks/cf09408cb7729126caae.js +1 -0
  70. package/assets/esri/core/workers/chunks/e0565849281ffbe8269e.js +1 -0
  71. package/assets/esri/core/workers/chunks/{4ef60a76eeca20bcafb1.js → e4f1e584f89ffb86206b.js} +1 -1
  72. package/assets/esri/core/workers/chunks/{2889e782ed81bb05b9e5.js → e508f8e707eb3207cfcc.js} +1 -1
  73. package/assets/esri/core/workers/chunks/{2216264b22a605a0f1ce.js → e60684918100666bb892.js} +1 -1
  74. package/assets/esri/core/workers/chunks/{4550b7620932cd6de20e.js → e94448b371cd17d7a472.js} +1 -1
  75. package/assets/esri/core/workers/chunks/{bb8530ade7c40a1ed7c4.js → eb9e913fe0dfcc71cf92.js} +1 -1
  76. package/assets/esri/core/workers/chunks/{6a043be736f096d70070.js → ec2dfd89e4ce6fda4971.js} +1 -1
  77. package/assets/esri/core/workers/chunks/ede1d1cc2f315a34f4ca.js +1 -0
  78. package/assets/esri/core/workers/chunks/{a5bd7e5d71cffde68f89.js → ee89564d11c077169b31.js} +1 -1
  79. package/assets/esri/core/workers/chunks/{b3cc7f6d953bfbc3a70d.js → f62e37863a549f72093c.js} +1 -1
  80. package/assets/esri/core/workers/chunks/fc98b8351be567d3eb62.js +1 -0
  81. package/assets/esri/core/workers/chunks/{554f389f99db430b309c.js → ff961bb6d29ab3fe129d.js} +1 -1
  82. package/assets/esri/themes/base/widgets/_Attribution.scss +4 -2
  83. package/assets/esri/themes/dark/main.css +1 -1
  84. package/assets/esri/themes/light/main.css +1 -1
  85. package/assets/esri/themes/light/view.css +1 -1
  86. package/config.js +1 -1
  87. package/core/has.js +1 -1
  88. package/core/types.d.ts +5 -0
  89. package/core/workers/workerFactory.js +1 -1
  90. package/editing/sharedTemplates/executor/builders/radialLines.js +1 -1
  91. package/editing/sharedTemplates/executor/builders/support/shapeUtils.js +1 -1
  92. package/geometry/projectionUtils.js +1 -1
  93. package/geometry/support/curves/curveUtils.js +1 -1
  94. package/kernel.js +1 -1
  95. package/layers/graphics/data/QueryEngineResult.js +1 -1
  96. package/layers/graphics/data/SnappingCandidate.js +1 -1
  97. package/layers/support/ControlPointsGeoreference.d.ts +2 -2
  98. package/layers/support/ControlPointsGeoreference.js +1 -1
  99. package/layers/support/CornersGeoreference.d.ts +2 -2
  100. package/layers/support/CornersGeoreference.js +1 -1
  101. package/layers/support/ExtentAndRotationGeoreference.d.ts +2 -2
  102. package/layers/support/ExtentAndRotationGeoreference.js +1 -1
  103. package/layers/support/GeoreferenceBaseMixin.js +2 -0
  104. package/layers/support/mediaUtils.js +1 -1
  105. package/layers/support/relativeTimeQueryUtils.js +1 -1
  106. package/layers/support/serviceCapabilitiesUtils.js +1 -1
  107. package/package.json +1 -1
  108. package/renderers/DotDensityRenderer.d.ts +43 -0
  109. package/renderers/DotDensityRenderer.js +1 -1
  110. package/rest/featureService/FeatureService.js +1 -1
  111. package/rest/print.js +1 -1
  112. package/rest/query/operations/pbfFlatFeatureSet.js +1 -1
  113. package/support/revision.js +1 -1
  114. package/symbols/ExtrudeSymbol3DLayer.d.ts +20 -10
  115. package/symbols/FillSymbol3DLayer.d.ts +36 -16
  116. package/symbols/ObjectSymbol3DLayer.d.ts +28 -6
  117. package/symbols/PathSymbol3DLayer.d.ts +18 -6
  118. package/symbols/cim/CIMSymbolHelper.js +1 -1
  119. package/symbols/cim/rasterizingUtils.js +1 -1
  120. package/symbols/support/Symbol3DEmissive.d.ts +1 -1
  121. package/views/2d/interactive/SnappingVisualizer2D.js +1 -1
  122. package/views/2d/layers/features/layerAdapters/CatalogFootprintLayerAdapter.js +1 -1
  123. package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
  124. package/views/2d/layers/features/layerAdapters/InMemoryLayerAdapter.js +1 -1
  125. package/views/2d/layers/features/layerAdapters/KnowledgeGraphSublayerAdapter.js +1 -1
  126. package/views/2d/layers/features/layerAdapters/OGCFeatureLayerAdapter.js +1 -1
  127. package/views/2d/layers/features/layerAdapters/OrientedImageryLayerAdapter.js +1 -1
  128. package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
  129. package/views/2d/layers/features/sources/FeatureSourceQueryInfo.js +1 -1
  130. package/views/2d/layers/features/sources/strategies/FeaturePagedTileLoadStrategy.js +1 -1
  131. package/views/2d/layers/features/sources/strategies/FeatureSnapshotLoadStrategy.js +1 -1
  132. package/views/2d/layers/support/RouteLayerWaypointVisualization.js +1 -1
  133. package/views/3d/layers/support/featureTileQuery3D.js +1 -1
  134. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  135. package/views/interactive/keybindings.js +1 -1
  136. package/views/interactive/snapping/candidates/EdgeSnappingCandidate.js +1 -1
  137. package/views/interactive/snapping/featureSources/GraphicsSnappingSource.js +1 -1
  138. package/views/interactive/snapping/featureSources/queryEngineUtils.js +1 -1
  139. package/views/interactive/snapping/featureSources/snappingCandidateElevationAlignment.js +1 -1
  140. package/views/interactive/snapping/featureSources/snappingCandidateElevationFilter.js +1 -1
  141. package/views/interactive/snapping/hints/LineSnappingHint.js +1 -1
  142. package/views/layers/FeatureLikeLayerView.js +1 -1
  143. package/views/layers/support/WhereClauseVisitor.js +1 -1
  144. package/webscene/Glow.d.ts +5 -0
  145. package/widgets/BatchAttributeForm/expressions/ExpressionsManager.js +1 -1
  146. package/widgets/BatchAttributeForm/expressions/ExpressionsModel.js +1 -1
  147. package/widgets/BatchAttributeForm/inputs/FieldInput.d.ts +1 -1
  148. package/widgets/BatchAttributeForm/inputs/InputBase.js +1 -1
  149. package/widgets/BatchAttributeForm/inputs/TextElementInput.d.ts +2 -11
  150. package/widgets/BatchAttributeForm/inputs/TextElementInput.js +1 -1
  151. package/widgets/BatchAttributeForm/inputs/support/inputUtils.js +1 -1
  152. package/widgets/BatchAttributeForm/inputs/support/textElementInputUtils.js +2 -0
  153. package/widgets/BatchAttributeForm/templates/TextElementTemplate.js +1 -1
  154. package/widgets/BatchAttributeForm/templates/support/constants.js +2 -0
  155. package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
  156. package/widgets/BatchAttributeForm/templates/support/hashElementTemplate.js +1 -1
  157. package/widgets/BatchAttributeForm/templates/support/textElementTemplateUtils.js +2 -0
  158. package/widgets/Editor/components/Settings.js +1 -1
  159. package/widgets/Features/FeaturesViewModel.js +1 -1
  160. package/widgets/Print/PrintViewModel.js +1 -1
  161. package/widgets/Sketch.js +1 -1
  162. package/widgets/TimeSlider.d.ts +4 -4
  163. package/widgets/support/SketchTooltipControls.js +1 -1
  164. package/assets/esri/core/workers/chunks/0c8a676599821b9871c2.js +0 -1
  165. package/assets/esri/core/workers/chunks/2b7615cccbaeda1649f3.js +0 -1
  166. package/assets/esri/core/workers/chunks/2f0ea91afc9aa8ee9cad.js +0 -1
  167. package/assets/esri/core/workers/chunks/3a850b5e847b6b0ea53f.js +0 -1
  168. package/assets/esri/core/workers/chunks/449cf6ae6b6e6c2795e5.js +0 -1
  169. package/assets/esri/core/workers/chunks/4dcd5d5ea5875a08a7c7.js +0 -1
  170. package/assets/esri/core/workers/chunks/5058715f32ff026053a9.js +0 -1
  171. package/assets/esri/core/workers/chunks/529dbf16ffbbd39f3fa2.js +0 -1
  172. package/assets/esri/core/workers/chunks/58cf3d35771b87bd74e5.js +0 -1
  173. package/assets/esri/core/workers/chunks/652bb1b53782cdd3103c.js +0 -1
  174. package/assets/esri/core/workers/chunks/6acab23acf3b044f5215.js +0 -1
  175. package/assets/esri/core/workers/chunks/6c2a7bac3f8e32c83292.js +0 -1
  176. package/assets/esri/core/workers/chunks/6d26e5368e8952003669.js +0 -1
  177. package/assets/esri/core/workers/chunks/7cb6ccee9bcef449caea.js +0 -1
  178. package/assets/esri/core/workers/chunks/879e8439a513cb333b61.js +0 -1
  179. package/assets/esri/core/workers/chunks/a027da22acdaa6d6baa3.js +0 -1
  180. package/assets/esri/core/workers/chunks/a6006718fe22d9f2fa87.js +0 -1
  181. package/assets/esri/core/workers/chunks/b60337c471e2b855d02a.js +0 -1
  182. package/assets/esri/core/workers/chunks/bd1bbf1820e12d7a27f6.js +0 -1
  183. package/assets/esri/core/workers/chunks/c9067667290e93407dd7.js +0 -1
  184. package/assets/esri/core/workers/chunks/e59c5bcf91984aa5be6d.js +0 -1
  185. package/assets/esri/core/workers/chunks/e71d08c6f545c2c70174.js +0 -1
  186. package/assets/esri/core/workers/chunks/e8a7ff6210cd11d3a828.js +0 -1
  187. package/assets/esri/core/workers/chunks/f347dee99faa9ee5eef1.js +0 -1
  188. package/layers/support/GeoreferenceBase.d.ts +0 -4
  189. package/layers/support/GeoreferenceBase.js +0 -2
  190. package/widgets/BatchAttributeForm/inputs/support/textInputElementUtils.js +0 -2
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import r from"../../../../core/Accessor.js";import t from"../../../../core/Error.js";import{destroyMaybe as s}from"../../../../core/maybe.js";import{throwIfAborted as o,createAbortError as i}from"../../../../core/promiseUtils.js";import{difference as a}from"../../../../core/SetUtils.js";import{parseWhereClause as u}from"../../../../core/sql.js";import{property as l,subclass as n}from"../../../../core/accessorSupport/decorators.js";import{fromFeatureSetJSON as c}from"../../../../layers/graphics/dehydratedFeatures.js";import{canConvertSqlRelativeTime as y,sqlRelativeTimeToAbsolute as p}from"../../../../layers/support/relativeTimeQueryUtils.js";import{queueAutoPriority as d}from"../../../../request/queue.js";import{runQuery as h,executeQuery as m,executeQueryForCount as f}from"../../../../rest/query/operations/query.js";import{PBFDecoder as w}from"../../support/PBFDecoder.js";let F=class extends r{constructor(e){super(e)}get implicitFields(){const e=this.layer.outFields?.includes("*");if(!e)return new Set;const r=new Set(this.layerView.requiredFields),t=new Set(this.layerView.availableFields);return a(t,r)}async queryFeaturesDehydrated(e,r){const{layer:t}=this,s=t.capabilities,a=s?.query?.supportsFormatPBF,l=t.parsedUrl,n=y(e.where)?await p(e.where,s.query.relativeTimeBinWindow):e.where,d=e.where;let f;if(n!==e.where&&((e=e.clone()).where=n),a){null==this._decoder&&(this._decoder=new w(this.controller));const s={sourceSpatialReference:t.spatialReference?.toJSON()??null,applyTransform:!0,maxStringAttributeFields:this.implicitFields,maxStringAttributeLength:v};f=await h(l,e,"pbf",this._createRequestOptions(r)).then(e=>(o(r),null!=this._decoder?this._decoder.invoke({buffer:e,options:s},r.signal):Promise.reject(i())))}else f=await m(l,e,t.spatialReference,this._createRequestOptions(r)).then(e=>c(e,{maxStringAttributeFields:this.implicitFields,maxStringAttributeLength:v}));if(d&&e.where!==d){const e=await this.controller.schedule(()=>u(d,this.layer.fieldsIndex),r.signal);f.features=await this.controller.schedule(()=>f.features.filter(r=>e.testFeatureCompiled(r)),r.signal)}return f}queryFeatureCount(e,r){return f(this.layer.parsedUrl,e,this._createRequestOptions(r))}destroy(){this._decoder=s(this._decoder)}_createRequestOptions(e){return{...d,...e,query:{...this.layer.customParameters,token:this.layer.apiKey,...e?.query}}}};e([l({constructOnly:!0})],F.prototype,"layer",void 0),e([l({constructOnly:!0})],F.prototype,"layerView",void 0),e([l({constructOnly:!0})],F.prototype,"controller",void 0),e([l({readOnly:!0})],F.prototype,"implicitFields",null),F=e([n("esri.views.3d.layers.support.featureTileQuery3D.FeatureTileServiceQuery3D")],F);let q=class extends r{constructor(e){super(e)}queryFeaturesDehydrated(e,r){return this.layer.queryFeatures(e,r)}};e([l({constructOnly:!0})],q.prototype,"layer",void 0),q=e([n("esri.views.3d.layers.support.featureTileQuery3D.FeatureTileOGCServiceQuery3D")],q);let g=class extends r{constructor(e){super(e)}queryFeaturesDehydrated(e,r){return this.layer.source.queryFeaturesJSON(e,r).then(c,t=>{if(t&&"query-features-json:unsupported"===t.name)return this.layer.queryFeatures(e,r);throw t})}queryFeatureCount(e,r){return this.layer.queryFeatureCount(e,r)}};function j(e,r){const{layer:s}=e;switch(s.type){case"feature":switch(s.source.type){case"feature-layer":return new F({layer:s,layerView:e,controller:r});case"memory":return new g({layer:s});case"csv":case"geojson":case"oriented-imagery":case"wfs":case"ogc-feature":case"parquet":break;default:s.source.type}break;case"catalog-footprint":return new F({layer:s,layerView:e,controller:r});case"csv":case"geojson":case"oriented-imagery":case"wfs":return new g({layer:s});case"ogc-feature":return new q({layer:s})}throw new t("feature-layer:unsupported",`Unsupported Feature layer type ${e.layer.type}:${e.layer.source.type}`)}e([l({constructOnly:!0})],g.prototype,"layer",void 0),g=e([n("esri.views.3d.layers.support.featureTileQuery3D.FeatureTileClientQuery3D")],g);const v=1024;export{j as createFeatureTileQuery3D};
2
+ import{__decorate as e}from"tslib";import r from"../../../../core/Accessor.js";import t from"../../../../core/Error.js";import{destroyMaybe as s}from"../../../../core/maybe.js";import{throwIfAborted as o,createAbortError as i}from"../../../../core/promiseUtils.js";import{difference as a}from"../../../../core/SetUtils.js";import{parseWhereClause as u}from"../../../../core/sql.js";import{property as l,subclass as n}from"../../../../core/accessorSupport/decorators.js";import{fromFeatureSetJSON as c}from"../../../../layers/graphics/dehydratedFeatures.js";import{canConvertSqlRelativeTime as y,sqlRelativeTimeToAbsolute as p}from"../../../../layers/support/relativeTimeQueryUtils.js";import{queueAutoPriority as d}from"../../../../request/queue.js";import{runQuery as h,executeQuery as m,executeQueryForCount as f}from"../../../../rest/query/operations/query.js";import{PBFDecoder as w}from"../../support/PBFDecoder.js";let F=class extends r{constructor(e){super(e)}get implicitFields(){const e=this.layer.outFields?.includes("*");if(!e)return new Set;const r=new Set(this.layerView.requiredFields),t=new Set(this.layerView.availableFields);return a(t,r)}async queryFeaturesDehydrated(e,r){const{layer:t}=this,s=t.capabilities,a=s?.query?.supportsFormatPBF,l=t.parsedUrl,n=y(e.where)?await p(t.fieldsIndex,e.where,s.query.relativeTimeBinWindow):e.where,d=e.where;let f;if(n!==e.where&&((e=e.clone()).where=n),a){null==this._decoder&&(this._decoder=new w(this.controller));const s={sourceSpatialReference:t.spatialReference?.toJSON()??null,applyTransform:!0,maxStringAttributeFields:this.implicitFields,maxStringAttributeLength:v};f=await h(l,e,"pbf",this._createRequestOptions(r)).then(e=>(o(r),null!=this._decoder?this._decoder.invoke({buffer:e,options:s},r.signal):Promise.reject(i())))}else f=await m(l,e,t.spatialReference,this._createRequestOptions(r)).then(e=>c(e,{maxStringAttributeFields:this.implicitFields,maxStringAttributeLength:v}));if(d&&e.where!==d){const e=await this.controller.schedule(()=>u(d,this.layer.fieldsIndex),r.signal);f.features=await this.controller.schedule(()=>f.features.filter(r=>e.testFeatureCompiled(r)),r.signal)}return f}queryFeatureCount(e,r){return f(this.layer.parsedUrl,e,this._createRequestOptions(r))}destroy(){this._decoder=s(this._decoder)}_createRequestOptions(e){return{...d,...e,query:{...this.layer.customParameters,token:this.layer.apiKey,...e?.query}}}};e([l({constructOnly:!0})],F.prototype,"layer",void 0),e([l({constructOnly:!0})],F.prototype,"layerView",void 0),e([l({constructOnly:!0})],F.prototype,"controller",void 0),e([l({readOnly:!0})],F.prototype,"implicitFields",null),F=e([n("esri.views.3d.layers.support.featureTileQuery3D.FeatureTileServiceQuery3D")],F);let q=class extends r{constructor(e){super(e)}queryFeaturesDehydrated(e,r){return this.layer.queryFeatures(e,r)}};e([l({constructOnly:!0})],q.prototype,"layer",void 0),q=e([n("esri.views.3d.layers.support.featureTileQuery3D.FeatureTileOGCServiceQuery3D")],q);let g=class extends r{constructor(e){super(e)}queryFeaturesDehydrated(e,r){return this.layer.source.queryFeaturesJSON(e,r).then(c,t=>{if(t&&"query-features-json:unsupported"===t.name)return this.layer.queryFeatures(e,r);throw t})}queryFeatureCount(e,r){return this.layer.queryFeatureCount(e,r)}};function j(e,r){const{layer:s}=e;switch(s.type){case"feature":switch(s.source.type){case"feature-layer":return new F({layer:s,layerView:e,controller:r});case"memory":return new g({layer:s});case"csv":case"geojson":case"oriented-imagery":case"wfs":case"ogc-feature":case"parquet":break;default:s.source.type}break;case"catalog-footprint":return new F({layer:s,layerView:e,controller:r});case"csv":case"geojson":case"oriented-imagery":case"wfs":return new g({layer:s});case"ogc-feature":return new q({layer:s})}throw new t("feature-layer:unsupported",`Unsupported Feature layer type ${e.layer.type}:${e.layer.source.type}`)}e([l({constructOnly:!0})],g.prototype,"layer",void 0),g=e([n("esri.views.3d.layers.support.featureTileQuery3D.FeatureTileClientQuery3D")],g);const v=1024;export{j as createFeatureTileQuery3D};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import{exactEquals as e}from"../../../../../../core/libs/gl-matrix-2/math/vec3.js";import{ZEROS as r}from"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ComponentTechnique as s}from"./ComponentTechnique.js";import{ComponentTechniqueConfiguration as t}from"./ComponentTechniqueConfiguration.js";import{MaterialBase as i}from"../../../core/material/MaterialBase.js";import{isColor as o}from"../../../core/shaderLibrary/ShaderOutput.js";class a extends i{constructor(e,r,s,i,o){super(),this.parameters=e,this.key=o,this.usePBR=e.usePBR,this.hasParametersFromSource=e.hasParametersFromSource,this.isGround=e.isGround,this.slicePlaneEnabled=e.slicePlaneEnabled,this.isIntegratedMesh=e.isIntegratedMesh,this.applySSAO=e.applySSAO,this.hasEmissions=u(e,s,i),this.materialPass=n(e,s),this._configuration=new t(i.sphericalSR),this._initializeMaterialConfiguration(e,r,s,i)}destroy(){}acquireTechnique(e,r,t,i){const o=this._updateConfiguration(r,t);return e.get(s,o,i.layout)}_initializeMaterialConfiguration(e,r,s,t){const i=this._configuration;i.hasMetallicRoughnessTexture=null!=e.metallicRoughnessTexture,i.hasOcclusionTexture=null!=e.occlusionTexture,i.hasNormalTexture=null!=e.normalTexture,i.sphereDepthInterpolate=e.sphereDepthInterpolate&&i.spherical,i.ellipsoidMode=e.ellipsoidMode,i.doubleSidedMode=e.doubleSided?1:0,i.hasColorTexture=null!=e.baseColorTexture,i.cullFace=e.cullFace,i.alphaDiscardMode=e.alphaDiscardMode,i.hasVertexColors=r.hasVertexColors,i.textureCoordinateType=r.textureCoordinateType,i.shadeNormals=r.shadeNormals,i.normalType=r.hasNormals?1:2,i.hasPolygonOffset=e.polygonOffsetEnabled,i.hasModelRotationScale=r.hasModelRotationScale,i.componentDataType=s.componentDataType,i.emissionSource=c(e,s,t)}_updateConfiguration(e,r){const s=this._configuration,{identifier:t,output:i}=e,a=0===t;s.output=i,s.hasEmission=r.hasEmission&&a,s.renderOccluded=10===r.slot,s.oitPass=a?r.oitPass:0,s.terrainDepthTest=a&&r.terrainDepthTest,s.cullAboveTerrain=!!a&&r.cullAboveTerrain;const n=this.isIntegratedMesh?d(r)?h(r)?3:2:1:0;s.integratedMeshMode=n,s.pbrMode=3===n?4:this.usePBR?this.hasParametersFromSource?s.shadeNormals&&this.isIntegratedMesh?0:2:1:0,s.hasSlicePlane=null!=r.slicePlane&&this.slicePlaneEnabled,s.isGroundSlice=s.hasSlicePlane&&this.isGround;const{materialPass:l}=this;s.blendingEnabled=1===l||2===l||4===l||s.isGroundSlice,s.hasHighlightMixTexture=2===t&&null!=r.highlightMixTexture,s.snowCover=a&&r.snowCover>0,s.vertexDiscardMode=a&&2===l?e.transparent?2:1:0;const u=a&&o(i);return s.receiveAmbientOcclusion=u&&this.applySSAO&&null!=r.ssao?.getTexture(),s.hasOccludees=u&&r.hasOccludees,s.receiveShadows=u&&r.shadowMap.ready,s.screenSpaceReflections=u&&null!=r.ssr.lastFrameColor,s.cloudReflections=u&&null!=r.clouds.data?.cubeMap?.colorTexture,s}}function n(e,r){const{alphaDiscardMode:s,isIntegratedMesh:t,slicePlaneEnabled:i}=e,{transparent:o,opaqueOverride:a}=r,n=e.opacity<1,l=e.baseColor[3]<1;if(t)return n||i?4:3;if(n)return 1;if(0===a)return 0;if(l||0===s||3===s)return 1;switch(o){case 2:return 0;case 0:return 1;case 1:return 2}}function l(s){return null!=s.emissionTexture||!e(s.emissiveBaseColor,r)}function u(e,r,s){const t=l(e);return s.floatBufferBlendSupported&&2!==r.emissiveOverride&&(t||2!==r.emissiveSourceOverride)}function c(e,r,s){const t=null!=e.emissionTexture,{emissiveSourceOverride:i}=r,o=1===i,a=2===i,n=u(e,r,s),c=l(e);return n?c?a?t?4:2:o?t?5:7:6:o?7:6:0}function h(e){return null!=e.overlay?.getTexture(3)}function d(e){return null!=e.overlay?.getTexture(1)}export{a as ComponentMaterial,c as calculateEmissionSource,u as calculateHasEmissions,l as calculateHasEmissiveBase,n as computeMaterialPass};
2
+ import{exactEquals as e}from"../../../../../../core/libs/gl-matrix-2/math/vec3.js";import{ZEROS as r}from"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ComponentTechnique as t}from"./ComponentTechnique.js";import{ComponentTechniqueConfiguration as s}from"./ComponentTechniqueConfiguration.js";import{MaterialBase as i}from"../../../core/material/MaterialBase.js";import{isColor as o}from"../../../core/shaderLibrary/ShaderOutput.js";class a extends i{constructor(e,r,t,i,o){super(),this.parameters=e,this.key=o,this.usePBR=e.usePBR,this.hasParametersFromSource=e.hasParametersFromSource,this.isGround=e.isGround,this.slicePlaneEnabled=e.slicePlaneEnabled,this.isIntegratedMesh=e.isIntegratedMesh,this.applySSAO=e.applySSAO,this.hasEmissions=u(e,t,i),this.materialPass=n(e,t),this._configuration=new s(i.sphericalSR),this._initializeMaterialConfiguration(e,r,t,i)}destroy(){}acquireTechnique(e,r,s,i){const o=this._updateConfiguration(r,s);return e.get(t,o,i.layout)}_initializeMaterialConfiguration(e,r,t,s){const i=this._configuration;i.hasMetallicRoughnessTexture=null!=e.metallicRoughnessTexture,i.hasOcclusionTexture=null!=e.occlusionTexture,i.hasNormalTexture=null!=e.normalTexture,i.sphereDepthInterpolate=e.sphereDepthInterpolate&&i.spherical,i.ellipsoidMode=e.ellipsoidMode,i.doubleSidedMode=e.doubleSided?1:0,i.hasColorTexture=null!=e.baseColorTexture,i.cullFace=e.cullFace,i.alphaDiscardMode=e.alphaDiscardMode,i.hasVertexColors=r.hasVertexColors,i.textureCoordinateType=r.textureCoordinateType,i.shadeNormals=r.shadeNormals,i.normalType=r.hasNormals?1:2,i.hasPolygonOffset=e.polygonOffsetEnabled,i.hasModelRotationScale=r.hasModelRotationScale,i.componentDataType=t.componentDataType,i.emissionSource=c(e,t,s)}_updateConfiguration(e,r){const t=this._configuration,{identifier:s,output:i}=e,a=0===s;t.output=i,t.hasEmission=r.hasEmission&&a,t.renderOccluded=10===r.slot,t.oitPass=a?r.oitPass:0,t.terrainDepthTest=a&&r.terrainDepthTest,t.cullAboveTerrain=!!a&&r.cullAboveTerrain;const n=this.isIntegratedMesh?d(r)?h(r)?3:2:1:0;t.integratedMeshMode=n,t.pbrMode=3===n?4:this.usePBR?this.hasParametersFromSource?t.shadeNormals&&this.isIntegratedMesh?0:2:1:0,t.hasSlicePlane=null!=r.slicePlane&&this.slicePlaneEnabled,t.isGroundSlice=t.hasSlicePlane&&this.isGround;const{materialPass:l}=this;t.blendingEnabled=a&&(1===l||2===l&&e.transparent||4===l)||t.isGroundSlice,t.hasHighlightMixTexture=2===s&&null!=r.highlightMixTexture,t.snowCover=a&&r.snowCover>0,t.vertexDiscardMode=a&&2===l?e.transparent?2:1:0;const u=a&&o(i);return t.receiveAmbientOcclusion=u&&this.applySSAO&&null!=r.ssao?.getTexture(),t.hasOccludees=u&&r.hasOccludees,t.receiveShadows=u&&r.shadowMap.ready,t.screenSpaceReflections=u&&null!=r.ssr.lastFrameColor,t.cloudReflections=u&&null!=r.clouds.data?.cubeMap?.colorTexture,t}}function n(e,r){const{alphaDiscardMode:t,isIntegratedMesh:s,slicePlaneEnabled:i}=e,{transparent:o,opaqueOverride:a}=r,n=e.opacity<1,l=e.baseColor[3]<1;if(s)return n||i?4:3;if(n)return 1;if(0===a)return 0;if(l||0===t||3===t)return 1;switch(o){case 2:return 0;case 0:return 1;case 1:return 2}}function l(t){return null!=t.emissionTexture||!e(t.emissiveBaseColor,r)}function u(e,r,t){const s=l(e);return t.floatBufferBlendSupported&&2!==r.emissiveOverride&&(s||2!==r.emissiveSourceOverride)}function c(e,r,t){const s=null!=e.emissionTexture,{emissiveSourceOverride:i}=r,o=1===i,a=2===i,n=u(e,r,t),c=l(e);return n?c?a?s?4:2:o?s?5:7:6:o?7:6:0}function h(e){return null!=e.overlay?.getTexture(3)}function d(e){return null!=e.overlay?.getTexture(1)}export{a as ComponentMaterial,c as calculateEmissionSource,u as calculateHasEmissions,l as calculateHasEmissiveBase,n as computeMaterialPass};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import{remove as e}from"../../core/arrayUtils.js";import{makeHandle as t,handlesGroup as i}from"../../core/handleUtils.js";import{getOrCreateMapValue as o}from"../../core/MapUtils.js";import{ViewEventPriorities as r}from"../input/InputManager.js";import{primaryKey as n}from"../input/keys.js";const s="z",a="r",p={cancel:"Escape",complete:"Enter"},c={...p,redo:a,undo:s,center:"Alt",constraint:"Shift",delete:["Backspace","Delete"],vertexAdd:"f",pan:" "},f={toggle:"Control"},d={enterInputMode:"Tab",commit:"Enter",discard:"Escape",next:"Tab"},h={moveUp:{key:"ArrowUp",modifier:"Shift",repeats:!0},moveDown:{key:"ArrowDown",modifier:"Shift",repeats:!0},moveLeft:{key:"ArrowLeft",modifier:"Shift",repeats:!0},moveRight:{key:"ArrowRight",modifier:"Shift",repeats:!0},scaleUp:{key:"+",modifier:"Shift"},scaleDown:{key:"-",modifier:"Shift"},factorModifier:{key:n,continuePropagation:!0},toggleOpacity:"t",preserveAspectRatio:{key:"Shift",continuePropagation:!0},rotateIncrements:{key:"Shift",continuePropagation:!0},editSourcePoints:{key:"Alt",continuePropagation:!0},undo:s,redo:a},g={toggleFollowManipulator:{key:"V",modifier:"Shift",repeats:!1,continuePropagation:!0}},m={invertType:["Control","Meta"]};class y{constructor(){this._bindings=new Map}add(e,t){return this.addToggle(e,e=>{"key-down"===e.type&&t(e)})}addToggle(i,r){const n=l.fromDefinition(i,r),s=o(this._bindings,n.key,()=>[]);return s.push(n),t(()=>e(s,n))}register(e,t=r.WIDGET){return i([e.on("key-down",t=>this.dispatch(e.inputManager,t),t),e.on("key-up",t=>this.dispatch(e.inputManager,t),t)])}dispatch(e,t){const i=t.key,o=this._bindings.get(i);if(o)for(const r of o)r.process(e,t)}}class l{constructor(e,t,i,o,r){this.key=e,this.modifiers=t,this.repeats=i,this.continuePropagation=o,this.callback=r}process(e,t){if(!(t.key!==this.key||"repeat"in t&&t.repeat&&!this.repeats)){for(const t of this.modifiers)if(!e.isModifierKeyDown(t))return;this.continuePropagation||t.stopPropagation(),this.callback(t)}}static fromDefinition(e,t){if("string"==typeof e)return new l(e,[],!1,!1,t);const{key:i,modifier:o,repeats:r,continuePropagation:n}=e;return new l(i,o?Array.isArray(o)?o:[o]:[],!!r,!!n,t)}}export{y as KeyBindings,g as advancedSketchKeys,p as interactiveToolKeys,h as mediaKeys,m as selectionKeys,c as sketchKeys,f as snappingKeys,d as tooltipKeys};
2
+ import{remove as e}from"../../core/arrayUtils.js";import{makeHandle as t,handlesGroup as o}from"../../core/handleUtils.js";import{getOrCreateMapValue as i}from"../../core/MapUtils.js";import{ViewEventPriorities as r}from"../input/InputManager.js";import{primaryKey as n}from"../input/keys.js";const s="z",a="r",p={cancel:"Escape",complete:"Enter"},c={...p,redo:a,undo:s,center:"Alt",constraint:"Shift",delete:["Backspace","Delete"],vertexAdd:"f",pan:" "},f={toggle:"Control"},d={enterInputMode:"Tab",commit:"Enter",discard:"Escape",next:"Tab"},h={moveUp:{key:"ArrowUp",modifier:"Shift",repeats:!0},moveDown:{key:"ArrowDown",modifier:"Shift",repeats:!0},moveLeft:{key:"ArrowLeft",modifier:"Shift",repeats:!0},moveRight:{key:"ArrowRight",modifier:"Shift",repeats:!0},scaleUp:{key:"+",modifier:"Shift"},scaleDown:{key:"-",modifier:"Shift"},factorModifier:{key:n,continuePropagation:!0},toggleOpacity:"t",preserveAspectRatio:{key:"Shift",continuePropagation:!0},rotateIncrements:{key:"Shift",continuePropagation:!0},editSourcePoints:{key:"Alt",continuePropagation:!0},undo:s,redo:a},g={toggleFollowManipulator:{key:"v",repeats:!1,continuePropagation:!0}},m={invertType:["Control","Meta"]};class y{constructor(){this._bindings=new Map}add(e,t){return this.addToggle(e,e=>{"key-down"===e.type&&t(e)})}addToggle(o,r){const n=l.fromDefinition(o,r),s=i(this._bindings,n.key,()=>[]);return s.push(n),t(()=>e(s,n))}register(e,t=r.WIDGET){return o([e.on("key-down",t=>this.dispatch(e.inputManager,t),t),e.on("key-up",t=>this.dispatch(e.inputManager,t),t)])}dispatch(e,t){const o=t.key,i=this._bindings.get(o);if(i)for(const r of i)r.process(e,t)}}class l{constructor(e,t,o,i,r){this.key=e,this.modifiers=t,this.repeats=o,this.continuePropagation=i,this.callback=r}process(e,t){if(!(t.key!==this.key||"repeat"in t&&t.repeat&&!this.repeats)){for(const t of this.modifiers)if(!e.isModifierKeyDown(t))return;this.continuePropagation||t.stopPropagation(),this.callback(t)}}static fromDefinition(e,t){if("string"==typeof e)return new l(e,[],!1,!1,t);const{key:o,modifier:i,repeats:r,continuePropagation:n}=e;return new l(o,i?Array.isArray(i)?i:[i]:[],!!r,!!n,t)}}export{y as KeyBindings,g as advancedSketchKeys,p as interactiveToolKeys,h as mediaKeys,m as selectionKeys,c as sketchKeys,f as snappingKeys,d as tooltipKeys};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import{LineConstraint as t}from"../../sketch/constraints.js";import{FeatureSnappingCandidate as n}from"./FeatureSnappingCandidate.js";import{LineSnappingHint as s}from"../hints/LineSnappingHint.js";class i extends n{constructor(n){super({...n,constraint:new t(n.edgeStart,n.edgeEnd)})}get hints(){return[new s(1,this.constraint.start,this.constraint.end,this.isDraped,this.domain)]}}export{i as EdgeSnappingCandidate};
2
+ import{LineConstraint as t}from"../../sketch/constraints.js";import{FeatureSnappingCandidate as n}from"./FeatureSnappingCandidate.js";import{LineSnappingHint as s}from"../hints/LineSnappingHint.js";class r extends n{constructor(n){super({...n,constraint:new t(n.edgeStart,n.edgeEnd)}),this.curve=n.curve}get hints(){return[new s(1,this.constraint.start,this.constraint.end,this.isDraped,this.domain,!0,!0,this.curve)]}}export{r as EdgeSnappingCandidate};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{removeUnordered as r}from"../../../../core/arrayUtils.js";import{createTask as o}from"../../../../core/asyncUtils.js";import{clone as s}from"../../../../core/lang.js";import{memoize as i}from"../../../../core/memoize.js";import{throwIfAborted as n,allSettledValues as a,whenOrAbort as l}from"../../../../core/promiseUtils.js";import{initial as p,watch as d,on as c}from"../../../../core/reactiveUtils.js";import{property as u,subclass as h}from"../../../../core/accessorSupport/decorators.js";import{UpdatingHandles as y}from"../../../../core/support/UpdatingHandles.js";import{convertGeometryToFlat as m}from"../../../../geometry/FlatGeometry.js";import g from"../../../../geometry/Polygon.js";import{initializeProjection as f,load as _,canProjectWithoutEngine as v,project as S}from"../../../../geometry/projectionUtils.js";import{normalizeCentralMeridianForDisplay as w}from"../../../../geometry/support/normalizeUtilsSync.js";import{featureGeometryTypeKebabDictionary as j}from"../../../../geometry/support/typeUtils.js";import{isCurvedGeometry as F}from"../../../../geometry/support/curves/curveUtils.js";import{FlatFeature as E}from"../../../../layers/graphics/FlatFeature.js";import b from"../../../../layers/graphics/data/FlatFeatureStore.js";import{QueryEngine as k}from"../../../../layers/graphics/data/QueryEngine.js";import C from"../../../../layers/support/FieldsIndex.js";import{elevationContextAffectsAlignment as A}from"../../../../support/elevationInfoUtils.js";import{symbolHasExtrudeSymbolLayer as I}from"../../../../symbols/support/utils.js";import{sortCandidatesInPlace as P,makeSnappingQuery as G}from"../snappingUtils.js";import{makeGetGroundElevation as H,convertSnappingCandidate as x}from"./queryEngineUtils.js";import{getSnappingCandidateElevationAligner as R}from"./snappingCandidateElevationAlignment.js";import{getSnappingCandidateElevationFilter as U}from"./snappingCandidateElevationFilter.js";import{getSymbologySnappingCandidatesFetcher as Z}from"./symbologySnappingCandidates.js";import{TaskPriority as z}from"../../../support/Scheduler.js";const O="graphics-collections";let L=class extends t{get updating(){return this._updatingHandles.updating}get _hasZ(){return"map-notes"!==this.layerSource.layer.type}get _snappingElevationAligner(){const{view:e}=this,{layer:t}=this.layerSource,r=null!=e&&"3d"===e.type;if(!r||"map-notes"===t.type)return R();const o=async(r,o)=>(await l(e.whenLayerView(t),o)).elevationAlignPointsInFeatures(r,o);return R(r,{elevationInfo:t.elevationInfo,alignPointsInFeatures:o})}get _snappingElevationFilter(){const{view:e}=this,t=null!=e&&"3d"===e.type&&"map-notes"!==this.layerSource.layer.type;return U(t)}get _symbologySnappingFetcher(){const{view:e}=this,{layer:t}=this.layerSource,r=null!=e&&"3d"===e.type,o=this._extrudedPolygonSymbolsCount>0;return r&&"map-notes"!==t.type&&o?Z(o,async(r,o)=>{const s=await e.whenLayerView(t);return n(o),s.queryForSymbologySnapping({candidates:r,spatialReference:e.spatialReference},o)}):Z()}constructor(e){super(e),this.availability=1,this._sources={multipoint:null,point:null,polygon:null,polyline:null},this._loadedWkids=new Set,this._loadedWkts=new Set,this._pendingAdds=[],this._extrudedPolygonSymbolsCount=0,this._updatingHandles=new y,this._memoizedMakeGetGroundElevation=i(H)}destroy(){for(const e of this._pendingAdds)e.task.abort();this._pendingAdds.length=0,this._mapSources(e=>this._destroySource(e)),this._updatingHandles.destroy()}initialize(){this._updatingHandles.add(()=>this.getGraphicsLayers(),e=>{this._updatingHandles.removeHandles(O);for(const t of e)this._addMany(t.graphics.toArray()),this.addHandles([t.on("graphic-update",e=>this._onGraphicUpdate(e)),this._updatingHandles.addOnCollectionChange(()=>t.graphics,e=>this._onGraphicsChanged(e))],O)},p);const{view:e}=this,{layer:t}=this.layerSource;null!=e&&"3d"===e.type&&"map-notes"!==t.type&&e.elevationProvider&&this.addHandles([e.elevationProvider.on("elevation-change",({context:e})=>{A(e,t.elevationInfo)&&this._snappingElevationAligner.notifyElevationSourceChange()}),d(()=>t.elevationInfo,()=>this._snappingElevationAligner.notifyElevationSourceChange(),p),c(()=>t,["edits","apply-edits","graphic-update"],()=>this._symbologySnappingFetcher.notifySymbologyChange())])}async fetchCandidates(e,t){const{point:r,coordinateHelper:{spatialReference:o}}=e,s=await a(this._mapSources(r=>this._fetchCandidatesForSource(r,e,t)));n(t);const i=this._memoizedMakeGetGroundElevation(this.view,o),l=s.flat().map(t=>x(t,e.mode,i));return P(r,l),l}async _fetchCandidatesForSource(e,t,r){const o=G({parameters:t,returnZ:this._hasZ}),s=await e.queryEngine.executeQueryForSnapping(o,r);n(r);const i=await this._snappingElevationAligner.alignCandidates(s.candidates,t.coordinateHelper.spatialReference,r);n(r);const a=await this._symbologySnappingFetcher.fetch(i,r);n(r);const l=0===a.length?i:[...i,...a];return this._snappingElevationFilter.filter(o,l)}refresh(){}_onGraphicUpdate(e){if(this.getGraphicsLayers().some(t=>t.graphics.includes(e.graphic)))switch(e.property){case"geometry":case"visible":this._remove(e.graphic),this._addMany([e.graphic])}}_onGraphicsChanged(e){for(const t of e.removed)this._remove(t);this._addMany(e.added)}_addMany(e){const t=[],r=new Map,o=e.some(({geometry:e})=>e&&F(e));for(const s of e)null!=s.geometry&&(o||this._needsInitializeProjection(s.geometry.spatialReference)?(t.push(s.geometry.spatialReference),r.set(s.uid,s)):this._add(s));this._createPendingAdd(t,r)}_createPendingAdd(e,t){if(!e.length)return;const s=o(async r=>{await f(e.map(e=>({source:e,dest:this.spatialReference})),{signal:r}),this._markLoadedSpatialReferences(e);for(const e of t.values())e.geometry&&F(e.geometry)&&await _({signal:r}),this._add(e)});this._updatingHandles.addPromise(s.promise);const i={task:s,graphics:t},n=()=>r(this._pendingAdds,i);s.promise.then(n,n),this._pendingAdds.push(i)}_markLoadedSpatialReferences(e){for(const t of e){null!=t.wkid&&this._loadedWkids.add(t.wkid);const e=t.wkt2||t.wkt;e&&this._loadedWkts.add(e)}}_add({geometry:e,visible:t,uid:r,symbol:o}){if(null==e||!t)return;if("mesh"===e.type)return;"extent"===e.type&&(e=g.fromExtent(e));const s=this._ensureSource(e.type);if(null==s)return;const i=this._createFlatFeature(r,e);null!=i&&(s.featureStore.add(i),I(o)&&this._extrudedPolygonSymbolsCount++)}_needsInitializeProjection(e){if(null!=e.wkid&&this._loadedWkids.has(e.wkid))return!1;const t=e.wkt2||e.wkt;return(!t||!this._loadedWkts.has(t))&&!v(e,this.spatialReference)}_createFlatFeature(e,t){const r=w(t);if(!r)return null;const o=S(r,this.spatialReference);if(!o)return null;const s=this._ensureGeometryHasZ(o),i=m(s);return new E(i,{[M]:e},null,e)}_ensureGeometryHasZ(e){if(!this._hasZ)return e;const t=e=>{for(;e.length<3;)e.push(0)},r=s(e);return"x"in r?r.z=r.z??0:"points"in r?(r.points.forEach(t),r.hasZ=!0):"paths"in r?(r.paths.forEach(e=>e.forEach(t)),r.hasZ=!0):"rings"in r&&(r.rings.forEach(e=>e.forEach(t)),r.hasZ=!0),r}_ensureSource(e){const t=this._sources[e];if(null!=t)return t;const r=this._createSource(e);return this._sources[e]=r,r}_createSource(e){const t=j.toJSON(e),r=this._hasZ,o=new b(t,r,!1);return{featureStore:o,queryEngine:new k({featureStore:o,fieldsIndex:C.fromLayerJSON({fields:[{name:M,type:"esriFieldTypeOID",alias:M}]}),geometryType:t,hasM:!1,hasZ:r,featureIdInfo:{type:"object-id",fieldName:M},spatialReference:this.spatialReference,priority:z.SNAPPING,scheduler:null!=this.view&&"3d"===this.view.type?this.view.resourceController.scheduler:null}),type:e}}_remove(e){this._mapSources(t=>this._removeFromSource(t,e));for(const t of this._pendingAdds)t.graphics.delete(e.uid),0===t.graphics.size&&t.task.abort()}_removeFromSource(e,t){const r=t.uid;e.featureStore.has(r)&&(e.featureStore.removeById(t.uid),I(t.symbol)&&this._extrudedPolygonSymbolsCount--)}_destroySource(e){e.queryEngine.destroy(),this._sources[e.type]=null}_mapSources(e){const{point:t,polygon:r,polyline:o,multipoint:s}=this._sources,i=[];return null!=t&&i.push(e(t)),null!=r&&i.push(e(r)),null!=o&&i.push(e(o)),null!=s&&i.push(e(s)),i}};e([u()],L.prototype,"getGraphicsLayers",void 0),e([u({constructOnly:!0})],L.prototype,"layerSource",void 0),e([u({constructOnly:!0})],L.prototype,"spatialReference",void 0),e([u({constructOnly:!0})],L.prototype,"view",void 0),e([u({readOnly:!0})],L.prototype,"updating",null),e([u({readOnly:!0})],L.prototype,"availability",void 0),e([u()],L.prototype,"_hasZ",null),e([u()],L.prototype,"_snappingElevationAligner",null),e([u()],L.prototype,"_snappingElevationFilter",null),e([u()],L.prototype,"_symbologySnappingFetcher",null),e([u()],L.prototype,"_extrudedPolygonSymbolsCount",void 0),L=e([h("esri.views.interactive.snapping.featureSources.GraphicsSnappingSource")],L);const M="OBJECTID";export{L as GraphicsSnappingSource};
2
+ import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{removeUnordered as r}from"../../../../core/arrayUtils.js";import{createTask as o}from"../../../../core/asyncUtils.js";import{clone as i}from"../../../../core/lang.js";import{memoize as s}from"../../../../core/memoize.js";import{throwIfAborted as n,allSettledValues as a,whenOrAbort as l}from"../../../../core/promiseUtils.js";import{initial as p,watch as d,on as c}from"../../../../core/reactiveUtils.js";import{property as u,subclass as h}from"../../../../core/accessorSupport/decorators.js";import{UpdatingHandles as y}from"../../../../core/support/UpdatingHandles.js";import{convertGeometryToFlat as m}from"../../../../geometry/FlatGeometry.js";import g from"../../../../geometry/Polygon.js";import{initializeProjection as f,canProjectWithoutEngine as _,project as v}from"../../../../geometry/projectionUtils.js";import{normalizeCentralMeridianForDisplay as S}from"../../../../geometry/support/normalizeUtilsSync.js";import{featureGeometryTypeKebabDictionary as w}from"../../../../geometry/support/typeUtils.js";import{FlatFeature as j}from"../../../../layers/graphics/FlatFeature.js";import F from"../../../../layers/graphics/data/FlatFeatureStore.js";import{QueryEngine as E}from"../../../../layers/graphics/data/QueryEngine.js";import b from"../../../../layers/support/FieldsIndex.js";import{elevationContextAffectsAlignment as k}from"../../../../support/elevationInfoUtils.js";import{symbolHasExtrudeSymbolLayer as C}from"../../../../symbols/support/utils.js";import{sortCandidatesInPlace as A,makeSnappingQuery as I}from"../snappingUtils.js";import{makeGetGroundElevation as P,convertSnappingCandidate as G}from"./queryEngineUtils.js";import{getSnappingCandidateElevationAligner as H}from"./snappingCandidateElevationAlignment.js";import{getSnappingCandidateElevationFilter as x}from"./snappingCandidateElevationFilter.js";import{getSymbologySnappingCandidatesFetcher as R}from"./symbologySnappingCandidates.js";import{TaskPriority as U}from"../../../support/Scheduler.js";const Z="graphics-collections";let z=class extends t{get updating(){return this._updatingHandles.updating}get _hasZ(){return"map-notes"!==this.layerSource.layer.type}get _snappingElevationAligner(){const{view:e}=this,{layer:t}=this.layerSource,r=null!=e&&"3d"===e.type;if(!r||"map-notes"===t.type)return H();const o=async(r,o)=>(await l(e.whenLayerView(t),o)).elevationAlignPointsInFeatures(r,o);return H(r,{elevationInfo:t.elevationInfo,alignPointsInFeatures:o})}get _snappingElevationFilter(){const{view:e}=this,t=null!=e&&"3d"===e.type&&"map-notes"!==this.layerSource.layer.type;return x(t)}get _symbologySnappingFetcher(){const{view:e}=this,{layer:t}=this.layerSource,r=null!=e&&"3d"===e.type,o=this._extrudedPolygonSymbolsCount>0;return r&&"map-notes"!==t.type&&o?R(o,async(r,o)=>{const i=await e.whenLayerView(t);return n(o),i.queryForSymbologySnapping({candidates:r,spatialReference:e.spatialReference},o)}):R()}constructor(e){super(e),this.availability=1,this._sources={multipoint:null,point:null,polygon:null,polyline:null},this._loadedWkids=new Set,this._loadedWkts=new Set,this._pendingAdds=[],this._extrudedPolygonSymbolsCount=0,this._updatingHandles=new y,this._memoizedMakeGetGroundElevation=s(P)}destroy(){for(const e of this._pendingAdds)e.task.abort();this._pendingAdds.length=0,this._mapSources(e=>this._destroySource(e)),this._updatingHandles.destroy()}initialize(){this._updatingHandles.add(()=>this.getGraphicsLayers(),e=>{this._updatingHandles.removeHandles(Z);for(const t of e)this._addMany(t.graphics.toArray()),this.addHandles([t.on("graphic-update",e=>this._onGraphicUpdate(e)),this._updatingHandles.addOnCollectionChange(()=>t.graphics,e=>this._onGraphicsChanged(e))],Z)},p);const{view:e}=this,{layer:t}=this.layerSource;null!=e&&"3d"===e.type&&"map-notes"!==t.type&&e.elevationProvider&&this.addHandles([e.elevationProvider.on("elevation-change",({context:e})=>{k(e,t.elevationInfo)&&this._snappingElevationAligner.notifyElevationSourceChange()}),d(()=>t.elevationInfo,()=>this._snappingElevationAligner.notifyElevationSourceChange(),p),c(()=>t,["edits","apply-edits","graphic-update"],()=>this._symbologySnappingFetcher.notifySymbologyChange())])}async fetchCandidates(e,t){const{point:r,coordinateHelper:{spatialReference:o}}=e,i=await a(this._mapSources(r=>this._fetchCandidatesForSource(r,e,t)));n(t);const s=this._memoizedMakeGetGroundElevation(this.view,o),l=i.flat().map(t=>G(t,e.mode,s));return A(r,l),l}async _fetchCandidatesForSource(e,t,r){const o=I({parameters:t,returnZ:this._hasZ}),i=await e.queryEngine.executeQueryForSnapping(o,r);n(r);const s=await this._snappingElevationAligner.alignCandidates(i.candidates,t.coordinateHelper.spatialReference,r);n(r);const a=await this._symbologySnappingFetcher.fetch(s,r);n(r);const l=0===a.length?s:[...s,...a];return this._snappingElevationFilter.filter(o,l)}refresh(){}_onGraphicUpdate(e){if(this.getGraphicsLayers().some(t=>t.graphics.includes(e.graphic)))switch(e.property){case"geometry":case"visible":this._remove(e.graphic),this._addMany([e.graphic])}}_onGraphicsChanged(e){for(const t of e.removed)this._remove(t);this._addMany(e.added)}_addMany(e){const t=[],r=new Map;for(const o of e)null!=o.geometry&&(this._needsInitializeProjection(o.geometry.spatialReference)?(t.push(o.geometry.spatialReference),r.set(o.uid,o)):this._add(o));this._createPendingAdd(t,r)}_createPendingAdd(e,t){if(!e.length)return;const i=o(async r=>{await f(e.map(e=>({source:e,dest:this.spatialReference})),{signal:r}),this._markLoadedSpatialReferences(e);for(const e of t.values())this._add(e)});this._updatingHandles.addPromise(i.promise);const s={task:i,graphics:t},n=()=>r(this._pendingAdds,s);i.promise.then(n,n),this._pendingAdds.push(s)}_markLoadedSpatialReferences(e){for(const t of e){null!=t.wkid&&this._loadedWkids.add(t.wkid);const e=t.wkt2||t.wkt;e&&this._loadedWkts.add(e)}}_add({geometry:e,visible:t,uid:r,symbol:o}){if(null==e||!t)return;if("mesh"===e.type)return;"extent"===e.type&&(e=g.fromExtent(e));const i=this._ensureSource(e.type);if(null==i)return;const s=this._createFlatFeature(r,e);null!=s&&(i.featureStore.add(s),C(o)&&this._extrudedPolygonSymbolsCount++)}_needsInitializeProjection(e){if(null!=e.wkid&&this._loadedWkids.has(e.wkid))return!1;const t=e.wkt2||e.wkt;return(!t||!this._loadedWkts.has(t))&&!_(e,this.spatialReference)}_createFlatFeature(e,t){const r=S(t);if(!r)return null;const o=v(r,this.spatialReference);if(!o)return null;const i=this._ensureGeometryHasZ(o),s=m(i);return new j(s,{[O]:e},null,e)}_ensureGeometryHasZ(e){if(!this._hasZ)return e;const t=e=>{for(;e.length<3;)e.push(0)},r=i(e);return"x"in r?r.z=r.z??0:"points"in r?(r.points.forEach(t),r.hasZ=!0):"paths"in r?(r.paths.forEach(e=>e.forEach(t)),r.hasZ=!0):"rings"in r&&(r.rings.forEach(e=>e.forEach(t)),r.hasZ=!0),r}_ensureSource(e){const t=this._sources[e];if(null!=t)return t;const r=this._createSource(e);return this._sources[e]=r,r}_createSource(e){const t=w.toJSON(e),r=this._hasZ,o=new F(t,r,!1);return{featureStore:o,queryEngine:new E({featureStore:o,fieldsIndex:b.fromLayerJSON({fields:[{name:O,type:"esriFieldTypeOID",alias:O}]}),geometryType:t,hasM:!1,hasZ:r,featureIdInfo:{type:"object-id",fieldName:O},spatialReference:this.spatialReference,priority:U.SNAPPING,scheduler:null!=this.view&&"3d"===this.view.type?this.view.resourceController.scheduler:null}),type:e}}_remove(e){this._mapSources(t=>this._removeFromSource(t,e));for(const t of this._pendingAdds)t.graphics.delete(e.uid),0===t.graphics.size&&t.task.abort()}_removeFromSource(e,t){const r=t.uid;e.featureStore.has(r)&&(e.featureStore.removeById(t.uid),C(t.symbol)&&this._extrudedPolygonSymbolsCount--)}_destroySource(e){e.queryEngine.destroy(),this._sources[e.type]=null}_mapSources(e){const{point:t,polygon:r,polyline:o,multipoint:i}=this._sources,s=[];return null!=t&&s.push(e(t)),null!=r&&s.push(e(r)),null!=o&&s.push(e(o)),null!=i&&s.push(e(i)),s}};e([u()],z.prototype,"getGraphicsLayers",void 0),e([u({constructOnly:!0})],z.prototype,"layerSource",void 0),e([u({constructOnly:!0})],z.prototype,"spatialReference",void 0),e([u({constructOnly:!0})],z.prototype,"view",void 0),e([u({readOnly:!0})],z.prototype,"updating",null),e([u({readOnly:!0})],z.prototype,"availability",void 0),e([u()],z.prototype,"_hasZ",null),e([u()],z.prototype,"_snappingElevationAligner",null),e([u()],z.prototype,"_snappingElevationFilter",null),e([u()],z.prototype,"_symbologySnappingFetcher",null),e([u()],z.prototype,"_extrudedPolygonSymbolsCount",void 0),z=e([h("esri.views.interactive.snapping.featureSources.GraphicsSnappingSource")],z);const O="OBJECTID";export{z as GraphicsSnappingSource};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import{create as t,markAsTarget as e,fromValues as n}from"../../sketch/normalizedPoint.js";import{DrapedEdgeSnappingCandidate as r}from"../candidates/DrapedEdgeSnappingCandidate.js";import{EdgeSnappingCandidate as a}from"../candidates/EdgeSnappingCandidate.js";import{VertexSnappingCandidate as d}from"../candidates/VertexSnappingCandidate.js";function o(t,e){const{x:r,y:a}=t,d="3d"===e&&null!=t.z?t.z:0;return n(r,a,d)}function i(n,i,g){switch(n.type){case"edge":return n.draped?new r({edgeStart:o(n.start,i),edgeEnd:o(n.end,i),targetPoint:e(o(n.target,i)),objectId:n.objectId,getGroundElevation:g}):new a({edgeStart:o(n.start,i),edgeEnd:o(n.end,i),targetPoint:e(o(n.target,i)),objectId:n.objectId,isDraped:!1});case"vertex":return new d({targetPoint:e(o(n.target,i)),objectId:n.objectId,isDraped:!1,originalTargetPoint:t(n.target.x,n.target.y,n.target.z)})}}function g(t,e){return"3d"===t?.type?(n,r)=>t.elevationProvider.getElevation(n,r,0,e,"ground"):()=>null}export{i as convertSnappingCandidate,g as makeGetGroundElevation};
2
+ import{create as t,markAsTarget as e,fromValues as r}from"../../sketch/normalizedPoint.js";import{DrapedEdgeSnappingCandidate as n}from"../candidates/DrapedEdgeSnappingCandidate.js";import{EdgeSnappingCandidate as a}from"../candidates/EdgeSnappingCandidate.js";import{VertexSnappingCandidate as d}from"../candidates/VertexSnappingCandidate.js";function o(t,e){const{x:n,y:a}=t,d="3d"===e&&null!=t.z?t.z:0;return r(n,a,d)}function i(r,i,g){switch(r.type){case"edge":return r.draped?new n({edgeStart:o(r.start,i),edgeEnd:o(r.end,i),targetPoint:e(o(r.target,i)),objectId:r.objectId,getGroundElevation:g}):new a({edgeStart:o(r.start,i),edgeEnd:o(r.end,i),targetPoint:e(o(r.target,i)),objectId:r.objectId,isDraped:!1,curve:r.curve});case"vertex":return new d({targetPoint:e(o(r.target,i)),objectId:r.objectId,isDraped:!1,originalTargetPoint:t(r.target.x,r.target.y,r.target.z)})}}function g(t,e){return"3d"===t?.type?(r,n)=>t.elevationProvider.getElevation(r,n,0,e,"ground"):()=>null}export{i as convertSnappingCandidate,g as makeGetGroundElevation};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import{LRUCache as e}from"../../../../core/LRUCache.js";import{getOrCreateMapValue as t}from"../../../../core/MapUtils.js";import{throwIfAborted as s}from"../../../../core/promiseUtils.js";import{getMetersPerVerticalUnitForSR as n}from"../../../../core/units.js";import{getMetersPerUnit as o}from"../../../../symbols/support/unitConversionUtils.js";function i(e=!1,t){if(e){const{elevationInfo:e,alignPointsInFeatures:s}=t;return new c(e,s)}return new a}class a{async alignCandidates(e,t,s){return e}notifyElevationSourceChange(){}}const r=1024;class c{constructor(t,s){this._elevationInfo=t,this._alignPointsInFeatures=s,this._alignmentsCache=new e(r),this._cacheVersion=0}async alignCandidates(e,t,s){const n=this._elevationInfo;return null==n||"absolute-height"!==n.mode||n.featureExpressionInfo?this._alignComputedElevationCandidates(e,t,s):(d(e,t,n),e)}notifyElevationSourceChange(){this._alignmentsCache.clear(),this._cacheVersion++}async _alignComputedElevationCandidates(e,n,o){const i=new Map;for(const s of e)t(i,s.objectId,l).push(s);const[a,r,c]=this._prepareQuery(i,n),h=await this._alignPointsInFeatures(a,o);s(o);if(c!==this._cacheVersion)return this._alignComputedElevationCandidates(e,n,o);this._applyCacheAndResponse(a,h,r);const{drapedObjectIds:u,failedObjectIds:d}=h,p=[];for(const t of e){const{objectId:e}=t;u.has(e)&&"edge"===t.type&&(t.draped=!0),d.has(e)||p.push(t)}return p}_prepareQuery(e,t){const s=[],n=[];for(const[o,i]of e){const e=[];for(const t of i)this._addToQueriesOrCachedResult(o,t.target,e,n),"edge"===t.type&&(this._addToQueriesOrCachedResult(o,t.start,e,n),this._addToQueriesOrCachedResult(o,t.end,e,n));0!==e.length&&s.push({objectId:o,points:e})}return[{spatialReference:t.toJSON(),pointsInFeatures:s},n,this._cacheVersion]}_addToQueriesOrCachedResult(e,t,s,n){const o=u(e,t),i=this._alignmentsCache.get(o);null==i?s.push(t):n.push(new h(t,i))}_applyCacheAndResponse(e,{elevations:t,drapedObjectIds:s,failedObjectIds:n},o){for(const r of o)r.apply();let i=0;const a=this._alignmentsCache;for(const{objectId:r,points:c}of e.pointsInFeatures){if(n.has(r)){i+=c.length;continue}const e=!s.has(r);for(const s of c){const n=u(r,s),o=t[i++];s.z=o,e&&a.put(n,o,1)}}}}class h{constructor(e,t){this.point=e,this.z=t}apply(){this.point.z=this.z}}function u(e,{x:t,y:s,z:n,spatialReference:o}){return`${e}-${t}-${s}-${n??0}}-wkid:${o?.wkid}`}function d(e,t,s){const{offset:i,unit:a}=s;if(null==i)return;const r=n(t),c=i*(o(a??"meters")/r);for(const n of e)switch(n.type){case"edge":n.start.z+=c,n.end.z+=c;continue;case"vertex":n.target.z+=c;continue}}function l(){return[]}export{i as getSnappingCandidateElevationAligner};
2
+ import{LRUCache as e}from"../../../../core/LRUCache.js";import{getOrCreateMapValue as t}from"../../../../core/MapUtils.js";import{throwIfAborted as s}from"../../../../core/promiseUtils.js";import{getMetersPerVerticalUnitForSR as n}from"../../../../core/units.js";import{getEndpoint as o}from"../../../../geometry/support/curves/curveUtils.js";import{getMetersPerUnit as i}from"../../../../symbols/support/unitConversionUtils.js";function r(e=!1,t){if(e){const{elevationInfo:e,alignPointsInFeatures:s}=t;return new u(e,s)}return new a}class a{async alignCandidates(e,t,s){return e}notifyElevationSourceChange(){}}const c=1024;class u{constructor(t,s){this._elevationInfo=t,this._alignPointsInFeatures=s,this._alignmentsCache=new e(c),this._cacheVersion=0}async alignCandidates(e,t,s){const n=this._elevationInfo;return null==n||"absolute-height"!==n.mode||n.featureExpressionInfo?this._alignComputedElevationCandidates(e,t,s):(p(e,t,n),e)}notifyElevationSourceChange(){this._alignmentsCache.clear(),this._cacheVersion++}async _alignComputedElevationCandidates(e,n,o){const i=new Map;for(const s of e)t(i,s.objectId,d).push(s);const[r,a,c]=this._prepareQuery(i,n),u=await this._alignPointsInFeatures(r,o);s(o);if(c!==this._cacheVersion)return this._alignComputedElevationCandidates(e,n,o);this._applyCacheAndResponse(r,u,a);const{drapedObjectIds:h,failedObjectIds:l}=u,p=[];for(const t of e){const{objectId:e}=t;h.has(e)&&"edge"===t.type&&(t.draped=!0),l.has(e)||p.push(t)}return p}_prepareQuery(e,t){const s=[],n=[];for(const[o,i]of e){const e=[];for(const t of i)this._addToQueriesOrCachedResult(o,t.target,e,n),"edge"===t.type&&(this._addToQueriesOrCachedResult(o,t.start,e,n),this._addToQueriesOrCachedResult(o,t.end,e,n));0!==e.length&&s.push({objectId:o,points:e})}return[{spatialReference:t.toJSON(),pointsInFeatures:s},n,this._cacheVersion]}_addToQueriesOrCachedResult(e,t,s,n){const o=l(e,t),i=this._alignmentsCache.get(o);null==i?s.push(t):n.push(new h(t,i))}_applyCacheAndResponse(e,{elevations:t,drapedObjectIds:s,failedObjectIds:n},o){for(const a of o)a.apply();let i=0;const r=this._alignmentsCache;for(const{objectId:a,points:c}of e.pointsInFeatures){if(n.has(a)){i+=c.length;continue}const e=!s.has(a);for(const s of c){const n=l(a,s),o=t[i++];s.z=o,e&&r.put(n,o,1)}}}}class h{constructor(e,t){this.point=e,this.z=t}apply(){this.point.z=this.z}}function l(e,{x:t,y:s,z:n,spatialReference:o}){return`${e}-${t}-${s}-${n??0}}-wkid:${o?.wkid}`}function p(e,t,s){const{offset:r,unit:a}=s;if(null==r)return;const c=n(t),u=r*(i(a??"meters")/c);for(const n of e)switch(n.type){case"edge":n.start.z+=u,n.end.z+=u,n.curve&&(o(n.curve)[2]+=u);continue;case"vertex":n.target.z+=u;continue}}function d(){return[]}export{r as getSnappingCandidateElevationAligner};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- class t{filter(t,n){return n}notifyElevationSourceChange(){}}class n{filter(t,n){const{point:r,distance:c}=t,{z:i}=r;if(!(null!=i))return n;if(0===n.length)return n;const a=o(c),u=this._updateCandidatesTo3D(n,r,a).filter(e);return u.sort(s),u}_updateCandidatesTo3D(t,n,e){for(const r of t)switch(r.type){case"edge":c(r,n,e);continue;case"vertex":a(r,n,e);continue}return t}}function e(t){return t.distance<=1}function r(e=!1){return e?new n:new t}function c(t,n,{x:e,y:r,z:c}){const{start:a,end:o,target:s}=t;t.draped||i(s,n,a,o);const u=(n.x-s.x)/e,d=(n.y-s.y)/r,f=(n.z-s.z)/c;t.distance=Math.sqrt(u*u+d*d+f*f)}function i(t,n,e,r){const c=r.x-e.x,i=r.y-e.y,a=r.z-e.z,o=c*c+i*i+a*a,s=(n.x-e.x)*c+(n.y-e.y)*i+a*(n.z-e.z),u=Math.min(1,Math.max(0,s/o)),d=e.x+c*u,f=e.y+i*u,x=e.z+a*u;t.x=d,t.y=f,t.z=x}function a(t,n,{x:e,y:r,z:c}){const{target:i}=t,a=(n.x-i.x)/e,o=(n.y-i.y)/r,s=(n.z-i.z)/c,u=Math.sqrt(a*a+o*o+s*s);t.distance=u}function o(t){return"number"==typeof t?{x:t,y:t,z:t}:t}function s(t,n){return t.distance-n.distance}export{r as getSnappingCandidateElevationFilter};
2
+ class t{filter(t,n){return n}notifyElevationSourceChange(){}}class n{filter(t,n){const{point:r,distance:o}=t,{z:c}=r;if(!(null!=c))return n;if(0===n.length)return n;const i=s(o),u=this._updateCandidatesTo3D(n,r,i).filter(e);return u.sort(a),u}_updateCandidatesTo3D(t,n,e){for(const r of t)switch(r.type){case"edge":o(r,n,e);continue;case"vertex":i(r,n,e);continue}return t}}function e(t){return t.distance<=1}function r(e=!1){return e?new n:new t}function o(t,n,{x:e,y:r,z:o}){const{start:i,end:s,target:a}=t;if(t.curve)throw new Error("Curves are not yet supported.");t.draped||c(a,n,i,s);const u=(n.x-a.x)/e,d=(n.y-a.y)/r,f=(n.z-a.z)/o;t.distance=Math.sqrt(u*u+d*d+f*f)}function c(t,n,e,r){const o=r.x-e.x,c=r.y-e.y,i=r.z-e.z,s=o*o+c*c+i*i,a=(n.x-e.x)*o+(n.y-e.y)*c+i*(n.z-e.z),u=Math.min(1,Math.max(0,a/s)),d=e.x+o*u,f=e.y+c*u,y=e.z+i*u;t.x=d,t.y=f,t.z=y}function i(t,n,{x:e,y:r,z:o}){const{target:c}=t,i=(n.x-c.x)/e,s=(n.y-c.y)/r,a=(n.z-c.z)/o,u=Math.sqrt(i*i+s*s+a*a);t.distance=u}function s(t){return"number"==typeof t?{x:t,y:t,z:t}:t}function a(t,n){return t.distance-n.distance}export{r as getSnappingCandidateElevationFilter};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import{exactEquals as t,distance as e}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{SnappingHint as i}from"./SnappingHint.js";class n extends i{constructor(t,e,i,n,s=3,r=!0,h=!0){super(n,s),this.type=t,this.lineStart=e,this.lineEnd=i,this.fadeLeft=r,this.fadeRight=h}equals(e){return e instanceof n&&(this.type===e.type&&t(this.lineStart,e.lineStart)&&t(this.lineEnd,e.lineEnd)&&this.fadeLeft===e.fadeLeft&&this.fadeRight===e.fadeRight)}get length(){return e(this.lineStart,this.lineEnd)}}export{n as LineSnappingHint};
2
+ import{distance as t,exactEquals as e}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{curveLength as i}from"../../../../geometry/support/curves/curveLength.js";import{isCoordinate as s,curveEquals as r}from"../../../../geometry/support/curves/curveUtils.js";import{SnappingHint as h}from"./SnappingHint.js";class n extends h{constructor(e,r,h,n,l=3,a=!0,o=!0,u=null){if(super(n,l),this.type=e,this.lineStart=r,this.lineEnd=h,this.fadeLeft=a,this.fadeRight=o,!u||s(u))return this.length=t(this.lineStart,this.lineEnd),void(this.curve=this.lineEnd);this.length=i(this.lineStart,u,1),this.curve=u;const c=(this.lineStart[2]-this.lineEnd[2])**2;c>1e-8&&(this.length=Math.sqrt(this.length*this.length+c))}equals(t){return t instanceof n&&this.type===t.type&&e(this.lineStart,t.lineStart)&&e(this.lineEnd,t.lineEnd)&&r(this.curve,t.curve)&&this.fadeLeft===t.fadeLeft&&this.fadeRight===t.fadeRight}}export{n as LineSnappingHint};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import"../../core/has.js";import t from"../../core/Logger.js";import{throwIfAborted as i}from"../../core/promiseUtils.js";import{watch as r,syncAndInitial as l,on as s}from"../../core/reactiveUtils.js";import{sqlOr as o,sqlIn as n,sqlAnd as a}from"../../core/sql.js";import{property as u,subclass as d}from"../../core/accessorSupport/decorators.js";import{getPopupProvider as f}from"../../graphic/getPopupProvider.js";import{getFeatureIdInfoFieldNames as p}from"../../layers/graphics/data/FeatureIdInfo.js";import{systemIsSpatialFieldName as y}from"../../layers/knowledgeGraph/constants.js";import{getEffectiveDisplayFilter as h}from"../../layers/support/displayFilterUtils.js";import m from"../../layers/support/FeatureEffect.js";import c from"../../layers/support/FeatureFilter.js";import{getSignedInUser as F}from"../../layers/support/featureLayerUtils.js";import{fetchFeaturePopupFeatures as g,loadFeaturePopupArcadeModules as I}from"../../layers/support/featurePopupQueryUtils.js";import{fixFields as b,unpackFieldNames as v,collectLabelingFields as w,collectElevationFields as E,collectFilterFields as x,collectFeatureReductionFields as R,collectOrderByInfos as q,collectFields as j,collectTrackInfoFields as C,collectDisplayFilterFields as O,collectField as _,featureHasFields as k}from"../../layers/support/fieldUtils.js";import{getFloorFilterClause as P}from"../../layers/support/floorFilterUtils.js";import{getUtilityNetworkFields as U}from"../../networks/support/networkFieldUtils.js";import L from"../../rest/support/Query.js";import{createFeatureIdInfo as S}from"../2d/layers/features/layerAdapters/featureServiceUtils.js";import T from"./LayerView.js";import{getFetchPopupTemplate as D,getRequiredFields as N}from"./support/popupUtils.js";import{WhereClauseVisitor as Q}from"./support/WhereClauseVisitor.js";let G=class extends T{constructor(){super(...arguments),this._updatingRequiredPromise=null,this.filter=null,this.layer=null,this.requiresCurrentUser=!1,this.requiredFields=[],this.view=null}initialize(){this.addHandles([r(()=>{const e=this.layer,t=this.view;return[e&&"elevationInfo"in e?e.elevationInfo?.featureExpressionInfo:null,e&&"displayField"in e?e.displayField:null,e&&"timeInfo"in e&&e.timeInfo,e&&"renderer"in e&&e.renderer,e&&"labelingInfo"in e&&e.labelingInfo,e&&"floorInfo"in e&&e.floorInfo,t?.requiredFieldsOptions?.featureTitleFields&&e&&"featureTitleFields"in e&&e.featureTitleFields,t?.requiredFieldsOptions?.utilityNetworkFields&&U(t,e),e&&"displayFilterInfo"in e&&e.displayFilterInfo,this.displayFilterEnabled,this.filter,this.featureEffect,this.timeExtent,"knowledge-graph-sublayer"===e?.type&&"link-chart"===e.parentCompositeLayer.type&&e.parentCompositeLayer.linkChart?.linkChartProperties.nonspatialDataDisplay?.mode]},()=>this._handleChange(),l),s(()=>this.view?.floors,"change",()=>this._handleChange()),s(()=>(this.layer&&"displayFilterInfo"in this.layer?this.layer.displayFilterInfo:null)?.filters,"change",()=>this._handleChange()),s(()=>this.layer&&"sublayers"in this.layer?this.layer.sublayers:null,"change",()=>this._handleChange())])}get availableFields(){if(!this.layer)return[];const{layer:e,layer:{fieldsIndex:t},requiredFields:i}=this;return"outFields"in e&&e.outFields?b(t,[...v(t,e.outFields),...i]):b(t,i)}get displayFilterEnabled(){return(this.view?.displayFilterEnabled??!0)&&(!("displayFilterEnabled"in this.layer)||(this.layer?.displayFilterEnabled??!0))}get effectiveDisplayFilter(){const e=this.layer;return"displayFilterInfo"in e&&this.displayFilterEnabled&&e.displayFilterInfo?h(e.displayFilterInfo,this.view):null}get effectiveDisplayFilterClause(){const e=this.effectiveDisplayFilter?.where??null;return e&&this.hasHighlight?o(e,n(this.layer.objectIdField,this.highlightIds)):e}get featureEffect(){return this.layer&&"featureEffect"in this.layer?this.layer.featureEffect:null}set featureEffect(e){this._override("featureEffect",e)}get highlightOptions(){}set highlightOptions(e){}get maximumNumberOfFeatures(){return 0}set maximumNumberOfFeatures(e){t.getLogger(this).error("#maximumNumberOfFeatures=","Setting maximum number of features is not supported")}get maximumNumberOfFeaturesExceeded(){return!1}get signedInUser(){return this.layer?.url?F(this.layer.url):Promise.resolve(null)}createQuery(){const e={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference},t=null!=this.filter?this.filter.createQuery(e):new L(e);return"floorInfo"in this.layer&&this.layer.floorInfo&&(t.where=a(t.where,P(this))),this.displayFilterEnabled&&(t.where=a(t.where,this.effectiveDisplayFilter?.where)),null!=this.timeExtent&&(t.timeExtent=null!=t.timeExtent?t.timeExtent.intersection(this.timeExtent):this.timeExtent.clone()),t}createAggregateQuery(){const e={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference};return new L(e)}async fetchPopupFeaturesFromGraphics(e,t){const i=[],r=new Set;for(const s of e){const e=f(s.origin),l=D(e,{...t,checkPopupEnabled:!0});l&&(i.push(s),r.add(l))}if(0===i.length||0===r.size)return[];const l=await this._createPopupQuery(r,t);return await g(this.layer,i,l,{hasRequiredFields:(e,t)=>this._popupFeatureHasRequiredFields(e,t),...t})}_handleChange(){const e=Promise.all([this._updateRequiredFields(),this._updateClientWhereClauseRequirements()]).then(()=>{});return this._updatingRequiredPromise=e,e.then(()=>{this._updatingRequiredPromise===e&&(this._updatingRequiredPromise=null)}),e}async _updateClientWhereClauseRequirements(){if(!this.layer||!this.view)return;const{layer:e}=this,i=new Q(e.fieldsIndex);if(i.visitFilter(this.filter),"featureReduction"in e&&i.visitFeatureReduction(e.featureReduction),"labelingInfo"in e&&i.visitLabelingInfo(e.labelsVisible,e.labelingInfo),"trackInfo"in e&&i.visitTrackInfo(e.trackInfo),"2d"===this.view.type&&(i.visitFilter(this.featureEffect?.filter),"featureReduction"in e&&i.visitFeatureReduction(e.featureReduction),"displayFilterInfo"in e&&i.visitDisplayFilter(this.displayFilterEnabled,e.displayFilterInfo)),"subtype-group"===e.type)for(const t of e.sublayers)i.visitLabelingInfo(t.labelsVisible,t.labelingInfo);try{const e=await i.finish();this._set("requiresCurrentUser",e.requiresCurrentUser)}catch(r){t.getLogger(this).error(r)}}async _updateRequiredFields(){if(!this.layer||!this.view)return;const e="3d"===this.view.type,{layer:i,layer:{fieldsIndex:r}}=this,l="renderer"in i&&i.renderer,s="orderBy"in i&&i.orderBy,o="featureReduction"in i?i.featureReduction:null,n=new Set,a=[l?l.collectRequiredFields(n,r):null,w(n,i),e&&"elevationInfo"in i?E(n,i):null,null!=this.filter?x(n,i,this.filter):null,e||null==this.featureEffect?null:x(n,i,this.featureEffect.filter),!e&&o?R(n,i,o):null,!e&&s?q(n,i,s):null];if("timeInfo"in i&&i.timeInfo&&this.timeExtent&&j(n,i.fieldsIndex,[i.timeInfo.startField,i.timeInfo.endField]),"timeInfo"in i&&i.timeInfo&&"trackInfo"in i&&i.trackInfo){const{trackInfo:e}=i;j(n,i.fieldsIndex,[i.timeInfo.trackIdField]),"feature"!==i.type&&"startTimeField"!==e.timeField||j(n,i.fieldsIndex,[i.timeInfo.startField]),"endTimeField"===e.timeField&&j(n,i.fieldsIndex,[i.timeInfo.endField]),await C(n,i)}if("floorInfo"in i&&i.floorInfo&&j(n,i.fieldsIndex,[i.floorInfo.floorField]),"featureTitleFields"in i&&this.view?.requiredFieldsOptions?.featureTitleFields&&i.featureTitleFields&&j(n,i.fieldsIndex,i.featureTitleFields),"feature"===i.type&&i.globalIdField&&this.view?.requiredFieldsOptions?.globalIdField&&j(n,i.fieldsIndex,[i.globalIdField]),this.displayFilterEnabled&&"displayFilterInfo"in i&&a.push(O(n,i,i.displayFilterInfo)),"feature"===i.type&&e&&null!=i.infoFor3D&&(null==i.globalIdField&&t.getLogger(this).error("globalIdField missing on 3DObjectFeatureLayer"),j(n,i.fieldsIndex,[i.globalIdField])),"subtype-group"===i.type){_(n,r,i.subtypeField);const e=i.sublayers.map(e=>Promise.all([e.renderer?.collectRequiredFields(n,r),w(n,e)]));a.push(Promise.all(e))}if("catalog-footprint"===i.type&&i.parent){const e=i.parent;j(n,r,[e.itemNameField,e.itemSourceField,e.itemTypeField,e.maxScaleField,e.minScaleField])}"knowledge-graph-sublayer"===i.type&&"link-chart"===i.parentCompositeLayer.type&&_(n,r,y);const u=await Promise.allSettled(a);if(e)_(n,r,i.objectIdField);else for(const t of p(S(i)))_(n,r,t);e&&"displayField"in i&&i.displayField&&_(n,r,i.displayField);for(const f of u)"rejected"===f.status&&t.getLogger(this).error(f.reason);const d=Array.from(n).sort();this._set("requiredFields",d)}_popupFeatureHasRequiredFields(e,t){return k(e,t)}async _createPopupQuery(e,t){const r=this.layer.createQuery(),l=new Set;let s="point"===this.layer.geometryType;for(const o of e){if(!s){const e=await I(o);i(t),s=(e&&e.arcadeUtils.hasGeometryOperations(o))??!1}const e=await N(this.layer,o);i(t);for(const t of e)l.add(t)}return r.returnGeometry=s,r.returnZ=s,r.returnM=s,r.outFields=Array.from(l),r.outSpatialReference=this.view.spatialReference,"floorInfo"in this.layer&&this.layer.floorInfo&&(r.where=a(r.where,P(this))),r}canResume(){return!!super.canResume()&&(null==this.timeExtent||!this.timeExtent.isEmpty)}getTest(){}get test(){}};e([u()],G.prototype,"_updatingRequiredPromise",void 0),e([u({readOnly:!0})],G.prototype,"availableFields",null),e([u({readOnly:!0})],G.prototype,"displayFilterEnabled",null),e([u({readOnly:!0})],G.prototype,"effectiveDisplayFilter",null),e([u({readOnly:!0})],G.prototype,"effectiveDisplayFilterClause",null),e([u({type:m})],G.prototype,"featureEffect",null),e([u({type:c})],G.prototype,"filter",void 0),e([u()],G.prototype,"layer",void 0),e([u({type:Number})],G.prototype,"maximumNumberOfFeatures",null),e([u({readOnly:!0,type:Boolean})],G.prototype,"maximumNumberOfFeaturesExceeded",null),e([u()],G.prototype,"requiresCurrentUser",void 0),e([u({readOnly:!0})],G.prototype,"requiredFields",void 0),e([u({readOnly:!0})],G.prototype,"signedInUser",null),e([u()],G.prototype,"view",void 0),G=e([d("esri.views.layers.FeatureLikeLayerView")],G);export{G as default};
2
+ import{__decorate as e}from"tslib";import"../../core/has.js";import t from"../../core/Logger.js";import{throwIfAborted as i}from"../../core/promiseUtils.js";import{watch as r,syncAndInitial as l,on as s}from"../../core/reactiveUtils.js";import{sqlOr as n,sqlIn as o,sqlAnd as a}from"../../core/sql.js";import{property as u,subclass as d}from"../../core/accessorSupport/decorators.js";import{getPopupProvider as f}from"../../graphic/getPopupProvider.js";import{getFeatureIdInfoFieldNames as p}from"../../layers/graphics/data/FeatureIdInfo.js";import{systemIsSpatialFieldName as y}from"../../layers/knowledgeGraph/constants.js";import{getEffectiveDisplayFilter as h}from"../../layers/support/displayFilterUtils.js";import m from"../../layers/support/FeatureEffect.js";import c from"../../layers/support/FeatureFilter.js";import{getSignedInUser as F}from"../../layers/support/featureLayerUtils.js";import{fetchFeaturePopupFeatures as g,loadFeaturePopupArcadeModules as I}from"../../layers/support/featurePopupQueryUtils.js";import{fixFields as b,unpackFieldNames as v,collectLabelingFields as w,collectElevationFields as E,collectFilterFields as x,collectFeatureReductionFields as R,collectOrderByInfos as q,collectFields as j,collectTrackInfoFields as C,collectDisplayFilterFields as O,collectField as _,featureHasFields as k}from"../../layers/support/fieldUtils.js";import{getFloorFilterClause as P}from"../../layers/support/floorFilterUtils.js";import{collectRelativeTimeFields as U}from"../../layers/support/relativeTimeQueryUtils.js";import{getUtilityNetworkFields as T}from"../../networks/support/networkFieldUtils.js";import L from"../../rest/support/Query.js";import{createFeatureIdInfo as S}from"../2d/layers/features/layerAdapters/featureServiceUtils.js";import D from"./LayerView.js";import{getFetchPopupTemplate as Q,getRequiredFields as N}from"./support/popupUtils.js";import{WhereClauseVisitor as G}from"./support/WhereClauseVisitor.js";let B=class extends D{constructor(){super(...arguments),this._updatingRequiredPromise=null,this.filter=null,this.layer=null,this.requiresCurrentUser=!1,this.requiredFields=[],this.view=null}initialize(){this.addHandles([r(()=>{const e=this.layer,t=this.view;return[e&&"elevationInfo"in e?e.elevationInfo?.featureExpressionInfo:null,e&&"displayField"in e?e.displayField:null,e&&"timeInfo"in e&&e.timeInfo,e&&"renderer"in e&&e.renderer,e&&"labelingInfo"in e&&e.labelingInfo,e&&"floorInfo"in e&&e.floorInfo,t?.requiredFieldsOptions?.featureTitleFields&&e&&"featureTitleFields"in e&&e.featureTitleFields,t?.requiredFieldsOptions?.utilityNetworkFields&&T(t,e),e&&"displayFilterInfo"in e&&e.displayFilterInfo,this.displayFilterEnabled,this.filter,this.featureEffect,this.timeExtent,"knowledge-graph-sublayer"===e?.type&&"link-chart"===e.parentCompositeLayer.type&&e.parentCompositeLayer.linkChart?.linkChartProperties.nonspatialDataDisplay?.mode]},()=>this._handleChange(),l),s(()=>this.view?.floors,"change",()=>this._handleChange()),s(()=>(this.layer&&"displayFilterInfo"in this.layer?this.layer.displayFilterInfo:null)?.filters,"change",()=>this._handleChange()),s(()=>this.layer&&"sublayers"in this.layer?this.layer.sublayers:null,"change",()=>this._handleChange())])}get availableFields(){if(!this.layer)return[];const{layer:e,layer:{fieldsIndex:t},requiredFields:i}=this;return"outFields"in e&&e.outFields?b(t,[...v(t,e.outFields),...i]):b(t,i)}get displayFilterEnabled(){return(this.view?.displayFilterEnabled??!0)&&(!("displayFilterEnabled"in this.layer)||(this.layer?.displayFilterEnabled??!0))}get effectiveDisplayFilter(){const e=this.layer;return"displayFilterInfo"in e&&this.displayFilterEnabled&&e.displayFilterInfo?h(e.displayFilterInfo,this.view):null}get effectiveDisplayFilterClause(){const e=this.effectiveDisplayFilter?.where??null;return e&&this.hasHighlight?n(e,o(this.layer.objectIdField,this.highlightIds)):e}get featureEffect(){return this.layer&&"featureEffect"in this.layer?this.layer.featureEffect:null}set featureEffect(e){this._override("featureEffect",e)}get highlightOptions(){}set highlightOptions(e){}get maximumNumberOfFeatures(){return 0}set maximumNumberOfFeatures(e){t.getLogger(this).error("#maximumNumberOfFeatures=","Setting maximum number of features is not supported")}get maximumNumberOfFeaturesExceeded(){return!1}get signedInUser(){return this.layer?.url?F(this.layer.url):Promise.resolve(null)}createQuery(){const e={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference},t=null!=this.filter?this.filter.createQuery(e):new L(e);return"floorInfo"in this.layer&&this.layer.floorInfo&&(t.where=a(t.where,P(this))),this.displayFilterEnabled&&(t.where=a(t.where,this.effectiveDisplayFilter?.where)),null!=this.timeExtent&&(t.timeExtent=null!=t.timeExtent?t.timeExtent.intersection(this.timeExtent):this.timeExtent.clone()),t}createAggregateQuery(){const e={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference};return new L(e)}async fetchPopupFeaturesFromGraphics(e,t){const i=[],r=new Set;for(const s of e){const e=f(s.origin),l=Q(e,{...t,checkPopupEnabled:!0});l&&(i.push(s),r.add(l))}if(0===i.length||0===r.size)return[];const l=await this._createPopupQuery(r,t);return await g(this.layer,i,l,{hasRequiredFields:(e,t)=>this._popupFeatureHasRequiredFields(e,t),...t})}_handleChange(){const e=Promise.all([this._updateRequiredFields(),this._updateClientWhereClauseRequirements()]).then(()=>{});return this._updatingRequiredPromise=e,e.then(()=>{this._updatingRequiredPromise===e&&(this._updatingRequiredPromise=null)}),e}async _updateClientWhereClauseRequirements(){if(!this.layer||!this.view)return;const{layer:e}=this,i=new G(e.fieldsIndex);if(i.visitFilter(this.filter),"featureReduction"in e&&i.visitFeatureReduction(e.featureReduction),"labelingInfo"in e&&i.visitLabelingInfo(e.labelsVisible,e.labelingInfo),"trackInfo"in e&&i.visitTrackInfo(e.trackInfo),"2d"===this.view.type&&(i.visitFilter(this.featureEffect?.filter),"featureReduction"in e&&i.visitFeatureReduction(e.featureReduction),"displayFilterInfo"in e&&i.visitDisplayFilter(this.displayFilterEnabled,e.displayFilterInfo)),"subtype-group"===e.type)for(const t of e.sublayers)i.visitLabelingInfo(t.labelsVisible,t.labelingInfo);"definitionExpression"in e&&"capabilities"in e&&e.capabilities?.query.relativeTimeBinWindow&&i.visitRelativeTimeQuery(e.definitionExpression);try{const e=await i.finish();this._set("requiresCurrentUser",e.requiresCurrentUser)}catch(r){t.getLogger(this).error(r)}}async _updateRequiredFields(){if(!this.layer||!this.view)return;const e="3d"===this.view.type,{layer:i,layer:{fieldsIndex:r}}=this,l="renderer"in i&&i.renderer,s="orderBy"in i&&i.orderBy,n="featureReduction"in i?i.featureReduction:null,o=new Set,a=[l?l.collectRequiredFields(o,r):null,w(o,i),e&&"elevationInfo"in i?E(o,i):null,null!=this.filter?x(o,i,this.filter):null,e||null==this.featureEffect?null:x(o,i,this.featureEffect.filter),!e&&n?R(o,i,n):null,!e&&s?q(o,i,s):null,"definitionExpression"in i&&"capabilities"in i&&i.capabilities?.query.relativeTimeBinWindow?U(o,i.fieldsIndex,i.definitionExpression):null];if("timeInfo"in i&&i.timeInfo&&this.timeExtent&&j(o,i.fieldsIndex,[i.timeInfo.startField,i.timeInfo.endField]),"timeInfo"in i&&i.timeInfo&&"trackInfo"in i&&i.trackInfo){const{trackInfo:e}=i;j(o,i.fieldsIndex,[i.timeInfo.trackIdField]),"feature"!==i.type&&"startTimeField"!==e.timeField||j(o,i.fieldsIndex,[i.timeInfo.startField]),"endTimeField"===e.timeField&&j(o,i.fieldsIndex,[i.timeInfo.endField]),await C(o,i)}if("floorInfo"in i&&i.floorInfo&&j(o,i.fieldsIndex,[i.floorInfo.floorField]),"featureTitleFields"in i&&this.view?.requiredFieldsOptions?.featureTitleFields&&i.featureTitleFields&&j(o,i.fieldsIndex,i.featureTitleFields),"feature"===i.type&&i.globalIdField&&this.view?.requiredFieldsOptions?.globalIdField&&j(o,i.fieldsIndex,[i.globalIdField]),this.displayFilterEnabled&&"displayFilterInfo"in i&&a.push(O(o,i,i.displayFilterInfo)),"feature"===i.type&&e&&null!=i.infoFor3D&&(null==i.globalIdField&&t.getLogger(this).error("globalIdField missing on 3DObjectFeatureLayer"),j(o,i.fieldsIndex,[i.globalIdField])),"subtype-group"===i.type){_(o,r,i.subtypeField);const e=i.sublayers.map(e=>Promise.all([e.renderer?.collectRequiredFields(o,r),w(o,e)]));a.push(Promise.all(e))}if("catalog-footprint"===i.type&&i.parent){const e=i.parent;j(o,r,[e.itemNameField,e.itemSourceField,e.itemTypeField,e.maxScaleField,e.minScaleField])}"knowledge-graph-sublayer"===i.type&&"link-chart"===i.parentCompositeLayer.type&&_(o,r,y);const u=await Promise.allSettled(a);if(e)_(o,r,i.objectIdField);else for(const t of p(S(i)))_(o,r,t);e&&"displayField"in i&&i.displayField&&_(o,r,i.displayField);for(const f of u)"rejected"===f.status&&t.getLogger(this).error(f.reason);const d=Array.from(o).sort();this._set("requiredFields",d)}_popupFeatureHasRequiredFields(e,t){return k(e,t)}async _createPopupQuery(e,t){const r=this.layer.createQuery(),l=new Set;let s="point"===this.layer.geometryType;for(const n of e){if(!s){const e=await I(n);i(t),s=(e&&e.arcadeUtils.hasGeometryOperations(n))??!1}const e=await N(this.layer,n);i(t);for(const t of e)l.add(t)}return r.returnGeometry=s,r.returnZ=s,r.returnM=s,r.outFields=Array.from(l),r.outSpatialReference=this.view.spatialReference,"floorInfo"in this.layer&&this.layer.floorInfo&&(r.where=a(r.where,P(this))),r}canResume(){return!!super.canResume()&&(null==this.timeExtent||!this.timeExtent.isEmpty)}getTest(){}get test(){}};e([u()],B.prototype,"_updatingRequiredPromise",void 0),e([u({readOnly:!0})],B.prototype,"availableFields",null),e([u({readOnly:!0})],B.prototype,"displayFilterEnabled",null),e([u({readOnly:!0})],B.prototype,"effectiveDisplayFilter",null),e([u({readOnly:!0})],B.prototype,"effectiveDisplayFilterClause",null),e([u({type:m})],B.prototype,"featureEffect",null),e([u({type:c})],B.prototype,"filter",void 0),e([u()],B.prototype,"layer",void 0),e([u({type:Number})],B.prototype,"maximumNumberOfFeatures",null),e([u({readOnly:!0,type:Boolean})],B.prototype,"maximumNumberOfFeaturesExceeded",null),e([u()],B.prototype,"requiresCurrentUser",void 0),e([u({readOnly:!0})],B.prototype,"requiredFields",void 0),e([u({readOnly:!0})],B.prototype,"signedInUser",null),e([u()],B.prototype,"view",void 0),B=e([d("esri.views.layers.FeatureLikeLayerView")],B);export{B as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import{parseWhereClause as i}from"../../../core/sql.js";class s{constructor(i){this._fieldsIndex=i,this._clauses=[]}async finish(){return{requiresCurrentUser:(await Promise.all(this._clauses)).some(i=>i.currentUserRequired)}}visitClientWhereClause(s){s&&this._clauses.push(i(s,this._fieldsIndex))}visitFeatureReduction(i){if(i)switch(i.type){case"binning":case"cluster":this.visitLabelingInfo(i.labelsVisible,i.labelingInfo)}}visitLabelingInfo(i,s){if(i&&null!=s)for(const e of s)this.visitClientWhereClause(e.where)}visitDisplayFilter(i,s){if(i)for(const e of s?.filters??[])this.visitClientWhereClause(e.where)}visitFilter(i){this.visitClientWhereClause(i?.where)}visitTrackInfo(i){null!=i&&(this.visitLabelingInfo(i?.latestObservations.labelsVisible,i?.latestObservations.labelingInfo),this.visitLabelingInfo(i?.previousObservations.labelsVisible,i?.previousObservations.labelingInfo),this.visitLabelingInfo(i?.trackLines.labelsVisible,i?.trackLines.labelingInfo))}}export{s as WhereClauseVisitor};
2
+ import{parseWhereClause as i}from"../../../core/sql.js";import{getRelativeTimeFields as e}from"../../../layers/support/relativeTimeQueryUtils.js";class s{constructor(i){this._fieldsIndex=i,this._clauses=[]}async finish(){return{requiresCurrentUser:(await Promise.all(this._clauses)).some(i=>i?.currentUserRequired)}}visitClientWhereClause(e){e&&this._clauses.push(i(e,this._fieldsIndex))}visitFeatureReduction(i){if(i)switch(i.type){case"binning":case"cluster":this.visitLabelingInfo(i.labelsVisible,i.labelingInfo)}}visitLabelingInfo(i,e){if(i&&null!=e)for(const s of e)this.visitClientWhereClause(s.where)}visitDisplayFilter(i,e){if(i)for(const s of e?.filters??[])this.visitClientWhereClause(s.where)}visitFilter(i){this.visitClientWhereClause(i?.where)}visitRelativeTimeQuery(s){this._clauses.push(e(this._fieldsIndex,s).then(e=>s&&e.length>0?i(s,this._fieldsIndex):null))}visitTrackInfo(i){null!=i&&(this.visitLabelingInfo(i?.latestObservations.labelsVisible,i?.latestObservations.labelingInfo),this.visitLabelingInfo(i?.previousObservations.labelsVisible,i?.previousObservations.labelingInfo),this.visitLabelingInfo(i?.trackLines.labelsVisible,i?.trackLines.labelingInfo))}}export{s as WhereClauseVisitor};
@@ -6,6 +6,11 @@ export interface GlowProperties extends Partial<Pick<Glow, "intensity">> {}
6
6
  /**
7
7
  * Glow accentuates the effects of light emitters for illustrative visualizations, such as highlighting or filtering.
8
8
  *
9
+ * > [!WARNING]
10
+ * >
11
+ * > **Known Limitations**
12
+ * > [Symbol3DEmissive](https://developers.arcgis.com/javascript/latest/references/core/symbols/support/Symbol3DEmissive/) and [Glow](https://developers.arcgis.com/javascript/latest/references/core/webscene/Glow/) require support for the WebGL2 extension `EXT_float_blend`.
13
+ *
9
14
  * Example:
10
15
  * ```js
11
16
  * let view = new SceneView({
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../core/Accessor.js";import r from"../../../core/Error.js";import a from"../../../core/Logger.js";import{getOrCreateMapValue as s}from"../../../core/MapUtils.js";import{whenOrAbort as o}from"../../../core/promiseUtils.js";import i from"../../../core/ReactiveMap.js";import{property as n,subclass as l}from"../../../core/accessorSupport/decorators.js";import{DateOnly as u}from"../../../core/sql/DateOnly.js";import{TimeOnly as c}from"../../../core/sql/TimeOnly.js";import{makeUseId as p}from"../inputs/support/inputUtils.js";import{isGroupElementTemplate as d,isFieldElementTemplate as f}from"../templates/support/templateUtils.js";let h=null,m=class extends t{constructor(e){super(e),this.calculating=!1,this.arcadeContext=null,this._abortController=new AbortController,this.layerExpressionsModelMap=new Map,this.evaluatedExpressions=new i,this.expressionEvaluationFailed=!1}abort(){this._abortController.abort()}async runAllExpressions(e,t=!1){return this._evaluateSpecifiedComponentsForEachFeature(e,v,t)}async runGeometryDependentExpressions(e,t=!1){return this._evaluateSpecifiedComponentsForEachFeature(e,x,t)}async valueChanged(e,t,r=!0){try{this.calculating=!0;const a=t.map(t=>this.evaluateValueChangedForFeature(e,t,r));await Promise.all(a)}catch(s){a.getLogger(this).error(s),this.expressionEvaluationFailed=!0}finally{this.calculating=!1}}async evaluateValueChangedForFeature(e,t,r){if(this._abortController.signal.aborted)return;const a=this.layerExpressionsModelMap.get(t.layer);if(!a||0===a.components.length)return;const s=new Set,o=new Set([e]),i=new Set;for(;o.size>0;){const[e]=o;if(o.delete(e),s.has(e))continue;s.add(e);const n=a.fieldReferencesMap.get(e.toLowerCase());if(!n)continue;for(const t of n)i.has(t)&&n.delete(t);if(0===n.size)continue;const l=new Set;await this.evaluateAffectedComponents([...n],t,a,r,l);for(const t of n)i.add(t);for(const t of l)s.has(t)||o.add(t)}}async evaluateAffectedComponents(e,t,r,a,s){const o=new Map;for(const n of e)o.has(n)||o.set(n,this.createSccEvaluator(n,t,o,r));if(0===o.size)return;const i=[...o.values()].map(e=>e.evaluate(a,s));await Promise.all(i)}createSccEvaluator(e,t,r,a){const o=new g(e,t,this.arcadeContext,a,this.evaluatedExpressions,this._abortController);for(const i of e.adjacencyList)o.dependentEvaluators.push(s(r,i,()=>this.createSccEvaluator(i,t,r,a)));return o}async _evaluateSpecifiedComponentsForEachFeature(e,t,r=!1){this.calculating=!0;try{const a=[];for(const s of e){const e=this.layerExpressionsModelMap.get(s.layer);if(!e||0===e.components.length)continue;const o=new Set;a.push(this.evaluateAffectedComponents(t(e),s,e,r,o))}await o(Promise.all(a),this._abortController)}catch(s){a.getLogger(this).error(s),this.expressionEvaluationFailed=!0}finally{this.calculating=!1}}};e([n()],m.prototype,"calculating",void 0),e([n({constructOnly:!0})],m.prototype,"arcadeContext",void 0),e([n()],m.prototype,"_abortController",void 0),e([n()],m.prototype,"layerExpressionsModelMap",void 0),e([n()],m.prototype,"evaluatedExpressions",void 0),e([n()],m.prototype,"expressionEvaluationFailed",void 0),m=e([l("esri.widgets.BatchAttributeForm.expressions.ExpressionsManager")],m);class g{constructor(e,t,r,a,s,o){this.scc=e,this.feature=t,this.arcadeContextInfo=r,this.expressionsModel=a,this.evaluatedExpressions=s,this._abortController=o,this.dependentEvaluators=[],this._evaluatorPromise=null}get baseContext(){const{editType:e,map:t,spatialReference:r,timeZone:a}=this.arcadeContextInfo,s=this.feature.layer,o="scene"===s?.type&&null!=s.associatedLayer?s.associatedLayer:s;return{variables:{$originalfeature:this.feature.original,$editcontext:{editType:e},$layer:o,$featureset:o,$datastore:o?.url,$feature:this.feature.plainGraphic,$map:t},executeContext:{rawOutput:!0,spatialReference:r??void 0,timeZone:a,abortSignal:this._abortController.signal}}}evaluate(e,t){return null==this._evaluatorPromise&&(this._evaluatorPromise=this._evaluate(e,t)),this._evaluatorPromise}async _evaluate(e,t){null===h&&(h=await import("../../../arcade/languageUtils.js"));const a=this.dependentEvaluators.map(r=>r.evaluate(e,t));await o(Promise.all(a),this._abortController);for(const o of this.scc.executors){const a=this.baseContext;if(this._abortController.signal.aborted)break;const l=this.expressionsModel.arcadeExecutorUses.get(o)??[],u=s(this.evaluatedExpressions,this.feature,()=>new i);let c=null,h=null;try{c=o.isAsync?await o.executeAsync(a.variables,a.executeContext):o.execute(a.variables,a.executeContext),h={result:c,status:"success"}}catch(n){h={error:n,status:"error"}}for(const r of l){const a=this.expressionsModel.elementTemplateMap.get(r.elementId);switch(r.executorPurpose){case"editable":case"required":u.set(p(r.elementId,r.executorPurpose),h);break;case"value":{if("error"===h?.status)continue;const e=a.getExpressionExecutorsForLayer(this.feature.layer);let r=!0;if(e?.editableExpression&&(r=!1===u.get(p(a.elementId,"editable"))?.result),r){const e=this.feature.getAttribute(a.fieldName)??null,r=y(h.result,this.feature,a.fieldName,this.arcadeContextInfo.timeZone);r!==e&&(this.feature.setAttribute(a.fieldName,r),t.add(a.fieldName))}}break;case"visibility":if(u.set(p(r.elementId,r.executorPurpose),h),!this.expressionsModel.preserveFieldValuesWhenHidden&&!1===h.result&&e)if(d(a)){for(const e of a.elements)if(f(e)){null!==this.feature.getAttribute(e.fieldName)&&t.add(e.fieldName),this.feature.setAttribute(e.fieldName,null)}}else if(f(a)){null!==this.feature.getAttribute(a.fieldName)&&t.add(a.fieldName),this.feature.setAttribute(a.fieldName,null)}}}if("error"===h?.status){const e=new Set;for(const t of l){const r=this.expressionsModel.elementTemplateMap.get(t.elementId);if(r)switch(t.executorPurpose){case"editable":e.add(r.label+" - Editable expression");break;case"required":e.add(r.label+" - Required expression");break;case"value":e.add(r.label+" - Value expression");break;case"visibility":e.add(r.label+" - Visibility expression")}}if(e.size>0)throw new r("expression-evaluation-failed","Arcade evaluation failed ("+[...e].join(",")+")");throw new r("expression-evaluation-failed","Arcade evaluation failed ")}}}}function y(e,t,a,s){if(null===e)return null;const o=t.layer.fieldsIndex.get(a);if(!o)throw new r("field-not-found","Unable set field value as the field cannot be found. ("+a+")");switch(o.type){case"big-integer":case"integer":case"long":case"oid":case"small-integer":case"single":case"double":return h.toNumber(e);case"global-id":case"guid":case"string":return h.toString(e);case"date":{if(h.isDate(e))return e.getTime();const t=h.toDate(e,s);if(!t)throw new r("unsupported-value-type","Arcade return type is not a supported field type. ("+a+")");return t.getTime()}case"date-only":{if(h.isDateOnly(e))return e.toStorageFormat();if(h.isDate(e))return u.fromDateTime(e.toDateTime()).toStorageFormat();const t=u.fromString(h.toString(e));if(!t)throw new r("unsupported-value-type","Arcade return type is not a supported field type.");return t.toStorageFormat()}case"time-only":{if(h.isTime(e))return e.toStorageString();if(h.isDate(e)){return c.fromDateTime(e.toDateTime()).toStorageString()}const t=c.fromString(h.toString(e));if(!t)throw new r("unsupported-value-type","Arcade return type is not a supported field type.");return t.toStorageString()}case"timestamp-offset":{if(h.isDate(e))return e.toISOString(!1);const t=h.toDate(e,s);if(!t)throw new r("unsupported-value-type","Arcade return type is not a supported field type. ("+a+")");return t.toISOString(!1)}}throw new r("unsupported-value-type","Arcade return type is not a supported field type. ("+a+")")}function v(e){return e.components}function x(e){return Array.from(e.geometryReferences)}export{m as ExpressionsManager};
2
+ import{__decorate as e}from"tslib";import t from"../../../core/Accessor.js";import r from"../../../core/Error.js";import a from"../../../core/Logger.js";import{getOrCreateMapValue as s}from"../../../core/MapUtils.js";import{whenOrAbort as o}from"../../../core/promiseUtils.js";import i from"../../../core/ReactiveMap.js";import{property as n,subclass as l}from"../../../core/accessorSupport/decorators.js";import{DateOnly as u}from"../../../core/sql/DateOnly.js";import{TimeOnly as c}from"../../../core/sql/TimeOnly.js";import{makeUseId as p}from"../inputs/support/inputUtils.js";import{isGroupElementTemplate as d,isFieldElementTemplate as f}from"../templates/support/templateUtils.js";let h=null,m=class extends t{constructor(e){super(e),this.calculating=!1,this.arcadeContext=null,this._abortController=new AbortController,this.layerExpressionsModelMap=new Map,this.evaluatedExpressions=new i,this.expressionEvaluationFailed=!1}abort(){this._abortController.abort()}async runAllExpressions(e,t=!1){return this._evaluateSpecifiedComponentsForEachFeature(e,v,t)}async runGeometryDependentExpressions(e,t=!1){return this._evaluateSpecifiedComponentsForEachFeature(e,x,t)}async valueChanged(e,t,r=!0){try{this.calculating=!0;const a=t.map(t=>this.evaluateValueChangedForFeature(e,t,r));await Promise.all(a)}catch(s){a.getLogger(this).error(s),this.expressionEvaluationFailed=!0}finally{this.calculating=!1}}async evaluateValueChangedForFeature(e,t,r){if(this._abortController.signal.aborted)return;const a=this.layerExpressionsModelMap.get(t.layer);if(!a||0===a.components.length)return;const s=new Set,o=new Set([e]),i=new Set;for(;o.size>0;){const[e]=o;if(o.delete(e),s.has(e))continue;s.add(e);const n=a.fieldReferencesMap.get(e.toLowerCase());if(!n)continue;for(const t of n)i.has(t)&&n.delete(t);if(0===n.size)continue;const l=new Set;await this.evaluateAffectedComponents([...n],t,a,r,l);for(const t of n)i.add(t);for(const t of l)s.has(t)||o.add(t)}}async evaluateAffectedComponents(e,t,r,a,s){const o=new Map;for(const n of e)o.has(n)||o.set(n,this.createSccEvaluator(n,t,o,r));if(0===o.size)return;const i=[...o.values()].map(e=>e.evaluate(a,s));await Promise.all(i)}createSccEvaluator(e,t,r,a){const o=new g(e,t,this.arcadeContext,a,this.evaluatedExpressions,this._abortController);for(const i of e.adjacencyList)o.dependentEvaluators.push(s(r,i,()=>this.createSccEvaluator(i,t,r,a)));return o}async _evaluateSpecifiedComponentsForEachFeature(e,t,r=!1){this.calculating=!0;try{const a=[];for(const s of e){const e=this.layerExpressionsModelMap.get(s.layer);if(!e||0===e.components.length)continue;const o=new Set;a.push(this.evaluateAffectedComponents(t(e),s,e,r,o))}await o(Promise.all(a),this._abortController)}catch(s){a.getLogger(this).error(s),this.expressionEvaluationFailed=!0}finally{this.calculating=!1}}};e([n()],m.prototype,"calculating",void 0),e([n({constructOnly:!0})],m.prototype,"arcadeContext",void 0),e([n()],m.prototype,"_abortController",void 0),e([n()],m.prototype,"layerExpressionsModelMap",void 0),e([n()],m.prototype,"evaluatedExpressions",void 0),e([n()],m.prototype,"expressionEvaluationFailed",void 0),m=e([l("esri.widgets.BatchAttributeForm.expressions.ExpressionsManager")],m);class g{constructor(e,t,r,a,s,o){this.scc=e,this.feature=t,this.arcadeContextInfo=r,this.expressionsModel=a,this.evaluatedExpressions=s,this._abortController=o,this.dependentEvaluators=[],this._evaluatorPromise=null}get baseContext(){const{editType:e,map:t,spatialReference:r,timeZone:a}=this.arcadeContextInfo,s=this.feature.layer,o="scene"===s?.type&&null!=s.associatedLayer?s.associatedLayer:s;return{variables:{$originalfeature:this.feature.original,$editcontext:{editType:e},$layer:o,$featureset:o,$datastore:o?.url,$feature:this.feature.plainGraphic,$map:t},executeContext:{rawOutput:!0,spatialReference:r??void 0,timeZone:a,abortSignal:this._abortController.signal}}}evaluate(e,t){return null==this._evaluatorPromise&&(this._evaluatorPromise=this._evaluate(e,t)),this._evaluatorPromise}async _evaluate(e,t){null===h&&(h=await import("../../../arcade/languageUtils.js"));const a=this.dependentEvaluators.map(r=>r.evaluate(e,t));await o(Promise.all(a),this._abortController);for(const o of this.scc.executors){const a=this.baseContext;if(this._abortController.signal.aborted)break;const l=this.expressionsModel.arcadeExecutorUses.get(o)??[],u=s(this.evaluatedExpressions,this.feature,()=>new i);let c=null,h=null;try{c=o.isAsync?await o.executeAsync(a.variables,a.executeContext):o.execute(a.variables,a.executeContext),h={result:c,status:"success"}}catch(n){h={error:n,status:"error"}}for(const r of l){const a=this.expressionsModel.elementTemplateMap.get(r.elementId);switch(r.executorPurpose){case"editable":case"required":case"text":u.set(p(r),h);break;case"value":{if("error"===h?.status)continue;const e=a.getExpressionExecutorsForLayer(this.feature.layer);let r=!0;if(e?.editableExpression&&(r=!1===u.get(p({elementId:a.elementId,executorPurpose:"editable"}))?.result),r){const e=this.feature.getAttribute(a.fieldName)??null,r=y(h.result,this.feature,a.fieldName,this.arcadeContextInfo.timeZone);r!==e&&(this.feature.setAttribute(a.fieldName,r),t.add(a.fieldName))}}break;case"visibility":if(u.set(p(r),h),!this.expressionsModel.preserveFieldValuesWhenHidden&&!1===h.result&&e)if(d(a)){for(const e of a.elements)if(f(e)){null!==this.feature.getAttribute(e.fieldName)&&t.add(e.fieldName),this.feature.setAttribute(e.fieldName,null)}}else if(f(a)){null!==this.feature.getAttribute(a.fieldName)&&t.add(a.fieldName),this.feature.setAttribute(a.fieldName,null)}}}if("error"===h?.status){const e=new Set;for(const t of l){const r=this.expressionsModel.elementTemplateMap.get(t.elementId);if(r)switch(t.executorPurpose){case"editable":e.add(r.label+" - Editable expression");break;case"required":e.add(r.label+" - Required expression");break;case"value":e.add(r.label+" - Value expression");break;case"visibility":e.add(r.label+" - Visibility expression")}}if(e.size>0)throw new r("expression-evaluation-failed","Arcade evaluation failed ("+[...e].join(",")+")");throw new r("expression-evaluation-failed","Arcade evaluation failed ")}}}}function y(e,t,a,s){if(null===e)return null;const o=t.layer.fieldsIndex.get(a);if(!o)throw new r("field-not-found","Unable set field value as the field cannot be found. ("+a+")");switch(o.type){case"big-integer":case"integer":case"long":case"oid":case"small-integer":case"single":case"double":return h.toNumber(e);case"global-id":case"guid":case"string":return h.toString(e);case"date":{if(h.isDate(e))return e.getTime();const t=h.toDate(e,s);if(!t)throw new r("unsupported-value-type","Arcade return type is not a supported field type. ("+a+")");return t.getTime()}case"date-only":{if(h.isDateOnly(e))return e.toStorageFormat();if(h.isDate(e))return u.fromDateTime(e.toDateTime()).toStorageFormat();const t=u.fromString(h.toString(e));if(!t)throw new r("unsupported-value-type","Arcade return type is not a supported field type.");return t.toStorageFormat()}case"time-only":{if(h.isTime(e))return e.toStorageString();if(h.isDate(e)){return c.fromDateTime(e.toDateTime()).toStorageString()}const t=c.fromString(h.toString(e));if(!t)throw new r("unsupported-value-type","Arcade return type is not a supported field type.");return t.toStorageString()}case"timestamp-offset":{if(h.isDate(e))return e.toISOString(!1);const t=h.toDate(e,s);if(!t)throw new r("unsupported-value-type","Arcade return type is not a supported field type. ("+a+")");return t.toISOString(!1)}}throw new r("unsupported-value-type","Arcade return type is not a supported field type. ("+a+")")}function v(e){return e.components}function x(e){return Array.from(e.geometryReferences)}export{m as ExpressionsManager};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import{isSome as e,pushIfSome as t}from"../../../core/arrayUtils.js";import{getOrCreateMapValue as n}from"../../../core/MapUtils.js";import o from"../../../core/Queue.js";import{addMany as s,last as r}from"../../../core/SetUtils.js";import{isFieldElementTemplate as i}from"../templates/support/templateUtils.js";let c=0;class a{constructor(e){this.arcadeExecutorUses=new Map,this.components=[],this.preserveFieldValuesWhenHidden=!1,this.executorMap=e.executorMap,this.preserveFieldValuesWhenHidden=!0===e.preserveFieldValuesWhenHidden,this.elementTemplateMap=new Map;for(const t of this.executorMap.keys())this.elementTemplateMap.set(t.elementId,t);this._buildDependencyGraph()}_buildDependencyGraph(){const e=f(this.executorMap),t={components:[],arcadeExecutorUses:this.arcadeExecutorUses,elementTemplatesById:new Map([...this.executorMap.keys()].map(e=>[e.elementId,e])),executorMap:this.executorMap,fieldElementTemplateMap:u(this.executorMap),fieldReferencesMap:new Map,geometryReferences:new Set,nextIndex:0,nodeInfoMap:e,nodeStack:new o(r),shouldConsiderVisibility:!this.preserveFieldValuesWhenHidden};for(const o of this.executorMap.keys()){const e=this.executorMap.get(o);e.editableExpression&&n(this.arcadeExecutorUses,e.editableExpression,()=>[]).push({elementId:o.elementId,executorPurpose:"editable"}),e.valueExpression&&n(this.arcadeExecutorUses,e.valueExpression,()=>[]).push({elementId:o.elementId,executorPurpose:"value"}),e?.visibilityExpression&&n(this.arcadeExecutorUses,e.visibilityExpression,()=>[]).push({elementId:o.elementId,executorPurpose:"visibility"}),e?.requiredExpression&&n(this.arcadeExecutorUses,e.requiredExpression,()=>[]).push({elementId:o.elementId,executorPurpose:"required"})}for(const n of this.arcadeExecutorUses.values())n.sort(e=>"editable"===e.executorPurpose?-1:1);for(const n of e.values())-1===n.index&&p(n,t);this.dependencyGraphComponents=m(t.nodeInfoMap),this.fieldReferencesMap=x(t),this.geometryReferences=h(t),this.components=t.components}}function p(e,t){e.index=e.lowlink=t.nextIndex++,t.nodeStack.push(e);for(const n of l(e,t))-1===n.index?(p(n,t),e.lowlink=Math.min(e.lowlink,n.lowlink)):n.index<e.index&&t.nodeStack.contains(n)&&(e.lowlink=Math.min(e.lowlink,n.index)),t.nodeStack.contains(n)||e.crossLinkNeighbors.add(n);if(e.lowlink===e.index){const n=y();for(t.components.push(n);w(t.nodeStack)>=e.index;){const e=t.nodeStack.pop();if(null!=e){e.component=n,n.executors.add(e.executor);for(const t of e.crossLinkNeighbors)null!=t.component&&n.adjacencyList.add(t.component)}}}}function l({executor:t},o){const r=new Set;for(const e of t.fieldsUsed){const i=e.toLowerCase();n(o.fieldReferencesMap,i,()=>new Set).add(t),s(r,d(i,o))}t.geometryUsed&&o.geometryReferences.add(t);const i=o.arcadeExecutorUses.get(t)?.filter(e=>"value"===e.executorPurpose)??[];for(const e of i){const n=o.executorMap.get(o.elementTemplatesById.get(e.elementId));n?.editableExpression&&n.editableExpression!==t&&r.add(n.editableExpression)}return Array.from(r).map(e=>o.nodeInfoMap.get(e)).filter(e)}function d(e,{executorMap:n,fieldElementTemplateMap:o,shouldConsiderVisibility:s}){const r=[],i=o.get(e);if(null==i)return r;const c=n.get(i);if(null==c)return r;if(t(r,c.editableExpression),t(r,c.valueExpression),s){t(r,c?.visibilityExpression);const{group:e}=i;if(null!=e){const o=n.get(e)?.visibilityExpression;t(r,o)}}return r}function u(e){const t=new Map;for(const n of e.keys())i(n)&&t.set(n.fieldName.toLowerCase(),n);return t}function f(t){const n=Array.from(t.values()).filter(e),o=new Set(n.flatMap(e=>Array.from(Object.values(e)))),s=Array.from(o).map(e=>({component:null,crossLinkNeighbors:new Set,executor:e,index:-1,lowlink:-1,onStack:!1}));return new Map(s.map(e=>[e.executor,e]))}function m(e){return new Map([...e.values()].map(({component:e,executor:t})=>[t,e]))}function x({fieldReferencesMap:e,nodeInfoMap:t}){const n=new Map;for(const[o,s]of e.entries())n.set(o,M(s,t));return n}function h({geometryReferences:e,nodeInfoMap:t}){return M(e,t)}function M(e,t){const n=new Set;for(const o of e){const e=t.get(o);e?.component&&n.add(e.component)}return n}function y(){c++;const e=c.toString();return{executors:new Set,adjacencyList:new Set,componentId:e}}function w(e){return e.peek()?.index??-1}export{a as ExpressionsModel,l as getDirectDependencies};
2
+ import{isSome as e,addMany as t,pushIfSome as n}from"../../../core/arrayUtils.js";import{getOrCreateMapValue as o}from"../../../core/MapUtils.js";import s from"../../../core/Queue.js";import{addMany as r,last as i}from"../../../core/SetUtils.js";import{isFieldElementTemplate as c}from"../templates/support/templateUtils.js";let a=0;class p{constructor(e){this.arcadeExecutorUses=new Map,this.components=[],this.preserveFieldValuesWhenHidden=!1,this.executorMap=e.executorMap,this.preserveFieldValuesWhenHidden=!0===e.preserveFieldValuesWhenHidden,this.elementTemplateMap=new Map;for(const t of this.executorMap.keys())this.elementTemplateMap.set(t.elementId,t);this._buildDependencyGraph()}_buildDependencyGraph(){const e=f(this.executorMap),t={components:[],arcadeExecutorUses:this.arcadeExecutorUses,elementTemplatesById:new Map([...this.executorMap.keys()].map(e=>[e.elementId,e])),executorMap:this.executorMap,fieldElementTemplateMap:x(this.executorMap),fieldReferencesMap:new Map,geometryReferences:new Set,nextIndex:0,nodeInfoMap:e,nodeStack:new s(i),shouldConsiderVisibility:!this.preserveFieldValuesWhenHidden};for(const n of this.executorMap.keys()){const e=this.executorMap.get(n);e.editableExpression&&o(this.arcadeExecutorUses,e.editableExpression,()=>[]).push({elementId:n.elementId,executorPurpose:"editable"}),e.valueExpression&&o(this.arcadeExecutorUses,e.valueExpression,()=>[]).push({elementId:n.elementId,executorPurpose:"value"}),e.visibilityExpression&&o(this.arcadeExecutorUses,e.visibilityExpression,()=>[]).push({elementId:n.elementId,executorPurpose:"visibility"}),e.requiredExpression&&o(this.arcadeExecutorUses,e.requiredExpression,()=>[]).push({elementId:n.elementId,executorPurpose:"required"}),e.textExpressions&&e.textExpressions.forEach((e,t)=>{o(this.arcadeExecutorUses,e,()=>[]).push({elementId:n.elementId,executorPurpose:"text",textExpressionIndex:t})})}for(const n of this.arcadeExecutorUses.values())n.sort(e=>"editable"===e.executorPurpose?-1:1);for(const n of e.values())-1===n.index&&d(n,t);this.dependencyGraphComponents=m(t.nodeInfoMap),this.fieldReferencesMap=h(t),this.geometryReferences=M(t),this.components=t.components}}function d(e,t){e.index=e.lowlink=t.nextIndex++,t.nodeStack.push(e);for(const n of l(e,t))-1===n.index?(d(n,t),e.lowlink=Math.min(e.lowlink,n.lowlink)):n.index<e.index&&t.nodeStack.contains(n)&&(e.lowlink=Math.min(e.lowlink,n.index)),t.nodeStack.contains(n)||e.crossLinkNeighbors.add(n);if(e.lowlink===e.index){const n=y();for(t.components.push(n);w(t.nodeStack)>=e.index;){const e=t.nodeStack.pop();if(null!=e){e.component=n,n.executors.add(e.executor);for(const t of e.crossLinkNeighbors)null!=t.component&&n.adjacencyList.add(t.component)}}}}function l({executor:t},n){const s=new Set;for(const e of t.fieldsUsed){const i=e.toLowerCase();o(n.fieldReferencesMap,i,()=>new Set).add(t),r(s,u(i,n))}t.geometryUsed&&n.geometryReferences.add(t);const i=n.arcadeExecutorUses.get(t)?.filter(e=>"value"===e.executorPurpose)??[];for(const e of i){const o=n.executorMap.get(n.elementTemplatesById.get(e.elementId));o?.editableExpression&&o.editableExpression!==t&&s.add(o.editableExpression)}return Array.from(s).map(e=>n.nodeInfoMap.get(e)).filter(e)}function u(e,{executorMap:t,fieldElementTemplateMap:o,shouldConsiderVisibility:s}){const r=[],i=o.get(e);if(null==i)return r;const c=t.get(i);if(null==c)return r;if(n(r,c.editableExpression),n(r,c.valueExpression),s){n(r,c.visibilityExpression);const{group:e}=i;if(null!=e){const o=t.get(e)?.visibilityExpression;n(r,o)}}return r}function x(e){const t=new Map;for(const n of e.keys())c(n)&&t.set(n.fieldName.toLowerCase(),n);return t}function f(n){const o=Array.from(n.values()).filter(e),s=new Set(o.flatMap(e=>{const{textExpressions:n,...o}=e,s=[];return n?.length&&t(s,n),t(s,Object.values(o)),s})),r=Array.from(s).map(e=>({component:null,crossLinkNeighbors:new Set,executor:e,index:-1,lowlink:-1,onStack:!1}));return new Map(r.map(e=>[e.executor,e]))}function m(e){return new Map([...e.values()].map(({component:e,executor:t})=>[t,e]))}function h({fieldReferencesMap:e,nodeInfoMap:t}){const n=new Map;for(const[o,s]of e.entries())n.set(o,E(s,t));return n}function M({geometryReferences:e,nodeInfoMap:t}){return E(e,t)}function E(e,t){const n=new Set;for(const o of e){const e=t.get(o);e?.component&&n.add(e.component)}return n}function y(){a++;const e=a.toString();return{executors:new Set,adjacencyList:new Set,componentId:e}}function w(e){return e.peek()?.index??-1}export{p as ExpressionsModel,l as getDirectDependencies};
@@ -10,7 +10,7 @@ import type { FieldInputDataTypes } from "../../support/forms/types.js";
10
10
  export interface FieldInputProperties extends EditableInputProperties {}
11
11
 
12
12
  /**
13
- * This is a read-only support class that represents a field input in a [BatchAttributeForm](https://developers.arcgis.com/javascript/latest/references/core/widgets/BatchAttributeForm/).
13
+ * This is a read-only support class that represents a [field element](https://developers.arcgis.com/javascript/latest/references/core/form/elements/FieldElement/) in a [BatchAttributeForm](https://developers.arcgis.com/javascript/latest/references/core/widgets/BatchAttributeForm/).
14
14
  *
15
15
  * @since 4.33
16
16
  * @see [BatchAttributeForm](https://developers.arcgis.com/javascript/latest/references/core/widgets/BatchAttributeForm/)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../core/Accessor.js";import i from"../../../core/Collection.js";import{property as s,subclass as r}from"../../../core/accessorSupport/decorators.js";import{isAttributeFormSupportedLayerUnion as o}from"../batchAttributeFormUtils.js";import{visibilityCodeToBoolean as l,makeUseId as a}from"./support/inputUtils.js";let n=class extends t{constructor(e){super(e),this.existsInAllLayers=!0,this.features=new i}get description(){return this.template.description}get featuresHaveSameCalculatedVisibility(){const e=new Set;for(const t of this.features){if(null==this.template.getExpressionExecutorsForLayer(t.layer)?.visibilityExpression){e.add(!0);continue}const i=this._lookupEvaluatedExpression(t,"visibility");if("success"===i?.status){if(e.add(!0===i.result),e.size>1)return!1}else e.add(!1)}return e.size<=1}get updating(){return!1}get label(){return this.template.label}get layers(){return Array.from(new Set(this.features.map(e=>e.layer).filter(o)))}get visibilityCode(){return this._baseVisibilityCode}get visible(){return l(this.visibilityCode)}get _baseVisibilityCode(){return this.existsInAllLayers?this.featuresHaveSameCalculatedVisibility?!1===this._evaluatedVisibilityExpression?"hidden:visibility-expression:all-features":"visible":"hidden:visibility-expression:some-features":"hidden:not-in-all-layers"}get _evaluatedVisibilityExpression(){let e=!0,t=!0;for(const i of this.features){if(null==this.template.getExpressionExecutorsForLayer(i.layer)?.visibilityExpression){e=e&&!0;continue}t=!1;const s=this._lookupEvaluatedExpression(i,"visibility");"success"===s?.status?e=e&&!0===s.result:e=!1}return t?null:e}_lookupEvaluatedExpression(e,t){return this.expressionsManager.evaluatedExpressions.get(e)?.get(a(this.template.elementId,t))}};e([s({constructOnly:!0})],n.prototype,"expressionsManager",void 0),e([s()],n.prototype,"description",null),e([s()],n.prototype,"existsInAllLayers",void 0),e([s()],n.prototype,"features",void 0),e([s()],n.prototype,"featuresHaveSameCalculatedVisibility",null),e([s()],n.prototype,"updating",null),e([s()],n.prototype,"label",null),e([s()],n.prototype,"layers",null),e([s({constructOnly:!0})],n.prototype,"template",void 0),e([s()],n.prototype,"visibilityCode",null),e([s()],n.prototype,"visible",null),e([s()],n.prototype,"_baseVisibilityCode",null),e([s()],n.prototype,"_evaluatedVisibilityExpression",null),n=e([r("esri.widgets.BatchAttributeForm.inputs.InputBase")],n);const p=n;export{p as default};
2
+ import{__decorate as e}from"tslib";import t from"../../../core/Accessor.js";import i from"../../../core/Collection.js";import{property as s,subclass as r}from"../../../core/accessorSupport/decorators.js";import{isAttributeFormSupportedLayerUnion as o}from"../batchAttributeFormUtils.js";import{visibilityCodeToBoolean as l,makeUseId as a}from"./support/inputUtils.js";let n=class extends t{constructor(e){super(e),this.existsInAllLayers=!0,this.features=new i}get description(){return this.template.description}get featuresHaveSameCalculatedVisibility(){const e=new Set;for(const t of this.features){if(null==this.template.getExpressionExecutorsForLayer(t.layer)?.visibilityExpression){e.add(!0);continue}const i=this._lookupEvaluatedExpression(t,"visibility");if("success"===i?.status){if(e.add(!0===i.result),e.size>1)return!1}else e.add(!1)}return e.size<=1}get label(){return this.template.label}get layers(){return Array.from(new Set(this.features.map(e=>e.layer).filter(o)))}get visibilityCode(){return this._baseVisibilityCode}get visible(){return l(this.visibilityCode)}get _baseVisibilityCode(){return this.existsInAllLayers?this.featuresHaveSameCalculatedVisibility?!1===this._evaluatedVisibilityExpression?"hidden:visibility-expression:all-features":"visible":"hidden:visibility-expression:some-features":"hidden:not-in-all-layers"}get _evaluatedVisibilityExpression(){let e=!0,t=!0;for(const i of this.features){if(null==this.template.getExpressionExecutorsForLayer(i.layer)?.visibilityExpression){e=e&&!0;continue}t=!1;const s=this._lookupEvaluatedExpression(i,"visibility");"success"===s?.status?e=e&&!0===s.result:e=!1}return t?null:e}_lookupEvaluatedExpression(e,t,i){return this.expressionsManager.evaluatedExpressions.get(e)?.get(a({elementId:this.template.elementId,executorPurpose:t,textExpressionIndex:i}))}};e([s({constructOnly:!0})],n.prototype,"expressionsManager",void 0),e([s()],n.prototype,"description",null),e([s()],n.prototype,"existsInAllLayers",void 0),e([s()],n.prototype,"features",void 0),e([s()],n.prototype,"featuresHaveSameCalculatedVisibility",null),e([s()],n.prototype,"label",null),e([s()],n.prototype,"layers",null),e([s({constructOnly:!0})],n.prototype,"template",void 0),e([s()],n.prototype,"visibilityCode",null),e([s()],n.prototype,"visible",null),e([s()],n.prototype,"_baseVisibilityCode",null),e([s()],n.prototype,"_evaluatedVisibilityExpression",null),n=e([r("esri.widgets.BatchAttributeForm.inputs.InputBase")],n);const p=n;export{p as default};
@@ -1,13 +1,12 @@
1
1
  import type GroupInput from "./GroupInput.js";
2
2
  import type SingleFeatureInput from "./SingleFeatureInput.js";
3
- import type { TextFormatType } from "../../../portal/jsonTypes.js";
4
3
  import type { SingleFeatureInputProperties } from "./SingleFeatureInput.js";
5
4
 
6
5
  /** @since 5.0 */
7
6
  export interface TextElementInputProperties extends SingleFeatureInputProperties {}
8
7
 
9
8
  /**
10
- * A read-only class used within the [BatchAttributeForm](https://developers.arcgis.com/javascript/latest/references/core/widgets/BatchAttributeForm/).
9
+ * This is a read-only support class that represents a [text element](https://developers.arcgis.com/javascript/latest/references/core/form/elements/TextElement/) in a [BatchAttributeForm](https://developers.arcgis.com/javascript/latest/references/core/widgets/BatchAttributeForm/).
11
10
  *
12
11
  * @since 5.0
13
12
  * @see [BatchAttributeForm](https://developers.arcgis.com/javascript/latest/references/core/widgets/BatchAttributeForm/)
@@ -23,19 +22,11 @@ export default class TextElementInput extends SingleFeatureInput<any> {
23
22
  */
24
23
  get group(): GroupInput | null;
25
24
  /**
26
- * The processed text, compiled and with template parameters replaced with
27
- * values.
25
+ * The processed text, compiled and with expressions replaced with values.
28
26
  *
29
27
  * @since 5.0
30
28
  */
31
29
  get text(): string;
32
- /**
33
- * Defines the format of the `text` property.
34
- *
35
- * @default "plain-text"
36
- * @since 5.0
37
- */
38
- get textFormat(): TextFormatType;
39
30
  /**
40
31
  * The type of input.
41
32
  *
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import{renderingSanitizer as e}from"../../../core/sanitizerUtils.js";import{property as o,subclass as s}from"../../../core/accessorSupport/decorators.js";import{UpdatingHandles as r}from"../../../core/support/UpdatingHandles.js";import p from"./SingleFeatureInput.js";import{compileTextElementMarkdownToHTML as i}from"./support/textInputElementUtils.js";let a=class extends p{constructor(t){super(t),this.group=null,this.type="text",this._tempTextNoEvaluatedExpressions="",this._updatingHandles=new r}initialize(){const{rawText:t}=this;t?"markdown"===this.textFormat?this._updatingHandles.addPromise(i(t).then(t=>{this._tempTextNoEvaluatedExpressions=t})):this._tempTextNoEvaluatedExpressions=t:this._tempTextNoEvaluatedExpressions=""}get rawText(){return this.template.text}get text(){return e.sanitize(this._tempTextNoEvaluatedExpressions)}get textFormat(){return this.template.textFormat}get updating(){return this._updatingHandles.updating}};t([o()],a.prototype,"group",void 0),t([o()],a.prototype,"rawText",null),t([o()],a.prototype,"text",null),t([o()],a.prototype,"textFormat",null),t([o()],a.prototype,"type",void 0),t([o()],a.prototype,"updating",null),t([o()],a.prototype,"_tempTextNoEvaluatedExpressions",void 0),a=t([s("esri.widgets.BatchAttributeForm.inputs.TextElementInput")],a);const n=a;export{n as default};
2
+ import{__decorate as t}from"tslib";import{renderingSanitizer as e}from"../../../core/sanitizerUtils.js";import{property as s,subclass as r}from"../../../core/accessorSupport/decorators.js";import o from"./SingleFeatureInput.js";import{assembleStringFromParts as i}from"./support/textElementInputUtils.js";let p=class extends o{constructor(t){super(t),this.group=null,this.type="text"}get text(){const{expressionParts:t,literalParts:s}=this.template,r=this.feature;if(!r)return e.sanitize(s.join(" "));const o=[];for(let e=0;e<t.length;e++){const t=this._lookupEvaluatedExpression(r,"text",e);"success"===t?.status?o.push(`${t.result}`):o.push("")}return e.sanitize(i(s,o))}};t([s()],p.prototype,"group",void 0),t([s()],p.prototype,"text",null),t([s()],p.prototype,"type",void 0),p=t([r("esri.widgets.BatchAttributeForm.inputs.TextElementInput")],p);const u=p;export{u as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- const t="esri_BatchAttributeForm_different_values";function n(t){return"visible"===t}function e(t){return"field"===t.type}function r(t){return"group"===t.type}function u(t){return"text"===t.type}function o(t,n){return`${t}:${n}`}const i=t=>null!=t&&(c(t,"combo-box")||c(t,"radio-buttons"));function c(t,n){return t?.type===n}export{t as differentValuesString,e as isFieldInput,i as isFieldInputWithShowNoValueOptionInput,r as isGroupInput,c as isInputWithInputType,u as isTextElementInput,o as makeUseId,n as visibilityCodeToBoolean};
2
+ const t="esri_BatchAttributeForm_different_values";function e(t){return"visible"===t}function n(t){return"field"===t.type}function r(t){return"group"===t.type}function o(t){return"text"===t.type}function u(t){const e=`${t.elementId}:${t.executorPurpose}`;return null!=t.textExpressionIndex?`${e}:${t.textExpressionIndex}`:e}const i=t=>null!=t&&(c(t,"combo-box")||c(t,"radio-buttons"));function c(t,e){return t?.type===e}export{t as differentValuesString,n as isFieldInput,i as isFieldInputWithShowNoValueOptionInput,r as isGroupInput,c as isInputWithInputType,o as isTextElementInput,u as makeUseId,e as visibilityCodeToBoolean};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
+ function t(t,c){return c.reduce((c,n,a)=>c.concat(t.at(a),n),"").concat(t.at(-1))}export{t as assembleStringFromParts};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import{property as e,subclass as o}from"../../../core/accessorSupport/decorators.js";import{ElementTemplateBase as r}from"./ElementTemplateBase.js";let p=class extends r{constructor(t){super(t),this.group=null,this.text=null,this.textFormat="plain-text",this.type="text"}};t([e({clonable:!1})],p.prototype,"group",void 0),t([e()],p.prototype,"text",void 0),t([e()],p.prototype,"textFormat",void 0),t([e()],p.prototype,"type",void 0),p=t([o("esri.widgets.BatchAttributeForm.templates.TextElementTemplate")],p);export{p as TextElementTemplate};
2
+ import{__decorate as t}from"tslib";import{addMany as e}from"../../../core/arrayUtils.js";import{property as s,subclass as r}from"../../../core/accessorSupport/decorators.js";import{extractSubstitutionTemplatesFromString as i}from"../../../layers/support/fieldUtils.js";import{ElementTemplateBase as o}from"./ElementTemplateBase.js";import{splitStringIntoParts as l,isExpressionReference as p,extractExpressionNameFromString as a,isLegacyFieldMapsExpressionReference as n}from"./support/textElementTemplateUtils.js";let h=class extends o{constructor(t){super(t),this.compiledText=null,this.fieldsIndex=null,this.group=null,this.type="text",this._literalParts=[],this._expressionParts=[]}initialize(){this.compiledText?this._initializeTextParts(this.compiledText):this._literalParts.push("")}get expressionParts(){return this._expressionParts}get literalParts(){return this._literalParts}_initializeTextParts(t){const{literals:s,templates:r}=l(t),o=[],h=[];for(let e=0;e<r.length;e++){const t=s[e],l=i(r[e])[0];if(p(l)){const e=a(l);o.push(t),h.push(e)}else if(n(l))o.push(t),h.push(l);else if(this.fieldsIndex?.has(l)){const e=`$feature["${this.fieldsIndex.normalizeFieldName(l)}"]`;o.push(t),h.push(e)}else s[e+1]=t.concat(l,s[e+1])}o.push(s.at(-1)),e(this._literalParts,o),e(this._expressionParts,h)}};t([s()],h.prototype,"compiledText",void 0),t([s()],h.prototype,"expressionParts",null),t([s({constructOnly:!0})],h.prototype,"fieldsIndex",void 0),t([s({clonable:!1})],h.prototype,"group",void 0),t([s()],h.prototype,"literalParts",null),t([s()],h.prototype,"type",void 0),t([s()],h.prototype,"_literalParts",void 0),t([s()],h.prototype,"_expressionParts",void 0),h=t([r("esri.widgets.BatchAttributeForm.templates.TextElementTemplate")],h);export{h as TextElementTemplate};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
+ const e="expression/",o="expr/";export{e as expressionReferencePrefix,o as fieldmapsExpressionNamePrefix};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import e from"../../../../core/Error.js";import t from"../../../../core/Logger.js";import{getEffectiveFieldAlias as r}from"../../../../editing/fieldUtils.js";import n from"../../../../form/ExpressionInfo.js";import{isFieldElement as o,isGroupElement as i,isTextElement as s}from"../../../../form/support/formUtils.js";import{getLowerCaseEditTrackingFields as a,isFieldVisibleByDefault as l}from"../../../../layers/support/fieldUtils.js";import{isSubtypeSublayer as m,isSubtypeGroupLayer as d}from"../../../../layers/support/layerUtils.js";import{unknown as p}from"../../../../time/constants.js";import{makeExpressionInfosMap as f,makeExecutorSetForFormElement as c}from"../../expressions/expressionUtils.js";import u from"../BatchFormTemplate.js";import{FieldElementTemplate as x}from"../FieldElementTemplate.js";import{GroupElementTemplate as y}from"../GroupElementTemplate.js";import{TextElementTemplate as w}from"../TextElementTemplate.js";const b="expression/dea57012-47ca4b55a000-8df62742ed0c",E=()=>t.getLogger("esri.widgets.BatchAttributeForm.templates.templateUtils");async function T(e,t,r=e.formTemplate){return r?.elements&&r.elements.length>0?F(r,e,t):h(e,t)}async function h(e,{arcadeExecutorProvider:t,formTimeZone:r}){const n=new Set(a(e)),o={arcadeExecutorProvider:t,formTimeZone:r,layer:e},i=[];for(const a of e.fields)P(a,e,n)&&i.push(Z(a,o));const s=await Promise.all(i);return new u({elements:s,preserveFieldValuesWhenHidden:!0})}function v(e,t){for(const r of e??[])if("group"!==r.type){if("field"===r.type){if(!1===r.editable&&!r.editableExpression)return!0;if(t.subtypeField&&(m(t)||d(t))&&r.fieldName?.toLowerCase()===t.subtypeField.toLowerCase())return!0}}else if(v(r.elements??[],t))return!0;return!1}async function F(e,t,r){let o=null;v(e.elements??[],t)&&(o=new n({title:"",name:b,expression:"false"}));const i=f(o?[...e.expressionInfos??[],o]:e.expressionInfos),s={description:e.description,elements:new Array,title:e.title,preserveFieldValuesWhenHidden:e.preserveFieldValuesWhenHidden,supportsAttachmentElements:e.supportsAttachmentElements},{elements:a}=e;if(!a)return new u(s);const{arcadeExecutorProvider:l,formTimeZone:m}=r;for(const n of a){const e=await I(n,{arcadeExecutorProvider:l,expressionInfos:i,layer:t,formTimeZone:m});e&&s.elements.push(e)}return new u(s)}async function I(t,r){return o(t)?g(t,r):i(t)?j(t,r):s(t)?L(t,r):(E().warn(new e("batch-attribute-form:unsupported-element-type",`Form elements of type ${t.type} are not supported`)),null)}async function g(t,{arcadeExecutorProvider:r,expressionInfos:n,layer:o,formTimeZone:i}){const{fieldsIndex:s}=o,{description:a,domain:l,fieldName:p,hint:f,input:u,label:y}=t;if(null==p||!s.has(p))return E().warn(new e("batch-attribute-form:invalid-form-element-field",`Field element with label '${y}' does not refer to a valid field`)),null;const w={description:a,domain:l,field:s.get(p),hint:f,input:u,formTimeZone:i,layerTimeZone:U(o),label:y};!1!==t.editable||t.editableExpression||((t=t.clone()).editableExpression=b),o.subtypeField&&(m(o)||d(o))&&t.fieldName?.toLowerCase()===o.subtypeField.toLowerCase()&&((t=t.clone()).editableExpression=b);const T=new x(w),h=await c({element:t,expressionInfos:n,provider:r});return T.addLayer(o,h),T}async function j(e,t){const{arcadeExecutorProvider:r,expressionInfos:n,layer:o}=t,{description:i,label:s,initialState:a}=e,l={description:i,elements:[],label:s,initialState:a??"expanded"};for(const p of e.elements){const e=await I(p,t);e&&l.elements.push(e)}const m=new y(l),d=await c({element:e,expressionInfos:n,provider:r});return m.addLayer(o,d),m}async function L(e,{arcadeExecutorProvider:t,expressionInfos:r,layer:n}){const{description:o,label:i,text:s,textFormat:a}=e,l=new w({description:o,label:i,text:s,textFormat:a}),m=await c({element:e,expressionInfos:r,provider:t});return l.addLayer(n,m),l}async function Z(e,{arcadeExecutorProvider:t,layer:n,formTimeZone:o}){const i=r(e,n)||e.name,s=new x({field:e,label:i,formTimeZone:o,layerTimeZone:U(n)}),a={},l=(d(n)||m(n))&&n.subtypeField&&n.subtypeField.toLowerCase()===e.name.toLowerCase();return!l&&e.editable&&n.userHasUpdateItemPrivileges&&(a.editableExpression=await t.getArcadeExecutor("true")),l&&(a.editableExpression=await t.getArcadeExecutor("false")),s.addLayer(n,a),s}function P(e,t,r){return!r.has(e.name.toLowerCase())&&l(e,t)}function U(e){return m(e)&&e.parent&&(e=e.parent),e&&"datesInUnknownTimezone"in e&&e.datesInUnknownTimezone?p:e&&"preferredTimeZone"in e&&e.preferredTimeZone?e.preferredTimeZone:null}export{T as createBatchFormTemplate,h as createBatchFormTemplateFromFields};
2
+ import e from"../../../../core/Error.js";import t from"../../../../core/Logger.js";import{getEffectiveFieldAlias as r}from"../../../../editing/fieldUtils.js";import n from"../../../../form/ExpressionInfo.js";import{isFieldElement as o,isGroupElement as i,isTextElement as s}from"../../../../form/support/formUtils.js";import{getLowerCaseEditTrackingFields as a,isFieldVisibleByDefault as l}from"../../../../layers/support/fieldUtils.js";import{isSubtypeSublayer as m,isSubtypeGroupLayer as d}from"../../../../layers/support/layerUtils.js";import{unknown as p}from"../../../../time/constants.js";import{makeExpressionInfosMap as f,makeExecutorSetForFormElement as c}from"../../expressions/expressionUtils.js";import u from"../BatchFormTemplate.js";import{FieldElementTemplate as x}from"../FieldElementTemplate.js";import{GroupElementTemplate as w}from"../GroupElementTemplate.js";import{TextElementTemplate as y}from"../TextElementTemplate.js";import{compileTextElementMarkdownToHTML as b}from"./textElementTemplateUtils.js";const E="expression/dea57012-47ca4b55a000-8df62742ed0c",T=()=>t.getLogger("esri.widgets.BatchAttributeForm.templates.templateUtils");async function h(e,t,r=e.formTemplate){return r?.elements&&r.elements.length>0?I(r,e,t):v(e,t)}async function v(e,{arcadeExecutorProvider:t,formTimeZone:r}){const n=new Set(a(e)),o={arcadeExecutorProvider:t,formTimeZone:r,layer:e},i=[];for(const a of e.fields)U(a,e,n)&&i.push(P(a,o));const s=await Promise.all(i);return new u({elements:s,preserveFieldValuesWhenHidden:!0})}function g(e,t){for(const r of e??[])if("group"!==r.type){if("field"===r.type){if(!1===r.editable&&!r.editableExpression)return!0;if(t.subtypeField&&(m(t)||d(t))&&r.fieldName?.toLowerCase()===t.subtypeField.toLowerCase())return!0}}else if(g(r.elements??[],t))return!0;return!1}async function I(e,t,r){let o=null;g(e.elements??[],t)&&(o=new n({title:"",name:E,expression:"false"}));const i=f(o?[...e.expressionInfos??[],o]:e.expressionInfos),s={description:e.description,elements:new Array,title:e.title,preserveFieldValuesWhenHidden:e.preserveFieldValuesWhenHidden,supportsAttachmentElements:e.supportsAttachmentElements},{elements:a}=e;if(!a)return new u(s);const{arcadeExecutorProvider:l,formTimeZone:m}=r;for(const n of a){const e=await F(n,{arcadeExecutorProvider:l,expressionInfos:i,layer:t,formTimeZone:m});e&&s.elements.push(e)}return new u(s)}async function F(t,r){return o(t)?j(t,r):i(t)?L(t,r):s(t)?Z(t,r):(T().warn(new e("batch-attribute-form:unsupported-element-type",`Form elements of type ${t.type} are not supported`)),null)}async function j(t,{arcadeExecutorProvider:r,expressionInfos:n,layer:o,formTimeZone:i}){const{fieldsIndex:s}=o,{description:a,domain:l,fieldName:p,hint:f,input:u,label:w}=t;if(null==p||!s.has(p))return T().warn(new e("batch-attribute-form:invalid-form-element-field",`Field element with label '${w}' does not refer to a valid field`)),null;!1!==t.editable||t.editableExpression||((t=t.clone()).editableExpression=E),o.subtypeField&&(m(o)||d(o))&&t.fieldName?.toLowerCase()===o.subtypeField.toLowerCase()&&((t=t.clone()).editableExpression=E);const y=new x({description:a,domain:l,field:s.get(p),hint:f,input:u,formTimeZone:i,layerTimeZone:A(o),label:w}),b=await c({element:t,expressionInfos:n,provider:r});return y.addLayer(o,b),y}async function L(e,t){const{arcadeExecutorProvider:r,expressionInfos:n,layer:o}=t,{description:i,label:s,initialState:a}=e,l=[];for(const p of e.elements){const e=await F(p,t);e&&l.push(e)}const m=new w({description:i,elements:l,label:s,initialState:a??"expanded"}),d=await c({element:e,expressionInfos:n,provider:r});return m.addLayer(o,d),m}async function Z(e,{arcadeExecutorProvider:t,expressionInfos:r,layer:n}){const{description:o,label:i,text:s,textFormat:a}=e,{fieldsIndex:l}=n,m=s&&"markdown"===a?await b(s):s,d=new y({compiledText:m,description:o,fieldsIndex:l,label:i}),p=await c({element:e,expressionInfos:r,provider:t}),{expressionParts:f}=d;if(f.length){const e=await Promise.all(f.map(e=>{const n=r.get(e)?.expression??e;return t.getArcadeExecutor(n)}));p.textExpressions=e}return d.addLayer(n,p),d}async function P(e,{arcadeExecutorProvider:t,layer:n,formTimeZone:o}){const i=r(e,n)||e.name,s=new x({field:e,label:i,formTimeZone:o,layerTimeZone:A(n)}),a={},l=(d(n)||m(n))&&n.subtypeField&&n.subtypeField.toLowerCase()===e.name.toLowerCase();return!l&&e.editable&&n.userHasUpdateItemPrivileges&&(a.editableExpression=await t.getArcadeExecutor("true")),l&&(a.editableExpression=await t.getArcadeExecutor("false")),s.addLayer(n,a),s}function U(e,t,r){return!r.has(e.name.toLowerCase())&&l(e,t)}function A(e){return m(e)&&e.parent&&(e=e.parent),e&&"datesInUnknownTimezone"in e&&e.datesInUnknownTimezone?p:e&&"preferredTimeZone"in e&&e.preferredTimeZone?e.preferredTimeZone:null}export{h as createBatchFormTemplate,v as createBatchFormTemplateFromFields};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import{numericHash as t}from"../../../../core/string.js";import{isBarcodeScannerInput as n,isComboBoxInput as e,isRadioButtonsInput as i,isDatePickerInput as r,isDateTimePickerInput as o,isDateTimeOffsetPickerInput as $,isSwitchInput as u,isTextAreaInput as f,isTextBoxInput as s,isTimePickerInput as c}from"../../../../form/elements/inputs/inputUtils.js";import{isFieldElementTemplate as l,isGroupElementTemplate as m,isTextElementTemplate as a,isExcludedFromSharedForm as p}from"./templateUtils.js";const g="",d="num:";function y(n){return l(n)?t(S(n)).toString():m(n)?t(V(n)).toString():a(n)?t(x(n)).toString():t(JSON.stringify(n)).toString()}function S(t){return`${b(t)}.${T(t.field)}.${j(t.domain)}.${t.hint??g}.${O(t.input)}.${t.layerTimeZone??""}`}function V(t){const n=b(t)+`.${t.initialState}`;let e=g;for(const i of t.elements)p(i)||(e+="."+y(i).toString());return`${n}${e}`}function x(t){const n=b(t),{text:e,textFormat:i}=t;return`${n}.${e??g}.${i}`}function b(t){return`${t.label??g}.${t.description??g}`}function O(t){if(!t)return g;const{type:l}=t;if(n(t))return l??g;if(e(t)||i(t)){const{showNoValueOption:n}=t;return`${l}.${n}.${t.noValueOptionLabel??g}`}if(r(t))return`${l}.${h(t)}`;if(o(t)){const n=t.min?.getTime(),e=t.max?.getTime(),{includeTime:i}=t;return`${l}.${n}.${e}.${i}`}if($(t)){const n=h(t),{includeTimeOffset:e,timeResolution:i}=t;return`${l}.${n}.${e}.${i}`}if(u(t)){const{offValue:n,onValue:e}=t;return`${l}.${J(n)}.${J(e)}`}if(f(t)||s(t)){return`${l}.${t.minLength?.toString()??g}.${t.maxLength?.toString()??g}`}if(c(t)){const n=h(t),{timeResolution:e}=t;return`${l}.${n}.${e}`}return JSON.stringify(t)}function h(t){return`${t.min??g}.${t.max??g}`}function T(t){const n=t.name,e=t.alias??g;return`${n}.${e===n?g:e}.${t.nullable}.${t.type}.${t.length??g}.${t.defaultValue??g}.${t.description??g}.${t.editable}.${t.visible}`}function j(t){return t?"coded-value"===t.type?N(t):"range"===t.type?L(t):JSON.stringify(t):g}function N(t){const{type:n}=t;return`${n}.${t.codedValues.map(({code:t,name:n})=>`${J(t)}.${n}`).sort().join(".")}`}function J(t){return"number"==typeof t?`${d}${t}`:t}function L(t){const{maxValue:n,minValue:e,type:i}=t;return`${i}.${e}.${n}`}export{y as hashElementTemplate};
2
+ import{numericHash as t}from"../../../../core/string.js";import{isBarcodeScannerInput as n,isComboBoxInput as e,isRadioButtonsInput as i,isDatePickerInput as r,isDateTimePickerInput as o,isDateTimeOffsetPickerInput as $,isSwitchInput as u,isTextAreaInput as f,isTextBoxInput as s,isTimePickerInput as c}from"../../../../form/elements/inputs/inputUtils.js";import{isFieldElementTemplate as l,isGroupElementTemplate as m,isTextElementTemplate as a,isExcludedFromSharedForm as p}from"./templateUtils.js";const g="",d="num:";function y(n){return l(n)?t(S(n)).toString():m(n)?t(V(n)).toString():a(n)?t(b(n)).toString():t(JSON.stringify(n)).toString()}function S(t){return`${x(t)}.${h(t.field)}.${j(t.domain)}.${t.hint??g}.${O(t.input)}.${t.layerTimeZone??""}`}function V(t){const n=x(t)+`.${t.initialState}`;let e=g;for(const i of t.elements)p(i)||(e+="."+y(i).toString());return`${n}${e}`}function b(t){const n=x(t),{compiledText:e}=t;return`${n}.${e??g}`}function x(t){return`${t.label??g}.${t.description??g}`}function O(t){if(!t)return g;const{type:l}=t;if(n(t))return l??g;if(e(t)||i(t)){const{showNoValueOption:n}=t;return`${l}.${n}.${t.noValueOptionLabel??g}`}if(r(t))return`${l}.${T(t)}`;if(o(t)){const n=t.min?.getTime(),e=t.max?.getTime(),{includeTime:i}=t;return`${l}.${n}.${e}.${i}`}if($(t)){const n=T(t),{includeTimeOffset:e,timeResolution:i}=t;return`${l}.${n}.${e}.${i}`}if(u(t)){const{offValue:n,onValue:e}=t;return`${l}.${J(n)}.${J(e)}`}if(f(t)||s(t)){return`${l}.${t.minLength?.toString()??g}.${t.maxLength?.toString()??g}`}if(c(t)){const n=T(t),{timeResolution:e}=t;return`${l}.${n}.${e}`}return JSON.stringify(t)}function T(t){return`${t.min??g}.${t.max??g}`}function h(t){const n=t.name,e=t.alias??g;return`${n}.${e===n?g:e}.${t.nullable}.${t.type}.${t.length??g}.${t.defaultValue??g}.${t.description??g}.${t.editable}.${t.visible}`}function j(t){return t?"coded-value"===t.type?N(t):"range"===t.type?L(t):JSON.stringify(t):g}function N(t){const{type:n}=t;return`${n}.${t.codedValues.map(({code:t,name:n})=>`${J(t)}.${n}`).sort().join(".")}`}function J(t){return"number"==typeof t?`${d}${t}`:t}function L(t){const{maxValue:n,minValue:e,type:i}=t;return`${i}.${e}.${n}`}export{y as hashElementTemplate};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
+ import t from"../../../../core/Logger.js";import{expressionReferencePrefix as e,fieldmapsExpressionNamePrefix as r}from"./constants.js";function n(t){const e=/{[^{]+?}/g,r=[...t.matchAll(e)];let n=0;const o=[],s=[];for(const i of r){const e=i[0];o.push(t.slice(n,i.index)),s.push(e),n=i.index+e.length}return o.push(t.slice(n)),{literals:o,templates:s}}function o(r){const[n,o]=r.split(e);return""===n&&o?o:(t.getLogger("esri.widgets.BatchAttributeForm/templates/support/textElementTemplateUtils").error("extractExpressionNameFromString:invalid-input",`The string ${r} is not a valid expression reference of the form '${e}/expressionName'`),"")}function s(t){return t.startsWith(e)}function i(t){return t.startsWith(r)}let a;const l=["blockquote","html","hr","checkbox","table","tablerow","tablecell","image"];async function c(t){return a||await u(),a.parse(t)}async function u(){const{Marked:t}=await import("marked"),e=function({href:t,title:e,tokens:r}){return`<a${null!=t?` href="${t}"`:""}${null!=e?` title="${e}"`:""} target="_blank">${this.parser.parseInline(r)}</a>`},r=()=>"",n={};for(const o of l)n[o]=r;a=new t({renderer:{link:e,...n}})}export{c as compileTextElementMarkdownToHTML,o as extractExpressionNameFromString,s as isExpressionReference,i as isLegacyFieldMapsExpressionReference,n as splitStringIntoParts};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import{loadCalciteComponents as t}from"../../support/componentsUtils.js";import e from"../../support/SketchTooltipControls.js";import o from"../../support/SnappingControls.js";import{tsx as s}from"../../support/widget.js";import i from"../../support/SketchTooltipControls/VisibleElements.js";import n from"../../support/SnappingControls/VisibleElements.js";const p={settingsContainer:"esri-editor__settings"},r=()=>t({accordion:()=>import("@esri/calcite-components/dist/components/calcite-accordion"),"accordion-item":()=>import("@esri/calcite-components/dist/components/calcite-accordion-item")});function c({editorViewModel:t,messagesCommon:r,visibleElements:c}){const{snappingOptions:a,sketchOptions:l,view:m,snappingManager:g}=t,d=[],u={directionModePicker:c.directionModePicker,labelsToggle:c.labelsToggle,tooltipsToggle:c.tooltipsToggle};return Object.values(u).includes(!0)&&d.push(s(e,{sketchOptions:l,visibleElements:new i(u)})),c.snappingControls&&d.push(s(o,{afterCreate:t=>t.layerListOpen=!1,snappingManager:g,snappingOptions:a,view:m,visibleElements:c.snappingControlsElements??new n})),0===d.length?null:s("calcite-accordion",{appearance:"transparent",class:p.settingsContainer,key:"settings"},s("calcite-accordion-item",{"data-testid":"settings",heading:r.settings,iconStart:"gear"},d))}export{c as Settings,p as css,r as loadSettingsComponents};
2
+ import{loadCalciteComponents as t}from"../../support/componentsUtils.js";import e from"../../support/SketchTooltipControls.js";import o from"../../support/SnappingControls.js";import{tsx as i}from"../../support/widget.js";import s from"../../support/SketchTooltipControls/VisibleElements.js";import n from"../../support/SnappingControls/VisibleElements.js";const p={settingsContainer:"esri-editor__settings"},r=()=>t({accordion:()=>import("@esri/calcite-components/dist/components/calcite-accordion"),"accordion-item":()=>import("@esri/calcite-components/dist/components/calcite-accordion-item")});function c({editorViewModel:t,messagesCommon:r,visibleElements:c}){const{snappingOptions:a,sketchOptions:l,view:m,snappingManager:g}=t,d=[],u={directionModePicker:c.directionModePicker,labelsToggle:c.labelsToggle,tooltipsToggle:c.tooltipsToggle};return Object.values(u).includes(!0)&&d.push(i(e,{sketchOptions:l,viewType:m?.type,visibleElements:new s(u)})),c.snappingControls&&d.push(i(o,{afterCreate:t=>t.layerListOpen=!1,snappingManager:g,snappingOptions:a,view:m,visibleElements:c.snappingControlsElements??new n})),0===d.length?null:i("calcite-accordion",{appearance:"transparent",class:p.settingsContainer,key:"settings"},i("calcite-accordion-item",{"data-testid":"settings",heading:r.settings,iconStart:"gear"},d))}export{c as Settings,p as css,r as loadSettingsComponents};