@esri/solutions-components 5.0.2-next.5 → 5.0.2-next.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/dist/cdn/{XOO4MQ4X.js → 2DAM5BYX.js} +1 -1
  2. package/dist/cdn/{ULDNFSZC.js → 2UMRDDIV.js} +1 -1
  3. package/dist/cdn/{4XMWC6IV.js → 3B4FA5CV.js} +1 -1
  4. package/dist/cdn/{UJSTWEYZ.js → 3ELXQUHH.js} +1 -1
  5. package/dist/cdn/{Y7OWLSUL.js → 3LEJ44U2.js} +1 -1
  6. package/dist/cdn/{H4AQ3NOB.js → 3M6AYSM7.js} +1 -1
  7. package/dist/cdn/{CDTD573U.js → 4OZQG5MW.js} +1 -1
  8. package/dist/cdn/{CO37Q2G7.js → 5UEEUPL5.js} +1 -1
  9. package/dist/cdn/{HFSCLHH3.js → 5VP4DXWE.js} +1 -1
  10. package/dist/cdn/{Q7XZ2WSI.js → 5W3ANKBB.js} +1 -1
  11. package/dist/cdn/{ET27C34M.js → 5Z32YRHM.js} +1 -1
  12. package/dist/cdn/{K7HI6WU5.js → 6BEDO5MX.js} +1 -1
  13. package/dist/cdn/{V5DYUI5A.js → 6CJGNF3Y.js} +1 -1
  14. package/dist/cdn/{JCIUAWOV.js → 6EFUV7CH.js} +1 -1
  15. package/dist/cdn/{QKVN24LI.js → 6LPOLFT7.js} +1 -1
  16. package/dist/cdn/{EAP3T73G.js → 6RXHEPPS.js} +1 -1
  17. package/dist/cdn/{BN2OKCTV.js → 73LVZIP7.js} +1 -1
  18. package/dist/cdn/{VPQWJHDX.js → 7UXCJXCE.js} +1 -1
  19. package/dist/cdn/{NUVM3TEI.js → ALDUB3A4.js} +1 -1
  20. package/dist/cdn/{6QDXYJ2A.js → BNQ63VOG.js} +1 -1
  21. package/dist/cdn/{BN7W4V6O.js → BVWFZPY7.js} +1 -1
  22. package/dist/cdn/{N7QXUPEE.js → CK7LURBK.js} +1 -1
  23. package/dist/cdn/{653SJFXP.js → CTRHHRDP.js} +1 -1
  24. package/dist/cdn/{UCJQY6QB.js → D2QNPQWY.js} +1 -1
  25. package/dist/cdn/{2RABE6MU.js → D37HOE6T.js} +1 -1
  26. package/dist/cdn/{FGR7TVGE.js → DUEAJUQG.js} +1 -1
  27. package/dist/cdn/{M63QPB4V.js → DZUVI4S3.js} +1 -1
  28. package/dist/cdn/{I3SA63N4.js → E4L5GTBZ.js} +1 -1
  29. package/dist/cdn/{TOPWR24E.js → E74QDAYN.js} +1 -1
  30. package/dist/cdn/{DLMYZ6ZN.js → EH43P34B.js} +1 -1
  31. package/dist/cdn/{2P5ILJMU.js → EL4G77RV.js} +1 -1
  32. package/dist/cdn/{ETMW3Z3K.js → ERFCQNCV.js} +1 -1
  33. package/dist/cdn/{X3XKJE25.js → EUZCYCCK.js} +1 -1
  34. package/dist/cdn/{YQYUGVWA.js → EVFB6G4J.js} +1 -1
  35. package/dist/cdn/{IYTHORN5.js → FJSRWM5L.js} +1 -1
  36. package/dist/cdn/{BBLQ4DLJ.js → FL74XITX.js} +1 -1
  37. package/dist/cdn/{UGXAX5D3.js → GJJOB4RR.js} +1 -1
  38. package/dist/cdn/{ZE5JXFPR.js → GXXXAGCI.js} +1 -1
  39. package/dist/cdn/{GYKTRMNC.js → H5ZE4RIC.js} +1 -1
  40. package/dist/cdn/{YU5HCUEF.js → HAAFUV3J.js} +1 -1
  41. package/dist/cdn/{3WKRKVN4.js → HDIQAOAL.js} +1 -1
  42. package/dist/cdn/{I2RB3ZK5.js → HNRZHAOD.js} +1 -1
  43. package/dist/cdn/{2M7N6LPR.js → HPBIBS4W.js} +1 -1
  44. package/dist/cdn/{X5T425K7.js → I2FILQIE.js} +1 -1
  45. package/dist/cdn/{OHXRTGLZ.js → I3OLKEFJ.js} +1 -1
  46. package/dist/cdn/{5F66HK4S.js → IDEWFRKI.js} +1 -1
  47. package/dist/cdn/{DD3JC2L3.js → JE7L7M3J.js} +1 -1
  48. package/dist/cdn/{6VTGA46N.js → JHOXJY5O.js} +1 -1
  49. package/dist/cdn/{5UAKLHDN.js → JN4HYWSX.js} +1 -1
  50. package/dist/cdn/{WVAU657C.js → JQFNYWZI.js} +1 -1
  51. package/dist/cdn/{SKTW2DTJ.js → JQO5U72D.js} +1 -1
  52. package/dist/cdn/{P3NBQIFK.js → JQU7O6FD.js} +1 -1
  53. package/dist/cdn/{6YDPEFML.js → JVMVZ2RC.js} +1 -1
  54. package/dist/cdn/{YRN6NQC6.js → KDKRXEOX.js} +1 -1
  55. package/dist/cdn/{7VEBBW3O.js → KVR3XE7B.js} +1 -1
  56. package/dist/cdn/{TAAFNJJG.js → LGUC7DRT.js} +1 -1
  57. package/dist/cdn/{ACCRMKQI.js → LTBO6VJF.js} +1 -1
  58. package/dist/cdn/{YUCIOMKU.js → MAVNADWN.js} +1 -1
  59. package/dist/cdn/N5PYWRMD.js +2 -0
  60. package/dist/cdn/{PF7VCNOY.js → N5YBX6NM.js} +1 -1
  61. package/dist/cdn/{4FHS5SYC.js → N7RLYKQG.js} +1 -1
  62. package/dist/cdn/{PH6E5VEX.js → NLNE5H6M.js} +1 -1
  63. package/dist/cdn/{QAZVEVP5.js → O2OYKALV.js} +1 -1
  64. package/dist/cdn/{Y6QXO4MV.js → OAWQFVGG.js} +1 -1
  65. package/dist/cdn/{XV34GT2B.js → OJLSK25V.js} +1 -1
  66. package/dist/cdn/{3XA5R24U.js → P3AXNFRS.js} +1 -1
  67. package/dist/cdn/{ECIJI2EF.js → P6ETLC5A.js} +1 -1
  68. package/dist/cdn/{TUBYR7DR.js → PNBTKFO6.js} +1 -1
  69. package/dist/cdn/{KJSSBTJF.js → QKGOQ7EC.js} +1 -1
  70. package/dist/cdn/{Y6GYY3TH.js → RDWJHF5P.js} +1 -1
  71. package/dist/cdn/{C5NTEEMX.js → RIWLHWBH.js} +1 -1
  72. package/dist/cdn/{ZL6A7VRS.js → RTSKNY33.js} +1 -1
  73. package/dist/cdn/{BHP43GOA.js → SETNDPAB.js} +1 -1
  74. package/dist/cdn/{VY4VI4VX.js → T5ZR5RSW.js} +1 -1
  75. package/dist/cdn/{ZE5JOQG7.js → TAXUQXTN.js} +1 -1
  76. package/dist/cdn/{PF3DUV4R.js → TP6FTOYI.js} +1 -1
  77. package/dist/cdn/{N4KU3YV3.js → TPRPYUVX.js} +1 -1
  78. package/dist/cdn/{Z22WUH5B.js → U75PDOJF.js} +1 -1
  79. package/dist/cdn/{SA34OEYY.js → UGKLBL7D.js} +1 -1
  80. package/dist/cdn/{I5FU5F72.js → UR6OMPID.js} +1 -1
  81. package/dist/cdn/{QMDTLWB6.js → USIESVTZ.js} +1 -1
  82. package/dist/cdn/{VS7Q2BDJ.js → V65IKENN.js} +1 -1
  83. package/dist/cdn/{S5XSLTYG.js → VCH6XDEH.js} +1 -1
  84. package/dist/cdn/{WCKVYL7Q.js → VQFRDGSZ.js} +1 -1
  85. package/dist/cdn/{H4SMK2IM.js → XJWEK5VT.js} +1 -1
  86. package/dist/cdn/{TXGCOPR2.js → XUFPQNGT.js} +1 -1
  87. package/dist/cdn/{GRUGONVG.js → Y3FTYVXY.js} +1 -1
  88. package/dist/cdn/{64I67VMK.js → Y4TNT6PF.js} +1 -1
  89. package/dist/cdn/{PLCLZYNU.js → YT2QG2ST.js} +1 -1
  90. package/dist/cdn/{NTFCCIR6.js → ZVJIHRYK.js} +1 -1
  91. package/dist/cdn/{43NWVIMB.js → ZZ3AVDZU.js} +1 -1
  92. package/dist/cdn/index.js +1 -1
  93. package/dist/components/solution-details-panel/customElement.js +11 -11
  94. package/dist/docs/api.json +1 -1
  95. package/dist/docs/docs.json +1 -1
  96. package/dist/docs/web-types.json +1 -1
  97. package/dist/solutions-components_commit.txt +5 -8
  98. package/package.json +1 -1
  99. package/dist/cdn/KBXJXULA.js +0 -2
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import f from"./EAV7DUA3.js";import e from"./S6EMQP4I.js";import c from"./P5ERFKR2.js";import b from"./GPP5RTWG.js";import{b as l}from"./Y7OWLSUL.js";import"./GDPFKW75.js";import{F as i,G as n,H as r,J as o,K as d,h as s,i as a}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([,,,{t:p}])=>{var c=s`:host{display:block}:host .esri-legend__service{margin:0;padding:0}:host .hide{display:none}`,e={service:"esri-legend__service",groupLayer:"esri-legend__group-layer",groupContent:"esri-legend__group-content"},t=class extends r{constructor(){super(),this.layerCaption=i(),this.expanded=!0,this.isChild=!1,this.listenOn(window,"layerCaptionElementExpandUpdated",this.layerCaptionElementExpandUpdatedEmitted)}static{this.properties={expanded:16,legendvm:0,featureCount:5,activeLayerInfo:0,isChild:5}}static{this.styles=c}load(){new MutationObserver(()=>{this.requestUpdate()}).observe(this.el,{attributes:!0})}layerCaptionElementExpandUpdatedEmitted(){this.expanded=!!this.layerCaption.value?.expanded}render(){return a`<div style=${d({borderLeft:"1px solid var(--calcite-color-border-3)"})} class=${`${e.service} ${e.groupLayer}`}><instant-apps-interactive-legend-layer-element-caption class=${o(p(this.el))} .legendvm=${this.legendvm} .featureCount=${this.featureCount} .activeLayerInfo=${this.activeLayerInfo} .isChild=${this.isChild} ${n(this.layerCaption)}></instant-apps-interactive-legend-layer-element-caption><div class=${`${e.groupContent} ${this.expanded?"show":"hide"}`}><slot name=content></slot></div></div>`}};l("instant-apps-interactive-legend-group-legend-element",t);return t},b,c,e,f)
2
+ import f from"./EAV7DUA3.js";import e from"./S6EMQP4I.js";import c from"./P5ERFKR2.js";import b from"./GPP5RTWG.js";import{b as l}from"./3LEJ44U2.js";import"./GDPFKW75.js";import{F as i,G as n,H as r,J as o,K as d,h as s,i as a}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([,,,{t:p}])=>{var c=s`:host{display:block}:host .esri-legend__service{margin:0;padding:0}:host .hide{display:none}`,e={service:"esri-legend__service",groupLayer:"esri-legend__group-layer",groupContent:"esri-legend__group-content"},t=class extends r{constructor(){super(),this.layerCaption=i(),this.expanded=!0,this.isChild=!1,this.listenOn(window,"layerCaptionElementExpandUpdated",this.layerCaptionElementExpandUpdatedEmitted)}static{this.properties={expanded:16,legendvm:0,featureCount:5,activeLayerInfo:0,isChild:5}}static{this.styles=c}load(){new MutationObserver(()=>{this.requestUpdate()}).observe(this.el,{attributes:!0})}layerCaptionElementExpandUpdatedEmitted(){this.expanded=!!this.layerCaption.value?.expanded}render(){return a`<div style=${d({borderLeft:"1px solid var(--calcite-color-border-3)"})} class=${`${e.service} ${e.groupLayer}`}><instant-apps-interactive-legend-layer-element-caption class=${o(p(this.el))} .legendvm=${this.legendvm} .featureCount=${this.featureCount} .activeLayerInfo=${this.activeLayerInfo} .isChild=${this.isChild} ${n(this.layerCaption)}></instant-apps-interactive-legend-layer-element-caption><div class=${`${e.groupContent} ${this.expanded?"show":"hide"}`}><slot name=content></slot></div></div>`}};l("instant-apps-interactive-legend-group-legend-element",t);return t},b,c,e,f)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import g from"./TUBYR7DR.js";import e from"./ET27C34M.js";import a from"./ZL6A7VRS.js";import{b as d}from"./PZ4L77M5.js";import{a as b}from"./LFIJXE3U.js";import{b as f}from"./VU3OQQKP.js";import{H as m,J as u,L as c,h,i,r as o}from"./46DQNAMV.js";export default $arcgis.t(([{A:y,K:n,a:x,b:v,u:_,w:w},{a:$},{d:g,h:C,i:D}])=>{var k=h`.negative-tabbing-offset[tabindex]:focus-visible{outline:2px solid var(--calcite-color-brand);outline-offset:-2px}.tabbing-offset[tabindex]:focus-visible{outline:2px solid var(--calcite-color-brand);outline-offset:2px}.font-weight-med{font-weight:var(--calcite-font-weight-medium)}.font-weight-bold{font-weight:var(--calcite-font-weight-bold)}.heading-font{font-size:var(--calcite-font-size-0);font-weight:var(--calcite-font-weight-medium)}.title-font{font-size:1.8rem;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-text-1)}.font-1{font-size:var(--calcite-spacing-lg)}.display-flex{display:flex}.display-none{display:none}.flex-direction-column{flex-direction:column}.flex-direction-row{flex-direction:row}@media(min-width:801px){.font-size-override .display-flex.flex-direction-row>.image-width+.display-flex{flex:1;min-width:0}}.icon-color{color:var(--calcite-color-text-3)}.padding-bottom-lg{padding-bottom:var(--calcite-spacing-lg)}.item-padding{--calcite-internal-accordion-item-padding: var(--calcite-spacing-xl)}.align-items-center{align-items:center}.align-items-start{align-items:start}.font-size-override{--calcite-font-size--2: var(--calcite-font-size--1)}.background-color-1{background-color:var(--calcite-color-foreground-1)}.background-color-2{background-color:var(--calcite-color-foreground-2)}.label-override{--calcite-label-margin-bottom: var(--calcite-spacing-none)}.position-relative{position:relative}.overflow-hidden{overflow:hidden}.overflow-auto{overflow:auto}.margin-block-start-end-0{margin-block-start:var(--calcite-spacing-none);margin-block-end:var(--calcite-spacing-none)}.panel-background-2{--calcite-panel-background-color: var(--calcite-color-foreground-2);background-color:var(--calcite-color-foreground-2)}.panel-background-1{--calcite-panel-background-color: var(--calcite-color-foreground-1);--calcite-shell-panel-background-color: var(--calcite-color-foreground-1)}.border-none{border:none}.font-color-1{color:var(--calcite-color-text-1)}.panel-bg-color{--calcite-panel-header-background-color: var(--calcite-color-foreground-1);--calcite-panel-background-color: var(--calcite-color-foreground-1)}.dialog-y-size{--calcite-dialog-size-y: 90% }.dialog-x-size{--calcite-dialog-size-x: 90% }.bottom-border{border-bottom:solid var(--calcite-spacing-px);color:var(--calcite-color-border-1)}.margin-start-end-xxl{margin-inline-start:var(--calcite-spacing-xxl);margin-inline-end:var(--calcite-spacing-xxl)}.margin-start-end-lg{margin-inline-start:var(--calcite-spacing-lg);margin-inline-end:var(--calcite-spacing-lg)}.margin-top-xxl{margin-top:var(--calcite-spacing-xxl)}.justify-between{justify-content:space-between}.items-baseline{align-items:baseline}.padding-xxl{padding:var(--calcite-spacing-xxl)}.padding-lg{padding:var(--calcite-spacing-lg)}.padding-top-xxl{padding-top:var(--calcite-spacing-xxl)}.padding-top-lg{padding-top:var(--calcite-spacing-lg)}.padding-bottom-xxl{padding-bottom:var(--calcite-spacing-xxl)}.padding-end-1{padding-inline-end:var(--calcite-spacing-lg)}.padding-end-xxl{padding-inline-end:var(--calcite-spacing-xxl)}.padding-start-sm{padding-inline-start:var(--calcite-spacing-sm)}.padding-start-xxl{padding-inline-start:var(--calcite-spacing-xxl)}.image-width{width:300px;flex-grow:0;flex-shrink:0}@media(max-width:1280px){.image-width{flex-grow:2;flex-shrink:.5}}img{max-width:100%;height:auto;overflow-clip-margin:content-box;overflow:clip;display:block}.margin-xl{margin:var(--calcite-spacing-xl)}.line-height-1{line-height:1.1}.line-height-xxl{line-height:var(--calcite-line-height-xxl)}@media(max-width:800px){.font-size-override .display-flex.flex-direction-row{flex-direction:column!important}.image-width{width:100%!important;max-width:100%!important;margin:0!important;padding:var(--calcite-spacing-lg)!important;padding-bottom:0!important;box-sizing:border-box}.image-width img{width:100%;max-width:100%}.margin-xl{margin:0!important}.image-width+.display-flex{padding-inline-start:var(--calcite-spacing-lg)!important;padding-inline-end:var(--calcite-spacing-lg)!important}.padding-start-sm{padding-inline-start:0!important}.title-font{padding-inline-start:0!important;padding-top:var(--calcite-spacing-lg)!important;padding-bottom:var(--calcite-spacing-lg)!important}.align-items-start.padding-bottom-xxl,.padding-bottom-xxl.padding-start-sm{padding-bottom:var(--calcite-spacing-lg)!important}}calcite-shell-panel{--calcite-shell-panel-max-width: 20rem;--calcite-shell-panel-width: 24vw}calcite-shell{block-size:unset}.solution-deployed-action{--calcite-color-focus: initial}`,p=class extends m{constructor(){super(),this.diagramKey="",this.open=!1,this.templateInfos=[],this._accordionLoading=!1,this._configureTitlesOpen=!1,this._deleteDialogOpen=!1,this._hasNewVersion=!1,this._isDiagramOpen=!1,this._isNameConflict=!1,this._invalidNameMessage="",this._showSuccessAlert=!1,this._showFailedAlert=!1,this._showItemUpdateLoading=!1,this.isMobile=!1,this._templateInfoGraph=[],this._thumbnailUrl="",this._translations=b({name:"solution-deployed-card-panel",blocking:!0}),this._configContextConsumer=d({context:v,subscribe:!0,callback:async e=>{e&&(this._isOrgAdmin=w(e.authentication),this._user=e.authentication?.Portal?.user)}}),this._isOrgAdmin=!1,this._isMobileContextConsumer=d({context:x,subscribe:!0,callback:e=>this.isMobile=e}),this.navTabSelected=o(),this.forceSelectTab=o(),this.sortTypeChanged=o(),this.solutionConfigureDialogClose=o(),this._nonSolutionDependencyItems=[],this.listenOn(window,"deployedCardSelected",this._deployedCardSelected),this.listenOn(window,"deployAppTabSelected",this._handleDeployAppTabSelected),this.listenOn(window,"displayDeployedCard",()=>{this._showSuccessAlert=!0}),this.listenOn(window,"sessionRefreshed",e=>{this._updateThumbnailToken(e.detail)})}static{this.properties={card:0,cardRef:1,diagramKey:1,open:5,templateInfos:0,_accordionLoading:16,_configureTitlesOpen:16,_deleteDialogOpen:16,_hasNewVersion:16,_isDiagramOpen:16,_isNameConflict:16,_invalidNameMessage:16,_showSuccessAlert:16,_showFailedAlert:16,_showItemUpdateLoading:16,isMobile:16,_templateInfoGraph:16,_thumbnailUrl:16,_translations:16,_nonSolutionDependencyItems:16}}static{this.styles=k}get _telemetry(){return this._configContextConsumer.value?.telemetrySession}async load(){if(this._isMobileContextConsumer.value&&(this.isMobile=this._isMobileContextConsumer.value),this.card?.thumbnailUrl){let e=this._configContextConsumer.value?.userSession,t=this.card?.thumbnailUrl.replace(/w=\d+/,"w=400");this._thumbnailUrl=`${t}&token=${e?.token}`}}willUpdate(e){if(e.has("card")){let t=this._configContextConsumer.value?.userSession,a=this.card?.thumbnailUrl.replace(/w=\d+/,"w=400");this._thumbnailUrl=`${a}&token=${t?.token}`}}render(){return this.isMobile?i`<calcite-shell class="position-relative background-color-2"><calcite-panel class="panel-background-2 border-none" slot=panel-bottom><div class="background-color-2 padding-top-lg">${this._getSolutionPanel()}</div><div class="background-color-1 margin-top-xxl">${this._getButtons()}${this._getOwnerSection()}<div class="bottom-border margin-start-end-xxl"></div>${this._getSolutionVersionCard()}</div>${this._getSolutionContents()}</calcite-panel></calcite-shell>`:i`<calcite-shell class="position-relative background-color-2"><calcite-panel class="padding-end-xxl panel-background-2 border-none" slot=panel-bottom><div class="display-flex flex-direction-column overflow-hidden"><div class="background-color-2 padding-top-xxl">${this._getSolutionPanel()}</div>${this._getSolutionContents()}</div></calcite-panel><calcite-shell-panel class="panel-background-1" slot=panel-end>${this._getButtons()}${this._getOwnerSection()}<div class="bottom-border margin-start-end-xxl"></div>${this._getSolutionVersionCard()}</calcite-shell-panel>${this._renderDiagramDialog()}${this._getConfigureTitlesDialog()}${this._getDeleteDialog()}${this._getSuccessDeployAlert()}</calcite-shell>`}async _deployedCardSelected(e){let t=e.detail;this.card=t.card,this.cardRef=t.cardRef,this.templateInfos=[],this._accordionLoading=!0,this.templateInfos=await this._getTemplates(),this._accordionLoading=!1;let a=await $(this._configContextConsumer.value.userSession,this.card);this._nonSolutionDependencyItems=a._nonSolutionDependencyItems;let l=C(this._configContextConsumer.value?.allCards||[],this.card.deployCommonId),s=!1;if(l){let r=g(l),S=g(this.card);s=r>S}this._hasNewVersion=s}_handleDeployAppTabSelected(e){e.detail==="deployed-card"&&this.sortTypeChanged.emit("")}_getButtons(){let e=this._configContextConsumer.value?.userSession?.username,t=this._configContextConsumer.value?.authentication?.CanUpdateSolution,a=this.card?.owner===e||this._isOrgAdmin||t,l=this.card?.owner===e||this._isOrgAdmin,s=a?"display-none":"",r=this.isMobile?"padding-lg":"padding-xxl";return i`<div class=${`display-flex flex-direction-column ${r}`}>${!this.isMobile&&i`<calcite-button appearance=outline class="padding-bottom-lg solution-deployed-action" kind=neutral @click=${this._openDiagram}>${this._translations.viewTheDiagram}</calcite-button>`||""}<calcite-button appearance=outline class="padding-bottom-lg solution-deployed-action" kind=neutral @click=${this._viewDocumentation}>${this._translations.solutionDocumentation}</calcite-button><calcite-button appearance=outline class="padding-bottom-lg solution-deployed-action" kind=neutral @click=${this._openItemDetails}>${this._translations.itemDetails}</calcite-button>${a&&!this.isMobile&&i`<calcite-button appearance=outline class="padding-bottom-lg solution-deployed-action" id=solution-configure-titles-button kind=neutral @click=${this._openConfigureTitlesDialog}>${this._translations.updateTitles}</calcite-button><calcite-tooltip class=${u(s)} overlay-positioning=fixed reference-element=solution-configure-titles-button><span>${this._translations.mustOwnSolution}</span></calcite-tooltip>`||""}${l&&!this.isMobile&&i`<calcite-button appearance=outline class="padding-bottom-lg solution-deployed-action" kind=neutral @click=${this._deleteSolution}>${this._translations.deleteSolution}</calcite-button>`||""}</div>`}_openConfigureTitlesDialog(){this._configureTitlesOpen=!0}_getConfigureTitlesDialog(){return this._configureTitlesOpen?i`<solution-configure-titles .card=${this.card} @solutionConfigureTitlesBeforeClose=${async()=>{this.templateInfos=await this._getTemplates(),this._configureTitlesOpen=!1}} @solutionItemsTitlesChanged=${async()=>{this.templateInfos=await this._getTemplates()}} .open=${this._configureTitlesOpen} source="Details Page" .templateInfos=${this.templateInfos}></solution-configure-titles>`:""}_viewDocumentation(e){e.stopPropagation(),this._telemetry?.logEvent({category:n.DEPLOYMENTS,action:"Open Help",dimensions:[this.card?.title||"",this.card?.deployCommonId||"",this.card?.deployVersion||"","Details Page"]}),window.open(this.card.learnMoreUrl,"_blank")}_openItemDetails(e){e.stopPropagation(),this._telemetry?.logEvent({category:n.DEPLOYMENTS,action:"Open Item Details",dimensions:[this.card?.title||"",this.card?.deployCommonId||"",this.card?.deployVersion||"","Details Page"]}),window.open(this.card.itemUrl,"_blank")}_getOwnerSection(){if(!this._configContextConsumer?.value)return;let e=this.isMobile?"margin-start-end-lg":"margin-start-end-xxl";return i`<div class=${`display-flex padding-bottom-xxl ${e} flex-direction-column`}><div class="display-flex justify-between items-baseline"><calcite-label class="font-weight-med label-override tabbing-offset" layout=inline scale=l tabindex=0>${this._translations.aboutYourSolutionOwner}</calcite-label></div><solution-user-avatar .fullname=${this._user?.username===this.card?.owner?this._user?.fullName:void 0} .lookupProfile=${this._user?.username!==this.card?.owner} .thumbnailUrl=${this._user?.username===this.card?.owner?this._user?.thumbnailUrl:void 0} .username=${this.card?.owner}></solution-user-avatar></div>`}async _openDiagram(e){e.stopPropagation();let t=await this._getTemplates();t&&(this._telemetry?.logEvent({category:n.DEPLOYMENTS,action:"View Diagram",dimensions:[this.card?.title||"",this.card?.deployCommonId||"",this.card?.deployVersion||"","Details Page"]}),this._templateInfoGraph=t,this._isDiagramOpen=!0)}async _getTemplates(){return this.cardRef?await this.cardRef.getTemplates():this.card?await _(this.card.id,this._configContextConsumer.value.userSession):void 0}_getSolutionVersionCard(){let e=this._hasNewVersion?this._translations.newVersionAvailable:this._translations.youHaveTheLatestVersion,t=this.isMobile?"padding-lg":"padding-xxl";return i`<div class=${`${t} display-flex flex-direction-column`}><calcite-label class="font-weight-med label-override tabbing-offset" layout=inline scale=l slot=heading tabindex=0>${this._translations.solutionVersion.replace("{{version}}",this.card?.deployVersion||"")}</calcite-label><div class="display-flex"><div class="display-flex flex-direction-row padding-top-lg align-items-center"><calcite-icon class="icon-color" icon=clock-forward scale=m></calcite-icon><div class="display-flex flex-direction-column padding-start-xxl"><span class="tabbing-offset" tabindex=0>${e}</span></div></div></div>${this._hasNewVersion?i`<calcite-button appearance=outline class="padding-top-lg solution-deployed-action" kind=neutral @click=${this._openNewVersionSolution} width=full>${this._translations.learnMoreNewVersion}</calcite-button>`:""}</div>`}async _openNewVersionSolution(e){e.stopPropagation(),this._telemetry?.logEvent({category:n.DEPLOYMENTS,action:"View Latest Version",dimensions:[this.card?.title||"",this.card?.deployCommonId||"",this.card?.deployVersion||""]}),await new Promise(a=>setTimeout(a,100));let t=D(this._configContextConsumer.value.allCards,this.card.deployCommonId);t&&this.forceSelectTab.emit({tabType:"details",tabTitleOrId:t})}_getSolutionPanel(){return i`<calcite-panel class="font-size-override panel-background-1"><div class="display-flex flex-direction-row"><div class="image-width margin-xl"><img alt=${this.card?.title??c} src=${this._thumbnailUrl??c}></div><div class="display-flex flex-direction-column"><h1 class="title-font margin-block-start-end-0 padding-end-xxl padding-start-sm padding-top-xxl padding-bottom-xxl line-height-1 negative-tabbing-offset" tabindex=0>${this.card?.title}</h1><div class="display-flex flex-direction-column padding-bottom-xxl padding-start-sm"><div class="display-flex align-items-start padding-bottom-xxl"><div class="font-1 padding-end-1 line-height-xxl negative-tabbing-offset" tabindex=0>${this.card?.snippet}</div></div><div class="display-flex"><div class="display-flex"><calcite-label class="label-override icon-color tabbing-offset" layout=inline tabindex=0><calcite-icon class="icon-color" icon=projects scale=s></calcite-icon>${this._translations.aboutYourSolutionDeployedDate.replace("{{deployedDate}}",this.card?.created||"")}</calcite-label></div></div></div></div></div></calcite-panel>`}_getSolutionContents(){let e=[...new Set(this._nonSolutionDependencyItems.map(t=>t.controlItemId))];return i`<calcite-panel class="panel-background-1 padding-top-xxl"><calcite-accordion class="accordion-bg " icon-position=start scale=l appearance=transparent><calcite-accordion-item class="item-padding" expanded><div class="margin-block-start-end-0 heading-font " slot=content-start>${this._translations.solutionsContentsAndCount.replace("{{numberOfSolutions}}",this.templateInfos.length.toString())}</div><div class="overflow-auto">${this._accordionLoading?i`<calcite-loader .label=${this._translations.loadingText} scale=m></calcite-loader>`:i`<solution-item-accordion .itemRelationshipDependencies=${e} .listSelectionMode=${e.length>0?"multiple":"single"} .reuseWarning=${this._translations.itemUsedInOtherSolutions} .templateInfos=${this.templateInfos} .typeKeywords=${this.card?.typeKeywords}></solution-item-accordion>`}</div></calcite-accordion-item></calcite-accordion></calcite-panel>`}_getDeleteDialog(){return this._deleteDialogOpen?i`<solution-delete-dialog .card=${this.card} @solutionDeleted=${()=>setTimeout(()=>this.navTabSelected.emit({tabType:"deployments"}),100)} @solutionDeleteDialogBeforeClose=${()=>{this._deleteDialogOpen=!1}} .open=${this._deleteDialogOpen} source="Details Page"></solution-delete-dialog>`:""}_getSuccessDeployAlert(){return i`<calcite-alert auto-close auto-close-duration=medium icon=check-circle kind=success .label=${this._translations.deploySuccessAlert.replace("{{solutionTitle}}",this.card?.title??"")} .open=${this._showSuccessAlert} @calciteAlertClose=${()=>{this._showSuccessAlert=!1}}><div slot=title>${this._translations.deploySuccessAlert.replace("{{solutionTitle}}",this.card?.title??"")}</div></calcite-alert>`}_renderDiagramDialog(){return this._isDiagramOpen?i`<calcite-dialog class="dialog-y-size dialog-x-size panel-bg-color" .heading=${this._translations.diagramOfTheSolution.replace("{{solution}}",this.card?.title??"")} id=${this._translations.diagramOfTheSolution.replace("{{solution}}",this.card?.title??"")??c} modal .open=${this._isDiagramOpen} @calciteDialogClose=${()=>{this._isDiagramOpen=!1}} outside-close-disabled scale=m width=l><solution-item-diagram .diagramKey=${this.diagramKey!==""?this.diagramKey:this._configContextConsumer.value?.diagramKey??""} .templateInfoGraph=${this._templateInfoGraph} .typeKeywords=${this.card?.typeKeywords}></solution-item-diagram></calcite-dialog>`:""}async _deleteSolution(){this._deleteDialogOpen=!0}_updateThumbnailToken(e){this._thumbnailUrl!==""&&(this._thumbnailUrl=y(this._thumbnailUrl,e))}};f("solution-deployed-card-panel",p);return p},a,e,g)
2
+ import g from"./PNBTKFO6.js";import e from"./5Z32YRHM.js";import a from"./RTSKNY33.js";import{b as d}from"./PZ4L77M5.js";import{a as b}from"./LFIJXE3U.js";import{b as f}from"./VU3OQQKP.js";import{H as m,J as u,L as c,h,i,r as o}from"./46DQNAMV.js";export default $arcgis.t(([{A:y,K:n,a:x,b:v,u:_,w:w},{a:$},{d:g,h:C,i:D}])=>{var k=h`.negative-tabbing-offset[tabindex]:focus-visible{outline:2px solid var(--calcite-color-brand);outline-offset:-2px}.tabbing-offset[tabindex]:focus-visible{outline:2px solid var(--calcite-color-brand);outline-offset:2px}.font-weight-med{font-weight:var(--calcite-font-weight-medium)}.font-weight-bold{font-weight:var(--calcite-font-weight-bold)}.heading-font{font-size:var(--calcite-font-size-0);font-weight:var(--calcite-font-weight-medium)}.title-font{font-size:1.8rem;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-text-1)}.font-1{font-size:var(--calcite-spacing-lg)}.display-flex{display:flex}.display-none{display:none}.flex-direction-column{flex-direction:column}.flex-direction-row{flex-direction:row}@media(min-width:801px){.font-size-override .display-flex.flex-direction-row>.image-width+.display-flex{flex:1;min-width:0}}.icon-color{color:var(--calcite-color-text-3)}.padding-bottom-lg{padding-bottom:var(--calcite-spacing-lg)}.item-padding{--calcite-internal-accordion-item-padding: var(--calcite-spacing-xl)}.align-items-center{align-items:center}.align-items-start{align-items:start}.font-size-override{--calcite-font-size--2: var(--calcite-font-size--1)}.background-color-1{background-color:var(--calcite-color-foreground-1)}.background-color-2{background-color:var(--calcite-color-foreground-2)}.label-override{--calcite-label-margin-bottom: var(--calcite-spacing-none)}.position-relative{position:relative}.overflow-hidden{overflow:hidden}.overflow-auto{overflow:auto}.margin-block-start-end-0{margin-block-start:var(--calcite-spacing-none);margin-block-end:var(--calcite-spacing-none)}.panel-background-2{--calcite-panel-background-color: var(--calcite-color-foreground-2);background-color:var(--calcite-color-foreground-2)}.panel-background-1{--calcite-panel-background-color: var(--calcite-color-foreground-1);--calcite-shell-panel-background-color: var(--calcite-color-foreground-1)}.border-none{border:none}.font-color-1{color:var(--calcite-color-text-1)}.panel-bg-color{--calcite-panel-header-background-color: var(--calcite-color-foreground-1);--calcite-panel-background-color: var(--calcite-color-foreground-1)}.dialog-y-size{--calcite-dialog-size-y: 90% }.dialog-x-size{--calcite-dialog-size-x: 90% }.bottom-border{border-bottom:solid var(--calcite-spacing-px);color:var(--calcite-color-border-1)}.margin-start-end-xxl{margin-inline-start:var(--calcite-spacing-xxl);margin-inline-end:var(--calcite-spacing-xxl)}.margin-start-end-lg{margin-inline-start:var(--calcite-spacing-lg);margin-inline-end:var(--calcite-spacing-lg)}.margin-top-xxl{margin-top:var(--calcite-spacing-xxl)}.justify-between{justify-content:space-between}.items-baseline{align-items:baseline}.padding-xxl{padding:var(--calcite-spacing-xxl)}.padding-lg{padding:var(--calcite-spacing-lg)}.padding-top-xxl{padding-top:var(--calcite-spacing-xxl)}.padding-top-lg{padding-top:var(--calcite-spacing-lg)}.padding-bottom-xxl{padding-bottom:var(--calcite-spacing-xxl)}.padding-end-1{padding-inline-end:var(--calcite-spacing-lg)}.padding-end-xxl{padding-inline-end:var(--calcite-spacing-xxl)}.padding-start-sm{padding-inline-start:var(--calcite-spacing-sm)}.padding-start-xxl{padding-inline-start:var(--calcite-spacing-xxl)}.image-width{width:300px;flex-grow:0;flex-shrink:0}@media(max-width:1280px){.image-width{flex-grow:2;flex-shrink:.5}}img{max-width:100%;height:auto;overflow-clip-margin:content-box;overflow:clip;display:block}.margin-xl{margin:var(--calcite-spacing-xl)}.line-height-1{line-height:1.1}.line-height-xxl{line-height:var(--calcite-line-height-xxl)}@media(max-width:800px){.font-size-override .display-flex.flex-direction-row{flex-direction:column!important}.image-width{width:100%!important;max-width:100%!important;margin:0!important;padding:var(--calcite-spacing-lg)!important;padding-bottom:0!important;box-sizing:border-box}.image-width img{width:100%;max-width:100%}.margin-xl{margin:0!important}.image-width+.display-flex{padding-inline-start:var(--calcite-spacing-lg)!important;padding-inline-end:var(--calcite-spacing-lg)!important}.padding-start-sm{padding-inline-start:0!important}.title-font{padding-inline-start:0!important;padding-top:var(--calcite-spacing-lg)!important;padding-bottom:var(--calcite-spacing-lg)!important}.align-items-start.padding-bottom-xxl,.padding-bottom-xxl.padding-start-sm{padding-bottom:var(--calcite-spacing-lg)!important}}calcite-shell-panel{--calcite-shell-panel-max-width: 20rem;--calcite-shell-panel-width: 24vw}calcite-shell{block-size:unset}.solution-deployed-action{--calcite-color-focus: initial}`,p=class extends m{constructor(){super(),this.diagramKey="",this.open=!1,this.templateInfos=[],this._accordionLoading=!1,this._configureTitlesOpen=!1,this._deleteDialogOpen=!1,this._hasNewVersion=!1,this._isDiagramOpen=!1,this._isNameConflict=!1,this._invalidNameMessage="",this._showSuccessAlert=!1,this._showFailedAlert=!1,this._showItemUpdateLoading=!1,this.isMobile=!1,this._templateInfoGraph=[],this._thumbnailUrl="",this._translations=b({name:"solution-deployed-card-panel",blocking:!0}),this._configContextConsumer=d({context:v,subscribe:!0,callback:async e=>{e&&(this._isOrgAdmin=w(e.authentication),this._user=e.authentication?.Portal?.user)}}),this._isOrgAdmin=!1,this._isMobileContextConsumer=d({context:x,subscribe:!0,callback:e=>this.isMobile=e}),this.navTabSelected=o(),this.forceSelectTab=o(),this.sortTypeChanged=o(),this.solutionConfigureDialogClose=o(),this._nonSolutionDependencyItems=[],this.listenOn(window,"deployedCardSelected",this._deployedCardSelected),this.listenOn(window,"deployAppTabSelected",this._handleDeployAppTabSelected),this.listenOn(window,"displayDeployedCard",()=>{this._showSuccessAlert=!0}),this.listenOn(window,"sessionRefreshed",e=>{this._updateThumbnailToken(e.detail)})}static{this.properties={card:0,cardRef:1,diagramKey:1,open:5,templateInfos:0,_accordionLoading:16,_configureTitlesOpen:16,_deleteDialogOpen:16,_hasNewVersion:16,_isDiagramOpen:16,_isNameConflict:16,_invalidNameMessage:16,_showSuccessAlert:16,_showFailedAlert:16,_showItemUpdateLoading:16,isMobile:16,_templateInfoGraph:16,_thumbnailUrl:16,_translations:16,_nonSolutionDependencyItems:16}}static{this.styles=k}get _telemetry(){return this._configContextConsumer.value?.telemetrySession}async load(){if(this._isMobileContextConsumer.value&&(this.isMobile=this._isMobileContextConsumer.value),this.card?.thumbnailUrl){let e=this._configContextConsumer.value?.userSession,t=this.card?.thumbnailUrl.replace(/w=\d+/,"w=400");this._thumbnailUrl=`${t}&token=${e?.token}`}}willUpdate(e){if(e.has("card")){let t=this._configContextConsumer.value?.userSession,a=this.card?.thumbnailUrl.replace(/w=\d+/,"w=400");this._thumbnailUrl=`${a}&token=${t?.token}`}}render(){return this.isMobile?i`<calcite-shell class="position-relative background-color-2"><calcite-panel class="panel-background-2 border-none" slot=panel-bottom><div class="background-color-2 padding-top-lg">${this._getSolutionPanel()}</div><div class="background-color-1 margin-top-xxl">${this._getButtons()}${this._getOwnerSection()}<div class="bottom-border margin-start-end-xxl"></div>${this._getSolutionVersionCard()}</div>${this._getSolutionContents()}</calcite-panel></calcite-shell>`:i`<calcite-shell class="position-relative background-color-2"><calcite-panel class="padding-end-xxl panel-background-2 border-none" slot=panel-bottom><div class="display-flex flex-direction-column overflow-hidden"><div class="background-color-2 padding-top-xxl">${this._getSolutionPanel()}</div>${this._getSolutionContents()}</div></calcite-panel><calcite-shell-panel class="panel-background-1" slot=panel-end>${this._getButtons()}${this._getOwnerSection()}<div class="bottom-border margin-start-end-xxl"></div>${this._getSolutionVersionCard()}</calcite-shell-panel>${this._renderDiagramDialog()}${this._getConfigureTitlesDialog()}${this._getDeleteDialog()}${this._getSuccessDeployAlert()}</calcite-shell>`}async _deployedCardSelected(e){let t=e.detail;this.card=t.card,this.cardRef=t.cardRef,this.templateInfos=[],this._accordionLoading=!0,this.templateInfos=await this._getTemplates(),this._accordionLoading=!1;let a=await $(this._configContextConsumer.value.userSession,this.card);this._nonSolutionDependencyItems=a._nonSolutionDependencyItems;let l=C(this._configContextConsumer.value?.allCards||[],this.card.deployCommonId),s=!1;if(l){let r=g(l),S=g(this.card);s=r>S}this._hasNewVersion=s}_handleDeployAppTabSelected(e){e.detail==="deployed-card"&&this.sortTypeChanged.emit("")}_getButtons(){let e=this._configContextConsumer.value?.userSession?.username,t=this._configContextConsumer.value?.authentication?.CanUpdateSolution,a=this.card?.owner===e||this._isOrgAdmin||t,l=this.card?.owner===e||this._isOrgAdmin,s=a?"display-none":"",r=this.isMobile?"padding-lg":"padding-xxl";return i`<div class=${`display-flex flex-direction-column ${r}`}>${!this.isMobile&&i`<calcite-button appearance=outline class="padding-bottom-lg solution-deployed-action" kind=neutral @click=${this._openDiagram}>${this._translations.viewTheDiagram}</calcite-button>`||""}<calcite-button appearance=outline class="padding-bottom-lg solution-deployed-action" kind=neutral @click=${this._viewDocumentation}>${this._translations.solutionDocumentation}</calcite-button><calcite-button appearance=outline class="padding-bottom-lg solution-deployed-action" kind=neutral @click=${this._openItemDetails}>${this._translations.itemDetails}</calcite-button>${a&&!this.isMobile&&i`<calcite-button appearance=outline class="padding-bottom-lg solution-deployed-action" id=solution-configure-titles-button kind=neutral @click=${this._openConfigureTitlesDialog}>${this._translations.updateTitles}</calcite-button><calcite-tooltip class=${u(s)} overlay-positioning=fixed reference-element=solution-configure-titles-button><span>${this._translations.mustOwnSolution}</span></calcite-tooltip>`||""}${l&&!this.isMobile&&i`<calcite-button appearance=outline class="padding-bottom-lg solution-deployed-action" kind=neutral @click=${this._deleteSolution}>${this._translations.deleteSolution}</calcite-button>`||""}</div>`}_openConfigureTitlesDialog(){this._configureTitlesOpen=!0}_getConfigureTitlesDialog(){return this._configureTitlesOpen?i`<solution-configure-titles .card=${this.card} @solutionConfigureTitlesBeforeClose=${async()=>{this.templateInfos=await this._getTemplates(),this._configureTitlesOpen=!1}} @solutionItemsTitlesChanged=${async()=>{this.templateInfos=await this._getTemplates()}} .open=${this._configureTitlesOpen} source="Details Page" .templateInfos=${this.templateInfos}></solution-configure-titles>`:""}_viewDocumentation(e){e.stopPropagation(),this._telemetry?.logEvent({category:n.DEPLOYMENTS,action:"Open Help",dimensions:[this.card?.title||"",this.card?.deployCommonId||"",this.card?.deployVersion||"","Details Page"]}),window.open(this.card.learnMoreUrl,"_blank")}_openItemDetails(e){e.stopPropagation(),this._telemetry?.logEvent({category:n.DEPLOYMENTS,action:"Open Item Details",dimensions:[this.card?.title||"",this.card?.deployCommonId||"",this.card?.deployVersion||"","Details Page"]}),window.open(this.card.itemUrl,"_blank")}_getOwnerSection(){if(!this._configContextConsumer?.value)return;let e=this.isMobile?"margin-start-end-lg":"margin-start-end-xxl";return i`<div class=${`display-flex padding-bottom-xxl ${e} flex-direction-column`}><div class="display-flex justify-between items-baseline"><calcite-label class="font-weight-med label-override tabbing-offset" layout=inline scale=l tabindex=0>${this._translations.aboutYourSolutionOwner}</calcite-label></div><solution-user-avatar .fullname=${this._user?.username===this.card?.owner?this._user?.fullName:void 0} .lookupProfile=${this._user?.username!==this.card?.owner} .thumbnailUrl=${this._user?.username===this.card?.owner?this._user?.thumbnailUrl:void 0} .username=${this.card?.owner}></solution-user-avatar></div>`}async _openDiagram(e){e.stopPropagation();let t=await this._getTemplates();t&&(this._telemetry?.logEvent({category:n.DEPLOYMENTS,action:"View Diagram",dimensions:[this.card?.title||"",this.card?.deployCommonId||"",this.card?.deployVersion||"","Details Page"]}),this._templateInfoGraph=t,this._isDiagramOpen=!0)}async _getTemplates(){return this.cardRef?await this.cardRef.getTemplates():this.card?await _(this.card.id,this._configContextConsumer.value.userSession):void 0}_getSolutionVersionCard(){let e=this._hasNewVersion?this._translations.newVersionAvailable:this._translations.youHaveTheLatestVersion,t=this.isMobile?"padding-lg":"padding-xxl";return i`<div class=${`${t} display-flex flex-direction-column`}><calcite-label class="font-weight-med label-override tabbing-offset" layout=inline scale=l slot=heading tabindex=0>${this._translations.solutionVersion.replace("{{version}}",this.card?.deployVersion||"")}</calcite-label><div class="display-flex"><div class="display-flex flex-direction-row padding-top-lg align-items-center"><calcite-icon class="icon-color" icon=clock-forward scale=m></calcite-icon><div class="display-flex flex-direction-column padding-start-xxl"><span class="tabbing-offset" tabindex=0>${e}</span></div></div></div>${this._hasNewVersion?i`<calcite-button appearance=outline class="padding-top-lg solution-deployed-action" kind=neutral @click=${this._openNewVersionSolution} width=full>${this._translations.learnMoreNewVersion}</calcite-button>`:""}</div>`}async _openNewVersionSolution(e){e.stopPropagation(),this._telemetry?.logEvent({category:n.DEPLOYMENTS,action:"View Latest Version",dimensions:[this.card?.title||"",this.card?.deployCommonId||"",this.card?.deployVersion||""]}),await new Promise(a=>setTimeout(a,100));let t=D(this._configContextConsumer.value.allCards,this.card.deployCommonId);t&&this.forceSelectTab.emit({tabType:"details",tabTitleOrId:t})}_getSolutionPanel(){return i`<calcite-panel class="font-size-override panel-background-1"><div class="display-flex flex-direction-row"><div class="image-width margin-xl"><img alt=${this.card?.title??c} src=${this._thumbnailUrl??c}></div><div class="display-flex flex-direction-column"><h1 class="title-font margin-block-start-end-0 padding-end-xxl padding-start-sm padding-top-xxl padding-bottom-xxl line-height-1 negative-tabbing-offset" tabindex=0>${this.card?.title}</h1><div class="display-flex flex-direction-column padding-bottom-xxl padding-start-sm"><div class="display-flex align-items-start padding-bottom-xxl"><div class="font-1 padding-end-1 line-height-xxl negative-tabbing-offset" tabindex=0>${this.card?.snippet}</div></div><div class="display-flex"><div class="display-flex"><calcite-label class="label-override icon-color tabbing-offset" layout=inline tabindex=0><calcite-icon class="icon-color" icon=projects scale=s></calcite-icon>${this._translations.aboutYourSolutionDeployedDate.replace("{{deployedDate}}",this.card?.created||"")}</calcite-label></div></div></div></div></div></calcite-panel>`}_getSolutionContents(){let e=[...new Set(this._nonSolutionDependencyItems.map(t=>t.controlItemId))];return i`<calcite-panel class="panel-background-1 padding-top-xxl"><calcite-accordion class="accordion-bg " icon-position=start scale=l appearance=transparent><calcite-accordion-item class="item-padding" expanded><div class="margin-block-start-end-0 heading-font " slot=content-start>${this._translations.solutionsContentsAndCount.replace("{{numberOfSolutions}}",this.templateInfos.length.toString())}</div><div class="overflow-auto">${this._accordionLoading?i`<calcite-loader .label=${this._translations.loadingText} scale=m></calcite-loader>`:i`<solution-item-accordion .itemRelationshipDependencies=${e} .listSelectionMode=${e.length>0?"multiple":"single"} .reuseWarning=${this._translations.itemUsedInOtherSolutions} .templateInfos=${this.templateInfos} .typeKeywords=${this.card?.typeKeywords}></solution-item-accordion>`}</div></calcite-accordion-item></calcite-accordion></calcite-panel>`}_getDeleteDialog(){return this._deleteDialogOpen?i`<solution-delete-dialog .card=${this.card} @solutionDeleted=${()=>setTimeout(()=>this.navTabSelected.emit({tabType:"deployments"}),100)} @solutionDeleteDialogBeforeClose=${()=>{this._deleteDialogOpen=!1}} .open=${this._deleteDialogOpen} source="Details Page"></solution-delete-dialog>`:""}_getSuccessDeployAlert(){return i`<calcite-alert auto-close auto-close-duration=medium icon=check-circle kind=success .label=${this._translations.deploySuccessAlert.replace("{{solutionTitle}}",this.card?.title??"")} .open=${this._showSuccessAlert} @calciteAlertClose=${()=>{this._showSuccessAlert=!1}}><div slot=title>${this._translations.deploySuccessAlert.replace("{{solutionTitle}}",this.card?.title??"")}</div></calcite-alert>`}_renderDiagramDialog(){return this._isDiagramOpen?i`<calcite-dialog class="dialog-y-size dialog-x-size panel-bg-color" .heading=${this._translations.diagramOfTheSolution.replace("{{solution}}",this.card?.title??"")} id=${this._translations.diagramOfTheSolution.replace("{{solution}}",this.card?.title??"")??c} modal .open=${this._isDiagramOpen} @calciteDialogClose=${()=>{this._isDiagramOpen=!1}} outside-close-disabled scale=m width=l><solution-item-diagram .diagramKey=${this.diagramKey!==""?this.diagramKey:this._configContextConsumer.value?.diagramKey??""} .templateInfoGraph=${this._templateInfoGraph} .typeKeywords=${this.card?.typeKeywords}></solution-item-diagram></calcite-dialog>`:""}async _deleteSolution(){this._deleteDialogOpen=!0}_updateThumbnailToken(e){this._thumbnailUrl!==""&&(this._thumbnailUrl=y(this._thumbnailUrl,e))}};f("solution-deployed-card-panel",p);return p},a,e,g)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import{b as p}from"./Y7OWLSUL.js";import{H as a,h as i,i as n,u as r}from"./46DQNAMV.js";import"./OR4HXHSY.js";var h=i`@layer{:host{display:block}}`,e=class extends a{constructor(){super(...arguments),this.inTour=!1,this.instantAppsPopovers=new Map,this.beforeOpen=async()=>await Promise.resolve()}static{this.properties={inTour:7,currentId:3,instantAppsPopovers:0,beforeOpen:0}}static{this.styles=h}static{this.shadowRootOptions=r}async beginTour(){this.inTour=!0,this.handlePopoverProps({pagination:!0,disableAction:!0});let s=Array.from(this.instantAppsPopovers.keys());await this.open(s[0])}async close(s){let t=this.instantAppsPopovers.get(s)?.firstElementChild;t&&(t.open=!1)}async endTour(){await this.close(this.currentId),this.inTour=!1,this.handlePopoverProps({pagination:!1,disableAction:!1})}async open(s){await this.beforeOpen();let t=this.instantAppsPopovers.get(s)?.firstElementChild;t.open=!0}async next(){let s=Array.from(this.instantAppsPopovers.keys()),t=s.indexOf(this.currentId)+1,o=s[t];await this.close(this.currentId),await this.open(o)}async previous(){let s=Array.from(this.instantAppsPopovers.keys()),t=s.indexOf(this.currentId)-1,o=s[t];await this.close(this.currentId),await this.open(o)}async done(){await this.endTour()}load(){let s=this.el.querySelector("[slot='popovers']");(s?Array.from(s.children):[]).forEach((t,o)=>{let c=t.getAttribute("ref-id");t.parent=this,t.index=o,this.instantAppsPopovers.set(c,t)}),this.listen("calcitePopoverOpen",t=>{let o=t.target.getAttribute("ref-id")??"";this.currentId=o})}handlePopoverProps(s){Array.from(this.el.querySelector("[slot='popovers']")?.children??[]).forEach(t=>{t.disableAction=s.disableAction,t.pagination=s.pagination})}render(){return n`<slot name=popovers></slot>`}};p("instant-apps-popovers",e);export{e as InstantAppsPopovers};
2
+ import{b as p}from"./3LEJ44U2.js";import{H as a,h as i,i as n,u as r}from"./46DQNAMV.js";import"./OR4HXHSY.js";var h=i`@layer{:host{display:block}}`,e=class extends a{constructor(){super(...arguments),this.inTour=!1,this.instantAppsPopovers=new Map,this.beforeOpen=async()=>await Promise.resolve()}static{this.properties={inTour:7,currentId:3,instantAppsPopovers:0,beforeOpen:0}}static{this.styles=h}static{this.shadowRootOptions=r}async beginTour(){this.inTour=!0,this.handlePopoverProps({pagination:!0,disableAction:!0});let s=Array.from(this.instantAppsPopovers.keys());await this.open(s[0])}async close(s){let t=this.instantAppsPopovers.get(s)?.firstElementChild;t&&(t.open=!1)}async endTour(){await this.close(this.currentId),this.inTour=!1,this.handlePopoverProps({pagination:!1,disableAction:!1})}async open(s){await this.beforeOpen();let t=this.instantAppsPopovers.get(s)?.firstElementChild;t.open=!0}async next(){let s=Array.from(this.instantAppsPopovers.keys()),t=s.indexOf(this.currentId)+1,o=s[t];await this.close(this.currentId),await this.open(o)}async previous(){let s=Array.from(this.instantAppsPopovers.keys()),t=s.indexOf(this.currentId)-1,o=s[t];await this.close(this.currentId),await this.open(o)}async done(){await this.endTour()}load(){let s=this.el.querySelector("[slot='popovers']");(s?Array.from(s.children):[]).forEach((t,o)=>{let c=t.getAttribute("ref-id");t.parent=this,t.index=o,this.instantAppsPopovers.set(c,t)}),this.listen("calcitePopoverOpen",t=>{let o=t.target.getAttribute("ref-id")??"";this.currentId=o})}handlePopoverProps(s){Array.from(this.el.querySelector("[slot='popovers']")?.children??[]).forEach(t=>{t.disableAction=s.disableAction,t.pagination=s.pagination})}render(){return n`<slot name=popovers></slot>`}};p("instant-apps-popovers",e);export{e as InstantAppsPopovers};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import b from"./G6KHKVTN.js";import a from"./GPP5RTWG.js";import{a as $}from"./4T7P5RXF.js";import{a as L}from"./N4KU3YV3.js";import{b as I}from"./Y7OWLSUL.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import{H as d,J as h,i as n,u}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([,{e:i,f:f,h:C,j:k,m:c}])=>{var y="instant-apps-language-translator",O={lastItem:`${y}--last-item`},g=class extends d{constructor(){super(...arguments),this._messages=L({name:"instant-apps-language-translator",blocking:!0})}static{this.shadowRootOptions=u}render(){return k(this.el?.parentElement?.locales)?.length>0?this.renderUIData():this.renderNotice()}renderUIData(){if(!i?.uiData)return;let a=C();return n`<div>${a?.map((e,s)=>this.renderUIDataItem(e,s,a.length))}</div>`}renderUIDataItem(a,e,s){let r=this.el.parentElement,m=r.appSettings,b=m?.translatedLanguageLabels?.[i.currentLanguage],v=e===s-1?O.lastItem:"",D=m.content.find(t=>t.id===a);return $(`${a}-${e}`,n`<instant-apps-language-translator-item class=${h(v)} .fieldName=${a} .translatedLanguageLabels=${b} .setting=${D} .userLocaleInputOnChangeCallback=${async(t,l)=>{try{await r.userLocaleInputOnChangeCallback(t,l);let o=f.get("portalItemResource");c(o)}catch{}}} .translatedLocaleInputOnChangeCallback=${async(t,l,o,p)=>{try{await r.translatedLocaleInputOnChangeCallback(t,l,o,p),c(p)}catch{}}}></instant-apps-language-translator-item>`)}renderNotice(){let a=this._messages.noLanguage;return n`<calcite-notice open icon=exclamation-mark-triangle kind=warning><div slot=title>${a?.title}</div><div slot=message>${a?.message}</div></calcite-notice>`}};I("instant-apps-language-translator-content",g);return g},a,b)
2
+ import b from"./G6KHKVTN.js";import a from"./GPP5RTWG.js";import{a as $}from"./4T7P5RXF.js";import{a as L}from"./TPRPYUVX.js";import{b as I}from"./3LEJ44U2.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import{H as d,J as h,i as n,u}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([,{e:i,f:f,h:C,j:k,m:c}])=>{var y="instant-apps-language-translator",O={lastItem:`${y}--last-item`},g=class extends d{constructor(){super(...arguments),this._messages=L({name:"instant-apps-language-translator",blocking:!0})}static{this.shadowRootOptions=u}render(){return k(this.el?.parentElement?.locales)?.length>0?this.renderUIData():this.renderNotice()}renderUIData(){if(!i?.uiData)return;let a=C();return n`<div>${a?.map((e,s)=>this.renderUIDataItem(e,s,a.length))}</div>`}renderUIDataItem(a,e,s){let r=this.el.parentElement,m=r.appSettings,b=m?.translatedLanguageLabels?.[i.currentLanguage],v=e===s-1?O.lastItem:"",D=m.content.find(t=>t.id===a);return $(`${a}-${e}`,n`<instant-apps-language-translator-item class=${h(v)} .fieldName=${a} .translatedLanguageLabels=${b} .setting=${D} .userLocaleInputOnChangeCallback=${async(t,l)=>{try{await r.userLocaleInputOnChangeCallback(t,l);let o=f.get("portalItemResource");c(o)}catch{}}} .translatedLocaleInputOnChangeCallback=${async(t,l,o,p)=>{try{await r.translatedLocaleInputOnChangeCallback(t,l,o,p),c(p)}catch{}}}></instant-apps-language-translator-item>`)}renderNotice(){let a=this._messages.noLanguage;return n`<calcite-notice open icon=exclamation-mark-triangle kind=warning><div slot=title>${a?.title}</div><div slot=message>${a?.message}</div></calcite-notice>`}};I("instant-apps-language-translator-content",g);return g},a,b)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import{I as s}from"./46DQNAMV.js";var t=s({defaultAssetPath:"https://js.arcgis.com/5.0.1/instant-apps-components/",hydratedAttribute:"hydrated"}),{customElement:n,getAssetPath:i,setAssetPath:p}=t;t.t=void 0;t.o=void 0;t.c=void 0;t.r=void 0;export{t as a,n as b,i as c};
2
+ import{I as s}from"./46DQNAMV.js";var t=s({defaultAssetPath:"https://js.arcgis.com/5.0.4/instant-apps-components/",hydratedAttribute:"hydrated"}),{customElement:n,getAssetPath:i,setAssetPath:p}=t;t.t=void 0;t.o=void 0;t.c=void 0;t.r=void 0;export{t as a,n as b,i as c};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import{a as S}from"./SA34OEYY.js";import"./Y7OWLSUL.js";import c from"./ZL6A7VRS.js";import"./PZ4L77M5.js";import"./DD3JC2L3.js";import b from"./KDIUYXBA.js";import a from"./UUYUTETH.js";import{a as $}from"./LFIJXE3U.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import"./AOBFPJ2R.js";import"./JK6XUSIM.js";import"./UPHYUDLT.js";import"./QJJXVRMV.js";import"./7FMLZNDR.js";import"./LL5C4DHP.js";import"./WPAMUSBR.js";import"./XJPOVJV7.js";import"./LDNQ56OK.js";import"./3HUY3T5F.js";import"./Z6G5PBUQ.js";import"./J3QMHA2M.js";import"./TKZAMPEI.js";import"./2IHQU2FX.js";import"./CGLFPVBM.js";import"./OEJAW72H.js";import"./5JJMGPOW.js";import"./TYX345MZ.js";import"./5UWT66A7.js";import{b as v}from"./VU3OQQKP.js";import{F as p,G as r,H as I,J as f,h as y,i as l,l as m,r as d,u as g}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([F,x,P,,{c:w,j:M},{C:u,o:L}])=>{function k(n){return n?.indexOf("http://")!==-1}function b(n){return k(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 V=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._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._mapPicker=p(),this._mapTools=p(),this._mobMapTools=p(),this._mapLayerPicker=p(),this._selectedWebMapId="",this._isValidWebMap=!0,this.mapChanged=d(),this.beforeMapChanged=d(),this.toggleFilter=d(),this.clearSelection=d(),this.editMultipleFeatures=d(),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,_configLayerOrderDefined:16,_translations:16,_searchConfiguration:16,_webMapInfo:16,_toolInfos:16,_filterActive:16,_mapDivHeight:16,_mapDivWidth:16,_layerIds:16}}static{this.styles=V}static{this.shadowRootOptions=g}willUpdate(e){e.has("appLayout")&&this.appLayoutWatchHandler(),e.has("mapView")&&this.mapViewWatchHandler(),e.has("mapInfo")&&this.mapInfoWatchHandler(),e.has("selectedFeaturesIds")&&this.selectedFeaturesIdsWatchHandler()}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",h=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" ${r(this._mapDiv)}></div></div>${l`<map-tools .basemapConfig=${this.basemapConfig} class=${`box-shadow ${i} ${s}`} .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} ${r(this._mapTools)}></map-tools><map-tools class=${`box-shadow ${i} ${h}`} .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} ${r(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,h=i&&e?.id===this.defaultWebmapId;if(this._loadedId!==s&&!i||h){let o=new P({portalItem:{id:s}});try{o&&await o.load(),this.appProxies&&o&&await T(o,F,this.appProxies),this.mapView=new x({container:this._mapDiv.value,map:o,resizeAlign:"center"}),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=h?!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} ${r(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 ${r(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._getActions():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} ${r(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}),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"];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()}_getActions(){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,h,o,c){let W=this.selectedLayer===void 0?!0:h;return l`<calcite-action .active=${e} appearance=solid .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)
2
+ import{a as S}from"./UGKLBL7D.js";import"./3LEJ44U2.js";import c from"./RTSKNY33.js";import"./PZ4L77M5.js";import"./JE7L7M3J.js";import b from"./KDIUYXBA.js";import a from"./UUYUTETH.js";import{a as $}from"./LFIJXE3U.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import"./AOBFPJ2R.js";import"./JK6XUSIM.js";import"./UPHYUDLT.js";import"./QJJXVRMV.js";import"./7FMLZNDR.js";import"./LL5C4DHP.js";import"./WPAMUSBR.js";import"./XJPOVJV7.js";import"./LDNQ56OK.js";import"./3HUY3T5F.js";import"./Z6G5PBUQ.js";import"./J3QMHA2M.js";import"./TKZAMPEI.js";import"./2IHQU2FX.js";import"./CGLFPVBM.js";import"./OEJAW72H.js";import"./5JJMGPOW.js";import"./TYX345MZ.js";import"./5UWT66A7.js";import{b as v}from"./VU3OQQKP.js";import{F as p,G as r,H as I,J as f,h as y,i as l,l as m,r as d,u as g}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([F,x,P,,{c:w,j:M},{C:u,o:L}])=>{function k(n){return n?.indexOf("http://")!==-1}function b(n){return k(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 V=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._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._mapPicker=p(),this._mapTools=p(),this._mobMapTools=p(),this._mapLayerPicker=p(),this._selectedWebMapId="",this._isValidWebMap=!0,this.mapChanged=d(),this.beforeMapChanged=d(),this.toggleFilter=d(),this.clearSelection=d(),this.editMultipleFeatures=d(),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,_configLayerOrderDefined:16,_translations:16,_searchConfiguration:16,_webMapInfo:16,_toolInfos:16,_filterActive:16,_mapDivHeight:16,_mapDivWidth:16,_layerIds:16}}static{this.styles=V}static{this.shadowRootOptions=g}willUpdate(e){e.has("appLayout")&&this.appLayoutWatchHandler(),e.has("mapView")&&this.mapViewWatchHandler(),e.has("mapInfo")&&this.mapInfoWatchHandler(),e.has("selectedFeaturesIds")&&this.selectedFeaturesIdsWatchHandler()}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",h=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" ${r(this._mapDiv)}></div></div>${l`<map-tools .basemapConfig=${this.basemapConfig} class=${`box-shadow ${i} ${s}`} .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} ${r(this._mapTools)}></map-tools><map-tools class=${`box-shadow ${i} ${h}`} .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} ${r(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,h=i&&e?.id===this.defaultWebmapId;if(this._loadedId!==s&&!i||h){let o=new P({portalItem:{id:s}});try{o&&await o.load(),this.appProxies&&o&&await T(o,F,this.appProxies),this.mapView=new x({container:this._mapDiv.value,map:o,resizeAlign:"center"}),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=h?!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} ${r(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 ${r(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._getActions():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} ${r(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}),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"];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()}_getActions(){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,h,o,c){let W=this.selectedLayer===void 0?!0:h;return l`<calcite-action .active=${e} appearance=solid .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)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import{a as M}from"./SA34OEYY.js";import"./Y7OWLSUL.js";import b from"./KDIUYXBA.js";import a from"./UUYUTETH.js";import{a as L}from"./LFIJXE3U.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import{b as I}from"./VU3OQQKP.js";import{F as h,G as r,H as $,J as d,K as v,h as g,i as l,l as w,r as _,u as y}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([,{d:C}])=>{var F=g`@layer{:host{display:block;--calcite-label-margin-bottom: 0px;--solutions-theme-foreground-color: var(--calcite-color-foreground-1)}.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-background)}.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 ${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._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._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),M(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,_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}}static{this.styles=F}static{this.shadowRootOptions=y}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()}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._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 C(this._mapView,t);i&&await i.when(()=>{i.isTable&&!this._isMobile&&(this.appLayout="tableView"),this._layer=i,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"}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 l`${this._showInvalidMapAlert&&l`<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?l`<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?l`<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",s=this.theme==="dark"?"calcite-mode-dark":"calcite-mode-light",o=document.dir==="rtl"?"left-0":"right-0";return l`<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&&l`<div class=${`floating-container ${o}`} @click=${this.coverPageButtonClick}><calcite-button appearance=solid class=${`floating-button ${s}`} icon-start=content-minimal kind=neutral label round scale=l split-child=primary width=auto></calcite-button></div>`||""}${this.introductionWindowEnabled&&l`<div class=${`floating-container ${o}`} @click=${this.infoButtonClick}><calcite-button appearance=solid class=${`floating-button ${s}`} icon-start=information-letter kind=neutral label 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 l`<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",s=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 l`<div class=${`${a} overflow-hidden`} id=card-mapView><map-card .appLayout=${this.appLayout} .appProxies=${this.appProxies} .basemapConfig=${this.basemapConfig} class="width-full" .defaultLayerId=${s?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-widgets-size=m .showOnlyUpdatableLayers=${this.onlyShowUpdatableLayers} @toggleFilter=${this._toggleFilter} .selectedFeaturesIds=${this._layerTable.value?.selectedIds??[]} .selectedLayer=${this._layer} .shareIncludeEmbed=${this.shareIncludeEmbed} .shareIncludeSocial=${this.shareIncludeSocial} 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":"",s=this._currentMapInfos?.length>1&&this.appLayout==="tableView"?"position-relative top-51":"",o=this.appLayout!=="tableView"?"position-sticky":"";return l`<div class=${`${i} ${e} ${a} ${s} ${o}`} style=${v({"--calcite-color-foreground-1":this.popupHeaderColor,"--calcite-color-foreground-2":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?l`<div class=${`display-flex align-items-center ${t}`} slot=header-content><calcite-icon icon=information scale=s></calcite-icon><div class="padding-inline-start-75">${this._translations.information}</div></div>`:l`<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",s=this._layerTable.value&&this._layerTable.value.selectedRelatedIds?.length>0?this._relatedTableLayer:this._layer;return l`<div class=${`width-50 height-full ${a}`}><card-manager class=${`${i} width-full`} .customInfoText=${this.customInfoText} .enableCreateFeatures=${this._enableCreateFeatures&&!this._isMobile} .createBtnLabel=${this._mapInfo?.createFeatureButtonLabel} .enableEditGeometry=${this._mapInfo?.enableEditGeometry} .enableSnapping=${this.enableSnapping} .isMobile=${this._isMobile} .layerOrTable=${s} .mapView=${this?._mapView} @backFromCreateWorkFlow=${()=>{this._showInformationHeader=!0}} @createWorkFlowStarted=${()=>{this.appLayout=s?.isTable?"tableView":"mapView",this._showInformationHeader=!1}} @featureOrRecordSubmitted=${()=>this._layerTable.value&&void this._layerTable.value.refresh()} .selectedFeaturesIds=${this._layerTable.value?.selectedIds} .selectingFeatureFromMap=${this.appLayout==="mapView"} .showSketchWidgets=${s?.geometryType!=="point"} .zoomAndScrollToSelected=${this.zoomAndScrollToSelected}></card-manager></div>`}_getTable(e,t,i){let a=this.appLayout==="mapView",s=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,x=this._isMobile?"border-top":"",f=this.defaultGlobalId?this.defaultGlobalId?.indexOf(",")>-1?this.defaultGlobalId.split(","):[this.defaultGlobalId]:void 0,T=this.defaultOid?this.defaultOid?.indexOf(",")>-1?this.defaultOid.split(",").map(S=>Number.parseInt(S,10)):[Number.parseInt(this.defaultOid,10)]:void 0;return l`<calcite-shell class=${`${c} ${x} border-bottom z-index-1`}>${this._isMobile?void 0:l`<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?f:void 0} .defaultLayerId=${b?this.defaultLayer:""} .defaultOid=${b&&!f?T: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=${s} .mapInfo=${this._mapInfo} .mapView=${this?._mapView} .showOnlyUpdatableLayers=${this.onlyShowUpdatableLayers} @toggleFilter=${this._toggleFilter} .shareIncludeEmbed=${this.shareIncludeEmbed} .shareIncludeSocial=${this.shareIncludeSocial} .showNewestFirst=${this.showNewestFirst} .zoomAndScrollToSelected=${this.zoomAndScrollToSelected} .zoomToScale=${this.zoomToScale} ${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,s="toggle-layout";return l`<calcite-action .active=${this.appLayout==="splitView"} alignment=center appearance=solid class="toggle-node" icon=browser id=browser-action @click=${()=>{this.appLayout="splitView"}} text></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 appearance=solid class="toggle-node" icon=dock-left id=dock-left-action @click=${()=>{this.appLayout="tableView"}} text></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 appearance=solid class="toggle-node" .disabled=${this._layer?.isTable} icon=browser-map id=browser-map-action @click=${()=>{this.appLayout="mapView"}} text></calcite-action><calcite-tooltip placement=right reference-element=browser-map-action><span>${this._translations.mapView}</span></calcite-tooltip><calcite-action alignment=center appearance=solid class="toggle-node" .icon=${i} id=${s} @click=${()=>this._toggleLayout()} slot=actions-end text></calcite-action><calcite-tooltip placement=bottom .referenceElement=${s}><span>${a}</span></calcite-tooltip>`}_deleteModal(){let e=(this._layerTable.value?.selectedRelatedIds?.length??0)>0?this._relatedTableLayer:this._layer;return l`<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 l`<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&&l`<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 l`<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&&l`<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))}_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);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)
2
+ import{a as M}from"./UGKLBL7D.js";import"./3LEJ44U2.js";import b from"./KDIUYXBA.js";import a from"./UUYUTETH.js";import{a as L}from"./LFIJXE3U.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import{b as I}from"./VU3OQQKP.js";import{F as h,G as r,H as $,J as d,K as v,h as g,i as l,l as w,r as _,u as y}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([,{d:C}])=>{var F=g`@layer{:host{display:block;--calcite-label-margin-bottom: 0px;--solutions-theme-foreground-color: var(--calcite-color-foreground-1)}.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-background)}.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 ${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._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._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),M(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,_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}}static{this.styles=F}static{this.shadowRootOptions=y}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()}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._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 C(this._mapView,t);i&&await i.when(()=>{i.isTable&&!this._isMobile&&(this.appLayout="tableView"),this._layer=i,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"}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 l`${this._showInvalidMapAlert&&l`<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?l`<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?l`<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",s=this.theme==="dark"?"calcite-mode-dark":"calcite-mode-light",o=document.dir==="rtl"?"left-0":"right-0";return l`<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&&l`<div class=${`floating-container ${o}`} @click=${this.coverPageButtonClick}><calcite-button appearance=solid class=${`floating-button ${s}`} icon-start=content-minimal kind=neutral label round scale=l split-child=primary width=auto></calcite-button></div>`||""}${this.introductionWindowEnabled&&l`<div class=${`floating-container ${o}`} @click=${this.infoButtonClick}><calcite-button appearance=solid class=${`floating-button ${s}`} icon-start=information-letter kind=neutral label 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 l`<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",s=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 l`<div class=${`${a} overflow-hidden`} id=card-mapView><map-card .appLayout=${this.appLayout} .appProxies=${this.appProxies} .basemapConfig=${this.basemapConfig} class="width-full" .defaultLayerId=${s?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-widgets-size=m .showOnlyUpdatableLayers=${this.onlyShowUpdatableLayers} @toggleFilter=${this._toggleFilter} .selectedFeaturesIds=${this._layerTable.value?.selectedIds??[]} .selectedLayer=${this._layer} .shareIncludeEmbed=${this.shareIncludeEmbed} .shareIncludeSocial=${this.shareIncludeSocial} 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":"",s=this._currentMapInfos?.length>1&&this.appLayout==="tableView"?"position-relative top-51":"",o=this.appLayout!=="tableView"?"position-sticky":"";return l`<div class=${`${i} ${e} ${a} ${s} ${o}`} style=${v({"--calcite-color-foreground-1":this.popupHeaderColor,"--calcite-color-foreground-2":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?l`<div class=${`display-flex align-items-center ${t}`} slot=header-content><calcite-icon icon=information scale=s></calcite-icon><div class="padding-inline-start-75">${this._translations.information}</div></div>`:l`<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",s=this._layerTable.value&&this._layerTable.value.selectedRelatedIds?.length>0?this._relatedTableLayer:this._layer;return l`<div class=${`width-50 height-full ${a}`}><card-manager class=${`${i} width-full`} .customInfoText=${this.customInfoText} .enableCreateFeatures=${this._enableCreateFeatures&&!this._isMobile} .createBtnLabel=${this._mapInfo?.createFeatureButtonLabel} .enableEditGeometry=${this._mapInfo?.enableEditGeometry} .enableSnapping=${this.enableSnapping} .isMobile=${this._isMobile} .layerOrTable=${s} .mapView=${this?._mapView} @backFromCreateWorkFlow=${()=>{this._showInformationHeader=!0}} @createWorkFlowStarted=${()=>{this.appLayout=s?.isTable?"tableView":"mapView",this._showInformationHeader=!1}} @featureOrRecordSubmitted=${()=>this._layerTable.value&&void this._layerTable.value.refresh()} .selectedFeaturesIds=${this._layerTable.value?.selectedIds} .selectingFeatureFromMap=${this.appLayout==="mapView"} .showSketchWidgets=${s?.geometryType!=="point"} .zoomAndScrollToSelected=${this.zoomAndScrollToSelected}></card-manager></div>`}_getTable(e,t,i){let a=this.appLayout==="mapView",s=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,x=this._isMobile?"border-top":"",f=this.defaultGlobalId?this.defaultGlobalId?.indexOf(",")>-1?this.defaultGlobalId.split(","):[this.defaultGlobalId]:void 0,T=this.defaultOid?this.defaultOid?.indexOf(",")>-1?this.defaultOid.split(",").map(S=>Number.parseInt(S,10)):[Number.parseInt(this.defaultOid,10)]:void 0;return l`<calcite-shell class=${`${c} ${x} border-bottom z-index-1`}>${this._isMobile?void 0:l`<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?f:void 0} .defaultLayerId=${b?this.defaultLayer:""} .defaultOid=${b&&!f?T: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=${s} .mapInfo=${this._mapInfo} .mapView=${this?._mapView} .showOnlyUpdatableLayers=${this.onlyShowUpdatableLayers} @toggleFilter=${this._toggleFilter} .shareIncludeEmbed=${this.shareIncludeEmbed} .shareIncludeSocial=${this.shareIncludeSocial} .showNewestFirst=${this.showNewestFirst} .zoomAndScrollToSelected=${this.zoomAndScrollToSelected} .zoomToScale=${this.zoomToScale} ${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,s="toggle-layout";return l`<calcite-action .active=${this.appLayout==="splitView"} alignment=center appearance=solid class="toggle-node" icon=browser id=browser-action @click=${()=>{this.appLayout="splitView"}} text></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 appearance=solid class="toggle-node" icon=dock-left id=dock-left-action @click=${()=>{this.appLayout="tableView"}} text></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 appearance=solid class="toggle-node" .disabled=${this._layer?.isTable} icon=browser-map id=browser-map-action @click=${()=>{this.appLayout="mapView"}} text></calcite-action><calcite-tooltip placement=right reference-element=browser-map-action><span>${this._translations.mapView}</span></calcite-tooltip><calcite-action alignment=center appearance=solid class="toggle-node" .icon=${i} id=${s} @click=${()=>this._toggleLayout()} slot=actions-end text></calcite-action><calcite-tooltip placement=bottom .referenceElement=${s}><span>${a}</span></calcite-tooltip>`}_deleteModal(){let e=(this._layerTable.value?.selectedRelatedIds?.length??0)>0?this._relatedTableLayer:this._layer;return l`<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 l`<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&&l`<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 l`<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&&l`<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))}_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);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)