@arcgis/core 4.34.0-next.22 → 4.34.0-next.24
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.
- package/applications/Components/arcadeFeatureUtils.d.ts +5 -0
- package/applications/Components/arcadeFeatureUtils.js +5 -0
- package/arcade/parser.js +1 -1
- package/arcade/validation/arcadeValidator.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/026fbeb0ff5b9e6c74df.js +1 -0
- package/assets/esri/core/workers/chunks/0f6203ae32663b2b52db.js +1 -0
- package/assets/esri/core/workers/chunks/20bcd2e6cf02e057ad7d.js +1 -0
- package/assets/esri/core/workers/chunks/234cbc290b074eeb5dd6.js +1 -0
- package/assets/esri/core/workers/chunks/{00eef04fd026adaf0df8.js → 36a2a8b6547604bad2ab.js} +1 -1
- package/assets/esri/core/workers/chunks/{63cc4647b7775ff8aedf.js → 44d28849e59f62616e72.js} +1 -1
- package/assets/esri/core/workers/chunks/4c47d327815e281c457e.js +1 -0
- package/assets/esri/core/workers/chunks/{6bb1ecaa0afc2c7de79e.js → 4cc3eeb0b824c53793d0.js} +1 -1
- package/assets/esri/core/workers/chunks/{19ae76283a0cb0fe4dee.js → 4ea96aff38bb301dc40d.js} +1 -1
- package/assets/esri/core/workers/chunks/{cab1a1067f44ce374673.js → 7d7f8f2936ddee65e3da.js} +1 -1
- package/assets/esri/core/workers/chunks/{b57c0ef7bc57e3c91257.js → 865fccacf44ae5b70eba.js} +1 -1
- package/assets/esri/core/workers/chunks/{f43110391f124b8a179c.js → 909a6218db87cba2c9ba.js} +1 -1
- package/assets/esri/core/workers/chunks/a273f80298417edecc07.js +1 -0
- package/assets/esri/core/workers/chunks/{496e02cfe3d84010f675.js → a2ed7a3cd518dd136ec7.js} +1 -1
- package/assets/esri/core/workers/chunks/{1d9e44bdd129cc682ae5.js → ac93b3f1ff15a95d926c.js} +1 -1
- package/assets/esri/core/workers/chunks/b32c1b60896a72e0ae90.js +1 -0
- package/assets/esri/core/workers/chunks/{6782114a752b9cc59168.js → b6b8272a74a5c24a6b86.js} +1 -1
- package/assets/esri/core/workers/chunks/b9f66d735a7e63417b3d.js +1 -0
- package/assets/esri/core/workers/chunks/d2ce360961ca4b58666c.js +1 -0
- package/assets/esri/core/workers/chunks/{8b19fe829a9dc26fb3fe.js → d915d0a30d9beb24bd3a.js} +1 -1
- package/assets/esri/core/workers/chunks/f90573c9dc36e51cd588.js +1 -0
- package/assets/esri/core/workers/chunks/fe1902d63f610cebd947.js +1 -0
- package/chunks/Bufferer-Dw9Qi4T1.js +1 -1
- package/chunks/Envelope.js +1 -1
- package/chunks/MultiPathImpl.js +1 -1
- package/chunks/OperatorClip.js +1 -1
- package/chunks/ProjectionTransformation.js +1 -1
- package/chunks/index.js +1 -1
- package/config.js +1 -1
- package/core/MemCachePool.js +1 -1
- package/core/accessorSupport/overrideDefaultsFrom.js +1 -1
- package/geometry/operators/gx/operatorOffset.js +1 -1
- package/geometry/operators/support/jsonConverter.js +1 -1
- package/interfaces.d.ts +157 -31
- package/kernel.js +1 -1
- package/layers/VideoLayer.js +1 -1
- package/layers/orientedImagery/core/ExposurePoint.js +1 -1
- package/layers/orientedImagery/core/bestImageUtils.js +1 -1
- package/layers/support/ControlPointsGeoreference.js +1 -1
- package/layers/support/PixelBlock.js +1 -1
- package/layers/support/RasterJobHandler.js +1 -1
- package/layers/support/RasterWorker.js +1 -1
- package/layers/support/SceneModification.js +1 -1
- package/layers/support/SceneModifications.js +1 -1
- package/layers/support/rasterDatasets/MRFRaster.js +1 -1
- package/layers/support/rasterFunctions/clipUtils.js +1 -1
- package/layers/support/rasterFunctions/rasterFunctionHelper.js +1 -1
- package/layers/video/VideoController.js +1 -1
- package/layers/video/videoUtils.js +1 -1
- package/libs/basisu/BasisUEncoder.js +1 -1
- package/libs/dxtEncoder/DXTEncoder.js +1 -1
- package/libs/i3s/I3SModule.js +1 -1
- package/networks/support/UtilityNetworkLookupHelper.js +1 -1
- package/networks/support/utils.js +1 -1
- package/package.json +1 -1
- package/renderers/support/DictionaryControlString.js +1 -1
- package/rest/knowledgeGraph/GraphAddFieldIndexResult.js +1 -1
- package/rest/knowledgeGraph/GraphAddNamedTypesResult.js +1 -1
- package/rest/knowledgeGraph/GraphAddPropertyResult.js +1 -1
- package/rest/knowledgeGraph/GraphDataModelOperationResult.d.ts +1 -1
- package/rest/knowledgeGraph/GraphDataModelOperationResult.js +1 -1
- package/rest/knowledgeGraph/GraphDeleteFieldIndexResult.js +1 -1
- package/rest/knowledgeGraph/GraphDeleteNamedTypeResult.js +1 -1
- package/rest/knowledgeGraph/GraphDeletePropertyResult.js +1 -1
- package/rest/knowledgeGraph/GraphUpdateNamedTypesResult.js +1 -1
- package/rest/knowledgeGraph/GraphUpdatePropertyResult.js +1 -1
- package/rest/knowledgeGraph/GraphUpdateSearchIndexResult.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/cimAnalyzer.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriterInputEvaluator.js +1 -1
- package/views/2d/layers/VideoLayerView2D.js +1 -1
- package/views/2d/layers/features/FeatureContainer.js +1 -1
- package/views/2d/layers/features/processor/ClusterStrategy.js +1 -1
- package/views/2d/layers/features/processor/TrackStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/Overrides.js +1 -1
- package/views/2d/layers/features/support/FeatureFilterEvaluator.js +1 -1
- package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
- package/views/3d/analysis/images/heading-rotate-svg.js +1 -1
- package/views/3d/analysis/images/tilt-rotate-svg.js +1 -1
- package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
- package/views/3d/layers/SceneLayerWorker.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/pipeline/Tile3DManager.js +1 -1
- package/views/3d/state/ViewStateManager.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
- package/views/3d/webgl-engine/lib/Object3D.js +1 -1
- package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
- package/views/VideoView.js +1 -1
- package/views/draw/DrawScreenTool.js +1 -1
- package/views/draw/MultipointDrawAction.js +1 -1
- package/views/draw/PointDrawAction.js +1 -1
- package/views/draw/PolygonDrawAction.js +1 -1
- package/views/draw/PolylineDrawAction.js +1 -1
- package/views/magnifier/mask-svg.js +1 -1
- package/views/magnifier/overlay-svg.js +1 -1
- package/views/support/TextureCompressionHelper.js +1 -1
- package/views/support/TextureCompressionWorker.js +1 -1
- package/views/support/TextureCompressionWorkerHandle.js +1 -1
- package/webmap/Bookmark.js +1 -1
- package/webscene/spec-certification/spec.js +1 -1
- package/widgets/BasemapLayerList.js +1 -1
- package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
- package/widgets/BatchAttributeForm/inputs/EditableInput.js +1 -1
- package/widgets/BatchAttributeForm/inputs/GroupInput.js +1 -1
- package/widgets/BatchAttributeForm/inputs/InputBase.d.ts +1 -1
- package/widgets/BatchAttributeForm/inputs/InputBase.js +1 -1
- package/widgets/Editor/support/SketchController.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/Feature/FeatureExpression/FeatureExpressionViewModel.js +1 -1
- package/widgets/Feature/FeatureViewModel.js +1 -1
- package/widgets/Feature/support/arcadeFeatureUtils.js +1 -1
- package/widgets/LayerList.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/components/ImageViewer.js +1 -1
- package/widgets/OrientedImageryViewer/components/ImageViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/components/OrientedImageryVideoViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/navigation/NavigationManager.js +1 -1
- package/widgets/OrientedImageryViewer/navigation/queries.js +1 -1
- package/widgets/OrientedImageryViewer/navigation/utils.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
- package/widgets/PanoramicViewer.js +1 -1
- package/widgets/Print.js +1 -1
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/Slider/SliderViewModel.js +1 -1
- package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeature.js +1 -1
- package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeaturesDrillIn.js +1 -1
- package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
- package/widgets/support/SelectionList.js +1 -1
- package/widgets/support/Selector2D/SelectionOperation.js +1 -1
- package/widgets/support/UtilityNetworkAssociations/FeatureUtilityNetworkAssociationsViewModel.js +1 -1
- package/assets/esri/core/workers/chunks/0ba6177ba118a0f032e2.js +0 -1
- package/assets/esri/core/workers/chunks/573a8393bec916dcf16f.js +0 -1
- package/assets/esri/core/workers/chunks/58e74681ddef30ba9cb6.js +0 -1
- package/assets/esri/core/workers/chunks/81006d9eed65bbb82962.js +0 -1
- package/assets/esri/core/workers/chunks/8fa6c938e8dc7bbfaeb7.js +0 -1
- package/assets/esri/core/workers/chunks/9f91d519da67714f915f.js +0 -1
- package/assets/esri/core/workers/chunks/ad3871f497ecea1a08c9.js +0 -1
- package/assets/esri/core/workers/chunks/bbca1b85656d9ba71e4c.js +0 -1
- package/assets/esri/core/workers/chunks/cd64181298d82c8d0e9d.js +0 -1
- package/assets/esri/core/workers/chunks/e2cb295104ed2f8cd2ff.js +0 -1
- package/assets/esri/core/workers/chunks/f3d5d92e0aefc2593208.js +0 -1
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{
|
|
5
|
+
import{getMetersPerUnitForSR as e}from"../../../core/unitUtils.js";import r from"../../../geometry/Extent.js";import{getWebMercatorScalingFactor as t}from"../../../layers/orientedImagery/transformations/utils.js";function n(n,i){const{x:o,y:m,spatialReference:a}=n,s=i*t(m,a)/e(a);return new r({xmin:o-s,xmax:o+s,ymin:m-s,ymax:m+s,spatialReference:n.spatialReference})}export{n as createExtentAroundPoint};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import"../intl.js";import{prefersReducedMotion as t}from"../core/a11yUtils.js";import{createTask as i}from"../core/asyncUtils.js";import a from"../core/Collection.js";import{deprecatedProperty as s}from"../core/deprecate.js";import o from"../core/Logger.js";import{isAbortError as n}from"../core/promiseUtils.js";import{watch as r,initial as l,syncAndInitial as d,whenOnce as c}from"../core/reactiveUtils.js";import{property as g}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as h}from"../core/accessorSupport/decorators/subclass.js";import{or as m}from"../layers/orientedImagery/transformations/utils.js";import u from"./Expand.js";import v from"./PanoramicViewer.js";import p from"./Widget.js";import{getAllArcPath as y}from"./OrientedImageryViewer/arcUtils.js";import{getDelegatedEvents as w,defaultImageGeometryField as _,defaultOIObjectIDField as T,segmentArcs as M,featureCircleRadius as b,navigationToolDimensionLength as C,sectorsRadii as A}from"./OrientedImageryViewer/constants.js";import{css as I,navigation as f,navigationToolRotationFrom as L,navigationToolRotationTo as k,root as V}from"./OrientedImageryViewer/css.js";import{loadImageForAttachment as S,getThumbnailPixelBlock as O,isFeatureAttachment as E,renderImageWithRotation as F}from"./OrientedImageryViewer/galleryUtils.js";import P from"./OrientedImageryViewer/OrientedImageryViewerViewModel.js";import x from"./OrientedImageryViewer/OrientedImageryViewerVisibleElements.js";import{loadAlertComponents as H,Alert as j}from"./OrientedImageryViewer/components/Alert.js";import G from"./OrientedImageryViewer/components/ImageLocationWidget.js";import D from"./OrientedImageryViewer/components/ImageViewer.js";import $ from"./OrientedImageryViewer/components/NavigationAction.js";import{NavigationActionsCollection as N,NavigationActions as B}from"./OrientedImageryViewer/components/NavigationActions.js";import{NoImageLoadedError as R}from"./OrientedImageryViewer/navigation/errors.js";import{loadCalciteComponents as W}from"./support/componentsUtils.js";import{globalCss as U}from"./support/globalCss.js";import"./support/widgetUtils.js";import{messageBundle as z}from"./support/decorators/messageBundle.js";import{vmEvent as q}from"./support/decorators/vmEvent.js";import{tsx as Z,tsxFragment as J}from"./support/jsxFactory.js";import{substitute as K}from"../intl/substitute.js";const Q={overlayed:"overlayed"};let X=class extends p{constructor(e,t){super(e,t),this.dataCaptureEnabled=!1,this.galleryOpened=!1,this.imageEnhancementToolActive=!1,this.videoEnhancementToolActive=!1,this.imageOverlaysOpened=!1,this.navigationToolActive=!1,this.viewModel=new P,this.messagesCommon=null,this.messagesSketch=null,this.pixelMeasurementUnit="meters",this.pixelAreaMeasurementUnit="square-meters",this.showCameraLocations=!1,this.showMapFeatures=!1,this.visibleElements=new x,this._imageOverlaysLoaderTask=null,this._imageMeasurementToolsLoaderTask=null,this._navigationSettingsLoaderTask=null,this._clearMeasurements=()=>{this.viewModel.measureType=null,this.viewModel.clearPreviousMeasurements()},this._clearImageLocation=()=>{this.imageLocationToolActive=!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._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=>{const t=e.layer;t===this.dataCaptureLayer&&(this.stopDataCapture(),this.dataCaptureLayer=null),this.removeOverlayedGraphicsOnImage(`${t.id}`)},this._handleOverlayLayerSelect=e=>{const t=e.layer;this.viewModel.overlayMapFeatures(t,this.showMapFeatures),this.addHandles(r(()=>t.visible,()=>{this.viewModel.toggleOverlayMapFeatures(t.id,t.visible)}),`${Q.overlayed}-${t.id}`)},this._highlight=e=>{const t=e.target?.dataset.objectid;t&&this.viewModel.highlight(t)},this._onAction=e=>{const{target:t}=e,{dataset:{action:i}}=t,{_previousAction:a}=this,s=a?.dataset.action,o=s?.includes("draw")??!1,n="select-feature"===s,r=s!==i;switch(i){case"draw-point":case"draw-polygon":case"draw-polyline":{a&&m(n,o&&r)&&(a.active=!1),t.active=!t.active;const e=i.replace("draw-","");this.viewModel.digitizeCreate(e),this._previousAction=t.active?t:null;break}case"save":this.viewModel.saveDrawing();break;case"select-feature":o&&(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=()=>{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._settingsToggle=null,this._toggleImageNavigation=async e=>{const t=this.navigationMode;this._closeAllImageTools(),this.navigationMode=t!==e?e:null;const{activeViewer:i}=this.viewModel;if(!i)return;const{mode:a,preserveAngle:s}=this.viewModel;if("default"===a)if("directional"===this.navigationMode){const e=await this._loadNavigationSettings(),t="heading"===s||"both"===s,i="pitch"===s||"both"===s,{messages:a,messagesCommon:o}=this,n=new e({cameraHeadingThreshold:this.cameraHeadingThreshold,cameraPitchThreshold:this.cameraPitchThreshold,uiStrings:{configureNavigation:a.configureNavigation,preserveHeading:a.preserveHeading,preserveHeadingDescription:a.preserveHeadingDescription,preservePitch:a.preservePitch,preservePitchDescription:a.preservePitchDescription,settings:o.settings,thresholdLabel:a.thresholdLabel},onInputChange:this._handleNavigationSettingsInputChange,onToggle:this._handleNavigationSettingsToggle,preserveHeading:t,preservePitch:i});this._settingsToggle=new u({content:n,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=()=>{this.viewModel.toggleImageAttributes()},this.navigate=async e=>{let t=null;try{const{currentNode:i}=this.viewModel;if(!i)throw new R;t=await this.viewModel.navigate(i,e)}catch(i){n(i)||o.getLogger(this).error("Error occurred while navigating",i)}return t},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)}initialize(){this.addHandles([r(()=>[this.viewModel?.bestFeatureAngle,this._navigationTool],([e,t])=>{t&&this._updateNavigationTool(t)},l),r(()=>this.currentCoverageVisible,e=>this._onCurrentCoverageVisibilityChange(e)),r(()=>this.isAdditionalCoverageVisible,e=>this._onAdditionalCoverageVisibilityChange(e)),r(()=>this.isAdditionalPointSourcesVisible,e=>this._onAdditionalCameraLocationsVisibility(e)),r(()=>({features:this.currentBestFeature,showCameraLocations:this.showCameraLocations,state:this.viewModel.state}),({showCameraLocations:e,state:t})=>{"image-loaded"===t&&this.viewModel.overlayCameraLocations(e)},d),r(()=>({feature:this.currentBestFeature,showMapFeatures:this.showMapFeatures,state:this.viewModel.state}),async(e,t)=>{if(e.showMapFeatures!==t?.showMapFeatures&&this.viewModel.toggleAllOverlayMapFeatures(e.showMapFeatures),null!=e.feature&&e.feature!==t?.feature){if(this.viewModel.removeAllOverlayMapFeatures(),await c(()=>"image-loaded"===this.viewModel.state),this.dataCaptureLayer&&this.stopDataCapture(),await this._restoreOverlays(),!this.dataCaptureLayer)return;await this.startDataCapture(this.dataCaptureLayer),this._previousAction?.active&&(this._previousAction.active=!1,this._previousAction=null)}},l)])}loadDependencies(){return Promise.all([W({"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"),label:()=>import("@esri/calcite-components/dist/components/calcite-label"),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"),dropdown:()=>import("@esri/calcite-components/dist/components/calcite-dropdown"),"dropdown-group":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-group"),"dropdown-item":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-item"),slider:()=>import("@esri/calcite-components/dist/components/calcite-slider")}),H()])}destroy(){this._galleryController.abort(),this._galleryObserver.disconnect()}get accuracyParametersMissing(){return this.viewModel.accuracyParametersMissing}get activeLayer(){return s(o.getLogger(this),"activeLayer",{replacement:"layer"}),this.layer}set activeLayer(e){s(o.getLogger(this),"activeLayer",{replacement:"layer"}),this.layer=e}get activeVideoIcon(){const{videoElement:e,videoViewModel:t}=this.viewModel;return e?.loaded&&t?t.videoPaused?"play":"pause":"play"}get activeAudioIcon(){const{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(){const{layer:e}=this;if(!e)return!1;const{fields:t,sequenceOrderField:i}=e;return t.some(({name:e})=>e.toLowerCase()===`${i??"sequenceorder"}`.toLowerCase())}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 disabled(){return this.viewModel.disabled}set disabled(e){this.viewModel.disabled=e}get displayMessage(){return this.viewModel.displayMessage}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.mapImageConversionToolState=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(){const{popupEnabled:e,state:t}=this.viewModel;return"image-loaded"===t&&e}get referencePoint(){return this.viewModel.referencePoint??null}get sketchViewModel(){return this.viewModel.sketch}get triangularMeasurementActive(){return this.viewModel.triangularMeasurementActive}set triangularMeasurementActive(e){this.viewModel.triangularMeasurementActive=e}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}set updateFootprint(e){this.viewModel.updateFootprint=e}get updateFootprint(){return this.viewModel.updateFootprint}_renderActionBar(){return Z("calcite-action-bar",{expandDisabled:!0,layout:"horizontal",slot:"action-bar"},Z("calcite-action-group",null,this._currentFootprintToggle(),this._additionalFootprintToggle(),this._additionalPointSourcesToggle()),Z("calcite-action-group",null,this._directionToolToggle(),this._mapImageConversionToggle(),this._navigationToolToggle(),this._imageEnhancementsToggle(),this._videoEnhancementsToggle()),Z("calcite-action-group",null,this._measurementToolsToggle(),this._imageGalleryToggle(),this._imageOverlaysToggle(),this._openPopupAction()))}_renderEnhancementSlider({title:e,value:t,handleChange:i}){return Z("div",{class:I.imageEnhancementToolContainer},Z("calcite-label",null,e,Z("calcite-slider",{bind:this,labelTicks:!0,max:10,min:0,ticks:2,value:t,onCalciteSliderInput:i})))}get _activeMeasurementIcon(){const{measureType:e,imageLocationToolActive:t}=this;if(t)return"pin-tear";switch(e){case"area":return"measure-area";case"height":return"measure-building-height-top-base";default:return"measure-line"}}get _activeMeasurementHeading(){const{measureType:e,messages:t,triangularMeasurementActive:i}=this,{groundArea:a,heightAboveGround:s,groundDistance:o,triangulatedAreaHeading:n,triangulatedDistanceHeading:r}=t;if(i)return"area"===e?n:r;switch(e){case"area":return a;case"height":return s;default:return o}}_additionalFootprintToggle(){const{isAdditionalCoverageVisible:e,invalidCameraHeading:t,visibleElements:{additionalFootprintToggle:i}}=this;return i?Z("calcite-action",{active:e,bind:this,class:I.addCoverage,disabled:t,icon:"trapezoid-area",onclick:this._toggleAdditionalCoverage,text:this.messages.additionalFootprints,title:this.messages.additionalFootprints}):null}_additionalPointSourcesToggle(){const{isAdditionalPointSourcesVisible:e,invalidCameraHeading:t,visibleElements:{additionalCameraLocationsToggle:i}}=this;return i?Z("calcite-action",{active:e,bind:this,class:I.addExpPoints,disabled:t,icon:"circle-area",onclick:this._toggleAdditionalCameraLocations,text:this.messages.additionalCameraLocations,title:this.messages.additionalCameraLocations}):null}get _measurementToggle(){const{viewModel:{state:e,measureType:t,currentBestFeatureMeasurementImage:i},triangularMeasurementActive:a,id:s}=this;if("image-loaded"!==e||!t||a&&!i)return;this._imageMeasurementToolsLoaderTask||this._loadImageMeasurementResources();const o=this._imageMeasurementToolsLoaderTask?.value;return o?Z("calcite-dialog",{bind:this,dragEnabled:!0,escapeDisabled:!0,heading:this._activeMeasurementHeading,id:`${s}-${t}-measurement`,open:!0,placement:"bottom-start",resizable:!0,scale:"s",slot:"dialogs",width:"s",onCalciteDialogBeforeClose:this._clearMeasurements},Z(o,{measurementType:t,measurementUnitMessages:this.measurementUnitMessages,messages:this.messages,oiViewModel:this.viewModel})):null}get _renderRoot(){const{viewModel:{state:e},triangularMeasurementActive:t}=this;return Z("calcite-panel",{bind:this,class:t?I.viewerContainerMeasurement:I.viewerContainer,heading:this.visibleElements.title?this.messages.title:void 0,loading:e.includes("loading")&&!t},this.visibleElements.menu?this._renderActionBar():null,Z("calcite-shell",null,Z("calcite-panel",null,this._imageViewer,this._panoramicViewer,this._videoViewer,this._messageBox,this.invalidCameraHeading?this._renderWarning(this.messages.invalidCameraHeadingWarningTitle,this.messages.invalidCameraHeadingWarningDescription):[this._imageGalleryPanel,this._renderNavigation,this._imageOverlaysPanel()],this._imageEnhancementTools,this._videoEnhancementTools,this._renderSketch()),this._imageViewerTriangular,this._measurementToggle,this._locationToggle))}_currentFootprintToggle(){const{currentCoverageVisible:e,invalidCameraHeading:t}=this,{currentFootprintToggle:i}=this.visibleElements;return i?Z("calcite-action",{active:e,bind:this,class:I.currentCoverage,disabled:t,icon:"trapezoid-area",onclick:this._toggleCurrentCoverage,text:this.messages.currentFootprint,title:this.messages.currentFootprint}):null}get _imageEnhancementTools(){const{imageEnhancementToolActive:e,viewModel:{brightness:t,contrast:i,sharpness:a,state:s}}=this;return e&&"image-loaded"===s?Z("calcite-panel",{bind:this,class:I.imageEnhancementWrapper,closable:!0,closed:!e,heading:this.messages.imageEnhancement,key:this.messages.imageEnhancement,onCalcitePanelClose:this._toggleImageEnhancementToolState},Z("div",{class:I.imageEnhancementTools},Z("div",{class:I.imageEnhancementToolContainer},Z("calcite-label",null,this.messages.brightness,Z("calcite-slider",{bind:this,labelTicks:!0,max:10,min:-10,ticks:5,value:t,onCalciteSliderInput:this._handleBrightnessChange}))),Z("div",{class:I.imageEnhancementToolContainer},Z("calcite-label",null,this.messages.contrast,Z("calcite-slider",{bind:this,labelTicks:!0,max:10,min:-10,ticks:5,value:i,onCalciteSliderInput:this._handleContrastChange}))),Z("div",{class:I.imageEnhancementToolContainer},Z("calcite-label",null,this.messages.sharpness,Z("calcite-slider",{bind:this,labelTicks:!0,max:1,min:0,step:.1,ticks:.5,value:a,onCalciteSliderInput:this._handleSharpnessChange})))),Z("calcite-action",{bind:this,icon:"reset",onclick:this._resetImageTools,slot:"header-actions-end",text:this.messagesCommon.reset,title:this.messagesCommon.reset})):null}get _videoEnhancementTools(){const{videoEnhancementToolActive:e,viewModel:{videoViewModel:t,mode:i},messages:{videoEnhancement:a,brightness:s,contrast:o},messagesCommon:{reset:n}}=this;return e&&"video"===i&&t?Z("calcite-panel",{bind:this,class:I.imageEnhancementWrapper,closable:!0,closed:!e,heading:a,key:a,onCalcitePanelClose:this._toggleVideoEnhancementToolState},Z("div",{class:I.imageEnhancementTools},this._renderEnhancementSlider({title:s,value:t.videoBrightness,handleChange:this._handleVideoBrightnessChange}),this._renderEnhancementSlider({title:o,value:t.videoContrast,handleChange:this._handleVideoContrastChange})),Z("calcite-action",{bind:this,icon:"reset",onclick:this._resetVideoTools,slot:"header-actions-end",text:n})):null}_imageEnhancementsToggle(){const{state:e,mode:t}=this.viewModel,{imageEnhancement:i}=this.visibleElements;return i&&"video"!==t?Z("calcite-action",{active:this.imageEnhancementToolActive,bind:this,disabled:"default"!==t||"image-loaded"!==e,icon:"sliders-horizontal",onclick:this._toggleImageEnhancementToolState,text:this.messages.imageEnhancement,title:this.messages.imageEnhancement}):null}_videoEnhancementsToggle(){const{mode:e}=this.viewModel,{videoEnhancement:t}=this.messages;return"video"===e?Z("calcite-action",{active:this.imageEnhancementToolActive,bind:this,disabled:"video"!==e,icon:"sliders-horizontal",onclick:this._toggleVideoEnhancementToolState,text:t,title:t}):null}get _imageGalleryPanel(){const{container:e,galleryOpened:t,imageGalleryEnabled:i}=this;return i&&t&&e?this._imageGalleryContext:null}get _imageGalleryContext(){const{galleryOpened:e,invalidCameraHeading:t}=this;return Z("calcite-panel",{bind:this,class:I.carousel,closable:!0,closed:!e,disabled:t,heading:this.messages.imageGallery,key:this.messages.imageGallery,onCalcitePanelClose:this._toggleImageGallery},Z("div",{class:I.carouselContainer},this._renderThumbnails))}_imageGalleryToggle(){const{imageGalleryEnabled:e,invalidCameraHeading:t,visibleElements:{imageGallery:i}}=this;return i?Z("calcite-action",{active:this.galleryOpened,bind:this,disabled:!e||t,icon:"images",onclick:this._toggleImageGallery,text:this.messages.imageGallery,title:this.messages.imageGallery}):null}get _imageOverlaysComponent(){const{_imageOverlayMessages:e,_imageOverlaysLoaderTask:t,_overlayedLayers:a,dataCaptureEnabled:s,dataCaptureLayer:o,imageOverlaysOpened:n,showCameraLocations:r,showMapFeatures:l,view:d,layer:c}=this;if(!c)return null;const g=c.imageGeometryField?.length?c.imageGeometryField:_,h=c.imageReferenceField?.length?c.imageReferenceField:T;t||(this._imageOverlaysLoaderTask=i(async()=>(await import("./OrientedImageryViewer/components/ImageOverlays.js")).default));const m=this._imageOverlaysLoaderTask?.value;return m?Z(m,{closed:!n,dataCaptureEnabled:s,dataCaptureLayer:o,imageGeometryField:g,imageReferenceField:h,messages:e,overlayedLayers:a,showCameraLocations:r,showMapFeatures:l,view:d,onDataCaptureLayerChanged:this._handleDataCaptureLayerChange,onImageOverlaysClosed:this._onImageOverlayClosed,onLayerDeselected:this._handleOverlayLayerDeselect,onLayerSelected:this._handleOverlayLayerSelect,onShowCameraLocationsChanged:this._onShowCameraLocationsChanged,onShowMapFeaturesChanged:this._onShowMapFeaturesChanged}):null}get _imageOverlayMessages(){return{...this.messages,...this.messagesSketch}}get _imageSketchToolsMessages(){return{...this.messagesSketch,...this.messagesCommon}}_imageOverlaysPanel(){const{imageOverlaysOpened:e,viewModel:{state:t}}=this,i=this.classes({[I.imageOverlaysContainer]:!0,[U.hidden]:!e||"image-loaded"!==t});return Z("div",{class:i,key:this.messages.imageOverlays},this._imageOverlaysComponent)}_imageOverlaysToggle(){const{viewModel:{state:e},imageOverlaysOpened:t,invalidCameraHeading:i,visibleElements:{imageOverlays:a}}=this;return a?Z("calcite-action",{active:t,bind:this,disabled:"image-loaded"!==e||i,icon:"layers",onclick:this._toggleImageOverlays,text:this.messages.imageOverlays,title:this.messages.imageOverlays}):null}get _imageViewer(){const{displayMessage:e,loadImageViewer:t,mode:i,clickAction:a,state:s}=this.viewModel,o=null!=e||"default"!==i||s.includes("loading"),{messages:{end:n,next:r,previous:l,start:d}}=this;return Z(D,{afterCreate:t,clickAction:a,navigationEnabled:!o&&null!==this.navigationMode,navigationViewModel:this.viewModel,uiStrings:{end:n,next:r,previous:l,start:d},visible:!o})}get _imageViewerTriangular(){const{messages:e,triangularMeasurementActive:t}=this,{displayMessage:i,storeImageMeasurementViewer:a,mode:s,state:o,clickAction:n}=this.viewModel,r=null!=i||"default"!==s,l=this.classes({[I.viewer]:!r,[I.viewerHidden]:r});return t?Z("calcite-panel",{class:I.viewerContainerMeasurement,heading:e.measurementViewerHeading,loading:o.includes("loading")},Z("calcite-panel",{bind:this,class:l},Z(D,{afterCreate:a,clickAction:n,uiStrings:e}))):null}get _videoViewer(){const{mode:e,loadVideoViewer:t,videoViewModel:i}=this.viewModel,{control:a,reset:s}=this.messagesCommon,{mute:o,unmute:n}=this.messages,r="video"!==e,l=this.classes({[I.viewer]:!r,[I.viewerHidden]:r});return Z("calcite-panel",{bind:this,class:l},Z("div",{afterCreate:t,styles:{height:"100%"}}),Z("calcite-slider",{bind:this,labelHandles:!0,labelTicks:!0,max:i?.videoDuration,minLabel:"0",value:i?.currentTime??0,onCalciteSliderChange:this._sliderChangeHandler}),Z("calcite-action-bar",{expandDisabled:!0,layout:"horizontal"},Z("calcite-action-group",null,Z("calcite-action",{bind:this,icon:this.activeVideoIcon,onclick:()=>i?.playVideoHandler(),text:"Play",title:i?.videoPaused?a.play:a.pause})),Z("calcite-action-group",null,Z("calcite-action",{bind:this,icon:"refresh",onclick:()=>i?.rewindVideoHandler(),text:"Rewind",title:s})),Z("calcite-action-group",null,Z("calcite-action",{bind:this,icon:this.activeAudioIcon,onclick:()=>i?.toggleAudio(),text:"Audio",title:i?.videoMuted?o:n}))))}get _locationToggle(){const{viewModel:{state:e,groundCoordinates:t,groundCoordinatesAccuracy:i,triangulatedPoint:a},imageLocationToolActive:s,triangularMeasurementActive:o,messages:{groundLocation:n,triangulatedLocationHeading:r}}=this;if("image-loaded"!==e||!t||!s)return;let l=t;if(o){if(!a)return;l=a}return Z("calcite-dialog",{bind:this,dragEnabled:!0,escapeDisabled:!0,heading:o?r:n,id:n,open:!0,placement:"bottom-start",resizable:!0,scale:"s",slot:"dialogs",width:"s",onCalciteDialogBeforeClose:this._clearImageLocation},Z(G,{accuracy:i,groundCoordinates:l,messages:this.messages}))}_mapImageConversionToggle(){const{mapImageConversionToolState:e,viewModel:{state:t},invalidCameraHeading:i,visibleElements:{mapImageConversionTool:a}}=this;return a?Z("calcite-action",{active:e,bind:this,disabled:"image-loaded"!==t||i,icon:"image-pin",onclick:this._toggleMapImageConversionToolState,text:this.messages.mapImageConversionTool,title:this.messages.mapImageConversionTool}):null}_measurementToolsToggle(){const{_activeMeasurementIcon:e,measureType:t,viewModel:i,accuracyParametersMissing:a,messages:s,triangularMeasurementActive:o,visibleElements:{measurementTools:n}}=this,{state:r,mode:l}=i,{measurementTools:d,groundDistance:c,groundArea:g,heightAboveGround:h,groundLocation:m,triangulatedDistanceHeading:u,triangulatedAreaHeading:v,triangulatedLocationHeading:p}=s;return n?Z("calcite-dropdown",{disabled:a,key:"measurement-tools",maxItems:5,title:d,width:"m"},Z("calcite-action",{bind:this,disabled:"image-loaded"!==r||a,icon:e,slot:"trigger",text:d}),Z("calcite-dropdown-group",null,Z("calcite-dropdown-item",{bind:this,disabled:"image-loaded"!==r,iconStart:"measure-line",key:"distance-measurement",onclick:e=>this._toggleMeasurementSketch(e,"distance"),selected:"distance"===t&&!o},c),Z("calcite-dropdown-item",{bind:this,disabled:"image-loaded"!==r,iconStart:"measure-area",key:"area-measurement",onclick:e=>this._toggleMeasurementSketch(e,"area"),selected:"area"===t&&!o},g),Z("calcite-dropdown-item",{bind:this,disabled:"image-loaded"!==r,iconStart:"measure-building-height-top-base",key:"height-dropdown",onclick:e=>this._toggleMeasurementSketch(e,"height"),selected:"height"===t},h),Z("calcite-dropdown-item",{bind:this,disabled:"image-loaded"!==r,iconStart:"pin-tear",key:"surface-location",onclick:this._toggleLocationTool,selected:!!this.imageLocationToolActive&&!o},m),"default"===l&&Z(J,null,Z("calcite-dropdown-item",{bind:this,disabled:"image-loaded"!==r,iconStart:"dual-image-distance",key:"triangular-measurement-distance",selected:!!o&&"distance"===this.measureType,onCalciteDropdownItemSelect:this._toggleTriangularDistanceMeasurements},u),Z("calcite-dropdown-item",{bind:this,disabled:"image-loaded"!==r,iconStart:"dual-image-area",key:"triangular-measurement-area",selected:!!o&&"area"===this.measureType,onCalciteDropdownItemSelect:this._toggleTriangularAreaMeasurements},v),Z("calcite-dropdown-item",{bind:this,disabled:"image-loaded"!==r,iconStart:"dual-image-location",key:"triangular-location",selected:!!o&&this.imageLocationToolActive,onCalciteDropdownItemSelect:this._toggleTriangularLocation},p)))):null}get _messageBox(){const{messages:e,viewModel:{displayMessage:t,mode:i}}=this;if(!t||"video"===i)return null;const{data:a,key:s,map:o}=t,n=`${o?K(e[s],o):e[s]}`;return Z("span",{class:I.messageBox},a?`${n} ${a}`:n)}async _loadNavigationSettings(){return this._navigationSettingsLoaderTask||(this._navigationSettingsLoaderTask=i(async()=>(await import("./OrientedImageryViewer/components/NavigationSettings.js")).default)),await this._navigationSettingsLoaderTask.promise}_navigationToolToggle(){const{state:e}=this.viewModel,{visibleElements:{navigationTool:t}}=this;return t?Z("calcite-action",{active:this.navigationToolActive,bind:this,disabled:"image-loaded"!==e||this.invalidCameraHeading,icon:"explore",onclick:this._toggleNavigationTool,text:this.messages.navigationTool,title:this.messages.navigationTool}):null}_directionToolToggle(){const{state:e}=this.viewModel,{visibleElements:{directionalNavigation:t,sequentialNavigation:i}}=this,a=new N;t&&a.push(new $({active:"directional"===this.navigationMode,disabled:"image-loaded"!==e||this.invalidCameraHeading,icon:"i2DExplore",onclick:()=>{this._toggleImageNavigation("directional")},text:this.messages.directionalNavigation,title:this.messages.directionalNavigationDescription})),i&&a.push(new $({active:"sequential"===this.navigationMode,disabled:"image-loaded"!==e||this.invalidCameraHeading||!this.canNavigateSequentially,icon:"reorder-stack",onclick:()=>{this._toggleImageNavigation("sequential")},text:this.messages.sequentialNavigation,title:this.messages.sequentialNavigationDescription}));return t||i?Z(B,{actions:a,activeAction:a.items.find(e=>e.active),icon:"absolute-direction",label:this.messages.imageNavigation,scale:"m",title:this.messages.imageNavigation}):null}_openPopupAction(){const{showPopupsAction:e}=this.visibleElements;return e?Z("calcite-action",{bind:this,disabled:!this.popupEnabled,icon:"popup",onclick:this._toggleImageAttributes,text:this.messages.showPopups,title:this.messages.showPopups}):null}get _panoramicViewer(){const{displayMessage:e,loadPanoramicViewer:t,mode:i,clickAction:a,state:s}=this.viewModel,{messages:{end:o,next:n,previous:r,start:l}}=this,d=null!=e||"panoramic"!==i||s.includes("loading");return Z(v,{afterCreate:t,clickAction:a,navigationEnabled:!d&&null!==this.navigationMode,navigationViewModel:this.viewModel,uiStrings:{end:o,next:n,previous:r,start:l},visible:!d})}_activateTriangulatedImageLocationTool(){this.navigationToolActive=!0,this.imageLocationToolActive=!0}_activateTriangulatedImageLocationWorkflow(e,t){this._closeAllImageTools(),this.imageLocationToolActive=!0,this.triangularMeasurementActive=!e,this.navigationToolActive=!!t||!t}_closeImageToolsAndToggleNavigation(e,t){this._closeAllImageTools(),this.triangularMeasurementActive=!e,this.navigationToolActive=!t}_resetMeasureTypeAndActivateImageLocationTool(){this.measureType=null,this.imageLocationToolActive=!0}_closeAllImageTools(){this.imageEnhancementToolActive=!1,this.navigationToolActive=!1,this.imageOverlaysOpened=!1,this.galleryOpened=!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)}_handleSharpnessChange(e){this.viewModel.sharpness=e.currentTarget.value??0}_lazyLoadImage(e,t){e.forEach(async e=>{if(e.isIntersecting){const a=e.target,s=a.getAttribute("data-src"),r=a.getAttribute("data-rotation"),l=a.getAttribute("data-objectid"),d=r?parseFloat(r)%360:0,{layer:c,_galleryController:{signal:g}}=this;if(!s||!l)return;let h;try{h=E(s)?await S(c,l,{signal:g}):await O(s,{signal:g})}catch(i){n(i)||o.getLogger("esri.widgets.OrientedImageryViewer").error("#lazyLoadImage()",i)}finally{t.unobserve(a)}if(!h)return;F(h,a,d)}})}_loadImageFromGallery(e){const{target:t}=e;if(!t)return;const i=t.getAttribute("data-objectid");i&&this.viewModel.currentBestFeature?.attributes.objectId!==Number(i)&&this.viewModel.selectBestFeature(i)}_loadImageMeasurementResources(){this._imageMeasurementToolsLoaderTask=i(async()=>{const{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){const{viewModel:{state:i}}=this;return"image-loaded"===i?Z(j,{icon:"exclamation-mark-triangle-f",kind:"warning",message:t,open:!0,title:e,tooltip:t}):null}get _renderNavigation(){const{viewModel:{sectorData:e,navigatorCurrentBestFeature:i,currentBestFeature:a,state:s}}=this;if(!this.container||!a)return null;let o,n,r,l,d;if(i){const{x:e,y:t,direction:a}=i,[s,c,g,h]=M[a];o=`M ${e} ${t} L ${s} ${c} A ${A[2]} ${A[2]} 0 0 1 ${g} ${h} Z`,n=e,l=t,r=M[a][4],d=M[a][5]}const c=e=>{const t=e.target.dataset?.sector;t&&this.viewModel.handleSectorClick(+t)},g=e=>{const t=e.target.dataset;if(!t)return;const{featureIndexInSector:i,sector:a}=t;i&&a&&this.viewModel.handleFeatureClick({sector:a,featureIndexInSector:+i})},h=e=>{e.removeEventListener("click",g)},m=a.attributes.objectId,u=e?.map(e=>e?.items).filter(Boolean).flatMap(e=>e?.map(({x:e,y:t,objectID:i,featureIndexInSector:a,sector:s})=>Z("circle",{afterRemoved:h,class:this.classes(I.feature,{selected:m===i}),cx:e,cy:t,"data-feature-index-in-sector":a,"data-sector":s,key:`${I.feature}-${i}`,onclick:g,r:b}))),v=e=>{e.removeEventListener("click",c)},p=this.classes({[I.navigationWrapper]:!0,[I.navigationZoomed]:this._navigationToolExpanded});return this.navigationToolActive&&"image-loaded"===s?Z("div",{bind:this,class:p,key:this.messages.navigationTool},Z("svg",{afterCreate:e=>this._storeNavigationToolReference(e),class:t()?f:I.rotateWithAnimation,focusable:"false",height:C,role:"img",width:C,xmlns:"http://www.w3.org/2000/svg"},Z("defs",null,Z("linearGradient",{gradientUnits:"userSpaceOnUse",id:`${this.id}-coverage-fill`,x1:n,x2:r,y1:l,y2:d},Z("stop",{class:I.navigationPathOffset0,offset:0}),Z("stop",{class:I.navigationPathOffset1,offset:1}))),Z("g",null,Z("circle",{class:this.classes(I.sector,I.outerSector),cx:A[3],cy:A[3],onclick:this._scaleNavigationTool,r:A[3]}),Z("circle",{class:I.sector,cx:A[3],cy:A[3],r:A[2]}),Z("circle",{class:I.sector,cx:A[3],cy:A[3],r:A[1]}),Z("circle",{class:I.sector,cx:A[3],cy:A[3],r:A[0]}),Z("path",{class:I.pointer,d:"M 56.5 6.06217782649107 L 60 0 L 63.5 6.06217782649107 Z",key:`${I.pointer}-west`}),Z("path",{class:this.classes(I.pointer,I.north),d:"M 113.93782217350893 56.5 L 120 60 L 113.93782217350893 63.5 Z",key:`${I.pointer}-north`}),Z("path",{class:I.pointer,d:"M 56.5 113.93782217350893 L 60 120 L 63.5 113.93782217350893 Z",key:`${I.pointer}-east`}),Z("path",{class:I.pointer,d:"M 6.06217782649107 56.5 L 0 60 L 6.06217782649107 63.5 Z",key:`${I.pointer}-south`}),Z("path",{class:this.classes(I.sector,I.sectorSeparator),d:"M 23.937554159486076 23.937554159486076 L 96.06244584051393 96.06244584051393 M 23.937554159486076 96.06244584051393 L 96.06244584051393 23.937554159486076",key:I.sectorSeparator}),y([A[2],A[1],A[0]],A[3],A[3]).map((t,i)=>Z("path",{afterRemoved:v,class:this.classes(I.sector,e?.[i]?.length?I.sectorEnabled:I.sectorDisabled),d:t,"data-sector":`${i}`,key:`${I.sector}-${i}`,onclick:c})),Z("path",{class:this.classes(I.sector,I.sectorCross),d:"M 56.4 56.4 L 63.53 63.53 M 63.53 56.4 L 56.4 63.53",key:I.sectorCross}),u,a.attributes.cameraPitch>=5&&o?Z("path",{class:I.selectedFeaturePath,d:o,fill:`url(#${this.id}-coverage-fill)`,key:I.selectedFeaturePath}):null))):null}_renderSketch(){const{dataCaptureLayer:e,imageOverlaysOpened:t}=this;if(!e||t)return null;if(this._sketchLoaderTask||this._loadSketchResources(),!this._sketchLoaderTask?.value)return null;const{geometryType:i}=e,a="point"===i?"pin":"polyline"===i?"line":"polygon",s=this._sketchLoaderTask.value;return Z("div",{class:I.sketchTools},Z(s,{icon:a,messages:this._imageSketchToolsMessages,type:i,onAction:this._onAction}))}get _renderThumbnails(){const{currentBestFeature:e,thumbnails:t}=this.viewModel;return e?Z("div",{class:I.carouselContent},t?.items.map(({url:t,objectId:i,rotation:a},s)=>Z("div",{class:`${I.carouselItemWrapper}${e.attributes.objectId===i?"--selected":""}`,key:`${I.carouselItemWrapper}-${s}`},Z("canvas",{afterCreate:this._registerGalleryItem,afterRemoved:this._unregisterGalleryItem,alt:`thumbnail-${i}`,class:I.carouselItem,"data-objectid":`${i}`,"data-rotation":`${a}`,"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()}_sliderChangeHandler(e){const t=this.viewModel?.videoElement?.content;t&&(t.currentTime=e.target.value,t.play())}_storeNavigationToolReference(e){this._navigationTool=e}_toggleAdditionalCameraLocations(){this.isAdditionalPointSourcesVisible=!this.isAdditionalPointSourcesVisible}_toggleAdditionalCoverage(){this.isAdditionalCoverageVisible=!this.isAdditionalCoverageVisible}_toggleCurrentCoverage(){this.currentCoverageVisible=!this.currentCoverageVisible}_toggleImageEnhancementToolState(e){e.stopPropagation();const t=this.imageEnhancementToolActive;this._closeAllImageTools(),this.imageEnhancementToolActive=!t}_toggleVideoEnhancementToolState(e){e.stopPropagation(),this.videoEnhancementToolActive=!this.videoEnhancementToolActive}_toggleImageOverlays(e){e.stopPropagation();const t=this.imageOverlaysOpened;this._closeAllImageTools(),this.imageOverlaysOpened=!t}_toggleImageGallery(e){e.stopPropagation();const t=this.galleryOpened;this._closeAllImageTools(),this.galleryOpened=!!this.imageGalleryEnabled&&!t}_toggleLocationTool(e){const t=this.imageLocationToolActive,i=this.triangularMeasurementActive&&t;this._closeAllImageTools(),this.imageLocationToolActive=i||!t,e.stopPropagation()}_toggleMeasurementSketch(e,t){e.stopPropagation();const i=this.measureType,a=this.triangularMeasurementActive;this._closeAllImageTools(),this.measureType=i!==t||a?t:null,this.measureType===t&&(this.viewModel.displayNewMeasurementButton=!0)}_toggleNavigationTool(){const e=this.navigationToolActive;this._closeAllImageTools(),this.navigationToolActive=!e}_toggleMapImageConversionToolState(){this.mapImageConversionToolState=!this.mapImageConversionToolState}_toggleTriangularAreaMeasurements(){this._toggleTriangularMeasurements("area")}_toggleTriangularDistanceMeasurements(){this._toggleTriangularMeasurements("distance")}_toggleTriangularLocation(){const e=this.triangularMeasurementActive,t=this.navigationToolActive;e?null===this.measureType?this.imageLocationToolActive?this._closeImageToolsAndToggleNavigation(e,t):this._activateTriangulatedImageLocationTool():this._resetMeasureTypeAndActivateImageLocationTool():this._activateTriangulatedImageLocationWorkflow(e,t)}_toggleTriangularMeasurements(e){const t=this.triangularMeasurementActive,i=this.viewModel.measureType,a=this.navigationToolActive;t?e===i?(this._closeAllImageTools(),this.triangularMeasurementActive=!t,this.navigationToolActive=!a):(this.imageLocationToolActive=!1,this.measureType=e):(this._closeAllImageTools(),this.measureType=e,this.triangularMeasurementActive=!t,this.navigationToolActive=!!a||!a)}_unregisterGalleryItem(e){this._galleryObserver.unobserve(e)}_updateNavigationTool(e){const{previousFeatureAngle:t,bestFeatureAngle:i}=this.viewModel,a=(i-t+540)%360-180;e.style.setProperty(L,`${t}deg`),e.style.setProperty(k,`${t+a}deg`)}async loadBestImage(e){return this.viewModel.loadBestImage(e)}loadImageFromSource(e,t){return this.viewModel.loadImageFromSource(e,t)}async overlayMapFeatures(e,t){return this.removeHandles(`${Q.overlayed}-${e.id}`),this.addHandles(r(()=>e.visible,()=>{this.viewModel.toggleOverlayMapFeatures(e.id,e.visible)}),`${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 Z("div",{class:this.classes(U.widget,V)},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})],X.prototype,"accuracyParametersMissing",null),e([g()],X.prototype,"activeLayer",null),e([g()],X.prototype,"activeVideoIcon",null),e([g()],X.prototype,"activeAudioIcon",null),e([g()],X.prototype,"cameraHeadingThreshold",null),e([g()],X.prototype,"cameraPitchThreshold",null),e([g()],X.prototype,"canNavigateSequentially",null),e([g()],X.prototype,"currentBestFeature",null),e([g()],X.prototype,"currentCoverageVisible",null),e([g()],X.prototype,"dataCaptureEnabled",void 0),e([g()],X.prototype,"dataCaptureLayer",null),e([g()],X.prototype,"disabled",null),e([g()],X.prototype,"features",null),e([g()],X.prototype,"imagePointsInView",null),e([g()],X.prototype,"galleryOpened",void 0),e([g()],X.prototype,"icon",null),e([g()],X.prototype,"imageEnhancementToolActive",void 0),e([g()],X.prototype,"videoEnhancementToolActive",void 0),e([g({readOnly:!0})],X.prototype,"imageGalleryEnabled",null),e([g()],X.prototype,"imageLocationToolActive",null),e([g()],X.prototype,"imageOverlaysOpened",void 0),e([g({readOnly:!0})],X.prototype,"invalidCameraHeading",null),e([g()],X.prototype,"isAdditionalCoverageVisible",null),e([g()],X.prototype,"isAdditionalPointSourcesVisible",null),e([g()],X.prototype,"mapImageConversionToolState",null),e([g()],X.prototype,"measureType",null),e([g()],X.prototype,"layer",null),e([g()],X.prototype,"navigationToolActive",void 0),e([g()],X.prototype,"navigationMode",null),e([q(w()),g({type:P})],X.prototype,"viewModel",void 0),e([g(),z("esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer")],X.prototype,"messages",void 0),e([g(),z("esri/core/t9n/Units")],X.prototype,"measurementUnitMessages",void 0),e([g(),z("esri/t9n/common")],X.prototype,"messagesCommon",void 0),e([g(),z("esri/widgets/Sketch/t9n/Sketch")],X.prototype,"messagesSketch",void 0),e([g()],X.prototype,"pixelMeasurementUnit",void 0),e([g()],X.prototype,"pixelAreaMeasurementUnit",void 0),e([g({readOnly:!0})],X.prototype,"popupEnabled",null),e([g()],X.prototype,"referencePoint",null),e([g()],X.prototype,"showCameraLocations",void 0),e([g()],X.prototype,"showMapFeatures",void 0),e([q(["create","delete","redo","undo","update"]),g({readOnly:!0})],X.prototype,"sketchViewModel",null),e([g()],X.prototype,"triangularMeasurementActive",null),e([g()],X.prototype,"view",null),e([g({type:x,nonNullable:!0})],X.prototype,"visibleElements",void 0),e([g()],X.prototype,"determineWorkflowForFeature",null),e([g()],X.prototype,"updateFootprint",null),e([g()],X.prototype,"_activeMeasurementIcon",null),e([g()],X.prototype,"_activeMeasurementHeading",null),e([g()],X.prototype,"_imageOverlaysLoaderTask",void 0),e([g()],X.prototype,"_imageMeasurementToolsLoaderTask",void 0),e([g()],X.prototype,"_navigationSettingsLoaderTask",void 0),e([g()],X.prototype,"_measurementToggle",null),e([g()],X.prototype,"_renderRoot",null),e([g()],X.prototype,"_imageEnhancementTools",null),e([g()],X.prototype,"_videoEnhancementTools",null),e([g()],X.prototype,"_imageGalleryPanel",null),e([g()],X.prototype,"_imageGalleryContext",null),e([g()],X.prototype,"_imageOverlaysComponent",null),e([g()],X.prototype,"_imageOverlayMessages",null),e([g()],X.prototype,"_imageSketchToolsMessages",null),e([g()],X.prototype,"_imageViewer",null),e([g()],X.prototype,"_imageViewerTriangular",null),e([g()],X.prototype,"_videoViewer",null),e([g()],X.prototype,"_locationToggle",null),e([g()],X.prototype,"_messageBox",null),e([g()],X.prototype,"_navigationToolExpanded",void 0),e([g()],X.prototype,"_navigationTool",void 0),e([g()],X.prototype,"_panoramicViewer",null),e([g()],X.prototype,"_renderNavigation",null),e([g()],X.prototype,"_renderThumbnails",null),e([g()],X.prototype,"_sketchLoaderTask",void 0),X=e([h("esri.widgets.OrientedImageryViewer")],X);const Y=X;export{Y as default};
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import"../intl.js";import{prefersReducedMotion as t}from"../core/a11yUtils.js";import{createTask as i}from"../core/asyncUtils.js";import a from"../core/Collection.js";import{deprecatedProperty as s}from"../core/deprecate.js";import o from"../core/Logger.js";import{isAbortError as n}from"../core/promiseUtils.js";import{watch as r,initial as l,syncAndInitial as d,whenOnce as c}from"../core/reactiveUtils.js";import{property as g}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as h}from"../core/accessorSupport/decorators/subclass.js";import{or as m}from"../layers/orientedImagery/transformations/utils.js";import u from"./Expand.js";import v from"./PanoramicViewer.js";import p from"./Widget.js";import{getAllArcPath as y}from"./OrientedImageryViewer/arcUtils.js";import{getDelegatedEvents as w,defaultImageGeometryField as _,defaultOIObjectIDField as T,segmentArcs as M,featureCircleRadius as b,navigationToolDimensionLength as C,sectorsRadii as A}from"./OrientedImageryViewer/constants.js";import{css as I,navigation as f,navigationToolRotationFrom as L,navigationToolRotationTo as k,root as V}from"./OrientedImageryViewer/css.js";import{loadImageForAttachment as S,getThumbnailPixelBlock as O,isFeatureAttachment as E,renderImageWithRotation as F}from"./OrientedImageryViewer/galleryUtils.js";import P from"./OrientedImageryViewer/OrientedImageryViewerViewModel.js";import x from"./OrientedImageryViewer/OrientedImageryViewerVisibleElements.js";import{loadAlertComponents as H,Alert as j}from"./OrientedImageryViewer/components/Alert.js";import G from"./OrientedImageryViewer/components/ImageLocationWidget.js";import D from"./OrientedImageryViewer/components/ImageViewer.js";import $ from"./OrientedImageryViewer/components/NavigationAction.js";import{NavigationActionsCollection as N,NavigationActions as B}from"./OrientedImageryViewer/components/NavigationActions.js";import{NoImageLoadedError as R}from"./OrientedImageryViewer/navigation/errors.js";import{loadCalciteComponents as W}from"./support/componentsUtils.js";import{globalCss as U}from"./support/globalCss.js";import"./support/widgetUtils.js";import{messageBundle as z}from"./support/decorators/messageBundle.js";import{vmEvent as q}from"./support/decorators/vmEvent.js";import{tsx as Z,tsxFragment as J}from"./support/jsxFactory.js";import{substitute as K}from"../intl/substitute.js";const Q={overlayed:"overlayed"};let X=class extends p{constructor(e,t){super(e,t),this.dataCaptureEnabled=!1,this.galleryOpened=!1,this.imageEnhancementToolActive=!1,this.videoEnhancementToolActive=!1,this.imageOverlaysOpened=!1,this.navigationToolActive=!1,this.viewModel=new P,this.messagesCommon=null,this.messagesSketch=null,this.pixelMeasurementUnit="meters",this.pixelAreaMeasurementUnit="square-meters",this.showCameraLocations=!1,this.showMapFeatures=!1,this.visibleElements=new x,this._imageOverlaysLoaderTask=null,this._imageMeasurementToolsLoaderTask=null,this._navigationSettingsLoaderTask=null,this._clearMeasurements=()=>{this.viewModel.measureType=null,this.viewModel.clearPreviousMeasurements()},this._clearImageLocation=()=>{this.imageLocationToolActive=!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._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=>{const t=e.layer;t===this.dataCaptureLayer&&(this.stopDataCapture(),this.dataCaptureLayer=null),this.removeOverlayedGraphicsOnImage(`${t.id}`)},this._handleOverlayLayerSelect=e=>{const t=e.layer;this.viewModel.overlayMapFeatures(t,this.showMapFeatures),this.addHandles(r(()=>t.visible,()=>{this.viewModel.toggleOverlayMapFeatures(t.id,t.visible)}),`${Q.overlayed}-${t.id}`)},this._highlight=e=>{const t=e.target?.dataset.objectid;t&&this.viewModel.highlight(t)},this._onAction=e=>{const{target:t}=e,{dataset:{action:i}}=t,{_previousAction:a}=this,s=a?.dataset.action,o=s?.includes("draw")??!1,n="select-feature"===s,r=s!==i;switch(i){case"draw-point":case"draw-polygon":case"draw-polyline":{a&&m(n,o&&r)&&(a.active=!1),t.active=!t.active;const e=i.replace("draw-","");this.viewModel.digitizeCreate(e),this._previousAction=t.active?t:null;break}case"save":this.viewModel.saveDrawing();break;case"select-feature":o&&(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=()=>{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._settingsToggle=null,this._toggleImageNavigation=async e=>{const t=this.navigationMode;this._closeAllImageTools(),this.navigationMode=t!==e?e:null;const{activeViewer:i}=this.viewModel;if(!i)return;const{mode:a,preserveAngle:s}=this.viewModel;if("default"===a)if("directional"===this.navigationMode){const e=await this._loadNavigationSettings(),t="heading"===s||"both"===s,i="pitch"===s||"both"===s,{messages:a,messagesCommon:o}=this,n=new e({cameraHeadingThreshold:this.cameraHeadingThreshold,cameraPitchThreshold:this.cameraPitchThreshold,uiStrings:{configureNavigation:a.configureNavigation,preserveHeading:a.preserveHeading,preserveHeadingDescription:a.preserveHeadingDescription,preservePitch:a.preservePitch,preservePitchDescription:a.preservePitchDescription,settings:o.settings,thresholdLabel:a.thresholdLabel},onInputChange:this._handleNavigationSettingsInputChange,onToggle:this._handleNavigationSettingsToggle,preserveHeading:t,preservePitch:i});this._settingsToggle=new u({content:n,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=()=>{this.viewModel.toggleImageAttributes()},this.navigate=async e=>{let t=null;try{const{currentNode:i}=this.viewModel;if(!i)throw new R;t=await this.viewModel.navigate(i,e)}catch(i){n(i)||o.getLogger(this).error("Error occurred while navigating",i)}return t},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)}initialize(){this.addHandles([r(()=>[this.viewModel?.bestFeatureAngle,this._navigationTool],([e,t])=>{t&&this._updateNavigationTool(t)},l),r(()=>this.currentCoverageVisible,e=>this._onCurrentCoverageVisibilityChange(e)),r(()=>this.isAdditionalCoverageVisible,e=>this._onAdditionalCoverageVisibilityChange(e)),r(()=>this.isAdditionalPointSourcesVisible,e=>this._onAdditionalCameraLocationsVisibility(e)),r(()=>({features:this.currentBestFeature,showCameraLocations:this.showCameraLocations,state:this.viewModel.state}),({showCameraLocations:e,state:t})=>{"image-loaded"===t&&this.viewModel.overlayCameraLocations(e)},d),r(()=>({feature:this.currentBestFeature,showMapFeatures:this.showMapFeatures,state:this.viewModel.state}),async(e,t)=>{if(e.showMapFeatures!==t?.showMapFeatures&&this.viewModel.toggleAllOverlayMapFeatures(e.showMapFeatures),null!=e.feature&&e.feature!==t?.feature){if(this.viewModel.removeAllOverlayMapFeatures(),await c(()=>"image-loaded"===this.viewModel.state),this.dataCaptureLayer&&this.stopDataCapture(),await this._restoreOverlays(),!this.dataCaptureLayer)return;await this.startDataCapture(this.dataCaptureLayer),this._previousAction?.active&&(this._previousAction.active=!1,this._previousAction=null)}},l)])}loadDependencies(){return Promise.all([W({"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"),label:()=>import("@esri/calcite-components/dist/components/calcite-label"),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"),dropdown:()=>import("@esri/calcite-components/dist/components/calcite-dropdown"),"dropdown-group":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-group"),"dropdown-item":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-item"),slider:()=>import("@esri/calcite-components/dist/components/calcite-slider")}),H()])}destroy(){this._galleryController.abort(),this._galleryObserver.disconnect(),this.currentBestFeature=null}get accuracyParametersMissing(){return this.viewModel.accuracyParametersMissing}get activeLayer(){return s(o.getLogger(this),"activeLayer",{replacement:"layer"}),this.layer}set activeLayer(e){s(o.getLogger(this),"activeLayer",{replacement:"layer"}),this.layer=e}get activeVideoIcon(){const{videoElement:e,videoViewModel:t}=this.viewModel;return e?.loaded&&t?t.videoPaused?"play":"pause":"play"}get activeAudioIcon(){const{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(){const{layer:e}=this;if(!e)return!1;const{fields:t,sequenceOrderField:i}=e;return t.some(({name:e})=>e.toLowerCase()===`${i??"sequenceorder"}`.toLowerCase())}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 disabled(){return this.viewModel.disabled}set disabled(e){this.viewModel.disabled=e}get displayMessage(){return this.viewModel.displayMessage}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.mapImageConversionToolState=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(){const{popupEnabled:e,state:t}=this.viewModel;return"image-loaded"===t&&e}get referencePoint(){return this.viewModel.referencePoint??null}get sketchViewModel(){return this.viewModel.sketch}get triangularMeasurementActive(){return this.viewModel.triangularMeasurementActive}set triangularMeasurementActive(e){this.viewModel.triangularMeasurementActive=e}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}set updateFootprint(e){this.viewModel.updateFootprint=e}get updateFootprint(){return this.viewModel.updateFootprint}_renderActionBar(){return Z("calcite-action-bar",{expandDisabled:!0,layout:"horizontal",slot:"action-bar"},Z("calcite-action-group",null,this._currentFootprintToggle(),this._additionalFootprintToggle(),this._additionalPointSourcesToggle()),Z("calcite-action-group",null,this._directionToolToggle(),this._mapImageConversionToggle(),this._navigationToolToggle(),this._imageEnhancementsToggle(),this._videoEnhancementsToggle()),Z("calcite-action-group",null,this._measurementToolsToggle(),this._imageGalleryToggle(),this._imageOverlaysToggle(),this._openPopupAction()))}_renderEnhancementSlider({title:e,value:t,handleChange:i}){return Z("div",{class:I.imageEnhancementToolContainer},Z("calcite-label",null,e,Z("calcite-slider",{bind:this,labelTicks:!0,max:10,min:0,ticks:2,value:t,onCalciteSliderInput:i})))}get _activeMeasurementIcon(){const{measureType:e,imageLocationToolActive:t}=this;if(t)return"pin-tear";switch(e){case"area":return"measure-area";case"height":return"measure-building-height-top-base";default:return"measure-line"}}get _activeMeasurementHeading(){const{measureType:e,messages:t,triangularMeasurementActive:i}=this,{groundArea:a,heightAboveGround:s,groundDistance:o,triangulatedAreaHeading:n,triangulatedDistanceHeading:r}=t;if(i)return"area"===e?n:r;switch(e){case"area":return a;case"height":return s;default:return o}}_additionalFootprintToggle(){const{isAdditionalCoverageVisible:e,invalidCameraHeading:t,visibleElements:{additionalFootprintToggle:i}}=this;return i?Z("calcite-action",{active:e,bind:this,class:I.addCoverage,disabled:t,icon:"trapezoid-area",onclick:this._toggleAdditionalCoverage,text:this.messages.additionalFootprints,title:this.messages.additionalFootprints}):null}_additionalPointSourcesToggle(){const{isAdditionalPointSourcesVisible:e,invalidCameraHeading:t,visibleElements:{additionalCameraLocationsToggle:i}}=this;return i?Z("calcite-action",{active:e,bind:this,class:I.addExpPoints,disabled:t,icon:"circle-area",onclick:this._toggleAdditionalCameraLocations,text:this.messages.additionalCameraLocations,title:this.messages.additionalCameraLocations}):null}get _measurementToggle(){const{viewModel:{state:e,measureType:t,currentBestFeatureMeasurementImage:i},triangularMeasurementActive:a,id:s}=this;if("image-loaded"!==e||!t||a&&!i)return;this._imageMeasurementToolsLoaderTask||this._loadImageMeasurementResources();const o=this._imageMeasurementToolsLoaderTask?.value;return o?Z("calcite-dialog",{bind:this,dragEnabled:!0,escapeDisabled:!0,heading:this._activeMeasurementHeading,id:`${s}-${t}-measurement`,open:!0,placement:"bottom-start",resizable:!0,scale:"s",slot:"dialogs",width:"s",onCalciteDialogBeforeClose:this._clearMeasurements},Z(o,{measurementType:t,measurementUnitMessages:this.measurementUnitMessages,messages:this.messages,oiViewModel:this.viewModel})):null}get _renderRoot(){const{viewModel:{state:e},triangularMeasurementActive:t}=this;return Z("calcite-panel",{bind:this,class:t?I.viewerContainerMeasurement:I.viewerContainer,heading:this.visibleElements.title?this.messages.title:void 0,loading:e.includes("loading")&&!t},this.visibleElements.menu?this._renderActionBar():null,Z("calcite-shell",null,Z("calcite-panel",null,this._imageViewer,this._panoramicViewer,this._videoViewer,this._messageBox,this.invalidCameraHeading?null:[this._imageGalleryPanel,this._renderNavigation,this._imageOverlaysPanel()],this._imageEnhancementTools,this._videoEnhancementTools,this._renderSketch()),this._imageViewerTriangular,this._measurementToggle,this._locationToggle,this.invalidCameraHeading?this._renderWarning(this.messages.invalidCameraHeadingWarningTitle,this.messages.invalidCameraHeadingWarningDescription):null))}_currentFootprintToggle(){const{currentCoverageVisible:e,invalidCameraHeading:t}=this,{currentFootprintToggle:i}=this.visibleElements;return i?Z("calcite-action",{active:e,bind:this,class:I.currentCoverage,disabled:t,icon:"trapezoid-area",onclick:this._toggleCurrentCoverage,text:this.messages.currentFootprint,title:this.messages.currentFootprint}):null}get _imageEnhancementTools(){const{imageEnhancementToolActive:e,viewModel:{brightness:t,contrast:i,sharpness:a,state:s}}=this;return e&&"image-loaded"===s?Z("calcite-panel",{bind:this,class:I.imageEnhancementWrapper,closable:!0,closed:!e,heading:this.messages.imageEnhancement,key:this.messages.imageEnhancement,onCalcitePanelClose:this._toggleImageEnhancementToolState},Z("div",{class:I.imageEnhancementTools},Z("div",{class:I.imageEnhancementToolContainer},Z("calcite-label",null,this.messages.brightness,Z("calcite-slider",{bind:this,labelTicks:!0,max:10,min:-10,ticks:5,value:t,onCalciteSliderInput:this._handleBrightnessChange}))),Z("div",{class:I.imageEnhancementToolContainer},Z("calcite-label",null,this.messages.contrast,Z("calcite-slider",{bind:this,labelTicks:!0,max:10,min:-10,ticks:5,value:i,onCalciteSliderInput:this._handleContrastChange}))),Z("div",{class:I.imageEnhancementToolContainer},Z("calcite-label",null,this.messages.sharpness,Z("calcite-slider",{bind:this,labelTicks:!0,max:1,min:0,step:.1,ticks:.5,value:a,onCalciteSliderInput:this._handleSharpnessChange})))),Z("calcite-action",{bind:this,icon:"reset",onclick:this._resetImageTools,slot:"header-actions-end",text:this.messagesCommon.reset,title:this.messagesCommon.reset})):null}get _videoEnhancementTools(){const{videoEnhancementToolActive:e,viewModel:{videoViewModel:t,mode:i},messages:{videoEnhancement:a,brightness:s,contrast:o},messagesCommon:{reset:n}}=this;return e&&"video"===i&&t?Z("calcite-panel",{bind:this,class:I.imageEnhancementWrapper,closable:!0,closed:!e,heading:a,key:a,onCalcitePanelClose:this._toggleVideoEnhancementToolState},Z("div",{class:I.imageEnhancementTools},this._renderEnhancementSlider({title:s,value:t.videoBrightness,handleChange:this._handleVideoBrightnessChange}),this._renderEnhancementSlider({title:o,value:t.videoContrast,handleChange:this._handleVideoContrastChange})),Z("calcite-action",{bind:this,icon:"reset",onclick:this._resetVideoTools,slot:"header-actions-end",text:n})):null}_imageEnhancementsToggle(){const{state:e,mode:t}=this.viewModel,{imageEnhancement:i}=this.visibleElements;return i&&"video"!==t?Z("calcite-action",{active:this.imageEnhancementToolActive,bind:this,disabled:"default"!==t||"image-loaded"!==e,icon:"sliders-horizontal",onclick:this._toggleImageEnhancementToolState,text:this.messages.imageEnhancement,title:this.messages.imageEnhancement}):null}_videoEnhancementsToggle(){const{mode:e}=this.viewModel,{videoEnhancement:t}=this.messages;return"video"===e?Z("calcite-action",{active:this.imageEnhancementToolActive,bind:this,disabled:"video"!==e,icon:"sliders-horizontal",onclick:this._toggleVideoEnhancementToolState,text:t,title:t}):null}get _imageGalleryPanel(){const{container:e,galleryOpened:t,imageGalleryEnabled:i}=this;return i&&t&&e?this._imageGalleryContext:null}get _imageGalleryContext(){const{galleryOpened:e,invalidCameraHeading:t}=this;return Z("calcite-panel",{bind:this,class:I.carousel,closable:!0,closed:!e,disabled:t,heading:this.messages.imageGallery,key:this.messages.imageGallery,onCalcitePanelClose:this._toggleImageGallery},Z("div",{class:I.carouselContainer},this._renderThumbnails))}_imageGalleryToggle(){const{imageGalleryEnabled:e,invalidCameraHeading:t,visibleElements:{imageGallery:i}}=this;return i?Z("calcite-action",{active:this.galleryOpened,bind:this,disabled:!e||t,icon:"images",onclick:this._toggleImageGallery,text:this.messages.imageGallery,title:this.messages.imageGallery}):null}get _imageOverlaysComponent(){const{_imageOverlayMessages:e,_imageOverlaysLoaderTask:t,_overlayedLayers:a,dataCaptureEnabled:s,dataCaptureLayer:o,imageOverlaysOpened:n,showCameraLocations:r,showMapFeatures:l,view:d,layer:c}=this;if(!c)return null;const g=c.imageGeometryField?.length?c.imageGeometryField:_,h=c.imageReferenceField?.length?c.imageReferenceField:T;t||(this._imageOverlaysLoaderTask=i(async()=>(await import("./OrientedImageryViewer/components/ImageOverlays.js")).default));const m=this._imageOverlaysLoaderTask?.value;return m?Z(m,{closed:!n,dataCaptureEnabled:s,dataCaptureLayer:o,imageGeometryField:g,imageReferenceField:h,messages:e,overlayedLayers:a,showCameraLocations:r,showMapFeatures:l,view:d,onDataCaptureLayerChanged:this._handleDataCaptureLayerChange,onImageOverlaysClosed:this._onImageOverlayClosed,onLayerDeselected:this._handleOverlayLayerDeselect,onLayerSelected:this._handleOverlayLayerSelect,onShowCameraLocationsChanged:this._onShowCameraLocationsChanged,onShowMapFeaturesChanged:this._onShowMapFeaturesChanged}):null}get _imageOverlayMessages(){return{...this.messages,...this.messagesSketch}}get _imageSketchToolsMessages(){return{...this.messagesSketch,...this.messagesCommon}}_imageOverlaysPanel(){const{imageOverlaysOpened:e,viewModel:{state:t}}=this,i=this.classes({[I.imageOverlaysContainer]:!0,[U.hidden]:!e||"image-loaded"!==t});return Z("div",{class:i,key:this.messages.imageOverlays},this._imageOverlaysComponent)}_imageOverlaysToggle(){const{viewModel:{state:e},imageOverlaysOpened:t,invalidCameraHeading:i,visibleElements:{imageOverlays:a}}=this;return a?Z("calcite-action",{active:t,bind:this,disabled:"image-loaded"!==e||i,icon:"layers",onclick:this._toggleImageOverlays,text:this.messages.imageOverlays,title:this.messages.imageOverlays}):null}get _imageViewer(){const{displayMessage:e,loadImageViewer:t,mode:i,clickAction:a,state:s}=this.viewModel,o=null!=e||"default"!==i||s.includes("loading"),{messages:{end:n,next:r,previous:l,start:d}}=this;return Z(D,{afterCreate:t,clickAction:a,navigationEnabled:!o&&null!==this.navigationMode,navigationViewModel:this.viewModel,uiStrings:{end:n,next:r,previous:l,start:d},visible:!o})}get _imageViewerTriangular(){const{messages:e,triangularMeasurementActive:t}=this,{displayMessage:i,storeImageMeasurementViewer:a,mode:s,state:o,clickAction:n}=this.viewModel,r=null!=i||"default"!==s,l=this.classes({[I.viewer]:!r,[I.viewerHidden]:r});return t?Z("calcite-panel",{class:I.viewerContainerMeasurement,heading:e.measurementViewerHeading,loading:o.includes("loading")},Z("calcite-panel",{bind:this,class:l},Z(D,{afterCreate:a,clickAction:n,uiStrings:e}))):null}get _videoViewer(){const{mode:e,loadVideoViewer:t,videoViewModel:i}=this.viewModel,{control:a,reset:s}=this.messagesCommon,{mute:o,unmute:n}=this.messages,r="video"!==e,l=this.classes({[I.viewer]:!r,[I.viewerHidden]:r});return Z("calcite-panel",{bind:this,class:l},Z("div",{afterCreate:t,styles:{height:"100%"}}),Z("calcite-slider",{bind:this,labelHandles:!0,labelTicks:!0,max:i?.videoDuration,minLabel:"0",value:i?.currentTime??0,onCalciteSliderChange:this._sliderChangeHandler}),Z("calcite-action-bar",{expandDisabled:!0,layout:"horizontal"},Z("calcite-action-group",null,Z("calcite-action",{bind:this,icon:this.activeVideoIcon,onclick:()=>i?.playVideoHandler(),text:"Play",title:i?.videoPaused?a.play:a.pause})),Z("calcite-action-group",null,Z("calcite-action",{bind:this,icon:"refresh",onclick:()=>i?.rewindVideoHandler(),text:"Rewind",title:s})),Z("calcite-action-group",null,Z("calcite-action",{bind:this,icon:this.activeAudioIcon,onclick:()=>i?.toggleAudio(),text:"Audio",title:i?.videoMuted?o:n}))))}get _locationToggle(){const{viewModel:{state:e,groundCoordinates:t,groundCoordinatesAccuracy:i,triangulatedPoint:a},imageLocationToolActive:s,triangularMeasurementActive:o,messages:{groundLocation:n,triangulatedLocationHeading:r}}=this;if("image-loaded"!==e||!t||!s)return;let l=t;if(o){if(!a)return;l=a}return Z("calcite-dialog",{bind:this,dragEnabled:!0,escapeDisabled:!0,heading:o?r:n,id:n,open:!0,placement:"bottom-start",resizable:!0,scale:"s",slot:"dialogs",width:"s",onCalciteDialogBeforeClose:this._clearImageLocation},Z(G,{accuracy:i,groundCoordinates:l,messages:this.messages}))}_mapImageConversionToggle(){const{mapImageConversionToolState:e,viewModel:{state:t},invalidCameraHeading:i,visibleElements:{mapImageConversionTool:a}}=this;return a?Z("calcite-action",{active:e,bind:this,disabled:"image-loaded"!==t||i,icon:"image-pin",onclick:this._toggleMapImageConversionToolState,text:this.messages.mapImageConversionTool,title:this.messages.mapImageConversionTool}):null}_measurementToolsToggle(){const{_activeMeasurementIcon:e,measureType:t,viewModel:i,accuracyParametersMissing:a,messages:s,triangularMeasurementActive:o,visibleElements:{measurementTools:n}}=this,{state:r,mode:l}=i,{measurementTools:d,groundDistance:c,groundArea:g,heightAboveGround:h,groundLocation:m,triangulatedDistanceHeading:u,triangulatedAreaHeading:v,triangulatedLocationHeading:p}=s;return n?Z("calcite-dropdown",{disabled:a,key:"measurement-tools",maxItems:5,title:d,width:"m"},Z("calcite-action",{bind:this,disabled:"image-loaded"!==r||a,icon:e,slot:"trigger",text:d}),Z("calcite-dropdown-group",null,Z("calcite-dropdown-item",{bind:this,disabled:"image-loaded"!==r,iconStart:"measure-line",key:"distance-measurement",onclick:e=>this._toggleMeasurementSketch(e,"distance"),selected:"distance"===t&&!o},c),Z("calcite-dropdown-item",{bind:this,disabled:"image-loaded"!==r,iconStart:"measure-area",key:"area-measurement",onclick:e=>this._toggleMeasurementSketch(e,"area"),selected:"area"===t&&!o},g),Z("calcite-dropdown-item",{bind:this,disabled:"image-loaded"!==r,iconStart:"measure-building-height-top-base",key:"height-dropdown",onclick:e=>this._toggleMeasurementSketch(e,"height"),selected:"height"===t},h),Z("calcite-dropdown-item",{bind:this,disabled:"image-loaded"!==r,iconStart:"pin-tear",key:"surface-location",onclick:this._toggleLocationTool,selected:!!this.imageLocationToolActive&&!o},m),"default"===l&&Z(J,null,Z("calcite-dropdown-item",{bind:this,disabled:"image-loaded"!==r,iconStart:"dual-image-distance",key:"triangular-measurement-distance",selected:!!o&&"distance"===this.measureType,onCalciteDropdownItemSelect:this._toggleTriangularDistanceMeasurements},u),Z("calcite-dropdown-item",{bind:this,disabled:"image-loaded"!==r,iconStart:"dual-image-area",key:"triangular-measurement-area",selected:!!o&&"area"===this.measureType,onCalciteDropdownItemSelect:this._toggleTriangularAreaMeasurements},v),Z("calcite-dropdown-item",{bind:this,disabled:"image-loaded"!==r,iconStart:"dual-image-location",key:"triangular-location",selected:!!o&&this.imageLocationToolActive,onCalciteDropdownItemSelect:this._toggleTriangularLocation},p)))):null}get _messageBox(){const{messages:e,viewModel:{displayMessage:t,mode:i}}=this;if(!t||"video"===i)return null;const{data:a,key:s,map:o}=t,n=`${o?K(e[s],o):e[s]}`;return Z("span",{class:I.messageBox},a?`${n} ${a}`:n)}async _loadNavigationSettings(){return this._navigationSettingsLoaderTask||(this._navigationSettingsLoaderTask=i(async()=>(await import("./OrientedImageryViewer/components/NavigationSettings.js")).default)),await this._navigationSettingsLoaderTask.promise}_navigationToolToggle(){const{state:e}=this.viewModel,{visibleElements:{navigationTool:t}}=this;return t?Z("calcite-action",{active:this.navigationToolActive,bind:this,disabled:"image-loaded"!==e||this.invalidCameraHeading,icon:"explore",onclick:this._toggleNavigationTool,text:this.messages.navigationTool,title:this.messages.navigationTool}):null}_directionToolToggle(){const{state:e}=this.viewModel,{visibleElements:{directionalNavigation:t,sequentialNavigation:i}}=this,a=new N;t&&a.push(new $({active:"directional"===this.navigationMode,disabled:"image-loaded"!==e||this.invalidCameraHeading,icon:"i2DExplore",onclick:()=>{this._toggleImageNavigation("directional")},text:this.messages.directionalNavigation,title:this.messages.directionalNavigationDescription})),i&&a.push(new $({active:"sequential"===this.navigationMode,disabled:"image-loaded"!==e||this.invalidCameraHeading||!this.canNavigateSequentially,icon:"reorder-stack",onclick:()=>{this._toggleImageNavigation("sequential")},text:this.messages.sequentialNavigation,title:this.messages.sequentialNavigationDescription}));return t||i?Z(B,{actions:a,activeAction:a.items.find(e=>e.active),icon:"absolute-direction",label:this.messages.imageNavigation,scale:"m",title:this.messages.imageNavigation}):null}_openPopupAction(){const{showPopupsAction:e}=this.visibleElements;return e?Z("calcite-action",{bind:this,disabled:!this.popupEnabled,icon:"popup",onclick:this._toggleImageAttributes,text:this.messages.showPopups,title:this.messages.showPopups}):null}get _panoramicViewer(){const{displayMessage:e,loadPanoramicViewer:t,mode:i,clickAction:a,state:s}=this.viewModel,{messages:{end:o,next:n,previous:r,start:l}}=this,d=null!=e||"panoramic"!==i||s.includes("loading");return Z(v,{afterCreate:t,clickAction:a,navigationEnabled:!d&&null!==this.navigationMode,navigationViewModel:this.viewModel,uiStrings:{end:o,next:n,previous:r,start:l},visible:!d})}_activateTriangulatedImageLocationTool(){this.navigationToolActive=!0,this.imageLocationToolActive=!0}_activateTriangulatedImageLocationWorkflow(e,t){this._closeAllImageTools(),this.imageLocationToolActive=!0,this.triangularMeasurementActive=!e,this.navigationToolActive=!!t||!t}_closeImageToolsAndToggleNavigation(e,t){this._closeAllImageTools(),this.triangularMeasurementActive=!e,this.navigationToolActive=!t}_resetMeasureTypeAndActivateImageLocationTool(){this.measureType=null,this.imageLocationToolActive=!0}_closeAllImageTools(){this.imageEnhancementToolActive=!1,this.navigationToolActive=!1,this.imageOverlaysOpened=!1,this.galleryOpened=!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)}_handleSharpnessChange(e){this.viewModel.sharpness=e.currentTarget.value??0}_lazyLoadImage(e,t){e.forEach(async e=>{if(e.isIntersecting){const a=e.target,s=a.getAttribute("data-src"),r=a.getAttribute("data-rotation"),l=a.getAttribute("data-objectid"),d=r?parseFloat(r)%360:0,{layer:c,_galleryController:{signal:g}}=this;if(!s||!l)return;let h;try{h=E(s)?await S(c,l,{signal:g}):await O(s,{signal:g})}catch(i){n(i)||o.getLogger("esri.widgets.OrientedImageryViewer").error("#lazyLoadImage()",i)}finally{t.unobserve(a)}if(!h)return;F(h,a,d)}})}_loadImageFromGallery(e){const{target:t}=e;if(!t)return;const i=t.getAttribute("data-objectid");i&&this.viewModel.currentBestFeature?.attributes.objectId!==Number(i)&&this.viewModel.selectBestFeature(i)}_loadImageMeasurementResources(){this._imageMeasurementToolsLoaderTask=i(async()=>{const{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){const{viewModel:{state:i}}=this;return"image-loaded"===i?Z(j,{icon:"exclamation-mark-triangle-f",kind:"warning",message:t,open:!0,title:e,tooltip:t}):null}get _renderNavigation(){const{viewModel:{sectorData:e,navigatorCurrentBestFeature:i,currentBestFeature:a,state:s}}=this;if(!this.container||!a)return null;let o,n,r,l,d;if(i){const{x:e,y:t,direction:a}=i,[s,c,g,h]=M[a];o=`M ${e} ${t} L ${s} ${c} A ${A[2]} ${A[2]} 0 0 1 ${g} ${h} Z`,n=e,l=t,r=M[a][4],d=M[a][5]}const c=e=>{const t=e.target.dataset?.sector;t&&this.viewModel.handleSectorClick(+t)},g=e=>{const t=e.target.dataset;if(!t)return;const{featureIndexInSector:i,sector:a}=t;i&&a&&this.viewModel.handleFeatureClick({sector:a,featureIndexInSector:+i})},h=e=>{e.removeEventListener("click",g)},m=a.attributes.objectId,u=e?.map(e=>e?.items).filter(Boolean).flatMap(e=>e?.map(({x:e,y:t,objectID:i,featureIndexInSector:a,sector:s})=>Z("circle",{afterRemoved:h,class:this.classes(I.feature,{selected:m===i}),cx:e,cy:t,"data-feature-index-in-sector":a,"data-sector":s,key:`${I.feature}-${i}`,onclick:g,r:b}))),v=e=>{e.removeEventListener("click",c)},p=this.classes({[I.navigationWrapper]:!0,[I.navigationZoomed]:this._navigationToolExpanded});return this.navigationToolActive&&"image-loaded"===s?Z("div",{bind:this,class:p,key:this.messages.navigationTool},Z("svg",{afterCreate:e=>this._storeNavigationToolReference(e),class:t()?f:I.rotateWithAnimation,focusable:"false",height:C,role:"img",width:C,xmlns:"http://www.w3.org/2000/svg"},Z("defs",null,Z("linearGradient",{gradientUnits:"userSpaceOnUse",id:`${this.id}-coverage-fill`,x1:n,x2:r,y1:l,y2:d},Z("stop",{class:I.navigationPathOffset0,offset:0}),Z("stop",{class:I.navigationPathOffset1,offset:1}))),Z("g",null,Z("circle",{class:this.classes(I.sector,I.outerSector),cx:A[3],cy:A[3],onclick:this._scaleNavigationTool,r:A[3]}),Z("circle",{class:I.sector,cx:A[3],cy:A[3],r:A[2]}),Z("circle",{class:I.sector,cx:A[3],cy:A[3],r:A[1]}),Z("circle",{class:I.sector,cx:A[3],cy:A[3],r:A[0]}),Z("path",{class:I.pointer,d:"M 56.5 6.06217782649107 L 60 0 L 63.5 6.06217782649107 Z",key:`${I.pointer}-west`}),Z("path",{class:this.classes(I.pointer,I.north),d:"M 113.93782217350893 56.5 L 120 60 L 113.93782217350893 63.5 Z",key:`${I.pointer}-north`}),Z("path",{class:I.pointer,d:"M 56.5 113.93782217350893 L 60 120 L 63.5 113.93782217350893 Z",key:`${I.pointer}-east`}),Z("path",{class:I.pointer,d:"M 6.06217782649107 56.5 L 0 60 L 6.06217782649107 63.5 Z",key:`${I.pointer}-south`}),Z("path",{class:this.classes(I.sector,I.sectorSeparator),d:"M 23.937554159486076 23.937554159486076 L 96.06244584051393 96.06244584051393 M 23.937554159486076 96.06244584051393 L 96.06244584051393 23.937554159486076",key:I.sectorSeparator}),y([A[2],A[1],A[0]],A[3],A[3]).map((t,i)=>Z("path",{afterRemoved:v,class:this.classes(I.sector,e?.[i]?.length?I.sectorEnabled:I.sectorDisabled),d:t,"data-sector":`${i}`,key:`${I.sector}-${i}`,onclick:c})),Z("path",{class:this.classes(I.sector,I.sectorCross),d:"M 56.4 56.4 L 63.53 63.53 M 63.53 56.4 L 56.4 63.53",key:I.sectorCross}),u,a.attributes.cameraPitch>=5&&o?Z("path",{class:I.selectedFeaturePath,d:o,fill:`url(#${this.id}-coverage-fill)`,key:I.selectedFeaturePath}):null))):null}_renderSketch(){const{dataCaptureLayer:e,imageOverlaysOpened:t}=this;if(!e||t)return null;if(this._sketchLoaderTask||this._loadSketchResources(),!this._sketchLoaderTask?.value)return null;const{geometryType:i}=e,a="point"===i?"pin":"polyline"===i?"line":"polygon",s=this._sketchLoaderTask.value;return Z("div",{class:I.sketchTools},Z(s,{icon:a,messages:this._imageSketchToolsMessages,type:i,onAction:this._onAction}))}get _renderThumbnails(){const{currentBestFeature:e,thumbnails:t}=this.viewModel;return e?Z("div",{class:I.carouselContent},t?.items.map(({url:t,objectId:i,rotation:a},s)=>Z("div",{class:`${I.carouselItemWrapper}${e.attributes.objectId===i?"--selected":""}`,key:`${I.carouselItemWrapper}-${s}`},Z("canvas",{afterCreate:this._registerGalleryItem,afterRemoved:this._unregisterGalleryItem,alt:`thumbnail-${i}`,class:I.carouselItem,"data-objectid":`${i}`,"data-rotation":`${a}`,"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()}_sliderChangeHandler(e){const t=this.viewModel?.videoElement?.content;t&&(t.currentTime=e.target.value,t.play())}_storeNavigationToolReference(e){this._navigationTool=e}_toggleAdditionalCameraLocations(){this.isAdditionalPointSourcesVisible=!this.isAdditionalPointSourcesVisible}_toggleAdditionalCoverage(){this.isAdditionalCoverageVisible=!this.isAdditionalCoverageVisible}_toggleCurrentCoverage(){this.currentCoverageVisible=!this.currentCoverageVisible}_toggleImageEnhancementToolState(e){e.stopPropagation();const t=this.imageEnhancementToolActive;this._closeAllImageTools(),this.imageEnhancementToolActive=!t}_toggleVideoEnhancementToolState(e){e.stopPropagation(),this.videoEnhancementToolActive=!this.videoEnhancementToolActive}_toggleImageOverlays(e){e.stopPropagation();const t=this.imageOverlaysOpened;this._closeAllImageTools(),this.imageOverlaysOpened=!t}_toggleImageGallery(e){e.stopPropagation();const t=this.galleryOpened;this._closeAllImageTools(),this.galleryOpened=!!this.imageGalleryEnabled&&!t}_toggleLocationTool(e){const t=this.imageLocationToolActive,i=this.triangularMeasurementActive&&t;this._closeAllImageTools(),this.imageLocationToolActive=i||!t,e.stopPropagation()}_toggleMeasurementSketch(e,t){e.stopPropagation();const i=this.measureType,a=this.triangularMeasurementActive;this._closeAllImageTools(),this.measureType=i!==t||a?t:null,this.measureType===t&&(this.viewModel.displayNewMeasurementButton=!0)}_toggleNavigationTool(){const e=this.navigationToolActive;this._closeAllImageTools(),this.navigationToolActive=!e}_toggleMapImageConversionToolState(){this.mapImageConversionToolState=!this.mapImageConversionToolState}_toggleTriangularAreaMeasurements(){this._toggleTriangularMeasurements("area")}_toggleTriangularDistanceMeasurements(){this._toggleTriangularMeasurements("distance")}_toggleTriangularLocation(){const e=this.triangularMeasurementActive,t=this.navigationToolActive;e?null===this.measureType?this.imageLocationToolActive?this._closeImageToolsAndToggleNavigation(e,t):this._activateTriangulatedImageLocationTool():this._resetMeasureTypeAndActivateImageLocationTool():this._activateTriangulatedImageLocationWorkflow(e,t)}_toggleTriangularMeasurements(e){const t=this.triangularMeasurementActive,i=this.viewModel.measureType,a=this.navigationToolActive;t?e===i?(this._closeAllImageTools(),this.triangularMeasurementActive=!t,this.navigationToolActive=!a):(this.imageLocationToolActive=!1,this.measureType=e):(this._closeAllImageTools(),this.measureType=e,this.triangularMeasurementActive=!t,this.navigationToolActive=!!a||!a)}_unregisterGalleryItem(e){this._galleryObserver.unobserve(e)}_updateNavigationTool(e){const{previousFeatureAngle:t,bestFeatureAngle:i}=this.viewModel,a=(i-t+540)%360-180;e.style.setProperty(L,`${t}deg`),e.style.setProperty(k,`${t+a}deg`)}async loadBestImage(e){return this.viewModel.loadBestImage(e)}loadImageFromSource(e,t){return this.viewModel.loadImageFromSource(e,t)}async overlayMapFeatures(e,t){return this.removeHandles(`${Q.overlayed}-${e.id}`),this.addHandles(r(()=>e.visible,()=>{this.viewModel.toggleOverlayMapFeatures(e.id,e.visible)}),`${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 Z("div",{class:this.classes(U.widget,V)},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})],X.prototype,"accuracyParametersMissing",null),e([g()],X.prototype,"activeLayer",null),e([g()],X.prototype,"activeVideoIcon",null),e([g()],X.prototype,"activeAudioIcon",null),e([g()],X.prototype,"cameraHeadingThreshold",null),e([g()],X.prototype,"cameraPitchThreshold",null),e([g()],X.prototype,"canNavigateSequentially",null),e([g()],X.prototype,"currentBestFeature",null),e([g()],X.prototype,"currentCoverageVisible",null),e([g()],X.prototype,"dataCaptureEnabled",void 0),e([g()],X.prototype,"dataCaptureLayer",null),e([g()],X.prototype,"disabled",null),e([g()],X.prototype,"features",null),e([g()],X.prototype,"imagePointsInView",null),e([g()],X.prototype,"galleryOpened",void 0),e([g()],X.prototype,"icon",null),e([g()],X.prototype,"imageEnhancementToolActive",void 0),e([g()],X.prototype,"videoEnhancementToolActive",void 0),e([g({readOnly:!0})],X.prototype,"imageGalleryEnabled",null),e([g()],X.prototype,"imageLocationToolActive",null),e([g()],X.prototype,"imageOverlaysOpened",void 0),e([g({readOnly:!0})],X.prototype,"invalidCameraHeading",null),e([g()],X.prototype,"isAdditionalCoverageVisible",null),e([g()],X.prototype,"isAdditionalPointSourcesVisible",null),e([g()],X.prototype,"mapImageConversionToolState",null),e([g()],X.prototype,"measureType",null),e([g()],X.prototype,"layer",null),e([g()],X.prototype,"navigationToolActive",void 0),e([g()],X.prototype,"navigationMode",null),e([q(w()),g({type:P})],X.prototype,"viewModel",void 0),e([g(),z("esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer")],X.prototype,"messages",void 0),e([g(),z("esri/core/t9n/Units")],X.prototype,"measurementUnitMessages",void 0),e([g(),z("esri/t9n/common")],X.prototype,"messagesCommon",void 0),e([g(),z("esri/widgets/Sketch/t9n/Sketch")],X.prototype,"messagesSketch",void 0),e([g()],X.prototype,"pixelMeasurementUnit",void 0),e([g()],X.prototype,"pixelAreaMeasurementUnit",void 0),e([g({readOnly:!0})],X.prototype,"popupEnabled",null),e([g()],X.prototype,"referencePoint",null),e([g()],X.prototype,"showCameraLocations",void 0),e([g()],X.prototype,"showMapFeatures",void 0),e([q(["create","delete","redo","undo","update"]),g({readOnly:!0})],X.prototype,"sketchViewModel",null),e([g()],X.prototype,"triangularMeasurementActive",null),e([g()],X.prototype,"view",null),e([g({type:x,nonNullable:!0})],X.prototype,"visibleElements",void 0),e([g()],X.prototype,"determineWorkflowForFeature",null),e([g()],X.prototype,"updateFootprint",null),e([g()],X.prototype,"_activeMeasurementIcon",null),e([g()],X.prototype,"_activeMeasurementHeading",null),e([g()],X.prototype,"_imageOverlaysLoaderTask",void 0),e([g()],X.prototype,"_imageMeasurementToolsLoaderTask",void 0),e([g()],X.prototype,"_navigationSettingsLoaderTask",void 0),e([g()],X.prototype,"_measurementToggle",null),e([g()],X.prototype,"_renderRoot",null),e([g()],X.prototype,"_imageEnhancementTools",null),e([g()],X.prototype,"_videoEnhancementTools",null),e([g()],X.prototype,"_imageGalleryPanel",null),e([g()],X.prototype,"_imageGalleryContext",null),e([g()],X.prototype,"_imageOverlaysComponent",null),e([g()],X.prototype,"_imageOverlayMessages",null),e([g()],X.prototype,"_imageSketchToolsMessages",null),e([g()],X.prototype,"_imageViewer",null),e([g()],X.prototype,"_imageViewerTriangular",null),e([g()],X.prototype,"_videoViewer",null),e([g()],X.prototype,"_locationToggle",null),e([g()],X.prototype,"_messageBox",null),e([g()],X.prototype,"_navigationToolExpanded",void 0),e([g()],X.prototype,"_navigationTool",void 0),e([g()],X.prototype,"_panoramicViewer",null),e([g()],X.prototype,"_renderNavigation",null),e([g()],X.prototype,"_renderThumbnails",null),e([g()],X.prototype,"_sketchLoaderTask",void 0),X=e([h("esri.widgets.OrientedImageryViewer")],X);const Y=X;export{Y as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../chunks/tslib.es6.js";import i from"../../Camera.js";import t from"../../Ground.js";import a from"../../Map.js";import o from"../../request.js";import r from"../../core/Collection.js";import s from"../../core/Error.js";import n from"../../core/Evented.js";import{JSONMap as h}from"../../core/jsonMap.js";import{rad2deg as m,deg2rad as l}from"../../core/mathUtils.js";import{destroyMaybe as d}from"../../core/maybe.js";import{isAbortError as c,waitTick as p}from"../../core/promiseUtils.js";import{watch as g,syncAndInitial as _,when as u}from"../../core/reactiveUtils.js";import{property as v}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{enumeration as y}from"../../core/accessorSupport/decorators/enumeration.js";import{subclass as f}from"../../core/accessorSupport/decorators/subclass.js";import w from"../../geometry/SpatialReference.js";import M from"../../layers/GraphicsLayer.js";import{convertSphereVertexToPixelLocation as V}from"../../layers/orientedImagery/transformations/utils.js";import z from"../../views/SceneView.js";import{logAndThrow as R,getMissingPropertyErrorName as C,getMissingPropertyErrorMessage as j}from"../OrientedImageryViewer/utils.js";import{defaultImageSphereCenter as P,maxPanoramicViewerHFOV as H,minPanoramicViewerHFOV as O,humanBinocularHFOV as S}from"./constants.js";import b from"./PanoramicZoomConditions.js";import I from"./PanoramicZoomViewModel.js";import{findDiagonalFOV as k,meshToGraphic as x,createImageSphere as G}from"./utils.js";const F={default:"default",navigation:"navigation",fovConstraint:"fov-constraint",clickAction:"image-click-action"};let A=class extends n.EventedAccessor{constructor(e){super(e),this._startPosition=null,this._targetPosition=null,this._graphics=new M({elevationInfo:{mode:"relative-to-ground"}}),this._imageGraphic=null,this._loadController=null,this._map=new a({ground:new t({opacity:0,navigationConstraint:null}),layers:new r([this._graphics])}),this._zoomViewModel=null,this.autoLoad=!1,this.clickAction="none",this.imageSize=null,this.imageSource=null,this.navigationManager=null,this.navigationViewModel=null,this.pitch=90,this.state="ready",this.yaw=0,this._addNavigationHandles=()=>{this.imageRenderer.basemapTerrain.suspended=!0,this.imageRenderer.constraints.tilt.max=180,this.removeHandles(F.navigation),this.addHandles([this.imageRenderer.on("mouse-wheel",this._handleWheel),this.imageRenderer.on("double-click",this._handleDoubleClick),this.imageRenderer.on("drag",this._handleDrag),this.imageRenderer.on("key-down",e=>{const i=["+","-","Shift","_","=","ArrowUp","ArrowDown","ArrowRight","ArrowLeft"],t=e.key;i.includes(t)&&e.stopPropagation()})],F.navigation)},this._addHFOVHandles=()=>{this.removeHandles(F.fovConstraint),this.addHandles(g(()=>[this.maxHFOV,this.minHFOV],()=>{this._zoomViewModel&&(this._zoomViewModel.panoramicZoomConditions=new b({view:this.imageRenderer,maxFOV:this.maxHFOV,minFOV:this.minHFOV}))},_),F.fovConstraint)},this._addZoomHandles=()=>{this._zoomViewModel=new I({view:this.imageRenderer,panoramicZoomConditions:new b({maxFOV:this.maxHFOV,minFOV:this.minHFOV})});const e=this.imageRenderer.ui.find("zoom");e&&(e.viewModel=this._zoomViewModel),this._addHFOVHandles()},this._cancelLoadWithController=()=>{this._loadController?.abort(),this._loadController=null},this._handleDoubleClick=e=>{e.stopPropagation(),e.native.ctrlKey?this._zoomOut():this._zoomIn()},this._handleDrag=e=>{e.stopPropagation();const{action:i,x:t,y:a}=e;switch(i){case"start":this._startPosition=this._targetPosition={x:t,y:a};break;case"update":this._targetPosition={x:t,y:a},this._updateCameraHeadingAndTilt()}},this._handleImageClick=e=>{if("image-loaded"===this.state&&this.imageRenderer.ready)switch(this.clickAction){case"emit":e.stopPropagation(),this.emit("click",e);break;case"hittest":e.stopPropagation(),e.defer(async()=>{const i=await this.imageRenderer.hitTest(e.screenPoint,{include:this._graphics});i.results=i.results.filter(e=>"graphic"===e.type&&e.graphic!==this._imageGraphic),this.emit("hittest-response",i)});break;case"pixel-location":{if(e.stopPropagation(),!this.imageSize||!e.mapPoint)return void this.emit("pixel-location",null);const i=V(e.mapPoint,this.imageSize[0],this.imageSize[1]);this.emit("pixel-location",{...i,spatialReference:w.WebMercator});break}}},this._handleWheel=e=>{const i=e.deltaX??e.native.deltaX;e.stopPropagation(),i>0||e.deltaY>0?this._zoomOut():this._zoomIn()},this._loadNavigationManager=async()=>{if(!this.navigationManager||this.navigationManager?.destroyed){const e=await import("../OrientedImageryViewer/navigation/NavigationManagerPanoramic.js").then(e=>e.default);this.navigationManager=new e({viewModel:this.navigationViewModel})}return this.navigationManager},this._loadWithController=()=>{this._cancelLoadWithController(),this._loadController=new AbortController,this.loadImage(this._loadController)},this._zoomIn=()=>this._zoomViewModel?.zoomIn(),this._zoomOut=()=>this._zoomViewModel?.zoomOut(),this.addGraphic=(e,i)=>"image-loaded"===this.state&&!this._graphics.graphics.includes(e)&&(this._graphics.graphics.add(e,i),!0),this.addManyGraphics=e=>{if("image-loaded"!==this.state)return!1;const i=e.filter(e=>!this._graphics.graphics.includes(e));return this._graphics.graphics.addMany(i),!0},this.clearGraphics=()=>{this._graphics.graphics.removeAll()},this.clearImage=()=>{this.imageSize=null,this._removeImageSphere()},this.navigate=async(e,i)=>
|
|
5
|
+
import{_ as e}from"../../chunks/tslib.es6.js";import i from"../../Camera.js";import t from"../../Ground.js";import a from"../../Map.js";import o from"../../request.js";import r from"../../core/Collection.js";import s from"../../core/Error.js";import n from"../../core/Evented.js";import{JSONMap as h}from"../../core/jsonMap.js";import{rad2deg as m,deg2rad as l}from"../../core/mathUtils.js";import{destroyMaybe as d}from"../../core/maybe.js";import{isAbortError as c,waitTick as p}from"../../core/promiseUtils.js";import{watch as g,syncAndInitial as _,when as u}from"../../core/reactiveUtils.js";import{property as v}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{enumeration as y}from"../../core/accessorSupport/decorators/enumeration.js";import{subclass as f}from"../../core/accessorSupport/decorators/subclass.js";import w from"../../geometry/SpatialReference.js";import M from"../../layers/GraphicsLayer.js";import{convertSphereVertexToPixelLocation as V}from"../../layers/orientedImagery/transformations/utils.js";import z from"../../views/SceneView.js";import{logAndThrow as R,getMissingPropertyErrorName as C,getMissingPropertyErrorMessage as j}from"../OrientedImageryViewer/utils.js";import{defaultImageSphereCenter as P,maxPanoramicViewerHFOV as H,minPanoramicViewerHFOV as O,humanBinocularHFOV as S}from"./constants.js";import b from"./PanoramicZoomConditions.js";import I from"./PanoramicZoomViewModel.js";import{findDiagonalFOV as k,meshToGraphic as x,createImageSphere as G}from"./utils.js";const F={default:"default",navigation:"navigation",fovConstraint:"fov-constraint",clickAction:"image-click-action"};let A=class extends n.EventedAccessor{constructor(e){super(e),this._startPosition=null,this._targetPosition=null,this._graphics=new M({elevationInfo:{mode:"relative-to-ground"}}),this._imageGraphic=null,this._loadController=null,this._map=new a({ground:new t({opacity:0,navigationConstraint:null}),layers:new r([this._graphics])}),this._zoomViewModel=null,this.autoLoad=!1,this.clickAction="none",this.imageSize=null,this.imageSource=null,this.navigationManager=null,this.navigationViewModel=null,this.pitch=90,this.state="ready",this.yaw=0,this._addNavigationHandles=()=>{this.imageRenderer.basemapTerrain.suspended=!0,this.imageRenderer.constraints.tilt.max=180,this.removeHandles(F.navigation),this.addHandles([this.imageRenderer.on("mouse-wheel",this._handleWheel),this.imageRenderer.on("double-click",this._handleDoubleClick),this.imageRenderer.on("drag",this._handleDrag),this.imageRenderer.on("key-down",e=>{const i=["+","-","Shift","_","=","ArrowUp","ArrowDown","ArrowRight","ArrowLeft"],t=e.key;i.includes(t)&&e.stopPropagation()})],F.navigation)},this._addHFOVHandles=()=>{this.removeHandles(F.fovConstraint),this.addHandles(g(()=>[this.maxHFOV,this.minHFOV],()=>{this._zoomViewModel&&(this._zoomViewModel.panoramicZoomConditions=new b({view:this.imageRenderer,maxFOV:this.maxHFOV,minFOV:this.minHFOV}))},_),F.fovConstraint)},this._addZoomHandles=()=>{this._zoomViewModel=new I({view:this.imageRenderer,panoramicZoomConditions:new b({maxFOV:this.maxHFOV,minFOV:this.minHFOV})});const e=this.imageRenderer.ui.find("zoom");e&&(e.viewModel=this._zoomViewModel),this._addHFOVHandles()},this._cancelLoadWithController=()=>{this._loadController?.abort(),this._loadController=null},this._handleDoubleClick=e=>{e.stopPropagation(),e.native.ctrlKey?this._zoomOut():this._zoomIn()},this._handleDrag=e=>{e.stopPropagation();const{action:i,x:t,y:a}=e;switch(i){case"start":this._startPosition=this._targetPosition={x:t,y:a};break;case"update":this._targetPosition={x:t,y:a},this._updateCameraHeadingAndTilt()}},this._handleImageClick=e=>{if("image-loaded"===this.state&&this.imageRenderer.ready)switch(this.clickAction){case"emit":e.stopPropagation(),this.emit("click",e);break;case"hittest":e.stopPropagation(),e.defer(async()=>{const i=await this.imageRenderer.hitTest(e.screenPoint,{include:this._graphics});i.results=i.results.filter(e=>"graphic"===e.type&&e.graphic!==this._imageGraphic),this.emit("hittest-response",i)});break;case"pixel-location":{if(e.stopPropagation(),!this.imageSize||!e.mapPoint)return void this.emit("pixel-location",null);const i=V(e.mapPoint,this.imageSize[0],this.imageSize[1]);this.emit("pixel-location",{...i,spatialReference:w.WebMercator});break}}},this._handleWheel=e=>{const i=e.deltaX??e.native.deltaX;e.stopPropagation(),i>0||e.deltaY>0?this._zoomOut():this._zoomIn()},this._loadNavigationManager=async()=>{if(!this.navigationManager||this.navigationManager?.destroyed){const e=await import("../OrientedImageryViewer/navigation/NavigationManagerPanoramic.js").then(e=>e.default);this.navigationManager=new e({viewModel:this.navigationViewModel})}return this.navigationManager},this._loadWithController=()=>{this._cancelLoadWithController(),this._loadController=new AbortController,this.loadImage(this._loadController)},this._zoomIn=()=>this._zoomViewModel?.zoomIn(),this._zoomOut=()=>this._zoomViewModel?.zoomOut(),this.addGraphic=(e,i)=>"image-loaded"===this.state&&!this._graphics.graphics.includes(e)&&(this._graphics.graphics.add(e,i),!0),this.addManyGraphics=e=>{if("image-loaded"!==this.state)return!1;const i=e.filter(e=>!this._graphics.graphics.includes(e));return this._graphics.graphics.addMany(i),!0},this.clearGraphics=()=>{this._graphics.graphics.removeAll()},this.clearImage=()=>{this.imageSize=null,this._removeImageSphere()},this.navigate=async(e,i)=>{const t=this._loadNavigationManager();this.navigationViewModel?.addUpdatingPromise(t);const a=await t;return await a.navigate(e,i)},this.removeGraphic=e=>!("image-loaded"!==this.state||!this._graphics.graphics.includes(e))&&(this._graphics.remove(e),!0),this.removeManyGraphics=e=>{if("image-loaded"!==this.state)return!1;const i=e.filter(e=>this._graphics.graphics.includes(e));return this._graphics.removeMany(i),!0},this._imageRenderer=new z({map:this._map,viewingMode:"local",camera:{position:P},environment:{atmosphereEnabled:!1,starsEnabled:!1,lighting:{type:"virtual"}},popupEnabled:!1,spatialReference:w.WebMercator,ui:{components:["zoom"]}})}destroy(){this._imageRenderer.destroy()}initialize(){this.state="initialized",this.addHandles([g(()=>this.imageSource,()=>{this.imageSource&&this.autoLoad&&this._loadWithController()},_),g(()=>this.fov,()=>{this._reloadCamera()},_),g(()=>this.yaw,e=>{this.camera.heading=e,this._reloadCamera()},_),g(()=>this.pitch,e=>{this.camera.tilt=e,this._reloadCamera()},_),u(()=>this.imageRenderer.ready,()=>{this._addNavigationHandles(),this._addZoomHandles()},_),g(()=>this.clickAction,e=>{this.removeHandles(F.clickAction),"none"!==e&&this.addHandles(this.imageRenderer.on("click",this._handleImageClick))},_)],F.default)}get camera(){return this.imageRenderer.camera}set camera(e){e&&(this.imageRenderer.camera=e.clone())}get fov(){return this.camera.fov}set fov(e){Number.isFinite(e)&&this._zoomViewModel?.zoomTo(e)}get hfov(){const{fov:e}=this.camera,{size:[i,t]}=this.imageRenderer,a=i/t,o=Math.atan(a);return 2*m(Math.atan(Math.tan(l(e/2))*Math.sin(o)))}get imageRenderer(){return this._imageRenderer}get maxHFOV(){const{size:[e,i]}=this.imageRenderer;return k(H,e/i)}get minHFOV(){const{size:[e,i]}=this.imageRenderer;return k(O,e/i)}get vfov(){const{fov:e}=this.camera,{size:[i,t]}=this.imageRenderer,a=i/t,o=Math.atan(a);return 2*m(Math.atan(Math.tan(l(e/2))*Math.cos(o)))}async _loadImageInternal(e,i){let t;this.state="image-loading";try{t=(await o(e,{responseType:"image",...i})).data}catch(a){throw c(a)?this.state="image-load-aborted":this.state="image-load-error",a}return this._updateImageSphere(t,i)}_reloadCamera(){this.camera=this.camera.clone()}_removeImageSphere(){this._imageGraphic&&(this._graphics.remove(this._imageGraphic),this._imageGraphic=d(this._imageGraphic)),this.state="ready",this.imageSize=null}_updateCameraHeadingAndTilt(){if(!this._startPosition||!this._targetPosition)return;const e=this.camera.heading+(this._startPosition.x-this._targetPosition.x)/this.imageRenderer.width*this.camera.fov;this.yaw=(e+360)%360;const i=this.camera.tilt-(this._startPosition.y-this._targetPosition.y)/this.imageRenderer.height*this.imageRenderer.camera.tilt;this.pitch=Math.min(179.5,Math.max(.5,i)),this._startPosition=this._targetPosition}async _updateImageSphere(e,i){await p(i);const{size:[t,a]}=this.imageRenderer;return this._imageGraphic=x(G(e)),this._graphics.add(this._imageGraphic),this.fov=k(S,t/a),this.state="image-loaded",this.imageSize=[e.width,e.height],this._imageGraphic.geometry}async loadImage(e){return this._removeImageSphere(),this.imageSource?this._loadImageInternal(this.imageSource,e):R(this.declaredClass,new s(C("panoramic-viewer"),j("PanoramicViewerViewModel","imageSource")))}};e([v()],A.prototype,"_graphics",void 0),e([v()],A.prototype,"_imageGraphic",void 0),e([v()],A.prototype,"_imageRenderer",void 0),e([v()],A.prototype,"_loadController",void 0),e([v()],A.prototype,"_map",void 0),e([v()],A.prototype,"_zoomViewModel",void 0),e([v({type:Boolean})],A.prototype,"autoLoad",void 0),e([v({type:i})],A.prototype,"camera",null),e([y(new h({emit:"emit",hittest:"hittest",none:"none","pixel-location":"pixel-location"}))],A.prototype,"clickAction",void 0),e([v({type:Number})],A.prototype,"fov",null),e([v({readOnly:!0})],A.prototype,"hfov",null),e([v({readOnly:!0})],A.prototype,"imageRenderer",null),e([v()],A.prototype,"imageSize",void 0),e([v()],A.prototype,"imageSource",void 0),e([v({readOnly:!0})],A.prototype,"maxHFOV",null),e([v({readOnly:!0})],A.prototype,"minHFOV",null),e([v()],A.prototype,"navigationViewModel",void 0),e([v({type:Number})],A.prototype,"pitch",void 0),e([v()],A.prototype,"state",void 0),e([v({readOnly:!0})],A.prototype,"vfov",null),e([v({type:Number})],A.prototype,"yaw",void 0),A=e([f("esri.widgets.PanoramicViewer.PanoramicViewerViewModel")],A);const L=A;export{L as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import t from"../Camera.js";import{property as i}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as o}from"../core/accessorSupport/decorators/subclass.js";import r from"./Widget.js";import a from"./OrientedImageryViewer/components/NavigationUI360.js";import{loadSequentialNavigationUIComponents as n,SequentialNavigationUI as s}from"./OrientedImageryViewer/components/SequentialNavigationUI.js";import l from"./PanoramicViewer/PanoramicViewerViewModel.js";import{loadCalciteComponents as p}from"./support/componentsUtils.js";import{globalCss as c}from"./support/globalCss.js";import"./support/widgetUtils.js";import{vmEvent as d}from"./support/decorators/vmEvent.js";import{tsx as u}from"./support/jsxFactory.js";const v="esri-panoramic-viewer";let h=class extends r{constructor(e){super(e),this.navigationEnabled=!1,this.uiStrings=null,this.viewModel=new l,this._afterContainerCreate=e=>{this.imageRenderer.container=e},this.addGraphic=(e,t)=>{this.viewModel.addGraphic(e,t)},this.addManyGraphics=e=>{this.viewModel.addManyGraphics(e)},this.clearGraphics=()=>{this.viewModel.clearGraphics()},this.clearImage=()=>{this.viewModel.clearImage()},this.loadImage=e=>this.viewModel.loadImage(e),this.navigate=async(e,t)=>this.viewModel.navigate(e,t),this.removeGraphic=e=>{this.viewModel.removeGraphic(e)},this.removeManyGraphics=e=>{this.viewModel.removeManyGraphics(e)}}loadDependencies(){return Promise.all([p({panel:()=>import("@esri/calcite-components/dist/components/calcite-panel")}),n()])}get autoLoad(){return this.viewModel.autoLoad}set autoLoad(e){this.viewModel.autoLoad=e}get camera(){return this.viewModel.camera}set camera(e){e&&(this.viewModel.camera=e)}get clickAction(){return this.viewModel.clickAction}set clickAction(e){this.viewModel.clickAction=e}get currentNode(){return this.navigationViewModel?.currentNode}get fov(){return this.camera.fov}set fov(e){this.viewModel.fov=e}get hfov(){return this.viewModel.hfov}get icon(){return"i360-view"}set icon(e){this._overrideIfSome("icon",e)}get imageRenderer(){return this.viewModel.imageRenderer}get imageSize(){return this.viewModel.imageSize}get imageSource(){return this.viewModel.imageSource}set imageSource(e){this.viewModel.imageSource=e}get navigationMode(){return this.navigationViewModel?.navigationMode}get navigationNodes(){return this.navigationViewModel?.navigationNodes}get navigationViewModel(){return this.viewModel.navigationViewModel}set navigationViewModel(e){this.viewModel.navigationViewModel=e}get pitch(){return this.viewModel.pitch}set pitch(e){this.viewModel.pitch=e}get state(){return this.viewModel.state}get ui(){return this.imageRenderer.ui}get vfov(){return this.viewModel.vfov}get yaw(){return this.viewModel.yaw}set yaw(e){this.viewModel.yaw=e}get _navigationUI(){return u(a,{currentNode:this.currentNode,navigate:this.navigate,nodes:this.navigationNodes})}get _sequentialNavigationUI(){return u(s,{layout:"horizontal",uiStrings:this.uiStrings,onAction:e=>{this.navigate(this.currentNode,e)}})}_renderNavigationUI(){switch(this.navigationMode){case"directional":return this._navigationUI;case"sequential":return this._sequentialNavigationUI;default:return null}}render(){return u("calcite-panel",null,u("calcite-panel",{afterCreate:this._afterContainerCreate,bind:this,class:this.classes(c.widget,v)}),this.navigationEnabled?this._renderNavigationUI():null)}static{this.vnodeSelector="calcite-panel"}};e([i({type:Boolean})],h.prototype,"autoLoad",null),e([i({type:t})],h.prototype,"camera",null),e([i()],h.prototype,"clickAction",null),e([i()],h.prototype,"currentNode",null),e([i({type:Number})],h.prototype,"fov",null),e([i({readOnly:!0,type:Number})],h.prototype,"hfov",null),e([i()],h.prototype,"icon",null),e([i({readOnly:!0})],h.prototype,"imageRenderer",null),e([i({readOnly:!0})],h.prototype,"imageSize",null),e([i()],h.prototype,"imageSource",null),e([i({type:Boolean})],h.prototype,"navigationEnabled",void 0),e([i()],h.prototype,"navigationMode",null),e([i()],h.prototype,"navigationNodes",null),e([i()],h.prototype,"navigationViewModel",null),e([i({type:Number})],h.prototype,"pitch",null),e([i({readOnly:!0})],h.prototype,"state",null),e([i()],h.prototype,"ui",null),e([i()],h.prototype,"uiStrings",void 0),e([i({readOnly:!0,type:Number})],h.prototype,"vfov",null),e([d(["click","hittest-response","pixel-location"]),i({type:l})],h.prototype,"viewModel",void 0),e([i({type:Number})],h.prototype,"yaw",null),e([i()],h.prototype,"_navigationUI",null),e([i()],h.prototype,"_sequentialNavigationUI",null),h=e([o("esri.widgets.PanoramicViewer")],h);const g=h;export{g as default};
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import t from"../Camera.js";import{property as i}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as o}from"../core/accessorSupport/decorators/subclass.js";import r from"./Widget.js";import a from"./OrientedImageryViewer/components/NavigationUI360.js";import{loadSequentialNavigationUIComponents as n,SequentialNavigationUI as s}from"./OrientedImageryViewer/components/SequentialNavigationUI.js";import l from"./PanoramicViewer/PanoramicViewerViewModel.js";import{loadCalciteComponents as p}from"./support/componentsUtils.js";import{globalCss as c}from"./support/globalCss.js";import"./support/widgetUtils.js";import{vmEvent as d}from"./support/decorators/vmEvent.js";import{tsx as u}from"./support/jsxFactory.js";const v="esri-panoramic-viewer";let h=class extends r{constructor(e){super(e),this.navigationEnabled=!1,this.uiStrings=null,this.viewModel=new l,this._afterContainerCreate=e=>{this.imageRenderer.container=e},this.addGraphic=(e,t)=>{this.viewModel.addGraphic(e,t)},this.addManyGraphics=e=>{this.viewModel.addManyGraphics(e)},this.clearGraphics=()=>{this.viewModel.clearGraphics()},this.clearImage=()=>{this.viewModel.clearImage()},this.loadImage=e=>this.viewModel.loadImage(e),this.navigate=async(e,t)=>await this.viewModel.navigate(e,t),this.removeGraphic=e=>{this.viewModel.removeGraphic(e)},this.removeManyGraphics=e=>{this.viewModel.removeManyGraphics(e)}}loadDependencies(){return Promise.all([p({panel:()=>import("@esri/calcite-components/dist/components/calcite-panel")}),n()])}get autoLoad(){return this.viewModel.autoLoad}set autoLoad(e){this.viewModel.autoLoad=e}get camera(){return this.viewModel.camera}set camera(e){e&&(this.viewModel.camera=e)}get clickAction(){return this.viewModel.clickAction}set clickAction(e){this.viewModel.clickAction=e}get currentNode(){return this.navigationViewModel?.currentNode}get fov(){return this.camera.fov}set fov(e){this.viewModel.fov=e}get hfov(){return this.viewModel.hfov}get icon(){return"i360-view"}set icon(e){this._overrideIfSome("icon",e)}get imageRenderer(){return this.viewModel.imageRenderer}get imageSize(){return this.viewModel.imageSize}get imageSource(){return this.viewModel.imageSource}set imageSource(e){this.viewModel.imageSource=e}get navigationMode(){return this.navigationViewModel?.navigationMode}get navigationNodes(){return this.navigationViewModel?.navigationNodes}get navigationViewModel(){return this.viewModel.navigationViewModel}set navigationViewModel(e){this.viewModel.navigationViewModel=e}get pitch(){return this.viewModel.pitch}set pitch(e){this.viewModel.pitch=e}get state(){return this.viewModel.state}get ui(){return this.imageRenderer.ui}get vfov(){return this.viewModel.vfov}get yaw(){return this.viewModel.yaw}set yaw(e){this.viewModel.yaw=e}get _navigationUI(){return u(a,{currentNode:this.currentNode,navigate:this.navigate,nodes:this.navigationNodes})}get _sequentialNavigationUI(){return u(s,{layout:"horizontal",uiStrings:this.uiStrings,onAction:e=>{this.navigate(this.currentNode,e)}})}_renderNavigationUI(){switch(this.navigationMode){case"directional":return this._navigationUI;case"sequential":return this._sequentialNavigationUI;default:return null}}render(){return u("calcite-panel",null,u("calcite-panel",{afterCreate:this._afterContainerCreate,bind:this,class:this.classes(c.widget,v)}),this.navigationEnabled?this._renderNavigationUI():null)}static{this.vnodeSelector="calcite-panel"}};e([i({type:Boolean})],h.prototype,"autoLoad",null),e([i({type:t})],h.prototype,"camera",null),e([i()],h.prototype,"clickAction",null),e([i()],h.prototype,"currentNode",null),e([i({type:Number})],h.prototype,"fov",null),e([i({readOnly:!0,type:Number})],h.prototype,"hfov",null),e([i()],h.prototype,"icon",null),e([i({readOnly:!0})],h.prototype,"imageRenderer",null),e([i({readOnly:!0})],h.prototype,"imageSize",null),e([i()],h.prototype,"imageSource",null),e([i({type:Boolean})],h.prototype,"navigationEnabled",void 0),e([i()],h.prototype,"navigationMode",null),e([i()],h.prototype,"navigationNodes",null),e([i()],h.prototype,"navigationViewModel",null),e([i({type:Number})],h.prototype,"pitch",null),e([i({readOnly:!0})],h.prototype,"state",null),e([i()],h.prototype,"ui",null),e([i()],h.prototype,"uiStrings",void 0),e([i({readOnly:!0,type:Number})],h.prototype,"vfov",null),e([d(["click","hittest-response","pixel-location"]),i({type:l})],h.prototype,"viewModel",void 0),e([i({type:Number})],h.prototype,"yaw",null),e([i()],h.prototype,"_navigationUI",null),e([i()],h.prototype,"_sequentialNavigationUI",null),h=e([o("esri.widgets.PanoramicViewer")],h);const g=h;export{g as default};
|
package/widgets/Print.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import"../intl.js";import{deprecateWidget as t}from"../core/deprecate.js";import{JSONMap as i}from"../core/jsonMap.js";import a from"../core/Logger.js";import{watch as l,on as o,whenOnce as s}from"../core/reactiveUtils.js";import{unitName as n}from"../core/unitFormatUtils.js";import{addProxy as r,hasSameOrigin as c}from"../core/urlUtils.js";import{property as p}from"../core/accessorSupport/decorators/property.js";import{ensureInteger as d}from"../core/accessorSupport/ensureType.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as m}from"../core/accessorSupport/decorators/subclass.js";import u from"../geometry/SpatialReference.js";import{isValid as h}from"../geometry/support/spatialReferenceUtils.js";import{reArcGISOnlineDomain as b}from"../portal/support/urlUtils.js";import{findToken as _}from"../rest/utils.js";import{formatJsonMap as v}from"../rest/support/fileFormat.js";import g from"./Widget.js";import y from"./Print/PrintViewModel.js";import{loadCalciteComponents as f}from"./support/componentsUtils.js";import{globalCss as w}from"./support/globalCss.js";import{Heading as T}from"./support/Heading.js";import{legacyIcon as x}from"./support/legacyIcon.js";import{isRTL as k,isActivationKey as C}from"./support/widgetUtils.js";import{messageBundle as S}from"./support/decorators/messageBundle.js";import{tsx as I,tsxFragment as O}from"./support/jsxFactory.js";import{formatNumber as $}from"../intl/number.js";const E="map-only";var L;!function(e){e.layout="layoutTab",e.mapOnly="mapOnlyTab",e.export="exportTab"}(L||(L={}));const M="esri-print",F={base:M,headerTitle:`${M}__header-title`,layoutTabList:`${M}__layout-tab-list`,layoutTab:`${M}__layout-tab`,layoutSection:`${M}__layout-section`,mapOnlySection:`${M}__map-only-section`,panelItemsCentered:`${M}__panel-items--centered`,loader:`${M}__loader`,swapButton:`${M}__swap-button`,printButton:`${M}__export-button`,printButtonSection:`${M}__export-button-section`,printButtonSectionDivider:`${M}__export-button-section--divider`,templateSelectContainer:`${M}__template-select-container`,templateSelectIcon:`${M}__template-select-icon`,templateSelectError:`${M}__template-select-error`,templateSelectArrow:`${M}__template-select-arrow`,formSectionContainer:`${M}__form-section-container`,advancedOptionsSection:`${M}__advanced-options-section`,advancedOptionsContainer:`${M}__advanced-options-container`,browseTemplateButtonContainer:`${M}__browse-template-button-container`,browseTemplateButtonContainerFilter:`${M}__browse-template-button-container-filter`,exportedFilesContainer:`${M}__export-panel-container`,exportedFilesTitle:`${M}__export-title`,exportedFile:`${M}__exported-file`,exportedFileLinkTitle:`${M}__exported-file-link-title`,exportedFileLinkDescription:`${M}__exported-file-link-description`,exportedFilesEmpty:`${M}__exported-files-empty`,printWidgetContainer:`${M}__container`,content:`${M}__content`,panelContainer:`${M}__panel-container`,scaleInfoContainer:`${M}__scale-info-container`,scaleInputContainer:`${M}__scale-input-container`,scaleInput:`${M}__scale-input`,sizeContainer:`${M}__size-container`,panelError:`${M}__panel--error`,exportedFileLoader:`${M}__exported-file--loader`,exportSection:`${M}__export-section`,exportSectionCentered:`${M}__export-section--centered`,templateButtonContainer:`${M}__template-button-container`,templateDoneButton:`${M}__template-done-button`,templateSelectFlowItemContainer:`${M}__template-select-flow-item-container`,templateSelectFlowItemContent:`${M}__template-select-flow-item-content`,templateSelectFlowItemListHeading:`${M}__template-select-flow-item-list-heading`,srLabel:`${M}__sr-label`,invalidWkidText:`${M}__invalid-wkid-text`};function P(e){return!isNaN(e)&&e>0&&Number.isFinite(e)}function A(e){return e?.toLowerCase()===E}function R(e){const{state:t,extension:i}=e;switch(t){case"pending":return"spinner";case"error":return"exclamation-mark-circle";default:return i?.toLowerCase()?.includes("pdf")?"file-pdf":"file"}}const B=new i({inch:"inches",foot:"feet",yard:"yards",mile:"miles","nautical-mile":"nautical-miles",millimeter:"millimeters",centimeter:"centimeters",decimeter:"decimeters",meter:"meters",kilometer:"kilometers"}),N=new Map([["a3-landscape","a3-landscape"],["a3-portrait","a3-portrait"],["a4-landscape","a4-landscape"],["a4-portrait","a4-portrait"],["letter-ansi-a-landscape","ansi-a-landscape"],["letter-ansi-a-portrait","ansi-a-portrait"],["tabloid-ansi-b-landscape","ansi-b-landscape"],["tabloid-ansi-b-portrait","ansi-b-portrait"]]);let j=class extends g{constructor(e,i){super(e,i),this._activeTabFocusRequested=!1,this._awaitingServerResponse=!1,this._selectedTab=L.layout,this._pendingExportScroll=!1,this._rootNode=null,this._selectedTemplate=null,this._formats=[],this._showTemplates=!1,this._isValidSpatialReference=!0,this.allowedFormatsForSaving=null,this.browseTemplateButtonOnClick=null,this.headerVisible=!0,this.headingLevel=3,this.includeOrganizationTemplates=!0,this.messagesCommon=null,this.messagesUnits=null,this.saveExportHidden=!0,this.saveAsButtonCallback=null,this.viewModel=new y,this._onInput=e=>{this._selectedTab===L.layout?this.templateOptions.title=e.currentTarget.value:this._selectedTab===L.mapOnly&&(this.templateOptions.fileName=e.currentTarget.value)},this._handleLinkClick=e=>{const t=e.currentTarget["data-item"];if(!t||"ready"!==t.state||!t.url)return;const i=_(this.viewModel.effectivePrintServiceUrl),a=t.url,l=document.createElement("a");if(l.target="_blank",l.href=a,l.rel="noreferrer",l.download=t.formattedName??"",!i)return l.click(),void e.stopPropagation();e.preventDefault();const o=new URL(a);o.searchParams.set("token",i),l.href=o.href,l.click(),l.href=a},t(a.getLogger(this),"Print","arcgis-print",{version:"4.33"}),this._focusOnTabChange=this._focusOnTabChange.bind(this)}initialize(){this.addHandles([l(()=>[this.templateOptions.format,this.viewModel.templatesInfo?.format],()=>{const{templatesInfo:e}=this.viewModel;if(!e)return;if(this._formats.length!==e.format.choiceList.length){const t=v.apiValues;this._formats=e.format.choiceList.map(e=>{const i=t.find(t=>new RegExp(`\\b${t}\\b`,"i").test(e))??e;return{value:i,label:e===i?e.toUpperCase():e}}).sort((e,t)=>e.label.localeCompare(t.label))}const t=this._formats.some(({value:e})=>new RegExp(`\\b${e}\\b`,"i").test(this.templateOptions.format));if(!e.format.defaultValue||t);else{const t=this._formats.find(({value:t})=>new RegExp(`\\b${t}\\b`,"i").test(e.format.defaultValue))?.value;t&&(this.templateOptions.format=t)}}),l(()=>[this.templateOptions.id,this.viewModel.loaded],async()=>{const{layout:e}=this.templateOptions;this._selectedTab=A(e)?L.mapOnly:L.layout,this._selectedTab===L.layout&&this.viewModel.loaded&&(this._selectedTemplate=this.viewModel.getLayoutTemplateById(this.templateOptions.id))}),l(()=>this.templateOptions.dpi,e=>{e<=0&&(this.templateOptions.dpi=1)}),l(()=>this.viewModel.view?.scale,e=>{!e||this.templateOptions.scaleEnabled&&this.templateOptions.scale||(this.templateOptions.scale=e)}),o(()=>this.viewModel,"submit",e=>this.emit("submit",e)),o(()=>this.viewModel,"complete",e=>this.emit("complete",e))]);const{height:e,width:t}=this.templateOptions;this.templateOptions.width=t||800,this.templateOptions.height=e||1100;const i=setTimeout(()=>{this._awaitingServerResponse=!0,this.scheduleRender()},500);this.viewModel.load().then(()=>{clearTimeout(i),this._awaitingServerResponse=!1})}loadDependencies(){return f({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),block:()=>import("@esri/calcite-components/dist/components/calcite-block"),button:()=>import("@esri/calcite-components/dist/components/calcite-button"),checkbox:()=>import("@esri/calcite-components/dist/components/calcite-checkbox"),combobox:()=>import("@esri/calcite-components/dist/components/calcite-combobox"),"combobox-item":()=>import("@esri/calcite-components/dist/components/calcite-combobox-item"),flow:()=>import("@esri/calcite-components/dist/components/calcite-flow"),"flow-item":()=>import("@esri/calcite-components/dist/components/calcite-flow-item"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),input:()=>import("@esri/calcite-components/dist/components/calcite-input"),"input-number":()=>import("@esri/calcite-components/dist/components/calcite-input-number"),label:()=>import("@esri/calcite-components/dist/components/calcite-label"),list:()=>import("@esri/calcite-components/dist/components/calcite-list"),"list-item":()=>import("@esri/calcite-components/dist/components/calcite-list-item"),loader:()=>import("@esri/calcite-components/dist/components/calcite-loader"),switch:()=>import("@esri/calcite-components/dist/components/calcite-switch"),chip:()=>import("@esri/calcite-components/dist/components/calcite-chip"),popover:()=>import("@esri/calcite-components/dist/components/calcite-popover"),link:()=>import("@esri/calcite-components/dist/components/calcite-link")})}destroy(){this.viewModel.destroy()}get allowedFormats(){return this.viewModel.allowedFormats}set allowedFormats(e){this.viewModel.allowedFormats=e}get allowedLayouts(){return this.viewModel.allowedLayouts}set allowedLayouts(e){this.viewModel.allowedLayouts=e}get error(){return this.viewModel.error}get exportedLinks(){return this.viewModel.exportedLinks}set exportedLinks(e){this.viewModel.exportedLinks=e}get extraParameters(){return this.viewModel.extraParameters}set extraParameters(e){this.viewModel.extraParameters=e}get icon(){return"print"}set icon(e){this._overrideIfSome("icon",e)}get includeDefaultTemplates(){return this.viewModel.includeDefaultTemplates}set includeDefaultTemplates(e){this.viewModel.includeDefaultTemplates=e}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get outSpatialReference(){return this.viewModel.outSpatialReference}set outSpatialReference(e){this.viewModel.outSpatialReference=e}get portal(){return this.viewModel.portal}set portal(e){this.viewModel.portal=e}get saveExportEnabled(){return this.viewModel.saveExportEnabled}set saveExportEnabled(e){this.viewModel.saveExportEnabled=e}get showPrintAreaEnabled(){return this.viewModel.showPrintAreaEnabled}set showPrintAreaEnabled(e){this.viewModel.showPrintAreaEnabled=e}get printServiceUrl(){return this.viewModel.printServiceUrl}set printServiceUrl(e){this.viewModel.printServiceUrl=e}get templateCustomTextElements(){return this.viewModel.templateCustomTextElements}set templateCustomTextElements(e){this.viewModel.templateCustomTextElements=e}get templateOptions(){return this.viewModel.templateOptions}set templateOptions(e){this.viewModel.templateOptions=e}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}render(){const{messages:e,templateOptions:t,viewModel:i,view:a}=this,{attributionEnabled:l,author:o,copyright:s,dpi:n,format:r,height:c,layout:p,layoutItem:m,legendEnabled:b,northArrowEnabled:_,scaleBarEnabled:v,scaleEnabled:g,scale:y,width:f}=t,C="ready"!==i.state||this._awaitingServerResponse||!(p||m),S=this._renderTitleOrFileNameSection(),O=I("div",{class:F.formSectionContainer},I("calcite-label",null,e.fileFormatTitle,I("calcite-combobox",{clearDisabled:!0,label:e.formatDefaultOption,maxItems:6,placeholder:e.formatDefaultOption,selectionMode:"single-persist",onCalciteComboboxChange:({currentTarget:e})=>{this.templateOptions.format=e.selectedItems[0]?.value??"pdf"}},this._formats.map(({value:e,label:t},i)=>I("calcite-combobox-item",{key:`file-format-${i}`,selected:e===this.templateOptions.format,textLabel:t,value:e}))))),$=I("calcite-label",{layout:"inline"},I("calcite-switch",{checked:this.showPrintAreaEnabled,onCalciteSwitchChange:e=>{this.showPrintAreaEnabled=!!e.currentTarget.checked}}),e.printPreview),E=I("div",null,I("div",{class:F.formSectionContainer},I("calcite-label",null,e.template,I("calcite-block",{class:F.templateSelectContainer,collapsible:!1,description:this._getPageSizeLabel(this._selectedTemplate),heading:this._getTemplateLabel(this._selectedTemplate,!0),key:"template-select-block",loading:"loading"===this._selectedTemplate?.state,onclick:()=>this._showTemplates=!0,onkeydown:e=>{"Enter"!==e.key&&" "!==e.key||(this._showTemplates=!0)},tabIndex:0},I("calcite-icon",{class:F.templateSelectIcon,icon:(this._selectedTemplate?.layout?N.get(this._selectedTemplate.layout):null)||"custom-print",key:"template-select-icon",scale:"l",slot:"content-start"}),"error"===this._selectedTemplate?.state?I("calcite-icon",{class:F.templateSelectError,icon:"exclamation-mark-circle",key:"template-select-error",scale:"s",slot:"actions-end"}):null,I("calcite-icon",{class:F.templateSelectArrow,icon:k()?"chevron-left":"chevron-right",key:"template-select-arrow",scale:"s",slot:"actions-end"})))),$),M=I("div",{class:F.formSectionContainer},I("calcite-label",null,e.dpi,I("calcite-input-number",{bind:this,"data-input-name":"dpi",min:1,value:`${n}`,onCalciteInputNumberInput:this._updateNumberInputValue}))),P=I("div",{class:F.formSectionContainer},I("calcite-label",null,I("div",{class:F.srLabel},e.outSpatialReference,I("calcite-link",{href:"https://developers.arcgis.com/rest/services-reference/enterprise/using-spatial-references/",target:"_blank"},"(WKID)")),I("calcite-input-number",{bind:this,"data-input-name":"outSpatialReference",integer:!0,numberButtonType:"none",value:i.outSpatialReference?.wkid?.toString()??"",onCalciteInputNumberInput:({currentTarget:e})=>{const t=d(e.value);i.outSpatialReference=Number.isNaN(t)||null==t?null:new u({wkid:t}),this._isValidSpatialReference=!i.outSpatialReference||h(i.outSpatialReference)}}),this._isValidSpatialReference?null:I("div",{class:F.invalidWkidText,key:`out-sr-${i.outSpatialReference?.wkid}`},e.invalidWkid))),A=I("div",{class:this.classes(F.scaleInfoContainer,F.formSectionContainer)},I("calcite-label",{layout:"inline"},I("calcite-checkbox",{bind:this,checked:g,"data-option-name":"scaleEnabled",onCalciteCheckboxChange:this._toggleInputValue}),e.scale),I("div",{class:F.scaleInputContainer},I("calcite-input-number",{"aria-label":e.scaleLabel,"aria-valuenow":`${y}`,bind:this,class:F.scaleInput,"data-input-name":"scale",disabled:!g,value:`${y}`,onCalciteInputNumberInput:this._updateNumberInputValue}),I("calcite-button",{appearance:"outline","aria-label":e.reset,bind:this,disabled:!g,iconStart:"refresh",kind:"neutral",onclick:this._resetToCurrentScale}))),R=I("div",{"aria-labelledby":`${this.id}__advancedOptionsForLayout`,class:F.advancedOptionsContainer,key:"advanced-section-for-layout"},A,this._selectedTemplate?.layoutTemplateInfo?.layoutOptions?.hasAuthorText??1?I("div",{class:F.formSectionContainer,key:"author-info"},I("calcite-label",null,e.author,I("calcite-input",{bind:this,"data-input-name":"author",value:o??"",onCalciteInputInput:this._updateInputValue}))):null,this._selectedTemplate?.layoutTemplateInfo?.layoutOptions?.hasCopyrightText??1?I("div",{class:F.formSectionContainer,key:"copyright-text"},I("calcite-label",null,e.copyright,I("calcite-input",{bind:this,"data-input-name":"copyright",value:s??"",onCalciteInputInput:this._updateInputValue}))):null,M,P,this._renderCustomTextElementSection(),this._selectedTemplate?.layoutTemplateInfo?.layoutOptions?.hasLegend??1?I("div",{class:F.formSectionContainer,key:"legend-info"},I("calcite-label",{layout:"inline"},I("calcite-checkbox",{bind:this,checked:!!b,"data-option-name":"legendEnabled",onCalciteCheckboxChange:this._toggleInputValue}),e.legend)):null,this._selectedTemplate?.mapSurroundInfoOptions?.northArrow.length?I("div",{class:F.formSectionContainer,key:"north-arrow"},I("calcite-label",{layout:"inline"},I("calcite-checkbox",{bind:this,checked:!!_,"data-option-name":"northArrowEnabled",onCalciteCheckboxChange:this._toggleInputValue}),e.northArrow)):null,this._selectedTemplate?.mapSurroundInfoOptions?.scaleBar.length?I("div",{class:F.formSectionContainer,key:"scale-bar"},I("calcite-label",{layout:"inline"},I("calcite-checkbox",{bind:this,checked:!!v,"data-option-name":"scaleBarEnabled",onCalciteCheckboxChange:this._toggleInputValue}),e.scaleBar)):null),B=I("div",{"aria-labelledby":`${this.id}__advancedOptionsForMapOnly`,class:F.advancedOptionsContainer},A,M,P,I("div",{class:F.formSectionContainer},I("calcite-label",{layout:"inline"},I("calcite-checkbox",{bind:this,checked:l,"data-option-name":"attributionEnabled",onCalciteCheckboxChange:this._toggleInputValue}),e.attribution)),this._renderCustomTextElementSection()),j=this.exportedLinks.toArray(),V=this._renderExportedLinkItems(j),D={[F.exportSectionCentered]:!j.length},U=this._selectedTab===L.layout?I("section",{"aria-labelledby":`${this.id}__layoutTab`,class:F.layoutSection,id:`${this.id}__layoutContent`,key:"esri-print__layoutContent",role:"tabpanel"},I("div",{class:F.panelContainer},this._selectedTemplate?.layoutTemplateInfo?.layoutOptions?.hasTitleText??1?S:null,E,this._selectedTab===L.layout?O:null,I("calcite-block",{"aria-label":e.advancedOptions,class:this.classes(F.panelContainer,F.advancedOptionsSection),collapsible:!0,disabled:!(p||m?.id),heading:e.advancedOptions,id:"advancedOptionsForLayout",key:"advanced-options-for-layout"},R))):this._selectedTab===L.mapOnly?I("section",{"aria-labelledby":`${this.id}__mapOnlyTab`,class:F.mapOnlySection,id:`${this.id}__mapOnlyContent`,key:"esri-print__mapOnlyContent",role:"tabpanel"},I("div",{class:F.panelContainer},S,O,I("div",null,I("div",{class:this.classes(F.sizeContainer,F.formSectionContainer)},I("calcite-label",null,e.width,I("calcite-input-number",{bind:this,"data-input-name":"width",value:`${f}`,onCalciteInputNumberInput:this._updateNumberInputValue})),I("calcite-label",null,e.height,I("calcite-input-number",{bind:this,"data-input-name":"height",value:`${c}`,onCalciteInputNumberInput:this._updateNumberInputValue})),I("button",{"aria-label":e.swap,bind:this,class:this.classes(w.widgetButton,F.swapButton,x.swap),onclick:this._switchInput,type:"button"})),$),I("calcite-block",{"aria-label":e.advancedOptions,class:this.classes(F.panelContainer,F.advancedOptionsSection),collapsible:!0,heading:e.advancedOptions,id:"advancedOptionsForMapOnly",key:"advanced-options-for-map-only"},B))):I("section",{"aria-labelledby":`${this.id}__exportTab`,class:this.classes(F.exportSection,D),id:`${this.id}__exportContent`,key:"esri-print__exportContent",role:"tabpanel"},I("div",{class:F.panelContainer},I("div",{afterUpdate:this._scrollExportIntoView,bind:this,class:F.exportedFilesContainer},0===j.length?I("div",{class:F.exportedFilesEmpty},I("calcite-icon",{icon:"file",scale:"l"}),I("div",null,I(T,{class:F.exportedFilesTitle,level:this.headingLevel},e.noExportedFiles),I("div",null,e.exportHint))):V))),H="2d"!==a?.type,z=I("div",{class:F.panelError},a?H?e.sceneViewError:e.serviceError:e.noViewError),W=j.some(({state:e})=>"pending"===e),q=I("div",{class:F.content,key:"panel"},I("div",null,I("ul",{bind:this,class:F.layoutTabList,onclick:this._toggleLayoutPanel,onkeydown:this._handleLayoutPanelKeyDown,role:"tablist"},I("li",{afterCreate:this._focusOnTabChange,afterUpdate:this._focusOnTabChange,"aria-selected":`${this._selectedTab===L.layout}`,class:F.layoutTab,"data-tab-id":L.layout,id:`${this.id}__layoutTab`,role:"tab",tabIndex:0},e.layoutTab),I("li",{afterCreate:this._focusOnTabChange,afterUpdate:this._focusOnTabChange,"aria-selected":`${this._selectedTab===L.mapOnly}`,class:F.layoutTab,"data-tab-id":L.mapOnly,id:`${this.id}__mapOnlyTab`,role:"tab",tabIndex:0},e.mapOnlyTab),I("li",{afterCreate:this._focusOnTabChange,afterUpdate:this._focusOnTabChange,"aria-selected":`${this._selectedTab===L.export}`,class:F.layoutTab,"data-tab-id":L.export,id:`${this.id}__exportedFilesTab`,role:"tab",tabIndex:0},W?I("calcite-loader",{inline:!0,label:"loading",scale:"s"}):null,e.exportsTab)),U),this._selectedTab!==L.export?I("div",{class:this.classes(F.printButtonSection,!this.saveExportHidden&&this.portal?F.printButtonSectionDivider:null),key:"export-button-section"},!this.saveExportHidden&&this.portal?I("calcite-label",{layout:"inline"},I("calcite-checkbox",{bind:this,checked:this.saveExportEnabled,onCalciteCheckboxChange:e=>{this.saveExportEnabled=!!e.currentTarget.checked}}),e.saveExportToMyContent):null,I("calcite-button",{"aria-label":e.exportDescription,bind:this,class:this.classes(F.printButton),disabled:C||!(p||m?.id)&&!r,onclick:this._handlePrintMap,scale:"l",width:"full"},e.export)):null),K=I("calcite-flow",{key:"root-flow"},I("calcite-flow-item",{bind:this,key:"root-flow-item",selected:!this._showTemplates},I("div",{class:F.printWidgetContainer},this.headerVisible?I("header",{class:F.headerTitle},e.export):null,this.error||H||!a?z:q)),this._renderChooseTemplateFlowItem()),G="initializing"===i.state,J=G?this._renderLoader():K,Q={[F.panelItemsCentered]:G};return I("div",{bind:this,class:this.classes(F.base,w.widget,w.panel,Q)},J)}_getPageSizeLabel(e){if(!e)return;const t=e.layoutTemplateInfo;if(!t)return;const i=B.fromJSON(t.pageUnits.toLowerCase());return`${$(t.pageSize[0])} × ${$(t.pageSize[1])} ${n(this.messagesUnits,i,"abbr")}`}_getTemplateLabel(e,t=!1){if(!e)return t?this.messages.selectTemplate:this.messages.untitled;const{label:i,layout:a,layoutItem:l,type:o}=e;if("print-service-template"===o&&this.messages[a])return this.messages[a];const s=i??a??l?.id;return s?.replaceAll("_"," ")??this.messages.untitled}_getPortalTemplates(){const{portalTemplateIds:e}=this.viewModel;return this.includeDefaultTemplates&&this.includeOrganizationTemplates?this.viewModel.defaultTemplates.toArray().filter(({layout:t,layoutItem:i})=>!A(t)&&!!i?.id&&e.includes(i.id)):[]}_getDefaultTemplates(){const{portalTemplateIds:e}=this.viewModel;return this.includeDefaultTemplates?this.viewModel.defaultTemplates.toArray().filter(({layout:t,layoutItem:i})=>!(A(t)||i?.id&&e.includes(i.id))):[]}_getPrintServiceTemplates(){return this.includeDefaultTemplates&&this._getDefaultTemplates().length?[]:this.viewModel.printServiceTemplates.toArray().filter(({layout:e})=>!A(e))}_renderLayoutTemplates(e,t=!1,i=!1){return t&&e.sort((e,t)=>(e.label??"")>(t.label??"")?1:-1),e.map(e=>I("calcite-list-item",{description:this._getPageSizeLabel(e),key:`template-${e.id}-${e.id===this.templateOptions.id}`,label:this._getTemplateLabel(e),selected:e.id===this.templateOptions.id,title:e.description??"",value:e},I("calcite-icon",{icon:(e.layout?N.get(e.layout):null)||"custom-print",slot:"content-start"}),"loading"===e.state?I("calcite-loader",{inline:!0,key:`template-loader-${e.id}`,label:"loading",scale:"s",slot:"content-end"}):null,"error"===e?.state?I("calcite-icon",{class:F.templateSelectError,icon:"exclamation-mark-circle",key:`template-error-${e.id}`,scale:"s",slot:"content-end"}):null,i?I("calcite-action",{icon:"trash",onclick:()=>this.viewModel.removePortalTemplate(e),slot:"actions-end",text:"delete"}):null))}_renderChooseTemplateFlowItem(){if(!this._showTemplates)return null;const{messages:e}=this,t=b.test(this.portal?.url),i=this.viewModel.browseTemplates.toArray(),a=this._getPortalTemplates(),l=this._getDefaultTemplates(),o=this._getPrintServiceTemplates(),s=i.length+a.length+l.length+o.length>15,n=this.browseTemplateButtonOnClick?I("calcite-button",{appearance:"outline",class:s?F.browseTemplateButtonContainerFilter:F.browseTemplateButtonContainer,iconStart:"folder",key:"browse-template-button",onclick:this.browseTemplateButtonOnClick,slot:s?"filter-actions-end":"default"},s?null:e.browseTemplates):null;return I("calcite-flow-item",{bind:this,closable:!1,heading:e.chooseTemplate,key:"template-flow-item",selected:this._showTemplates,onCalciteFlowItemBack:e=>{e.preventDefault(),this._showTemplates=!1}},I("div",{class:F.templateSelectFlowItemContainer},I("div",{class:F.templateSelectFlowItemContent},s?null:n,I("calcite-list",{filterEnabled:s,filterProps:["label"],key:"template-list",label:e.templateList,selectionMode:"single-persist",onCalciteListChange:({currentTarget:e})=>this.viewModel.applyTemplate(e.selectedItems[0]?.value)},s?n:null,i.length?I("div",{key:"my-templates"},I("div",{class:F.templateSelectFlowItemListHeading},e.myTemplates,t?I("calcite-chip",{appearance:"outline",kind:"neutral",label:e.beta,scale:"s"},e.beta):null),this._renderLayoutTemplates(i,!0,!0)):null,a.length?I("div",{key:"org-templates"},I("div",{class:F.templateSelectFlowItemListHeading},e.organizationTemplates,t?I("calcite-chip",{appearance:"outline",kind:"neutral",label:e.beta,scale:"s"},e.beta):null),this._renderLayoutTemplates(a)):null,i.length||a.length?l.length?I("div",{key:"default-templates"},I("div",{class:F.templateSelectFlowItemListHeading},e.defaultTemplates),this._renderLayoutTemplates(l,!0)):null:this._renderLayoutTemplates(l,!0),i.length||a.length?o.length?I("div",{key:"service-templates"},I("div",{class:F.templateSelectFlowItemListHeading},e.defaultTemplates),this._renderLayoutTemplates(o)):null:this._renderLayoutTemplates(o))),I("div",{class:F.templateButtonContainer},I("calcite-button",{class:F.templateDoneButton,onclick:()=>this._showTemplates=!1},this.messagesCommon.done))))}_renderCustomTextElementSection(){const{customTextElements:e}=this.templateOptions;return e?I("div",{class:F.formSectionContainer,key:"custom-text-elements"},e.map((e,t)=>{const[i,a]=Object.entries(e)[0];return"date"===i?null:I("calcite-label",{key:`custom-text-elements-${i}-${t}`},i,I("calcite-input",{bind:this,"data-input-custom":!0,"data-input-name":i,value:a??"",onCalciteInputInput:this._updateInputValue}))})):null}_renderTitleOrFileNameSection(){const{title:e,fileName:t,titlePlaceHolder:i,fileNamePlaceHolder:a}=this.messages,l=this._selectedTab===L.layout?e:t,o=this._selectedTab===L.layout?i:a,s=this._selectedTab===L.layout?this.templateOptions.title:this.templateOptions.fileName;return I("div",{class:F.formSectionContainer,key:l},I("calcite-label",null,l,I("calcite-input",{placeholder:o,value:s??"",onCalciteInputInput:this._onInput})))}_focusOnTabChange(e){if(!this._activeTabFocusRequested)return;const t=e.getAttribute("data-tab-id");("layoutTab"===t&&this._selectedTab===L.layout||"mapOnlyTab"===t&&this._selectedTab===L.mapOnly||"exportTab"===t&&this._selectedTab===L.export)&&(e.focus(),this._activeTabFocusRequested=!1)}_renderLoader(){const e={[F.loader]:this._awaitingServerResponse};return I("div",{class:this.classes(e),key:"loader"})}_resetToCurrentScale(){this.templateOptions.scale=this.viewModel.view?.scale}_updateCustomTextElementValue(e,t,i){e.find(e=>{const[i]=Object.entries(e)[0];return i===t})[t]=i}_updateInputValue(e){const t=e.currentTarget,i=t.getAttribute("data-input-name"),a=!!t["data-input-custom"],{templateOptions:l}=this;a?this._updateCustomTextElementValue(l.customTextElements,i,t.value):l[i]=t.value}_updateNumberInputValue(e){const t=e.currentTarget,i=t.getAttribute("data-input-name"),{templateOptions:a}=this,l=Number(t.value);if(P(l))a[i]=l;else{const e=a[i];t.value=`${e}`}}_handlePrintMap(){this._pendingExportScroll=!0;const{templateOptions:e}=this,t=this._selectedTab===L.layout?e.title:e.fileName,{promise:i}=this.viewModel.export(t||this.messages.untitled);this._selectedTab=L.export,i.then(()=>this.scheduleRender())}_switchInput(){[this.templateOptions.width,this.templateOptions.height]=[this.templateOptions.height,this.templateOptions.width]}_scrollExportIntoView(){if(!this._pendingExportScroll)return;this._pendingExportScroll=!1;const e=this._rootNode;if(!e)return;const{clientHeight:t,scrollHeight:i}=e,a=i-t;a>0&&(e.scrollTop=a)}_toggleInputValue(e){const t=e.target,i=t.getAttribute("data-option-name");this.templateOptions[i]=t.checked,"scaleEnabled"===i&&this._resetToCurrentScale()}_renderExportedLinkItemPopover(e){const t=this.messages,i=e.formattedName??"",{state:a}=e,l=this.saveAsButtonCallback&&"error"!==a&&this._isFormatAllowedForSaving(e.extension);return"pending"!==a&&l?I("calcite-popover",{autoClose:!0,key:`${i}-popover`,label:"Popover",offsetDistance:1,overlayPositioning:"fixed",pointerDisabled:!0,referenceElement:`${i}-popover-button`,scale:"s"},I("calcite-list",{label:""},e.portalItem?I("calcite-list-item",{label:t.openItem,onCalciteListItemSelect:()=>{const t=e.portalItem;if(!t||!t.itemPageUrl)return;const i=document.createElement("a");i.target="_blank",i.href=t.itemPageUrl,i.rel="noreferrer",i.click()}},I("calcite-icon",{icon:"launch2",key:`${i}-launch-icon`,scale:"s",slot:"content-start"})):I("calcite-list-item",{label:t.saveAs,onCalciteListItemSelect:async()=>{this.saveAsButtonCallback&&(s(()=>e.portalItem).then(e=>{e.itemPageUrl&&this.scheduleRender()}),await this.saveAsButtonCallback(e))}},I("calcite-icon",{icon:"save",key:`${i}-save-icon`,scale:"s",slot:"content-start"})),I("calcite-list-item",{label:this.messagesCommon.delete,onCalciteListItemSelect:()=>this.exportedLinks.remove(e)},I("calcite-icon",{icon:"trash",key:`${i}-delete-icon`,scale:"s",slot:"content-start"})))):null}_renderExportedLinkItemContent(e,t){const i=this.messages,{url:a,state:l}=e,o=e.formattedName??"";let s=a||null;s&&(s=r(s));const n=c(s,location.href);return I("div",{class:F.exportedFile,"data-item":e,onclick:this._handleLinkClick,slot:"content"},I("div",null,I("div",{class:F.exportedFileLinkTitle},o),I("div",{class:F.exportedFileLinkDescription},"pending"===l?i.generatingExport:t||(n?i.ready:i.linkReady))),"ready"===l?I("calcite-icon",{"aria-label":`${o}. ${i.linkReady}`,icon:n?"download-to":"launch",key:`${o}-end-icon`,scale:"s",slot:"content-end"}):null)}_renderExportedLinkItemIcon(e){const t=e.formattedName??"";return"pending"===e.state?I("calcite-loader",{class:F.exportedFileLoader,inline:!0,key:`${t}-loader`,label:this.messages.generatingExport,scale:"m",slot:"content-start"}):I("calcite-icon",{icon:R(e),key:`${t}-start-icon`,scale:"s",slot:"content-start"})}_renderExportedLinkItemAction(e,t){const{state:i}=e,a=e.formattedName??"",l=this.saveAsButtonCallback&&"error"!==i&&this._isFormatAllowedForSaving(e.extension);return"pending"!==i?I("calcite-action",{"aria-label":`${t}`,icon:l?"ellipsis":"x",id:l?`${a}-popover-button`:void 0,key:l?`${a}-saveAs-action`:`${a}-action`,onclick:l?void 0:()=>{this.exportedLinks.remove(e)},slot:"actions-end",text:`${t}`}):null}_renderExportedLinkItem(e){const t=this.messages,{error:i,state:a}=e,l=e.formattedName??"";let o;switch(a){case"pending":o=t.pending;break;case"ready":o=t.ready;break;case"error":o=t.errorMessage}const s="error"===a?"print-task:cim-symbol-unsupported"===i?.name?t.exportWebMapCIMError:t.exportWebMapError:"";return I(O,null,I("calcite-list-item",{"aria-label":o,key:l,title:s},this._renderExportedLinkItemContent(e,s),this._renderExportedLinkItemIcon(e),this._renderExportedLinkItemAction(e,s)),this._renderExportedLinkItemPopover(e))}_renderExportedLinkItems(e){return I("calcite-list",{filterEnabled:e?.length>10,label:this.messages.exportedLinksList},e.map(this._renderExportedLinkItem.bind(this)))}_isFormatAllowedForSaving(e){return!this.allowedFormatsForSaving||"all"===this.allowedFormatsForSaving||!(!e||!this.allowedFormatsForSaving.includes(e))}_toggleLayoutPanel(e){const t=e.target;this._toggleTab(t.getAttribute("data-tab-id"))}_toggleTab(e,t=!0){if(this._selectedTab=e,this._selectedTab===L.mapOnly)this.viewModel.applyTemplate(E);else if(this._selectedTab===L.layout){const e=this._selectedTemplate??this.viewModel.defaultTemplate;this.viewModel.applyTemplate(e)}t&&(this._activeTabFocusRequested=!0)}_handleLayoutPanelKeyDown(e){const{key:t}=e,i=e.target.getAttribute("data-tab-id");if(C(t))return this._toggleTab(i),e.preventDefault(),void e.stopPropagation();if("ArrowLeft"===t||"ArrowRight"===t){switch(i){case L.layout:this._toggleTab("ArrowLeft"===t?L.export:L.mapOnly);break;case L.mapOnly:this._toggleTab("ArrowLeft"===t?L.layout:L.export);break;case L.export:this._toggleTab("ArrowLeft"===t?L.mapOnly:L.layout)}e.preventDefault(),e.stopPropagation()}}};e([p()],j.prototype,"_showTemplates",void 0),e([p()],j.prototype,"_isValidSpatialReference",void 0),e([p()],j.prototype,"allowedFormats",null),e([p()],j.prototype,"allowedFormatsForSaving",void 0),e([p()],j.prototype,"allowedLayouts",null),e([p()],j.prototype,"browseTemplateButtonOnClick",void 0),e([p()],j.prototype,"error",null),e([p()],j.prototype,"exportedLinks",null),e([p()],j.prototype,"extraParameters",null),e([p()],j.prototype,"headerVisible",void 0),e([p()],j.prototype,"headingLevel",void 0),e([p()],j.prototype,"icon",null),e([p()],j.prototype,"includeDefaultTemplates",null),e([p()],j.prototype,"includeOrganizationTemplates",void 0),e([p()],j.prototype,"label",null),e([p(),S("esri/widgets/Print/t9n/Print")],j.prototype,"messages",void 0),e([p(),S("esri/t9n/common")],j.prototype,"messagesCommon",void 0),e([p(),S("esri/core/t9n/Units")],j.prototype,"messagesUnits",void 0),e([p({type:u})],j.prototype,"outSpatialReference",null),e([p()],j.prototype,"portal",null),e([p()],j.prototype,"saveExportEnabled",null),e([p()],j.prototype,"saveExportHidden",void 0),e([p()],j.prototype,"showPrintAreaEnabled",null),e([p()],j.prototype,"printServiceUrl",null),e([p()],j.prototype,"saveAsButtonCallback",void 0),e([p()],j.prototype,"templateCustomTextElements",null),e([p()],j.prototype,"templateOptions",null),e([p()],j.prototype,"view",null),e([p({type:y})],j.prototype,"viewModel",void 0),j=e([m("esri.widgets.Print")],j);const V=j;export{V as default};
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import"../intl.js";import{deprecateWidget as t}from"../core/deprecate.js";import{JSONMap as i}from"../core/jsonMap.js";import a from"../core/Logger.js";import{watch as l,on as o,whenOnce as n}from"../core/reactiveUtils.js";import{unitName as s}from"../core/unitFormatUtils.js";import{addProxy as r,hasSameOrigin as c}from"../core/urlUtils.js";import{property as p}from"../core/accessorSupport/decorators/property.js";import{ensureInteger as d}from"../core/accessorSupport/ensureType.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as m}from"../core/accessorSupport/decorators/subclass.js";import u from"../geometry/SpatialReference.js";import{isValid as h}from"../geometry/support/spatialReferenceUtils.js";import{reArcGISOnlineDomain as b}from"../portal/support/urlUtils.js";import{findToken as _}from"../rest/utils.js";import{formatJsonMap as v}from"../rest/support/fileFormat.js";import g from"./Widget.js";import y from"./Print/PrintViewModel.js";import{loadCalciteComponents as f}from"./support/componentsUtils.js";import{globalCss as w}from"./support/globalCss.js";import{Heading as T}from"./support/Heading.js";import{legacyIcon as x}from"./support/legacyIcon.js";import{isRTL as k,isActivationKey as C}from"./support/widgetUtils.js";import{messageBundle as S}from"./support/decorators/messageBundle.js";import{tsx as I,tsxFragment as O}from"./support/jsxFactory.js";import{formatNumber as $}from"../intl/number.js";const E="map-only";var L;!function(e){e.layout="layoutTab",e.mapOnly="mapOnlyTab",e.export="exportTab"}(L||(L={}));const M="esri-print",F={base:M,headerTitle:`${M}__header-title`,layoutTabList:`${M}__layout-tab-list`,layoutTab:`${M}__layout-tab`,layoutSection:`${M}__layout-section`,mapOnlySection:`${M}__map-only-section`,panelItemsCentered:`${M}__panel-items--centered`,loader:`${M}__loader`,swapButton:`${M}__swap-button`,printButton:`${M}__export-button`,printButtonSection:`${M}__export-button-section`,printButtonSectionDivider:`${M}__export-button-section--divider`,templateSelectContainer:`${M}__template-select-container`,templateSelectIcon:`${M}__template-select-icon`,templateSelectError:`${M}__template-select-error`,templateSelectArrow:`${M}__template-select-arrow`,formSectionContainer:`${M}__form-section-container`,advancedOptionsSection:`${M}__advanced-options-section`,advancedOptionsContainer:`${M}__advanced-options-container`,browseTemplateButtonContainer:`${M}__browse-template-button-container`,browseTemplateButtonContainerFilter:`${M}__browse-template-button-container-filter`,exportedFilesContainer:`${M}__export-panel-container`,exportedFilesTitle:`${M}__export-title`,exportedFile:`${M}__exported-file`,exportedFileLinkTitle:`${M}__exported-file-link-title`,exportedFileLinkDescription:`${M}__exported-file-link-description`,exportedFilesEmpty:`${M}__exported-files-empty`,printWidgetContainer:`${M}__container`,content:`${M}__content`,panelContainer:`${M}__panel-container`,scaleInfoContainer:`${M}__scale-info-container`,scaleInputContainer:`${M}__scale-input-container`,scaleInput:`${M}__scale-input`,sizeContainer:`${M}__size-container`,panelError:`${M}__panel--error`,exportedFileLoader:`${M}__exported-file--loader`,exportSection:`${M}__export-section`,exportSectionCentered:`${M}__export-section--centered`,templateButtonContainer:`${M}__template-button-container`,templateDoneButton:`${M}__template-done-button`,templateSelectFlowItemContainer:`${M}__template-select-flow-item-container`,templateSelectFlowItemContent:`${M}__template-select-flow-item-content`,templateSelectFlowItemListHeading:`${M}__template-select-flow-item-list-heading`,srLabel:`${M}__sr-label`,invalidWkidText:`${M}__invalid-wkid-text`};function P(e){return!isNaN(e)&&e>0&&Number.isFinite(e)}function A(e){return e?.toLowerCase()===E}function R(e){const{state:t,extension:i}=e;switch(t){case"pending":return"spinner";case"error":return"exclamation-mark-circle";default:return i?.toLowerCase()?.includes("pdf")?"file-pdf":"file"}}const B=new i({inch:"inches",foot:"feet",yard:"yards",mile:"miles","nautical-mile":"nautical-miles",millimeter:"millimeters",centimeter:"centimeters",decimeter:"decimeters",meter:"meters",kilometer:"kilometers"}),N=new Map([["a3-landscape","a3-landscape"],["a3-portrait","a3-portrait"],["a4-landscape","a4-landscape"],["a4-portrait","a4-portrait"],["letter-ansi-a-landscape","ansi-a-landscape"],["letter-ansi-a-portrait","ansi-a-portrait"],["tabloid-ansi-b-landscape","ansi-b-landscape"],["tabloid-ansi-b-portrait","ansi-b-portrait"]]);let j=class extends g{constructor(e,i){super(e,i),this._activeTabFocusRequested=!1,this._awaitingServerResponse=!1,this._selectedTab=L.layout,this._pendingExportScroll=!1,this._rootNode=null,this._selectedTemplate=null,this._formats=[],this._showTemplates=!1,this._isValidSpatialReference=!0,this.allowedFormatsForSaving=null,this.browseTemplateButtonOnClick=null,this.headerVisible=!0,this.headingLevel=3,this.includeOrganizationTemplates=!0,this.messagesCommon=null,this.messagesUnits=null,this.saveExportHidden=!0,this.saveAsButtonCallback=null,this.viewModel=new y,this._onInput=e=>{this._selectedTab===L.layout?this.templateOptions.title=e.currentTarget.value:this._selectedTab===L.mapOnly&&(this.templateOptions.fileName=e.currentTarget.value)},this._handleLinkClick=e=>{const t=e.currentTarget["data-item"];if(!t||"ready"!==t.state||!t.url)return;const i=_(this.viewModel.effectivePrintServiceUrl),a=t.url,l=document.createElement("a");if(l.target="_blank",l.href=a,l.rel="noreferrer",l.download=t.formattedName??"",!i)return l.click(),void e.stopPropagation();e.preventDefault();const o=new URL(a);o.searchParams.set("token",i),l.href=o.href,l.click(),l.href=a},t(a.getLogger(this),"Print","arcgis-print",{version:"4.33"}),this._focusOnTabChange=this._focusOnTabChange.bind(this)}initialize(){this.addHandles([l(()=>[this.templateOptions.format,this.viewModel.templatesInfo?.format],()=>{const{templatesInfo:e}=this.viewModel;if(!e)return;if(this._formats.length!==e.format.choiceList.length){const t=v.apiValues;this._formats=e.format.choiceList.map(e=>{const i=t.find(t=>new RegExp(`\\b${t}\\b`,"i").test(e))??e;return{value:i,label:e===i?e.toUpperCase():e}}).sort((e,t)=>e.label.localeCompare(t.label))}const t=this._formats.some(({value:e})=>new RegExp(`\\b${e}\\b`,"i").test(this.templateOptions.format));if(e.format.defaultValue&&!t){const t=this._formats.find(({value:t})=>new RegExp(`\\b${t}\\b`,"i").test(e.format.defaultValue))?.value;return void(t&&(this.templateOptions.format=t))}}),l(()=>[this.templateOptions.id,this.viewModel.loaded],async()=>{const{layout:e}=this.templateOptions;this._selectedTab=A(e)?L.mapOnly:L.layout,this._selectedTab===L.layout&&this.viewModel.loaded&&(this._selectedTemplate=this.viewModel.getLayoutTemplateById(this.templateOptions.id))}),l(()=>this.templateOptions.dpi,e=>{e<=0&&(this.templateOptions.dpi=1)}),l(()=>this.viewModel.view?.scale,e=>{!e||this.templateOptions.scaleEnabled&&this.templateOptions.scale||(this.templateOptions.scale=e)}),o(()=>this.viewModel,"submit",e=>this.emit("submit",e)),o(()=>this.viewModel,"complete",e=>this.emit("complete",e))]);const{height:e,width:t}=this.templateOptions;this.templateOptions.width=t||800,this.templateOptions.height=e||1100;const i=setTimeout(()=>{this._awaitingServerResponse=!0,this.scheduleRender()},500);this.viewModel.load().then(()=>{clearTimeout(i),this._awaitingServerResponse=!1})}loadDependencies(){return f({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),block:()=>import("@esri/calcite-components/dist/components/calcite-block"),button:()=>import("@esri/calcite-components/dist/components/calcite-button"),checkbox:()=>import("@esri/calcite-components/dist/components/calcite-checkbox"),combobox:()=>import("@esri/calcite-components/dist/components/calcite-combobox"),"combobox-item":()=>import("@esri/calcite-components/dist/components/calcite-combobox-item"),flow:()=>import("@esri/calcite-components/dist/components/calcite-flow"),"flow-item":()=>import("@esri/calcite-components/dist/components/calcite-flow-item"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),input:()=>import("@esri/calcite-components/dist/components/calcite-input"),"input-number":()=>import("@esri/calcite-components/dist/components/calcite-input-number"),label:()=>import("@esri/calcite-components/dist/components/calcite-label"),list:()=>import("@esri/calcite-components/dist/components/calcite-list"),"list-item":()=>import("@esri/calcite-components/dist/components/calcite-list-item"),loader:()=>import("@esri/calcite-components/dist/components/calcite-loader"),switch:()=>import("@esri/calcite-components/dist/components/calcite-switch"),chip:()=>import("@esri/calcite-components/dist/components/calcite-chip"),popover:()=>import("@esri/calcite-components/dist/components/calcite-popover"),link:()=>import("@esri/calcite-components/dist/components/calcite-link")})}destroy(){this.viewModel.destroy()}get allowedFormats(){return this.viewModel.allowedFormats}set allowedFormats(e){this.viewModel.allowedFormats=e}get allowedLayouts(){return this.viewModel.allowedLayouts}set allowedLayouts(e){this.viewModel.allowedLayouts=e}get error(){return this.viewModel.error}get exportedLinks(){return this.viewModel.exportedLinks}set exportedLinks(e){this.viewModel.exportedLinks=e}get extraParameters(){return this.viewModel.extraParameters}set extraParameters(e){this.viewModel.extraParameters=e}get icon(){return"print"}set icon(e){this._overrideIfSome("icon",e)}get includeDefaultTemplates(){return this.viewModel.includeDefaultTemplates}set includeDefaultTemplates(e){this.viewModel.includeDefaultTemplates=e}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get outSpatialReference(){return this.viewModel.outSpatialReference}set outSpatialReference(e){this.viewModel.outSpatialReference=e}get portal(){return this.viewModel.portal}set portal(e){this.viewModel.portal=e}get saveExportEnabled(){return this.viewModel.saveExportEnabled}set saveExportEnabled(e){this.viewModel.saveExportEnabled=e}get showPrintAreaEnabled(){return this.viewModel.showPrintAreaEnabled}set showPrintAreaEnabled(e){this.viewModel.showPrintAreaEnabled=e}get printServiceUrl(){return this.viewModel.printServiceUrl}set printServiceUrl(e){this.viewModel.printServiceUrl=e}get templateCustomTextElements(){return this.viewModel.templateCustomTextElements}set templateCustomTextElements(e){this.viewModel.templateCustomTextElements=e}get templateOptions(){return this.viewModel.templateOptions}set templateOptions(e){this.viewModel.templateOptions=e}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}render(){const{messages:e,templateOptions:t,viewModel:i,view:a}=this,{attributionEnabled:l,author:o,copyright:n,dpi:s,format:r,height:c,layout:p,layoutItem:m,legendEnabled:b,northArrowEnabled:_,scaleBarEnabled:v,scaleEnabled:g,scale:y,width:f}=t,C="ready"!==i.state||this._awaitingServerResponse||!(p||m),S=this._renderTitleOrFileNameSection(),O=I("div",{class:F.formSectionContainer},I("calcite-label",null,e.fileFormatTitle,I("calcite-combobox",{clearDisabled:!0,label:e.formatDefaultOption,maxItems:6,placeholder:e.formatDefaultOption,selectionMode:"single-persist",onCalciteComboboxChange:({currentTarget:e})=>{this.templateOptions.format=e.selectedItems[0]?.value??"pdf"}},this._formats.map(({value:e,label:t},i)=>I("calcite-combobox-item",{key:`file-format-${i}`,selected:e===this.templateOptions.format,textLabel:t,value:e}))))),$=I("calcite-label",{layout:"inline"},I("calcite-switch",{checked:this.showPrintAreaEnabled,onCalciteSwitchChange:e=>{this.showPrintAreaEnabled=!!e.currentTarget.checked}}),e.printPreview),E=I("div",null,I("div",{class:F.formSectionContainer},I("calcite-label",null,e.template,I("calcite-block",{class:F.templateSelectContainer,collapsible:!1,description:this._getPageSizeLabel(this._selectedTemplate),heading:this._getTemplateLabel(this._selectedTemplate,!0),key:"template-select-block",loading:"loading"===this._selectedTemplate?.state,onclick:()=>this._showTemplates=!0,onkeydown:e=>{"Enter"!==e.key&&" "!==e.key||(this._showTemplates=!0)},tabIndex:0},I("calcite-icon",{class:F.templateSelectIcon,icon:(this._selectedTemplate?.layout?N.get(this._selectedTemplate.layout):null)||"custom-print",key:"template-select-icon",scale:"l",slot:"content-start"}),"error"===this._selectedTemplate?.state?I("calcite-icon",{class:F.templateSelectError,icon:"exclamation-mark-circle",key:"template-select-error",scale:"s",slot:"actions-end"}):null,I("calcite-icon",{class:F.templateSelectArrow,icon:k()?"chevron-left":"chevron-right",key:"template-select-arrow",scale:"s",slot:"actions-end"})))),$),M=I("div",{class:F.formSectionContainer},I("calcite-label",null,e.dpi,I("calcite-input-number",{bind:this,"data-input-name":"dpi",min:1,value:`${s}`,onCalciteInputNumberInput:this._updateNumberInputValue}))),P=I("div",{class:F.formSectionContainer},I("calcite-label",null,I("div",{class:F.srLabel},e.outSpatialReference,I("calcite-link",{href:"https://developers.arcgis.com/rest/services-reference/enterprise/using-spatial-references/",target:"_blank"},"(WKID)")),I("calcite-input-number",{bind:this,"data-input-name":"outSpatialReference",integer:!0,numberButtonType:"none",value:i.outSpatialReference?.wkid?.toString()??"",onCalciteInputNumberInput:({currentTarget:e})=>{const t=d(e.value);i.outSpatialReference=Number.isNaN(t)||null==t?null:new u({wkid:t}),this._isValidSpatialReference=!i.outSpatialReference||h(i.outSpatialReference)}}),this._isValidSpatialReference?null:I("div",{class:F.invalidWkidText,key:`out-sr-${i.outSpatialReference?.wkid}`},e.invalidWkid))),A=I("div",{class:this.classes(F.scaleInfoContainer,F.formSectionContainer)},I("calcite-label",{layout:"inline"},I("calcite-checkbox",{bind:this,checked:g,"data-option-name":"scaleEnabled",onCalciteCheckboxChange:this._toggleInputValue}),e.scale),I("div",{class:F.scaleInputContainer},I("calcite-input-number",{"aria-label":e.scaleLabel,"aria-valuenow":`${y}`,bind:this,class:F.scaleInput,"data-input-name":"scale",disabled:!g,value:`${y}`,onCalciteInputNumberInput:this._updateNumberInputValue}),I("calcite-button",{appearance:"outline","aria-label":e.reset,bind:this,disabled:!g,iconStart:"refresh",kind:"neutral",onclick:this._resetToCurrentScale}))),R=I("div",{"aria-labelledby":`${this.id}__advancedOptionsForLayout`,class:F.advancedOptionsContainer,key:"advanced-section-for-layout"},A,this._selectedTemplate?.layoutTemplateInfo?.layoutOptions?.hasAuthorText??1?I("div",{class:F.formSectionContainer,key:"author-info"},I("calcite-label",null,e.author,I("calcite-input",{bind:this,"data-input-name":"author",value:o??"",onCalciteInputInput:this._updateInputValue}))):null,this._selectedTemplate?.layoutTemplateInfo?.layoutOptions?.hasCopyrightText??1?I("div",{class:F.formSectionContainer,key:"copyright-text"},I("calcite-label",null,e.copyright,I("calcite-input",{bind:this,"data-input-name":"copyright",value:n??"",onCalciteInputInput:this._updateInputValue}))):null,M,P,this._renderCustomTextElementSection(),this._selectedTemplate?.layoutTemplateInfo?.layoutOptions?.hasLegend??1?I("div",{class:F.formSectionContainer,key:"legend-info"},I("calcite-label",{layout:"inline"},I("calcite-checkbox",{bind:this,checked:!!b,"data-option-name":"legendEnabled",onCalciteCheckboxChange:this._toggleInputValue}),e.legend)):null,this._selectedTemplate?.mapSurroundInfoOptions?.northArrow.length?I("div",{class:F.formSectionContainer,key:"north-arrow"},I("calcite-label",{layout:"inline"},I("calcite-checkbox",{bind:this,checked:!!_,"data-option-name":"northArrowEnabled",onCalciteCheckboxChange:this._toggleInputValue}),e.northArrow)):null,this._selectedTemplate?.mapSurroundInfoOptions?.scaleBar.length?I("div",{class:F.formSectionContainer,key:"scale-bar"},I("calcite-label",{layout:"inline"},I("calcite-checkbox",{bind:this,checked:!!v,"data-option-name":"scaleBarEnabled",onCalciteCheckboxChange:this._toggleInputValue}),e.scaleBar)):null),B=I("div",{"aria-labelledby":`${this.id}__advancedOptionsForMapOnly`,class:F.advancedOptionsContainer},A,M,P,I("div",{class:F.formSectionContainer},I("calcite-label",{layout:"inline"},I("calcite-checkbox",{bind:this,checked:l,"data-option-name":"attributionEnabled",onCalciteCheckboxChange:this._toggleInputValue}),e.attribution)),this._renderCustomTextElementSection()),j=this.exportedLinks.toArray(),V=this._renderExportedLinkItems(j),D={[F.exportSectionCentered]:!j.length},U=this._selectedTab===L.layout?I("section",{"aria-labelledby":`${this.id}__layoutTab`,class:F.layoutSection,id:`${this.id}__layoutContent`,key:"esri-print__layoutContent",role:"tabpanel"},I("div",{class:F.panelContainer},this._selectedTemplate?.layoutTemplateInfo?.layoutOptions?.hasTitleText??1?S:null,E,this._selectedTab===L.layout?O:null,I("calcite-block",{"aria-label":e.advancedOptions,class:this.classes(F.panelContainer,F.advancedOptionsSection),collapsible:!0,disabled:!(p||m?.id),heading:e.advancedOptions,id:"advancedOptionsForLayout",key:"advanced-options-for-layout"},R))):this._selectedTab===L.mapOnly?I("section",{"aria-labelledby":`${this.id}__mapOnlyTab`,class:F.mapOnlySection,id:`${this.id}__mapOnlyContent`,key:"esri-print__mapOnlyContent",role:"tabpanel"},I("div",{class:F.panelContainer},S,O,I("div",null,I("div",{class:this.classes(F.sizeContainer,F.formSectionContainer)},I("calcite-label",null,e.width,I("calcite-input-number",{bind:this,"data-input-name":"width",value:`${f}`,onCalciteInputNumberInput:this._updateNumberInputValue})),I("calcite-label",null,e.height,I("calcite-input-number",{bind:this,"data-input-name":"height",value:`${c}`,onCalciteInputNumberInput:this._updateNumberInputValue})),I("button",{"aria-label":e.swap,bind:this,class:this.classes(w.widgetButton,F.swapButton,x.swap),onclick:this._switchInput,type:"button"})),$),I("calcite-block",{"aria-label":e.advancedOptions,class:this.classes(F.panelContainer,F.advancedOptionsSection),collapsible:!0,heading:e.advancedOptions,id:"advancedOptionsForMapOnly",key:"advanced-options-for-map-only"},B))):I("section",{"aria-labelledby":`${this.id}__exportTab`,class:this.classes(F.exportSection,D),id:`${this.id}__exportContent`,key:"esri-print__exportContent",role:"tabpanel"},I("div",{class:F.panelContainer},I("div",{afterUpdate:this._scrollExportIntoView,bind:this,class:F.exportedFilesContainer},0===j.length?I("div",{class:F.exportedFilesEmpty},I("calcite-icon",{icon:"file",scale:"l"}),I("div",null,I(T,{class:F.exportedFilesTitle,level:this.headingLevel},e.noExportedFiles),I("div",null,e.exportHint))):V))),H="2d"!==a?.type,z=I("div",{class:F.panelError},a?H?e.sceneViewError:e.serviceError:e.noViewError),W=j.some(({state:e})=>"pending"===e),q=I("div",{class:F.content,key:"panel"},I("div",null,I("ul",{bind:this,class:F.layoutTabList,onclick:this._toggleLayoutPanel,onkeydown:this._handleLayoutPanelKeyDown,role:"tablist"},I("li",{afterCreate:this._focusOnTabChange,afterUpdate:this._focusOnTabChange,"aria-selected":`${this._selectedTab===L.layout}`,class:F.layoutTab,"data-tab-id":L.layout,id:`${this.id}__layoutTab`,role:"tab",tabIndex:0},e.layoutTab),I("li",{afterCreate:this._focusOnTabChange,afterUpdate:this._focusOnTabChange,"aria-selected":`${this._selectedTab===L.mapOnly}`,class:F.layoutTab,"data-tab-id":L.mapOnly,id:`${this.id}__mapOnlyTab`,role:"tab",tabIndex:0},e.mapOnlyTab),I("li",{afterCreate:this._focusOnTabChange,afterUpdate:this._focusOnTabChange,"aria-selected":`${this._selectedTab===L.export}`,class:F.layoutTab,"data-tab-id":L.export,id:`${this.id}__exportedFilesTab`,role:"tab",tabIndex:0},W?I("calcite-loader",{inline:!0,label:"loading",scale:"s"}):null,e.exportsTab)),U),this._selectedTab!==L.export?I("div",{class:this.classes(F.printButtonSection,!this.saveExportHidden&&this.portal?F.printButtonSectionDivider:null),key:"export-button-section"},!this.saveExportHidden&&this.portal?I("calcite-label",{layout:"inline"},I("calcite-checkbox",{bind:this,checked:this.saveExportEnabled,onCalciteCheckboxChange:e=>{this.saveExportEnabled=!!e.currentTarget.checked}}),e.saveExportToMyContent):null,I("calcite-button",{"aria-label":e.exportDescription,bind:this,class:this.classes(F.printButton),disabled:C||!(p||m?.id)&&!r,onclick:this._handlePrintMap,scale:"l",width:"full"},e.export)):null),K=I("calcite-flow",{key:"root-flow"},I("calcite-flow-item",{bind:this,key:"root-flow-item",selected:!this._showTemplates},I("div",{class:F.printWidgetContainer},this.headerVisible?I("header",{class:F.headerTitle},e.export):null,this.error||H||!a?z:q)),this._renderChooseTemplateFlowItem()),G="initializing"===i.state,J=G?this._renderLoader():K,Q={[F.panelItemsCentered]:G};return I("div",{bind:this,class:this.classes(F.base,w.widget,w.panel,Q)},J)}_getPageSizeLabel(e){if(!e)return;const t=e.layoutTemplateInfo;if(!t)return;const i=B.fromJSON(t.pageUnits.toLowerCase());return`${$(t.pageSize[0])} × ${$(t.pageSize[1])} ${s(this.messagesUnits,i,"abbr")}`}_getTemplateLabel(e,t=!1){if(!e)return t?this.messages.selectTemplate:this.messages.untitled;const{label:i,layout:a,layoutItem:l,type:o}=e;if("print-service-template"===o&&this.messages[a])return this.messages[a];const n=i??a??l?.id;return n?.replaceAll("_"," ")??this.messages.untitled}_getPortalTemplates(){const{portalTemplateIds:e}=this.viewModel;return this.includeDefaultTemplates&&this.includeOrganizationTemplates?this.viewModel.defaultTemplates.toArray().filter(({layout:t,layoutItem:i})=>!A(t)&&!!i?.id&&e.includes(i.id)):[]}_getDefaultTemplates(){const{portalTemplateIds:e}=this.viewModel;return this.includeDefaultTemplates?this.viewModel.defaultTemplates.toArray().filter(({layout:t,layoutItem:i})=>!(A(t)||i?.id&&e.includes(i.id))):[]}_getPrintServiceTemplates(){return this.includeDefaultTemplates&&this._getDefaultTemplates().length?[]:this.viewModel.printServiceTemplates.toArray().filter(({layout:e})=>!A(e))}_renderLayoutTemplates(e,t=!1,i=!1){return t&&e.sort((e,t)=>(e.label??"")>(t.label??"")?1:-1),e.map(e=>I("calcite-list-item",{description:this._getPageSizeLabel(e),key:`template-${e.id}-${e.id===this.templateOptions.id}`,label:this._getTemplateLabel(e),selected:e.id===this.templateOptions.id,title:e.description??"",value:e},I("calcite-icon",{icon:(e.layout?N.get(e.layout):null)||"custom-print",slot:"content-start"}),"loading"===e.state?I("calcite-loader",{inline:!0,key:`template-loader-${e.id}`,label:"loading",scale:"s",slot:"content-end"}):null,"error"===e?.state?I("calcite-icon",{class:F.templateSelectError,icon:"exclamation-mark-circle",key:`template-error-${e.id}`,scale:"s",slot:"content-end"}):null,i?I("calcite-action",{icon:"trash",onclick:()=>this.viewModel.removePortalTemplate(e),slot:"actions-end",text:"delete"}):null))}_renderChooseTemplateFlowItem(){if(!this._showTemplates)return null;const{messages:e}=this,t=b.test(this.portal?.url),i=this.viewModel.browseTemplates.toArray(),a=this._getPortalTemplates(),l=this._getDefaultTemplates(),o=this._getPrintServiceTemplates(),n=i.length+a.length+l.length+o.length>15,s=this.browseTemplateButtonOnClick?I("calcite-button",{appearance:"outline",class:n?F.browseTemplateButtonContainerFilter:F.browseTemplateButtonContainer,iconStart:"folder",key:"browse-template-button",onclick:this.browseTemplateButtonOnClick,slot:n?"filter-actions-end":"default"},n?null:e.browseTemplates):null;return I("calcite-flow-item",{bind:this,closable:!1,heading:e.chooseTemplate,key:"template-flow-item",selected:this._showTemplates,onCalciteFlowItemBack:e=>{e.preventDefault(),this._showTemplates=!1}},I("div",{class:F.templateSelectFlowItemContainer},I("div",{class:F.templateSelectFlowItemContent},n?null:s,I("calcite-list",{filterEnabled:n,filterProps:["label"],key:"template-list",label:e.templateList,selectionMode:"single-persist",onCalciteListChange:({currentTarget:e})=>this.viewModel.applyTemplate(e.selectedItems[0]?.value)},n?s:null,i.length?I("div",{key:"my-templates"},I("div",{class:F.templateSelectFlowItemListHeading},e.myTemplates,t?I("calcite-chip",{appearance:"outline",kind:"neutral",label:e.beta,scale:"s"},e.beta):null),this._renderLayoutTemplates(i,!0,!0)):null,a.length?I("div",{key:"org-templates"},I("div",{class:F.templateSelectFlowItemListHeading},e.organizationTemplates,t?I("calcite-chip",{appearance:"outline",kind:"neutral",label:e.beta,scale:"s"},e.beta):null),this._renderLayoutTemplates(a)):null,i.length||a.length?l.length?I("div",{key:"default-templates"},I("div",{class:F.templateSelectFlowItemListHeading},e.defaultTemplates),this._renderLayoutTemplates(l,!0)):null:this._renderLayoutTemplates(l,!0),i.length||a.length?o.length?I("div",{key:"service-templates"},I("div",{class:F.templateSelectFlowItemListHeading},e.defaultTemplates),this._renderLayoutTemplates(o)):null:this._renderLayoutTemplates(o))),I("div",{class:F.templateButtonContainer},I("calcite-button",{class:F.templateDoneButton,onclick:()=>this._showTemplates=!1},this.messagesCommon.done))))}_renderCustomTextElementSection(){const{customTextElements:e}=this.templateOptions;return e?I("div",{class:F.formSectionContainer,key:"custom-text-elements"},e.map((e,t)=>{const[i,a]=Object.entries(e)[0];return"date"===i?null:I("calcite-label",{key:`custom-text-elements-${i}-${t}`},i,I("calcite-input",{bind:this,"data-input-custom":!0,"data-input-name":i,value:a??"",onCalciteInputInput:this._updateInputValue}))})):null}_renderTitleOrFileNameSection(){const{title:e,fileName:t,titlePlaceHolder:i,fileNamePlaceHolder:a}=this.messages,l=this._selectedTab===L.layout?e:t,o=this._selectedTab===L.layout?i:a,n=this._selectedTab===L.layout?this.templateOptions.title:this.templateOptions.fileName;return I("div",{class:F.formSectionContainer,key:l},I("calcite-label",null,l,I("calcite-input",{placeholder:o,value:n??"",onCalciteInputInput:this._onInput})))}_focusOnTabChange(e){if(!this._activeTabFocusRequested)return;const t=e.getAttribute("data-tab-id");("layoutTab"===t&&this._selectedTab===L.layout||"mapOnlyTab"===t&&this._selectedTab===L.mapOnly||"exportTab"===t&&this._selectedTab===L.export)&&(e.focus(),this._activeTabFocusRequested=!1)}_renderLoader(){const e={[F.loader]:this._awaitingServerResponse};return I("div",{class:this.classes(e),key:"loader"})}_resetToCurrentScale(){this.templateOptions.scale=this.viewModel.view?.scale}_updateCustomTextElementValue(e,t,i){e.find(e=>{const[i]=Object.entries(e)[0];return i===t})[t]=i}_updateInputValue(e){const t=e.currentTarget,i=t.getAttribute("data-input-name"),a=!!t["data-input-custom"],{templateOptions:l}=this;a?this._updateCustomTextElementValue(l.customTextElements,i,t.value):l[i]=t.value}_updateNumberInputValue(e){const t=e.currentTarget,i=t.getAttribute("data-input-name"),{templateOptions:a}=this,l=Number(t.value);if(!P(l)){const e=a[i];return void(t.value=`${e}`)}a[i]=l}_handlePrintMap(){this._pendingExportScroll=!0;const{templateOptions:e}=this,t=this._selectedTab===L.layout?e.title:e.fileName,{promise:i}=this.viewModel.export(t||this.messages.untitled);this._selectedTab=L.export,i.then(()=>this.scheduleRender())}_switchInput(){[this.templateOptions.width,this.templateOptions.height]=[this.templateOptions.height,this.templateOptions.width]}_scrollExportIntoView(){if(!this._pendingExportScroll)return;this._pendingExportScroll=!1;const e=this._rootNode;if(!e)return;const{clientHeight:t,scrollHeight:i}=e,a=i-t;a>0&&(e.scrollTop=a)}_toggleInputValue(e){const t=e.target,i=t.getAttribute("data-option-name");this.templateOptions[i]=t.checked,"scaleEnabled"===i&&this._resetToCurrentScale()}_renderExportedLinkItemPopover(e){const t=this.messages,i=e.formattedName??"",{state:a}=e,l=this.saveAsButtonCallback&&"error"!==a&&this._isFormatAllowedForSaving(e.extension);return"pending"!==a&&l?I("calcite-popover",{autoClose:!0,key:`${i}-popover`,label:"Popover",offsetDistance:1,overlayPositioning:"fixed",pointerDisabled:!0,referenceElement:`${i}-popover-button`,scale:"s"},I("calcite-list",{label:""},e.portalItem?I("calcite-list-item",{label:t.openItem,onCalciteListItemSelect:()=>{const t=e.portalItem;if(!t||!t.itemPageUrl)return;const i=document.createElement("a");i.target="_blank",i.href=t.itemPageUrl,i.rel="noreferrer",i.click()}},I("calcite-icon",{icon:"launch2",key:`${i}-launch-icon`,scale:"s",slot:"content-start"})):I("calcite-list-item",{label:t.saveAs,onCalciteListItemSelect:async()=>{this.saveAsButtonCallback&&(n(()=>e.portalItem).then(e=>{e.itemPageUrl&&this.scheduleRender()}),await this.saveAsButtonCallback(e))}},I("calcite-icon",{icon:"save",key:`${i}-save-icon`,scale:"s",slot:"content-start"})),I("calcite-list-item",{label:this.messagesCommon.delete,onCalciteListItemSelect:()=>this.exportedLinks.remove(e)},I("calcite-icon",{icon:"trash",key:`${i}-delete-icon`,scale:"s",slot:"content-start"})))):null}_renderExportedLinkItemContent(e,t){const i=this.messages,{url:a,state:l}=e,o=e.formattedName??"";let n=a||null;n&&(n=r(n));const s=c(n,location.href);return I("div",{class:F.exportedFile,"data-item":e,onclick:this._handleLinkClick,slot:"content"},I("div",null,I("div",{class:F.exportedFileLinkTitle},o),I("div",{class:F.exportedFileLinkDescription},"pending"===l?i.generatingExport:t||(s?i.ready:i.linkReady))),"ready"===l?I("calcite-icon",{"aria-label":`${o}. ${i.linkReady}`,icon:s?"download-to":"launch",key:`${o}-end-icon`,scale:"s",slot:"content-end"}):null)}_renderExportedLinkItemIcon(e){const t=e.formattedName??"";return"pending"===e.state?I("calcite-loader",{class:F.exportedFileLoader,inline:!0,key:`${t}-loader`,label:this.messages.generatingExport,scale:"m",slot:"content-start"}):I("calcite-icon",{icon:R(e),key:`${t}-start-icon`,scale:"s",slot:"content-start"})}_renderExportedLinkItemAction(e,t){const{state:i}=e,a=e.formattedName??"",l=this.saveAsButtonCallback&&"error"!==i&&this._isFormatAllowedForSaving(e.extension);return"pending"!==i?I("calcite-action",{"aria-label":`${t}`,icon:l?"ellipsis":"x",id:l?`${a}-popover-button`:void 0,key:l?`${a}-saveAs-action`:`${a}-action`,onclick:l?void 0:()=>{this.exportedLinks.remove(e)},slot:"actions-end",text:`${t}`}):null}_renderExportedLinkItem(e){const t=this.messages,{error:i,state:a}=e,l=e.formattedName??"";let o;switch(a){case"pending":o=t.pending;break;case"ready":o=t.ready;break;case"error":o=t.errorMessage}const n="error"===a?"print-task:cim-symbol-unsupported"===i?.name?t.exportWebMapCIMError:t.exportWebMapError:"";return I(O,null,I("calcite-list-item",{"aria-label":o,key:l,title:n},this._renderExportedLinkItemContent(e,n),this._renderExportedLinkItemIcon(e),this._renderExportedLinkItemAction(e,n)),this._renderExportedLinkItemPopover(e))}_renderExportedLinkItems(e){return I("calcite-list",{filterEnabled:e?.length>10,label:this.messages.exportedLinksList},e.map(this._renderExportedLinkItem.bind(this)))}_isFormatAllowedForSaving(e){return!this.allowedFormatsForSaving||"all"===this.allowedFormatsForSaving||!(!e||!this.allowedFormatsForSaving.includes(e))}_toggleLayoutPanel(e){const t=e.target;this._toggleTab(t.getAttribute("data-tab-id"))}_toggleTab(e,t=!0){if(this._selectedTab=e,this._selectedTab===L.mapOnly)this.viewModel.applyTemplate(E);else if(this._selectedTab===L.layout){const e=this._selectedTemplate??this.viewModel.defaultTemplate;this.viewModel.applyTemplate(e)}t&&(this._activeTabFocusRequested=!0)}_handleLayoutPanelKeyDown(e){const{key:t}=e,i=e.target.getAttribute("data-tab-id");if(C(t))return this._toggleTab(i),e.preventDefault(),void e.stopPropagation();if("ArrowLeft"===t||"ArrowRight"===t){switch(i){case L.layout:this._toggleTab("ArrowLeft"===t?L.export:L.mapOnly);break;case L.mapOnly:this._toggleTab("ArrowLeft"===t?L.layout:L.export);break;case L.export:this._toggleTab("ArrowLeft"===t?L.mapOnly:L.layout)}e.preventDefault(),e.stopPropagation()}}};e([p()],j.prototype,"_showTemplates",void 0),e([p()],j.prototype,"_isValidSpatialReference",void 0),e([p()],j.prototype,"allowedFormats",null),e([p()],j.prototype,"allowedFormatsForSaving",void 0),e([p()],j.prototype,"allowedLayouts",null),e([p()],j.prototype,"browseTemplateButtonOnClick",void 0),e([p()],j.prototype,"error",null),e([p()],j.prototype,"exportedLinks",null),e([p()],j.prototype,"extraParameters",null),e([p()],j.prototype,"headerVisible",void 0),e([p()],j.prototype,"headingLevel",void 0),e([p()],j.prototype,"icon",null),e([p()],j.prototype,"includeDefaultTemplates",null),e([p()],j.prototype,"includeOrganizationTemplates",void 0),e([p()],j.prototype,"label",null),e([p(),S("esri/widgets/Print/t9n/Print")],j.prototype,"messages",void 0),e([p(),S("esri/t9n/common")],j.prototype,"messagesCommon",void 0),e([p(),S("esri/core/t9n/Units")],j.prototype,"messagesUnits",void 0),e([p({type:u})],j.prototype,"outSpatialReference",null),e([p()],j.prototype,"portal",null),e([p()],j.prototype,"saveExportEnabled",null),e([p()],j.prototype,"saveExportHidden",void 0),e([p()],j.prototype,"showPrintAreaEnabled",null),e([p()],j.prototype,"printServiceUrl",null),e([p()],j.prototype,"saveAsButtonCallback",void 0),e([p()],j.prototype,"templateCustomTextElements",null),e([p()],j.prototype,"templateOptions",null),e([p()],j.prototype,"view",null),e([p({type:y})],j.prototype,"viewModel",void 0),j=e([m("esri.widgets.Print")],j);const V=j;export{V as default};
|