@arcgis/core 5.2.1 → 5.2.2

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 (145) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/{67e533748435253aaba6.js → 0284f608d25c654fcc11.js} +1 -1
  3. package/assets/esri/core/workers/chunks/{2d9a1f23ec6ce90723ac.js → 0d99bfb75dcb9fa29080.js} +1 -1
  4. package/assets/esri/core/workers/chunks/0fa29352f2ecf0c515e8.js +1 -0
  5. package/assets/esri/core/workers/chunks/10ad7b35b6800d40444e.js +1 -0
  6. package/assets/esri/core/workers/chunks/1132e28aaa5825b10b6e.js +1 -0
  7. package/assets/esri/core/workers/chunks/{10878932826ddb60fac4.js → 1fcc998421c7c16de2ca.js} +1 -1
  8. package/assets/esri/core/workers/chunks/21e1d423ee33f916547e.js +1 -0
  9. package/assets/esri/core/workers/chunks/251f706d226b1d47ba99.js +1 -0
  10. package/assets/esri/core/workers/chunks/{ba38231193919e093917.js → 2529f12fc16e98c014ca.js} +1 -1
  11. package/assets/esri/core/workers/chunks/2b4dd42920d37b1ff0a9.js +2 -0
  12. package/assets/esri/core/workers/chunks/2b804b5d7ce10f0f0cf0.js +1 -0
  13. package/assets/esri/core/workers/chunks/3537fe95b83a13b156cc.js +1 -0
  14. package/assets/esri/core/workers/chunks/36f31416132de434ec00.js +1 -0
  15. package/assets/esri/core/workers/chunks/3e29ab5ec136e669b633.js +1 -0
  16. package/assets/esri/core/workers/chunks/{36c780a9527c75b36725.js → 40d7e54529d13fdd2bf1.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{2cb209bc51a19487692d.js → 43aef67452fa6ff8d8f9.js} +2 -2
  18. package/assets/esri/core/workers/chunks/449a2dee17b54946f245.js +1 -0
  19. package/assets/esri/core/workers/chunks/{5d42f0898bf30ae940ea.js → 46071e59290bf06bb614.js} +1 -1
  20. package/assets/esri/core/workers/chunks/46d91cd99558304da0c7.js +1 -0
  21. package/assets/esri/core/workers/chunks/4cf72dcccf2be353a701.js +1 -0
  22. package/assets/esri/core/workers/chunks/{e3a742dc0c291b47ba56.js → 510c2eb78f5e12f77bbc.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{98d1efb6f2439c6344cf.js → 5b2d1c8763a1716677c0.js} +1 -1
  24. package/assets/esri/core/workers/chunks/5bf7de2e2faa55e53629.js +1 -0
  25. package/assets/esri/core/workers/chunks/{042614bf65b7d63025cb.js → 5f49233d5b67a9ad71d7.js} +1 -1
  26. package/assets/esri/core/workers/chunks/604433b02a165d187953.js +1 -0
  27. package/assets/esri/core/workers/chunks/61d36730564c5ac5edab.js +1 -0
  28. package/assets/esri/core/workers/chunks/{094eb9677cdebfaa9e1b.js → 648d5cdfc3e92be3db55.js} +1 -1
  29. package/assets/esri/core/workers/chunks/{bc6fdd9faf8ed54be0cb.js → 6694e2b27fd6ddf44e21.js} +1 -1
  30. package/assets/esri/core/workers/chunks/70268d790c2f1cb83d43.js +1 -0
  31. package/assets/esri/core/workers/chunks/7b45ac83e279fe9516a5.js +1 -0
  32. package/assets/esri/core/workers/chunks/8102f0bf5707c3be3310.js +1 -0
  33. package/assets/esri/core/workers/chunks/{d56fdf5ce5ff53dc0e69.js → 84495695313b01832369.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{31640b41e0ecdff892fa.js → 85b63811ae7bcb6f74b6.js} +2 -2
  35. package/assets/esri/core/workers/chunks/{c4bbe4707e90b7cd0379.js → 8ac4a043a4f185db271f.js} +1 -1
  36. package/assets/esri/core/workers/chunks/8d01dd92f5c897193ab5.js +1 -0
  37. package/assets/esri/core/workers/chunks/900c8569596609183f19.js +2 -0
  38. package/assets/esri/core/workers/chunks/{d1d6154b4af1c9cc497b.js → 934e1f2153e6fad6ed23.js} +1 -1
  39. package/assets/esri/core/workers/chunks/95c9c5677bbe7fd0420a.js +1 -0
  40. package/assets/esri/core/workers/chunks/{b70885deebc6106597ad.js → 983b85727e09c54bede0.js} +1 -1
  41. package/assets/esri/core/workers/chunks/{d20dcd4ce4b0111d924f.js → 9bbc8e5d42921a8050bb.js} +1 -1
  42. package/assets/esri/core/workers/chunks/a07070de96e143a329a4.js +1 -0
  43. package/assets/esri/core/workers/chunks/a17fb26d6ac4895e51a3.js +2 -0
  44. package/assets/esri/core/workers/chunks/{0d52e1b6d38f2670658c.js → a6f74bd1a9c87b9836ca.js} +1 -1
  45. package/assets/esri/core/workers/chunks/{a85cdafbaf1848bb924b.js → a846c94d49df8d4cd5be.js} +1 -1
  46. package/assets/esri/core/workers/chunks/aa4f12fcb9f4ed3dba18.js +1 -0
  47. package/assets/esri/core/workers/chunks/ac10c7d2c4829a150037.js +1 -0
  48. package/assets/esri/core/workers/chunks/{509a74e9334f31b931d4.js → b54ba2bd6b1b90dcc0cc.js} +1 -1
  49. package/assets/esri/core/workers/chunks/bde8f3b3ce5b1d3ee774.js +1 -0
  50. package/assets/esri/core/workers/chunks/c25ae83fd790f181bb42.js +1 -0
  51. package/assets/esri/core/workers/chunks/{dc51dcaa4e2f9a90f5bd.js → c2cbe0f5e8958cf18e58.js} +2 -2
  52. package/assets/esri/core/workers/chunks/c4c55d8a98ba3f51f63c.js +1 -0
  53. package/assets/esri/core/workers/chunks/c5bf19da62a3d31009fe.js +2 -0
  54. package/assets/esri/core/workers/chunks/{2226c20c38e20713bcb5.js.LICENSE.txt → c5bf19da62a3d31009fe.js.LICENSE.txt} +1 -1
  55. package/assets/esri/core/workers/chunks/{2a2a4650dd9b953d317c.js → c93343a91161c4e40c28.js} +1 -1
  56. package/assets/esri/core/workers/chunks/cb4c5544382eb8c4a87f.js +1 -0
  57. package/assets/esri/core/workers/chunks/{2d83ba260dd6bbe38206.js → d05665ddc8d31403aed3.js} +1 -1
  58. package/assets/esri/core/workers/chunks/d24dea0bdb17db07e2b3.js +1 -0
  59. package/assets/esri/core/workers/chunks/d3412518a7b518860fbb.js +1 -0
  60. package/assets/esri/core/workers/chunks/d4bc6d65dff5d0cc93ba.js +1 -0
  61. package/assets/esri/core/workers/chunks/{3048e74e6246324ce6fc.js → d5916500514a41a4758f.js} +1 -1
  62. package/assets/esri/core/workers/chunks/{aea44253c80493ef5755.js → e7b168ba31142c00f765.js} +1 -1
  63. package/assets/esri/core/workers/chunks/{a504a5e06cb89a620799.js → ec8b7476eac4718eb0ac.js} +1 -1
  64. package/assets/esri/core/workers/chunks/f497968055af459c5da4.js +1 -0
  65. package/assets/esri/core/workers/chunks/{d53cc574a21031436c45.js → f79494829a5b65b5b4c9.js} +1 -1
  66. package/assets/esri/core/workers/chunks/{26261b21d1edf476ea49.js → f7ec3b7f2eccd9c4c2e5.js} +1 -1
  67. package/assets/esri/core/workers/chunks/{20ee2f36f0fd0ae01e15.js → f88cbf9b1d1d7400c060.js} +1 -1
  68. package/assets/esri/core/workers/chunks/{bf4d913e523eae2fda28.js → fa7b189e9b2cc8d4a77f.js} +1 -1
  69. package/assets/esri/core/workers/chunks/fcb4707c2e95099b9f30.js +1 -0
  70. package/assets/esri/core/workers/chunks/{735c1dffc3439bdba3cc.js → fd172c96d2b36032a1d9.js} +1 -1
  71. package/config.js +1 -1
  72. package/core/workers.d.ts +1 -0
  73. package/kernel.js +1 -1
  74. package/layers/CSVLayer.js +1 -1
  75. package/layers/SceneLayer.js +1 -1
  76. package/layers/graphics/sources/CSVSource.js +1 -1
  77. package/layers/graphics/sources/GeoJSONSource.js +1 -1
  78. package/layers/graphics/sources/MemorySource.js +2 -2
  79. package/layers/graphics/sources/support/QueryTask.js +1 -1
  80. package/layers/graphics/sources/support/timeQueryUtils.js +2 -0
  81. package/layers/mixins/ArcGISImageService.js +1 -1
  82. package/layers/raster/functions/rasterProjectionHelper.js +1 -1
  83. package/layers/support/TimeInformation.js +1 -1
  84. package/layers/support/timeInfoUtils.js +2 -0
  85. package/package.json +4 -4
  86. package/rest/query/executeAttributeBinsQuery.js +1 -1
  87. package/rest/query/executeForExtent.js +1 -1
  88. package/rest/query/executeForTopCount.js +1 -1
  89. package/rest/query/executeForTopExtents.js +1 -1
  90. package/rest/query/executeForTopIds.js +1 -1
  91. package/rest/query/executeTopFeaturesQuery.js +1 -1
  92. package/rest/query/operations/query.js +1 -1
  93. package/rest/query/operations/queryAttributeBins.js +1 -1
  94. package/rest/query/operations/queryTopFeatures.js +1 -1
  95. package/rest/support/timeUtils.js +1 -1
  96. package/symbols/TextSymbol.d.ts +0 -1
  97. package/views/2d/layers/ImageryLayerView2D.js +1 -1
  98. package/views/3d/environment/SunLighting.d.ts +10 -8
  99. package/views/3d/environment/VirtualLighting.d.ts +10 -8
  100. package/widgets/OrientedImageryViewer/navigation/NavigationManager.js +1 -1
  101. package/widgets/OrientedImageryViewer/navigation/queries.js +1 -1
  102. package/widgets/OrientedImageryViewer/navigation/utils.js +1 -1
  103. package/widgets/OrientedImageryViewer.js +2 -2
  104. package/assets/esri/core/workers/chunks/20a698709c3c11ff2c16.js +0 -1
  105. package/assets/esri/core/workers/chunks/2226c20c38e20713bcb5.js +0 -2
  106. package/assets/esri/core/workers/chunks/2a570ce6b99dac6ee996.js +0 -1
  107. package/assets/esri/core/workers/chunks/2b6684d057d9ad17ac13.js +0 -1
  108. package/assets/esri/core/workers/chunks/2e66c969bf4209c957b5.js +0 -2
  109. package/assets/esri/core/workers/chunks/377595b23379b0c8fe95.js +0 -1
  110. package/assets/esri/core/workers/chunks/379ef56f6b32494832a6.js +0 -1
  111. package/assets/esri/core/workers/chunks/38d852676677e5697864.js +0 -1
  112. package/assets/esri/core/workers/chunks/3c881b1adc8a5dea9a90.js +0 -1
  113. package/assets/esri/core/workers/chunks/4e6656a5f29e31902fca.js +0 -2
  114. package/assets/esri/core/workers/chunks/50e8943d2c0b96fab2c1.js +0 -1
  115. package/assets/esri/core/workers/chunks/5a9b7eb26f936f03d02e.js +0 -1
  116. package/assets/esri/core/workers/chunks/5f07f52bb8b7721f08d3.js +0 -1
  117. package/assets/esri/core/workers/chunks/60c79934799927114074.js +0 -1
  118. package/assets/esri/core/workers/chunks/63b5418a1c3fe0a97a86.js +0 -1
  119. package/assets/esri/core/workers/chunks/6ddc29a144640acb1192.js +0 -1
  120. package/assets/esri/core/workers/chunks/6f73e41e14817acfaead.js +0 -1
  121. package/assets/esri/core/workers/chunks/7dfbc31f3b56728485a4.js +0 -1
  122. package/assets/esri/core/workers/chunks/822f83d7c09ef0a9bbdf.js +0 -1
  123. package/assets/esri/core/workers/chunks/844eedda8f749972f707.js +0 -2
  124. package/assets/esri/core/workers/chunks/8b8118ab56cc808b5a71.js +0 -1
  125. package/assets/esri/core/workers/chunks/8d86b0cb0e004ad72040.js +0 -1
  126. package/assets/esri/core/workers/chunks/98760040f0c9d47c718d.js +0 -1
  127. package/assets/esri/core/workers/chunks/a2f0894218e665780a21.js +0 -1
  128. package/assets/esri/core/workers/chunks/a65951f1d5702cfd996e.js +0 -1
  129. package/assets/esri/core/workers/chunks/ab6506a3c16f8717fc00.js +0 -1
  130. package/assets/esri/core/workers/chunks/c45edd0a7d57263bb7d6.js +0 -1
  131. package/assets/esri/core/workers/chunks/c52466eb1f3c33ae1f5a.js +0 -1
  132. package/assets/esri/core/workers/chunks/c570b90995c65bbb2e14.js +0 -1
  133. package/assets/esri/core/workers/chunks/c576bef77e34920af188.js +0 -1
  134. package/assets/esri/core/workers/chunks/c80a3b039e510c118399.js +0 -1
  135. package/assets/esri/core/workers/chunks/c88a70f68c8ce8c30e9b.js +0 -1
  136. package/assets/esri/core/workers/chunks/cf1ec61eb2ad147bb931.js +0 -1
  137. package/assets/esri/core/workers/chunks/daae21cf77864f3293ef.js +0 -1
  138. package/assets/esri/core/workers/chunks/e9cdb0b0f074583edebd.js +0 -1
  139. package/assets/esri/core/workers/chunks/f5cc78291b53931b91e8.js +0 -1
  140. /package/assets/esri/core/workers/chunks/{844eedda8f749972f707.js.LICENSE.txt → 2b4dd42920d37b1ff0a9.js.LICENSE.txt} +0 -0
  141. /package/assets/esri/core/workers/chunks/{2cb209bc51a19487692d.js.LICENSE.txt → 43aef67452fa6ff8d8f9.js.LICENSE.txt} +0 -0
  142. /package/assets/esri/core/workers/chunks/{31640b41e0ecdff892fa.js.LICENSE.txt → 85b63811ae7bcb6f74b6.js.LICENSE.txt} +0 -0
  143. /package/assets/esri/core/workers/chunks/{4e6656a5f29e31902fca.js.LICENSE.txt → 900c8569596609183f19.js.LICENSE.txt} +0 -0
  144. /package/assets/esri/core/workers/chunks/{2e66c969bf4209c957b5.js.LICENSE.txt → a17fb26d6ac4895e51a3.js.LICENSE.txt} +0 -0
  145. /package/assets/esri/core/workers/chunks/{dc51dcaa4e2f9a90f5bd.js.LICENSE.txt → c2cbe0f5e8958cf18e58.js.LICENSE.txt} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../Graphic.js";import{isSome as n}from"../../../core/arrayUtils.js";import r from"../../../core/Collection.js";import{makeHandle as i}from"../../../core/handleUtils.js";import"../../../core/has.js";import{QueueProcessor as a}from"../../../core/QueueProcessor.js";import{watch as o,sync as s}from"../../../core/reactiveUtils.js";import{isScreenRect as c}from"../../../core/screenUtils.js";import{property as l,subclass as u}from"../../../core/accessorSupport/decorators.js";import{convertGeometryToMask as d}from"../../../layers/raster/functions/clipUtils.js";import f from"../../../layers/support/FeatureFilter.js";import{GraphicsCollection as p}from"../../../support/GraphicsCollection.js";import m from"../engine/flow/FlowView2D.js";import{LayerView2D as h}from"./LayerView2D.js";import g from"./graphics/GraphicsView2D.js";import _ from"./graphics/HighlightGraphicContainer.js";import v from"./imagery/ImageryView2D.js";import y from"./imagery/VectorFieldView2D.js";import b from"../../layers/ImageryLayerView.js";import{RefreshableLayerView as x}from"../../layers/RefreshableLayerView.js";import{isPixelHighlightTarget as S,isEmptyPixelRanges as C}from"../../layers/support/highlightUtils.js";import{defaultColor as w}from"../../support/HighlightDefaults.js";import{getHighlightName as T}from"../../support/highlightOptionsUtils.js";let E=class extends x(h(b)){constructor(){super(...arguments),this._exportImageVersion=-1,this._highlightGraphics=new p,this._highlightView=void 0,this._pixelHighlights=[],this.layer=null,this.subview=null}get pixelData(){let{subview:e}=this;return this.updating||!e?null:`getPixelData`in e?e.getPixelData():null}update(e){this.subview?.update(e)}attach(){this.layer.increaseRasterJobHandlerUsage(),this._setSubView(),this.view&&(this._highlightView=new g({view:this.view,graphics:this._highlightGraphics,requestUpdateCallback:()=>this.requestUpdate(),container:new _(this.view.featuresTilingScheme)}),this.container.addChild(this._highlightView.container)),this.addAttachHandles([o(()=>this.layer.exportImageServiceParameters.version,e=>{e&&this._exportImageVersion!==e&&(this._exportImageVersion=e,this.requestUpdate())},s),o(()=>this.timeExtent,e=>{let{subview:t}=this;t&&(t.timeExtent=e,`redraw`in t?this.requestUpdate():t.redrawOrRefetch())},s),this.layer.on(`redraw`,()=>{let{subview:e}=this;e&&(`redraw`in e?e.redraw():e.redrawOrRefetch())}),o(()=>this.layer.renderer,()=>this._setSubView()),o(()=>this.view?.highlights.items.map(({name:e,color:t})=>({name:e,color:t})),()=>this._updateHighlightOptions(this.subview))])}detach(){this.layer.decreaseRasterJobHandlerUsage(),this.container.removeAllChildren(),this._detachSubview(this.subview),this.subview?.destroy(),this.subview=null,this._highlightView?.destroy(),this._exportImageVersion=-1}viewChange(){}moveEnd(){this.requestUpdate()}async hitTest(e,t){let{layer:n,subview:r}=this;if(!n.loaded||!this.attached||!r?.attached)return null;c(t)&&(e=this.view.toMap({x:t.x+t.width/2,y:t.y+t.height/2}));let i=await r.hitTest(e);return i==null?null:[{type:`raster`,layer:n,mapPoint:e,...i}]}highlight(e,a){if(S(e))return C(e)?i():this._highlightPixels(e,a);if(typeof e==`number`||typeof e==`string`)return this._highlightByImageIds([e],a);let o=Array.isArray(e)||r.isCollection(e)?e.at(0):e;if(typeof o==`number`||typeof o==`string`)return this._highlightByImageIds(e,a);if(!(o instanceof t))return i();let s=[];if(Array.isArray(e)||r.isCollection(e)?s=e.map(e=>e.clone()):e instanceof t&&(s=[e.clone()]),!s?.filter(n)?.length)return i();let c=T(a),l=this._addHighlightGraphics(s,c);return i(()=>!this.destroyed&&this._removeHighlightGraphics(s,l))}_highlightByImageIds(e,t){let n=T(t),r=new AbortController,{signal:o}=r,s=this.layer.sourceJSON.maxRecordCount??1e3,c=Math.ceil(e.length/s),l=[],u=[],d=new a({concurrency:4,process:e=>this.layer.queryFeatures({objectIds:e.ids,returnGeometry:!0,outSpatialReference:this.view.spatialReference},{signal:o}).then(e=>u.push(...e.features)).catch(()=>{})});for(let t=0;t<c;t++)l.push(d.push({ids:e.slice(t*s,(t+1)*s)}));return Promise.allSettled(l).then(()=>{if(u.length&&!o.aborted){let e=this._addHighlightGraphics(u,n);o.addEventListener(`abort`,()=>{this._removeHighlightGraphics(u,e)})}}),i(()=>r.abort())}_highlightPixels(e,t){let n={target:e,options:t};return this._pixelHighlights.push(n),this._updateHighlightOptions(this.subview),i(()=>{let e=this._pixelHighlights.indexOf(n);e>-1&&(this._pixelHighlights.splice(e,1),this._updateHighlightOptions(this.subview))})}_addHighlightGraphics(e,t){return this._highlightGraphics.addMany(e),this._addHighlightFilter(new f({objectIds:e.map(e=>e.uid)}),t)}_removeHighlightGraphics(e,t){this._highlightGraphics.removeMany(e),this._removeHighlight(t)}async doRefresh(){this.requestUpdate()}isUpdating(){return!this.subview||this.subview.updating||!!this._highlightView?.updating}_onHighlightChange(){let e=this._getHighlightFilterGroups();this._highlightView?.setHighlightFilters(e)}_setSubView(){if(!this.view)return;let e=this.layer.renderer?.type,t=`imagery`;if(e===`vector-field`?t=`imageryVF`:e===`flow`&&(t=`flow`),this.subview){let{type:e}=this.subview;if(e===t){this._attachSubview(this.subview),e===`flow`?this.subview.redrawOrRefetch():e===`imagery`&&this.layer.format===`lerc`?this.subview.redraw():this.requestUpdate();return}this._detachSubview(this.subview),this.subview?.destroy()}t===`imagery`?(this.subview=new v({layer:this.layer,view:this.view,timeExtent:this.timeExtent,updatingHandles:this._updatingHandles}),this._updateHighlightOptions(this.subview)):this.subview=t===`imageryVF`?new y({layer:this.layer,view:this.view,timeExtent:this.timeExtent}):new m({layer:this.layer,layerView:this}),this._attachSubview(this.subview),this.requestUpdate()}_attachSubview(e){e&&!e.attached&&(e.attach(),e.attached=!0,this.container.addChildAt(e.container,0))}_detachSubview(e){e?.attached&&(this.container.removeChild(e.container),e.detach(),e.attached=!1)}_updateHighlightOptions(e){let t=this.view.highlights;this._pixelHighlights.sort((e,n)=>t.findIndex(({name:e})=>e===T(n.options))-t.findIndex(({name:t})=>t===T(e.options)));let r=this._pixelHighlights.map(({target:e,options:n})=>D(e,t,n)).filter(n);e?.type===`imagery`&&(e.pixelHighlights=r,e.attached&&(this.layer.format===`lerc`?e.redraw():this.requestUpdate()))}};e([l()],E.prototype,`pixelData`,null),e([l()],E.prototype,`subview`,void 0),E=e([u(`esri.views.2d.layers.ImageryLayerView2D`)],E);function D(e,t,n){let r=T(n),i=(t.find(e=>e.name===r)?.color??w).toArray(),{pixelRanges:a}=e;if(Array.isArray(a))return{ranges:a,bandId:e.bandId??0,color:i};let o=a.type===`extent`?a:a.extent;if(!o)return;let s=[o.xmin,o.xmax],c=[o.ymin,o.ymax],{xBandId:l,yBandId:u}=e,f=1024,p=1024;return{xBandId:l,yBandId:u,xBandRange:s,yBandRange:c,color:i,width:f,height:p,xyMask:a.type===`polygon`?d({srcExtent:o,geometry:a,size:[f,p]}):void 0}}const O=E;export{O as default};
2
+ import{__decorate as e}from"tslib";import t from"../../../Graphic.js";import{isSome as n}from"../../../core/arrayUtils.js";import r from"../../../core/Collection.js";import{makeHandle as i}from"../../../core/handleUtils.js";import"../../../core/has.js";import{QueueProcessor as a}from"../../../core/QueueProcessor.js";import{watch as o,sync as s}from"../../../core/reactiveUtils.js";import{isScreenRect as c}from"../../../core/screenUtils.js";import{property as l,subclass as u}from"../../../core/accessorSupport/decorators.js";import{convertGeometryToMask as d}from"../../../layers/raster/functions/clipUtils.js";import f from"../../../layers/support/FeatureFilter.js";import{GraphicsCollection as p}from"../../../support/GraphicsCollection.js";import m from"../engine/flow/FlowView2D.js";import{LayerView2D as h}from"./LayerView2D.js";import g from"./graphics/GraphicsView2D.js";import _ from"./graphics/HighlightGraphicContainer.js";import v from"./imagery/ImageryView2D.js";import y from"./imagery/VectorFieldView2D.js";import b from"../../layers/ImageryLayerView.js";import{RefreshableLayerView as x}from"../../layers/RefreshableLayerView.js";import{isPixelHighlightTarget as S,isEmptyPixelRanges as C}from"../../layers/support/highlightUtils.js";import{defaultColor as w}from"../../support/HighlightDefaults.js";import{getHighlightName as T}from"../../support/highlightOptionsUtils.js";let E=class extends x(h(b)){constructor(){super(...arguments),this._exportImageVersion=-1,this._highlightGraphics=new p,this._highlightView=void 0,this._maxPixelSizePromise=null,this._pixelHighlights=[],this.layer=null,this.subview=null}get pixelData(){let{subview:e}=this;return this.updating||!e?null:`getPixelData`in e?e.getPixelData():null}update(e){this.subview?.update(e),this._highlightView?.processUpdate(e),this._updatingHandles.consumePromise(this._updateHighlightVisibility())}attach(){this.layer.increaseRasterJobHandlerUsage(),this._setSubView(),this.view&&(this._highlightView=new g({view:this.view,graphics:this._highlightGraphics,requestUpdateCallback:()=>this.requestUpdate(),container:new _(this.view.featuresTilingScheme)}),this.container.addChild(this._highlightView.container)),this.addAttachHandles([o(()=>this.layer.exportImageServiceParameters.version,e=>{e&&this._exportImageVersion!==e&&(this._exportImageVersion=e,this.requestUpdate())},s),o(()=>this.timeExtent,e=>{let{subview:t}=this;t&&(t.timeExtent=e,`redraw`in t?this.requestUpdate():t.redrawOrRefetch())},s),this.layer.on(`redraw`,()=>{let{subview:e}=this;e&&(`redraw`in e?e.redraw():e.redrawOrRefetch())}),o(()=>this.layer.renderer,()=>this._setSubView()),o(()=>this.view?.highlights.items.map(({name:e,color:t})=>({name:e,color:t})),()=>this._updateHighlightOptions(this.subview))])}detach(){this.layer.decreaseRasterJobHandlerUsage(),this.container.removeAllChildren(),this._detachSubview(this.subview),this.subview?.destroy(),this.subview=null,this._highlightView?.destroy(),this._exportImageVersion=-1}viewChange(){}moveEnd(){this.requestUpdate()}async hitTest(e,t){let{layer:n,subview:r}=this;if(!n.loaded||!this.attached||!r?.attached)return null;c(t)&&(e=this.view.toMap({x:t.x+t.width/2,y:t.y+t.height/2}));let i=await r.hitTest(e);return i==null?null:[{type:`raster`,layer:n,mapPoint:e,...i}]}highlight(e,a){if(S(e))return C(e)?i():this._highlightPixels(e,a);if(this.layer.sourceType===`mosaic-dataset`&&(this._maxPixelSizePromise??=this.layer.fetchMaxPixelSize(this.view.spatialReference).catch(()=>null)),typeof e==`number`||typeof e==`string`)return this._highlightByImageIds([e],a);let o=Array.isArray(e)||r.isCollection(e)?e.at(0):e;if(typeof o==`number`||typeof o==`string`)return this._highlightByImageIds(e,a);if(!(o instanceof t))return i();let s=[];if(Array.isArray(e)||r.isCollection(e)?s=e.map(e=>e.clone()):e instanceof t&&(s=[e.clone()]),!s?.filter(n)?.length)return i();let c=T(a),l=this._addHighlightGraphics(s,c);return i(()=>!this.destroyed&&this._removeHighlightGraphics(s,l))}_highlightByImageIds(e,t){let n=T(t),r=new AbortController,{signal:o}=r,s=this.layer.sourceJSON.maxRecordCount??1e3,c=Math.ceil(e.length/s),l=[],u=[],d=new a({concurrency:4,process:e=>this.layer.queryFeatures({objectIds:e.ids,returnGeometry:!0,outSpatialReference:this.view.spatialReference},{signal:o}).then(e=>u.push(...e.features)).catch(()=>{})});for(let t=0;t<c;t++)l.push(d.push({ids:e.slice(t*s,(t+1)*s)}));return Promise.allSettled(l).then(()=>{if(u.length&&!o.aborted){let e=this._addHighlightGraphics(u,n);o.addEventListener(`abort`,()=>{this._removeHighlightGraphics(u,e)})}}),i(()=>r.abort())}_highlightPixels(e,t){let n={target:e,options:t};return this._pixelHighlights.push(n),this._updateHighlightOptions(this.subview),i(()=>{let e=this._pixelHighlights.indexOf(n);e>-1&&(this._pixelHighlights.splice(e,1),this._updateHighlightOptions(this.subview))})}_addHighlightGraphics(e,t){return this._highlightGraphics.addMany(e),this._addHighlightFilter(new f({objectIds:e.map(e=>e.uid)}),t)}_removeHighlightGraphics(e,t){this._highlightGraphics.removeMany(e),this._removeHighlight(t)}async doRefresh(){this.requestUpdate()}isUpdating(){return!this.subview||this.subview.updating||!!this._highlightView?.updating}_onHighlightChange(){let e=this._getHighlightFilterGroups();this._highlightView?.setHighlightFilters(e)}_setSubView(){if(!this.view)return;let e=this.layer.renderer?.type,t=`imagery`;if(e===`vector-field`?t=`imageryVF`:e===`flow`&&(t=`flow`),this.subview){let{type:e}=this.subview;if(e===t){this._attachSubview(this.subview),e===`flow`?this.subview.redrawOrRefetch():e===`imagery`&&this.layer.format===`lerc`?this.subview.redraw():this.requestUpdate();return}this._detachSubview(this.subview),this.subview?.destroy()}t===`imagery`?(this.subview=new v({layer:this.layer,view:this.view,timeExtent:this.timeExtent,updatingHandles:this._updatingHandles}),this._updateHighlightOptions(this.subview)):this.subview=t===`imageryVF`?new y({layer:this.layer,view:this.view,timeExtent:this.timeExtent}):new m({layer:this.layer,layerView:this}),this._attachSubview(this.subview),this.requestUpdate()}_attachSubview(e){e&&!e.attached&&(e.attach(),e.attached=!0,this.container.addChildAt(e.container,0))}_detachSubview(e){e?.attached&&(this.container.removeChild(e.container),e.detach(),e.attached=!1)}async _updateHighlightVisibility(){let e=this._highlightView?.container;if(!e||this.suspended)return;if(this.layer.mosaicRule?.method===`lock-raster`){e.visible=!0;return}let t=await this._maxPixelSizePromise;t!=null&&(e.visible=(t.x+t.y)/2>this.view.resolution)}_updateHighlightOptions(e){let t=this.view.highlights;this._pixelHighlights.sort((e,n)=>t.findIndex(({name:e})=>e===T(n.options))-t.findIndex(({name:t})=>t===T(e.options)));let r=this._pixelHighlights.map(({target:e,options:n})=>D(e,t,n)).filter(n);e?.type===`imagery`&&(e.pixelHighlights=r,e.attached&&(this.layer.format===`lerc`?e.redraw():this.requestUpdate()))}};e([l()],E.prototype,`pixelData`,null),e([l()],E.prototype,`subview`,void 0),E=e([u(`esri.views.2d.layers.ImageryLayerView2D`)],E);function D(e,t,n){let r=T(n),i=(t.find(e=>e.name===r)?.color??w).toArray(),{pixelRanges:a}=e;if(Array.isArray(a))return{ranges:a,bandId:e.bandId??0,color:i};let o=a.type===`extent`?a:a.extent;if(!o)return;let s=[o.xmin,o.xmax],c=[o.ymin,o.ymax],{xBandId:l,yBandId:u}=e,f=1024,p=1024;return{xBandId:l,yBandId:u,xBandRange:s,yBandRange:c,color:i,width:f,height:p,xyMask:a.type===`polygon`?d({srcExtent:o,geometry:a,size:[f,p]}):void 0}}const O=E;export{O as default};
@@ -66,24 +66,26 @@ export default class SunLighting extends SunLightingSuperclass {
66
66
  /**
67
67
  * Enables global illumination for more realistic lighting in the scene through ambient occlusion and emissive lighting.
68
68
  * * **Ambient occlusion** darkens areas where surrounding geometry blocks ambient light, adding definition to corners, crevices, and spaces between buildings.
69
- * * **Emissive lighting** illuminates surfaces near emissive materials. The illumination depends on the emitters’ strength and color, as well as their distance from the surfaces they illuminate.
69
+ * * **Emissive lighting** illuminates surfaces near emissive materials. The illumination depends on the emitters’ strength and color, as well as their distance from the surfaces they illuminate. See the [Visualizations with light-emitting symbols sample](/sample-code/light-emitting-symbols/) for more details on configuring emissive symbols.
70
70
  *
71
71
  * <figure>
72
72
  * <img src="https://developers.arcgis.com/javascript/latest/assets/references/core/views/3d/gi-onoff.avif"
73
73
  * alt="Comparison of scene lighting with global illumination enabled and disabled" />
74
- * <figcaption>Global illumination, enabled on the right, adds more detailed ambient occlusion shading and lighting from emissive materials.</figcaption>
74
+ * <figcaption>Global illumination, enabled on the right, provides more detailed ambient occlusion shading and emissive lighting.</figcaption>
75
75
  * </figure>
76
76
  *
77
- * Global illumination uses a screen-space technique to maintain interactive performance. The result depends on the camera position and viewing angle. Emissive objects outside the camera’s view or hidden behind other geometry do not contribute lighting.
77
+ * Global illumination is a camera-dependent, screen-space approximation based on visible depth, surface normals, and recent frame data. It is not a physically exact lighting simulation or a scene-wide path tracer. Off-screen or hidden geometry cannot reliably provide indirect light.
78
+ * It is meant to be used mainly for visual context, not illumination measurements or lighting-compliance analysis.
79
+ *
80
+ * Global illumination progressively accumulates lighting over multiple frames, reducing noise and improving visual quality. After camera or scene changes, lighting settles over successive rendered frames. During navigation, reduced resolution trades detail for rendering cost.
78
81
  *
79
- * Global illumination progressively accumulates lighting over multiple frames, reducing noise and improving visual quality. Camera movements and animated objects may cause temporary noise or other visual artifacts.
80
82
  *
81
83
  * **Known limitations**
82
84
  *
83
- * - Is not supported with [GaussianSplatLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/GaussianSplatLayer/).
84
- * - Is disabled at high camera altitudes.
85
- * - May produce temporarily noisy lighting after camera or scene changes.
86
- * - May reduce rendering performance.
85
+ * - Global illumination is not supported with [GaussianSplatLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/GaussianSplatLayer/): neither ambient occlusion nor emissive lighting will be computed for this layer.
86
+ * - [SceneView.takeScreenshot()](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/#takeScreenshot) uses a dedicated accumulation path to compute global illumination. Captures with global illumination enabled can therefore take substantially longer to finish.
87
+ * - Small emitters, or emitters that appear small on screen due to distance may produce only weak illumination. Increasing size, [emissive strength](https://developers.arcgis.com/javascript/latest/references/core/symbols/support/Symbol3DEmissive/#strength) and enabling [glow](https://developers.arcgis.com/javascript/latest/references/core/webscene/Glow/) can help improve visibility, but cannot guarantee a particular light footprint or replace missing screen-space samples from arbitrary distances and angles.
88
+ * - Global illumination is disabled at high camera altitudes.
87
89
  *
88
90
  * @default false
89
91
  * @beta
@@ -44,24 +44,26 @@ export default class VirtualLighting extends VirtualLightingSuperclass {
44
44
  /**
45
45
  * Enables global illumination for more realistic lighting in the scene through ambient occlusion and emissive lighting.
46
46
  * * **Ambient occlusion** darkens areas where surrounding geometry blocks ambient light, adding definition to corners, crevices, and spaces between buildings.
47
- * * **Emissive lighting** illuminates surfaces near emissive materials. The illumination depends on the emitters’ strength and color, as well as their distance from the surfaces they illuminate.
47
+ * * **Emissive lighting** illuminates surfaces near emissive materials. The illumination depends on the emitters’ strength and color, as well as their distance from the surfaces they illuminate. See the [Visualizations with light-emitting symbols sample](/sample-code/light-emitting-symbols/) for more details on configuring emissive symbols.
48
48
  *
49
49
  * <figure>
50
50
  * <img src="https://developers.arcgis.com/javascript/latest/assets/references/core/views/3d/gi-onoff.avif"
51
51
  * alt="Comparison of scene lighting with global illumination enabled and disabled" />
52
- * <figcaption>Global illumination, enabled on the right, adds more detailed ambient occlusion shading and lighting from emissive materials.</figcaption>
52
+ * <figcaption>Global illumination, enabled on the right, provides more detailed ambient occlusion shading and emissive lighting.</figcaption>
53
53
  * </figure>
54
54
  *
55
- * Global illumination uses a screen-space technique to maintain interactive performance. The result depends on the camera position and viewing angle. Emissive objects outside the camera’s view or hidden behind other geometry do not contribute lighting.
55
+ * Global illumination is a camera-dependent, screen-space approximation based on visible depth, surface normals, and recent frame data. It is not a physically exact lighting simulation or a scene-wide path tracer. Off-screen or hidden geometry cannot reliably provide indirect light.
56
+ * It is meant to be used mainly for visual context, not illumination measurements or lighting-compliance analysis.
57
+ *
58
+ * Global illumination progressively accumulates lighting over multiple frames, reducing noise and improving visual quality. After camera or scene changes, lighting settles over successive rendered frames. During navigation, reduced resolution trades detail for rendering cost.
56
59
  *
57
- * Global illumination progressively accumulates lighting over multiple frames, reducing noise and improving visual quality. Camera movements and animated objects may cause temporary noise or other visual artifacts.
58
60
  *
59
61
  * **Known limitations**
60
62
  *
61
- * - Is not supported with [GaussianSplatLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/GaussianSplatLayer/).
62
- * - Is disabled at high camera altitudes.
63
- * - May produce temporarily noisy lighting after camera or scene changes.
64
- * - May reduce rendering performance.
63
+ * - Global illumination is not supported with [GaussianSplatLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/GaussianSplatLayer/): neither ambient occlusion nor emissive lighting will be computed for this layer.
64
+ * - [SceneView.takeScreenshot()](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/#takeScreenshot) uses a dedicated accumulation path to compute global illumination. Captures with global illumination enabled can therefore take substantially longer to finish.
65
+ * - Small emitters, or emitters that appear small on screen due to distance may produce only weak illumination. Increasing size, [emissive strength](https://developers.arcgis.com/javascript/latest/references/core/symbols/support/Symbol3DEmissive/#strength) and enabling [glow](https://developers.arcgis.com/javascript/latest/references/core/webscene/Glow/) can help improve visibility, but cannot guarantee a particular light footprint or replace missing screen-space samples from arbitrary distances and angles.
66
+ * - Global illumination is disabled at high camera altitudes.
65
67
  *
66
68
  * @default false
67
69
  * @beta
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../core/Accessor.js";import{throwIfAborted as n}from"../../../core/promiseUtils.js";import{property as r,subclass as i}from"../../../core/accessorSupport/decorators.js";import a from"../../../geometry/Point.js";import{polygonCentroidPoint as o}from"../../../geometry/support/centroid.js";import s from"../../../layers/orientedImagery/core/ExposurePoint.js";import{createFeatureCoverage as c}from"../featureCoverage.js";import{NoSequenceFoundError as l,NoImageInSequenceError as u,InvalidDirectionError as d}from"./errors.js";import{queryNextLocationFeatures as f,queryAfterSequenceField as p,querySequenceFeaturesAroundPoint as m,queryOffsetSequenceFeatures as h}from"./queries.js";import{shouldQueryAndNavigateSequentially as g,shouldQueryAndNavigate as _}from"./utils.js";let v=class extends t{constructor(e){super(e),this._navigating=!1,this.viewModel=null}get currentNode(){return this.viewModel.currentNode}get layer(){return this.viewModel.layer}get navigating(){return this._navigating}get navigationNodes(){return this.viewModel.navigationNodes}async _queryAndHandleFeatureResponse(e,t,r,i,a){let{error:o,nextLocation:s,response:c}=await f(e,t,r,i,a);if(n(a),o)throw o;this.viewModel.selectedPoint=s,await this.viewModel.processFeatureResponse(c,s,{signal:a?.signal,loadBestImage:!1})}async afterNavigate(e,t,n){return await this.viewModel.selectBestFeature(t.id,n),t}async navigate(e,t){this._navigating=!0;try{let n;if(`direction`in t?n=await this.navigateInDirection(e,t):(`step`in t||`goTo`in t)&&(n=await this.navigateInSequence(e,t)),this._navigating=!1,!n)throw Error(`No next node found`);return await this.afterNavigate(e,n,t)}catch(e){throw this._navigating=!1,e}}async navigateBySkippingSteps(e,t){let{step:n}=t,{layer:r}=this,{layerFloorFilterClause:i,layerTimeExtent:d,preloadMediaSize:f}=this.viewModel;if(!r)throw Error(`Layer is not defined`);let h=e.attributes.sequenceOrder;if(!h)throw new l;let _=n>0?e.next:e.previous;if(!g(_))return _;let{response:v,error:y}=await p(r,h,n>0?`next`:`previous`,f,i??void 0,d,{signal:t.signal});if(y)throw Error(`Error querying sequence features`);let b=v?.features[0];if(!b)throw new u(n>0?`end`:`start`);let x=s.fromJSON({...b.toJSON(),layer:r}),{polygon:S}=c(x),C=a.fromJSON(o(S)),{response:w,error:T,nextLocation:E}=await m(r,C,i??void 0,d,{signal:t.signal});if(T)throw Error(`Error querying sequence features`);let D=new Set(w.features.map(e=>e.attributes.objectId));w.features=[...v.features.filter(e=>!D.has(e.attributes.objectId)),...w.features],this.viewModel.selectedPoint=E;let O=b.attributes.objectId;await this.viewModel.processFeatureResponse(w,E,{signal:t.signal,loadBestImage:!1});let k=this.viewModel.navigationNodes.toArray();k.sort((e,t)=>{let n=e.attributes.sequenceOrder,r=t.attributes.sequenceOrder;if(!n||!r)return 0;let i=n.length;for(let e=0;e<i;e++){let{value:t,sortOrder:i}=n[e],{value:a}=r[e];if(i===`desc`){if(t<a)return 1;if(t>a)return-1}else{if(t<a)return-1;if(t>a)return 1}}return 0});let A=k.length;for(let e=0;e<A;e++){let t=k[e];t.previous=e>0?k[e-1]:null,t.next=e<A-1?k[e+1]:null}return this.viewModel.selectedPoint=E,this.viewModel.navigationNodes.find(e=>e.id===O)}async navigateInDirection(e,t){let{viewModel:n}=this,{layer:r,layerFloorFilterClause:i,layerTimeExtent:a}=n,{direction:o,signal:s}=t,c=e?.[o];if(!c)throw new d(o);return _(c,o)&&await this._queryAndHandleFeatureResponse(r,c,i??void 0,a,{signal:s}),c}async navigateInSequence(e,t){return`step`in t?this.navigateBySkippingSteps(e,t):this.navigateTo(t)}async navigateTo(e){let{goTo:t}=e,{layer:n}=this,{layerFloorFilterClause:r,layerTimeExtent:i}=this.viewModel;if(!n)throw Error(`Layer is not defined`);let l=typeof t==`number`?t:1,u=this.viewModel.navigationNodes.find(e=>e.id===l);if(u)return u;let{response:d,error:f}=await h(n,l,1,t===`end`?`DESC`:`ASC`,r??void 0,i,{signal:e.signal});if(f)throw Error(`Error querying sequence features`);let p=d?.features[0];if(!p)throw Error(`No next node found`);let g=s.fromJSON({...p.toJSON(),layer:n}),{polygon:_}=c(g),v=a.fromJSON(o(_)),{response:y,error:b,nextLocation:x}=await m(n,v,r??void 0,i,{signal:e.signal});if(b)throw Error(`Error querying sequence features`);let S=[...y.features];S.push(p),y.features=S,this.viewModel.selectedPoint=x;let C=p.attributes.objectId;return await this.viewModel.processFeatureResponse(y,x,{signal:e.signal,loadBestImage:!1}),this.viewModel.selectedPoint=x,this.viewModel.navigationNodes.find(e=>e.id===C)}};e([r()],v.prototype,`_navigating`,void 0),e([r()],v.prototype,`currentNode`,null),e([r()],v.prototype,`layer`,null),e([r()],v.prototype,`navigating`,null),e([r()],v.prototype,`navigationNodes`,null),e([r({constructOnly:!0})],v.prototype,`viewModel`,void 0),v=e([i(`esri.widgets.OrientedImageryViewer.navigation.NavigationManager`)],v);export{v as default};
2
+ import{__decorate as e}from"tslib";import t from"../../../core/Accessor.js";import{throwIfAborted as n}from"../../../core/promiseUtils.js";import{property as r,subclass as i}from"../../../core/accessorSupport/decorators.js";import a from"../../../geometry/Point.js";import{polygonCentroidPoint as o}from"../../../geometry/support/centroid.js";import s from"../../../layers/orientedImagery/core/ExposurePoint.js";import{createFeatureCoverage as c}from"../featureCoverage.js";import{NoSequenceFoundError as l,NoImageInSequenceError as u,InvalidDirectionError as d}from"./errors.js";import{queryNextLocationFeatures as f,queryAfterSequenceField as p,querySequenceFeaturesAroundPoint as m,queryOffsetSequenceFeatures as h}from"./queries.js";import{shouldQueryAndNavigate as g}from"./utils.js";let _=class extends t{constructor(e){super(e),this._navigating=!1,this.viewModel=null}get currentNode(){return this.viewModel.currentNode}get layer(){return this.viewModel.layer}get navigating(){return this._navigating}get navigationNodes(){return this.viewModel.navigationNodes}async _queryAndHandleFeatureResponse(e,t,r,i,a){let{error:o,nextLocation:s,response:c}=await f(e,t,r,i,a);if(n(a),o)throw o;this.viewModel.selectedPoint=s,await this.viewModel.processFeatureResponse(c,s,{signal:a?.signal,loadBestImage:!1})}async afterNavigate(e,t,n){return await this.viewModel.selectBestFeature(t.id,n),t}async navigate(e,t){this._navigating=!0;try{let n;if(`direction`in t?n=await this.navigateInDirection(e,t):(`step`in t||`goTo`in t)&&(n=await this.navigateInSequence(e,t)),this._navigating=!1,!n)throw Error(`No next node found`);return await this.afterNavigate(e,n,t)}catch(e){throw this._navigating=!1,e}}async navigateBySkippingSteps(e,t){let{step:n}=t,{layer:r}=this,{layerFloorFilterClause:i,layerTimeExtent:d,preloadMediaSize:f}=this.viewModel;if(!r)throw Error(`Layer is not defined`);let h=e.attributes.sequenceOrder;if(!h)throw new l;let{response:g,error:_}=await p(r,h,n>0?`next`:`previous`,f,i??void 0,d,{signal:t.signal});if(_)throw Error(`Error querying sequence features`);let v=g?.features[0];if(!v)throw new u(n>0?`end`:`start`);let y=s.fromJSON({...v.toJSON(),layer:r}),{polygon:b}=c(y),x=a.fromJSON(o(b)),{response:S,error:C,nextLocation:w}=await m(r,x,i??void 0,d,{signal:t.signal});if(C)throw Error(`Error querying sequence features`);let T=new Set(S.features.map(e=>e.attributes.objectId));S.features=[...g.features.filter(e=>!T.has(e.attributes.objectId)),...S.features],this.viewModel.selectedPoint=w;let E=v.attributes.objectId;await this.viewModel.processFeatureResponse(S,w,{signal:t.signal,loadBestImage:!1});let D=this.viewModel.navigationNodes.toArray();D.sort((e,t)=>{let n=e.attributes.sequenceOrder,r=t.attributes.sequenceOrder;if(!n||!r)return 0;let i=n.length;for(let e=0;e<i;e++){let{value:t,sortOrder:i}=n[e],{value:a}=r[e];if(i===`desc`){if(t<a)return 1;if(t>a)return-1}else{if(t<a)return-1;if(t>a)return 1}}return 0});let O=D.length;for(let e=0;e<O;e++){let t=D[e];t.previous=e>0?D[e-1]:null,t.next=e<O-1?D[e+1]:null}return this.viewModel.selectedPoint=w,this.viewModel.navigationNodes.find(e=>e.id===E)}async navigateInDirection(e,t){let{viewModel:n}=this,{layer:r,layerFloorFilterClause:i,layerTimeExtent:a}=n,{direction:o,signal:s}=t,c=e?.[o];if(!c)throw new d(o);return g(c,o)&&await this._queryAndHandleFeatureResponse(r,c,i??void 0,a,{signal:s}),c}async navigateInSequence(e,t){return`step`in t?this.navigateBySkippingSteps(e,t):this.navigateTo(t)}async navigateTo(e){let{goTo:t}=e,{layer:n}=this,{layerFloorFilterClause:r,layerTimeExtent:i}=this.viewModel;if(!n)throw Error(`Layer is not defined`);let l=typeof t==`number`?t:1,u=this.viewModel.navigationNodes.find(e=>e.id===l);if(u)return u;let{response:d,error:f}=await h(n,l,1,t===`end`?`DESC`:`ASC`,r??void 0,i,{signal:e.signal});if(f)throw Error(`Error querying sequence features`);let p=d?.features[0];if(!p)throw Error(`No next node found`);let g=s.fromJSON({...p.toJSON(),layer:n}),{polygon:_}=c(g),v=a.fromJSON(o(_)),{response:y,error:b,nextLocation:x}=await m(n,v,r??void 0,i,{signal:e.signal});if(b)throw Error(`Error querying sequence features`);let S=[...y.features];S.push(p),y.features=S,this.viewModel.selectedPoint=x;let C=p.attributes.objectId;return await this.viewModel.processFeatureResponse(y,x,{signal:e.signal,loadBestImage:!1}),this.viewModel.selectedPoint=x,this.viewModel.navigationNodes.find(e=>e.id===C)}};e([r()],_.prototype,`_navigating`,void 0),e([r()],_.prototype,`currentNode`,null),e([r()],_.prototype,`layer`,null),e([r()],_.prototype,`navigating`,null),e([r()],_.prototype,`navigationNodes`,null),e([r({constructOnly:!0})],_.prototype,`viewModel`,void 0),_=e([i(`esri.widgets.OrientedImageryViewer.navigation.NavigationManager`)],_);export{_ as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{sqlAnd as e}from"../../../core/sql.js";import t from"../../../geometry/Point.js";import n from"../../../geometry/SpatialReference.js";import{polygonCentroidPoint as r}from"../../../geometry/support/centroid.js";import{searchImages as i}from"../../../layers/orientedImagery/queries.js";import{createFeatureCoverage as a}from"../featureCoverage.js";import{constructWhereClauseForSequenceFields as o}from"./utils.js";function s(e){return e.effectiveSequenceOrderField?.[0]?.fieldName??null}function c(e){let t=s(e);return t?`${t} IS NOT NULL`:null}async function l(e,n,o,s,c){let{polygon:l}=a(n.attributes),u=t.fromJSON(r(l));u.z=void 0;let d=_(e.definitionExpression,o),f,p;try{f=await i({layerInstanceOrURL:e,point:u,queryParams:{where:d,timeExtent:s}},c)}catch(e){p=e}return new h(u,f,p)}async function u(e,t,n,r,a){let o=e.effectiveSequenceOrderField?.map(({fieldName:e,sortOrder:t})=>`${e} ${t===`desc`?`DESC`:`ASC`}`),s=_(e.definitionExpression,n),c,l;try{c=await i({layerInstanceOrURL:e,point:t,queryParams:{where:s,orderByFields:o,returnGeometry:!0,outFields:[`*`],timeExtent:r}},a)}catch(e){l=e}return new h(t,c,l)}async function d(t,r,i,a=`ASC`,o,l,u){let d=s(t),f=_(t.definitionExpression,o,c(t)),p=typeof r==`number`?r-1:void 0;r===`string`&&d&&(f=e(f,`${d} = ${r}`));let h=t.createQuery();h.where=f,h.start=p,h.num=i,h.timeExtent=l,h.orderByFields=d?[`${d} ${a}`]:void 0,t.spatialReference.isGeographic&&(h.outSpatialReference=n.WebMercator);try{let e=await t.queryFeatures(h,u);return await g(e,t),new m(e)}catch(e){return new m(void 0,e)}}async function f(e,t,r,i=1,a,s,c){let l=e.effectiveSequenceOrderField?.map(({fieldName:e,sortOrder:t})=>`${e} ${t===`desc`?`DESC`:`ASC`}`),u=_(e.definitionExpression,a,o(t,r,e.fields)),d=e.createQuery();d.where=u,d.num=i,d.orderByFields=l,d.timeExtent=s,e.spatialReference.isGeographic&&(d.outSpatialReference=n.WebMercator);try{let t=await e.queryFeatures(d,c);return await g(t,e),new m(t)}catch(e){return new m(void 0,e)}}async function p(e,t,r,i,a){let o=Array.isArray(t)?t:[t],s=_(e.definitionExpression,r,`${e.objectIdField} IN (${o.join(`,`)})`),c=e.createQuery();c.where=s,c.returnZ=e.hasZ,e.spatialReference.isGeographic&&(c.outSpatialReference=n.WebMercator),i&&(c.timeExtent=i);try{let t=await e.queryFeatures(c,a);return await g(t,e),new m(t)}catch(e){return new m(void 0,e)}}class m{constructor(e,t){this.response=e,this.error=t}}class h{constructor(e,t,n){this.nextLocation=e,this.response=t,this.error=n}}async function g(e,t){let n=await import(`../../../layers/orientedImagery/core/ExposurePoint.js`).then(e=>e.default);e.features.forEach(e=>{let r=n.fromJSON({...e.toJSON(),layer:t});r&&(e.attributes=r)})}function _(...t){let n=`1=1`;return t.forEach(t=>{n=e(n,t)}),n}export{h as QueryNextLocationFeaturesResponse,m as QueryOrientedImageryFeaturesResponse,_ as mergeSQLstatements,f as queryAfterSequenceField,p as queryFeatureByObjectIds,l as queryNextLocationFeatures,d as queryOffsetSequenceFeatures,u as querySequenceFeaturesAroundPoint};
2
+ import{sqlAnd as e}from"../../../core/sql.js";import t from"../../../geometry/Point.js";import n from"../../../geometry/SpatialReference.js";import{polygonCentroidPoint as r}from"../../../geometry/support/centroid.js";import{searchImages as i}from"../../../layers/orientedImagery/queries.js";import{createFeatureCoverage as a}from"../featureCoverage.js";import{constructWhereClauseForSequenceFields as o}from"./utils.js";function s(e){return e.effectiveSequenceOrderField?.[0]?.fieldName??null}function c(e){let t=s(e);return t?`${t} IS NOT NULL`:null}async function l(e,n,o,s,c){let{polygon:l}=a(n.attributes),u=t.fromJSON(r(l));u.z=void 0;let d=_(e.definitionExpression,o),f,p;try{f=await i({layerInstanceOrURL:e,point:u,queryParams:{where:d,timeExtent:s}},c)}catch(e){p=e}return new h(u,f,p)}async function u(e,t,n,r,a){let o=e.effectiveSequenceOrderField?.map(({fieldName:e,sortOrder:t})=>`${e} ${t===`desc`?`DESC`:`ASC`}`),s=_(e.definitionExpression,n),c,l;try{c=await i({layerInstanceOrURL:e,point:t,queryParams:{where:s,orderByFields:o,returnGeometry:!0,outFields:[`*`],timeExtent:r}},a)}catch(e){l=e}return new h(t,c,l)}async function d(t,r,i,a=`ASC`,o,l,u){let d=s(t),f=_(t.definitionExpression,o,c(t)),p=typeof r==`number`?r-1:void 0;r===`string`&&d&&(f=e(f,`${d} = ${r}`));let h=t.createQuery();h.where=f,h.start=p,h.num=i,h.timeExtent=l,h.orderByFields=d?[`${d} ${a}`]:void 0,t.spatialReference.isGeographic&&(h.outSpatialReference=n.WebMercator);try{let e=await t.queryFeatures(h,u);return await g(e,t),new m(e)}catch(e){return new m(void 0,e)}}async function f(e,t,r,i=1,a,s,c){let l=e.effectiveSequenceOrderField?.map(({fieldName:e,sortOrder:t})=>{let n=t===`desc`;return`${e} ${(r===`previous`?!n:n)?`DESC`:`ASC`}`}),u=_(e.definitionExpression,a,o(t,r,e.fields)),d=e.createQuery();d.where=u,d.num=i,d.orderByFields=l,d.timeExtent=s,e.spatialReference.isGeographic&&(d.outSpatialReference=n.WebMercator);try{let t=await e.queryFeatures(d,c);return await g(t,e),new m(t)}catch(e){return new m(void 0,e)}}async function p(e,t,r,i,a){let o=Array.isArray(t)?t:[t],s=_(e.definitionExpression,r,`${e.objectIdField} IN (${o.join(`,`)})`),c=e.createQuery();c.where=s,c.returnZ=e.hasZ,e.spatialReference.isGeographic&&(c.outSpatialReference=n.WebMercator),i&&(c.timeExtent=i);try{let t=await e.queryFeatures(c,a);return await g(t,e),new m(t)}catch(e){return new m(void 0,e)}}class m{constructor(e,t){this.response=e,this.error=t}}class h{constructor(e,t,n){this.nextLocation=e,this.response=t,this.error=n}}async function g(e,t){let n=await import(`../../../layers/orientedImagery/core/ExposurePoint.js`).then(e=>e.default);e.features.forEach(e=>{let r=n.fromJSON({...e.toJSON(),layer:t});r&&(e.attributes=r)})}function _(...t){let n=`1=1`;return t.forEach(t=>{n=e(n,t)}),n}export{h as QueryNextLocationFeaturesResponse,m as QueryOrientedImageryFeaturesResponse,_ as mergeSQLstatements,f as queryAfterSequenceField,p as queryFeatureByObjectIds,l as queryNextLocationFeatures,d as queryOffsetSequenceFeatures,u as querySequenceFeaturesAroundPoint};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{sqlLiteral as e}from"../../../core/sql.js";import{getMetersPerUnitForSR as t}from"../../../core/units.js";import n from"../../../geometry/Extent.js";import{getWebMercatorScalingFactor as r}from"../../../layers/orientedImagery/transformations/utils.js";import{clockwiseDirections as i}from"../constants.js";function a(e,i){let{x:a,y:o,spatialReference:s}=e,c=r(o,s),l=t(s),u=i*c/l,d=a-u,f=a+u,p=o-u,m=o+u;return new n({xmin:d,xmax:f,ymin:p,ymax:m,spatialReference:e.spatialReference})}function o(e){return!e||e.previous===null||e.next===null}function s(e,t,n=1){if(e[t]==null)return!0;let r=e=>e?i.reduce((t,n)=>e[n]?t+1:t,0):0,a=new Set,o=[{node:e,depth:0}];for(;o.length;){let{node:e,depth:t}=o.shift();if(e&&!a.has(e)){if(a.add(e),r(e)<2)return!0;if(t<n)for(let n of i){let r=e[n];r&&!a.has(r)&&o.push({node:r,depth:t+1})}}}return!1}function c(e,t,n){if(!e)return`1=1`;switch(t){case`next`:return d(e,`next`,n);case`previous`:return d(e,`previous`,n);default:return`1=1`}}function l(e){return e!=null}function u(t,n,r){let i=r?.find(e=>e.name===t)?.type;return i===`date`||i===`string`?e(n,null,{type:i}):n}function d(e,t,n){return e.map((r,i)=>{let a=e.slice(0,i).map(e=>l(e?.value)?`(${e.fieldName} = ${u(e.fieldName,e.value,n)})`:null).filter(Boolean).join(` AND `),o=r.sortOrder===`asc`?t===`next`?`>`:`<`:t===`next`?`<`:`>`,s=[a,l(r?.value)?`(${r.fieldName} ${o} ${u(r.fieldName,r.value,n)})`:null].filter(Boolean);return s.length>1?`(${s.join(` AND `)})`:s.join(` AND `)}).filter(Boolean).join(` OR `)}export{c as constructWhereClauseForSequenceFields,a as createExtentAroundPoint,s as shouldQueryAndNavigate,o as shouldQueryAndNavigateSequentially};
2
+ import{sqlLiteral as e}from"../../../core/sql.js";import{getMetersPerUnitForSR as t}from"../../../core/units.js";import n from"../../../geometry/Extent.js";import{getWebMercatorScalingFactor as r}from"../../../layers/orientedImagery/transformations/utils.js";import{clockwiseDirections as i}from"../constants.js";function a(e,i){let{x:a,y:o,spatialReference:s}=e,c=r(o,s),l=t(s),u=i*c/l,d=a-u,f=a+u,p=o-u,m=o+u;return new n({xmin:d,xmax:f,ymin:p,ymax:m,spatialReference:e.spatialReference})}function o(e,t,n=1){if(e[t]==null)return!0;let r=e=>e?i.reduce((t,n)=>e[n]?t+1:t,0):0,a=new Set,o=[{node:e,depth:0}];for(;o.length;){let{node:e,depth:t}=o.shift();if(e&&!a.has(e)){if(a.add(e),r(e)<2)return!0;if(t<n)for(let n of i){let r=e[n];r&&!a.has(r)&&o.push({node:r,depth:t+1})}}}return!1}function s(e,t,n){if(!e)return`1=1`;switch(t){case`next`:return u(e,`next`,n);case`previous`:return u(e,`previous`,n);default:return`1=1`}}function c(e){return e!=null}function l(t,n,r){let i=r?.find(e=>e.name===t)?.type;return i===`date`||i===`string`?e(n,null,{type:i}):n}function u(e,t,n){return e.map((r,i)=>{let a=e.slice(0,i).map(e=>c(e?.value)?`(${e.fieldName} = ${l(e.fieldName,e.value,n)})`:null).filter(Boolean).join(` AND `),o=r.sortOrder===`asc`?t===`next`?`>`:`<`:t===`next`?`<`:`>`,s=[a,c(r?.value)?`(${r.fieldName} ${o} ${l(r.fieldName,r.value,n)})`:null].filter(Boolean);return s.length>1?`(${s.join(` AND `)})`:s.join(` AND `)}).filter(Boolean).join(` OR `)}export{s as constructWhereClauseForSequenceFields,a as createExtentAroundPoint,o as shouldQueryAndNavigate};
@@ -1,4 +1,4 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{prefersRTL as t,substitute as n}from"../intl.js";import{prefersReducedMotion as r}from"../core/a11yUtils.js";import{createTask as i}from"../core/asyncUtils.js";import a from"../core/Collection.js";import{deprecateWidget as o,deprecatedProperty as s}from"../core/deprecate.js";import c from"../core/Logger.js";import{isAbortError as l}from"../core/promiseUtils.js";import{watch as u,initial as d,syncAndInitial as f,on as p,sync as m}from"../core/reactiveUtils.js";import{throttle as h}from"../core/throttle.js";import{property as g,subclass as ee}from"../core/accessorSupport/decorators.js";import{or as te}from"../layers/orientedImagery/transformations/utils.js";import ne from"./Expand.js";import re from"./PanoramicVideoViewer.js";import _ from"./PanoramicViewer.js";import v from"./Widget.js";import{getAllArcPath as y}from"./OrientedImageryViewer/arcUtils.js";import{getDelegatedEvents as b,defaultImageGeometryField as x,defaultOIObjectIDField as ie,segmentArcs as S,featureCircleRadius as ae,navigationToolDimensionLength as C,sectorsRadii as w}from"./OrientedImageryViewer/constants.js";import{css as T,navigation as oe,navigationToolRotationFrom as E,navigationToolRotationTo as D,root as O}from"./OrientedImageryViewer/css.js";import{isFeatureAttachment as k,loadImageForAttachment as A,getThumbnailPixelBlock as j,renderImageWithRotation as M}from"./OrientedImageryViewer/galleryUtils.js";import N from"./OrientedImageryViewer/OrientedImageryViewerViewModel.js";import P from"./OrientedImageryViewer/OrientedImageryViewerVisibleElements.js";import{loadAlertComponents as F,Alert as I}from"./OrientedImageryViewer/components/Alert.js";import L from"./OrientedImageryViewer/components/ImageLocationWidget.js";import R from"./OrientedImageryViewer/components/ImageViewer.js";import z from"./OrientedImageryViewer/components/NavigationUI.js";import B from"./OrientedImageryViewer/components/NavigationUI360.js";import{loadSequentialNavigationUIComponents as V,SequentialNavigationUI as H}from"./OrientedImageryViewer/components/SequentialNavigationUI.js";import{loadVideoEnhancementComponents as U,renderEnhancementSlider as W,VideoEnhancementTools as G}from"./OrientedImageryViewer/components/VideoEnhancementTools.js";import{NoImageLoadedError as K}from"./OrientedImageryViewer/navigation/errors.js";import{loadCalciteComponents as se}from"./support/componentsUtils.js";import{globalCss as q}from"./support/globalCss.js";import{iconByKind as ce}from"./support/iconUtils.js";import{vmEvent as J,messageBundle as Y,tsx as X}from"./support/widget.js";import{setFocus as Z}from"./support/widgetUtils.js";const Q={overlayed:`overlayed`};let $=class extends v{constructor(e,t){super(e,t),this.actionBarPosition=`top`,this.dataCaptureEnabled=!1,this.galleryOpened=!1,this.imageEnhancementToolActive=!1,this.videoEnhancementToolActive=!1,this.imageOverlaysOpened=!1,this.navigationToolActive=!1,this.viewModel=new N,this.messagesCommon=null,this.messagesSketch=null,this.pixelMeasurementUnit=`meters`,this.pixelAreaMeasurementUnit=`square-meters`,this.selectedGroup=null,this.showCameraLocations=!1,this.showMapFeatures=!1,this.visibleElements=new P,this._defaultSuperimposeZOffsetPercentage=50,this._panoramicSuperimposeRadiusOffsetPercentage=50,this._exploreImages3DMenuOpen=!1,this._exploreImages3DCollapsed=!1,this._imageOverlaysLoaderTask=null,this._imageMeasurementToolsLoaderTask=null,this._navigationSettingsLoaderTask=null,this._navigationTask=null,this._clearMeasurements=()=>{this.viewModel.measureType=null,this.viewModel.triangularMeasurementActive=!1,this.viewModel.displayNewMeasurementButton=!0,this.viewModel.clearPreviousMeasurements()},this._clearImageLocation=()=>{this.imageLocationToolActive=!1,this.triangularMeasurementActive=!1},this._createNavigationTask=async e=>(this._navigationTask?.abort(),this._navigationTask=i(async t=>await this.navigate({...e,signal:t})),this._navigationTask.promise),this._navigateNext=async()=>await this._createNavigationTask({step:1}),this._navigatePrevious=async()=>await this._createNavigationTask({step:-1}),this._navigationToolExpanded=!1,this._navigationTool=null,this._galleryController=new AbortController,this._galleryObserver=new IntersectionObserver(this._lazyLoadImage.bind(this)),this._overlayedLayers=new a,this._previousAction=null,this._closeImageSequenceAlert=()=>{this._set(`noImageInSequenceError`,!1)},this._handleDataCaptureLayerChange=async e=>{if(this.dataCaptureLayer&&await this.stopDataCapture(!0),this.dataCaptureLayer=this.dataCaptureLayer===e?null:e,this.dataCaptureLayer)return this.startDataCapture(this.dataCaptureLayer)},this._handleNavigationSettingsInputChange=(e,t)=>{this.set(`${e}Threshold`,t)},this._handleNavigationSettingsToggle=e=>{this.viewModel.preserveAngle=e},this._handleOverlayLayerDeselect=e=>{let t=e.layer;t===this.dataCaptureLayer&&(this.stopDataCapture(),this.dataCaptureLayer=null),this.removeOverlayedGraphicsOnImage(`${t.id}`)},this._handleOverlayLayerSelect=e=>{let t=e.layer;this.viewModel.overlayMapFeatures(t,this.showMapFeatures),this.addHandles(u(()=>t.visible,()=>{this.viewModel.toggleOverlayMapFeatures(t.id,t.visible,this.showMapFeatures)}),`${Q.overlayed}-${t.id}`)},this._highlight=e=>{let t=e.target?.dataset.objectid;t&&this.viewModel.highlight(t)},this._onAction=e=>{let{target:t}=e,{dataset:{action:n}}=t,{_previousAction:r}=this,i=r?.dataset.action,a=i?.includes(`draw`)??!1,o=i===`select-feature`,s=i!==n;switch(n){case`draw-point`:case`draw-polygon`:case`draw-polyline`:{r&&te(o,a&&s)&&(r.active=!1),t.active=!t.active;let e=n.replace(`draw-`,``);this.viewModel.digitizeCreate(e),this._previousAction=t.active?t:null;break}case`save`:this.viewModel.saveDrawing();break;case`select-feature`:a&&(this._previousAction.active=!1),t.active=!t.active,this.viewModel.toggleSelection(t.active),this._previousAction=t.active?t:null;break;case`delete-feature`:this.viewModel.digitizeDelete()}},this._onImageOverlayClosed=e=>{e.stopPropagation(),this.imageOverlaysOpened=!1},this._onShowCameraLocationsChanged=e=>{this.showCameraLocations=e},this._onShowMapFeaturesChanged=e=>{this.showMapFeatures=e},this._removeHighlight=()=>this.viewModel.removeHighlight(),this._restoreOverlays=async()=>Promise.all(this._overlayedLayers.map(e=>this.viewModel.overlayMapFeatures(e,this.showMapFeatures))),this._scaleNavigationTool=()=>{this._navigationToolExpanded=!this._navigationToolExpanded},this._sketchLoaderTask=null,this._toggleExploreImages3DPanel=e=>{this._exploreImages3DCollapsed=e.target.collapsed},this._settingsToggle=null,this._toggleImageNavigation=async e=>{let t=this.navigationMode;this._closeAllImageTools(),this.navigationMode=t===e?null:e;let{activeViewer:n}=this.viewModel;if(!n)return;let{mode:r,preserveAngle:i}=this.viewModel;if(r==="default"){if(this.navigationMode===`directional`){let e=await this._loadNavigationSettings(),t=i===`heading`||i===`both`,n=i===`pitch`||i===`both`,{messages:r,messagesCommon:a}=this,o=new e({cameraHeadingThreshold:this.cameraHeadingThreshold,cameraPitchThreshold:this.cameraPitchThreshold,uiStrings:{configureNavigation:r.configureNavigation,preserveHeading:r.preserveHeading,preserveHeadingDescription:r.preserveHeadingDescription,preservePitch:r.preservePitch,preservePitchDescription:r.preservePitchDescription,settings:a.settings,thresholdLabel:r.thresholdLabel},onInputChange:this._handleNavigationSettingsInputChange,onToggle:this._handleNavigationSettingsToggle,preserveHeading:t,preservePitch:n});this._settingsToggle=new ne({content:o,expandIcon:`configure`}),this.viewModel.activeViewer?.ui.add(this._settingsToggle,{position:`top-left`})}else this._settingsToggle&&(this._settingsToggle.expanded=!1,this.viewModel.activeViewer?.ui.remove(this._settingsToggle))}},this._toggleImageAttributes=h(this.viewModel.toggleImageAttributes.bind(this.viewModel)),this._rootActionTitleToFocus=null,this._actionTitleToFocus=null,this._focusPendingAction=e=>{let t=this._actionTitleToFocus;if(!t)return;let n=[...e.querySelectorAll(`calcite-action`)].find(e=>e.getAttribute(`title`)===t);n&&(this._actionTitleToFocus=null,Z(n))},this.navigate=async e=>{let t=null;try{let{currentNode:n}=this.viewModel;if(!n)throw new K;t=await this.viewModel.navigate(n,e)}catch(e){l(e)||c.getLogger(this).error(`Error occurred while navigating`,e),[`NoImageInSequenceError`,`NoSequenceFoundError`].includes(e.name)&&this._set(`noImageInSequenceError`,!0)}return t},this.reset=()=>{this._closeAllImageTools(),this.viewModel.reset()},this._loadImageFromGallery=this._loadImageFromGallery.bind(this),this._registerGalleryItem=this._registerGalleryItem.bind(this),this._unregisterGalleryItem=this._unregisterGalleryItem.bind(this),this.loadImageFromSource=this.loadImageFromSource.bind(this),this.updateSuitabilities=this.updateSuitabilities.bind(this),this._handleVideoBrightnessChange=this._handleVideoBrightnessChange.bind(this),this._handleVideoContrastChange=this._handleVideoContrastChange.bind(this),this._handleBrightnessChange=this._handleBrightnessChange.bind(this),this._handleContrastChange=this._handleContrastChange.bind(this),this._handleSharpnessChange=this._handleSharpnessChange.bind(this),this._handleSuperimposeZOffsetChange=this._handleSuperimposeZOffsetChange.bind(this),this._toggleSuperimposeCameraLock=this._toggleSuperimposeCameraLock.bind(this),this._resetSuperimposeOffset=this._resetSuperimposeOffset.bind(this),this._resetVideoTools=this._resetVideoTools.bind(this),this._toggleEnhancementToolState=this._toggleEnhancementToolState.bind(this),this.announceDeprecation=()=>{o(c.getLogger(this),`Oriented Imagery Viewer`,`arcgis-oriented-imagery-viewer`,{version:`5.0`})}}initialize(){this.addHandles([u(()=>[this.viewModel?.bestFeatureAngle,this._navigationTool],([e,t])=>{t&&this._updateNavigationTool(t)},d),u(()=>this.currentCoverageVisible,e=>this._onCurrentCoverageVisibilityChange(e)),u(()=>this.isAdditionalCoverageVisible,e=>this._onAdditionalCoverageVisibilityChange(e)),u(()=>this.isAdditionalPointSourcesVisible,e=>this._onAdditionalCameraLocationsVisibility(e)),u(()=>this.superimposeViewEnabled,e=>{e?(this._closeAllImageTools(),this.selectedGroup=null,this.shouldShowSelectedImage=!1,this._disableExploreImages3D()):this._resetSuperimposeOffset()}),u(()=>({features:this.currentBestFeature,overlaysEnabled:this._imageOverlaysEnabled,showCameraLocations:this.showCameraLocations}),({overlaysEnabled:e,showCameraLocations:t})=>{e&&this.viewModel.overlayCameraLocations(t)},f),u(()=>({feature:this.currentBestFeature,overlaysEnabled:this._imageOverlaysEnabled,showMapFeatures:this.showMapFeatures}),async(e,t)=>{e.showMapFeatures!==t?.showMapFeatures&&await this.viewModel.toggleAllOverlayMapFeatures(e.showMapFeatures);let n=e.feature&&e.feature!==t?.feature,r=!e.overlaysEnabled&&!!t?.overlaysEnabled,i=e.overlaysEnabled&&!t?.overlaysEnabled,a=this.viewModel.mode===`video`||this.viewModel.mode===`panoramic-video`;if(r&&a){this.viewModel.removeAllOverlayMapFeatures(),this.viewModel.mode===`video`&&this.viewModel.videoViewModel?.clearOverlayGraphics();return}(n||i)&&(n&&(this._resetSuperimposeOffset(),this.viewModel.removeAllOverlayMapFeatures()),e.overlaysEnabled&&(this.dataCaptureLayer&&this.stopDataCapture(),await this._restoreOverlays(),this.dataCaptureLayer&&(await this.startDataCapture(this.dataCaptureLayer),this._previousAction?.active&&(this._previousAction.active=!1,this._previousAction=null))))},d),p(()=>this.viewModel,`popup-open`,async e=>{await this.view?.openPopup(e)},m),p(()=>this.viewModel,`popup-close`,()=>{this.view?.closePopup()},m),this._toggleImageAttributes])}loadDependencies(){return Promise.all([U(),V(),se({"action-bar":()=>import(`@esri/calcite-components/dist/components/calcite-action-bar`),"action-group":()=>import(`@esri/calcite-components/dist/components/calcite-action-group`),action:()=>import(`@esri/calcite-components/dist/components/calcite-action`),block:()=>import(`@esri/calcite-components/dist/components/calcite-block`),list:()=>import(`@esri/calcite-components/dist/components/calcite-list`),"list-item":()=>import(`@esri/calcite-components/dist/components/calcite-list-item`),panel:()=>import(`@esri/calcite-components/dist/components/calcite-panel`),shell:()=>import(`@esri/calcite-components/dist/components/calcite-shell`),dialog:()=>import(`@esri/calcite-components/dist/components/calcite-dialog`),slider:()=>import(`@esri/calcite-components/dist/components/calcite-slider`),notice:()=>import(`@esri/calcite-components/dist/components/calcite-notice`),"shell-panel":()=>import(`@esri/calcite-components/dist/components/calcite-shell-panel`),switch:()=>import(`@esri/calcite-components/dist/components/calcite-switch`)}),F()])}destroy(){this._galleryController.abort(),this._galleryObserver.disconnect(),this.currentBestFeature=null}get accuracyParametersMissing(){return this.viewModel.accuracyParametersMissing}get activeLayer(){return s(c.getLogger(this),`activeLayer`,{replacement:`layer`}),this.layer}set activeLayer(e){s(c.getLogger(this),`activeLayer`,{replacement:`layer`}),this.layer=e}get activeVideoIcon(){let{videoElement:e,videoViewModel:t}=this.viewModel;return!e?.loaded||!t||t.videoPaused?`play`:`pause`}get activeAudioIcon(){let{videoElement:e,videoViewModel:t}=this.viewModel;return e?.loaded&&t?.videoMuted?`sound-off`:`sound`}get cameraHeadingThreshold(){return this.viewModel.cameraHeadingThreshold}set cameraHeadingThreshold(e){this.viewModel.cameraHeadingThreshold=e}get cameraPitchThreshold(){return this.viewModel.cameraPitchThreshold}set cameraPitchThreshold(e){this.viewModel.cameraPitchThreshold=e}get canNavigateSequentially(){return!!this.layer?.effectiveSequenceOrderField?.length}get currentBestFeature(){return this.viewModel.currentBestFeature}set currentBestFeature(e){this.viewModel.currentBestFeature=e}get currentCoverageVisible(){return this.viewModel.currentCoverageVisible}set currentCoverageVisible(e){this.viewModel.currentCoverageVisible=e}get dataCaptureLayer(){return this.viewModel.dataCaptureLayer}set dataCaptureLayer(e){this.viewModel.dataCaptureLayer=e}get depthImageNotSupported(){return this.viewModel.depthImageNotSupported}get disabled(){return this.viewModel.disabled}set disabled(e){this.viewModel.disabled=e}get displayMessage(){return this.viewModel.displayMessage}get enhancementToolActive(){return this.viewModel.mode===`video`?this.videoEnhancementToolActive:this.imageEnhancementToolActive}set enhancementToolActive(e){this.viewModel.mode===`video`?this.videoEnhancementToolActive=e:this.imageEnhancementToolActive=e}get features(){return this.viewModel.features}get imagePointsInView(){return this.viewModel.imagePointsInView}get icon(){return`oriented-imagery-widget`}set icon(e){this._overrideIfSome(`icon`,e)}get imageGalleryEnabled(){return this.viewModel.imageGalleryEnabled}get imageLocationToolActive(){return this.viewModel.imageLocationToolState}set imageLocationToolActive(e){this.viewModel.imageLocationToolState=e}get invalidCameraHeading(){return this.viewModel.invalidCameraHeading}get isAdditionalCoverageVisible(){return this.viewModel.isAdditionalCoverageVisible}set isAdditionalCoverageVisible(e){this.viewModel.isAdditionalCoverageVisible=e}get isAdditionalPointSourcesVisible(){return this.viewModel.isAdditionalPointSourcesVisible}set isAdditionalPointSourcesVisible(e){this.viewModel.isAdditionalPointSourcesVisible=e}get mapImageConversionToolState(){return this.viewModel.mapImageConversionToolState}set mapImageConversionToolState(e){this.viewModel.setMapImageConversionToolState(e)}get measureType(){return this.viewModel.measureType}set measureType(e){this.viewModel.measureType=e}get layer(){return this.viewModel.layer}set layer(e){this.viewModel.layer=e}get navigationMode(){return this.viewModel.navigationMode}set navigationMode(e){this.viewModel.navigationMode=e}get popupEnabled(){let{popupEnabled:e,state:t}=this.viewModel;return(t===`image-loaded`||this.videoLoaded)&&e}get preloadMedia(){return this.viewModel.preloadMedia}set preloadMedia(e){this.viewModel.preloadMedia=e}get referencePoint(){return this.viewModel.referencePoint??null}get selectedFeatureObjectId(){return this.currentBestFeature?.attributes?.objectId??null}get selectedPoint(){return this.viewModel.selectedPoint}get sketchViewModel(){return this.viewModel.sketch}get triangularMeasurementActive(){return this.viewModel.triangularMeasurementActive}set triangularMeasurementActive(e){this.viewModel.triangularMeasurementActive=e}get videoLoaded(){let{mode:e,videoElement:t,panoramicVideoLoaded:n}=this.viewModel;return(e===`video`&&t?.loaded===!0||n)??!1}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}set determineWorkflowForFeature(e){this.viewModel.determineWorkflowForFeature=e}get determineWorkflowForFeature(){return this.viewModel.determineWorkflowForFeature}get shouldShowSelectedImage(){return this.viewModel.shouldShowSelectedImage}set shouldShowSelectedImage(e){this.viewModel.shouldShowSelectedImage=e}get superimposeViewEnabled(){return this.viewModel.superimposeViewEnabled}set superimposeViewEnabled(e){this.viewModel.superimposeViewEnabled=e}get defaultSuperimposeCameraLockEnabled(){return this.viewModel.defaultSuperimposeCameraLockEnabled}set defaultSuperimposeCameraLockEnabled(e){this.viewModel.defaultSuperimposeCameraLockEnabled=e}set updateFootprint(e){this.viewModel.updateFootprint=e}get updateFootprint(){return this.viewModel.updateFootprint}get verticalFilterEnabled(){return this.viewModel.verticalFilterEnabled}set verticalFilterEnabled(e){this.viewModel.verticalFilterEnabled=e}get _actionBarLayout(){return this.actionBarPosition===`start`||this.actionBarPosition===`end`?`vertical`:`horizontal`}_renderActionBar(){let{selectedGroup:e,superimposeViewEnabled:n}=this,r=this._actionBarLayout;if(n)return X(`calcite-action-bar`,{"data-testid":`action-bar--superimpose`,expandToggleDisabled:!0,layout:r,slot:`action-bar`},X(`calcite-action-group`,{overlayPositioning:`fixed`},this._superimposeViewToggle()));let i=t();return X(`calcite-action-bar`,{afterUpdate:this._focusPendingAction,"data-testid":`action-bar`,expandToggleDisabled:!0,layout:r,slot:`action-bar`},!e&&X(`calcite-action-group`,{key:`main`,overlayPositioning:`fixed`},this._searchGroupToggle(),this._overlaysGroupToggle(),this._navigationGroupToggle(),this._measurementsGroupToggle(),this._utilitiesGroupToggle()),this._renderGroupBackAction(i),e===`overlays`&&X(`calcite-action-group`,{key:`overlays`,overlayPositioning:`fixed`},this._currentFootprintToggle(),this._additionalFootprintToggle(),this._additionalPointSourcesToggle(),this._mapImageConversionToggle(),this._imageOverlaysToggle()),e===`navigation`?this._directionToolsToggle():null,e===`navigation`&&X(`calcite-action-group`,{key:`context-navigation`,overlayPositioning:`fixed`},this._navigationToolToggle(),this._imageGalleryToggle()),e===`measurements`&&this._measurementToolToggle(),e===`utilities`&&X(`calcite-action-group`,{overlayPositioning:`fixed`},this._imageEnhancementsToggle(),this._videoEnhancementsToggle(),this._superimposeViewToggle(),this._openPopupAction()),e===`search`&&X(`calcite-action-group`,{key:`search`,overlayPositioning:`fixed`},this._exploreImagesToggle(),this._exploreImages3DToggle(),this._showSelectedImageToggle()))}_renderGroupBackAction(e){return this.selectedGroup?X(`calcite-action`,{bind:this,icon:e?`arrow-right`:`arrow-left`,key:`back-arrow`,text:this.messages.previous,title:this.messages.previous,onclick:()=>this._toggleGroupSelection(null)}):null}get _activeMeasurementHeading(){let{measureType:e,messages:t,triangularMeasurementActive:n}=this,{groundArea:r,heightAboveGround:i,groundDistance:a,triangulatedAreaHeading:o,triangulatedDistanceHeading:s}=t;if(n)return e===`area`?o:s;switch(e){case`area`:return r;case`height`:return i;default:return a}}_additionalFootprintToggle(){let{isAdditionalCoverageVisible:e,invalidCameraHeading:t,visibleElements:{additionalFootprintToggle:n}}=this;return n?X(`calcite-action`,{active:e,bind:this,class:T.addCoverage,disabled:t,icon:`trapezoid-area`,text:this.messages.additionalFootprints,title:this.messages.additionalFootprints,onclick:this._toggleAdditionalCoverage}):null}_additionalPointSourcesToggle(){let{isAdditionalPointSourcesVisible:e,invalidCameraHeading:t,visibleElements:{additionalCameraLocationsToggle:n}}=this;return n?X(`calcite-action`,{active:e,bind:this,class:T.addExpPoints,disabled:t,icon:`circle-area`,text:this.messages.additionalCameraLocations,title:this.messages.additionalCameraLocations,onclick:this._toggleAdditionalCameraLocations}):null}get _measurementToggle(){let{viewModel:{state:e,measureType:t,currentBestFeatureMeasurementImage:n},triangularMeasurementActive:r,id:i}=this;if(e!==`image-loaded`||!t||r&&!n)return;this._imageMeasurementToolsLoaderTask||this._loadImageMeasurementResources();let a=this._imageMeasurementToolsLoaderTask?.value;return a?X(`calcite-dialog`,{bind:this,dragEnabled:!0,escapeDisabled:!0,heading:this._activeMeasurementHeading,id:`${i}-${t}-measurement`,open:!0,placement:`bottom-start`,resizable:!0,scale:`s`,slot:`dialogs`,width:`s`,onCalciteDialogBeforeClose:this._clearMeasurements},X(a,{measurementType:t,measurementUnitMessages:this.measurementUnitMessages,messages:this.messages,oiViewModel:this.viewModel})):null}get _renderRoot(){let{viewModel:{state:e},triangularMeasurementActive:t}=this;return X(`calcite-panel`,{bind:this,class:t?T.viewerContainerMeasurement:T.viewerContainer,heading:this.visibleElements.header?this.messages.title:void 0,loading:e.includes(`loading`)&&!t},X(`calcite-shell`,null,this.visibleElements.menu?X(`calcite-shell-panel`,{collapsed:!0,displayMode:`dock`,slot:`panel-${this.actionBarPosition}`},this._renderActionBar()):null,X(`calcite-panel`,null,this._imageViewer,this._panoramicViewer,this._panoramicVideoViewer,this._videoViewer,this._messageBox,this.invalidCameraHeading?null:[this._imageGalleryPanel,this._renderNavigation,this._imageOverlaysPanel()],this._exploreImages3DTools,this._imageEnhancementTools,this._videoEnhancementTools,this._superimposeTools,this._renderSketch(),this._navigationUI),this._imageViewerTriangular,this._measurementToggle,this._locationToggle,this.invalidCameraHeading?this._renderWarning(this.messages.invalidCameraHeadingWarningTitle,this.messages.invalidCameraHeadingWarningDescription):null,this.depthImageNotSupported?this._renderWarning(this.messages.depthImageNotSupportedTitle,this.messages.depthImageNotSupportedDescription):null,this.noImageInSequenceError?this._renderWarning(this.messages.sequentialNavigationWarning,this.messages.sequentialNavigationWarning,this._closeImageSequenceAlert):null))}_currentFootprintToggle(){let{currentCoverageVisible:e,invalidCameraHeading:t}=this,{currentFootprintToggle:n}=this.visibleElements;return n?X(`calcite-action`,{active:e,bind:this,class:T.currentCoverage,disabled:t,icon:`trapezoid-area`,text:this.messages.currentFootprint,title:this.messages.currentFootprint,onclick:this._toggleCurrentCoverage}):null}_exploreImagesToggle(){let{exploreImages:e}=this.messages;return this.visibleElements.exploreImages?X(`calcite-action`,{active:!this.disabled,bind:this,icon:`oriented-imagery-widget`,text:e,title:e,onclick:this._toggleExploreImages}):null}get _imageEnhancementTools(){let{enhancementToolActive:e,viewModel:{brightness:t,contrast:n,sharpness:r,state:i}}=this;return e&&i===`image-loaded`?X(`calcite-panel`,{bind:this,class:T.imageEnhancementWrapper,closable:!0,closed:!e,heading:this.messages.imageEnhancement,key:this.messages.imageEnhancement,onCalcitePanelClose:this._toggleEnhancementToolState},X(`div`,{class:T.imageEnhancementTools},W({title:this.messages.brightness,value:t,handleChange:this._handleBrightnessChange}),W({title:this.messages.contrast,value:n,handleChange:this._handleContrastChange}),W({title:this.messages.sharpness,value:r,max:1,min:0,ticks:.5,step:.1,handleChange:this._handleSharpnessChange})),X(`calcite-action`,{bind:this,icon:`reset`,slot:`header-actions-end`,text:this.messagesCommon.reset,title:this.messagesCommon.reset,onclick:this._resetImageTools})):null}get _videoEnhancementTools(){let{enhancementToolActive:e,viewModel:{videoViewModel:t,mode:n},messages:{videoEnhancement:r,brightness:i,contrast:a},messagesCommon:{reset:o}}=this;return!e||n!==`video`||!t?null:X(G,{brightness:t.videoBrightness,contrast:t.videoContrast,handleBrightnessChange:this._handleVideoBrightnessChange,handleContrastChange:this._handleVideoContrastChange,resetTools:this._resetVideoTools,uiStrings:{videoEnhancement:r,brightness:i,contrast:a,reset:o},videoEnhancementToolActive:e,onClose:this._toggleEnhancementToolState})}get _superimposeTools(){let{superimposeViewEnabled:e,view:t,viewModel:{state:n,mode:r},messages:{superimposeSettings:i,superimposeSliderTitle:a,superimposeSliderTooltip:o}}=this,s=r===`panoramic`;return!e||t?.type!==`3d`||n!==`image-loaded`?null:X(`calcite-panel`,{bind:this,class:this.classes(T.imageEnhancementWrapper,T.superimposeTools),heading:i,key:`superimpose-settings`},X(`div`,{class:T.imageEnhancementTools},W({title:a,tooltip:o,value:s?this._panoramicSuperimposeRadiusOffsetPercentage:this._defaultSuperimposeZOffsetPercentage,max:100,min:0,ticks:10,step:1,handleChange:this._handleSuperimposeZOffsetChange})),X(`calcite-action`,{bind:this,icon:`reset`,slot:`header-actions-end`,text:this.messagesCommon.reset,title:this.messagesCommon.reset,onclick:this._resetSuperimposeOffset}))}_imageEnhancementsToggle(){let{state:e,mode:t}=this.viewModel,{enhancementTool:n}=this.visibleElements;return!n||t===`video`?null:X(`calcite-action`,{active:this.enhancementToolActive,bind:this,disabled:t!=="default"||e!==`image-loaded`,icon:`sliders-horizontal`,text:this.messages.imageEnhancement,title:this.messages.imageEnhancement,onclick:this._toggleEnhancementToolState})}_exploreImages3DToggle(){let{exploreImages3D:e}=this.messages,t=this.view?.type!==`3d`||!this.layer?.hasZ,n=this.verticalFilterEnabled||this.viewModel.frustumSearchEnabled;return this.visibleElements.exploreImages3D?X(`calcite-action`,{active:n,bind:this,disabled:t,icon:`3d-search`,text:e,title:e,onclick:this._toggleExploreImages3DMenu}):null}get _exploreImages3DTools(){let{frustumRange:e,search3DFilters:t,verticalRange:n}=this.messages,r=this.verticalFilterEnabled,i=this.viewModel.frustumSearchEnabled;return!this.visibleElements.exploreImages3D||!this._exploreImages3DMenuOpen?null:X(`calcite-panel`,{bind:this,class:T.submenu,closed:!this._exploreImages3DMenuOpen,collapsed:this._exploreImages3DCollapsed,collapseDirection:`up`,collapsible:!0,heading:t,key:`explore-images-3d-tools`,onCalcitePanelToggle:this._toggleExploreImages3DPanel},X(`calcite-list`,{label:t,scale:`s`},X(`calcite-list-item`,{bind:this,label:n},X(`calcite-switch`,{checked:r,scale:`s`,slot:`content-start`,onCalciteSwitchChange:e=>this._toggleExploreImages3DSelection(`3d`,e)})),X(`calcite-list-item`,{bind:this,label:e},X(`calcite-switch`,{checked:i,scale:`s`,slot:`content-start`,onCalciteSwitchChange:e=>this._toggleExploreImages3DSelection(`frustum`,e)}))))}_showSelectedImageToggle(){let{displayImages:e}=this.messages,t=this.viewModel.mode.includes(`video`);return this.visibleElements.showSelectedImage?X(`calcite-action`,{active:this.shouldShowSelectedImage,bind:this,disabled:t,icon:`show-oriented-imagery`,text:e,title:e,onclick:this._toggleShowSelectedImage}):null}_superimposeViewToggle(){let{superimposeView:e}=this.messages,{mode:t,accuracyParametersMissing:n}=this.viewModel,r=!this.superimposeViewEnabled&&(this.view?.type!==`3d`||t.includes(`video`)||n);return this.visibleElements.superimpose?X(`calcite-action`,{active:this.superimposeViewEnabled,bind:this,disabled:r,icon:`superimpose`,text:e,title:e,onclick:this._toggleSuperimposeView}):null}_videoEnhancementsToggle(){let{mode:e}=this.viewModel,{videoEnhancement:t}=this.messages,{enhancementTool:n}=this.visibleElements;return!n||e!==`video`?null:X(`calcite-action`,{active:this.enhancementToolActive,bind:this,disabled:e!==`video`,icon:`sliders-horizontal`,text:t,title:t,onclick:this._toggleEnhancementToolState})}get _imageGalleryPanel(){let{container:e,galleryOpened:t,imageGalleryEnabled:n}=this;return n&&t&&e?this._imageGalleryContext:null}get _imageGalleryContext(){let{galleryOpened:e,invalidCameraHeading:t}=this;return X(`calcite-panel`,{bind:this,class:T.carousel,closable:!0,closed:!e,disabled:t,heading:this.messages.imageGallery,key:this.messages.imageGallery,onCalcitePanelClose:this._toggleImageGallery},X(`div`,{class:T.carouselContainer},this._renderThumbnails))}_imageGalleryToggle(){let{imageGalleryEnabled:e,invalidCameraHeading:t,visibleElements:{imageGallery:n}}=this;return n?X(`calcite-action`,{active:this.galleryOpened,bind:this,disabled:!e||t,icon:`images`,text:this.messages.imageGallery,title:this.messages.imageGallery,onclick:this._toggleImageGallery}):null}get _imageOverlaysComponent(){let{_imageOverlayMessages:e,_imageOverlaysLoaderTask:t,_overlayedLayers:n,dataCaptureEnabled:r,dataCaptureLayer:a,imageOverlaysOpened:o,showCameraLocations:s,showMapFeatures:c,view:l,layer:u}=this,d=r&&!this.viewModel.mode.includes(`video`);if(!u)return null;let f=u.imageGeometryField?.length?u.imageGeometryField:x,p=u.imageReferenceField?.length?u.imageReferenceField:ie;t||(this._imageOverlaysLoaderTask=i(async()=>(await import(`./OrientedImageryViewer/components/ImageOverlays.js`)).default));let m=this._imageOverlaysLoaderTask?.value;return m?X(m,{closed:!o,dataCaptureEnabled:d,dataCaptureLayer:a,imageGeometryField:f,imageReferenceField:p,messages:e,overlayedLayers:n,showCameraLocations:s,showMapFeatures:c,view:l,onDataCaptureLayerChanged:this._handleDataCaptureLayerChange,onFilterCapturedFeatures:this.viewModel.filterCapturedFeatures,onImageOverlaysClosed:this._onImageOverlayClosed,onLayerDeselected:this._handleOverlayLayerDeselect,onLayerSelected:this._handleOverlayLayerSelect,onShowCameraLocationsChanged:this._onShowCameraLocationsChanged,onShowMapFeaturesChanged:this._onShowMapFeaturesChanged}):null}get _navigationUI(){let{navigationMode:e,viewModel:t}=this,{mode:n,state:r}=t;if(!(!e||n!=="default"&&n!==`panoramic`||r!==`image-loaded`))return e===`directional`?n==="default"?X(z,{cameraHeadingThreshold:this.cameraHeadingThreshold,cameraPitchThreshold:this.cameraPitchThreshold,currentNode:this.viewModel.currentNode,navigate:this._createNavigationTask,nodes:this.viewModel.navigationNodes,preserveAngle:this.viewModel.preserveAngle}):X(B,{currentNode:this.viewModel.currentNode,navigate:this._createNavigationTask,nodes:this.viewModel.navigationNodes}):X(H,{layout:`horizontal`,uiStrings:{end:this.messages.end,next:this.messages.next,previous:this.messages.previous,start:this.messages.start},onNext:this._navigateNext,onPrev:this._navigatePrevious})}get _imageOverlayMessages(){return{...this.messages,...this.messagesSketch}}get _imageSketchToolsMessages(){return{...this.messagesCommon,...this.messagesSketch}}_imageOverlaysPanel(){let{imageOverlaysOpened:e}=this,t=this.classes({[T.imageOverlaysContainer]:!0,[q.hidden]:!e||!this._imageOverlaysEnabled});return X(`div`,{class:t,key:this.messages.imageOverlays},this._imageOverlaysComponent)}_imageOverlaysToggle(){let{imageOverlaysOpened:e,invalidCameraHeading:t,visibleElements:{imageOverlays:n}}=this;return n?X(`calcite-action`,{active:e,bind:this,disabled:!this._imageOverlaysEnabled||t,icon:`layers`,text:this.messages.imageOverlays,title:this.messages.imageOverlays,onclick:this._toggleImageOverlays}):null}get _imageOverlaysEnabled(){return this.viewModel.overlayGraphicsEnabled}get _imageViewer(){let{displayMessage:e,loadImageViewer:t,mode:n,clickAction:r,state:i}=this.viewModel,a=e!=null||n!=="default"||i.includes(`loading`);return X(R,{afterCreate:t,clickAction:r,visible:!a})}get _imageViewerTriangular(){let{messages:e,triangularMeasurementActive:t}=this,{displayMessage:n,storeImageMeasurementViewer:r,storePanoramicMeasurementViewer:i,mode:a,state:o,clickAction:s}=this.viewModel,c=n!=null||a===`none`||a===`video`,l=this.classes({[T.viewer]:!c,[T.viewerHidden]:c});return t?X(`calcite-panel`,{class:T.viewerContainerMeasurement,heading:e.measurementViewerHeading,loading:o.includes(`loading`)},X(`calcite-panel`,{bind:this,class:l},a==="default"?X(R,{afterCreate:r,clickAction:s,uiStrings:e}):X(_,{afterCreate:i,clickAction:s,uiStrings:e}))):null}_utilitiesGroupToggle(){let{utilityTools:e}=this.messages;return this.visibleElements.utilityTools?X(`calcite-action`,{bind:this,icon:`tools`,key:`utilities-group-toggle`,text:e,title:e,onclick:e=>this._toggleGroupSelection(`utilities`,e)}):null}_searchGroupToggle(){let{searchTools:e}=this.messages;return this.visibleElements.searchTools?X(`calcite-action`,{bind:this,icon:`search`,key:`search-group-toggle`,text:e,title:e,onclick:e=>this._toggleGroupSelection(`search`,e)}):null}get _videoViewer(){let{mode:e,loadVideoViewer:t,videoViewModel:n}=this.viewModel,{control:r,reset:i}=this.messagesCommon,{mute:a,unmute:o}=this.messages,s=e!==`video`,c=this.classes({[T.viewer]:!s,[T.viewerHidden]:s}),l=`esri-image-viewer`,u=`${l}__slider-container`;return X(`calcite-panel`,{bind:this,class:c},X(`calcite-panel`,{afterCreate:t,class:this.classes(q.widget,l)}),X(`calcite-block`,{class:u,expanded:!0},X(`calcite-slider`,{bind:this,labelHandles:!0,labelTicks:!0,max:n?.videoDuration,minLabel:`0`,value:n?.currentTime??0,onCalciteSliderChange:this._handleVideoSeek})),X(`calcite-action-bar`,{"data-testid":`action-bar--video-controls`,expandToggleDisabled:!0,layout:`horizontal`},X(`calcite-action-group`,{overlayPositioning:`fixed`},X(`calcite-action`,{bind:this,icon:this.activeVideoIcon,text:`Play`,title:n?.videoPaused?r.play:r.pause,onclick:()=>n?.playVideoHandler()})),X(`calcite-action-group`,{overlayPositioning:`fixed`},X(`calcite-action`,{bind:this,icon:`refresh`,text:`Rewind`,title:i,onclick:()=>n?.rewindVideoHandler()})),X(`calcite-action-group`,{overlayPositioning:`fixed`},X(`calcite-action`,{bind:this,icon:this.activeAudioIcon,text:`Audio`,title:n?.videoMuted?a:o,onclick:()=>n?.toggleAudio()}))))}get _locationToggle(){let{viewModel:{state:e,groundCoordinates:t,groundCoordinatesAccuracy:n,groundCoordinatesAccuracyLoading:r,triangulatedPoint:i},imageLocationToolActive:a,triangularMeasurementActive:o,messages:{groundLocation:s,triangulatedLocationHeading:c}}=this;if(e!==`image-loaded`||!t||!a)return;let l=t;if(o){if(!i)return;l=i}return X(`calcite-dialog`,{bind:this,dragEnabled:!0,escapeDisabled:!0,heading:o?c:s,id:s,open:!0,placement:`bottom-start`,resizable:!0,scale:`s`,slot:`dialogs`,width:`s`,onCalciteDialogBeforeClose:this._clearImageLocation},X(L,{accuracy:n,accuracyLoading:r,groundCoordinates:l,messages:this.messages}))}_mapImageConversionToggle(){let{mapImageConversionToolState:e,viewModel:{state:t,disabled:n},videoLoaded:r,invalidCameraHeading:i,visibleElements:{mapImageConversionTool:a}}=this,o=!!(this.viewModel.mode===`video`&&r&&this.viewModel.videoViewModel?.videoPaused),s=this.viewModel.mode===`panoramic-video`&&this.viewModel.panoramicVideoLoaded&&this.viewModel.panoramicVideoPaused,c=t!==`image-loaded`&&!o&&!s||i||n;return a?X(`calcite-action`,{active:e,bind:this,disabled:c,icon:`image-pin`,text:this.messages.mapImageConversionTool,title:this.messages.mapImageConversionTool,onclick:this._toggleMapImageConversionToolState}):null}_measurementToolToggle(){let{measureType:e,viewModel:t,accuracyParametersMissing:n,messages:r,triangularMeasurementActive:i}=this,{state:a}=t,{groundDistance:o,groundArea:s,heightAboveGround:c,groundLocation:l,triangulatedDistanceHeading:u,triangulatedAreaHeading:d,triangulatedLocationHeading:f}=r,p=a!==`image-loaded`||n,m=this._actionBarLayout;return X(`calcite-action-group`,{key:`measurement-tools`,layout:m,overlayPositioning:`fixed`,scale:`m`},X(`calcite-action`,{active:e===`distance`&&!i,bind:this,disabled:p,icon:`measure-line`,key:`distance-measurement`,text:o,title:o,onclick:e=>this._toggleMeasurementSketch(e,`distance`)}),X(`calcite-action`,{active:e===`area`&&!i,bind:this,disabled:p,icon:`measure-area`,key:`area-measurement`,text:s,title:s,onclick:e=>this._toggleMeasurementSketch(e,`area`)}),X(`calcite-action`,{active:e===`height`,bind:this,disabled:p,icon:`measure-building-height-top-base`,key:`height-measurement`,text:c,title:c,onclick:e=>this._toggleMeasurementSketch(e,`height`)}),X(`calcite-action`,{active:this.imageLocationToolActive?!i:!1,bind:this,disabled:p,icon:`pin-tear`,key:`surface-location`,text:l,title:l,onclick:this._toggleLocationTool}),X(`calcite-action`,{active:i?this.imageLocationToolActive:!1,bind:this,disabled:p,icon:`dual-image-location`,key:`triangular-location`,text:f,title:f,onclick:this._toggleTriangularLocation}),X(`calcite-action`,{active:i?this.measureType===`distance`:!1,bind:this,disabled:p,icon:`dual-image-distance`,key:`triangular-distance`,text:u,title:u,onclick:this._toggleTriangularDistanceMeasurements}),X(`calcite-action`,{active:i?this.measureType===`area`:!1,bind:this,disabled:p,icon:`dual-image-area`,key:`triangular-area`,text:d,title:d,onclick:this._toggleTriangularAreaMeasurements}))}get _messageBox(){let{messages:e,viewModel:{displayMessage:t,mode:r}}=this;if(!t||r===`video`)return null;let{key:i,map:a,type:o}=t,s=`${a?n(e[i],a):e[i]}`,c=o===`error`?`danger`:o===`warn`?`warning`:`info`;return X(`calcite-notice`,{appearance:`transparent`,class:T.notice,icon:ce[c],kind:c,open:!0},X(`div`,{slot:`message`},s))}async _loadNavigationSettings(){return this._navigationSettingsLoaderTask||=i(async()=>(await import(`./OrientedImageryViewer/components/NavigationSettings.js`)).default),await this._navigationSettingsLoaderTask.promise}_measurementsGroupToggle(){let{measurementTools:e}=this.messages,{state:t,accuracyParametersMissing:n}=this.viewModel,r=t!==`image-loaded`||n;return this.visibleElements.measurementTools?X(`calcite-action`,{bind:this,disabled:r,icon:`measure-line`,key:`measurements-group-toggle`,text:e,title:e,onclick:e=>this._toggleGroupSelection(`measurements`,e)}):null}_navigationGroupToggle(){let{imageNavigation:e}=this.messages;return this.visibleElements.imageNavigationTools?X(`calcite-action`,{bind:this,icon:`absolute-direction`,key:`navigation-group-toggle`,text:e,title:e,onclick:e=>this._toggleGroupSelection(`navigation`,e)}):null}_navigationToolToggle(){let{state:e}=this.viewModel,{visibleElements:{navigationTool:t},videoLoaded:n}=this;return t?X(`calcite-action`,{active:this.navigationToolActive,bind:this,disabled:e!==`image-loaded`&&!n||this.invalidCameraHeading,icon:`explore`,text:this.messages.navigationTool,title:this.messages.navigationTool,onclick:this._toggleNavigationTool}):null}_directionToolsToggle(){let{messages:e,viewModel:t,visibleElements:n}=this,{directionalNavigation:r,sequentialNavigation:i}=n,{state:a}=t,{directionalNavigation:o,directionalNavigationDescription:s,sequentialNavigation:c,sequentialNavigationDescription:l}=e,u=this._actionBarLayout;return X(`calcite-action-group`,{key:`navigation-tools`,layout:u,overlayPositioning:`fixed`,scale:`m`},r?X(`calcite-action`,{active:this.navigationMode===`directional`,bind:this,disabled:a!==`image-loaded`||this.invalidCameraHeading,icon:`directional-navigation`,text:o,title:o+`
2
+ import{__decorate as e}from"tslib";import{prefersRTL as t,substitute as n}from"../intl.js";import{prefersReducedMotion as r}from"../core/a11yUtils.js";import{createTask as i}from"../core/asyncUtils.js";import a from"../core/Collection.js";import{deprecateWidget as o,deprecatedProperty as s}from"../core/deprecate.js";import c from"../core/Logger.js";import{isAbortError as l}from"../core/promiseUtils.js";import{watch as u,initial as d,syncAndInitial as f,on as p,sync as m}from"../core/reactiveUtils.js";import{throttle as h}from"../core/throttle.js";import{property as g,subclass as ee}from"../core/accessorSupport/decorators.js";import{or as te}from"../layers/orientedImagery/transformations/utils.js";import ne from"./Expand.js";import re from"./PanoramicVideoViewer.js";import _ from"./PanoramicViewer.js";import v from"./Widget.js";import{getAllArcPath as y}from"./OrientedImageryViewer/arcUtils.js";import{getDelegatedEvents as b,defaultImageGeometryField as x,defaultOIObjectIDField as ie,segmentArcs as S,featureCircleRadius as ae,navigationToolDimensionLength as C,sectorsRadii as w}from"./OrientedImageryViewer/constants.js";import{css as T,navigation as oe,navigationToolRotationFrom as E,navigationToolRotationTo as D,root as O}from"./OrientedImageryViewer/css.js";import{isFeatureAttachment as k,loadImageForAttachment as A,getThumbnailPixelBlock as j,renderImageWithRotation as M}from"./OrientedImageryViewer/galleryUtils.js";import N from"./OrientedImageryViewer/OrientedImageryViewerViewModel.js";import P from"./OrientedImageryViewer/OrientedImageryViewerVisibleElements.js";import{loadAlertComponents as F,Alert as I}from"./OrientedImageryViewer/components/Alert.js";import L from"./OrientedImageryViewer/components/ImageLocationWidget.js";import R from"./OrientedImageryViewer/components/ImageViewer.js";import z from"./OrientedImageryViewer/components/NavigationUI.js";import B from"./OrientedImageryViewer/components/NavigationUI360.js";import{loadSequentialNavigationUIComponents as V,SequentialNavigationUI as H}from"./OrientedImageryViewer/components/SequentialNavigationUI.js";import{loadVideoEnhancementComponents as U,renderEnhancementSlider as W,VideoEnhancementTools as G}from"./OrientedImageryViewer/components/VideoEnhancementTools.js";import{NoImageLoadedError as K}from"./OrientedImageryViewer/navigation/errors.js";import{loadCalciteComponents as se}from"./support/componentsUtils.js";import{globalCss as q}from"./support/globalCss.js";import{iconByKind as ce}from"./support/iconUtils.js";import{vmEvent as J,messageBundle as Y,tsx as X}from"./support/widget.js";import{setFocus as Z}from"./support/widgetUtils.js";const Q={overlayed:`overlayed`};let $=class extends v{constructor(e,t){super(e,t),this.actionBarPosition=`top`,this.dataCaptureEnabled=!1,this.galleryOpened=!1,this.imageEnhancementToolActive=!1,this.videoEnhancementToolActive=!1,this.imageOverlaysOpened=!1,this.navigationToolActive=!1,this.viewModel=new N,this.messagesCommon=null,this.messagesSketch=null,this.pixelMeasurementUnit=`meters`,this.pixelAreaMeasurementUnit=`square-meters`,this.selectedGroup=null,this.showCameraLocations=!1,this.showMapFeatures=!1,this.visibleElements=new P,this._defaultSuperimposeZOffsetPercentage=50,this._panoramicSuperimposeRadiusOffsetPercentage=50,this._exploreImages3DMenuOpen=!1,this._exploreImages3DCollapsed=!1,this._imageOverlaysLoaderTask=null,this._imageMeasurementToolsLoaderTask=null,this._navigationSettingsLoaderTask=null,this._navigationTask=null,this._clearMeasurements=()=>{this.viewModel.measureType=null,this.viewModel.triangularMeasurementActive=!1,this.viewModel.displayNewMeasurementButton=!0,this.viewModel.clearPreviousMeasurements()},this._clearImageLocation=()=>{this.imageLocationToolActive=!1,this.triangularMeasurementActive=!1},this._createNavigationTask=async e=>(this._navigationTask?.abort(),this._navigationTask=i(async t=>await this.navigate({...e,signal:t})),this._navigationTask.promise),this._navigateNext=async()=>await this._createNavigationTask({step:1}),this._navigatePrevious=async()=>await this._createNavigationTask({step:-1}),this._navigationToolExpanded=!1,this._navigationTool=null,this._galleryController=new AbortController,this._galleryObserver=new IntersectionObserver(this._lazyLoadImage.bind(this)),this._overlayedLayers=new a,this._previousAction=null,this._closeImageSequenceAlert=()=>{this._set(`noImageInSequenceError`,!1)},this._handleDataCaptureLayerChange=async e=>{if(this.dataCaptureLayer&&await this.stopDataCapture(!0),this.dataCaptureLayer=this.dataCaptureLayer===e?null:e,this.dataCaptureLayer)return this.startDataCapture(this.dataCaptureLayer)},this._handleNavigationSettingsInputChange=(e,t)=>{this.set(`${e}Threshold`,t)},this._handleNavigationSettingsToggle=e=>{this.viewModel.preserveAngle=e},this._handleOverlayLayerDeselect=e=>{let t=e.layer;t===this.dataCaptureLayer&&(this.stopDataCapture(),this.dataCaptureLayer=null),this.removeOverlayedGraphicsOnImage(`${t.id}`)},this._handleOverlayLayerSelect=e=>{let t=e.layer;this.viewModel.overlayMapFeatures(t,this.showMapFeatures),this.addHandles(u(()=>t.visible,()=>{this.viewModel.toggleOverlayMapFeatures(t.id,t.visible,this.showMapFeatures)}),`${Q.overlayed}-${t.id}`)},this._highlight=e=>{let t=e.target?.dataset.objectid;t&&this.viewModel.highlight(t)},this._onAction=e=>{let{target:t}=e,{dataset:{action:n}}=t,{_previousAction:r}=this,i=r?.dataset.action,a=i?.includes(`draw`)??!1,o=i===`select-feature`,s=i!==n;switch(n){case`draw-point`:case`draw-polygon`:case`draw-polyline`:{r&&te(o,a&&s)&&(r.active=!1),t.active=!t.active;let e=n.replace(`draw-`,``);this.viewModel.digitizeCreate(e),this._previousAction=t.active?t:null;break}case`save`:this.viewModel.saveDrawing();break;case`select-feature`:a&&(this._previousAction.active=!1),t.active=!t.active,this.viewModel.toggleSelection(t.active),this._previousAction=t.active?t:null;break;case`delete-feature`:this.viewModel.digitizeDelete()}},this._onImageOverlayClosed=e=>{e.stopPropagation(),this.imageOverlaysOpened=!1},this._onShowCameraLocationsChanged=e=>{this.showCameraLocations=e},this._onShowMapFeaturesChanged=e=>{this.showMapFeatures=e},this._removeHighlight=()=>this.viewModel.removeHighlight(),this._restoreOverlays=async()=>Promise.all(this._overlayedLayers.map(e=>this.viewModel.overlayMapFeatures(e,this.showMapFeatures))),this._scaleNavigationTool=()=>{this._navigationToolExpanded=!this._navigationToolExpanded},this._sketchLoaderTask=null,this._toggleExploreImages3DPanel=e=>{this._exploreImages3DCollapsed=e.target.collapsed},this._settingsToggle=null,this._toggleImageNavigation=async e=>{let t=this.navigationMode;this._closeAllImageTools(),this.navigationMode=t===e?null:e;let{activeViewer:n}=this.viewModel;if(!n)return;let{mode:r,preserveAngle:i}=this.viewModel;if(r==="default"){if(this.navigationMode===`directional`){let e=await this._loadNavigationSettings(),t=i===`heading`||i===`both`,n=i===`pitch`||i===`both`,{messages:r,messagesCommon:a}=this,o=new e({cameraHeadingThreshold:this.cameraHeadingThreshold,cameraPitchThreshold:this.cameraPitchThreshold,uiStrings:{configureNavigation:r.configureNavigation,preserveHeading:r.preserveHeading,preserveHeadingDescription:r.preserveHeadingDescription,preservePitch:r.preservePitch,preservePitchDescription:r.preservePitchDescription,settings:a.settings,thresholdLabel:r.thresholdLabel},onInputChange:this._handleNavigationSettingsInputChange,onToggle:this._handleNavigationSettingsToggle,preserveHeading:t,preservePitch:n});this._settingsToggle=new ne({content:o,expandIcon:`configure`}),this.viewModel.activeViewer?.ui.add(this._settingsToggle,{position:`top-left`})}else this._settingsToggle&&(this._settingsToggle.expanded=!1,this.viewModel.activeViewer?.ui.remove(this._settingsToggle))}},this._toggleImageAttributes=h(this.viewModel.toggleImageAttributes.bind(this.viewModel)),this._rootActionTitleToFocus=null,this._actionTitleToFocus=null,this._focusPendingAction=e=>{let t=this._actionTitleToFocus;if(!t)return;let n=[...e.querySelectorAll(`calcite-action`)].find(e=>e.getAttribute(`title`)===t);n&&(this._actionTitleToFocus=null,Z(n))},this.navigate=async e=>{let t=null;try{let{currentNode:n}=this.viewModel;if(!n)throw new K;t=await this.viewModel.navigate(n,e)}catch(e){l(e)||c.getLogger(this).error(`Error occurred while navigating`,e),[`NoImageInSequenceError`,`NoSequenceFoundError`].includes(e.name)&&this._set(`noImageInSequenceError`,!0)}return t},this.reset=()=>{this._closeAllImageTools(),this.viewModel.reset()},this._loadImageFromGallery=this._loadImageFromGallery.bind(this),this._registerGalleryItem=this._registerGalleryItem.bind(this),this._unregisterGalleryItem=this._unregisterGalleryItem.bind(this),this.loadImageFromSource=this.loadImageFromSource.bind(this),this.updateSuitabilities=this.updateSuitabilities.bind(this),this._handleVideoBrightnessChange=this._handleVideoBrightnessChange.bind(this),this._handleVideoContrastChange=this._handleVideoContrastChange.bind(this),this._handleBrightnessChange=this._handleBrightnessChange.bind(this),this._handleContrastChange=this._handleContrastChange.bind(this),this._handleSharpnessChange=this._handleSharpnessChange.bind(this),this._handleSuperimposeZOffsetChange=this._handleSuperimposeZOffsetChange.bind(this),this._toggleSuperimposeCameraLock=this._toggleSuperimposeCameraLock.bind(this),this._resetSuperimposeOffset=this._resetSuperimposeOffset.bind(this),this._resetVideoTools=this._resetVideoTools.bind(this),this._toggleEnhancementToolState=this._toggleEnhancementToolState.bind(this),this.announceDeprecation=()=>{o(c.getLogger(this),`Oriented Imagery Viewer`,`arcgis-oriented-imagery-viewer`,{version:`5.0`})}}initialize(){this.addHandles([u(()=>[this.viewModel?.bestFeatureAngle,this._navigationTool],([e,t])=>{t&&this._updateNavigationTool(t)},d),u(()=>this.currentCoverageVisible,e=>this._onCurrentCoverageVisibilityChange(e)),u(()=>this.isAdditionalCoverageVisible,e=>this._onAdditionalCoverageVisibilityChange(e)),u(()=>this.isAdditionalPointSourcesVisible,e=>this._onAdditionalCameraLocationsVisibility(e)),u(()=>this.superimposeViewEnabled,e=>{e?(this._closeAllImageTools(),this.selectedGroup=null,this.shouldShowSelectedImage=!1,this._disableExploreImages3D()):this._resetSuperimposeOffset()}),u(()=>({features:this.currentBestFeature,overlaysEnabled:this._imageOverlaysEnabled,showCameraLocations:this.showCameraLocations}),({overlaysEnabled:e,showCameraLocations:t})=>{e&&this.viewModel.overlayCameraLocations(t)},f),u(()=>({feature:this.currentBestFeature,overlaysEnabled:this._imageOverlaysEnabled,showMapFeatures:this.showMapFeatures}),async(e,t)=>{e.showMapFeatures!==t?.showMapFeatures&&await this.viewModel.toggleAllOverlayMapFeatures(e.showMapFeatures);let n=e.feature&&e.feature!==t?.feature,r=!e.overlaysEnabled&&!!t?.overlaysEnabled,i=e.overlaysEnabled&&!t?.overlaysEnabled,a=this.viewModel.mode===`video`||this.viewModel.mode===`panoramic-video`;if(r&&a){this.viewModel.removeAllOverlayMapFeatures(),this.viewModel.mode===`video`&&this.viewModel.videoViewModel?.clearOverlayGraphics();return}(n||i)&&(n&&(this._resetSuperimposeOffset(),this.viewModel.removeAllOverlayMapFeatures()),e.overlaysEnabled&&(this.dataCaptureLayer&&this.stopDataCapture(),await this._restoreOverlays(),this.dataCaptureLayer&&(await this.startDataCapture(this.dataCaptureLayer),this._previousAction?.active&&(this._previousAction.active=!1,this._previousAction=null))))},d),p(()=>this.viewModel,`popup-open`,async e=>{await this.view?.openPopup(e)},m),p(()=>this.viewModel,`popup-close`,()=>{this.view?.closePopup()},m),this._toggleImageAttributes])}loadDependencies(){return Promise.all([U(),V(),se({"action-bar":()=>import(`@esri/calcite-components/dist/components/calcite-action-bar`),"action-group":()=>import(`@esri/calcite-components/dist/components/calcite-action-group`),action:()=>import(`@esri/calcite-components/dist/components/calcite-action`),block:()=>import(`@esri/calcite-components/dist/components/calcite-block`),list:()=>import(`@esri/calcite-components/dist/components/calcite-list`),"list-item":()=>import(`@esri/calcite-components/dist/components/calcite-list-item`),panel:()=>import(`@esri/calcite-components/dist/components/calcite-panel`),shell:()=>import(`@esri/calcite-components/dist/components/calcite-shell`),dialog:()=>import(`@esri/calcite-components/dist/components/calcite-dialog`),slider:()=>import(`@esri/calcite-components/dist/components/calcite-slider`),notice:()=>import(`@esri/calcite-components/dist/components/calcite-notice`),"shell-panel":()=>import(`@esri/calcite-components/dist/components/calcite-shell-panel`),switch:()=>import(`@esri/calcite-components/dist/components/calcite-switch`)}),F()])}destroy(){this._galleryController.abort(),this._galleryObserver.disconnect(),this.currentBestFeature=null}get accuracyParametersMissing(){return this.viewModel.accuracyParametersMissing}get activeLayer(){return s(c.getLogger(this),`activeLayer`,{replacement:`layer`}),this.layer}set activeLayer(e){s(c.getLogger(this),`activeLayer`,{replacement:`layer`}),this.layer=e}get activeVideoIcon(){let{videoElement:e,videoViewModel:t}=this.viewModel;return!e?.loaded||!t||t.videoPaused?`play`:`pause`}get activeAudioIcon(){let{videoElement:e,videoViewModel:t}=this.viewModel;return e?.loaded&&t?.videoMuted?`sound-off`:`sound`}get cameraHeadingThreshold(){return this.viewModel.cameraHeadingThreshold}set cameraHeadingThreshold(e){this.viewModel.cameraHeadingThreshold=e}get cameraPitchThreshold(){return this.viewModel.cameraPitchThreshold}set cameraPitchThreshold(e){this.viewModel.cameraPitchThreshold=e}get canNavigateSequentially(){return!!this.layer?.effectiveSequenceOrderField?.length}get currentBestFeature(){return this.viewModel.currentBestFeature}set currentBestFeature(e){this.viewModel.currentBestFeature=e}get currentCoverageVisible(){return this.viewModel.currentCoverageVisible}set currentCoverageVisible(e){this.viewModel.currentCoverageVisible=e}get dataCaptureLayer(){return this.viewModel.dataCaptureLayer}set dataCaptureLayer(e){this.viewModel.dataCaptureLayer=e}get depthImageNotSupported(){return this.viewModel.depthImageNotSupported}get disabled(){return this.viewModel.disabled}set disabled(e){this.viewModel.disabled=e}get displayMessage(){return this.viewModel.displayMessage}get enhancementToolActive(){return this.viewModel.mode===`video`?this.videoEnhancementToolActive:this.imageEnhancementToolActive}set enhancementToolActive(e){this.viewModel.mode===`video`?this.videoEnhancementToolActive=e:this.imageEnhancementToolActive=e}get features(){return this.viewModel.features}get imagePointsInView(){return this.viewModel.imagePointsInView}get icon(){return`oriented-imagery-widget`}set icon(e){this._overrideIfSome(`icon`,e)}get imageGalleryEnabled(){return this.viewModel.imageGalleryEnabled}get imageLocationToolActive(){return this.viewModel.imageLocationToolState}set imageLocationToolActive(e){this.viewModel.imageLocationToolState=e}get invalidCameraHeading(){return this.viewModel.invalidCameraHeading}get isAdditionalCoverageVisible(){return this.viewModel.isAdditionalCoverageVisible}set isAdditionalCoverageVisible(e){this.viewModel.isAdditionalCoverageVisible=e}get isAdditionalPointSourcesVisible(){return this.viewModel.isAdditionalPointSourcesVisible}set isAdditionalPointSourcesVisible(e){this.viewModel.isAdditionalPointSourcesVisible=e}get mapImageConversionToolState(){return this.viewModel.mapImageConversionToolState}set mapImageConversionToolState(e){this.viewModel.setMapImageConversionToolState(e)}get measureType(){return this.viewModel.measureType}set measureType(e){this.viewModel.measureType=e}get layer(){return this.viewModel.layer}set layer(e){this.viewModel.layer=e}get navigationMode(){return this.viewModel.navigationMode}set navigationMode(e){this.viewModel.navigationMode=e}get popupEnabled(){let{popupEnabled:e,state:t}=this.viewModel;return(t===`image-loaded`||this.videoLoaded)&&e}get preloadMedia(){return this.viewModel.preloadMedia}set preloadMedia(e){this.viewModel.preloadMedia=e}get referencePoint(){return this.viewModel.referencePoint??null}get selectedFeatureObjectId(){return this.currentBestFeature?.attributes?.objectId??null}get selectedPoint(){return this.viewModel.selectedPoint}get sketchViewModel(){return this.viewModel.sketch}get triangularMeasurementActive(){return this.viewModel.triangularMeasurementActive}set triangularMeasurementActive(e){this.viewModel.triangularMeasurementActive=e}get videoLoaded(){let{mode:e,videoElement:t,panoramicVideoLoaded:n}=this.viewModel;return(e===`video`&&t?.loaded===!0||n)??!1}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}set determineWorkflowForFeature(e){this.viewModel.determineWorkflowForFeature=e}get determineWorkflowForFeature(){return this.viewModel.determineWorkflowForFeature}get shouldShowSelectedImage(){return this.viewModel.shouldShowSelectedImage}set shouldShowSelectedImage(e){this.viewModel.shouldShowSelectedImage=e}get superimposeViewEnabled(){return this.viewModel.superimposeViewEnabled}set superimposeViewEnabled(e){this.viewModel.superimposeViewEnabled=e}get defaultSuperimposeCameraLockEnabled(){return this.viewModel.defaultSuperimposeCameraLockEnabled}set defaultSuperimposeCameraLockEnabled(e){this.viewModel.defaultSuperimposeCameraLockEnabled=e}set updateFootprint(e){this.viewModel.updateFootprint=e}get updateFootprint(){return this.viewModel.updateFootprint}get verticalFilterEnabled(){return this.viewModel.verticalFilterEnabled}set verticalFilterEnabled(e){this.viewModel.verticalFilterEnabled=e}get _actionBarLayout(){return this.actionBarPosition===`start`||this.actionBarPosition===`end`?`vertical`:`horizontal`}_renderActionBar(){let{selectedGroup:e,superimposeViewEnabled:n}=this,r=this._actionBarLayout;if(n)return X(`calcite-action-bar`,{"data-testid":`action-bar--superimpose`,expandToggleDisabled:!0,layout:r,slot:`action-bar`},X(`calcite-action-group`,{overlayPositioning:`fixed`},this._superimposeViewToggle()));let i=t();return X(`calcite-action-bar`,{afterUpdate:this._focusPendingAction,"data-testid":`action-bar`,expandToggleDisabled:!0,layout:r,slot:`action-bar`},!e&&X(`calcite-action-group`,{key:`main`,overlayPositioning:`fixed`},this._searchGroupToggle(),this._overlaysGroupToggle(),this._navigationGroupToggle(),this._measurementsGroupToggle(),this._utilitiesGroupToggle()),this._renderGroupBackAction(i),e===`overlays`&&X(`calcite-action-group`,{key:`overlays`,overlayPositioning:`fixed`},this._currentFootprintToggle(),this._additionalFootprintToggle(),this._additionalPointSourcesToggle(),this._mapImageConversionToggle(),this._imageOverlaysToggle()),e===`navigation`?this._directionToolsToggle():null,e===`navigation`&&X(`calcite-action-group`,{key:`context-navigation`,overlayPositioning:`fixed`},this._navigationToolToggle(),this._imageGalleryToggle()),e===`measurements`&&this._measurementToolToggle(),e===`utilities`&&X(`calcite-action-group`,{overlayPositioning:`fixed`},this._imageEnhancementsToggle(),this._videoEnhancementsToggle(),this._superimposeViewToggle(),this._openPopupAction()),e===`search`&&X(`calcite-action-group`,{key:`search`,overlayPositioning:`fixed`},this._exploreImagesToggle(),this._exploreImages3DToggle(),this._showSelectedImageToggle()))}_renderGroupBackAction(e){return this.selectedGroup?X(`calcite-action`,{bind:this,icon:e?`arrow-right`:`arrow-left`,key:`back-arrow`,text:this.messages.previous,title:this.messages.previous,onclick:()=>this._toggleGroupSelection(null)}):null}get _activeMeasurementHeading(){let{measureType:e,messages:t,triangularMeasurementActive:n}=this,{groundArea:r,heightAboveGround:i,groundDistance:a,triangulatedAreaHeading:o,triangulatedDistanceHeading:s}=t;if(n)return e===`area`?o:s;switch(e){case`area`:return r;case`height`:return i;default:return a}}_additionalFootprintToggle(){let{isAdditionalCoverageVisible:e,invalidCameraHeading:t,visibleElements:{additionalFootprintToggle:n}}=this;return n?X(`calcite-action`,{active:e,bind:this,class:T.addCoverage,disabled:t,icon:`trapezoid-area`,text:this.messages.additionalFootprints,title:this.messages.additionalFootprints,onclick:this._toggleAdditionalCoverage}):null}_additionalPointSourcesToggle(){let{isAdditionalPointSourcesVisible:e,invalidCameraHeading:t,visibleElements:{additionalCameraLocationsToggle:n}}=this;return n?X(`calcite-action`,{active:e,bind:this,class:T.addExpPoints,disabled:t,icon:`circle-area`,text:this.messages.additionalCameraLocations,title:this.messages.additionalCameraLocations,onclick:this._toggleAdditionalCameraLocations}):null}get _measurementToggle(){let{viewModel:{state:e,measureType:t,currentBestFeatureMeasurementImage:n},triangularMeasurementActive:r,id:i}=this;if(e!==`image-loaded`||!t||r&&!n)return;this._imageMeasurementToolsLoaderTask||this._loadImageMeasurementResources();let a=this._imageMeasurementToolsLoaderTask?.value;return a?X(`calcite-dialog`,{bind:this,dragEnabled:!0,escapeDisabled:!0,heading:this._activeMeasurementHeading,id:`${i}-${t}-measurement`,open:!0,placement:`bottom-start`,resizable:!0,scale:`s`,slot:`dialogs`,width:`s`,onCalciteDialogBeforeClose:this._clearMeasurements},X(a,{measurementType:t,measurementUnitMessages:this.measurementUnitMessages,messages:this.messages,oiViewModel:this.viewModel})):null}get _renderRoot(){let{viewModel:{state:e},triangularMeasurementActive:t}=this;return X(`calcite-panel`,{bind:this,class:t?T.viewerContainerMeasurement:T.viewerContainer,heading:this.visibleElements.header?this.messages.title:void 0,loading:e.includes(`loading`)&&!t},X(`calcite-shell`,null,this.visibleElements.menu?X(`calcite-shell-panel`,{collapsed:!0,displayMode:`dock`,slot:`panel-${this.actionBarPosition}`},this._renderActionBar()):null,X(`calcite-panel`,null,this._imageViewer,this._panoramicViewer,this._panoramicVideoViewer,this._videoViewer,this._messageBox,this.invalidCameraHeading?null:[this._imageGalleryPanel,this._renderNavigation,this._imageOverlaysPanel()],this._exploreImages3DTools,this._imageEnhancementTools,this._videoEnhancementTools,this._superimposeTools,this._renderSketch(),this._navigationUI),this._imageViewerTriangular,this._measurementToggle,this._locationToggle,this.invalidCameraHeading?this._renderWarning(this.messages.invalidCameraHeadingWarningTitle,this.messages.invalidCameraHeadingWarningDescription):null,this.depthImageNotSupported?this._renderWarning(this.messages.depthImageNotSupportedTitle,this.messages.depthImageNotSupportedDescription):null,this.noImageInSequenceError?this._renderWarning(this.messages.sequentialNavigationWarning,this.messages.sequentialNavigationWarning,this._closeImageSequenceAlert):null))}_currentFootprintToggle(){let{currentCoverageVisible:e,invalidCameraHeading:t}=this,{currentFootprintToggle:n}=this.visibleElements;return n?X(`calcite-action`,{active:e,bind:this,class:T.currentCoverage,disabled:t,icon:`trapezoid-area`,text:this.messages.currentFootprint,title:this.messages.currentFootprint,onclick:this._toggleCurrentCoverage}):null}_exploreImagesToggle(){let{exploreImages:e}=this.messages;return this.visibleElements.exploreImages?X(`calcite-action`,{active:!this.disabled,bind:this,icon:`oriented-imagery-widget`,text:e,title:e,onclick:this._toggleExploreImages}):null}get _imageEnhancementTools(){let{enhancementToolActive:e,viewModel:{brightness:t,contrast:n,sharpness:r,state:i}}=this;return e&&i===`image-loaded`?X(`calcite-panel`,{bind:this,class:T.imageEnhancementWrapper,closable:!0,closed:!e,heading:this.messages.imageEnhancement,key:this.messages.imageEnhancement,onCalcitePanelClose:this._toggleEnhancementToolState},X(`div`,{class:T.imageEnhancementTools},W({title:this.messages.brightness,value:t,handleChange:this._handleBrightnessChange}),W({title:this.messages.contrast,value:n,handleChange:this._handleContrastChange}),W({title:this.messages.sharpness,value:r,max:1,min:0,ticks:.5,step:.1,handleChange:this._handleSharpnessChange})),X(`calcite-action`,{bind:this,icon:`reset`,slot:`header-actions-end`,text:this.messagesCommon.reset,title:this.messagesCommon.reset,onclick:this._resetImageTools})):null}get _videoEnhancementTools(){let{enhancementToolActive:e,viewModel:{videoViewModel:t,mode:n},messages:{videoEnhancement:r,brightness:i,contrast:a},messagesCommon:{reset:o}}=this;return!e||n!==`video`||!t?null:X(G,{brightness:t.videoBrightness,contrast:t.videoContrast,handleBrightnessChange:this._handleVideoBrightnessChange,handleContrastChange:this._handleVideoContrastChange,resetTools:this._resetVideoTools,uiStrings:{videoEnhancement:r,brightness:i,contrast:a,reset:o},videoEnhancementToolActive:e,onClose:this._toggleEnhancementToolState})}get _superimposeTools(){let{superimposeViewEnabled:e,view:t,viewModel:{state:n,mode:r},messages:{superimposeSettings:i,superimposeSliderTitle:a,superimposeSliderTooltip:o}}=this,s=r===`panoramic`;return!e||t?.type!==`3d`||n!==`image-loaded`?null:X(`calcite-panel`,{bind:this,class:this.classes(T.imageEnhancementWrapper,T.superimposeTools),heading:i,key:`superimpose-settings`},X(`div`,{class:T.imageEnhancementTools},W({title:a,tooltip:o,value:s?this._panoramicSuperimposeRadiusOffsetPercentage:this._defaultSuperimposeZOffsetPercentage,max:100,min:0,ticks:10,step:1,handleChange:this._handleSuperimposeZOffsetChange})),X(`calcite-action`,{bind:this,icon:`reset`,slot:`header-actions-end`,text:this.messagesCommon.reset,title:this.messagesCommon.reset,onclick:this._resetSuperimposeOffset}))}_imageEnhancementsToggle(){let{state:e,mode:t}=this.viewModel,{enhancementTool:n}=this.visibleElements;return!n||t===`video`?null:X(`calcite-action`,{active:this.enhancementToolActive,bind:this,disabled:t!=="default"||e!==`image-loaded`,icon:`sliders-horizontal`,text:this.messages.imageEnhancement,title:this.messages.imageEnhancement,onclick:this._toggleEnhancementToolState})}_exploreImages3DToggle(){let{exploreImages3D:e}=this.messages,t=this.view?.type!==`3d`||!this.layer?.hasZ,n=this.verticalFilterEnabled||this.viewModel.frustumSearchEnabled;return this.visibleElements.exploreImages3D?X(`calcite-action`,{active:n,bind:this,disabled:t,icon:`3d-search`,text:e,title:e,onclick:this._toggleExploreImages3DMenu}):null}get _exploreImages3DTools(){let{frustumRange:e,search3DFilters:t,verticalRange:n}=this.messages,r=this.verticalFilterEnabled,i=this.viewModel.frustumSearchEnabled;return!this.visibleElements.exploreImages3D||!this._exploreImages3DMenuOpen?null:X(`calcite-panel`,{bind:this,class:T.submenu,closed:!this._exploreImages3DMenuOpen,collapsed:this._exploreImages3DCollapsed,collapseDirection:`up`,collapsible:!0,heading:t,key:`explore-images-3d-tools`,onCalcitePanelToggle:this._toggleExploreImages3DPanel},X(`calcite-list`,{label:t,scale:`s`},X(`calcite-list-item`,{bind:this,label:n},X(`calcite-switch`,{checked:r,disabled:this.layer?.verticalSearchRange==null,scale:`s`,slot:`content-start`,onCalciteSwitchChange:e=>this._toggleExploreImages3DSelection(`3d`,e)})),X(`calcite-list-item`,{bind:this,label:e},X(`calcite-switch`,{checked:i,scale:`s`,slot:`content-start`,onCalciteSwitchChange:e=>this._toggleExploreImages3DSelection(`frustum`,e)}))))}_showSelectedImageToggle(){let{displayImages:e}=this.messages,t=this.viewModel.mode.includes(`video`);return this.visibleElements.showSelectedImage?X(`calcite-action`,{active:this.shouldShowSelectedImage,bind:this,disabled:t,icon:`show-oriented-imagery`,text:e,title:e,onclick:this._toggleShowSelectedImage}):null}_superimposeViewToggle(){let{superimposeView:e}=this.messages,{mode:t,accuracyParametersMissing:n}=this.viewModel,r=!this.superimposeViewEnabled&&(this.view?.type!==`3d`||t.includes(`video`)||n);return this.visibleElements.superimpose?X(`calcite-action`,{active:this.superimposeViewEnabled,bind:this,disabled:r,icon:`superimpose`,text:e,title:e,onclick:this._toggleSuperimposeView}):null}_videoEnhancementsToggle(){let{mode:e}=this.viewModel,{videoEnhancement:t}=this.messages,{enhancementTool:n}=this.visibleElements;return!n||e!==`video`?null:X(`calcite-action`,{active:this.enhancementToolActive,bind:this,disabled:e!==`video`,icon:`sliders-horizontal`,text:t,title:t,onclick:this._toggleEnhancementToolState})}get _imageGalleryPanel(){let{container:e,galleryOpened:t,imageGalleryEnabled:n}=this;return n&&t&&e?this._imageGalleryContext:null}get _imageGalleryContext(){let{galleryOpened:e,invalidCameraHeading:t}=this;return X(`calcite-panel`,{bind:this,class:T.carousel,closable:!0,closed:!e,disabled:t,heading:this.messages.imageGallery,key:this.messages.imageGallery,onCalcitePanelClose:this._toggleImageGallery},X(`div`,{class:T.carouselContainer},this._renderThumbnails))}_imageGalleryToggle(){let{imageGalleryEnabled:e,invalidCameraHeading:t,visibleElements:{imageGallery:n}}=this;return n?X(`calcite-action`,{active:this.galleryOpened,bind:this,disabled:!e||t,icon:`images`,text:this.messages.imageGallery,title:this.messages.imageGallery,onclick:this._toggleImageGallery}):null}get _imageOverlaysComponent(){let{_imageOverlayMessages:e,_imageOverlaysLoaderTask:t,_overlayedLayers:n,dataCaptureEnabled:r,dataCaptureLayer:a,imageOverlaysOpened:o,showCameraLocations:s,showMapFeatures:c,view:l,layer:u}=this,d=r&&!this.viewModel.mode.includes(`video`);if(!u)return null;let f=u.imageGeometryField?.length?u.imageGeometryField:x,p=u.imageReferenceField?.length?u.imageReferenceField:ie;t||(this._imageOverlaysLoaderTask=i(async()=>(await import(`./OrientedImageryViewer/components/ImageOverlays.js`)).default));let m=this._imageOverlaysLoaderTask?.value;return m?X(m,{closed:!o,dataCaptureEnabled:d,dataCaptureLayer:a,imageGeometryField:f,imageReferenceField:p,messages:e,overlayedLayers:n,showCameraLocations:s,showMapFeatures:c,view:l,onDataCaptureLayerChanged:this._handleDataCaptureLayerChange,onFilterCapturedFeatures:this.viewModel.filterCapturedFeatures,onImageOverlaysClosed:this._onImageOverlayClosed,onLayerDeselected:this._handleOverlayLayerDeselect,onLayerSelected:this._handleOverlayLayerSelect,onShowCameraLocationsChanged:this._onShowCameraLocationsChanged,onShowMapFeaturesChanged:this._onShowMapFeaturesChanged}):null}get _navigationUI(){let{navigationMode:e,viewModel:t}=this,{mode:n,state:r}=t;if(!(!e||n!=="default"&&n!==`panoramic`||r!==`image-loaded`))return e===`directional`?n==="default"?X(z,{cameraHeadingThreshold:this.cameraHeadingThreshold,cameraPitchThreshold:this.cameraPitchThreshold,currentNode:this.viewModel.currentNode,navigate:this._createNavigationTask,nodes:this.viewModel.navigationNodes,preserveAngle:this.viewModel.preserveAngle}):X(B,{currentNode:this.viewModel.currentNode,navigate:this._createNavigationTask,nodes:this.viewModel.navigationNodes}):X(H,{layout:`horizontal`,uiStrings:{end:this.messages.end,next:this.messages.next,previous:this.messages.previous,start:this.messages.start},onNext:this._navigateNext,onPrev:this._navigatePrevious})}get _imageOverlayMessages(){return{...this.messages,...this.messagesSketch}}get _imageSketchToolsMessages(){return{...this.messagesCommon,...this.messagesSketch}}_imageOverlaysPanel(){let{imageOverlaysOpened:e}=this,t=this.classes({[T.imageOverlaysContainer]:!0,[q.hidden]:!e||!this._imageOverlaysEnabled});return X(`div`,{class:t,key:this.messages.imageOverlays},this._imageOverlaysComponent)}_imageOverlaysToggle(){let{imageOverlaysOpened:e,invalidCameraHeading:t,visibleElements:{imageOverlays:n}}=this;return n?X(`calcite-action`,{active:e,bind:this,disabled:!this._imageOverlaysEnabled||t,icon:`layers`,text:this.messages.imageOverlays,title:this.messages.imageOverlays,onclick:this._toggleImageOverlays}):null}get _imageOverlaysEnabled(){return this.viewModel.overlayGraphicsEnabled}get _imageViewer(){let{displayMessage:e,loadImageViewer:t,mode:n,clickAction:r,state:i}=this.viewModel,a=e!=null||n!=="default"||i.includes(`loading`);return X(R,{afterCreate:t,clickAction:r,visible:!a})}get _imageViewerTriangular(){let{messages:e,triangularMeasurementActive:t}=this,{displayMessage:n,storeImageMeasurementViewer:r,storePanoramicMeasurementViewer:i,mode:a,state:o,clickAction:s}=this.viewModel,c=n!=null||a===`none`||a===`video`,l=this.classes({[T.viewer]:!c,[T.viewerHidden]:c});return t?X(`calcite-panel`,{class:T.viewerContainerMeasurement,heading:e.measurementViewerHeading,loading:o.includes(`loading`)},X(`calcite-panel`,{bind:this,class:l},a==="default"?X(R,{afterCreate:r,clickAction:s,uiStrings:e}):X(_,{afterCreate:i,clickAction:s,uiStrings:e}))):null}_utilitiesGroupToggle(){let{utilityTools:e}=this.messages;return this.visibleElements.utilityTools?X(`calcite-action`,{bind:this,icon:`tools`,key:`utilities-group-toggle`,text:e,title:e,onclick:e=>this._toggleGroupSelection(`utilities`,e)}):null}_searchGroupToggle(){let{searchTools:e}=this.messages;return this.visibleElements.searchTools?X(`calcite-action`,{bind:this,icon:`search`,key:`search-group-toggle`,text:e,title:e,onclick:e=>this._toggleGroupSelection(`search`,e)}):null}get _videoViewer(){let{mode:e,loadVideoViewer:t,videoViewModel:n}=this.viewModel,{control:r,reset:i}=this.messagesCommon,{mute:a,unmute:o}=this.messages,s=e!==`video`,c=this.classes({[T.viewer]:!s,[T.viewerHidden]:s}),l=`esri-image-viewer`,u=`${l}__slider-container`;return X(`calcite-panel`,{bind:this,class:c},X(`calcite-panel`,{afterCreate:t,class:this.classes(q.widget,l)}),X(`calcite-block`,{class:u,expanded:!0},X(`calcite-slider`,{bind:this,labelHandles:!0,labelTicks:!0,max:n?.videoDuration,minLabel:`0`,value:n?.currentTime??0,onCalciteSliderChange:this._handleVideoSeek})),X(`calcite-action-bar`,{"data-testid":`action-bar--video-controls`,expandToggleDisabled:!0,layout:`horizontal`},X(`calcite-action-group`,{overlayPositioning:`fixed`},X(`calcite-action`,{bind:this,icon:this.activeVideoIcon,text:`Play`,title:n?.videoPaused?r.play:r.pause,onclick:()=>n?.playVideoHandler()})),X(`calcite-action-group`,{overlayPositioning:`fixed`},X(`calcite-action`,{bind:this,icon:`refresh`,text:`Rewind`,title:i,onclick:()=>n?.rewindVideoHandler()})),X(`calcite-action-group`,{overlayPositioning:`fixed`},X(`calcite-action`,{bind:this,icon:this.activeAudioIcon,text:`Audio`,title:n?.videoMuted?a:o,onclick:()=>n?.toggleAudio()}))))}get _locationToggle(){let{viewModel:{state:e,groundCoordinates:t,groundCoordinatesAccuracy:n,groundCoordinatesAccuracyLoading:r,triangulatedPoint:i},imageLocationToolActive:a,triangularMeasurementActive:o,messages:{groundLocation:s,triangulatedLocationHeading:c}}=this;if(e!==`image-loaded`||!t||!a)return;let l=t;if(o){if(!i)return;l=i}return X(`calcite-dialog`,{bind:this,dragEnabled:!0,escapeDisabled:!0,heading:o?c:s,id:s,open:!0,placement:`bottom-start`,resizable:!0,scale:`s`,slot:`dialogs`,width:`s`,onCalciteDialogBeforeClose:this._clearImageLocation},X(L,{accuracy:n,accuracyLoading:r,groundCoordinates:l,messages:this.messages}))}_mapImageConversionToggle(){let{mapImageConversionToolState:e,viewModel:{state:t,disabled:n},videoLoaded:r,invalidCameraHeading:i,visibleElements:{mapImageConversionTool:a}}=this,o=!!(this.viewModel.mode===`video`&&r&&this.viewModel.videoViewModel?.videoPaused),s=this.viewModel.mode===`panoramic-video`&&this.viewModel.panoramicVideoLoaded&&this.viewModel.panoramicVideoPaused,c=t!==`image-loaded`&&!o&&!s||i||n;return a?X(`calcite-action`,{active:e,bind:this,disabled:c,icon:`image-pin`,text:this.messages.mapImageConversionTool,title:this.messages.mapImageConversionTool,onclick:this._toggleMapImageConversionToolState}):null}_measurementToolToggle(){let{measureType:e,viewModel:t,accuracyParametersMissing:n,messages:r,triangularMeasurementActive:i}=this,{state:a}=t,{groundDistance:o,groundArea:s,heightAboveGround:c,groundLocation:l,triangulatedDistanceHeading:u,triangulatedAreaHeading:d,triangulatedLocationHeading:f}=r,p=a!==`image-loaded`||n,m=this._actionBarLayout;return X(`calcite-action-group`,{key:`measurement-tools`,layout:m,overlayPositioning:`fixed`,scale:`m`},X(`calcite-action`,{active:e===`distance`&&!i,bind:this,disabled:p,icon:`measure-line`,key:`distance-measurement`,text:o,title:o,onclick:e=>this._toggleMeasurementSketch(e,`distance`)}),X(`calcite-action`,{active:e===`area`&&!i,bind:this,disabled:p,icon:`measure-area`,key:`area-measurement`,text:s,title:s,onclick:e=>this._toggleMeasurementSketch(e,`area`)}),X(`calcite-action`,{active:e===`height`,bind:this,disabled:p,icon:`measure-building-height-top-base`,key:`height-measurement`,text:c,title:c,onclick:e=>this._toggleMeasurementSketch(e,`height`)}),X(`calcite-action`,{active:this.imageLocationToolActive?!i:!1,bind:this,disabled:p,icon:`pin-tear`,key:`surface-location`,text:l,title:l,onclick:this._toggleLocationTool}),X(`calcite-action`,{active:i?this.imageLocationToolActive:!1,bind:this,disabled:p,icon:`dual-image-location`,key:`triangular-location`,text:f,title:f,onclick:this._toggleTriangularLocation}),X(`calcite-action`,{active:i?this.measureType===`distance`:!1,bind:this,disabled:p,icon:`dual-image-distance`,key:`triangular-distance`,text:u,title:u,onclick:this._toggleTriangularDistanceMeasurements}),X(`calcite-action`,{active:i?this.measureType===`area`:!1,bind:this,disabled:p,icon:`dual-image-area`,key:`triangular-area`,text:d,title:d,onclick:this._toggleTriangularAreaMeasurements}))}get _messageBox(){let{messages:e,viewModel:{displayMessage:t,mode:r}}=this;if(!t||r===`video`)return null;let{key:i,map:a,type:o}=t,s=`${a?n(e[i],a):e[i]}`,c=o===`error`?`danger`:o===`warn`?`warning`:`info`;return X(`calcite-notice`,{appearance:`transparent`,class:T.notice,icon:ce[c],kind:c,open:!0},X(`div`,{slot:`message`},s))}async _loadNavigationSettings(){return this._navigationSettingsLoaderTask||=i(async()=>(await import(`./OrientedImageryViewer/components/NavigationSettings.js`)).default),await this._navigationSettingsLoaderTask.promise}_measurementsGroupToggle(){let{measurementTools:e}=this.messages,{state:t,accuracyParametersMissing:n}=this.viewModel,r=t!==`image-loaded`||n;return this.visibleElements.measurementTools?X(`calcite-action`,{bind:this,disabled:r,icon:`measure-line`,key:`measurements-group-toggle`,text:e,title:e,onclick:e=>this._toggleGroupSelection(`measurements`,e)}):null}_navigationGroupToggle(){let{imageNavigation:e}=this.messages;return this.visibleElements.imageNavigationTools?X(`calcite-action`,{bind:this,icon:`absolute-direction`,key:`navigation-group-toggle`,text:e,title:e,onclick:e=>this._toggleGroupSelection(`navigation`,e)}):null}_navigationToolToggle(){let{state:e}=this.viewModel,{visibleElements:{navigationTool:t},videoLoaded:n}=this;return t?X(`calcite-action`,{active:this.navigationToolActive,bind:this,disabled:e!==`image-loaded`&&!n||this.invalidCameraHeading,icon:`explore`,text:this.messages.navigationTool,title:this.messages.navigationTool,onclick:this._toggleNavigationTool}):null}_directionToolsToggle(){let{messages:e,viewModel:t,visibleElements:n}=this,{directionalNavigation:r,sequentialNavigation:i}=n,{state:a}=t,{directionalNavigation:o,directionalNavigationDescription:s,sequentialNavigation:c,sequentialNavigationDescription:l}=e,u=this._actionBarLayout;return X(`calcite-action-group`,{key:`navigation-tools`,layout:u,overlayPositioning:`fixed`,scale:`m`},r?X(`calcite-action`,{active:this.navigationMode===`directional`,bind:this,disabled:a!==`image-loaded`||this.invalidCameraHeading,icon:`directional-navigation`,text:o,title:o+`
3
3
  `+s,onclick:()=>void this._toggleImageNavigation(`directional`)}):null,i?X(`calcite-action`,{active:this.navigationMode===`sequential`,bind:this,disabled:a!==`image-loaded`||this.invalidCameraHeading||!this.canNavigateSequentially,icon:`sequential-navigation`,text:c,title:c+`
4
- `+l,onclick:()=>void this._toggleImageNavigation(`sequential`)}):null)}_overlaysGroupToggle(){let{overlays:e}=this.messages;return this.visibleElements.overlays?X(`calcite-action`,{bind:this,icon:`oriented-imagery-overlays`,key:`overlays-group-toggle`,text:e,title:e,onclick:e=>this._toggleGroupSelection(`overlays`,e)}):null}_openPopupAction(){let{showPopupsAction:e}=this.visibleElements;return e?X(`calcite-action`,{bind:this,disabled:!this.popupEnabled,icon:`popup`,text:this.messages.showPopups,title:this.messages.showPopups,onclick:this._toggleImageAttributes}):null}get _panoramicVideoViewer(){let{displayMessage:e,loadPanoramicVideoViewer:t,mode:n,clickAction:r,state:i,currentBestFeature:a}=this.viewModel,o=a?.attributes.imagePath,s=e!=null||n!==`panoramic-video`||i.includes(`loading`)||!o;return X(re,{afterCreate:t,clickAction:r,oiViewModel:this.viewModel,videoSource:o,visible:!s})}get _panoramicViewer(){let{displayMessage:e,loadPanoramicViewer:t,mode:n,clickAction:r,state:i}=this.viewModel,a=e!=null||n!==`panoramic`||i.includes(`loading`);return X(_,{afterCreate:t,clickAction:r,visible:!a})}get noImageInSequenceError(){return this._get(`noImageInSequenceError`)??!1}_activateTriangulatedImageLocationTool(){this.navigationToolActive=!0,this.imageLocationToolActive=!0}_activateTriangulatedImageLocationWorkflow(e,t){this._closeAllImageTools(),this.imageLocationToolActive=!0,this.triangularMeasurementActive=!e,this.navigationToolActive=t?!0:!t}_closeImageToolsAndToggleNavigation(e,t){this._closeAllImageTools(),this.triangularMeasurementActive=!e,this.navigationToolActive=!t}_resetMeasureTypeAndActivateImageLocationTool(){this.measureType=null,this.imageLocationToolActive=!0}_closeAllImageTools(){this.enhancementToolActive=!1,this.navigationToolActive=!1,this.imageOverlaysOpened=!1,this.galleryOpened=!1,this._exploreImages3DMenuOpen=!1,this.measureType=null,this.imageLocationToolActive=!1,this.navigationMode=null,this.triangularMeasurementActive=!1,this._settingsToggle&&(this._settingsToggle.expanded=!1,this.viewModel.activeViewer?.ui.remove(this._settingsToggle))}_handleBrightnessChange(e){this.viewModel.brightness=e.currentTarget.value??0}_handleVideoBrightnessChange(e){this.viewModel.videoViewModel?.handleVideoBrightnessChange(e.target.value)}_handleContrastChange(e){this.viewModel.contrast=e.currentTarget.value??0}_handleVideoContrastChange(e){this.viewModel.videoViewModel?.handleVideoContrastChange(e.target.value)}_handleVideoSeek(e){let t=this.viewModel?.videoElement?.content;t&&(t.currentTime=e.target.value,t.play())}_handleSharpnessChange(e){this.viewModel.sharpness=e.currentTarget.value??0}_handleSuperimposeZOffsetChange(e){let t=e.currentTarget.value??0;if(this.viewModel.mode==="default"){this._defaultSuperimposeZOffsetPercentage=t,this.viewModel.setDefaultSuperimposeZOffsetPercentage(100-t);return}this._panoramicSuperimposeRadiusOffsetPercentage=t,this.viewModel.setPanoramicSuperimposeRadiusPercentage(100-t)}_lazyLoadImage(e,t){e.forEach(async e=>{if(e.isIntersecting){let n=e.target,r=n.getAttribute(`data-src`),i=n.getAttribute(`data-rotation`),a=n.getAttribute(`data-objectid`),o=i?parseFloat(i)%360:0,{layer:s,_galleryController:{signal:u}}=this;if(!r||!a)return;let d;try{d=k(r)?await A(s,a,{signal:u}):await j(r,{signal:u})}catch(e){l(e)||c.getLogger(`esri.widgets.OrientedImageryViewer`).error(`#lazyLoadImage()`,e)}finally{t.unobserve(n)}if(!d)return;M(d,n,o)}})}_loadImageFromGallery(e){let{target:t}=e;if(!t)return;let n=t.getAttribute(`data-objectid`);n&&this.viewModel.currentBestFeature?.attributes.objectId!==Number(n)&&this.viewModel.selectBestFeature(n)}_loadImageMeasurementResources(){this._imageMeasurementToolsLoaderTask=i(async()=>{let{default:e}=await import(`./OrientedImageryViewer/components/ImageMeasurementWidget.js`);return e})}_loadSketchResources(){this._sketchLoaderTask=i(async()=>(await import(`./OrientedImageryViewer/components/SketchTools.js`)).default)}_onAdditionalCoverageVisibilityChange(e){this.viewModel.setAdditionalCoverageVisibility(e)}_onAdditionalCameraLocationsVisibility(e){this.viewModel.setAdditionalCameraLocationsVisibility(e)}_onCurrentCoverageVisibilityChange(e){this.viewModel.setCurrentCoverageVisibility(e)}_registerGalleryItem(e){this._galleryObserver.observe(e)}_renderWarning(e,t,n){let{viewModel:{state:r}}=this;return r===`image-loaded`?X(I,{class:T.alert,icon:`exclamation-mark-triangle-f`,kind:`warning`,message:t,open:!0,title:e,tooltip:t,topLayerDisabled:this.topLayerDisabled,onClose:n}):null}get _renderNavigation(){let{viewModel:{sectorData:e,navigatorCurrentBestFeature:t,currentBestFeature:n,state:i}}=this;if(!this.container||!n)return null;let a,o,s,c,l;if(t){let{x:e,y:n,direction:r}=t,[i,u,d,f]=S[r];a=`M ${e} ${n} L ${i} ${u} A ${w[2]} ${w[2]} 0 0 1 ${d} ${f} Z`,o=e,c=n,s=S[r][4],l=S[r][5]}let u=e=>{let t=e.target.dataset?.sector;t&&this.viewModel.handleSectorClick(+t)},d=e=>{let t=e.target.dataset;if(!t)return;let{featureIndexInSector:n,sector:r}=t;n&&r&&this.viewModel.handleFeatureClick({sector:r,featureIndexInSector:+n})},f=e=>{e.removeEventListener(`click`,d)},p=n.attributes.objectId,m=e?.map(e=>e?.items).filter(Boolean).flatMap(e=>e?.map(({x:e,y:t,objectID:n,featureIndexInSector:r,sector:i})=>X(`circle`,{afterRemoved:f,class:this.classes(T.feature,{selected:p===n}),cx:e,cy:t,"data-feature-index-in-sector":r,"data-sector":i,key:`${T.feature}-${n}`,r:ae,onclick:d}))),h=e=>{e.removeEventListener(`click`,u)},g=this.classes({[T.navigationWrapper]:!0,[T.navigationWrapperVideo]:this.viewModel.mode.includes(`video`),[T.navigationZoomed]:this._navigationToolExpanded});return this.navigationToolActive&&(i===`image-loaded`||this.videoLoaded)?X(`div`,{bind:this,class:g,key:this.messages.navigationTool},X(`svg`,{afterCreate:e=>this._storeNavigationToolReference(e),class:r()?oe:T.rotateWithAnimation,focusable:`false`,height:C,role:`img`,width:C,xmlns:`http://www.w3.org/2000/svg`},X(`defs`,null,X(`linearGradient`,{gradientUnits:`userSpaceOnUse`,id:`${this.id}-coverage-fill`,x1:o,x2:s,y1:c,y2:l},X(`stop`,{class:T.navigationPathOffset0,offset:0}),X(`stop`,{class:T.navigationPathOffset1,offset:1}))),X(`g`,null,X(`circle`,{class:this.classes(T.sector,T.outerSector),cx:w[3],cy:w[3],r:w[3],onclick:this._scaleNavigationTool}),X(`circle`,{class:T.sector,cx:w[3],cy:w[3],r:w[2]}),X(`circle`,{class:T.sector,cx:w[3],cy:w[3],r:w[1]}),X(`circle`,{class:T.sector,cx:w[3],cy:w[3],r:w[0]}),X(`path`,{class:T.pointer,d:`M 56.5 6.06217782649107 L 60 0 L 63.5 6.06217782649107 Z`,key:`${T.pointer}-west`}),X(`path`,{class:this.classes(T.pointer,T.north),d:`M 113.93782217350893 56.5 L 120 60 L 113.93782217350893 63.5 Z`,key:`${T.pointer}-north`}),X(`path`,{class:T.pointer,d:`M 56.5 113.93782217350893 L 60 120 L 63.5 113.93782217350893 Z`,key:`${T.pointer}-east`}),X(`path`,{class:T.pointer,d:`M 6.06217782649107 56.5 L 0 60 L 6.06217782649107 63.5 Z`,key:`${T.pointer}-south`}),X(`path`,{class:this.classes(T.sector,T.sectorSeparator),d:`M 23.937554159486076 23.937554159486076 L 96.06244584051393 96.06244584051393 M 23.937554159486076 96.06244584051393 L 96.06244584051393 23.937554159486076`,key:T.sectorSeparator}),y([w[2],w[1],w[0]],w[3],w[3]).map((t,n)=>X(`path`,{afterRemoved:h,class:this.classes(T.sector,e?.[n]?.length?T.sectorEnabled:T.sectorDisabled),d:t,"data-sector":`${n}`,key:`${T.sector}-${n}`,onclick:u})),X(`path`,{class:this.classes(T.sector,T.sectorCross),d:`M 56.4 56.4 L 63.53 63.53 M 63.53 56.4 L 56.4 63.53`,key:T.sectorCross}),m,n.attributes.cameraPitch>=5&&a?X(`path`,{class:T.selectedFeaturePath,d:a,fill:`url(#${this.id}-coverage-fill)`,key:T.selectedFeaturePath}):null))):null}_renderSketch(){let{dataCaptureLayer:e,imageOverlaysOpened:t}=this;if(!e||t||(this._sketchLoaderTask||this._loadSketchResources(),!this._sketchLoaderTask?.value))return null;let{geometryType:n}=e,r=n===`point`?`pin`:n===`polyline`?`line`:`polygon`,i=this._sketchLoaderTask.value;return X(`div`,{class:T.sketchTools},X(i,{icon:r,messages:this._imageSketchToolsMessages,type:n,onAction:this._onAction}))}get _renderThumbnails(){let{currentBestFeature:e,thumbnails:t}=this.viewModel;return e?X(`div`,{class:T.carouselContent},t?.items.map(({url:t,objectId:n,rotation:r},i)=>X(`div`,{class:`${T.carouselItemWrapper}${e.attributes.objectId===n?`--selected`:``}`,key:`${T.carouselItemWrapper}-${i}`},X(`canvas`,{afterCreate:this._registerGalleryItem,afterRemoved:this._unregisterGalleryItem,alt:`thumbnail-${n}`,class:T.carouselItem,"data-objectid":`${n}`,"data-rotation":`${r}`,"data-src":t,onclick:this._loadImageFromGallery,onmouseenter:this._highlight,onmouseleave:this._removeHighlight})))):null}_resetImageTools(){this.viewModel.sharpness=this.viewModel.brightness=this.viewModel.contrast=0}_resetVideoTools(){this.viewModel.videoViewModel?.resetVideoEnhancementTools()}_storeNavigationToolReference(e){this._navigationTool=e}_toggleAdditionalCameraLocations(){this.isAdditionalPointSourcesVisible=!this.isAdditionalPointSourcesVisible}_toggleAdditionalCoverage(){this.isAdditionalCoverageVisible=!this.isAdditionalCoverageVisible}_toggleCurrentCoverage(){this.currentCoverageVisible=!this.currentCoverageVisible}_toggleShowSelectedImage(){let e=!this.shouldShowSelectedImage;e&&this._disableExploreImages3D(),this.shouldShowSelectedImage=e,this._toggleDisabledViewer(this.shouldShowSelectedImage)}_resetSuperimposeOffset(){if(this.viewModel.mode==="default"){this._defaultSuperimposeZOffsetPercentage=50,this.viewModel.setDefaultSuperimposeZOffsetPercentage(50);return}this._panoramicSuperimposeRadiusOffsetPercentage=50,this.viewModel.setPanoramicSuperimposeRadiusPercentage(50)}_toggleSuperimposeCameraLock(){this.viewModel.updateDefaultSuperimposeCameraLock(!this.defaultSuperimposeCameraLockEnabled)}_toggleSuperimposeView(){this.superimposeViewEnabled=!this.superimposeViewEnabled}_disableExploreImages3D(){this._exploreImages3DMenuOpen=!1,this._exploreImages3DCollapsed=!1,this.verticalFilterEnabled=!1,this.viewModel.setFrustumSearchEnabled(!1)}_setExploreImages3DSearchMode(e){let t=e===`3d`||e===`both`,n=e===`frustum`||e===`both`,r=this.verticalFilterEnabled===t&&this.viewModel.frustumSearchEnabled===n;this.shouldShowSelectedImage=!1,this.verticalFilterEnabled=t,this.viewModel.setFrustumSearchEnabled(n),this._toggleDisabledViewer(!0),r&&this.scheduleRender()}_toggleExploreImages3DMenu(e){if(e.stopPropagation(),this._exploreImages3DMenuOpen){this._disableExploreImages3D();return}this._closeAllImageTools(),this.shouldShowSelectedImage=!1,this._exploreImages3DCollapsed=!1,!this.verticalFilterEnabled&&!this.viewModel.frustumSearchEnabled&&this._setExploreImages3DSearchMode(`3d`),this._exploreImages3DMenuOpen=!0}_toggleExploreImages3DSelection(e,{currentTarget:t}){this._setExploreImages3DSearchMode(this._getNextExploreImages3DSearchMode(e)),t.checked=e===`3d`?this.verticalFilterEnabled:this.viewModel.frustumSearchEnabled}_getNextExploreImages3DSearchMode(e){let t=this.verticalFilterEnabled,n=this.viewModel.frustumSearchEnabled,r=t&&n;return e===`3d`?r?`frustum`:n?`both`:`frustum`:r?`3d`:t?`both`:`3d`}_toggleDisabledViewer(e){e&&(this.disabled=!1)}_toggleEnhancementToolState(e){e.stopPropagation();let t=this.enhancementToolActive;this._closeAllImageTools(),this.enhancementToolActive=!t}_toggleExploreImages(){this.disabled=!this.disabled,this.disabled&&(this.shouldShowSelectedImage=!1,this._disableExploreImages3D())}_toggleGroupSelection(e,t){let n=this._rootActionTitleToFocus;e&&(this._rootActionTitleToFocus=t?.currentTarget?.getAttribute(`title`)),this.selectedGroup=e,this._actionTitleToFocus=e?this.messages.previous:n}_toggleImageOverlays(e){e.stopPropagation();let t=this.imageOverlaysOpened;this._closeAllImageTools(),this.imageOverlaysOpened=!t}_toggleImageGallery(e){e.stopPropagation();let t=this.galleryOpened;this._closeAllImageTools(),this.galleryOpened=this.imageGalleryEnabled?!t:!1}_toggleLocationTool(e){let t=this.imageLocationToolActive,n=this.triangularMeasurementActive&&t;this._closeAllImageTools(),this.imageLocationToolActive=n||!t,e.stopPropagation()}_toggleMeasurementSketch(e,t){e.stopPropagation();let n=this.measureType,r=this.triangularMeasurementActive;this._closeAllImageTools(),this.measureType=n===t&&!r?null:t,this.measureType===t&&(this.viewModel.displayNewMeasurementButton=!0)}_toggleNavigationTool(){let e=this.navigationToolActive;this._closeAllImageTools(),this.navigationToolActive=!e}_toggleMapImageConversionToolState(){this.mapImageConversionToolState=!this.mapImageConversionToolState}_toggleTriangularAreaMeasurements(){this._toggleTriangularMeasurements(`area`)}_toggleTriangularDistanceMeasurements(){this._toggleTriangularMeasurements(`distance`)}_toggleTriangularLocation(){let e=this.triangularMeasurementActive,t=this.navigationToolActive;if(!e){this._activateTriangulatedImageLocationWorkflow(e,t);return}if(this.measureType!==null){this._resetMeasureTypeAndActivateImageLocationTool();return}this.imageLocationToolActive?this._closeImageToolsAndToggleNavigation(e,t):this._activateTriangulatedImageLocationTool()}_toggleTriangularMeasurements(e){let t=this.triangularMeasurementActive,n=this.viewModel.measureType,r=this.navigationToolActive;t?e===n?(this._closeAllImageTools(),this.triangularMeasurementActive=!t,this.navigationToolActive=!r):(this.imageLocationToolActive=!1,this.measureType=e,this.viewModel.displayNewMeasurementButton=!0):(this._closeAllImageTools(),this.measureType=e,this.triangularMeasurementActive=!t,this.navigationToolActive=r?!0:!r,this.viewModel.displayNewMeasurementButton=!0)}_unregisterGalleryItem(e){this._galleryObserver.unobserve(e)}_updateNavigationTool(e){let{previousFeatureAngle:t,bestFeatureAngle:n}=this.viewModel,r=(n-t+540)%360-180;e.style.setProperty(E,`${t}deg`),e.style.setProperty(D,`${t+r}deg`)}async loadBestImage(e,t){return this.viewModel.loadBestImage(e,t)}loadImageFromSource(e,t,n){return e==="default"?this.viewModel.loadMediaSource(t,n):this.viewModel.loadPanoramicMediaSource(t,n)}async overlayMapFeatures(e,t){return this.removeHandles(`${Q.overlayed}-${e.id}`),this.addHandles(u(()=>e.visible,()=>{this.viewModel.toggleOverlayMapFeatures(e.id,e.visible,this.showMapFeatures)}),`${Q.overlayed}-${e.id}`),this._overlayedLayers.add(e),this.viewModel.overlayMapFeatures(e,t&&this.showMapFeatures)}async plotMapPoint(e){return this.viewModel.plotMapPoint(e)}plotReferencePointOnGround(e){this.viewModel.plotReferencePointOnGround(e)}plotReferencePointOnImage(e){this.viewModel.plotReferencePointOnImage(e)}removeOverlayedGraphicsOnImage(e){this.removeHandles(`${Q.overlayed}-${e}`),this._overlayedLayers.remove(this._overlayedLayers.find(t=>t.id===e)),this.viewModel.removeOverlayedGraphicsOnImage(e)}resetImage(){this.viewModel.resetImage()}render(){return X(`div`,{class:this.classes(q.widget,O)},this._renderRoot)}async showImageByObjectId(e,t){return this.viewModel.showImageByObjectId(e,t)}async startDataCapture(e){return this.viewModel.startDataCapture(e)}async stopDataCapture(e){return this.viewModel.stopDataCapture(e)}updateSuitabilities(e){this.viewModel.updateSuitabilities(e)}};e([g({readOnly:!0})],$.prototype,`accuracyParametersMissing`,null),e([g()],$.prototype,`actionBarPosition`,void 0),e([g()],$.prototype,`activeLayer`,null),e([g()],$.prototype,`activeVideoIcon`,null),e([g()],$.prototype,`activeAudioIcon`,null),e([g()],$.prototype,`cameraHeadingThreshold`,null),e([g()],$.prototype,`cameraPitchThreshold`,null),e([g()],$.prototype,`canNavigateSequentially`,null),e([g()],$.prototype,`currentBestFeature`,null),e([g()],$.prototype,`currentCoverageVisible`,null),e([g()],$.prototype,`dataCaptureEnabled`,void 0),e([g()],$.prototype,`dataCaptureLayer`,null),e([g()],$.prototype,`depthImageNotSupported`,null),e([g()],$.prototype,`disabled`,null),e([g()],$.prototype,`enhancementToolActive`,null),e([g()],$.prototype,`features`,null),e([g()],$.prototype,`imagePointsInView`,null),e([g()],$.prototype,`galleryOpened`,void 0),e([g()],$.prototype,`icon`,null),e([g()],$.prototype,`imageEnhancementToolActive`,void 0),e([g()],$.prototype,`videoEnhancementToolActive`,void 0),e([g({readOnly:!0})],$.prototype,`imageGalleryEnabled`,null),e([g()],$.prototype,`imageLocationToolActive`,null),e([g()],$.prototype,`imageOverlaysOpened`,void 0),e([g({readOnly:!0})],$.prototype,`invalidCameraHeading`,null),e([g()],$.prototype,`isAdditionalCoverageVisible`,null),e([g()],$.prototype,`isAdditionalPointSourcesVisible`,null),e([g()],$.prototype,`mapImageConversionToolState`,null),e([g()],$.prototype,`measureType`,null),e([g()],$.prototype,`layer`,null),e([g()],$.prototype,`navigationToolActive`,void 0),e([g()],$.prototype,`navigationMode`,null),e([J(b()),g({type:N})],$.prototype,`viewModel`,void 0),e([g(),Y(`esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer`)],$.prototype,`messages`,void 0),e([g(),Y(`esri/core/t9n/Units`)],$.prototype,`measurementUnitMessages`,void 0),e([g(),Y(`esri/t9n/common`)],$.prototype,`messagesCommon`,void 0),e([g(),Y(`esri/widgets/Sketch/t9n/Sketch`)],$.prototype,`messagesSketch`,void 0),e([g()],$.prototype,`pixelMeasurementUnit`,void 0),e([g()],$.prototype,`pixelAreaMeasurementUnit`,void 0),e([g({readOnly:!0})],$.prototype,`popupEnabled`,null),e([g()],$.prototype,`preloadMedia`,null),e([g()],$.prototype,`referencePoint`,null),e([g()],$.prototype,`selectedFeatureObjectId`,null),e([g()],$.prototype,`selectedPoint`,null),e([g()],$.prototype,`selectedGroup`,void 0),e([g()],$.prototype,`showCameraLocations`,void 0),e([g()],$.prototype,`showMapFeatures`,void 0),e([J([`create`,`delete`,`redo`,`undo`,`update`]),g({readOnly:!0})],$.prototype,`sketchViewModel`,null),e([g()],$.prototype,`triangularMeasurementActive`,null),e([g()],$.prototype,`videoLoaded`,null),e([g()],$.prototype,`view`,null),e([g({type:P,nonNullable:!0})],$.prototype,`visibleElements`,void 0),e([g()],$.prototype,`determineWorkflowForFeature`,null),e([g()],$.prototype,`shouldShowSelectedImage`,null),e([g()],$.prototype,`superimposeViewEnabled`,null),e([g()],$.prototype,`defaultSuperimposeCameraLockEnabled`,null),e([g()],$.prototype,`updateFootprint`,null),e([g()],$.prototype,`verticalFilterEnabled`,null),e([g()],$.prototype,`_defaultSuperimposeZOffsetPercentage`,void 0),e([g()],$.prototype,`_panoramicSuperimposeRadiusOffsetPercentage`,void 0),e([g()],$.prototype,`_exploreImages3DMenuOpen`,void 0),e([g()],$.prototype,`_exploreImages3DCollapsed`,void 0),e([g()],$.prototype,`_actionBarLayout`,null),e([g()],$.prototype,`_activeMeasurementHeading`,null),e([g()],$.prototype,`_imageOverlaysLoaderTask`,void 0),e([g()],$.prototype,`_imageMeasurementToolsLoaderTask`,void 0),e([g()],$.prototype,`_navigationSettingsLoaderTask`,void 0),e([g()],$.prototype,`_navigationTask`,void 0),e([g()],$.prototype,`_measurementToggle`,null),e([g()],$.prototype,`_renderRoot`,null),e([g()],$.prototype,`_imageEnhancementTools`,null),e([g()],$.prototype,`_videoEnhancementTools`,null),e([g()],$.prototype,`_superimposeTools`,null),e([g()],$.prototype,`_exploreImages3DTools`,null),e([g()],$.prototype,`_imageGalleryPanel`,null),e([g()],$.prototype,`_imageGalleryContext`,null),e([g()],$.prototype,`_imageOverlaysComponent`,null),e([g()],$.prototype,`_navigationUI`,null),e([g()],$.prototype,`_imageOverlayMessages`,null),e([g()],$.prototype,`_imageSketchToolsMessages`,null),e([g()],$.prototype,`_imageOverlaysEnabled`,null),e([g()],$.prototype,`_imageViewer`,null),e([g()],$.prototype,`_imageViewerTriangular`,null),e([g()],$.prototype,`_videoViewer`,null),e([g()],$.prototype,`_locationToggle`,null),e([g()],$.prototype,`_messageBox`,null),e([g()],$.prototype,`_navigationToolExpanded`,void 0),e([g()],$.prototype,`_navigationTool`,void 0),e([g()],$.prototype,`_panoramicVideoViewer`,null),e([g()],$.prototype,`_panoramicViewer`,null),e([g({readOnly:!0})],$.prototype,`noImageInSequenceError`,null),e([g()],$.prototype,`_renderNavigation`,null),e([g()],$.prototype,`_renderThumbnails`,null),e([g()],$.prototype,`_sketchLoaderTask`,void 0),$=e([ee(`esri.widgets.OrientedImageryViewer`)],$);const le=$;export{le as default};
4
+ `+l,onclick:()=>void this._toggleImageNavigation(`sequential`)}):null)}_overlaysGroupToggle(){let{overlays:e}=this.messages;return this.visibleElements.overlays?X(`calcite-action`,{bind:this,icon:`oriented-imagery-overlays`,key:`overlays-group-toggle`,text:e,title:e,onclick:e=>this._toggleGroupSelection(`overlays`,e)}):null}_openPopupAction(){let{showPopupsAction:e}=this.visibleElements;return e?X(`calcite-action`,{bind:this,disabled:!this.popupEnabled,icon:`popup`,text:this.messages.showPopups,title:this.messages.showPopups,onclick:this._toggleImageAttributes}):null}get _panoramicVideoViewer(){let{displayMessage:e,loadPanoramicVideoViewer:t,mode:n,clickAction:r,state:i,currentBestFeature:a}=this.viewModel,o=a?.attributes.imagePath,s=e!=null||n!==`panoramic-video`||i.includes(`loading`)||!o;return X(re,{afterCreate:t,clickAction:r,oiViewModel:this.viewModel,videoSource:o,visible:!s})}get _panoramicViewer(){let{displayMessage:e,loadPanoramicViewer:t,mode:n,clickAction:r,state:i}=this.viewModel,a=e!=null||n!==`panoramic`||i.includes(`loading`);return X(_,{afterCreate:t,clickAction:r,visible:!a})}get noImageInSequenceError(){return this._get(`noImageInSequenceError`)??!1}_activateTriangulatedImageLocationTool(){this.navigationToolActive=!0,this.imageLocationToolActive=!0}_activateTriangulatedImageLocationWorkflow(e,t){this._closeAllImageTools(),this.imageLocationToolActive=!0,this.triangularMeasurementActive=!e,this.navigationToolActive=t?!0:!t}_closeImageToolsAndToggleNavigation(e,t){this._closeAllImageTools(),this.triangularMeasurementActive=!e,this.navigationToolActive=!t}_resetMeasureTypeAndActivateImageLocationTool(){this.measureType=null,this.imageLocationToolActive=!0}_closeAllImageTools(){this.enhancementToolActive=!1,this.navigationToolActive=!1,this.imageOverlaysOpened=!1,this.galleryOpened=!1,this._exploreImages3DMenuOpen=!1,this.measureType=null,this.imageLocationToolActive=!1,this.navigationMode=null,this.triangularMeasurementActive=!1,this._settingsToggle&&(this._settingsToggle.expanded=!1,this.viewModel.activeViewer?.ui.remove(this._settingsToggle))}_handleBrightnessChange(e){this.viewModel.brightness=e.currentTarget.value??0}_handleVideoBrightnessChange(e){this.viewModel.videoViewModel?.handleVideoBrightnessChange(e.target.value)}_handleContrastChange(e){this.viewModel.contrast=e.currentTarget.value??0}_handleVideoContrastChange(e){this.viewModel.videoViewModel?.handleVideoContrastChange(e.target.value)}_handleVideoSeek(e){let t=this.viewModel?.videoElement?.content;t&&(t.currentTime=e.target.value,t.play())}_handleSharpnessChange(e){this.viewModel.sharpness=e.currentTarget.value??0}_handleSuperimposeZOffsetChange(e){let t=e.currentTarget.value??0;if(this.viewModel.mode==="default"){this._defaultSuperimposeZOffsetPercentage=t,this.viewModel.setDefaultSuperimposeZOffsetPercentage(100-t);return}this._panoramicSuperimposeRadiusOffsetPercentage=t,this.viewModel.setPanoramicSuperimposeRadiusPercentage(100-t)}_lazyLoadImage(e,t){e.forEach(async e=>{if(e.isIntersecting){let n=e.target,r=n.getAttribute(`data-src`),i=n.getAttribute(`data-rotation`),a=n.getAttribute(`data-objectid`),o=i?parseFloat(i)%360:0,{layer:s,_galleryController:{signal:u}}=this;if(!r||!a)return;let d;try{d=k(r)?await A(s,a,{signal:u}):await j(r,{signal:u})}catch(e){l(e)||c.getLogger(`esri.widgets.OrientedImageryViewer`).error(`#lazyLoadImage()`,e)}finally{t.unobserve(n)}if(!d)return;M(d,n,o)}})}_loadImageFromGallery(e){let{target:t}=e;if(!t)return;let n=t.getAttribute(`data-objectid`);n&&this.viewModel.currentBestFeature?.attributes.objectId!==Number(n)&&this.viewModel.selectBestFeature(n)}_loadImageMeasurementResources(){this._imageMeasurementToolsLoaderTask=i(async()=>{let{default:e}=await import(`./OrientedImageryViewer/components/ImageMeasurementWidget.js`);return e})}_loadSketchResources(){this._sketchLoaderTask=i(async()=>(await import(`./OrientedImageryViewer/components/SketchTools.js`)).default)}_onAdditionalCoverageVisibilityChange(e){this.viewModel.setAdditionalCoverageVisibility(e)}_onAdditionalCameraLocationsVisibility(e){this.viewModel.setAdditionalCameraLocationsVisibility(e)}_onCurrentCoverageVisibilityChange(e){this.viewModel.setCurrentCoverageVisibility(e)}_registerGalleryItem(e){this._galleryObserver.observe(e)}_renderWarning(e,t,n){let{viewModel:{state:r}}=this;return r===`image-loaded`?X(I,{class:T.alert,icon:`exclamation-mark-triangle-f`,kind:`warning`,message:t,open:!0,title:e,tooltip:t,topLayerDisabled:this.topLayerDisabled,onClose:n}):null}get _renderNavigation(){let{viewModel:{sectorData:e,navigatorCurrentBestFeature:t,currentBestFeature:n,state:i}}=this;if(!this.container||!n)return null;let a,o,s,c,l;if(t){let{x:e,y:n,direction:r}=t,[i,u,d,f]=S[r];a=`M ${e} ${n} L ${i} ${u} A ${w[2]} ${w[2]} 0 0 1 ${d} ${f} Z`,o=e,c=n,s=S[r][4],l=S[r][5]}let u=e=>{let t=e.target.dataset?.sector;t&&this.viewModel.handleSectorClick(+t)},d=e=>{let t=e.target.dataset;if(!t)return;let{featureIndexInSector:n,sector:r}=t;n&&r&&this.viewModel.handleFeatureClick({sector:r,featureIndexInSector:+n})},f=e=>{e.removeEventListener(`click`,d)},p=n.attributes.objectId,m=e?.map(e=>e?.items).filter(Boolean).flatMap(e=>e?.map(({x:e,y:t,objectID:n,featureIndexInSector:r,sector:i})=>X(`circle`,{afterRemoved:f,class:this.classes(T.feature,{selected:p===n}),cx:e,cy:t,"data-feature-index-in-sector":r,"data-sector":i,key:`${T.feature}-${n}`,r:ae,onclick:d}))),h=e=>{e.removeEventListener(`click`,u)},g=this.classes({[T.navigationWrapper]:!0,[T.navigationWrapperVideo]:this.viewModel.mode.includes(`video`),[T.navigationZoomed]:this._navigationToolExpanded});return this.navigationToolActive&&(i===`image-loaded`||this.videoLoaded)?X(`div`,{bind:this,class:g,key:this.messages.navigationTool},X(`svg`,{afterCreate:e=>this._storeNavigationToolReference(e),class:r()?oe:T.rotateWithAnimation,focusable:`false`,height:C,role:`img`,width:C,xmlns:`http://www.w3.org/2000/svg`},X(`defs`,null,X(`linearGradient`,{gradientUnits:`userSpaceOnUse`,id:`${this.id}-coverage-fill`,x1:o,x2:s,y1:c,y2:l},X(`stop`,{class:T.navigationPathOffset0,offset:0}),X(`stop`,{class:T.navigationPathOffset1,offset:1}))),X(`g`,null,X(`circle`,{class:this.classes(T.sector,T.outerSector),cx:w[3],cy:w[3],r:w[3],onclick:this._scaleNavigationTool}),X(`circle`,{class:T.sector,cx:w[3],cy:w[3],r:w[2]}),X(`circle`,{class:T.sector,cx:w[3],cy:w[3],r:w[1]}),X(`circle`,{class:T.sector,cx:w[3],cy:w[3],r:w[0]}),X(`path`,{class:T.pointer,d:`M 56.5 6.06217782649107 L 60 0 L 63.5 6.06217782649107 Z`,key:`${T.pointer}-west`}),X(`path`,{class:this.classes(T.pointer,T.north),d:`M 113.93782217350893 56.5 L 120 60 L 113.93782217350893 63.5 Z`,key:`${T.pointer}-north`}),X(`path`,{class:T.pointer,d:`M 56.5 113.93782217350893 L 60 120 L 63.5 113.93782217350893 Z`,key:`${T.pointer}-east`}),X(`path`,{class:T.pointer,d:`M 6.06217782649107 56.5 L 0 60 L 6.06217782649107 63.5 Z`,key:`${T.pointer}-south`}),X(`path`,{class:this.classes(T.sector,T.sectorSeparator),d:`M 23.937554159486076 23.937554159486076 L 96.06244584051393 96.06244584051393 M 23.937554159486076 96.06244584051393 L 96.06244584051393 23.937554159486076`,key:T.sectorSeparator}),y([w[2],w[1],w[0]],w[3],w[3]).map((t,n)=>X(`path`,{afterRemoved:h,class:this.classes(T.sector,e?.[n]?.length?T.sectorEnabled:T.sectorDisabled),d:t,"data-sector":`${n}`,key:`${T.sector}-${n}`,onclick:u})),X(`path`,{class:this.classes(T.sector,T.sectorCross),d:`M 56.4 56.4 L 63.53 63.53 M 63.53 56.4 L 56.4 63.53`,key:T.sectorCross}),m,n.attributes.cameraPitch>=5&&a?X(`path`,{class:T.selectedFeaturePath,d:a,fill:`url(#${this.id}-coverage-fill)`,key:T.selectedFeaturePath}):null))):null}_renderSketch(){let{dataCaptureLayer:e,imageOverlaysOpened:t}=this;if(!e||t||(this._sketchLoaderTask||this._loadSketchResources(),!this._sketchLoaderTask?.value))return null;let{geometryType:n}=e,r=n===`point`?`pin`:n===`polyline`?`line`:`polygon`,i=this._sketchLoaderTask.value;return X(`div`,{class:T.sketchTools},X(i,{icon:r,messages:this._imageSketchToolsMessages,type:n,onAction:this._onAction}))}get _renderThumbnails(){let{currentBestFeature:e,thumbnails:t}=this.viewModel;return e?X(`div`,{class:T.carouselContent},t?.items.map(({url:t,objectId:n,rotation:r},i)=>X(`div`,{class:`${T.carouselItemWrapper}${e.attributes.objectId===n?`--selected`:``}`,key:`${T.carouselItemWrapper}-${i}`},X(`canvas`,{afterCreate:this._registerGalleryItem,afterRemoved:this._unregisterGalleryItem,alt:`thumbnail-${n}`,class:T.carouselItem,"data-objectid":`${n}`,"data-rotation":`${r}`,"data-src":t,onclick:this._loadImageFromGallery,onmouseenter:this._highlight,onmouseleave:this._removeHighlight})))):null}_resetImageTools(){this.viewModel.sharpness=this.viewModel.brightness=this.viewModel.contrast=0}_resetVideoTools(){this.viewModel.videoViewModel?.resetVideoEnhancementTools()}_storeNavigationToolReference(e){this._navigationTool=e}_toggleAdditionalCameraLocations(){this.isAdditionalPointSourcesVisible=!this.isAdditionalPointSourcesVisible}_toggleAdditionalCoverage(){this.isAdditionalCoverageVisible=!this.isAdditionalCoverageVisible}_toggleCurrentCoverage(){this.currentCoverageVisible=!this.currentCoverageVisible}_toggleShowSelectedImage(){let e=!this.shouldShowSelectedImage;e&&this._disableExploreImages3D(),this.shouldShowSelectedImage=e,this._toggleDisabledViewer(this.shouldShowSelectedImage)}_resetSuperimposeOffset(){if(this.viewModel.mode==="default"){this._defaultSuperimposeZOffsetPercentage=50,this.viewModel.setDefaultSuperimposeZOffsetPercentage(50);return}this._panoramicSuperimposeRadiusOffsetPercentage=50,this.viewModel.setPanoramicSuperimposeRadiusPercentage(50)}_toggleSuperimposeCameraLock(){this.viewModel.updateDefaultSuperimposeCameraLock(!this.defaultSuperimposeCameraLockEnabled)}_toggleSuperimposeView(){this.superimposeViewEnabled=!this.superimposeViewEnabled}_disableExploreImages3D(){this._exploreImages3DMenuOpen=!1,this._exploreImages3DCollapsed=!1,this.verticalFilterEnabled=!1,this.viewModel.setFrustumSearchEnabled(!1)}_setExploreImages3DSearchMode(e){let t=e===`3d`||e===`both`,n=e===`frustum`||e===`both`,r=this.verticalFilterEnabled===t&&this.viewModel.frustumSearchEnabled===n;this.shouldShowSelectedImage=!1,this.verticalFilterEnabled=t,this.viewModel.setFrustumSearchEnabled(n),this._toggleDisabledViewer(!0),r&&this.scheduleRender()}_toggleExploreImages3DMenu(e){if(e.stopPropagation(),this._exploreImages3DMenuOpen){this._disableExploreImages3D();return}this._closeAllImageTools(),this.shouldShowSelectedImage=!1,this._exploreImages3DCollapsed=!1,!this.verticalFilterEnabled&&!this.viewModel.frustumSearchEnabled&&this._setExploreImages3DSearchMode(this.layer?.verticalSearchRange==null?`frustum`:`3d`),this._exploreImages3DMenuOpen=!0}_toggleExploreImages3DSelection(e,{currentTarget:t}){this._setExploreImages3DSearchMode(this._getNextExploreImages3DSearchMode(e)),t.checked=e===`3d`?this.verticalFilterEnabled:this.viewModel.frustumSearchEnabled}_getNextExploreImages3DSearchMode(e){if(this.layer?.verticalSearchRange==null)return`frustum`;let t=this.verticalFilterEnabled,n=this.viewModel.frustumSearchEnabled,r=t&&n;return e===`3d`?r?`frustum`:n?`both`:`frustum`:r?`3d`:t?`both`:`3d`}_toggleDisabledViewer(e){e&&(this.disabled=!1)}_toggleEnhancementToolState(e){e.stopPropagation();let t=this.enhancementToolActive;this._closeAllImageTools(),this.enhancementToolActive=!t}_toggleExploreImages(){this.disabled=!this.disabled,this.disabled&&(this.shouldShowSelectedImage=!1,this._disableExploreImages3D())}_toggleGroupSelection(e,t){let n=this._rootActionTitleToFocus;e&&(this._rootActionTitleToFocus=t?.currentTarget?.getAttribute(`title`)),this.selectedGroup=e,this._actionTitleToFocus=e?this.messages.previous:n}_toggleImageOverlays(e){e.stopPropagation();let t=this.imageOverlaysOpened;this._closeAllImageTools(),this.imageOverlaysOpened=!t}_toggleImageGallery(e){e.stopPropagation();let t=this.galleryOpened;this._closeAllImageTools(),this.galleryOpened=this.imageGalleryEnabled?!t:!1}_toggleLocationTool(e){let t=this.imageLocationToolActive,n=this.triangularMeasurementActive&&t;this._closeAllImageTools(),this.imageLocationToolActive=n||!t,e.stopPropagation()}_toggleMeasurementSketch(e,t){e.stopPropagation();let n=this.measureType,r=this.triangularMeasurementActive;this._closeAllImageTools(),this.measureType=n===t&&!r?null:t,this.measureType===t&&(this.viewModel.displayNewMeasurementButton=!0)}_toggleNavigationTool(){let e=this.navigationToolActive;this._closeAllImageTools(),this.navigationToolActive=!e}_toggleMapImageConversionToolState(){this.mapImageConversionToolState=!this.mapImageConversionToolState}_toggleTriangularAreaMeasurements(){this._toggleTriangularMeasurements(`area`)}_toggleTriangularDistanceMeasurements(){this._toggleTriangularMeasurements(`distance`)}_toggleTriangularLocation(){let e=this.triangularMeasurementActive,t=this.navigationToolActive;if(!e){this._activateTriangulatedImageLocationWorkflow(e,t);return}if(this.measureType!==null){this._resetMeasureTypeAndActivateImageLocationTool();return}this.imageLocationToolActive?this._closeImageToolsAndToggleNavigation(e,t):this._activateTriangulatedImageLocationTool()}_toggleTriangularMeasurements(e){let t=this.triangularMeasurementActive,n=this.viewModel.measureType,r=this.navigationToolActive;t?e===n?(this._closeAllImageTools(),this.triangularMeasurementActive=!t,this.navigationToolActive=!r):(this.imageLocationToolActive=!1,this.measureType=e,this.viewModel.displayNewMeasurementButton=!0):(this._closeAllImageTools(),this.measureType=e,this.triangularMeasurementActive=!t,this.navigationToolActive=r?!0:!r,this.viewModel.displayNewMeasurementButton=!0)}_unregisterGalleryItem(e){this._galleryObserver.unobserve(e)}_updateNavigationTool(e){let{previousFeatureAngle:t,bestFeatureAngle:n}=this.viewModel,r=(n-t+540)%360-180;e.style.setProperty(E,`${t}deg`),e.style.setProperty(D,`${t+r}deg`)}async loadBestImage(e,t){return this.viewModel.loadBestImage(e,t)}loadImageFromSource(e,t,n){return e==="default"?this.viewModel.loadMediaSource(t,n):this.viewModel.loadPanoramicMediaSource(t,n)}async overlayMapFeatures(e,t){return this.removeHandles(`${Q.overlayed}-${e.id}`),this.addHandles(u(()=>e.visible,()=>{this.viewModel.toggleOverlayMapFeatures(e.id,e.visible,this.showMapFeatures)}),`${Q.overlayed}-${e.id}`),this._overlayedLayers.add(e),this.viewModel.overlayMapFeatures(e,t&&this.showMapFeatures)}async plotMapPoint(e){return this.viewModel.plotMapPoint(e)}plotReferencePointOnGround(e){this.viewModel.plotReferencePointOnGround(e)}plotReferencePointOnImage(e){this.viewModel.plotReferencePointOnImage(e)}removeOverlayedGraphicsOnImage(e){this.removeHandles(`${Q.overlayed}-${e}`),this._overlayedLayers.remove(this._overlayedLayers.find(t=>t.id===e)),this.viewModel.removeOverlayedGraphicsOnImage(e)}resetImage(){this.viewModel.resetImage()}render(){return X(`div`,{class:this.classes(q.widget,O)},this._renderRoot)}async showImageByObjectId(e,t){return this.viewModel.showImageByObjectId(e,t)}async startDataCapture(e){return this.viewModel.startDataCapture(e)}async stopDataCapture(e){return this.viewModel.stopDataCapture(e)}updateSuitabilities(e){this.viewModel.updateSuitabilities(e)}};e([g({readOnly:!0})],$.prototype,`accuracyParametersMissing`,null),e([g()],$.prototype,`actionBarPosition`,void 0),e([g()],$.prototype,`activeLayer`,null),e([g()],$.prototype,`activeVideoIcon`,null),e([g()],$.prototype,`activeAudioIcon`,null),e([g()],$.prototype,`cameraHeadingThreshold`,null),e([g()],$.prototype,`cameraPitchThreshold`,null),e([g()],$.prototype,`canNavigateSequentially`,null),e([g()],$.prototype,`currentBestFeature`,null),e([g()],$.prototype,`currentCoverageVisible`,null),e([g()],$.prototype,`dataCaptureEnabled`,void 0),e([g()],$.prototype,`dataCaptureLayer`,null),e([g()],$.prototype,`depthImageNotSupported`,null),e([g()],$.prototype,`disabled`,null),e([g()],$.prototype,`enhancementToolActive`,null),e([g()],$.prototype,`features`,null),e([g()],$.prototype,`imagePointsInView`,null),e([g()],$.prototype,`galleryOpened`,void 0),e([g()],$.prototype,`icon`,null),e([g()],$.prototype,`imageEnhancementToolActive`,void 0),e([g()],$.prototype,`videoEnhancementToolActive`,void 0),e([g({readOnly:!0})],$.prototype,`imageGalleryEnabled`,null),e([g()],$.prototype,`imageLocationToolActive`,null),e([g()],$.prototype,`imageOverlaysOpened`,void 0),e([g({readOnly:!0})],$.prototype,`invalidCameraHeading`,null),e([g()],$.prototype,`isAdditionalCoverageVisible`,null),e([g()],$.prototype,`isAdditionalPointSourcesVisible`,null),e([g()],$.prototype,`mapImageConversionToolState`,null),e([g()],$.prototype,`measureType`,null),e([g()],$.prototype,`layer`,null),e([g()],$.prototype,`navigationToolActive`,void 0),e([g()],$.prototype,`navigationMode`,null),e([J(b()),g({type:N})],$.prototype,`viewModel`,void 0),e([g(),Y(`esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer`)],$.prototype,`messages`,void 0),e([g(),Y(`esri/core/t9n/Units`)],$.prototype,`measurementUnitMessages`,void 0),e([g(),Y(`esri/t9n/common`)],$.prototype,`messagesCommon`,void 0),e([g(),Y(`esri/widgets/Sketch/t9n/Sketch`)],$.prototype,`messagesSketch`,void 0),e([g()],$.prototype,`pixelMeasurementUnit`,void 0),e([g()],$.prototype,`pixelAreaMeasurementUnit`,void 0),e([g({readOnly:!0})],$.prototype,`popupEnabled`,null),e([g()],$.prototype,`preloadMedia`,null),e([g()],$.prototype,`referencePoint`,null),e([g()],$.prototype,`selectedFeatureObjectId`,null),e([g()],$.prototype,`selectedPoint`,null),e([g()],$.prototype,`selectedGroup`,void 0),e([g()],$.prototype,`showCameraLocations`,void 0),e([g()],$.prototype,`showMapFeatures`,void 0),e([J([`create`,`delete`,`redo`,`undo`,`update`]),g({readOnly:!0})],$.prototype,`sketchViewModel`,null),e([g()],$.prototype,`triangularMeasurementActive`,null),e([g()],$.prototype,`videoLoaded`,null),e([g()],$.prototype,`view`,null),e([g({type:P,nonNullable:!0})],$.prototype,`visibleElements`,void 0),e([g()],$.prototype,`determineWorkflowForFeature`,null),e([g()],$.prototype,`shouldShowSelectedImage`,null),e([g()],$.prototype,`superimposeViewEnabled`,null),e([g()],$.prototype,`defaultSuperimposeCameraLockEnabled`,null),e([g()],$.prototype,`updateFootprint`,null),e([g()],$.prototype,`verticalFilterEnabled`,null),e([g()],$.prototype,`_defaultSuperimposeZOffsetPercentage`,void 0),e([g()],$.prototype,`_panoramicSuperimposeRadiusOffsetPercentage`,void 0),e([g()],$.prototype,`_exploreImages3DMenuOpen`,void 0),e([g()],$.prototype,`_exploreImages3DCollapsed`,void 0),e([g()],$.prototype,`_actionBarLayout`,null),e([g()],$.prototype,`_activeMeasurementHeading`,null),e([g()],$.prototype,`_imageOverlaysLoaderTask`,void 0),e([g()],$.prototype,`_imageMeasurementToolsLoaderTask`,void 0),e([g()],$.prototype,`_navigationSettingsLoaderTask`,void 0),e([g()],$.prototype,`_navigationTask`,void 0),e([g()],$.prototype,`_measurementToggle`,null),e([g()],$.prototype,`_renderRoot`,null),e([g()],$.prototype,`_imageEnhancementTools`,null),e([g()],$.prototype,`_videoEnhancementTools`,null),e([g()],$.prototype,`_superimposeTools`,null),e([g()],$.prototype,`_exploreImages3DTools`,null),e([g()],$.prototype,`_imageGalleryPanel`,null),e([g()],$.prototype,`_imageGalleryContext`,null),e([g()],$.prototype,`_imageOverlaysComponent`,null),e([g()],$.prototype,`_navigationUI`,null),e([g()],$.prototype,`_imageOverlayMessages`,null),e([g()],$.prototype,`_imageSketchToolsMessages`,null),e([g()],$.prototype,`_imageOverlaysEnabled`,null),e([g()],$.prototype,`_imageViewer`,null),e([g()],$.prototype,`_imageViewerTriangular`,null),e([g()],$.prototype,`_videoViewer`,null),e([g()],$.prototype,`_locationToggle`,null),e([g()],$.prototype,`_messageBox`,null),e([g()],$.prototype,`_navigationToolExpanded`,void 0),e([g()],$.prototype,`_navigationTool`,void 0),e([g()],$.prototype,`_panoramicVideoViewer`,null),e([g()],$.prototype,`_panoramicViewer`,null),e([g({readOnly:!0})],$.prototype,`noImageInSequenceError`,null),e([g()],$.prototype,`_renderNavigation`,null),e([g()],$.prototype,`_renderThumbnails`,null),e([g()],$.prototype,`_sketchLoaderTask`,void 0),$=e([ee(`esri.widgets.OrientedImageryViewer`)],$);const le=$;export{le as default};
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7561,8018],{8018(t,e,r){r.r(e),r.d(e,{executeForTopExtents:()=>l});var i=r(5443),o=r(2272),s=r(24645),n=r(57561);async function l(t,e,r){let l=(0,o.Dl)(t),u=await(0,s.$K)(l,n.default.from(e),{...r}),a=u.data.extent;return!a||isNaN(a.xmin)||isNaN(a.ymin)||isNaN(a.xmax)||isNaN(a.ymax)?{count:u.data.count,extent:null}:{count:u.data.count,extent:i.A.fromJSON(a)}}},24645(t,e,r){r.d(e,{$K:()=>c,KW:()=>y,Yb:()=>d,xs:()=>h});var i=r(56507),o=r(84952),s=r(60408),n=r(52039),l=r(21325),u=r(10536),a=(r(5076),r(58501));function p(t,e){let r=t.geometry,i=t.toJSON(),o=i;if(null!=r&&(o.geometry=JSON.stringify(r),o.geometryType=(0,s.$B)(r),o.inSR=(0,l.YX)(r.spatialReference)),i.topFilter?.groupByFields&&(o.topFilter.groupByFields=i.topFilter.groupByFields.join(",")),i.topFilter?.orderByFields&&(o.topFilter.orderByFields=i.topFilter.orderByFields.join(",")),i.topFilter&&(o.topFilter=JSON.stringify(o.topFilter)),i.objectIds&&(o.objectIds=i.objectIds.join(",")),i.orderByFields&&(o.orderByFields=i.orderByFields.join(",")),i.outFields&&!(e?.returnCountOnly||e?.returnExtentOnly||e?.returnIdsOnly)?o.outFields=i.outFields.includes("*")?"*":i.outFields.join(","):delete o.outFields,i.outSR?o.outSR=(0,l.YX)(i.outSR):r&&i.returnGeometry&&(o.outSR=o.inSR),i.returnGeometry&&delete i.returnGeometry,i.timeExtent){let{start:t,end:e}=i.timeExtent;(null!=t||null!=e)&&(o.time=t===e?t:`${t??"null"},${e??"null"}`),delete i.timeExtent}return o}async function d(t,e,r,i){let o=await m(t,e,"json",i);return(0,a.q)(e,r,o.data),o}async function y(t,e,r){return null!=e.timeExtent&&e.timeExtent.isEmpty?{data:{objectIds:[]}}:m(t,e,"json",r,{returnIdsOnly:!0})}async function c(t,e,r){return null!=e.timeExtent&&e.timeExtent.isEmpty?{data:{count:0,extent:null}}:m(t,e,"json",r,{returnExtentOnly:!0,returnCountOnly:!0}).then(t=>{let e=t.data;if(e.hasOwnProperty("extent"))return t;if(e.features||e.hasOwnProperty("count"))throw Error("Layer does not support extent calculation.");return t})}function h(t,e,r){return null!=e.timeExtent&&e.timeExtent.isEmpty?Promise.resolve({data:{count:0}}):m(t,e,"json",r,{returnIdsOnly:!0,returnCountOnly:!0})}async function m(t,e,r,s={},l={}){let a="string"==typeof t?(0,o.An)(t):t,d=e.geometry?[e.geometry]:[];s.responseType="json";let[y]=await(0,n.el)(d,s);null!=y&&((e=e.clone()).geometry=y);let c=(0,u.z)({...a.query,f:r,...l,...p(e,l)});return(0,i.A)((0,o.fj)(a.path,"queryTopFeatures"),{...s,query:{...c,...s.query}})}},57561(t,e,r){r.d(e,{default:()=>S});var i,o=r(32198),s=r(66552),n=r(25482),l=r(4718),u=r(91429),a=r(78888),p=r(16930),d=r(65864),y=r(50498);let c=i=class extends n.o{constructor(t){super(t),this.groupByFields=void 0,this.topCount=void 0,this.orderByFields=void 0}clone(){return new i({groupByFields:this.groupByFields,topCount:this.topCount,orderByFields:this.orderByFields})}};(0,o.Cg)([(0,u.MZ)({type:[String],json:{write:!0}})],c.prototype,"groupByFields",void 0),(0,o.Cg)([(0,u.MZ)({type:Number,json:{write:!0}})],c.prototype,"topCount",void 0),(0,o.Cg)([(0,u.MZ)({type:[String],json:{write:!0}})],c.prototype,"orderByFields",void 0),c=i=(0,o.Cg)([(0,u.$K)("esri.rest.support.TopFilter")],c);const h=c;var m,g=r(79677),v=r(43937);const w=new s.J({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),F=new s.J({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let S=class extends n.o{static{m=this}constructor(t){super(t),this.cacheHint=void 0,this.distance=void 0,this.geometry=null,this.geometryPrecision=void 0,this.maxAllowableOffset=void 0,this.num=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.resultType=null,this.returnGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.start=void 0,this.spatialRelationship="intersects",this.timeExtent=null,this.topFilter=void 0,this.units=null,this.where="1=1"}writeStart(t,e){e.resultOffset=this.start,e.resultRecordCount=this.num||10}clone(){return new m((0,l.o8)({cacheHint:this.cacheHint,distance:this.distance,geometry:this.geometry,geometryPrecision:this.geometryPrecision,maxAllowableOffset:this.maxAllowableOffset,num:this.num,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,resultType:this.resultType,returnGeometry:this.returnGeometry,returnZ:this.returnZ,returnM:this.returnM,start:this.start,spatialRelationship:this.spatialRelationship,timeExtent:this.timeExtent,topFilter:this.topFilter,units:this.units,where:this.where}))}};(0,o.Cg)([(0,u.MZ)({type:Boolean,json:{write:!0}})],S.prototype,"cacheHint",void 0),(0,o.Cg)([(0,u.MZ)({type:Number,json:{write:{overridePolicy:t=>({enabled:!!t})}}})],S.prototype,"distance",void 0),(0,o.Cg)([(0,u.MZ)({types:y.yR,json:{read:d.rS,write:!0}})],S.prototype,"geometry",void 0),(0,o.Cg)([(0,u.MZ)({type:Number,json:{write:!0}})],S.prototype,"geometryPrecision",void 0),(0,o.Cg)([(0,u.MZ)({type:Number,json:{write:!0}})],S.prototype,"maxAllowableOffset",void 0),(0,o.Cg)([(0,u.MZ)({type:Number,json:{read:{source:"resultRecordCount"}}})],S.prototype,"num",void 0),(0,o.Cg)([(0,u.MZ)({json:{write:!0}})],S.prototype,"objectIds",void 0),(0,o.Cg)([(0,u.MZ)({type:[String],json:{write:!0}})],S.prototype,"orderByFields",void 0),(0,o.Cg)([(0,u.MZ)({type:[String],json:{write:!0}})],S.prototype,"outFields",void 0),(0,o.Cg)([(0,u.MZ)({type:p.A,json:{read:{source:"outSR"},write:{target:"outSR"}}})],S.prototype,"outSpatialReference",void 0),(0,o.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],S.prototype,"resultType",void 0),(0,o.Cg)([(0,u.MZ)({json:{write:!0}})],S.prototype,"returnGeometry",void 0),(0,o.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:t=>({enabled:t})}}})],S.prototype,"returnM",void 0),(0,o.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:t=>({enabled:t})}}})],S.prototype,"returnZ",void 0),(0,o.Cg)([(0,u.MZ)({type:Number,json:{read:{source:"resultOffset"}}})],S.prototype,"start",void 0),(0,o.Cg)([(0,v.K)("start"),(0,v.K)("num")],S.prototype,"writeStart",null),(0,o.Cg)([(0,u.MZ)({type:String,json:{read:{source:"spatialRel",reader:w.read},write:{target:"spatialRel",writer:w.write}}})],S.prototype,"spatialRelationship",void 0),(0,o.Cg)([(0,u.MZ)({type:g.A,json:{write:!0}})],S.prototype,"timeExtent",void 0),(0,o.Cg)([(0,u.MZ)({type:h,json:{write:!0}})],S.prototype,"topFilter",void 0),(0,o.Cg)([(0,u.MZ)({type:String,json:{read:F.read,write:{writer:F.write,overridePolicy(t){return{enabled:null!=t&&!!this.distance}}}}})],S.prototype,"units",void 0),(0,o.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],S.prototype,"where",void 0),S=m=(0,o.Cg)([(0,u.$K)("esri.rest.support.TopFeaturesQuery")],S),S.from=(0,a.dp)(S)}}]);