@arcgis/map-components 5.1.0-next.89 → 5.1.0-next.90
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/dist/cdn/{BOMPCJ77.js → 2LNLB4XY.js} +1 -1
- package/dist/cdn/{25LLGDTO.js → 2YB6S64G.js} +1 -1
- package/dist/cdn/3A4SIMPX.js +2 -0
- package/dist/cdn/3N5NYUQ4.js +2 -0
- package/dist/cdn/{K6FLTE5C.js → 3YVU66DR.js} +1 -1
- package/dist/cdn/4GX6K4QV.js +2 -0
- package/dist/cdn/{UMATWIWL.js → 5BKXAZGJ.js} +1 -1
- package/dist/cdn/{6352EDBR.js → 64Q47BWH.js} +1 -1
- package/dist/cdn/{XQ5BV7DL.js → 6BESCJK6.js} +1 -1
- package/dist/cdn/{TUY46VJP.js → 7GN54I5I.js} +1 -1
- package/dist/cdn/A35RPLAM.js +2 -0
- package/dist/cdn/AOKQLNNK.js +2 -0
- package/dist/cdn/{MAVNZR2L.js → BLH76V4B.js} +1 -1
- package/dist/cdn/D4ZQOMOH.js +2 -0
- package/dist/cdn/{ZSG6TJPR.js → FJY5EA2S.js} +1 -1
- package/dist/cdn/{HU4V2LGL.js → GDHU6FB7.js} +1 -1
- package/dist/cdn/{5GEYGYVM.js → GFNS6DWD.js} +1 -1
- package/dist/cdn/{ACT4QKSO.js → GPMDFKYC.js} +1 -1
- package/dist/cdn/{24VXNB37.js → IWGEVWTS.js} +1 -1
- package/dist/cdn/{FDNFARSM.js → JHRFJTE4.js} +1 -1
- package/dist/cdn/{3BUCNQ3Q.js → JWYAOQXS.js} +1 -1
- package/dist/cdn/{HTNECFCQ.js → K2RCQ3S4.js} +1 -1
- package/dist/cdn/{MAILZU6P.js → MAFF3ZL7.js} +1 -1
- package/dist/cdn/{FQY55PPT.js → MVULTZL6.js} +1 -1
- package/dist/cdn/{GCPE7SKR.js → NJP6OBBN.js} +1 -1
- package/dist/cdn/{ST5DXIZ6.js → NVRFQSZB.js} +1 -1
- package/dist/cdn/{WJWYFM4K.js → PSIEACM5.js} +1 -1
- package/dist/cdn/{F5RARHY3.js → Q6IMZMFI.js} +1 -1
- package/dist/cdn/{MQ4W6OKL.js → QHSIMKPK.js} +1 -1
- package/dist/cdn/QMR3YL46.js +2 -0
- package/dist/cdn/{C6DEM2XB.js → RCLKTOCN.js} +1 -1
- package/dist/cdn/{ZIV7S3DE.js → THXCDBHG.js} +1 -1
- package/dist/cdn/V4RMKJUW.js +2 -0
- package/dist/cdn/WRWNOEUN.js +2 -0
- package/dist/cdn/{PFHHH6X2.js → XF7T7NTL.js} +1 -1
- package/dist/cdn/{R2EXDY7E.js → XHYVTSLE.js} +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.ar.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.bg.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.bs.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.ca.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.cs.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.da.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.de.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.el.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.es.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.et.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.fi.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.fr.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.he.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.hr.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.hu.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.id.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.it.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.ja.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.ko.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.lt.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.lv.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.nl.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.no.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.pl.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.pt-BR.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.pt-PT.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.ro.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.ru.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.sk.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.sl.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.sr.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.sv.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.th.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.tr.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.uk.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.vi.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.zh-CN.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.zh-HK.json +1 -1
- package/dist/cdn/assets/bookmarks/t9n/messages.zh-TW.json +1 -1
- package/dist/cdn/assets/oriented-imagery-viewer-image-viewer/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.ar.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.bg.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.bs.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.ca.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.cs.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.da.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.de.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.el.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.es.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.et.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.fi.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.fr.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.he.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.hr.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.hu.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.id.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.it.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.ja.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.ko.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.lt.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.lv.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.nl.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.no.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.pl.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.pt-BR.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.pt-PT.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.ro.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.ru.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.sk.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.sl.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.sr.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.sv.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.th.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.tr.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.uk.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.vi.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.zh-CN.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.zh-HK.json +1 -1
- package/dist/cdn/assets/utility-network-trace-inputs/t9n/messages.zh-TW.json +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/async-utils.js +51 -63
- package/dist/chunks/urlUtils.js +17 -0
- package/dist/components/arcgis-aggregated-features/customElement.js +69 -46
- package/dist/components/arcgis-daylight/customElement.js +2 -2
- package/dist/components/arcgis-directions/customElement.js +1 -1
- package/dist/components/arcgis-feature-table/customElement.js +1 -1
- package/dist/components/arcgis-features/customElement.d.ts +7 -0
- package/dist/components/arcgis-features/customElement.js +68 -51
- package/dist/components/arcgis-grid-controls/customElement.js +26 -26
- package/dist/components/arcgis-oriented-imagery-viewer/customElement.js +1 -1
- package/dist/components/arcgis-oriented-imagery-viewer-image-viewer/customElement.d.ts +41 -0
- package/dist/components/arcgis-oriented-imagery-viewer-image-viewer/customElement.js +299 -0
- package/dist/components/arcgis-oriented-imagery-viewer-image-viewer/index.d.ts +1 -0
- package/dist/components/arcgis-oriented-imagery-viewer-image-viewer/index.js +4 -0
- package/dist/components/arcgis-oriented-imagery-viewer-image-viewer/support/NonPanoramicMedia.d.ts +25 -0
- package/dist/components/arcgis-search/customElement.js +1 -1
- package/dist/components/arcgis-time-of-day-slider/customElement.js +47 -47
- package/dist/components/arcgis-time-slider/customElement.d.ts +353 -688
- package/dist/components/arcgis-time-slider/customElement.js +26 -678
- package/dist/components/arcgis-time-slider/index.js +0 -7
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/loader.js +3 -2
- package/dist/types/lumina.d.ts +9 -2
- package/dist/types/preact.d.ts +10 -2
- package/dist/types/react.d.ts +11 -2
- package/dist/types/stencil.d.ts +9 -2
- package/package.json +5 -5
- package/dist/cdn/AFAQWPXY.js +0 -2
- package/dist/cdn/DWADIUIX.js +0 -2
- package/dist/cdn/F2UYN7PY.js +0 -2
- package/dist/cdn/F74DKJP5.js +0 -2
- package/dist/cdn/JE5PV6KP.js +0 -2
- package/dist/cdn/MDC6LZQV.js +0 -2
- package/dist/cdn/Z33HF7ZE.js +0 -2
- package/dist/cdn/assets/time-slider/t9n/messages.ar.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.bg.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.bs.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.ca.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.cs.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.da.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.de.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.el.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.en.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.es.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.et.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.fi.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.fr.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.he.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.hr.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.hu.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.id.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.it.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.ja.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.ko.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.lt.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.lv.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.nl.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.no.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.pl.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.pt-BR.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.pt-PT.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.ro.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.ru.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.sk.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.sl.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.sr.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.sv.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.th.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.tr.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.uk.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.vi.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.zh-CN.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.zh-HK.json +0 -1
- package/dist/cdn/assets/time-slider/t9n/messages.zh-TW.json +0 -1
- package/dist/components/arcgis-time-slider/types.d.ts +0 -147
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import g from"./MMBRI6HV.js";import{a as E}from"./IFMQCWXY.js";import{a as d}from"./CUYGLJRU.js";import{a as A}from"./S2IGQZN6.js";import e from"./
|
|
2
|
+
import g from"./MMBRI6HV.js";import{a as E}from"./IFMQCWXY.js";import{a as d}from"./CUYGLJRU.js";import{a as A}from"./S2IGQZN6.js";import e from"./V4RMKJUW.js";import"./PC4PAQXQ.js";import b from"./6IJGTPXG.js";import"./ZCQAWUVA.js";import"./ATTV2K2S.js";import a from"./IFIOUBWT.js";import"./T5K2XFNK.js";import{M as c,N as v,O as _,P as m,U as f,b as p,x as w}from"./DDD7772O.js";import"./3TTFCHAA.js";export default $arcgis.t(([{watch:n},U,R,{fetchKnowledgeGraph:x},P,{isAbortError:D},Q,{d:V,e:I},{a:i,b:g,f:C},{b:u},{a:L,b:k,c:M}])=>{var z=g(R,{}),Z=g(U,{}),y=class extends _{constructor(){super(),this._containerRef=c(),this._mapRef=c(),this._uiController=new L(this),this._activeLoadAbortController=null,this.arcgisLoadError=k(this),this.arcgisViewReadyError=M(this),this._map=z(this),this._baseCypherQuery="",this._serviceUrl="",this._propItemId="",this.view=Z(this),this.animationsDisabled=this.view.animationsEnabled,this.allLayerViews=this.view.allLayerViews,this.analyses=this.view.analyses,this.attributionMode=this.view.attributionMode,this.autoDestroyDisabled=!1,this.background=this.view.background,this.basemap=this._map.basemap,this.basemapView=this.view.basemapView,this.canZoomIn=this.view.canZoomIn,this.canZoomOut=this.view.canZoomOut,this.constraints=this.view.constraints,this.displayFilterDisabled=this.view.displayFilterEnabled,this.fatalError=this.view.fatalError,this.graphics=this.view.graphics,this.highlights=this.view.highlights,this.layerViews=this.view.layerViews,this.magnifier=this.view.magnifier,this.map=this.view.map,this.navigation=this.view.navigation,this.padding=this.view.padding,this.popup=this.view.popup,this.popupDisabled=this.view.popupEnabled,this.popupComponentEnabled=!1,this.ready=this.view.ready,this.resizeAlign=this.view.resizeAlign,this.resolution=this.view.resolution,this.rotation=this.view.rotation,this.selectionManager=this.view.selectionManager,this.slotGroupRefs=this._uiController.slotGroupRefs,this.spatialReference=this.view.spatialReference,this.suspended=this.view.suspended,this.theme=this.view.theme,this.timeExtent=this.view.timeExtent,this.timeZone=this.view.timeZone,this.updating=this.view.updating,this.arcgisViewAnalysisViewCreate=i(()=>this.view,"analysis-view-create"),this.arcgisViewAnalysisViewCreateError=i(()=>this.view,"analysis-view-create-error"),this.arcgisViewAnalysisViewDestroy=i(()=>this.view,"analysis-view-destroy"),this.arcgisViewChange=w(),this.arcgisViewClick=i(()=>this.view,"click"),this.arcgisViewDoubleClick=i(()=>this.view,"double-click"),this.arcgisViewDoubleTapDrag=i(()=>this.view,"double-tap-drag"),this.arcgisViewDrag=i(()=>this.view,"drag"),this.arcgisViewHold=i(()=>this.view,"hold"),this.arcgisViewImmediateClick=i(()=>this.view,"immediate-click"),this.arcgisViewImmediateDoubleClick=i(()=>this.view,"immediate-double-click"),this.arcgisViewKeyDown=i(()=>this.view,"key-down"),this.arcgisViewKeyUp=i(()=>this.view,"key-up"),this.arcgisViewLayerviewCreate=i(()=>this.view,"layerview-create"),this.arcgisViewLayerviewCreateError=i(()=>this.view,"layerview-create-error"),this.arcgisViewLayerviewDestroy=i(()=>this.view,"layerview-destroy"),this.arcgisViewMouseWheel=i(()=>this.view,"mouse-wheel"),this.arcgisViewPointerDown=i(()=>this.view,"pointer-down"),this.arcgisViewPointerEnter=i(()=>this.view,"pointer-enter"),this.arcgisViewPointerLeave=i(()=>this.view,"pointer-leave"),this.arcgisViewPointerMove=i(()=>this.view,"pointer-move"),this.arcgisViewPointerUp=i(()=>this.view,"pointer-up"),this.arcgisViewReadyChange=w(),this.arcgisViewVerticalTwoFingerDrag=i(()=>this.view,"vertical-two-finger-drag"),this.view.ui={components:[]}}static{this.properties={_map:16,_baseCypherQuery:16,_serviceUrl:16,_propItemId:16,view:32,animationsDisabled:5,aria:0,allLayerViews:32,analyses:0,attributionItems:32,attributionMode:1,autoDestroyDisabled:5,background:0,basemap:1,basemapView:0,canZoomIn:36,canZoomOut:36,center:1,constraints:0,displayFilterDisabled:5,extent:0,fatalError:0,focusAreas:0,graphics:0,hideAttribution:5,highlights:0,interacting:32,itemId:3,baseCypherQuery:3,serviceUrl:3,layerViews:32,magnifier:32,map:0,navigating:32,navigation:0,padding:0,popup:0,popupElement:32,popupDisabled:5,popupComponentEnabled:5,ready:36,resizeAlign:1,resolution:40,rotation:9,selectionManager:32,scale:9,slotGroupRefs:32,spatialReference:0,stationary:32,suspended:39,theme:0,timeExtent:0,timeZone:1,updating:36,viewpoint:0,zoom:9,loadErrorSources:0}}static{this.styles=[A,E]}get aria(){return this.view?.aria}set aria(e){this.view&&(this.view.aria=e)}get attributionItems(){return this.view?.attributionItems??[]}get center(){return this.view.center}set center(e){let t=I(e,this.view);t&&(this.view.center=t)}get extent(){return this.view.extent}set extent(e){this.extent?.equals(e)||(this.view.extent=e)}get focusAreas(){return this.map?this.map?.focusAreas:{areas:[],style:"bright"}}set focusAreas(e){this.map&&(this.map.focusAreas=e)}get hideAttribution(){return!this.view.attributionVisible}set hideAttribution(e){this.view.attributionVisible=!e}get interacting(){return this.view.interacting}get itemId(){return this._map.portalItem?.id}set itemId(e){this._propItemId=e}get baseCypherQuery(){return this._baseCypherQuery}set baseCypherQuery(e){this._baseCypherQuery=e}get serviceUrl(){return this._serviceUrl}set serviceUrl(e){this._serviceUrl=e}get navigating(){return this.view.navigating}get popupElement(){return this._uiController.popupElement||null}get scale(){return this.view.scale}set scale(e){this.view.scale=e}get stationary(){return this.view.stationary}get viewpoint(){return this.view.viewpoint}set viewpoint(e){V(this.viewpoint,e)&&(this.view.viewpoint=e)}get zoom(){return this.view.zoom}set zoom(e){this.view.zoom=e}async closePopup(){this._uiController.closePopup()}async destroy(){await this.manager.destroy()}async goTo(e,t){return await this.view.goTo(e,t)}async openPopup(e){this._uiController.openPopup(e)}toMap(e){return this.view.toMap(e)}toScreen(e,t){return this.view.toScreen(e,t)}async tryFatalErrorRecovery(){this.view.tryFatalErrorRecovery()}async viewOnReady(e,t){return await this.componentOnReady(),await this.view.whenReady().then(()=>e?.()).catch(t)}async whenAnalysisView(e){return await this.view.whenAnalysisView(e)}async whenLayerView(e){return await this.view.whenLayerView(e)}async zoomIn(){this.view.zoomIn()}async zoomOut(){this.view.zoomOut()}loaded(){let e=this;e.el.childElem=this._mapRef.value,this.view.container??=e.el.childElem,s.setLocalPublicMap(this,this._map),this.manager.onLifecycle(()=>[n(()=>this.map,t=>{t&&s.setLocalPrivateMap(this,t)},{initial:!0,sync:!0}),n(()=>this.view.stationary,()=>this.arcgisViewChange.emit(),{initial:!0}),n(()=>this.view.ready,()=>this.arcgisViewReadyChange.emit(),{initial:this.view.ready}),n(()=>this.view.attributionHeight,t=>{this._uiController.handleAttributionHeightChange(t)},{initial:!0})])}willUpdate(e){let t=()=>{this._activeLoadAbortController?.abort();let a=new AbortController;return this._activeLoadAbortController=a,a};if(e.has("_propItemId")||e.has("_serviceUrl")||e.has("_baseCypherQuery")){if(e.has("_propItemId")&&this._propItemId||e.has("_propItemId")&&!this._serviceUrl)t(),s.reCreateAccessor(this._map,this),s.setPortalItem(this._map,this._propItemId),s.setMap(this.view,this._map);else if(!this._propItemId)if(this._serviceUrl&&!this._baseCypherQuery){let a=t();s.fetchKnowledgeGraph(this._serviceUrl).then(l=>{let h=new s.WebLinkChart,o=new s.LinkChartLayer({url:l.url});o.load({signal:a?.signal});try{u(a.signal),h.add(o),this._setLinkChartAndZoom(h)}catch(b){if(!D(b))throw b}})}else if(this._baseCypherQuery&&this._serviceUrl){let a=t();s.fetchKnowledgeGraph(this._serviceUrl).then(l=>{s.WebLinkChart.fromCypherQuery(l,new P({openCypherQuery:this._baseCypherQuery}),void 0,{signal:a?.signal}).then(async h=>{try{u(a.signal),this._setLinkChartAndZoom(h)}catch(o){if(!D(o))throw o}})})}else!this._serviceUrl&&e.has("_serviceUrl")&&(t(),s.setMap(this.view,null))}}_setLinkChartAndZoom(e){s.reCreateAccessor(this._map,this),s.setLocalPrivateMap(this,e),s.setMap(this.view,e),this._map&&this.view.when(()=>{e.diagramNodesExtent&&this.view.goTo(e.diagramNodesExtent)})}renderMain(){return p`<div class=${m(d.base)} ${v(this._mapRef)}></div>`}render(){return p`${this.renderMain()}<section class=${m(d.containerUI)} ${v(this._containerRef)}>${this._uiController.render()}</section>`}},s={fetchKnowledgeGraph:async r=>await x(r),WebLinkChart:R,LinkChartLayer:Q,setMap:(r,e)=>{r.map=e},setLocalPrivateMap:(r,e)=>{r._map=e},setLocalPublicMap:(r,e)=>{r.map||=e},setPortalItem(r,e){r.portalItem={id:e}},reCreateAccessor:C};f("arcgis-link-chart",y);return{ArcgisLinkChart:y,exportsForTests:s}},"core/reactiveUtils","views/LinkChartView","WebLinkChart","rest/knowledgeGraphService","rest/knowledgeGraph/GraphQueryStreaming","core/promiseUtils","layers/LinkChartLayer",a,b,e,g)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import j from"./FQY55PPT.js";import{a as n}from"./IGSZABNU.js";import i from"./AFAQWPXY.js";import"./PC4PAQXQ.js";import h from"./PP3ZDADO.js";import{a as b}from"./ZRWZ5OQK.js";import{a as p}from"./54VXNFQ4.js";import g from"./6IJGTPXG.js";import e from"./X55JXSXH.js";import{h as _}from"./ZCQAWUVA.js";import"./ATTV2K2S.js";import c from"./IFIOUBWT.js";import"./T5K2XFNK.js";import{O as f,P as d,U as w,a as m,b as a,x as v}from"./DDD7772O.js";import"./3TTFCHAA.js";export default $arcgis.t(([z,{property:C,subclass:M},,,,x,{f:g},y])=>{var $=m`:host{--arcgis-internal-color-black-30: color-mix(in srgb, #000000 30.2%, transparent);--arcgis-internal-box-shadow: var(--calcite-spacing-none) var(--calcite-spacing-px) var(--calcite-spacing-base) var(--arcgis-internal-color-black-30);--arcgis-internal-top-max-width: calc(min(100cqw, 100vw) - var(--calcite-spacing-xxxl));--arcgis-internal-panel-width: 300px;--arcgis-internal-panel-height: 100%;--arcgis-internal-panel-height-sm: 240px;--arcgis-internal-panel-height-md: 420px;--arcgis-internal-panel-height-lg: 540px;--arcgis-internal-panel-height-xl: 680px;--arcgis-internal-panel-gap: var(--calcite-spacing-lg);--arcgis-internal-panel-actions-gap: var(--calcite-spacing-sm);--arcgis-internal-basemap-gallery-width-lg: 450px;--arcgis-internal-collapse-icon-flip: scaleX(1);--arcgis-internal-row-direction: row;--arcgis-internal-legend-width: 300px;--arcgis-internal-layout-overlay-space-top: var(--arcgis-layout-overlay-space-top, 0px);--arcgis-internal-layout-overlay-space-bottom: var(--arcgis-layout-overlay-space-bottom, 0px);--arcgis-internal-layout-overlay-space-left: var(--arcgis-layout-overlay-space-left, 0px);--arcgis-internal-layout-overlay-space-right: var(--arcgis-layout-overlay-space-right, 0px);--arcgis-internal-view-color-focus: var(--arcgis-view-color-focus, var(--calcite-color-brand));--arcgis-internal-attribution-space-bottom: var(--arcgis-internal-layout-overlay-space-bottom);--arcgis-internal-attribution-space-left: var(--arcgis-internal-layout-overlay-space-left);--arcgis-internal-attribution-space-right: var(--arcgis-internal-layout-overlay-space-right);--arcgis-internal-attribution-font-size: var(--calcite-font-size-sm);--arcgis-internal-attribution-font-size-sm: var(--calcite-font-size-xs);--arcgis-internal-sketch-justify-content: flex-start}.esri-widget__heading{color:var(--calcite-color-text-2);margin:0 0 .5rem;font-weight:var(--calcite-font-weight-semibold)}h1.esri-widget__heading{font-size:var(--calcite-font-size-xl)}h2.esri-widget__heading{font-size:var(--calcite-font-size-md)}h3.esri-widget__heading,h4.esri-widget__heading,h5.esri-widget__heading,h6.esri-widget__heading{font-size:var(--calcite-font-size)}.esri-widget{box-sizing:border-box;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget *,.esri-widget :before,.esri-widget :after{box-sizing:inherit}.esri-widget.esri-widget--disabled>*{opacity:.4;pointer-events:none}.esri-widget.esri-widget--compact{--esri-widget-padding-y: 0;--esri-widget-padding-x: 0}.esri-widget__anchor{color:var(--calcite-color-text-2)}.esri-widget__anchor:hover{color:var(--calcite-color-text-3)}.esri-widget__anchor:hover,.esri-widget__anchor:focus{text-decoration:underline}.esri-widget__anchor--disabled{opacity:.4;pointer-events:none}.esri-widget__header{background-color:var(--calcite-color-foreground-1);flex:1 0 100%;justify-content:space-between;align-items:center;width:100%;min-height:48px;padding:12px 0 12px 15px;display:flex}.esri-widget__heading{word-break:break-word}.esri-widget__header .esri-widget__heading{width:calc(100% - 48px);text-align:initial;color:var(--calcite-color-text-1);align-items:center;margin:0;padding:0;display:flex}.esri-widget__header-button{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);border:none;flex:0 0 48px;justify-content:center;align-self:stretch;align-items:center;width:48px;padding:0;display:flex}.esri-widget__footer{background-color:var(--calcite-color-foreground-1);justify-content:center;align-items:center;width:100%;min-height:48px;display:flex}.esri-widget__footer-pagination{color:var(--calcite-color-text-2);justify-content:space-between;align-items:center;display:flex}.esri-widget__footer-pagination-previous-button,.esri-widget__footer-pagination-next-button{cursor:pointer;background-color:var(--calcite-color-foreground-1);border:0;margin:0 7px;padding:12px 15px;transition:background-color .125s ease-in-out}.esri-widget__footer-pagination-previous-button:hover,.esri-widget__footer-pagination-previous-button:focus,.esri-widget__footer-pagination-next-button:hover,.esri-widget__footer-pagination-next-button:focus{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1)}.esri-menu{visibility:hidden;z-index:1;background-clip:padding;background-color:var(--calcite-color-foreground-1);background-clip:padding-box;width:100%;max-height:0;margin:2px 0 0;padding:0;font-size:var(--calcite-font-size);line-height:var(--calcite-spacing-xl);position:absolute;top:100%;left:0;overflow:hidden;box-shadow:0 1px 2px #0000004d}.esri-menu .esri-menu__header{color:var(--calcite-color-text-inverse);background-color:var(--calcite-color-inverse);padding:6px 12px}.esri-menu__list{margin:0;padding:0;list-style:none}.esri-menu__list-item{cursor:pointer;border-top:1px solid #adadad4d;border-left:3px solid #0000;padding:.8em 1em}.esri-menu__list-item [class^=esri-icon-],.esri-menu__list-item [class*=" esri-icon-"]{padding-right:2.8px}.esri-menu__list-item:first-child{border-top:none}.esri-menu__list-item--focus,.esri-menu__list-item:hover,.esri-menu__list-item:focus{background-color:var(--calcite-color-foreground-1)}.esri-menu__list-item:active{background-color:var(--calcite-color-foreground-current)}.esri-menu__list-item--active,.esri-menu__list-item--active:hover,.esri-menu__list-item--active:focus{background-color:var(--calcite-color-foreground-1);border-left-color:var(--calcite-color-brand)}.esri-widget__table{border-collapse:collapse;color:var(--calcite-color-text-1);border:none;width:100%;line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget__table tr:nth-child(odd){background-color:var(--calcite-color-transparent)}.esri-widget__table tr:nth-child(2n){background-color:var(--calcite-color-transparent-press)}.esri-widget__table tr a{color:var(--calcite-color-text-2)}.esri-widget__table tr a:hover,.esri-widget__table tr a:focus{color:var(--calcite-color-text-1)}.esri-widget__table tr td,.esri-widget__table tr th{vertical-align:top;word-break:break-word;padding:.5em .7em;font-size:var(--calcite-font-size-sm);font-weight:var(--calcite-font-weight-regular)}.esri-widget__table tr th{text-align:left;border-right:3px solid #0000000d;width:50%}.esri-widget__table tr td{width:50%}.esri-input{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1);border:1px solid #959595;font-size:var(--calcite-font-size)}.esri-input::-ms-clear{display:none}.esri-input::placeholder{opacity:1;color:var(--calcite-color-text-2)}.esri-input:placeholder-shown{text-overflow:ellipsis}.esri-input[type=text],.esri-input[type=password],.esri-input[type=number]{height:32px;padding:0 .5em}calcite-combobox.esri-input{border:none}.esri-widget__content--empty{text-align:center;color:var(--calcite-color-border-input);flex-flow:column wrap;align-items:center;padding:18px 22px;display:flex}.esri-widget__content--empty h1.esri-widget__heading,.esri-widget__content--empty h2.esri-widget__heading,.esri-widget__content--empty h3.esri-widget__heading,.esri-widget__content--empty h4.esri-widget__heading,.esri-widget__content--empty h5.esri-widget__heading{font-weight:var(--calcite-font-weight-regular)}.esri-widget__content-illustration--empty{width:128px;padding:1rem 0}.esri-widget__content-icon--empty{width:32px;padding:.5rem 0}.esri-select{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background:var(--calcite-color-foreground-1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-8 -8 32 32' width='32' height='32'%3E%3Cpath d='M8 11.207l-4-4V5.793l4 4 4-4v1.414z' fill='%23adadad' fillrule='nonzero'/%3E%3C/svg%3E") 100% no-repeat;border:1px solid #959595;border-radius:0;width:100%;height:32px;margin:0;padding:0 .5em;font-family:inherit;font-size:.85em;display:block}.esri-select[disabled]{cursor:auto}.esri-select::-ms-expand{display:none}.esri-disabled a,.esri-disabled [role=menu],.esri-disabled [role=checkbox],.esri-disabled [class^=esri-icon-],.esri-disabled [class*=" esri-icon-"]{color:var(--calcite-color-text-3)}.keynav-mode .esri-widget:focus,.keynav-mode .esri-widget :focus{z-index:1;outline-offset:2px;outline:2px solid #adadad}.esri-widget__loader-animation{border:.15em solid #adadad4d;border-top-color:var(--calcite-color-border-input);border-radius:100%;width:1em;height:1em;font-size:var(--calcite-font-size-md);animation:1.25s linear infinite esri-rotate;display:block;transform:translateZ(0)}:dir(rtl) .esri-widget__table th{text-align:right;border-left:3px solid #0000000d;border-right:none}:dir(rtl) .esri-select{background-position:0}:dir(rtl) .esri-menu__list-item{border-left:none;border-right:3px solid #0000}:dir(rtl) .esri-menu__list-item [class^=esri-icon-],:dir(rtl) .esri-menu__list-item [class*=" esri-icon-"]{padding-left:2px;padding-right:0}:dir(rtl) .esri-menu__list-item--active{border-right-color:var(--calcite-color-brand)}.esri-icon-font-fallback-text{clip:rect(0 0 0 0);width:1px;height:1px;position:absolute;overflow:hidden}.esri-rotating{animation:1.25s linear infinite esri-rotate;transform:translateZ(0)}.esri-clearfix:before,.esri-clearfix:after{content:" ";display:table}.esri-clearfix:after{clear:both}.esri-interactive{cursor:pointer}.esri-invisible{visibility:hidden!important}.esri-offscreen{position:absolute;top:-999em;left:-999em}.esri-match-height{flex-direction:column;flex:auto;display:flex;overflow:hidden}.esri-widget--panel{min-width:300px;min-height:32px;padding:var(--arcgis-internal-padding);transition:max-height .25s ease-in-out;overflow-y:auto}.esri-hidden{display:none!important}:host{min-width:300px}.container{display:flex;position:relative;flex-flow:column;gap:var(--arcgis-internal-panel-gap);overflow-y:auto}.error{color:var(--calcite-color-status-danger)}.hint{display:flex;flex-direction:column;gap:var(--arcgis-internal-panel-gap)}.error,.hint{overflow:hidden;animation:arcgis-line-of-sight-fade-in .25s ease-in-out;p{margin:0;padding:0}}.actions{display:flex;flex-flow:column;gap:var(--arcgis-internal-panel-actions-gap);justify-content:center}@keyframes arcgis-line-of-sight-fade-in{0%{opacity:0}25%{opacity:0}to{opacity:1}}`,O=Object.defineProperty,B=Object.getOwnPropertyDescriptor,k=(t,e,o,r)=>{for(var i=r>1?void 0:r?B(e,o):e,l=t.length-1,c;l>=0;l--)(c=t[l])&&(i=(r?c(e,o,i):c(i))||i);return r&&i&&O(e,o,i),i},s=class extends y{constructor(){super(...arguments),this.supportedViewType="3d",this.unsupportedErrorMessage="The Line Of Sight component is only supported in 3D views."}get state(){return this.disabled||!this.ready?"disabled":this.operationState==="active"?"creating":this.analysis.valid?"created":"ready"}constructAnalysis(){return new z}clearAnalysis(){this.analysis.observer=null,this.analysis.targets.removeAll()}async place(t){await this.analysisView?.place(t)}};k([C({readOnly:!0})],s.prototype,"state",1);s=k([M("esri.components.LineOfSight.LineOfSightViewModel")],s);var D=x(s),u=class extends f{constructor(){super(...arguments),this.viewModel=D(this),this._messages=b({blocking:!0}),this.view=this.viewModel.view,this.analysis=this.viewModel.analysis,this.autoDestroyDisabled=!1,this.hideContinueButton=!1,this.hideDoneButton=!1,this.hideStartButton=!1,this.hideVisualization=this.viewModel.hideVisualization,this.icon="line-of-sight",this.arcgisPropertyChange=_()("analysis","state"),this.arcgisReady=v()}static{this.properties={view:0,analysis:0,autoDestroyDisabled:5,hideContinueButton:5,hideDoneButton:5,hideStartButton:5,hideVisualization:5,icon:3,label:1,messageOverrides:0,referenceElement:1,state:32,_supported:16}}static{this.styles=$}get state(){return this.viewModel.state}get _supported(){return this.view==null||this.view.type==="3d"}async clear(){this.viewModel.clear()}async continue(){g(this.viewModel.start({clear:!1}))}async destroy(){await this.manager.destroy()}async start(){g(this.viewModel.start())}async stop(){this.viewModel.stop()}render(){return a`<div class=${d({[p.widget]:!0,[p.panel]:!0})} role=presentation>${this._renderContainerNode()}</div>`}_renderContainerNode(){if(!this._supported)return a`<div class="error"><p>${this._messages.unsupported}</p></div>`;let e=this.viewModel.state;return a`<div class="container">${e==="creating"?a`<div class="hint"><p class="hint-text">${this._messages.hint}</p></div>`:null}<div class="actions">${n({hidden:e!=="creating"||this.hideDoneButton,children:h({onClick:()=>{this.stop()},children:this._messages.done})})}${n({hidden:e!=="created"||this.hideContinueButton,children:h({onClick:()=>{this.continue()},children:this._messages.continueAnalysis})})}${n({hidden:this.hideStartButton,children:h({className:"new-analysis-button",onClick:()=>{this.start()},primary:!0,disabled:e==="disabled",children:this._messages.newAnalysis})})}</div></div>`}};function h({className:t,onClick:e,primary:o,disabled:r,children:i}){return a`<calcite-button .appearance=${o?"solid":"outline-fill"} class=${d(t)} .disabled=${r} @click=${e}>${i}</calcite-button>`}w("arcgis-line-of-sight",u);return u},"analysis/LineOfSightAnalysis","core/accessorSupport/decorators",c,e,g,h,i,j)
|
|
2
|
+
import j from"./MVULTZL6.js";import{a as n}from"./IGSZABNU.js";import i from"./V4RMKJUW.js";import"./PC4PAQXQ.js";import h from"./PP3ZDADO.js";import{a as b}from"./ZRWZ5OQK.js";import{a as p}from"./54VXNFQ4.js";import g from"./6IJGTPXG.js";import e from"./X55JXSXH.js";import{h as _}from"./ZCQAWUVA.js";import"./ATTV2K2S.js";import c from"./IFIOUBWT.js";import"./T5K2XFNK.js";import{O as f,P as d,U as w,a as m,b as a,x as v}from"./DDD7772O.js";import"./3TTFCHAA.js";export default $arcgis.t(([z,{property:C,subclass:M},,,,x,{f:g},y])=>{var $=m`:host{--arcgis-internal-color-black-30: color-mix(in srgb, #000000 30.2%, transparent);--arcgis-internal-box-shadow: var(--calcite-spacing-none) var(--calcite-spacing-px) var(--calcite-spacing-base) var(--arcgis-internal-color-black-30);--arcgis-internal-top-max-width: calc(min(100cqw, 100vw) - var(--calcite-spacing-xxxl));--arcgis-internal-panel-width: 300px;--arcgis-internal-panel-height: 100%;--arcgis-internal-panel-height-sm: 240px;--arcgis-internal-panel-height-md: 420px;--arcgis-internal-panel-height-lg: 540px;--arcgis-internal-panel-height-xl: 680px;--arcgis-internal-panel-gap: var(--calcite-spacing-lg);--arcgis-internal-panel-actions-gap: var(--calcite-spacing-sm);--arcgis-internal-basemap-gallery-width-lg: 450px;--arcgis-internal-collapse-icon-flip: scaleX(1);--arcgis-internal-row-direction: row;--arcgis-internal-legend-width: 300px;--arcgis-internal-layout-overlay-space-top: var(--arcgis-layout-overlay-space-top, 0px);--arcgis-internal-layout-overlay-space-bottom: var(--arcgis-layout-overlay-space-bottom, 0px);--arcgis-internal-layout-overlay-space-left: var(--arcgis-layout-overlay-space-left, 0px);--arcgis-internal-layout-overlay-space-right: var(--arcgis-layout-overlay-space-right, 0px);--arcgis-internal-view-color-focus: var(--arcgis-view-color-focus, var(--calcite-color-brand));--arcgis-internal-attribution-space-bottom: var(--arcgis-internal-layout-overlay-space-bottom);--arcgis-internal-attribution-space-left: var(--arcgis-internal-layout-overlay-space-left);--arcgis-internal-attribution-space-right: var(--arcgis-internal-layout-overlay-space-right);--arcgis-internal-attribution-font-size: var(--calcite-font-size-sm);--arcgis-internal-attribution-font-size-sm: var(--calcite-font-size-xs);--arcgis-internal-sketch-justify-content: flex-start}.esri-widget__heading{color:var(--calcite-color-text-2);margin:0 0 .5rem;font-weight:var(--calcite-font-weight-semibold)}h1.esri-widget__heading{font-size:var(--calcite-font-size-xl)}h2.esri-widget__heading{font-size:var(--calcite-font-size-md)}h3.esri-widget__heading,h4.esri-widget__heading,h5.esri-widget__heading,h6.esri-widget__heading{font-size:var(--calcite-font-size)}.esri-widget{box-sizing:border-box;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget *,.esri-widget :before,.esri-widget :after{box-sizing:inherit}.esri-widget.esri-widget--disabled>*{opacity:.4;pointer-events:none}.esri-widget.esri-widget--compact{--esri-widget-padding-y: 0;--esri-widget-padding-x: 0}.esri-widget__anchor{color:var(--calcite-color-text-2)}.esri-widget__anchor:hover{color:var(--calcite-color-text-3)}.esri-widget__anchor:hover,.esri-widget__anchor:focus{text-decoration:underline}.esri-widget__anchor--disabled{opacity:.4;pointer-events:none}.esri-widget__header{background-color:var(--calcite-color-foreground-1);flex:1 0 100%;justify-content:space-between;align-items:center;width:100%;min-height:48px;padding:12px 0 12px 15px;display:flex}.esri-widget__heading{word-break:break-word}.esri-widget__header .esri-widget__heading{width:calc(100% - 48px);text-align:initial;color:var(--calcite-color-text-1);align-items:center;margin:0;padding:0;display:flex}.esri-widget__header-button{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);border:none;flex:0 0 48px;justify-content:center;align-self:stretch;align-items:center;width:48px;padding:0;display:flex}.esri-widget__footer{background-color:var(--calcite-color-foreground-1);justify-content:center;align-items:center;width:100%;min-height:48px;display:flex}.esri-widget__footer-pagination{color:var(--calcite-color-text-2);justify-content:space-between;align-items:center;display:flex}.esri-widget__footer-pagination-previous-button,.esri-widget__footer-pagination-next-button{cursor:pointer;background-color:var(--calcite-color-foreground-1);border:0;margin:0 7px;padding:12px 15px;transition:background-color .125s ease-in-out}.esri-widget__footer-pagination-previous-button:hover,.esri-widget__footer-pagination-previous-button:focus,.esri-widget__footer-pagination-next-button:hover,.esri-widget__footer-pagination-next-button:focus{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1)}.esri-menu{visibility:hidden;z-index:1;background-clip:padding;background-color:var(--calcite-color-foreground-1);background-clip:padding-box;width:100%;max-height:0;margin:2px 0 0;padding:0;font-size:var(--calcite-font-size);line-height:var(--calcite-spacing-xl);position:absolute;top:100%;left:0;overflow:hidden;box-shadow:0 1px 2px #0000004d}.esri-menu .esri-menu__header{color:var(--calcite-color-text-inverse);background-color:var(--calcite-color-inverse);padding:6px 12px}.esri-menu__list{margin:0;padding:0;list-style:none}.esri-menu__list-item{cursor:pointer;border-top:1px solid #adadad4d;border-left:3px solid #0000;padding:.8em 1em}.esri-menu__list-item [class^=esri-icon-],.esri-menu__list-item [class*=" esri-icon-"]{padding-right:2.8px}.esri-menu__list-item:first-child{border-top:none}.esri-menu__list-item--focus,.esri-menu__list-item:hover,.esri-menu__list-item:focus{background-color:var(--calcite-color-foreground-1)}.esri-menu__list-item:active{background-color:var(--calcite-color-foreground-current)}.esri-menu__list-item--active,.esri-menu__list-item--active:hover,.esri-menu__list-item--active:focus{background-color:var(--calcite-color-foreground-1);border-left-color:var(--calcite-color-brand)}.esri-widget__table{border-collapse:collapse;color:var(--calcite-color-text-1);border:none;width:100%;line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget__table tr:nth-child(odd){background-color:var(--calcite-color-transparent)}.esri-widget__table tr:nth-child(2n){background-color:var(--calcite-color-transparent-press)}.esri-widget__table tr a{color:var(--calcite-color-text-2)}.esri-widget__table tr a:hover,.esri-widget__table tr a:focus{color:var(--calcite-color-text-1)}.esri-widget__table tr td,.esri-widget__table tr th{vertical-align:top;word-break:break-word;padding:.5em .7em;font-size:var(--calcite-font-size-sm);font-weight:var(--calcite-font-weight-regular)}.esri-widget__table tr th{text-align:left;border-right:3px solid #0000000d;width:50%}.esri-widget__table tr td{width:50%}.esri-input{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1);border:1px solid #959595;font-size:var(--calcite-font-size)}.esri-input::-ms-clear{display:none}.esri-input::placeholder{opacity:1;color:var(--calcite-color-text-2)}.esri-input:placeholder-shown{text-overflow:ellipsis}.esri-input[type=text],.esri-input[type=password],.esri-input[type=number]{height:32px;padding:0 .5em}calcite-combobox.esri-input{border:none}.esri-widget__content--empty{text-align:center;color:var(--calcite-color-border-input);flex-flow:column wrap;align-items:center;padding:18px 22px;display:flex}.esri-widget__content--empty h1.esri-widget__heading,.esri-widget__content--empty h2.esri-widget__heading,.esri-widget__content--empty h3.esri-widget__heading,.esri-widget__content--empty h4.esri-widget__heading,.esri-widget__content--empty h5.esri-widget__heading{font-weight:var(--calcite-font-weight-regular)}.esri-widget__content-illustration--empty{width:128px;padding:1rem 0}.esri-widget__content-icon--empty{width:32px;padding:.5rem 0}.esri-select{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background:var(--calcite-color-foreground-1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-8 -8 32 32' width='32' height='32'%3E%3Cpath d='M8 11.207l-4-4V5.793l4 4 4-4v1.414z' fill='%23adadad' fillrule='nonzero'/%3E%3C/svg%3E") 100% no-repeat;border:1px solid #959595;border-radius:0;width:100%;height:32px;margin:0;padding:0 .5em;font-family:inherit;font-size:.85em;display:block}.esri-select[disabled]{cursor:auto}.esri-select::-ms-expand{display:none}.esri-disabled a,.esri-disabled [role=menu],.esri-disabled [role=checkbox],.esri-disabled [class^=esri-icon-],.esri-disabled [class*=" esri-icon-"]{color:var(--calcite-color-text-3)}.keynav-mode .esri-widget:focus,.keynav-mode .esri-widget :focus{z-index:1;outline-offset:2px;outline:2px solid #adadad}.esri-widget__loader-animation{border:.15em solid #adadad4d;border-top-color:var(--calcite-color-border-input);border-radius:100%;width:1em;height:1em;font-size:var(--calcite-font-size-md);animation:1.25s linear infinite esri-rotate;display:block;transform:translateZ(0)}:dir(rtl) .esri-widget__table th{text-align:right;border-left:3px solid #0000000d;border-right:none}:dir(rtl) .esri-select{background-position:0}:dir(rtl) .esri-menu__list-item{border-left:none;border-right:3px solid #0000}:dir(rtl) .esri-menu__list-item [class^=esri-icon-],:dir(rtl) .esri-menu__list-item [class*=" esri-icon-"]{padding-left:2px;padding-right:0}:dir(rtl) .esri-menu__list-item--active{border-right-color:var(--calcite-color-brand)}.esri-icon-font-fallback-text{clip:rect(0 0 0 0);width:1px;height:1px;position:absolute;overflow:hidden}.esri-rotating{animation:1.25s linear infinite esri-rotate;transform:translateZ(0)}.esri-clearfix:before,.esri-clearfix:after{content:" ";display:table}.esri-clearfix:after{clear:both}.esri-interactive{cursor:pointer}.esri-invisible{visibility:hidden!important}.esri-offscreen{position:absolute;top:-999em;left:-999em}.esri-match-height{flex-direction:column;flex:auto;display:flex;overflow:hidden}.esri-widget--panel{min-width:300px;min-height:32px;padding:var(--arcgis-internal-padding);transition:max-height .25s ease-in-out;overflow-y:auto}.esri-hidden{display:none!important}:host{min-width:300px}.container{display:flex;position:relative;flex-flow:column;gap:var(--arcgis-internal-panel-gap);overflow-y:auto}.error{color:var(--calcite-color-status-danger)}.hint{display:flex;flex-direction:column;gap:var(--arcgis-internal-panel-gap)}.error,.hint{overflow:hidden;animation:arcgis-line-of-sight-fade-in .25s ease-in-out;p{margin:0;padding:0}}.actions{display:flex;flex-flow:column;gap:var(--arcgis-internal-panel-actions-gap);justify-content:center}@keyframes arcgis-line-of-sight-fade-in{0%{opacity:0}25%{opacity:0}to{opacity:1}}`,O=Object.defineProperty,B=Object.getOwnPropertyDescriptor,k=(t,e,o,r)=>{for(var i=r>1?void 0:r?B(e,o):e,l=t.length-1,c;l>=0;l--)(c=t[l])&&(i=(r?c(e,o,i):c(i))||i);return r&&i&&O(e,o,i),i},s=class extends y{constructor(){super(...arguments),this.supportedViewType="3d",this.unsupportedErrorMessage="The Line Of Sight component is only supported in 3D views."}get state(){return this.disabled||!this.ready?"disabled":this.operationState==="active"?"creating":this.analysis.valid?"created":"ready"}constructAnalysis(){return new z}clearAnalysis(){this.analysis.observer=null,this.analysis.targets.removeAll()}async place(t){await this.analysisView?.place(t)}};k([C({readOnly:!0})],s.prototype,"state",1);s=k([M("esri.components.LineOfSight.LineOfSightViewModel")],s);var D=x(s),u=class extends f{constructor(){super(...arguments),this.viewModel=D(this),this._messages=b({blocking:!0}),this.view=this.viewModel.view,this.analysis=this.viewModel.analysis,this.autoDestroyDisabled=!1,this.hideContinueButton=!1,this.hideDoneButton=!1,this.hideStartButton=!1,this.hideVisualization=this.viewModel.hideVisualization,this.icon="line-of-sight",this.arcgisPropertyChange=_()("analysis","state"),this.arcgisReady=v()}static{this.properties={view:0,analysis:0,autoDestroyDisabled:5,hideContinueButton:5,hideDoneButton:5,hideStartButton:5,hideVisualization:5,icon:3,label:1,messageOverrides:0,referenceElement:1,state:32,_supported:16}}static{this.styles=$}get state(){return this.viewModel.state}get _supported(){return this.view==null||this.view.type==="3d"}async clear(){this.viewModel.clear()}async continue(){g(this.viewModel.start({clear:!1}))}async destroy(){await this.manager.destroy()}async start(){g(this.viewModel.start())}async stop(){this.viewModel.stop()}render(){return a`<div class=${d({[p.widget]:!0,[p.panel]:!0})} role=presentation>${this._renderContainerNode()}</div>`}_renderContainerNode(){if(!this._supported)return a`<div class="error"><p>${this._messages.unsupported}</p></div>`;let e=this.viewModel.state;return a`<div class="container">${e==="creating"?a`<div class="hint"><p class="hint-text">${this._messages.hint}</p></div>`:null}<div class="actions">${n({hidden:e!=="creating"||this.hideDoneButton,children:h({onClick:()=>{this.stop()},children:this._messages.done})})}${n({hidden:e!=="created"||this.hideContinueButton,children:h({onClick:()=>{this.continue()},children:this._messages.continueAnalysis})})}${n({hidden:this.hideStartButton,children:h({className:"new-analysis-button",onClick:()=>{this.start()},primary:!0,disabled:e==="disabled",children:this._messages.newAnalysis})})}</div></div>`}};function h({className:t,onClick:e,primary:o,disabled:r,children:i}){return a`<calcite-button .appearance=${o?"solid":"outline-fill"} class=${d(t)} .disabled=${r} @click=${e}>${i}</calcite-button>`}w("arcgis-line-of-sight",u);return u},"analysis/LineOfSightAnalysis","core/accessorSupport/decorators",c,e,g,h,i,j)
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import"./3TTFCHAA.js";export default $arcgis.t(([o])=>{var a=/\.(\w+)$/iv;function r(e){let t=new URL(e).pathname.match(a);if(!(!t||t.length<2))return t[1].toUpperCase()}async function p(e,t){let n=(await o(e,{...t,method:"head"}))?.getHeader?.("Content-Type");if(n)return n.split("/")[1].toUpperCase()}return{getDatasetFormat:p,guessExtensionFromURI:r}},"request")
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import{a as d}from"./PC4PAQXQ.js";import h from"./PP3ZDADO.js";import{a as M}from"./ZRWZ5OQK.js";import{a as C}from"./54VXNFQ4.js";import e from"./6IJGTPXG.js";import c from"./X55JXSXH.js";import{h as y}from"./ZCQAWUVA.js";import"./ATTV2K2S.js";import a from"./IFIOUBWT.js";import{c as x}from"./T5K2XFNK.js";import{N as m,O as _,P as v,R as w,S as f,U as b,a as g,b as o,x as p}from"./DDD7772O.js";import"./3TTFCHAA.js";export default $arcgis.t(([k,{isAbortError:D},{substitute:E},{watch:h,on:T},,,{a:a},S])=>{var A=g`.esri-widget__heading{color:var(--calcite-color-text-2);margin:0 0 .5rem;font-weight:var(--calcite-font-weight-semibold)}h1.esri-widget__heading{font-size:var(--calcite-font-size-xl)}h2.esri-widget__heading{font-size:var(--calcite-font-size-md)}h3.esri-widget__heading,h4.esri-widget__heading,h5.esri-widget__heading,h6.esri-widget__heading{font-size:var(--calcite-font-size)}.esri-widget{box-sizing:border-box;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget *,.esri-widget :before,.esri-widget :after{box-sizing:inherit}.esri-widget.esri-widget--disabled>*{opacity:.4;pointer-events:none}.esri-widget.esri-widget--compact{--esri-widget-padding-y: 0;--esri-widget-padding-x: 0}.esri-widget__anchor{color:var(--calcite-color-text-2)}.esri-widget__anchor:hover{color:var(--calcite-color-text-3)}.esri-widget__anchor:hover,.esri-widget__anchor:focus{text-decoration:underline}.esri-widget__anchor--disabled{opacity:.4;pointer-events:none}.esri-widget__header{background-color:var(--calcite-color-foreground-1);flex:1 0 100%;justify-content:space-between;align-items:center;width:100%;min-height:48px;padding:12px 0 12px 15px;display:flex}.esri-widget__heading{word-break:break-word}.esri-widget__header .esri-widget__heading{width:calc(100% - 48px);text-align:initial;color:var(--calcite-color-text-1);align-items:center;margin:0;padding:0;display:flex}.esri-widget__header-button{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);border:none;flex:0 0 48px;justify-content:center;align-self:stretch;align-items:center;width:48px;padding:0;display:flex}.esri-widget__footer{background-color:var(--calcite-color-foreground-1);justify-content:center;align-items:center;width:100%;min-height:48px;display:flex}.esri-widget__footer-pagination{color:var(--calcite-color-text-2);justify-content:space-between;align-items:center;display:flex}.esri-widget__footer-pagination-previous-button,.esri-widget__footer-pagination-next-button{cursor:pointer;background-color:var(--calcite-color-foreground-1);border:0;margin:0 7px;padding:12px 15px;transition:background-color .125s ease-in-out}.esri-widget__footer-pagination-previous-button:hover,.esri-widget__footer-pagination-previous-button:focus,.esri-widget__footer-pagination-next-button:hover,.esri-widget__footer-pagination-next-button:focus{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1)}.esri-menu{visibility:hidden;z-index:1;background-clip:padding;background-color:var(--calcite-color-foreground-1);background-clip:padding-box;width:100%;max-height:0;margin:2px 0 0;padding:0;font-size:var(--calcite-font-size);line-height:var(--calcite-spacing-xl);position:absolute;top:100%;left:0;overflow:hidden;box-shadow:0 1px 2px #0000004d}.esri-menu .esri-menu__header{color:var(--calcite-color-text-inverse);background-color:var(--calcite-color-inverse);padding:6px 12px}.esri-menu__list{margin:0;padding:0;list-style:none}.esri-menu__list-item{cursor:pointer;border-top:1px solid #adadad4d;border-left:3px solid #0000;padding:.8em 1em}.esri-menu__list-item [class^=esri-icon-],.esri-menu__list-item [class*=" esri-icon-"]{padding-right:2.8px}.esri-menu__list-item:first-child{border-top:none}.esri-menu__list-item--focus,.esri-menu__list-item:hover,.esri-menu__list-item:focus{background-color:var(--calcite-color-foreground-1)}.esri-menu__list-item:active{background-color:var(--calcite-color-foreground-current)}.esri-menu__list-item--active,.esri-menu__list-item--active:hover,.esri-menu__list-item--active:focus{background-color:var(--calcite-color-foreground-1);border-left-color:var(--calcite-color-brand)}.esri-widget__table{border-collapse:collapse;color:var(--calcite-color-text-1);border:none;width:100%;line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget__table tr:nth-child(odd){background-color:var(--calcite-color-transparent)}.esri-widget__table tr:nth-child(2n){background-color:var(--calcite-color-transparent-press)}.esri-widget__table tr a{color:var(--calcite-color-text-2)}.esri-widget__table tr a:hover,.esri-widget__table tr a:focus{color:var(--calcite-color-text-1)}.esri-widget__table tr td,.esri-widget__table tr th{vertical-align:top;word-break:break-word;padding:.5em .7em;font-size:var(--calcite-font-size-sm);font-weight:var(--calcite-font-weight-regular)}.esri-widget__table tr th{text-align:left;border-right:3px solid #0000000d;width:50%}.esri-widget__table tr td{width:50%}.esri-input{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1);border:1px solid #959595;font-size:var(--calcite-font-size)}.esri-input::-ms-clear{display:none}.esri-input::placeholder{opacity:1;color:var(--calcite-color-text-2)}.esri-input:placeholder-shown{text-overflow:ellipsis}.esri-input[type=text],.esri-input[type=password],.esri-input[type=number]{height:32px;padding:0 .5em}calcite-combobox.esri-input{border:none}.esri-widget__content--empty{text-align:center;color:var(--calcite-color-border-input);flex-flow:column wrap;align-items:center;padding:18px 22px;display:flex}.esri-widget__content--empty h1.esri-widget__heading,.esri-widget__content--empty h2.esri-widget__heading,.esri-widget__content--empty h3.esri-widget__heading,.esri-widget__content--empty h4.esri-widget__heading,.esri-widget__content--empty h5.esri-widget__heading{font-weight:var(--calcite-font-weight-regular)}.esri-widget__content-illustration--empty{width:128px;padding:1rem 0}.esri-widget__content-icon--empty{width:32px;padding:.5rem 0}.esri-select{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background:var(--calcite-color-foreground-1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-8 -8 32 32' width='32' height='32'%3E%3Cpath d='M8 11.207l-4-4V5.793l4 4 4-4v1.414z' fill='%23adadad' fillrule='nonzero'/%3E%3C/svg%3E") 100% no-repeat;border:1px solid #959595;border-radius:0;width:100%;height:32px;margin:0;padding:0 .5em;font-family:inherit;font-size:.85em;display:block}.esri-select[disabled]{cursor:auto}.esri-select::-ms-expand{display:none}.esri-disabled a,.esri-disabled [role=menu],.esri-disabled [role=checkbox],.esri-disabled [class^=esri-icon-],.esri-disabled [class*=" esri-icon-"]{color:var(--calcite-color-text-3)}.keynav-mode .esri-widget:focus,.keynav-mode .esri-widget :focus{z-index:1;outline-offset:2px;outline:2px solid #adadad}.esri-widget__loader-animation{border:.15em solid #adadad4d;border-top-color:var(--calcite-color-border-input);border-radius:100%;width:1em;height:1em;font-size:var(--calcite-font-size-md);animation:1.25s linear infinite esri-rotate;display:block;transform:translateZ(0)}:dir(rtl) .esri-widget__table th{text-align:right;border-left:3px solid #0000000d;border-right:none}:dir(rtl) .esri-select{background-position:0}:dir(rtl) .esri-menu__list-item{border-left:none;border-right:3px solid #0000}:dir(rtl) .esri-menu__list-item [class^=esri-icon-],:dir(rtl) .esri-menu__list-item [class*=" esri-icon-"]{padding-left:2px;padding-right:0}:dir(rtl) .esri-menu__list-item--active{border-right-color:var(--calcite-color-brand)}.esri-icon-font-fallback-text{clip:rect(0 0 0 0);width:1px;height:1px;position:absolute;overflow:hidden}.esri-rotating{animation:1.25s linear infinite esri-rotate;transform:translateZ(0)}.esri-clearfix:before,.esri-clearfix:after{content:" ";display:table}.esri-clearfix:after{clear:both}.esri-interactive{cursor:pointer}.esri-invisible{visibility:hidden!important}.esri-offscreen{position:absolute;top:-999em;left:-999em}.esri-match-height{flex-direction:column;flex:auto;display:flex;overflow:hidden}.esri-hidden{display:none!important}:host{width:240px}.root{--arcgis-internal-search-width: 240px;display:flex;flex-flow:row nowrap;align-items:center;justify-content:center;width:100%}.dropdown{--calcite-color-border-1: var(--calcite-color-border-input);--calcite-dropdown-width: var(--arcgis-internal-search-width);width:31px}.dropdown calcite-button{--calcite-offset-invert-focus: 1}.autocomplete{flex:1}.container{display:flex;position:relative;flex:1 0 100%;flex-flow:row nowrap;align-items:stretch}.form{display:flex;flex:1 0;flex-flow:row nowrap;align-items:stretch;margin:0;padding:0}.submit-button{position:absolute;margin:-1px;border-width:0;padding:0;width:1px;height:1px;overflow:hidden;white-space:nowrap;clip:rect(0,0,0,0)}`,L=S(k);function $(l){return typeof l=="object"&&l!==null&&"openPopup"in l&&"closePopup"in l}var u=class extends _{constructor(){super(...arguments),this.viewModel=L(this),this._currentLocationValue="search-use-current-location",this._autocompleteEl=void 0,this._searchResultRendererEl=void 0,this._searchResultRendererContentEl=void 0,this._suggestController=void 0,this._searchController=void 0,this._lastSearchTerm="",this.messages=M({blocking:!0}),this._locateFailed=!1,this._showNoResults=!1,this.view=this.viewModel.view,this.goToOverride=this.viewModel.goToOverride,this.icon="search",this.activeMenu="none",this.activeSourceIndex=this.viewModel.activeSourceIndex,this.allPlaceholder=this.viewModel.allPlaceholder,this.allSources=this.viewModel.allSources,this.autoNavigateDisabled=this.viewModel.autoNavigate,this.autoSelectDisabled=this.viewModel.autoSelect,this.defaultSources=this.viewModel.defaultSources,this.disabled=!1,this.includeDefaultSourcesDisabled=this.viewModel.includeDefaultSources,this.locationDisabled=this.viewModel.locationEnabled,this.maxResults=this.viewModel.maxResults,this.maxSuggestions=this.viewModel.maxSuggestions,this.minSuggestCharacters=this.viewModel.minSuggestCharacters,this.popupDisabled=this.viewModel.popupEnabled,this.popupTemplate=this.viewModel.popupTemplate,this.portal=this.viewModel.portal,this.resultGraphic=this.viewModel.resultGraphic,this.resultGraphicDisabled=this.viewModel.resultGraphicEnabled,this.results=this.viewModel.results,this.searchAllDisabled=this.viewModel.searchAllEnabled,this.searchTerm=this.viewModel.searchTerm,this.selectedResult=this.viewModel.selectedResult,this.sources=this.viewModel.sources,this.suggestions=this.viewModel.suggestions,this.suggestionsDisabled=this.viewModel.suggestionsEnabled,this.topLayerDisabled=!1,this.autoDestroyDisabled=!1,this.state=this.viewModel.state,this.arcgisPropertyChange=y()("state"),this.arcgisReady=p(),this.arcgisSearchClear=a(()=>this.viewModel,"search-clear"),this.arcgisSearchComplete=a(()=>this.viewModel,"search-complete"),this.arcgisSearchStart=a(()=>this.viewModel,"search-start"),this.arcgisSelectResult=a(()=>this.viewModel,"select-result"),this.arcgisSuggestComplete=a(()=>this.viewModel,"suggest-complete"),this.arcgisSuggestStart=a(()=>this.viewModel,"suggest-start")}static{this.properties={messages:16,_locateFailed:16,_showNoResults:16,_isDisabled:16,_showCurrentLocation:16,_effectiveActiveMenu:16,view:0,referenceElement:1,goToOverride:0,icon:1,activeMenu:1,activeSource:32,activeSourceIndex:9,allPlaceholder:1,allSources:0,autoNavigateDisabled:5,autoSelectDisabled:5,defaultSources:0,disabled:5,includeDefaultSourcesDisabled:5,locationDisabled:5,maxResults:9,maxSuggestions:9,minSuggestCharacters:9,popupDisabled:5,popupTemplate:0,portal:0,resultGraphic:0,resultGraphicDisabled:5,results:0,searchAllDisabled:5,searchTerm:1,selectedResult:0,sources:0,suggestions:32,suggestionsDisabled:5,topLayerDisabled:5,autoDestroyDisabled:5,messageOverrides:0,label:1,state:32}}static{this.styles=A}get _isDisabled(){let{state:e}=this.viewModel;return e==="disabled"||e==="loading"||this.disabled}get _showCurrentLocation(){return!this.locationDisabled&&!this.searchTerm?.trim()}get _effectiveActiveMenu(){return this._isDisabled?"none":this.activeMenu}get activeSource(){return this.viewModel?.activeSource}clear(){this._locateFailed=!1,this.viewModel.clear()}async destroy(){this._closePopup(this.viewModel.resultGraphic),this._cancelQueries(),await this._searchResultRendererEl?.destroy(),await this._searchResultRendererContentEl?.destroy(),await this.manager.destroy()}async search(e){this._cancelQueries();let t=new AbortController,{signal:i}=t;this._searchController=t;try{let r=await this.viewModel.search(e,{signal:i});return this._searchController!==t?void 0:(r?.numResults||(this._showNoResults=!0,this.activeMenu="suggestion"),this._searchController=void 0,r)}catch{if(this._searchController!==t)return;this._searchController=void 0;return}}async suggest(e){this._cancelSuggest();let t=new AbortController,{signal:i}=t;this._suggestController=t;try{let r=await this.viewModel.suggest(e,null,{signal:i});return this._suggestController!==t?void 0:(this._suggestController=void 0,r?.numResults&&(this.activeMenu="suggestion",this._scrollToTopSuggestion()),r)}catch{return this._suggestController!==t||(this._suggestController=void 0),null}}async setFocus(){await this._autocompleteEl?.setFocus()}loaded(){this.manager.onLifecycle(()=>[h(()=>[this._searchResultRendererEl,this.viewModel?.defaultPopupTemplate],()=>{let e=this.viewModel?.defaultPopupTemplate,{_searchResultRendererEl:t}=this;if(e&&t){let i=document.createElement("div");i.appendChild(t),e.content=i,this._searchResultRendererContentEl=t}},{initial:!0}),h(()=>this.messages,e=>this.viewModel.messages=e,{initial:!0}),h(()=>this.viewModel?.resultGraphic,(e,t)=>this._closePopup(t)),T(()=>this.viewModel,"select-result",e=>{let{popupEnabled:t}=e;t&&this._openPopup()})])}_addSearchResultRenderer(){this._searchResultRendererEl=f(o`<arcgis-search-result-renderer auto-destroy-disabled .messages=${this.messages} .viewModel=${this.viewModel}></arcgis-search-result-renderer>`)}_closePopup(e){let{referenceElement:t,view:i}=this;$(t)&&t.popupElement?.selectedFeature===e?t?.closePopup():i?.popup?.selectedFeature===e&&i?.closePopup()}_openPopup(){if($(this.referenceElement)){let{resultGraphic:e,resultLocation:t}=this.viewModel,i={features:e?[e]:[],location:t};this.referenceElement?.openPopup(i)}else if(this.view){let{resultGraphic:e,resultLocation:t}=this.viewModel;this.view.openPopup({features:e?[e]:[],location:t})}}_handleInputKeydown(e){e.key==="Tab"&&this._cancelSuggest()}_handleAutocompleteCreate(e){this._autocompleteEl=e}_handleCalciteAutocompleteTextInput(e){let t=e.target.inputValue;t!==this.viewModel.searchTerm&&(this.viewModel.searchTerm=t,t||this.clear(),this.suggest())}_handleAutocompleteOpen(){this.activeMenu="suggestion"}_handleAutocompleteClose(){this.activeMenu==="suggestion"&&(this.activeMenu="none")}_handleCalciteAutocompleteChange(e){let t=e.target.value;if(t===this._currentLocationValue){this._useCurrentLocation();return}let i=JSON.parse(t),r=this.viewModel.suggestions?.find(({sourceIndex:s})=>s===i.sourceIndex)?.results?.find(({key:s})=>`${s}`==`${i.key}`);r&&this.search(r)}async _useCurrentLocation(){this._cancelQueries();let e=new AbortController,{signal:t}=e;this._searchController=e;try{await this.viewModel.searchNearby({signal:t})}catch(i){D(i)||(this._locateFailed=!0,this.activeMenu="suggestion")}finally{this._searchController=void 0}}_handleSourceOpen(){this.activeMenu="source"}_handleSourceClose(){this.activeMenu==="source"&&(this.activeMenu="none")}_handleSourceSelect(e){let t=e.target.selectedItems[0].getAttribute("data-source-index");t&&(this.viewModel.activeSourceIndex=Number.parseInt(t,10))}_cancelSuggest(){this.activeMenu="none",this._locateFailed=!1,this._showNoResults=!1,this._suggestController=d(this._suggestController)}_cancelQueries(){this._cancelSuggest(),this._searchController=d(this._searchController)}_scrollToTopSuggestion(){this._autocompleteEl?.scrollContentTo({top:0})}_formSubmit(e){e.preventDefault(),this.activeMenu="none",this._lastSearchTerm=this.searchTerm,this.searchTerm&&this.search()}_getSourceName(e){let{messages:t}=this,{allSources:i}=this.viewModel,r=i.at(e);return(e===-1?t.all:r?.name||t.untitledSource)||""}render(){return this._addSearchResultRenderer(),o`<div class=${v(x("root",C.widget))}><div class="container">${this._renderSourcesMenu()}${this._renderForm()}</div></div>`}_renderSourcesMenu(){let{messages:e,_isDisabled:t,_effectiveActiveMenu:i}=this,{allSources:r,searchAllEnabled:s}=this.viewModel;return r.length>1?o`<calcite-dropdown class="dropdown" .disabled=${t} .open=${i==="source"} overlay-positioning=fixed .topLayerDisabled=${this.topLayerDisabled} @calciteDropdownClose=${this._handleSourceClose} @calciteDropdownOpen=${this._handleSourceOpen} @calciteDropdownSelect=${this._handleSourceSelect}><calcite-button appearance=outline-fill icon-start=caret-down kind=neutral .label=${e.searchIn} slot=trigger></calcite-button><calcite-dropdown-group .groupTitle=${e.searchIn}>${s?this._renderSource(-1):null}${r.map((n,c)=>this._renderSource(c)).toArray()}</calcite-dropdown-group></calcite-dropdown>`:null}_renderUseCurrentLocation(){let{_currentLocationValue:e}=this;return o`<calcite-autocomplete-item .heading=${this.messages.useCurrentLocation??""} icon-start=gps-on .value=${e}></calcite-autocomplete-item>`}_renderAutocomplete(){let{_effectiveActiveMenu:e,messages:t,_isDisabled:i}=this,{maxInputLength:r,placeholder:s,searchTerm:n,state:c}=this.viewModel,R=this.label??t.searchButtonTitle??"";return o`<calcite-autocomplete autocomplete=off class="autocomplete" .disabled=${i} .icon=${this.icon||void 0} .inputValue=${n} .label=${R} .loading=${c==="searching"} .maxLength=${r} .name=${this.el.id} @keydown=${this._handleInputKeydown} .open=${e==="suggestion"} overlay-positioning=fixed .placeholder=${s} .topLayerDisabled=${this.topLayerDisabled} title=${(n?"":s)??w} @calciteAutocompleteChange=${this._handleCalciteAutocompleteChange} @calciteAutocompleteClose=${this._handleAutocompleteClose} @calciteAutocompleteOpen=${this._handleAutocompleteOpen} @calciteAutocompleteTextChange=${this._handleCalciteAutocompleteTextInput} @calciteAutocompleteTextInput=${this._handleCalciteAutocompleteTextInput} ${m(this._handleAutocompleteCreate)}>${this._renderSuggestions()}${this._renderNotices()}</calcite-autocomplete>`}_renderForm(){return o`<form class="form" @submit=${this._formSubmit} role=search>${this._renderAutocomplete()}<button class="submit-button" type=submit>${this.label??this.messages.searchButtonTitle??""}</button></form>`}_renderSuggestGroup(e){return e.results?.map(t=>this._renderSuggestion(t))}_renderSuggestions(){let{suggestions:e}=this.viewModel;return this._showNoResults?null:this._showCurrentLocation?this._renderUseCurrentLocation():e?.map(t=>this._renderSuggestResults(t))}_renderSuggestResults(e){let{allSources:t,activeSourceIndex:i}=this.viewModel,{sourceIndex:r}=e,s=e.results?.length,n=t.length>1&&i===-1,c=this._getSourceName(r);return s&&n?o`<calcite-autocomplete-item-group .heading=${c}>${this._renderSuggestGroup(e)}</calcite-autocomplete-item-group>`:this._renderSuggestGroup(e)}_renderSuggestion({key:e,sourceIndex:t,text:i}){let r={key:e,sourceIndex:t};return o`<calcite-autocomplete-item .heading=${i??this.messages.untitledResult??""} .value=${JSON.stringify(r)}></calcite-autocomplete-item>`}_renderSource(e){let t=this._getSourceName(e);return o`<calcite-dropdown-item data-source-index=${`${e}`} .selected=${e===this.viewModel.activeSourceIndex}>${t}</calcite-dropdown-item>`}_renderNoResultsWarning(e){let{messages:t}=this,i=e?E(t.noResultsFoundForValue??"",{value:`"${e}"`}):t.noResultsFound;return o`<calcite-notice icon=exclamation-mark-triangle kind=warning open slot=content-bottom><div slot=title>${t.noResults}</div><div slot=message>${i}</div></calcite-notice>`}_renderLocateError(){return o`<calcite-notice icon=exclamation-mark-circle kind=danger open slot=content-bottom><div slot=message>${this.messages.locateError}</div></calcite-notice>`}_renderNotices(){return this._locateFailed?this._renderLocateError():this._showNoResults?this._renderNoResultsWarning(this._lastSearchTerm??this.viewModel.searchTerm):null}};b("arcgis-search",u);return u},"widgets/Search/SearchViewModel","core/promiseUtils","intl","core/reactiveUtils",a,c,e,h)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{d as h,h as T}from"./IQPGSWSL.js";import j from"./FQY55PPT.js";import{a as p}from"./IGSZABNU.js";import i from"./AFAQWPXY.js";import"./PC4PAQXQ.js";import{a as v}from"./ZDGTAZF7.js";import"./BBIOP3C4.js";import f from"./PP3ZDADO.js";import{a as C}from"./ZRWZ5OQK.js";import{a as g}from"./54VXNFQ4.js";import e from"./6IJGTPXG.js";import d from"./X55JXSXH.js";import{h as _}from"./ZCQAWUVA.js";import"./ATTV2K2S.js";import a from"./IFIOUBWT.js";import"./T5K2XFNK.js";import{O as x,P as u,R as b,U as y,a as w,b as c,x as D}from"./DDD7772O.js";import"./3TTFCHAA.js";export default $arcgis.t(([I,{property:a,subclass:V},{watch:E,whenOnce:L},{forceInteractive:A},,,,M,,O])=>{var R=w`.esri-widget__heading{color:var(--calcite-color-text-2);margin:0 0 .5rem;font-weight:var(--calcite-font-weight-semibold)}h1.esri-widget__heading{font-size:var(--calcite-font-size-xl)}h2.esri-widget__heading{font-size:var(--calcite-font-size-md)}h3.esri-widget__heading,h4.esri-widget__heading,h5.esri-widget__heading,h6.esri-widget__heading{font-size:var(--calcite-font-size)}.esri-widget{box-sizing:border-box;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget *,.esri-widget :before,.esri-widget :after{box-sizing:inherit}.esri-widget.esri-widget--disabled>*{opacity:.4;pointer-events:none}.esri-widget.esri-widget--compact{--esri-widget-padding-y: 0;--esri-widget-padding-x: 0}.esri-widget__anchor{color:var(--calcite-color-text-2)}.esri-widget__anchor:hover{color:var(--calcite-color-text-3)}.esri-widget__anchor:hover,.esri-widget__anchor:focus{text-decoration:underline}.esri-widget__anchor--disabled{opacity:.4;pointer-events:none}.esri-widget__header{background-color:var(--calcite-color-foreground-1);flex:1 0 100%;justify-content:space-between;align-items:center;width:100%;min-height:48px;padding:12px 0 12px 15px;display:flex}.esri-widget__heading{word-break:break-word}.esri-widget__header .esri-widget__heading{width:calc(100% - 48px);text-align:initial;color:var(--calcite-color-text-1);align-items:center;margin:0;padding:0;display:flex}.esri-widget__header-button{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);border:none;flex:0 0 48px;justify-content:center;align-self:stretch;align-items:center;width:48px;padding:0;display:flex}.esri-widget__footer{background-color:var(--calcite-color-foreground-1);justify-content:center;align-items:center;width:100%;min-height:48px;display:flex}.esri-widget__footer-pagination{color:var(--calcite-color-text-2);justify-content:space-between;align-items:center;display:flex}.esri-widget__footer-pagination-previous-button,.esri-widget__footer-pagination-next-button{cursor:pointer;background-color:var(--calcite-color-foreground-1);border:0;margin:0 7px;padding:12px 15px;transition:background-color .125s ease-in-out}.esri-widget__footer-pagination-previous-button:hover,.esri-widget__footer-pagination-previous-button:focus,.esri-widget__footer-pagination-next-button:hover,.esri-widget__footer-pagination-next-button:focus{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1)}.esri-menu{visibility:hidden;z-index:1;background-clip:padding;background-color:var(--calcite-color-foreground-1);background-clip:padding-box;width:100%;max-height:0;margin:2px 0 0;padding:0;font-size:var(--calcite-font-size);line-height:var(--calcite-spacing-xl);position:absolute;top:100%;left:0;overflow:hidden;box-shadow:0 1px 2px #0000004d}.esri-menu .esri-menu__header{color:var(--calcite-color-text-inverse);background-color:var(--calcite-color-inverse);padding:6px 12px}.esri-menu__list{margin:0;padding:0;list-style:none}.esri-menu__list-item{cursor:pointer;border-top:1px solid #adadad4d;border-left:3px solid #0000;padding:.8em 1em}.esri-menu__list-item [class^=esri-icon-],.esri-menu__list-item [class*=" esri-icon-"]{padding-right:2.8px}.esri-menu__list-item:first-child{border-top:none}.esri-menu__list-item--focus,.esri-menu__list-item:hover,.esri-menu__list-item:focus{background-color:var(--calcite-color-foreground-1)}.esri-menu__list-item:active{background-color:var(--calcite-color-foreground-current)}.esri-menu__list-item--active,.esri-menu__list-item--active:hover,.esri-menu__list-item--active:focus{background-color:var(--calcite-color-foreground-1);border-left-color:var(--calcite-color-brand)}.esri-widget__table{border-collapse:collapse;color:var(--calcite-color-text-1);border:none;width:100%;line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget__table tr:nth-child(odd){background-color:var(--calcite-color-transparent)}.esri-widget__table tr:nth-child(2n){background-color:var(--calcite-color-transparent-press)}.esri-widget__table tr a{color:var(--calcite-color-text-2)}.esri-widget__table tr a:hover,.esri-widget__table tr a:focus{color:var(--calcite-color-text-1)}.esri-widget__table tr td,.esri-widget__table tr th{vertical-align:top;word-break:break-word;padding:.5em .7em;font-size:var(--calcite-font-size-sm);font-weight:var(--calcite-font-weight-regular)}.esri-widget__table tr th{text-align:left;border-right:3px solid #0000000d;width:50%}.esri-widget__table tr td{width:50%}.esri-input{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1);border:1px solid #959595;font-size:var(--calcite-font-size)}.esri-input::-ms-clear{display:none}.esri-input::placeholder{opacity:1;color:var(--calcite-color-text-2)}.esri-input:placeholder-shown{text-overflow:ellipsis}.esri-input[type=text],.esri-input[type=password],.esri-input[type=number]{height:32px;padding:0 .5em}calcite-combobox.esri-input{border:none}.esri-widget__content--empty{text-align:center;color:var(--calcite-color-border-input);flex-flow:column wrap;align-items:center;padding:18px 22px;display:flex}.esri-widget__content--empty h1.esri-widget__heading,.esri-widget__content--empty h2.esri-widget__heading,.esri-widget__content--empty h3.esri-widget__heading,.esri-widget__content--empty h4.esri-widget__heading,.esri-widget__content--empty h5.esri-widget__heading{font-weight:var(--calcite-font-weight-regular)}.esri-widget__content-illustration--empty{width:128px;padding:1rem 0}.esri-widget__content-icon--empty{width:32px;padding:.5rem 0}.esri-select{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background:var(--calcite-color-foreground-1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-8 -8 32 32' width='32' height='32'%3E%3Cpath d='M8 11.207l-4-4V5.793l4 4 4-4v1.414z' fill='%23adadad' fillrule='nonzero'/%3E%3C/svg%3E") 100% no-repeat;border:1px solid #959595;border-radius:0;width:100%;height:32px;margin:0;padding:0 .5em;font-family:inherit;font-size:.85em;display:block}.esri-select[disabled]{cursor:auto}.esri-select::-ms-expand{display:none}.esri-disabled a,.esri-disabled [role=menu],.esri-disabled [role=checkbox],.esri-disabled [class^=esri-icon-],.esri-disabled [class*=" esri-icon-"]{color:var(--calcite-color-text-3)}.keynav-mode .esri-widget:focus,.keynav-mode .esri-widget :focus{z-index:1;outline-offset:2px;outline:2px solid #adadad}.esri-widget__loader-animation{border:.15em solid #adadad4d;border-top-color:var(--calcite-color-border-input);border-radius:100%;width:1em;height:1em;font-size:var(--calcite-font-size-md);animation:1.25s linear infinite esri-rotate;display:block;transform:translateZ(0)}:dir(rtl) .esri-widget__table th{text-align:right;border-left:3px solid #0000000d;border-right:none}:dir(rtl) .esri-select{background-position:0}:dir(rtl) .esri-menu__list-item{border-left:none;border-right:3px solid #0000}:dir(rtl) .esri-menu__list-item [class^=esri-icon-],:dir(rtl) .esri-menu__list-item [class*=" esri-icon-"]{padding-left:2px;padding-right:0}:dir(rtl) .esri-menu__list-item--active{border-right-color:var(--calcite-color-brand)}.esri-icon-font-fallback-text{clip:rect(0 0 0 0);width:1px;height:1px;position:absolute;overflow:hidden}.esri-rotating{animation:1.25s linear infinite esri-rotate;transform:translateZ(0)}.esri-clearfix:before,.esri-clearfix:after{content:" ";display:table}.esri-clearfix:after{clear:both}.esri-interactive{cursor:pointer}.esri-hidden{display:none!important}.esri-invisible{visibility:hidden!important}.esri-offscreen{position:absolute;top:-999em;left:-999em}.esri-match-height{flex-direction:column;flex:auto;display:flex;overflow:hidden}.esri-widget--panel{min-width:300px;min-height:32px;padding:var(--arcgis-internal-padding);transition:max-height .25s ease-in-out;overflow-y:auto}:host{position:relative;width:var(--arcgis-internal-panel-width, 300px)}.root{--section-internal-gap: var(--calcite-spacing-md);display:flex;flex-direction:column;gap:var(--calcite-spacing-lg);min-width:var(--arcgis-internal-panel-min-width, 300px);overflow:var(--arcgis-internal-panel-overflow, visible);height:fit-content}:host([visual-scale="s"]) .root{--section-internal-gap: var(--calcite-spacing-sm)}:host([visual-scale="l"]) .root{--section-internal-gap: var(--calcite-spacing-lg)}.time-range-section arcgis-time-of-day-slider{margin-block-end:var(--section-internal-gap)}.time-range-section calcite-label:last-child,.visualization-options-section calcite-label:last-child{--calcite-label-margin-bottom: 0}.date-picker{flex-grow:1;display:block}.visualization-options{flex-direction:column;display:flex;gap:var(--section-internal-gap)}.hidden-config{display:none}`,j=Object.defineProperty,H=Object.getOwnPropertyDescriptor,o=(i,e,s,n)=>{for(var r=n>1?void 0:n?H(e,s):e,l=i.length-1,d;l>=0;l--)(d=i[l])&&(r=(n?d(e,s,r):d(r))||r);return n&&r&&j(e,s,r),r},$=Symbol("interactiveHandle"),t=class extends O{constructor(){super(...arguments),this.supportedViewType="3d",this.unsupportedErrorMessage="The Shadow Cast component is only supported in 3D views.",this.shouldForceInteractive=!1,this.minMinDuration=0,this.maxMinDuration=h(8,"hours","milliseconds"),this.hideShadowDurationTooltip=!1}constructAnalysis(){return new I}initialize(){this.addHandles(E(()=>({analysisView:this.analysisView,tooltipVisible:!this.hideShadowDurationTooltip}),({analysisView:i,tooltipVisible:e})=>{this.removeHandles($),i&&(i.interactive=e,e&&this.addHandles(A(i),$))},{sync:!0,initial:!0}))}get date(){return this.analysis.date}set date(i){this.analysis.date=i}get discreteColor(){return this.analysis.discreteOptions.color}set discreteColor(i){this.analysis.discreteOptions.color=i}get discreteInterval(){return this.analysis.discreteOptions.interval}set discreteInterval(i){this.analysis.discreteOptions.interval=i}get totalDurationColor(){return this.analysis.totalDurationOptions.color}set totalDurationColor(i){this.analysis.totalDurationOptions.color=i}get totalDurationMode(){return this.analysis.totalDurationOptions.mode}set totalDurationMode(i){this.analysis.totalDurationOptions.mode=i}get localDate(){return T(this.view)}get mode(){return this.analysis.mode}set mode(i){this.analysis.mode=i}get startTimeOfDay(){return this.analysis.startTimeOfDay}set startTimeOfDay(i){this.analysis.startTimeOfDay=i}get endTimeOfDay(){return this.analysis.endTimeOfDay}set endTimeOfDay(i){this.analysis.endTimeOfDay=i}get state(){return this.view?.ready&&this.analysisView?"ready":"disabled"}get minDurationColor(){return this.analysis.minDurationOptions.color}set minDurationColor(i){this.analysis.minDurationOptions.color=i}get minDuration(){return this.analysis.minDurationOptions.minDuration}set minDuration(i){this.analysis.minDurationOptions.minDuration=i}get minDurationContextEnabled(){return this.analysis.minDurationOptions.contextEnabled}set minDurationContextEnabled(i){this.analysis.minDurationOptions.contextEnabled=i}get minDurationContextColor(){return this.analysis.minDurationOptions.contextOptions.color}set minDurationContextColor(i){this.analysis.minDurationOptions.contextOptions.color=i}get minDurationContextInterval(){return this.analysis.minDurationOptions.contextOptions.interval}set minDurationContextInterval(i){this.analysis.minDurationOptions.contextOptions.interval=i}get utcOffset(){return this.analysis.utcOffset}set utcOffset(i){this.analysis.utcOffset=i}async getDurationAtScreen(i){return await(await L(()=>this.analysisView)).getDurationAtScreen(i)}};o([a()],t.prototype,"date",1);o([a()],t.prototype,"discreteColor",1);o([a()],t.prototype,"discreteInterval",1);o([a()],t.prototype,"totalDurationColor",1);o([a()],t.prototype,"totalDurationMode",1);o([a()],t.prototype,"localDate",1);o([a()],t.prototype,"mode",1);o([a()],t.prototype,"startTimeOfDay",1);o([a()],t.prototype,"endTimeOfDay",1);o([a()],t.prototype,"state",1);o([a()],t.prototype,"minDurationColor",1);o([a()],t.prototype,"minMinDuration",2);o([a()],t.prototype,"maxMinDuration",2);o([a()],t.prototype,"minDuration",1);o([a()],t.prototype,"minDurationContextEnabled",1);o([a()],t.prototype,"minDurationContextColor",1);o([a()],t.prototype,"minDurationContextInterval",1);o([a()],t.prototype,"utcOffset",1);o([a()],t.prototype,"hideShadowDurationTooltip",2);t=o([V("components.shadow-cast.ShadowCastViewModel")],t);var Z=M(t),f=class extends x{constructor(){super(...arguments),this.viewModel=Z(this),this.messages=C(),this.analysis=this.viewModel.analysis,this.view=this.viewModel.view,this.visualScale="m",this.autoDestroyDisabled=!1,this.endTimeOfDay=this.viewModel.endTimeOfDay,this.headingLevel=4,this.hideTimeRangeSlider=!1,this.hideTimezone=!1,this.hideDatePicker=!1,this.hideShadowDurationTooltip=this.viewModel.hideShadowDurationTooltip,this.hideVisualization=this.viewModel.hideVisualization,this.hideVisualizationOptions=!1,this.hideDiscreteOptions=!1,this.hideDiscreteColorPicker=!1,this.hideDiscreteInterval=!1,this.hideTotalDurationOptions=!1,this.hideTotalDurationColorPicker=!1,this.hideTotalDurationModeSelect=!1,this.hideMinDurationOptions=!1,this.hideMinDurationColorPicker=!1,this.hideMinDurationSlider=!1,this.hideMinDurationContextOptions=!1,this.hideMinDurationContextToggle=!1,this.hideMinDurationContextColorPicker=!1,this.hideMinDurationContextInterval=!1,this.icon="measure-building-height-shadow",this.mode=this.viewModel.mode,this.startTimeOfDay=this.viewModel.startTimeOfDay,this.state=this.viewModel.state,this.utcOffset=this.viewModel.utcOffset,this.discreteColor=this.viewModel.discreteColor,this.discreteInterval=this.viewModel.discreteInterval,this.totalDurationColor=this.viewModel.totalDurationColor,this.totalDurationMode=this.viewModel.totalDurationMode,this.minDuration=this.viewModel.minDuration,this.minDurationColor=this.viewModel.minDurationColor,this.minMinDuration=this.viewModel.minMinDuration,this.maxMinDuration=this.viewModel.maxMinDuration,this.minDurationContextEnabled=this.viewModel.minDurationContextEnabled,this.minDurationContextColor=this.viewModel.minDurationContextColor,this.minDurationContextInterval=this.viewModel.minDurationContextInterval,this.arcgisPropertyChange=_()("state"),this.arcgisReady=D()}static{this.properties={analysis:0,view:0,visualScale:3,autoDestroyDisabled:5,date:1,endTimeOfDay:9,headingLevel:9,hideTimeRangeSlider:5,hideTimezone:5,hideDatePicker:5,hideShadowDurationTooltip:5,hideVisualization:5,hideVisualizationOptions:5,hideDiscreteOptions:5,hideDiscreteColorPicker:5,hideDiscreteInterval:5,hideTotalDurationOptions:5,hideTotalDurationColorPicker:5,hideTotalDurationModeSelect:5,hideMinDurationOptions:5,hideMinDurationColorPicker:5,hideMinDurationSlider:5,hideMinDurationContextOptions:5,hideMinDurationContextToggle:5,hideMinDurationContextColorPicker:5,hideMinDurationContextInterval:5,icon:3,label:1,mode:1,referenceElement:1,startTimeOfDay:9,state:32,utcOffset:9,discreteColor:0,discreteInterval:9,totalDurationColor:0,totalDurationMode:1,minDuration:9,minDurationColor:0,minMinDuration:9,maxMinDuration:9,minDurationContextEnabled:5,minDurationContextColor:0,minDurationContextInterval:9}}static{this.styles=R}get date(){return this.viewModel.date}set date(e){this.viewModel.date=e}async destroy(){await this.manager.destroy()}async getDurationAtScreen(e){return await this.viewModel.getDurationAtScreen(e)}render(){return c`<div aria-label=${this.messages.componentLabel??b} class=${u({root:!0,[g.widget]:!0,[g.widgetDisabled]:this.viewModel.state==="disabled",[g.panel]:!0})} role=presentation>${this._renderTimeRangeSection()}${p({hidden:this.hideVisualizationOptions,children:this._renderVisualizationOptionsSection()})}</div>`}_renderTimeRangeSection(){if(!this.analysis||this.hideTimeRangeSlider&&this.hideDatePicker)return;let{messages:e,utcOffset:s,viewModel:n}=this,r=this.visualScale;return c`<section class="time-range-section">${v({level:this.headingLevel,children:e.timeRangeHeading})}${p({hidden:this.hideTimeRangeSlider,children:this._renderTimeRange()})}${p({hidden:this.hideTimezone,children:c`<calcite-label .scale=${r}>${e.timezoneLabel}<calcite-input-time-zone mode=offset overlay-positioning=fixed .referenceDate=${n.localDate} .scale=${r} .value=${`${h(s??0,"hours","minutes")}`} @calciteInputTimeZoneChange=${l=>{n.utcOffset=+l.target.value/60}}></calcite-input-time-zone></calcite-label>`})}${p({hidden:this.hideDatePicker,children:c`<calcite-label .scale=${r}>${e.dateLabel}<calcite-input-date-picker overlay-positioning=fixed placement=bottom .scale=${r} .valueAsDate=${n.date} @calciteInputDatePickerChange=${l=>{let d=l.currentTarget.valueAsDate;n.date=Array.isArray(d)?d[0]:d}}></calcite-input-date-picker></calcite-label>`})}</section>`}_renderTimeRange(){let{viewModel:e}=this;return c`<arcgis-time-of-day-slider mode=range .startTime=${k(this.startTimeOfDay)} .endTime=${k(this.endTimeOfDay)} .label=${this.messages?.timeRangeSliderLabel} .visualScale=${this.visualScale} @arcgisTimeChange=${({currentTarget:s})=>{e.startTimeOfDay=h(s.startTime,"minutes","milliseconds"),e.endTimeOfDay=h(s.endTime,"minutes","milliseconds")}}></arcgis-time-of-day-slider>`}_renderVisualizationOptionsSection(){let{analysis:e,headingLevel:s,messages:n,viewModel:r}=this;if(!e)return;let{discreteOptions:l,totalDurationOptions:d,minDurationOptions:z}=e,m=(S,P)=>r.mode===S&&!P?void 0:"hidden-config";return c`<section class="visualization-options-section">${v({level:s,children:n.visualizationLabel})}<div class="visualization-options">${this._renderModeSelect()}<div class=${u(m("min-duration",this.hideMinDurationOptions))}><arcgis-shadow-cast-min-duration-config .hideColorPicker=${this.hideMinDurationColorPicker} .hideContextColorPicker=${this.hideMinDurationContextColorPicker} .hideContextInterval=${this.hideMinDurationContextInterval} .hideContextOptions=${this.hideMinDurationContextOptions} .hideContextToggle=${this.hideMinDurationContextToggle} .hideSlider=${this.hideMinDurationSlider} .minMinDuration=${this.minMinDuration} .maxMinDuration=${this.maxMinDuration} .messages=${n} .options=${z} .scale=${this.visualScale}></arcgis-shadow-cast-min-duration-config></div><div class=${u(m("total-duration",this.hideTotalDurationOptions))}><arcgis-shadow-cast-total-duration-config .hideColorPicker=${this.hideTotalDurationColorPicker} .hideModeSelect=${this.hideTotalDurationModeSelect} .messages=${n} .options=${d} .scale=${this.visualScale}></arcgis-shadow-cast-total-duration-config></div><div class=${u(m("discrete",this.hideDiscreteOptions))}><arcgis-shadow-cast-discrete-config .hideColorPicker=${this.hideDiscreteColorPicker} .hideInterval=${this.hideDiscreteInterval} .messages=${n} .options=${l} .scale=${this.visualScale}></arcgis-shadow-cast-discrete-config></div></div></section>`}_renderModeSelect(){let{messages:e,viewModel:s}=this,{mode:n}=s;return c`<calcite-select .label=${e.visualizationLabel??""} .scale=${this.visualScale} @calciteSelectChange=${r=>{let l=r.target.selectedOption?.value;s.mode=l??"min-duration"}}>${[{mode:"min-duration",label:e.minDuration?.optionLabel},{mode:"total-duration",label:e.totalDuration?.optionLabel},{mode:"discrete",label:e.discrete?.optionLabel}].map(({mode:r,label:l})=>c`<calcite-option .selected=${r===n} .value=${r} .label=${l}></calcite-option>`)}</calcite-select>`}};function k(i){return Math.round(h(i,"milliseconds","minutes"))}y("arcgis-shadow-cast",f);return f},"analysis/ShadowCastAnalysis","core/accessorSupport/decorators","core/reactiveUtils","applications/Components/analysisUtils",a,d,e,f,i,j)
|
|
2
|
+
import{d as h,h as T}from"./IQPGSWSL.js";import j from"./MVULTZL6.js";import{a as p}from"./IGSZABNU.js";import i from"./V4RMKJUW.js";import"./PC4PAQXQ.js";import{a as v}from"./ZDGTAZF7.js";import"./BBIOP3C4.js";import f from"./PP3ZDADO.js";import{a as C}from"./ZRWZ5OQK.js";import{a as g}from"./54VXNFQ4.js";import e from"./6IJGTPXG.js";import d from"./X55JXSXH.js";import{h as _}from"./ZCQAWUVA.js";import"./ATTV2K2S.js";import a from"./IFIOUBWT.js";import"./T5K2XFNK.js";import{O as x,P as u,R as b,U as y,a as w,b as c,x as D}from"./DDD7772O.js";import"./3TTFCHAA.js";export default $arcgis.t(([I,{property:a,subclass:V},{watch:E,whenOnce:L},{forceInteractive:A},,,,M,,O])=>{var R=w`.esri-widget__heading{color:var(--calcite-color-text-2);margin:0 0 .5rem;font-weight:var(--calcite-font-weight-semibold)}h1.esri-widget__heading{font-size:var(--calcite-font-size-xl)}h2.esri-widget__heading{font-size:var(--calcite-font-size-md)}h3.esri-widget__heading,h4.esri-widget__heading,h5.esri-widget__heading,h6.esri-widget__heading{font-size:var(--calcite-font-size)}.esri-widget{box-sizing:border-box;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget *,.esri-widget :before,.esri-widget :after{box-sizing:inherit}.esri-widget.esri-widget--disabled>*{opacity:.4;pointer-events:none}.esri-widget.esri-widget--compact{--esri-widget-padding-y: 0;--esri-widget-padding-x: 0}.esri-widget__anchor{color:var(--calcite-color-text-2)}.esri-widget__anchor:hover{color:var(--calcite-color-text-3)}.esri-widget__anchor:hover,.esri-widget__anchor:focus{text-decoration:underline}.esri-widget__anchor--disabled{opacity:.4;pointer-events:none}.esri-widget__header{background-color:var(--calcite-color-foreground-1);flex:1 0 100%;justify-content:space-between;align-items:center;width:100%;min-height:48px;padding:12px 0 12px 15px;display:flex}.esri-widget__heading{word-break:break-word}.esri-widget__header .esri-widget__heading{width:calc(100% - 48px);text-align:initial;color:var(--calcite-color-text-1);align-items:center;margin:0;padding:0;display:flex}.esri-widget__header-button{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);border:none;flex:0 0 48px;justify-content:center;align-self:stretch;align-items:center;width:48px;padding:0;display:flex}.esri-widget__footer{background-color:var(--calcite-color-foreground-1);justify-content:center;align-items:center;width:100%;min-height:48px;display:flex}.esri-widget__footer-pagination{color:var(--calcite-color-text-2);justify-content:space-between;align-items:center;display:flex}.esri-widget__footer-pagination-previous-button,.esri-widget__footer-pagination-next-button{cursor:pointer;background-color:var(--calcite-color-foreground-1);border:0;margin:0 7px;padding:12px 15px;transition:background-color .125s ease-in-out}.esri-widget__footer-pagination-previous-button:hover,.esri-widget__footer-pagination-previous-button:focus,.esri-widget__footer-pagination-next-button:hover,.esri-widget__footer-pagination-next-button:focus{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1)}.esri-menu{visibility:hidden;z-index:1;background-clip:padding;background-color:var(--calcite-color-foreground-1);background-clip:padding-box;width:100%;max-height:0;margin:2px 0 0;padding:0;font-size:var(--calcite-font-size);line-height:var(--calcite-spacing-xl);position:absolute;top:100%;left:0;overflow:hidden;box-shadow:0 1px 2px #0000004d}.esri-menu .esri-menu__header{color:var(--calcite-color-text-inverse);background-color:var(--calcite-color-inverse);padding:6px 12px}.esri-menu__list{margin:0;padding:0;list-style:none}.esri-menu__list-item{cursor:pointer;border-top:1px solid #adadad4d;border-left:3px solid #0000;padding:.8em 1em}.esri-menu__list-item [class^=esri-icon-],.esri-menu__list-item [class*=" esri-icon-"]{padding-right:2.8px}.esri-menu__list-item:first-child{border-top:none}.esri-menu__list-item--focus,.esri-menu__list-item:hover,.esri-menu__list-item:focus{background-color:var(--calcite-color-foreground-1)}.esri-menu__list-item:active{background-color:var(--calcite-color-foreground-current)}.esri-menu__list-item--active,.esri-menu__list-item--active:hover,.esri-menu__list-item--active:focus{background-color:var(--calcite-color-foreground-1);border-left-color:var(--calcite-color-brand)}.esri-widget__table{border-collapse:collapse;color:var(--calcite-color-text-1);border:none;width:100%;line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget__table tr:nth-child(odd){background-color:var(--calcite-color-transparent)}.esri-widget__table tr:nth-child(2n){background-color:var(--calcite-color-transparent-press)}.esri-widget__table tr a{color:var(--calcite-color-text-2)}.esri-widget__table tr a:hover,.esri-widget__table tr a:focus{color:var(--calcite-color-text-1)}.esri-widget__table tr td,.esri-widget__table tr th{vertical-align:top;word-break:break-word;padding:.5em .7em;font-size:var(--calcite-font-size-sm);font-weight:var(--calcite-font-weight-regular)}.esri-widget__table tr th{text-align:left;border-right:3px solid #0000000d;width:50%}.esri-widget__table tr td{width:50%}.esri-input{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1);border:1px solid #959595;font-size:var(--calcite-font-size)}.esri-input::-ms-clear{display:none}.esri-input::placeholder{opacity:1;color:var(--calcite-color-text-2)}.esri-input:placeholder-shown{text-overflow:ellipsis}.esri-input[type=text],.esri-input[type=password],.esri-input[type=number]{height:32px;padding:0 .5em}calcite-combobox.esri-input{border:none}.esri-widget__content--empty{text-align:center;color:var(--calcite-color-border-input);flex-flow:column wrap;align-items:center;padding:18px 22px;display:flex}.esri-widget__content--empty h1.esri-widget__heading,.esri-widget__content--empty h2.esri-widget__heading,.esri-widget__content--empty h3.esri-widget__heading,.esri-widget__content--empty h4.esri-widget__heading,.esri-widget__content--empty h5.esri-widget__heading{font-weight:var(--calcite-font-weight-regular)}.esri-widget__content-illustration--empty{width:128px;padding:1rem 0}.esri-widget__content-icon--empty{width:32px;padding:.5rem 0}.esri-select{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background:var(--calcite-color-foreground-1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-8 -8 32 32' width='32' height='32'%3E%3Cpath d='M8 11.207l-4-4V5.793l4 4 4-4v1.414z' fill='%23adadad' fillrule='nonzero'/%3E%3C/svg%3E") 100% no-repeat;border:1px solid #959595;border-radius:0;width:100%;height:32px;margin:0;padding:0 .5em;font-family:inherit;font-size:.85em;display:block}.esri-select[disabled]{cursor:auto}.esri-select::-ms-expand{display:none}.esri-disabled a,.esri-disabled [role=menu],.esri-disabled [role=checkbox],.esri-disabled [class^=esri-icon-],.esri-disabled [class*=" esri-icon-"]{color:var(--calcite-color-text-3)}.keynav-mode .esri-widget:focus,.keynav-mode .esri-widget :focus{z-index:1;outline-offset:2px;outline:2px solid #adadad}.esri-widget__loader-animation{border:.15em solid #adadad4d;border-top-color:var(--calcite-color-border-input);border-radius:100%;width:1em;height:1em;font-size:var(--calcite-font-size-md);animation:1.25s linear infinite esri-rotate;display:block;transform:translateZ(0)}:dir(rtl) .esri-widget__table th{text-align:right;border-left:3px solid #0000000d;border-right:none}:dir(rtl) .esri-select{background-position:0}:dir(rtl) .esri-menu__list-item{border-left:none;border-right:3px solid #0000}:dir(rtl) .esri-menu__list-item [class^=esri-icon-],:dir(rtl) .esri-menu__list-item [class*=" esri-icon-"]{padding-left:2px;padding-right:0}:dir(rtl) .esri-menu__list-item--active{border-right-color:var(--calcite-color-brand)}.esri-icon-font-fallback-text{clip:rect(0 0 0 0);width:1px;height:1px;position:absolute;overflow:hidden}.esri-rotating{animation:1.25s linear infinite esri-rotate;transform:translateZ(0)}.esri-clearfix:before,.esri-clearfix:after{content:" ";display:table}.esri-clearfix:after{clear:both}.esri-interactive{cursor:pointer}.esri-hidden{display:none!important}.esri-invisible{visibility:hidden!important}.esri-offscreen{position:absolute;top:-999em;left:-999em}.esri-match-height{flex-direction:column;flex:auto;display:flex;overflow:hidden}.esri-widget--panel{min-width:300px;min-height:32px;padding:var(--arcgis-internal-padding);transition:max-height .25s ease-in-out;overflow-y:auto}:host{position:relative;width:var(--arcgis-internal-panel-width, 300px)}.root{--section-internal-gap: var(--calcite-spacing-md);display:flex;flex-direction:column;gap:var(--calcite-spacing-lg);min-width:var(--arcgis-internal-panel-min-width, 300px);overflow:var(--arcgis-internal-panel-overflow, visible);height:fit-content}:host([visual-scale="s"]) .root{--section-internal-gap: var(--calcite-spacing-sm)}:host([visual-scale="l"]) .root{--section-internal-gap: var(--calcite-spacing-lg)}.time-range-section arcgis-time-of-day-slider{margin-block-end:var(--section-internal-gap)}.time-range-section calcite-label:last-child,.visualization-options-section calcite-label:last-child{--calcite-label-margin-bottom: 0}.date-picker{flex-grow:1;display:block}.visualization-options{flex-direction:column;display:flex;gap:var(--section-internal-gap)}.hidden-config{display:none}`,j=Object.defineProperty,H=Object.getOwnPropertyDescriptor,o=(i,e,s,n)=>{for(var r=n>1?void 0:n?H(e,s):e,l=i.length-1,d;l>=0;l--)(d=i[l])&&(r=(n?d(e,s,r):d(r))||r);return n&&r&&j(e,s,r),r},$=Symbol("interactiveHandle"),t=class extends O{constructor(){super(...arguments),this.supportedViewType="3d",this.unsupportedErrorMessage="The Shadow Cast component is only supported in 3D views.",this.shouldForceInteractive=!1,this.minMinDuration=0,this.maxMinDuration=h(8,"hours","milliseconds"),this.hideShadowDurationTooltip=!1}constructAnalysis(){return new I}initialize(){this.addHandles(E(()=>({analysisView:this.analysisView,tooltipVisible:!this.hideShadowDurationTooltip}),({analysisView:i,tooltipVisible:e})=>{this.removeHandles($),i&&(i.interactive=e,e&&this.addHandles(A(i),$))},{sync:!0,initial:!0}))}get date(){return this.analysis.date}set date(i){this.analysis.date=i}get discreteColor(){return this.analysis.discreteOptions.color}set discreteColor(i){this.analysis.discreteOptions.color=i}get discreteInterval(){return this.analysis.discreteOptions.interval}set discreteInterval(i){this.analysis.discreteOptions.interval=i}get totalDurationColor(){return this.analysis.totalDurationOptions.color}set totalDurationColor(i){this.analysis.totalDurationOptions.color=i}get totalDurationMode(){return this.analysis.totalDurationOptions.mode}set totalDurationMode(i){this.analysis.totalDurationOptions.mode=i}get localDate(){return T(this.view)}get mode(){return this.analysis.mode}set mode(i){this.analysis.mode=i}get startTimeOfDay(){return this.analysis.startTimeOfDay}set startTimeOfDay(i){this.analysis.startTimeOfDay=i}get endTimeOfDay(){return this.analysis.endTimeOfDay}set endTimeOfDay(i){this.analysis.endTimeOfDay=i}get state(){return this.view?.ready&&this.analysisView?"ready":"disabled"}get minDurationColor(){return this.analysis.minDurationOptions.color}set minDurationColor(i){this.analysis.minDurationOptions.color=i}get minDuration(){return this.analysis.minDurationOptions.minDuration}set minDuration(i){this.analysis.minDurationOptions.minDuration=i}get minDurationContextEnabled(){return this.analysis.minDurationOptions.contextEnabled}set minDurationContextEnabled(i){this.analysis.minDurationOptions.contextEnabled=i}get minDurationContextColor(){return this.analysis.minDurationOptions.contextOptions.color}set minDurationContextColor(i){this.analysis.minDurationOptions.contextOptions.color=i}get minDurationContextInterval(){return this.analysis.minDurationOptions.contextOptions.interval}set minDurationContextInterval(i){this.analysis.minDurationOptions.contextOptions.interval=i}get utcOffset(){return this.analysis.utcOffset}set utcOffset(i){this.analysis.utcOffset=i}async getDurationAtScreen(i){return await(await L(()=>this.analysisView)).getDurationAtScreen(i)}};o([a()],t.prototype,"date",1);o([a()],t.prototype,"discreteColor",1);o([a()],t.prototype,"discreteInterval",1);o([a()],t.prototype,"totalDurationColor",1);o([a()],t.prototype,"totalDurationMode",1);o([a()],t.prototype,"localDate",1);o([a()],t.prototype,"mode",1);o([a()],t.prototype,"startTimeOfDay",1);o([a()],t.prototype,"endTimeOfDay",1);o([a()],t.prototype,"state",1);o([a()],t.prototype,"minDurationColor",1);o([a()],t.prototype,"minMinDuration",2);o([a()],t.prototype,"maxMinDuration",2);o([a()],t.prototype,"minDuration",1);o([a()],t.prototype,"minDurationContextEnabled",1);o([a()],t.prototype,"minDurationContextColor",1);o([a()],t.prototype,"minDurationContextInterval",1);o([a()],t.prototype,"utcOffset",1);o([a()],t.prototype,"hideShadowDurationTooltip",2);t=o([V("components.shadow-cast.ShadowCastViewModel")],t);var Z=M(t),f=class extends x{constructor(){super(...arguments),this.viewModel=Z(this),this.messages=C(),this.analysis=this.viewModel.analysis,this.view=this.viewModel.view,this.visualScale="m",this.autoDestroyDisabled=!1,this.endTimeOfDay=this.viewModel.endTimeOfDay,this.headingLevel=4,this.hideTimeRangeSlider=!1,this.hideTimezone=!1,this.hideDatePicker=!1,this.hideShadowDurationTooltip=this.viewModel.hideShadowDurationTooltip,this.hideVisualization=this.viewModel.hideVisualization,this.hideVisualizationOptions=!1,this.hideDiscreteOptions=!1,this.hideDiscreteColorPicker=!1,this.hideDiscreteInterval=!1,this.hideTotalDurationOptions=!1,this.hideTotalDurationColorPicker=!1,this.hideTotalDurationModeSelect=!1,this.hideMinDurationOptions=!1,this.hideMinDurationColorPicker=!1,this.hideMinDurationSlider=!1,this.hideMinDurationContextOptions=!1,this.hideMinDurationContextToggle=!1,this.hideMinDurationContextColorPicker=!1,this.hideMinDurationContextInterval=!1,this.icon="measure-building-height-shadow",this.mode=this.viewModel.mode,this.startTimeOfDay=this.viewModel.startTimeOfDay,this.state=this.viewModel.state,this.utcOffset=this.viewModel.utcOffset,this.discreteColor=this.viewModel.discreteColor,this.discreteInterval=this.viewModel.discreteInterval,this.totalDurationColor=this.viewModel.totalDurationColor,this.totalDurationMode=this.viewModel.totalDurationMode,this.minDuration=this.viewModel.minDuration,this.minDurationColor=this.viewModel.minDurationColor,this.minMinDuration=this.viewModel.minMinDuration,this.maxMinDuration=this.viewModel.maxMinDuration,this.minDurationContextEnabled=this.viewModel.minDurationContextEnabled,this.minDurationContextColor=this.viewModel.minDurationContextColor,this.minDurationContextInterval=this.viewModel.minDurationContextInterval,this.arcgisPropertyChange=_()("state"),this.arcgisReady=D()}static{this.properties={analysis:0,view:0,visualScale:3,autoDestroyDisabled:5,date:1,endTimeOfDay:9,headingLevel:9,hideTimeRangeSlider:5,hideTimezone:5,hideDatePicker:5,hideShadowDurationTooltip:5,hideVisualization:5,hideVisualizationOptions:5,hideDiscreteOptions:5,hideDiscreteColorPicker:5,hideDiscreteInterval:5,hideTotalDurationOptions:5,hideTotalDurationColorPicker:5,hideTotalDurationModeSelect:5,hideMinDurationOptions:5,hideMinDurationColorPicker:5,hideMinDurationSlider:5,hideMinDurationContextOptions:5,hideMinDurationContextToggle:5,hideMinDurationContextColorPicker:5,hideMinDurationContextInterval:5,icon:3,label:1,mode:1,referenceElement:1,startTimeOfDay:9,state:32,utcOffset:9,discreteColor:0,discreteInterval:9,totalDurationColor:0,totalDurationMode:1,minDuration:9,minDurationColor:0,minMinDuration:9,maxMinDuration:9,minDurationContextEnabled:5,minDurationContextColor:0,minDurationContextInterval:9}}static{this.styles=R}get date(){return this.viewModel.date}set date(e){this.viewModel.date=e}async destroy(){await this.manager.destroy()}async getDurationAtScreen(e){return await this.viewModel.getDurationAtScreen(e)}render(){return c`<div aria-label=${this.messages.componentLabel??b} class=${u({root:!0,[g.widget]:!0,[g.widgetDisabled]:this.viewModel.state==="disabled",[g.panel]:!0})} role=presentation>${this._renderTimeRangeSection()}${p({hidden:this.hideVisualizationOptions,children:this._renderVisualizationOptionsSection()})}</div>`}_renderTimeRangeSection(){if(!this.analysis||this.hideTimeRangeSlider&&this.hideDatePicker)return;let{messages:e,utcOffset:s,viewModel:n}=this,r=this.visualScale;return c`<section class="time-range-section">${v({level:this.headingLevel,children:e.timeRangeHeading})}${p({hidden:this.hideTimeRangeSlider,children:this._renderTimeRange()})}${p({hidden:this.hideTimezone,children:c`<calcite-label .scale=${r}>${e.timezoneLabel}<calcite-input-time-zone mode=offset overlay-positioning=fixed .referenceDate=${n.localDate} .scale=${r} .value=${`${h(s??0,"hours","minutes")}`} @calciteInputTimeZoneChange=${l=>{n.utcOffset=+l.target.value/60}}></calcite-input-time-zone></calcite-label>`})}${p({hidden:this.hideDatePicker,children:c`<calcite-label .scale=${r}>${e.dateLabel}<calcite-input-date-picker overlay-positioning=fixed placement=bottom .scale=${r} .valueAsDate=${n.date} @calciteInputDatePickerChange=${l=>{let d=l.currentTarget.valueAsDate;n.date=Array.isArray(d)?d[0]:d}}></calcite-input-date-picker></calcite-label>`})}</section>`}_renderTimeRange(){let{viewModel:e}=this;return c`<arcgis-time-of-day-slider mode=range .startTime=${k(this.startTimeOfDay)} .endTime=${k(this.endTimeOfDay)} .label=${this.messages?.timeRangeSliderLabel} .visualScale=${this.visualScale} @arcgisTimeChange=${({currentTarget:s})=>{e.startTimeOfDay=h(s.startTime,"minutes","milliseconds"),e.endTimeOfDay=h(s.endTime,"minutes","milliseconds")}}></arcgis-time-of-day-slider>`}_renderVisualizationOptionsSection(){let{analysis:e,headingLevel:s,messages:n,viewModel:r}=this;if(!e)return;let{discreteOptions:l,totalDurationOptions:d,minDurationOptions:z}=e,m=(S,P)=>r.mode===S&&!P?void 0:"hidden-config";return c`<section class="visualization-options-section">${v({level:s,children:n.visualizationLabel})}<div class="visualization-options">${this._renderModeSelect()}<div class=${u(m("min-duration",this.hideMinDurationOptions))}><arcgis-shadow-cast-min-duration-config .hideColorPicker=${this.hideMinDurationColorPicker} .hideContextColorPicker=${this.hideMinDurationContextColorPicker} .hideContextInterval=${this.hideMinDurationContextInterval} .hideContextOptions=${this.hideMinDurationContextOptions} .hideContextToggle=${this.hideMinDurationContextToggle} .hideSlider=${this.hideMinDurationSlider} .minMinDuration=${this.minMinDuration} .maxMinDuration=${this.maxMinDuration} .messages=${n} .options=${z} .scale=${this.visualScale}></arcgis-shadow-cast-min-duration-config></div><div class=${u(m("total-duration",this.hideTotalDurationOptions))}><arcgis-shadow-cast-total-duration-config .hideColorPicker=${this.hideTotalDurationColorPicker} .hideModeSelect=${this.hideTotalDurationModeSelect} .messages=${n} .options=${d} .scale=${this.visualScale}></arcgis-shadow-cast-total-duration-config></div><div class=${u(m("discrete",this.hideDiscreteOptions))}><arcgis-shadow-cast-discrete-config .hideColorPicker=${this.hideDiscreteColorPicker} .hideInterval=${this.hideDiscreteInterval} .messages=${n} .options=${l} .scale=${this.visualScale}></arcgis-shadow-cast-discrete-config></div></div></section>`}_renderModeSelect(){let{messages:e,viewModel:s}=this,{mode:n}=s;return c`<calcite-select .label=${e.visualizationLabel??""} .scale=${this.visualScale} @calciteSelectChange=${r=>{let l=r.target.selectedOption?.value;s.mode=l??"min-duration"}}>${[{mode:"min-duration",label:e.minDuration?.optionLabel},{mode:"total-duration",label:e.totalDuration?.optionLabel},{mode:"discrete",label:e.discrete?.optionLabel}].map(({mode:r,label:l})=>c`<calcite-option .selected=${r===n} .value=${r} .label=${l}></calcite-option>`)}</calcite-select>`}};function k(i){return Math.round(h(i,"milliseconds","minutes"))}y("arcgis-shadow-cast",f);return f},"analysis/ShadowCastAnalysis","core/accessorSupport/decorators","core/reactiveUtils","applications/Components/analysisUtils",a,d,e,f,i,j)
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import d from"./IJULQXYC.js";import b from"./R3NYK6BO.js";import{a as _}from"./UOOE5336.js";import a from"./V4RMKJUW.js";import{a as F}from"./PC4PAQXQ.js";import{h as y}from"./ZCQAWUVA.js";import"./ATTV2K2S.js";import"./T5K2XFNK.js";import{O as c,S as h,U as m,a as u,b as i,o}from"./DDD7772O.js";import"./3TTFCHAA.js";export default $arcgis.t(([,w,v,I,{getDisplayedSymbol:b},{stripHTML:C},{watch:n},{d:A},,{d:p}])=>{var S=u`calcite-notice{padding:var(--calcite-space-lg)}`,d=class extends c{constructor(){super(...arguments),this._aggregatedGraphicsSet=new Set,this.aggregatedFeatureCount=0,this.aggregatedFeatureItems=[],this.aggregatedFeatures=[],this.autoDestroyDisabled=!1,this.loading=!1,this.selectedAggregateBoundaryFeature=new v({symbol:new I({outline:{width:1.5,color:"cyan"},style:"none"})}),this.arcgisPropertyChange=y()("aggregatedFeatureCount","aggregatedFeatureItems","aggregatedFeatures","loading"),this._renderableAggregatedFeatureItems=[]}static{this.properties={_abortController:16,aggregatedFeatureCount:32,aggregatedFeatureItems:32,aggregatedFeatures:32,autoDestroyDisabled:5,feature:0,flowItems:0,loading:32,map:0,messages:0,selectedAggregateBoundaryFeature:32,spatialReference:0,timeZone:1,view:0}}static{this.styles=S}async destroy(){await this.manager.destroy(),this._cancelQuery(),this._clearAggregatedFeatureItems(),this._removeAggregateBoundaryFeature()}loaded(){this.manager.onLifecycle(()=>[n(()=>[this.feature,this.view],()=>{this._updateAggregatedFeatures()},{initial:!0}),n(()=>this._getAggregatedFeatureItemsHeadingSignature(),()=>this.requestUpdate()),n(()=>this.flowItems?.length,()=>{let{flowItems:e}=this,t=e?.getItemAt((e.length??0)-1)?.graphic??void 0;this._removeSelectedAggregatedFeature(),t&&this._aggregatedGraphicsSet.has(t)&&this._addSelectedAggregatedFeature(t)})])}disconnectedCallback(){super.disconnectedCallback(),this._cancelQuery(),this._clearAggregatedFeatureItems(),this._removeAggregateBoundaryFeature()}_setAggregatedFeatureCount(e){o(()=>this.aggregatedFeatureCount=e)}_setAggregatedFeatureItemsReadOnly(e){o(()=>{this.aggregatedFeatureItems=e}),this._renderableAggregatedFeatureItems=e.filter(t=>!!t.graphic)}_setAggregatedFeatures(e){this._aggregatedGraphicsSet=new Set(e),o(()=>this.aggregatedFeatures=e)}_getAggregatedFeatureItemsHeadingSignature(){let e="";for(let t of this.aggregatedFeatureItems)e+=`${t.heading??""}|`;return e}_setLoading(e){o(()=>this.loading=e)}_cancelQuery(){this._abortController=F(this._abortController),this._setLoading(!1)}_removeBoundaryGraphicFromView(e){e?.graphics.remove(this.selectedAggregateBoundaryFeature)}_clearAggregatedFeatureItems(){this._setAggregatedFeatureItemsReadOnly([]),this._removeSelectedAggregatedFeature()}_resetAggregatedFeaturesState(){this._setAggregatedFeatures([]),this._clearAggregatedFeatureItems(),this._setAggregatedFeatureCount(0),this._removeAggregateBoundaryFeature()}_setAggregatedFeatureItems(e){this._setAggregatedFeatureItemsReadOnly(e.map(t=>new w({graphic:t})))}_setAggregatedFeaturesState(e){this._setAggregatedFeatures(e),this._setAggregatedFeatureItems(e),this._setAggregatedFeatureCount(e.length)}_removeAggregateBoundaryFeature(){this._removeBoundaryGraphicFromView(this._boundaryGraphicView),this.selectedAggregateBoundaryFeature.geometry=null,this._boundaryGraphicView=void 0}_updateAggregateBoundaryFeature(e){let{view:t}=this,a=this._boundaryGraphicView;if(!t){this._removeAggregateBoundaryFeature();return}a!==t&&this._removeBoundaryGraphicFromView(a),this.selectedAggregateBoundaryFeature.geometry=e,this._boundaryGraphicView=t,t.graphics.includes(this.selectedAggregateBoundaryFeature)||t.graphics.add(this.selectedAggregateBoundaryFeature)}async _getLayerViewAndQuery(e){let{view:t}=this,a=p(e);if(!t||!a)return null;let r=await t.whenLayerView(a);if(!r?.createQuery||!r?.queryFeatures||!r?.queryExtent)return null;let s=r.createQuery(),g=e.getObjectId();return s.aggregateIds=g!=null?[g]:[],[r,s]}async _updateAggregatedFeatures(){this._cancelQuery();let{feature:e}=this;if(!e?.isAggregate){this._resetAggregatedFeaturesState();return}let t=await this._getLayerViewAndQuery(e);if(!t){this._resetAggregatedFeaturesState();return}let[a,r]=t,s=new AbortController;this._abortController=s,this._setLoading(!0);try{let[g,l]=await Promise.all([a.queryFeatures(r,{signal:s.signal}),a.queryExtent(r,{signal:s.signal})]);if(this._abortController!==s||s.signal.aborted)return;this._abortController=null,this._setLoading(!1);let f=g.features??[];this._setAggregatedFeaturesState(f),l.extent?this._updateAggregateBoundaryFeature(l.extent):this._removeAggregateBoundaryFeature()}catch(g){if(this._abortController!==s||(this._abortController=null,this._setLoading(!1),A(g)))return;this._resetAggregatedFeaturesState()}}_addFlowItem(e){e&&this.flowItems?.push(e)}async _addSelectedAggregatedFeature(e){let{view:t}=this;if(e&&t){let a=await b(e),r=e.clone();r.symbol=a,this._selectedAggregatedFeature=r,t.graphics.add(this._selectedAggregatedFeature)}}_removeSelectedAggregatedFeature(){this._selectedAggregatedFeature&&this.view&&(this.view.graphics.remove(this._selectedAggregatedFeature),this._selectedAggregatedFeature=void 0)}async _selectFeature(e){let{flowItems:t,view:a}=this;t&&this._addFlowItem(h(_(e,i`<arcgis-feature .autoDestroyDisabled=${this.autoDestroyDisabled} .flowItems=${t} .graphic=${e.graphic} .map=${this.map} .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} .view=${a??void 0}></arcgis-feature>`)))}_renderChevronIconNode(){return i`<calcite-icon flip-rtl icon=chevron-right scale=s slot=content-end></calcite-icon>`}render(){let{_renderableAggregatedFeatureItems:e}=this,{loading:t}=this;return t||e.length>0?i`<calcite-list .loading=${t} display-mode=flat .filterEnabled=${e.length>10} .filterPlaceholder=${this.messages?.aggregatedFeaturesPlaceholder??""} .label=${this.messages?.aggregatedFeatures??""} selection-mode=none>${e.map(a=>i`<calcite-list-item .label=${C(a.heading)??""} @calciteListItemSelect=${()=>this._selectFeature(a)}>${this._renderChevronIconNode()}</calcite-list-item>`)}</calcite-list>`:i`<calcite-notice icon=information kind=brand open scale=s width=full><div slot=message>${this.messages?.noAggregatedFeatures}</div></calcite-notice>`}};m("arcgis-aggregated-features",d);return d},"core/Collection","popup/Feature","Graphic","symbols/SimpleFillSymbol","symbols/support/symbolUtils","applications/Components/stringUtils","core/reactiveUtils",a,b,d)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import b from"./R3NYK6BO.js";import a from"./AFAQWPXY.js";import"./PC4PAQXQ.js";import{a as L}from"./ZRWZ5OQK.js";import{h as S}from"./ZCQAWUVA.js";import"./ATTV2K2S.js";import"./T5K2XFNK.js";import{N as h,O as _,U as k,a as w,b as r,p as l,r as f,s as y,x as d}from"./DDD7772O.js";import"./3TTFCHAA.js";export default $arcgis.t(([n,{watch:E},{substitute:P},I,U,F,$,x,{a:p},{a:T,b:u,d:g,e:C,f:N}])=>{var A=w`:host{height:100%;flex-grow:1}calcite-flow{min-height:var(--arcgis-internal-panel-height-sm, 240px)}calcite-block-group{flex-grow:1;padding-bottom:var(--calcite-spacing-md);background-color:var(--calcite-color-foreground-1)}calcite-block{--calcite-block-content-space: 0;--calcite-block-border-color: transparent;margin:0}calcite-block calcite-combobox,calcite-block calcite-input{margin:0 var(--calcite-spacing-md)}calcite-block calcite-input-message{padding:var(--calcite-spacing-sm) var(--calcite-spacing-md) 0 var(--calcite-spacing-md)}calcite-notice{margin:var(--calcite-spacing-md)}#subnetwork-info-block{margin:var(--calcite-spacing-md) var(--calcite-spacing-md) 0 var(--calcite-spacing-md)}#results-limited-message{padding:var(--calcite-spacing-sm)}.inline-loader{--calcite-loader-spacing: var(--calcite-spacing-md)}.add-spatial-mode{display:flex;flex-direction:column;gap:var(--calcite-spacing-md);margin:var(--calcite-spacing-md)}.heading{color:var(--calcite-color-text-1);margin:0 0 var(--calcite-spacing-md) 0;font-size:var(--calcite-font-size);font-style:normal;font-weight:var(--calcite-font-weight-medium)}`,m=`utility-network-trace-inputs-sketch-${Date.now()}`,D=20,b=class extends _{constructor(){super(...arguments),this._defaultPopupTemplateEnabled=!0,this._messages=L({blocking:!0}),this._layerIdToLayer=new Map,this._startingPoints=new n,this._barriers=new n,this._stoppingPoints=new n,this._subnetworkTraceTypes=new Set(["subnetwork","subnetwork-controller","upstream","downstream","isolation"]),this._removeDuplicateSubnetworkNames=(e,t,i)=>t===0||e.getAttribute("SUBNETWORKNAME")!==i[t-1].getAttribute("SUBNETWORKNAME"),this._hitTestPromise=null,this._displayLimit=20,this._traceLocationStartingRefChange=e=>{e&&(this._traceLocationStartingElement=e)},this._traceLocationBarrierRefChange=e=>{e&&(this._traceLocationBarrierElement=e)},this._traceLocationStoppingRefChange=e=>{e&&(this._traceLocationStoppingElement=e)},this._featuresComponentRefChange=e=>{e&&(this._featuresComponentElement=e)},this._handleFeaturesPropertyChange=({detail:e,target:t})=>{(e.name==="selectedDrillInFeature"||e.name==="selectedFeature")&&(this.selectedFeature=t.selectedDrillInFeature??t.selectedFeature??void 0)},this.candidateFeatures=[],this.compatibleSubnetworkNames=[],this.traceConfigurations=[],this._subnetworkNamesState="ready",this._exceedDisplayLimit=!1,this.autoDestroyDisabled=!1,this.hideActionBar=!1,this.mode="default",this.arcgisPropertyChange=S()("mode"),this.arcgisSelectedNamedTraceConfigurationChange=d(),this.arcgisTraceInputsChange=d(),this.arcgisTraceLocationSelectEnd=d(),this.arcgisTraceLocationSelectStart=d(),this.arcgisUtilityNetworkChange=d()}static{this.properties={selectedFeature:16,candidateFeatures:16,compatibleSubnetworkNames:16,subnetworksTable:16,traceConfigurations:16,utilityNetworks:16,_unTraceConfiguration:16,_error:16,_subnetworkNamesState:16,_activeTraceLocationType:16,_exceedDisplayLimit:16,beforeTraceLocationSelectStart:0,view:0,selectedUtilityNetwork:0,selectedNamedTraceConfiguration:0,autoDestroyDisabled:5,hideActionBar:5,unTraceConfiguration:32,referenceElement:1,mode:3,traceLocationFlagInfos:32,traceLocations:32}}static{this.styles=A}get isSubnetworkNameTraceSelected(){let e=this.selectedNamedTraceConfiguration?.traceType;return!!this.selectedNamedTraceConfiguration?.traceConfiguration?.subnetworkName&&e==="subnetwork"}get selectedSubnetworkName(){return this._unTraceConfiguration?.subnetworkName??void 0}set selectedSubnetworkName(e){this._unTraceConfiguration&&(this._unTraceConfiguration.subnetworkName=e)}get _allLayers(){let{view:e}=this;return e?.map?e.map.allLayers.toArray().concat(e.map.allTables.toArray()):[]}get showStartingPoints(){return!this.isSubnetworkNameTraceSelected}get showStoppingPoints(){let e=this.selectedNamedTraceConfiguration?.traceType;return e==="path"||e==="circuit"}get _subnetworkLayerIds(){let e=this.selectedUtilityNetwork?.dataElement?.domainNetworks;return e?e.map(t=>t.subnetworkLayerId).filter(t=>t!=null&&t>-1):[]}get unTraceConfiguration(){return this._unTraceConfiguration}get traceLocationFlagInfos(){return new n([...this._startingPoints,...this._barriers,...this._stoppingPoints])}get traceLocations(){let e=[];return this.showStartingPoints&&this._startingPoints.forEach(t=>e.push(...this._createTraceLocations(t))),this.showStoppingPoints&&this._stoppingPoints.forEach(t=>e.push(...this._createTraceLocations(t))),this._barriers.forEach(t=>e.push(...this._createTraceLocations(t))),e}async destroy(){this._removeGraphicLayer(m),this._clearTraceLocations(),this._sketchViewModel?.cancel(),this._featuresComponentElement?.destroy(),this._traceLocationStartingElement?.destroy(),this._traceLocationBarrierElement?.destroy(),this._traceLocationStoppingElement?.destroy(),await this.manager.destroy()}load(){this.manager.onLifecycle(()=>[E(()=>this.view?.map,()=>{this._error=void 0,this._setupUtilityNetworks(),this._setupSketchViewModel()},{initial:!0})])}willUpdate(e){e.has("utilityNetworks")&&this._handleUtilityNetworksChange(),e.has("selectedUtilityNetwork")&&(this.arcgisUtilityNetworkChange.emit(),this._handleSelectedUtilityNetworkChange()),e.has("selectedNamedTraceConfiguration")&&(this.arcgisTraceInputsChange.emit(),this.arcgisSelectedNamedTraceConfigurationChange.emit(),this._handleTraceConfigChange()),e.has("selectedSubnetworkName")&&this.arcgisTraceInputsChange.emit()}disconnectedCallback(){super.disconnectedCallback(),this._layerIdToLayer.clear()}_createTraceLocations(e){let t=e.flagProperties.selectedTerminals;return e.flagProperties.terminalConfiguration&&t?.size?Array.from(t,i=>new F({type:e.traceLocation.type,isFilterBarrier:e.traceLocation.isFilterBarrier,globalId:e.traceLocation.globalId,percentAlong:e.traceLocation.percentAlong,terminalId:i})):[e.traceLocation]}_clearTraceLocations(){this._startingPoints.forEach(e=>{e.spatialProperties.flagGraphic&&this.view?.graphics.remove(e.spatialProperties.flagGraphic)}),this._startingPoints.removeAll(),this._barriers.forEach(e=>{e.spatialProperties.flagGraphic&&this.view?.graphics.remove(e.spatialProperties.flagGraphic)}),this._barriers.removeAll(),this._stoppingPoints.forEach(e=>{e.spatialProperties.flagGraphic&&this.view?.graphics.remove(e.spatialProperties.flagGraphic)}),this._stoppingPoints.removeAll()}_createGraphicLayer(e){let{map:t}=this.view;if(!t?.findLayerById(e)){let i=new I({id:e,listMode:"hide",title:e});T(this.view,i)}}_getGraphicLayer(e){let{map:t}=this.view;if(t){let i=t.findLayerById(e);if(g(i))return t.reorder(i,t.layers.length-1),i}return null}_removeGraphicLayer(e){let{map:t}=this.view,i=t?.findLayerById(e);i&&g(i)&&t?.remove(i)}_setSnappingOption(){let{_sketchViewModel:e,_unLayers:t}=this;if(e&&t&&t.length>0){let i=new n;t.forEach(a=>{C(a)?a.sublayers.forEach(s=>{i.add(new $({layer:s,enabled:!0}))}):i.add(new $({layer:a,enabled:!0}))}),e.snappingOptions={enabled:!0,featureEnabled:!0,featureSources:i}}}_initializeSketchViewModel(){let{view:e}=this,t=this._getGraphicLayer(m);return new x({layer:t,view:e})}_setupSketchViewModel(){this._createGraphicLayer(m),this._sketchViewModel=this._initializeSketchViewModel(),this._setSnappingOption()}_clearSubnetworks(){this.selectedSubnetworkName=void 0,this.subnetworksTable=void 0,this.compatibleSubnetworkNames=[]}async _loadSubnetworksTable(){this.subnetworksTable||(this.subnetworksTable=await this.selectedUtilityNetwork?.loadSubnetworksTable())}async _querySubnetworks(){let{subnetworksTable:e}=this;if(!e)return;let t=e.createQuery();t.gdbVersion=this.selectedUtilityNetwork?.gdbVersion,t.where=this._getSubnetworkQueryWhereClause(),t.outFields=["SUBNETWORKNAME"],t.orderByFields=["SUBNETWORKNAME"];let{features:i}=await u(e,t,void 0,!1);this.compatibleSubnetworkNames=i.filter(this._removeDuplicateSubnetworkNames).map(a=>a.getAttribute("SUBNETWORKNAME"))}_getSubnetworkQueryWhereClause(){let e=this._unTraceConfiguration,t=`DOMAINNETWORKNAME = '${e.domainNetworkName}'`,i=`TIERNAME = '${e.tierName}'`;return[t,i].join(" AND ")}async _handleSubnetworkTraceConfigChange(e){await this._loadSubnetworksTable(),await this._querySubnetworks();let{compatibleSubnetworkNames:t}=this;e.subnetworkName&&!t.some(i=>i===e.subnetworkName)&&(this.selectedSubnetworkName=t.at(0))}_selectTraceConfigurationByGuid(e){let t=this.selectedUtilityNetwork?.sharedNamedTraceConfigurations.find(i=>i.globalId===e);if(!t){l("error",this,"`traceConfig` not found in `selectedUtilityNetwork.sharedNamedTraceConfigurations`");return}this.selectedNamedTraceConfiguration=t}async _handleTraceConfigChange(){let{selectedNamedTraceConfiguration:e}=this;if(!(e?.traceConfiguration instanceof U)){l("error",this,f("selectedNamedTraceConfiguration.traceConfiguration")),this._unTraceConfiguration=void 0;return}this._unTraceConfiguration=e.traceConfiguration.clone(),e.traceType==="subnetwork"&&(this._subnetworkNamesState="loading",await this._handleSubnetworkTraceConfigChange(this._unTraceConfiguration),this._subnetworkNamesState="ready")}async _handleSelectedUtilityNetworkChange(){let{selectedUtilityNetwork:e}=this;try{e&&!e.loaded&&await e.load()}catch(t){p(t,this,"Error while loading the selected utility network")}this._clearSubnetworks(),this._setupTraceConfigurations(),this._filterUnLayers(),this._clearTraceLocations()}_setupTraceConfigurations(){this._unTraceConfiguration=void 0,this.selectedNamedTraceConfiguration=void 0,this.traceConfigurations=this.selectedUtilityNetwork?.sharedNamedTraceConfigurations.filter(Boolean).filter(e=>e.traceType!=="path"&&e.traceType!=="circuit").sort((e,t)=>e.title.localeCompare(t.title))||[],this.traceConfigurations.length?this.selectedNamedTraceConfiguration=this.traceConfigurations.at(0):l("error",this,"The selected utility network has no compatible named trace configurations.")}_filterUnLayers(){let{selectedUtilityNetwork:e}=this;this._unLayers=new n(this._allLayers.filter(t=>e?.isUtilityLayer(t)&&!this._subnetworkLayerIds.includes(t.layerId))),this._setSnappingOption()}_handleUtilityNetworksChange(){let{utilityNetworks:e,selectedUtilityNetwork:t}=this;e?.length?(!t||!e.includes(t))&&(this.selectedUtilityNetwork=e.at(0)):(l("error",this,y("utilityNetworks")),this.selectedUtilityNetwork=void 0,this._error=this._messages.errors.noUtilityNetworkError)}async _setupUtilityNetworks(){if(!this.view?.map){l("error",this,"The property `view.map` is required to load utility networks but is missing."),this._error=this._messages.errors.noMapError,this.utilityNetworks=void 0;return}let e=this.view.map;try{e.loaded||await e.load()}catch(t){p(t,this,"Error while loading `view.map`")}finally{this.utilityNetworks=e.utilityNetworks||new n}}_handleTraceLocationSelectStart(e){if(e.stopPropagation(),this.arcgisTraceLocationSelectStart.emit(e.detail).defaultPrevented){e.preventDefault();return}this._activeTraceLocationType=e?.target?.traceLocationType,this.mode="add-spatial-instructions"}_getLayerByLayerId(e){if(e==null)return;let{_layerIdToLayer:t,_unLayers:i}=this;if(t.get(e))return t.get(e);if(!i)return;let a=i.find(s=>"layerId"in s&&s.layerId===e);return a&&t.set(e,a),a}async _queryFeaturesOnLayer(e,t){let i=e.createQuery();i.gdbVersion=this.selectedUtilityNetwork?.gdbVersion,i.objectIds=t.map(s=>s.getObjectId()),i.outFields=["*"];let{features:a}=await u(e,i);return a.forEach(s=>{if(!s.getEffectivePopupTemplate(this._defaultPopupTemplateEnabled)){let o=s.layer;s.popupTemplate=o.createPopupTemplate()}}),a}async _queryFeatures(e){let t=new Map,i=[];return e.forEach(a=>{let s=N(a.layer)?a.layer.parent:a.layer;if(s){let o=this._getLayerByLayerId(s.layerId);if(o){let c=t.get(o)||[];c.push(a),t.set(o,c)}}}),await Promise.all(Array.from(t.keys()).map(async a=>{let s=t.get(a)??[],o=await this._queryFeaturesOnLayer(a,s);i.push(...o)})),i}async _handleHitTestComplete(e){return this._exceedDisplayLimit=e.length>this._displayLimit,this.candidateFeatures=await this._queryFeatures(e.slice(0,this._displayLimit)),this.candidateFeatures.length===0?(this._handleAddSpatialCancelClick(),await Promise.reject(Error("No features found"))):(this.candidateFeatures.length===1&&(this.selectedFeature=this.candidateFeatures.at(0)),this.mode="add-spatial-feature",this._hitTestPromise?.reject(),this._hitTestPromise=Promise.withResolvers(),await this._hitTestPromise.promise)}_handleTraceLocationSelectEnd(e){e.stopPropagation(),this.arcgisTraceLocationSelectEnd.emit(),this._activeTraceLocationType=void 0,this.mode="default",this._handleAddSpatialCancelClick()}_handleAddSpatialCancelClick(e){e?.stopPropagation(),this._featuresComponentElement?.clear(),this._handleFeaturesClose(),this._sketchViewModel?.cancel()}_handleFeaturesClose(){this.mode="default",this.candidateFeatures=[],this.selectedFeature=void 0,this._hitTestPromise?.reject(),this._hitTestPromise=null}_handleAddSpatialAddClick(){let{_hitTestPromise:e,_featuresComponentElement:t,selectedFeature:i}=this;if(e&&t){if(!i)return;e.resolve(i),this._hitTestPromise=null}}renderError(e,t=!1,i){return r`<calcite-notice .closable=${t} kind=danger open scale=s width=auto .icon=${i}><div slot=message>${e}</div></calcite-notice>`}renderLoader(){return r`<calcite-loader label=loading></calcite-loader>`}renderTraceSelection(){let e=this.traceConfigurations.map(i=>r`<calcite-combobox-item .value=${i.globalId} .heading=${i.title} .selected=${i.globalId===this.selectedNamedTraceConfiguration?.globalId}></calcite-combobox-item>`),t=this._messages.labels.traceConfiguration;return r`<calcite-block .heading=${t} .label=${t} expanded><calcite-combobox .label=${t} selection-mode=single-persist @calciteComboboxChange=${({currentTarget:i})=>{this._selectTraceConfigurationByGuid(i.selectedItems[0]?.value)}}>${e}</calcite-combobox></calcite-block>`}renderUtilityNetworkSelection(){let{_messages:e}=this,t=e.labels.utilityNetwork,i=this.utilityNetworks?.map(a=>r`<calcite-combobox-item .value=${a.id} .heading=${a.title||a.id} .selected=${a.id===this.selectedUtilityNetwork?.id}></calcite-combobox-item>`);return r`<calcite-block .heading=${t} .label=${t} expanded><calcite-combobox .label=${t} selection-mode=single-persist @calciteComboboxChange=${({currentTarget:a})=>{let s=a.selectedItems[0]?.value;this.selectedUtilityNetwork?.id!==s&&(this.selectedUtilityNetwork=this.utilityNetworks?.find(o=>o.id===s))}}>${i}</calcite-combobox></calcite-block>`}renderDefaultMode(){let{selectedUtilityNetwork:e}=this,{noMapError:t,noUtilityNetworkError:i}=this._messages.errors,a;return this._error===t||this._error===i?a=this.renderError(this._error,!1,"exclamation-mark-triangle"):!e?.loaded&&!e?.loadError?a=this.renderLoader():a=this.renderContent(),r`<calcite-flow-item .selected=${this.mode==="default"}>${a}</calcite-flow-item>`}renderSpatialSelectInstructions(){let{_messages:e,_activeTraceLocationType:t,mode:i}=this,a=t==="starting-point"?e.labels.addSpatial.startingPoint:t==="barrier"?e.labels.addSpatial.barrier:e.labels.addSpatial.stoppingPoint;return r`<calcite-flow-item .selected=${i==="add-spatial-instructions"} .heading=${a} @calciteFlowItemBack=${s=>this._handleAddSpatialCancelClick(s)}><div class="add-spatial-mode"><div><h5 class="heading">${e.instructions.addSpatial.selectFeature.heading}</h5>${e.instructions.addSpatial.selectFeature.subheading}</div><div><h5 class="heading">${e.instructions.addSpatial.selectAssociatedFeature.heading}</h5>${e.instructions.addSpatial.selectAssociatedFeature.subheading}</div></div></calcite-flow-item>`}renderCandidateFeatures(){let{candidateFeatures:e}=this;if(!e.length)return this.mode="default",null;let t=this._activeTraceLocationType==="starting-point"?this._messages.labels.addSpatial.startingPoint:this._activeTraceLocationType==="barrier"?this._messages.labels.addSpatial.barrier:this._messages.labels.addSpatial.stoppingPoint,i=e.length===1?"feature":"list";return r`<arcgis-features .autoDestroyDisabled=${this.autoDestroyDisabled} .defaultPopupTemplateEnabled=${this._defaultPopupTemplateEnabled} .features=${e} .featureMenuTitle=${t} .hideActionBar=${this.hideActionBar} hide-select-feature .initialDisplayMode=${i} @arcgisClose=${()=>this._handleFeaturesClose()} @arcgisPropertyChange=${this._handleFeaturesPropertyChange} open .referenceElement=${this.referenceElement} .view=${this.view} ${h(this._featuresComponentRefChange)}></arcgis-features>`}renderAddSpatialFooter(){let{mode:e,_messages:t,selectedFeature:i,selectedUtilityNetwork:a}=this,s=e==="add-spatial-feature"&&this._exceedDisplayLimit&&!i,o=P(t.warnings.exceededDisplayLimit,{limit:this._displayLimit.toString()}),c=i?!(a?.isUtilityLayer(i.layer)??!0):!0;return r`${s&&r`<calcite-input-message id=results-limited-message icon=exclamation-mark-circle status=idle>${o}</calcite-input-message>`||""}<calcite-button appearance=outline width=full @click=${()=>this._handleAddSpatialCancelClick()} slot=footer>${t.buttons.cancel}</calcite-button>${e==="add-spatial-feature"&&r`<calcite-button width=full slot=footer appearance=solid @click=${()=>this._handleAddSpatialAddClick()} .disabled=${c}>${t.buttons.add}</calcite-button>`||""}`}renderStartingPointSelection(){return r`<arcgis-utility-network-trace-location .view=${this.view} trace-location-type=starting-point .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisTraceLocationSelectStart=${this._handleTraceLocationSelectStart} @arcgisTraceLocationSelectEnd=${this._handleTraceLocationSelectEnd} @arcgisTraceLocationChange=${()=>this.arcgisTraceInputsChange.emit()} .sketchViewModel=${this._sketchViewModel} .utilityNetwork=${this.selectedUtilityNetwork} .filterLayers=${this._unLayers} .traceLocations=${this._startingPoints} .afterHitTest=${this._handleHitTestComplete.bind(this)} .autoDestroyDisabled=${this.autoDestroyDisabled} ${h(this._traceLocationStartingRefChange)}></arcgis-utility-network-trace-location>`}renderStoppingPointSelection(){return r`<arcgis-utility-network-trace-location .view=${this.view} trace-location-type=stopping-point .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisTraceLocationSelectStart=${this._handleTraceLocationSelectStart} @arcgisTraceLocationSelectEnd=${this._handleTraceLocationSelectEnd} @arcgisTraceLocationChange=${()=>this.arcgisTraceInputsChange.emit()} .sketchViewModel=${this._sketchViewModel} .utilityNetwork=${this.selectedUtilityNetwork} .filterLayers=${this._unLayers} .traceLocations=${this._stoppingPoints} .afterHitTest=${this._handleHitTestComplete.bind(this)} .autoDestroyDisabled=${this.autoDestroyDisabled} ${h(this._traceLocationStoppingRefChange)}></arcgis-utility-network-trace-location>`}renderBarrierSelection(){return r`<arcgis-utility-network-trace-location .view=${this.view} trace-location-type=barrier .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisTraceLocationSelectStart=${this._handleTraceLocationSelectStart} @arcgisTraceLocationSelectEnd=${this._handleTraceLocationSelectEnd} @arcgisTraceLocationChange=${()=>this.arcgisTraceInputsChange.emit()} .sketchViewModel=${this._sketchViewModel} .utilityNetwork=${this.selectedUtilityNetwork} .filterLayers=${this._unLayers} .traceLocations=${this._barriers} .afterHitTest=${this._handleHitTestComplete.bind(this)} .autoDestroyDisabled=${this.autoDestroyDisabled} ${h(this._traceLocationBarrierRefChange)}></arcgis-utility-network-trace-location>`}renderSubnetworkNameInput(){return r`<calcite-input clearable type=text .placeholder=${this._messages.instructions.enterSubnetworkName} max-length=64 .status=${this.selectedSubnetworkName?"valid":"invalid"} .value=${this.selectedSubnetworkName} @calciteInputInput=${e=>this.selectedSubnetworkName=e.target.value}></calcite-input><calcite-input-message icon=exclamation-mark-triangle status=idle>${this._messages.labels.tooManySubnetworks}</calcite-input-message>`}renderSubnetworkSelectList(){return r`<calcite-combobox .label=${this._messages.labels.subnetworkName} selection-mode=single-persist @calciteComboboxChange=${({currentTarget:e})=>{this.selectedSubnetworkName=e.selectedItems[0]?.value}}>${this.compatibleSubnetworkNames.map(e=>r`<calcite-combobox-item .value=${e} .heading=${e} .selected=${e===this.selectedSubnetworkName}></calcite-combobox-item>`)}</calcite-combobox>`}renderSubnetworkSelection(){let{compatibleSubnetworkNames:e}=this,t=this._messages.labels.subnetworkName;return this.isSubnetworkNameTraceSelected?this._subnetworkNamesState==="loading"?r`<calcite-loader class="inline-loader" label=loading scale=s></calcite-loader>`:e.length?r`<calcite-block .heading=${t} .label=${t} expanded>${e.length>D?this.renderSubnetworkNameInput():this.renderSubnetworkSelectList()}</calcite-block>`:this.renderError(this._messages.errors.noCompatibleSubnetworks,!1,"exclamation-mark-triangle"):null}renderSubnetworkInfo(){let{_messages:e,selectedNamedTraceConfiguration:t,_unTraceConfiguration:i}=this;return i&&t?.traceType&&this._subnetworkTraceTypes.has(t.traceType)?r`<calcite-block id=subnetwork-info-block expanded .label=${e.labels.subnetworkInfo}><arcgis-utility-network-subnetwork-info .namedTraceConfig=${t}></arcgis-utility-network-subnetwork-info></calcite-block>`:null}renderContent(){let{utilityNetworks:e}=this,{noTraceConfigurationError:t,utilityNetworkLoadFailed:i}=this._messages.errors,a=this.selectedNamedTraceConfiguration?.traceConfiguration,s=e&&e.length>1?this.renderUtilityNetworkSelection():null,o;this.selectedUtilityNetwork?.loadError?o=this.renderError(i,!1,"exclamation-mark-triangle"):this.traceConfigurations.length||(o=this.renderError(t,!1,"exclamation-mark-triangle"));let c=r`${this.renderTraceSelection()}${this.renderSubnetworkInfo()}${this.renderSubnetworkSelection()}`,v=a?r`${this.showStartingPoints?this.renderStartingPointSelection():null}${this.showStoppingPoints?this.renderStoppingPointSelection():null}${this.renderBarrierSelection()}`:null;return r`<calcite-block-group .label=${this._messages.labels.traceInputs}>${s}${o??r`${c}${v}`}</calcite-block-group>`}render(){let{mode:e}=this;return r`<calcite-panel>${e==="add-spatial-feature"?this.renderCandidateFeatures():null}<calcite-flow .hidden=${e==="add-spatial-feature"}>${this.renderDefaultMode()}${this.renderSpatialSelectInstructions()}</calcite-flow>${e!=="default"?this.renderAddSpatialFooter():null}</calcite-panel>`}};k("arcgis-utility-network-trace-inputs",b);return b},"core/Collection","core/reactiveUtils","intl","layers/GraphicsLayer","networks/support/UNTraceConfiguration","rest/networks/support/TraceLocation","views/interactive/snapping/FeatureSnappingLayerSource","widgets/Sketch/SketchViewModel",a,b)
|
|
2
|
+
import b from"./R3NYK6BO.js";import a from"./V4RMKJUW.js";import"./PC4PAQXQ.js";import{a as L}from"./ZRWZ5OQK.js";import{h as S}from"./ZCQAWUVA.js";import"./ATTV2K2S.js";import"./T5K2XFNK.js";import{N as h,O as _,U as k,a as w,b as r,p as l,r as f,s as y,x as d}from"./DDD7772O.js";import"./3TTFCHAA.js";export default $arcgis.t(([n,{watch:E},{substitute:P},I,U,F,$,x,{a:p},{a:T,b:u,d:g,e:C,f:N}])=>{var A=w`:host{height:100%;flex-grow:1}calcite-flow{min-height:var(--arcgis-internal-panel-height-sm, 240px)}calcite-block-group{flex-grow:1;padding-bottom:var(--calcite-spacing-md);background-color:var(--calcite-color-foreground-1)}calcite-block{--calcite-block-content-space: 0;--calcite-block-border-color: transparent;margin:0}calcite-block calcite-combobox,calcite-block calcite-input{margin:0 var(--calcite-spacing-md)}calcite-block calcite-input-message{padding:var(--calcite-spacing-sm) var(--calcite-spacing-md) 0 var(--calcite-spacing-md)}calcite-notice{margin:var(--calcite-spacing-md)}#subnetwork-info-block{margin:var(--calcite-spacing-md) var(--calcite-spacing-md) 0 var(--calcite-spacing-md)}#results-limited-message{padding:var(--calcite-spacing-sm)}.inline-loader{--calcite-loader-spacing: var(--calcite-spacing-md)}.add-spatial-mode{display:flex;flex-direction:column;gap:var(--calcite-spacing-md);margin:var(--calcite-spacing-md)}.heading{color:var(--calcite-color-text-1);margin:0 0 var(--calcite-spacing-md) 0;font-size:var(--calcite-font-size);font-style:normal;font-weight:var(--calcite-font-weight-medium)}`,m=`utility-network-trace-inputs-sketch-${Date.now()}`,D=20,b=class extends _{constructor(){super(...arguments),this._defaultPopupTemplateEnabled=!0,this._messages=L({blocking:!0}),this._layerIdToLayer=new Map,this._startingPoints=new n,this._barriers=new n,this._stoppingPoints=new n,this._subnetworkTraceTypes=new Set(["subnetwork","subnetwork-controller","upstream","downstream","isolation"]),this._removeDuplicateSubnetworkNames=(e,t,i)=>t===0||e.getAttribute("SUBNETWORKNAME")!==i[t-1].getAttribute("SUBNETWORKNAME"),this._hitTestPromise=null,this._displayLimit=20,this._traceLocationStartingRefChange=e=>{e&&(this._traceLocationStartingElement=e)},this._traceLocationBarrierRefChange=e=>{e&&(this._traceLocationBarrierElement=e)},this._traceLocationStoppingRefChange=e=>{e&&(this._traceLocationStoppingElement=e)},this._featuresComponentRefChange=e=>{e&&(this._featuresComponentElement=e)},this._handleFeaturesPropertyChange=({detail:e,target:t})=>{(e.name==="selectedDrillInFeature"||e.name==="selectedFeature")&&(this.selectedFeature=t.selectedDrillInFeature??t.selectedFeature??void 0)},this.candidateFeatures=[],this.compatibleSubnetworkNames=[],this.traceConfigurations=[],this._subnetworkNamesState="ready",this._exceedDisplayLimit=!1,this.autoDestroyDisabled=!1,this.hideActionBar=!1,this.mode="default",this.arcgisPropertyChange=S()("mode"),this.arcgisSelectedNamedTraceConfigurationChange=d(),this.arcgisTraceInputsChange=d(),this.arcgisTraceLocationSelectEnd=d(),this.arcgisTraceLocationSelectStart=d(),this.arcgisUtilityNetworkChange=d()}static{this.properties={selectedFeature:16,candidateFeatures:16,compatibleSubnetworkNames:16,subnetworksTable:16,traceConfigurations:16,utilityNetworks:16,_unTraceConfiguration:16,_error:16,_subnetworkNamesState:16,_activeTraceLocationType:16,_exceedDisplayLimit:16,beforeTraceLocationSelectStart:0,view:0,selectedUtilityNetwork:0,selectedNamedTraceConfiguration:0,autoDestroyDisabled:5,hideActionBar:5,unTraceConfiguration:32,referenceElement:1,mode:3,traceLocationFlagInfos:32,traceLocations:32}}static{this.styles=A}get isSubnetworkNameTraceSelected(){let e=this.selectedNamedTraceConfiguration?.traceType;return!!this.selectedNamedTraceConfiguration?.traceConfiguration?.subnetworkName&&e==="subnetwork"}get selectedSubnetworkName(){return this._unTraceConfiguration?.subnetworkName??void 0}set selectedSubnetworkName(e){this._unTraceConfiguration&&(this._unTraceConfiguration.subnetworkName=e)}get _allLayers(){let{view:e}=this;return e?.map?e.map.allLayers.toArray().concat(e.map.allTables.toArray()):[]}get showStartingPoints(){return!this.isSubnetworkNameTraceSelected}get showStoppingPoints(){let e=this.selectedNamedTraceConfiguration?.traceType;return e==="path"||e==="circuit"}get _subnetworkLayerIds(){let e=this.selectedUtilityNetwork?.dataElement?.domainNetworks;return e?e.map(t=>t.subnetworkLayerId).filter(t=>t!=null&&t>-1):[]}get unTraceConfiguration(){return this._unTraceConfiguration}get traceLocationFlagInfos(){return new n([...this._startingPoints,...this._barriers,...this._stoppingPoints])}get traceLocations(){let e=[];return this.showStartingPoints&&this._startingPoints.forEach(t=>e.push(...this._createTraceLocations(t))),this.showStoppingPoints&&this._stoppingPoints.forEach(t=>e.push(...this._createTraceLocations(t))),this._barriers.forEach(t=>e.push(...this._createTraceLocations(t))),e}async destroy(){this._removeGraphicLayer(m),this._clearTraceLocations(),this._sketchViewModel?.cancel(),this._featuresComponentElement?.destroy(),this._traceLocationStartingElement?.destroy(),this._traceLocationBarrierElement?.destroy(),this._traceLocationStoppingElement?.destroy(),await this.manager.destroy()}load(){this.manager.onLifecycle(()=>[E(()=>this.view?.map,()=>{this._error=void 0,this._setupUtilityNetworks(),this._setupSketchViewModel()},{initial:!0})])}willUpdate(e){e.has("utilityNetworks")&&this._handleUtilityNetworksChange(),e.has("selectedUtilityNetwork")&&(this.arcgisUtilityNetworkChange.emit(),this._handleSelectedUtilityNetworkChange()),e.has("selectedNamedTraceConfiguration")&&(this.arcgisTraceInputsChange.emit(),this.arcgisSelectedNamedTraceConfigurationChange.emit(),this._handleTraceConfigChange()),e.has("selectedSubnetworkName")&&this.arcgisTraceInputsChange.emit()}disconnectedCallback(){super.disconnectedCallback(),this._layerIdToLayer.clear()}_createTraceLocations(e){let t=e.flagProperties.selectedTerminals;return e.flagProperties.terminalConfiguration&&t?.size?Array.from(t,i=>new F({type:e.traceLocation.type,isFilterBarrier:e.traceLocation.isFilterBarrier,globalId:e.traceLocation.globalId,percentAlong:e.traceLocation.percentAlong,terminalId:i})):[e.traceLocation]}_clearTraceLocations(){this._startingPoints.forEach(e=>{e.spatialProperties.flagGraphic&&this.view?.graphics.remove(e.spatialProperties.flagGraphic)}),this._startingPoints.removeAll(),this._barriers.forEach(e=>{e.spatialProperties.flagGraphic&&this.view?.graphics.remove(e.spatialProperties.flagGraphic)}),this._barriers.removeAll(),this._stoppingPoints.forEach(e=>{e.spatialProperties.flagGraphic&&this.view?.graphics.remove(e.spatialProperties.flagGraphic)}),this._stoppingPoints.removeAll()}_createGraphicLayer(e){let{map:t}=this.view;if(!t?.findLayerById(e)){let i=new I({id:e,listMode:"hide",title:e});T(this.view,i)}}_getGraphicLayer(e){let{map:t}=this.view;if(t){let i=t.findLayerById(e);if(g(i))return t.reorder(i,t.layers.length-1),i}return null}_removeGraphicLayer(e){let{map:t}=this.view,i=t?.findLayerById(e);i&&g(i)&&t?.remove(i)}_setSnappingOption(){let{_sketchViewModel:e,_unLayers:t}=this;if(e&&t&&t.length>0){let i=new n;t.forEach(a=>{C(a)?a.sublayers.forEach(s=>{i.add(new $({layer:s,enabled:!0}))}):i.add(new $({layer:a,enabled:!0}))}),e.snappingOptions={enabled:!0,featureEnabled:!0,featureSources:i}}}_initializeSketchViewModel(){let{view:e}=this,t=this._getGraphicLayer(m);return new x({layer:t,view:e})}_setupSketchViewModel(){this._createGraphicLayer(m),this._sketchViewModel=this._initializeSketchViewModel(),this._setSnappingOption()}_clearSubnetworks(){this.selectedSubnetworkName=void 0,this.subnetworksTable=void 0,this.compatibleSubnetworkNames=[]}async _loadSubnetworksTable(){this.subnetworksTable||(this.subnetworksTable=await this.selectedUtilityNetwork?.loadSubnetworksTable())}async _querySubnetworks(){let{subnetworksTable:e}=this;if(!e)return;let t=e.createQuery();t.gdbVersion=this.selectedUtilityNetwork?.gdbVersion,t.where=this._getSubnetworkQueryWhereClause(),t.outFields=["SUBNETWORKNAME"],t.orderByFields=["SUBNETWORKNAME"];let{features:i}=await u(e,t,void 0,!1);this.compatibleSubnetworkNames=i.filter(this._removeDuplicateSubnetworkNames).map(a=>a.getAttribute("SUBNETWORKNAME"))}_getSubnetworkQueryWhereClause(){let e=this._unTraceConfiguration,t=`DOMAINNETWORKNAME = '${e.domainNetworkName}'`,i=`TIERNAME = '${e.tierName}'`;return[t,i].join(" AND ")}async _handleSubnetworkTraceConfigChange(e){await this._loadSubnetworksTable(),await this._querySubnetworks();let{compatibleSubnetworkNames:t}=this;e.subnetworkName&&!t.some(i=>i===e.subnetworkName)&&(this.selectedSubnetworkName=t.at(0))}_selectTraceConfigurationByGuid(e){let t=this.selectedUtilityNetwork?.sharedNamedTraceConfigurations.find(i=>i.globalId===e);if(!t){l("error",this,"`traceConfig` not found in `selectedUtilityNetwork.sharedNamedTraceConfigurations`");return}this.selectedNamedTraceConfiguration=t}async _handleTraceConfigChange(){let{selectedNamedTraceConfiguration:e}=this;if(!(e?.traceConfiguration instanceof U)){l("error",this,f("selectedNamedTraceConfiguration.traceConfiguration")),this._unTraceConfiguration=void 0;return}this._unTraceConfiguration=e.traceConfiguration.clone(),e.traceType==="subnetwork"&&(this._subnetworkNamesState="loading",await this._handleSubnetworkTraceConfigChange(this._unTraceConfiguration),this._subnetworkNamesState="ready")}async _handleSelectedUtilityNetworkChange(){let{selectedUtilityNetwork:e}=this;try{e&&!e.loaded&&await e.load()}catch(t){p(t,this,"Error while loading the selected utility network")}this._clearSubnetworks(),this._setupTraceConfigurations(),this._filterUnLayers(),this._clearTraceLocations()}_setupTraceConfigurations(){this._unTraceConfiguration=void 0,this.selectedNamedTraceConfiguration=void 0,this.traceConfigurations=this.selectedUtilityNetwork?.sharedNamedTraceConfigurations.filter(Boolean).filter(e=>e.traceType!=="path"&&e.traceType!=="circuit").sort((e,t)=>e.title.localeCompare(t.title))||[],this.traceConfigurations.length?this.selectedNamedTraceConfiguration=this.traceConfigurations.at(0):l("error",this,"The selected utility network has no compatible named trace configurations.")}_filterUnLayers(){let{selectedUtilityNetwork:e}=this;this._unLayers=new n(this._allLayers.filter(t=>e?.isUtilityLayer(t)&&!this._subnetworkLayerIds.includes(t.layerId))),this._setSnappingOption()}_handleUtilityNetworksChange(){let{utilityNetworks:e,selectedUtilityNetwork:t}=this;e?.length?(!t||!e.includes(t))&&(this.selectedUtilityNetwork=e.at(0)):(l("error",this,y("utilityNetworks")),this.selectedUtilityNetwork=void 0,this._error=this._messages.errors.noUtilityNetworkError)}async _setupUtilityNetworks(){if(!this.view?.map){l("error",this,"The property `view.map` is required to load utility networks but is missing."),this._error=this._messages.errors.noMapError,this.utilityNetworks=void 0;return}let e=this.view.map;try{e.loaded||await e.load()}catch(t){p(t,this,"Error while loading `view.map`")}finally{this.utilityNetworks=e.utilityNetworks||new n}}_handleTraceLocationSelectStart(e){if(e.stopPropagation(),this.arcgisTraceLocationSelectStart.emit(e.detail).defaultPrevented){e.preventDefault();return}this._activeTraceLocationType=e?.target?.traceLocationType,this.mode="add-spatial-instructions"}_getLayerByLayerId(e){if(e==null)return;let{_layerIdToLayer:t,_unLayers:i}=this;if(t.get(e))return t.get(e);if(!i)return;let a=i.find(s=>"layerId"in s&&s.layerId===e);return a&&t.set(e,a),a}async _queryFeaturesOnLayer(e,t){let i=e.createQuery();i.gdbVersion=this.selectedUtilityNetwork?.gdbVersion,i.objectIds=t.map(s=>s.getObjectId()),i.outFields=["*"];let{features:a}=await u(e,i);return a.forEach(s=>{if(!s.getEffectivePopupTemplate(this._defaultPopupTemplateEnabled)){let o=s.layer;s.popupTemplate=o.createPopupTemplate()}}),a}async _queryFeatures(e){let t=new Map,i=[];return e.forEach(a=>{let s=N(a.layer)?a.layer.parent:a.layer;if(s){let o=this._getLayerByLayerId(s.layerId);if(o){let c=t.get(o)||[];c.push(a),t.set(o,c)}}}),await Promise.all(Array.from(t.keys()).map(async a=>{let s=t.get(a)??[],o=await this._queryFeaturesOnLayer(a,s);i.push(...o)})),i}async _handleHitTestComplete(e){return this._exceedDisplayLimit=e.length>this._displayLimit,this.candidateFeatures=await this._queryFeatures(e.slice(0,this._displayLimit)),this.candidateFeatures.length===0?(this._handleAddSpatialCancelClick(),await Promise.reject(Error("No features found"))):(this.candidateFeatures.length===1&&(this.selectedFeature=this.candidateFeatures.at(0)),this.mode="add-spatial-feature",this._hitTestPromise?.reject(),this._hitTestPromise=Promise.withResolvers(),await this._hitTestPromise.promise)}_handleTraceLocationSelectEnd(e){e.stopPropagation(),this.arcgisTraceLocationSelectEnd.emit(),this._activeTraceLocationType=void 0,this.mode="default",this._handleAddSpatialCancelClick()}_handleAddSpatialCancelClick(e){e?.stopPropagation(),this._featuresComponentElement?.clear(),this._handleFeaturesClose(),this._sketchViewModel?.cancel()}_handleFeaturesClose(){this.mode="default",this.candidateFeatures=[],this.selectedFeature=void 0,this._hitTestPromise?.reject(),this._hitTestPromise=null}_handleAddSpatialAddClick(){let{_hitTestPromise:e,_featuresComponentElement:t,selectedFeature:i}=this;if(e&&t){if(!i)return;e.resolve(i),this._hitTestPromise=null}}renderError(e,t=!1,i){return r`<calcite-notice .closable=${t} kind=danger open scale=s width=auto .icon=${i}><div slot=message>${e}</div></calcite-notice>`}renderLoader(){return r`<calcite-loader label=loading></calcite-loader>`}renderTraceSelection(){let e=this.traceConfigurations.map(i=>r`<calcite-combobox-item .value=${i.globalId} .heading=${i.title} .selected=${i.globalId===this.selectedNamedTraceConfiguration?.globalId}></calcite-combobox-item>`),t=this._messages.labels.traceConfiguration;return r`<calcite-block .heading=${t} .label=${t} expanded><calcite-combobox .label=${t} selection-mode=single-persist @calciteComboboxChange=${({currentTarget:i})=>{this._selectTraceConfigurationByGuid(i.selectedItems[0]?.value)}}>${e}</calcite-combobox></calcite-block>`}renderUtilityNetworkSelection(){let{_messages:e}=this,t=e.labels.utilityNetwork,i=this.utilityNetworks?.map(a=>r`<calcite-combobox-item .value=${a.id} .heading=${a.title||a.id} .selected=${a.id===this.selectedUtilityNetwork?.id}></calcite-combobox-item>`);return r`<calcite-block .heading=${t} .label=${t} expanded><calcite-combobox .label=${t} selection-mode=single-persist @calciteComboboxChange=${({currentTarget:a})=>{let s=a.selectedItems[0]?.value;this.selectedUtilityNetwork?.id!==s&&(this.selectedUtilityNetwork=this.utilityNetworks?.find(o=>o.id===s))}}>${i}</calcite-combobox></calcite-block>`}renderDefaultMode(){let{selectedUtilityNetwork:e}=this,{noMapError:t,noUtilityNetworkError:i}=this._messages.errors,a;return this._error===t||this._error===i?a=this.renderError(this._error,!1,"exclamation-mark-triangle"):!e?.loaded&&!e?.loadError?a=this.renderLoader():a=this.renderContent(),r`<calcite-flow-item .selected=${this.mode==="default"}>${a}</calcite-flow-item>`}renderSpatialSelectInstructions(){let{_messages:e,_activeTraceLocationType:t,mode:i}=this,a=t==="starting-point"?e.labels.addSpatial.startingPoint:t==="barrier"?e.labels.addSpatial.barrier:e.labels.addSpatial.stoppingPoint;return r`<calcite-flow-item .selected=${i==="add-spatial-instructions"} .heading=${a} @calciteFlowItemBack=${s=>this._handleAddSpatialCancelClick(s)}><div class="add-spatial-mode"><div><h5 class="heading">${e.instructions.addSpatial.selectFeature.heading}</h5>${e.instructions.addSpatial.selectFeature.subheading}</div><div><h5 class="heading">${e.instructions.addSpatial.selectAssociatedFeature.heading}</h5>${e.instructions.addSpatial.selectAssociatedFeature.subheading}</div></div></calcite-flow-item>`}renderCandidateFeatures(){let{candidateFeatures:e}=this;if(!e.length)return this.mode="default",null;let t=this._activeTraceLocationType==="starting-point"?this._messages.labels.addSpatial.startingPoint:this._activeTraceLocationType==="barrier"?this._messages.labels.addSpatial.barrier:this._messages.labels.addSpatial.stoppingPoint,i=e.length===1?"feature":"list";return r`<arcgis-features .autoDestroyDisabled=${this.autoDestroyDisabled} .defaultPopupTemplateEnabled=${this._defaultPopupTemplateEnabled} .features=${e} .featureMenuTitle=${t} .hideActionBar=${this.hideActionBar} hide-select-feature .initialDisplayMode=${i} @arcgisClose=${()=>this._handleFeaturesClose()} @arcgisPropertyChange=${this._handleFeaturesPropertyChange} open .referenceElement=${this.referenceElement} .view=${this.view} ${h(this._featuresComponentRefChange)}></arcgis-features>`}renderAddSpatialFooter(){let{mode:e,_messages:t,selectedFeature:i,selectedUtilityNetwork:a}=this,s=e==="add-spatial-feature"&&this._exceedDisplayLimit&&!i,o=P(t.warnings.exceededDisplayLimit,{limit:this._displayLimit.toString()}),c=i?!(a?.isUtilityLayer(i.layer)??!0):!0;return r`${s&&r`<calcite-input-message id=results-limited-message icon=exclamation-mark-circle status=idle>${o}</calcite-input-message>`||""}<calcite-button appearance=outline width=full @click=${()=>this._handleAddSpatialCancelClick()} slot=footer>${t.buttons.cancel}</calcite-button>${e==="add-spatial-feature"&&r`<calcite-button width=full slot=footer appearance=solid @click=${()=>this._handleAddSpatialAddClick()} .disabled=${c}>${t.buttons.add}</calcite-button>`||""}`}renderStartingPointSelection(){return r`<arcgis-utility-network-trace-location .view=${this.view} trace-location-type=starting-point .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisTraceLocationSelectStart=${this._handleTraceLocationSelectStart} @arcgisTraceLocationSelectEnd=${this._handleTraceLocationSelectEnd} @arcgisTraceLocationChange=${()=>this.arcgisTraceInputsChange.emit()} .sketchViewModel=${this._sketchViewModel} .utilityNetwork=${this.selectedUtilityNetwork} .filterLayers=${this._unLayers} .traceLocations=${this._startingPoints} .afterHitTest=${this._handleHitTestComplete.bind(this)} .autoDestroyDisabled=${this.autoDestroyDisabled} ${h(this._traceLocationStartingRefChange)}></arcgis-utility-network-trace-location>`}renderStoppingPointSelection(){return r`<arcgis-utility-network-trace-location .view=${this.view} trace-location-type=stopping-point .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisTraceLocationSelectStart=${this._handleTraceLocationSelectStart} @arcgisTraceLocationSelectEnd=${this._handleTraceLocationSelectEnd} @arcgisTraceLocationChange=${()=>this.arcgisTraceInputsChange.emit()} .sketchViewModel=${this._sketchViewModel} .utilityNetwork=${this.selectedUtilityNetwork} .filterLayers=${this._unLayers} .traceLocations=${this._stoppingPoints} .afterHitTest=${this._handleHitTestComplete.bind(this)} .autoDestroyDisabled=${this.autoDestroyDisabled} ${h(this._traceLocationStoppingRefChange)}></arcgis-utility-network-trace-location>`}renderBarrierSelection(){return r`<arcgis-utility-network-trace-location .view=${this.view} trace-location-type=barrier .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisTraceLocationSelectStart=${this._handleTraceLocationSelectStart} @arcgisTraceLocationSelectEnd=${this._handleTraceLocationSelectEnd} @arcgisTraceLocationChange=${()=>this.arcgisTraceInputsChange.emit()} .sketchViewModel=${this._sketchViewModel} .utilityNetwork=${this.selectedUtilityNetwork} .filterLayers=${this._unLayers} .traceLocations=${this._barriers} .afterHitTest=${this._handleHitTestComplete.bind(this)} .autoDestroyDisabled=${this.autoDestroyDisabled} ${h(this._traceLocationBarrierRefChange)}></arcgis-utility-network-trace-location>`}renderSubnetworkNameInput(){return r`<calcite-input clearable type=text .placeholder=${this._messages.instructions.enterSubnetworkName} max-length=64 .status=${this.selectedSubnetworkName?"valid":"invalid"} .value=${this.selectedSubnetworkName} @calciteInputInput=${e=>this.selectedSubnetworkName=e.target.value}></calcite-input><calcite-input-message icon=exclamation-mark-triangle status=idle>${this._messages.labels.tooManySubnetworks}</calcite-input-message>`}renderSubnetworkSelectList(){return r`<calcite-combobox .label=${this._messages.labels.subnetworkName} selection-mode=single-persist @calciteComboboxChange=${({currentTarget:e})=>{this.selectedSubnetworkName=e.selectedItems[0]?.value}}>${this.compatibleSubnetworkNames.map(e=>r`<calcite-combobox-item .value=${e} .heading=${e} .selected=${e===this.selectedSubnetworkName}></calcite-combobox-item>`)}</calcite-combobox>`}renderSubnetworkSelection(){let{compatibleSubnetworkNames:e}=this,t=this._messages.labels.subnetworkName;return this.isSubnetworkNameTraceSelected?this._subnetworkNamesState==="loading"?r`<calcite-loader class="inline-loader" label=loading scale=s></calcite-loader>`:e.length?r`<calcite-block .heading=${t} .label=${t} expanded>${e.length>D?this.renderSubnetworkNameInput():this.renderSubnetworkSelectList()}</calcite-block>`:this.renderError(this._messages.errors.noCompatibleSubnetworks,!1,"exclamation-mark-triangle"):null}renderSubnetworkInfo(){let{_messages:e,selectedNamedTraceConfiguration:t,_unTraceConfiguration:i}=this;return i&&t?.traceType&&this._subnetworkTraceTypes.has(t.traceType)?r`<calcite-block id=subnetwork-info-block expanded .label=${e.labels.subnetworkInfo}><arcgis-utility-network-subnetwork-info .namedTraceConfig=${t}></arcgis-utility-network-subnetwork-info></calcite-block>`:null}renderContent(){let{utilityNetworks:e}=this,{noTraceConfigurationError:t,utilityNetworkLoadFailed:i}=this._messages.errors,a=this.selectedNamedTraceConfiguration?.traceConfiguration,s=e&&e.length>1?this.renderUtilityNetworkSelection():null,o;this.selectedUtilityNetwork?.loadError?o=this.renderError(i,!1,"exclamation-mark-triangle"):this.traceConfigurations.length||(o=this.renderError(t,!1,"exclamation-mark-triangle"));let c=r`${this.renderTraceSelection()}${this.renderSubnetworkInfo()}${this.renderSubnetworkSelection()}`,v=a?r`${this.showStartingPoints?this.renderStartingPointSelection():null}${this.showStoppingPoints?this.renderStoppingPointSelection():null}${this.renderBarrierSelection()}`:null;return r`<calcite-block-group .label=${this._messages.labels.traceInputs}>${s}${o??r`${c}${v}`}</calcite-block-group>`}render(){let{mode:e}=this;return r`<calcite-panel>${e==="add-spatial-feature"?this.renderCandidateFeatures():null}<calcite-flow .hidden=${e==="add-spatial-feature"}>${this.renderDefaultMode()}${this.renderSpatialSelectInstructions()}</calcite-flow>${e!=="default"?this.renderAddSpatialFooter():null}</calcite-panel>`}};k("arcgis-utility-network-trace-inputs",b);return b},"core/Collection","core/reactiveUtils","intl","layers/GraphicsLayer","networks/support/UNTraceConfiguration","rest/networks/support/TraceLocation","views/interactive/snapping/FeatureSnappingLayerSource","widgets/Sketch/SketchViewModel",a,b)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a as V,b as $,e as u,g as m,j as S,k as U}from"./S4I3X6AX.js";import j from"./FQY55PPT.js";import{a as g}from"./IGSZABNU.js";import i from"./AFAQWPXY.js";import"./PC4PAQXQ.js";import h from"./PP3ZDADO.js";import{a as z}from"./ZRWZ5OQK.js";import{a as p}from"./54VXNFQ4.js";import e from"./6IJGTPXG.js";import d from"./X55JXSXH.js";import{h as y}from"./ZCQAWUVA.js";import"./ATTV2K2S.js";import a from"./IFIOUBWT.js";import"./T5K2XFNK.js";import{O as f,P as v,R as b,U as x,a as _,b as c,x as w}from"./DDD7772O.js";import"./3TTFCHAA.js";export default $arcgis.t(([D,{property:n,subclass:E},{watch:j},A,,,,O,{f:k},M])=>{var L=_`.esri-widget__heading{color:var(--calcite-color-text-2);margin:0 0 .5rem;font-weight:var(--calcite-font-weight-semibold)}h1.esri-widget__heading{font-size:var(--calcite-font-size-xl)}h2.esri-widget__heading{font-size:var(--calcite-font-size-md)}h3.esri-widget__heading,h4.esri-widget__heading,h5.esri-widget__heading,h6.esri-widget__heading{font-size:var(--calcite-font-size)}.esri-widget{box-sizing:border-box;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget *,.esri-widget :before,.esri-widget :after{box-sizing:inherit}.esri-widget.esri-widget--disabled>*{opacity:.4;pointer-events:none}.esri-widget.esri-widget--compact{--esri-widget-padding-y: 0;--esri-widget-padding-x: 0}.esri-widget__anchor{color:var(--calcite-color-text-2)}.esri-widget__anchor:hover{color:var(--calcite-color-text-3)}.esri-widget__anchor:hover,.esri-widget__anchor:focus{text-decoration:underline}.esri-widget__anchor--disabled{opacity:.4;pointer-events:none}.esri-widget__header{background-color:var(--calcite-color-foreground-1);flex:1 0 100%;justify-content:space-between;align-items:center;width:100%;min-height:48px;padding:12px 0 12px 15px;display:flex}.esri-widget__heading{word-break:break-word}.esri-widget__header .esri-widget__heading{width:calc(100% - 48px);text-align:initial;color:var(--calcite-color-text-1);align-items:center;margin:0;padding:0;display:flex}.esri-widget__header-button{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);border:none;flex:0 0 48px;justify-content:center;align-self:stretch;align-items:center;width:48px;padding:0;display:flex}.esri-widget__footer{background-color:var(--calcite-color-foreground-1);justify-content:center;align-items:center;width:100%;min-height:48px;display:flex}.esri-widget__footer-pagination{color:var(--calcite-color-text-2);justify-content:space-between;align-items:center;display:flex}.esri-widget__footer-pagination-previous-button,.esri-widget__footer-pagination-next-button{cursor:pointer;background-color:var(--calcite-color-foreground-1);border:0;margin:0 7px;padding:12px 15px;transition:background-color .125s ease-in-out}.esri-widget__footer-pagination-previous-button:hover,.esri-widget__footer-pagination-previous-button:focus,.esri-widget__footer-pagination-next-button:hover,.esri-widget__footer-pagination-next-button:focus{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1)}.esri-menu{visibility:hidden;z-index:1;background-clip:padding;background-color:var(--calcite-color-foreground-1);background-clip:padding-box;width:100%;max-height:0;margin:2px 0 0;padding:0;font-size:var(--calcite-font-size);line-height:var(--calcite-spacing-xl);position:absolute;top:100%;left:0;overflow:hidden;box-shadow:0 1px 2px #0000004d}.esri-menu .esri-menu__header{color:var(--calcite-color-text-inverse);background-color:var(--calcite-color-inverse);padding:6px 12px}.esri-menu__list{margin:0;padding:0;list-style:none}.esri-menu__list-item{cursor:pointer;border-top:1px solid #adadad4d;border-left:3px solid #0000;padding:.8em 1em}.esri-menu__list-item [class^=esri-icon-],.esri-menu__list-item [class*=" esri-icon-"]{padding-right:2.8px}.esri-menu__list-item:first-child{border-top:none}.esri-menu__list-item--focus,.esri-menu__list-item:hover,.esri-menu__list-item:focus{background-color:var(--calcite-color-foreground-1)}.esri-menu__list-item:active{background-color:var(--calcite-color-foreground-current)}.esri-menu__list-item--active,.esri-menu__list-item--active:hover,.esri-menu__list-item--active:focus{background-color:var(--calcite-color-foreground-1);border-left-color:var(--calcite-color-brand)}.esri-widget__table{border-collapse:collapse;color:var(--calcite-color-text-1);border:none;width:100%;line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget__table tr:nth-child(odd){background-color:var(--calcite-color-transparent)}.esri-widget__table tr:nth-child(2n){background-color:var(--calcite-color-transparent-press)}.esri-widget__table tr a{color:var(--calcite-color-text-2)}.esri-widget__table tr a:hover,.esri-widget__table tr a:focus{color:var(--calcite-color-text-1)}.esri-widget__table tr td,.esri-widget__table tr th{vertical-align:top;word-break:break-word;padding:.5em .7em;font-size:var(--calcite-font-size-sm);font-weight:var(--calcite-font-weight-regular)}.esri-widget__table tr th{text-align:left;border-right:3px solid #0000000d;width:50%}.esri-widget__table tr td{width:50%}.esri-input{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1);border:1px solid #959595;font-size:var(--calcite-font-size)}.esri-input::-ms-clear{display:none}.esri-input::placeholder{opacity:1;color:var(--calcite-color-text-2)}.esri-input:placeholder-shown{text-overflow:ellipsis}.esri-input[type=text],.esri-input[type=password],.esri-input[type=number]{height:32px;padding:0 .5em}calcite-combobox.esri-input{border:none}.esri-widget__content--empty{text-align:center;color:var(--calcite-color-border-input);flex-flow:column wrap;align-items:center;padding:18px 22px;display:flex}.esri-widget__content--empty h1.esri-widget__heading,.esri-widget__content--empty h2.esri-widget__heading,.esri-widget__content--empty h3.esri-widget__heading,.esri-widget__content--empty h4.esri-widget__heading,.esri-widget__content--empty h5.esri-widget__heading{font-weight:var(--calcite-font-weight-regular)}.esri-widget__content-illustration--empty{width:128px;padding:1rem 0}.esri-widget__content-icon--empty{width:32px;padding:.5rem 0}.esri-select{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background:var(--calcite-color-foreground-1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-8 -8 32 32' width='32' height='32'%3E%3Cpath d='M8 11.207l-4-4V5.793l4 4 4-4v1.414z' fill='%23adadad' fillrule='nonzero'/%3E%3C/svg%3E") 100% no-repeat;border:1px solid #959595;border-radius:0;width:100%;height:32px;margin:0;padding:0 .5em;font-family:inherit;font-size:.85em;display:block}.esri-select[disabled]{cursor:auto}.esri-select::-ms-expand{display:none}.esri-disabled a,.esri-disabled [role=menu],.esri-disabled [role=checkbox],.esri-disabled [class^=esri-icon-],.esri-disabled [class*=" esri-icon-"]{color:var(--calcite-color-text-3)}.keynav-mode .esri-widget:focus,.keynav-mode .esri-widget :focus{z-index:1;outline-offset:2px;outline:2px solid #adadad}.esri-widget__loader-animation{border:.15em solid #adadad4d;border-top-color:var(--calcite-color-border-input);border-radius:100%;width:1em;height:1em;font-size:var(--calcite-font-size-md);animation:1.25s linear infinite esri-rotate;display:block;transform:translateZ(0)}:dir(rtl) .esri-widget__table th{text-align:right;border-left:3px solid #0000000d;border-right:none}:dir(rtl) .esri-select{background-position:0}:dir(rtl) .esri-menu__list-item{border-left:none;border-right:3px solid #0000}:dir(rtl) .esri-menu__list-item [class^=esri-icon-],:dir(rtl) .esri-menu__list-item [class*=" esri-icon-"]{padding-left:2px;padding-right:0}:dir(rtl) .esri-menu__list-item--active{border-right-color:var(--calcite-color-brand)}.esri-icon-font-fallback-text{clip:rect(0 0 0 0);width:1px;height:1px;position:absolute;overflow:hidden}.esri-rotating{animation:1.25s linear infinite esri-rotate;transform:translateZ(0)}.esri-clearfix:before,.esri-clearfix:after{content:" ";display:table}.esri-clearfix:after{clear:both}.esri-interactive{cursor:pointer}.esri-hidden{display:none!important}.esri-invisible{visibility:hidden!important}.esri-offscreen{position:absolute;top:-999em;left:-999em}.esri-match-height{flex-direction:column;flex:auto;display:flex;overflow:hidden}.esri-widget--panel{min-width:300px;min-height:32px;padding:var(--arcgis-internal-padding);transition:max-height .25s ease-in-out;overflow-y:auto}.esri-unit-select{width:100%}.esri-unit-select__label{--calcite-label-margin-bottom: 0;width:100%}:host{display:block}.esri-measurement-widget-content{padding:var(--arcgis-internal-padding);flex-direction:column;gap:var(--calcite-spacing-xxl);display:flex;position:relative;overflow-y:auto}.esri-measurement-widget-content__error{color:var(--calcite-color-status-danger)}.esri-measurement-widget-content__error,.esri-measurement-widget-content__hint{overflow:hidden}.esri-measurement-widget-content__error p,.esri-measurement-widget-content__hint p{margin:0;padding:0}.esri-measurement-widget-content__hint,.esri-measurement-widget-content__error,.esri-measurement-widget-content__measurement,.esri-measurement-widget-content__measurement-item{flex-direction:column;gap:var(--calcite-spacing-md);animation:.25s ease-in-out esri-fade-in;display:flex}.esri-measurement-widget-content__measurement-item--disabled{color:var(--calcite-color-border-ghost)}.esri-measurement-widget-content__measurement-item__value{font-weight:var(--calcite-font-weight-semibold)}.esri-measurement-widget-content__actions{flex-direction:column;justify-content:center;gap:var(--calcite-spacing-xs);display:flex}:host{.esri-widget--panel{min-width:0}}`,B=Object.defineProperty,P=Object.getOwnPropertyDescriptor,a=(i,e,l,o)=>{for(var t=o>1?void 0:o?P(e,l):e,s=i.length-1,d;s>=0;s--)(d=i[s])&&(t=(o?d(e,l,t):d(t))||t);return o&&t&&B(e,l,t),t},r=class extends M{constructor(){super(...arguments),this.snappingOptions=new A,this.supportedViewType="2d",this.unsupportedErrorMessage="The Area Measurement 2D component is only supported in 2D views.",this.shouldForceInteractive=!1}initialize(){this.addHandles([j(()=>({analysis:this.analysis,unit:this._userUnit}),({analysis:i,unit:e})=>{e&&(i.unit=e)},{sync:!0,initial:!0}),j(()=>({analysisView:this.analysisView,snappingOptions:this.snappingOptions}),({analysisView:i,snappingOptions:e})=>{i&&"snappingOptions"in i&&(i.snappingOptions=e)},{sync:!0,initial:!0})])}get state(){let{analysis:i,disabled:e,operationState:l,ready:o,supported:t}=this,{valid:s}=i;return V({supported:t,disabled:e,ready:o,operationState:l,valid:s})}get displayState(){return $(this.state,!!this.analysis.geometry)}get measurement(){return{mode:this.analysisView?.result?.mode??"euclidean",area:m(this.analysis.valid?this.analysisView?.result?.area:void 0),perimeter:m(this.analysis.valid?this.analysisView?.result?.perimeter:void 0)}}get unitOptions(){return S(this._userUnitOptions,u,u)}set unitOptions(i){this._userUnitOptions=i}get unit(){return U(this._userUnit,this.analysis.unit,this.unitOptions,this.defaultMeasurementSystem)}set unit(i){this._userUnit=i}async place(i){this.analysisView&&(await this.analysisView.place(i),this.analysisView.interactive=!0)}clearAnalysis(){this.analysis.geometry=null}constructAnalysis(){return new D}};a([n({readOnly:!0})],r.prototype,"state",1);a([n({readOnly:!0})],r.prototype,"displayState",1);a([n()],r.prototype,"measurement",1);a([n({type:A})],r.prototype,"snappingOptions",2);a([n()],r.prototype,"unitOptions",1);a([n()],r.prototype,"_userUnitOptions",2);a([n()],r.prototype,"unit",1);a([n()],r.prototype,"_userUnit",2);r=a([E("components.area-measurement-2d.AreaMeasurement2dViewModel")],r);var Z=O(r),h=class extends f{constructor(){super(...arguments),this.viewModel=Z(this),this.messages=z({name:"area-measurement-2d",blocking:!0}),this.view=this.viewModel.view,this.analysis=this.viewModel.analysis,this.autoDestroyDisabled=!1,this.hideStartButton=!1,this.hideUnitSelect=!1,this.hideVisualization=this.viewModel.hideVisualization,this.icon="measure-area",this.snappingOptions=this.viewModel.snappingOptions,this.state=this.viewModel.state,this.unit=this.viewModel.unit,this.unitOptions=this.viewModel.unitOptions,this.arcgisPropertyChange=y()("analysis","state"),this.arcgisReady=w()}static{this.properties={view:0,analysis:0,autoDestroyDisabled:5,hideStartButton:5,hideUnitSelect:5,hideVisualization:5,icon:3,label:1,referenceElement:1,snappingOptions:0,state:32,unit:1,unitOptions:0}}static{this.styles=L}async clear(){this.viewModel.clear()}async destroy(){await this.manager.destroy()}async start(){k(this.viewModel.start())}render(){let{messages:e,unit:l,unitOptions:o,viewModel:t}=this,{measurement:s,state:d}=t;return c`<div aria-label=${e.componentLabel??b} class=${v({[p.widget]:!0,[p.panel]:!0})} role=presentation><arcgis-measurement-content .state=${t.displayState} .hintLabel=${e.hint} .unsupportedLabel=${e.unsupported} .items=${[{title:e.area,measurement:s.area},{title:e.perimeter,measurement:s.perimeter}]}>${g({hidden:this.hideUnitSelect,children:c`<arcgis-unit-select slot=settings .options=${o} .selectLabel=${e.unit} .value=${l} @arcgisUnitSelectChange=${C=>{this.unit=C.detail}}></arcgis-unit-select>`})}${g({hidden:this.hideStartButton,children:c`<calcite-button slot=actions .disabled=${d==="unsupported"||d==="disabled"} @click=${this.start}>${e.newMeasurement}</calcite-button>`})}</arcgis-measurement-content></div>`}};x("arcgis-area-measurement-2d",h);return h},"analysis/AreaMeasurementAnalysis","core/accessorSupport/decorators","core/reactiveUtils","views/interactive/snapping/SnappingOptions",a,d,e,h,i,j)
|
|
2
|
+
import{a as V,b as $,e as u,g as m,j as S,k as U}from"./S4I3X6AX.js";import j from"./MVULTZL6.js";import{a as g}from"./IGSZABNU.js";import i from"./V4RMKJUW.js";import"./PC4PAQXQ.js";import h from"./PP3ZDADO.js";import{a as z}from"./ZRWZ5OQK.js";import{a as p}from"./54VXNFQ4.js";import e from"./6IJGTPXG.js";import d from"./X55JXSXH.js";import{h as y}from"./ZCQAWUVA.js";import"./ATTV2K2S.js";import a from"./IFIOUBWT.js";import"./T5K2XFNK.js";import{O as f,P as v,R as b,U as x,a as _,b as c,x as w}from"./DDD7772O.js";import"./3TTFCHAA.js";export default $arcgis.t(([D,{property:n,subclass:E},{watch:j},A,,,,O,{f:k},M])=>{var L=_`.esri-widget__heading{color:var(--calcite-color-text-2);margin:0 0 .5rem;font-weight:var(--calcite-font-weight-semibold)}h1.esri-widget__heading{font-size:var(--calcite-font-size-xl)}h2.esri-widget__heading{font-size:var(--calcite-font-size-md)}h3.esri-widget__heading,h4.esri-widget__heading,h5.esri-widget__heading,h6.esri-widget__heading{font-size:var(--calcite-font-size)}.esri-widget{box-sizing:border-box;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget *,.esri-widget :before,.esri-widget :after{box-sizing:inherit}.esri-widget.esri-widget--disabled>*{opacity:.4;pointer-events:none}.esri-widget.esri-widget--compact{--esri-widget-padding-y: 0;--esri-widget-padding-x: 0}.esri-widget__anchor{color:var(--calcite-color-text-2)}.esri-widget__anchor:hover{color:var(--calcite-color-text-3)}.esri-widget__anchor:hover,.esri-widget__anchor:focus{text-decoration:underline}.esri-widget__anchor--disabled{opacity:.4;pointer-events:none}.esri-widget__header{background-color:var(--calcite-color-foreground-1);flex:1 0 100%;justify-content:space-between;align-items:center;width:100%;min-height:48px;padding:12px 0 12px 15px;display:flex}.esri-widget__heading{word-break:break-word}.esri-widget__header .esri-widget__heading{width:calc(100% - 48px);text-align:initial;color:var(--calcite-color-text-1);align-items:center;margin:0;padding:0;display:flex}.esri-widget__header-button{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);border:none;flex:0 0 48px;justify-content:center;align-self:stretch;align-items:center;width:48px;padding:0;display:flex}.esri-widget__footer{background-color:var(--calcite-color-foreground-1);justify-content:center;align-items:center;width:100%;min-height:48px;display:flex}.esri-widget__footer-pagination{color:var(--calcite-color-text-2);justify-content:space-between;align-items:center;display:flex}.esri-widget__footer-pagination-previous-button,.esri-widget__footer-pagination-next-button{cursor:pointer;background-color:var(--calcite-color-foreground-1);border:0;margin:0 7px;padding:12px 15px;transition:background-color .125s ease-in-out}.esri-widget__footer-pagination-previous-button:hover,.esri-widget__footer-pagination-previous-button:focus,.esri-widget__footer-pagination-next-button:hover,.esri-widget__footer-pagination-next-button:focus{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1)}.esri-menu{visibility:hidden;z-index:1;background-clip:padding;background-color:var(--calcite-color-foreground-1);background-clip:padding-box;width:100%;max-height:0;margin:2px 0 0;padding:0;font-size:var(--calcite-font-size);line-height:var(--calcite-spacing-xl);position:absolute;top:100%;left:0;overflow:hidden;box-shadow:0 1px 2px #0000004d}.esri-menu .esri-menu__header{color:var(--calcite-color-text-inverse);background-color:var(--calcite-color-inverse);padding:6px 12px}.esri-menu__list{margin:0;padding:0;list-style:none}.esri-menu__list-item{cursor:pointer;border-top:1px solid #adadad4d;border-left:3px solid #0000;padding:.8em 1em}.esri-menu__list-item [class^=esri-icon-],.esri-menu__list-item [class*=" esri-icon-"]{padding-right:2.8px}.esri-menu__list-item:first-child{border-top:none}.esri-menu__list-item--focus,.esri-menu__list-item:hover,.esri-menu__list-item:focus{background-color:var(--calcite-color-foreground-1)}.esri-menu__list-item:active{background-color:var(--calcite-color-foreground-current)}.esri-menu__list-item--active,.esri-menu__list-item--active:hover,.esri-menu__list-item--active:focus{background-color:var(--calcite-color-foreground-1);border-left-color:var(--calcite-color-brand)}.esri-widget__table{border-collapse:collapse;color:var(--calcite-color-text-1);border:none;width:100%;line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget__table tr:nth-child(odd){background-color:var(--calcite-color-transparent)}.esri-widget__table tr:nth-child(2n){background-color:var(--calcite-color-transparent-press)}.esri-widget__table tr a{color:var(--calcite-color-text-2)}.esri-widget__table tr a:hover,.esri-widget__table tr a:focus{color:var(--calcite-color-text-1)}.esri-widget__table tr td,.esri-widget__table tr th{vertical-align:top;word-break:break-word;padding:.5em .7em;font-size:var(--calcite-font-size-sm);font-weight:var(--calcite-font-weight-regular)}.esri-widget__table tr th{text-align:left;border-right:3px solid #0000000d;width:50%}.esri-widget__table tr td{width:50%}.esri-input{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1);border:1px solid #959595;font-size:var(--calcite-font-size)}.esri-input::-ms-clear{display:none}.esri-input::placeholder{opacity:1;color:var(--calcite-color-text-2)}.esri-input:placeholder-shown{text-overflow:ellipsis}.esri-input[type=text],.esri-input[type=password],.esri-input[type=number]{height:32px;padding:0 .5em}calcite-combobox.esri-input{border:none}.esri-widget__content--empty{text-align:center;color:var(--calcite-color-border-input);flex-flow:column wrap;align-items:center;padding:18px 22px;display:flex}.esri-widget__content--empty h1.esri-widget__heading,.esri-widget__content--empty h2.esri-widget__heading,.esri-widget__content--empty h3.esri-widget__heading,.esri-widget__content--empty h4.esri-widget__heading,.esri-widget__content--empty h5.esri-widget__heading{font-weight:var(--calcite-font-weight-regular)}.esri-widget__content-illustration--empty{width:128px;padding:1rem 0}.esri-widget__content-icon--empty{width:32px;padding:.5rem 0}.esri-select{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background:var(--calcite-color-foreground-1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-8 -8 32 32' width='32' height='32'%3E%3Cpath d='M8 11.207l-4-4V5.793l4 4 4-4v1.414z' fill='%23adadad' fillrule='nonzero'/%3E%3C/svg%3E") 100% no-repeat;border:1px solid #959595;border-radius:0;width:100%;height:32px;margin:0;padding:0 .5em;font-family:inherit;font-size:.85em;display:block}.esri-select[disabled]{cursor:auto}.esri-select::-ms-expand{display:none}.esri-disabled a,.esri-disabled [role=menu],.esri-disabled [role=checkbox],.esri-disabled [class^=esri-icon-],.esri-disabled [class*=" esri-icon-"]{color:var(--calcite-color-text-3)}.keynav-mode .esri-widget:focus,.keynav-mode .esri-widget :focus{z-index:1;outline-offset:2px;outline:2px solid #adadad}.esri-widget__loader-animation{border:.15em solid #adadad4d;border-top-color:var(--calcite-color-border-input);border-radius:100%;width:1em;height:1em;font-size:var(--calcite-font-size-md);animation:1.25s linear infinite esri-rotate;display:block;transform:translateZ(0)}:dir(rtl) .esri-widget__table th{text-align:right;border-left:3px solid #0000000d;border-right:none}:dir(rtl) .esri-select{background-position:0}:dir(rtl) .esri-menu__list-item{border-left:none;border-right:3px solid #0000}:dir(rtl) .esri-menu__list-item [class^=esri-icon-],:dir(rtl) .esri-menu__list-item [class*=" esri-icon-"]{padding-left:2px;padding-right:0}:dir(rtl) .esri-menu__list-item--active{border-right-color:var(--calcite-color-brand)}.esri-icon-font-fallback-text{clip:rect(0 0 0 0);width:1px;height:1px;position:absolute;overflow:hidden}.esri-rotating{animation:1.25s linear infinite esri-rotate;transform:translateZ(0)}.esri-clearfix:before,.esri-clearfix:after{content:" ";display:table}.esri-clearfix:after{clear:both}.esri-interactive{cursor:pointer}.esri-hidden{display:none!important}.esri-invisible{visibility:hidden!important}.esri-offscreen{position:absolute;top:-999em;left:-999em}.esri-match-height{flex-direction:column;flex:auto;display:flex;overflow:hidden}.esri-widget--panel{min-width:300px;min-height:32px;padding:var(--arcgis-internal-padding);transition:max-height .25s ease-in-out;overflow-y:auto}.esri-unit-select{width:100%}.esri-unit-select__label{--calcite-label-margin-bottom: 0;width:100%}:host{display:block}.esri-measurement-widget-content{padding:var(--arcgis-internal-padding);flex-direction:column;gap:var(--calcite-spacing-xxl);display:flex;position:relative;overflow-y:auto}.esri-measurement-widget-content__error{color:var(--calcite-color-status-danger)}.esri-measurement-widget-content__error,.esri-measurement-widget-content__hint{overflow:hidden}.esri-measurement-widget-content__error p,.esri-measurement-widget-content__hint p{margin:0;padding:0}.esri-measurement-widget-content__hint,.esri-measurement-widget-content__error,.esri-measurement-widget-content__measurement,.esri-measurement-widget-content__measurement-item{flex-direction:column;gap:var(--calcite-spacing-md);animation:.25s ease-in-out esri-fade-in;display:flex}.esri-measurement-widget-content__measurement-item--disabled{color:var(--calcite-color-border-ghost)}.esri-measurement-widget-content__measurement-item__value{font-weight:var(--calcite-font-weight-semibold)}.esri-measurement-widget-content__actions{flex-direction:column;justify-content:center;gap:var(--calcite-spacing-xs);display:flex}:host{.esri-widget--panel{min-width:0}}`,B=Object.defineProperty,P=Object.getOwnPropertyDescriptor,a=(i,e,l,o)=>{for(var t=o>1?void 0:o?P(e,l):e,s=i.length-1,d;s>=0;s--)(d=i[s])&&(t=(o?d(e,l,t):d(t))||t);return o&&t&&B(e,l,t),t},r=class extends M{constructor(){super(...arguments),this.snappingOptions=new A,this.supportedViewType="2d",this.unsupportedErrorMessage="The Area Measurement 2D component is only supported in 2D views.",this.shouldForceInteractive=!1}initialize(){this.addHandles([j(()=>({analysis:this.analysis,unit:this._userUnit}),({analysis:i,unit:e})=>{e&&(i.unit=e)},{sync:!0,initial:!0}),j(()=>({analysisView:this.analysisView,snappingOptions:this.snappingOptions}),({analysisView:i,snappingOptions:e})=>{i&&"snappingOptions"in i&&(i.snappingOptions=e)},{sync:!0,initial:!0})])}get state(){let{analysis:i,disabled:e,operationState:l,ready:o,supported:t}=this,{valid:s}=i;return V({supported:t,disabled:e,ready:o,operationState:l,valid:s})}get displayState(){return $(this.state,!!this.analysis.geometry)}get measurement(){return{mode:this.analysisView?.result?.mode??"euclidean",area:m(this.analysis.valid?this.analysisView?.result?.area:void 0),perimeter:m(this.analysis.valid?this.analysisView?.result?.perimeter:void 0)}}get unitOptions(){return S(this._userUnitOptions,u,u)}set unitOptions(i){this._userUnitOptions=i}get unit(){return U(this._userUnit,this.analysis.unit,this.unitOptions,this.defaultMeasurementSystem)}set unit(i){this._userUnit=i}async place(i){this.analysisView&&(await this.analysisView.place(i),this.analysisView.interactive=!0)}clearAnalysis(){this.analysis.geometry=null}constructAnalysis(){return new D}};a([n({readOnly:!0})],r.prototype,"state",1);a([n({readOnly:!0})],r.prototype,"displayState",1);a([n()],r.prototype,"measurement",1);a([n({type:A})],r.prototype,"snappingOptions",2);a([n()],r.prototype,"unitOptions",1);a([n()],r.prototype,"_userUnitOptions",2);a([n()],r.prototype,"unit",1);a([n()],r.prototype,"_userUnit",2);r=a([E("components.area-measurement-2d.AreaMeasurement2dViewModel")],r);var Z=O(r),h=class extends f{constructor(){super(...arguments),this.viewModel=Z(this),this.messages=z({name:"area-measurement-2d",blocking:!0}),this.view=this.viewModel.view,this.analysis=this.viewModel.analysis,this.autoDestroyDisabled=!1,this.hideStartButton=!1,this.hideUnitSelect=!1,this.hideVisualization=this.viewModel.hideVisualization,this.icon="measure-area",this.snappingOptions=this.viewModel.snappingOptions,this.state=this.viewModel.state,this.unit=this.viewModel.unit,this.unitOptions=this.viewModel.unitOptions,this.arcgisPropertyChange=y()("analysis","state"),this.arcgisReady=w()}static{this.properties={view:0,analysis:0,autoDestroyDisabled:5,hideStartButton:5,hideUnitSelect:5,hideVisualization:5,icon:3,label:1,referenceElement:1,snappingOptions:0,state:32,unit:1,unitOptions:0}}static{this.styles=L}async clear(){this.viewModel.clear()}async destroy(){await this.manager.destroy()}async start(){k(this.viewModel.start())}render(){let{messages:e,unit:l,unitOptions:o,viewModel:t}=this,{measurement:s,state:d}=t;return c`<div aria-label=${e.componentLabel??b} class=${v({[p.widget]:!0,[p.panel]:!0})} role=presentation><arcgis-measurement-content .state=${t.displayState} .hintLabel=${e.hint} .unsupportedLabel=${e.unsupported} .items=${[{title:e.area,measurement:s.area},{title:e.perimeter,measurement:s.perimeter}]}>${g({hidden:this.hideUnitSelect,children:c`<arcgis-unit-select slot=settings .options=${o} .selectLabel=${e.unit} .value=${l} @arcgisUnitSelectChange=${C=>{this.unit=C.detail}}></arcgis-unit-select>`})}${g({hidden:this.hideStartButton,children:c`<calcite-button slot=actions .disabled=${d==="unsupported"||d==="disabled"} @click=${this.start}>${e.newMeasurement}</calcite-button>`})}</arcgis-measurement-content></div>`}};x("arcgis-area-measurement-2d",h);return h},"analysis/AreaMeasurementAnalysis","core/accessorSupport/decorators","core/reactiveUtils","views/interactive/snapping/SnappingOptions",a,d,e,h,i,j)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import b from"./IJULQXYC.js";import a from"./
|
|
2
|
+
import b from"./IJULQXYC.js";import a from"./V4RMKJUW.js";export default $arcgis.t(([,{isZoomScreenSize:f},{d:u},{d:g}])=>{function I(e){if(e.icon)return e.icon;if(!("image"in e&&e.image)&&!e.className)return"question"}function T(e){return e?{backgroundImage:`url(${e})`}:{}}function h(e){let{selectedFeature:t,location:o,view:r}=e;return r?t??o??null:null}async function v(e,t,o){let{location:r,selectedFeature:a,view:i,zoomFactor:n}=e;await o?.viewModel?.updateGeometry();let c=o?.graphic,d=c?.geometry?c:h(e);if(!i||!d)throw new Error("Cannot zoom to location without a target and view.");let w=i.scale/n,s=c?.geometry??e.selectedFeature?.geometry??r,l=s?.type==="point"&&await f(c??a,i);t.active=!0,t.disabled=!0;try{await e.zoomTo({target:{target:d,scale:l?w:void 0}})}catch(m){if(u(m))return;throw new Error("Could not zoom to the location of the graphic.")}finally{t.active=!1,t.disabled=!1,l&&e.location!==s&&(e.location=s)}}async function p(e,t){let o=await e.whenLayerView(g(t)),r=o.createQuery(),a=t.getObjectId();return r.aggregateIds=a!=null?[a]:[],[o,r]}async function y(e,t){let{selectedFeature:o,view:r}=e;if(r?.type!=="2d")throw new Error("zoomToAggregate:invalid-view: View must be 2d MapView.");if(!o?.isAggregate)throw new Error("zoomToAggregate:invalid-selectedFeature: Selected feature must represent an aggregate graphic.");let[a,i]=await p(r,o);t.active=!0,t.disabled=!0;let{extent:n}=await a.queryExtent(i);n&&await e.zoomTo({target:n}),t.active=!1,t.disabled=!1}var q=async(e,t)=>{if(!e)throw new Error("trigger-action:missing-arguments: Event has no action");let{disabled:o,id:r}=e;if(!r)throw new Error("trigger-action:invalid-action: action.id is missing");if(o)throw new Error("trigger-action:invalid-action: Action is disabled");if(r==="zoom-to-feature")return await v(t,e).catch(a=>{if(!u(a))throw a});if(r==="zoom-to-aggregated-features")return await y(t,e);if(r==="browse-aggregated-features"){t.aggregatedFeaturesEnabled=!t.aggregatedFeaturesEnabled;return}if(r==="remove-selected-feature"){t.open=!1;let{selectedFeature:a}=t;if(!a)throw new Error("trigger-action:missing-selected-feature: Cannot remove selected feature without a selected feature.");let i=g(a);i?i.remove(a):t.view?.graphics.remove(a)}};return{a:I,b:T,c:v,d:q}},"intl","applications/Components/actionUtils",a,b)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import b from"./R3NYK6BO.js";import a from"./AFAQWPXY.js";import"./PC4PAQXQ.js";import{a as w}from"./ZRWZ5OQK.js";import"./ZCQAWUVA.js";import"./ATTV2K2S.js";import"./T5K2XFNK.js";import{M as y,N as g,O as _,U as f,a as m,b as r,p as o,r as h,s as p,x as d}from"./DDD7772O.js";import"./3TTFCHAA.js";export default $arcgis.t(([E,,,{a:R},{b:v,e:b}])=>{var T=m`:host{min-height:var(--arcgis-internal-panel-height-sm, 240px);height:100%}arcgis-features{height:100%}calcite-table{--calcite-table-border-color: none}calcite-table-row{--calcite-table-row-border-color: var(--calcite-color-border-3)}.white-panel-background{--calcite-panel-background-color: var(--calcite-color-foreground-1)}.aggregated-geometry-container{display:flex;justify-content:space-between;padding:0 var(--calcite-spacing-md) var(--calcite-spacing-md) var(--calcite-spacing-md)}#elements-list-item{border:solid 1px var(--calcite-color-border-3);border-radius:var(--calcite-corner-radius-sm);margin:0 var(--calcite-spacing-sm)}.no-selectable-results{padding:0 var(--calcite-spacing-md);color:var(--calcite-color-text-3);font-size:var(--calcite-font-size)}.results-heading{display:flex;flex-direction:column;margin:var(--calcite-spacing-md);gap:var(--calcite-spacing-xs)}.results-heading .results-heading-title{font-weight:var(--calcite-font-weight-medium);font-size:var(--calcite-font-size);color:var(--calcite-color-text-1)}.results-heading .results-heading-subtitle{font-size:var(--calcite-font-size--1);color:var(--calcite-color-text-3)}.functions-heading{padding:var(--calcite-spacing-md) var(--calcite-spacing-md) var(--calcite-spacing-xxs) var(--calcite-spacing-md);font-weight:var(--calcite-font-weight-medium);font-size:var(--calcite-font-size);color:var(--calcite-color-text-1)}.no-results-landing{display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;margin:var(--calcite-spacing-sm) var(--calcite-spacing-xl) var(--calcite-spacing-xl) var(--calcite-spacing-xl);gap:var(--calcite-spacing-md)}.no-results-landing calcite-icon{margin-bottom:var(--calcite-spacing-sm);--calcite-icon-color: var(--calcite-color-text-3)}.no-results-landing .no-results-heading{font-size:var(--calcite-font-size-2)}.no-results-landing .no-results-description{color:var(--calcite-color-text-3)}`,$={dirtyAreasDiscovered:-2147208511,noValidControllers:-2147208935},u=class extends _{constructor(){super(...arguments),this._defaultPopupTemplateEnabled=!0,this._messages=w({blocking:!0}),this._elementsWithoutLayer=[],this._popoverRef=y(),this._layerIdToFeatures=new Map,this._layerIdToLayer=new Map,this._subtypeCodeToFeatures=new Map,this._sourceIdToElements=new Map,this._unLayers=[],this._queryFeaturesOnLayer=async([e,t])=>{let a=this.utilityNetwork?.getLayerIdBySourceId(e),s=this._getLayerByLayerId(a),i=this._getElementsUniqueByGlobalId(t);if(a==null||!s){this._elementsWithoutLayer.push(...i);return}let n=s.createQuery();n.gdbVersion=this.utilityNetwork?.gdbVersion,n.objectIds=i.map(c=>c.objectId),n.outFields=["*"];let{features:l}=await v(s,n);l.forEach(c=>{let C=c.layer;c.getEffectivePopupTemplate(this._defaultPopupTemplateEnabled)||(c.popupTemplate=C.createPopupTemplate())}),b(s)?l.forEach(c=>this._addOrCreateMapValue(this._subtypeCodeToFeatures,c.layer.subtypeCode,c)):this._layerIdToFeatures.set(a,l)},this._aggregateGeometryRefChange=e=>{e&&(this._aggregatedGeometryComponentElement=e)},this._featuresRefChange=e=>{e&&(this._featuresComponentElement=e)},this._aggregatedGeometryDisabled=!1,this.aggregatedGeometryGraphicsColor=new E([255,255,0,.6]),this.hideActionBar=!1,this.hideFeatureResults=!1,this.featuresFromSelectedLayer=[],this.isElementsSelected=!1,this.layers=[],this.state="ready",this.traceResultFeatures=[],this.autoDestroyDisabled=!1,this.arcgisAggregatedGeometryGraphicsColorChange=d(),this.arcgisHideGraphicsChange=d(),this.arcgisSelectedLayerChange=d(),this.arcgisSelectedResultTypeChange=d(),this.arcgisTraceResultFeaturesReady=d()}static{this.properties={_aggregatedGeometryDisabled:16,_featuresComponentElement:16,aggregatedGeometryGraphicsColor:0,hideActionBar:5,hideFeatureResults:5,featuresFromSelectedLayer:0,isElementsSelected:5,layers:0,messageOverrides:0,numResults:32,referenceElement:1,selectedLayer:0,state:1,traceConfigTitle:1,traceError:0,traceResult:0,traceResultFeatures:0,utilityNetwork:0,view:0,autoDestroyDisabled:5}}static{this.styles=T}get numResults(){return this.traceResultFeatures.length+this._elementsWithoutLayer.length}clearAggregatedGeometryGraphics(){this._aggregatedGeometryComponentElement?.destroy()}async destroy(){this._layerIdToFeatures.clear(),this._subtypeCodeToFeatures.clear(),this._sourceIdToElements.clear(),this._aggregatedGeometryComponentElement?.destroy(),this._featuresComponentElement?.destroy(),await this.manager.destroy()}load(){this.traceResult&&(this._setSourceIdToElements(),this._loadDependencies().then(()=>this._queryTraceResultsFeatures()).finally(()=>{this.arcgisTraceResultFeaturesReady.emit(),this.state="ready"}))}willUpdate(e){e.has("isElementsSelected")&&this.arcgisSelectedResultTypeChange.emit(),e.has("selectedLayer")&&this.arcgisSelectedLayerChange.emit(),e.has("traceResult")&&(this.isElementsSelected=!1,this.traceResult||(this.traceResultFeatures=[],this._elementsWithoutLayer=[])),(e.has("layers")||e.has("utilityNetwork"))&&this._loadDependencies()}loaded(){this.utilityNetwork||o("warn",this,h("utilityNetwork")),this.layers.length===0&&o("warn",this,p("layers")),this.view||o("warn",this,h("view"))}disconnectedCallback(){super.disconnectedCallback(),this._layerIdToLayer.clear()}_addOrCreateMapValue(e,t,a){let s=e.get(t);s==null?e.set(t,[a]):s.push(a)}_getLayerByLayerId(e){if(e==null)return;let{_layerIdToLayer:t,_unLayers:a}=this;if(t.get(e))return t.get(e);let s=a.find(i=>"layerId"in i&&i.layerId===e);return s&&t.set(e,s),s}_getElementsUniqueByGlobalId(e){return Array.from(new Map(e.map(t=>[t.globalId,t])).values())}_handleHideGraphicsChange(e){e.stopPropagation();let t=e.detail;this.arcgisHideGraphicsChange.emit(t),this._aggregatedGeometryDisabled=t,t&&this._popoverRef.value?.open&&(this._popoverRef.value.open=!1)}async _loadDependencies(){let{layers:e,utilityNetwork:t}=this;if(!t)return;try{t.loaded||(this.state="loading",await t.load())}catch(s){R(s,this,"Error while loading the selected utility network")}this._unLayers=e.filter(s=>t.isUtilityLayer(s));let a=this._unLayers.filter(s=>!s.loaded).map(s=>s.load());a.length>0&&(this.state="loading",(await Promise.allSettled(a)).forEach(s=>{s.status==="rejected"&&o("error",this,`Failed to load layer. Reason: ${s.reason}`)}))}async _queryTraceResultsFeatures(){let e=Array.from(this._sourceIdToElements.entries());if(!e.length)return;this.state="loading";let t=e.map(this._queryFeaturesOnLayer);(await Promise.allSettled(t)).forEach((i,n)=>{if(i.status==="rejected"){let[l]=e[n];o("error",this,`Failed to query features for source ${l}. Reason: ${i.reason}`)}});let a=Array.from(this._layerIdToFeatures.values()),s=Array.from(this._subtypeCodeToFeatures.values());this.traceResultFeatures=a.concat(s).flat()}_setSourceIdToElements(){this.traceResult.elements?.forEach(e=>this._addOrCreateMapValue(this._sourceIdToElements,e.networkSourceId,e))}render(){let{traceError:e,traceResult:t}=this;if(e)return this._renderErrorLanding(e);if(!t)return this._renderNoTraceLanding();let{elements:a,globalFunctionResults:s,aggregatedGeometry:i}=t,n=!a.length&&!s.length&&!i,l=a.length>0&&!s.length&&!i;return n?this._renderNoResultsLanding():this.state==="loading"?this._renderGettingResults():this.hideFeatureResults&&l?this._renderFeaturesAreHidden():this.isElementsSelected||l?r`<arcgis-features .autoDestroyDisabled=${this.autoDestroyDisabled} .defaultPopupTemplateEnabled=${this._defaultPopupTemplateEnabled} .features=${this.traceResultFeatures} .hideActionBar=${this.hideActionBar} .hideCloseButton=${l} hide-select-feature initial-display-mode=list @arcgisClose=${()=>this.isElementsSelected=!1} open .referenceElement=${this.referenceElement} .view=${this.view} ${g(this._featuresRefChange)}></arcgis-features>`:this._renderLanding(t)}_renderGettingResults(){return r`<calcite-panel class="white-panel-background"><calcite-loader .label=${this._messages.gettingResults} .text=${this._messages.gettingResults}></calcite-loader></calcite-panel>`}_renderLanding(e){let{elements:t,globalFunctionResults:a,aggregatedGeometry:s}=e;return r`<calcite-panel class="white-panel-background">${this._renderTraceResultsHeading()}${s!=null?this._renderAggregatedGeometry(s):null}${s!=null&&!t.length?this._renderNoSelectableResults():null}${t.length>0?this.hideFeatureResults?this._renderFeaturesAreHidden():this._renderElementsResults():null}${a.length>0?this._renderFunctionsResults(a):null}</calcite-panel>`}_renderAggregatedGeometry(e){return r`<div class="aggregated-geometry-container"><arcgis-utility-network-aggregated-geometry .graphicsColor=${this.aggregatedGeometryGraphicsColor} .geometry=${e} .view=${this.view} @arcgisHideGraphicsChange=${this._handleHideGraphicsChange} auto-destroy-disabled ${g(this._aggregateGeometryRefChange)}></arcgis-utility-network-aggregated-geometry><calcite-swatch id=geometry-color-swatch .label=${this._messages.labels.aggregatedGeometryGraphicsColor} .color=${this.aggregatedGeometryGraphicsColor.toCss()} .disabled=${this._aggregatedGeometryDisabled}></calcite-swatch><calcite-popover .heading=${this._messages.headings.setColor} .label=${this._messages.headings.setColor} reference-element=geometry-color-swatch closable ${g(this._popoverRef)}><calcite-color-picker alpha-channel channels-disabled clearable hex-disabled saved-disabled .value=${this.aggregatedGeometryGraphicsColor} @calciteColorPickerChange=${t=>{let a=t.target.value;this.arcgisAggregatedGeometryGraphicsColorChange.emit(a)}} .disabled=${this._aggregatedGeometryDisabled}></calcite-color-picker></calcite-popover></div>`}_renderFeaturesAreHidden(){return r`<div class="no-selectable-results">${this._messages.resultFeaturesAreHidden}</div>`}_renderNoSelectableResults(){return r`<div class="no-selectable-results">${this._messages.noSelectableFeatures}</div>`}_renderElementsResults(){return r`<calcite-list .label=${this._messages.headings.traceResultsGeneric}><calcite-list-item id=elements-list-item .label=${this._messages.headings.features} @calciteListItemSelect=${()=>this.isElementsSelected=!0}><calcite-chip .label=${this._messages.labels.numFeatures} scale=s slot=content-end>${this.numResults}</calcite-chip><calcite-icon icon=chevron-right slot=content-end></calcite-icon></calcite-list-item></calcite-list>`}_renderFunctionsResults(e){return r`<div class="functions-heading">${this._messages.headings.functions}</div><calcite-table .caption=${this._messages.labels.functionResults}>${e.filter(t=>t.networkAttributeName!=null&&t.result!=null&&t.functionType!=null).map(t=>{let{functionName:a,networkAttributeName:s,functionType:i,result:n}=t,l=a||`${s} ${i}`;return r`<calcite-table-row><calcite-table-cell>${l}</calcite-table-cell><calcite-table-cell>${n}</calcite-table-cell></calcite-table-row>`})}</calcite-table>`}_renderTraceResultsHeading(){return r`<div class="results-heading"><div class="results-heading-title">${this._messages.headings.traceResultsGeneric}</div>${this.traceConfigTitle?r`<div class="results-heading-subtitle">${this.traceConfigTitle}</div>`:null}</div>`}_renderErrorLanding(e){let t=e.message;switch(e.details?.raw?.extendedCode){case $.dirtyAreasDiscovered:t=this._messages.traceErrors.dirtyAreasDiscovered;break;case $.noValidControllers:t=this._messages.traceErrors.noValidControllers;break}return r`<calcite-panel class="white-panel-background">${this._renderTraceResultsHeading()}<div class="no-results-landing"><calcite-icon icon=exclamation-mark-triangle scale=l></calcite-icon><div class="no-results-heading">${this._messages.traceFailedHeading}</div><div class="no-results-description">${this._messages.traceFailedDescription}</div><div class="no-results-description">${t}</div></div></calcite-panel>`}_renderNoResultsLanding(){return r`<calcite-panel class="white-panel-background">${this._renderTraceResultsHeading()}<div class="no-results-landing"><calcite-icon icon=exclamation-mark-triangle scale=l></calcite-icon><div class="no-results-heading">${this._messages.noResultsHeading}</div><div class="no-results-description">${this._messages.noResultsDescription}</div></div></calcite-panel>`}_renderNoTraceLanding(){return r`<calcite-panel class="white-panel-background">${this._renderTraceResultsHeading()}<div class="no-results-landing"><calcite-icon icon=utility-network-trace scale=l></calcite-icon><div class="no-results-heading">${this._messages.noTraceConfigHeading}</div><div class="no-results-description">${this._messages.noTraceConfigDescription}</div></div></calcite-panel>`}};f("arcgis-utility-network-trace-results",u);return u},"Color","core/Error","Graphic",a,b)
|
|
2
|
+
import b from"./R3NYK6BO.js";import a from"./V4RMKJUW.js";import"./PC4PAQXQ.js";import{a as w}from"./ZRWZ5OQK.js";import"./ZCQAWUVA.js";import"./ATTV2K2S.js";import"./T5K2XFNK.js";import{M as y,N as g,O as _,U as f,a as m,b as r,p as o,r as h,s as p,x as d}from"./DDD7772O.js";import"./3TTFCHAA.js";export default $arcgis.t(([E,,,{a:R},{b:v,e:b}])=>{var T=m`:host{min-height:var(--arcgis-internal-panel-height-sm, 240px);height:100%}arcgis-features{height:100%}calcite-table{--calcite-table-border-color: none}calcite-table-row{--calcite-table-row-border-color: var(--calcite-color-border-3)}.white-panel-background{--calcite-panel-background-color: var(--calcite-color-foreground-1)}.aggregated-geometry-container{display:flex;justify-content:space-between;padding:0 var(--calcite-spacing-md) var(--calcite-spacing-md) var(--calcite-spacing-md)}#elements-list-item{border:solid 1px var(--calcite-color-border-3);border-radius:var(--calcite-corner-radius-sm);margin:0 var(--calcite-spacing-sm)}.no-selectable-results{padding:0 var(--calcite-spacing-md);color:var(--calcite-color-text-3);font-size:var(--calcite-font-size)}.results-heading{display:flex;flex-direction:column;margin:var(--calcite-spacing-md);gap:var(--calcite-spacing-xs)}.results-heading .results-heading-title{font-weight:var(--calcite-font-weight-medium);font-size:var(--calcite-font-size);color:var(--calcite-color-text-1)}.results-heading .results-heading-subtitle{font-size:var(--calcite-font-size--1);color:var(--calcite-color-text-3)}.functions-heading{padding:var(--calcite-spacing-md) var(--calcite-spacing-md) var(--calcite-spacing-xxs) var(--calcite-spacing-md);font-weight:var(--calcite-font-weight-medium);font-size:var(--calcite-font-size);color:var(--calcite-color-text-1)}.no-results-landing{display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;margin:var(--calcite-spacing-sm) var(--calcite-spacing-xl) var(--calcite-spacing-xl) var(--calcite-spacing-xl);gap:var(--calcite-spacing-md)}.no-results-landing calcite-icon{margin-bottom:var(--calcite-spacing-sm);--calcite-icon-color: var(--calcite-color-text-3)}.no-results-landing .no-results-heading{font-size:var(--calcite-font-size-2)}.no-results-landing .no-results-description{color:var(--calcite-color-text-3)}`,$={dirtyAreasDiscovered:-2147208511,noValidControllers:-2147208935},u=class extends _{constructor(){super(...arguments),this._defaultPopupTemplateEnabled=!0,this._messages=w({blocking:!0}),this._elementsWithoutLayer=[],this._popoverRef=y(),this._layerIdToFeatures=new Map,this._layerIdToLayer=new Map,this._subtypeCodeToFeatures=new Map,this._sourceIdToElements=new Map,this._unLayers=[],this._queryFeaturesOnLayer=async([e,t])=>{let a=this.utilityNetwork?.getLayerIdBySourceId(e),s=this._getLayerByLayerId(a),i=this._getElementsUniqueByGlobalId(t);if(a==null||!s){this._elementsWithoutLayer.push(...i);return}let n=s.createQuery();n.gdbVersion=this.utilityNetwork?.gdbVersion,n.objectIds=i.map(c=>c.objectId),n.outFields=["*"];let{features:l}=await v(s,n);l.forEach(c=>{let C=c.layer;c.getEffectivePopupTemplate(this._defaultPopupTemplateEnabled)||(c.popupTemplate=C.createPopupTemplate())}),b(s)?l.forEach(c=>this._addOrCreateMapValue(this._subtypeCodeToFeatures,c.layer.subtypeCode,c)):this._layerIdToFeatures.set(a,l)},this._aggregateGeometryRefChange=e=>{e&&(this._aggregatedGeometryComponentElement=e)},this._featuresRefChange=e=>{e&&(this._featuresComponentElement=e)},this._aggregatedGeometryDisabled=!1,this.aggregatedGeometryGraphicsColor=new E([255,255,0,.6]),this.hideActionBar=!1,this.hideFeatureResults=!1,this.featuresFromSelectedLayer=[],this.isElementsSelected=!1,this.layers=[],this.state="ready",this.traceResultFeatures=[],this.autoDestroyDisabled=!1,this.arcgisAggregatedGeometryGraphicsColorChange=d(),this.arcgisHideGraphicsChange=d(),this.arcgisSelectedLayerChange=d(),this.arcgisSelectedResultTypeChange=d(),this.arcgisTraceResultFeaturesReady=d()}static{this.properties={_aggregatedGeometryDisabled:16,_featuresComponentElement:16,aggregatedGeometryGraphicsColor:0,hideActionBar:5,hideFeatureResults:5,featuresFromSelectedLayer:0,isElementsSelected:5,layers:0,messageOverrides:0,numResults:32,referenceElement:1,selectedLayer:0,state:1,traceConfigTitle:1,traceError:0,traceResult:0,traceResultFeatures:0,utilityNetwork:0,view:0,autoDestroyDisabled:5}}static{this.styles=T}get numResults(){return this.traceResultFeatures.length+this._elementsWithoutLayer.length}clearAggregatedGeometryGraphics(){this._aggregatedGeometryComponentElement?.destroy()}async destroy(){this._layerIdToFeatures.clear(),this._subtypeCodeToFeatures.clear(),this._sourceIdToElements.clear(),this._aggregatedGeometryComponentElement?.destroy(),this._featuresComponentElement?.destroy(),await this.manager.destroy()}load(){this.traceResult&&(this._setSourceIdToElements(),this._loadDependencies().then(()=>this._queryTraceResultsFeatures()).finally(()=>{this.arcgisTraceResultFeaturesReady.emit(),this.state="ready"}))}willUpdate(e){e.has("isElementsSelected")&&this.arcgisSelectedResultTypeChange.emit(),e.has("selectedLayer")&&this.arcgisSelectedLayerChange.emit(),e.has("traceResult")&&(this.isElementsSelected=!1,this.traceResult||(this.traceResultFeatures=[],this._elementsWithoutLayer=[])),(e.has("layers")||e.has("utilityNetwork"))&&this._loadDependencies()}loaded(){this.utilityNetwork||o("warn",this,h("utilityNetwork")),this.layers.length===0&&o("warn",this,p("layers")),this.view||o("warn",this,h("view"))}disconnectedCallback(){super.disconnectedCallback(),this._layerIdToLayer.clear()}_addOrCreateMapValue(e,t,a){let s=e.get(t);s==null?e.set(t,[a]):s.push(a)}_getLayerByLayerId(e){if(e==null)return;let{_layerIdToLayer:t,_unLayers:a}=this;if(t.get(e))return t.get(e);let s=a.find(i=>"layerId"in i&&i.layerId===e);return s&&t.set(e,s),s}_getElementsUniqueByGlobalId(e){return Array.from(new Map(e.map(t=>[t.globalId,t])).values())}_handleHideGraphicsChange(e){e.stopPropagation();let t=e.detail;this.arcgisHideGraphicsChange.emit(t),this._aggregatedGeometryDisabled=t,t&&this._popoverRef.value?.open&&(this._popoverRef.value.open=!1)}async _loadDependencies(){let{layers:e,utilityNetwork:t}=this;if(!t)return;try{t.loaded||(this.state="loading",await t.load())}catch(s){R(s,this,"Error while loading the selected utility network")}this._unLayers=e.filter(s=>t.isUtilityLayer(s));let a=this._unLayers.filter(s=>!s.loaded).map(s=>s.load());a.length>0&&(this.state="loading",(await Promise.allSettled(a)).forEach(s=>{s.status==="rejected"&&o("error",this,`Failed to load layer. Reason: ${s.reason}`)}))}async _queryTraceResultsFeatures(){let e=Array.from(this._sourceIdToElements.entries());if(!e.length)return;this.state="loading";let t=e.map(this._queryFeaturesOnLayer);(await Promise.allSettled(t)).forEach((i,n)=>{if(i.status==="rejected"){let[l]=e[n];o("error",this,`Failed to query features for source ${l}. Reason: ${i.reason}`)}});let a=Array.from(this._layerIdToFeatures.values()),s=Array.from(this._subtypeCodeToFeatures.values());this.traceResultFeatures=a.concat(s).flat()}_setSourceIdToElements(){this.traceResult.elements?.forEach(e=>this._addOrCreateMapValue(this._sourceIdToElements,e.networkSourceId,e))}render(){let{traceError:e,traceResult:t}=this;if(e)return this._renderErrorLanding(e);if(!t)return this._renderNoTraceLanding();let{elements:a,globalFunctionResults:s,aggregatedGeometry:i}=t,n=!a.length&&!s.length&&!i,l=a.length>0&&!s.length&&!i;return n?this._renderNoResultsLanding():this.state==="loading"?this._renderGettingResults():this.hideFeatureResults&&l?this._renderFeaturesAreHidden():this.isElementsSelected||l?r`<arcgis-features .autoDestroyDisabled=${this.autoDestroyDisabled} .defaultPopupTemplateEnabled=${this._defaultPopupTemplateEnabled} .features=${this.traceResultFeatures} .hideActionBar=${this.hideActionBar} .hideCloseButton=${l} hide-select-feature initial-display-mode=list @arcgisClose=${()=>this.isElementsSelected=!1} open .referenceElement=${this.referenceElement} .view=${this.view} ${g(this._featuresRefChange)}></arcgis-features>`:this._renderLanding(t)}_renderGettingResults(){return r`<calcite-panel class="white-panel-background"><calcite-loader .label=${this._messages.gettingResults} .text=${this._messages.gettingResults}></calcite-loader></calcite-panel>`}_renderLanding(e){let{elements:t,globalFunctionResults:a,aggregatedGeometry:s}=e;return r`<calcite-panel class="white-panel-background">${this._renderTraceResultsHeading()}${s!=null?this._renderAggregatedGeometry(s):null}${s!=null&&!t.length?this._renderNoSelectableResults():null}${t.length>0?this.hideFeatureResults?this._renderFeaturesAreHidden():this._renderElementsResults():null}${a.length>0?this._renderFunctionsResults(a):null}</calcite-panel>`}_renderAggregatedGeometry(e){return r`<div class="aggregated-geometry-container"><arcgis-utility-network-aggregated-geometry .graphicsColor=${this.aggregatedGeometryGraphicsColor} .geometry=${e} .view=${this.view} @arcgisHideGraphicsChange=${this._handleHideGraphicsChange} auto-destroy-disabled ${g(this._aggregateGeometryRefChange)}></arcgis-utility-network-aggregated-geometry><calcite-swatch id=geometry-color-swatch .label=${this._messages.labels.aggregatedGeometryGraphicsColor} .color=${this.aggregatedGeometryGraphicsColor.toCss()} .disabled=${this._aggregatedGeometryDisabled}></calcite-swatch><calcite-popover .heading=${this._messages.headings.setColor} .label=${this._messages.headings.setColor} reference-element=geometry-color-swatch closable ${g(this._popoverRef)}><calcite-color-picker alpha-channel channels-disabled clearable hex-disabled saved-disabled .value=${this.aggregatedGeometryGraphicsColor} @calciteColorPickerChange=${t=>{let a=t.target.value;this.arcgisAggregatedGeometryGraphicsColorChange.emit(a)}} .disabled=${this._aggregatedGeometryDisabled}></calcite-color-picker></calcite-popover></div>`}_renderFeaturesAreHidden(){return r`<div class="no-selectable-results">${this._messages.resultFeaturesAreHidden}</div>`}_renderNoSelectableResults(){return r`<div class="no-selectable-results">${this._messages.noSelectableFeatures}</div>`}_renderElementsResults(){return r`<calcite-list .label=${this._messages.headings.traceResultsGeneric}><calcite-list-item id=elements-list-item .label=${this._messages.headings.features} @calciteListItemSelect=${()=>this.isElementsSelected=!0}><calcite-chip .label=${this._messages.labels.numFeatures} scale=s slot=content-end>${this.numResults}</calcite-chip><calcite-icon icon=chevron-right slot=content-end></calcite-icon></calcite-list-item></calcite-list>`}_renderFunctionsResults(e){return r`<div class="functions-heading">${this._messages.headings.functions}</div><calcite-table .caption=${this._messages.labels.functionResults}>${e.filter(t=>t.networkAttributeName!=null&&t.result!=null&&t.functionType!=null).map(t=>{let{functionName:a,networkAttributeName:s,functionType:i,result:n}=t,l=a||`${s} ${i}`;return r`<calcite-table-row><calcite-table-cell>${l}</calcite-table-cell><calcite-table-cell>${n}</calcite-table-cell></calcite-table-row>`})}</calcite-table>`}_renderTraceResultsHeading(){return r`<div class="results-heading"><div class="results-heading-title">${this._messages.headings.traceResultsGeneric}</div>${this.traceConfigTitle?r`<div class="results-heading-subtitle">${this.traceConfigTitle}</div>`:null}</div>`}_renderErrorLanding(e){let t=e.message;switch(e.details?.raw?.extendedCode){case $.dirtyAreasDiscovered:t=this._messages.traceErrors.dirtyAreasDiscovered;break;case $.noValidControllers:t=this._messages.traceErrors.noValidControllers;break}return r`<calcite-panel class="white-panel-background">${this._renderTraceResultsHeading()}<div class="no-results-landing"><calcite-icon icon=exclamation-mark-triangle scale=l></calcite-icon><div class="no-results-heading">${this._messages.traceFailedHeading}</div><div class="no-results-description">${this._messages.traceFailedDescription}</div><div class="no-results-description">${t}</div></div></calcite-panel>`}_renderNoResultsLanding(){return r`<calcite-panel class="white-panel-background">${this._renderTraceResultsHeading()}<div class="no-results-landing"><calcite-icon icon=exclamation-mark-triangle scale=l></calcite-icon><div class="no-results-heading">${this._messages.noResultsHeading}</div><div class="no-results-description">${this._messages.noResultsDescription}</div></div></calcite-panel>`}_renderNoTraceLanding(){return r`<calcite-panel class="white-panel-background">${this._renderTraceResultsHeading()}<div class="no-results-landing"><calcite-icon icon=utility-network-trace scale=l></calcite-icon><div class="no-results-heading">${this._messages.noTraceConfigHeading}</div><div class="no-results-description">${this._messages.noTraceConfigDescription}</div></div></calcite-panel>`}};f("arcgis-utility-network-trace-results",u);return u},"Color","core/Error","Graphic",a,b)
|