@esri/solutions-components 5.1.0 → 5.1.1

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 (157) hide show
  1. package/dist/cdn/{LV5KMTCD.js → 224NND54.js} +1 -1
  2. package/dist/cdn/{Y2MAVMNV.js → 2MDEEI52.js} +1 -1
  3. package/dist/cdn/{R27S3IDW.js → 3BL4GCSN.js} +1 -1
  4. package/dist/cdn/{MKSUYITL.js → 3T56IY7B.js} +1 -1
  5. package/dist/cdn/{SEG43OPO.js → 4G5PYXFM.js} +1 -1
  6. package/dist/cdn/{CVXDL2AT.js → 4MAH5ULJ.js} +1 -1
  7. package/dist/cdn/4RWJ22V3.js +2 -0
  8. package/dist/cdn/{PIAGRMMB.js → 4SYZADNV.js} +47 -47
  9. package/dist/cdn/{FSHV53TK.js → 4VP3KTLL.js} +1 -1
  10. package/dist/cdn/{EWS72RFR.js → 5A5W5PLO.js} +1 -1
  11. package/dist/cdn/{TWN7DOAU.js → 5FW45CM6.js} +1 -1
  12. package/dist/cdn/{YUI2MSOK.js → 5VUSSAPX.js} +1 -1
  13. package/dist/cdn/{5UW2NTSN.js → 5YD3IE6V.js} +1 -1
  14. package/dist/cdn/{TWJ6DAY5.js → 65I4AUS4.js} +1 -1
  15. package/dist/cdn/{GMAAQEP7.js → 67KMG355.js} +1 -1
  16. package/dist/cdn/{2R7Y2ZVX.js → 6CVQ3V2G.js} +1 -1
  17. package/dist/cdn/{RCWYHGZ5.js → 6FNUCCS3.js} +1 -1
  18. package/dist/cdn/{OYRMCWNZ.js → 7GVLJERR.js} +1 -1
  19. package/dist/cdn/{BI3I22IR.js → AIM6JKQK.js} +3 -3
  20. package/dist/cdn/{DIBK4RSG.js → AIZ2P72X.js} +1 -1
  21. package/dist/cdn/{KSIYOSLP.js → AXEZNIEX.js} +1 -1
  22. package/dist/cdn/{TZHRYPII.js → B7CVHLVL.js} +1 -1
  23. package/dist/cdn/{3A3CPQX4.js → B7TH7XYI.js} +1 -1
  24. package/dist/cdn/{JO6WZKYF.js → BQ2LFMED.js} +1 -1
  25. package/dist/cdn/{VPXGD2H4.js → CJJEWE3Q.js} +1 -1
  26. package/dist/cdn/{WNVC3PSY.js → D25JFQEK.js} +1 -1
  27. package/dist/cdn/D5OMLQMV.js +2 -0
  28. package/dist/cdn/{6FY64JKN.js → DEATAJID.js} +1 -1
  29. package/dist/cdn/{LGWAEUZM.js → DGY2VKHA.js} +1 -1
  30. package/dist/cdn/{5X43GK3C.js → DJXQKOIX.js} +1 -1
  31. package/dist/cdn/DQPIAF2T.js +3 -0
  32. package/dist/cdn/{V5UJ5VTY.js → DXQBDTBG.js} +1 -1
  33. package/dist/cdn/{BIX5DRQP.js → E4OPUBGE.js} +1 -1
  34. package/dist/cdn/{NXX22DHX.js → E5A7A2YY.js} +1 -1
  35. package/dist/cdn/{47FRMYZ4.js → ECUD4NU6.js} +1 -1
  36. package/dist/cdn/EL34IIAJ.js +2 -0
  37. package/dist/cdn/{Y6JJY3IC.js → ERQAH6G3.js} +1 -1
  38. package/dist/cdn/{SXTON3QW.js → EWIPITVN.js} +1 -1
  39. package/dist/cdn/{7O4E4IAA.js → F6LBLCUM.js} +1 -1
  40. package/dist/cdn/{M6AOD7GG.js → FDNEF4QD.js} +1 -1
  41. package/dist/cdn/{SXEL7KTE.js → G772MFBV.js} +1 -1
  42. package/dist/cdn/{O4DB2EXV.js → GSLDFLWZ.js} +1 -1
  43. package/dist/cdn/{6GBSXKKJ.js → GSOMYPWB.js} +1 -1
  44. package/dist/cdn/{Q4UI3ZGH.js → GV3GU3O3.js} +1 -1
  45. package/dist/cdn/{PUYJYHQM.js → GYVIOOMC.js} +1 -1
  46. package/dist/cdn/{PM4EFNB2.js → HMZ4VIJQ.js} +1 -1
  47. package/dist/cdn/{G4V4JPFI.js → HOSSEVH5.js} +1 -1
  48. package/dist/cdn/{RRWG2OJP.js → HQIM7CQS.js} +1 -1
  49. package/dist/cdn/{IXRFWVBT.js → IGY23J7D.js} +1 -1
  50. package/dist/cdn/{56DNSWXG.js → IVMHEGLY.js} +1 -1
  51. package/dist/cdn/{F4MS4NQL.js → JB5XLSNA.js} +1 -1
  52. package/dist/cdn/{IAEFPE3L.js → JF2ASXUT.js} +1 -1
  53. package/dist/cdn/{7QKF26VG.js → JGSZS6VC.js} +1 -1
  54. package/dist/cdn/{D22STVK5.js → JKUPRPWA.js} +1 -1
  55. package/dist/cdn/{2TEBTKD4.js → K5EP7XDM.js} +1 -1
  56. package/dist/cdn/{BOFA5RH7.js → K6GC6RUA.js} +1 -1
  57. package/dist/cdn/{SJLSYFK3.js → KENYVRIH.js} +1 -1
  58. package/dist/cdn/{CLHUIZMU.js → KLFAQLC6.js} +1 -1
  59. package/dist/cdn/{5IDPOFIN.js → KLZWOBGK.js} +1 -1
  60. package/dist/cdn/{XQ7SXIHI.js → KPEPW4QL.js} +1 -1
  61. package/dist/cdn/{3JCHYXHA.js → KPKJ2OVD.js} +1 -1
  62. package/dist/cdn/{BHLMO6KY.js → KWOBLDUS.js} +1 -1
  63. package/dist/cdn/{463CZQF6.js → KXANPOG5.js} +1 -1
  64. package/dist/cdn/LADUP3BG.js +2 -0
  65. package/dist/cdn/{HOCCKT72.js → LIEHXKWK.js} +1 -1
  66. package/dist/cdn/{XKFX43FE.js → LKVPVQIC.js} +1 -1
  67. package/dist/cdn/{GUSPFJUQ.js → LQFA6HOT.js} +1 -1
  68. package/dist/cdn/{UCYR537P.js → LRGW6G5E.js} +1 -1
  69. package/dist/cdn/{H4LZV33O.js → LSMP2ZCO.js} +1 -1
  70. package/dist/cdn/{5LSNDSHW.js → M5VGNDPK.js} +1 -1
  71. package/dist/cdn/{NX7HKBFH.js → MHMM4RFR.js} +1 -1
  72. package/dist/cdn/{2RL6H5TB.js → MVSQRD5M.js} +1 -1
  73. package/dist/cdn/MXPZF4RB.js +2 -0
  74. package/dist/cdn/{ZHCAZ2TH.js → MZOWOFAE.js} +1 -1
  75. package/dist/cdn/{54A4C4RG.js → N5D7USS3.js} +1 -1
  76. package/dist/cdn/{7P57UVVG.js → NEZAEPUJ.js} +1 -1
  77. package/dist/cdn/{SSCE4O7V.js → NQP26Q5H.js} +1 -1
  78. package/dist/cdn/{3BG6WS6Q.js → NWNUNME7.js} +1 -1
  79. package/dist/cdn/{HM2QALUN.js → O6IGMQN7.js} +1 -1
  80. package/dist/cdn/{ZZZPISEE.js → ONAAPGO3.js} +1 -1
  81. package/dist/cdn/{NIYY6XUQ.js → OSOSX7F3.js} +1 -1
  82. package/dist/cdn/{QEUKNYOL.js → OTTBXOCQ.js} +1 -1
  83. package/dist/cdn/{UIZL3C3H.js → OU4VLS5H.js} +1 -1
  84. package/dist/cdn/{BT6SXXE2.js → OYMJFSWN.js} +1 -1
  85. package/dist/cdn/{MIV34H66.js → P2QNOVPZ.js} +1 -1
  86. package/dist/cdn/{SWY74BKB.js → P4ZYEBFM.js} +1 -1
  87. package/dist/cdn/{2AWUR4ZA.js → P734JXTN.js} +1 -1
  88. package/dist/cdn/{5N4KGIIY.js → PDJXTJHO.js} +1 -1
  89. package/dist/cdn/{4PDT6TEX.js → PEI3LZZL.js} +1 -1
  90. package/dist/cdn/{KTW6BSEC.js → PGFW2YO5.js} +1 -1
  91. package/dist/cdn/{SGQEHPTT.js → Q5LSIHQ4.js} +1 -1
  92. package/dist/cdn/{MDWJ6JLF.js → Q5XHG472.js} +1 -1
  93. package/dist/cdn/{BWWX52HV.js → Q6CXYCV6.js} +1 -1
  94. package/dist/cdn/{37P3IMFV.js → QKPUJ5CZ.js} +1 -1
  95. package/dist/cdn/{FQTDRS3G.js → QKQXW6OQ.js} +1 -1
  96. package/dist/cdn/{PLQEDCUG.js → QMQAQSIA.js} +1 -1
  97. package/dist/cdn/{FFZ2XVRE.js → QTCXH2O3.js} +1 -1
  98. package/dist/cdn/{4CSMWYIO.js → QWQ535RX.js} +1 -1
  99. package/dist/cdn/{RLYEATAS.js → R6ANOQU2.js} +1 -1
  100. package/dist/cdn/{KDDHPA54.js → R7DGMKJ5.js} +1 -1
  101. package/dist/cdn/{GFBJLNEH.js → RPUUOIRT.js} +1 -1
  102. package/dist/cdn/{EUI2Y6R4.js → RY7S2ICL.js} +1 -1
  103. package/dist/cdn/{5FWKODDH.js → S57RXN34.js} +1 -1
  104. package/dist/cdn/{GSR2GEY7.js → SD3DV4KO.js} +1 -1
  105. package/dist/cdn/{77753TPX.js → SEII6Y3C.js} +1 -1
  106. package/dist/cdn/{I4QWYULN.js → SUOJTOE2.js} +1 -1
  107. package/dist/cdn/{HIB4BVGK.js → SWUMBQ6T.js} +1 -1
  108. package/dist/cdn/{6WNKGSHD.js → TDDVICGP.js} +1 -1
  109. package/dist/cdn/{KRP5SGSU.js → US5ONKMV.js} +1 -1
  110. package/dist/cdn/{BXSBR2GT.js → V24CDHGH.js} +1 -1
  111. package/dist/cdn/{376KPQCJ.js → VEBBZ2RS.js} +1 -1
  112. package/dist/cdn/{XYKQ6M25.js → VIZY55AV.js} +1 -1
  113. package/dist/cdn/{KFRHOPZY.js → VNYXOWZX.js} +113 -113
  114. package/dist/cdn/{AZKNC2SR.js → VPHEAUEZ.js} +1 -1
  115. package/dist/cdn/{4SORDX5Z.js → VTRC64F6.js} +1 -1
  116. package/dist/cdn/{FSF3T3OT.js → VX3K6KJB.js} +1 -1
  117. package/dist/cdn/{FYJMHXWV.js → VXIWNY5G.js} +1 -1
  118. package/dist/cdn/{743J2ZUC.js → VZ2ZZK3Y.js} +1 -1
  119. package/dist/cdn/{X257ACPD.js → W3SEKNJO.js} +1 -1
  120. package/dist/cdn/{JHOJZDXC.js → WJRVHF3G.js} +1 -1
  121. package/dist/cdn/WNM5Z4SM.js +2 -0
  122. package/dist/cdn/{AIM7NSD3.js → WZHA7MTK.js} +1 -1
  123. package/dist/cdn/{VKHBBAXO.js → XA6ZDTKA.js} +1 -1
  124. package/dist/cdn/{X3YRR4BO.js → XDLYXP3W.js} +58 -58
  125. package/dist/cdn/{ARFBMFQW.js → XXRBPKMI.js} +1 -1
  126. package/dist/cdn/{INLWMPGE.js → XYAVR2MM.js} +1 -1
  127. package/dist/cdn/{6HZBPFHA.js → XYJU325L.js} +1 -1
  128. package/dist/cdn/{NNY2YF2L.js → Y3PEQHDX.js} +1 -1
  129. package/dist/cdn/{4RCC4KA2.js → Y7Z6LFBH.js} +1 -1
  130. package/dist/cdn/YJ3DKEEZ.js +2 -0
  131. package/dist/cdn/{HKFXHTYU.js → YVNBCXBJ.js} +1 -1
  132. package/dist/cdn/{VUXNHQGR.js → Z324WI3X.js} +1 -1
  133. package/dist/cdn/{A6ZTIX3P.js → ZSATEDPE.js} +1 -1
  134. package/dist/cdn/{LO35PCP7.js → ZX5GQTIE.js} +1 -1
  135. package/dist/cdn/index.js +1 -1
  136. package/dist/chunks/converter.js +88 -88
  137. package/dist/chunks/interfaces.js +19 -19
  138. package/dist/chunks/runtime.js +2 -2
  139. package/dist/chunks/solution-builder-assistant.js +1 -1
  140. package/dist/components/arcgis-solutions-assistant/customElement.js +331 -321
  141. package/dist/components/create-feature/customElement.js +23 -18
  142. package/dist/components/create-related-feature/customElement.js +8 -6
  143. package/dist/components/layer-table/customElement.js +1 -1
  144. package/dist/components/map-tools/customElement.js +1 -1
  145. package/dist/docs/api.json +1 -1
  146. package/dist/docs/docs.json +1 -1
  147. package/dist/docs/web-types.json +1 -1
  148. package/dist/solutions-components_commit.txt +4 -7
  149. package/package.json +5 -5
  150. package/dist/cdn/E3F63VW4.js +0 -2
  151. package/dist/cdn/F7XCLL7U.js +0 -3
  152. package/dist/cdn/HIPZRG2Q.js +0 -2
  153. package/dist/cdn/IXPNZCW6.js +0 -2
  154. package/dist/cdn/J3SDL3LR.js +0 -2
  155. package/dist/cdn/KR2PPIBX.js +0 -2
  156. package/dist/cdn/QPHNKFC6.js +0 -2
  157. package/dist/cdn/S4GBMN37.js +0 -2
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{b as y}from"./2B4SGB3I.js";import{b as g}from"./RLSY4VUQ.js";import{nb as f}from"./CGQALCTZ.js";import{a as u}from"./DIBK4RSG.js";import{b as m}from"./HIPZRG2Q.js";import{H as p,K as h,h as c,i as s,l as d,q as l}from"./T3EPRHTT.js";var x=c`:host{display:block}.padding-start-1{padding-inline-start:1rem}.border-override{--calcite-accordion-border-color: var(--calcite-color-border-1) !important}.display-flex{display:flex}.align-center{align-items:center}.solution-list-item-label{color:var(--calcite-color-text-1);font-size:var(--calcite-font-size--1)}.solution-list-item-label,.solution-list-item-description{font-family:var(--calcite-font-family);font-weight:var(--calcite-font-weight-normal);overflow-wrap:break-word;word-break:break-word}.solution-list-item-description{font-size:var(--calcite-font-size--2);margin-block-start:.125rem;color:var(--calcite-color-text-3)}.solution-list-item-content{display:flex;flex:1 1 auto;flex-direction:column;justify-content:center;line-height:1.375}.underline{text-decoration:underline}calcite-chip{--calcite-chip-icon-color: var(--calcite-color-brand)}`,r=class extends p{constructor(){super(...arguments),this.itemRelationshipDependencies=[],this.linkType="item",this.listSelectionMode="none",this.reuseWarning="",this.templateInfos=[],this.typeKeywords=[],this.usageContext="content",this._canDeletePermission=!1,this._dependencyTooltipContent="",this._sortedTemplateInfos=[],this._translations=u({name:"solution-item-accordion",blocking:!0}),this._configContextConsumer=g({context:y,subscribe:!0}),this._sortOrder=["Hub Site Application","Hub Page","Web Experience","Instant App","Web Mapping Application","Dashboard","StoryMap","Form","QuickCapture Project","Workflow","Big Data Analytic (hosted)","Real Time Analytic (hosted)","Feed (hosted)","Tool","Notebook","Data Pipeline","Project Package","Desktop Application Template","TypeNotFound","Web Map","Web Scene","Feature Layer (hosted, view)","Feature Layer (hosted)","Table (hosted, view)","Table (hosted)","Tile Layer","CSV","Microsoft Excel","Microsoft Word","Report Template","Rule Package","Group"],this.solutionItemHover=l(),this.solutionItemSelect=l(),this.solutionTypeHover=l()}static{this.properties={itemRelationshipDependencies:0,linkType:1,listSelectionMode:1,reuseWarning:1,templateInfos:0,typeKeywords:0,usageContext:1,_canDeletePermission:16,_dependencyTooltipContent:16,_sortedTemplateInfos:16,_translations:16}}static{this.styles=x}willUpdate(e){e.has("templateInfos")&&(this.hasUpdated||this.templateInfos?.length>0)&&this.templateInfosWatchHandler()}async templateInfosWatchHandler(){this._sortedTemplateInfos=this._sortTemplates()}async collapseAll(){this.el?.shadowRoot?.querySelectorAll("calcite-accordion-item")?.forEach(e=>{e.expanded=!1})}async deselectAll(e=!1){(this.listSelectionMode==="single"||this.listSelectionMode==="single-persist")&&this.el?.shadowRoot?.querySelectorAll("calcite-list-item")?.forEach(t=>{t.selected&&(t.selected=!1),e&&(t.parentElement?.parentElement).expanded&&((t.parentElement?.parentElement).expanded=!1)})}async expandItemById(e){this.el?.shadowRoot?.querySelectorAll("calcite-list-item")?.forEach(t=>{t.id===e&&((t.parentElement?.parentElement).expanded=!0)})}async expandFirstItem(){let e=this.el?.shadowRoot?.querySelectorAll("calcite-list-item");e?.length&&((e[0].parentElement?.parentElement).expanded=!0)}async expandItems(e){this.el?.shadowRoot?.querySelectorAll("calcite-list-item")?.forEach(t=>{e.indexOf(t.id)>-1&&((t.parentElement?.parentElement).expanded=!0)})}async selectItem(e){(this.listSelectionMode==="single"||this.listSelectionMode==="single-persist")&&this.el?.shadowRoot?.querySelectorAll("calcite-list-item")?.forEach(t=>{t.id===e&&(t.selected=!0,(t.parentElement?.parentElement).expanded=!0)})}async selectFirstItem(){let e=this.el?.shadowRoot?.querySelectorAll("calcite-list-item");e?.length&&(e[0].selected=!0,(e[0].parentElement?.parentElement).expanded=!0)}async selectItems(e){this.listSelectionMode==="multiple"&&this.el?.shadowRoot?.querySelectorAll("calcite-list-item")?.forEach(t=>{e.indexOf(t.id)>-1&&(t.selected=!0,(t.parentElement?.parentElement).expanded=!0)})}async load(){this._sortedTemplateInfos=this._sortTemplates(),this._canDeletePermission=(this._configContextConsumer.value?.authentication?.CanDeleteSolution&&this._configContextConsumer.value?.authentication?.CanUpdateSolution)??!1}render(){return this._getAccordion()}_deselectOthers(e){(this.listSelectionMode==="single"||this.listSelectionMode==="single-persist")&&this.el?.shadowRoot?.querySelectorAll("calcite-list-item")?.forEach(t=>{t.id!==e&&(t.selected=!1)})}_getAccordion(){let e=[],t=this._sortedTemplateInfos.reduce((i,n)=>{let o=this._getTypeForDisplay(n.type,n.typeKeywords);return e.indexOf(o)<0&&(e.push(o),i.push(this._getAccordionItem(n))),i},[]);return s`<calcite-accordion class="border-override" selection-mode=single>${t}</calcite-accordion>`}_getAccordionItem(e){let t=this._getTypeForDisplay(e.type,e.typeKeywords),i=this._sortedTemplateInfos.filter(n=>this._getTypeForDisplay(n.type,n.typeKeywords)===t);return s`<calcite-accordion-item .heading=${`${t} (${i.length})`} @mouseenter=${()=>this.solutionTypeHover.emit({itemType:t,entering:!0})} @mouseleave=${()=>this.solutionTypeHover.emit({itemType:t,entering:!1})}><solution-item-icon class="padding-start-1 display-flex align-center" slot=actions-start .type=${e.type} .typeKeywords=${e.typeKeywords}></solution-item-icon>${this._getList(i)}</calcite-accordion-item>`}_getList(e){let t=this._sortTemplatesByTitle(e);return s`<calcite-list .label=${this._translations.solutionsTemplates} selection-appearance=border .selectionMode=${this.listSelectionMode}>${t.map(i=>this._getListItem(i))}</calcite-list>`}_getListItem(e){let t=this.typeKeywords.includes("Deployed")&&e.url,i=this.linkType==="action";return s`<calcite-list-item id=${e.id??d} @mouseenter=${()=>this.solutionItemHover.emit({itemId:e.id,entering:!0})} @mouseleave=${()=>this.solutionItemHover.emit({itemId:e.id,entering:!1})} @calciteListItemSelect=${()=>{this._deselectOthers(e.id),this.solutionItemSelect.emit({itemId:e.id,selected:!0}),t&&!i&&window.open(e.url,"_blank")}} .value=${e.id}><div class="solution-list-item-content" slot=content><div class=${`solution-list-item-label ${t&&!i?"underline":""}`}>${e.title}</div><div class="solution-list-item-description">${e.snippet}</div></div>${this._checkUsageForWarnings(e)}${t&&i?s`<div slot=actions-end><calcite-action icon=launch .id=${`${e.id}-launch`} .label=${this._translations?.openDetails} @click=${()=>window.open(e.url,"_blank")} text></calcite-action><calcite-tooltip overlay-positioning=fixed .referenceElement=${`${e.id}-launch`}><span>${this._translations?.openDetails}</span></calcite-tooltip></div>`:null}</calcite-list-item>`}_sortTemplatesByTitle(e){return e.sort((t,i)=>t.title<i.title?-1:t.title>i.title?1:0)}_sortTemplates(){return this.templateInfos.sort((e,t)=>{let i=this._getTypeForSort(e),n=this._getTypeForSort(t),o=this._sortOrder.indexOf(i),a=this._sortOrder.indexOf(n);return o-a})}_getTypeForSort(e){let t=this._getTypeForDisplay(e.type,e.typeKeywords);return this._sortOrder.indexOf(t)<0&&(t="TypeNotFound"),t}_getTypeForDisplay(e,t){let i=e;if(e==="Feature Service"){let n=t.indexOf("View Service")>-1,o=t.indexOf("Table")>-1;i=n&&o?"Table (hosted, view)":o?"Table (hosted)":n?"Feature Layer (hosted, view)":"Feature Layer (hosted)"}return e==="Web Mapping Application"&&(i=t.indexOf("configurableApp")>-1?"Instant App":i),i=e==="Geoprocessing Service"?"Tool":i,i=e==="Feed"?"Feed (hosted)":i,i=e==="Real Time Analytic"?"Real Time Analytic (hosted)":i,i=e==="Big Data Analytic"?"Big Data Analytic (hosted)":i,i=e==="Vector Tile Service"?"Tile Layer":i,i}_getWarningChip(e,t,i,n){let o=t==="info"?"var(--calcite-color-status-info)":"var(--calcite-color-status-danger)";return s`<div slot=actions-end><calcite-chip .icon=${t==="info"?"information":"exclamation-mark-triangle"} .id=${i+"-warning"} kind=neutral .label=${e} scale=s style=${h({"--calcite-chip-icon-color":o,cursor:n&&n.length>0?"pointer":"default"})}>${e}</calcite-chip>${n&&n.length>0?s`<calcite-tooltip class=solution-list-item-content placement=bottom .referenceElement=${`${i}-warning`} scale=m @calciteTooltipBeforeOpen=${async()=>{let a={q:n.map(T=>`id:${T.dependencyItemId}`).join(" OR "),authentication:this._configContextConsumer.value?.userSession,pagingParam:{start:1,num:100}},_=await f(a);this._dependencyTooltipContent=s`<solutions-deployed-list .results=${_} .listTitle=${this._translations?.itemUsedInOtherSolutions||""}></solutions-deployed-list>`}}>${this._dependencyTooltipContent}</calcite-tooltip>`:null}</div>`}_checkUsageForWarnings(e){let t=this._configContextConsumer.value?.userSession?.username??null,i=this.itemRelationshipDependencies.filter(o=>o.controlItemId===e.id),n=i.length>0;if(this.usageContext==="content"&&n&&this.reuseWarning)return this._getWarningChip(this.reuseWarning,"info",e.id,i);if(this.usageContext==="rename"){let o=this._configContextConsumer.value?.authentication?.CanUpdateSolution??!1;if(e.owner!==t)if(o){if(n&&this.reuseWarning)return this._getWarningChip(this.reuseWarning,"info",e.id,i)}else return this._getWarningChip(this._translations?.noPrivilegeToManage||"","warn",e.id);else if(n&&this.reuseWarning)return this._getWarningChip(this.reuseWarning,"info",e.id,i)}if(this.usageContext==="delete"){if(e.owner!==t)if(this._canDeletePermission){if(n)return this._getWarningChip(this._translations?.usedInOtherSolutionsDeleteWarning||"","info",e.id)}else return this._getWarningChip(this._translations?.noPrivilegeToManage||"","warn",e.id);else if(n)return this._getWarningChip(this.reuseWarning,"info",e.id,i)}return""}};m("solution-item-accordion",r);export{r as a};
2
+ import{b as y}from"./2B4SGB3I.js";import{b as g}from"./RLSY4VUQ.js";import{nb as f}from"./CGQALCTZ.js";import{a as u}from"./AIZ2P72X.js";import{b as m}from"./YJ3DKEEZ.js";import{H as p,K as h,h as c,i as s,l as d,q as l}from"./T3EPRHTT.js";var x=c`:host{display:block}.padding-start-1{padding-inline-start:1rem}.border-override{--calcite-accordion-border-color: var(--calcite-color-border-1) !important}.display-flex{display:flex}.align-center{align-items:center}.solution-list-item-label{color:var(--calcite-color-text-1);font-size:var(--calcite-font-size--1)}.solution-list-item-label,.solution-list-item-description{font-family:var(--calcite-font-family);font-weight:var(--calcite-font-weight-normal);overflow-wrap:break-word;word-break:break-word}.solution-list-item-description{font-size:var(--calcite-font-size--2);margin-block-start:.125rem;color:var(--calcite-color-text-3)}.solution-list-item-content{display:flex;flex:1 1 auto;flex-direction:column;justify-content:center;line-height:1.375}.underline{text-decoration:underline}calcite-chip{--calcite-chip-icon-color: var(--calcite-color-brand)}`,r=class extends p{constructor(){super(...arguments),this.itemRelationshipDependencies=[],this.linkType="item",this.listSelectionMode="none",this.reuseWarning="",this.templateInfos=[],this.typeKeywords=[],this.usageContext="content",this._canDeletePermission=!1,this._dependencyTooltipContent="",this._sortedTemplateInfos=[],this._translations=u({name:"solution-item-accordion",blocking:!0}),this._configContextConsumer=g({context:y,subscribe:!0}),this._sortOrder=["Hub Site Application","Hub Page","Web Experience","Instant App","Web Mapping Application","Dashboard","StoryMap","Form","QuickCapture Project","Workflow","Big Data Analytic (hosted)","Real Time Analytic (hosted)","Feed (hosted)","Tool","Notebook","Data Pipeline","Project Package","Desktop Application Template","TypeNotFound","Web Map","Web Scene","Feature Layer (hosted, view)","Feature Layer (hosted)","Table (hosted, view)","Table (hosted)","Tile Layer","CSV","Microsoft Excel","Microsoft Word","Report Template","Rule Package","Group"],this.solutionItemHover=l(),this.solutionItemSelect=l(),this.solutionTypeHover=l()}static{this.properties={itemRelationshipDependencies:0,linkType:1,listSelectionMode:1,reuseWarning:1,templateInfos:0,typeKeywords:0,usageContext:1,_canDeletePermission:16,_dependencyTooltipContent:16,_sortedTemplateInfos:16,_translations:16}}static{this.styles=x}willUpdate(e){e.has("templateInfos")&&(this.hasUpdated||this.templateInfos?.length>0)&&this.templateInfosWatchHandler()}async templateInfosWatchHandler(){this._sortedTemplateInfos=this._sortTemplates()}async collapseAll(){this.el?.shadowRoot?.querySelectorAll("calcite-accordion-item")?.forEach(e=>{e.expanded=!1})}async deselectAll(e=!1){(this.listSelectionMode==="single"||this.listSelectionMode==="single-persist")&&this.el?.shadowRoot?.querySelectorAll("calcite-list-item")?.forEach(t=>{t.selected&&(t.selected=!1),e&&(t.parentElement?.parentElement).expanded&&((t.parentElement?.parentElement).expanded=!1)})}async expandItemById(e){this.el?.shadowRoot?.querySelectorAll("calcite-list-item")?.forEach(t=>{t.id===e&&((t.parentElement?.parentElement).expanded=!0)})}async expandFirstItem(){let e=this.el?.shadowRoot?.querySelectorAll("calcite-list-item");e?.length&&((e[0].parentElement?.parentElement).expanded=!0)}async expandItems(e){this.el?.shadowRoot?.querySelectorAll("calcite-list-item")?.forEach(t=>{e.indexOf(t.id)>-1&&((t.parentElement?.parentElement).expanded=!0)})}async selectItem(e){(this.listSelectionMode==="single"||this.listSelectionMode==="single-persist")&&this.el?.shadowRoot?.querySelectorAll("calcite-list-item")?.forEach(t=>{t.id===e&&(t.selected=!0,(t.parentElement?.parentElement).expanded=!0)})}async selectFirstItem(){let e=this.el?.shadowRoot?.querySelectorAll("calcite-list-item");e?.length&&(e[0].selected=!0,(e[0].parentElement?.parentElement).expanded=!0)}async selectItems(e){this.listSelectionMode==="multiple"&&this.el?.shadowRoot?.querySelectorAll("calcite-list-item")?.forEach(t=>{e.indexOf(t.id)>-1&&(t.selected=!0,(t.parentElement?.parentElement).expanded=!0)})}async load(){this._sortedTemplateInfos=this._sortTemplates(),this._canDeletePermission=(this._configContextConsumer.value?.authentication?.CanDeleteSolution&&this._configContextConsumer.value?.authentication?.CanUpdateSolution)??!1}render(){return this._getAccordion()}_deselectOthers(e){(this.listSelectionMode==="single"||this.listSelectionMode==="single-persist")&&this.el?.shadowRoot?.querySelectorAll("calcite-list-item")?.forEach(t=>{t.id!==e&&(t.selected=!1)})}_getAccordion(){let e=[],t=this._sortedTemplateInfos.reduce((i,n)=>{let o=this._getTypeForDisplay(n.type,n.typeKeywords);return e.indexOf(o)<0&&(e.push(o),i.push(this._getAccordionItem(n))),i},[]);return s`<calcite-accordion class="border-override" selection-mode=single>${t}</calcite-accordion>`}_getAccordionItem(e){let t=this._getTypeForDisplay(e.type,e.typeKeywords),i=this._sortedTemplateInfos.filter(n=>this._getTypeForDisplay(n.type,n.typeKeywords)===t);return s`<calcite-accordion-item .heading=${`${t} (${i.length})`} @mouseenter=${()=>this.solutionTypeHover.emit({itemType:t,entering:!0})} @mouseleave=${()=>this.solutionTypeHover.emit({itemType:t,entering:!1})}><solution-item-icon class="padding-start-1 display-flex align-center" slot=actions-start .type=${e.type} .typeKeywords=${e.typeKeywords}></solution-item-icon>${this._getList(i)}</calcite-accordion-item>`}_getList(e){let t=this._sortTemplatesByTitle(e);return s`<calcite-list .label=${this._translations.solutionsTemplates} selection-appearance=border .selectionMode=${this.listSelectionMode}>${t.map(i=>this._getListItem(i))}</calcite-list>`}_getListItem(e){let t=this.typeKeywords.includes("Deployed")&&e.url,i=this.linkType==="action";return s`<calcite-list-item id=${e.id??d} @mouseenter=${()=>this.solutionItemHover.emit({itemId:e.id,entering:!0})} @mouseleave=${()=>this.solutionItemHover.emit({itemId:e.id,entering:!1})} @calciteListItemSelect=${()=>{this._deselectOthers(e.id),this.solutionItemSelect.emit({itemId:e.id,selected:!0}),t&&!i&&window.open(e.url,"_blank")}} .value=${e.id}><div class="solution-list-item-content" slot=content><div class=${`solution-list-item-label ${t&&!i?"underline":""}`}>${e.title}</div><div class="solution-list-item-description">${e.snippet}</div></div>${this._checkUsageForWarnings(e)}${t&&i?s`<div slot=actions-end><calcite-action icon=launch .id=${`${e.id}-launch`} .label=${this._translations?.openDetails} @click=${()=>window.open(e.url,"_blank")} text></calcite-action><calcite-tooltip overlay-positioning=fixed .referenceElement=${`${e.id}-launch`}><span>${this._translations?.openDetails}</span></calcite-tooltip></div>`:null}</calcite-list-item>`}_sortTemplatesByTitle(e){return e.sort((t,i)=>t.title<i.title?-1:t.title>i.title?1:0)}_sortTemplates(){return this.templateInfos.sort((e,t)=>{let i=this._getTypeForSort(e),n=this._getTypeForSort(t),o=this._sortOrder.indexOf(i),a=this._sortOrder.indexOf(n);return o-a})}_getTypeForSort(e){let t=this._getTypeForDisplay(e.type,e.typeKeywords);return this._sortOrder.indexOf(t)<0&&(t="TypeNotFound"),t}_getTypeForDisplay(e,t){let i=e;if(e==="Feature Service"){let n=t.indexOf("View Service")>-1,o=t.indexOf("Table")>-1;i=n&&o?"Table (hosted, view)":o?"Table (hosted)":n?"Feature Layer (hosted, view)":"Feature Layer (hosted)"}return e==="Web Mapping Application"&&(i=t.indexOf("configurableApp")>-1?"Instant App":i),i=e==="Geoprocessing Service"?"Tool":i,i=e==="Feed"?"Feed (hosted)":i,i=e==="Real Time Analytic"?"Real Time Analytic (hosted)":i,i=e==="Big Data Analytic"?"Big Data Analytic (hosted)":i,i=e==="Vector Tile Service"?"Tile Layer":i,i}_getWarningChip(e,t,i,n){let o=t==="info"?"var(--calcite-color-status-info)":"var(--calcite-color-status-danger)";return s`<div slot=actions-end><calcite-chip .icon=${t==="info"?"information":"exclamation-mark-triangle"} .id=${i+"-warning"} kind=neutral .label=${e} scale=s style=${h({"--calcite-chip-icon-color":o,cursor:n&&n.length>0?"pointer":"default"})}>${e}</calcite-chip>${n&&n.length>0?s`<calcite-tooltip class=solution-list-item-content placement=bottom .referenceElement=${`${i}-warning`} scale=m @calciteTooltipBeforeOpen=${async()=>{let a={q:n.map(T=>`id:${T.dependencyItemId}`).join(" OR "),authentication:this._configContextConsumer.value?.userSession,pagingParam:{start:1,num:100}},_=await f(a);this._dependencyTooltipContent=s`<solutions-deployed-list .results=${_} .listTitle=${this._translations?.itemUsedInOtherSolutions||""}></solutions-deployed-list>`}}>${this._dependencyTooltipContent}</calcite-tooltip>`:null}</div>`}_checkUsageForWarnings(e){let t=this._configContextConsumer.value?.userSession?.username??null,i=this.itemRelationshipDependencies.filter(o=>o.controlItemId===e.id),n=i.length>0;if(this.usageContext==="content"&&n&&this.reuseWarning)return this._getWarningChip(this.reuseWarning,"info",e.id,i);if(this.usageContext==="rename"){let o=this._configContextConsumer.value?.authentication?.CanUpdateSolution??!1;if(e.owner!==t)if(o){if(n&&this.reuseWarning)return this._getWarningChip(this.reuseWarning,"info",e.id,i)}else return this._getWarningChip(this._translations?.noPrivilegeToManage||"","warn",e.id);else if(n&&this.reuseWarning)return this._getWarningChip(this.reuseWarning,"info",e.id,i)}if(this.usageContext==="delete"){if(e.owner!==t)if(this._canDeletePermission){if(n)return this._getWarningChip(this._translations?.usedInOtherSolutionsDeleteWarning||"","info",e.id)}else return this._getWarningChip(this._translations?.noPrivilegeToManage||"","warn",e.id);else if(n)return this._getWarningChip(this.reuseWarning,"info",e.id,i)}return""}};m("solution-item-accordion",r);export{r as a};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import i from"./PIAGRMMB.js";import{a as L}from"./7QKF26VG.js";import h from"./2C4DK6YC.js";import e from"./WV7QX3ED.js";import d from"./QPHNKFC6.js";import a from"./TK5EXRZL.js";import{a as O}from"./DIBK4RSG.js";import{b as S}from"./HIPZRG2Q.js";import{F as b,G as g,H as x,J as y,h as E,i as c,l as f,q as o,u as F}from"./T3EPRHTT.js";export default $arcgis.t(([k,u,M,v,{n:C},{i:m},{c:A},{c:H,d:w,j:I},{b:$}])=>{var V=E`@layer{:host{display:block}.height-full{height:100%}.height-full-adjusted{height:calc(100% - 20px)}.width-full{width:100%}.display-flex{display:flex}.display-none{display:none}.table-border{border:1px solid var(--calcite-color-border-2)}.border-end{border-inline-end:1px solid var(--calcite-color-border-2)}.border-bottom{border-bottom:1px solid var(--calcite-color-border-2)}.padding-5{padding:5px}.padding-end-1{padding-inline-end:1rem}.height-51-px{height:51px}.height-50-px{height:50px}.bottom-left{position:absolute;left:0;bottom:0;padding-left:5px}html[dir=rtl] .bottom-left{position:absolute;right:0;bottom:0;padding-right:5px}.height-19{height:19px}.background{background-color:var(--calcite-color-surface-1)}.text-color{color:var(--calcite-color-text-1)}.align-center{align-items:center}.danger-color{color:var(--calcite-color-status-danger)}.esri-feature-table vaadin-grid{border:none!important}vaadin-grid-cell-content{font-size:14px!important;color:var(--calcite-color-text-3)!important}.absolute-right{position:absolute;right:0;left:unset}html[dir=rtl] .absolute-right{left:0;right:unset}.disabled{cursor:default!important;user-select:none;opacity:var(--calcite-opacity-disabled);pointer-events:none}.actions-end{height:50px!important;display:inline-flex}.border-top{border-top:1px solid var(--calcite-color-border-2)}.modal{--calcite-dialog-content-space: 0}.esri-feature-table__table-container{height:100%}.search-container{background-color:var(--calcite-color-surface-2)!important}.search{--calcite-color-border-input: var(--calcite-color-border-3);width:60%;padding:10px}.delete-red{--calcite-icon-color: var(--calcite-color-status-danger);--calcite-color-text-1: var(--calcite-color-status-danger);--calcite-color-text-3: var(--calcite-color-status-danger)}.label-override{white-space:nowrap}.padding-start-1-4{padding-inline-start:.5rem}.panel-header-override{--calcite-panel-header-content-space: 0px}.danger-label-color{color:var(--calcite-color-status-danger)}.danger-icon-color{--calcite-icon-color: var(--calcite-color-status-danger)}.width-51{width:51px}.height-51{height:51px}calcite-action-bar{--calcite-internal-action-bar-gap: 0px;--calcite-internal-action-bar-padding: 0px}}`,T=class extends x{constructor(){super(),this.defaultGlobalId=[],this.defaultLayerId="",this.defaultOid=[],this.enableAutoRefresh=!1,this.enableColumnReorder=!0,this.enableCSV=!1,this.enableInlineEdit=!1,this.enableShare=!1,this.enableTableAutosave=!0,this.featureSelectionMode="multiple",this.selectedRelatedIds=[],this.honorMapFieldSettings=!1,this.isMobile=!1,this.mapHidden=!1,this.showOnlyUpdatableLayers=!1,this.selectedIds=[],this.shareIncludeEmbed=!1,this.shareIncludeSocial=!1,this.showNewestFirst=!1,this.zoomAndScrollToSelected=!1,this.pasteEnabled=!1,this.showCopyPasteActions=!1,this.layerIds=[],this._allIds=[],this._configLayerOrderDefined=!1,this._csvExporting=!1,this._fetchingData=!1,this._hideTable=!1,this._filterActive=!1,this._selectAllActive=!1,this._showHideOpen=!1,this._showOnlySelected=!1,this._toolInfos=[],this._translations=O({name:"layer-table",blocking:!0}),this._fullTextSearchInfo=[],this._searchPlaceHolder="",this._size=0,this._queryingData=!1,this._editEnabled=!1,this._enabledLayerIds=[],this._defaultGlobalIdHonored=!1,this._defaultOidHonored=!1,this._deleteEnabled=!1,this._floorExpression="",this._floorField="",this._floorLevel="",this._loaded=!1,this._shareNode=b(),this._toolbar=b(),this._searchExpression="",this._skipEditCheck=!1,this._tempSelectedIds=[],this._outOFExtentOids=[],this._shouldUpdateTableOnExtentChange=!0,this._creatingFeature=!1,this._searchNode=b(),this._layerEditsHandles=[],this._pastedFeaturesIds=[],this._shouldSelectCreatedFeatures=!1,this.columnReorder=o(),this.featureSelectionChange=o(),this.toggleFilter=o(),this.showDelete=o(),this.relatedRecordToggled=o(),this.editMultipleFeatures=o(),this.copyFeatures=o(),this.pasteFeatures=o(),this.featuresAdded=o(),this.initCreateComponent=o(),this.requestLayerSelectionChange=o(),this.beforeFeatureSelectionChange=o(),this.continueEditing=o(),this.createFeatureEditorInitialized=e=>{this._createFeatureEditor=e.detail},this.createFeatureEditorClosed=()=>{this._createFeatureEditor=void 0},this.listenOn(window,"beforeMapInfoChange",this.beforeMapInfoChange,{capture:!0}),this.listenOn(window,"editorInitialized",this.editorInitialized),this.listenOn(window,"createFeatureEditorInitialized",this.createFeatureEditorInitialized),this.listenOn(window,"createFeatureEditorClosed",this.createFeatureEditorClosed),this.listenOn(window,"closeEdit",this.closeEdit),this.listenOn(window,"selectionChanged",this.selectionChanged),this.listenOn(window,"beforeLayerSelectionChange",this.beforeLayerSelectionChange),this.listenOn(window,"layerSelectionChange",this.layerSelectionChange),this.listenOn(window,"editsComplete",this.editsComplete),this.listenOn(window,"facilityChanged",this.facilityChanged),this.listenOn(window,"levelChanged",this.levelChanged),this.listenOn(window,"siteChanged",this.siteChanged),this.listenOn(window,"noLayersFound",this.noLayersFound),this.listenOn(window,"clearSelection",this.clearSelection),this.listenOn(window,"mapChanged",this.mapChanged),this.listenOn(window,"featuresSelected",this.featuresSelected),this.listenOn(window,"createWorkFlowStarted",this.createWorkFlowStarted),this.listenOn(window,"backFromCreateWorkFlow",this.backFromCreateWorkFlow),this.listenOn(window,"pasteFeatures",this._pasteFeatures),this.listenOn(window,"featuresPasted",this._featuresPasted),L(window)}static{this.properties={appLayout:1,defaultGlobalId:0,defaultLayerId:1,defaultOid:0,enableAutoRefresh:5,enableColumnReorder:5,enableCSV:5,enableInlineEdit:5,enableShare:5,enableTableAutosave:5,featureSelectionMode:1,selectedRelatedIds:0,honorMapFieldSettings:5,isMobile:5,mapHidden:5,mapInfo:0,mapView:0,showOnlyUpdatableLayers:5,selectedIds:0,shareIncludeEmbed:5,shareIncludeSocial:5,showNewestFirst:5,zoomAndScrollToSelected:5,zoomToScale:9,pasteEnabled:5,showCopyPasteActions:5,layerIds:0,_allIds:16,_configLayerOrderDefined:16,_csvExporting:16,_fetchingData:16,_hideTable:16,_filterActive:16,_layer:16,_selectAllActive:16,_showHideOpen:16,_showOnlySelected:16,_toolInfos:16,_translations:16,_fullTextSearchInfo:16,_searchPlaceHolder:16,_size:16,_queryingData:16}}static{this.styles=V}static{this.shadowRootOptions=F}willUpdate(e){if(e.has("appLayout")&&this.appLayoutWatchHandler(),e.has("defaultOid")&&this.defaultOidWatchHandler(),e.has("defaultGlobalId")&&this.defaultGlobalIdWatchHandler(),e.has("enableCSV")&&this.enableCSVWatchHandler(),e.has("enableInlineEdit")&&this.enableInlineEditWatchHandler(),e.has("mapHidden")&&this.mapHiddenWatchHandler(),e.has("isMobile")&&this.isMobileWatchHandler(),e.has("mapInfo")&&this.mapInfoWatchHandler(),e.has("mapView")&&this.mapViewWatchHandler(),e.has("_layer")&&this._layerWatchHandler(),e.has("selectedIds")&&(this.hasUpdated||JSON.stringify(e.get("selectedIds"))!==JSON.stringify(this.selectedIds))&&this.selectedIdsWatchHandler(),e.has("selectedRelatedIds")&&(this.hasUpdated||JSON.stringify(e.get("selectedRelatedIds"))!==JSON.stringify(this.selectedRelatedIds))&&this.selectedRelatedIdsWatchHandler(),e.has("enableTableAutosave")&&this.hasUpdated&&this._table&&(this._table.autoSaveEnabled=this.enableTableAutosave),e.has("_translations")){let t=this._translations._lang,i=e.get("_translations")?._lang;t&&i&&t!==i&&this._initToolInfos()}if(e.has("pasteEnabled")&&this.hasUpdated){let t=this._toolInfos.find(i=>i.icon==="paste-with-attribute");t&&(t.disabled=!this.pasteEnabled)}e.has("layerIds")&&this.hasUpdated&&this._addListenersForLayers()}async appLayoutWatchHandler(){await this._initToolInfos(),this._updateShareUrl()}async defaultOidWatchHandler(){await this._handleDefaults()}async defaultGlobalIdWatchHandler(){await this._handleDefaults()}async enableCSVWatchHandler(){this._toolInfos?.length>0&&await this._initToolInfos()}enableInlineEditWatchHandler(){this._table&&(this._table.editingEnabled=this._editEnabled&&this.enableInlineEdit)}async mapHiddenWatchHandler(){this._toolInfos?.length>0&&await this._initToolInfos()}async isMobileWatchHandler(){!this._toolInfos&&!this.isMobile&&await this._initToolInfos()}async mapInfoWatchHandler(){this._configLayerOrderDefined="configLayerOrder"in(this.mapInfo?.layerOptions||{}),this._enabledLayerIds=C(this.mapInfo?.layerOptions?.layers||[],this.mapInfo?.layerOptions?.configLayerOrder),this._table&&(this._resetColumnTemplates(),this._sortTable(),await this._initToolInfos())}async mapViewWatchHandler(){this._mapClickHandle&&this._mapClickHandle.remove(),this.mapView&&(this._floorExpression="",this._searchExpression="",this.mapView.highlights=[{name:"default",color:"#00FFFF"},{name:"current-selection",color:"#ff00ff"},{name:"temporary",color:"#FFFF00"}],this._updateShareUrl(),this._mapClickHandle=u.on(()=>this.mapView,"click",e=>{this._creatingFeature||this._mapClicked(e)}))}async _layerWatchHandler(){if(this._hideTable=!1,this._fetchingData=!0,!this._layer){this._fetchingData=!1,this._hideTable=!0;return}try{await this._layer.when(),this._floorField=this._layer.floorInfo?.floorField||"",this._updateFloorDefinitionExpression(),await this._resetTable(),this._updateShareUrl()}catch(e){console.error(e),this._hideTable=!0}finally{this._fetchingData=!1}}async selectedIdsWatchHandler(){this._updateShareUrl(),this._validateEnabledActions(),this._selectAllActive&&this.selectedIds.length!==this._allIds.length&&(this._selectAllActive=!1),this.selectedIds.length>0&&(this._table.rowHighlightIds.removeAll(),this._table.rowHighlightIds.add(this.selectedIds[0])),this.selectedIds.length===0&&setTimeout(()=>{this.featureSelectionChange.emit(this.selectedIds)},700)}async selectedRelatedIdsWatchHandler(){this._validateEnabledActions(),this.selectedRelatedIds.length>0&&(this._relatedFeatureTable?.rowHighlightIds.removeAll(),this._relatedFeatureTable?.rowHighlightIds.add(this.selectedRelatedIds[0]))}async closeFilter(){await this._closeFilter()}async filterReset(){this._filterByExtentHandle&&(this._table&&(this._table.filterGeometry=void 0),this._filterByExtentHandle.remove(),this._filterByExtentHandle=void 0),await this._handleFilterListReset()}async filterUpdate(e,t){await this._handleFilterUpdate(e),t?(this._shouldUpdateTableOnExtentChange=!0,this._handleTableOnMapExtent()):t===!1&&(this._table&&(this._table.filterGeometry=void 0),this._filterByExtentHandle?.remove(),this._filterByExtentHandle=void 0,await this._updateAllIds())}isFilterActive(){return this._filterActive}async validateTableUpdate(e){this._shouldUpdateTableOnExtentChange=e}async validateActiveEdits(){return this._validateActiveEdits([],this.selectedIds)}async refresh(){this._table&&await this._refresh()}async setColumnOrder(e){this._setColumnTemplates(e)}async beforeMapInfoChange(e){let t=e.detail.ref,i=e.detail.mapInfo;if(this._hasPendingEdits()){e.preventDefault(),this._skipEditCheck=!1;let s=await this._validateActiveEdits([],this.selectedIds);await t.setMapByID(s?i.id:e.detail.currentId,!s)}}async editorInitialized(e){this._shouldUpdateTableOnExtentChange=!1,this._editor=e.detail}async closeEdit(){this._shouldUpdateTableOnExtentChange=!0,this._filterByExtentHandle&&this._handleTableOnMapExtent(),this._editor=void 0}async selectionChanged(e){let t=e.detail.selectedFeature[0],i=Number(t.getObjectId()),s=this._table;if(s.rowHighlightIds.length&&s.rowHighlightIds.removeAll(),s.rowHighlightIds.add(i),this._highlightFeatures(i),this.zoomAndScrollToSelected&&s&&this.mapView){let a=s.viewModel.getObjectIdIndex(i);s.scrollToIndex(a);let l=t.layer,h=this.mapView.allLayerViews.toArray(),r;h.some(async n=>n.layer.title===l?.title&&n.layer.type==="feature"?(r=n,this.mapView&&await I([i],r,this.mapView,!0,void 0,this.zoomToScale),!0):!1)}}async beforeLayerSelectionChange(e){if(this._hasPendingEdits()){e.preventDefault();let t=e.detail.ref;this._skipEditCheck=!1;let i=await this._validateActiveEdits([],this.selectedIds);return e.detail.selectedIds?await t.setLayerByIds(i?e.detail.newIds:e.detail.currentIds,!0):await t.setLayerById(i?e.detail.newId:e.detail.currentId,!0)}}async layerSelectionChange(e){await this._layerSelectionChanged(e)}async editsComplete(e){let t=e.detail;(t==="delete"||t==="add")&&(this._allIds=await this.queryAllIds()),await this._refresh()}async facilityChanged(e){this._updateFloorDefinitionExpression()}async levelChanged(e){this._floorLevel=e.detail,this._updateFloorDefinitionExpression()}async siteChanged(e){this._updateFloorDefinitionExpression()}async noLayersFound(){this._layer=void 0,this._allIds=[],this._size=0,this._clearSelection()}async clearSelection(){await this._validateActiveEdits([],this.selectedIds)&&this._clearSelection()}async mapChanged(){this._queryingData=!1,this._creatingFeature=!1,this._clearSelection()}async featuresSelected(e){e.detail.forEach(t=>{let i=this._table?.highlightIds.indexOf(t);i&&i<0&&this._table?.highlightIds.add(t)})}createWorkFlowStarted(){this._creatingFeature=!0}backFromCreateWorkFlow(){this._creatingFeature=!1}_pasteFeatures(){this._layer?.isTable||this._zoom()}_featuresPasted(){this._shouldSelectCreatedFeatures=!0}async load(){await this._initToolInfos()}render(){let e=this._fetchingData||this._hideTable?"display-none":"height-full",t=this._fetchingData?"":"display-none",i=this._queryingData?"":"display-none",s=this._size.toString(),a=this.selectedIds.length.toString(),l=this.isMobile?"height-full":"height-full-adjusted",h=this._canShowFullTextSearch();return this._validateActiveActions(),c`<div><calcite-scrim class=${y(i)} .loading=${this._queryingData}></calcite-scrim><calcite-shell><div class=${`width-full ${l}`}><calcite-panel class="height-full width-full panel-header-override">${this._getMapLayerPicker("header-actions-start")}${!this.isMobile&&c`${this._getTableControlRow("header-content")}${this._getActionsEnd("header-actions-end")}`||""}${h&&c`<div class="search-container border-bottom"><calcite-input class=search clearable icon=search @calciteInputChange=${r=>{this._searchTextChanged(r)}} .placeholder=${this._searchPlaceHolder} title=${this._searchPlaceHolder??f} type=search ${g(this._searchNode)}></calcite-input></div>`||""}<calcite-loader class=${y(t)} .label=${this._translations.fetchingData} scale=l></calcite-loader><div class=${y(e)} ${g(this.onTableNodeCreate)}></div></calcite-panel></div>${this.isMobile?void 0:c`<div class="bottom-left text-color height-19" id=solutions-selected-count-div>${(this._translations.recordsTotal?.replace("{{total-number-of-records}}",s)+" | "+this._translations.recordsSelected.replace("{{selected-number-of-records}}",a)).replace("{{total}}",s).replace("{{selected}}",a)}</div>`}</calcite-shell></div>`}updated(){this._table&&this.updateRelatedAttachmentColumns()}async _searchTextChanged(e){this._fullTextSearchInfo.forEach(t=>{t.searchTerm=e.target.value}),this._searchFullText()}async _searchFullText(e=!1){let t=[],i=!1;if(this._showOnlySelected)t=this._tempSelectedIds,i=!0;else if(e||await this._validateActiveEdits([],this.selectedIds))this._clearSelection(),this._tempSelectedIds=[];else return;this._searchExpression&&this._clearSearchDefinitionExpression();let s=[];if(this._fullTextSearchInfo?.length&&this._fullTextSearchInfo[0].searchTerm){let a=this._layer?.createQuery();a.fullText=this._fullTextSearchInfo,s=this._layer?await this._layer.queryObjectIds(a):[],i&&t?.length&&(s=s.filter(l=>t.includes(l))),await this._updateSearchDefinitionExpression(s?.length?s:[-1])}i&&s?.length&&(this._showOnlySelected=!0,this._table?.highlightIds.addMany(s.reverse())),this._selectedLayerView&&this._selectedLayerView.updating?await u.once(()=>!this._selectedLayerView.updating):await new Promise(a=>setTimeout(a,800)),this._allIds=await this.queryAllIds(),this.selectedIds=this.selectedIds.filter(a=>this._allIds.indexOf(a)>-1),await this._refresh(!1,!0)}_clearSearchDefinitionExpression(){let e=this._layer?.definitionExpression;this._searchExpression&&e&&e?.indexOf(this._searchExpression)>-1&&this._layer&&(e?.indexOf(" AND ("+this._searchExpression)>-1?this._layer.definitionExpression=e.replace(` AND (${this._searchExpression})`,""):this._layer.definitionExpression=e.replace(this._searchExpression,"")),this._searchExpression=""}async _updateSearchDefinitionExpression(e){let t=this._layer?.definitionExpression;if(this._layer)if(e?.length){let i=`objectId in(${e})`;this._layer.definitionExpression=this._searchExpression&&t&&t.includes(this._searchExpression)?t.replace(this._searchExpression,i):t?`${t} AND (${i})`:i,this._searchExpression=i}else this._clearSearchDefinitionExpression()}_canShowFullTextSearch(){return this._layer?.capabilities?.query?.supportsFullTextSearch&&this._layer.indexes.items.filter(e=>e.indexType=="FullText").length>0}_getFullTextSearchInfo(){if(this._fullTextSearchInfo=[],this._layer?.capabilities?.query?.supportsFullTextSearch){let e=this._layer.indexes?.filter(t=>t.indexType=="FullText");if(e?.length){let t=[];e.forEach(s=>{t.push(...s.fields.split(","))});let i=[];t.forEach(s=>{let a=this._layer?.getField(s.trim());a?.alias&&i.push(a.alias)}),this._searchPlaceHolder=this._translations.searchPlaceholder.replace("{{field_names}}",i.join(", ")),this._fullTextSearchInfo.push({onFields:["*"],searchTerm:"",searchType:"prefix"})}}}_getMapLayerPicker(e){let t=this.isMobile?"display-none":"";return c`<div class=${`border-end ${t}`} id=solutions-map-layer-picker-container slot=${e??f}><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._layer?[this._layer?.id]:[]} show-single-layer-as-label show-tables type=dropdown></map-layer-picker></div>`}_getLayerOption(e){let t;return this.mapInfo?.layerOptions?.layers.some(i=>i.id===e?(t=i,!0):!1),t}_getActionsEnd(e){let t=this._relatedFeatureTable?this._relatedFeatureTable.layer:this._layer,i=this._relatedFeatureTable||this._table,s=this._getLayerOption(t?.id||"");return c`<div class="display-flex" slot=${e??f}><field-selection .configExtraFields=${s?.extraFields} .layer=${t} .mapView=${this.mapView} .table=${i} .tableRef=${this.el}></field-selection>${this.enableShare&&!this.isMobile?this._getShare("share"):void 0}</div>`}_getTableControlRow(e){return c`<div class=${"height-51-px width-full display-flex"} slot=${e??f} ${g(this._toolbar)}>${this._getActionBar()}</div>`}_getActionBar(){return c`<calcite-action-bar class=width-full expand-disabled id=${this._getId("bar")??f} layout=horizontal><calcite-action-group>${this.isMobile?void 0:this._getActions()}</calcite-action-group></calcite-action-bar>`}_getActions(){return this._toolInfos?.reduce((e,t)=>(t&&e.push(t.isDanger?this._getDangerAction(t.icon,t.label,t.func,t.disabled):this._getAction(t.active,t.icon,t.indicator,t.label,t.func,t.disabled,!!t.loading,t.toolTip)),e),[])}_validateEnabledActions(){let e=this._getIds().length,t=["zoom-to-object","pencil","trash","erase","selected-items-filter","copy"];this._toolInfos?.forEach(i=>{i&&t.indexOf(i.icon)>-1&&(i.disabled=i.icon==="pencil"?e<2||e>m:e<1,i.toolTip=i.icon==="pencil"?e>m?this._translations.featureEditLimitNotice:this._translations.editMultiple:i.toolTip)})}_validateActiveActions(){let e=["filter","list-check-all","selected-items-filter"];this._toolInfos?.forEach(t=>{t&&e.indexOf(t.icon)>-1&&(t.icon==="filter"&&(t.indicator=this._filterActive),t.icon==="list-check-all"&&(t.active=this._selectAllActive),t.icon==="selected-items-filter"&&(t.active=this._showOnlySelected,t.label=this._showOnlySelected?this._translations.showAll:this._translations.showSelected,t.toolTip=this._showOnlySelected?this._translations.showAll:this._translations.showSelected))})}async _initToolInfos(){let e=this._getIds().length>0,t=this._relatedFeatureTable?this._relatedFeatureTable.layer.isTable:this._layer?.isTable,i=this.featureSelectionMode==="multiple"&&this._layer?.capabilities?.operations.supportsUpdate,s=this._getSelectedIds().length<2||this._getSelectedIds().length>m,a=!this.mapHidden&&!t,l=!this._relatedFeatureTable&&(!this._layer?.isTable||this._hasFilterExpressions()),h=this._featuresEmpty(),r=this.featureSelectionMode==="single",n=this.enableCSV;if(this._relatedFeatureTable){let _=await this._queryRelatedFeatures();n=_&&Object.keys(_).length>0}let d=[];l&&d.push({active:!1,icon:"filter",indicator:!1,label:this._translations.filters,func:()=>this.toggleFilter.emit(),disabled:!1,toolTip:this._translations.filters}),a&&d.push({active:!1,icon:"zoom-to-object",indicator:!1,label:this._translations.zoom,func:()=>{this._zoom()},disabled:!e,toolTip:this._translations.zoom}),i&&d.push({active:!1,icon:"pencil",indicator:!1,label:this._translations.editMultiple,func:()=>this.editMultipleFeatures.emit(this._getSelectedIds()),disabled:s,toolTip:this._translations.editMultiple}),this.showCopyPasteActions&&(d.push({active:!1,icon:"copy",indicator:!1,label:this._translations.copy,func:()=>this.copyFeatures.emit({featuresIds:this._getIds(),layerId:this._layer?.id}),disabled:!e,toolTip:this._translations.copy}),d.push({active:!1,icon:"paste-with-attribute",indicator:!1,label:this._translations.paste,func:()=>this.pasteFeatures.emit(),disabled:!this.pasteEnabled,toolTip:this._translations.paste})),this._deleteEnabled&&d.push({active:!1,icon:"trash",indicator:!1,label:this._translations.delete,func:()=>this._showDelete(),disabled:!e,isDanger:!0,toolTip:this._translations.delete}),d.push({active:!1,icon:"erase",indicator:!1,label:this._translations.clearSelection,func:()=>{this.clearSelection()},disabled:!e,toolTip:this._translations.clearSelection}),this._relatedFeatureTable||d.push({active:!1,icon:"selected-items-filter",indicator:!1,label:this._showOnlySelected?this._translations.showAll:this._translations.showSelected,func:()=>this._toggleShowSelected(),disabled:!e,toolTip:this._showOnlySelected?this._translations.showAll:this._translations.showSelected}),!r&&!this._relatedFeatureTable&&d.push({active:!1,icon:"list-check-all",indicator:!1,func:async()=>await this._selectAll(),label:this._translations.selectAll,disabled:h,toolTip:this._translations.selectAll}),!r&&!this._relatedFeatureTable&&d.push({active:!1,icon:"compare",indicator:!1,func:async()=>await this._switchSelected(),label:this._translations.switchSelected,disabled:h,toolTip:this._translations.switchSelected}),d.push({active:!1,icon:"refresh",indicator:!1,func:()=>{this._refresh()},label:this._translations.refresh,disabled:!1,toolTip:this._translations.refresh}),n&&d.push({active:!1,icon:"export",indicator:!1,func:()=>{this._exportToCSV()},label:this._translations.exportCSV,loading:this._csvExporting,disabled:h,toolTip:this._translations.exportCSV}),this._toolInfos=[...d]}async _addListenersForLayers(){this._layerEditsHandles.forEach(i=>i.remove()),this._layerEditsHandles=[];let e=this.mapView,t=[...new Set(this.layerIds)];if(!(!e||t.length===0))for(let i of t){let s=await w(e,i);if(!s)continue;let a=s.on("edits",async l=>{let h=Array.isArray(l?.addedFeatures)?l.addedFeatures:[],r=Array.isArray(l?.updatedFeatures)?l.updatedFeatures:[];if(h.length===0&&r.length===0)return;let n=h.map(p=>p.objectId).filter(p=>p!=null),d=r.map(p=>p.objectId).filter(p=>p!=null);if(n.length===0&&d.length===0)return;let _=this._layer?.id;if(this._shouldSelectCreatedFeatures){await this._selectFeatures(n,i),i===_&&this.featuresAdded.emit(n);return}else i===_&&n.length>0?(this._searchExpression?(this._clearSelection(),await this._searchFullText(!0)):await this._refresh(!1,!0),this.initCreateComponent.emit()):i===_&&d.length>0&&this._searchExpression&&await this._selectFeatures(d,i)});a&&this._layerEditsHandles.push(a)}}async _selectFeatures(e,t){try{let i=this._layer?.id;if(t===i){this._searchExpression?(await this._searchFullText(!0),this._allIds=await this.queryAllIds()):(await this._refresh(!1,!0),this._clearSelection());let s=[];for(let a of e)this._allIds.includes(a)&&s.push(a);s.length>0?this._table?.highlightIds.addMany(s):await this._refresh()}else this._clearSelection(),this._pastedFeaturesIds=e,this.requestLayerSelectionChange.emit(t);this._shouldSelectCreatedFeatures=!1}catch(i){this._shouldSelectCreatedFeatures=!1,console.error("Failed processing layer edits event",{layerId:t,error:i})}}_updateFloorDefinitionExpression(){if(this._floorField&&this._floorLevel){let e=`${this._floorField} = '${this._floorLevel}'`,t=this._layer?.definitionExpression;this._layer&&(this._layer.definitionExpression=t&&this._floorExpression&&t?.indexOf(this._floorExpression)>-1?t.replace(this._floorExpression,e):t?`${t} AND (${e})`:e),this._floorExpression=e}}_featuresEmpty(){return this._allIds?.length===0}_hasFilterExpressions(){let e=[],t=this._layer?.id;return this.mapInfo?.filterConfig?.layerExpressions&&t!==void 0&&(e=this.mapInfo.filterConfig.layerExpressions.filter(i=>i.id===t)),e.length>0}_getAction(e,t,i,s,a,l,h,r){let n=this._layer===void 0?!0:l;return c`<calcite-action .active=${e} .disabled=${n} .icon=${t} .id=${`layer-table-${t}`} .indicator=${i} .label=${s} .loading=${h} @click=${a} text text-enabled><div class="display-flex"><span class="label-override padding-start-1-4">${s}</span></div></calcite-action>${this._getToolTip("auto",`layer-table-${t}`,r)}`}_showDelete(){this.showDelete.emit({ids:this._getIds()})}_getShare(e){return c`<div id=${this._getId(e)??f}><instant-apps-social-share class="height-51 width-51 display-flex" .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} ${g(this._shareNode)}></instant-apps-social-share>${this._getToolTip("bottom",e,this._translations.share)}</div>`}_updateShareUrl(){let e=this._shareNode.value?.shareUrl;if(!e)return;let t=new URL(e);this.mapInfo?.id?t.searchParams.set("webmap",this.mapInfo.id):t.searchParams.delete("webmap"),this._layer?.id?t.searchParams.set("layer",this._layer.id):t.searchParams.delete("layer"),this.selectedIds?.length>0?t.searchParams.set("oid",this.selectedIds.reverse().join(",")):t.searchParams.delete("oid"),this.appLayout&&t.searchParams.set("applayout",this.appLayout),this.selectedRelatedIds?.length>0&&this._relatedFeatureTable?.layer?.id&&(t.searchParams.set("oid",this.selectedRelatedIds.join(",")),t.searchParams.set("layer",this._relatedFeatureTable?.layer?.id.toString())),this._shareNode.value&&(this._shareNode.value.autoUpdateShareUrl=!1,this._shareNode.value.shareUrl=t.href)}_getToolTip(e,t,i){return c`<calcite-tooltip .placement=${e} .referenceElement=${t}><span>${i}</span></calcite-tooltip>`}_getId(e){return`solutions-action-${e}`}_getDangerAction(e,t,i,s){let a=this._layer===void 0?!0:s;return c`<calcite-action class="delete-red" .disabled=${a} .id=${`layer-table-${e}`} .label=${t} @click=${i} text text-enabled><calcite-icon aria-hidden=true class="danger-icon-color" .icon=${e} scale=s></calcite-icon><span class="label-override padding-start-1-4 danger-label-color">${t}</span></calcite-action>${this._getToolTip("bottom",`layer-table-${e}`,t)}`}_getIds(){let e=this._relatedFeatureTable??this._table;return this._relatedFeatureTable&&this._table&&this._table.highlightIds.getItemAt(0)!==this.selectedIds[0]&&(e=this._table),e?.highlightIds.map(t=>Number.parseInt(t.toString(),10)).toArray()??[]}onTableNodeCreate(e){this._tableNode=e}async _getTable(e,t){this._layer&&(await this._layer.when(()=>{this._table=new k({autoRefreshEnabled:this.enableAutoRefresh,autoSaveEnabled:this.enableTableAutosave,layer:this._layer,view:this.mapView,columnReorderingEnabled:this.enableColumnReorder,editingEnabled:this._editEnabled&&this.enableInlineEdit,relatedRecordsEnabled:!0,attachmentsEnabled:!0,highlightEnabled:!1,multiSortEnabled:!1,visibleElements:{columnDescriptions:!1,header:!1,menu:!1,progress:!1},tableTemplate:{columnTemplates:t},container:e})}),await this._table?.when(()=>{this._table?.viewModel.addHandles(this._table.highlightIds.on("change",i=>{this._handleOnChange(i)})),this._table?.viewModel.addHandles(this._table.on("cell-pointerover",this.tempHighlightOnHover.bind(this))),this._table?.viewModel.addHandles(this._table.on("cell-pointerout",this._removeTempHighlight.bind(this))),this._table?.viewModel.addHandles(this._table.on("column-reorder",this._handleColumnReorder.bind(this))),this.listenOn(this._tableNode,"mouseleave",this._removeTempHighlight),this._table?.viewModel.addHandles(u.watch(()=>this._table.size,i=>{this._size=i})),u?.watch(()=>this._table?.relatedTable,async i=>{if(i){if(i.rowHighlightIds.length){let a={added:[i.rowHighlightIds.getItemAt(0)],removed:[]};this._handleOnChange(a)}let s=i.layer;if(this._layerEditHandle=s.on("edits",async()=>{await new Promise(a=>setTimeout(a,50)),await this._refresh(!0)}),this._checkEditEnabled(s),i.editingEnabled=this._editEnabled&&this.enableInlineEdit,i.autoSaveEnabled=this.enableTableAutosave,this._relatedFeatureTable=i,typeof i.layer?.id=="string"&&i.layer?.fields){let a=i.layer.popupTemplate?.fieldInfos,l=this._getColumnTemplates(i.layer.id,i.layer.fields,a);this._relatedFeatureTable.tableTemplate=new v({columnTemplates:l})}i.highlightIds.on("change",a=>{this._handleRelatedRecordsChange(a)})}else{this.selectedRelatedIds=[],this._relatedFeatureTable=void 0,this._layerEditHandle&&this._layerEditHandle.remove();let s=this._layer;this._refresh(),s&&this.relatedRecordToggled.emit(s),this._finishOnChange()}await this._initToolInfos()})}))}async _handleRelatedRecordsChange(e){await this._handleOnChange(e),this._updateShareUrl()}hasAttachmentsEnabled(e){if(!e?.capabilities)return!1;let{capabilities:{data:{supportsAttachment:t},operations:{supportsQueryAttachments:i}}}=e;return t&&i}async _handleOnChange(e){if(!await this._validateActiveEdits([...e.added],[...e.removed]))return;let t=[...this._getIds()],i=this._getSelectedLayer(t);this._relatedFeatureTable&&this._table?.highlightIds.getItemAt(0)!==this.selectedIds[0]&&(i=this._layer,await this._initToolInfos()),i&&this.relatedRecordToggled.emit(i),this.featureSelectionMode==="single"&&(this._relatedFeatureTable&&t.length>1?(this._relatedFeatureTable.highlightIds.remove(t[0]),t.shift()):t.length>1&&!this._selectAllActive&&(this._table?.highlightIds.remove(t[0]),t.shift())),!this._relatedFeatureTable||this._relatedFeatureTable&&this._table?.highlightIds.getItemAt(0)!==this.selectedIds[0]?(this.selectedRelatedIds=[],this.selectedIds=t.reverse(),this._tempSelectedIds=[...this.selectedIds],this._highlightFeatures(this.selectedIds[0])):this.selectedRelatedIds=t.reverse(),this._finishOnChange()}async _validateActiveEdits(e,t){let i=!0;if((this._editor||this._createFeatureEditor)&&!this._skipEditCheck){if(this._hasPendingEdits()){this.beforeFeatureSelectionChange.emit();let s=!1;try{this._editor?.activeWorkflow&&await this._editor.activeWorkflow.cancel({force:!1}),this._createFeatureEditor?.activeWorkflow&&await this._createFeatureEditor.activeWorkflow.cancel({force:!1})}catch(a){s=a?.name==="workflow:cancel-denied"}if(s){this.continueEditing.emit();let a=this._relatedFeatureTable&&this._relatedFeatureTable.highlightIds.length>0?this._relatedFeatureTable:this._table;i=!1,this._skipEditCheck=!0,e.length>0?a?.highlightIds.removeMany(e):t.length>0&&a?.highlightIds.addMany(t)}}}else i=!this._skipEditCheck,this._skipEditCheck=!1;return this._shouldUpdateTableOnExtentChange=i,i}_hasPendingEdits(){let e=this._editor?.activeWorkflow?.activeWorkflow?.hasPendingEdits,t=this._createFeatureEditor?.activeWorkflow?.hasPendingEdits;return e||t}_finishOnChange(){this._showOnlySelected&&!this._relatedFeatureTable&&(this._table&&this._getSelectedIds().length>0?this._table.filterBySelectionEnabled=!0:this._toggleShowSelected());let e=this._getSelectedIds();setTimeout(()=>{this.featureSelectionChange.emit(e)},50)}_handleColumnReorder(){this.columnReorder.emit()}tempHighlightOnHover(e){if(this._removeTempHighlight(),this._selectedLayerView){let t=e.feature;t&&(this._temporaryFeatureHandle=this._selectedLayerView?.highlight([t],{name:"temporary"}))}}_removeTempHighlight(){this._temporaryFeatureHandle&&this._temporaryFeatureHandle.remove()}_highlightFeatures(e){if(this._clearHighlights(),this.selectedIds.length>0&&this._selectedLayerView&&(this._currentFeatureHighlightHandle=this._selectedLayerView?.highlight([e],{name:"current-selection"}),this.selectedIds.length>1)){let t=this.selectedIds.filter(i=>i!==e);this._defaultFeaturesHandle=this._selectedLayerView?.highlight(t,{name:"default"})}}_clearHighlights(){this._removeTempHighlight(),this._currentFeatureHighlightHandle&&this._currentFeatureHighlightHandle.remove(),this._defaultFeaturesHandle&&this._defaultFeaturesHandle.remove()}_resetColumnTemplates(){if(this._layer){let e=this._layer.popupTemplate?.fieldInfos,t=this._getColumnTemplates(this._layer.id,this._layer.fields,e);t?.length===0?this._tableNode?.classList.add("display-none"):this._tableNode?.classList.remove("display-none");let i=this._table?.tableTemplate?.columnTemplates,s=i&&t&&i.length!==t.length||t?.some((a,l)=>i&&i[l]?JSON.stringify(i[l])!==JSON.stringify(a):!1);if(this._table&&t&&(s||!this._columnsInfo)){this._table.tableTemplate=new v({columnTemplates:t});let a=t.map(l=>l.fieldName);this._initColumnsInfo(a)}}}_setColumnTemplates(e){this._table&&e&&(this._table.tableTemplate=new v({columnTemplates:e}))}async _resetTable(){if(this._loaded=!1,this._clearSelection(),this._allIds=await this.queryAllIds(),!this._table&&this._layer){let e=this._layer.popupTemplate?.fieldInfos,t=this._getColumnTemplates(this._layer.id,this._layer.fields,e);this._tableNode&&await this._getTable(this._tableNode,t)}else this._table&&(this._table.view=this.mapView,this._table.layer=this._layer);await this._initLayerRefresh(),this._checkEditEnabled(this._layer),this._table&&(this._table.editingEnabled=this._editEnabled&&this.enableInlineEdit,this._table.autoSaveEnabled=this.enableTableAutosave,await this._table.when(),setTimeout(()=>{this._loaded||this.finishLoading()},1e3),await u.once(()=>this._table?.state==="loaded").then(async()=>{await this.finishLoading()}))}async finishLoading(){try{this._loaded=!0,this._table?.highlightIds.removeAll(),this._table.objectIds.removeAll(),this._resetColumnTemplates(),this._showOnlySelected=!1,await this._handleDefaults(),await this._sortTable(),await this._initToolInfos(),["esri-feature-table","esri-widget"].forEach(e=>{this._tableNode&&!this._tableNode.classList.contains(e)&&this._tableNode.classList.add(e)}),this._table&&this._pastedFeaturesIds.length>0&&await this._applyPastedFeatureHighlights()}catch(e){console.log(e)}}async _applyPastedFeatureHighlights(){let e=[...this._pastedFeaturesIds];await new Promise(t=>{requestAnimationFrame(()=>{this._table?.highlightIds.addMany(e),this._pastedFeaturesIds=[],t()})})}async _initLayerRefresh(){this._refreshHandle&&this._refreshHandle.remove(),this._layer&&(this._refreshHandle=this._layer.on("refresh",e=>{e.dataChanged&&this._updateAllIds()}))}async _updateAllIds(){let e=await this.queryAllIds(),t=this.selectedIds.filter(i=>this._allIds.indexOf(i)>-1);(JSON.stringify(e)!==JSON.stringify(this._allIds)||JSON.stringify(this.selectedIds)!==JSON.stringify(t))&&(this._allIds=e,this.selectedIds=t,await this._refresh())}async _handleDefaults(){if(!this._defaultOidHonored&&this.defaultOid?.length>0&&this.defaultOid[0]>-1&&this._table&&(await this._selectDefaultFeature(this.defaultOid),this._defaultOidHonored=!0,this.defaultOid=[],this._showOnlySelected=!1,this._toggleShowSelected()),!this._defaultGlobalIdHonored&&this.defaultGlobalId&&this.defaultGlobalId?.length>0&&this._table&&this._layer){let e=await A(this.defaultGlobalId,this._layer),t=e?.length>0?e.map(i=>Number(i.getObjectId())):void 0;t&&await this._selectDefaultFeature(t),this._defaultGlobalIdHonored=!0,this.defaultGlobalId=[],this._showOnlySelected=!1,this._toggleShowSelected()}}_initColumnsInfo(e){let t=this._table?.columns.reduce((s,a)=>((!e||e?.indexOf(a.name)>-1)&&(s[a.name]=!a.hidden),s),{}),i=this._table?.columns.map(s=>s.name);(e&&i?e.filter(s=>i.indexOf(s)<0):[]).forEach(s=>{t[s]=!0}),this._columnsInfo=e?e.reduce((s,a)=>(s[a]=t[a],s),{}):t}async _selectDefaultFeature(e){e.length>0&&this._table?.highlightIds.addMany(e)}_checkEditEnabled(e){this._editEnabled=!!(e?.editingEnabled&&e?.capabilities?.operations.supportsUpdate),this._deleteEnabled=!!(e?.editingEnabled&&e?.capabilities?.operations.supportsDelete)}async _sortTable(){let e=this._layer?.objectIdField,t="desc",i,s=this.mapInfo?.layerOptions?.layers,a=this._layer?.id;s&&s.length>0&&a!==void 0&&(i=s.filter(l=>l.id===a),i&&i.length>0&&(i=i[0],i.sortField&&i.fields?.includes(i.sortField)&&(e=i.sortField),t=i?.sortOrder?i.sortOrder:"desc")),this._table&&this._layer&&(await this._table.when(),await this._layer.when(()=>{e&&this._table?.sortColumn(e,t)}))}async _handleFilterListReset(){this._filterActive=!1,this._updateShareUrl(),await this._searchFullText()}async _handleFilterUpdate(e){if(this._floorExpression&&this._layer){let t=this._layer.definitionExpression,i=new RegExp(`${this._floorField} = ['].+[']`,"gm");this._layer.definitionExpression=t&&this._floorField&&t.indexOf(`${this._floorField} = '`)>-1?t.replace(i,this._floorExpression):t?`${t} AND (${this._floorExpression})`:this._floorExpression}this._filterActive=e,this._updateShareUrl(),await this._searchFullText()}_handleTableOnMapExtent(){this._table&&(this._filterByExtentHandle=u.when(()=>this.mapView?.stationary,async()=>{if(this._shouldUpdateTableOnExtentChange&&this.appLayout==="splitView"){if(await new Promise(e=>setTimeout(e,800)),this._table&&this.mapView){this._table.filterGeometry=this.mapView.extent;let e={geometry:this.mapView.extent},t=this._layer&&await this._layer.queryObjectIds(e),i=this.selectedIds.filter(a=>!t?.includes(a)),s=this._outOFExtentOids.filter(a=>t?.includes(a));i.length>0&&(this._table&&this._table?.viewModel?.attachmentsViewOptions?.objectId&&this._table.viewModel.hideAttachmentsView(),this._table.highlightIds.removeMany(i),this._outOFExtentOids=[...this._outOFExtentOids,...i]),s.length>0&&(this.selectedIds=[...new Set([...this.selectedIds,...s])],this._table.highlightIds.removeAll(),this._table.highlightIds.addMany(this.selectedIds.reverse()),this._outOFExtentOids=this._outOFExtentOids.filter(a=>!s.includes(a)))}this._allIds=await this.queryAllIds()}},{initial:!0}))}async _closeFilter(){this._allIds=await this.queryAllIds()}async queryAllIds(){if(this._layer){let e=this._layer.createQuery();return e.geometry=this._filterByExtentHandle&&this.mapView?this.mapView.extent:null,e.where=this._layer.definitionExpression||"1=1",await this._layer.queryObjectIds(e)}else return[]}async _mapClicked(e){let t={include:this._layer},i=await this.mapView?.hitTest(e.screenPoint,t);if(i&&i.results.length>0){let s=i.results;if(this.featureSelectionMode==="single"){this._table?.highlightIds.removeAll();let a=s[0].graphic.getObjectId();if(a){let l=this._table?.highlightIds.indexOf(a);l!==void 0&&l<0&&this._table?.highlightIds.add(a)}}else s.forEach(a=>{let l=Number(a.graphic.getObjectId()),h=this._table?.highlightIds.indexOf(l);h&&h<0&&l&&this._table?.highlightIds.add(l)});this._showOnlySelected&&this._table&&(this._table.filterBySelectionEnabled=!0)}}async _selectAll(){let e=this._allIds,t=e.filter(i=>this.selectedIds.indexOf(i)<0);await this._validateActiveEdits(t,this.selectedIds)&&this._table?(this._table.highlightIds.removeAll(),this._table.highlightIds.addMany(e),this.selectedIds=e,this._finishOnChange(),this._selectAllActive=!0):this._skipEditCheck=!1}_toggleShowSelected(){this._showOnlySelected=!this._showOnlySelected,this._table&&(this._table.filterBySelectionEnabled=this._showOnlySelected)}_clearSelection(){this._relatedFeatureTable||(this.selectedIds=[],this._outOFExtentOids=[],this._table&&this._table?.viewModel?.attachmentsViewOptions?.objectId&&this._table.viewModel.hideAttachmentsView(),this._table?.highlightIds.removeAll(),this._clearHighlights(),this._table?.rowHighlightIds.removeAll()),this._relatedFeatureTable&&(this._relatedFeatureTable?.highlightIds.removeAll(),this.selectedRelatedIds=[]),this._finishOnChange()}async _switchSelected(){let e=[...this.selectedIds],t=this._allIds.reduce((i,s)=>(e.indexOf(s)<0&&i.push(s),i),[]).sort((i,s)=>i-s);await this._validateActiveEdits(t,e)&&this._table?(this._table.highlightIds.removeAll(),this._table.highlightIds.addMany(t),this.selectedIds=t,this._finishOnChange()):this._skipEditCheck=!1}async _exportToCSV(){let e=this._relatedFeatureTable?this._relatedFeatureTable.layer:this._layer;if(!e)return;let t={},i=this._getIds();if(this._relatedFeatureTable?.tableParent&&this._relatedFeatureTable.highlightIds.length===0){let l=this._relatedFeatureTable.tableParent.highlightIds?.getItemAt(0);if(l!==void 0){let h=await this._queryRelatedFeatures(),r=[];h&&h[l]?.features&&(h[l].features.forEach(n=>{n.attributes&&r.push(n.attributes[e.objectIdField])}),i=r.length>0?r:[])}}t[e.id]={selectionSetNames:[e.title||""],ids:i,layer:e};let s=this._relatedFeatureTable??this._table;if(!s)return;let a=s&&s.columns.toArray().reduce((l,h)=>{if(!h.hidden){let r=h?.name||h?.fieldName;r&&l.push(r.toLocaleLowerCase())}return l},[]);this._updateToolInfoLoading("export",!0),this._csvExporting=!0,this.mapView?.map&&await $(this.mapView.map,t,!1,!1,!0,a,!0,!0),this._updateToolInfoLoading("export",!1),this._csvExporting=!1}async _queryRelatedFeatures(){let e=this._relatedFeatureTable?this._relatedFeatureTable?this._relatedFeatureTable.layer:this._relatedFeatureTable.tableParent?.layer:this._layer,t=this._relatedFeatureTable?.tableParent?.highlightIds?.items[0],i=this._relatedFeatureTable?.tableParent?.layer,s=e?.relationships?.find(l=>i.relationships?.some(h=>h.id===l.id)),a=new M({objectIds:[t],outFields:["*"],relationshipId:s?.id});return t&&a&&await i.queryRelatedFeatures(a).catch(async l=>{console.error(l)})}_updateToolInfoLoading(e,t){this._toolInfos.some(i=>i?.icon===e?(i.loading=t,!0):!1)}async _refresh(e,t){if(t||await this._validateActiveEdits([],this.selectedIds)){this._table&&await this._table.refresh(),this._relatedFeatureTable&&await this._relatedFeatureTable.refresh(),this._allIds=await this.queryAllIds();let i=this._getSelectedLayer(this.selectedRelatedIds);if(i&&this.relatedRecordToggled.emit(i),!e){let s=this._getSelectedIds();this.featureSelectionChange.emit(s)}}}_getSelectedIds(){let e;return this._relatedFeatureTable?this.selectedRelatedIds.length>0?e=this.selectedRelatedIds:e=this._relatedFeatureTable.tableParent?.highlightIds.toArray()??[]:e=this.selectedIds,e}_getSelectedLayer(e){let t;return this._relatedFeatureTable?e.length>0?t=this._relatedFeatureTable.layer:t=this._relatedFeatureTable.tableParent?.layer:t=this._layer,t}async _clearSearchText(){if(this._searchNode.value){this._searchNode.value.value="";let e={target:{value:""}};await this._searchTextChanged(e)}}async _zoom(){this._layer&&this.mapView&&await I(this.selectedIds,this._selectedLayerView,this.mapView,!0,void 0,this.zoomToScale)}async _layerSelectionChanged(e){let t=e.detail[0];if(t!==this._layer?.id||this._featuresEmpty()){this._fetchingData=!0,await this._clearSearchText();let i=this.mapView&&await w(this.mapView,t);i&&await i.when(async()=>{this._selectedLayerView=!i.isTable&&this.mapView?await H(this.mapView,i.id):null,this._table&&this._table?.viewModel?.attachmentsViewOptions?.objectId&&this._table.viewModel.hideAttachmentsView(),this._shouldUpdateTableOnExtentChange=!0,this._layer=i,await this._initToolInfos(),this._getFullTextSearchInfo()})}this._creatingFeature=!1,this._fetchingData=!1}_getColumnTemplates(e,t,i){let s=this._getLayerOption(e),a=this._layer?.attributeTableTemplate?.elements,l=[];a?.length>0&&this.honorMapFieldSettings&&(l=a.map(n=>n.fieldName));let h=s?.fields&&s?.fieldOrder?s.fieldOrder.filter(n=>s?.fields&&s.fields.indexOf(n)>-1):l.length>0?l:void 0,r;return t&&(r=t.reduce((n,d)=>{let _={type:"field",fieldName:d.name,label:this.getFieldLabel(d,i),menuConfig:this._getMenuConfig(d.name)};return s&&s.fields&&s?.fields?.length>0?s.fields.indexOf(d.name)>-1&&n.push(_):l.length>0?l.indexOf(d.name)>-1&&n.push(_):n.push(_),n},[])),r?h?r?.sort(this._sortFields.bind(this,h)):r:[]}updateRelatedAttachmentColumns(){let e=this._getLayerOption(this._layer?.id||""),t=this.hasAttachmentsEnabled(this._layer),i=!0,s="attachments",a=(e?.extraFields||[]).reduce((h,r)=>(r.startsWith("related:")?h.related.push(r.split("related:")[1]):h.extra.push(r),h),{related:[],extra:[]}),l=a.extra.some(h=>h.toLowerCase()===s);a&&(t=l&&t,i=a.related.length>0,this._table?.columns.forEach(h=>{h.fieldName.startsWith("EsriFeatureTableRelationshipColumn")&&(h.hidden=!a.related.some(r=>r.toLowerCase()===(h.effectiveLabel||"").toLowerCase())),h.fieldName.startsWith("EsriFeatureTableAttachmentsColumn")&&(h.hidden=!a.extra.some(r=>r.toLowerCase()===h.effectiveLabel.toLowerCase()))})),this._table.relatedRecordsEnabled=i,this._table.attachmentsEnabled=t}getFieldLabel(e,t){let i=e.alias?e.alias:e.name;return t?.some(s=>s.fieldName===e.name?(i=s.label,!0):!1),i||e.name}_sortFields(e,t,i){return e?.indexOf(t.fieldName)-e.indexOf(i.fieldName)}_getMenuConfig(e){return{items:[{label:this._translations.hideField,icon:"view-hide",autoCloseMenu:!0,clickFunction:()=>{this._handleHideClick(e)}}]}}_handleHideClick(e){this._columnsInfo&&this._table&&(this._columnsInfo[e]=!1,this._table.hideColumn(e),this._table.tableTemplate&&this._table.tableTemplate.columnTemplates.forEach(t=>{t.fieldName===e&&(t.visible=!1)}))}};S("layer-table",T);return T},"widgets/FeatureTable","core/reactiveUtils","rest/support/RelationshipQuery","widgets/FeatureTable/support/TableTemplate",a,d,e,h,i)
2
+ import i from"./4SYZADNV.js";import{a as L}from"./JGSZS6VC.js";import h from"./2C4DK6YC.js";import e from"./WV7QX3ED.js";import d from"./4RWJ22V3.js";import a from"./TK5EXRZL.js";import{a as O}from"./AIZ2P72X.js";import{b as S}from"./YJ3DKEEZ.js";import{F as b,G as g,H as x,J as y,h as E,i as c,l as f,q as o,u as F}from"./T3EPRHTT.js";export default $arcgis.t(([k,u,M,v,{n:C},{i:m},{c:A},{c:H,d:w,j:I},{b:$}])=>{var V=E`@layer{:host{display:block}.height-full{height:100%}.height-full-adjusted{height:calc(100% - 20px)}.width-full{width:100%}.display-flex{display:flex}.display-none{display:none}.table-border{border:1px solid var(--calcite-color-border-2)}.border-end{border-inline-end:1px solid var(--calcite-color-border-2)}.border-bottom{border-bottom:1px solid var(--calcite-color-border-2)}.padding-5{padding:5px}.padding-end-1{padding-inline-end:1rem}.height-51-px{height:51px}.height-50-px{height:50px}.bottom-left{position:absolute;left:0;bottom:0;padding-left:5px}html[dir=rtl] .bottom-left{position:absolute;right:0;bottom:0;padding-right:5px}.height-19{height:19px}.background{background-color:var(--calcite-color-surface-1)}.text-color{color:var(--calcite-color-text-1)}.align-center{align-items:center}.danger-color{color:var(--calcite-color-status-danger)}.esri-feature-table vaadin-grid{border:none!important}vaadin-grid-cell-content{font-size:14px!important;color:var(--calcite-color-text-3)!important}.absolute-right{position:absolute;right:0;left:unset}html[dir=rtl] .absolute-right{left:0;right:unset}.disabled{cursor:default!important;user-select:none;opacity:var(--calcite-opacity-disabled);pointer-events:none}.actions-end{height:50px!important;display:inline-flex}.border-top{border-top:1px solid var(--calcite-color-border-2)}.modal{--calcite-dialog-content-space: 0}.esri-feature-table__table-container{height:100%}.search-container{background-color:var(--calcite-color-surface-2)!important}.search{--calcite-color-border-input: var(--calcite-color-border-3);width:60%;padding:10px}.delete-red{--calcite-icon-color: var(--calcite-color-status-danger);--calcite-color-text-1: var(--calcite-color-status-danger);--calcite-color-text-3: var(--calcite-color-status-danger)}.label-override{white-space:nowrap}.padding-start-1-4{padding-inline-start:.5rem}.panel-header-override{--calcite-panel-header-content-space: 0px}.danger-label-color{color:var(--calcite-color-status-danger)}.danger-icon-color{--calcite-icon-color: var(--calcite-color-status-danger)}.width-51{width:51px}.height-51{height:51px}calcite-action-bar{--calcite-internal-action-bar-gap: 0px;--calcite-internal-action-bar-padding: 0px}}`,T=class extends x{constructor(){super(),this.defaultGlobalId=[],this.defaultLayerId="",this.defaultOid=[],this.enableAutoRefresh=!1,this.enableColumnReorder=!0,this.enableCSV=!1,this.enableInlineEdit=!1,this.enableShare=!1,this.enableTableAutosave=!0,this.featureSelectionMode="multiple",this.selectedRelatedIds=[],this.honorMapFieldSettings=!1,this.isMobile=!1,this.mapHidden=!1,this.showOnlyUpdatableLayers=!1,this.selectedIds=[],this.shareIncludeEmbed=!1,this.shareIncludeSocial=!1,this.showNewestFirst=!1,this.zoomAndScrollToSelected=!1,this.pasteEnabled=!1,this.showCopyPasteActions=!1,this.layerIds=[],this._allIds=[],this._configLayerOrderDefined=!1,this._csvExporting=!1,this._fetchingData=!1,this._hideTable=!1,this._filterActive=!1,this._selectAllActive=!1,this._showHideOpen=!1,this._showOnlySelected=!1,this._toolInfos=[],this._translations=O({name:"layer-table",blocking:!0}),this._fullTextSearchInfo=[],this._searchPlaceHolder="",this._size=0,this._queryingData=!1,this._editEnabled=!1,this._enabledLayerIds=[],this._defaultGlobalIdHonored=!1,this._defaultOidHonored=!1,this._deleteEnabled=!1,this._floorExpression="",this._floorField="",this._floorLevel="",this._loaded=!1,this._shareNode=b(),this._toolbar=b(),this._searchExpression="",this._skipEditCheck=!1,this._tempSelectedIds=[],this._outOFExtentOids=[],this._shouldUpdateTableOnExtentChange=!0,this._creatingFeature=!1,this._searchNode=b(),this._layerEditsHandles=[],this._pastedFeaturesIds=[],this._shouldSelectCreatedFeatures=!1,this.columnReorder=o(),this.featureSelectionChange=o(),this.toggleFilter=o(),this.showDelete=o(),this.relatedRecordToggled=o(),this.editMultipleFeatures=o(),this.copyFeatures=o(),this.pasteFeatures=o(),this.featuresAdded=o(),this.initCreateComponent=o(),this.requestLayerSelectionChange=o(),this.beforeFeatureSelectionChange=o(),this.continueEditing=o(),this.createFeatureEditorInitialized=e=>{this._createFeatureEditor=e.detail},this.createFeatureEditorClosed=()=>{this._createFeatureEditor=void 0},this.listenOn(window,"beforeMapInfoChange",this.beforeMapInfoChange,{capture:!0}),this.listenOn(window,"editorInitialized",this.editorInitialized),this.listenOn(window,"createFeatureEditorInitialized",this.createFeatureEditorInitialized),this.listenOn(window,"createFeatureEditorClosed",this.createFeatureEditorClosed),this.listenOn(window,"closeEdit",this.closeEdit),this.listenOn(window,"selectionChanged",this.selectionChanged),this.listenOn(window,"beforeLayerSelectionChange",this.beforeLayerSelectionChange),this.listenOn(window,"layerSelectionChange",this.layerSelectionChange),this.listenOn(window,"editsComplete",this.editsComplete),this.listenOn(window,"facilityChanged",this.facilityChanged),this.listenOn(window,"levelChanged",this.levelChanged),this.listenOn(window,"siteChanged",this.siteChanged),this.listenOn(window,"noLayersFound",this.noLayersFound),this.listenOn(window,"clearSelection",this.clearSelection),this.listenOn(window,"mapChanged",this.mapChanged),this.listenOn(window,"featuresSelected",this.featuresSelected),this.listenOn(window,"createWorkFlowStarted",this.createWorkFlowStarted),this.listenOn(window,"backFromCreateWorkFlow",this.backFromCreateWorkFlow),this.listenOn(window,"pasteFeatures",this._pasteFeatures),this.listenOn(window,"featuresPasted",this._featuresPasted),L(window)}static{this.properties={appLayout:1,defaultGlobalId:0,defaultLayerId:1,defaultOid:0,enableAutoRefresh:5,enableColumnReorder:5,enableCSV:5,enableInlineEdit:5,enableShare:5,enableTableAutosave:5,featureSelectionMode:1,selectedRelatedIds:0,honorMapFieldSettings:5,isMobile:5,mapHidden:5,mapInfo:0,mapView:0,showOnlyUpdatableLayers:5,selectedIds:0,shareIncludeEmbed:5,shareIncludeSocial:5,showNewestFirst:5,zoomAndScrollToSelected:5,zoomToScale:9,pasteEnabled:5,showCopyPasteActions:5,layerIds:0,_allIds:16,_configLayerOrderDefined:16,_csvExporting:16,_fetchingData:16,_hideTable:16,_filterActive:16,_layer:16,_selectAllActive:16,_showHideOpen:16,_showOnlySelected:16,_toolInfos:16,_translations:16,_fullTextSearchInfo:16,_searchPlaceHolder:16,_size:16,_queryingData:16}}static{this.styles=V}static{this.shadowRootOptions=F}willUpdate(e){if(e.has("appLayout")&&this.appLayoutWatchHandler(),e.has("defaultOid")&&this.defaultOidWatchHandler(),e.has("defaultGlobalId")&&this.defaultGlobalIdWatchHandler(),e.has("enableCSV")&&this.enableCSVWatchHandler(),e.has("enableInlineEdit")&&this.enableInlineEditWatchHandler(),e.has("mapHidden")&&this.mapHiddenWatchHandler(),e.has("isMobile")&&this.isMobileWatchHandler(),e.has("mapInfo")&&this.mapInfoWatchHandler(),e.has("mapView")&&this.mapViewWatchHandler(),e.has("_layer")&&this._layerWatchHandler(),e.has("selectedIds")&&(this.hasUpdated||JSON.stringify(e.get("selectedIds"))!==JSON.stringify(this.selectedIds))&&this.selectedIdsWatchHandler(),e.has("selectedRelatedIds")&&(this.hasUpdated||JSON.stringify(e.get("selectedRelatedIds"))!==JSON.stringify(this.selectedRelatedIds))&&this.selectedRelatedIdsWatchHandler(),e.has("enableTableAutosave")&&this.hasUpdated&&this._table&&(this._table.autoSaveEnabled=this.enableTableAutosave),e.has("_translations")){let t=this._translations._lang,i=e.get("_translations")?._lang;t&&i&&t!==i&&this._initToolInfos()}if(e.has("pasteEnabled")&&this.hasUpdated){let t=this._toolInfos.find(i=>i.icon==="paste-with-attribute");t&&(t.disabled=!this.pasteEnabled)}e.has("layerIds")&&this.hasUpdated&&this._addListenersForLayers()}async appLayoutWatchHandler(){await this._initToolInfos(),this._updateShareUrl()}async defaultOidWatchHandler(){await this._handleDefaults()}async defaultGlobalIdWatchHandler(){await this._handleDefaults()}async enableCSVWatchHandler(){this._toolInfos?.length>0&&await this._initToolInfos()}enableInlineEditWatchHandler(){this._table&&(this._table.editingEnabled=this._editEnabled&&this.enableInlineEdit)}async mapHiddenWatchHandler(){this._toolInfos?.length>0&&await this._initToolInfos()}async isMobileWatchHandler(){!this._toolInfos&&!this.isMobile&&await this._initToolInfos()}async mapInfoWatchHandler(){this._configLayerOrderDefined="configLayerOrder"in(this.mapInfo?.layerOptions||{}),this._enabledLayerIds=C(this.mapInfo?.layerOptions?.layers||[],this.mapInfo?.layerOptions?.configLayerOrder),this._table&&(this._resetColumnTemplates(),this._sortTable(),await this._initToolInfos())}async mapViewWatchHandler(){this._mapClickHandle&&this._mapClickHandle.remove(),this.mapView&&(this._floorExpression="",this._searchExpression="",this.mapView.highlights=[{name:"default",color:"#00FFFF"},{name:"current-selection",color:"#ff00ff"},{name:"temporary",color:"#FFFF00"}],this._updateShareUrl(),this._mapClickHandle=u.on(()=>this.mapView,"click",e=>{this._creatingFeature||this._mapClicked(e)}))}async _layerWatchHandler(){if(this._hideTable=!1,this._fetchingData=!0,!this._layer){this._fetchingData=!1,this._hideTable=!0;return}try{await this._layer.when(),this._floorField=this._layer.floorInfo?.floorField||"",this._updateFloorDefinitionExpression(),await this._resetTable(),this._updateShareUrl()}catch(e){console.error(e),this._hideTable=!0}finally{this._fetchingData=!1}}async selectedIdsWatchHandler(){this._updateShareUrl(),this._validateEnabledActions(),this._selectAllActive&&this.selectedIds.length!==this._allIds.length&&(this._selectAllActive=!1),this.selectedIds.length>0&&(this._table.rowHighlightIds.removeAll(),this._table.rowHighlightIds.add(this.selectedIds[0])),this.selectedIds.length===0&&setTimeout(()=>{this.featureSelectionChange.emit(this.selectedIds)},700)}async selectedRelatedIdsWatchHandler(){this._validateEnabledActions(),this.selectedRelatedIds.length>0&&(this._relatedFeatureTable?.rowHighlightIds.removeAll(),this._relatedFeatureTable?.rowHighlightIds.add(this.selectedRelatedIds[0]))}async closeFilter(){await this._closeFilter()}async filterReset(){this._filterByExtentHandle&&(this._table&&(this._table.filterGeometry=void 0),this._filterByExtentHandle.remove(),this._filterByExtentHandle=void 0),await this._handleFilterListReset()}async filterUpdate(e,t){await this._handleFilterUpdate(e),t?(this._shouldUpdateTableOnExtentChange=!0,this._handleTableOnMapExtent()):t===!1&&(this._table&&(this._table.filterGeometry=void 0),this._filterByExtentHandle?.remove(),this._filterByExtentHandle=void 0,await this._updateAllIds())}isFilterActive(){return this._filterActive}async validateTableUpdate(e){this._shouldUpdateTableOnExtentChange=e}async validateActiveEdits(){return this._validateActiveEdits([],this.selectedIds)}async refresh(){this._table&&await this._refresh()}async setColumnOrder(e){this._setColumnTemplates(e)}async beforeMapInfoChange(e){let t=e.detail.ref,i=e.detail.mapInfo;if(this._hasPendingEdits()){e.preventDefault(),this._skipEditCheck=!1;let s=await this._validateActiveEdits([],this.selectedIds);await t.setMapByID(s?i.id:e.detail.currentId,!s)}}async editorInitialized(e){this._shouldUpdateTableOnExtentChange=!1,this._editor=e.detail}async closeEdit(){this._shouldUpdateTableOnExtentChange=!0,this._filterByExtentHandle&&this._handleTableOnMapExtent(),this._editor=void 0}async selectionChanged(e){let t=e.detail.selectedFeature[0],i=Number(t.getObjectId()),s=this._table;if(s.rowHighlightIds.length&&s.rowHighlightIds.removeAll(),s.rowHighlightIds.add(i),this._highlightFeatures(i),this.zoomAndScrollToSelected&&s&&this.mapView){let a=s.viewModel.getObjectIdIndex(i);s.scrollToIndex(a);let l=t.layer,h=this.mapView.allLayerViews.toArray(),r;h.some(async n=>n.layer.title===l?.title&&n.layer.type==="feature"?(r=n,this.mapView&&await I([i],r,this.mapView,!0,void 0,this.zoomToScale),!0):!1)}}async beforeLayerSelectionChange(e){if(this._hasPendingEdits()){e.preventDefault();let t=e.detail.ref;this._skipEditCheck=!1;let i=await this._validateActiveEdits([],this.selectedIds);return e.detail.selectedIds?await t.setLayerByIds(i?e.detail.newIds:e.detail.currentIds,!0):await t.setLayerById(i?e.detail.newId:e.detail.currentId,!0)}}async layerSelectionChange(e){await this._layerSelectionChanged(e)}async editsComplete(e){let t=e.detail;(t==="delete"||t==="add")&&(this._allIds=await this.queryAllIds()),await this._refresh()}async facilityChanged(e){this._updateFloorDefinitionExpression()}async levelChanged(e){this._floorLevel=e.detail,this._updateFloorDefinitionExpression()}async siteChanged(e){this._updateFloorDefinitionExpression()}async noLayersFound(){this._layer=void 0,this._allIds=[],this._size=0,this._clearSelection()}async clearSelection(){await this._validateActiveEdits([],this.selectedIds)&&this._clearSelection()}async mapChanged(){this._queryingData=!1,this._creatingFeature=!1,this._clearSelection()}async featuresSelected(e){e.detail.forEach(t=>{let i=this._table?.highlightIds.indexOf(t);i&&i<0&&this._table?.highlightIds.add(t)})}createWorkFlowStarted(){this._creatingFeature=!0}backFromCreateWorkFlow(){this._creatingFeature=!1}_pasteFeatures(){this._layer?.isTable||this._zoom()}_featuresPasted(){this._shouldSelectCreatedFeatures=!0}async load(){await this._initToolInfos()}render(){let e=this._fetchingData||this._hideTable?"display-none":"height-full",t=this._fetchingData?"":"display-none",i=this._queryingData?"":"display-none",s=this._size.toString(),a=this.selectedIds.length.toString(),l=this.isMobile?"height-full":"height-full-adjusted",h=this._canShowFullTextSearch();return this._validateActiveActions(),c`<div><calcite-scrim class=${y(i)} .loading=${this._queryingData}></calcite-scrim><calcite-shell><div class=${`width-full ${l}`}><calcite-panel class="height-full width-full panel-header-override">${this._getMapLayerPicker("header-actions-start")}${!this.isMobile&&c`${this._getTableControlRow("header-content")}${this._getActionsEnd("header-actions-end")}`||""}${h&&c`<div class="search-container border-bottom"><calcite-input class=search clearable icon=search @calciteInputChange=${r=>{this._searchTextChanged(r)}} .placeholder=${this._searchPlaceHolder} title=${this._searchPlaceHolder??f} type=search ${g(this._searchNode)}></calcite-input></div>`||""}<calcite-loader class=${y(t)} .label=${this._translations.fetchingData} scale=l></calcite-loader><div class=${y(e)} ${g(this.onTableNodeCreate)}></div></calcite-panel></div>${this.isMobile?void 0:c`<div class="bottom-left text-color height-19" id=solutions-selected-count-div>${(this._translations.recordsTotal?.replace("{{total-number-of-records}}",s)+" | "+this._translations.recordsSelected.replace("{{selected-number-of-records}}",a)).replace("{{total}}",s).replace("{{selected}}",a)}</div>`}</calcite-shell></div>`}updated(){this._table&&this.updateRelatedAttachmentColumns()}async _searchTextChanged(e){this._fullTextSearchInfo.forEach(t=>{t.searchTerm=e.target.value}),this._searchFullText()}async _searchFullText(e=!1){let t=[],i=!1;if(this._showOnlySelected)t=this._tempSelectedIds,i=!0;else if(e||await this._validateActiveEdits([],this.selectedIds))this._clearSelection(),this._tempSelectedIds=[];else return;this._searchExpression&&this._clearSearchDefinitionExpression();let s=[];if(this._fullTextSearchInfo?.length&&this._fullTextSearchInfo[0].searchTerm){let a=this._layer?.createQuery();a.fullText=this._fullTextSearchInfo,s=this._layer?await this._layer.queryObjectIds(a):[],i&&t?.length&&(s=s.filter(l=>t.includes(l))),await this._updateSearchDefinitionExpression(s?.length?s:[-1])}i&&s?.length&&(this._showOnlySelected=!0,this._table?.highlightIds.addMany(s.reverse())),this._selectedLayerView&&this._selectedLayerView.updating?await u.once(()=>!this._selectedLayerView.updating):await new Promise(a=>setTimeout(a,800)),this._allIds=await this.queryAllIds(),this.selectedIds=this.selectedIds.filter(a=>this._allIds.indexOf(a)>-1),await this._refresh(!1,!0)}_clearSearchDefinitionExpression(){let e=this._layer?.definitionExpression;this._searchExpression&&e&&e?.indexOf(this._searchExpression)>-1&&this._layer&&(e?.indexOf(" AND ("+this._searchExpression)>-1?this._layer.definitionExpression=e.replace(` AND (${this._searchExpression})`,""):this._layer.definitionExpression=e.replace(this._searchExpression,"")),this._searchExpression=""}async _updateSearchDefinitionExpression(e){let t=this._layer?.definitionExpression;if(this._layer)if(e?.length){let i=`objectId in(${e})`;this._layer.definitionExpression=this._searchExpression&&t&&t.includes(this._searchExpression)?t.replace(this._searchExpression,i):t?`${t} AND (${i})`:i,this._searchExpression=i}else this._clearSearchDefinitionExpression()}_canShowFullTextSearch(){return this._layer?.capabilities?.query?.supportsFullTextSearch&&this._layer.indexes.items.filter(e=>e.indexType=="FullText").length>0}_getFullTextSearchInfo(){if(this._fullTextSearchInfo=[],this._layer?.capabilities?.query?.supportsFullTextSearch){let e=this._layer.indexes?.filter(t=>t.indexType=="FullText");if(e?.length){let t=[];e.forEach(s=>{t.push(...s.fields.split(","))});let i=[];t.forEach(s=>{let a=this._layer?.getField(s.trim());a?.alias&&i.push(a.alias)}),this._searchPlaceHolder=this._translations.searchPlaceholder.replace("{{field_names}}",i.join(", ")),this._fullTextSearchInfo.push({onFields:["*"],searchTerm:"",searchType:"prefix"})}}}_getMapLayerPicker(e){let t=this.isMobile?"display-none":"";return c`<div class=${`border-end ${t}`} id=solutions-map-layer-picker-container slot=${e??f}><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._layer?[this._layer?.id]:[]} show-single-layer-as-label show-tables type=dropdown></map-layer-picker></div>`}_getLayerOption(e){let t;return this.mapInfo?.layerOptions?.layers.some(i=>i.id===e?(t=i,!0):!1),t}_getActionsEnd(e){let t=this._relatedFeatureTable?this._relatedFeatureTable.layer:this._layer,i=this._relatedFeatureTable||this._table,s=this._getLayerOption(t?.id||"");return c`<div class="display-flex" slot=${e??f}><field-selection .configExtraFields=${s?.extraFields} .layer=${t} .mapView=${this.mapView} .table=${i} .tableRef=${this.el}></field-selection>${this.enableShare&&!this.isMobile?this._getShare("share"):void 0}</div>`}_getTableControlRow(e){return c`<div class=${"height-51-px width-full display-flex"} slot=${e??f} ${g(this._toolbar)}>${this._getActionBar()}</div>`}_getActionBar(){return c`<calcite-action-bar class=width-full expand-disabled id=${this._getId("bar")??f} layout=horizontal><calcite-action-group>${this.isMobile?void 0:this._getActions()}</calcite-action-group></calcite-action-bar>`}_getActions(){return this._toolInfos?.reduce((e,t)=>(t&&e.push(t.isDanger?this._getDangerAction(t.icon,t.label,t.func,t.disabled):this._getAction(t.active,t.icon,t.indicator,t.label,t.func,t.disabled,!!t.loading,t.toolTip)),e),[])}_validateEnabledActions(){let e=this._getIds().length,t=["zoom-to-object","pencil","trash","erase","selected-items-filter","copy"];this._toolInfos?.forEach(i=>{i&&t.indexOf(i.icon)>-1&&(i.disabled=i.icon==="pencil"?e<2||e>m:e<1,i.toolTip=i.icon==="pencil"?e>m?this._translations.featureEditLimitNotice:this._translations.editMultiple:i.toolTip)})}_validateActiveActions(){let e=["filter","list-check-all","selected-items-filter"];this._toolInfos?.forEach(t=>{t&&e.indexOf(t.icon)>-1&&(t.icon==="filter"&&(t.indicator=this._filterActive),t.icon==="list-check-all"&&(t.active=this._selectAllActive),t.icon==="selected-items-filter"&&(t.active=this._showOnlySelected,t.label=this._showOnlySelected?this._translations.showAll:this._translations.showSelected,t.toolTip=this._showOnlySelected?this._translations.showAll:this._translations.showSelected))})}async _initToolInfos(){let e=this._getIds().length>0,t=this._relatedFeatureTable?this._relatedFeatureTable.layer.isTable:this._layer?.isTable,i=this.featureSelectionMode==="multiple"&&this._layer?.capabilities?.operations.supportsUpdate,s=this._getSelectedIds().length<2||this._getSelectedIds().length>m,a=!this.mapHidden&&!t,l=!this._relatedFeatureTable&&(!this._layer?.isTable||this._hasFilterExpressions()),h=this._featuresEmpty(),r=this.featureSelectionMode==="single",n=this.enableCSV;if(this._relatedFeatureTable){let _=await this._queryRelatedFeatures();n=_&&Object.keys(_).length>0}let d=[];l&&d.push({active:!1,icon:"filter",indicator:!1,label:this._translations.filters,func:()=>this.toggleFilter.emit(),disabled:!1,toolTip:this._translations.filters}),a&&d.push({active:!1,icon:"zoom-to-object",indicator:!1,label:this._translations.zoom,func:()=>{this._zoom()},disabled:!e,toolTip:this._translations.zoom}),i&&d.push({active:!1,icon:"pencil",indicator:!1,label:this._translations.editMultiple,func:()=>this.editMultipleFeatures.emit(this._getSelectedIds()),disabled:s,toolTip:this._translations.editMultiple}),this.showCopyPasteActions&&(d.push({active:!1,icon:"copy",indicator:!1,label:this._translations.copy,func:()=>this.copyFeatures.emit({featuresIds:this._getIds(),layerId:this._layer?.id}),disabled:!e,toolTip:this._translations.copy}),d.push({active:!1,icon:"paste-with-attribute",indicator:!1,label:this._translations.paste,func:()=>this.pasteFeatures.emit(),disabled:!this.pasteEnabled,toolTip:this._translations.paste})),this._deleteEnabled&&d.push({active:!1,icon:"trash",indicator:!1,label:this._translations.delete,func:()=>this._showDelete(),disabled:!e,isDanger:!0,toolTip:this._translations.delete}),d.push({active:!1,icon:"erase",indicator:!1,label:this._translations.clearSelection,func:()=>{this.clearSelection()},disabled:!e,toolTip:this._translations.clearSelection}),this._relatedFeatureTable||d.push({active:!1,icon:"selected-items-filter",indicator:!1,label:this._showOnlySelected?this._translations.showAll:this._translations.showSelected,func:()=>this._toggleShowSelected(),disabled:!e,toolTip:this._showOnlySelected?this._translations.showAll:this._translations.showSelected}),!r&&!this._relatedFeatureTable&&d.push({active:!1,icon:"list-check-all",indicator:!1,func:async()=>await this._selectAll(),label:this._translations.selectAll,disabled:h,toolTip:this._translations.selectAll}),!r&&!this._relatedFeatureTable&&d.push({active:!1,icon:"compare",indicator:!1,func:async()=>await this._switchSelected(),label:this._translations.switchSelected,disabled:h,toolTip:this._translations.switchSelected}),d.push({active:!1,icon:"refresh",indicator:!1,func:()=>{this._refresh()},label:this._translations.refresh,disabled:!1,toolTip:this._translations.refresh}),n&&d.push({active:!1,icon:"export",indicator:!1,func:()=>{this._exportToCSV()},label:this._translations.exportCSV,loading:this._csvExporting,disabled:h,toolTip:this._translations.exportCSV}),this._toolInfos=[...d]}async _addListenersForLayers(){this._layerEditsHandles.forEach(i=>i.remove()),this._layerEditsHandles=[];let e=this.mapView,t=[...new Set(this.layerIds)];if(!(!e||t.length===0))for(let i of t){let s=await w(e,i);if(!s)continue;let a=s.on("edits",async l=>{let h=Array.isArray(l?.addedFeatures)?l.addedFeatures:[],r=Array.isArray(l?.updatedFeatures)?l.updatedFeatures:[];if(h.length===0&&r.length===0)return;let n=h.map(p=>p.objectId).filter(p=>p!=null),d=r.map(p=>p.objectId).filter(p=>p!=null);if(n.length===0&&d.length===0)return;let _=this._layer?.id;if(this._shouldSelectCreatedFeatures){await this._selectFeatures(n,i),i===_&&this.featuresAdded.emit(n);return}else i===_&&n.length>0?(this._searchExpression?(this._clearSelection(),await this._searchFullText(!0)):await this._refresh(!1,!0),this.initCreateComponent.emit()):i===_&&d.length>0&&this._searchExpression&&await this._selectFeatures(d,i)});a&&this._layerEditsHandles.push(a)}}async _selectFeatures(e,t){try{let i=this._layer?.id;if(t===i){this._searchExpression?(await this._searchFullText(!0),this._allIds=await this.queryAllIds()):(await this._refresh(!1,!0),this._clearSelection());let s=[];for(let a of e)this._allIds.includes(a)&&s.push(a);s.length>0?this._table?.highlightIds.addMany(s):await this._refresh()}else this._clearSelection(),this._pastedFeaturesIds=e,this.requestLayerSelectionChange.emit(t);this._shouldSelectCreatedFeatures=!1}catch(i){this._shouldSelectCreatedFeatures=!1,console.error("Failed processing layer edits event",{layerId:t,error:i})}}_updateFloorDefinitionExpression(){if(this._floorField&&this._floorLevel){let e=`${this._floorField} = '${this._floorLevel}'`,t=this._layer?.definitionExpression;this._layer&&(this._layer.definitionExpression=t&&this._floorExpression&&t?.indexOf(this._floorExpression)>-1?t.replace(this._floorExpression,e):t?`${t} AND (${e})`:e),this._floorExpression=e}}_featuresEmpty(){return this._allIds?.length===0}_hasFilterExpressions(){let e=[],t=this._layer?.id;return this.mapInfo?.filterConfig?.layerExpressions&&t!==void 0&&(e=this.mapInfo.filterConfig.layerExpressions.filter(i=>i.id===t)),e.length>0}_getAction(e,t,i,s,a,l,h,r){let n=this._layer===void 0?!0:l;return c`<calcite-action .active=${e} .disabled=${n} .icon=${t} .id=${`layer-table-${t}`} .indicator=${i} .label=${s} .loading=${h} @click=${a} text text-enabled><div class="display-flex"><span class="label-override padding-start-1-4">${s}</span></div></calcite-action>${this._getToolTip("auto",`layer-table-${t}`,r)}`}_showDelete(){this.showDelete.emit({ids:this._getIds()})}_getShare(e){return c`<div id=${this._getId(e)??f}><instant-apps-social-share class="height-51 width-51 display-flex" .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} ${g(this._shareNode)}></instant-apps-social-share>${this._getToolTip("bottom",e,this._translations.share)}</div>`}_updateShareUrl(){let e=this._shareNode.value?.shareUrl;if(!e)return;let t=new URL(e);this.mapInfo?.id?t.searchParams.set("webmap",this.mapInfo.id):t.searchParams.delete("webmap"),this._layer?.id?t.searchParams.set("layer",this._layer.id):t.searchParams.delete("layer"),this.selectedIds?.length>0?t.searchParams.set("oid",this.selectedIds.reverse().join(",")):t.searchParams.delete("oid"),this.appLayout&&t.searchParams.set("applayout",this.appLayout),this.selectedRelatedIds?.length>0&&this._relatedFeatureTable?.layer?.id&&(t.searchParams.set("oid",this.selectedRelatedIds.join(",")),t.searchParams.set("layer",this._relatedFeatureTable?.layer?.id.toString())),this._shareNode.value&&(this._shareNode.value.autoUpdateShareUrl=!1,this._shareNode.value.shareUrl=t.href)}_getToolTip(e,t,i){return c`<calcite-tooltip .placement=${e} .referenceElement=${t}><span>${i}</span></calcite-tooltip>`}_getId(e){return`solutions-action-${e}`}_getDangerAction(e,t,i,s){let a=this._layer===void 0?!0:s;return c`<calcite-action class="delete-red" .disabled=${a} .id=${`layer-table-${e}`} .label=${t} @click=${i} text text-enabled><calcite-icon aria-hidden=true class="danger-icon-color" .icon=${e} scale=s></calcite-icon><span class="label-override padding-start-1-4 danger-label-color">${t}</span></calcite-action>${this._getToolTip("bottom",`layer-table-${e}`,t)}`}_getIds(){let e=this._relatedFeatureTable??this._table;return this._relatedFeatureTable&&this._table&&this._table.highlightIds.getItemAt(0)!==this.selectedIds[0]&&(e=this._table),e?.highlightIds.map(t=>Number.parseInt(t.toString(),10)).toArray()??[]}onTableNodeCreate(e){this._tableNode=e}async _getTable(e,t){this._layer&&(await this._layer.when(()=>{this._table=new k({autoRefreshEnabled:this.enableAutoRefresh,autoSaveEnabled:this.enableTableAutosave,layer:this._layer,view:this.mapView,columnReorderingEnabled:this.enableColumnReorder,editingEnabled:this._editEnabled&&this.enableInlineEdit,relatedRecordsEnabled:!0,attachmentsEnabled:!0,highlightEnabled:!1,multiSortEnabled:!1,visibleElements:{columnDescriptions:!1,header:!1,menu:!1,progress:!1},tableTemplate:{columnTemplates:t},container:e})}),await this._table?.when(()=>{this._table?.viewModel.addHandles(this._table.highlightIds.on("change",i=>{this._handleOnChange(i)})),this._table?.viewModel.addHandles(this._table.on("cell-pointerover",this.tempHighlightOnHover.bind(this))),this._table?.viewModel.addHandles(this._table.on("cell-pointerout",this._removeTempHighlight.bind(this))),this._table?.viewModel.addHandles(this._table.on("column-reorder",this._handleColumnReorder.bind(this))),this.listenOn(this._tableNode,"mouseleave",this._removeTempHighlight),this._table?.viewModel.addHandles(u.watch(()=>this._table.size,i=>{this._size=i})),u?.watch(()=>this._table?.relatedTable,async i=>{if(i){if(i.rowHighlightIds.length){let a={added:[i.rowHighlightIds.getItemAt(0)],removed:[]};this._handleOnChange(a)}let s=i.layer;if(this._layerEditHandle=s.on("edits",async()=>{await new Promise(a=>setTimeout(a,50)),await this._refresh(!0)}),this._checkEditEnabled(s),i.editingEnabled=this._editEnabled&&this.enableInlineEdit,i.autoSaveEnabled=this.enableTableAutosave,this._relatedFeatureTable=i,typeof i.layer?.id=="string"&&i.layer?.fields){let a=i.layer.popupTemplate?.fieldInfos,l=this._getColumnTemplates(i.layer.id,i.layer.fields,a);this._relatedFeatureTable.tableTemplate=new v({columnTemplates:l})}i.highlightIds.on("change",a=>{this._handleRelatedRecordsChange(a)})}else{this.selectedRelatedIds=[],this._relatedFeatureTable=void 0,this._layerEditHandle&&this._layerEditHandle.remove();let s=this._layer;this._refresh(),s&&this.relatedRecordToggled.emit(s),this._finishOnChange()}await this._initToolInfos()})}))}async _handleRelatedRecordsChange(e){await this._handleOnChange(e),this._updateShareUrl()}hasAttachmentsEnabled(e){if(!e?.capabilities)return!1;let{capabilities:{data:{supportsAttachment:t},operations:{supportsQueryAttachments:i}}}=e;return t&&i}async _handleOnChange(e){if(!await this._validateActiveEdits([...e.added],[...e.removed]))return;let t=[...this._getIds()],i=this._getSelectedLayer(t);this._relatedFeatureTable&&this._table?.highlightIds.getItemAt(0)!==this.selectedIds[0]&&(i=this._layer,await this._initToolInfos()),i&&this.relatedRecordToggled.emit(i),this.featureSelectionMode==="single"&&(this._relatedFeatureTable&&t.length>1?(this._relatedFeatureTable.highlightIds.remove(t[0]),t.shift()):t.length>1&&!this._selectAllActive&&(this._table?.highlightIds.remove(t[0]),t.shift())),!this._relatedFeatureTable||this._relatedFeatureTable&&this._table?.highlightIds.getItemAt(0)!==this.selectedIds[0]?(this.selectedRelatedIds=[],this.selectedIds=t.reverse(),this._tempSelectedIds=[...this.selectedIds],this._highlightFeatures(this.selectedIds[0])):this.selectedRelatedIds=t.reverse(),this._finishOnChange()}async _validateActiveEdits(e,t){let i=!0;if((this._editor||this._createFeatureEditor)&&!this._skipEditCheck){if(this._hasPendingEdits()){this.beforeFeatureSelectionChange.emit();let s=!1;try{this._editor?.activeWorkflow&&await this._editor.activeWorkflow.cancel({force:!1}),this._createFeatureEditor?.activeWorkflow&&await this._createFeatureEditor.activeWorkflow.cancel({force:!1})}catch(a){s=a?.name==="workflow:cancel-denied"}if(s){this.continueEditing.emit();let a=this._relatedFeatureTable&&this._relatedFeatureTable.highlightIds.length>0?this._relatedFeatureTable:this._table;i=!1,this._skipEditCheck=!0,e.length>0?a?.highlightIds.removeMany(e):t.length>0&&a?.highlightIds.addMany(t)}}}else i=!this._skipEditCheck,this._skipEditCheck=!1;return this._shouldUpdateTableOnExtentChange=i,i}_hasPendingEdits(){let e=this._editor?.activeWorkflow?.activeWorkflow?.hasPendingEdits,t=this._createFeatureEditor?.activeWorkflow?.hasPendingEdits;return e||t}_finishOnChange(){this._showOnlySelected&&!this._relatedFeatureTable&&(this._table&&this._getSelectedIds().length>0?this._table.filterBySelectionEnabled=!0:this._toggleShowSelected());let e=this._getSelectedIds();setTimeout(()=>{this.featureSelectionChange.emit(e)},50)}_handleColumnReorder(){this.columnReorder.emit()}tempHighlightOnHover(e){if(this._removeTempHighlight(),this._selectedLayerView){let t=e.feature;t?.geometry&&(this._temporaryFeatureHandle=this._selectedLayerView?.highlight([t],{name:"temporary"}))}}_removeTempHighlight(){this._temporaryFeatureHandle&&this._temporaryFeatureHandle.remove()}_highlightFeatures(e){if(this._clearHighlights(),this.selectedIds.length>0&&this._selectedLayerView&&(this._currentFeatureHighlightHandle=this._selectedLayerView?.highlight([e],{name:"current-selection"}),this.selectedIds.length>1)){let t=this.selectedIds.filter(i=>i!==e);this._defaultFeaturesHandle=this._selectedLayerView?.highlight(t,{name:"default"})}}_clearHighlights(){this._removeTempHighlight(),this._currentFeatureHighlightHandle&&this._currentFeatureHighlightHandle.remove(),this._defaultFeaturesHandle&&this._defaultFeaturesHandle.remove()}_resetColumnTemplates(){if(this._layer){let e=this._layer.popupTemplate?.fieldInfos,t=this._getColumnTemplates(this._layer.id,this._layer.fields,e);t?.length===0?this._tableNode?.classList.add("display-none"):this._tableNode?.classList.remove("display-none");let i=this._table?.tableTemplate?.columnTemplates,s=i&&t&&i.length!==t.length||t?.some((a,l)=>i&&i[l]?JSON.stringify(i[l])!==JSON.stringify(a):!1);if(this._table&&t&&(s||!this._columnsInfo)){this._table.tableTemplate=new v({columnTemplates:t});let a=t.map(l=>l.fieldName);this._initColumnsInfo(a)}}}_setColumnTemplates(e){this._table&&e&&(this._table.tableTemplate=new v({columnTemplates:e}))}async _resetTable(){if(this._loaded=!1,this._clearSelection(),this._allIds=await this.queryAllIds(),!this._table&&this._layer){let e=this._layer.popupTemplate?.fieldInfos,t=this._getColumnTemplates(this._layer.id,this._layer.fields,e);this._tableNode&&await this._getTable(this._tableNode,t)}else this._table&&(this._table.view=this.mapView,this._table.layer=this._layer);await this._initLayerRefresh(),this._checkEditEnabled(this._layer),this._table&&(this._table.editingEnabled=this._editEnabled&&this.enableInlineEdit,this._table.autoSaveEnabled=this.enableTableAutosave,await this._table.when(),setTimeout(()=>{this._loaded||this.finishLoading()},1e3),await u.once(()=>this._table?.state==="loaded").then(async()=>{await this.finishLoading()}))}async finishLoading(){try{this._loaded=!0,this._table?.highlightIds.removeAll(),this._table.objectIds.removeAll(),this._resetColumnTemplates(),this._showOnlySelected=!1,await this._handleDefaults(),await this._sortTable(),await this._initToolInfos(),["esri-feature-table","esri-widget"].forEach(e=>{this._tableNode&&!this._tableNode.classList.contains(e)&&this._tableNode.classList.add(e)}),this._table&&this._pastedFeaturesIds.length>0&&await this._applyPastedFeatureHighlights()}catch(e){console.log(e)}}async _applyPastedFeatureHighlights(){let e=[...this._pastedFeaturesIds];await new Promise(t=>{requestAnimationFrame(()=>{this._table?.highlightIds.addMany(e),this._pastedFeaturesIds=[],t()})})}async _initLayerRefresh(){this._refreshHandle&&this._refreshHandle.remove(),this._layer&&(this._refreshHandle=this._layer.on("refresh",e=>{e.dataChanged&&this._updateAllIds()}))}async _updateAllIds(){let e=await this.queryAllIds(),t=this.selectedIds.filter(i=>this._allIds.indexOf(i)>-1);(JSON.stringify(e)!==JSON.stringify(this._allIds)||JSON.stringify(this.selectedIds)!==JSON.stringify(t))&&(this._allIds=e,this.selectedIds=t,await this._refresh())}async _handleDefaults(){if(!this._defaultOidHonored&&this.defaultOid?.length>0&&this.defaultOid[0]>-1&&this._table&&(await this._selectDefaultFeature(this.defaultOid),this._defaultOidHonored=!0,this.defaultOid=[],this._showOnlySelected=!1,this._toggleShowSelected()),!this._defaultGlobalIdHonored&&this.defaultGlobalId&&this.defaultGlobalId?.length>0&&this._table&&this._layer){let e=await A(this.defaultGlobalId,this._layer),t=e?.length>0?e.map(i=>Number(i.getObjectId())):void 0;t&&await this._selectDefaultFeature(t),this._defaultGlobalIdHonored=!0,this.defaultGlobalId=[],this._showOnlySelected=!1,this._toggleShowSelected()}}_initColumnsInfo(e){let t=this._table?.columns.reduce((s,a)=>((!e||e?.indexOf(a.name)>-1)&&(s[a.name]=!a.hidden),s),{}),i=this._table?.columns.map(s=>s.name);(e&&i?e.filter(s=>i.indexOf(s)<0):[]).forEach(s=>{t[s]=!0}),this._columnsInfo=e?e.reduce((s,a)=>(s[a]=t[a],s),{}):t}async _selectDefaultFeature(e){e.length>0&&this._table?.highlightIds.addMany(e)}_checkEditEnabled(e){this._editEnabled=!!(e?.editingEnabled&&e?.capabilities?.operations.supportsUpdate),this._deleteEnabled=!!(e?.editingEnabled&&e?.capabilities?.operations.supportsDelete)}async _sortTable(){let e=this._layer?.objectIdField,t="desc",i,s=this.mapInfo?.layerOptions?.layers,a=this._layer?.id;s&&s.length>0&&a!==void 0&&(i=s.filter(l=>l.id===a),i&&i.length>0&&(i=i[0],i.sortField&&i.fields?.includes(i.sortField)&&(e=i.sortField),t=i?.sortOrder?i.sortOrder:"desc")),this._table&&this._layer&&(await this._table.when(),await this._layer.when(()=>{e&&this._table?.sortColumn(e,t)}))}async _handleFilterListReset(){this._filterActive=!1,this._updateShareUrl(),await this._searchFullText()}async _handleFilterUpdate(e){if(this._floorExpression&&this._layer){let t=this._layer.definitionExpression,i=new RegExp(`${this._floorField} = ['].+[']`,"gm");this._layer.definitionExpression=t&&this._floorField&&t.indexOf(`${this._floorField} = '`)>-1?t.replace(i,this._floorExpression):t?`${t} AND (${this._floorExpression})`:this._floorExpression}this._filterActive=e,this._updateShareUrl(),await this._searchFullText()}_handleTableOnMapExtent(){this._table&&(this._filterByExtentHandle=u.when(()=>this.mapView?.stationary,async()=>{if(this._shouldUpdateTableOnExtentChange&&this.appLayout==="splitView"){if(await new Promise(e=>setTimeout(e,800)),this._table&&this.mapView){this._table.filterGeometry=this.mapView.extent;let e={geometry:this.mapView.extent},t=this._layer&&await this._layer.queryObjectIds(e),i=this.selectedIds.filter(a=>!t?.includes(a)),s=this._outOFExtentOids.filter(a=>t?.includes(a));i.length>0&&(this._table&&this._table?.viewModel?.attachmentsViewOptions?.objectId&&this._table.viewModel.hideAttachmentsView(),this._table.highlightIds.removeMany(i),this._outOFExtentOids=[...this._outOFExtentOids,...i]),s.length>0&&(this.selectedIds=[...new Set([...this.selectedIds,...s])],this._table.highlightIds.removeAll(),this._table.highlightIds.addMany(this.selectedIds.reverse()),this._outOFExtentOids=this._outOFExtentOids.filter(a=>!s.includes(a)))}this._allIds=await this.queryAllIds()}},{initial:!0}))}async _closeFilter(){this._allIds=await this.queryAllIds()}async queryAllIds(){if(this._layer){let e=this._layer.createQuery();return e.geometry=this._filterByExtentHandle&&this.mapView?this.mapView.extent:null,e.where=this._layer.definitionExpression||"1=1",await this._layer.queryObjectIds(e)}else return[]}async _mapClicked(e){let t={include:this._layer},i=await this.mapView?.hitTest(e.screenPoint,t);if(i&&i.results.length>0){let s=i.results;if(this.featureSelectionMode==="single"){this._table?.highlightIds.removeAll();let a=s[0].graphic.getObjectId();if(a){let l=this._table?.highlightIds.indexOf(a);l!==void 0&&l<0&&this._table?.highlightIds.add(a)}}else s.forEach(a=>{let l=Number(a.graphic.getObjectId()),h=this._table?.highlightIds.indexOf(l);h&&h<0&&l&&this._table?.highlightIds.add(l)});this._showOnlySelected&&this._table&&(this._table.filterBySelectionEnabled=!0)}}async _selectAll(){let e=this._allIds,t=e.filter(i=>this.selectedIds.indexOf(i)<0);await this._validateActiveEdits(t,this.selectedIds)&&this._table?(this._table.highlightIds.removeAll(),this._table.highlightIds.addMany(e),this.selectedIds=e,this._finishOnChange(),this._selectAllActive=!0):this._skipEditCheck=!1}_toggleShowSelected(){this._showOnlySelected=!this._showOnlySelected,this._table&&(this._table.filterBySelectionEnabled=this._showOnlySelected)}_clearSelection(){this._relatedFeatureTable||(this.selectedIds=[],this._outOFExtentOids=[],this._table&&this._table?.viewModel?.attachmentsViewOptions?.objectId&&this._table.viewModel.hideAttachmentsView(),this._table?.highlightIds.removeAll(),this._clearHighlights(),this._table?.rowHighlightIds.removeAll()),this._relatedFeatureTable&&(this._relatedFeatureTable?.highlightIds.removeAll(),this.selectedRelatedIds=[]),this._finishOnChange()}async _switchSelected(){let e=[...this.selectedIds],t=this._allIds.reduce((i,s)=>(e.indexOf(s)<0&&i.push(s),i),[]).sort((i,s)=>i-s);await this._validateActiveEdits(t,e)&&this._table?(this._table.highlightIds.removeAll(),this._table.highlightIds.addMany(t),this.selectedIds=t,this._finishOnChange()):this._skipEditCheck=!1}async _exportToCSV(){let e=this._relatedFeatureTable?this._relatedFeatureTable.layer:this._layer;if(!e)return;let t={},i=this._getIds();if(this._relatedFeatureTable?.tableParent&&this._relatedFeatureTable.highlightIds.length===0){let l=this._relatedFeatureTable.tableParent.highlightIds?.getItemAt(0);if(l!==void 0){let h=await this._queryRelatedFeatures(),r=[];h&&h[l]?.features&&(h[l].features.forEach(n=>{n.attributes&&r.push(n.attributes[e.objectIdField])}),i=r.length>0?r:[])}}t[e.id]={selectionSetNames:[e.title||""],ids:i,layer:e};let s=this._relatedFeatureTable??this._table;if(!s)return;let a=s&&s.columns.toArray().reduce((l,h)=>{if(!h.hidden){let r=h?.name||h?.fieldName;r&&l.push(r.toLocaleLowerCase())}return l},[]);this._updateToolInfoLoading("export",!0),this._csvExporting=!0,this.mapView?.map&&await $(this.mapView.map,t,!1,!1,!0,a,!0,!0),this._updateToolInfoLoading("export",!1),this._csvExporting=!1}async _queryRelatedFeatures(){let e=this._relatedFeatureTable?this._relatedFeatureTable?this._relatedFeatureTable.layer:this._relatedFeatureTable.tableParent?.layer:this._layer,t=this._relatedFeatureTable?.tableParent?.highlightIds?.items[0],i=this._relatedFeatureTable?.tableParent?.layer,s=e?.relationships?.find(l=>i.relationships?.some(h=>h.id===l.id)),a=new M({objectIds:[t],outFields:["*"],relationshipId:s?.id});return t&&a&&await i.queryRelatedFeatures(a).catch(async l=>{console.error(l)})}_updateToolInfoLoading(e,t){this._toolInfos.some(i=>i?.icon===e?(i.loading=t,!0):!1)}async _refresh(e,t){if(t||await this._validateActiveEdits([],this.selectedIds)){this._table&&await this._table.refresh(),this._relatedFeatureTable&&await this._relatedFeatureTable.refresh(),this._allIds=await this.queryAllIds();let i=this._getSelectedLayer(this.selectedRelatedIds);if(i&&this.relatedRecordToggled.emit(i),!e){let s=this._getSelectedIds();this.featureSelectionChange.emit(s)}}}_getSelectedIds(){let e;return this._relatedFeatureTable?this.selectedRelatedIds.length>0?e=this.selectedRelatedIds:e=this._relatedFeatureTable.tableParent?.highlightIds.toArray()??[]:e=this.selectedIds,e}_getSelectedLayer(e){let t;return this._relatedFeatureTable?e.length>0?t=this._relatedFeatureTable.layer:t=this._relatedFeatureTable.tableParent?.layer:t=this._layer,t}async _clearSearchText(){if(this._searchNode.value){this._searchNode.value.value="";let e={target:{value:""}};await this._searchTextChanged(e)}}async _zoom(){this._layer&&this.mapView&&await I(this.selectedIds,this._selectedLayerView,this.mapView,!0,void 0,this.zoomToScale)}async _layerSelectionChanged(e){let t=e.detail[0];if(t!==this._layer?.id||this._featuresEmpty()){this._fetchingData=!0,await this._clearSearchText();let i=this.mapView&&await w(this.mapView,t);i&&await i.when(async()=>{this._selectedLayerView=!i.isTable&&this.mapView?await H(this.mapView,i.id):null,this._table&&this._table?.viewModel?.attachmentsViewOptions?.objectId&&this._table.viewModel.hideAttachmentsView(),this._shouldUpdateTableOnExtentChange=!0,this._layer=i,await this._initToolInfos(),this._getFullTextSearchInfo()})}this._creatingFeature=!1,this._fetchingData=!1}_getColumnTemplates(e,t,i){let s=this._getLayerOption(e),a=this._layer?.attributeTableTemplate?.elements,l=[];a?.length>0&&this.honorMapFieldSettings&&(l=a.map(n=>n.fieldName));let h=s?.fields&&s?.fieldOrder?s.fieldOrder.filter(n=>s?.fields&&s.fields.indexOf(n)>-1):l.length>0?l:void 0,r;return t&&(r=t.reduce((n,d)=>{let _={type:"field",fieldName:d.name,label:this.getFieldLabel(d,i),menuConfig:this._getMenuConfig(d.name)};return s&&s.fields&&s?.fields?.length>0?s.fields.indexOf(d.name)>-1&&n.push(_):l.length>0?l.indexOf(d.name)>-1&&n.push(_):n.push(_),n},[])),r?h?r?.sort(this._sortFields.bind(this,h)):r:[]}updateRelatedAttachmentColumns(){let e=this._getLayerOption(this._layer?.id||""),t=this.hasAttachmentsEnabled(this._layer),i=!0,s="attachments",a=(e?.extraFields||[]).reduce((h,r)=>(r.startsWith("related:")?h.related.push(r.split("related:")[1]):h.extra.push(r),h),{related:[],extra:[]}),l=a.extra.some(h=>h.toLowerCase()===s);a&&(t=l&&t,i=a.related.length>0,this._table?.columns.forEach(h=>{h.fieldName.startsWith("EsriFeatureTableRelationshipColumn")&&(h.hidden=!a.related.some(r=>r.toLowerCase()===(h.effectiveLabel||"").toLowerCase())),h.fieldName.startsWith("EsriFeatureTableAttachmentsColumn")&&(h.hidden=!a.extra.some(r=>r.toLowerCase()===h.effectiveLabel.toLowerCase()))})),this._table.relatedRecordsEnabled=i,this._table.attachmentsEnabled=t}getFieldLabel(e,t){let i=e.alias?e.alias:e.name;return t?.some(s=>s.fieldName===e.name?(i=s.label,!0):!1),i||e.name}_sortFields(e,t,i){return e?.indexOf(t.fieldName)-e.indexOf(i.fieldName)}_getMenuConfig(e){return{items:[{label:this._translations.hideField,icon:"view-hide",autoCloseMenu:!0,clickFunction:()=>{this._handleHideClick(e)}}]}}_handleHideClick(e){this._columnsInfo&&this._table&&(this._columnsInfo[e]=!1,this._table.hideColumn(e),this._table.tableTemplate&&this._table.tableTemplate.columnTemplates.forEach(t=>{t.fieldName===e&&(t.visible=!1)}))}};S("layer-table",T);return T},"widgets/FeatureTable","core/reactiveUtils","rest/support/RelationshipQuery","widgets/FeatureTable/support/TableTemplate",a,d,e,h,i)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{a as v}from"./DIBK4RSG.js";import{b}from"./HIPZRG2Q.js";import{F as r,G as d,H as m,h as p,i as u,q as g}from"./T3EPRHTT.js";var _={heading:"Get Started",card1:{heading:"What's new in the app"},card2:{heading:"Deploy a solution"},card3:{heading:"Manage a deployment"},card4:{heading:"AI Assistant"}},w={heading:"Documentation",card1:{heading:"Help"},card2:{heading:"What's new"},card3:{heading:"FAQ"},card4:{heading:"ArcGIS Blog"}},E={heading:"Support",card1:{heading:"Esri Community"},card2:{heading:"ArcGIS Ideas"},card3:{heading:"Esri Video"},card4:{heading:"Technical support"}},t={getStarted:_,documentation:w,support:E},R=p`*[tabindex]:focus-visible{outline:2px solid var(--calcite-color-brand);outline-offset:2px}:host{display:block;position:relative;height:100%}.position-relative{position:relative}.border-override{border-top-width:var(--calcite-border-width-none);border-bottom-width:var(--calcite-border-width-none)}.header-override{--calcite-panel-header-content-space: 0px;--calcite-panel-header-background-color: var(--calcite-color-surface-3)}.panel-override{--calcite-panel-background-color: var(--calcite-color-surface-3);--calcite-panel-border-color: none}.z-index-1{z-index:1}calcite-shell{background-color:unset;height:auto}.section-spacing{margin-top:var(--calcite-spacing-lg)}`,l=class extends m{constructor(){super(),this._translations=v({name:"solutions-resources-shell",blocking:!0}),this._mainPanelRef=r(),this._getStartedSectionRef=r(),this._documentationSectionRef=r(),this._supportSectionRef=r(),this._panelFixed=!1,this.sortTypeChanged=g(),this.listenOn(window,"deployAppTabSelected",this._handleDeployAppTabSelected)}static{this.properties={_translations:16}}static{this.styles=R}updated(){this._fixPanelContentWrapperFocus()}_fixPanelContentWrapperFocus(){if(!this._panelFixed&&this._mainPanelRef.value){let e=this._mainPanelRef.value;e.componentOnReady?.().then(()=>{if(e.shadowRoot){let i=e.shadowRoot.querySelector(".content-wrapper");i&&(i.tabIndex=-1,this._panelFixed=!0,this._setupPanelObserver())}}).catch(()=>{this._panelFixed=!0})}}_setupPanelObserver(){if(this._panelObserver)return;this._panelObserver=new MutationObserver(i=>{i.forEach(a=>{if(a.type==="attributes"&&a.attributeName==="tabindex"){let s=a.target;s.classList.contains("content-wrapper")&&s.tabIndex===0&&(s.tabIndex=-1)}})});let e=this._mainPanelRef.value;if(e?.shadowRoot){let i=e.shadowRoot.querySelector(".content-wrapper");i&&this._panelObserver.observe(i,{attributes:!0,attributeFilter:["tabindex"]})}}disconnectedCallback(){super.disconnectedCallback(),this._panelObserver?.disconnect()}render(){let e=this._translations;return u`<calcite-shell class="position-relative"><calcite-panel class="border-override header-override panel-override z-index-1" ${d(this._mainPanelRef)}><div class="section-spacing" ${d(this._getStartedSectionRef)}><solutions-resources-section .heading=${e.getStarted.heading} .subheading=${e.getStarted.subheading} .cards=${[{meridianIcon:"value",heading:e.getStarted.card1.heading,description:e.getStarted.card1.description,url:"https://links.esri.com/solutions/whats-new-in-the-app",headingEn:t.getStarted.card1.heading,sectionHeadingEn:t.getStarted.heading},{meridianIcon:"install",heading:e.getStarted.card2.heading,description:e.getStarted.card2.description,url:"https://links.esri.com/solutions/deploy-a-solution",headingEn:t.getStarted.card2.heading,sectionHeadingEn:t.getStarted.heading},{meridianIcon:"keys",heading:e.getStarted.card3.heading,description:e.getStarted.card3.description,url:"https://links.esri.com/solutions/manage-a-deployment",headingEn:t.getStarted.card3.heading,sectionHeadingEn:t.getStarted.heading},{meridianIcon:"speech-bubbles",heading:e.getStarted.card4.heading,description:e.getStarted.card4.description,url:"https://links.esri.com/solutions/ai-assistant",headingEn:t.getStarted.card4.heading,sectionHeadingEn:t.getStarted.heading}]}></solutions-resources-section></div><div ${d(this._documentationSectionRef)}><solutions-resources-section .heading=${e.documentation.heading} .subheading=${e.documentation.subheading} .cards=${[{meridianIcon:"search-files",heading:e.documentation.card1.heading,description:e.documentation.card1.description,url:"https://links.esri.com/solutions/help",headingEn:t.documentation.card1.heading,sectionHeadingEn:t.documentation.heading},{meridianIcon:"value",heading:e.documentation.card2.heading,description:e.documentation.card2.description,url:"https://links.esri.com/solutions/whats-new",headingEn:t.documentation.card2.heading,sectionHeadingEn:t.documentation.heading},{meridianIcon:"faq",heading:e.documentation.card3.heading,description:e.documentation.card3.description,url:"https://links.esri.com/solutions/faq",headingEn:t.documentation.card3.heading,sectionHeadingEn:t.documentation.heading},{meridianIcon:"arcmap-blog",heading:e.documentation.card4.heading,description:e.documentation.card4.description,url:"https://links.esri.com/solutions/arcgis-blogs",headingEn:t.documentation.card4.heading,sectionHeadingEn:t.documentation.heading}]}></solutions-resources-section></div><div ${d(this._supportSectionRef)}><solutions-resources-section .heading=${e.support.heading} .subheading=${e.support.subheading} .cards=${[{meridianIcon:"esri-community",heading:e.support.card1.heading,description:e.support.card1.description,url:"https://links.esri.com/solutions/esri-community",headingEn:t.support.card1.heading,sectionHeadingEn:t.support.heading},{meridianIcon:"idea",heading:e.support.card2.heading,description:e.support.card2.description,url:"https://links.esri.com/solutions/arcgis-ideas",headingEn:t.support.card2.heading,sectionHeadingEn:t.support.heading},{meridianIcon:"video",heading:e.support.card3.heading,description:e.support.card3.description,url:"https://links.esri.com/solutions/esri-video",headingEn:t.support.card3.heading,sectionHeadingEn:t.support.heading},{meridianIcon:"support",heading:e.support.card4.heading,description:e.support.card4.description,url:"https://links.esri.com/solutions/technical-support",headingEn:t.support.card4.heading,sectionHeadingEn:t.support.heading}]}></solutions-resources-section></div></calcite-panel></calcite-shell>`}async scrollToSection(e){let i={getStarted:this._getStartedSectionRef,documentation:this._documentationSectionRef,support:this._supportSectionRef}[e];if(!i.value||!this._mainPanelRef.value)return;let a=this._mainPanelRef.value,s=()=>{let n=this.el;for(;n&&n!==document.body;){let o=window.getComputedStyle(n),c=o.overflowY,h=o.overflow;if(n.scrollHeight>n.clientHeight&&(c==="auto"||c==="scroll"||h==="auto"||h==="scroll")&&i.value){let f=n.getBoundingClientRect(),S=i.value.getBoundingClientRect().top-f.top+n.scrollTop;n.scrollTo({top:S,behavior:"smooth"});return}n=n.parentElement}if(a.shadowRoot){let o=a.shadowRoot.querySelector(".content-wrapper");if(o&&i.value){let c=i.value.offsetTop;if(o.scrollHeight>o.clientHeight){o.scrollTo({top:c,behavior:"smooth"});return}}}i.value&&i.value.scrollIntoView({behavior:"smooth",block:"start"})};typeof a.componentOnReady=="function"?(await a.componentOnReady(),s()):(await new Promise(n=>setTimeout(n,100)),s())}_handleDeployAppTabSelected(e){e.detail==="resources"&&this.sortTypeChanged.emit("")}};b("solutions-resources-shell",l);export{l as a};
2
+ import{a as v}from"./AIZ2P72X.js";import{b}from"./YJ3DKEEZ.js";import{F as r,G as d,H as m,h as p,i as u,q as g}from"./T3EPRHTT.js";var _={heading:"Get Started",card1:{heading:"What's new in the app"},card2:{heading:"Deploy a solution"},card3:{heading:"Manage a deployment"},card4:{heading:"AI Assistant"}},w={heading:"Documentation",card1:{heading:"Help"},card2:{heading:"What's new"},card3:{heading:"FAQ"},card4:{heading:"ArcGIS Blog"}},E={heading:"Support",card1:{heading:"Esri Community"},card2:{heading:"ArcGIS Ideas"},card3:{heading:"Esri Video"},card4:{heading:"Technical support"}},t={getStarted:_,documentation:w,support:E},R=p`*[tabindex]:focus-visible{outline:2px solid var(--calcite-color-brand);outline-offset:2px}:host{display:block;position:relative;height:100%}.position-relative{position:relative}.border-override{border-top-width:var(--calcite-border-width-none);border-bottom-width:var(--calcite-border-width-none)}.header-override{--calcite-panel-header-content-space: 0px;--calcite-panel-header-background-color: var(--calcite-color-surface-3)}.panel-override{--calcite-panel-background-color: var(--calcite-color-surface-3);--calcite-panel-border-color: none}.z-index-1{z-index:1}calcite-shell{background-color:unset;height:auto}.section-spacing{margin-top:var(--calcite-spacing-lg)}`,l=class extends m{constructor(){super(),this._translations=v({name:"solutions-resources-shell",blocking:!0}),this._mainPanelRef=r(),this._getStartedSectionRef=r(),this._documentationSectionRef=r(),this._supportSectionRef=r(),this._panelFixed=!1,this.sortTypeChanged=g(),this.listenOn(window,"deployAppTabSelected",this._handleDeployAppTabSelected)}static{this.properties={_translations:16}}static{this.styles=R}updated(){this._fixPanelContentWrapperFocus()}_fixPanelContentWrapperFocus(){if(!this._panelFixed&&this._mainPanelRef.value){let e=this._mainPanelRef.value;e.componentOnReady?.().then(()=>{if(e.shadowRoot){let i=e.shadowRoot.querySelector(".content-wrapper");i&&(i.tabIndex=-1,this._panelFixed=!0,this._setupPanelObserver())}}).catch(()=>{this._panelFixed=!0})}}_setupPanelObserver(){if(this._panelObserver)return;this._panelObserver=new MutationObserver(i=>{i.forEach(a=>{if(a.type==="attributes"&&a.attributeName==="tabindex"){let s=a.target;s.classList.contains("content-wrapper")&&s.tabIndex===0&&(s.tabIndex=-1)}})});let e=this._mainPanelRef.value;if(e?.shadowRoot){let i=e.shadowRoot.querySelector(".content-wrapper");i&&this._panelObserver.observe(i,{attributes:!0,attributeFilter:["tabindex"]})}}disconnectedCallback(){super.disconnectedCallback(),this._panelObserver?.disconnect()}render(){let e=this._translations;return u`<calcite-shell class="position-relative"><calcite-panel class="border-override header-override panel-override z-index-1" ${d(this._mainPanelRef)}><div class="section-spacing" ${d(this._getStartedSectionRef)}><solutions-resources-section .heading=${e.getStarted.heading} .subheading=${e.getStarted.subheading} .cards=${[{meridianIcon:"value",heading:e.getStarted.card1.heading,description:e.getStarted.card1.description,url:"https://links.esri.com/solutions/whats-new-in-the-app",headingEn:t.getStarted.card1.heading,sectionHeadingEn:t.getStarted.heading},{meridianIcon:"install",heading:e.getStarted.card2.heading,description:e.getStarted.card2.description,url:"https://links.esri.com/solutions/deploy-a-solution",headingEn:t.getStarted.card2.heading,sectionHeadingEn:t.getStarted.heading},{meridianIcon:"keys",heading:e.getStarted.card3.heading,description:e.getStarted.card3.description,url:"https://links.esri.com/solutions/manage-a-deployment",headingEn:t.getStarted.card3.heading,sectionHeadingEn:t.getStarted.heading},{meridianIcon:"speech-bubbles",heading:e.getStarted.card4.heading,description:e.getStarted.card4.description,url:"https://links.esri.com/solutions/ai-assistant",headingEn:t.getStarted.card4.heading,sectionHeadingEn:t.getStarted.heading}]}></solutions-resources-section></div><div ${d(this._documentationSectionRef)}><solutions-resources-section .heading=${e.documentation.heading} .subheading=${e.documentation.subheading} .cards=${[{meridianIcon:"search-files",heading:e.documentation.card1.heading,description:e.documentation.card1.description,url:"https://links.esri.com/solutions/help",headingEn:t.documentation.card1.heading,sectionHeadingEn:t.documentation.heading},{meridianIcon:"value",heading:e.documentation.card2.heading,description:e.documentation.card2.description,url:"https://links.esri.com/solutions/whats-new",headingEn:t.documentation.card2.heading,sectionHeadingEn:t.documentation.heading},{meridianIcon:"faq",heading:e.documentation.card3.heading,description:e.documentation.card3.description,url:"https://links.esri.com/solutions/faq",headingEn:t.documentation.card3.heading,sectionHeadingEn:t.documentation.heading},{meridianIcon:"arcmap-blog",heading:e.documentation.card4.heading,description:e.documentation.card4.description,url:"https://links.esri.com/solutions/arcgis-blogs",headingEn:t.documentation.card4.heading,sectionHeadingEn:t.documentation.heading}]}></solutions-resources-section></div><div ${d(this._supportSectionRef)}><solutions-resources-section .heading=${e.support.heading} .subheading=${e.support.subheading} .cards=${[{meridianIcon:"esri-community",heading:e.support.card1.heading,description:e.support.card1.description,url:"https://links.esri.com/solutions/esri-community",headingEn:t.support.card1.heading,sectionHeadingEn:t.support.heading},{meridianIcon:"idea",heading:e.support.card2.heading,description:e.support.card2.description,url:"https://links.esri.com/solutions/arcgis-ideas",headingEn:t.support.card2.heading,sectionHeadingEn:t.support.heading},{meridianIcon:"video",heading:e.support.card3.heading,description:e.support.card3.description,url:"https://links.esri.com/solutions/esri-video",headingEn:t.support.card3.heading,sectionHeadingEn:t.support.heading},{meridianIcon:"support",heading:e.support.card4.heading,description:e.support.card4.description,url:"https://links.esri.com/solutions/technical-support",headingEn:t.support.card4.heading,sectionHeadingEn:t.support.heading}]}></solutions-resources-section></div></calcite-panel></calcite-shell>`}async scrollToSection(e){let i={getStarted:this._getStartedSectionRef,documentation:this._documentationSectionRef,support:this._supportSectionRef}[e];if(!i.value||!this._mainPanelRef.value)return;let a=this._mainPanelRef.value,s=()=>{let n=this.el;for(;n&&n!==document.body;){let o=window.getComputedStyle(n),c=o.overflowY,h=o.overflow;if(n.scrollHeight>n.clientHeight&&(c==="auto"||c==="scroll"||h==="auto"||h==="scroll")&&i.value){let f=n.getBoundingClientRect(),S=i.value.getBoundingClientRect().top-f.top+n.scrollTop;n.scrollTo({top:S,behavior:"smooth"});return}n=n.parentElement}if(a.shadowRoot){let o=a.shadowRoot.querySelector(".content-wrapper");if(o&&i.value){let c=i.value.offsetTop;if(o.scrollHeight>o.clientHeight){o.scrollTo({top:c,behavior:"smooth"});return}}}i.value&&i.value.scrollIntoView({behavior:"smooth",block:"start"})};typeof a.componentOnReady=="function"?(await a.componentOnReady(),s()):(await new Promise(n=>setTimeout(n,100)),s())}_handleDeployAppTabSelected(e){e.detail==="resources"&&this.sortTypeChanged.emit("")}};b("solutions-resources-shell",l);export{l as a};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{$a as _,A as z,Ab as ya,B as A,Bb as za,C as B,Cb as Aa,D as C,E as D,F as E,Fb as Ba,G as F,Gb as Ca,H as G,Hb as Da,I as H,Ib as Ea,Jb as Fa,Ka as J,Kb as Ga,La as K,Lb as Ha,Ma as L,Mb as Ia,Na as M,Nb as Ja,Oa as N,Ob as Ka,Pa as O,Pb as La,Qa as P,Ra as Q,Sa as R,Ta as S,Ua as T,Va as U,Wa as V,Xa as W,Ya as X,Za as Y,_a as Z,a,ab as $,b,bb as aa,c,cb as ba,d,db as ca,e,eb as da,f,fb as ea,gb as fa,h as g,hb as ga,i as h,ib as ha,j as i,jb as ia,k as j,kb as ja,l as k,lb as ka,m as l,n as m,nb as la,o as n,ob as ma,p as o,pb as na,q as p,qb as oa,r as q,rb as pa,s as r,sb as qa,t as s,tb as ra,u as t,ub as sa,v as u,vb as ta,w as v,wb as ua,x as w,xb as va,y as x,yb as wa,z as y,za as I,zb as xa}from"./KFRHOPZY.js";import"./EXBEKVP5.js";export{S as Annotation,O as AsyncBatchedStore,Q as BaseChannel,L as BaseCheckpointSaver,k as BaseLangGraphError,N as BaseStore,R as BinaryOperatorAggregate,d as COMMAND_SYMBOL,I as ChatModelStreamImpl,i as Command,e as CommandInstance,Ca as CompiledStateGraph,qa as DeltaChannel,ua as DeltaValue,b as END,B as EmptyChannelError,A as EmptyInputError,$ as EventLog,la as Graph,l as GraphBubbleUp,o as GraphDrained,q as GraphInterrupt,m as GraphRecursionError,ha as GraphRunStream,n as GraphValueError,c as INTERRUPT,P as InMemoryStore,C as InvalidUpdateError,M as MemorySaver,Da as MessageGraph,Ia as MessagesAnnotation,Aa as MessagesDeltaValue,za as MessagesValue,Ja as MessagesZodMeta,Ka as MessagesZodState,D as MultipleSubgraphsError,s as NodeError,r as NodeInterrupt,y as NodeTimeoutError,g as Overwrite,u as ParentCommand,wa as REMOVE_ALL_MESSAGES,sa as ReducedValue,F as RemoteException,X as RunControl,a as START,Y as STREAM_EVENTS_V3_MODES,f as Send,Ba as StateGraph,G as StateGraphInputError,va as StateSchema,$ as StreamChannel,ia as SubgraphRunStream,E as UnreachableNodeError,ta as UntrackedValue,ra as UntrackedValueChannel,xa as addMessages,_ as convertToProtocolEvent,K as copyCheckpoint,ja as createGraphRunStream,ba as createLifecycleTransformer,ca as createMessagesTransformer,ea as createSubgraphDiscoveryTransformer,fa as createValuesTransformer,J as emptyCheckpoint,Ga as entrypoint,aa as filterLifecycleEntries,da as filterSubgraphHandles,V as getConfig,W as getCurrentTaskInput,oa as getJsonSchemaFromSchema,Ha as getPreviousState,pa as getSchemaDefaultGetter,T as getStore,H as getSubgraphsSeenSet,U as getWriter,ka as interrupt,Z as isCheckpointEnvelope,j as isCommand,w as isGraphBubbleUp,p as isGraphDrained,x as isGraphInterrupt,h as isInterrupted,ga as isNativeTransformer,t as isNodeError,z as isNodeTimeoutError,v as isParentCommand,na as isSerializableSchema,ma as isStandardSchema,ya as messagesDeltaReducer,xa as messagesStateReducer,Ea as pushMessage,Fa as task,La as writer};
2
+ import{$a as _,A as z,Ab as ya,B as A,Bb as za,C as B,Cb as Aa,D as C,E as D,F as E,Fb as Ba,G as F,Gb as Ca,H as G,Hb as Da,I as H,Ib as Ea,Jb as Fa,Ka as J,Kb as Ga,La as K,Lb as Ha,Ma as L,Mb as Ia,Na as M,Nb as Ja,Oa as N,Ob as Ka,Pa as O,Pb as La,Qa as P,Ra as Q,Sa as R,Ta as S,Ua as T,Va as U,Wa as V,Xa as W,Ya as X,Za as Y,_a as Z,a,ab as $,b,bb as aa,c,cb as ba,d,db as ca,e,eb as da,f,fb as ea,gb as fa,h as g,hb as ga,i as h,ib as ha,j as i,jb as ia,k as j,kb as ja,l as k,lb as ka,m as l,n as m,nb as la,o as n,ob as ma,p as o,pb as na,q as p,qb as oa,r as q,rb as pa,s as r,sb as qa,t as s,tb as ra,u as t,ub as sa,v as u,vb as ta,w as v,wb as ua,x as w,xb as va,y as x,yb as wa,z as y,za as I,zb as xa}from"./VNYXOWZX.js";import"./EXBEKVP5.js";export{S as Annotation,O as AsyncBatchedStore,Q as BaseChannel,L as BaseCheckpointSaver,k as BaseLangGraphError,N as BaseStore,R as BinaryOperatorAggregate,d as COMMAND_SYMBOL,I as ChatModelStreamImpl,i as Command,e as CommandInstance,Ca as CompiledStateGraph,qa as DeltaChannel,ua as DeltaValue,b as END,B as EmptyChannelError,A as EmptyInputError,$ as EventLog,la as Graph,l as GraphBubbleUp,o as GraphDrained,q as GraphInterrupt,m as GraphRecursionError,ha as GraphRunStream,n as GraphValueError,c as INTERRUPT,P as InMemoryStore,C as InvalidUpdateError,M as MemorySaver,Da as MessageGraph,Ia as MessagesAnnotation,Aa as MessagesDeltaValue,za as MessagesValue,Ja as MessagesZodMeta,Ka as MessagesZodState,D as MultipleSubgraphsError,s as NodeError,r as NodeInterrupt,y as NodeTimeoutError,g as Overwrite,u as ParentCommand,wa as REMOVE_ALL_MESSAGES,sa as ReducedValue,F as RemoteException,X as RunControl,a as START,Y as STREAM_EVENTS_V3_MODES,f as Send,Ba as StateGraph,G as StateGraphInputError,va as StateSchema,$ as StreamChannel,ia as SubgraphRunStream,E as UnreachableNodeError,ta as UntrackedValue,ra as UntrackedValueChannel,xa as addMessages,_ as convertToProtocolEvent,K as copyCheckpoint,ja as createGraphRunStream,ba as createLifecycleTransformer,ca as createMessagesTransformer,ea as createSubgraphDiscoveryTransformer,fa as createValuesTransformer,J as emptyCheckpoint,Ga as entrypoint,aa as filterLifecycleEntries,da as filterSubgraphHandles,V as getConfig,W as getCurrentTaskInput,oa as getJsonSchemaFromSchema,Ha as getPreviousState,pa as getSchemaDefaultGetter,T as getStore,H as getSubgraphsSeenSet,U as getWriter,ka as interrupt,Z as isCheckpointEnvelope,j as isCommand,w as isGraphBubbleUp,p as isGraphDrained,x as isGraphInterrupt,h as isInterrupted,ga as isNativeTransformer,t as isNodeError,z as isNodeTimeoutError,v as isParentCommand,na as isSerializableSchema,ma as isStandardSchema,ya as messagesDeltaReducer,xa as messagesStateReducer,Ea as pushMessage,Fa as task,La as writer};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import a from"./QPHNKFC6.js";import{ua as i}from"./CGQALCTZ.js";export default $arcgis.t(([{a:p}])=>{async function D(o,a){let r=await v(a,o),I=[],m=[],d=[],f=r.map(async e=>{let c=await h(e.id,"reverse","Solution2Item",o);return{template:e,relatedItems:c}}),u=await Promise.all(f);for(let{template:e,relatedItems:c}of u)for(let w of c){let s=[];for(let t of w.relatedItemIds)s.push({controlItemId:e.id,dependencyItemId:t});let S=s.reduce((t,n)=>(t[n.controlItemId]||(t[n.controlItemId]=new Set),t[n.controlItemId].add(n.dependencyItemId),t),{}),l=Object.entries(S).filter(([t,n])=>n.size>1).flatMap(([t,n])=>Array.from(n).map(g=>({controlItemId:t,dependencyItemId:g})));l.length>0&&(d=d.concat(l))}m=Array.from(new Map([...d].map(e=>[`${e.controlItemId}:${e.dependencyItemId}`,e])).values());let y=m.map(e=>e.controlItemId);return I=[...new Set(y)],{uniqueIitemIds:I,_nonSolutionDependencyItems:m,templateInfos:r}}async function h(o,a,r,I){let m=await i(o,r,a,I);return[{relationshipType:r,relatedItemIds:m.relatedItems.map(d=>d.id)}]}async function v(o,a){return await p(o.id,a)}return{a:D,b:v}},a)
2
+ import a from"./4RWJ22V3.js";import{ua as i}from"./CGQALCTZ.js";export default $arcgis.t(([{a:p}])=>{async function D(o,a){let r=await v(a,o),I=[],m=[],d=[],f=r.map(async e=>{let c=await h(e.id,"reverse","Solution2Item",o);return{template:e,relatedItems:c}}),u=await Promise.all(f);for(let{template:e,relatedItems:c}of u)for(let w of c){let s=[];for(let t of w.relatedItemIds)s.push({controlItemId:e.id,dependencyItemId:t});let S=s.reduce((t,n)=>(t[n.controlItemId]||(t[n.controlItemId]=new Set),t[n.controlItemId].add(n.dependencyItemId),t),{}),l=Object.entries(S).filter(([t,n])=>n.size>1).flatMap(([t,n])=>Array.from(n).map(g=>({controlItemId:t,dependencyItemId:g})));l.length>0&&(d=d.concat(l))}m=Array.from(new Map([...d].map(e=>[`${e.controlItemId}:${e.dependencyItemId}`,e])).values());let y=m.map(e=>e.controlItemId);return I=[...new Set(y)],{uniqueIitemIds:I,_nonSolutionDependencyItems:m,templateInfos:r}}async function h(o,a,r,I){let m=await i(o,r,a,I);return[{relationshipType:r,relatedItemIds:m.relatedItems.map(d=>d.id)}]}async function v(o,a){return await p(o.id,a)}return{a:D,b:v}},a)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{b as f}from"./HIPZRG2Q.js";import{F as a,G as o,H as h,h as s,i as r,q as t}from"./T3EPRHTT.js";import"./EXBEKVP5.js";export default $arcgis.t(([i])=>{var d=s`:host{display:block}`,l=class extends h{constructor(){super(...arguments),this.enabled=!1,this.floorFilterRef=a(),this.facilityChanged=t(),this.levelChanged=t(),this.siteChanged=t(),this._floorFilterReady=()=>{this.floorFilterRef.value&&(this._facilityHandle?.remove(),this._facilityHandle=i.watch(()=>this.floorFilterRef.value?.facility,e=>{e&&this.facilityChanged.emit(e)}),this._levelHandle?.remove(),this._levelHandle=i.watch(()=>this.floorFilterRef.value?.level,e=>{e&&this.levelChanged.emit(e)}),this._siteHandle?.remove(),this._siteHandle=i.watch(()=>this.floorFilterRef.value?.site,e=>{e&&this.siteChanged.emit(e)}))}}static{this.properties={enabled:5,floorFilterRef:0,mapView:0}}static{this.styles=d}render(){return this.enabled&&this.mapView&&r`<arcgis-floor-filter auto-destroy-disabled .view=${this.mapView} @arcgisReady=${this._floorFilterReady} ${o(this.floorFilterRef)}></arcgis-floor-filter>`||""}disconnectedCallback(){super.disconnectedCallback(),this.floorFilterRef.value&&this.floorFilterRef.value.destroy()}};f("map-floor-filter",l);return l},"core/reactiveUtils")
2
+ import{b as f}from"./YJ3DKEEZ.js";import{F as a,G as o,H as h,h as s,i as r,q as t}from"./T3EPRHTT.js";import"./EXBEKVP5.js";export default $arcgis.t(([i])=>{var d=s`:host{display:block}`,l=class extends h{constructor(){super(...arguments),this.enabled=!1,this.floorFilterRef=a(),this.facilityChanged=t(),this.levelChanged=t(),this.siteChanged=t(),this._floorFilterReady=()=>{this.floorFilterRef.value&&(this._facilityHandle?.remove(),this._facilityHandle=i.watch(()=>this.floorFilterRef.value?.facility,e=>{e&&this.facilityChanged.emit(e)}),this._levelHandle?.remove(),this._levelHandle=i.watch(()=>this.floorFilterRef.value?.level,e=>{e&&this.levelChanged.emit(e)}),this._siteHandle?.remove(),this._siteHandle=i.watch(()=>this.floorFilterRef.value?.site,e=>{e&&this.siteChanged.emit(e)}))}}static{this.properties={enabled:5,floorFilterRef:0,mapView:0}}static{this.styles=d}render(){return this.enabled&&this.mapView&&r`<arcgis-floor-filter auto-destroy-disabled .view=${this.mapView} @arcgisReady=${this._floorFilterReady} ${o(this.floorFilterRef)}></arcgis-floor-filter>`||""}disconnectedCallback(){super.disconnectedCallback(),this.floorFilterRef.value&&this.floorFilterRef.value.destroy()}};f("map-floor-filter",l);return l},"core/reactiveUtils")
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{b as m}from"./2L62YUIH.js";import{a as u}from"./ONLHK7DM.js";import{a as p}from"./VVZAS55G.js";import{b as g}from"./S4GBMN37.js";import{a as s}from"./QMAV4UTN.js";import"./Y2AUIXNK.js";import{H as d,J as a,K as n,h as r,i as t,l,q as c}from"./T3EPRHTT.js";import"./EXBEKVP5.js";var f=r`:host{--instant-apps-header-height: 60px;--instant-apps-header-title-text-link-decoration: underline;--instant-apps-header-height--logo-scale--s: 60px;--instant-apps-header-logo-width--logo-scale--s: 35px;--instant-apps-header-logo-width--logo-scale--s-max: 120px;--instant-apps-header-logo-height--logo-scale--s: 35px;--instant-apps-header-height--logo-scale--m: 70px;--instant-apps-header-logo-width--logo-scale--m: 50px;--instant-apps-header-logo-width--logo-scale--m-max: 171px;--instant-apps-header-logo-height--logo-scale--m: 50px;--instant-apps-header-height--logo-scale--l: 80px;--instant-apps-header-logo-width--logo-scale--l: 60px;--instant-apps-header-logo-width--logo-scale--l-max: 206px;--instant-apps-header-logo-height--logo-scale--l: 60px;--instant-apps-header-actions-end-height: auto;width:100%}.image.image_resized img{width:100%}.header{box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;width:100%;height:var(--instant-apps-header-height);background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-1);font-family:var(--calcite-sans-family)}.header.height-s{height:var(--instant-apps-header-height--logo-scale--s)}.header.height-s h1{font-size:var(--calcite-font-size-lg);line-height:var(--calcite-font-line-height-fixed-lg)}.header.height-s h2{font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-fixed-base)}.header.height-s.logo-square img{width:var(--instant-apps-header-logo-width--logo-scale--s);height:var(--instant-apps-header-logo-height--logo-scale--s)}.header.height-s.logo-rectangle img{max-height:var(--instant-apps-header-logo-height--logo-scale--s);max-width:var(--instant-apps-header-logo-width--logo-scale--s-max);width:auto;height:auto;object-fit:contain}.header.height-m{height:var(--instant-apps-header-height--logo-scale--m)}.header.height-m h1{font-size:var(--calcite-font-size-xl);line-height:22px}.header.height-m h2{font-size:var(--calcite-font-size-md);line-height:18px}.header.height-m.logo-square img{width:var(--instant-apps-header-logo-width--logo-scale--m);height:var(--instant-apps-header-logo-height--logo-scale--m)}.header.height-m.logo-rectangle img{max-height:var(--instant-apps-header-logo-height--logo-scale--m);max-width:var(--instant-apps-header-logo-width--logo-scale--m-max);width:auto;height:auto;object-fit:contain}.header.height-l{height:var(--instant-apps-header-height--logo-scale--l)}.header.height-l h1{font-size:22px;line-height:var(--calcite-font-line-height-fixed-xl)}.header.height-l h2{font-size:var(--calcite-font-size-lg);line-height:var(--calcite-font-line-height-fixed-lg)}.header.height-l.logo-square img{width:var(--instant-apps-header-logo-width--logo-scale--l);height:var(--instant-apps-header-logo-height--logo-scale--l)}.header.height-l.logo-rectangle img{max-height:var(--instant-apps-header-logo-height--logo-scale--l);max-width:var(--instant-apps-header-logo-width--logo-scale--l-max);width:auto;height:auto;object-fit:contain}.header-container{display:flex;align-items:center;width:100%;height:inherit}.header-container slot{display:flex;height:inherit}.header-container ::slotted(*){display:flex;height:var(--instant-apps-header-height)}.header-container ::slotted(*) calcite-button{height:100%}.header-content{box-sizing:border-box;display:flex;align-items:center;flex:1 1 auto;width:auto;min-width:0;height:inherit;padding:5px 10px}.header-content a{display:flex;align-items:center;text-decoration:var(--instant-apps-header-title-text-link-decoration);overflow:hidden}.header-content img{margin:10px}.header-content h1{margin:0;color:var(--calcite-color-text-1);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:var(--calcite-font-size-lg);line-height:var(--calcite-font-line-height-fixed-lg);font-weight:var(--calcite-font-weight-medium)}.header-content h1.header-title-clamp-two-lines{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;white-space:normal}.header-content h2{font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-fixed-base)}.header-content .header-title-subtitle-container{display:flex;align-items:center;min-width:0;overflow:hidden;flex:1 1 auto}.header-content .header-title-subtitle-container>a,.header-content .header-title-subtitle-container>h1{flex:0 0 auto;min-width:0;max-width:100%}.header-content .header-title-subtitle-container .header-subtitle{flex:0 2 auto;max-width:100%;min-width:0;display:block;margin:0 0 0 12px;padding-inline-start:12px;border-inline-start:1px solid;font-weight:var(--calcite-font-weight-regular);color:var(--calcite-color-text-1);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.header-content .header-title-subtitle-container.subtitle-below{flex-direction:column;align-items:flex-start}.header-content .header-title-subtitle-container.subtitle-below>a,.header-content .header-title-subtitle-container.subtitle-below>h1,.header-content .header-title-subtitle-container.subtitle-below .header-subtitle{width:100%;max-width:100%}.header-content .header-title-subtitle-container.subtitle-below .header-subtitle{margin:4px 0 0;padding-inline-start:0;border-inline-start:0}.header-content .header-main-content{display:flex;align-items:center;flex:1 1 auto;min-width:0}.header-content .header-main-content>img,.header-content .header-main-content>a{flex-shrink:0}.header-content .header-main-content.center{justify-content:center}.header-content .header-main-content.right{justify-content:end}.header-content .header-main-content.center .header-title-subtitle-container,.header-content .header-main-content.right .header-title-subtitle-container{flex:0 1 auto}@media(max-width:960px){:is(.header.height-s,.header.height-m,.header.height-l) .header-content h1{font-size:var(--calcite-font-size-md);line-height:22px}}.actions-end-container{height:var(--instant-apps-header-actions-end-height);display:flex;align-items:center;margin-right:8px}.actions-end-container #infoButton{flex-shrink:0}`,i={base:"header",headerContainer:"header-container",headerContent:"header-content",headerMainContent:"header-main-content",titleSubtitleContainer:"header-title-subtitle-container",titleClampTwoLines:"header-title-clamp-two-lines",subtitle:"header-subtitle",subtitleBelow:"subtitle-below",actionsEndContainer:"actions-end-container"},[w,b]=m.medium,h=class extends d{constructor(){super(...arguments),this._isBelow960=s(`(max-width: ${b}px)`),this._isBelow768=s(`(max-width: ${w-1}px)`),this._sanitizer=new p({whiteList:{h1:["style"],h2:["style"],h3:["style"],h4:["style"],h5:["style"],h6:["style"],img:["style","src","width","height"],pre:["style"],p:["id","class","style"],div:["id","class","style","role"],span:["id","class","style","role"],figure:["class","style"],header:["id","class","style","role"]}},!0),this.initialScale="m",this.hideSubtitleOnSmallScreen=!1,this.clampTitleOnNarrowScreen=!1,this.titleText="",this.subtitlePlacement="nextToTitle",this.logoScale="m",this.logoAspectRatio="square",this.infoButton=!1,this.infoIsOpen=!1,this.headerAlignment="left",this.fontFamily="var(--calcite-sans-family);",this.infoIsOpenChanged=c({cancelable:!1})}static{this.properties={initialScale:16,hideSubtitleOnSmallScreen:16,clampTitleOnNarrowScreen:16,titleText:1,titleTextLink:1,subtitleText:1,subtitlePlacement:1,backgroundColor:1,textColor:1,logoImage:1,logoScale:3,logoAspectRatio:1,logoImageAltText:1,logoLink:1,infoButton:7,infoIsOpen:7,infoTitleText:1,infoButtonIcon:1,customHeaderHtml:1,headerAlignment:1,customHeaderCss:1,fontFamily:3}}static{this.styles=f}get hasEmptyLogo(){return this.logoImage==="undefined"||this.logoImage?.split("?")[0]==="undefined"||this.logoImage?.split("?")[0]===""||!this.logoImage}async toggleInfo(){this.infoIsOpen=!this.infoIsOpen,this.infoIsOpenChanged.emit(this.infoIsOpen)}load(){this.initialScale=this.logoScale,this._syncBreakpointState(),this.sanitizeCustomHeaderHtml()}willUpdate(e){e.has("logoScale")&&!this._isBelow960&&(this.initialScale=this.logoScale),this._syncBreakpointState(),e.has("customHeaderHtml")&&this.sanitizeCustomHeaderHtml()}_syncBreakpointState(){let e=this._isBelow960?"s":this.initialScale;this.logoScale!==e&&(this.logoScale=e);let o=this._isBelow960;this.hideSubtitleOnSmallScreen!==o&&(this.hideSubtitleOnSmallScreen=o),this.clampTitleOnNarrowScreen!==this._isBelow768&&(this.clampTitleOnNarrowScreen=this._isBelow768)}sanitizeCustomHeaderHtml(){this.customHeaderHtml=this._sanitizer.sanitize(this.customHeaderHtml)}render(){let e=this.renderLogo(),o=this.renderTitleAndSubtitle(),x=u(this.fontFamily);return this.customHeaderHtml?[t`<style>${this.customHeaderCss}</style>`,t`<div id=customHeader .innerHTML=${this.customHeaderHtml??""}></div>`]:t`<header class=${a({[i.base]:i.base,[`height-${this.logoScale}`]:!!e,[`logo-${this.logoAspectRatio??"logo-square"}`]:!!e})} style=${n({backgroundColor:this.backgroundColor,fontFamily:x})}><div class=${a(i.headerContainer)}><span class=${a(i.headerContent)}><span class=${`${i.headerMainContent} ${this.headerAlignment}`}>${e}${o}</span></span><div class=${a(i.actionsEndContainer)}>${this.infoButton?t`<calcite-button style=${n({"--calcite-color-text-1":this.textColor})} id=infoButton alignment=start appearance=transparent kind=neutral .iconStart=${this.infoButtonIcon??"information-f"} scale=m .label=${this.infoTitleText} title=${this.infoTitleText??l} @click=${this.toggleInfo}></calcite-button>`:null}<slot name=actions-end></slot></div></div></header>`}renderLogo(){if(this.hasEmptyLogo)return null;let e=t`<img src=${this.logoImage??l} alt=${this.logoImageAltText??l}>`;return this.logoLink?t`<a href=${this.logoLink??l} target=_blank>${e}</a>`:e}renderTitleAndSubtitle(){return t`<span class=${a({[i.titleSubtitleContainer]:!0,[i.subtitleBelow]:this.subtitlePlacement==="belowTitle"})}>${this.renderTitle()}${this.renderSubtitle()}</span>`}renderTitle(){return this.titleText&&this.titleTextLink?t`<a style=${n({color:this.textColor})} href=${this.titleTextLink??l} rel="noopener noreferrer" target=_blank>${t`<h1 class=${a({[i.titleClampTwoLines]:this.clampTitleOnNarrowScreen})} style=${n({color:this.textColor})}>${this.titleText}</h1>`}</a>`:t`<h1 class=${a({[i.titleClampTwoLines]:this.clampTitleOnNarrowScreen})} style=${n({color:this.textColor})}>${this.titleText}</h1>`}renderSubtitle(){return this.subtitleText&&!this.hideSubtitleOnSmallScreen&&t`<h2 style=${n({color:this.textColor})} class=${a(i.subtitle)}>${this.subtitleText}</h2>`||""}};g("instant-apps-header",h);export{h as InstantAppsHeader};
2
+ import{b as m}from"./2L62YUIH.js";import{a as u}from"./ONLHK7DM.js";import{a as p}from"./VVZAS55G.js";import{b as g}from"./MXPZF4RB.js";import{a as s}from"./QMAV4UTN.js";import"./Y2AUIXNK.js";import{H as d,J as a,K as n,h as r,i as t,l,q as c}from"./T3EPRHTT.js";import"./EXBEKVP5.js";var f=r`:host{--instant-apps-header-height: 60px;--instant-apps-header-title-text-link-decoration: underline;--instant-apps-header-height--logo-scale--s: 60px;--instant-apps-header-logo-width--logo-scale--s: 35px;--instant-apps-header-logo-width--logo-scale--s-max: 120px;--instant-apps-header-logo-height--logo-scale--s: 35px;--instant-apps-header-height--logo-scale--m: 70px;--instant-apps-header-logo-width--logo-scale--m: 50px;--instant-apps-header-logo-width--logo-scale--m-max: 171px;--instant-apps-header-logo-height--logo-scale--m: 50px;--instant-apps-header-height--logo-scale--l: 80px;--instant-apps-header-logo-width--logo-scale--l: 60px;--instant-apps-header-logo-width--logo-scale--l-max: 206px;--instant-apps-header-logo-height--logo-scale--l: 60px;--instant-apps-header-actions-end-height: auto;width:100%}.image.image_resized img{width:100%}.header{box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;width:100%;height:var(--instant-apps-header-height);background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-1);font-family:var(--calcite-sans-family)}.header.height-s{height:var(--instant-apps-header-height--logo-scale--s)}.header.height-s h1{font-size:var(--calcite-font-size-lg);line-height:var(--calcite-font-line-height-fixed-lg)}.header.height-s h2{font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-fixed-base)}.header.height-s.logo-square img{width:var(--instant-apps-header-logo-width--logo-scale--s);height:var(--instant-apps-header-logo-height--logo-scale--s)}.header.height-s.logo-rectangle img{max-height:var(--instant-apps-header-logo-height--logo-scale--s);max-width:var(--instant-apps-header-logo-width--logo-scale--s-max);width:auto;height:auto;object-fit:contain}.header.height-m{height:var(--instant-apps-header-height--logo-scale--m)}.header.height-m h1{font-size:var(--calcite-font-size-xl);line-height:22px}.header.height-m h2{font-size:var(--calcite-font-size-md);line-height:18px}.header.height-m.logo-square img{width:var(--instant-apps-header-logo-width--logo-scale--m);height:var(--instant-apps-header-logo-height--logo-scale--m)}.header.height-m.logo-rectangle img{max-height:var(--instant-apps-header-logo-height--logo-scale--m);max-width:var(--instant-apps-header-logo-width--logo-scale--m-max);width:auto;height:auto;object-fit:contain}.header.height-l{height:var(--instant-apps-header-height--logo-scale--l)}.header.height-l h1{font-size:22px;line-height:var(--calcite-font-line-height-fixed-xl)}.header.height-l h2{font-size:var(--calcite-font-size-lg);line-height:var(--calcite-font-line-height-fixed-lg)}.header.height-l.logo-square img{width:var(--instant-apps-header-logo-width--logo-scale--l);height:var(--instant-apps-header-logo-height--logo-scale--l)}.header.height-l.logo-rectangle img{max-height:var(--instant-apps-header-logo-height--logo-scale--l);max-width:var(--instant-apps-header-logo-width--logo-scale--l-max);width:auto;height:auto;object-fit:contain}.header-container{display:flex;align-items:center;width:100%;height:inherit}.header-container slot{display:flex;height:inherit}.header-container ::slotted(*){display:flex;height:var(--instant-apps-header-height)}.header-container ::slotted(*) calcite-button{height:100%}.header-content{box-sizing:border-box;display:flex;align-items:center;flex:1 1 auto;width:auto;min-width:0;height:inherit;padding:5px 10px}.header-content a{display:flex;align-items:center;text-decoration:var(--instant-apps-header-title-text-link-decoration);overflow:hidden}.header-content img{margin:10px}.header-content h1{margin:0;color:var(--calcite-color-text-1);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:var(--calcite-font-size-lg);line-height:var(--calcite-font-line-height-fixed-lg);font-weight:var(--calcite-font-weight-medium)}.header-content h1.header-title-clamp-two-lines{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;white-space:normal}.header-content h2{font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-fixed-base)}.header-content .header-title-subtitle-container{display:flex;align-items:center;min-width:0;overflow:hidden;flex:1 1 auto}.header-content .header-title-subtitle-container>a,.header-content .header-title-subtitle-container>h1{flex:0 0 auto;min-width:0;max-width:100%}.header-content .header-title-subtitle-container .header-subtitle{flex:0 2 auto;max-width:100%;min-width:0;display:block;margin:0 0 0 12px;padding-inline-start:12px;border-inline-start:1px solid;font-weight:var(--calcite-font-weight-regular);color:var(--calcite-color-text-1);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.header-content .header-title-subtitle-container.subtitle-below{flex-direction:column;align-items:flex-start}.header-content .header-title-subtitle-container.subtitle-below>a,.header-content .header-title-subtitle-container.subtitle-below>h1,.header-content .header-title-subtitle-container.subtitle-below .header-subtitle{width:100%;max-width:100%}.header-content .header-title-subtitle-container.subtitle-below .header-subtitle{margin:4px 0 0;padding-inline-start:0;border-inline-start:0}.header-content .header-main-content{display:flex;align-items:center;flex:1 1 auto;min-width:0}.header-content .header-main-content>img,.header-content .header-main-content>a{flex-shrink:0}.header-content .header-main-content.center{justify-content:center}.header-content .header-main-content.right{justify-content:end}.header-content .header-main-content.center .header-title-subtitle-container,.header-content .header-main-content.right .header-title-subtitle-container{flex:0 1 auto}@media(max-width:960px){:is(.header.height-s,.header.height-m,.header.height-l) .header-content h1{font-size:var(--calcite-font-size-md);line-height:22px}}.actions-end-container{height:var(--instant-apps-header-actions-end-height);display:flex;align-items:center;margin-right:8px}.actions-end-container #infoButton{flex-shrink:0}`,i={base:"header",headerContainer:"header-container",headerContent:"header-content",headerMainContent:"header-main-content",titleSubtitleContainer:"header-title-subtitle-container",titleClampTwoLines:"header-title-clamp-two-lines",subtitle:"header-subtitle",subtitleBelow:"subtitle-below",actionsEndContainer:"actions-end-container"},[w,b]=m.medium,h=class extends d{constructor(){super(...arguments),this._isBelow960=s(`(max-width: ${b}px)`),this._isBelow768=s(`(max-width: ${w-1}px)`),this._sanitizer=new p({whiteList:{h1:["style"],h2:["style"],h3:["style"],h4:["style"],h5:["style"],h6:["style"],img:["style","src","width","height"],pre:["style"],p:["id","class","style"],div:["id","class","style","role"],span:["id","class","style","role"],figure:["class","style"],header:["id","class","style","role"]}},!0),this.initialScale="m",this.hideSubtitleOnSmallScreen=!1,this.clampTitleOnNarrowScreen=!1,this.titleText="",this.subtitlePlacement="nextToTitle",this.logoScale="m",this.logoAspectRatio="square",this.infoButton=!1,this.infoIsOpen=!1,this.headerAlignment="left",this.fontFamily="var(--calcite-sans-family);",this.infoIsOpenChanged=c({cancelable:!1})}static{this.properties={initialScale:16,hideSubtitleOnSmallScreen:16,clampTitleOnNarrowScreen:16,titleText:1,titleTextLink:1,subtitleText:1,subtitlePlacement:1,backgroundColor:1,textColor:1,logoImage:1,logoScale:3,logoAspectRatio:1,logoImageAltText:1,logoLink:1,infoButton:7,infoIsOpen:7,infoTitleText:1,infoButtonIcon:1,customHeaderHtml:1,headerAlignment:1,customHeaderCss:1,fontFamily:3}}static{this.styles=f}get hasEmptyLogo(){return this.logoImage==="undefined"||this.logoImage?.split("?")[0]==="undefined"||this.logoImage?.split("?")[0]===""||!this.logoImage}async toggleInfo(){this.infoIsOpen=!this.infoIsOpen,this.infoIsOpenChanged.emit(this.infoIsOpen)}load(){this.initialScale=this.logoScale,this._syncBreakpointState(),this.sanitizeCustomHeaderHtml()}willUpdate(e){e.has("logoScale")&&!this._isBelow960&&(this.initialScale=this.logoScale),this._syncBreakpointState(),e.has("customHeaderHtml")&&this.sanitizeCustomHeaderHtml()}_syncBreakpointState(){let e=this._isBelow960?"s":this.initialScale;this.logoScale!==e&&(this.logoScale=e);let o=this._isBelow960;this.hideSubtitleOnSmallScreen!==o&&(this.hideSubtitleOnSmallScreen=o),this.clampTitleOnNarrowScreen!==this._isBelow768&&(this.clampTitleOnNarrowScreen=this._isBelow768)}sanitizeCustomHeaderHtml(){this.customHeaderHtml=this._sanitizer.sanitize(this.customHeaderHtml)}render(){let e=this.renderLogo(),o=this.renderTitleAndSubtitle(),x=u(this.fontFamily);return this.customHeaderHtml?[t`<style>${this.customHeaderCss}</style>`,t`<div id=customHeader .innerHTML=${this.customHeaderHtml??""}></div>`]:t`<header class=${a({[i.base]:i.base,[`height-${this.logoScale}`]:!!e,[`logo-${this.logoAspectRatio??"logo-square"}`]:!!e})} style=${n({backgroundColor:this.backgroundColor,fontFamily:x})}><div class=${a(i.headerContainer)}><span class=${a(i.headerContent)}><span class=${`${i.headerMainContent} ${this.headerAlignment}`}>${e}${o}</span></span><div class=${a(i.actionsEndContainer)}>${this.infoButton?t`<calcite-button style=${n({"--calcite-color-text-1":this.textColor})} id=infoButton alignment=start appearance=transparent kind=neutral .iconStart=${this.infoButtonIcon??"information-f"} scale=m .label=${this.infoTitleText} title=${this.infoTitleText??l} @click=${this.toggleInfo}></calcite-button>`:null}<slot name=actions-end></slot></div></div></header>`}renderLogo(){if(this.hasEmptyLogo)return null;let e=t`<img src=${this.logoImage??l} alt=${this.logoImageAltText??l}>`;return this.logoLink?t`<a href=${this.logoLink??l} target=_blank>${e}</a>`:e}renderTitleAndSubtitle(){return t`<span class=${a({[i.titleSubtitleContainer]:!0,[i.subtitleBelow]:this.subtitlePlacement==="belowTitle"})}>${this.renderTitle()}${this.renderSubtitle()}</span>`}renderTitle(){return this.titleText&&this.titleTextLink?t`<a style=${n({color:this.textColor})} href=${this.titleTextLink??l} rel="noopener noreferrer" target=_blank>${t`<h1 class=${a({[i.titleClampTwoLines]:this.clampTitleOnNarrowScreen})} style=${n({color:this.textColor})}>${this.titleText}</h1>`}</a>`:t`<h1 class=${a({[i.titleClampTwoLines]:this.clampTitleOnNarrowScreen})} style=${n({color:this.textColor})}>${this.titleText}</h1>`}renderSubtitle(){return this.subtitleText&&!this.hideSubtitleOnSmallScreen&&t`<h2 style=${n({color:this.textColor})} class=${a(i.subtitle)}>${this.subtitleText}</h2>`||""}};g("instant-apps-header",h);export{h as InstantAppsHeader};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import b from"./QZ2ZMWIH.js";import a from"./CS5N3DOL.js";import{c as y}from"./C5KDPY7R.js";import"./YM4U4HSN.js";import{a as m}from"./YUWXPLTE.js";import{b as h}from"./S4GBMN37.js";import"./Y2AUIXNK.js";import{F as r,G as o,H as p,J as i,h as d,i as t}from"./T3EPRHTT.js";import"./EXBEKVP5.js";export default $arcgis.t(([,{b:c}])=>{var f=d`:host{display:block}:host .esri-legend__layer-table,:host .instant-apps-interactive-legend__nested-unique-symbol{margin:0}:host .hide{display:none}`,e={layerTableSizeRamp:"esri-legend__layer-table--size-ramp",layerChildTable:"esri-legend__layer-child-table",layerTable:"esri-legend__layer-table",nestedUniqueSymbol:"instant-apps-interactive-legend__nested-unique-symbol",nonInteractive:"instant-apps-interactive-legend__non-interactive"},n=class extends p{constructor(){super(),this.legendLayerCaption=r(),this.expanded=!0,this.titleText="",this.listenOn(window,"legendLayerExpandUpdated",this.legendLayerExpandUpdatedEmitted)}static{this.properties={expanded:16,activeLayerInfo:0,isSizeRamp:5,isChild:5,isColorRamp:5,isRelationshipRamp:5,isInteractive:5,zoomTo:5,legendElement:0,titleText:1,legendvm:0,legendElementIndex:9}}static{this.styles=f}legendLayerExpandUpdatedEmitted(){this.legendLayerCaption.value&&(this.expanded=this.legendLayerCaption.value.expanded)}render(){let g=this.isChild?e.layerChildTable:e.layerTable,a=this.legendElement?.infos?.length===1&&!this.activeLayerInfo?.layer?.renderer?.field,v=(this.isSizeRamp||!this.isChild)&&!this.isColorRamp?` ${e.layerTableSizeRamp}`:"",$=this.isInteractive?"":` ${e.nonInteractive}`,x=y(this.activeLayerInfo)?` ${e.nestedUniqueSymbol}`:"",s=a&&!this.expanded&&!this.zoomTo?!0:this.expanded;if(this.isRelationshipRamp){let l=c.get("relationshipRampExpandStates")[this.activeLayerInfo.layer.id];s=l===void 0?!0:l}return t`<div class=${`${g}${v}${$}${x}`}><div .id=${`${this.activeLayerInfo?.layer?.id}-legend-element-caption`} class=${i(this.isRelationshipRamp||!this.titleText&&!this.zoomTo&&a?"hide":"show")}><instant-apps-interactive-legend-legend-element-caption .legendvm=${this.legendvm} .activeLayerInfo=${this.activeLayerInfo} .layer=${this.activeLayerInfo.layer} .titleText=${this.titleText} .legendElement=${this.legendElement} .legendElementIndex=${this.legendElementIndex} .zoomTo=${this.zoomTo} .isInteractive=${this.isInteractive} ${o(this.legendLayerCaption)}></instant-apps-interactive-legend-legend-element-caption></div>${m("content",t`<div .id=${`${this.activeLayerInfo?.layer?.id}-legend-element-content-${this.legendElementIndex}`} class=${i(s?"show":"hide")}><slot name=content></slot></div>`)}</div>`}};h("instant-apps-interactive-legend-legend-element",n);return n},a,b)
2
+ import b from"./QZ2ZMWIH.js";import a from"./CS5N3DOL.js";import{c as y}from"./C5KDPY7R.js";import"./YM4U4HSN.js";import{a as m}from"./YUWXPLTE.js";import{b as h}from"./MXPZF4RB.js";import"./Y2AUIXNK.js";import{F as r,G as o,H as p,J as i,h as d,i as t}from"./T3EPRHTT.js";import"./EXBEKVP5.js";export default $arcgis.t(([,{b:c}])=>{var f=d`:host{display:block}:host .esri-legend__layer-table,:host .instant-apps-interactive-legend__nested-unique-symbol{margin:0}:host .hide{display:none}`,e={layerTableSizeRamp:"esri-legend__layer-table--size-ramp",layerChildTable:"esri-legend__layer-child-table",layerTable:"esri-legend__layer-table",nestedUniqueSymbol:"instant-apps-interactive-legend__nested-unique-symbol",nonInteractive:"instant-apps-interactive-legend__non-interactive"},n=class extends p{constructor(){super(),this.legendLayerCaption=r(),this.expanded=!0,this.titleText="",this.listenOn(window,"legendLayerExpandUpdated",this.legendLayerExpandUpdatedEmitted)}static{this.properties={expanded:16,activeLayerInfo:0,isSizeRamp:5,isChild:5,isColorRamp:5,isRelationshipRamp:5,isInteractive:5,zoomTo:5,legendElement:0,titleText:1,legendvm:0,legendElementIndex:9}}static{this.styles=f}legendLayerExpandUpdatedEmitted(){this.legendLayerCaption.value&&(this.expanded=this.legendLayerCaption.value.expanded)}render(){let g=this.isChild?e.layerChildTable:e.layerTable,a=this.legendElement?.infos?.length===1&&!this.activeLayerInfo?.layer?.renderer?.field,v=(this.isSizeRamp||!this.isChild)&&!this.isColorRamp?` ${e.layerTableSizeRamp}`:"",$=this.isInteractive?"":` ${e.nonInteractive}`,x=y(this.activeLayerInfo)?` ${e.nestedUniqueSymbol}`:"",s=a&&!this.expanded&&!this.zoomTo?!0:this.expanded;if(this.isRelationshipRamp){let l=c.get("relationshipRampExpandStates")[this.activeLayerInfo.layer.id];s=l===void 0?!0:l}return t`<div class=${`${g}${v}${$}${x}`}><div .id=${`${this.activeLayerInfo?.layer?.id}-legend-element-caption`} class=${i(this.isRelationshipRamp||!this.titleText&&!this.zoomTo&&a?"hide":"show")}><instant-apps-interactive-legend-legend-element-caption .legendvm=${this.legendvm} .activeLayerInfo=${this.activeLayerInfo} .layer=${this.activeLayerInfo.layer} .titleText=${this.titleText} .legendElement=${this.legendElement} .legendElementIndex=${this.legendElementIndex} .zoomTo=${this.zoomTo} .isInteractive=${this.isInteractive} ${o(this.legendLayerCaption)}></instant-apps-interactive-legend-legend-element-caption></div>${m("content",t`<div .id=${`${this.activeLayerInfo?.layer?.id}-legend-element-content-${this.legendElementIndex}`} class=${i(s?"show":"hide")}><slot name=content></slot></div>`)}</div>`}};h("instant-apps-interactive-legend-legend-element",n);return n},a,b)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import c from"./VPXGD2H4.js";import b from"./QPHNKFC6.js";import a from"./TK5EXRZL.js";import"./2B4SGB3I.js";import"./RLSY4VUQ.js";import"./CGQALCTZ.js";import"./DIBK4RSG.js";import"./QMAV4UTN.js";import"./Y2AUIXNK.js";import"./TEHBW75B.js";import"./RSPNBIIE.js";import"./ZCU2WWVN.js";import"./WGO4EVOV.js";import"./YKB6256M.js";import"./36LRAUE4.js";import"./JMY4B4WQ.js";import"./VQ5ZAQUF.js";import"./Z4F2NZOT.js";import"./KOIDWEP3.js";import"./3KXMYZCU.js";import"./6ERMTA3J.js";import"./GF4QELNV.js";import"./3TAQSXLA.js";import"./PY6RTQDR.js";import"./DKD2EGQP.js";import"./5O53T3SW.js";import"./AJZDBHB6.js";import"./FES7B3SJ.js";import"./HIPZRG2Q.js";import"./T3EPRHTT.js";import"./EXBEKVP5.js";export default $arcgis.t(([,,a])=>{return a},a,b,c)
2
+ import c from"./CJJEWE3Q.js";import b from"./4RWJ22V3.js";import a from"./TK5EXRZL.js";import"./2B4SGB3I.js";import"./RLSY4VUQ.js";import"./CGQALCTZ.js";import"./AIZ2P72X.js";import"./QMAV4UTN.js";import"./Y2AUIXNK.js";import"./TEHBW75B.js";import"./RSPNBIIE.js";import"./ZCU2WWVN.js";import"./WGO4EVOV.js";import"./YKB6256M.js";import"./36LRAUE4.js";import"./JMY4B4WQ.js";import"./VQ5ZAQUF.js";import"./Z4F2NZOT.js";import"./KOIDWEP3.js";import"./3KXMYZCU.js";import"./6ERMTA3J.js";import"./GF4QELNV.js";import"./3TAQSXLA.js";import"./PY6RTQDR.js";import"./DKD2EGQP.js";import"./5O53T3SW.js";import"./AJZDBHB6.js";import"./FES7B3SJ.js";import"./YJ3DKEEZ.js";import"./T3EPRHTT.js";import"./EXBEKVP5.js";export default $arcgis.t(([,,a])=>{return a},a,b,c)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{b as o}from"./HIPZRG2Q.js";import{H as r,L as s,h as n,i as e}from"./T3EPRHTT.js";var c=n`*[tabindex]:focus-visible{outline:2px solid var(--calcite-color-brand);outline-offset:2px}.resources-section{padding:3rem var(--calcite-spacing-md);margin:0 auto;box-sizing:border-box}.section-header{margin-bottom:3rem;text-align:center}.section-heading{font-size:var(--calcite-font-size-3);font-weight:var(--calcite-font-weight-small);margin:0 0 var(--calcite-spacing-lg) 0;color:var(--calcite-color-text-1)}.section-subheading{font-size:var(--calcite-font-size-0);color:var(--calcite-color-text-2);margin:0}.cards-container{display:flex;gap:var(--calcite-spacing-md);flex-wrap:wrap}.cards-container solution-resource-card{flex:1 1 200px}`,a=class extends r{constructor(){super(...arguments),this.heading="",this.subheading="",this.cards=[]}static{this.properties={heading:[1,{type:String}],subheading:[1,{type:String}],cards:[1,{type:Array}]}}static{this.styles=c}render(){let t=`section-heading-${this.heading.replace(/\s+/g,"-").toLowerCase()}`;return e`<div class="resources-section" aria-labelledby=${t??s}><div class="section-header"><h2 class="section-heading" id=${t??s} tabindex=0>${this.heading}</h2><p class="section-subheading" tabindex=0>${this.subheading}</p></div><div class="cards-container">${this.cards.map(i=>e`<solution-resource-card .icon=${i.icon} .meridianIcon=${i.meridianIcon} .heading=${i.heading} .description=${i.description} .url=${i.url} .headingEn=${i.headingEn} .sectionHeadingEn=${i.sectionHeadingEn}></solution-resource-card>`)}</div></div>`}};o("solutions-resources-section",a);export{a};
2
+ import{b as o}from"./YJ3DKEEZ.js";import{H as r,L as s,h as n,i as e}from"./T3EPRHTT.js";var c=n`*[tabindex]:focus-visible{outline:2px solid var(--calcite-color-brand);outline-offset:2px}.resources-section{padding:3rem var(--calcite-spacing-md);margin:0 auto;box-sizing:border-box}.section-header{margin-bottom:3rem;text-align:center}.section-heading{font-size:var(--calcite-font-size-3);font-weight:var(--calcite-font-weight-small);margin:0 0 var(--calcite-spacing-lg) 0;color:var(--calcite-color-text-1)}.section-subheading{font-size:var(--calcite-font-size-0);color:var(--calcite-color-text-2);margin:0}.cards-container{display:flex;gap:var(--calcite-spacing-md);flex-wrap:wrap}.cards-container solution-resource-card{flex:1 1 200px}`,a=class extends r{constructor(){super(...arguments),this.heading="",this.subheading="",this.cards=[]}static{this.properties={heading:[1,{type:String}],subheading:[1,{type:String}],cards:[1,{type:Array}]}}static{this.styles=c}render(){let t=`section-heading-${this.heading.replace(/\s+/g,"-").toLowerCase()}`;return e`<div class="resources-section" aria-labelledby=${t??s}><div class="section-header"><h2 class="section-heading" id=${t??s} tabindex=0>${this.heading}</h2><p class="section-subheading" tabindex=0>${this.subheading}</p></div><div class="cards-container">${this.cards.map(i=>e`<solution-resource-card .icon=${i.icon} .meridianIcon=${i.meridianIcon} .heading=${i.heading} .description=${i.description} .url=${i.url} .headingEn=${i.headingEn} .sectionHeadingEn=${i.sectionHeadingEn}></solution-resource-card>`)}</div></div>`}};o("solutions-resources-section",a);export{a};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{a as s,b as n,c as d}from"./ZIVKAX4G.js";import{b as y}from"./HIPZRG2Q.js";import{F as i,G as c,H as m,h as o,i as t,q as p}from"./T3EPRHTT.js";import"./EXBEKVP5.js";var b=o`:host{display:block;--calcite-label-margin-bottom: 0}.label-display{display:block;padding-bottom:1rem}`,r=class extends m{constructor(){super(...arguments),this._densityElement=i(),this._typeElement=i(),this._severityElement=i(),this._types=Object.keys(n).filter(e=>!Number.isNaN(Number(n[e]))),this.deductValueComplete=p()}static{this.styles=b}render(){return t`<div class="label-display"><calcite-label class="label-display">\r\n Density %${this._getDensityInput()}</calcite-label><calcite-label class="label-display">\r\n Type${this._getTypeInput()}</calcite-label><calcite-label class="label-display">\r\n Severity${this._getSeverityInput()}</calcite-label></div><div>${this._getCalculateInput()}</div>`}_getDensityInput(){return t`<calcite-input max=100 min=0 type=number ${c(this._densityElement)}></calcite-input>`}_getTypeInput(){return t`<calcite-select label=Type ${c(this._typeElement)}>${this._types.map((e,l)=>t`<calcite-option .value=${n[e].toString()}>${`${e} (${l+1})`}</calcite-option>`)}</calcite-select>`}_getSeverityInput(){return t`<calcite-select label=Severity ${c(this._severityElement)}><calcite-option .value=${s.H}>\r\n High</calcite-option><calcite-option .value=${s.M}>\r\n Medium</calcite-option><calcite-option .value=${s.L}>\r\n Low</calcite-option></calcite-select>`}_getCalculateInput(){let e=this._typeElement.value&&Number.parseFloat(this._typeElement.value.value),l=this._severityElement.value&&this._severityElement.value.value,a=this._densityElement.value&&Number.parseFloat(this._densityElement.value.value);return t`<calcite-button @click=${()=>this._calculateDeduct(e,l,a)}>\r\n Calculate Deduct Value</calcite-button>`}_calculateDeduct(e,l,a){if(e&&l&&!Number.isNaN(a)){let u=d(e.toString(),l.toString(),a.toString(),!0);this.deductValueComplete.emit(u),alert(u)}else alert("Type, severity, and a density number are required")}};y("deduct-calculator",r);export{r as DeductCalculator};
2
+ import{a as s,b as n,c as d}from"./ZIVKAX4G.js";import{b as y}from"./YJ3DKEEZ.js";import{F as i,G as c,H as m,h as o,i as t,q as p}from"./T3EPRHTT.js";import"./EXBEKVP5.js";var b=o`:host{display:block;--calcite-label-margin-bottom: 0}.label-display{display:block;padding-bottom:1rem}`,r=class extends m{constructor(){super(...arguments),this._densityElement=i(),this._typeElement=i(),this._severityElement=i(),this._types=Object.keys(n).filter(e=>!Number.isNaN(Number(n[e]))),this.deductValueComplete=p()}static{this.styles=b}render(){return t`<div class="label-display"><calcite-label class="label-display">\r\n Density %${this._getDensityInput()}</calcite-label><calcite-label class="label-display">\r\n Type${this._getTypeInput()}</calcite-label><calcite-label class="label-display">\r\n Severity${this._getSeverityInput()}</calcite-label></div><div>${this._getCalculateInput()}</div>`}_getDensityInput(){return t`<calcite-input max=100 min=0 type=number ${c(this._densityElement)}></calcite-input>`}_getTypeInput(){return t`<calcite-select label=Type ${c(this._typeElement)}>${this._types.map((e,l)=>t`<calcite-option .value=${n[e].toString()}>${`${e} (${l+1})`}</calcite-option>`)}</calcite-select>`}_getSeverityInput(){return t`<calcite-select label=Severity ${c(this._severityElement)}><calcite-option .value=${s.H}>\r\n High</calcite-option><calcite-option .value=${s.M}>\r\n Medium</calcite-option><calcite-option .value=${s.L}>\r\n Low</calcite-option></calcite-select>`}_getCalculateInput(){let e=this._typeElement.value&&Number.parseFloat(this._typeElement.value.value),l=this._severityElement.value&&this._severityElement.value.value,a=this._densityElement.value&&Number.parseFloat(this._densityElement.value.value);return t`<calcite-button @click=${()=>this._calculateDeduct(e,l,a)}>\r\n Calculate Deduct Value</calcite-button>`}_calculateDeduct(e,l,a){if(e&&l&&!Number.isNaN(a)){let u=d(e.toString(),l.toString(),a.toString(),!0);this.deductValueComplete.emit(u),alert(u)}else alert("Type, severity, and a density number are required")}};y("deduct-calculator",r);export{r as DeductCalculator};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import b from"./7O4E4IAA.js";import a from"./TK5EXRZL.js";import"./2B4SGB3I.js";import"./RLSY4VUQ.js";import"./CGQALCTZ.js";import"./DIBK4RSG.js";import"./QMAV4UTN.js";import"./Y2AUIXNK.js";import"./TEHBW75B.js";import"./RSPNBIIE.js";import"./ZCU2WWVN.js";import"./WGO4EVOV.js";import"./YKB6256M.js";import"./36LRAUE4.js";import"./JMY4B4WQ.js";import"./VQ5ZAQUF.js";import"./Z4F2NZOT.js";import"./KOIDWEP3.js";import"./3KXMYZCU.js";import"./6ERMTA3J.js";import"./GF4QELNV.js";import"./3TAQSXLA.js";import"./PY6RTQDR.js";import"./DKD2EGQP.js";import"./5O53T3SW.js";import"./AJZDBHB6.js";import"./FES7B3SJ.js";import"./HIPZRG2Q.js";import"./T3EPRHTT.js";import"./EXBEKVP5.js";export default $arcgis.t(([,a])=>{return a},a,b)
2
+ import b from"./F6LBLCUM.js";import a from"./TK5EXRZL.js";import"./2B4SGB3I.js";import"./RLSY4VUQ.js";import"./CGQALCTZ.js";import"./AIZ2P72X.js";import"./QMAV4UTN.js";import"./Y2AUIXNK.js";import"./TEHBW75B.js";import"./RSPNBIIE.js";import"./ZCU2WWVN.js";import"./WGO4EVOV.js";import"./YKB6256M.js";import"./36LRAUE4.js";import"./JMY4B4WQ.js";import"./VQ5ZAQUF.js";import"./Z4F2NZOT.js";import"./KOIDWEP3.js";import"./3KXMYZCU.js";import"./6ERMTA3J.js";import"./GF4QELNV.js";import"./3TAQSXLA.js";import"./PY6RTQDR.js";import"./DKD2EGQP.js";import"./5O53T3SW.js";import"./AJZDBHB6.js";import"./FES7B3SJ.js";import"./YJ3DKEEZ.js";import"./T3EPRHTT.js";import"./EXBEKVP5.js";export default $arcgis.t(([,a])=>{return a},a,b)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{a as e}from"./YUWXPLTE.js";import{a as _}from"./TWJ6DAY5.js";import{b as f}from"./S4GBMN37.js";import"./QMAV4UTN.js";import"./Y2AUIXNK.js";import{F as d,G as v,H as h,J as o,L as a,h as l,i as t,u as m}from"./T3EPRHTT.js";import"./EXBEKVP5.js";var $=l`@layer{:host{display:block}.instant-apps-popover__content{display:flex;flex-direction:column;padding:0 5% 5%;max-width:35vw;font-family:var(--calcite-sans-family);font-size:.875rem}.instant-apps-popover__content .instant-apps-popover__action{align-self:flex-start;--calcite-color-foreground-2: transparent}.instant-apps-popover__content span{display:inline-block;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-text-1);margin:0 0 10px;font-family:var(--calcite-sans-family)}.instant-apps-popover__content p{line-height:19.12px;margin:0 0 10px;font-family:var(--calcite-sans-family)}.instant-apps-popover__content .instant-apps-popover__footer{display:flex;flex-direction:row;align-items:center;justify-content:space-between}.instant-apps-popover__content .instant-apps-popover__footer span{margin-bottom:0;font-weight:400;font-size:.875rem;font-family:var(--calcite-sans-family)}.instant-apps-popover__content .instant-apps-popover__footer calcite-button:first-child{--calcite-color-foreground-3: transparent}.instant-apps-popover__content .instant-apps-popover__footer calcite-button:last-child{margin-left:5px}.instant-apps-popover__content .instant-apps-popover__img{width:100%;margin-bottom:10px}.instant-apps-popover__content.instant-apps-popover--action-disabled{padding:5%}.instant-apps-popover__content.instant-apps-popover--action-disabled #subtitle{margin:0 0 10px}}`,n={content:"instant-apps-popover__content",buttonContainer:"instant-apps-popover__button-container",action:"instant-apps-popover__action",actionDisabled:"instant-apps-popover--action-disabled",img:"instant-apps-popover__img",footer:"instant-apps-popover__footer"},p=class extends h{constructor(){super(...arguments),this._messages=_({name:"instant-apps-popover"}),this.popoverEl=d(),this.popoverTitle="",this.subtitle="",this.content="",this.placement="trailing-start",this.pagination=!1,this.disableAction=!1}static{this.properties={popoverTitle:3,subtitle:3,content:3,imgSrc:3,imgAlt:3,mediaSrc:3,index:11,referenceElement:3,parent:0,placement:1,refId:1,pagination:7,disableAction:7,popoverAction:0,messageOverrides:0}}static{this.styles=$}static{this.shadowRootOptions=m}updated(){!this.hasUpdated&&this.popoverEl.value&&(this.popoverEl.value.referenceElement=this.referenceElement)}render(){return t`<calcite-popover .heading=${this.popoverTitle} auto-close .placement=${this.placement} .messageOverrides=${{close:this._messages.close}} trigger-disabled ref-id=${this.refId??a} closable .referenceElement=${this.referenceElement} .label=${this.popoverTitle} ${v(this.popoverEl)}><div class=${`${n.content}${this.disableAction?` ${n.actionDisabled}`:""}`}>${this.disableAction?null:e("popover-action",t`<calcite-action class=${o(n.action)} @click=${this.popoverAction} .icon=${document.dir==="rtl"?"chevron-right":"chevron-left"} text-enabled .text=${this._messages.back??""}></calcite-action>`)}<section><span id=subtitle>${this.subtitle}</span><p>${this.content}</p>${this.imgSrc?e(`iac-popover-img-${this.refId}`,t`<img class=${o(n.img)} src=${this.imgSrc??a} alt=${(this.imgAlt?this.imgAlt:"")??a}>`):null}</section>${this.pagination?e(`iac-popover-footer-${this.index}`,t`<div class=${o(n.footer)}><span>${this.index+1} ${this._messages?.of} ${this.parent?.instantAppsPopovers?.size}</span>${this.renderPagination()}</div>`):null}</div></calcite-popover>`}renderPagination(){let{index:r,_messages:s,parent:i}=this;if(!i)return null;let g=i.instantAppsPopovers.size,u=r===0,c=r===g-1;return e("pagination-button-container",t`<div class=${o(n.buttonContainer)}>${u?null:e("prev",t`<calcite-button @click=${async()=>await i?.previous()} appearance=outline kind=neutral>${s.back}</calcite-button>`)}${e("next",t`<calcite-button @click=${async()=>{c?await i?.done():await i?.next()}}>${c?s.done:s.next}</calcite-button>`)}</div>`)}};f("instant-apps-popover",p);export{p as InstantAppsPopover};
2
+ import{a as e}from"./YUWXPLTE.js";import{a as _}from"./65I4AUS4.js";import{b as f}from"./MXPZF4RB.js";import"./QMAV4UTN.js";import"./Y2AUIXNK.js";import{F as d,G as v,H as h,J as o,L as a,h as l,i as t,u as m}from"./T3EPRHTT.js";import"./EXBEKVP5.js";var $=l`@layer{:host{display:block}.instant-apps-popover__content{display:flex;flex-direction:column;padding:0 5% 5%;max-width:35vw;font-family:var(--calcite-sans-family);font-size:.875rem}.instant-apps-popover__content .instant-apps-popover__action{align-self:flex-start;--calcite-color-foreground-2: transparent}.instant-apps-popover__content span{display:inline-block;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-text-1);margin:0 0 10px;font-family:var(--calcite-sans-family)}.instant-apps-popover__content p{line-height:19.12px;margin:0 0 10px;font-family:var(--calcite-sans-family)}.instant-apps-popover__content .instant-apps-popover__footer{display:flex;flex-direction:row;align-items:center;justify-content:space-between}.instant-apps-popover__content .instant-apps-popover__footer span{margin-bottom:0;font-weight:400;font-size:.875rem;font-family:var(--calcite-sans-family)}.instant-apps-popover__content .instant-apps-popover__footer calcite-button:first-child{--calcite-color-foreground-3: transparent}.instant-apps-popover__content .instant-apps-popover__footer calcite-button:last-child{margin-left:5px}.instant-apps-popover__content .instant-apps-popover__img{width:100%;margin-bottom:10px}.instant-apps-popover__content.instant-apps-popover--action-disabled{padding:5%}.instant-apps-popover__content.instant-apps-popover--action-disabled #subtitle{margin:0 0 10px}}`,n={content:"instant-apps-popover__content",buttonContainer:"instant-apps-popover__button-container",action:"instant-apps-popover__action",actionDisabled:"instant-apps-popover--action-disabled",img:"instant-apps-popover__img",footer:"instant-apps-popover__footer"},p=class extends h{constructor(){super(...arguments),this._messages=_({name:"instant-apps-popover"}),this.popoverEl=d(),this.popoverTitle="",this.subtitle="",this.content="",this.placement="trailing-start",this.pagination=!1,this.disableAction=!1}static{this.properties={popoverTitle:3,subtitle:3,content:3,imgSrc:3,imgAlt:3,mediaSrc:3,index:11,referenceElement:3,parent:0,placement:1,refId:1,pagination:7,disableAction:7,popoverAction:0,messageOverrides:0}}static{this.styles=$}static{this.shadowRootOptions=m}updated(){!this.hasUpdated&&this.popoverEl.value&&(this.popoverEl.value.referenceElement=this.referenceElement)}render(){return t`<calcite-popover .heading=${this.popoverTitle} auto-close .placement=${this.placement} .messageOverrides=${{close:this._messages.close}} trigger-disabled ref-id=${this.refId??a} closable .referenceElement=${this.referenceElement} .label=${this.popoverTitle} ${v(this.popoverEl)}><div class=${`${n.content}${this.disableAction?` ${n.actionDisabled}`:""}`}>${this.disableAction?null:e("popover-action",t`<calcite-action class=${o(n.action)} @click=${this.popoverAction} .icon=${document.dir==="rtl"?"chevron-right":"chevron-left"} text-enabled .text=${this._messages.back??""}></calcite-action>`)}<section><span id=subtitle>${this.subtitle}</span><p>${this.content}</p>${this.imgSrc?e(`iac-popover-img-${this.refId}`,t`<img class=${o(n.img)} src=${this.imgSrc??a} alt=${(this.imgAlt?this.imgAlt:"")??a}>`):null}</section>${this.pagination?e(`iac-popover-footer-${this.index}`,t`<div class=${o(n.footer)}><span>${this.index+1} ${this._messages?.of} ${this.parent?.instantAppsPopovers?.size}</span>${this.renderPagination()}</div>`):null}</div></calcite-popover>`}renderPagination(){let{index:r,_messages:s,parent:i}=this;if(!i)return null;let g=i.instantAppsPopovers.size,u=r===0,c=r===g-1;return e("pagination-button-container",t`<div class=${o(n.buttonContainer)}>${u?null:e("prev",t`<calcite-button @click=${async()=>await i?.previous()} appearance=outline kind=neutral>${s.back}</calcite-button>`)}${e("next",t`<calcite-button @click=${async()=>{c?await i?.done():await i?.next()}}>${c?s.done:s.next}</calcite-button>`)}</div>`)}};f("instant-apps-popover",p);export{p as InstantAppsPopover};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import b from"./QPHNKFC6.js";import a from"./TK5EXRZL.js";import"./2B4SGB3I.js";import"./RLSY4VUQ.js";import"./CGQALCTZ.js";import"./DIBK4RSG.js";import"./QMAV4UTN.js";import"./Y2AUIXNK.js";import"./TEHBW75B.js";import"./RSPNBIIE.js";import"./ZCU2WWVN.js";import"./WGO4EVOV.js";import"./YKB6256M.js";import"./36LRAUE4.js";import"./JMY4B4WQ.js";import"./VQ5ZAQUF.js";import"./Z4F2NZOT.js";import"./KOIDWEP3.js";import"./3KXMYZCU.js";import"./6ERMTA3J.js";import"./GF4QELNV.js";import"./3TAQSXLA.js";import"./PY6RTQDR.js";import"./DKD2EGQP.js";import"./5O53T3SW.js";import"./AJZDBHB6.js";import"./FES7B3SJ.js";import"./HIPZRG2Q.js";import"./T3EPRHTT.js";import"./EXBEKVP5.js";export default $arcgis.t(([,{h:o}])=>{return o},a,b)
2
+ import b from"./4RWJ22V3.js";import a from"./TK5EXRZL.js";import"./2B4SGB3I.js";import"./RLSY4VUQ.js";import"./CGQALCTZ.js";import"./AIZ2P72X.js";import"./QMAV4UTN.js";import"./Y2AUIXNK.js";import"./TEHBW75B.js";import"./RSPNBIIE.js";import"./ZCU2WWVN.js";import"./WGO4EVOV.js";import"./YKB6256M.js";import"./36LRAUE4.js";import"./JMY4B4WQ.js";import"./VQ5ZAQUF.js";import"./Z4F2NZOT.js";import"./KOIDWEP3.js";import"./3KXMYZCU.js";import"./6ERMTA3J.js";import"./GF4QELNV.js";import"./3TAQSXLA.js";import"./PY6RTQDR.js";import"./DKD2EGQP.js";import"./5O53T3SW.js";import"./AJZDBHB6.js";import"./FES7B3SJ.js";import"./YJ3DKEEZ.js";import"./T3EPRHTT.js";import"./EXBEKVP5.js";export default $arcgis.t(([,{h:o}])=>{return o},a,b)