@esri/solutions-components 5.1.0-next.136 → 5.1.0-next.138
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/{JSQHZGE3.js → 33UAZ7BX.js} +42 -42
- package/dist/cdn/3CSMIYZV.js +2 -0
- package/dist/cdn/{3JAQDSSF.js → 4753O4WX.js} +1 -1
- package/dist/cdn/{FOTFZKKU.js → 52QHFDTC.js} +1 -1
- package/dist/cdn/{YZVDT3ZT.js → 6RHH635X.js} +1 -1
- package/dist/cdn/{S5F6KJQM.js → 7J2F4TFI.js} +1 -1
- package/dist/cdn/{NOI3DSNQ.js → 7MFLK6JZ.js} +1 -1
- package/dist/cdn/{6SSQ6MIC.js → 7NAC32PQ.js} +1 -1
- package/dist/cdn/{WQVOA4KV.js → AYQT4HC4.js} +1 -1
- package/dist/cdn/BNRFT546.js +2 -0
- package/dist/cdn/{75WQ7UGJ.js → D4MZYBH7.js} +1 -1
- package/dist/cdn/DGNAMFJN.js +9 -0
- package/dist/cdn/{ZTO4S3BZ.js → E5EU4SVV.js} +1 -1
- package/dist/cdn/F3NG6RFP.js +117 -0
- package/dist/cdn/GWWU6HWB.js +48 -0
- package/dist/cdn/{TWJSFINX.js → KGSB4I6Y.js} +1 -1
- package/dist/cdn/{OPKSJ73H.js → NPYWZIAM.js} +1 -1
- package/dist/cdn/{VFBFI3KQ.js → NWCKV677.js} +1 -1
- package/dist/cdn/{P6ANTPJW.js → OYBEDO63.js} +1 -1
- package/dist/cdn/{I26GSBKY.js → RDAHPMNW.js} +1 -1
- package/dist/cdn/{TV3ZHJ7B.js → SAJPXZDW.js} +1 -1
- package/dist/cdn/SEHNIZKR.js +2 -0
- package/dist/cdn/WGOI2WQZ.js +2 -0
- package/dist/cdn/{R7NCPIS3.js → XVRJTKAB.js} +26 -26
- package/dist/cdn/{PPRV6EZZ.js → ZIX74MNU.js} +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.json +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/assistantResponse.js +51 -0
- package/dist/chunks/classifyIntent.js +120 -0
- package/dist/chunks/description.js +7 -31
- package/dist/chunks/description2.js +36 -0
- package/dist/chunks/solution-builder-assistant.js +935 -0
- package/dist/chunks/validators.js +1 -1
- package/dist/components/arcgis-solutions-assistant/customElement.js +596 -564
- package/dist/components/crowdsource-manager/customElement.js +7 -6
- package/dist/components/solution-builder-assistant/customElement.d.ts +62 -2
- package/dist/components/solution-builder-assistant/customElement.js +14 -883
- package/dist/components/solutions-deploy-app/customElement.js +21 -20
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/solutions-components_commit.txt +5 -8
- package/package.json +5 -4
- package/dist/cdn/DJMULVG5.js +0 -2
- package/dist/cdn/JMO7ZFWL.js +0 -26
- package/dist/cdn/JQLLXM7G.js +0 -11
- package/dist/cdn/PSHFIPGT.js +0 -2
- package/dist/cdn/RSPGZ5RN.js +0 -2
- package/dist/cdn/ZS3UOY5Q.js +0 -2
- package/dist/chunks/solutions_assistant_description.js +0 -14
- package/dist/chunks/solutions_assistant_prompts.js +0 -29
- /package/dist/cdn/{GYL4W6ZG.js → JDCZUOU6.js} +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import{a as x}from"./7NAC32PQ.js";import"./CVHXDPJO.js";import b from"./2C4DK6YC.js";import a from"./WV7QX3ED.js";import{a as L}from"./MGEDATQ7.js";import"./RMEDO4JC.js";import"./ISFTCFSJ.js";import{b as I}from"./2I5LGZNX.js";import{E as h,F as r,G as v,I as d,J as C,h as y,i as s,l as w,q as _,t as $}from"./FFF5HUPM.js";import"./QPIMTXPL.js";export default $arcgis.t(([,{d:M}])=>{function T(f){let e=t=>{(t?.altKey||t?.metaKey)&&t?.code==="KeyM"&&f?.focus()};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}}var k=y`@layer{:host{display:block;--calcite-label-margin-bottom: 0px;--solutions-theme-foreground-color: var(--calcite-color-surface-2)}.padding-1-2{padding:.5rem}.display-flex{display:flex}.width-full{width:100%}.width-1-2{position:relative;width:50%}.width-1-3{position:relative;width:33.33%}.width-2-3{position:relative;width:66.66%}.width-0{width:0}.z-index-2{z-index:2!important}.height-full{height:100%}.height-1-2{position:relative;height:50%}.height-0{height:0}.toggle-node{width:51px;height:51px}.overflow-hidden{overflow:hidden}.flex-column{flex-direction:column}.border{border:1px solid var(--calcite-color-border-3)}.border-top{border-top:1px solid var(--calcite-color-border-3)}.border-bottom{border-bottom:1px solid var(--calcite-color-border-3)}.border-sides{border-left:1px solid var(--calcite-color-border-3);border-right:1px solid var(--calcite-color-border-3)}.position-relative{position:relative}.position-absolute{position:absolute}.position-sticky{position:sticky}.height-50{height:50%}.top-51{top:51px}.adjusted-height-50{height:calc(50% - 25px)}.adjusted-height-100{height:calc(100% - 50px)}.adjusted-height-100-51{height:calc(100% - 51px)}.display-none{display:none!important}.adjusted-height-50_25{height:calc(50% + 25px)}.display-grid{display:grid}.padding-inline-start-75{padding-inline-start:.75rem}.align-items-center{align-items:center}.esri-floor-filter__close-levels-button,.esri-floor-filter__level-button,.esri-floor-filter__browse-button{width:40px!important;height:40px!important}.position-absolute-0{position:absolute;inset:0}.visibility-hidden{visibility:hidden;height:0px}.border-width-0{border-width:0px}.floating-container{position:fixed;width:100px;height:10px;bottom:0;margin:100px 0;z-index:1}.left-0{left:0}.right-0{right:0}.floating-container .floating-button{box-shadow:0 10px 25px #5c5d5e99;-webkit-transform:translatey(5px);transform:translatey(5px);-webkit-transition:all .3s;transition:all .3s}.z-index-0{z-index:0!important}.z-index-1{z-index:1!important}.filter-content-space{--calcite-dialog-content-space: 0px}.background-dark{background:var(--calcite-color-surface-1)}.filter-extent-container{display:flex;justify-content:space-between;align-items:center;padding:10px 0}.filter-modal-buttons{display:flex;padding:12px;gap:10px}.filter-extent-message{align-items:center;display:flex;gap:5px}calcite-action-bar{--calcite-internal-action-bar-gap: 0px;--calcite-internal-action-bar-padding: 0px}}`,m=class extends v{constructor(){super(),this.coverPageEnabled=!1,this.customInfoText="",this.defaultCenter="",this.defaultGlobalId="",this.defaultLayer="",this.defaultLevel="",this.defaultOid="",this.defaultWebmap="",this.honorMapFieldSettings=!1,this.introductionWindowEnabled=!1,this.enableAutoRefresh=!1,this.enableBasemap=!0,this.enableColumnReorder=!0,this.enableCSV=!0,this.enableFloorFilter=!0,this.enableFullscreen=!0,this.enableHome=!0,this.enableLegend=!0,this.enableLayerList=!0,this.enableMapList=!0,this.visibilityIcon="eyeball",this.enableSearch=!0,this.enableShare=!1,this.enableSnapping=!0,this.enableZoom=!0,this.mapInfos=[],this.onlyShowUpdatableLayers=!1,this.popupHeaderColor="",this.popupHeaderHoverColor="",this.popupHeaderHoverTextColor="",this.popupHeaderTextColor="",this.shareIncludeEmbed=!1,this.shareIncludeSocial=!1,this.showNewestFirst=!0,this.theme="light",this.zoomAndScrollToSelected=!1,this.enableSelectionTool=!0,this.featureSelectionMode="multiple",this.enableCopyPaste=!0,this._deleteDialogOpen=!1,this._enableCreateFeatures=!0,this._hideFooter=!1,this._hideTable=!1,this._isMobile=!1,this._translations=L({name:"crowdsource-manager",blocking:!0}),this._layoutMode="GRID",this._panelOpen=!0,this._numSelected=0,this._filterOpen=!1,this._showInformationHeader=!0,this._layerExpressions=[],this._layerIds=[],this._isLoading=!0,this._mapExtentFilterChecked=!1,this._deleteIds=[],this._showInvalidMapAlert=!1,this._currentMapInfos=[],this._pasteEnabled=!1,this._showCopyPasteActions=!1,this._defaultAppLayoutHonored=!1,this._defaultCenterHonored=!1,this._defaultLevelHonored=!1,this._layerTable=h(),this._shouldSetMapView=!1,this._filterList=h(),this._mapCard=h(),this._isMapViewOnLoad=!1,this.showIntroductionWindow=_(),this.showCoverPage=_(),this.listenOn(window,"featureSelectionChange",this.featureSelectionChange),this.listenOn(window,"popupClosed",this.popupClosed),this.listenOn(window,"layoutChanged",this.layoutChanged),this.listenOn(window,"mapChanged",this.mapChanged),this.listenOn(window,"layerSelectionChange",this.layerSelectionChange),this.listenOn(window,"showDelete",this.showDelete),this.listenOn(window,"noLayersFound",this.noLayersFound),this.listenOn(window,"clearSelection",this.clearSelection),this.listenOn(window,"relatedRecordToggled",this.relatedRecordToggled),this.listenOn(window,"creatingFeature",this.creatingFeature),this.listenOn(window,"featuresCopied",this.featuresCopied),this.listenOn(window,"idsFound",this.idsFound),x(window)}static{this.properties={appLayout:1,appProxies:1,basemapConfig:0,coverPageEnabled:5,customInfoText:1,defaultAppLayout:1,defaultCenter:1,defaultGlobalId:1,defaultLayer:1,defaultLevel:1,defaultOid:1,defaultWebmap:1,honorMapFieldSettings:5,introductionWindowEnabled:5,enableAutoRefresh:5,enableBasemap:5,enableColumnReorder:5,enableCSV:5,enableFloorFilter:5,enableFullscreen:5,enableHome:5,enableLegend:5,enableLayerList:5,enableMapList:5,visibilityIcon:1,enableSearch:5,enableShare:5,enableSnapping:5,enableZoom:5,mapInfos:0,onlyShowUpdatableLayers:5,popupHeaderColor:1,popupHeaderHoverColor:1,popupHeaderHoverTextColor:1,popupHeaderTextColor:1,searchConfiguration:0,shareIncludeEmbed:5,shareIncludeSocial:5,showNewestFirst:5,theme:1,zoomAndScrollToSelected:5,zoomToScale:9,enableSelectionTool:5,featureSelectionMode:1,enableCopyPaste:5,_deleteDialogOpen:16,_enableCreateFeatures:16,_hideFooter:16,_hideTable:16,_isMobile:16,_translations:16,_layer:16,_layoutMode:16,_mapInfo:16,_mapView:16,_panelOpen:16,_numSelected:16,_filterOpen:16,_showInformationHeader:16,_layerExpressions:16,_layerIds:16,_isLoading:16,_mapExtentFilterChecked:16,_deleteIds:16,_showInvalidMapAlert:16,_currentMapInfos:16,_pasteEnabled:16,_showCopyPasteActions:16}}static{this.styles=k}static{this.shadowRootOptions=$}willUpdate(e){e.has("appLayout")&&this.appLayout&&this.appLayoutWatchHandler(this.appLayout,e.get("appLayout")),e.has("enableZoom")&&(this.hasUpdated||this.enableZoom!==!0)&&this.enableZoomWatchHandler(),e.has("mapInfos")&&this.hasUpdated&&this.mapInfosWatchHandler(),e.has("_isMobile")&&this.hasUpdated&&this._handleCopyPasteActions(),e.has("enableCopyPaste")&&this.hasUpdated&&this._handleCopyPasteActions()}appLayoutWatchHandler(e,t){e!==t&&(this._layerTable.value?.validateTableUpdate(e==="splitView"),this._setActiveLayout(e),this.appLayout==="mapView"&&this._layer?.isTable&&this._mapCard.value&&this._mapCard.value.updateLayer(),this._isMapViewOnLoad&&this._layerTable.value&&this._layerTable.value.refresh())}enableZoomWatchHandler(){this._initMapZoom()}mapInfosWatchHandler(){this.updateCurrentMapInfos()}async featureSelectionChange(e){this._numSelected=e.detail?.length}async popupClosed(){this._isMobile&&this.showHideMapPopupAndTable(!1)}async layoutChanged(e){this._layoutMode=e.detail}async mapChanged(e){this._isMapViewOnLoad&&(this._showMapInFullView(),this._isMapViewOnLoad=!1),this._mapChange=e.detail,this.showHideMapPopupAndTable(!1),this._pasteEnabled=!1,this._mapChange?.isValid?await this._mapChange.mapView?.when(async()=>{await this._setMapView()}):(this._mapInfo=this._mapChange&&this._getMapInfo(this._mapChange.id),this._showInvalidMapAlert=!0)}async layerSelectionChange(e){let t=e.detail[0],i=this._mapView&&await M(this._mapView,t);i&&await i.when(()=>{i.isTable&&!this._isMobile&&(this.appLayout="tableView"),this._layer=i,this._pasteEnabled=!1,this._handleCopyPasteActions(),this._initLayerExpressions(),this._handleFilterListReset(),this._isLoading=!1})}async showDelete(e){this._deleteIds=e.detail.ids,this._deleteDialogOpen=!0}async noLayersFound(){this._layer=void 0,this._isLoading=!1}async clearSelection(){this.showHideMapPopupAndTable(!1)}async relatedRecordToggled(e){let t=e.detail;this._relatedTableLayer=t}async creatingFeature(){this.appLayout="splitView"}featuresCopied(){this._pasteEnabled=!0}idsFound(e){this._layerIds=e.detail}load(){this.updateCurrentMapInfos(),this._resizeObserver=new ResizeObserver(()=>this._onResize())}render(){let e=this.popupHeaderColor&&this.popupHeaderColor!=="#FFFFFF"?"border-width-0":"",t=this.theme==="dark"?"calcite-mode-dark":"calcite-mode-light",i=this._translations.invalidWebMapMsg?.replace("{{web_map}}",this._mapInfo?.name||"");return s`${this._showInvalidMapAlert&&s`<calcite-alert auto-close class=${d(t)} icon=check-circle kind=danger label @calciteAlertClose=${()=>{this._showInvalidMapAlert=!1}} open placement=top><div slot=message>${i}</div></calcite-alert>`||""}<calcite-shell class="position-relative"><calcite-panel class=${`width-full height-full ${e}`} .loading=${this._isLoading}>${this._getBody(this._layoutMode,this._panelOpen,this._hideTable)}</calcite-panel>${this._getFooter()}</calcite-shell>${this._filterModal()}${!this._isMobile&&this._deleteModal()||""}`}async updated(){this._shouldSetMapView&&(this._shouldSetMapView=!1,this._mapChange&&await this._setMapView())}loaded(){this._resizeObserver?.observe(this.el),!this._defaultAppLayoutHonored&&this.defaultAppLayout?(this._defaultAppLayoutHonored=!0,this.appLayout=this.defaultAppLayout):this.appLayout||(this.appLayout="splitView"),this._isMapViewOnLoad=this.appLayout==="mapView",this._setActiveLayout(this.appLayout)}_getFooter(){let e=this._numSelected>0,t=this._layerTable.value&&this._layerTable.value.selectedRelatedIds?.length>0?this._relatedTableLayer:this._layer,i=this._layer?.editingEnabled&&this._layer.capabilities?.operations.supportsDelete;return this._isMobile&&e&&!this._hideFooter?s`<div class=${"width-100"} slot=footer><div class="display-flex padding-1-2"><calcite-button appearance=solid id=solutions-show @click=${()=>this.showHideMapPopupAndTable(!0)} width=full>${this._translations.view.replace("{{n}}",this._numSelected.toString())}</calcite-button>${i?s`<delete-button class="padding-inline-start-1 width-full" id=solutions-delete .ids=${this.updateIdsToBeDeleted()} @deleteClicked=${this.updateIdsToBeDeleted} .layer=${t}></delete-button>`:void 0}</div></div>`:void 0}updateIdsToBeDeleted(){return this._deleteIds=this._layerTable.value&&this._layerTable.value.selectedRelatedIds?.length>0?this._layerTable.value.selectedRelatedIds:this._layerTable.value?.selectedIds,this._deleteIds}_setActiveLayout(e){e==="splitView"&&!this._panelOpen&&this._toggleLayout(),e==="mapView"?this._showMapInFullView():this._showMapInCardView()}_getDividerIcon(e,t){return e==="HORIZONTAL"?t?"chevrons-up":"chevrons-down":e==="VERTICAL"||e==="GRID"?t?"chevrons-left":"chevrons-right":void 0}_getMapSizeClass(e,t,i){let a="";switch(e){case"HORIZONTAL":a=`${t&&!i?"height-1-2 display-grid":t&&i?"height-full":"height-0"} width-full position-relative`;break;case"GRID":a=`height-full position-relative ${t?"width-1-3":"width-0"}`;break;case"VERTICAL":a=`height-full position-relative ${t?"width-1-2":"width-0"}`;break}return a}_getTableSizeClass(e,t){let i="";switch(e){case"HORIZONTAL":i=`${t?"height-1-2":"height-full"} width-full display-flex flex-column`;break;case"GRID":i=`${t?"width-2-3":"width-full"} height-full display-flex`;break;case"VERTICAL":i=`${t?"width-1-2":"width-full"} height-full display-flex`;break}return i}_getBody(e,t,i){let a=e==="HORIZONTAL"?"":"display-flex",l=this.theme==="dark"?"calcite-mode-dark":"calcite-mode-light",o=document.dir==="rtl"?"left-0":"right-0";return s`<calcite-panel class="width-full height-full position-absolute"><div class=${`width-full height-full overflow-hidden ${a}`}>${this._getMapAndCard(e,t,i)}${this._getTable(e,t,i)}</div>${this.coverPageEnabled&&s`<div class=${`floating-container ${o}`} @click=${this.coverPageButtonClick}><calcite-button appearance=solid class=${`floating-button ${l}`} icon-start=content-minimal kind=neutral .label=${this._translations.coverPage} round scale=l split-child=primary width=auto></calcite-button></div>`||""}${this.introductionWindowEnabled&&s`<div class=${`floating-container ${o}`} @click=${this.infoButtonClick}><calcite-button appearance=solid class=${`floating-button ${l}`} icon-start=information-letter kind=neutral .label=${this._translations.information} round scale=l split-child=primary width=auto></calcite-button></div>`||""}</calcite-panel>`}infoButtonClick(){this.showIntroductionWindow.emit()}coverPageButtonClick(){this.showCoverPage.emit()}_getMapAndCard(e,t,i){let a=this._getMapSizeClass(e,t,i);return s`<div class=${`${a} overflow-hidden z-index-2`}>${this._getMapNode(t)}${this._getPopupExpandNode()}</div>`}_getMapNode(e){let t=this.appLayout==="mapView",i=this.appLayout==="tableView",a=this._isMobile?"height-full":t||i?"position-absolute-0":this._layoutMode==="HORIZONTAL"&&(!this._isMobile||e)?"":"adjusted-height-50",l=this.defaultWebmap&&this.defaultLayer,o=this.enableSelectionTool&&this.featureSelectionMode==="multiple"&&!this._layer?.isTable,p=["home","legend","search","fullscreen","basemap","floorfilter","layers-list","selectiontool"],c=["map-picker","map-layer-picker"],n=document.dir||"ltr";return s`<div class=${`${a} overflow-hidden`} id=card-mapView><map-card .appLayout=${this.appLayout} .appProxies=${this.appProxies} .basemapConfig=${this.basemapConfig} class="width-full" .defaultLayerId=${l?this.defaultLayer:""} .defaultWebmapId=${this.defaultWebmap} .enableBasemap=${this.enableBasemap} .enableFloorFilter=${this.enableFloorFilter} .enableFullscreen=${this.enableFullscreen} .enableHome=${this.enableHome} .enableLegend=${this.enableLegend} .enableLayerList=${this.enableLayerList} .enableSearch=${this.enableSearch} .enableSelectionTool=${o} .enableShare=${this.enableShare} enable-single-expand enable-map-layer-picker enable-map-picker .featureSelectionMode=${this.featureSelectionMode} .hide=${!this._isMobile&&i} zoom-tools-size=s .isMapLayout=${t} .isMobile=${this._isMobile} .mapInfo=${this._mapInfo} .mapInfos=${this._currentMapInfos.filter(u=>u.visible!==!1)} map-widgets-index=0 .mapWidgetsPosition=${n==="rtl"?"top-right":"top-left"} .mobileMapWidgetsPosition=${n==="rtl"?"top-left":"top-right"} map-component-id=arcgis-map map-widgets-size=s .showOnlyUpdatableLayers=${this.onlyShowUpdatableLayers} .pasteEnabled=${this._pasteEnabled} @toggleFilter=${this._toggleFilter} .selectedFeaturesIds=${this._layerTable.value?.selectedIds??[]} .selectedLayer=${this._layer} .shareIncludeEmbed=${this.shareIncludeEmbed} .shareIncludeSocial=${this.shareIncludeSocial} .showCopyPasteActions=${this._showCopyPasteActions} stack-tools .theme=${this.theme} .visibilityIcon=${this.visibilityIcon} .mapToolsOrder=${p} .mobileToolsOrder=${c} .zoomToScale=${this.zoomToScale} ${r(this._mapCard)}></map-card></div>`}_getPopupExpandNode(){let e=this._isMobile?"height-full":"height-full position-relative",t=this._isMobile&&this._showInformationHeader?"display-none height-0":"",i=this.popupHeaderColor?"":this._isMobile?"calcite-mode-light":"calcite-mode-dark",a=this._isMobile&&this._hideTable?"position-absolute-0 width-full height-full":this._isMobile?"display-none height-0":"",l=this._currentMapInfos?.length>1&&this.appLayout==="tableView"?"position-relative top-51":"",o=this.appLayout!=="tableView"?"position-sticky":"";return s`<div class=${`${i} ${e} ${a} ${l} ${o}`} style=${C({"--calcite-color-surface-2":this.popupHeaderColor,"--calcite-color-surface-3":this.popupHeaderHoverColor,"--calcite-color-text-3":this.popupHeaderTextColor,"--calcite-color-text-2":this.popupHeaderTextColor})}><calcite-panel>${!this._isMobile&&this._showInformationHeader||this._numSelected>0&&!this._isMobile?s`<div class=${`display-flex align-items-center ${t}`} slot=header-content><calcite-icon aria-hidden=true icon=information scale=s></calcite-icon><div class="padding-inline-start-75">${this._translations.information}</div></div>`:s`<div></div>`}${this._getCardNode()}</calcite-panel></div>`}_getCardNode(){let e=this.appLayout==="mapView",t=this.appLayout==="tableView",i=this._isMobile?"height-full":t&&this._currentMapInfos?.length>1?"adjusted-height-100-51":e||t?"height-full":this._numSelected>0&&!this._isMobile?"height-50":this._showInformationHeader?this._isMobile?"height-full":"height-50":"adjusted-height-50_25",a=this.theme==="dark"?"calcite-mode-dark":"calcite-mode-light",l=this._layerTable.value&&this._layerTable.value.selectedRelatedIds?.length>0?this._relatedTableLayer:this._layer;return s`<div class=${`width-50 height-full ${a}`}><card-manager class=${`${i} width-full`} .allowedPasteLayerIds=${this._layerIds} .customInfoText=${this.customInfoText} .enableCreateFeatures=${this._enableCreateFeatures&&!this._isMobile} .createBtnLabel=${this._mapInfo?.createFeatureButtonLabel} .enableEditGeometry=${this._mapInfo?.enableEditGeometry} .enableSnapping=${this.enableSnapping} .isMobile=${this._isMobile} .layerOrTable=${l} .mapView=${this?._mapView} map-component-id=arcgis-map @backFromCreateWorkFlow=${()=>{this._showInformationHeader=!0}} @createWorkFlowStarted=${()=>{this.appLayout=l?.isTable?"tableView":"mapView",this._showInformationHeader=!1}} @featureOrRecordSubmitted=${()=>this._layerTable.value&&void this._layerTable.value.refresh()} .pasteEnabled=${this._pasteEnabled} .selectedFeaturesIds=${this._layerTable.value?.selectedIds} .selectingFeatureFromMap=${this.appLayout==="mapView"} .showCopyPasteActions=${this._showCopyPasteActions} .showSketchWidgets=${l?.geometryType!=="point"} .zoomAndScrollToSelected=${this.zoomAndScrollToSelected}></card-manager></div>`}_getTable(e,t,i){let a=this.appLayout==="mapView",l=this.appLayout==="tableView",o=i&&this._isMobile?"visibility-hidden":a?"display-none":"",p=a?"height-full width-full z-index-0":"display-none",c=this._getTableSizeClass(e,t),n=e==="HORIZONTAL"?"horizontal":"vertical",u=e==="HORIZONTAL"?"header":"panel-start",b=this.defaultWebmap&&this.defaultLayer,S=this._isMobile?"border-top":"",g=this.defaultGlobalId?this.defaultGlobalId?.indexOf(",")>-1?this.defaultGlobalId.split(","):[this.defaultGlobalId]:void 0,F=this.defaultOid?this.defaultOid?.indexOf(",")>-1?this.defaultOid.split(",").map(V=>Number.parseInt(V,10)):[Number.parseInt(this.defaultOid,10)]:void 0;return s`<calcite-shell class=${`${c} ${S} border-bottom z-index-1`}>${this._isMobile?void 0:s`<calcite-action-bar class="border-sides" expand-disabled .layout=${n} slot=${u??w}>${this.getActions(e,t)}</calcite-action-bar>`}<div class=${`width-full height-full position-relative z-index-0 ${o}`}><layer-table .appLayout=${this.appLayout} .defaultGlobalId=${b?g:void 0} .defaultLayerId=${b?this.defaultLayer:""} .defaultOid=${b&&!g?F:void 0} .enableAutoRefresh=${this.enableAutoRefresh} .enableCSV=${this.enableCSV} .enableColumnReorder=${this.enableColumnReorder} .enableInlineEdit=${this?._mapInfo?.enableInlineEdit} .enableTableAutosave=${this._mapInfo?.enableTableAutosave!==void 0?this._mapInfo?.enableTableAutosave:!0} .enableShare=${this.enableShare} .featureSelectionMode=${this.featureSelectionMode} .honorMapFieldSettings=${this.honorMapFieldSettings} .isMobile=${this._isMobile} .mapHidden=${l} .mapInfo=${this._mapInfo} .mapView=${this?._mapView} .pasteEnabled=${this._pasteEnabled} .showOnlyUpdatableLayers=${this.onlyShowUpdatableLayers} @toggleFilter=${this._toggleFilter} .shareIncludeEmbed=${this.shareIncludeEmbed} .shareIncludeSocial=${this.shareIncludeSocial} .showNewestFirst=${this.showNewestFirst} .zoomAndScrollToSelected=${this.zoomAndScrollToSelected} .zoomToScale=${this.zoomToScale} .showCopyPasteActions=${this._showCopyPasteActions} .layerIds=${this._layerIds} ${r(this._layerTable)}></layer-table></div><div class=${d(p)} id=full-map-view></div></calcite-shell>`}getActions(e,t){let i=this._getDividerIcon(e,t),a=t?this._translations.close:this._translations.open,l="toggle-layout";return s`<calcite-action .active=${this.appLayout==="splitView"} alignment=center class="toggle-node" icon=browser id=browser-action @click=${()=>{this.appLayout="splitView"}} .text=${this._translations.splitView}></calcite-action><calcite-tooltip placement=right reference-element=browser-action><span>${this._translations.splitView}</span></calcite-tooltip><calcite-action .active=${this.appLayout==="tableView"} alignment=center class="toggle-node" icon=dock-left id=dock-left-action @click=${()=>{this.appLayout="tableView"}} .text=${this._translations.tableView}></calcite-action><calcite-tooltip placement=right reference-element=dock-left-action><span>${this._translations.tableView}</span></calcite-tooltip><calcite-action .active=${this.appLayout==="mapView"} alignment=center class="toggle-node" .disabled=${this._layer?.isTable} icon=browser-map id=browser-map-action @click=${()=>{this.appLayout="mapView"}} .text=${this._translations.mapView}></calcite-action><calcite-tooltip placement=right reference-element=browser-map-action><span>${this._translations.mapView}</span></calcite-tooltip><calcite-action alignment=center class="toggle-node" .icon=${i} id=${l} @click=${()=>this._toggleLayout()} slot=actions-end .text=${a}></calcite-action><calcite-tooltip placement=bottom .referenceElement=${l}><span>${a}</span></calcite-tooltip>`}_deleteModal(){let e=(this._layerTable.value?.selectedRelatedIds?.length??0)>0?this._relatedTableLayer:this._layer;return s`<delete-dialog id=deleteDialogId .ids=${this._deleteIds} .layer=${e} @deleteDialogClose=${()=>this._deleteDialogOpen=!1} .open=${this._deleteDialogOpen}></delete-dialog>`}_mapExtentFilter(){let e=this._layerExpressions?.length===0;return s`<calcite-panel><div><calcite-block class=${d(this.theme==="dark"?"background-dark":"")} heading menu-placement=bottom-end open><div class="filter-extent-container"><div class="filter-extent-message"><span>${this._translations.filterByExtentMsg}</span><calcite-icon icon=information id=filter-message-info scale=s></calcite-icon><calcite-tooltip overlay-positioning=fixed placement=top reference-element=filter-message-info>${this._translations.filterByExtentTooltipMsg}</calcite-tooltip></div><calcite-switch .checked=${this._mapExtentFilterChecked} @calciteSwitchChange=${t=>{let i=!!(t.target.checked||this._filterList.value?.filterCount&&this._filterList.value?.filterCount>0);this._layerTable.value&&this._layerTable.value?.filterUpdate(i,t.target.checked),this._mapCard.value&&this._mapCard.value?.updateFilterState(i),this._mapExtentFilterChecked=t.target.checked}} scale=m></calcite-switch></div></calcite-block>${e&&s`<div class="filter-modal-buttons" slot=footer><calcite-button appearance=outline @click=${this._handleFilterListReset} width=full>${this._translations.Resetfilter}</calcite-button><calcite-button @click=${this._closeFilter} width=full>${this._translations.close}</calcite-button></div>`||""}</div></calcite-panel>`}_filterModal(){let e=this._layerExpressions?.length>0,t=this.theme==="dark"?"calcite-mode-dark":"calcite-mode-light";return s`<calcite-dialog class=${`filter-content-space ${t}`} .heading=${this._translations.filter.replace("{{title}}",this._layer?.title||"")} id=solutions-filter-dialog-manager kind=brand modal @calciteDialogClose=${()=>{this._closeFilter()}} .open=${this._filterOpen} width=s>${!this._layer?.isTable&&this._mapExtentFilter()||""}${e&&this._mapView&&s`<instant-apps-filter-list close-btn .closeBtnOnClick=${()=>{this._closeFilter()}} combobox-overlay-positioning=fixed .layerExpressions=${this._layerExpressions} @filterListReset=${this._handleFilterListReset} @filterUpdate=${()=>{this._updateFilter()}} .view=${this._mapView} ${r(this._filterList)}></instant-apps-filter-list>`||""}</calcite-dialog>`}_updateFilter(){let e=this._filterList?.value?.filterCount&&this._filterList.value.filterCount>0||this._mapExtentFilterChecked;this._layerTable.value&&this._layerTable.value?.filterUpdate(e),this._mapCard.value&&this._mapCard.value.updateFilterState(e)}_initLayerExpressions(){let e=this._mapInfo?.filterConfig?.layerExpressions;this._layerExpressions=e?e.filter(t=>t.id===this._layer?.id):[]}_toggleFilter(){this._filterOpen=!this._filterOpen}_handleFilterListReset(){this._mapExtentFilterChecked=!1,this._mapCard.value&&this._mapCard.value.resetFilter(),this._layerTable.value&&this._layerTable.value.filterReset()}async _closeFilter(){this._filterOpen&&(this._filterOpen=!1,this._layerTable.value&&this._layerTable.value.closeFilter())}_onResize(){let e=this.el.offsetWidth<=1024,t=!this._isMobile&&e;this._isMobile=e,t&&(this._panelOpen=!0),this._isMobile?(this.showHideMapPopupAndTable(!this._isMobile),this.appLayout="splitView"):(this._layer?.isTable&&(this.appLayout="tableView"),this._isMobile=!1),this._layoutMode=this._isMobile?"HORIZONTAL":"GRID"}updateCurrentMapInfos(){this._currentMapInfos=this.mapInfos,!this.enableMapList&&this.defaultWebmap&&(this._currentMapInfos=this.mapInfos.filter(e=>e.id===this.defaultWebmap))}_handleCopyPasteActions(){this._layer&&(this._showCopyPasteActions=this.enableCopyPaste&&this._layer.capabilities.operations.supportsAdd&&!this._isMobile)}_toggleLayout(){this._panelOpen=!this._panelOpen}_showMapInCardView(){if(this.appLayout!=="mapView"){let e=document.getElementById("full-map-view")?.childNodes[0],t=document.getElementById("card-mapView");e&&t&&t.appendChild(e)}}_showMapInFullView(){let e=document.getElementById("card-mapView")?.childNodes,t;e?.forEach(a=>{!t&&a.mapView&&(t=a)});let i=document.getElementById("full-map-view");t&&i&&i.appendChild(t)}showHideMapPopupAndTable(e){this._hideTable=e,this._hideFooter=e}_getMapInfo(e){let t;return this._currentMapInfos.some(i=>i.id===e?(t={...i},!0):!1),t}async _setMapView(){let e=this._mapChange&&this._getMapInfo(this._mapChange.id);if(e&&this._mapChange){this._mapInfo=e,this._initLayerExpressions(),this._enableCreateFeatures=this._mapInfo.enableCreateFeatures,this._mapView=this._mapChange.mapView,this._initMapZoom(),this._mapView&&(this._mapView.popupEnabled=!1,T(this._mapView));let t=!this.defaultCenter||this._defaultCenterHonored?void 0:this.defaultCenter?.split(";").map(a=>Number.parseFloat(a)),i=!this.defaultLevel||this._defaultLevelHonored?void 0:Number.parseInt(this.defaultLevel,10);t&&i&&(await this._mapView?.goTo({center:t,zoom:i}),this._defaultCenterHonored=!0,this._defaultLevelHonored=!0)}}_initMapZoom(){this.enableZoom?this.enableZoom&&this._mapView?.ui.add({component:"zoom",position:"top-left",index:0}):this._mapView?.ui.remove("zoom")}};I("crowdsource-manager",m);return m},a,b)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import d from"./
|
|
2
|
+
import d from"./WGOI2WQZ.js";import"./FILMKUOU.js";import c from"./7J2F4TFI.js";import"./BNRFT546.js";import"./ONARC6AZ.js";import"./54AE7WD2.js";import"./WPGT2HLS.js";import b from"./XC3IZAIH.js";import a from"./EXC566PM.js";import"./2B4SGB3I.js";import"./I2NTSKBD.js";import"./3UKDJZ2D.js";import"./MGEDATQ7.js";import"./RMEDO4JC.js";import"./ISFTCFSJ.js";import"./TEHBW75B.js";import"./IHG7KTNC.js";import"./ZCU2WWVN.js";import"./WGO4EVOV.js";import"./YKB6256M.js";import"./N22MFQSQ.js";import"./N7BXCDA3.js";import"./ZX3UHK6P.js";import"./Z4F2NZOT.js";import"./KOIDWEP3.js";import"./3KXMYZCU.js";import"./LP2JYX4X.js";import"./GF4QELNV.js";import"./AYSQIO6L.js";import"./YQHYMLC7.js";import"./DKD2EGQP.js";import"./5O53T3SW.js";import"./AJZDBHB6.js";import"./FES7B3SJ.js";import"./2I5LGZNX.js";import"./FFF5HUPM.js";import"./QPIMTXPL.js";export default $arcgis.t(([,,,{b:o}])=>{return o},a,b,c,d)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{c as C}from"./ZS3UOY5Q.js";import e from"./GSD6O5J7.js";import d from"./XC3IZAIH.js";import a from"./EXC566PM.js";import{b as $}from"./2B4SGB3I.js";import{b as T}from"./I2NTSKBD.js";import{sb as _,ta as b,tb as x,ub as w}from"./3UKDJZ2D.js";import{a as S}from"./MGEDATQ7.js";import"./RMEDO4JC.js";import"./ISFTCFSJ.js";import"./TEHBW75B.js";import"./IHG7KTNC.js";import"./ZCU2WWVN.js";import"./WGO4EVOV.js";import"./YKB6256M.js";import"./N22MFQSQ.js";import"./N7BXCDA3.js";import"./ZX3UHK6P.js";import"./Z4F2NZOT.js";import"./KOIDWEP3.js";import"./3KXMYZCU.js";import"./LP2JYX4X.js";import"./GF4QELNV.js";import"./AYSQIO6L.js";import"./YQHYMLC7.js";import"./DKD2EGQP.js";import"./5O53T3SW.js";import"./AJZDBHB6.js";import"./FES7B3SJ.js";import{b as D}from"./2I5LGZNX.js";import{E as m,F as h,G as I,I as f,h as v,i as u,q as c}from"./FFF5HUPM.js";import"./QPIMTXPL.js";export default $arcgis.t(([{h:g,t:P},{p:V,r:E},{a:N}])=>{var L=v`*[tabindex]:focus-visible{outline-style:solid!important;outline-width:2px!important;outline-color:var(--calcite-color-brand)!important;outline-offset:2px!important}.display-flex{display:flex}.display-none{display:none}.flex-direction-column{flex-direction:column}.flex-direction-row{flex-direction:row}.font-weight-medium{font-weight:var(--calcite-font-weight-medium)}.font-style-1{font-size:1rem;color:var(--calcite-color-text-2)}.margin-top-0{margin-top:0}.padding-top-20{padding-top:20px}.padding-bottom-2{padding-bottom:2rem}.padding-left-2{padding-left:2rem}.padding-right-2{padding-right:2rem}.padding-end-1{padding-inline-end:1rem}.padding-end-1-2{padding-inline-end:.5rem}.width-full{width:100%}.justify-content-space{justify-content:space-between}`,y=class extends I{constructor(){super(...arguments),this.open=!1,this.source="Card Dropdown",this.solutionData={},this.templateInfos=[],this._saveDisabled=!1,this._displayTemplateInfos=[],this._hasNameLengthError=!1,this._nonSolutionDependencyItems=[],this._solutionItemsTitlesUpdating=!1,this._translations=S({name:"solution-configure-titles",blocking:!0}),this._configContextConsumer=T({context:$,subscribe:!0}),this._defaultPrefix="",this._defaultSuffix="",this._loadingDefaultPrefix=!1,this._loadingDefaultSuffix=!1,this._prefixRef=m(),this._prefixValue="",this._suffixRef=m(),this._suffixValue="",this._templateInfos=[],this._originalTitles=[],this.solutionConfigureTitlesBeforeClose=c(),this.solutionItemsTitlesChanged=c()}static{this.properties={card:0,open:5,source:1,solutionData:1,templateInfos:0,_saveDisabled:16,_displayTemplateInfos:16,_hasNameLengthError:16,_nonSolutionDependencyItems:16,_solutionItemsTitlesUpdating:16,_translations:16}}static{this.styles=L}async willUpdate(i){if(i.has("templateInfos")&&(this._templateInfos=JSON.parse(JSON.stringify(this.templateInfos)),this._updateTemplates()),i.has("open")){let e=i.get("open");if(this.open&&!e){await this._updatePrefixSuffix(),this._templateInfos=JSON.parse(JSON.stringify(this.templateInfos)),this._originalTitles=this._templateInfos.map(t=>({id:t.id,title:t.title})),this._updateTemplates();let s=await N(this._configContextConsumer.value.userSession,this.card);this._nonSolutionDependencyItems=s._nonSolutionDependencyItems,await this._accordionRef?.expandFirstItem()}}}get _telemetry(){return this._configContextConsumer.value?.telemetrySession}async load(){this._updateTemplates(),await this._updatePrefixSuffix()}async _updatePrefixSuffix(){this.solutionData=await b(this.card.id,this._configContextConsumer.value.userSession),this.solutionData.titles?.prefix&&(this._loadingDefaultPrefix=!0,this._defaultPrefix=this.solutionData.titles.prefix,this._prefixValue=this.solutionData.titles.prefix),this.solutionData.titles?.suffix&&(this._loadingDefaultSuffix=!0,this._defaultSuffix=this.solutionData.titles.suffix,this._suffixValue=this.solutionData.titles.suffix)}render(){return u`<calcite-dialog .heading=${this.card.title} modal @calciteDialogBeforeClose=${()=>{this.solutionConfigureTitlesBeforeClose.emit()}} .open=${this.open} outside-close-disabled width=l>${this._getPrefixSuffixControls()}${this._getAccordion()}${this._getDialogButtons()}</calcite-dialog>`}_getPrefixSuffixControls(){let i=C(this._prefixValue),e=this._hasNameLengthError&&this._prefixValue.length>0,s=i.errorType!=="special-character",t=!e,a=s?"display-none":"",n=t?"display-none":"",p=s&&t?"valid":"invalid",d=C(this._suffixValue),l=this._hasNameLengthError&&this._suffixValue.length>0,o=d.errorType!=="special-character",r=!l,W=o?"display-none":"",k=r?"display-none":"",O=o&&r?"valid":"invalid";return this._saveDisabled=!s||!t||!o||!r||!this._hasChanges(),u`<div class="display-flex flex-direction-column padding-left-2 padding-right-2 padding-top-20"><calcite-label scale=l class="font-weight-medium"><span tabindex=0>${this._translations.configureTitlesDialogHeader}</span></calcite-label><p class="font-style-1 margin-top-0" tabindex=0>${this._translations.addPrefixOrSuffixToItems}</p><div class="display-flex flex-direction-row justify-content-space"><calcite-label class="width-full padding-end-1" scale=l>${this._translations.prefixToAddToItems}<calcite-input clearable @blur=${this._prefixInput} @input=${this._prefixInput} .placeholder=${this._translations.enterPrefixPlaceholder} .status=${p} .value=${this._prefixValue} ${h(this._prefixRef)}></calcite-input><calcite-input-message class=${f(a)} icon=exclamation-mark-triangle status=invalid>${this._translations.invalidPrefixOrSuffixCharsError}</calcite-input-message><calcite-input-message class=${f(n)} icon=exclamation-mark-triangle status=invalid>${this._translations.invalidPrefixOrSuffixLengthError}</calcite-input-message></calcite-label><calcite-label class="width-full" scale=l>${this._translations.suffixToAddToItems}<calcite-input clearable @blur=${this._suffixInput} @input=${this._suffixInput} .placeholder=${this._translations.enterSuffixPlaceholder} .status=${O} .value=${this._suffixValue} ${h(this._suffixRef)}></calcite-input><calcite-input-message class=${f(W)} icon=exclamation-mark-triangle status=invalid>${this._translations.invalidPrefixOrSuffixCharsError}</calcite-input-message><calcite-input-message class=${f(k)} icon=exclamation-mark-triangle status=invalid>${this._translations.invalidPrefixOrSuffixLengthError}</calcite-input-message></calcite-label></div></div>`}_getAccordion(){let i=P(this._nonSolutionDependencyItems,this.card.id);return u`<div class="display-flex flex-direction-column padding-left-2 padding-right-2 padding-bottom-2"><p class="font-style-1 margin-top-0">${this._translations.previewTheChanges}</p><solution-item-accordion .itemRelationshipDependencies=${i} list-selection-mode=multiple .reuseWarning=${this._translations.itemDependencyReuseWarning} .templateInfos=${this._displayTemplateInfos} .typeKeywords=${this.card?.typeKeywords} usage-context=rename ${h(async e=>{e&&(this._accordionRef=e)})}></solution-item-accordion></div>`}_getDialogButtons(){return u`<div slot=footer-end><calcite-button appearance=outline class="padding-end-1-2" kind=brand @click=${this._closeDialog}>${this._translations.cancelTheDialog}</calcite-button><calcite-button .disabled=${this._saveDisabled||g(this._configContextConsumer.value)} kind=brand .loading=${this._solutionItemsTitlesUpdating} @click=${this._commitNameChanges}>${this._translations.applyChangesAndCloseTheDialog}</calcite-button></div>`}_prefixInput(){clearTimeout(this._textInputTimeout),this._textInputTimeout=setTimeout(()=>{this._prefixValue=this._prefixRef.value?.value||"",this._updateTemplates()},500)}_suffixInput(){clearTimeout(this._textInputTimeout),this._textInputTimeout=setTimeout(()=>{this._suffixValue=this._suffixRef.value?.value||"",this._updateTemplates()},500)}_updateTemplates(){let i=this._configContextConsumer.value?.authentication?.CanUpdateSolution??!1,e=this._configContextConsumer.value?.authentication?.PortalUserName;this._templateInfos=this._templateInfos.map(t=>(this._loadingDefaultPrefix&&t.title.startsWith(this._prefixValue)&&(t.title=this._replaceStart(t.title,this._prefixValue,"")),this._loadingDefaultSuffix&&t.title.endsWith(this._suffixValue)&&(t.title=this._replaceAtEnd(t.title,this._suffixValue,"")),t));let s=JSON.parse(JSON.stringify(this._templateInfos));this._hasNameLengthError=!1,this._displayTemplateInfos=s.map(t=>{let a=this._prefixValue!=="",n=this._suffixValue!=="",p=this._defaultPrefix!=="",d=this._defaultSuffix!=="";if(t.owner!==e&&!i)return t;let l=t.title;a&&(p?this._originalTitles.find(r=>r.id===t.id)?.title.startsWith(this._defaultPrefix)?l=this._applyPrefixWithDuplicateCheck(t.title,this._prefixValue):this._prefixValue!==this._defaultPrefix&&(l=this._applyPrefixWithDuplicateCheck(t.title,this._prefixValue)):l=this._applyPrefixWithDuplicateCheck(t.title,this._prefixValue));let o=l;return n&&(d?this._originalTitles.find(r=>r.id===t.id)?.title.endsWith(this._defaultSuffix)?o=this._applySuffixWithDuplicateCheck(l,this._suffixValue):this._suffixValue!==this._defaultSuffix&&(o=this._applySuffixWithDuplicateCheck(l,this._suffixValue)):o=this._applySuffixWithDuplicateCheck(l,this._suffixValue)),t.title=o,this._hasNameLengthError||(this._hasNameLengthError=t.title.length>V),t}),this._loadingDefaultPrefix=!1,this._loadingDefaultSuffix=!1}_replaceStart(i,e,s){return i.startsWith(e)?`${s}${i.slice(e.length)}`:i}_replaceAtEnd(i,e,s){return i.endsWith(e)?`${i.substring(0,i.length-e.length)}${s}`:i}_applyPrefixWithDuplicateCheck(i,e){return!e||i.startsWith(e)?i:e+i}_applySuffixWithDuplicateCheck(i,e){return!e||i.endsWith(e)?i:i+e}_hasChanges(){let i=this._defaultPrefix!==this._prefixValue,e=this._defaultSuffix!==this._suffixValue;return this._displayTemplateInfos.some(s=>{let t=this._originalTitles.find(a=>a.id===s.id);return t&&t.title!==s.title})||i||e}_closeDialog(){this.open=!1}async _commitNameChanges(){if(!g(this._configContextConsumer.value)){if(this._hasChanges()){this._telemetry?.logEvent({category:E.DEPLOYMENTS,action:"Rename Items",dimensions:[this.card?.title||"",this.card?.deployCommonId||"",this.card?.deployVersion||"",this.source]}),this._solutionItemsTitlesUpdating=!0;let i=this._configContextConsumer.value?.authentication?.CanUpdateSolution??!1,e=this._configContextConsumer.value?.authentication?.PortalUserName,s=this._displayTemplateInfos.reduce((t,a)=>{if(a.owner!==e){if(i){let n={id:a.id,title:a.title};t.push(a.type==="Group"?x(n,this._configContextConsumer.value.userSession):_(n,this._configContextConsumer.value.userSession,void 0,{solutionOwner:this.card?.owner}))}}else{let n={id:a.id,title:a.title};t.push(a.type==="Group"?x(n,this._configContextConsumer.value.userSession):_(n,this._configContextConsumer.value.userSession,void 0,{solutionOwner:this.card?.owner}))}return t},[]);if(this.solutionData?.templates){let t={id:this.card.id},a={...this.solutionData,titles:{prefix:this._prefixValue,suffix:this._suffixValue}};s.push(w(t,a,this._configContextConsumer.value.userSession,void 0,void 0,null,this.card?.owner))}await Promise.all(s),this._solutionItemsTitlesUpdating=!1,this.solutionItemsTitlesChanged.emit()}this._closeDialog()}}};D("solution-configure-titles",y);return y},a,d,e)
|
|
2
|
+
import e from"./GSD6O5J7.js";import{c as C}from"./BNRFT546.js";import d from"./XC3IZAIH.js";import a from"./EXC566PM.js";import{b as $}from"./2B4SGB3I.js";import{b as T}from"./I2NTSKBD.js";import{sb as _,ta as b,tb as x,ub as w}from"./3UKDJZ2D.js";import{a as S}from"./MGEDATQ7.js";import"./RMEDO4JC.js";import"./ISFTCFSJ.js";import"./TEHBW75B.js";import"./IHG7KTNC.js";import"./ZCU2WWVN.js";import"./WGO4EVOV.js";import"./YKB6256M.js";import"./N22MFQSQ.js";import"./N7BXCDA3.js";import"./ZX3UHK6P.js";import"./Z4F2NZOT.js";import"./KOIDWEP3.js";import"./3KXMYZCU.js";import"./LP2JYX4X.js";import"./GF4QELNV.js";import"./AYSQIO6L.js";import"./YQHYMLC7.js";import"./DKD2EGQP.js";import"./5O53T3SW.js";import"./AJZDBHB6.js";import"./FES7B3SJ.js";import{b as D}from"./2I5LGZNX.js";import{E as m,F as h,G as I,I as f,h as v,i as u,q as c}from"./FFF5HUPM.js";import"./QPIMTXPL.js";export default $arcgis.t(([{h:g,t:P},{p:V,r:E},{a:N}])=>{var L=v`*[tabindex]:focus-visible{outline-style:solid!important;outline-width:2px!important;outline-color:var(--calcite-color-brand)!important;outline-offset:2px!important}.display-flex{display:flex}.display-none{display:none}.flex-direction-column{flex-direction:column}.flex-direction-row{flex-direction:row}.font-weight-medium{font-weight:var(--calcite-font-weight-medium)}.font-style-1{font-size:1rem;color:var(--calcite-color-text-2)}.margin-top-0{margin-top:0}.padding-top-20{padding-top:20px}.padding-bottom-2{padding-bottom:2rem}.padding-left-2{padding-left:2rem}.padding-right-2{padding-right:2rem}.padding-end-1{padding-inline-end:1rem}.padding-end-1-2{padding-inline-end:.5rem}.width-full{width:100%}.justify-content-space{justify-content:space-between}`,y=class extends I{constructor(){super(...arguments),this.open=!1,this.source="Card Dropdown",this.solutionData={},this.templateInfos=[],this._saveDisabled=!1,this._displayTemplateInfos=[],this._hasNameLengthError=!1,this._nonSolutionDependencyItems=[],this._solutionItemsTitlesUpdating=!1,this._translations=S({name:"solution-configure-titles",blocking:!0}),this._configContextConsumer=T({context:$,subscribe:!0}),this._defaultPrefix="",this._defaultSuffix="",this._loadingDefaultPrefix=!1,this._loadingDefaultSuffix=!1,this._prefixRef=m(),this._prefixValue="",this._suffixRef=m(),this._suffixValue="",this._templateInfos=[],this._originalTitles=[],this.solutionConfigureTitlesBeforeClose=c(),this.solutionItemsTitlesChanged=c()}static{this.properties={card:0,open:5,source:1,solutionData:1,templateInfos:0,_saveDisabled:16,_displayTemplateInfos:16,_hasNameLengthError:16,_nonSolutionDependencyItems:16,_solutionItemsTitlesUpdating:16,_translations:16}}static{this.styles=L}async willUpdate(i){if(i.has("templateInfos")&&(this._templateInfos=JSON.parse(JSON.stringify(this.templateInfos)),this._updateTemplates()),i.has("open")){let e=i.get("open");if(this.open&&!e){await this._updatePrefixSuffix(),this._templateInfos=JSON.parse(JSON.stringify(this.templateInfos)),this._originalTitles=this._templateInfos.map(t=>({id:t.id,title:t.title})),this._updateTemplates();let s=await N(this._configContextConsumer.value.userSession,this.card);this._nonSolutionDependencyItems=s._nonSolutionDependencyItems,await this._accordionRef?.expandFirstItem()}}}get _telemetry(){return this._configContextConsumer.value?.telemetrySession}async load(){this._updateTemplates(),await this._updatePrefixSuffix()}async _updatePrefixSuffix(){this.solutionData=await b(this.card.id,this._configContextConsumer.value.userSession),this.solutionData.titles?.prefix&&(this._loadingDefaultPrefix=!0,this._defaultPrefix=this.solutionData.titles.prefix,this._prefixValue=this.solutionData.titles.prefix),this.solutionData.titles?.suffix&&(this._loadingDefaultSuffix=!0,this._defaultSuffix=this.solutionData.titles.suffix,this._suffixValue=this.solutionData.titles.suffix)}render(){return u`<calcite-dialog .heading=${this.card.title} modal @calciteDialogBeforeClose=${()=>{this.solutionConfigureTitlesBeforeClose.emit()}} .open=${this.open} outside-close-disabled width=l>${this._getPrefixSuffixControls()}${this._getAccordion()}${this._getDialogButtons()}</calcite-dialog>`}_getPrefixSuffixControls(){let i=C(this._prefixValue),e=this._hasNameLengthError&&this._prefixValue.length>0,s=i.errorType!=="special-character",t=!e,a=s?"display-none":"",n=t?"display-none":"",p=s&&t?"valid":"invalid",d=C(this._suffixValue),l=this._hasNameLengthError&&this._suffixValue.length>0,o=d.errorType!=="special-character",r=!l,W=o?"display-none":"",k=r?"display-none":"",O=o&&r?"valid":"invalid";return this._saveDisabled=!s||!t||!o||!r||!this._hasChanges(),u`<div class="display-flex flex-direction-column padding-left-2 padding-right-2 padding-top-20"><calcite-label scale=l class="font-weight-medium"><span tabindex=0>${this._translations.configureTitlesDialogHeader}</span></calcite-label><p class="font-style-1 margin-top-0" tabindex=0>${this._translations.addPrefixOrSuffixToItems}</p><div class="display-flex flex-direction-row justify-content-space"><calcite-label class="width-full padding-end-1" scale=l>${this._translations.prefixToAddToItems}<calcite-input clearable @blur=${this._prefixInput} @input=${this._prefixInput} .placeholder=${this._translations.enterPrefixPlaceholder} .status=${p} .value=${this._prefixValue} ${h(this._prefixRef)}></calcite-input><calcite-input-message class=${f(a)} icon=exclamation-mark-triangle status=invalid>${this._translations.invalidPrefixOrSuffixCharsError}</calcite-input-message><calcite-input-message class=${f(n)} icon=exclamation-mark-triangle status=invalid>${this._translations.invalidPrefixOrSuffixLengthError}</calcite-input-message></calcite-label><calcite-label class="width-full" scale=l>${this._translations.suffixToAddToItems}<calcite-input clearable @blur=${this._suffixInput} @input=${this._suffixInput} .placeholder=${this._translations.enterSuffixPlaceholder} .status=${O} .value=${this._suffixValue} ${h(this._suffixRef)}></calcite-input><calcite-input-message class=${f(W)} icon=exclamation-mark-triangle status=invalid>${this._translations.invalidPrefixOrSuffixCharsError}</calcite-input-message><calcite-input-message class=${f(k)} icon=exclamation-mark-triangle status=invalid>${this._translations.invalidPrefixOrSuffixLengthError}</calcite-input-message></calcite-label></div></div>`}_getAccordion(){let i=P(this._nonSolutionDependencyItems,this.card.id);return u`<div class="display-flex flex-direction-column padding-left-2 padding-right-2 padding-bottom-2"><p class="font-style-1 margin-top-0">${this._translations.previewTheChanges}</p><solution-item-accordion .itemRelationshipDependencies=${i} list-selection-mode=multiple .reuseWarning=${this._translations.itemDependencyReuseWarning} .templateInfos=${this._displayTemplateInfos} .typeKeywords=${this.card?.typeKeywords} usage-context=rename ${h(async e=>{e&&(this._accordionRef=e)})}></solution-item-accordion></div>`}_getDialogButtons(){return u`<div slot=footer-end><calcite-button appearance=outline class="padding-end-1-2" kind=brand @click=${this._closeDialog}>${this._translations.cancelTheDialog}</calcite-button><calcite-button .disabled=${this._saveDisabled||g(this._configContextConsumer.value)} kind=brand .loading=${this._solutionItemsTitlesUpdating} @click=${this._commitNameChanges}>${this._translations.applyChangesAndCloseTheDialog}</calcite-button></div>`}_prefixInput(){clearTimeout(this._textInputTimeout),this._textInputTimeout=setTimeout(()=>{this._prefixValue=this._prefixRef.value?.value||"",this._updateTemplates()},500)}_suffixInput(){clearTimeout(this._textInputTimeout),this._textInputTimeout=setTimeout(()=>{this._suffixValue=this._suffixRef.value?.value||"",this._updateTemplates()},500)}_updateTemplates(){let i=this._configContextConsumer.value?.authentication?.CanUpdateSolution??!1,e=this._configContextConsumer.value?.authentication?.PortalUserName;this._templateInfos=this._templateInfos.map(t=>(this._loadingDefaultPrefix&&t.title.startsWith(this._prefixValue)&&(t.title=this._replaceStart(t.title,this._prefixValue,"")),this._loadingDefaultSuffix&&t.title.endsWith(this._suffixValue)&&(t.title=this._replaceAtEnd(t.title,this._suffixValue,"")),t));let s=JSON.parse(JSON.stringify(this._templateInfos));this._hasNameLengthError=!1,this._displayTemplateInfos=s.map(t=>{let a=this._prefixValue!=="",n=this._suffixValue!=="",p=this._defaultPrefix!=="",d=this._defaultSuffix!=="";if(t.owner!==e&&!i)return t;let l=t.title;a&&(p?this._originalTitles.find(r=>r.id===t.id)?.title.startsWith(this._defaultPrefix)?l=this._applyPrefixWithDuplicateCheck(t.title,this._prefixValue):this._prefixValue!==this._defaultPrefix&&(l=this._applyPrefixWithDuplicateCheck(t.title,this._prefixValue)):l=this._applyPrefixWithDuplicateCheck(t.title,this._prefixValue));let o=l;return n&&(d?this._originalTitles.find(r=>r.id===t.id)?.title.endsWith(this._defaultSuffix)?o=this._applySuffixWithDuplicateCheck(l,this._suffixValue):this._suffixValue!==this._defaultSuffix&&(o=this._applySuffixWithDuplicateCheck(l,this._suffixValue)):o=this._applySuffixWithDuplicateCheck(l,this._suffixValue)),t.title=o,this._hasNameLengthError||(this._hasNameLengthError=t.title.length>V),t}),this._loadingDefaultPrefix=!1,this._loadingDefaultSuffix=!1}_replaceStart(i,e,s){return i.startsWith(e)?`${s}${i.slice(e.length)}`:i}_replaceAtEnd(i,e,s){return i.endsWith(e)?`${i.substring(0,i.length-e.length)}${s}`:i}_applyPrefixWithDuplicateCheck(i,e){return!e||i.startsWith(e)?i:e+i}_applySuffixWithDuplicateCheck(i,e){return!e||i.endsWith(e)?i:i+e}_hasChanges(){let i=this._defaultPrefix!==this._prefixValue,e=this._defaultSuffix!==this._suffixValue;return this._displayTemplateInfos.some(s=>{let t=this._originalTitles.find(a=>a.id===s.id);return t&&t.title!==s.title})||i||e}_closeDialog(){this.open=!1}async _commitNameChanges(){if(!g(this._configContextConsumer.value)){if(this._hasChanges()){this._telemetry?.logEvent({category:E.DEPLOYMENTS,action:"Rename Items",dimensions:[this.card?.title||"",this.card?.deployCommonId||"",this.card?.deployVersion||"",this.source]}),this._solutionItemsTitlesUpdating=!0;let i=this._configContextConsumer.value?.authentication?.CanUpdateSolution??!1,e=this._configContextConsumer.value?.authentication?.PortalUserName,s=this._displayTemplateInfos.reduce((t,a)=>{if(a.owner!==e){if(i){let n={id:a.id,title:a.title};t.push(a.type==="Group"?x(n,this._configContextConsumer.value.userSession):_(n,this._configContextConsumer.value.userSession,void 0,{solutionOwner:this.card?.owner}))}}else{let n={id:a.id,title:a.title};t.push(a.type==="Group"?x(n,this._configContextConsumer.value.userSession):_(n,this._configContextConsumer.value.userSession,void 0,{solutionOwner:this.card?.owner}))}return t},[]);if(this.solutionData?.templates){let t={id:this.card.id},a={...this.solutionData,titles:{prefix:this._prefixValue,suffix:this._suffixValue}};s.push(w(t,a,this._configContextConsumer.value.userSession,void 0,void 0,null,this.card?.owner))}await Promise.all(s),this._solutionItemsTitlesUpdating=!1,this.solutionItemsTitlesChanged.emit()}this._closeDialog()}}};D("solution-configure-titles",y);return y},a,d,e)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{$a as da,A,Aa as E,B,Ba as F,Ca as G,Da as H,Ea as I,Fa as J,Ga as K,Ha as L,Ia as M,Ja as N,Ka as O,La as P,Ma as Q,Na as R,Oa as S,Pa as T,Qa as U,Ra as V,Sa as W,Ta as X,Ua as Y,Va as Z,Wa as _,Xa as $,Ya as aa,Za as ba,_a as ca,a,ab as ea,b,bb as fa,c,cb as ga,d,db as ha,e,eb as ia,f,fb as ja,g,gb as ka,h,hb as la,i,ib as ma,j,jb as na,k,kb as oa,l,m,n,nb as pa,o,ob as qa,p,pb as ra,q,qb as sa,r,ra as C,rb as ta,s,sb as ua,t,tb as va,u,ub as wa,v,vb as xa,w,wb as ya,x,xb as za,y,z,za as D}from"./
|
|
2
|
+
import{$a as da,A,Aa as E,B,Ba as F,Ca as G,Da as H,Ea as I,Fa as J,Ga as K,Ha as L,Ia as M,Ja as N,Ka as O,La as P,Ma as Q,Na as R,Oa as S,Pa as T,Qa as U,Ra as V,Sa as W,Ta as X,Ua as Y,Va as Z,Wa as _,Xa as $,Ya as aa,Za as ba,_a as ca,a,ab as ea,b,bb as fa,c,cb as ga,d,db as ha,e,eb as ia,f,fb as ja,g,gb as ka,h,hb as la,i,ib as ma,j,jb as na,k,kb as oa,l,m,n,nb as pa,o,ob as qa,p,pb as ra,q,qb as sa,r,ra as C,rb as ta,s,sb as ua,t,tb as va,u,ub as wa,v,vb as xa,w,wb as ya,x,xb as za,y,z,za as D}from"./33UAZ7BX.js";import"./QPIMTXPL.js";export{M as Annotation,I as AsyncBatchedStore,K as BaseChannel,F as BaseCheckpointSaver,k as BaseLangGraphError,H as BaseStore,L as BinaryOperatorAggregate,d as COMMAND_SYMBOL,C as ChatModelStreamImpl,i as Command,e as CommandInstance,qa as CompiledStateGraph,b as END,v as EmptyChannelError,u as EmptyInputError,R as EventLog,da as Graph,l as GraphBubbleUp,o as GraphInterrupt,m as GraphRecursionError,$ as GraphRunStream,n as GraphValueError,c as INTERRUPT,J as InMemoryStore,w as InvalidUpdateError,G as MemorySaver,ra as MessageGraph,wa as MessagesAnnotation,oa as MessagesValue,xa as MessagesZodMeta,ya as MessagesZodState,x as MultipleSubgraphsError,p as NodeInterrupt,g as Overwrite,q as ParentCommand,ma as REMOVE_ALL_MESSAGES,ja as ReducedValue,z as RemoteException,a as START,S as STREAM_EVENTS_V3_MODES,f as Send,pa as StateGraph,A as StateGraphInputError,la as StateSchema,R as StreamChannel,aa as SubgraphRunStream,y as UnreachableNodeError,ka as UntrackedValue,ia as UntrackedValueChannel,na as addMessages,T as convertToProtocolEvent,E as copyCheckpoint,ba as createGraphRunStream,V as createLifecycleTransformer,W as createMessagesTransformer,Y as createSubgraphDiscoveryTransformer,Z as createValuesTransformer,D as emptyCheckpoint,ua as entrypoint,U as filterLifecycleEntries,X as filterSubgraphHandles,P as getConfig,Q as getCurrentTaskInput,ga as getJsonSchemaFromSchema,va as getPreviousState,ha as getSchemaDefaultGetter,N as getStore,B as getSubgraphsSeenSet,O as getWriter,ca as interrupt,j as isCommand,s as isGraphBubbleUp,t as isGraphInterrupt,h as isInterrupted,_ as isNativeTransformer,r as isParentCommand,fa as isSerializableSchema,ea as isStandardSchema,na as messagesStateReducer,sa as pushMessage,ta as task,za as writer};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a as E3,b as k3}from"./ZS3UOY5Q.js";import{a as f3}from"./WPGT2HLS.js";import a from"./EXC566PM.js";import{b as b2}from"./2B4SGB3I.js";import{b as w2}from"./I2NTSKBD.js";import{$ as Y1,$a as k7,$b as Z9,A as F2,Aa as $2,Ab as h7,B as R2,Ba as q2,Bb as g7,C as k1,Ca as Y2,Cb as T7,D as Z,Da as F9,E as p2,Ea as R9,Eb as Z7,F as $1,Fa as X2,G as c1,Ga as Q2,Gb as U7,H as A,Ha as b1,Hb as W7,I as I9,Ia as p9,Ib as O7,J as h2,Ja as e7,Jb as K7,K as u,Ka as a7,Kb as n1,L as g2,La as x7,Lb as H7,Ma as t7,Mb as v7,N as C1,Na as n7,Nb as B7,O as D,Oa as m7,Ob as L7,P as G1,Pa as i7,Pb as j7,Q as T2,Qa as l7,Qb as _7,R as c9,Ra as d7,Rb as V7,S as C9,Sa as y7,Sb as z7,T as q1,Ta as o7,Tb as J7,U as J,Ua as u7,Ub as $7,V as Z2,Va as r7,Vb as q7,W as U2,Wa as S7,Wb as Y7,X as W2,Xa as h9,Xb as X7,Y as v,Ya as a9,Yb as Q7,Z as O2,Za as f7,Zb as e3,_ as j,_a as E7,_b as a3,a as K1,aa as K2,ab as t1,ac as t9,ba as G9,bb as w7,bc as U9,c as O,ca as x1,cb as b7,cc as F1,da as N,db as s7,dc as n9,e as e1,ea as c,eb as N7,ec as x3,f as D2,fa as X,fb as A7,fc as t3,g as d1,ga as X1,gb as P7,gc as n3,h as S,ha as H2,hb as D7,hc as m3,i as P9,ia as v2,ib as I7,ic as i3,j as r1,ja as M9,jb as c7,jc as l3,k as L1,ka as B2,kb as C7,kc as d3,l as f1,lb as M1,lc as R1,m as j1,ma as L2,mb as M,mc as m9,n as _1,na as j2,nb as x9,nc as i9,o as D9,oa as _2,oc as y3,p as c2,pa as V2,pc as l9,qa as z2,qb as G7,qc as o3,r as V1,ra as h,rb as M7,s as C2,sa as w1,sb as B,t as z1,ta as $,tb as F7,u as J1,ub as s1,v as a1,va as Q1,vb as q,w as G2,wa as e9,wb as R7,x as E1,xa as J2,xb as g9,y as M2,yb as p7,z as k,zb as T9}from"./3UKDJZ2D.js";import{a as k2}from"./MGEDATQ7.js";import{a as S1,g as I1}from"./IHG7KTNC.js";import{a as K}from"./ZCU2WWVN.js";import{a as z,b as H1,c as v1,d as B1}from"./KOIDWEP3.js";import{e as V,f as A2,j as U1,l as W1,o as P2,s as O1}from"./AYSQIO6L.js";import{b as s2,h as N2}from"./YQHYMLC7.js";import{a as I2}from"./5O53T3SW.js";import{a as H}from"./AJZDBHB6.js";import{b as E2}from"./2I5LGZNX.js";import{E as Z1,F as D1,G as S2,K as f2,h as r2,i as _,q as u1}from"./FFF5HUPM.js";import{c as W}from"./QPIMTXPL.js";export default $arcgis.t(([{g:u3,h:r3,i:S3}])=>{function N1(e,a="application/octet-stream"){if(typeof Blob<"u"){let x=[];for(let n=0;n<e.length;n++)x[n]=e.charCodeAt(n);let t=new Uint8Array(x);return new Blob([t],{type:a})}else throw new Error("stringToBlob is not currently supported on Node")}function w3(e){if(typeof Blob<"u")return new Blob([JSON.stringify(e)],{type:"application/json"});throw new Error("objectToJsonBlob is not currently supported on Node")}var d9={};W(d9,{_mostRecentlyEditedLayer:()=>W9,convertItemToTemplate:()=>n0,createItemFromTemplate:()=>m0,postProcess:()=>i0});function n0(e,a,x,t){return new Promise((n,m)=>{let i=j(e);c7(e.groupDesignations)?x7(i,x).then(d=>n(d),d=>m(A(d))):(i.estimatedDeploymentCostFactor=10,$(i.item.id,x).then(d=>{i.data=d,P7(i,x).then(y=>{y.item.modified=Math.max(y.item.modified,W9(i.properties.layers),W9(i.properties.tables)),s7(y,x).then(o=>{y.dependencies=o.map(r=>r.id),n(X2(y,o,!1,t))},o=>m(A(o)))},y=>m(A(y)))}))})}function m0(e,a,x,t){return new Promise(n=>{if(!t(e.itemId,S.Started,0)){t(e.itemId,S.Ignored,0),n(k(e.type));return}let m=Z(e);m=N(m,a),delete m.item.thumbnail,$1(m,"properties.service.size");let i=Q2(m.data);k7(m,x,a).then(l=>{l.success?t(e.itemId,S.Created,e.estimatedDeploymentCostFactor/2,l.serviceItemId)?(m=p9(m,a,l),m7(m,a,i,x).then(()=>{m=p9(m,a,l),s1({...m.item,url:void 0},m.data,x,e.item.thumbnail,void 0,a).then(()=>{t(e.itemId,S.Finished,e.estimatedDeploymentCostFactor/2,l.serviceItemId)?h(m.itemId,x).then(d=>{m.item=d,u(m,"item.url")&&!m.item.url.endsWith("/")&&(m.item.url+="/"),n({item:m,id:l.serviceItemId,type:m.type,postProcess:x1({item:m.item,data:m.data})||h9(m)})},()=>{t(e.itemId,S.Failed,0),M(l.serviceItemId,x).then(()=>n(k(e.type)),()=>n(k(e.type)))}):(t(e.itemId,S.Cancelled,0),M(l.serviceItemId,x).then(()=>n(k(e.type)),()=>n(k(e.type))))},()=>{t(e.itemId,S.Failed,0),M(l.serviceItemId,x).then(()=>n(k(e.type)),()=>n(k(e.type)))})},()=>{t(e.itemId,S.Failed,0),M(l.serviceItemId,x).then(()=>n(k(e.type)),()=>n(k(e.type)))})):(t(e.itemId,S.Cancelled,0),M(l.serviceItemId,x).then(()=>n(k(e.type)),()=>n(k(e.type)))):(t(e.itemId,S.Failed,0),n(k(e.type)))},()=>{t(e.itemId,S.Failed,0),n(k(e.type))})})}function i0(e,a,x,t,n,m,i){return new Promise((l,d)=>{q(e,m,i).then(y=>{h9(t)?(t=N(t,m),a9(t,i,t.item.url,m).then(l,d)):l(y)},d)})}function W9(e){let a=0;return e.forEach(x=>{a=x.editingInfo?.lastEditDate?Math.max(a,x.editingInfo.lastEditDate):a}),a}var f={};W(f,{convertItemToTemplate:()=>l0,createItemFromTemplate:()=>d0});function l0(e,a,x){return new Promise(t=>{let n=j(e);n.item.id=c(n.item.id,n.item.id,".itemId");let m=new Promise(l=>{w1(n.itemId,n.item.name,x).then(d=>{!d||d.size===0?l(null):l(d)})}),i=Promise.resolve({});Promise.all([m,i]).then(l=>{let[d]=l;if(d){let y=x3(d,n.item.name);n.properties[y.filename]=y.mimeType;let o=n9(n.itemId,y.blob.name,1,y.blob.name===y.filename?F1.data:F1.fakezip),r={itemId:n.itemId,file:y.blob,folder:o.folder,filename:o.filename};n.dataFile=r,n.resources.push(o.folder+"/"+o.filename),t(n)}else t(n)})})}function d0(e,a,x,t){return new Promise(n=>{if(!t(e.itemId,S.Started,0)){t(e.itemId,S.Ignored,0),n(k(e.type));return}let m=Z(e);m=N(m,a),e.item.thumbnail&&(m.item.thumbnail=e.item.thumbnail),t1(m.item,m.data,x,a.folderId).then(i=>{t(e.itemId,S.Created,e.estimatedDeploymentCostFactor/2,i.id)?(m.itemId=i.id,a[e.itemId]={itemId:i.id},t(e.itemId,S.Finished,e.estimatedDeploymentCostFactor/2,i.id),n({item:m,id:i.id,type:m.type,postProcess:!1})):(t(e.itemId,S.Cancelled,0),M(i.id,x).then(()=>n(k(e.type)),()=>n(k(e.type))))},()=>{t(e.itemId,S.Failed,0),n(k(e.type))})})}var Q9={};W(Q9,{_getFormDataFilename:()=>a6,_replaceFeatureServiceURLs:()=>J3,_replaceItemIds:()=>$3,_replacePortalBaseUrls:()=>q3,_replaceWorkflowManagerBaseUrls:()=>Y3,_updateZipObjectTextContent:()=>X3,convertItemToTemplate:()=>j0,createItemFromTemplate:()=>_0,postProcess:()=>e6,postProcessFormItems:()=>z0,swizzleFormObject:()=>Y9,templatizeFormData:()=>X9});function N3(e,a){return y0(e,a)}function y0(e,a){return["data.desktopView.header","data.desktopView.headerPanel.selectors","data.desktopView.leftPanel.selectors","data.desktopView.sidebar","data.desktopView.urlParameters","data.desktopView.widgets","data.header","data.headerPanel.selectors","data.leftPanel.selectors","data.mobileView.header","data.mobileView.headerPanel.selectors","data.mobileView.leftPanel.selectors","data.mobileView.sidebar","data.mobileView.urlParameters","data.mobileView.widgets","data.sidebar","data.urlParameters","data.widgets"].forEach(t=>{let n=u(e,t);Array.isArray(n)&&n.forEach(m=>{m.type==="mapWidget"&&(e.dependencies.indexOf(m.itemId)<0&&e.dependencies.push(m.itemId),m.itemId=c(m.itemId,m.itemId,".itemId")),Array.isArray(m.datasets)&&o0(m,e,a)})}),e}function o0(e,a,x){e.datasets.forEach(t=>{if(u(t,"dataSource.type")!=="arcadeDataSource"){let m=u(t,"dataSource.itemId");if(m){a.dependencies.indexOf(m)<0&&a.dependencies.push(m);let i=u(t,"dataSource.layerId");b1(i?.toString(),m,"",x),t.dataSource.itemId=c(m,m,".itemId")}}})}function A3(e,a){let x=["data.desktopView.header","data.desktopView.headerPanel.selectors","data.desktopView.leftPanel.selectors","data.desktopView.sidebar","data.desktopView.urlParameters","data.desktopView.widgets","data.header","data.headerPanel.selectors","data.leftPanel.selectors","data.mobileView.header","data.mobileView.headerPanel.selectors","data.mobileView.leftPanel.selectors","data.mobileView.sidebar","data.mobileView.urlParameters","data.mobileView.widgets","data.sidebar","data.urlParameters","data.widgets"];return x.forEach(t=>{let n=u(e,t);u0(n,a)}),x.forEach(t=>{r0(e,t,a)}),e}function u0(e,a){e&&Array.isArray(e)&&e.forEach(x=>{Array.isArray(x.datasets)&&x.datasets.forEach(t=>{let n=c9(u(t,"dataSource.itemId"));if(n){let m=C9(u(t,"dataSource.layerId"));a.some(i=>i.itemId===n&&i.layerId===m?(s3(i,x.id),!0):!1)}else{let m=u(t,"dataSource.id");if(m){let i=m.split("#")[1];a.some(l=>l.ids.indexOf(i)>-1?(s3(l,x.id),!0):!1)}}})})}function r0(e,a,x){let t=u(e,a);t&&D(e,a,S0(t,x))}function S0(e,a){return Array.isArray(e)?e.map(x=>{let t=x;return Array.isArray(t.events)&&(t.events=t.events.map(n=>{let m=n;return Array.isArray(m.actions)&&(m.actions=m.actions.map(i=>{let l=i;if(l.fieldMap&&l.targetId&&l.targetId.indexOf("#")>-1){let d=b3(l,a);if(d){let y=u(d,"fields"),o=u(d,"basePath");Array.isArray(y)&&o&&(l.fieldMap=l.fieldMap.map(r=>{let E=r;return E.targetName=X(E.targetName,y,o),E}))}}return l})),m})),Array.isArray(t.datasets)&&(t.datasets=t.datasets.map(n=>{let m=n;if(m.type==="serviceDataset"){let i=b3(n,a);if(i){let l=u(i,"fields"),d=u(i,"basePath");Array.isArray(l)&&d&&(t=X(t,l,d),m=X(m,l,d))}}return m})),t}):e}function b3(e,a){let x,t=u(e,"dataSource.id")||u(e,"targetId");if(t){let n=t.split("#")[1];if(!a.some(m=>(x=m.ids.indexOf(n)>-1?m:x,m.ids.indexOf(n)>-1))){let m=t.split("#")[0];a.some(i=>{let d=(i.references||[]).indexOf(m)>-1;return x=d?i:x,d})}}else{let n=c9(u(e,"dataSource.itemId")),m=C9(u(e,"dataSource.layerId"));n&&a.some(i=>{let l=n===i.itemId&&m===i.layerId;return x=l?i:x,l})}return x}function s3(e,a){e.references=Array.isArray(e.references)?e.references:[],e.references.indexOf(a)<0&&e.references.push(a)}var A1={};W(A1,{convertItemToTemplate:()=>D0,convertNotebookToTemplate:()=>z9,createItemFromTemplate:()=>I0,deleteProps:()=>h3,fineTuneCreatedItem:()=>V9,postProcess:()=>C0,postProcessNotebookTemplates:()=>c0});function I3(e,a,x,t){return new Promise((n,m)=>{let i="";if(e.item.url){let l=e.item.url,d=l.indexOf("//");e.item.url=v(J)+l.substring(l.indexOf("/",d+2),l.lastIndexOf("=")+1)+e.item.id,i=l.replace(l.substring(l.indexOf("/",d+2)),"")}e.dependencies=k0(e),D(e,"data.folderId","{{folderId}}"),s0(e,["data.map.itemId","data.map.appProxy.mapItemId","data.values.webmap","data.values.group"]),C3(e,"data.appItemId",e.itemId),j9(e,["data.logo","data.map.portalUrl","data.portalUrl","data.httpProxy.url"],v(J)),D(e,"data.geometryService",v(Z2)),f0(e,x,i,t).then(()=>{D3(e,x,i,"data.widgetPool.widgets").then(l=>{D3(l,x,i,"data.widgetOnScreen.widgets",!0).then(d=>{E0(d,x,i,"data.values").then(y=>{n(y)},y=>m(A(y)))},d=>m(A(d)))},l=>m(A(l)))},l=>m(A(l)))})}function f0(e,a,x,t){return new Promise((n,m)=>{let i=u(e,"data.dataSource.dataSources");if(i&&Object.keys(i).length>0){let l=new Array;Object.keys(i).forEach(d=>{let y=i[d];D(y,"portalUrl",v(J));let o=u(y,"itemId");if(u(y,"url")){if(o){let E=y.url.substr(y.url.lastIndexOf("/")+1);b1(E.toString(),o,y.url,t),y.itemId=c(o,o,".layer"+E+".itemId")}let r=L9(y.url,x,[],[],a);l.push(new Promise((E,w)=>{B9(r.serviceRequests,r.requestUrls,r.testString).then(s=>{y.url=s,E()},s=>w(A(s)))}))}else o&&(y.itemId=c(o,o,".itemId"))}),Promise.all(l).then(()=>n(e),d=>m(A(d)))}else n(e)})}function D3(e,a,x,t,n=!1){return new Promise((m,i)=>{let l=u(e,t)||[],d=[],y=[];if(l.forEach(o=>{!n&&u(o,"icon")&&j9(o,["icon"],v(J));let r=o.config;if(r){let E=JSON.stringify(r),w=L9(E,x,y,d,a);o.config=JSON.parse(w.testString),d=w.serviceRequests,y=w.requestUrls}}),d.length>0){let o=JSON.stringify(l);B9(d,y,o).then(r=>{D(e,t,JSON.parse(r)),m(e)},r=>i(A(r)))}else m(e)})}function E0(e,a,x,t){return new Promise((n,m)=>{let i=u(e,t),l=[],d=[];if(i){u(i,"icon")&&j9(i,["icon"],v(J));let y=JSON.stringify(i),o=L9(y,x,d,l,a);i=JSON.parse(o.testString),l=o.serviceRequests,d=o.requestUrls}if(l.length>0){let y=JSON.stringify(i);B9(l,d,y).then(o=>{D(e,t,JSON.parse(o)),n(e)},o=>m(A(o)))}else n(e)})}function B9(e,a,x){return new Promise((t,n)=>{if(e&&e.length>0){let m=0;Promise.all(e).then(i=>{i.forEach(l=>{if(u(l,"serviceItemId")){let d="{{"+l.serviceItemId+(l.hasOwnProperty("id")?".layer"+l.id:"")+".url}}";x=y9(x,a[m],d,!0)}m++}),t(x)},i=>n(A(i)))}else t(x)})}function L9(e,a,x,t,n){let m={f:"json",authentication:n},i=e.match(/(\bhttps?:\/\/[-A-Z0-9/._]*)/gim);return i&&i.length&&i.forEach(l=>{l.indexOf("NAServer")>-1?e=y9(e,l,v(W2)):l.indexOf("GeocodeServer")>-1?e=y9(e,l,v(U2)):a&&l.indexOf(a)>-1?e=y9(e,a,v(J)):l.indexOf("FeatureServer")>-1&&x.indexOf(l)===-1&&(x.push(l),t.push(O(l,m)))}),{testString:e,requestUrls:x,serviceRequests:t}}function y9(e,a,x,t=!1){let n=t&&e.indexOf('"')>-1,m=new RegExp(n?'"'+a+'"':a,"gmi");return e.replace(m,n?'"'+x+'"':x)}function j9(e,a,x){a.forEach(t=>{let n=u(e,t);if(n){let m=n.substring(n.indexOf("/",n.indexOf("//")+2));D(e,t,m!==n?x+m:x)}})}function c3(e,a,x,t){return new Promise(n=>{if(G1(e,["WAB2D","WAB3D","Web AppBuilder"])){let m={id:a.itemId,url:a.item.url,data:a.data},i=B(m,t),l={tags:e.item.tags,title:e.item.title,type:"Code Attachment",typeKeywords:["Code","Javascript","Web Mapping Application"],relationshipType:"WMA2Code",originItemId:a.itemId,url:J1(N(v(J),x))+"sharing/rest/content/items/"+a.itemId+"/package"},d=t1(l,{},t,x.folderId);Promise.all([i,d]).then(()=>n(null),()=>n(null))}else n(null)})}function k0(e){let a=w0;return G1(e,["WAB2D","WAB3D","Web AppBuilder"])&&(a=b0),a(e)}function w0(e){return g2(e,["data.values.webmap","data.values.group"])}function b0(e){let a=[],x=u(e,"data.map.itemId");x&&a.push(x);let t=u(e,"data.dataSource.dataSources");return t&&Object.keys(t).forEach(n=>{let m=t[n];m.itemId&&a.push(m.itemId)}),a}function s0(e,a){a.forEach(x=>{let t=u(e,x);C3(e,x,t)})}function C3(e,a,x){D(e,a,c(x,x,".itemId"))}function G3(e,a){let x=u(e,"data.dataSource.dataSources");x&&Object.keys(x).length>0&&(Object.keys(x).forEach(m=>{let i=x[m];x[m]=H9(i,a)}),D(e,"data.dataSource.dataSources",x)),["data.widgetPool.widgets","data.widgetOnScreen.widgets"].forEach(m=>{let i=u(e,m);i&&D(e,m,N0(i,a))});let n=u(e,"data.values");return n&&D(e,"data.values",H9(n,a)),e}function H9(e,a,x=!1){return e=P0(e,a,x),A0(e,a).forEach(n=>{e=X(e,n.fields,n.basePath,x)}),e}function N0(e,a){let x=["SmartEditor","Screening"];return e.map(t=>{if(t.config){let n=x.indexOf(t.name)>-1;t.config=H9(t.config,a,n)}return t})}function A0(e,a){let x=JSON.stringify(e);return a.filter(n=>K9(n,x)<4).sort((n,m)=>K9(n,x)-K9(m,x))}function K9(e,a){let x=e.url,t=e.itemId,n=e.layerId,m;return x&&!isNaN(n)&&(m=new RegExp(x.replace(/[.]/,".layer"+n+"."),"gm")),m&&m.test(a)||e.ids.length>0&&e.ids.some(i=>new RegExp(i,"gm").test(a))?1:x&&new RegExp(x,"gm").test(a)?2:t&&new RegExp(t,"gm").test(a)?3:4}function P0(e,a,x){let t=JSON.stringify(e),n=a.filter(m=>{let i;m.url&&!isNaN(m.layerId)&&(i=new RegExp(m.url.replace(/[.]/,".layer"+m.layerId+"."),"gm"));let l=!1;if(m.ids.length>0&&(l=m.ids.some(d=>new RegExp(d,"gm").test(t))),l||i&&i.test(t))return m});return n.length>0&&n.forEach(m=>{e=v9(e,m,x),m.ids.length>0&&m.ids.forEach(i=>{e=o9(e,m,i,x)})}),e}function v9(e,a,x){let t={},n=a.url,m=a.layerId,i;if(n&&!isNaN(m)&&(i=new RegExp(n.replace(/[.]/,".layer"+m+"."),"gm")),Array.isArray(e))t=e.map(l=>v9(l,a,x));else if(typeof e=="object")for(let l in e)e[l]!=null&&typeof e[l]=="object"?t[l]=v9(e[l],a,x):(i&&i.test(e[l])&&(e=X(e,a.fields,a.basePath,x)),t[l]=e[l]);else t=e;return t}function o9(e,a,x,t){let n={},m=new RegExp(x,"gm");if(Array.isArray(e))n=e.map(i=>o9(i,a,x,t));else if(typeof e=="object")for(let i in e)if(e[i]!==null){let l;try{l=JSON.parse(e[i])}catch{l=void 0}l&&typeof l=="object"?n[i]=JSON.stringify(o9(l,a,x,t)):typeof e[i]=="object"?(m.test(i)&&t&&(e[i]=X(e[i],a.fields,a.basePath,t)),n[i]=o9(e[i],a,x,t)):(m.test(e[i])&&(e=X(e,a.fields,a.basePath,t)),n[i]=e[i])}else n[i]=e[i];else n=e;return n}function M3(e,a,x,t){return S7(e,x,t)}function F3(e,a,x){return a9(e,a,"",x)}function Y(e,a,x,t,n){return new Promise((m,i)=>{function l(){n&&n.signal.aborted&&i(new Error("Operation was cancelled"))}if(l(),!t(e.itemId,S.Started,0))t(e.itemId,S.Ignored,0),m(k(e.type));else{let d=Z(e);d=N(d,a);let y;e.type==="Web Mapping Application"&&e.data?d=JSON.parse(N(JSON.stringify(d),a)):e.type==="QuickCapture Project"&&e.data&&(y=JSON.stringify(d.data.application),delete d.data),e.item.thumbnail&&(d.item.thumbnail=e.item.thumbnail),t1(d.item,d.data,x,a.folderId).then(o=>{if(l(),!t(e.itemId,S.Created,e.estimatedDeploymentCostFactor/2,o.id))t(e.itemId,S.Cancelled,0),M(o.id,x).then(()=>m(k(e.type)),()=>m(k(e.type)));else{a[e.itemId]={itemId:o.id,itemUrl:a.portalBaseUrl+"/sharing/rest/content/items/"+o.id},d.itemId=o.id,d.type==="Web Mapping Application"&&e.data&&D(d,"data.appItemId",o.id);let r=x1(d.data),E=d.item.url;d=N(d,a),l();let w=Promise.resolve([]);if(d.relatedItems){let P=N(X1(d.relatedItems),a);w=f7(d.itemId,P,x)}l();let s;if(e.type==="Web Mapping Application"&&e.data&&G1(e,["WAB2D","WAB3D","Web AppBuilder"]))s=c3(e,d,a,x);else if(e.type==="Workforce Project")s=F3(d,x,a);else if(e.type==="QuickCapture Project"){if(y){let P=k1(N(JSON.parse(y),a),"qc.project.json");s=d3(P,d.itemId,"",P.name,x)}}else e.type==="Notebook"?s=V9(e,d,a,x):E!==d.item.url?(l(),s=new Promise((P,b)=>{R7(o.id,d.item.url,x).then(()=>P(),b)})):s=Promise.resolve(null);l(),Promise.all([w,s]).then(()=>{t(e.itemId,S.Finished,e.estimatedDeploymentCostFactor/2,o.id)?m({item:d,id:o.id,type:d.type,postProcess:r}):(t(e.itemId,S.Cancelled,0),M(o.id,x).then(()=>m(k(e.type)),()=>m(k(e.type))))},()=>{t(e.itemId,S.Failed,0),m(k(e.type))})}},()=>{t(e.itemId,S.Failed,0),m(k(e.type))})}})}function D0(e,a,x,t){return Q(e,a,x,t)}function I0(e,a,x,t){return Y(e,a,x,t)}function z9(e){return new Promise(a=>{h3(e.data),a(e)})}function c0(e,a){if(e.some(t=>t.type==="Notebook")){let t=Object.keys(a).filter(m=>m.indexOf("FeatureServer")>-1).sort().reverse(),n=e.reduce((m,i)=>(m=[...new Set([...m,...i.dependencies,i.itemId])],m),[]);e=e.map(m=>{if(m.type==="Notebook"){let i=m.data&&JSON.stringify(m.data);return n.forEach(l=>{new RegExp(l,"gim").test(i)&&(i=i.replace(l,"{{"+l+".itemId}}"),m.dependencies.indexOf(l)<0&&m.dependencies.push(l))}),t.forEach(l=>{let d=new RegExp(l,"gim");if(d.test(i)){let y=a[l];i=i.replace(d,y);let o=/[0-9A-F]{32}/gim,r=y.match(o)[0];m.dependencies.indexOf(r)<0&&m.dependencies.push(r)}}),m.data=JSON.parse(i),m}})}return e}function h3(e){if(e){let a=["metadata.interpreter","metadata.papermill"];c1(e,a),(e.cells||[]).forEach(x=>{c1(x,a)})}}function V9(e,a,x,t){return new Promise((n,m)=>{let i={id:a.itemId,url:a.item.url,data:k1(a.data,a.itemId+".ipynb")};B(i,t).then(()=>n(null),m)})}function C0(e,a,x,t,n,m,i){return q(e,m,i)}function T3(e,a,x){return new Promise((t,n)=>{G0(e,x).then(m=>{e.dependencies=m.dependencies,e.data?.properties&&(e.data.properties.ServiceURL=g3(e.data.properties.ServiceURL,m.urlHash),e.data.properties.OverviewURL=g3(e.data.properties.OverviewURL,m.urlHash)),t(e)},m=>n(A(m)))})}function G0(e,a){return new Promise((x,t)=>{let n=[];if(e.data?.properties){let m=[];e.data.properties.ServiceURL&&m.push(e.data.properties.ServiceURL),e.data.properties.OverviewURL&&e.data.properties.OverviewURL!==e.data.properties.ServiceURL&&m.push(e.data.properties.OverviewURL),M0(m,n,a).then(i=>{x(i)},i=>t(A(i)))}else x({dependencies:n,urlHash:{}})})}function M0(e,a,x){return new Promise((t,n)=>{let m={},i={f:"json",authentication:x},l=[],d={},y=e.filter(o=>{if(o){let r=/.+FeatureServer/g.exec(o),E=Array.isArray(r)&&r.length>0?r[0]:void 0;return E?(Object.keys(d).indexOf(E)<0&&(d[E]=O(o,i)),l.push(d[E]),!0):!1}else return!1});l.length>0?Promise.all(l).then(o=>{o.forEach((r,E)=>{if(u(r,"serviceItemId")){let w=r.serviceItemId;a.indexOf(w)<0&&a.push(w),m[y[E]]=w}}),t({dependencies:a,urlHash:m})},o=>n(A(o))):t({dependencies:a,urlHash:m})})}function g3(e,a){let x=e;if(e){let t=a[e];if(t){let n=e.substr(e.lastIndexOf("/")+1);x=c(t,t,".layer"+n+".url")}x=X1(x.replace(/.+?(?=\/home)/,"{{portalBaseUrl}}"))}return x}var p1={};W(p1,{_templatizeAdminEmail:()=>W3,_templatizeApplication:()=>U3,_templatizeId:()=>J9,_templatizeUrl:()=>K3,_updateDependencies:()=>O3,convertItemToTemplate:()=>R0,convertQuickCaptureToTemplate:()=>$9,createItemFromTemplate:()=>p0});function R0(e,a,x,t){return Q(e,a,x,t)}function $9(e){return D(e,"data.application",U3(e.data.application,e)),e}function U3(e,a){J9(e,"itemId"),W3(e);let x=e?.dataSources;return x&&Array.isArray(x)&&x.forEach(t=>{let n=t.featureServiceItemId;n&&(O3(n,a),K3(t,"featureServiceItemId","url"),J9(t,"featureServiceItemId"))}),e}function W3(e){u(e,"preferences.adminEmail")&&D(e,"preferences.adminEmail","{{user.email}}")}function O3(e,a){a.dependencies.indexOf(e)===-1&&a.dependencies.push(e)}function K3(e,a,x){let t=u(e,a),n=u(e,x);if(n){let m=n.substr(n.lastIndexOf("/")+1);D(e,x,c(t,t,".layer"+m+".url"))}}function J9(e,a){let x=u(e,a);x&&D(e,a,c(x,x,".itemId"))}function p0(e,a,x,t){return Y(e,a,x,t)}var h0="home/webmap/viewer.html?webmap=";function H3(e,a,x,t){return new Promise((n,m)=>{e.type!=="Vector Tile Service"&&(e.item.url=e.item.url?J1(v(J))+h0+e.item.id:e.item.url),g0(e,x).then(i=>{e.dependencies=i.dependencies,e.data&&(e.data.baseMap?.baseMapLayers&&q9(e.data.baseMap.baseMapLayers,i.urlHash,t),e.data.operationalLayers&&q9(e.data.operationalLayers,i.urlHash,t),q9(e.data.tables,i.urlHash,t),T0(e.data)),n(e)},i=>m(A(i)))})}function g0(e,a){return new Promise((x,t)=>{let n=[];if(e.data){let m=e.data.baseMap?.baseMapLayers||[],i=e.data.operationalLayers||[],l=e.data.tables||[],d=m.concat(i).concat(l);Z0(d,n,a).then(y=>{x(y)},y=>t(A(y)))}else x({dependencies:n,urlHash:{}})})}function T0(e){$1(e,"initialState")}function Z0(e,a,x){return new Promise((t,n)=>{let m={},i={f:"json",authentication:x},l=[],d={},y=e.filter(o=>{if(o.itemId&&o.layerType==="VectorTileLayer")return l.push(h(o.itemId,x)),!0;if(o.url&&o.url.indexOf("{{velocityUrl}}")<0){let r=/.+FeatureServer/g.exec(o.url),E=Array.isArray(r)&&r.length>0?r[0]:void 0;return E?(Object.keys(d).indexOf(E)<0&&(d[E]=O(o.url,i)),l.push(d[E]),!0):!1}else return!1});l.length>0?Promise.all(l).then(o=>{o.forEach((r,E)=>{if(y[E].layerType==="VectorTileLayer"){let w=u(r,"typeKeywords");if(w&&w.includes("Vector Tile Style Editor")){a.indexOf(r.id)<0&&a.push(r.id),y[E].templatizeId=!0;let s=y[E].styleUrl.indexOf(r.id)+r.id.length;y[E].styleUrl=c(y[E].styleUrl.replace(y[E].styleUrl.substring(0,s),r.id),r.id,".itemUrl")}}else if(u(r,"serviceItemId")){let w=r.serviceItemId;a.indexOf(w)<0&&a.push(w),m[y[E].url]=w}}),t({dependencies:a,urlHash:m})},o=>n(A(o))):t({dependencies:a,urlHash:m})})}function q9(e=[],a,x){e.forEach(t=>{if(t.itemId&&t.layerType==="VectorTileLayer")t.templatizeId&&(t.itemId=c(t.itemId,t.itemId,".itemId"),delete t.templatizeId);else if(t.url){let n=t.url.substr(t.url.lastIndexOf("/")+1),m=Object.keys(a).indexOf(t.url)>-1?a[t.url]:void 0;m&&(b1(n,m,t.url,x),t.url=c(m,m,".layer"+n+".url"),t.itemId=c(m,m,".layer"+n+".itemId"))}})}function v3(e,a){return["data.operationalLayers","data.tables","data.applicationProperties.viewing.search.layers"].forEach(t=>U0(e,a,t)),e}function U0(e,a,x){let t=u(e,x);t&&D(e,x,W0(t,a))}function W0(e,a){return e.forEach(x=>{let t=O0(x,a);if(t){let n=t.fields.map(i=>i.name);d7(x,t,t.basePath,t.itemId,n),o7(x,t.basePath,n),x.layerDefinition&&(r7(x.layerDefinition,t.basePath,n),u7(x.layerDefinition,t.basePath,n));let m=u(x,"field.name");m&&D(x,"field.name",y7(m,x,t.itemId,t.basePath))}}),e}function O0(e,a){let x;return a.some(t=>t.ids.indexOf(e.id)>-1?(x=t,!0):!1),x}function Q(e,a,x,t){return new Promise((n,m)=>{let i=j(e);i.item.id=c(i.item.id,i.item.id,".itemId");let l=Q1(i.itemId,"forward",x),d=Promise.resolve({}),y=Promise.resolve([]);switch(e.type){case"Dashboard":case"Data Pipeline":case"Feature Collection":case"Feature Service":case"Hub Initiative":case"Hub Page":case"Hub Site Application":case"Insights Model":case"Oriented Imagery Catalog":case"Project Package":case"Style":case"Workforce Project":case"Web Map":case"Web Mapping Application":case"Web Scene":case"Notebook":d=new Promise(o=>{$(i.itemId,x).then(r=>o(r))});break;case"Form":d=w1(i.itemId,i.item.name,x);break;case"QuickCapture Project":y=e9(i.itemId,x);break}Promise.all([d,l,y]).then(o=>{let[r,E,w]=o;o3(i,t),i.data=l9(r,e.type,t);let s=E;i.dependencies=[],i.relatedItems=[],s.forEach(b=>{b.relationshipType!=="WMA2Code"&&(i.relatedItems.push(b),b.relatedItemIds.forEach(C=>{i.dependencies.indexOf(C)<0&&i.dependencies.push(C)}))}),e.type==="Data Pipeline"&&(i.dependencies=i.dependencies.concat(K0(r)));let P=Promise.resolve(i);switch(e.type){case"Dashboard":N3(i,t);break;case"Notebook":P=z9(i);break;case"Oriented Imagery Catalog":P=T3(i,a,x);break;case"QuickCapture Project":i.resources=w,P=new Promise(async b=>{let C=null,I=-1;w&&(w.some((y1,m1)=>{let i1=y1.name==="qc.project.json";return i1&&(C=y1,I=m1),i1}),I>=0&&w.splice(I,1)),C&&(i.data={application:{...await z1(C)},name:"qc.project.json"}),i.data.application?.basemap?.type==="Web Map"&&i.dependencies.push(i.data.application.basemap.itemId);let L=$9(i);b(L)});break;case"Vector Tile Service":case"Web Map":case"Web Scene":P=H3(i,a,x,t);break;case"Web Mapping Application":r&&(P=I3(i,a,x,t));break;case"Workforce Project":P=M3(i,a,x,t);break}P.then(n,b=>m(A(b)))})})}function K0(e){let a=[];return(e?.inputs??[]).concat(e?.outputs??[]).forEach(t=>{if(t.type==="FeatureServiceSource"||t.type==="FeatureServiceSink"){let n=u(t,"parameters.layer.value.itemId");n&&a.push(n)}}),a}var R={};W(R,{convertItemToTemplate:()=>H0,createItemFromTemplate:()=>v0,postProcess:()=>L0,postProcessFieldReferences:()=>B0});function H0(e,a,x,t){return Q(e,a,x,t)}function v0(e,a,x,t,n){return n?Y(e,a,x,t,n):Y(e,a,x,t)}function B0(e,a,x){switch(x){case"Web Mapping Application":G3(e,a);break;case"Dashboard":A3(e,a);break;case"Web Map":v3(e,a);break}return e}async function L0(e,a,x,t,n,m,i){if(a==="Web Map"&&t.resources.some(l=>l.indexOf(d1)>-1)){let l=n3(`${m.portalBaseUrl}/sharing/rest`,t.itemId,d1),d={httpMethod:"GET",authentication:i,params:{f:"json"},headers:{Accept:"application/json",Authorization:`Bearer ${i.token}`,"Content-Type":"application/json","X-Esri-Authorization":`Bearer ${i.token}`}};await O(l,d).then(async y=>{let o=JSON.stringify(y),r=N(o,m);if(o!==r){let E=JSON.parse(r),w={id:e,resource:k1(E,d1),name:d1,authentication:i,params:{}};await D2(w)}})}return q(e,m,i)}function j0(e,a,x,t){return R.convertItemToTemplate(e,a,x,t)}function u9(e){return!!u(e,"properties.services")}function j3(e,a="https://survey123.arcgis.com"){let x=`${a}/api/survey/create`,t={credentials:"same-origin",method:"POST",body:s2({f:"json",...e},!0)};return fetch(x,t).then(n=>n.json()).then(n=>{if(!n.success)throw new Error(`Failed to create survey: ${n.error.message}`);return{formId:n.id,featureServiceId:n.featureService.source.itemId,folderId:n.formItemInfo.ownerFolder}})}var _3=function(a){let x=Z(a),t=[["header","content"],["subHeader","content"],["footer","content"],["settings","thankYouScreenContent"]],n=(i,l)=>(i&&i[l]&&(i[l]=encodeURIComponent(i[l])),i);t.forEach(([i,l])=>n(x[i],l));let m=i=>n(i,"description");return x.questions=(x.questions||[]).map(i=>i.questions?{...i,questions:i.questions.map(m)}:m(i)),x};function V3(e,a,x){let{item:{title:t,description:n,tags:m,typeKeywords:i},properties:{form:l}}=e,{user:{username:d},portalBaseUrl:y,organization:{basemapGalleryGroupQuery:o,defaultBasemap:{title:r}}}=a,{token:E}=x.toCredential();return $2(o,r,x).then(w=>{let s="Survey-",P=T2(`${s}${t}`,a,"user.folders").replace(s,"");if(l.questions){let C=I=>(I.maps&&(I.maps=I.maps.map(L=>({...L,itemId:w.id}))),I);l.questions=l.questions.map(I=>I.questions?{...I,questions:I.questions.map(C)}:C(I))}let b=_3(l);return{description:n,form:b,portalUrl:y,tags:m,title:P,token:E,typeKeywords:i,username:d}})}function z3(e,a,x,t){let n=N(e,a),{survey123Url:m}=a;return V3(n,a,x).then(i=>j3(i,m)).then(i=>{let{formId:l,featureServiceId:d}=i,y=Promise.resolve(null);return e.item.thumbnail&&(y=s1({id:l},null,x,e.item.thumbnail)),y.then(()=>h(l,x)).then(o=>(a[n.itemId]={itemId:l},a[n.properties.info.serviceInfo.itemId]={itemId:d},t(n.itemId,S.Finished,n.estimatedDeploymentCostFactor,l),{item:{...e,item:o,itemId:l},id:l,type:"Form",postProcess:!0}))}).catch(i=>{throw t(n.itemId,S.Failed,0),i})}function _0(e,a,x,t){return u9(e)?z3(e,a,x,t):R.createItemFromTemplate(e,a,x,t)}async function Y9(e,a){let x=await T9(e),t=new Date;return t=new Date(t.valueOf()-864e5-t.getTimezoneOffset()*1e3*60),x.forEach(n=>{if(typeof n.content=="string"){let m=X3(n,a);e.file(n.file,m,{date:t})}else n.file.endsWith(".xlsx")&&e.file(n.file,n.content,{date:t})}),Promise.resolve(e)}async function X9(e,a){return(await T9(e)).forEach(t=>{if(t.file.endsWith(".info")||t.file.endsWith(".itemInfo")||t.file.endsWith(".json")||t.file.endsWith(".webform")||t.file.endsWith(".xml")){let n=t.content,m=/\b([0-9A-Fa-f]){32}_type/g;n=$3(n,a,m),n=J3(n,a,m),n=q3(n,a),n=Y3(n,a),e.file(t.file,n)}}),Promise.resolve(e)}function J3(e,a,x){let t=e;return Object.keys(a).filter(m=>m.match(x)&&a[m].type==="Feature Service").forEach(m=>{let i=a[m].url,l=a[i];l&&(t=t.replace(new RegExp(i,"g"),l))}),t}function $3(e,a,x){let t=e;return Object.keys(a).filter(m=>m.match(x)&&a[m].type!=="Feature Service").map(m=>m.replace("_type","")).forEach(m=>{t=t.replace(new RegExp(m,"g"),`{{${m}.itemId}}`)}),t}function q3(e,a){let x=e;return a.portalBaseUrl&&(x=x.replace(new RegExp(a.portalBaseUrl,"g"),"{{portalBaseUrl}}")),x}function Y3(e,a){let x=e;return a.workflowBaseUrl&&(x=x.replace(new RegExp(a.workflowBaseUrl,"g"),"{{workflowBaseUrl}}")),x}function X3(e,a){let x=F2(),t=e.content;return t=N(e.content,a),E1(t.match(x)??[]).forEach(m=>{let i=a[m];typeof i?.itemId=="string"&&(t=t.replace(new RegExp(m,"g"),`${i.itemId}`))}),t}function Q3(e,a,x,t,n,m,i){let l=t.properties.info.serviceInfo.itemId,{itemId:d}=m[l],y=N(t,m);return h(d,i).then(o=>{let r=[{id:e,title:y.item.title,snippet:y.item.snippet,extent:y.item.extent,culture:y.item.culture},{id:d,extent:y.item.extent,typeKeywords:[`source-${l}`].concat(o.typeKeywords)}],E=s=>B(s,i),w=r.map(E);return Promise.all(w).then(()=>{let s=[e,d],P=C=>V({itemId:C,folderId:m.folderId,authentication:i}),b=s.map(P);return Promise.all(b)}).then(()=>C7(o.ownerFolder,i)).then(()=>{let s=j(o);return n.push(s),t.dependencies.push(o.id),!0})})}async function e6(e,a,x,t,n,m,i){let l=await w1(e,"Form",i);if(l){let d=await g9(l),y=await Y9(d,m);t9(y,e,i)}else return await M2(5e3),e6(e,a,x,t,n,m,i);return u9(t)?Q3(e,a,x,t,n,m,i):q(e,m,i)}async function z0(e,a){for(let x of e)if(x.type==="Form"){let t=x.data;if(x.data=null,t){let n=await g9(t);n=await X9(n,a),x.item.name=a6(x.item.name,t.name,`${x.itemId}.zip`);let m=await h7(n,x.item.name),i=n9(x.itemId,x.item.name,1,F1.data),l={itemId:x.itemId,file:m,folder:i.folder,filename:x.item.name};x.dataFile=l,x.resources.push(i.folder+"/"+i.filename)}}return Promise.resolve(e)}function a6(e,a,x){let t=e||a;return t&&t!=="undefined"?t:x}var e2={};W(e2,{_initializeNewGroup:()=>x6,convertItemToTemplate:()=>J0,createItemFromTemplate:()=>$0,postProcess:()=>q0});function J0(e,a,x){return new Promise(t=>{let n=O2(e);n.item.id=c(n.item.id,n.item.id,".itemId"),z2(e.id,x).then(m=>{n.type="Group",V2(e.id,x).then(i=>{i.id=n.item.id,n.item={...i,type:"Group"},n.dependencies=m.concat(h2(i.tags)),t(n)},()=>t(n))},()=>t(n))})}function $0(e,a,x,t){return new Promise(n=>{if(!t(e.itemId,S.Started,0)){t(e.itemId,S.Ignored,0),n(k(e.type));return}let m=Z(e);m=N(m,a),m.item.thumbnail=e.item.thumbnail;let i=x6(m.item);b7(i.title,i,a,x,R9(m)?a.locationTracking.owner:void 0).then(l=>{if(l.success)if(!t(e.itemId,S.Created,e.estimatedDeploymentCostFactor/2,l.group.id))t(e.itemId,S.Cancelled,0),M1(l.group.id,x).then(()=>n(k(e.type)),()=>n(k(e.type)));else if(m.itemId=l.group.id,a[e.itemId]={itemId:l.group.id},m=N(m,a),a[e.itemId].itemId=l.group.id,!t(e.itemId,S.Finished,e.estimatedDeploymentCostFactor/2,l.group.id))t(e.itemId,S.Cancelled,0),M1(l.group.id,x).then(()=>n(k(e.type)),()=>n(k(e.type)));else if(R9(m)){let d=a.locationTracking.owner;G7(l.group.id,d,x).then(y=>{y.success?t(e.itemId,S.Created,e.estimatedDeploymentCostFactor/2,l.group.id)?M7(l.group.id,[x.username],x).then(o=>{Array.isArray(o.notRemoved)&&o.notRemoved.length===0?t(e.itemId,S.Created,e.estimatedDeploymentCostFactor/2,l.group.id)?n({item:m,id:l.group.id,type:m.type,postProcess:x1(m)}):(t(e.itemId,S.Cancelled,0),M1(l.group.id,x).then(()=>n(k(e.type)),()=>n(k(e.type)))):(t(e.itemId,S.Failed,0),n(k(e.type)))}):(t(e.itemId,S.Cancelled,0),M1(l.group.id,x).then(()=>n(k(e.type)),()=>n(k(e.type)))):(t(e.itemId,S.Failed,0),n(k(e.type)))})}else n({item:m,id:l.group.id,type:m.type,postProcess:x1(m)});else t(e.itemId,S.Failed,0),n(k(e.type))},()=>{t(e.itemId,S.Failed,0),n(k(e.type))})})}function q0(e,a,x,t,n,m,i){let l=Promise.resolve({success:!0});return x.some(d=>{if(d.id===e){let y=d.item.item;return x1(y)&&(y=N(y,m),l=F7(y,i)),!0}}),l}function x6(e){let a={access:"private",description:e.description,owner:e.owner,snippet:e.snippet,tags:e.tags,thumbnail:e.thumbnail,title:e.title||"",typeKeywords:e.typeKeywords};return["autoJoin","displaySettings","isInvitationOnly","isOpenData","isViewOnly","membershipAccess","properties","sortField","sortOrder"].forEach(t=>{e.hasOwnProperty(t)&&(a[t]=e[t])}),a}var h1={};W(h1,{convertItemToTemplate:()=>Y0,createItemFromTemplate:()=>X0,isAPage:()=>e5,postProcess:()=>Q0});function t6(e,a,x,t){return e=f1(e,x,{}),L7(e,{...t,allowList:[]}).then(()=>!0)}function r9(e){let a=z(e);return(e.dependencies||[]).forEach(t=>{let n=new RegExp(t,"g"),m=`{{${t}.itemId}}`;a.item=r1(a.item,n,m),a.data=r1(a.data,n,m),e.properties&&(a.properties=r1(a.properties,n,m))}),a}function S9(e,a,x){let t=K(V,{success:!0}),n=[t({itemId:e.item.id,folderId:a,authentication:x})];return H(e,"item.properties.parentInitiativeId")&&n.push(t({itemId:e.item.properties.parentInitiativeId,folderId:a,authentication:x})),Promise.all(n)}function Y0(e,a,x=null){let t=0,n=0;return Promise.all([I1(e.id,{authentication:a}),n1(a)]).then(([m,i])=>(t=m.item.created,n=m.item.modified,_7(m,i))).then(m=>(m.item.created=t,m.item.modified=n,m.item.typeKeywords=H1(m.item.typeKeywords,"doNotDelete"),m.groups=[],m.estimatedDeploymentCostFactor=2,m.resources=[],H(m,"properties")||(m.properties={}),m=r9(m),m))}function X0(e,a,x,t){if(!t(e.itemId,S.Started,0))return Promise.resolve(k(e.type));if(e.assets&&e.resources&&delete e.assets,a.solutionItemExtent){let y=a.solutionItemExtent.split(",");a.organization.defaultExtentBBox=[[y[0],y[1]],[y[2],y[3]]]}let m={},i,l,d=e.item.thumbnail;return n1(x,a).then(y=>(l=y,V7(e,a,m,l))).then(y=>{let o=y,r={assets:o.assets||[]};return j7(o,r,l)}).then(y=>(i=y,S9(y,a.folderId,x))).then(()=>{let y={item:{id:i.item.id},params:{thumbnail:d},authentication:x};return e1(y)}).then(()=>{if(a[e.itemId]={itemId:i.item.id},t(e.itemId,S.Finished,e.estimatedDeploymentCostFactor||2,i.item.id)){let o={item:{...e,...a1(i)},id:i.item.id,type:e.type,postProcess:!0};return o.item.itemId=i.item.id,o}else return K(B7,{success:!0})(i,l).then(()=>Promise.resolve(k(e.type)))}).catch(y=>{throw t(e.itemId,S.Failed,0),y})}function Q0(e,a,x,t,n,m,i){let l;return n1(i).then(d=>(l=d,I1(e,{authentication:i}))).then(d=>t6(d,x,m,l))}function e5(e){let a=!1;return(e==="Hub Page"||e==="Site Page")&&(a=!0),a}var g1={};W(g1,{convertItemToTemplate:()=>a5,createItemFromTemplate:()=>x5,isASite:()=>n5,postProcess:()=>t5});function n6(e,a,x){let t=a.filter(n=>n.type.indexOf("Page")>-1).map(n=>n.id);return Promise.all(t.map(n=>I1(n,x))).then(n=>e3(e,n,x))}function m6(e,a,x,t){let n=a.filter(d=>d.id!==e.item.id),m=n.map(d=>({item:{id:d.id,type:d.type}})),i=[];i=i.concat(Q7(e,m,t)),i=i.concat(n6(e,n,t));let l=n.map(d=>d.id);return e.item.properties.children=l,e=q7(e,x,{}),i.push(z7(e,{...t,allowList:void 0})),Promise.all(i).then(()=>!0)}function a5(e,a,x=null){let t=0,n=0,m,i,l;return n1(a).then(d=>(l=d,D9(e.id,l))).then(d=>(t=d.item.created,n=d.item.modified,m=d.item.title,i=d.data.values.title,X7(d,l))).then(d=>(d.item.created=t,d.item.modified=n,d.item.title=m,d.item.typeKeywords=H1(d.item.typeKeywords,"doNotDelete"),d.data.values.title=i,d.groups=[],d.estimatedDeploymentCostFactor=2,d.resources=[],u(d,"properties")||(d.properties={}),d.dependencies=E1(d.dependencies),d=r9(d),d))}function x5(e,a,x,t){if(!t(e.itemId,S.Started,0))return Promise.resolve(k(e.type));e.assets&&e.resources&&delete e.assets,a.solution||(a.solution={}),a.solution.title=a.title;let m={},i,l,d=e.item.thumbnail;return n1(x,a).then(y=>(l=y,Y7(e,a,m,l))).then(y=>{let o={assets:y.assets||[]};return $7(y,o,l)}).then(y=>(i=y,S9(y,a.folderId,x))).then(()=>{let y={item:{id:i.item.id},params:{thumbnail:d},authentication:x};return e1(y)}).then(()=>{if(a[e.itemId]={itemId:i.item.id},t(e.itemId,S.Finished,e.estimatedDeploymentCostFactor||2,i.item.id)){let o={item:{...e,...a1(i)},id:i.item.id,type:e.type,postProcess:!0};return o.item.itemId=i.item.id,o}else return K(J7,{success:!0})(i,l).then(()=>Promise.resolve(k(e.type)))}).catch(y=>{throw t(e.itemId,S.Failed,0),y})}function t5(e,a,x,t,n,m,i){let l;return n1(i,m).then(d=>(l=d,D9(e,l))).then(d=>m6(d,x,m,l)).then(()=>Promise.resolve(!0))}function n5(e){let a=!1;return(e==="Hub Site Application"||e==="Site Application")&&(a=!0),a}var E9={};W(E9,{convertItemToTemplate:()=>l5,createItemFromTemplate:()=>d5,isAStoryMap:()=>y5});function i6(e={}){let a=0;return Object.keys(e).reduce((x,t)=>(H(e,`${t}.type`)==="webmap"&&t!==`webmap${a}`&&(x.push({original:t,updated:`webmap${a}`}),a++),x),[])}function l6(e){let a=H(e,"data.resources")||{};return Object.keys(a).reduce((x,t)=>(H(a,`${t}.type`)==="webmap"&&x.push(H(a,`${t}.data.itemId`)),x),[])}function y6(e){let a=Y1(e.item.id,e.item.type);a.key=`${L1(e.item.title)}_${v1("i")}`;let x=z(e);a.data=x.data;let t=x.item.created,n=x.item.modified;return a.item=_1(x.item),a.item.created=t,a.item.modified=n,a.item.url="{{storyMapTemplateUrl}}",i6(a.data.resources).forEach(l=>{a.data.resources[l.updated]=z(a.data.resources[l.original]),delete a.data.resources[l.original],a.data.nodes=r1(a.data.nodes,l.original,l.updated)}),a.item.typeKeywords.indexOf(d6)!==-1&&(a.item.typeKeywords=[m5].concat(a.item.typeKeywords.filter(l=>l!==d6))),a.properties={},a.properties.draftFileName="draft_{{timestamp}}.json",Object.assign(a.properties,i5),a.dependencies=l6(e),Promise.resolve(a)}var d6="smstatusunpublishedchanges",m5="smstatuspublished",i5={oembed:{version:"1.0",type:"rich",title:"Example StoryMap",url:"{{storyMapTemplateUrl}}",provider_name:"ArcGIS StoryMaps",provider_url:"{{storyMapBaseUrl}}",width:800,height:600,thumbnail_url:"{{storyMapThumbnailUrl}}",thumbnail_height:"100.5",thumbnail_width:"400",html:'<iframe src="{{storyMapTemplateUrl}}" width="800" height="600" scrolling="yes" frameborder="0" allowfullscreen></iframe>',cache_age:86400},oembedXML:`<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
|
2
|
+
import{a as E3,b as k3}from"./BNRFT546.js";import{a as f3}from"./WPGT2HLS.js";import a from"./EXC566PM.js";import{b as b2}from"./2B4SGB3I.js";import{b as w2}from"./I2NTSKBD.js";import{$ as Y1,$a as k7,$b as Z9,A as F2,Aa as $2,Ab as h7,B as R2,Ba as q2,Bb as g7,C as k1,Ca as Y2,Cb as T7,D as Z,Da as F9,E as p2,Ea as R9,Eb as Z7,F as $1,Fa as X2,G as c1,Ga as Q2,Gb as U7,H as A,Ha as b1,Hb as W7,I as I9,Ia as p9,Ib as O7,J as h2,Ja as e7,Jb as K7,K as u,Ka as a7,Kb as n1,L as g2,La as x7,Lb as H7,Ma as t7,Mb as v7,N as C1,Na as n7,Nb as B7,O as D,Oa as m7,Ob as L7,P as G1,Pa as i7,Pb as j7,Q as T2,Qa as l7,Qb as _7,R as c9,Ra as d7,Rb as V7,S as C9,Sa as y7,Sb as z7,T as q1,Ta as o7,Tb as J7,U as J,Ua as u7,Ub as $7,V as Z2,Va as r7,Vb as q7,W as U2,Wa as S7,Wb as Y7,X as W2,Xa as h9,Xb as X7,Y as v,Ya as a9,Yb as Q7,Z as O2,Za as f7,Zb as e3,_ as j,_a as E7,_b as a3,a as K1,aa as K2,ab as t1,ac as t9,ba as G9,bb as w7,bc as U9,c as O,ca as x1,cb as b7,cc as F1,da as N,db as s7,dc as n9,e as e1,ea as c,eb as N7,ec as x3,f as D2,fa as X,fb as A7,fc as t3,g as d1,ga as X1,gb as P7,gc as n3,h as S,ha as H2,hb as D7,hc as m3,i as P9,ia as v2,ib as I7,ic as i3,j as r1,ja as M9,jb as c7,jc as l3,k as L1,ka as B2,kb as C7,kc as d3,l as f1,lb as M1,lc as R1,m as j1,ma as L2,mb as M,mc as m9,n as _1,na as j2,nb as x9,nc as i9,o as D9,oa as _2,oc as y3,p as c2,pa as V2,pc as l9,qa as z2,qb as G7,qc as o3,r as V1,ra as h,rb as M7,s as C2,sa as w1,sb as B,t as z1,ta as $,tb as F7,u as J1,ub as s1,v as a1,va as Q1,vb as q,w as G2,wa as e9,wb as R7,x as E1,xa as J2,xb as g9,y as M2,yb as p7,z as k,zb as T9}from"./3UKDJZ2D.js";import{a as k2}from"./MGEDATQ7.js";import{a as S1,g as I1}from"./IHG7KTNC.js";import{a as K}from"./ZCU2WWVN.js";import{a as z,b as H1,c as v1,d as B1}from"./KOIDWEP3.js";import{e as V,f as A2,j as U1,l as W1,o as P2,s as O1}from"./AYSQIO6L.js";import{b as s2,h as N2}from"./YQHYMLC7.js";import{a as I2}from"./5O53T3SW.js";import{a as H}from"./AJZDBHB6.js";import{b as E2}from"./2I5LGZNX.js";import{E as Z1,F as D1,G as S2,K as f2,h as r2,i as _,q as u1}from"./FFF5HUPM.js";import{c as W}from"./QPIMTXPL.js";export default $arcgis.t(([{g:u3,h:r3,i:S3}])=>{function N1(e,a="application/octet-stream"){if(typeof Blob<"u"){let x=[];for(let n=0;n<e.length;n++)x[n]=e.charCodeAt(n);let t=new Uint8Array(x);return new Blob([t],{type:a})}else throw new Error("stringToBlob is not currently supported on Node")}function w3(e){if(typeof Blob<"u")return new Blob([JSON.stringify(e)],{type:"application/json"});throw new Error("objectToJsonBlob is not currently supported on Node")}var d9={};W(d9,{_mostRecentlyEditedLayer:()=>W9,convertItemToTemplate:()=>n0,createItemFromTemplate:()=>m0,postProcess:()=>i0});function n0(e,a,x,t){return new Promise((n,m)=>{let i=j(e);c7(e.groupDesignations)?x7(i,x).then(d=>n(d),d=>m(A(d))):(i.estimatedDeploymentCostFactor=10,$(i.item.id,x).then(d=>{i.data=d,P7(i,x).then(y=>{y.item.modified=Math.max(y.item.modified,W9(i.properties.layers),W9(i.properties.tables)),s7(y,x).then(o=>{y.dependencies=o.map(r=>r.id),n(X2(y,o,!1,t))},o=>m(A(o)))},y=>m(A(y)))}))})}function m0(e,a,x,t){return new Promise(n=>{if(!t(e.itemId,S.Started,0)){t(e.itemId,S.Ignored,0),n(k(e.type));return}let m=Z(e);m=N(m,a),delete m.item.thumbnail,$1(m,"properties.service.size");let i=Q2(m.data);k7(m,x,a).then(l=>{l.success?t(e.itemId,S.Created,e.estimatedDeploymentCostFactor/2,l.serviceItemId)?(m=p9(m,a,l),m7(m,a,i,x).then(()=>{m=p9(m,a,l),s1({...m.item,url:void 0},m.data,x,e.item.thumbnail,void 0,a).then(()=>{t(e.itemId,S.Finished,e.estimatedDeploymentCostFactor/2,l.serviceItemId)?h(m.itemId,x).then(d=>{m.item=d,u(m,"item.url")&&!m.item.url.endsWith("/")&&(m.item.url+="/"),n({item:m,id:l.serviceItemId,type:m.type,postProcess:x1({item:m.item,data:m.data})||h9(m)})},()=>{t(e.itemId,S.Failed,0),M(l.serviceItemId,x).then(()=>n(k(e.type)),()=>n(k(e.type)))}):(t(e.itemId,S.Cancelled,0),M(l.serviceItemId,x).then(()=>n(k(e.type)),()=>n(k(e.type))))},()=>{t(e.itemId,S.Failed,0),M(l.serviceItemId,x).then(()=>n(k(e.type)),()=>n(k(e.type)))})},()=>{t(e.itemId,S.Failed,0),M(l.serviceItemId,x).then(()=>n(k(e.type)),()=>n(k(e.type)))})):(t(e.itemId,S.Cancelled,0),M(l.serviceItemId,x).then(()=>n(k(e.type)),()=>n(k(e.type)))):(t(e.itemId,S.Failed,0),n(k(e.type)))},()=>{t(e.itemId,S.Failed,0),n(k(e.type))})})}function i0(e,a,x,t,n,m,i){return new Promise((l,d)=>{q(e,m,i).then(y=>{h9(t)?(t=N(t,m),a9(t,i,t.item.url,m).then(l,d)):l(y)},d)})}function W9(e){let a=0;return e.forEach(x=>{a=x.editingInfo?.lastEditDate?Math.max(a,x.editingInfo.lastEditDate):a}),a}var f={};W(f,{convertItemToTemplate:()=>l0,createItemFromTemplate:()=>d0});function l0(e,a,x){return new Promise(t=>{let n=j(e);n.item.id=c(n.item.id,n.item.id,".itemId");let m=new Promise(l=>{w1(n.itemId,n.item.name,x).then(d=>{!d||d.size===0?l(null):l(d)})}),i=Promise.resolve({});Promise.all([m,i]).then(l=>{let[d]=l;if(d){let y=x3(d,n.item.name);n.properties[y.filename]=y.mimeType;let o=n9(n.itemId,y.blob.name,1,y.blob.name===y.filename?F1.data:F1.fakezip),r={itemId:n.itemId,file:y.blob,folder:o.folder,filename:o.filename};n.dataFile=r,n.resources.push(o.folder+"/"+o.filename),t(n)}else t(n)})})}function d0(e,a,x,t){return new Promise(n=>{if(!t(e.itemId,S.Started,0)){t(e.itemId,S.Ignored,0),n(k(e.type));return}let m=Z(e);m=N(m,a),e.item.thumbnail&&(m.item.thumbnail=e.item.thumbnail),t1(m.item,m.data,x,a.folderId).then(i=>{t(e.itemId,S.Created,e.estimatedDeploymentCostFactor/2,i.id)?(m.itemId=i.id,a[e.itemId]={itemId:i.id},t(e.itemId,S.Finished,e.estimatedDeploymentCostFactor/2,i.id),n({item:m,id:i.id,type:m.type,postProcess:!1})):(t(e.itemId,S.Cancelled,0),M(i.id,x).then(()=>n(k(e.type)),()=>n(k(e.type))))},()=>{t(e.itemId,S.Failed,0),n(k(e.type))})})}var Q9={};W(Q9,{_getFormDataFilename:()=>a6,_replaceFeatureServiceURLs:()=>J3,_replaceItemIds:()=>$3,_replacePortalBaseUrls:()=>q3,_replaceWorkflowManagerBaseUrls:()=>Y3,_updateZipObjectTextContent:()=>X3,convertItemToTemplate:()=>j0,createItemFromTemplate:()=>_0,postProcess:()=>e6,postProcessFormItems:()=>z0,swizzleFormObject:()=>Y9,templatizeFormData:()=>X9});function N3(e,a){return y0(e,a)}function y0(e,a){return["data.desktopView.header","data.desktopView.headerPanel.selectors","data.desktopView.leftPanel.selectors","data.desktopView.sidebar","data.desktopView.urlParameters","data.desktopView.widgets","data.header","data.headerPanel.selectors","data.leftPanel.selectors","data.mobileView.header","data.mobileView.headerPanel.selectors","data.mobileView.leftPanel.selectors","data.mobileView.sidebar","data.mobileView.urlParameters","data.mobileView.widgets","data.sidebar","data.urlParameters","data.widgets"].forEach(t=>{let n=u(e,t);Array.isArray(n)&&n.forEach(m=>{m.type==="mapWidget"&&(e.dependencies.indexOf(m.itemId)<0&&e.dependencies.push(m.itemId),m.itemId=c(m.itemId,m.itemId,".itemId")),Array.isArray(m.datasets)&&o0(m,e,a)})}),e}function o0(e,a,x){e.datasets.forEach(t=>{if(u(t,"dataSource.type")!=="arcadeDataSource"){let m=u(t,"dataSource.itemId");if(m){a.dependencies.indexOf(m)<0&&a.dependencies.push(m);let i=u(t,"dataSource.layerId");b1(i?.toString(),m,"",x),t.dataSource.itemId=c(m,m,".itemId")}}})}function A3(e,a){let x=["data.desktopView.header","data.desktopView.headerPanel.selectors","data.desktopView.leftPanel.selectors","data.desktopView.sidebar","data.desktopView.urlParameters","data.desktopView.widgets","data.header","data.headerPanel.selectors","data.leftPanel.selectors","data.mobileView.header","data.mobileView.headerPanel.selectors","data.mobileView.leftPanel.selectors","data.mobileView.sidebar","data.mobileView.urlParameters","data.mobileView.widgets","data.sidebar","data.urlParameters","data.widgets"];return x.forEach(t=>{let n=u(e,t);u0(n,a)}),x.forEach(t=>{r0(e,t,a)}),e}function u0(e,a){e&&Array.isArray(e)&&e.forEach(x=>{Array.isArray(x.datasets)&&x.datasets.forEach(t=>{let n=c9(u(t,"dataSource.itemId"));if(n){let m=C9(u(t,"dataSource.layerId"));a.some(i=>i.itemId===n&&i.layerId===m?(s3(i,x.id),!0):!1)}else{let m=u(t,"dataSource.id");if(m){let i=m.split("#")[1];a.some(l=>l.ids.indexOf(i)>-1?(s3(l,x.id),!0):!1)}}})})}function r0(e,a,x){let t=u(e,a);t&&D(e,a,S0(t,x))}function S0(e,a){return Array.isArray(e)?e.map(x=>{let t=x;return Array.isArray(t.events)&&(t.events=t.events.map(n=>{let m=n;return Array.isArray(m.actions)&&(m.actions=m.actions.map(i=>{let l=i;if(l.fieldMap&&l.targetId&&l.targetId.indexOf("#")>-1){let d=b3(l,a);if(d){let y=u(d,"fields"),o=u(d,"basePath");Array.isArray(y)&&o&&(l.fieldMap=l.fieldMap.map(r=>{let E=r;return E.targetName=X(E.targetName,y,o),E}))}}return l})),m})),Array.isArray(t.datasets)&&(t.datasets=t.datasets.map(n=>{let m=n;if(m.type==="serviceDataset"){let i=b3(n,a);if(i){let l=u(i,"fields"),d=u(i,"basePath");Array.isArray(l)&&d&&(t=X(t,l,d),m=X(m,l,d))}}return m})),t}):e}function b3(e,a){let x,t=u(e,"dataSource.id")||u(e,"targetId");if(t){let n=t.split("#")[1];if(!a.some(m=>(x=m.ids.indexOf(n)>-1?m:x,m.ids.indexOf(n)>-1))){let m=t.split("#")[0];a.some(i=>{let d=(i.references||[]).indexOf(m)>-1;return x=d?i:x,d})}}else{let n=c9(u(e,"dataSource.itemId")),m=C9(u(e,"dataSource.layerId"));n&&a.some(i=>{let l=n===i.itemId&&m===i.layerId;return x=l?i:x,l})}return x}function s3(e,a){e.references=Array.isArray(e.references)?e.references:[],e.references.indexOf(a)<0&&e.references.push(a)}var A1={};W(A1,{convertItemToTemplate:()=>D0,convertNotebookToTemplate:()=>z9,createItemFromTemplate:()=>I0,deleteProps:()=>h3,fineTuneCreatedItem:()=>V9,postProcess:()=>C0,postProcessNotebookTemplates:()=>c0});function I3(e,a,x,t){return new Promise((n,m)=>{let i="";if(e.item.url){let l=e.item.url,d=l.indexOf("//");e.item.url=v(J)+l.substring(l.indexOf("/",d+2),l.lastIndexOf("=")+1)+e.item.id,i=l.replace(l.substring(l.indexOf("/",d+2)),"")}e.dependencies=k0(e),D(e,"data.folderId","{{folderId}}"),s0(e,["data.map.itemId","data.map.appProxy.mapItemId","data.values.webmap","data.values.group"]),C3(e,"data.appItemId",e.itemId),j9(e,["data.logo","data.map.portalUrl","data.portalUrl","data.httpProxy.url"],v(J)),D(e,"data.geometryService",v(Z2)),f0(e,x,i,t).then(()=>{D3(e,x,i,"data.widgetPool.widgets").then(l=>{D3(l,x,i,"data.widgetOnScreen.widgets",!0).then(d=>{E0(d,x,i,"data.values").then(y=>{n(y)},y=>m(A(y)))},d=>m(A(d)))},l=>m(A(l)))},l=>m(A(l)))})}function f0(e,a,x,t){return new Promise((n,m)=>{let i=u(e,"data.dataSource.dataSources");if(i&&Object.keys(i).length>0){let l=new Array;Object.keys(i).forEach(d=>{let y=i[d];D(y,"portalUrl",v(J));let o=u(y,"itemId");if(u(y,"url")){if(o){let E=y.url.substr(y.url.lastIndexOf("/")+1);b1(E.toString(),o,y.url,t),y.itemId=c(o,o,".layer"+E+".itemId")}let r=L9(y.url,x,[],[],a);l.push(new Promise((E,w)=>{B9(r.serviceRequests,r.requestUrls,r.testString).then(s=>{y.url=s,E()},s=>w(A(s)))}))}else o&&(y.itemId=c(o,o,".itemId"))}),Promise.all(l).then(()=>n(e),d=>m(A(d)))}else n(e)})}function D3(e,a,x,t,n=!1){return new Promise((m,i)=>{let l=u(e,t)||[],d=[],y=[];if(l.forEach(o=>{!n&&u(o,"icon")&&j9(o,["icon"],v(J));let r=o.config;if(r){let E=JSON.stringify(r),w=L9(E,x,y,d,a);o.config=JSON.parse(w.testString),d=w.serviceRequests,y=w.requestUrls}}),d.length>0){let o=JSON.stringify(l);B9(d,y,o).then(r=>{D(e,t,JSON.parse(r)),m(e)},r=>i(A(r)))}else m(e)})}function E0(e,a,x,t){return new Promise((n,m)=>{let i=u(e,t),l=[],d=[];if(i){u(i,"icon")&&j9(i,["icon"],v(J));let y=JSON.stringify(i),o=L9(y,x,d,l,a);i=JSON.parse(o.testString),l=o.serviceRequests,d=o.requestUrls}if(l.length>0){let y=JSON.stringify(i);B9(l,d,y).then(o=>{D(e,t,JSON.parse(o)),n(e)},o=>m(A(o)))}else n(e)})}function B9(e,a,x){return new Promise((t,n)=>{if(e&&e.length>0){let m=0;Promise.all(e).then(i=>{i.forEach(l=>{if(u(l,"serviceItemId")){let d="{{"+l.serviceItemId+(l.hasOwnProperty("id")?".layer"+l.id:"")+".url}}";x=y9(x,a[m],d,!0)}m++}),t(x)},i=>n(A(i)))}else t(x)})}function L9(e,a,x,t,n){let m={f:"json",authentication:n},i=e.match(/(\bhttps?:\/\/[-A-Z0-9/._]*)/gim);return i&&i.length&&i.forEach(l=>{l.indexOf("NAServer")>-1?e=y9(e,l,v(W2)):l.indexOf("GeocodeServer")>-1?e=y9(e,l,v(U2)):a&&l.indexOf(a)>-1?e=y9(e,a,v(J)):l.indexOf("FeatureServer")>-1&&x.indexOf(l)===-1&&(x.push(l),t.push(O(l,m)))}),{testString:e,requestUrls:x,serviceRequests:t}}function y9(e,a,x,t=!1){let n=t&&e.indexOf('"')>-1,m=new RegExp(n?'"'+a+'"':a,"gmi");return e.replace(m,n?'"'+x+'"':x)}function j9(e,a,x){a.forEach(t=>{let n=u(e,t);if(n){let m=n.substring(n.indexOf("/",n.indexOf("//")+2));D(e,t,m!==n?x+m:x)}})}function c3(e,a,x,t){return new Promise(n=>{if(G1(e,["WAB2D","WAB3D","Web AppBuilder"])){let m={id:a.itemId,url:a.item.url,data:a.data},i=B(m,t),l={tags:e.item.tags,title:e.item.title,type:"Code Attachment",typeKeywords:["Code","Javascript","Web Mapping Application"],relationshipType:"WMA2Code",originItemId:a.itemId,url:J1(N(v(J),x))+"sharing/rest/content/items/"+a.itemId+"/package"},d=t1(l,{},t,x.folderId);Promise.all([i,d]).then(()=>n(null),()=>n(null))}else n(null)})}function k0(e){let a=w0;return G1(e,["WAB2D","WAB3D","Web AppBuilder"])&&(a=b0),a(e)}function w0(e){return g2(e,["data.values.webmap","data.values.group"])}function b0(e){let a=[],x=u(e,"data.map.itemId");x&&a.push(x);let t=u(e,"data.dataSource.dataSources");return t&&Object.keys(t).forEach(n=>{let m=t[n];m.itemId&&a.push(m.itemId)}),a}function s0(e,a){a.forEach(x=>{let t=u(e,x);C3(e,x,t)})}function C3(e,a,x){D(e,a,c(x,x,".itemId"))}function G3(e,a){let x=u(e,"data.dataSource.dataSources");x&&Object.keys(x).length>0&&(Object.keys(x).forEach(m=>{let i=x[m];x[m]=H9(i,a)}),D(e,"data.dataSource.dataSources",x)),["data.widgetPool.widgets","data.widgetOnScreen.widgets"].forEach(m=>{let i=u(e,m);i&&D(e,m,N0(i,a))});let n=u(e,"data.values");return n&&D(e,"data.values",H9(n,a)),e}function H9(e,a,x=!1){return e=P0(e,a,x),A0(e,a).forEach(n=>{e=X(e,n.fields,n.basePath,x)}),e}function N0(e,a){let x=["SmartEditor","Screening"];return e.map(t=>{if(t.config){let n=x.indexOf(t.name)>-1;t.config=H9(t.config,a,n)}return t})}function A0(e,a){let x=JSON.stringify(e);return a.filter(n=>K9(n,x)<4).sort((n,m)=>K9(n,x)-K9(m,x))}function K9(e,a){let x=e.url,t=e.itemId,n=e.layerId,m;return x&&!isNaN(n)&&(m=new RegExp(x.replace(/[.]/,".layer"+n+"."),"gm")),m&&m.test(a)||e.ids.length>0&&e.ids.some(i=>new RegExp(i,"gm").test(a))?1:x&&new RegExp(x,"gm").test(a)?2:t&&new RegExp(t,"gm").test(a)?3:4}function P0(e,a,x){let t=JSON.stringify(e),n=a.filter(m=>{let i;m.url&&!isNaN(m.layerId)&&(i=new RegExp(m.url.replace(/[.]/,".layer"+m.layerId+"."),"gm"));let l=!1;if(m.ids.length>0&&(l=m.ids.some(d=>new RegExp(d,"gm").test(t))),l||i&&i.test(t))return m});return n.length>0&&n.forEach(m=>{e=v9(e,m,x),m.ids.length>0&&m.ids.forEach(i=>{e=o9(e,m,i,x)})}),e}function v9(e,a,x){let t={},n=a.url,m=a.layerId,i;if(n&&!isNaN(m)&&(i=new RegExp(n.replace(/[.]/,".layer"+m+"."),"gm")),Array.isArray(e))t=e.map(l=>v9(l,a,x));else if(typeof e=="object")for(let l in e)e[l]!=null&&typeof e[l]=="object"?t[l]=v9(e[l],a,x):(i&&i.test(e[l])&&(e=X(e,a.fields,a.basePath,x)),t[l]=e[l]);else t=e;return t}function o9(e,a,x,t){let n={},m=new RegExp(x,"gm");if(Array.isArray(e))n=e.map(i=>o9(i,a,x,t));else if(typeof e=="object")for(let i in e)if(e[i]!==null){let l;try{l=JSON.parse(e[i])}catch{l=void 0}l&&typeof l=="object"?n[i]=JSON.stringify(o9(l,a,x,t)):typeof e[i]=="object"?(m.test(i)&&t&&(e[i]=X(e[i],a.fields,a.basePath,t)),n[i]=o9(e[i],a,x,t)):(m.test(e[i])&&(e=X(e,a.fields,a.basePath,t)),n[i]=e[i])}else n[i]=e[i];else n=e;return n}function M3(e,a,x,t){return S7(e,x,t)}function F3(e,a,x){return a9(e,a,"",x)}function Y(e,a,x,t,n){return new Promise((m,i)=>{function l(){n&&n.signal.aborted&&i(new Error("Operation was cancelled"))}if(l(),!t(e.itemId,S.Started,0))t(e.itemId,S.Ignored,0),m(k(e.type));else{let d=Z(e);d=N(d,a);let y;e.type==="Web Mapping Application"&&e.data?d=JSON.parse(N(JSON.stringify(d),a)):e.type==="QuickCapture Project"&&e.data&&(y=JSON.stringify(d.data.application),delete d.data),e.item.thumbnail&&(d.item.thumbnail=e.item.thumbnail),t1(d.item,d.data,x,a.folderId).then(o=>{if(l(),!t(e.itemId,S.Created,e.estimatedDeploymentCostFactor/2,o.id))t(e.itemId,S.Cancelled,0),M(o.id,x).then(()=>m(k(e.type)),()=>m(k(e.type)));else{a[e.itemId]={itemId:o.id,itemUrl:a.portalBaseUrl+"/sharing/rest/content/items/"+o.id},d.itemId=o.id,d.type==="Web Mapping Application"&&e.data&&D(d,"data.appItemId",o.id);let r=x1(d.data),E=d.item.url;d=N(d,a),l();let w=Promise.resolve([]);if(d.relatedItems){let P=N(X1(d.relatedItems),a);w=f7(d.itemId,P,x)}l();let s;if(e.type==="Web Mapping Application"&&e.data&&G1(e,["WAB2D","WAB3D","Web AppBuilder"]))s=c3(e,d,a,x);else if(e.type==="Workforce Project")s=F3(d,x,a);else if(e.type==="QuickCapture Project"){if(y){let P=k1(N(JSON.parse(y),a),"qc.project.json");s=d3(P,d.itemId,"",P.name,x)}}else e.type==="Notebook"?s=V9(e,d,a,x):E!==d.item.url?(l(),s=new Promise((P,b)=>{R7(o.id,d.item.url,x).then(()=>P(),b)})):s=Promise.resolve(null);l(),Promise.all([w,s]).then(()=>{t(e.itemId,S.Finished,e.estimatedDeploymentCostFactor/2,o.id)?m({item:d,id:o.id,type:d.type,postProcess:r}):(t(e.itemId,S.Cancelled,0),M(o.id,x).then(()=>m(k(e.type)),()=>m(k(e.type))))},()=>{t(e.itemId,S.Failed,0),m(k(e.type))})}},()=>{t(e.itemId,S.Failed,0),m(k(e.type))})}})}function D0(e,a,x,t){return Q(e,a,x,t)}function I0(e,a,x,t){return Y(e,a,x,t)}function z9(e){return new Promise(a=>{h3(e.data),a(e)})}function c0(e,a){if(e.some(t=>t.type==="Notebook")){let t=Object.keys(a).filter(m=>m.indexOf("FeatureServer")>-1).sort().reverse(),n=e.reduce((m,i)=>(m=[...new Set([...m,...i.dependencies,i.itemId])],m),[]);e=e.map(m=>{if(m.type==="Notebook"){let i=m.data&&JSON.stringify(m.data);return n.forEach(l=>{new RegExp(l,"gim").test(i)&&(i=i.replace(l,"{{"+l+".itemId}}"),m.dependencies.indexOf(l)<0&&m.dependencies.push(l))}),t.forEach(l=>{let d=new RegExp(l,"gim");if(d.test(i)){let y=a[l];i=i.replace(d,y);let o=/[0-9A-F]{32}/gim,r=y.match(o)[0];m.dependencies.indexOf(r)<0&&m.dependencies.push(r)}}),m.data=JSON.parse(i),m}})}return e}function h3(e){if(e){let a=["metadata.interpreter","metadata.papermill"];c1(e,a),(e.cells||[]).forEach(x=>{c1(x,a)})}}function V9(e,a,x,t){return new Promise((n,m)=>{let i={id:a.itemId,url:a.item.url,data:k1(a.data,a.itemId+".ipynb")};B(i,t).then(()=>n(null),m)})}function C0(e,a,x,t,n,m,i){return q(e,m,i)}function T3(e,a,x){return new Promise((t,n)=>{G0(e,x).then(m=>{e.dependencies=m.dependencies,e.data?.properties&&(e.data.properties.ServiceURL=g3(e.data.properties.ServiceURL,m.urlHash),e.data.properties.OverviewURL=g3(e.data.properties.OverviewURL,m.urlHash)),t(e)},m=>n(A(m)))})}function G0(e,a){return new Promise((x,t)=>{let n=[];if(e.data?.properties){let m=[];e.data.properties.ServiceURL&&m.push(e.data.properties.ServiceURL),e.data.properties.OverviewURL&&e.data.properties.OverviewURL!==e.data.properties.ServiceURL&&m.push(e.data.properties.OverviewURL),M0(m,n,a).then(i=>{x(i)},i=>t(A(i)))}else x({dependencies:n,urlHash:{}})})}function M0(e,a,x){return new Promise((t,n)=>{let m={},i={f:"json",authentication:x},l=[],d={},y=e.filter(o=>{if(o){let r=/.+FeatureServer/g.exec(o),E=Array.isArray(r)&&r.length>0?r[0]:void 0;return E?(Object.keys(d).indexOf(E)<0&&(d[E]=O(o,i)),l.push(d[E]),!0):!1}else return!1});l.length>0?Promise.all(l).then(o=>{o.forEach((r,E)=>{if(u(r,"serviceItemId")){let w=r.serviceItemId;a.indexOf(w)<0&&a.push(w),m[y[E]]=w}}),t({dependencies:a,urlHash:m})},o=>n(A(o))):t({dependencies:a,urlHash:m})})}function g3(e,a){let x=e;if(e){let t=a[e];if(t){let n=e.substr(e.lastIndexOf("/")+1);x=c(t,t,".layer"+n+".url")}x=X1(x.replace(/.+?(?=\/home)/,"{{portalBaseUrl}}"))}return x}var p1={};W(p1,{_templatizeAdminEmail:()=>W3,_templatizeApplication:()=>U3,_templatizeId:()=>J9,_templatizeUrl:()=>K3,_updateDependencies:()=>O3,convertItemToTemplate:()=>R0,convertQuickCaptureToTemplate:()=>$9,createItemFromTemplate:()=>p0});function R0(e,a,x,t){return Q(e,a,x,t)}function $9(e){return D(e,"data.application",U3(e.data.application,e)),e}function U3(e,a){J9(e,"itemId"),W3(e);let x=e?.dataSources;return x&&Array.isArray(x)&&x.forEach(t=>{let n=t.featureServiceItemId;n&&(O3(n,a),K3(t,"featureServiceItemId","url"),J9(t,"featureServiceItemId"))}),e}function W3(e){u(e,"preferences.adminEmail")&&D(e,"preferences.adminEmail","{{user.email}}")}function O3(e,a){a.dependencies.indexOf(e)===-1&&a.dependencies.push(e)}function K3(e,a,x){let t=u(e,a),n=u(e,x);if(n){let m=n.substr(n.lastIndexOf("/")+1);D(e,x,c(t,t,".layer"+m+".url"))}}function J9(e,a){let x=u(e,a);x&&D(e,a,c(x,x,".itemId"))}function p0(e,a,x,t){return Y(e,a,x,t)}var h0="home/webmap/viewer.html?webmap=";function H3(e,a,x,t){return new Promise((n,m)=>{e.type!=="Vector Tile Service"&&(e.item.url=e.item.url?J1(v(J))+h0+e.item.id:e.item.url),g0(e,x).then(i=>{e.dependencies=i.dependencies,e.data&&(e.data.baseMap?.baseMapLayers&&q9(e.data.baseMap.baseMapLayers,i.urlHash,t),e.data.operationalLayers&&q9(e.data.operationalLayers,i.urlHash,t),q9(e.data.tables,i.urlHash,t),T0(e.data)),n(e)},i=>m(A(i)))})}function g0(e,a){return new Promise((x,t)=>{let n=[];if(e.data){let m=e.data.baseMap?.baseMapLayers||[],i=e.data.operationalLayers||[],l=e.data.tables||[],d=m.concat(i).concat(l);Z0(d,n,a).then(y=>{x(y)},y=>t(A(y)))}else x({dependencies:n,urlHash:{}})})}function T0(e){$1(e,"initialState")}function Z0(e,a,x){return new Promise((t,n)=>{let m={},i={f:"json",authentication:x},l=[],d={},y=e.filter(o=>{if(o.itemId&&o.layerType==="VectorTileLayer")return l.push(h(o.itemId,x)),!0;if(o.url&&o.url.indexOf("{{velocityUrl}}")<0){let r=/.+FeatureServer/g.exec(o.url),E=Array.isArray(r)&&r.length>0?r[0]:void 0;return E?(Object.keys(d).indexOf(E)<0&&(d[E]=O(o.url,i)),l.push(d[E]),!0):!1}else return!1});l.length>0?Promise.all(l).then(o=>{o.forEach((r,E)=>{if(y[E].layerType==="VectorTileLayer"){let w=u(r,"typeKeywords");if(w&&w.includes("Vector Tile Style Editor")){a.indexOf(r.id)<0&&a.push(r.id),y[E].templatizeId=!0;let s=y[E].styleUrl.indexOf(r.id)+r.id.length;y[E].styleUrl=c(y[E].styleUrl.replace(y[E].styleUrl.substring(0,s),r.id),r.id,".itemUrl")}}else if(u(r,"serviceItemId")){let w=r.serviceItemId;a.indexOf(w)<0&&a.push(w),m[y[E].url]=w}}),t({dependencies:a,urlHash:m})},o=>n(A(o))):t({dependencies:a,urlHash:m})})}function q9(e=[],a,x){e.forEach(t=>{if(t.itemId&&t.layerType==="VectorTileLayer")t.templatizeId&&(t.itemId=c(t.itemId,t.itemId,".itemId"),delete t.templatizeId);else if(t.url){let n=t.url.substr(t.url.lastIndexOf("/")+1),m=Object.keys(a).indexOf(t.url)>-1?a[t.url]:void 0;m&&(b1(n,m,t.url,x),t.url=c(m,m,".layer"+n+".url"),t.itemId=c(m,m,".layer"+n+".itemId"))}})}function v3(e,a){return["data.operationalLayers","data.tables","data.applicationProperties.viewing.search.layers"].forEach(t=>U0(e,a,t)),e}function U0(e,a,x){let t=u(e,x);t&&D(e,x,W0(t,a))}function W0(e,a){return e.forEach(x=>{let t=O0(x,a);if(t){let n=t.fields.map(i=>i.name);d7(x,t,t.basePath,t.itemId,n),o7(x,t.basePath,n),x.layerDefinition&&(r7(x.layerDefinition,t.basePath,n),u7(x.layerDefinition,t.basePath,n));let m=u(x,"field.name");m&&D(x,"field.name",y7(m,x,t.itemId,t.basePath))}}),e}function O0(e,a){let x;return a.some(t=>t.ids.indexOf(e.id)>-1?(x=t,!0):!1),x}function Q(e,a,x,t){return new Promise((n,m)=>{let i=j(e);i.item.id=c(i.item.id,i.item.id,".itemId");let l=Q1(i.itemId,"forward",x),d=Promise.resolve({}),y=Promise.resolve([]);switch(e.type){case"Dashboard":case"Data Pipeline":case"Feature Collection":case"Feature Service":case"Hub Initiative":case"Hub Page":case"Hub Site Application":case"Insights Model":case"Oriented Imagery Catalog":case"Project Package":case"Style":case"Workforce Project":case"Web Map":case"Web Mapping Application":case"Web Scene":case"Notebook":d=new Promise(o=>{$(i.itemId,x).then(r=>o(r))});break;case"Form":d=w1(i.itemId,i.item.name,x);break;case"QuickCapture Project":y=e9(i.itemId,x);break}Promise.all([d,l,y]).then(o=>{let[r,E,w]=o;o3(i,t),i.data=l9(r,e.type,t);let s=E;i.dependencies=[],i.relatedItems=[],s.forEach(b=>{b.relationshipType!=="WMA2Code"&&(i.relatedItems.push(b),b.relatedItemIds.forEach(C=>{i.dependencies.indexOf(C)<0&&i.dependencies.push(C)}))}),e.type==="Data Pipeline"&&(i.dependencies=i.dependencies.concat(K0(r)));let P=Promise.resolve(i);switch(e.type){case"Dashboard":N3(i,t);break;case"Notebook":P=z9(i);break;case"Oriented Imagery Catalog":P=T3(i,a,x);break;case"QuickCapture Project":i.resources=w,P=new Promise(async b=>{let C=null,I=-1;w&&(w.some((y1,m1)=>{let i1=y1.name==="qc.project.json";return i1&&(C=y1,I=m1),i1}),I>=0&&w.splice(I,1)),C&&(i.data={application:{...await z1(C)},name:"qc.project.json"}),i.data.application?.basemap?.type==="Web Map"&&i.dependencies.push(i.data.application.basemap.itemId);let L=$9(i);b(L)});break;case"Vector Tile Service":case"Web Map":case"Web Scene":P=H3(i,a,x,t);break;case"Web Mapping Application":r&&(P=I3(i,a,x,t));break;case"Workforce Project":P=M3(i,a,x,t);break}P.then(n,b=>m(A(b)))})})}function K0(e){let a=[];return(e?.inputs??[]).concat(e?.outputs??[]).forEach(t=>{if(t.type==="FeatureServiceSource"||t.type==="FeatureServiceSink"){let n=u(t,"parameters.layer.value.itemId");n&&a.push(n)}}),a}var R={};W(R,{convertItemToTemplate:()=>H0,createItemFromTemplate:()=>v0,postProcess:()=>L0,postProcessFieldReferences:()=>B0});function H0(e,a,x,t){return Q(e,a,x,t)}function v0(e,a,x,t,n){return n?Y(e,a,x,t,n):Y(e,a,x,t)}function B0(e,a,x){switch(x){case"Web Mapping Application":G3(e,a);break;case"Dashboard":A3(e,a);break;case"Web Map":v3(e,a);break}return e}async function L0(e,a,x,t,n,m,i){if(a==="Web Map"&&t.resources.some(l=>l.indexOf(d1)>-1)){let l=n3(`${m.portalBaseUrl}/sharing/rest`,t.itemId,d1),d={httpMethod:"GET",authentication:i,params:{f:"json"},headers:{Accept:"application/json",Authorization:`Bearer ${i.token}`,"Content-Type":"application/json","X-Esri-Authorization":`Bearer ${i.token}`}};await O(l,d).then(async y=>{let o=JSON.stringify(y),r=N(o,m);if(o!==r){let E=JSON.parse(r),w={id:e,resource:k1(E,d1),name:d1,authentication:i,params:{}};await D2(w)}})}return q(e,m,i)}function j0(e,a,x,t){return R.convertItemToTemplate(e,a,x,t)}function u9(e){return!!u(e,"properties.services")}function j3(e,a="https://survey123.arcgis.com"){let x=`${a}/api/survey/create`,t={credentials:"same-origin",method:"POST",body:s2({f:"json",...e},!0)};return fetch(x,t).then(n=>n.json()).then(n=>{if(!n.success)throw new Error(`Failed to create survey: ${n.error.message}`);return{formId:n.id,featureServiceId:n.featureService.source.itemId,folderId:n.formItemInfo.ownerFolder}})}var _3=function(a){let x=Z(a),t=[["header","content"],["subHeader","content"],["footer","content"],["settings","thankYouScreenContent"]],n=(i,l)=>(i&&i[l]&&(i[l]=encodeURIComponent(i[l])),i);t.forEach(([i,l])=>n(x[i],l));let m=i=>n(i,"description");return x.questions=(x.questions||[]).map(i=>i.questions?{...i,questions:i.questions.map(m)}:m(i)),x};function V3(e,a,x){let{item:{title:t,description:n,tags:m,typeKeywords:i},properties:{form:l}}=e,{user:{username:d},portalBaseUrl:y,organization:{basemapGalleryGroupQuery:o,defaultBasemap:{title:r}}}=a,{token:E}=x.toCredential();return $2(o,r,x).then(w=>{let s="Survey-",P=T2(`${s}${t}`,a,"user.folders").replace(s,"");if(l.questions){let C=I=>(I.maps&&(I.maps=I.maps.map(L=>({...L,itemId:w.id}))),I);l.questions=l.questions.map(I=>I.questions?{...I,questions:I.questions.map(C)}:C(I))}let b=_3(l);return{description:n,form:b,portalUrl:y,tags:m,title:P,token:E,typeKeywords:i,username:d}})}function z3(e,a,x,t){let n=N(e,a),{survey123Url:m}=a;return V3(n,a,x).then(i=>j3(i,m)).then(i=>{let{formId:l,featureServiceId:d}=i,y=Promise.resolve(null);return e.item.thumbnail&&(y=s1({id:l},null,x,e.item.thumbnail)),y.then(()=>h(l,x)).then(o=>(a[n.itemId]={itemId:l},a[n.properties.info.serviceInfo.itemId]={itemId:d},t(n.itemId,S.Finished,n.estimatedDeploymentCostFactor,l),{item:{...e,item:o,itemId:l},id:l,type:"Form",postProcess:!0}))}).catch(i=>{throw t(n.itemId,S.Failed,0),i})}function _0(e,a,x,t){return u9(e)?z3(e,a,x,t):R.createItemFromTemplate(e,a,x,t)}async function Y9(e,a){let x=await T9(e),t=new Date;return t=new Date(t.valueOf()-864e5-t.getTimezoneOffset()*1e3*60),x.forEach(n=>{if(typeof n.content=="string"){let m=X3(n,a);e.file(n.file,m,{date:t})}else n.file.endsWith(".xlsx")&&e.file(n.file,n.content,{date:t})}),Promise.resolve(e)}async function X9(e,a){return(await T9(e)).forEach(t=>{if(t.file.endsWith(".info")||t.file.endsWith(".itemInfo")||t.file.endsWith(".json")||t.file.endsWith(".webform")||t.file.endsWith(".xml")){let n=t.content,m=/\b([0-9A-Fa-f]){32}_type/g;n=$3(n,a,m),n=J3(n,a,m),n=q3(n,a),n=Y3(n,a),e.file(t.file,n)}}),Promise.resolve(e)}function J3(e,a,x){let t=e;return Object.keys(a).filter(m=>m.match(x)&&a[m].type==="Feature Service").forEach(m=>{let i=a[m].url,l=a[i];l&&(t=t.replace(new RegExp(i,"g"),l))}),t}function $3(e,a,x){let t=e;return Object.keys(a).filter(m=>m.match(x)&&a[m].type!=="Feature Service").map(m=>m.replace("_type","")).forEach(m=>{t=t.replace(new RegExp(m,"g"),`{{${m}.itemId}}`)}),t}function q3(e,a){let x=e;return a.portalBaseUrl&&(x=x.replace(new RegExp(a.portalBaseUrl,"g"),"{{portalBaseUrl}}")),x}function Y3(e,a){let x=e;return a.workflowBaseUrl&&(x=x.replace(new RegExp(a.workflowBaseUrl,"g"),"{{workflowBaseUrl}}")),x}function X3(e,a){let x=F2(),t=e.content;return t=N(e.content,a),E1(t.match(x)??[]).forEach(m=>{let i=a[m];typeof i?.itemId=="string"&&(t=t.replace(new RegExp(m,"g"),`${i.itemId}`))}),t}function Q3(e,a,x,t,n,m,i){let l=t.properties.info.serviceInfo.itemId,{itemId:d}=m[l],y=N(t,m);return h(d,i).then(o=>{let r=[{id:e,title:y.item.title,snippet:y.item.snippet,extent:y.item.extent,culture:y.item.culture},{id:d,extent:y.item.extent,typeKeywords:[`source-${l}`].concat(o.typeKeywords)}],E=s=>B(s,i),w=r.map(E);return Promise.all(w).then(()=>{let s=[e,d],P=C=>V({itemId:C,folderId:m.folderId,authentication:i}),b=s.map(P);return Promise.all(b)}).then(()=>C7(o.ownerFolder,i)).then(()=>{let s=j(o);return n.push(s),t.dependencies.push(o.id),!0})})}async function e6(e,a,x,t,n,m,i){let l=await w1(e,"Form",i);if(l){let d=await g9(l),y=await Y9(d,m);t9(y,e,i)}else return await M2(5e3),e6(e,a,x,t,n,m,i);return u9(t)?Q3(e,a,x,t,n,m,i):q(e,m,i)}async function z0(e,a){for(let x of e)if(x.type==="Form"){let t=x.data;if(x.data=null,t){let n=await g9(t);n=await X9(n,a),x.item.name=a6(x.item.name,t.name,`${x.itemId}.zip`);let m=await h7(n,x.item.name),i=n9(x.itemId,x.item.name,1,F1.data),l={itemId:x.itemId,file:m,folder:i.folder,filename:x.item.name};x.dataFile=l,x.resources.push(i.folder+"/"+i.filename)}}return Promise.resolve(e)}function a6(e,a,x){let t=e||a;return t&&t!=="undefined"?t:x}var e2={};W(e2,{_initializeNewGroup:()=>x6,convertItemToTemplate:()=>J0,createItemFromTemplate:()=>$0,postProcess:()=>q0});function J0(e,a,x){return new Promise(t=>{let n=O2(e);n.item.id=c(n.item.id,n.item.id,".itemId"),z2(e.id,x).then(m=>{n.type="Group",V2(e.id,x).then(i=>{i.id=n.item.id,n.item={...i,type:"Group"},n.dependencies=m.concat(h2(i.tags)),t(n)},()=>t(n))},()=>t(n))})}function $0(e,a,x,t){return new Promise(n=>{if(!t(e.itemId,S.Started,0)){t(e.itemId,S.Ignored,0),n(k(e.type));return}let m=Z(e);m=N(m,a),m.item.thumbnail=e.item.thumbnail;let i=x6(m.item);b7(i.title,i,a,x,R9(m)?a.locationTracking.owner:void 0).then(l=>{if(l.success)if(!t(e.itemId,S.Created,e.estimatedDeploymentCostFactor/2,l.group.id))t(e.itemId,S.Cancelled,0),M1(l.group.id,x).then(()=>n(k(e.type)),()=>n(k(e.type)));else if(m.itemId=l.group.id,a[e.itemId]={itemId:l.group.id},m=N(m,a),a[e.itemId].itemId=l.group.id,!t(e.itemId,S.Finished,e.estimatedDeploymentCostFactor/2,l.group.id))t(e.itemId,S.Cancelled,0),M1(l.group.id,x).then(()=>n(k(e.type)),()=>n(k(e.type)));else if(R9(m)){let d=a.locationTracking.owner;G7(l.group.id,d,x).then(y=>{y.success?t(e.itemId,S.Created,e.estimatedDeploymentCostFactor/2,l.group.id)?M7(l.group.id,[x.username],x).then(o=>{Array.isArray(o.notRemoved)&&o.notRemoved.length===0?t(e.itemId,S.Created,e.estimatedDeploymentCostFactor/2,l.group.id)?n({item:m,id:l.group.id,type:m.type,postProcess:x1(m)}):(t(e.itemId,S.Cancelled,0),M1(l.group.id,x).then(()=>n(k(e.type)),()=>n(k(e.type)))):(t(e.itemId,S.Failed,0),n(k(e.type)))}):(t(e.itemId,S.Cancelled,0),M1(l.group.id,x).then(()=>n(k(e.type)),()=>n(k(e.type)))):(t(e.itemId,S.Failed,0),n(k(e.type)))})}else n({item:m,id:l.group.id,type:m.type,postProcess:x1(m)});else t(e.itemId,S.Failed,0),n(k(e.type))},()=>{t(e.itemId,S.Failed,0),n(k(e.type))})})}function q0(e,a,x,t,n,m,i){let l=Promise.resolve({success:!0});return x.some(d=>{if(d.id===e){let y=d.item.item;return x1(y)&&(y=N(y,m),l=F7(y,i)),!0}}),l}function x6(e){let a={access:"private",description:e.description,owner:e.owner,snippet:e.snippet,tags:e.tags,thumbnail:e.thumbnail,title:e.title||"",typeKeywords:e.typeKeywords};return["autoJoin","displaySettings","isInvitationOnly","isOpenData","isViewOnly","membershipAccess","properties","sortField","sortOrder"].forEach(t=>{e.hasOwnProperty(t)&&(a[t]=e[t])}),a}var h1={};W(h1,{convertItemToTemplate:()=>Y0,createItemFromTemplate:()=>X0,isAPage:()=>e5,postProcess:()=>Q0});function t6(e,a,x,t){return e=f1(e,x,{}),L7(e,{...t,allowList:[]}).then(()=>!0)}function r9(e){let a=z(e);return(e.dependencies||[]).forEach(t=>{let n=new RegExp(t,"g"),m=`{{${t}.itemId}}`;a.item=r1(a.item,n,m),a.data=r1(a.data,n,m),e.properties&&(a.properties=r1(a.properties,n,m))}),a}function S9(e,a,x){let t=K(V,{success:!0}),n=[t({itemId:e.item.id,folderId:a,authentication:x})];return H(e,"item.properties.parentInitiativeId")&&n.push(t({itemId:e.item.properties.parentInitiativeId,folderId:a,authentication:x})),Promise.all(n)}function Y0(e,a,x=null){let t=0,n=0;return Promise.all([I1(e.id,{authentication:a}),n1(a)]).then(([m,i])=>(t=m.item.created,n=m.item.modified,_7(m,i))).then(m=>(m.item.created=t,m.item.modified=n,m.item.typeKeywords=H1(m.item.typeKeywords,"doNotDelete"),m.groups=[],m.estimatedDeploymentCostFactor=2,m.resources=[],H(m,"properties")||(m.properties={}),m=r9(m),m))}function X0(e,a,x,t){if(!t(e.itemId,S.Started,0))return Promise.resolve(k(e.type));if(e.assets&&e.resources&&delete e.assets,a.solutionItemExtent){let y=a.solutionItemExtent.split(",");a.organization.defaultExtentBBox=[[y[0],y[1]],[y[2],y[3]]]}let m={},i,l,d=e.item.thumbnail;return n1(x,a).then(y=>(l=y,V7(e,a,m,l))).then(y=>{let o=y,r={assets:o.assets||[]};return j7(o,r,l)}).then(y=>(i=y,S9(y,a.folderId,x))).then(()=>{let y={item:{id:i.item.id},params:{thumbnail:d},authentication:x};return e1(y)}).then(()=>{if(a[e.itemId]={itemId:i.item.id},t(e.itemId,S.Finished,e.estimatedDeploymentCostFactor||2,i.item.id)){let o={item:{...e,...a1(i)},id:i.item.id,type:e.type,postProcess:!0};return o.item.itemId=i.item.id,o}else return K(B7,{success:!0})(i,l).then(()=>Promise.resolve(k(e.type)))}).catch(y=>{throw t(e.itemId,S.Failed,0),y})}function Q0(e,a,x,t,n,m,i){let l;return n1(i).then(d=>(l=d,I1(e,{authentication:i}))).then(d=>t6(d,x,m,l))}function e5(e){let a=!1;return(e==="Hub Page"||e==="Site Page")&&(a=!0),a}var g1={};W(g1,{convertItemToTemplate:()=>a5,createItemFromTemplate:()=>x5,isASite:()=>n5,postProcess:()=>t5});function n6(e,a,x){let t=a.filter(n=>n.type.indexOf("Page")>-1).map(n=>n.id);return Promise.all(t.map(n=>I1(n,x))).then(n=>e3(e,n,x))}function m6(e,a,x,t){let n=a.filter(d=>d.id!==e.item.id),m=n.map(d=>({item:{id:d.id,type:d.type}})),i=[];i=i.concat(Q7(e,m,t)),i=i.concat(n6(e,n,t));let l=n.map(d=>d.id);return e.item.properties.children=l,e=q7(e,x,{}),i.push(z7(e,{...t,allowList:void 0})),Promise.all(i).then(()=>!0)}function a5(e,a,x=null){let t=0,n=0,m,i,l;return n1(a).then(d=>(l=d,D9(e.id,l))).then(d=>(t=d.item.created,n=d.item.modified,m=d.item.title,i=d.data.values.title,X7(d,l))).then(d=>(d.item.created=t,d.item.modified=n,d.item.title=m,d.item.typeKeywords=H1(d.item.typeKeywords,"doNotDelete"),d.data.values.title=i,d.groups=[],d.estimatedDeploymentCostFactor=2,d.resources=[],u(d,"properties")||(d.properties={}),d.dependencies=E1(d.dependencies),d=r9(d),d))}function x5(e,a,x,t){if(!t(e.itemId,S.Started,0))return Promise.resolve(k(e.type));e.assets&&e.resources&&delete e.assets,a.solution||(a.solution={}),a.solution.title=a.title;let m={},i,l,d=e.item.thumbnail;return n1(x,a).then(y=>(l=y,Y7(e,a,m,l))).then(y=>{let o={assets:y.assets||[]};return $7(y,o,l)}).then(y=>(i=y,S9(y,a.folderId,x))).then(()=>{let y={item:{id:i.item.id},params:{thumbnail:d},authentication:x};return e1(y)}).then(()=>{if(a[e.itemId]={itemId:i.item.id},t(e.itemId,S.Finished,e.estimatedDeploymentCostFactor||2,i.item.id)){let o={item:{...e,...a1(i)},id:i.item.id,type:e.type,postProcess:!0};return o.item.itemId=i.item.id,o}else return K(J7,{success:!0})(i,l).then(()=>Promise.resolve(k(e.type)))}).catch(y=>{throw t(e.itemId,S.Failed,0),y})}function t5(e,a,x,t,n,m,i){let l;return n1(i,m).then(d=>(l=d,D9(e,l))).then(d=>m6(d,x,m,l)).then(()=>Promise.resolve(!0))}function n5(e){let a=!1;return(e==="Hub Site Application"||e==="Site Application")&&(a=!0),a}var E9={};W(E9,{convertItemToTemplate:()=>l5,createItemFromTemplate:()=>d5,isAStoryMap:()=>y5});function i6(e={}){let a=0;return Object.keys(e).reduce((x,t)=>(H(e,`${t}.type`)==="webmap"&&t!==`webmap${a}`&&(x.push({original:t,updated:`webmap${a}`}),a++),x),[])}function l6(e){let a=H(e,"data.resources")||{};return Object.keys(a).reduce((x,t)=>(H(a,`${t}.type`)==="webmap"&&x.push(H(a,`${t}.data.itemId`)),x),[])}function y6(e){let a=Y1(e.item.id,e.item.type);a.key=`${L1(e.item.title)}_${v1("i")}`;let x=z(e);a.data=x.data;let t=x.item.created,n=x.item.modified;return a.item=_1(x.item),a.item.created=t,a.item.modified=n,a.item.url="{{storyMapTemplateUrl}}",i6(a.data.resources).forEach(l=>{a.data.resources[l.updated]=z(a.data.resources[l.original]),delete a.data.resources[l.original],a.data.nodes=r1(a.data.nodes,l.original,l.updated)}),a.item.typeKeywords.indexOf(d6)!==-1&&(a.item.typeKeywords=[m5].concat(a.item.typeKeywords.filter(l=>l!==d6))),a.properties={},a.properties.draftFileName="draft_{{timestamp}}.json",Object.assign(a.properties,i5),a.dependencies=l6(e),Promise.resolve(a)}var d6="smstatusunpublishedchanges",m5="smstatuspublished",i5={oembed:{version:"1.0",type:"rich",title:"Example StoryMap",url:"{{storyMapTemplateUrl}}",provider_name:"ArcGIS StoryMaps",provider_url:"{{storyMapBaseUrl}}",width:800,height:600,thumbnail_url:"{{storyMapThumbnailUrl}}",thumbnail_height:"100.5",thumbnail_width:"400",html:'<iframe src="{{storyMapTemplateUrl}}" width="800" height="600" scrolling="yes" frameborder="0" allowfullscreen></iframe>',cache_age:86400},oembedXML:`<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
|
3
3
|
<oembed>
|
|
4
4
|
<version>1.0</version>
|
|
5
5
|
<type>rich</type>
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import f from"./
|
|
2
|
+
import f from"./NPYWZIAM.js";import e from"./P2TNN5UL.js";import"./7NAC32PQ.js";import"./VVZAS55G.js";import"./CVHXDPJO.js";import d from"./XC3IZAIH.js";import c from"./EXC566PM.js";import"./2B4SGB3I.js";import"./I2NTSKBD.js";import"./3UKDJZ2D.js";import"./US5FON7D.js";import b from"./2C4DK6YC.js";import a from"./WV7QX3ED.js";import"./MGEDATQ7.js";import"./RMEDO4JC.js";import"./ISFTCFSJ.js";import"./TEHBW75B.js";import"./IHG7KTNC.js";import"./ZCU2WWVN.js";import"./WGO4EVOV.js";import"./YKB6256M.js";import"./N22MFQSQ.js";import"./N7BXCDA3.js";import"./ZX3UHK6P.js";import"./Z4F2NZOT.js";import"./KOIDWEP3.js";import"./3KXMYZCU.js";import"./LP2JYX4X.js";import"./GF4QELNV.js";import"./AYSQIO6L.js";import"./YQHYMLC7.js";import"./DKD2EGQP.js";import"./5O53T3SW.js";import"./AJZDBHB6.js";import"./FES7B3SJ.js";import"./2I5LGZNX.js";import"./FFF5HUPM.js";import"./QPIMTXPL.js";export default $arcgis.t(([,,,,,a])=>{return a},a,b,c,d,e,f)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a as t}from"./CVHXDPJO.js";import{u as e}from"./FFF5HUPM.js";var o=e(t,{"instant-apps-app-error":[()=>import("./ZTRQVOAR.js"),"_messages:;clearErrorMessage"],"instant-apps-app-guide":[()=>import("./JXTZNXTZ.js"),"_messages:,data:,header"],"instant-apps-buffer":[()=>import("./ZWKTEPK3.js").then(m=>m.default.then(e=>({InstantAppsBuffer:e}))),"_messages:,bufferColor:,bufferDistance,bufferGraphicSymbol:,bufferInputStep,bufferLayer:,bufferMaxDistance,bufferMinDistance,bufferOutlineColor:,bufferOutlineWidth,bufferStyle,bufferUnit,distanceValuesSorted:,elevationInfoMode,geodesicBufferEnabled,inputGraphics:,inputMethod,open,readyToBuffer,sources:,view:;clearBufferLayer,close,setFocus"],"instant-apps-buffer-distance-manager":[()=>import("./6IBUETLU.js"),"addButtonLabel,bufferDistance,bufferInputStep,bufferMaxDistance,bufferMinDistance,distanceValuesSorted:,inputNumberLabel,removeValueLabel"],"instant-apps-buffer-input-radiogroup":[()=>import("./CUOHPTI7.js"),"disabled,labels:,selectedValue"],"instant-apps-compass":[()=>import("./UQN2JCKP.js").then(m=>m.default.then(e=>({InstantAppsCompass:e}))),"_messages:,view:"],"instant-apps-control-panel":[()=>import("./SHEPQVUX.js").then(m=>m.default.then(e=>({InstantAppsControlPanel:e}))),"components:,view:"],"instant-apps-create":[()=>import("./JMYENPUQ.js").then(m=>m.default.then(e=>({InstantAppsCreate:e}))),"_messages:,content:,mode,options:,popoverIcon,popoverPlacement,popoverPositioning,portal:,showHeader"],"instant-apps-export":[()=>import("./DDJSF2M3.js").then(m=>m.default.then(e=>({InstantAppsExport:e}))),"_messages:,allowedFileTypes:,beforeExport:,cloneExtraContent,defaultFileType,extraContent:,extraContentLabel,headerTitle,includeExtraContent,includeFileFormat,includeLegend,includeMap,includePopup,logoAltText,logoImage,mapAltText,maskBackground,maskBorder,mode,output:,popoverIcon,popoverPlacement,popoverPositioning,scale,showExtraContentInImg,showHeaderTitle,showIncludeLegend,showIncludeMap,showIncludePopup,showScaleBar,view:"],"instant-apps-export-views":[()=>import("./
|
|
2
|
+
import{a as t}from"./CVHXDPJO.js";import{u as e}from"./FFF5HUPM.js";var o=e(t,{"instant-apps-app-error":[()=>import("./ZTRQVOAR.js"),"_messages:;clearErrorMessage"],"instant-apps-app-guide":[()=>import("./JXTZNXTZ.js"),"_messages:,data:,header"],"instant-apps-buffer":[()=>import("./ZWKTEPK3.js").then(m=>m.default.then(e=>({InstantAppsBuffer:e}))),"_messages:,bufferColor:,bufferDistance,bufferGraphicSymbol:,bufferInputStep,bufferLayer:,bufferMaxDistance,bufferMinDistance,bufferOutlineColor:,bufferOutlineWidth,bufferStyle,bufferUnit,distanceValuesSorted:,elevationInfoMode,geodesicBufferEnabled,inputGraphics:,inputMethod,open,readyToBuffer,sources:,view:;clearBufferLayer,close,setFocus"],"instant-apps-buffer-distance-manager":[()=>import("./6IBUETLU.js"),"addButtonLabel,bufferDistance,bufferInputStep,bufferMaxDistance,bufferMinDistance,distanceValuesSorted:,inputNumberLabel,removeValueLabel"],"instant-apps-buffer-input-radiogroup":[()=>import("./CUOHPTI7.js"),"disabled,labels:,selectedValue"],"instant-apps-compass":[()=>import("./UQN2JCKP.js").then(m=>m.default.then(e=>({InstantAppsCompass:e}))),"_messages:,view:"],"instant-apps-control-panel":[()=>import("./SHEPQVUX.js").then(m=>m.default.then(e=>({InstantAppsControlPanel:e}))),"components:,view:"],"instant-apps-create":[()=>import("./JMYENPUQ.js").then(m=>m.default.then(e=>({InstantAppsCreate:e}))),"_messages:,content:,mode,options:,popoverIcon,popoverPlacement,popoverPositioning,portal:,showHeader"],"instant-apps-export":[()=>import("./DDJSF2M3.js").then(m=>m.default.then(e=>({InstantAppsExport:e}))),"_messages:,allowedFileTypes:,beforeExport:,cloneExtraContent,defaultFileType,extraContent:,extraContentLabel,headerTitle,includeExtraContent,includeFileFormat,includeLegend,includeMap,includePopup,logoAltText,logoImage,mapAltText,maskBackground,maskBorder,mode,output:,popoverIcon,popoverPlacement,popoverPositioning,scale,showExtraContentInImg,showHeaderTitle,showIncludeLegend,showIncludeMap,showIncludePopup,showScaleBar,view:"],"instant-apps-export-views":[()=>import("./ZIX74MNU.js").then(m=>m.default.then(e=>({InstantAppsExportViews:e}))),"_messages:,beforeExport:,exportViews:,includeHeader,includeLegend,includeMap,includePopup,mode,output:,popoverIcon,popoverPlacement,popoverPositioning,scale,showIncludeHeader,showIncludeLegend,showIncludeMap,showIncludePopup,showScaleBar"],"instant-apps-filter-list":[()=>import("./KGSB4I6Y.js").then(m=>m.default.then(e=>({InstantAppsFilterList:e}))),"_messages:,autoUpdateUrl,closeBtn,closeBtnOnClick:,closeBtnText,comboboxOverlayPositioning,extentSelector,extentSelectorConfig:,filterCount,layerExpressions:,openFilters,resetBtn,resetFiltersOnDisconnect,urlParams:,view:,zoomBtn;forceReset,getCurrentLayerExpressions,getFilterInitState,handleUpdatingT9nData,updateInitDefExpressions"],"instant-apps-header":[()=>import("./BZLMMSFW.js"),"backgroundColor,customHeaderCss,customHeaderHtml,fontFamily,headerAlignment,infoButton,infoIsOpen,infoTitleText,logoImage,logoImageAltText,logoLink,logoScale,mobileWidthBreakpoint,textColor,titleText,titleTextLink;toggleInfo"],"instant-apps-interactive-legend":[()=>import("./Y7F2QFO6.js").then(m=>m.default.then(e=>({InstantAppsInteractiveLegend:e}))),"_messages:,compact,featureCount,filterMode:,view:,zoomTo"],"instant-apps-interactive-legend-classic":[()=>import("./UQDRAXO2.js").then(m=>m.default.then(e=>({InstantAppsInteractiveLegendClassic:e}))),"featureCount,filterMode:,legendvm:,messages:,zoomTo"],"instant-apps-interactive-legend-count":[()=>import("./4RU3GWUU.js").then(m=>m.default.then(e=>({InstantAppsInteractiveLegendCount:e}))),"_messages:,activeLayerInfo:,categoryId,infoIndex,legendElement:,legendvm:,selected,showTotal"],"instant-apps-interactive-legend-group-legend-element":[()=>import("./BBECVTV3.js").then(m=>m.default.then(e=>({InstantAppsInteractiveLegendGroupLegendElement:e}))),"activeLayerInfo:,featureCount,isChild,legendvm:"],"instant-apps-interactive-legend-group-legend-element-caption":[()=>import("./WW6SEFWM.js").then(m=>m.default.then(e=>({InstantAppsInteractiveLegendGroupLegendElementCaption:e}))),"_messages:,activeLayerInfo:,expanded,featureCount,isChild,legendvm:"],"instant-apps-interactive-legend-layer-element":[()=>import("./APL6U736.js").then(m=>m.default.then(e=>({InstantAppsInteractiveLegendLayerElement:e}))),"activeLayerInfo:,featureCount,isChild,legendvm:"],"instant-apps-interactive-legend-layer-element-caption":[()=>import("./SWM5KEF6.js").then(m=>m.default.then(e=>({InstantAppsInteractiveLegendLayerElementCaption:e}))),"_messages:,activeLayerInfo:,expanded,featureCount,isChild,legendvm:"],"instant-apps-interactive-legend-legend-element":[()=>import("./YCJJWOTP.js").then(m=>m.default.then(e=>({InstantAppsInteractiveLegendLegendElement:e}))),"activeLayerInfo:,isChild,isColorRamp,isInteractive,isRelationshipRamp,isSizeRamp,legendElement:,legendElementIndex,legendvm:,titleText,zoomTo"],"instant-apps-interactive-legend-legend-element-caption":[()=>import("./XDF5MAGN.js").then(m=>m.default.then(e=>({InstantAppsInteractiveLegendLegendElementCaption:e}))),"_messages:,activeLayerInfo:,expanded,isInteractive,layer:,legendElement:,legendElementIndex,legendvm:,titleText,zoomTo"],"instant-apps-interactive-legend-relationship":[()=>import("./JGMNZLH4.js").then(m=>m.default.then(e=>({InstantAppsInteractiveLegendRelationship:e}))),"_messages:,activeLayerInfo:,filterMode:,legendElement:"],"instant-apps-keyboard-shortcuts":[()=>import("./7CAFUU5D.js"),"_messages:,view:"],"instant-apps-landing-page":[()=>import("./WI67R264.js"),"alignment,backgroundImageSrc,descriptionText,disableTransition,enableSignIn,entryButtonScale,entryButtonText,fontFamily,iconImage,iconImageAltText,iconImageScale,oauthappid,open,portal:,subtitleText,titleText"],"instant-apps-language-switcher":[()=>import("./QEPO225M.js").then(m=>m.default.then(e=>({InstantAppsLanguageSwitcher:e}))),"calciteDropdownOverlayPositioning,defaultLocale,icon,locales:,portalItem:,selectedLanguage,view:;refresh"],"instant-apps-language-translator":[()=>import("./MOH6GREK.js").then(m=>m.default.then(e=>({InstantAppsLanguageTranslator:e}))),"_messages:,appSettings:,locales:,open,portalItem:,translatedLocaleInputOnChangeCallback:,userLocaleInputOnChangeCallback:;batchWriteToPortalItemResource,getPortalItemResource,getTranslationData,setTranslationData"],"instant-apps-ckeditor-wrapper":[()=>import("./DVWIWECZ.js"),"config:,editorInstance:,value"],"instant-apps-language-translator-content":[()=>import("./GCEPKR7I.js").then(m=>m.default.then(e=>({InstantAppsLanguageTranslatorContent:e}))),"_messages:"],"instant-apps-language-translator-item":[()=>import("./6ZN2VAXG.js").then(m=>m.default.then(e=>({InstantAppsLanguageTranslatorItem:e}))),"fieldName,setting:,translatedLanguageLabels:,translatedLocaleInputOnChangeCallback:,userLocaleInputOnChangeCallback:"],"instant-apps-language-translator-search":[()=>import("./WZCJ2VDD.js").then(m=>m.default.then(e=>({InstantAppsLanguageTranslatorSearch:e}))),"t9nPlaceholder"],"instant-apps-measurement":[()=>import("./NKX2EIDR.js"),"_messages:,activeToolType,areaUnit,closable,coordinateFormat,linearUnit,showHeading,view:"],"instant-apps-measurement-tool":[()=>import("./YXHO47AZ.js").then(m=>m.default.then(e=>({InstantAppsMeasurementTool:e}))),"activeTool,measureConfiguration:,view:"],"instant-apps-popover":[()=>import("./YM2IDMZO.js"),"_messages:,content,disableAction,imgAlt,imgSrc,index,mediaSrc,messageOverrides:,pagination,parent:,placement,popoverAction:,popoverTitle,referenceElement,refId,subtitle"],"instant-apps-popovers":[()=>import("./JYUZPAPI.js"),"beforeOpen:,currentId,instantAppsPopovers:,inTour;beginTour,close,done,endTour,next,open,previous"],"instant-apps-scoreboard":[()=>import("./UM3P3Q52.js").then(m=>m.default.then(e=>({InstantAppsScoreboard:e}))),"_messages:,autoDockEnabled,geometry:,itemLimit,items:,mode,position,queryType,view:"],"instant-apps-selection-toolbar":[()=>import("./F2V6IA23.js").then(m=>m.default.then(e=>({InstantAppsSelectionToolbar:e}))),"_messages:,continuousSelectionEnabled,disabled,enabledTool,readyToSelect,selectedCount:,selectionManager:,selectionToolbarViewModel:,sources:,view:;getSelectedFeatures;clearSelection"],"instant-apps-sign-in":[()=>import("./SZRVESYE.js").then(m=>m.default.then(e=>({InstantAppsSignIn:e}))),"_messages:,closeLandingPage:,landingPage,oauthappid,openInPopup,portal:,showIndicator,signInPopoverItems:,type"],"instant-apps-social-share":[()=>import("./TDH6R4JP.js").then(m=>m.default.then(e=>({InstantAppsSocialShare:e}))),"_messages:,autoUpdateShareUrl,defaultUrlParams:,displayTipText,embed,flipRtl,iframeInnerText,inlineSuccessPopoverPlacement,isNativeShareEnabled,mode,popoverButtonIconScale,popoverPositioning,removePopoverOffset,scale,shareButtonColor,shareButtonScale,shareButtonType,shareIconsLayout,shareText,shareUrl,shortenShareUrl,socialMedia,successMessage,useNativeShare,view:"],"instant-apps-splash":[()=>import("./3ZYEIYTY.js"),"_messages:,closeBehavior,closeButtonDisabled,confirmationText,content,isConfirmed:,localStorageKey,open,outsideCloseDisabled,primaryButtonText,secondaryButton,secondaryButtonCallback:,secondaryButtonIcon,secondaryButtonText,titleText"],"instant-apps-time-filter":[()=>import("./DUXRJBCP.js").then(m=>m.default.then(e=>({InstantAppsTimeFilter:e}))),"_messages:,autoPlay,filterMode:,timeInfoConfigItems:,timeSliderConfig:,view:"]});export{o as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import e from"./
|
|
2
|
+
import e from"./OYBEDO63.js";import d from"./B33EUN4X.js";import"./FILMKUOU.js";import c from"./7J2F4TFI.js";import"./BNRFT546.js";import"./ONARC6AZ.js";import"./WPGT2HLS.js";import b from"./XC3IZAIH.js";import a from"./EXC566PM.js";import"./2B4SGB3I.js";import"./I2NTSKBD.js";import"./3UKDJZ2D.js";import"./MGEDATQ7.js";import"./RMEDO4JC.js";import"./ISFTCFSJ.js";import"./TEHBW75B.js";import"./IHG7KTNC.js";import"./ZCU2WWVN.js";import"./WGO4EVOV.js";import"./YKB6256M.js";import"./N22MFQSQ.js";import"./N7BXCDA3.js";import"./ZX3UHK6P.js";import"./Z4F2NZOT.js";import"./KOIDWEP3.js";import"./3KXMYZCU.js";import"./LP2JYX4X.js";import"./GF4QELNV.js";import"./AYSQIO6L.js";import"./YQHYMLC7.js";import"./DKD2EGQP.js";import"./5O53T3SW.js";import"./AJZDBHB6.js";import"./FES7B3SJ.js";import"./2I5LGZNX.js";import"./FFF5HUPM.js";import"./QPIMTXPL.js";export default $arcgis.t(([,,,,a])=>{return a},a,b,c,d,e)
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import{ka as c,ob as p}from"./3UKDJZ2D.js";import{u as d}from"./AYSQIO6L.js";var V=250,g=new Set(["add","all","alter","and","any","as","asc","backup","between","by","case","check","column","constraint","create","database","date","default","delete","desc","distinct","drop","exec","exists","foreign","from","full","group","having","in","index","inner","insert","into","is","join","key","left","like","limit","not","null","on","or","order","outer","primary","procedure","right","rownum","select","set","table","top","truncate","union","unique","update","values","view","where"]),w=new Set(["objectid","globalid","created_date","created_user","last_edited_date","last_edited_user","fid","shape","shape_length","shape_area"]),x=/[\u{1F600}-\u{1F64F}\u{1F300}-\u{1F5FF}\u{1F680}-\u{1F6FF}\u{1F1E0}-\u{1F1FF}\u{2600}-\u{26FF}\u{2700}-\u{27BF}\u{1F900}-\u{1F9FF}\u{1F018}-\u{1F270}\u{238C}-\u{2454}\u{20D0}-\u{20FF}\u{FE0F}]/u;function l(e){return!e||e.trim().length===0}function s(e){return e.length>V}function n(e,r){return x.test(e)?!0:r==="item"?/[><~`$^+=|\\]/u.test(e):/[/<>\\]/u.test(e)}async function b(e,r){let t=r,a=await t.getUsername(),y={q:new d().match(e).in("title").and().match(a).in("owner"),filter:"type:Solution",authentication:t},h=(await p(y)).results.map(i=>i.title),{folders:m}=await c(t),f=m.map(i=>i.title),o=[...h,...f].map(i=>i.trim().toLowerCase()),u=e.toLowerCase(),F=o.filter(i=>i===u),T=o.filter(i=>i.startsWith(u));return{conflictingNames:F,similiarNames:T}}async function C(e,r,t=!1){return l(e)?{isValid:!1,errorType:"empty"}:s(e)?{isValid:!1,errorType:"exceed-length"}:n(e,"folder")||n(e,"item")?{isValid:!1,errorType:"special-character"}:!t&&r&&(await b(e.trim(),r)).conflictingNames.length>0?{isValid:!1,errorType:"not-unique"}:{isValid:!0,errorType:null}}function v(e){return l(e)?{isValid:!1,errorType:"empty"}:s(e)?{isValid:!1,errorType:"exceed-length"}:n(e,"item")?{isValid:!1,errorType:"special-character"}:{isValid:!0,errorType:null}}function L(e,r,t=!1){if(e.length>r)return{isValid:!1,errorType:"exceed-length"};let a=[];return e.includes("<")&&a.push("<"),e.includes(">")&&a.push(">"),!t&&e.includes("/")&&a.push("/"),a.length>0?{isValid:!1,errorType:"special-character"}:{isValid:!0,errorType:null}}function k(e){return l(e)?{isValid:!1,errorType:"empty"}:s(e)?{isValid:!1,errorType:"exceed-length"}:{isValid:!0,errorType:null}}function S(e,r=[]){return l(e)?{isValid:!1,errorType:"empty"}:/^[a-zA-Z][a-zA-Z0-9_]*$/.test(e)?e.length>31?{isValid:!1,errorType:"exceed-length"}:g.has(e.toLowerCase())?{isValid:!1,errorType:"sql-keyword"}:w.has(e.toLowerCase())?{isValid:!1,errorType:"system-field"}:r.includes(e.toLowerCase())?{isValid:!1,errorType:"duplicate-field"}:{isValid:!0,errorType:null}:{isValid:!1,errorType:"invalid-format"}}function q(e){return e<1||e>4e3?{isValid:!1,errorType:"out-of-range"}:{isValid:!0,errorType:null}}function A(e,r,t=!1){return t?{isValid:!0,errorType:null}:e.trim().length===0?{isValid:!1,errorType:"empty"}:e.length>r?{isValid:!1,errorType:"exceed-length"}:{isValid:!0,errorType:null}}export{b as a,C as b,v as c,L as d,k as e,S as f,q as g,A as h};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a as S}from"./6SSQ6MIC.js";import"./CVHXDPJO.js";import d from"./XC3IZAIH.js";import c from"./EXC566PM.js";import"./2B4SGB3I.js";import"./I2NTSKBD.js";import"./3UKDJZ2D.js";import b from"./2C4DK6YC.js";import a from"./WV7QX3ED.js";import{a as $}from"./MGEDATQ7.js";import"./RMEDO4JC.js";import"./ISFTCFSJ.js";import"./TEHBW75B.js";import"./IHG7KTNC.js";import"./ZCU2WWVN.js";import"./WGO4EVOV.js";import"./YKB6256M.js";import"./N22MFQSQ.js";import"./N7BXCDA3.js";import"./ZX3UHK6P.js";import"./Z4F2NZOT.js";import"./KOIDWEP3.js";import"./3KXMYZCU.js";import"./LP2JYX4X.js";import"./GF4QELNV.js";import"./AYSQIO6L.js";import"./YQHYMLC7.js";import"./DKD2EGQP.js";import"./5O53T3SW.js";import"./AJZDBHB6.js";import"./FES7B3SJ.js";import{b as v}from"./2I5LGZNX.js";import{E as p,F as h,G as I,I as f,h as y,i as l,l as m,q as r,t as g}from"./FFF5HUPM.js";import"./QPIMTXPL.js";export default $arcgis.t(([F,,k,,{c:w,j:M},{m:L},{i:u}])=>{function C(n){return n?.indexOf("http://")!==-1}function b(n){return C(n)?n.replace(/^http:\/\//,"https://"):n}function T(n,e,i){return i&&i.forEach(a=>{n.allLayers.forEach(t=>{t&&t.url===a.sourceUrl&&(t.url=b(a.proxyUrl),t.portalItem&&t.portalItem.when(()=>{t.portalItem.url=b(a.proxyUrl)}),e.request?.interceptors?.push({urls:a.sourceUrl,before:s=>{s.url&&s.url===a.sourceUrl&&(s.url=b(a.proxyUrl))}}))})}),n}var P=y`@layer{:host{display:block;--calcite-label-margin-bottom: 0;--calcite-block-padding: 0}.map-height{height:calc(100% - 53px)}.height-full{height:100%}.height-49-px{height:49px}.box-shadow{box-shadow:none!important}.visibility-hidden-1{visibility:hidden;height:1px}.hidden{visibility:hidden!important}.display-flex{display:flex}.display-none{display:none}.display-block{display:block}.absolute-right{position:absolute;right:0;left:unset}.esri-ui-inner-container.esri-ui-corner-container{direction:ltr}html[dir=rtl] .absolute-right{left:0;right:unset}.panel-header-override{--calcite-panel-header-content-space: 0px;--calcite-internal-panel-action-spacing: 0px !important}@media only screen and (max-width:1024px){.esri-zoom{display:none!important}}calcite-action-bar{--calcite-internal-action-bar-gap: 0px;--calcite-internal-action-bar-padding: 0px}}`,_=class extends I{constructor(){super(),this.defaultWebmapId="",this.defaultLayerId="",this.enableHome=!1,this.enableLegend=!1,this.enableLayerList=!0,this.enableFloorFilter=!1,this.enableFullscreen=!1,this.enableShare=!1,this.enableMapLayerPicker=!1,this.enableMapPicker=!1,this.enableSingleExpand=!1,this.enableSearch=!1,this.enableBasemap=!1,this.featureSelectionMode="multiple",this.hide=!1,this.zoomToolsSize="m",this.mapInfos=[],this.mapWidgetsIndex=0,this.mapWidgetsPosition="top-leading",this.mobileMapWidgetsPosition="top-right",this.mapWidgetsSize="m",this.stackTools=!1,this.mapToolsOrder=[],this.mobileToolsOrder=[],this.isMapLayout=!1,this.shareIncludeEmbed=!1,this.shareIncludeSocial=!1,this.selectedFeaturesIds=[],this.showOnlyUpdatableLayers=!1,this.isMobile=!1,this.enableSelectionTool=!1,this.visibilityIcon="eyeball",this.pasteEnabled=!1,this.mapComponentId="arcgis-map",this.showCopyPasteActions=!1,this._configLayerOrderDefined=!1,this._translations=$({name:"map-card",blocking:!0}),this._toolInfos=[],this._filterActive=!1,this._layerIds=[],this._enabledLayerIds=[],this._defaultWebmapHonored=!1,this._loadedId="",this._mapDiv=p(),this._mapComponent=p(),this._mapPicker=p(),this._mapTools=p(),this._mobMapTools=p(),this._mapLayerPicker=p(),this._selectedWebMapId="",this._isValidWebMap=!0,this.mapChanged=r(),this.beforeMapChanged=r(),this.toggleFilter=r(),this.clearSelection=r(),this.copyFeatures=r(),this.pasteFeatures=r(),this.editMultipleFeatures=r(),this.featuresCopied=r(),this.listenOn(window,"mapInfoChange",this.mapInfoChange),this.listenOn(window,"noLayersFound",this.noLayersFound),this.listenOn(window,"layerSelectionChange",this.layerSelectionChange),this.listenOn(window,"idsFound",this._idsFound),this.enableSingleExpand=!0,this.stackTools=!0,S(window)}static{this.properties={appLayout:1,appProxies:1,defaultWebmapId:1,defaultLayerId:1,enableHome:5,enableLegend:5,enableLayerList:5,enableFloorFilter:5,enableFullscreen:5,enableShare:5,enableMapLayerPicker:5,enableMapPicker:5,enableSingleExpand:5,enableSearch:5,enableBasemap:5,featureSelectionMode:1,basemapConfig:0,hide:5,zoomToolsSize:1,mapInfos:0,mapWidgetsIndex:9,mapWidgetsPosition:1,mobileMapWidgetsPosition:1,mapWidgetsSize:1,mapView:0,stackTools:5,theme:1,mapToolsOrder:0,mobileToolsOrder:0,isMapLayout:5,shareIncludeEmbed:5,shareIncludeSocial:5,selectedFeaturesIds:0,selectedLayer:0,zoomToScale:9,showOnlyUpdatableLayers:5,isMobile:5,mapInfo:0,enableSelectionTool:5,visibilityIcon:1,pasteEnabled:5,mapComponentId:1,showCopyPasteActions:5,_configLayerOrderDefined:16,_translations:16,_searchConfiguration:16,_webMapInfo:16,_toolInfos:16,_filterActive:16,_mapDivHeight:16,_mapDivWidth:16,_layerIds:16}}static{this.styles=P}static{this.shadowRootOptions=g}willUpdate(e){if(e.has("appLayout")&&this.appLayoutWatchHandler(),e.has("mapView")&&this.mapViewWatchHandler(),e.has("mapInfo")&&this.mapInfoWatchHandler(),e.has("selectedFeaturesIds")&&this.selectedFeaturesIdsWatchHandler(),e.has("pasteEnabled")&&this.hasUpdated){let i=this._toolInfos.find(a=>a.icon==="paste-with-attribute");i&&(i.disabled=!this.pasteEnabled)}}appLayoutWatchHandler(){this._updateShareUrl()}async mapInfoWatchHandler(){this._configLayerOrderDefined="configLayerOrder"in(this.mapInfo?.layerOptions||{}),this._enabledLayerIds=L(this.mapInfo?.layerOptions?.layers||[],this.mapInfo?.layerOptions?.configLayerOrder)}async mapViewWatchHandler(){this.mapView&&this._updateShareUrl()}async selectedFeaturesIdsWatchHandler(){this._updateShareUrl(),this._validateEnabledActions()}async resetFilter(){this._filterActive=!1,this._updateShareUrl()}async updateFilterState(e){this._filterActive=e,this._updateShareUrl()}async updateLayer(){this._mapLayerPicker.value&&this._mapLayerPicker.value.updateLayer()}async mapInfoChange(e){this._selectedWebMapId=e.detail.id,await this._loadMap(e.detail)}noLayersFound(){this.selectedLayer=void 0,this.selectedFeaturesIds=[]}layerSelectionChange(){setTimeout(()=>{this._initToolInfos()},50)}_idsFound(e){this._layerIds=e.detail}async load(){this._initToolInfos(),this._mapSizeObserver||(this._mapSizeObserver=new ResizeObserver(()=>{this._mapDivWidth&&this._mapDiv.value&&(this._mapDivWidth=this._mapDiv.value.offsetWidth)}))}render(){let e=this.hide?"visibility-hidden-1":"",i=this.theme==="dark"?"calcite-mode-dark":"calcite-mode-light",a="height-full",t=this.isMapLayout?"":"display-none",s=this._isValidWebMap?"":"hidden",d=this.isMobile?"":"hidden",o=this.enableMapPicker&&this.mapInfos.length>1,c=this.enableMapLayerPicker&&this._layerIds.length>1;return this._handleMapVisibility(),this._validateActiveActions(),l`<calcite-panel class="height-full width-full panel-header-override">${this._getMapLayerPicker()}${this._getHeaderActions()}<div slot=header-actions-end>${this.enableShare&&this.isMapLayout?this._getShare("share"):void 0}</div><calcite-progress class=${f(t)} value=0></calcite-progress><div class=${`${e} ${a}`}><div class="height-full" ${h(this._mapDiv)}><arcgis-map id=${this.mapComponentId??m} class="height-full" ${h(this._mapComponent)}></arcgis-map></div></div>${l`<map-tools style=${`visibility: ${s}`} .basemapConfig=${this.basemapConfig} class=${`box-shadow ${i} ${s}`} .configLayerOrderDefined=${this._configLayerOrderDefined} .defaultLayerId=${this.defaultLayerId} .enableBasemap=${this.enableBasemap} .enableFloorFilter=${this.enableFloorFilter} .enableFullscreen=${this.enableFullscreen} .enableHome=${this.enableHome} .enableLegend=${this.enableLegend} .enableLayerList=${this.enableLayerList} .enableSearch=${this.enableSearch} .enableSingleExpand=${this.enableSingleExpand} .enableSelectionTool=${this.enableSelectionTool} .isMobile=${this.isMobile} .parentComponentHeight=${this._mapDivHeight} .parentComponentWidth=${this._mapDivWidth} .zoomToolsSize=${this.zoomToolsSize} layout=horizontal .mapView=${this.mapView} .mapWidgetsSize=${this.mapWidgetsSize} .position=${this.mapWidgetsPosition} .selectedFeaturesIds=${this.selectedFeaturesIds} .selectedLayer=${this.selectedLayer} .searchConfiguration=${this._searchConfiguration} .stackTools=${this.stackTools} .toolOrder=${this.mapToolsOrder} .visibilityIcon=${this.visibilityIcon} ${h(this._mapTools)}></map-tools><map-tools style=${`visibility: ${d}`} class=${`box-shadow ${i} ${d}`} .configLayerOrderDefined=${this._configLayerOrderDefined} .defaultLayerId=${this.defaultLayerId} .enabledLayerIds=${this._enabledLayerIds} .enableMapLayerPicker=${c} .enableMapPicker=${o} .isMobile=${this.isMobile} .zoomToolsSize=${this.zoomToolsSize} layout=vertical .mapInfos=${this.mapInfos} .mapView=${this.mapView} .mapWidgetsSize=${this.mapWidgetsSize} .parentComponentHeight=${this._mapDivHeight} .position=${this.mobileMapWidgetsPosition} .selectedLayer=${this.selectedLayer} .selectedWebMapId=${this._selectedWebMapId} .showOnlyUpdatableLayers=${this.showOnlyUpdatableLayers} .stackTools=${this.stackTools} .toolOrder=${this.mobileToolsOrder} ${h(this._mobMapTools)}></map-tools>`}</calcite-panel>`}updated(){this._mapDivHeight=this._mapDiv.value?.offsetHeight??0,document.onclick=e=>this._handleDocumentClick(e)}loaded(){this._mapDiv.value&&this._mapSizeObserver?.observe(this._mapDiv.value),this._updateShareUrl()}async _loadMap(e){let i=!this._defaultWebmapHonored&&this.defaultWebmapId,a=this.mapInfos?.filter(o=>o.id===this.defaultWebmapId),t=JSON.stringify(e)!==JSON.stringify(this._webMapInfo);this._webMapInfo=i&&a?a[0]:!e?.id&&this.mapInfos.length>0?this.mapInfos[0]:e;let s=this._webMapInfo.id,d=i&&e?.id===this.defaultWebmapId;if(this._loadedId!==s&&!i||d){let o=new k({portalItem:{id:s}});try{if(o&&await o.load(),this.appProxies&&o&&await T(o,F,this.appProxies),this._mapComponent.value||await this.updateComplete,!this._mapComponent.value)throw new Error("Map component is not available.");this._mapComponent.value.map=o,this._mapComponent.value.resizeAlign="center",await this._mapComponent.value.viewOnReady(),this.mapView=this._mapComponent.value.view,this._loadedId=s,this._searchConfiguration=this._webMapInfo.searchConfiguration,this.beforeMapChanged.emit(),this.mapView&&await this.mapView.when(()=>{this.mapView&&(this._mapDivWidth=this._mapDiv.value&&this._mapDiv.value.offsetWidth,this._mapTools.value&&this.mapView.ui.add(this._mapTools.value,{position:this.mapWidgetsPosition,index:this.mapWidgetsIndex}),this._mobMapTools.value&&this.mapView.ui.add(this._mobMapTools.value,{position:this.mobileMapWidgetsPosition,index:this.mapWidgetsIndex}),this._defaultWebmapHonored=d?!0:this._defaultWebmapHonored,this._isValidWebMap=!0,this.mapChanged.emit({id:s,mapView:this.mapView,isValid:!0}),this.isMobile||document.getElementsByClassName("esri-zoom")[0]?.classList.remove("display-none"))})}catch(c){console.error(c),this._loadedId=s,this._isValidWebMap=!1,this.mapChanged.emit({id:s,mapView:void 0,isValid:!1}),document.getElementsByClassName("esri-zoom")[0]?.classList.add("display-none");return}}else i?(this._defaultWebmapHonored=!0,this._mapPicker.value&&this._mapPicker.value.setMapByID(s)):t&&this.mapView&&(this._searchConfiguration=this._webMapInfo.searchConfiguration,this.beforeMapChanged.emit(),this.mapChanged.emit({id:s,mapView:this.mapView,isValid:!0}));this._updateShareUrl()}_getMapLayerPicker(){let e=this.isMapLayout?"header-actions-start":"",i=this.mapInfos?.length>1?"":"display-none",a=this.isMapLayout?"height-0":"width-full",t="display-flex",s=this.isMapLayout?"":"display-none";return l`${!this.isMobile&&l`<div slot=${e??m}><map-picker class=${`${i} ${a}`} id=map-picker .isMapLayout=${this.isMapLayout} .mapInfos=${this.mapInfos} .selectedWebMapId=${this._selectedWebMapId} ${h(this._mapPicker)}></map-picker></div>`||""}<div slot=header-actions-start class=${`mapView-header display-flex ${s}`} id=solutions-map-layer-picker-container><div class=${`border-end ${t}`}>${this.mapView&&l`<map-layer-picker appearance=transparent .configLayerOrderDefined=${this._configLayerOrderDefined} .defaultLayerId=${this.defaultLayerId} display=inline-flex .enabledLayerIds=${this._enabledLayerIds} height=50 .isMobile=${this.isMobile} .mapView=${this.mapView} .showOnlyUpdatableLayers=${this.showOnlyUpdatableLayers} placeholder-icon=layers scale=l .selectedIds=${this.selectedLayer?[this.selectedLayer.id]:[]} show-single-layer-as-label show-tables show-tables-disabled type=dropdown ${h(this._mapLayerPicker)}></map-layer-picker>`||""}</div></div>`}_getHeaderActions(){return l`<div slot=header-content><calcite-action-bar class=${f("display-flex")} expand-disabled expanded id=${this._getId("bar")??m} layout=horizontal><calcite-action-group>${this.isMapLayout?this._getTools():void 0}</calcite-action-group></calcite-action-bar></div>`}_getShare(e){return l`<div class="share-action" id=${this._getId(e)??m}>${this.mapView&&l`<instant-apps-social-share class="instant-app-share" .embed=${this.shareIncludeEmbed} flip-rtl popover-button-icon-scale=s scale=m share-button-color=neutral share-button-type=action .socialMedia=${this.shareIncludeSocial} .view=${this.mapView} ${h(i=>{i&&(this._shareNode=i,this._updateShareUrl())})}></instant-apps-social-share>`||""}${this._getToolTip("bottom",`map-${e}`,this._translations?.share)}</div>`}_updateShareUrl(){let e=this._shareNode?.shareUrl;if(!e)return;let i=new URL(e);this._loadedId?i.searchParams.set("webmap",this._loadedId):i.searchParams.delete("webmap"),this.selectedLayer?.id?i.searchParams.set("layer",this.selectedLayer.id):i.searchParams.delete("layer"),this.selectedFeaturesIds?.length>0?i.searchParams.set("oid",this.selectedFeaturesIds.join(",")):i.searchParams.delete("oid"),this.appLayout&&i.searchParams.set("applayout",this.appLayout),this._shareNode&&(this._shareNode.autoUpdateShareUrl=!1,this._shareNode.shareUrl=i.href)}_initToolInfos(){let e=this.selectedFeaturesIds.length>0,i=this.selectedFeaturesIds.length<2||this.selectedFeaturesIds.length>u,a=this.featureSelectionMode==="multiple"&&this.selectedLayer?.capabilities?.operations.supportsUpdate,t=[];t.push({active:!1,icon:"filter",indicator:!1,label:this._translations.filters,func:()=>{this._toggleFilter()},disabled:!1,toolTip:this._translations.filters}),t.push({active:!1,icon:"zoom-to-object",indicator:!1,label:this._translations.zoom,func:()=>{this._zoom()},disabled:!e,toolTip:this._translations.zoom}),a&&t.push({active:!1,icon:"pencil",indicator:!1,label:this._translations.editMultiple,func:()=>this.editMultipleFeatures.emit(this.selectedFeaturesIds),disabled:i,toolTip:this._translations.editMultiple}),this.showCopyPasteActions&&(t.push({active:!1,icon:"copy",indicator:!1,label:this._translations.copy,func:()=>this.copyFeatures.emit({featuresIds:this.selectedFeaturesIds,layerId:this.selectedLayer?.id}),disabled:!e,toolTip:this._translations.copy}),t.push({active:!1,icon:"paste-with-attribute",indicator:!1,label:this._translations.paste,func:()=>this.pasteFeatures.emit(),disabled:!0,toolTip:this._translations.paste})),t.push({active:!1,icon:"refresh",indicator:!1,label:this._translations.refresh,func:()=>this.selectedLayer?.refresh(),disabled:!1,toolTip:this._translations.refresh}),t.push({active:!1,icon:"erase",indicator:!1,label:this._translations.clearSelection,func:()=>this.clearSelection.emit(),disabled:!e,toolTip:this._translations.clearSelection}),this._toolInfos=[...t]}_validateActiveActions(){let e=["filter"];this._toolInfos?.forEach(i=>{i&&e.indexOf(i.icon)>-1&&i.icon==="filter"&&(i.indicator=this._filterActive)})}_handleMapVisibility(){if(this._mapDiv.value){let e=this._mapDiv.value.getElementsByClassName("esri-view-surface")[0],i=this._mapDiv.value.getElementsByClassName("esri-attribution")[0];this._isValidWebMap?(e?.classList.remove("hidden"),i?.classList.remove("hidden")):(e?.classList.add("hidden"),i?.classList.add("hidden"))}}_validateEnabledActions(){let e=this.selectedFeaturesIds.length>0,i=this.selectedFeaturesIds.length<2||this.selectedFeaturesIds.length>u,a=["zoom-to-object","pencil","erase","copy"];this._toolInfos?.forEach(t=>{t&&a.indexOf(t.icon)>-1&&(t.disabled=t.icon==="pencil"?i:!e,t.toolTip=t.icon==="pencil"?this.selectedFeaturesIds.length>u?this._translations.featureEditLimitNotice:this._translations.editMultiple:t.toolTip)})}_handleDocumentClick(e){e.target.tagName!=="MAP-PICKER"&&this._mapPicker.value&&this._mapPicker.value.close()}async _zoom(){if(this.selectedLayer&&this.mapView){let e=await w(this.mapView,this.selectedLayer.id);e&&await M(this.selectedFeaturesIds,e,this.mapView,!0,void 0,this.zoomToScale)}}async _toggleFilter(){this.toggleFilter.emit()}_getTools(){return this._toolInfos?.reduce((e,i)=>(i&&e.push(this._getAction(i.active,i.icon,i.indicator,i.label,i.func,i.disabled,i.loading,i.toolTip)),e),[])}_getToolTip(e,i,a){return l`<calcite-tooltip .placement=${e} .referenceElement=${i}><span>${a}</span></calcite-tooltip>`}_getAction(e,i,a,t,s,d,o,c){let W=this.selectedLayer===void 0?!0:d;return l`<calcite-action .active=${e} .disabled=${W} .icon=${i} .id=${`map-${i}`} .indicator=${a} .label=${t} .loading=${o} @click=${s} .text=${t} text-enabled></calcite-action>${this._getToolTip("auto",`map-${i}`,c)}`}_getId(e){return`solutions-action-${e}`}};v("map-card",_);return _},"config","views/MapView","WebMap",a,b,c,d)
|
|
2
|
+
import{a as S}from"./7NAC32PQ.js";import"./CVHXDPJO.js";import d from"./XC3IZAIH.js";import c from"./EXC566PM.js";import"./2B4SGB3I.js";import"./I2NTSKBD.js";import"./3UKDJZ2D.js";import b from"./2C4DK6YC.js";import a from"./WV7QX3ED.js";import{a as $}from"./MGEDATQ7.js";import"./RMEDO4JC.js";import"./ISFTCFSJ.js";import"./TEHBW75B.js";import"./IHG7KTNC.js";import"./ZCU2WWVN.js";import"./WGO4EVOV.js";import"./YKB6256M.js";import"./N22MFQSQ.js";import"./N7BXCDA3.js";import"./ZX3UHK6P.js";import"./Z4F2NZOT.js";import"./KOIDWEP3.js";import"./3KXMYZCU.js";import"./LP2JYX4X.js";import"./GF4QELNV.js";import"./AYSQIO6L.js";import"./YQHYMLC7.js";import"./DKD2EGQP.js";import"./5O53T3SW.js";import"./AJZDBHB6.js";import"./FES7B3SJ.js";import{b as v}from"./2I5LGZNX.js";import{E as p,F as h,G as I,I as f,h as y,i as l,l as m,q as r,t as g}from"./FFF5HUPM.js";import"./QPIMTXPL.js";export default $arcgis.t(([F,,k,,{c:w,j:M},{m:L},{i:u}])=>{function C(n){return n?.indexOf("http://")!==-1}function b(n){return C(n)?n.replace(/^http:\/\//,"https://"):n}function T(n,e,i){return i&&i.forEach(a=>{n.allLayers.forEach(t=>{t&&t.url===a.sourceUrl&&(t.url=b(a.proxyUrl),t.portalItem&&t.portalItem.when(()=>{t.portalItem.url=b(a.proxyUrl)}),e.request?.interceptors?.push({urls:a.sourceUrl,before:s=>{s.url&&s.url===a.sourceUrl&&(s.url=b(a.proxyUrl))}}))})}),n}var P=y`@layer{:host{display:block;--calcite-label-margin-bottom: 0;--calcite-block-padding: 0}.map-height{height:calc(100% - 53px)}.height-full{height:100%}.height-49-px{height:49px}.box-shadow{box-shadow:none!important}.visibility-hidden-1{visibility:hidden;height:1px}.hidden{visibility:hidden!important}.display-flex{display:flex}.display-none{display:none}.display-block{display:block}.absolute-right{position:absolute;right:0;left:unset}.esri-ui-inner-container.esri-ui-corner-container{direction:ltr}html[dir=rtl] .absolute-right{left:0;right:unset}.panel-header-override{--calcite-panel-header-content-space: 0px;--calcite-internal-panel-action-spacing: 0px !important}@media only screen and (max-width:1024px){.esri-zoom{display:none!important}}calcite-action-bar{--calcite-internal-action-bar-gap: 0px;--calcite-internal-action-bar-padding: 0px}}`,_=class extends I{constructor(){super(),this.defaultWebmapId="",this.defaultLayerId="",this.enableHome=!1,this.enableLegend=!1,this.enableLayerList=!0,this.enableFloorFilter=!1,this.enableFullscreen=!1,this.enableShare=!1,this.enableMapLayerPicker=!1,this.enableMapPicker=!1,this.enableSingleExpand=!1,this.enableSearch=!1,this.enableBasemap=!1,this.featureSelectionMode="multiple",this.hide=!1,this.zoomToolsSize="m",this.mapInfos=[],this.mapWidgetsIndex=0,this.mapWidgetsPosition="top-leading",this.mobileMapWidgetsPosition="top-right",this.mapWidgetsSize="m",this.stackTools=!1,this.mapToolsOrder=[],this.mobileToolsOrder=[],this.isMapLayout=!1,this.shareIncludeEmbed=!1,this.shareIncludeSocial=!1,this.selectedFeaturesIds=[],this.showOnlyUpdatableLayers=!1,this.isMobile=!1,this.enableSelectionTool=!1,this.visibilityIcon="eyeball",this.pasteEnabled=!1,this.mapComponentId="arcgis-map",this.showCopyPasteActions=!1,this._configLayerOrderDefined=!1,this._translations=$({name:"map-card",blocking:!0}),this._toolInfos=[],this._filterActive=!1,this._layerIds=[],this._enabledLayerIds=[],this._defaultWebmapHonored=!1,this._loadedId="",this._mapDiv=p(),this._mapComponent=p(),this._mapPicker=p(),this._mapTools=p(),this._mobMapTools=p(),this._mapLayerPicker=p(),this._selectedWebMapId="",this._isValidWebMap=!0,this.mapChanged=r(),this.beforeMapChanged=r(),this.toggleFilter=r(),this.clearSelection=r(),this.copyFeatures=r(),this.pasteFeatures=r(),this.editMultipleFeatures=r(),this.featuresCopied=r(),this.listenOn(window,"mapInfoChange",this.mapInfoChange),this.listenOn(window,"noLayersFound",this.noLayersFound),this.listenOn(window,"layerSelectionChange",this.layerSelectionChange),this.listenOn(window,"idsFound",this._idsFound),this.enableSingleExpand=!0,this.stackTools=!0,S(window)}static{this.properties={appLayout:1,appProxies:1,defaultWebmapId:1,defaultLayerId:1,enableHome:5,enableLegend:5,enableLayerList:5,enableFloorFilter:5,enableFullscreen:5,enableShare:5,enableMapLayerPicker:5,enableMapPicker:5,enableSingleExpand:5,enableSearch:5,enableBasemap:5,featureSelectionMode:1,basemapConfig:0,hide:5,zoomToolsSize:1,mapInfos:0,mapWidgetsIndex:9,mapWidgetsPosition:1,mobileMapWidgetsPosition:1,mapWidgetsSize:1,mapView:0,stackTools:5,theme:1,mapToolsOrder:0,mobileToolsOrder:0,isMapLayout:5,shareIncludeEmbed:5,shareIncludeSocial:5,selectedFeaturesIds:0,selectedLayer:0,zoomToScale:9,showOnlyUpdatableLayers:5,isMobile:5,mapInfo:0,enableSelectionTool:5,visibilityIcon:1,pasteEnabled:5,mapComponentId:1,showCopyPasteActions:5,_configLayerOrderDefined:16,_translations:16,_searchConfiguration:16,_webMapInfo:16,_toolInfos:16,_filterActive:16,_mapDivHeight:16,_mapDivWidth:16,_layerIds:16}}static{this.styles=P}static{this.shadowRootOptions=g}willUpdate(e){if(e.has("appLayout")&&this.appLayoutWatchHandler(),e.has("mapView")&&this.mapViewWatchHandler(),e.has("mapInfo")&&this.mapInfoWatchHandler(),e.has("selectedFeaturesIds")&&this.selectedFeaturesIdsWatchHandler(),e.has("pasteEnabled")&&this.hasUpdated){let i=this._toolInfos.find(a=>a.icon==="paste-with-attribute");i&&(i.disabled=!this.pasteEnabled)}}appLayoutWatchHandler(){this._updateShareUrl()}async mapInfoWatchHandler(){this._configLayerOrderDefined="configLayerOrder"in(this.mapInfo?.layerOptions||{}),this._enabledLayerIds=L(this.mapInfo?.layerOptions?.layers||[],this.mapInfo?.layerOptions?.configLayerOrder)}async mapViewWatchHandler(){this.mapView&&this._updateShareUrl()}async selectedFeaturesIdsWatchHandler(){this._updateShareUrl(),this._validateEnabledActions()}async resetFilter(){this._filterActive=!1,this._updateShareUrl()}async updateFilterState(e){this._filterActive=e,this._updateShareUrl()}async updateLayer(){this._mapLayerPicker.value&&this._mapLayerPicker.value.updateLayer()}async mapInfoChange(e){this._selectedWebMapId=e.detail.id,await this._loadMap(e.detail)}noLayersFound(){this.selectedLayer=void 0,this.selectedFeaturesIds=[]}layerSelectionChange(){setTimeout(()=>{this._initToolInfos()},50)}_idsFound(e){this._layerIds=e.detail}async load(){this._initToolInfos(),this._mapSizeObserver||(this._mapSizeObserver=new ResizeObserver(()=>{this._mapDivWidth&&this._mapDiv.value&&(this._mapDivWidth=this._mapDiv.value.offsetWidth)}))}render(){let e=this.hide?"visibility-hidden-1":"",i=this.theme==="dark"?"calcite-mode-dark":"calcite-mode-light",a="height-full",t=this.isMapLayout?"":"display-none",s=this._isValidWebMap?"":"hidden",d=this.isMobile?"":"hidden",o=this.enableMapPicker&&this.mapInfos.length>1,c=this.enableMapLayerPicker&&this._layerIds.length>1;return this._handleMapVisibility(),this._validateActiveActions(),l`<calcite-panel class="height-full width-full panel-header-override">${this._getMapLayerPicker()}${this._getHeaderActions()}<div slot=header-actions-end>${this.enableShare&&this.isMapLayout?this._getShare("share"):void 0}</div><calcite-progress class=${f(t)} value=0></calcite-progress><div class=${`${e} ${a}`}><div class="height-full" ${h(this._mapDiv)}><arcgis-map id=${this.mapComponentId??m} class="height-full" ${h(this._mapComponent)}></arcgis-map></div></div>${l`<map-tools style=${`visibility: ${s}`} .basemapConfig=${this.basemapConfig} class=${`box-shadow ${i} ${s}`} .configLayerOrderDefined=${this._configLayerOrderDefined} .defaultLayerId=${this.defaultLayerId} .enableBasemap=${this.enableBasemap} .enableFloorFilter=${this.enableFloorFilter} .enableFullscreen=${this.enableFullscreen} .enableHome=${this.enableHome} .enableLegend=${this.enableLegend} .enableLayerList=${this.enableLayerList} .enableSearch=${this.enableSearch} .enableSingleExpand=${this.enableSingleExpand} .enableSelectionTool=${this.enableSelectionTool} .isMobile=${this.isMobile} .parentComponentHeight=${this._mapDivHeight} .parentComponentWidth=${this._mapDivWidth} .zoomToolsSize=${this.zoomToolsSize} layout=horizontal .mapView=${this.mapView} .mapWidgetsSize=${this.mapWidgetsSize} .position=${this.mapWidgetsPosition} .selectedFeaturesIds=${this.selectedFeaturesIds} .selectedLayer=${this.selectedLayer} .searchConfiguration=${this._searchConfiguration} .stackTools=${this.stackTools} .toolOrder=${this.mapToolsOrder} .visibilityIcon=${this.visibilityIcon} ${h(this._mapTools)}></map-tools><map-tools style=${`visibility: ${d}`} class=${`box-shadow ${i} ${d}`} .configLayerOrderDefined=${this._configLayerOrderDefined} .defaultLayerId=${this.defaultLayerId} .enabledLayerIds=${this._enabledLayerIds} .enableMapLayerPicker=${c} .enableMapPicker=${o} .isMobile=${this.isMobile} .zoomToolsSize=${this.zoomToolsSize} layout=vertical .mapInfos=${this.mapInfos} .mapView=${this.mapView} .mapWidgetsSize=${this.mapWidgetsSize} .parentComponentHeight=${this._mapDivHeight} .position=${this.mobileMapWidgetsPosition} .selectedLayer=${this.selectedLayer} .selectedWebMapId=${this._selectedWebMapId} .showOnlyUpdatableLayers=${this.showOnlyUpdatableLayers} .stackTools=${this.stackTools} .toolOrder=${this.mobileToolsOrder} ${h(this._mobMapTools)}></map-tools>`}</calcite-panel>`}updated(){this._mapDivHeight=this._mapDiv.value?.offsetHeight??0,document.onclick=e=>this._handleDocumentClick(e)}loaded(){this._mapDiv.value&&this._mapSizeObserver?.observe(this._mapDiv.value),this._updateShareUrl()}async _loadMap(e){let i=!this._defaultWebmapHonored&&this.defaultWebmapId,a=this.mapInfos?.filter(o=>o.id===this.defaultWebmapId),t=JSON.stringify(e)!==JSON.stringify(this._webMapInfo);this._webMapInfo=i&&a?a[0]:!e?.id&&this.mapInfos.length>0?this.mapInfos[0]:e;let s=this._webMapInfo.id,d=i&&e?.id===this.defaultWebmapId;if(this._loadedId!==s&&!i||d){let o=new k({portalItem:{id:s}});try{if(o&&await o.load(),this.appProxies&&o&&await T(o,F,this.appProxies),this._mapComponent.value||await this.updateComplete,!this._mapComponent.value)throw new Error("Map component is not available.");this._mapComponent.value.map=o,this._mapComponent.value.resizeAlign="center",await this._mapComponent.value.viewOnReady(),this.mapView=this._mapComponent.value.view,this._loadedId=s,this._searchConfiguration=this._webMapInfo.searchConfiguration,this.beforeMapChanged.emit(),this.mapView&&await this.mapView.when(()=>{this.mapView&&(this._mapDivWidth=this._mapDiv.value&&this._mapDiv.value.offsetWidth,this._mapTools.value&&this.mapView.ui.add(this._mapTools.value,{position:this.mapWidgetsPosition,index:this.mapWidgetsIndex}),this._mobMapTools.value&&this.mapView.ui.add(this._mobMapTools.value,{position:this.mobileMapWidgetsPosition,index:this.mapWidgetsIndex}),this._defaultWebmapHonored=d?!0:this._defaultWebmapHonored,this._isValidWebMap=!0,this.mapChanged.emit({id:s,mapView:this.mapView,isValid:!0}),this.isMobile||document.getElementsByClassName("esri-zoom")[0]?.classList.remove("display-none"))})}catch(c){console.error(c),this._loadedId=s,this._isValidWebMap=!1,this.mapChanged.emit({id:s,mapView:void 0,isValid:!1}),document.getElementsByClassName("esri-zoom")[0]?.classList.add("display-none");return}}else i?(this._defaultWebmapHonored=!0,this._mapPicker.value&&this._mapPicker.value.setMapByID(s)):t&&this.mapView&&(this._searchConfiguration=this._webMapInfo.searchConfiguration,this.beforeMapChanged.emit(),this.mapChanged.emit({id:s,mapView:this.mapView,isValid:!0}));this._updateShareUrl()}_getMapLayerPicker(){let e=this.isMapLayout?"header-actions-start":"",i=this.mapInfos?.length>1?"":"display-none",a=this.isMapLayout?"height-0":"width-full",t="display-flex",s=this.isMapLayout?"":"display-none";return l`${!this.isMobile&&l`<div slot=${e??m}><map-picker class=${`${i} ${a}`} id=map-picker .isMapLayout=${this.isMapLayout} .mapInfos=${this.mapInfos} .selectedWebMapId=${this._selectedWebMapId} ${h(this._mapPicker)}></map-picker></div>`||""}<div slot=header-actions-start class=${`mapView-header display-flex ${s}`} id=solutions-map-layer-picker-container><div class=${`border-end ${t}`}>${this.mapView&&l`<map-layer-picker appearance=transparent .configLayerOrderDefined=${this._configLayerOrderDefined} .defaultLayerId=${this.defaultLayerId} display=inline-flex .enabledLayerIds=${this._enabledLayerIds} height=50 .isMobile=${this.isMobile} .mapView=${this.mapView} .showOnlyUpdatableLayers=${this.showOnlyUpdatableLayers} placeholder-icon=layers scale=l .selectedIds=${this.selectedLayer?[this.selectedLayer.id]:[]} show-single-layer-as-label show-tables show-tables-disabled type=dropdown ${h(this._mapLayerPicker)}></map-layer-picker>`||""}</div></div>`}_getHeaderActions(){return l`<div slot=header-content><calcite-action-bar class=${f("display-flex")} expand-disabled expanded id=${this._getId("bar")??m} layout=horizontal><calcite-action-group>${this.isMapLayout?this._getTools():void 0}</calcite-action-group></calcite-action-bar></div>`}_getShare(e){return l`<div class="share-action" id=${this._getId(e)??m}>${this.mapView&&l`<instant-apps-social-share class="instant-app-share" .embed=${this.shareIncludeEmbed} flip-rtl popover-button-icon-scale=s scale=m share-button-color=neutral share-button-type=action .socialMedia=${this.shareIncludeSocial} .view=${this.mapView} ${h(i=>{i&&(this._shareNode=i,this._updateShareUrl())})}></instant-apps-social-share>`||""}${this._getToolTip("bottom",`map-${e}`,this._translations?.share)}</div>`}_updateShareUrl(){let e=this._shareNode?.shareUrl;if(!e)return;let i=new URL(e);this._loadedId?i.searchParams.set("webmap",this._loadedId):i.searchParams.delete("webmap"),this.selectedLayer?.id?i.searchParams.set("layer",this.selectedLayer.id):i.searchParams.delete("layer"),this.selectedFeaturesIds?.length>0?i.searchParams.set("oid",this.selectedFeaturesIds.join(",")):i.searchParams.delete("oid"),this.appLayout&&i.searchParams.set("applayout",this.appLayout),this._shareNode&&(this._shareNode.autoUpdateShareUrl=!1,this._shareNode.shareUrl=i.href)}_initToolInfos(){let e=this.selectedFeaturesIds.length>0,i=this.selectedFeaturesIds.length<2||this.selectedFeaturesIds.length>u,a=this.featureSelectionMode==="multiple"&&this.selectedLayer?.capabilities?.operations.supportsUpdate,t=[];t.push({active:!1,icon:"filter",indicator:!1,label:this._translations.filters,func:()=>{this._toggleFilter()},disabled:!1,toolTip:this._translations.filters}),t.push({active:!1,icon:"zoom-to-object",indicator:!1,label:this._translations.zoom,func:()=>{this._zoom()},disabled:!e,toolTip:this._translations.zoom}),a&&t.push({active:!1,icon:"pencil",indicator:!1,label:this._translations.editMultiple,func:()=>this.editMultipleFeatures.emit(this.selectedFeaturesIds),disabled:i,toolTip:this._translations.editMultiple}),this.showCopyPasteActions&&(t.push({active:!1,icon:"copy",indicator:!1,label:this._translations.copy,func:()=>this.copyFeatures.emit({featuresIds:this.selectedFeaturesIds,layerId:this.selectedLayer?.id}),disabled:!e,toolTip:this._translations.copy}),t.push({active:!1,icon:"paste-with-attribute",indicator:!1,label:this._translations.paste,func:()=>this.pasteFeatures.emit(),disabled:!0,toolTip:this._translations.paste})),t.push({active:!1,icon:"refresh",indicator:!1,label:this._translations.refresh,func:()=>this.selectedLayer?.refresh(),disabled:!1,toolTip:this._translations.refresh}),t.push({active:!1,icon:"erase",indicator:!1,label:this._translations.clearSelection,func:()=>this.clearSelection.emit(),disabled:!e,toolTip:this._translations.clearSelection}),this._toolInfos=[...t]}_validateActiveActions(){let e=["filter"];this._toolInfos?.forEach(i=>{i&&e.indexOf(i.icon)>-1&&i.icon==="filter"&&(i.indicator=this._filterActive)})}_handleMapVisibility(){if(this._mapDiv.value){let e=this._mapDiv.value.getElementsByClassName("esri-view-surface")[0],i=this._mapDiv.value.getElementsByClassName("esri-attribution")[0];this._isValidWebMap?(e?.classList.remove("hidden"),i?.classList.remove("hidden")):(e?.classList.add("hidden"),i?.classList.add("hidden"))}}_validateEnabledActions(){let e=this.selectedFeaturesIds.length>0,i=this.selectedFeaturesIds.length<2||this.selectedFeaturesIds.length>u,a=["zoom-to-object","pencil","erase","copy"];this._toolInfos?.forEach(t=>{t&&a.indexOf(t.icon)>-1&&(t.disabled=t.icon==="pencil"?i:!e,t.toolTip=t.icon==="pencil"?this.selectedFeaturesIds.length>u?this._translations.featureEditLimitNotice:this._translations.editMultiple:t.toolTip)})}_handleDocumentClick(e){e.target.tagName!=="MAP-PICKER"&&this._mapPicker.value&&this._mapPicker.value.close()}async _zoom(){if(this.selectedLayer&&this.mapView){let e=await w(this.mapView,this.selectedLayer.id);e&&await M(this.selectedFeaturesIds,e,this.mapView,!0,void 0,this.zoomToScale)}}async _toggleFilter(){this.toggleFilter.emit()}_getTools(){return this._toolInfos?.reduce((e,i)=>(i&&e.push(this._getAction(i.active,i.icon,i.indicator,i.label,i.func,i.disabled,i.loading,i.toolTip)),e),[])}_getToolTip(e,i,a){return l`<calcite-tooltip .placement=${e} .referenceElement=${i}><span>${a}</span></calcite-tooltip>`}_getAction(e,i,a,t,s,d,o,c){let W=this.selectedLayer===void 0?!0:d;return l`<calcite-action .active=${e} .disabled=${W} .icon=${i} .id=${`map-${i}`} .indicator=${a} .label=${t} .loading=${o} @click=${s} .text=${t} text-enabled></calcite-action>${this._getToolTip("auto",`map-${i}`,c)}`}_getId(e){return`solutions-action-${e}`}};v("map-card",_);return _},"config","views/MapView","WebMap",a,b,c,d)
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import"./QPIMTXPL.js";var t=`The Solutions Assistant Agent is the single entry point for ArcGIS Solutions assistant requests.\r
|
|
3
|
+
\r
|
|
4
|
+
It classifies each incoming request and routes it to the most appropriate specialist flow:\r
|
|
5
|
+
- Explorer flow for discovery, documentation, and general ArcGIS Solutions questions.\r
|
|
6
|
+
- Builder flow for creating, designing, or updating a solution design.\r
|
|
7
|
+
- Other flow for unsupported, unclear, or off-topic requests.\r
|
|
8
|
+
\r
|
|
9
|
+
Always select this agent`;export{t as default};
|