@esri/solutions-components 5.0.0 → 5.0.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 (110) hide show
  1. package/dist/cdn/{J6Z7OGPT.js → 224I72SO.js} +1 -1
  2. package/dist/cdn/{JV3YKSCY.js → 2333JKXT.js} +1 -1
  3. package/dist/cdn/{3QLYSIKK.js → 243LX5NA.js} +1 -1
  4. package/dist/cdn/{G3RPEESM.js → 2SD4IYX3.js} +1 -1
  5. package/dist/cdn/{Z5H7S4UV.js → 2XLDIKUR.js} +1 -1
  6. package/dist/cdn/{PTPT75U6.js → 3RZAPX3S.js} +1 -1
  7. package/dist/cdn/{6OSOUHQD.js → 4JMP7ZE6.js} +1 -1
  8. package/dist/cdn/{S6XTVW2E.js → 4YJT24E5.js} +1 -1
  9. package/dist/cdn/{IW3HH57K.js → 5MTMSAKC.js} +1 -1
  10. package/dist/cdn/{LYMOZHWK.js → 5SHA3PGC.js} +1 -1
  11. package/dist/cdn/{SXOJTCOY.js → 6NMWB5NC.js} +1 -1
  12. package/dist/cdn/{C4M2JGW3.js → 6UJALA2L.js} +1 -1
  13. package/dist/cdn/{JRDWWNST.js → 6VKEW33C.js} +1 -1
  14. package/dist/cdn/{ONIWIJZN.js → 76M3UWJF.js} +1 -1
  15. package/dist/cdn/{R6DDGHRE.js → 7GQ24AKO.js} +1 -1
  16. package/dist/cdn/7PY2VM2S.js +2 -0
  17. package/dist/cdn/{ULPRAGHR.js → 7PZQ2MP7.js} +1 -1
  18. package/dist/cdn/{ASS5QC73.js → ARXWEJFK.js} +1 -1
  19. package/dist/cdn/{7JX6B3W3.js → AV3KXTWF.js} +1 -1
  20. package/dist/cdn/{QNT2CGG3.js → BXXYI7NG.js} +1 -1
  21. package/dist/cdn/{DJRQRVE7.js → BZVRRVNB.js} +1 -1
  22. package/dist/cdn/{KUYFIQG5.js → C5LZGCHH.js} +1 -1
  23. package/dist/cdn/CI66IACC.js +2 -0
  24. package/dist/cdn/DD3JC2L3.js +4 -0
  25. package/dist/cdn/{RGCDDZZ7.js → E7UFN5JY.js} +1 -1
  26. package/dist/cdn/{AS3OMVJG.js → EMSOP52X.js} +1 -1
  27. package/dist/cdn/{L4UMQNXD.js → ESOI3UW5.js} +1 -1
  28. package/dist/cdn/FMFUEICN.js +2 -0
  29. package/dist/cdn/{V3SPTOG3.js → FNGWQOMU.js} +1 -1
  30. package/dist/cdn/{QNSZUCGN.js → G2T6OYTB.js} +1 -1
  31. package/dist/cdn/{E4LHQX7P.js → GU77W2GF.js} +1 -1
  32. package/dist/cdn/HHKKBJCY.js +2 -0
  33. package/dist/cdn/{K3TXWVO2.js → HK7YZNM4.js} +1 -1
  34. package/dist/cdn/{QNTMCZAS.js → HTLJCLHR.js} +1 -1
  35. package/dist/cdn/{MGOL3BOX.js → HVE26GKL.js} +1 -1
  36. package/dist/cdn/{PRSBDD25.js → IQQXCY6C.js} +1 -1
  37. package/dist/cdn/{EVYF4Q4A.js → IZU7KP25.js} +1 -1
  38. package/dist/cdn/{PKLCCM5C.js → JAOKRCFG.js} +1 -1
  39. package/dist/cdn/{AELONRA2.js → JBJJMSR3.js} +1 -1
  40. package/dist/cdn/{7XSKL7BM.js → JUINWMBC.js} +1 -1
  41. package/dist/cdn/{4GUAHP55.js → K5Z5A2RY.js} +1 -1
  42. package/dist/cdn/{Q36LSOV4.js → M5MCA232.js} +1 -1
  43. package/dist/cdn/{HUTJQTEN.js → MBVWXJW7.js} +1 -1
  44. package/dist/cdn/{EUQ4JO3K.js → NCTVUAXT.js} +1 -1
  45. package/dist/cdn/{GPHDOTEY.js → NHKAOTFM.js} +1 -1
  46. package/dist/cdn/{DBPLH4RV.js → NNOOCMHD.js} +1 -1
  47. package/dist/cdn/{74XBLQLQ.js → NU2NW3YW.js} +1 -1
  48. package/dist/cdn/{56MHO3UY.js → O7AZMIQX.js} +1 -1
  49. package/dist/cdn/{Z5GWY442.js → OIFBNDN7.js} +1 -1
  50. package/dist/cdn/{V7JWKNPI.js → OLLLVTHU.js} +1 -1
  51. package/dist/cdn/{GRJZORJP.js → P6NSLBDS.js} +1 -1
  52. package/dist/cdn/{RLTX5S5V.js → P77GI3QL.js} +1 -1
  53. package/dist/cdn/{NVYKJK26.js → PAKIDHHK.js} +1 -1
  54. package/dist/cdn/{ENW2DF2D.js → PCG2HRKC.js} +1 -1
  55. package/dist/cdn/{M2KUCUL3.js → PQ7PCKL4.js} +1 -1
  56. package/dist/cdn/PSXEKRGH.js +2 -0
  57. package/dist/cdn/{EJJFSS5C.js → QRUCDIZO.js} +1 -1
  58. package/dist/cdn/QXSUDN7A.js +21 -0
  59. package/dist/cdn/{C7UAPXZR.js → RA35CIMF.js} +1 -1
  60. package/dist/cdn/{NPPIBUUP.js → RUU2LTYJ.js} +1 -1
  61. package/dist/cdn/{ZJZBIHZ5.js → S4WGAHIV.js} +1 -1
  62. package/dist/cdn/{2CMRI2B3.js → S7XOHDIW.js} +1 -1
  63. package/dist/cdn/{V7FXM6DJ.js → SLXAZV5B.js} +1 -1
  64. package/dist/cdn/{EYFR4JQP.js → SNN6XXHG.js} +1 -1
  65. package/dist/cdn/SPBICIV2.js +2 -0
  66. package/dist/cdn/SS7F2SZ4.js +2 -0
  67. package/dist/cdn/{5S7OJL7F.js → SSL3U5CO.js} +1 -1
  68. package/dist/cdn/{GVGTMXTG.js → SU77ODY2.js} +1 -1
  69. package/dist/cdn/TAHIBODN.js +2 -0
  70. package/dist/cdn/TE7VJ4KH.js +2 -0
  71. package/dist/cdn/{YHW6JKYZ.js → TOLNZKKL.js} +1 -1
  72. package/dist/cdn/{5KV6KCRT.js → UAUP4JQ4.js} +1 -1
  73. package/dist/cdn/{PDNBP4EL.js → VCZPVG3A.js} +1 -1
  74. package/dist/cdn/{QEZPZGBW.js → VGC3RHQQ.js} +1 -1
  75. package/dist/cdn/VLIHU4DD.js +2 -0
  76. package/dist/cdn/{6A5SBI3R.js → VWDJZ7HA.js} +1 -1
  77. package/dist/cdn/{RSLHX62X.js → WCGF6MFJ.js} +1 -1
  78. package/dist/cdn/WGKOKVQY.js +2 -0
  79. package/dist/cdn/WNOPX4X3.js +2 -0
  80. package/dist/cdn/WPV4X3NK.js +2 -0
  81. package/dist/cdn/{QMRCHKSO.js → XY5MX7TV.js} +1 -1
  82. package/dist/cdn/{HA5W44KL.js → Y3XY5BXI.js} +1 -1
  83. package/dist/cdn/{C5YQOXHX.js → YCLEJLXQ.js} +1 -1
  84. package/dist/cdn/{T6AL47LF.js → ZIPMI556.js} +1 -1
  85. package/dist/cdn/index.js +1 -1
  86. package/dist/chunks/runtime.js +1 -1
  87. package/dist/components/public-notification/customElement.js +3 -3
  88. package/dist/components/solutions-all-panel/customElement.js +8 -8
  89. package/dist/components/solutions-all-shell/customElement.js +9 -9
  90. package/dist/components/solutions-deployed-shell/customElement.js +2 -2
  91. package/dist/docs/api.json +1 -1
  92. package/dist/docs/docs.json +1 -1
  93. package/dist/docs/web-types.json +1 -1
  94. package/dist/solutions-components_commit.txt +4 -4
  95. package/package.json +3 -3
  96. package/dist/cdn/4SZGXI37.js +0 -2
  97. package/dist/cdn/52QNBNIL.js +0 -2
  98. package/dist/cdn/AHXBPG3X.js +0 -2
  99. package/dist/cdn/BF6WA5U4.js +0 -2
  100. package/dist/cdn/CBVAXYAC.js +0 -2
  101. package/dist/cdn/D6VGQMIK.js +0 -2
  102. package/dist/cdn/ETEJ4PIB.js +0 -2
  103. package/dist/cdn/GSRMKEUC.js +0 -2
  104. package/dist/cdn/H74UJR3L.js +0 -2
  105. package/dist/cdn/HATDZAP6.js +0 -2
  106. package/dist/cdn/JJUJVV7A.js +0 -2
  107. package/dist/cdn/LHCWS2RN.js +0 -4
  108. package/dist/cdn/PLHWBWIG.js +0 -2
  109. package/dist/cdn/U4QFXUX2.js +0 -33
  110. package/dist/cdn/WNQD3BKN.js +0 -2
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import g from"./ASS5QC73.js";import e from"./G3RPEESM.js";import"./MQF26HKA.js";import"./7NSN2YE4.js";import"./G4VIPBRX.js";import"./AQKTTVWV.js";import d from"./JJUJVV7A.js";import"./PZ4L77M5.js";import"./LHCWS2RN.js";import c from"./KDIUYXBA.js";import a from"./UUYUTETH.js";import{a as y}from"./HA5W44KL.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import"./AOBFPJ2R.js";import"./JK6XUSIM.js";import"./UPHYUDLT.js";import"./QJJXVRMV.js";import"./7FMLZNDR.js";import"./LL5C4DHP.js";import"./WPAMUSBR.js";import"./XJPOVJV7.js";import"./LDNQ56OK.js";import"./3HUY3T5F.js";import"./Z6G5PBUQ.js";import"./J3QMHA2M.js";import"./TKZAMPEI.js";import"./2IHQU2FX.js";import"./CGLFPVBM.js";import"./OEJAW72H.js";import"./5JJMGPOW.js";import"./TYX345MZ.js";import"./5UWT66A7.js";import{b as u}from"./2CMRI2B3.js";import{G as f,H as b,h as p,i as m}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([])=>{var v=p`.height-51{height:51px}.width-51{width:51px}`,h=class extends b{constructor(){super(),this._translations=y({name:"field-selection",blocking:!0}),this._fieldSortOrder="default",this._selectedFields=[],this._fieldVisibilityPopoverClickHandler=i=>{this._fieldVisibilityPopoverNode?this._isInNode(i.target,"arcgis-field-pick-list")||(document.body.removeChild(this._fieldVisibilityPopoverNode),this._fieldVisibilityPopoverNode=void 0,document.removeEventListener("click",this._fieldVisibilityPopoverClickHandler)):document.removeEventListener("click",this._fieldVisibilityPopoverClickHandler)},this.listenOn(window,"columnReorder",this.handleColumnReorder,{capture:!0})}static{this.properties={configExtraFields:1,layer:0,mapView:0,table:0,tableRef:0,_translations:16}}static{this.styles=v}render(){return m`<calcite-action alignment=center appearance=solid class="height-51 width-51" id=solutions-field-selection .text=${this._translations.fieldVisibility} scale=m @click=${()=>this._handleFieldVisibilityClick()} @mouseover=${()=>this._addTableTooltip(this._fieldVisibilityActionNode,this._translations.fieldVisibility)} @mouseout=${()=>this._removeTableTooltip()} @focus=${()=>this._addTableTooltip(this._fieldVisibilityActionNode,this._translations.fieldVisibility)} ${f(i=>this._fieldVisibilityActionNode=i)}><calcite-icon scale=s icon=gear></calcite-icon></calcite-action>`}handleColumnReorder(){this._fieldSortOrder="default",this._fieldVisibilityPopoverNode&&(this.removeFieldsPickList(),this._handleFieldVisibilityClick())}_handleFieldVisibilityClick(){if(this._fieldVisibilityPopoverNode)return;let i=this.table?.tableTemplate?.columnTemplates;if(this.layer&&this.mapView&&i&&this._fieldVisibilityActionNode){document.removeEventListener("click",this._fieldVisibilityPopoverClickHandler);let t=this.table.fieldColumns.map(l=>({alias:l.field.alias,description:l.field.description,name:l.field.name,type:l.field.type}));if(this._hasAttachmentsEnabled(this.layer)){let l="Attachments";if(this._shouldShowField(l.toUpperCase(),!1)){if(!i.some(s=>s.fieldName.toUpperCase()===l.toUpperCase())){let s={fieldName:l,type:"attachment",visible:!0};i.push(s)}t.push({name:l,alias:"Photos and files",type:"none",description:l})}}if(this.table.relatedRecordsEnabled&&this.layer.relationships&&this.layer.relationships.length>0){let l=this.layer.parent;this.layer.relationships.forEach(s=>{let o,d=this._shouldShowField(s.name||"",!0);if(!i.some(a=>a.fieldName.toLowerCase()===s.name?.toLowerCase()?(o=s.name,!0):!1))if(s.name){o=s.name;let a={fieldName:o,type:"relationship",visible:!0};d=this._shouldShowField(o,!0),i.push(a)}else{let a=[...l?.layers||[],...l?.tables],c;if(a.some(n=>n.layerId===s.relatedTableId?(c=n,!0):!1),c){o=c.title,s.name=o;let n={fieldName:o,type:"relationship",visible:!0};d=this._shouldShowField(o,!0),i.push(n)}}o&&d&&t.push({name:o,alias:`Related ${o}`,type:"none",description:`related:${o}`})})}let e=this._fieldVisibilityPopoverNode?this._fieldVisibilityPopoverNode:document.createElement("arcgis-field-pick-list");e.layer=this.layer,e.fields=t,e.showFieldInfo=!0,e.showFieldName=!0,e.showDescription=!1,e.showSelectionAll=!0,e.hideCancel=!0,e.hideSort=!1,e.showFilterLength=5,e.multiple=!0,e.heading=this._translations.fieldVisibility,e.okBtnText=this._translations.doneWithFieldChanges,e.filterPlaceholderText=this._translations.filterFields,e.sortBy=this._fieldSortOrder??"default";let r=this.table?.visibleColumns.map(l=>l.fieldName.startsWith("EsriFeatureTableRelationshipColumn")||l.fieldName.startsWith("EsriFeatureTableAttachmentsColumn")?l.effectiveLabel:l.fieldName);e.selectedFields=i.reduce((l,s)=>((r?r.indexOf(s.fieldName)>-1:s.visible)&&l.push(s.fieldName),l),[]),this._selectedFields=e.selectedFields,e.style.minHeight="340px",e.popoverProps={refElement:this._fieldVisibilityActionNode,popoverWidth:300,placement:"bottom-end",offsetDistance:-20,triggerDisabled:!1,autoClose:!1},e.addEventListener("arcgisChange",l=>{l.stopPropagation();let s=l.detail.selectedFields,o=this._getDifference(s,this._selectedFields),d=this._getDifference(this._selectedFields,s);o.concat(d).forEach(a=>{let c=this.layer?.relationships?.map(n=>n.name)||[];if(a==="Attachments"){let n=this.table.columns.find(_=>"onShowAttachments"in _);n.hidden=d.indexOf(a)>-1}else c.indexOf(a)>-1?this.table.columns.filter(n=>"relationshipId"in n).forEach(n=>{d.indexOf(a)>-1,a==n.effectiveLabel&&(n.hidden=d.indexOf(a)>-1)}):this.table.toggleColumnVisibility(a)}),this._selectedFields=s,this._updateTable(this.table.tableTemplate)}),e.addEventListener("arcgisSortByChange",l=>{l.stopPropagation(),this._fieldSortOrder=l.detail,this._sortFields(l.detail)}),e.addEventListener("arcgisClose",()=>{this._closePopovers(),setTimeout(()=>this._fieldVisibilityActionNode.setFocus(),200)}),document.body.appendChild(e),this._fieldVisibilityPopoverNode=e,setTimeout(()=>document.addEventListener("click",this._fieldVisibilityPopoverClickHandler),200)}}_shouldShowField(i,t){return(this.configExtraFields||[]).some(e=>t?e.replace("related:","").toUpperCase()===i.toUpperCase():e.toUpperCase()===i.toUpperCase())}removeFieldsPickList(){this._fieldVisibilityPopoverNode&&(document.body.removeChild(this._fieldVisibilityPopoverNode),this._fieldVisibilityPopoverNode=void 0)}_sortFields(i){let t=this.table.tableTemplate.columnTemplates,e=this._getSortOrder(i),r=t.filter(s=>s.type!=="attachment"&&s.type!=="relationship").sort((s,o)=>{let d=e.indexOf(s.fieldName),a=e.indexOf(o.fieldName);return d===-1&&a!==-1?1:d!==-1&&a===-1?-1:d===-1&&a===-1?0:d-a}),l=t.filter(s=>s.type==="attachment"||s.type==="relationship");this.tableRef.setColumnOrder([...r,...l]),this._updateTable(this.table.tableTemplate)}_getSortOrder(i){let t=[...this.layer.fields];return i==="display"?t.sort((e,r)=>e.alias.localeCompare(r.alias)):i==="field"?t.sort((e,r)=>e.name.localeCompare(r.name)):i==="type"&&t.sort((e,r)=>e.type.localeCompare(r.type)),t.map(e=>e.name)}_getDifference(i,t){return i.filter(e=>!t.includes(e))}_updateTable(i){this.table.tableTemplate=i,this._isStandardView()&&this._syncAttributeTableTemplate()}async _syncAttributeTableTemplate(){let i=this.table.layer;if(i.attributeTableTemplate){let{_modules:t}=this,e=i.attributeTableTemplate.clone();t?.attributeTableTemplateUtils.syncAttributeTableTemplate(this.table,e),JSON.stringify(e)!==JSON.stringify(i.attributeTableTemplate)&&(i.attributeTableTemplate=e)}if(i.attributeTableTemplate?.orderByFields?.length>1){let t=i.attributeTableTemplate.clone(),e=this.table.activeSortOrders[0];t.orderByFields=[{field:e.fieldName,order:e.direction}],i.attributeTableTemplate=t,this._syncColumnDirectionsWithOrderByFields()}}_syncColumnDirectionsWithOrderByFields(){let i=this.table.activeSortOrders[0]?.fieldName;this.table.columns.forEach(t=>{"fieldName"in t&&t.fieldName!==i&&(t.direction=void 0)}),this.table.tableTemplate?.columnTemplates.forEach(t=>{"fieldName"in t&&t.fieldName!==i&&(t.direction=void 0)})}_isStandardView(){return!this.table.relatedTable&&!this.table.attachmentsViewOptions.objectId}_closePopovers(){document.removeEventListener("click",this._fieldVisibilityPopoverClickHandler),this._fieldVisibilityPopoverNode&&(document.body.removeChild(this._fieldVisibilityPopoverNode),this._fieldVisibilityPopoverNode=void 0)}_addTableTooltip(i,t){let e=document.createElement("calcite-tooltip");e.className="table-tooltip",e.referenceElement=i,e.placement="trailing-start",e.open=!0;let r=document.createElement("div");r.className="tooltip",r.innerHTML=t,e.append(r),document.body.append(e)}_removeTableTooltip(){document.querySelectorAll(".table-tooltip").forEach(i=>i.parentNode?.removeChild(i))}_isInNode(i,t){for(;i;){if(i.nodeName===t.toUpperCase())return!0;i=i.parentElement}return!1}_hasAttachmentsEnabled(i){if(!i?.capabilities)return!1;let{capabilities:{data:{supportsAttachment:t},operations:{supportsQueryAttachments:e}}}=i;return t&&e}};u("field-selection",h);return h},a,c,d,e,g)
2
+ import g from"./ARXWEJFK.js";import e from"./2SD4IYX3.js";import"./MQF26HKA.js";import"./7NSN2YE4.js";import"./G4VIPBRX.js";import"./AQKTTVWV.js";import d from"./HHKKBJCY.js";import"./PZ4L77M5.js";import"./DD3JC2L3.js";import c from"./KDIUYXBA.js";import a from"./UUYUTETH.js";import{a as y}from"./Y3XY5BXI.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import"./AOBFPJ2R.js";import"./JK6XUSIM.js";import"./UPHYUDLT.js";import"./QJJXVRMV.js";import"./7FMLZNDR.js";import"./LL5C4DHP.js";import"./WPAMUSBR.js";import"./XJPOVJV7.js";import"./LDNQ56OK.js";import"./3HUY3T5F.js";import"./Z6G5PBUQ.js";import"./J3QMHA2M.js";import"./TKZAMPEI.js";import"./2IHQU2FX.js";import"./CGLFPVBM.js";import"./OEJAW72H.js";import"./5JJMGPOW.js";import"./TYX345MZ.js";import"./5UWT66A7.js";import{b as u}from"./S7XOHDIW.js";import{G as f,H as b,h as p,i as m}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([])=>{var v=p`.height-51{height:51px}.width-51{width:51px}`,h=class extends b{constructor(){super(),this._translations=y({name:"field-selection",blocking:!0}),this._fieldSortOrder="default",this._selectedFields=[],this._fieldVisibilityPopoverClickHandler=i=>{this._fieldVisibilityPopoverNode?this._isInNode(i.target,"arcgis-field-pick-list")||(document.body.removeChild(this._fieldVisibilityPopoverNode),this._fieldVisibilityPopoverNode=void 0,document.removeEventListener("click",this._fieldVisibilityPopoverClickHandler)):document.removeEventListener("click",this._fieldVisibilityPopoverClickHandler)},this.listenOn(window,"columnReorder",this.handleColumnReorder,{capture:!0})}static{this.properties={configExtraFields:1,layer:0,mapView:0,table:0,tableRef:0,_translations:16}}static{this.styles=v}render(){return m`<calcite-action alignment=center appearance=solid class="height-51 width-51" id=solutions-field-selection .text=${this._translations.fieldVisibility} scale=m @click=${()=>this._handleFieldVisibilityClick()} @mouseover=${()=>this._addTableTooltip(this._fieldVisibilityActionNode,this._translations.fieldVisibility)} @mouseout=${()=>this._removeTableTooltip()} @focus=${()=>this._addTableTooltip(this._fieldVisibilityActionNode,this._translations.fieldVisibility)} ${f(i=>this._fieldVisibilityActionNode=i)}><calcite-icon scale=s icon=gear></calcite-icon></calcite-action>`}handleColumnReorder(){this._fieldSortOrder="default",this._fieldVisibilityPopoverNode&&(this.removeFieldsPickList(),this._handleFieldVisibilityClick())}_handleFieldVisibilityClick(){if(this._fieldVisibilityPopoverNode)return;let i=this.table?.tableTemplate?.columnTemplates;if(this.layer&&this.mapView&&i&&this._fieldVisibilityActionNode){document.removeEventListener("click",this._fieldVisibilityPopoverClickHandler);let t=this.table.fieldColumns.map(l=>({alias:l.field.alias,description:l.field.description,name:l.field.name,type:l.field.type}));if(this._hasAttachmentsEnabled(this.layer)){let l="Attachments";if(this._shouldShowField(l.toUpperCase(),!1)){if(!i.some(s=>s.fieldName.toUpperCase()===l.toUpperCase())){let s={fieldName:l,type:"attachment",visible:!0};i.push(s)}t.push({name:l,alias:"Photos and files",type:"none",description:l})}}if(this.table.relatedRecordsEnabled&&this.layer.relationships&&this.layer.relationships.length>0){let l=this.layer.parent;this.layer.relationships.forEach(s=>{let o,d=this._shouldShowField(s.name||"",!0);if(!i.some(a=>a.fieldName.toLowerCase()===s.name?.toLowerCase()?(o=s.name,!0):!1))if(s.name){o=s.name;let a={fieldName:o,type:"relationship",visible:!0};d=this._shouldShowField(o,!0),i.push(a)}else{let a=[...l?.layers||[],...l?.tables],c;if(a.some(n=>n.layerId===s.relatedTableId?(c=n,!0):!1),c){o=c.title,s.name=o;let n={fieldName:o,type:"relationship",visible:!0};d=this._shouldShowField(o,!0),i.push(n)}}o&&d&&t.push({name:o,alias:`Related ${o}`,type:"none",description:`related:${o}`})})}let e=this._fieldVisibilityPopoverNode?this._fieldVisibilityPopoverNode:document.createElement("arcgis-field-pick-list");e.layer=this.layer,e.fields=t,e.showFieldInfo=!0,e.showFieldName=!0,e.showDescription=!1,e.showSelectionAll=!0,e.hideCancel=!0,e.hideSort=!1,e.showFilterLength=5,e.multiple=!0,e.heading=this._translations.fieldVisibility,e.okBtnText=this._translations.doneWithFieldChanges,e.filterPlaceholderText=this._translations.filterFields,e.sortBy=this._fieldSortOrder??"default";let r=this.table?.visibleColumns.map(l=>l.fieldName.startsWith("EsriFeatureTableRelationshipColumn")||l.fieldName.startsWith("EsriFeatureTableAttachmentsColumn")?l.effectiveLabel:l.fieldName);e.selectedFields=i.reduce((l,s)=>((r?r.indexOf(s.fieldName)>-1:s.visible)&&l.push(s.fieldName),l),[]),this._selectedFields=e.selectedFields,e.style.minHeight="340px",e.popoverProps={refElement:this._fieldVisibilityActionNode,popoverWidth:300,placement:"bottom-end",offsetDistance:-20,triggerDisabled:!1,autoClose:!1},e.addEventListener("arcgisChange",l=>{l.stopPropagation();let s=l.detail.selectedFields,o=this._getDifference(s,this._selectedFields),d=this._getDifference(this._selectedFields,s);o.concat(d).forEach(a=>{let c=this.layer?.relationships?.map(n=>n.name)||[];if(a==="Attachments"){let n=this.table.columns.find(_=>"onShowAttachments"in _);n.hidden=d.indexOf(a)>-1}else c.indexOf(a)>-1?this.table.columns.filter(n=>"relationshipId"in n).forEach(n=>{d.indexOf(a)>-1,a==n.effectiveLabel&&(n.hidden=d.indexOf(a)>-1)}):this.table.toggleColumnVisibility(a)}),this._selectedFields=s,this._updateTable(this.table.tableTemplate)}),e.addEventListener("arcgisSortByChange",l=>{l.stopPropagation(),this._fieldSortOrder=l.detail,this._sortFields(l.detail)}),e.addEventListener("arcgisClose",()=>{this._closePopovers(),setTimeout(()=>this._fieldVisibilityActionNode.setFocus(),200)}),document.body.appendChild(e),this._fieldVisibilityPopoverNode=e,setTimeout(()=>document.addEventListener("click",this._fieldVisibilityPopoverClickHandler),200)}}_shouldShowField(i,t){return(this.configExtraFields||[]).some(e=>t?e.replace("related:","").toUpperCase()===i.toUpperCase():e.toUpperCase()===i.toUpperCase())}removeFieldsPickList(){this._fieldVisibilityPopoverNode&&(document.body.removeChild(this._fieldVisibilityPopoverNode),this._fieldVisibilityPopoverNode=void 0)}_sortFields(i){let t=this.table.tableTemplate.columnTemplates,e=this._getSortOrder(i),r=t.filter(s=>s.type!=="attachment"&&s.type!=="relationship").sort((s,o)=>{let d=e.indexOf(s.fieldName),a=e.indexOf(o.fieldName);return d===-1&&a!==-1?1:d!==-1&&a===-1?-1:d===-1&&a===-1?0:d-a}),l=t.filter(s=>s.type==="attachment"||s.type==="relationship");this.tableRef.setColumnOrder([...r,...l]),this._updateTable(this.table.tableTemplate)}_getSortOrder(i){let t=[...this.layer.fields];return i==="display"?t.sort((e,r)=>e.alias.localeCompare(r.alias)):i==="field"?t.sort((e,r)=>e.name.localeCompare(r.name)):i==="type"&&t.sort((e,r)=>e.type.localeCompare(r.type)),t.map(e=>e.name)}_getDifference(i,t){return i.filter(e=>!t.includes(e))}_updateTable(i){this.table.tableTemplate=i,this._isStandardView()&&this._syncAttributeTableTemplate()}async _syncAttributeTableTemplate(){let i=this.table.layer;if(i.attributeTableTemplate){let{_modules:t}=this,e=i.attributeTableTemplate.clone();t?.attributeTableTemplateUtils.syncAttributeTableTemplate(this.table,e),JSON.stringify(e)!==JSON.stringify(i.attributeTableTemplate)&&(i.attributeTableTemplate=e)}if(i.attributeTableTemplate?.orderByFields?.length>1){let t=i.attributeTableTemplate.clone(),e=this.table.activeSortOrders[0];t.orderByFields=[{field:e.fieldName,order:e.direction}],i.attributeTableTemplate=t,this._syncColumnDirectionsWithOrderByFields()}}_syncColumnDirectionsWithOrderByFields(){let i=this.table.activeSortOrders[0]?.fieldName;this.table.columns.forEach(t=>{"fieldName"in t&&t.fieldName!==i&&(t.direction=void 0)}),this.table.tableTemplate?.columnTemplates.forEach(t=>{"fieldName"in t&&t.fieldName!==i&&(t.direction=void 0)})}_isStandardView(){return!this.table.relatedTable&&!this.table.attachmentsViewOptions.objectId}_closePopovers(){document.removeEventListener("click",this._fieldVisibilityPopoverClickHandler),this._fieldVisibilityPopoverNode&&(document.body.removeChild(this._fieldVisibilityPopoverNode),this._fieldVisibilityPopoverNode=void 0)}_addTableTooltip(i,t){let e=document.createElement("calcite-tooltip");e.className="table-tooltip",e.referenceElement=i,e.placement="trailing-start",e.open=!0;let r=document.createElement("div");r.className="tooltip",r.innerHTML=t,e.append(r),document.body.append(e)}_removeTableTooltip(){document.querySelectorAll(".table-tooltip").forEach(i=>i.parentNode?.removeChild(i))}_isInNode(i,t){for(;i;){if(i.nodeName===t.toUpperCase())return!0;i=i.parentElement}return!1}_hasAttachmentsEnabled(i){if(!i?.capabilities)return!1;let{capabilities:{data:{supportsAttachment:t},operations:{supportsQueryAttachments:e}}}=i;return t&&e}};u("field-selection",h);return h},a,c,d,e,g)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import b from"./JJUJVV7A.js";import{b as h}from"./PZ4L77M5.js";import"./LHCWS2RN.js";import{a as S}from"./HA5W44KL.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import"./AOBFPJ2R.js";import"./JK6XUSIM.js";import"./UPHYUDLT.js";import"./QJJXVRMV.js";import"./7FMLZNDR.js";import"./LL5C4DHP.js";import"./WPAMUSBR.js";import"./XJPOVJV7.js";import"./LDNQ56OK.js";import"./3HUY3T5F.js";import"./Z6G5PBUQ.js";import"./J3QMHA2M.js";import"./TKZAMPEI.js";import"./2IHQU2FX.js";import"./CGLFPVBM.js";import"./OEJAW72H.js";import"./5JJMGPOW.js";import"./TYX345MZ.js";import"./5UWT66A7.js";import{b as m}from"./2CMRI2B3.js";import{H as u,L as c,h as g,i as a,r as n}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([{L:p,a:y,b:_,t:l}])=>{var w=g`.toolbar-sizing{display:flex;align-items:center;padding-right:0;padding-left:0;margin-left:auto;margin-right:auto;box-sizing:border-box;height:65px}.flex-row{display:flex;flex-direction:row}.flex-grow-1{flex-grow:1}calcite-input-text{--calcite-color-focus: transparent;--calcite-input-text-border-color: transparent;--calcite-color-border-input: transparent;--calcite-color-brand: transparent;display:grid;block-size:65px;box-sizing:border-box;border-bottom:2px solid transparent}@media(prefers-color-scheme:dark){calcite-input-text:focus{border-bottom:2px solid #009AF2}}@media(prefers-color-scheme:light){calcite-input-text:focus{border-bottom:2px solid #007AC2}}.padding-end-1-2{padding-inline-end:.5rem}`,d=class extends u{constructor(){super(),this.defaultSortType="relevance",this.isOrgSolutions=!1,this._activeSearchSortSettings=[{scope:"all-solutions",settings:{enabled:!0,isOrgSolutions:!1,searchTerm:"",sortType:"relevance"}},{scope:"deployments",settings:{enabled:!0,isOrgSolutions:!1,searchTerm:"",sortType:"created"}}],this._isMobile=!1,this._canViewOrg=!1,this._translations=S({name:"solutions-searchsort-toolbar",blocking:!0}),this._configContextConsumer=h({context:_,subscribe:!0,callback:async t=>{t&&t.authentication&&(this._canViewOrg=t.authentication.CanViewOrg)}}),this._isMobileContextConsumer=h({context:y,subscribe:!0,callback:t=>this._isMobile=t}),this.searchChanged=n(),this.sortTypeChanged=n(),this.toggleFilter=n(),this.updateUrlParams=n(),this.listenOn(window,"detailsCardSelected",()=>{this.scope=void 0}),this.listenOn(window,"deployedCardSelected",()=>{this.scope=void 0}),this.listenOn(window,"searchTermSet",t=>{let e=t.detail;this.scope=e.scope,this.changeSearchFilter(e.searchTerm,!1)}),this.listenOn(window,"sortTypeSet",t=>{let e=t.detail;this.scope=e.scope,this.sortChanged(e.sortType,!1)}),this.listenOn(window,"tabChanged",t=>{this.scope=t.detail;let e=this._getCurrentScopeSetting();(this.scope==="all-solutions"||this.scope==="deployments")&&(this.changeSearchFilter(e?.searchTerm||"",!1),this.sortChanged(e?.sortType||this.defaultSortType,!1),this._updateUrlParams(t))})}static{this.properties={defaultSortType:[0,{type:String,attribute:"default-sort-type"}],isOrgSolutions:5,scope:1,_activeSearchSortSettings:16,_isMobile:16,_canViewOrg:16,_translations:16}}static{this.styles=w}changeOwnerFilter(t){this.isOrgSolutions=!t,this._activeSearchSortSettings=this._activeSearchSortSettings.map(s=>s.scope===this.scope?{...s,settings:{...s.settings,isOrgSolutions:this.isOrgSolutions}}:s);let e={displayValue:this.isOrgSolutions?p.ORG:p.MINE,type:"owner",value:this.isOrgSolutions?"My organization's solutions":"My solutions"};this.searchChanged.emit({option:e,scope:this.scope})}changeSearchFilter(t,e,s){let i=this._activeSearchSortSettings.map(o=>o.scope===this.scope?{...o,settings:{...o.settings,searchTerm:t}}:o),r=JSON.stringify(this._activeSearchSortSettings)!==JSON.stringify(i);this._activeSearchSortSettings=i,e&&r&&this.searchChanged.emit({option:{searchTerm:t},scope:this.scope}),s&&(this._searchTelemetryTimer&&window.clearTimeout(this._searchTelemetryTimer),this._searchTelemetryTimer=window.setTimeout(()=>{this.searchChanged.emit({option:{searchTerm:t},scope:this.scope,logSearchTelemetry:!0})},1e3))}sortChanged(t,e){this._activeSearchSortSettings=this._activeSearchSortSettings.map(s=>s.scope===this.scope?{...s,settings:{...s.settings,sortType:t}}:s),e&&this.sortTypeChanged.emit({sortType:t,scope:this.scope})}async load(){this._isMobileContextConsumer.value&&(this._isMobile=this._isMobileContextConsumer.value)}render(){let t=this.scope==="all-solutions"||this.scope==="deployments"&&this._configContextConsumer.value?.authentication?.IsSignedIn,e=t?this._getCurrentScopeSetting():void 0,s=this.scope==="deployments"?this._translations.search.deployments:this._translations.search.solutions,i=this._isMobile?"padding-end-1-2":"";return t?a`<div class="flex-row toolbar-sizing"><calcite-input-text class="flex-grow-1" clearable icon=search @calciteInputTextChange=${r=>{let o=r.target;this.changeSearchFilter(o.value,!0,!1)}} @keyup=${r=>{let o=r.target;["Tab","Shift","Alt","Control","Meta","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Escape"].includes(r.key)||(r.key==="Enter"?this.changeSearchFilter(o.value,!0,!1):(o.value.length>=3||o.value.length===0)&&this.changeSearchFilter(o.value,o.value.length>=3||o.value.length===0,!0))}} .placeholder=${s} scale=l slot=content-top .value=${e?.searchTerm}></calcite-input-text>${this._isMobile&&this.scope==="all-solutions"?a`<calcite-button appearance=transparent class=${`focus-color ${i}`} icon-start=filter kind=neutral .label=${this._translations.showFilters} @click=${this._toggleFilter}></calcite-button>`:""}${this.scope==="deployments"&&this._canViewOrg&&this._renderOwnerBlock()||""}${this._renderDropdown()}</div>`:""}_renderOwnerBlock(){return a`<calcite-dropdown width=m overlay-positioning=fixed><calcite-button appearance=transparent class="header-button-padding" .iconStart=${this.isOrgSolutions?"organization":"user"} kind=neutral slot=trigger>${this._isMobile?"":this.isOrgSolutions?this._translations.myOrgSolutions:this._translations.mySolutions}</calcite-button><calcite-dropdown-group group-title=${this._translations.filterBy??c}><calcite-dropdown-item icon-start=user @click=${t=>{t.detail!==0&&this.changeOwnerFilter(!0)}} @keydown=${t=>l(t,()=>this.changeOwnerFilter(!0))} .selected=${!this.isOrgSolutions}>${this._translations.mySolutions}</calcite-dropdown-item><calcite-dropdown-item icon-start=organization @click=${t=>{t.detail!==0&&this.changeOwnerFilter(!1)}} @keydown=${t=>l(t,()=>this.changeOwnerFilter(!1))} .selected=${this.isOrgSolutions}>${this._translations.myOrgSolutions}</calcite-dropdown-item></calcite-dropdown-group></calcite-dropdown>`}_renderDropdown(){let t=[];t=[{displayValue:this._translations.sortByRelevance,sortType:"relevance"},{displayValue:this._translations.sortByTitle,sortType:"title"}],this.scope==="deployments"?t.push({displayValue:this._translations.sortByDateDeployed,sortType:"created"}):(t.push({displayValue:this._translations.sortByNew,sortType:"new"}),t.push({displayValue:this._translations.sortByUpdated,sortType:"updated"}),this._configContextConsumer.value?.authentication?.IsSignedIn&&t.push({displayValue:this._translations.sortBySuggestedForYou,sortType:"suggested"}));let e=this._getCurrentScopeSetting();return a`<calcite-dropdown width=m><calcite-button appearance=transparent class="header-button-padding" icon-start=sort-descending kind=neutral slot=trigger>${this._isMobile?"":e?.sortType?this._getString(e.sortType):""}</calcite-button><calcite-dropdown-group group-title=${this._translations.chooseSortType??c}>${t.map(s=>this._getDropdownItem(s.displayValue,s.sortType))}</calcite-dropdown-group></calcite-dropdown>`}_getDropdownItem(t,e){let s=this._getCurrentScopeSetting();return s?.sortType&&s.sortType!==e?a`<calcite-dropdown-item @click=${i=>{i.detail!==0&&this.sortChanged(e,!0)}} @keydown=${i=>l(i,()=>this.sortChanged(e,!0))}>${t}</calcite-dropdown-item>`:a`<calcite-dropdown-item @click=${i=>{i.detail!==0&&this.sortChanged(e,!0)}} @keydown=${i=>l(i,()=>this.sortChanged(e,!0))} selected>${t}</calcite-dropdown-item>`}_getString(t){let e="";switch(t){case"new":e=this._translations.sortByNew;break;case"relevance":e=this._translations.sortByRelevance;break;case"suggested":e=this._translations.sortBySuggestedForYou;break;case"title":e=this._translations.sortByTitle;break;case"updated":e=this._translations.sortByUpdated;break;case"created":e=this._translations.sortByDateDeployed;break}return e}_getCurrentScopeSetting(){return this._activeSearchSortSettings?.filter(t=>t.scope===this.scope)?.[0]?.settings}_toggleFilter(){this.toggleFilter.emit()}_updateUrlParams(t){let e=t.detail,s;this._activeSearchSortSettings.some(i=>i.scope===e?(s=i,!0):!1),s&&this.updateUrlParams.emit(s)}};m("solutions-searchsort-toolbar",d);return d},b)
2
+ import b from"./HHKKBJCY.js";import{b as h}from"./PZ4L77M5.js";import"./DD3JC2L3.js";import{a as S}from"./Y3XY5BXI.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import"./AOBFPJ2R.js";import"./JK6XUSIM.js";import"./UPHYUDLT.js";import"./QJJXVRMV.js";import"./7FMLZNDR.js";import"./LL5C4DHP.js";import"./WPAMUSBR.js";import"./XJPOVJV7.js";import"./LDNQ56OK.js";import"./3HUY3T5F.js";import"./Z6G5PBUQ.js";import"./J3QMHA2M.js";import"./TKZAMPEI.js";import"./2IHQU2FX.js";import"./CGLFPVBM.js";import"./OEJAW72H.js";import"./5JJMGPOW.js";import"./TYX345MZ.js";import"./5UWT66A7.js";import{b as m}from"./S7XOHDIW.js";import{H as u,L as c,h as g,i as a,r as n}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([{L:p,a:y,b:_,t:l}])=>{var w=g`.toolbar-sizing{display:flex;align-items:center;padding-right:0;padding-left:0;margin-left:auto;margin-right:auto;box-sizing:border-box;height:65px}.flex-row{display:flex;flex-direction:row}.flex-grow-1{flex-grow:1}calcite-input-text{--calcite-color-focus: transparent;--calcite-input-text-border-color: transparent;--calcite-color-border-input: transparent;--calcite-color-brand: transparent;display:grid;block-size:65px;box-sizing:border-box;border-bottom:2px solid transparent}@media(prefers-color-scheme:dark){calcite-input-text:focus{border-bottom:2px solid #009AF2}}@media(prefers-color-scheme:light){calcite-input-text:focus{border-bottom:2px solid #007AC2}}.padding-end-1-2{padding-inline-end:.5rem}`,d=class extends u{constructor(){super(),this.defaultSortType="relevance",this.isOrgSolutions=!1,this._activeSearchSortSettings=[{scope:"all-solutions",settings:{enabled:!0,isOrgSolutions:!1,searchTerm:"",sortType:"relevance"}},{scope:"deployments",settings:{enabled:!0,isOrgSolutions:!1,searchTerm:"",sortType:"created"}}],this._isMobile=!1,this._canViewOrg=!1,this._translations=S({name:"solutions-searchsort-toolbar",blocking:!0}),this._configContextConsumer=h({context:_,subscribe:!0,callback:async t=>{t&&t.authentication&&(this._canViewOrg=t.authentication.CanViewOrg)}}),this._isMobileContextConsumer=h({context:y,subscribe:!0,callback:t=>this._isMobile=t}),this.searchChanged=n(),this.sortTypeChanged=n(),this.toggleFilter=n(),this.updateUrlParams=n(),this.listenOn(window,"detailsCardSelected",()=>{this.scope=void 0}),this.listenOn(window,"deployedCardSelected",()=>{this.scope=void 0}),this.listenOn(window,"searchTermSet",t=>{let e=t.detail;this.scope=e.scope,this.changeSearchFilter(e.searchTerm,!1)}),this.listenOn(window,"sortTypeSet",t=>{let e=t.detail;this.scope=e.scope,this.sortChanged(e.sortType,!1)}),this.listenOn(window,"tabChanged",t=>{this.scope=t.detail;let e=this._getCurrentScopeSetting();(this.scope==="all-solutions"||this.scope==="deployments")&&(this.changeSearchFilter(e?.searchTerm||"",!1),this.sortChanged(e?.sortType||this.defaultSortType,!1),this._updateUrlParams(t))})}static{this.properties={defaultSortType:[0,{type:String,attribute:"default-sort-type"}],isOrgSolutions:5,scope:1,_activeSearchSortSettings:16,_isMobile:16,_canViewOrg:16,_translations:16}}static{this.styles=w}changeOwnerFilter(t){this.isOrgSolutions=!t,this._activeSearchSortSettings=this._activeSearchSortSettings.map(s=>s.scope===this.scope?{...s,settings:{...s.settings,isOrgSolutions:this.isOrgSolutions}}:s);let e={displayValue:this.isOrgSolutions?p.ORG:p.MINE,type:"owner",value:this.isOrgSolutions?"My organization's solutions":"My solutions"};this.searchChanged.emit({option:e,scope:this.scope})}changeSearchFilter(t,e,s){let i=this._activeSearchSortSettings.map(o=>o.scope===this.scope?{...o,settings:{...o.settings,searchTerm:t}}:o),r=JSON.stringify(this._activeSearchSortSettings)!==JSON.stringify(i);this._activeSearchSortSettings=i,e&&r&&this.searchChanged.emit({option:{searchTerm:t},scope:this.scope}),s&&(this._searchTelemetryTimer&&window.clearTimeout(this._searchTelemetryTimer),this._searchTelemetryTimer=window.setTimeout(()=>{this.searchChanged.emit({option:{searchTerm:t},scope:this.scope,logSearchTelemetry:!0})},1e3))}sortChanged(t,e){this._activeSearchSortSettings=this._activeSearchSortSettings.map(s=>s.scope===this.scope?{...s,settings:{...s.settings,sortType:t}}:s),e&&this.sortTypeChanged.emit({sortType:t,scope:this.scope})}async load(){this._isMobileContextConsumer.value&&(this._isMobile=this._isMobileContextConsumer.value)}render(){let t=this.scope==="all-solutions"||this.scope==="deployments"&&this._configContextConsumer.value?.authentication?.IsSignedIn,e=t?this._getCurrentScopeSetting():void 0,s=this.scope==="deployments"?this._translations.search.deployments:this._translations.search.solutions,i=this._isMobile?"padding-end-1-2":"";return t?a`<div class="flex-row toolbar-sizing"><calcite-input-text class="flex-grow-1" clearable icon=search @calciteInputTextChange=${r=>{let o=r.target;this.changeSearchFilter(o.value,!0,!1)}} @keyup=${r=>{let o=r.target;["Tab","Shift","Alt","Control","Meta","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Escape"].includes(r.key)||(r.key==="Enter"?this.changeSearchFilter(o.value,!0,!1):(o.value.length>=3||o.value.length===0)&&this.changeSearchFilter(o.value,o.value.length>=3||o.value.length===0,!0))}} .placeholder=${s} scale=l slot=content-top .value=${e?.searchTerm}></calcite-input-text>${this._isMobile&&this.scope==="all-solutions"?a`<calcite-button appearance=transparent class=${`focus-color ${i}`} icon-start=filter kind=neutral .label=${this._translations.showFilters} @click=${this._toggleFilter}></calcite-button>`:""}${this.scope==="deployments"&&this._canViewOrg&&this._renderOwnerBlock()||""}${this._renderDropdown()}</div>`:""}_renderOwnerBlock(){return a`<calcite-dropdown width=m overlay-positioning=fixed><calcite-button appearance=transparent class="header-button-padding" .iconStart=${this.isOrgSolutions?"organization":"user"} kind=neutral slot=trigger>${this._isMobile?"":this.isOrgSolutions?this._translations.myOrgSolutions:this._translations.mySolutions}</calcite-button><calcite-dropdown-group group-title=${this._translations.filterBy??c}><calcite-dropdown-item icon-start=user @click=${t=>{t.detail!==0&&this.changeOwnerFilter(!0)}} @keydown=${t=>l(t,()=>this.changeOwnerFilter(!0))} .selected=${!this.isOrgSolutions}>${this._translations.mySolutions}</calcite-dropdown-item><calcite-dropdown-item icon-start=organization @click=${t=>{t.detail!==0&&this.changeOwnerFilter(!1)}} @keydown=${t=>l(t,()=>this.changeOwnerFilter(!1))} .selected=${this.isOrgSolutions}>${this._translations.myOrgSolutions}</calcite-dropdown-item></calcite-dropdown-group></calcite-dropdown>`}_renderDropdown(){let t=[];t=[{displayValue:this._translations.sortByRelevance,sortType:"relevance"},{displayValue:this._translations.sortByTitle,sortType:"title"}],this.scope==="deployments"?t.push({displayValue:this._translations.sortByDateDeployed,sortType:"created"}):(t.push({displayValue:this._translations.sortByNew,sortType:"new"}),t.push({displayValue:this._translations.sortByUpdated,sortType:"updated"}),this._configContextConsumer.value?.authentication?.IsSignedIn&&t.push({displayValue:this._translations.sortBySuggestedForYou,sortType:"suggested"}));let e=this._getCurrentScopeSetting();return a`<calcite-dropdown width=m><calcite-button appearance=transparent class="header-button-padding" icon-start=sort-descending kind=neutral slot=trigger>${this._isMobile?"":e?.sortType?this._getString(e.sortType):""}</calcite-button><calcite-dropdown-group group-title=${this._translations.chooseSortType??c}>${t.map(s=>this._getDropdownItem(s.displayValue,s.sortType))}</calcite-dropdown-group></calcite-dropdown>`}_getDropdownItem(t,e){let s=this._getCurrentScopeSetting();return s?.sortType&&s.sortType!==e?a`<calcite-dropdown-item @click=${i=>{i.detail!==0&&this.sortChanged(e,!0)}} @keydown=${i=>l(i,()=>this.sortChanged(e,!0))}>${t}</calcite-dropdown-item>`:a`<calcite-dropdown-item @click=${i=>{i.detail!==0&&this.sortChanged(e,!0)}} @keydown=${i=>l(i,()=>this.sortChanged(e,!0))} selected>${t}</calcite-dropdown-item>`}_getString(t){let e="";switch(t){case"new":e=this._translations.sortByNew;break;case"relevance":e=this._translations.sortByRelevance;break;case"suggested":e=this._translations.sortBySuggestedForYou;break;case"title":e=this._translations.sortByTitle;break;case"updated":e=this._translations.sortByUpdated;break;case"created":e=this._translations.sortByDateDeployed;break}return e}_getCurrentScopeSetting(){return this._activeSearchSortSettings?.filter(t=>t.scope===this.scope)?.[0]?.settings}_toggleFilter(){this.toggleFilter.emit()}_updateUrlParams(t){let e=t.detail,s;this._activeSearchSortSettings.some(i=>i.scope===e?(s=i,!0):!1),s&&this.updateUrlParams.emit(s)}};m("solutions-searchsort-toolbar",d);return d},b)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import{a as S}from"./7NSN2YE4.js";import"./AQKTTVWV.js";import d from"./KDIUYXBA.js";import a from"./UUYUTETH.js";import{a as $}from"./HA5W44KL.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import{b as I}from"./2CMRI2B3.js";import{F as c,G as o,H as F,J as u,h as y,i as l,l as p,r as b,u as L}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([E,V,k,O,{b:v},{a:C,c:m,d:d,e:_,f:f,g:x}])=>{var M=y`@layer{:host{display:block;--calcite-label-margin-bottom: 0px;--solutions-theme-foreground-color: var(--calcite-color-foreground-1)}.width-full{width:100%!important}.height-full{height:100%!important}.notice-msg{padding:10px;width:calc(100% - 20px)}.progress-bar{padding:12px}.footer-top-button{padding-bottom:7px}.footer-button{height:35px}.feature-pagination{background-color:var(--calcite-color-foreground-1)!important;border-block-end:1px solid var(--calcite-color-border-3);display:flex;justify-content:center;padding:5px 0}.pagination-count{color:var(--calcite-color-brand);border-bottom:1px solid var(--calcite-color-brand);font-weight:700}.report-submitted-msg{position:absolute;z-index:1000}.share-node{display:flex}.overflow-auto{overflow:auto}}`,g=class extends F{constructor(){super(),this.center="",this.commentButtonText="",this.commentSubmittedMessage="",this.defaultWebmap="",this.description="",this.enableAnonymousAccess=!1,this.enableAnonymousComments=!1,this.enableComments=!1,this.enableHome=!0,this.enableLogin=!1,this.enableNewReports=!1,this.enableSearch=!0,this.enableSnapping=!1,this.enableZoom=!0,this.isMobile=!1,this.layerExpressions=[],this.layerId="",this.level="",this.loginTitle="",this.mapInfos=[],this.objectId="",this.reportButtonText="",this.reportsHeader="",this.reportSubmittedMessage="",this.showComments=!1,this.showUserImageInCommentsList=!1,this.showFeatureSymbol=!1,this.showMyReportsOnly=!1,this.submitNewReportsMessage="",this.theme="light",this.floorLevel="",this.showFullCommentTitle=!0,this.filterByMapExtent=!1,this.sortOption="newest",this.reportingArea=!1,this.reportingAreaLayer="",this.reportingAreaMessage="",this.enablePhotoLocation=!1,this.aiImageExtraction=[],this._featureCreationFailedErrorMsg="",this._filterActive=!1,this._flowItems=[],this._hasValidLayers=!1,this._reportSubmitted=!1,this._selectedLayerName="",this._showSubmitCancelButton=!1,this._showLoadingIndicator=!1,this._sidePanelCollapsed=!1,this._translations=$({name:"crowdsource-reporter",blocking:!0}),this._updatedProgressBarStatus=25,this._updatedSortOption="newest",this._commentSubmitted=!1,this._addingCommentFailed=!1,this._filterOpen=!1,this._showNextButton=!1,this._submitNextButtonDisabled=!1,this._showFilterIcon=!1,this._createFeature=c(),this._currentFeatureId="",this._editableLayerIds=[],this._featureDetails=c(),this._featureList=c(),this._selectedRelatedFeature=[],this._layerList=c(),this._createRelatedFeature=c(),this._layers=[],this._mapImageryLayersId=[],this._selectedFeature=[],this._selectedFeatureIndex=0,this._selectedLayerId="",this._shareNode=c(),this._urlParamsLoaded=!1,this._validLayers=[],this._nonVisibleValidLayers=[],this._showFullPanel=!1,this._floorExpression="",this._formElements=[],this._prevSelectedLayerId="",this._t9nLayerExpressions=[],this._reportSubmittedAlertNode=c(),this._commentSubmittedAlertNode=c(),this._sortPopoverNode=c(),this.togglePanel=b(),S(window)}static{this.properties={center:1,commentButtonText:1,commentSubmittedMessage:1,defaultWebmap:1,description:1,enableAnonymousAccess:5,enableAnonymousComments:5,enableComments:5,enableHome:5,enableLogin:5,enableNewReports:5,enableSearch:5,enableSnapping:5,enableZoom:5,isMobile:5,layerExpressions:0,layerId:1,level:1,loginTitle:1,mapInfos:0,mapView:0,objectId:1,reportButtonText:1,reportingOptions:0,reportsHeader:1,reportSubmittedMessage:1,searchConfiguration:0,showComments:5,showUserImageInCommentsList:5,showFeatureSymbol:5,showMyReportsOnly:5,submitNewReportsMessage:1,theme:1,zoomToScale:9,floorLevel:1,showFullCommentTitle:5,filterByMapExtent:5,sortOption:1,reportingArea:5,reportingAreaLayer:1,reportingAreaMessage:1,enablePhotoLocation:5,aiImageExtraction:0,_featureCreationFailedErrorMsg:16,_filterActive:16,_flowItems:16,_hasValidLayers:16,_mapInfo:16,_reportSubmitted:16,_selectedLayerName:16,_showSubmitCancelButton:16,_showLoadingIndicator:16,_sidePanelCollapsed:16,_translations:16,_updatedProgressBarStatus:16,_updatedSorting:16,_updatedSortOption:16,_commentSubmitted:16,_addingCommentFailed:16,_filterOpen:16,_showNextButton:16,_submitNextButtonDisabled:16,_showFilterIcon:16}}static{this.styles=M}static{this.shadowRootOptions=L}willUpdate(e){e.has("isMobile")&&this.isMobileWatchHandler(this.isMobile),e.has("mapView")&&this.hasUpdated&&this.mapViewWatchHandler(),e.has("floorLevel")&&this.floorLevelWatchHandler(),(e.has("reportingAreaLayer")||e.has("reportingArea")&&this.hasUpdated)&&setTimeout(()=>{this._createFeature.value&&this._createFeature.value.refresh(this.floorLevel)},50),e.has("showMyReportsOnly")&&(this.hasUpdated||this.showMyReportsOnly!==!1)&&this.showMyReportsOnlyWatchHandler(),e.has("sortOption")&&(this.hasUpdated||this.sortOption!=="newest")&&this.sortOptionWatchHandler(),e.has("filterByMapExtent")&&(this.hasUpdated||this.filterByMapExtent!==!1)&&this.filterByMapExtentChangeWatchHandler(),e.has("layerExpressions")&&(this.hasUpdated||this.layerExpressions?.length>0)&&this.layerExpressionsWatchHandler(),e.has("showFeatureSymbol")&&(this.hasUpdated||this.showFeatureSymbol!==!1)&&this.showFeatureSymbolWatchHandler(),(this._flowItems.includes("filter-panel")||this._filterOpen)&&this._filterList?.updateInitDefExpressions({initDefExpressions:this._initDefExpressions})}async isMobileWatchHandler(e){this.updatePanelState(!1,this._showFullPanel),e&&this._flowItems[this._flowItems.length-1]==="filter-panel"?(await this.backFromFilterPanel(),this._filterOpen=!0):!e&&this._filterOpen&&(await this._closeFilter(),this._flowItems=[...this._flowItems,"filter-panel"])}async mapViewWatchHandler(){await this.mapView?.when(async()=>{this.setInitExpressions(),await this.setMapView()})}async floorLevelWatchHandler(){if(this._editableLayerIds)for(let e of this._editableLayerIds){let t=this.mapView&&await d(this.mapView,e);t&&t.floorInfo?.floorField&&this._updateFloorDefinitionExpression(t)}this._flowItems[this._flowItems.length-1]==="layer-list"&&this._layerList.value&&await this._layerList.value.refresh(),this._featureList.value&&this._featureList.value.refresh(),this._createFeature.value&&this._createFeature.value.refresh(this.floorLevel)}async showMyReportsOnlyWatchHandler(){this._editableLayerIds&&(await this._updateFeatures(),this.refreshLists())}async sortOptionWatchHandler(){this.updateSortingOptions()}filterByMapExtentChangeWatchHandler(){this.refreshLists()}async layerExpressionsWatchHandler(){await this.resetFilterList(),await this.handleSelectedLayersFilter(),await this._featureList.value?.refresh()}async showFeatureSymbolWatchHandler(){await this._featureList.value?.refresh()}async updateLayerExpressionsT9n(e){if(this._t9nLayerExpressions=e||this.layerExpressions,this._filterList!=null)await this._filterList.handleUpdatingT9nData(this._t9nLayerExpressions);else if(this._currentLayerExpressions!=null){let t=structuredClone(this._currentLayerExpressions);this.handleLayerExpressionsT9n(t,this._t9nLayerExpressions),this._currentLayerExpressions=t,this._showFilterIcon=this._currentLayerExpressions?.length>0}return Promise.resolve()}async load(){this._urlParamsLoaded=!1,await this.mapView?.when(async()=>{this._layers=this.reportingOptions?Object.keys(this.reportingOptions).filter(e=>{let t=e&&this.reportingOptions&&this.reportingOptions[e];return t&&t.visible}):[],this.setInitExpressions(),await this.setMapView()})}render(){let e=this.theme==="dark"?"calcite-mode-dark":"calcite-mode-light";return l`${this._reportSubmitted&&l`<calcite-alert auto-close class=${`${e} report-submitted-msg`} icon=check-circle kind=success label @calciteAlertClose=${()=>{this._reportSubmitted=!1}} open placement=top><div slot=message .innerHTML=${(this.reportSubmittedMessage||this._translations.submitMsg)??""} ${o(this._reportSubmittedAlertNode)}></div></calcite-alert>`||""}${this._featureCreationFailedErrorMsg&&l`<calcite-alert auto-close class=${u(e)} icon=x-octagon kind=danger label @calciteAlertClose=${()=>{this._featureCreationFailedErrorMsg=""}} open placement=top><div slot=title>${this._translations.error}</div><div slot=message>${this._featureCreationFailedErrorMsg}</div></calcite-alert>`||""}${this._commentSubmitted&&l`<calcite-alert auto-close class=${`report-submitted ${e}`} icon=check-circle kind=success label @calciteAlertClose=${()=>{this._commentSubmitted=!1}} open placement=top><div slot=message .innerHTML=${(this.commentSubmittedMessage||this._translations.commentSubmittedMsg)??""} ${o(this._commentSubmittedAlertNode)}></div></calcite-alert>`||""}${this._addingCommentFailed&&l`<calcite-alert auto-close class=${u(e)} icon=x-octagon kind=danger label @calciteAlertClose=${()=>{this._addingCommentFailed=!1}} open placement=top><div slot=title>${this._translations.error}</div><div slot=message>${this._translations.addingCommentFailedMsg}</div></calcite-alert>`||""}<div><calcite-shell content-behind>${this._getReporter()}</calcite-shell></div>${this.isMobile&&this.filterModal()||""}`}updated(){this._adjustAlertStyles()}async setSelectedLayer(e,t){this._selectedLayerId=e,this._selectedLayer=this.mapView&&await d(this.mapView,e),this._selectedLayerName=t,this._validLayers.forEach(i=>{this._nonVisibleValidLayers.find(s=>s.id===i.id)||i.set("visible",!e||i.id===e)})}_getLayersConfig(e){return this.reportingOptions&&this.reportingOptions[e]?this.reportingOptions[e]:null}_getReporter(){let e=[];this._flowItems.forEach(i=>{switch(i){case"layer-list":e.push(this.getLayerListFlowItem());break;case"feature-list":e.push(this.getFeatureListFlowItem(this._selectedLayerId,this._selectedLayerName));break;case"filter-panel":e.push(this.getFilterPanel());break;case"feature-details":e.push(this.getFeatureDetailsFlowItem());break;case"reporting-layer-list":e.push(this.getChooseCategoryFlowItem());break;case"feature-create":e.push(this.getFeatureCreateFlowItem());break;case"comment-details":e.push(this.getCommentDetailsFlowItem());break;case"add-comment":e.push(this.getAddCommentFlowItem());break}});let t=this.theme==="dark"?"calcite-mode-dark":"calcite-mode-light";return l`<calcite-panel class=${`width-full ${t}`}>${this.mapView?l`<calcite-flow>${e?.length>0&&e||""}</calcite-flow>`:l`<calcite-loader label scale=m></calcite-loader>`}</calcite-panel>`}filterModal(){return(this.layerExpressions?this.layerExpressions.filter(e=>e.id===this._selectedLayerId):[]).length>0&&l`<calcite-dialog aria-labelledby=modal-title class="modal" .heading=${this._translations.filterLayerTitle.replace("{{title}}",this._selectedLayerName)} kind=brand @calciteDialogClose=${()=>{this._closeFilter()}} .open=${this._filterOpen} width=s><div>${this.mapView&&l`<instant-apps-filter-list close-btn .closeBtnOnClick=${()=>{this._closeFilter()}} combobox-overlay-positioning=fixed .layerExpressions=${this._currentLayerExpressions} @filterListReset=${()=>{this._filterActive=!1,this._featureList.value&&this._featureList.value.refresh()}} @filterUpdate=${()=>{this._filterList?.filterCount!==void 0&&this._handleFilterUpdate(this._filterList?.filterCount>0)}} .view=${this.mapView} ${o(this._setFilterList)}></instant-apps-filter-list>`||""}</div></calcite-dialog>`||""}_setFilterList(e){this._filterList=e,e&&(e.autoUpdateUrl=!1,e.resetBtn=this.isMobile,e.resetFiltersOnDisconnect=!1,e.zoomBtn=!1)}_adjustAlertStyles(){this.reportSubmittedMessage&&this._reportSubmittedAlertNode.value?.children[0]&&(this._reportSubmittedAlertNode.value.children[0].style.margin="0px"),this.commentSubmittedMessage&&this._commentSubmittedAlertNode.value?.children[0]&&(this._commentSubmittedAlertNode.value.children[0].style.margin="0px")}_toggleFilter(){this._filterOpen=!this._filterOpen}async _closeFilter(){this._filterOpen=!1,this._filterList!=null&&(this._currentLayerExpressions=await this._filterList.getCurrentLayerExpressions(),this._showFilterIcon=this._currentLayerExpressions?.length>0)}async sortOptionClick(e,t,i){this._updatedSorting={field:e,order:t},this._updatedSortOption=i,this._sortPopoverNode.value&&(this._sortPopoverNode.value.open=!1)}_toggleSort(){let e=this.reportingOptions&&this.reportingOptions[this._selectedLayerId]&&this.reportingOptions[this._selectedLayerId].like&&this.reportingOptions[this._selectedLayerId].likeField;return l`<calcite-popover auto-close label offset-distance=0 .placement=${this.isMobile?"leading-start":"bottom-start"} pointer-disabled reference-element=sort-popover ${o(this._sortPopoverNode)}><calcite-list label selection-mode=single-persist><calcite-list-item .label=${this._translations.sortNewest} @calciteListItemSelect=${()=>{this._selectedLayer&&this.sortOptionClick(this._selectedLayer.objectIdField,"desc","newest")}} .selected=${this._updatedSortOption==="newest"} value=newest></calcite-list-item><calcite-list-item .label=${this._translations.sortOldest} @calciteListItemSelect=${()=>{this._selectedLayer&&this.sortOptionClick(this._selectedLayer.objectIdField,"asc","oldest")}} .selected=${this._updatedSortOption==="oldest"} value=oldest></calcite-list-item>${e&&l`<calcite-list-item .label=${this._translations.sortHighestVoted} @calciteListItemSelect=${()=>{let t=this.reportingOptions&&this.reportingOptions[this._selectedLayerId].likeField;t!==void 0&&this.sortOptionClick(t,"desc","highestVoted")}} .selected=${this._updatedSortOption==="highestVoted"} value=highestVoted></calcite-list-item><calcite-list-item .label=${this._translations.sortLowestVoted} @calciteListItemSelect=${()=>{let t=this.reportingOptions&&this.reportingOptions[this._selectedLayerId].likeField;t&&this.sortOptionClick(t,"asc","lowestVoted")}} .selected=${this._updatedSortOption==="lowestVoted"} value=lowestVoted></calcite-list-item>`||""}</calcite-list></calcite-popover>`}async _handleFilterListReset(){this._filterActive=!1}async _handleFilterUpdate(e){this._showLoadingIndicator=!0,this._filterActive=e,this._featureList.value&&await this._featureList.value.refresh(),this._showLoadingIndicator=!1}getLayerListFlowItem(){return l`<calcite-flow-item .collapsed=${this.isMobile&&this._sidePanelCollapsed} .heading=${this.reportsHeader} .loading=${this._showLoadingIndicator} .selected=${this._flowItems[this._flowItems.length-1]==="layer-list"}>${this.isMobile&&this.getActionToExpandCollapsePanel()||""}${this._hasValidLayers&&this.enableNewReports&&l`<calcite-button appearance=solid @click=${this.navigateToChooseCategory} slot=footer width=full>${this.reportButtonText?this.reportButtonText:this._translations.createReportButtonText}</calcite-button>`||""}<calcite-panel><layer-list .applyLayerViewFilter=${this.showMyReportsOnly} class="height-full" .filterByMapExtent=${this.filterByMapExtent} .layers=${this._editableLayerIds?.length>0?this._editableLayerIds:this._layers} .mapView=${this.mapView} @layerSelect=${this.displayFeaturesList} @layersListLoaded=${this.layerListLoaded} show-feature-count show-next-icon ${o(this._layerList)}></layer-list></calcite-panel></calcite-flow-item>`}getChooseCategoryFlowItem(){let e=this.reportingOptions?Object.keys(this.reportingOptions).filter(t=>this.reportingOptions&&this.reportingOptions[t].visible&&this.reportingOptions[t].reporting&&this._layerItemsHash&&this._layerItemsHash[t]&&this._layerItemsHash[t].supportsAdd):[];return l`<calcite-flow-item .collapsed=${this.isMobile&&this._sidePanelCollapsed} .heading=${this.reportButtonText?this.reportButtonText:this._translations.createReportButtonText} @calciteFlowItemBack=${this.backFromSelectedPanel} .selected=${this._flowItems[this._flowItems.length-1]==="reporting-layer-list"}><calcite-panel><div class="progress-bar"><calcite-progress type=determinate .value=${this._updatedProgressBarStatus}></calcite-progress></div><calcite-notice class="notice-msg" icon=lightbulb kind=success open><div slot=message>${this._translations.chooseCategoryMsg}</div></calcite-notice><layer-list class="height-full" .layers=${e} .mapView=${this.mapView} @layerSelect=${this.navigateToCreateFeature}></layer-list></calcite-panel></calcite-flow-item>`}getFeatureCreateFlowItem(){return l`<calcite-flow-item .collapsed=${this.isMobile&&this._sidePanelCollapsed} .heading=${this._selectedLayerName} @calciteFlowItemBack=${this.backFromCreateFeaturePanel} .selected=${this._flowItems[this._flowItems.length-1]==="feature-create"}>${this._showSubmitCancelButton&&l`<div class=width-full slot=footer><calcite-button appearance=solid class="footer-top-button footer-button" .disabled=${this._submitNextButtonDisabled} @click=${this._showNextButton?this.onNextButtonClick.bind(this):this.onCreateFeatureSubmitButtonClick.bind(this)} width=full>${this._showNextButton?this._translations.next:this._translations.submit}</calcite-button><calcite-button appearance=outline class=footer-button @click=${this.backFromCreateFeaturePanel} width=full>${this._translations.cancel}</calcite-button></div>`||""}<calcite-panel><div class="progress-bar"><calcite-progress type=determinate .value=${this._updatedProgressBarStatus}></calcite-progress></div><create-feature app-name=reporter .aiImageExtraction=${this.aiImageExtraction} class="height-full overflow-auto" customize-submit enable-search .enablePhotoLocation=${this.enablePhotoLocation} .enableSnapping=${this.enableSnapping} .floorLevel=${this.floorLevel} .formElements=${this._formElements.find(e=>e.id===this._selectedLayerId)} .reportingAreaLayer=${this.reportingAreaLayer} .isMobile=${this.isMobile} .mapView=${this.mapView} @drawComplete=${this.onFormReady} @editingLocation=${this.editingLocation} @editingAttachment=${this.showSubmitCancelButton} @fail=${this.createFeatureFailed} @modeChanged=${this.backFromCreateFeaturePanel} @progressStatus=${this.updatedProgressStatus} @success=${this.onReportSubmitted} .searchConfiguration=${this.searchConfiguration} .selectedLayerId=${this._selectedLayerId} .reportingArea=${this.reportingArea} .reportingAreaMessage=${this.reportingAreaMessage} .submitNewReportsMessage=${this.submitNewReportsMessage} update-map-position ${o(this._createFeature)}></create-feature></calcite-panel></calcite-flow-item>`}updatedProgressStatus(e){this._updatedProgressBarStatus=e.detail}onFormReady(e){this._submitNextButtonDisabled=e.detail,this._showSubmitCancelButton=!0}editingLocation(){this._showNextButton=!0}showSubmitCancelButton(e){this._showSubmitCancelButton=!e.detail}onCreateFeatureSubmitButtonClick(){this._createFeature.value&&(this._showNextButton=!1,this._createFeature.value.submit())}backFromCreateFeaturePanel(){this._createFeature.value&&(this._showSubmitCancelButton=!1,this._showNextButton=!1,this.updateNonVisibleLayersOnMap(!1)),this.backFromSelectedPanel()}onNextButtonClick(){this._createFeature.value&&(this._showNextButton=!1,this._showSubmitCancelButton=!0,this._createFeature.value.showForm())}onCreateRelatedFeatureSubmitButtonClick(){this._createRelatedFeature.value&&this._createRelatedFeature.value.submit()}backFromCreateRelatedFeaturePanel(){this._createRelatedFeature.value&&(this._showSubmitCancelButton=!1),this.backFromSelectedPanel()}createFeatureFailed(e){console.error(e.detail),this._featureCreationFailedErrorMsg=e.detail.message}async onReportSubmitted(){this._showSubmitCancelButton=!1,this.updateNonVisibleLayersOnMap(!1),await this.navigateToHomePage(),this._reportSubmitted=!0,this._updatedProgressBarStatus=25,this._showFullPanel&&this.updatePanelState(this._sidePanelCollapsed,!1)}addCommentFailed(e){console.error(e.detail),this._addingCommentFailed=!0}async onCommentSubmitted(){this._commentSubmitted=!0,this.backFromCreateRelatedFeaturePanel(),this._showLoadingIndicator=!0,this._featureDetails.value&&await this._featureDetails.value.refresh(this._currentFeature),setTimeout(()=>{this._showLoadingIndicator=!1},300)}async navigateToHomePage(){await this.setSelectedFeatures([]),this._layerList.value&&await this._layerList.value.refresh(),this._editableLayerIds.length===1?(this._featureList.value&&await this._featureList.value.refresh(),this._flowItems=["feature-list"]):this._flowItems=["layer-list"]}async navigateToCreateFeature(e){e.detail.layerId&&e.detail.layerName&&await this.setSelectedLayer(e.detail.layerId,e.detail.layerName),this.updateNonVisibleLayersOnMap(!0),this._getFormElements(),this._showSubmitCancelButton=!1,this._showNextButton=!1,this.updatePanelState(!1,!0),this._flowItems=[...this._flowItems,"feature-create"]}navigateToChooseCategory(){this.updatePanelState(!1,!0),this._flowItems=[...this._flowItems,"reporting-layer-list"]}updateNonVisibleLayersOnMap(e){this._nonVisibleValidLayers.find(t=>t.id===this._selectedLayerId)&&this._selectedLayer&&this._selectedLayer.set("visible",e)}async layerListLoaded(e){if(this._layerList.value&&this._flowItems[this._flowItems.length-1]==="layer-list"||this._flowItems[0]==="feature-list"){let t=e.detail,i=this.mapView&&await _(this.mapView),s=[];if(this._validLayers=[],this._nonVisibleValidLayers=[],i?.forEach(a=>{t.includes(a.id)&&(this._validLayers.push(a),a.visible||this._nonVisibleValidLayers.push(a),this._getLayersConfig(a.id)?.reporting&&this._layerItemsHash&&this._layerItemsHash[a.id]&&this._layerItemsHash[a.id].supportsAdd&&s.push(a.id))}),this.handleMapClick(),this._hasValidLayers=s.length>0,!this._urlParamsLoaded&&this._editableLayerIds.length>1&&this.layerId&&this.objectId){let a=this.mapView&&await d(this.mapView,this.layerId);a&&await this.displayFeaturesList({detail:{layerId:a.id,layerName:a.title}}),this._urlParamsLoaded=!0,await this.loadFeatureFromURLParams()}}}async displayFeaturesList(e){this._showLoadingIndicator=!0,await this.setSelectedLayer(e.detail.layerId,e.detail.layerName),this.updateSortingOptions(),this.handleSelectedLayersFilter(),this._flowItems=[...this._flowItems,"feature-list"],this._prevSelectedLayerId=this._selectedLayerId,this._showLoadingIndicator=!1}updateSortingOptions(){let e=this.sortOption===""?"newest":this.sortOption,t=e==="oldest"||e==="lowestVoted"?"asc":"desc",i=this.reportingOptions?.[this._selectedLayerId]?.like?this.reportingOptions?.[this._selectedLayerId]?.likeField:"",s=this._selectedLayer&&(e==="newest"||e==="oldest")?this._selectedLayer?.objectIdField:i;this._updatedSorting={field:s||"",order:t},this._updatedSortOption=!i&&(e==="highestVoted"||e==="lowestVoted")?"newest":e}async backFromFilterPanel(){this._filterList!=null&&(this._currentLayerExpressions=await this._filterList.getCurrentLayerExpressions(),this._showFilterIcon=this._currentLayerExpressions?.length>0),this._featureList.value&&await this._featureList.value.refresh(),this.backFromSelectedPanel()}backFromSelectedPanel(){this._updatedProgressBarStatus=25;let e=[...this._flowItems];if(e[e.length-1]==="comment-details"||e[e.length-1]==="add-comment"||this.clearHighlights(),(e[e.length-1]==="reporting-layer-list"||e[e.length-1]==="feature-create"&&(e[0]==="feature-list"||e[e.length-2]==="feature-list"))&&this.updatePanelState(this._sidePanelCollapsed,!1),e.pop(),e.length===1&&e[0]==="layer-list"){this.navigateToHomePage();return}this._flowItems=[...e]}toggleSidePanel(){this._sidePanelCollapsed=!this._sidePanelCollapsed,this.togglePanel.emit({panelState:this._sidePanelCollapsed,isFormOpen:this._showFullPanel})}updatePanelState(e,t){this._sidePanelCollapsed=e,this._showFullPanel=t,this.togglePanel.emit({panelState:this._sidePanelCollapsed,isFormOpen:this._showFullPanel})}async onFeatureSelectFromList(e){await this.setSelectedFeatures([e.detail]),this._flowItems=[...this._flowItems,"feature-details"]}async getRelatedTable(){let e=this._currentFeature?.layer,t=this.mapView&&await f(this.mapView);e.relationships?.some(i=>{let s=t?.filter(a=>e.url===a.url&&a.layerId===i.relatedTableId);return s&&s.length>0?(this._relatedTable=s[0],!0):!1})}async updatingFeatureDetails(e){this._showLoadingIndicator=e}async selectionChanged(e){this.updatingFeatureDetails(!0),await this.setCurrentFeature(e.detail.selectedFeature[0]),this.highlightOnMap(e.detail.selectedFeature[0]),this._selectedFeatureIndex=e.detail.selectedFeatureIndex,this._featureDetails.value&&await this._featureDetails.value.refresh(e.detail.selectedFeature[0])}showAddCommentsPanel(){this._flowItems=[...this._flowItems,"add-comment"]}async onCommentSelectFromList(e){this._selectedRelatedFeature=[e.detail],this._flowItems=[...this._flowItems,"comment-details"]}getFeatureListFlowItem(e,t){let i=this._getLayersConfig(this._selectedLayerId)?.reporting&&this._layerItemsHash&&this._layerItemsHash[this._selectedLayerId].supportsAdd,s=this._showFilterIcon;return l`<calcite-flow-item .collapsed=${this.isMobile&&this._sidePanelCollapsed} .heading=${t} .loading=${!this.isMobile&&this._showLoadingIndicator} @calciteFlowItemBack=${this.backFromSelectedPanel} .selected=${this._flowItems[this._flowItems.length-1]==="feature-list"}>${this._toggleSort()}<calcite-action appearance=solid icon=sort-ascending-arrow id=sort-popover slot=header-actions-end .text=${this._translations.sort} title=${this._translations.sort??p}></calcite-action>${s&&l`<calcite-action appearance=solid icon=filter .indicator=${this._filterActive} @click=${()=>{this.isMobile?this._toggleFilter():this._flowItems=[...this._flowItems,"filter-panel"]}} slot=header-actions-end .text=${this._translations.filter} title=${this._translations.filter??p}></calcite-action>`||""}${this.isMobile&&this.getActionToExpandCollapsePanel()||""}${this.enableNewReports&&i&&l`<calcite-button appearance=solid @click=${this.navigateToCreateFeature} slot=footer width=full>${this.reportButtonText?this.reportButtonText:this._translations.createReportButtonText}</calcite-button>`||""}<calcite-panel>${l`<feature-list .applyLayerViewFilter=${this.showMyReportsOnly} class="height-full" .filterByMapExtent=${this.filterByMapExtent} highlight-on-hover .mapView=${this.mapView} .noFeaturesFoundMsg=${this._translations.featureErrorMsg} @featureClick=${()=>{this._showLoadingIndicator=!0}} @featureSelect=${this.onFeatureSelectFromList} page-size=30 .reportingOptions=${this.reportingOptions} .selectedLayerId=${e} .showFeatureSymbol=${this.showFeatureSymbol} .sortingInfo=${this._updatedSorting} ${o(this._featureList)}></feature-list>`}</calcite-panel></calcite-flow-item>`}getFilterPanel(){return l`<calcite-flow-item .collapsed=${this.isMobile&&this._sidePanelCollapsed} .heading=${this._translations.filterLayerTitle.replace("{{title}}",this._selectedLayerName)} .loading=${this._showLoadingIndicator} @calciteFlowItemBack=${this.backFromFilterPanel} .selected=${this._flowItems[this._flowItems.length-1]==="filter-panel"}>${this.isMobile&&this.getActionToExpandCollapsePanel()||""}<div class=width-full slot=footer><div class=width-full slot=footer><calcite-button appearance=solid class="footer-top-button footer-button" .disabled=${!this._filterActive} @click=${this.resetFilterList} width=full>${this._translations.resetFilter}</calcite-button><calcite-button appearance=outline class=footer-button @click=${this.backFromFilterPanel} width=full>${this._translations.close}</calcite-button></div></div><calcite-panel>${this.mapView&&l`<instant-apps-filter-list .closeBtnOnClick=${()=>{}} combobox-overlay-positioning=fixed .layerExpressions=${this._currentLayerExpressions} @filterListReset=${()=>{this._handleFilterListReset()}} @filterUpdate=${()=>{let e=this._filterList?.filterCount;e!==void 0&&this._handleFilterUpdate(e>0)}} .view=${this.mapView} ${o(this._setFilterList)}></instant-apps-filter-list>`||""}</calcite-panel></calcite-flow-item>`}getFeatureDetailsFlowItem(){let e=this._selectedLayer?.relationships,t=this._getLayersConfig(this._selectedLayerId)?.comment&&e&&e.length>0&&this._relatedTable;return l`<calcite-flow-item .collapsed=${this.isMobile&&this._sidePanelCollapsed} .heading=${this._selectedLayerName} .loading=${this._showLoadingIndicator} @calciteFlowItemBack=${this.backFromSelectedPanel} .selected=${this._flowItems[this._flowItems.length-1]==="feature-details"}>${this.isMobile&&this.getActionToExpandCollapsePanel()||""}${this.mapView&&l`<instant-apps-social-share class=share-node flip-rtl popover-button-icon-scale=s remove-popover-offset scale=m share-button-color=neutral share-button-type=action slot=header-actions-end social-media .view=${this.mapView} ${o(this._shareNode)}></instant-apps-social-share>`||""}${this._selectedFeature.length>1&&this.getFeaturesPagination()||""}<calcite-panel><feature-details class=full-height .enableSnapping=${this.enableSnapping} .graphics=${this._selectedFeature} .layerItemsHash=${this._layerItemsHash} .mapView=${this.mapView} @addComment=${this.showAddCommentsPanel} @commentClick=${()=>{this._showLoadingIndicator=!0}} @commentSelect=${this.onCommentSelectFromList} @featureSelectionChange=${this.selectionChanged} @likeOrDislikeClicked=${()=>{this._featureList.value&&this._featureList.value.refresh(!0)}} @loadingStatus=${i=>{this.updatingFeatureDetails(i.detail)}} .reportingOptions=${this.reportingOptions} .showFullCommentTitle=${this.showFullCommentTitle} .showUserImageInCommentsList=${this.showUserImageInCommentsList} ${o(this._featureDetails)}></feature-details>${t&&l`<calcite-button appearance=solid @click=${this.showAddCommentsPanel} slot=footer width=full>${this.commentButtonText||this._translations.comment}</calcite-button>`||""}</calcite-panel></calcite-flow-item>`}getFeaturesPagination(){return l`<div class="feature-pagination"><div><calcite-button appearance=transparent icon-start=chevron-left icon-flip-rtl=both id=solutions-back @click=${()=>this._featureDetails.value&&void this._featureDetails.value.back()} scale=s width=full></calcite-button><calcite-tooltip placement=top reference-element=solutions-back><span>${this._translations.back}</span></calcite-tooltip></div><calcite-button appearance=transparent @click=${()=>this._featureDetails.value&&void this._featureDetails.value.toggleListView()} scale=s><span class="pagination-count">${this._getCount()}</span></calcite-button><div><calcite-button appearance=transparent icon-flip-rtl=both icon-start=chevron-right id=solutions-next @click=${()=>this._featureDetails.value&&void this._featureDetails.value.next()} scale=s width=full></calcite-button><calcite-tooltip placement=top reference-element=solutions-next><span>${this._translations.next}</span></calcite-tooltip></div></div>`}getCommentDetailsFlowItem(){return l`<calcite-flow-item .collapsed=${this.isMobile&&this._sidePanelCollapsed} .heading=${this._relatedTable?.title||""} @calciteFlowItemBack=${this.backFromSelectedPanel} .selected=${this._flowItems[this._flowItems.length-1]==="comment-details"}>${this.isMobile&&this.getActionToExpandCollapsePanel()||""}<calcite-panel><info-card .enableSnapping=${this.enableSnapping} .graphics=${this._selectedRelatedFeature} .mapView=${this.mapView} @selectionChanged=${()=>{this._showLoadingIndicator=!1}}></info-card></calcite-panel></calcite-flow-item>`}getAddCommentFlowItem(){return l`<calcite-flow-item .collapsed=${this.isMobile&&this._sidePanelCollapsed} .heading=${this._relatedTable?.title||""} @calciteFlowItemBack=${this.backFromCreateRelatedFeaturePanel} .selected=${this._flowItems[this._flowItems.length-1]==="add-comment"}>${this.isMobile&&this.getActionToExpandCollapsePanel()||""}<div class=width-full slot=footer>${this._showSubmitCancelButton&&l`<div class=width-full slot=footer><calcite-button appearance=solid class="footer-top-button footer-button" @click=${this.onCreateRelatedFeatureSubmitButtonClick} width=full>${this._translations.submit}</calcite-button><calcite-button appearance=outline class=footer-button @click=${this.backFromCreateRelatedFeaturePanel} width=full>${this._translations.cancel}</calcite-button></div>`||""}</div><calcite-panel><create-related-feature customize-submit .enableSnapping=${this.enableSnapping} .mapView=${this.mapView} @fail=${this.addCommentFailed} @formReady=${this.onFormReady} @isActionPending=${this.showSubmitCancelButton} @success=${this.onCommentSubmitted} .selectedFeature=${this._currentFeature} .table=${this._relatedTable} ${o(this._createRelatedFeature)}></create-related-feature></calcite-panel></calcite-flow-item>`}async setSelectedFeatures(e){this._selectedFeature=e,await this.setCurrentFeature(this._selectedFeature.length?this._selectedFeature[0]:void 0)}async setCurrentFeature(e){if(this._currentFeature=e,e&&e.layer){let t=e.layer;t.title&&this.setSelectedLayer(t.id,t.title),this._currentFeatureId=e.attributes[t.objectIdField],this._getLayersConfig(t.id)?.comment&&t.relationships&&t.relationships.length>0&&await this.getRelatedTable()}else this._editableLayerIds.length>1&&(this.setSelectedLayer("",""),this.handlePrevLayersFilter()),this._currentFeatureId="";this._updateShareURL()}async highlightOnMap(e){if(this.clearHighlights(),e&&e.geometry&&e.layer&&e.layer.id!==void 0){let t=this.mapView&&await m(this.mapView,e.layer.id.toString());if(t){let i=Number(e.getObjectId());this._highlightHandle=this.mapView&&await x([i],t,this.mapView,!0,this.zoomToScale)}}this.updatingFeatureDetails(!1)}clearHighlights(){this._highlightHandle&&this._highlightHandle.remove()}getActionToExpandCollapsePanel(){return l`<calcite-action appearance=solid .icon=${this._sidePanelCollapsed?"chevrons-up":"chevrons-down"} @click=${this.toggleSidePanel} slot=header-actions-end .text=${(this._sidePanelCollapsed?this._translations.expand:this._translations.collapse)||""}></calcite-action>`}async setMapView(){this.mapView&&await f(this.mapView),await this.getLayersToShowInList(),await this._updateFeatures(),this._editableLayerIds?.length===1?await this.renderFeaturesList():this._flowItems=["layer-list"],this.mapView&&(this.mapView.popupEnabled=!1,this._defaultCenter&&this._defaultLevel&&(await this.mapView.goTo({center:this._defaultCenter,zoom:this._defaultLevel}),this._defaultCenter=void 0,this._defaultLevel=void 0))}handleMapClick(){this._mapClickHandle&&this._mapClickHandle.remove(),this._mapClickHandle=E.on(()=>this.mapView,"click",e=>{this.mapView&&(this.mapView.popupEnabled=!1),this.onMapClick(e)})}async onMapClick(e){if(!(this._flowItems[this._flowItems.length-1]==="feature-create"||this._flowItems[this._flowItems.length-1]==="add-comment")&&this.mapView){let t=await this.mapView.hitTest(e),i=[],s=[],a=[],n=!1;t.results.length>0&&t.results.forEach(r=>{r.type==="graphic"&&i.push(r.graphic)}),i.length>0&&(await this._setReportingGraphics(i),s=this._getNonReportingLayerGraphics(i)),this._mapImageryLayersId.length>0&&(a=await this._getIdentifiedGraphics(e.mapPoint),n=a.length>0);let h=s.concat(a);if(h.length>0){this.mapView.popupEnabled=!0;let r={features:h,location:e.mapPoint,updateLocationEnabled:!n};await this.mapView.openPopup(r)}}}async _setReportingGraphics(e){let t=e.filter(i=>{if(i.layer?.type==="feature"){let s=i.layer;return this._validLayers.includes(s)}else return!1});this._selectedLayer&&this._selectedFeature.length>0&&this._selectedLayer.id===t[0]?.layer?.id&&t[0].attributes[this._selectedLayer.objectIdField]===this._selectedFeature[0].attributes[this._selectedLayer.objectIdField]||t.length>0&&(await this.setSelectedFeatures(t),this._flowItems.length&&this._flowItems.includes("feature-details")?(this._flowItems=[...this._flowItems.slice(0,this._flowItems.indexOf("feature-details")+1)],await this.highlightOnMap(e[0])):this._flowItems=[...this._flowItems,"feature-details"])}_getNonReportingLayerGraphics(e){return e.filter(t=>{if(t.layer?.type==="feature"){let i=t.layer;return!this._validLayers.includes(i)&&i?.popupEnabled&&i?.id}else return!1})}async _getIdentifiedGraphics(e){let t=new O({geometry:e,tolerance:3,mapExtent:this.mapView?.extent}),i,s=[];for(let n of this._mapImageryLayersId){let h=this.mapView&&await d(this.mapView,n);if(h?.url&&t)try{let r=await k?.identify(h.url,t);if(r?.results?.length){s=r.results,i=h;break}}catch(r){console.error(r)}}let a=[];return s.forEach(n=>{let h=n.layerId,r=i?.sublayers?.items.find(P=>P.id===h),w=r?.popupTemplate;r?.popupEnabled&&w&&(n.feature.popupTemplate=w,a.push(n.feature))}),a}_getCount(){let e=(this._selectedFeatureIndex+1).toString(),t=this._selectedFeature.length.toString();return this._translations.indexOfTotal.replace("{{index}}",e).replace("{{total}}",t)}_updateFloorDefinitionExpression(e){let t=`${e?.floorInfo?.floorField} = '${this.floorLevel}'`,i=e.definitionExpression;e.definitionExpression=i&&i?.indexOf(this._floorExpression)>-1?i.replace(this._floorExpression,t):t,this._floorExpression=t}_getFormElements(){let e=this._selectedLayer;if(e?.floorInfo?.floorField&&this.floorLevel&&e?.formTemplate){let t=this._formElements.find(i=>i.id===e.id);(this._formElements.length===0||!t)&&this._formElements.push({id:e.id,orgElements:e.formTemplate.elements,orgExpressionInfos:e.formTemplate.expressionInfos})}}reduceToConfiguredLayers(e,t){return Object.keys(e).reduce((i,s)=>{let a=this.reportingOptions?this._getLayersConfig(s)?.visible:e[s].supportsAdd;return!t.includes(s)&&a&&i.push(s),i},[])}refreshLists(){setTimeout(()=>{this._layerList.value&&this._flowItems[this._flowItems.length-1]==="layer-list"&&this._layerList.value.refresh(),this._featureList.value&&this._featureList.value.refresh()},50)}async _updateFeatures(){for(let e of this._editableLayerIds){let t=this.mapView&&await m(this.mapView,e);t&&(await this._showMyFeaturesOnly(t),t.layer?.floorInfo?.floorField&&this.floorLevel&&this._updateFloorDefinitionExpression(t.layer))}}async _showMyFeaturesOnly(e){let t=(this.mapView?.map).portalItem.portal?.credential?.userId;if(t&&e){let i=e.layer.editFieldsInfo?.creatorField.toLowerCase();e.filter=this.showMyReportsOnly&&i?new V({where:`${i} = '${t}'`}):null}}async getLayersToShowInList(){let e=this.mapView&&await C(this.mapView,!1),t=this.mapView&&await _(this.mapView),i=[];t?.forEach(s=>{s?.type==="feature"&&s?.editingEnabled&&s?.capabilities?.operations?.supportsAdd&&(e[s.id].supportsAdd=!0),s?.editingEnabled||i.push(s.id)}),this._editableLayerIds=this.reduceToConfiguredLayers(e,i),this._layerItemsHash=e}async renderFeaturesList(){this._flowItems=["feature-list"];let e={detail:this._editableLayerIds};await this.layerListLoaded(e),await this.setSelectedLayer(this._validLayers[0].id,this._validLayers[0]?.title||""),this.updateSortingOptions(),await this.handleSelectedLayersFilter(),this._urlParamsLoaded||(this._urlParamsLoaded=!0,await this.loadFeatureFromURLParams())}_updateShareURL(){let e=this._shareNode.value?.shareUrl;if(!e)return;let t=new URL(e);this._selectedLayerId?t.searchParams.set("layerid",this._selectedLayerId):t.searchParams.delete("layerid"),this._selectedFeature?.length?t.searchParams.set("oid",this._currentFeatureId):t.searchParams.delete("oid"),this._shareNode.value&&(this._shareNode.value.autoUpdateShareUrl=!1,this._shareNode.value.shareUrl=t.href)}async loadFeatureFromURLParams(){if(this.center&&this.level&&await this.mapView?.goTo({center:this.center.split(";").map(Number),zoom:parseInt(this.level,10)}),this.layerId&&this.objectId){let e=this.mapView&&await d(this.mapView,this.layerId);if(e){let t=this.mapView&&await v([Number(this.objectId)],e,[],!0,this.mapView.spatialReference);t?.length&&(await this.setSelectedFeatures(t),this._flowItems.length&&this._flowItems[this._flowItems.length-1]!=="feature-details"?this._flowItems=[...this._flowItems,"feature-details"]:this._flowItems=[...this._flowItems])}}}async handleSelectedLayersFilter(){if(this._selectedLayer){let e=this.layerExpressions?structuredClone(this.layerExpressions.filter(t=>t.id===this._selectedLayerId)):[];this._t9nLayerExpressions!=null&&this.handleLayerExpressionsT9n(e,this._t9nLayerExpressions),this._currentLayerExpressions=e,this._showFilterIcon=this._currentLayerExpressions?.length>0,this.setActiveDefinitionExpressions()}}async handlePrevLayersFilter(){if(this._prevSelectedLayerId){let e=this.mapView&&await d(this.mapView,this._prevSelectedLayerId);e&&this._initDefExpressions&&(e.definitionExpression=this._initDefExpressions[this._prevSelectedLayerId])}}async resetFilterList(){await this._filterList?.forceReset(),this._selectedLayer!==void 0&&this._initDefExpressions&&(this._selectedLayer.definitionExpression=this._initDefExpressions[this._selectedLayerId],this._filterActive=!1)}setActiveDefinitionExpressions(){if(this._selectedLayer===void 0)return;let e=[];if(this._currentLayerExpressions&&this._currentLayerExpressions?.length>0){let t=this._currentLayerExpressions[0];for(let i of t.expressions){let{active:s,definitionExpression:a}=i;s&&a&&e.push(`(${a})`)}this._filterActive=e.length>0,this.updateFilterLayerDefExpression(e,t.operator)}}updateFilterLayerDefExpression(e,t){let i=this._initDefExpressions&&this._initDefExpressions[this._selectedLayerId],s=e?.length>0&&i?`(${e.join(t)}) AND (${i})`:e.length>0?e.join(t):i;this._selectedLayer&&(this._selectedLayer.definitionExpression=s)}setInitExpressions(){if(this._initDefExpressions={},this.mapView==null)return;let e=this.mapView.map;e.allLayers.concat(e.allTables.toArray()).forEach(t=>{if(t.type==="map-image"&&t.popupEnabled&&!this._mapImageryLayersId.includes(t.id)){this._mapImageryLayersId.push(t.id);return}if(t.type!=="feature")return;let i=t;this._initDefExpressions&&(this._initDefExpressions[i.id]=i.definitionExpression||"")})}handleLayerExpressionsT9n(e,t){e?.forEach(i=>{let s=t?.find(a=>a.id===i.id);s!=null&&(i.title=s.title,i.expressions?.forEach(a=>{let n=s.expressions?.find(h=>h.id===a.id);n!=null&&(a.name=n.name)}))})}};I("crowdsource-reporter",g);return g},"core/reactiveUtils","layers/support/FeatureFilter","rest/identify","rest/support/IdentifyParameters",a,d)
2
+ import{a as S}from"./7NSN2YE4.js";import"./AQKTTVWV.js";import d from"./KDIUYXBA.js";import a from"./UUYUTETH.js";import{a as $}from"./Y3XY5BXI.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import{b as I}from"./S7XOHDIW.js";import{F as c,G as o,H as F,J as u,h as y,i as l,l as p,r as b,u as L}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([E,V,k,O,{b:v},{a:C,c:m,d:d,e:_,f:f,g:x}])=>{var M=y`@layer{:host{display:block;--calcite-label-margin-bottom: 0px;--solutions-theme-foreground-color: var(--calcite-color-foreground-1)}.width-full{width:100%!important}.height-full{height:100%!important}.notice-msg{padding:10px;width:calc(100% - 20px)}.progress-bar{padding:12px}.footer-top-button{padding-bottom:7px}.footer-button{height:35px}.feature-pagination{background-color:var(--calcite-color-foreground-1)!important;border-block-end:1px solid var(--calcite-color-border-3);display:flex;justify-content:center;padding:5px 0}.pagination-count{color:var(--calcite-color-brand);border-bottom:1px solid var(--calcite-color-brand);font-weight:700}.report-submitted-msg{position:absolute;z-index:1000}.share-node{display:flex}.overflow-auto{overflow:auto}}`,g=class extends F{constructor(){super(),this.center="",this.commentButtonText="",this.commentSubmittedMessage="",this.defaultWebmap="",this.description="",this.enableAnonymousAccess=!1,this.enableAnonymousComments=!1,this.enableComments=!1,this.enableHome=!0,this.enableLogin=!1,this.enableNewReports=!1,this.enableSearch=!0,this.enableSnapping=!1,this.enableZoom=!0,this.isMobile=!1,this.layerExpressions=[],this.layerId="",this.level="",this.loginTitle="",this.mapInfos=[],this.objectId="",this.reportButtonText="",this.reportsHeader="",this.reportSubmittedMessage="",this.showComments=!1,this.showUserImageInCommentsList=!1,this.showFeatureSymbol=!1,this.showMyReportsOnly=!1,this.submitNewReportsMessage="",this.theme="light",this.floorLevel="",this.showFullCommentTitle=!0,this.filterByMapExtent=!1,this.sortOption="newest",this.reportingArea=!1,this.reportingAreaLayer="",this.reportingAreaMessage="",this.enablePhotoLocation=!1,this.aiImageExtraction=[],this._featureCreationFailedErrorMsg="",this._filterActive=!1,this._flowItems=[],this._hasValidLayers=!1,this._reportSubmitted=!1,this._selectedLayerName="",this._showSubmitCancelButton=!1,this._showLoadingIndicator=!1,this._sidePanelCollapsed=!1,this._translations=$({name:"crowdsource-reporter",blocking:!0}),this._updatedProgressBarStatus=25,this._updatedSortOption="newest",this._commentSubmitted=!1,this._addingCommentFailed=!1,this._filterOpen=!1,this._showNextButton=!1,this._submitNextButtonDisabled=!1,this._showFilterIcon=!1,this._createFeature=c(),this._currentFeatureId="",this._editableLayerIds=[],this._featureDetails=c(),this._featureList=c(),this._selectedRelatedFeature=[],this._layerList=c(),this._createRelatedFeature=c(),this._layers=[],this._mapImageryLayersId=[],this._selectedFeature=[],this._selectedFeatureIndex=0,this._selectedLayerId="",this._shareNode=c(),this._urlParamsLoaded=!1,this._validLayers=[],this._nonVisibleValidLayers=[],this._showFullPanel=!1,this._floorExpression="",this._formElements=[],this._prevSelectedLayerId="",this._t9nLayerExpressions=[],this._reportSubmittedAlertNode=c(),this._commentSubmittedAlertNode=c(),this._sortPopoverNode=c(),this.togglePanel=b(),S(window)}static{this.properties={center:1,commentButtonText:1,commentSubmittedMessage:1,defaultWebmap:1,description:1,enableAnonymousAccess:5,enableAnonymousComments:5,enableComments:5,enableHome:5,enableLogin:5,enableNewReports:5,enableSearch:5,enableSnapping:5,enableZoom:5,isMobile:5,layerExpressions:0,layerId:1,level:1,loginTitle:1,mapInfos:0,mapView:0,objectId:1,reportButtonText:1,reportingOptions:0,reportsHeader:1,reportSubmittedMessage:1,searchConfiguration:0,showComments:5,showUserImageInCommentsList:5,showFeatureSymbol:5,showMyReportsOnly:5,submitNewReportsMessage:1,theme:1,zoomToScale:9,floorLevel:1,showFullCommentTitle:5,filterByMapExtent:5,sortOption:1,reportingArea:5,reportingAreaLayer:1,reportingAreaMessage:1,enablePhotoLocation:5,aiImageExtraction:0,_featureCreationFailedErrorMsg:16,_filterActive:16,_flowItems:16,_hasValidLayers:16,_mapInfo:16,_reportSubmitted:16,_selectedLayerName:16,_showSubmitCancelButton:16,_showLoadingIndicator:16,_sidePanelCollapsed:16,_translations:16,_updatedProgressBarStatus:16,_updatedSorting:16,_updatedSortOption:16,_commentSubmitted:16,_addingCommentFailed:16,_filterOpen:16,_showNextButton:16,_submitNextButtonDisabled:16,_showFilterIcon:16}}static{this.styles=M}static{this.shadowRootOptions=L}willUpdate(e){e.has("isMobile")&&this.isMobileWatchHandler(this.isMobile),e.has("mapView")&&this.hasUpdated&&this.mapViewWatchHandler(),e.has("floorLevel")&&this.floorLevelWatchHandler(),(e.has("reportingAreaLayer")||e.has("reportingArea")&&this.hasUpdated)&&setTimeout(()=>{this._createFeature.value&&this._createFeature.value.refresh(this.floorLevel)},50),e.has("showMyReportsOnly")&&(this.hasUpdated||this.showMyReportsOnly!==!1)&&this.showMyReportsOnlyWatchHandler(),e.has("sortOption")&&(this.hasUpdated||this.sortOption!=="newest")&&this.sortOptionWatchHandler(),e.has("filterByMapExtent")&&(this.hasUpdated||this.filterByMapExtent!==!1)&&this.filterByMapExtentChangeWatchHandler(),e.has("layerExpressions")&&(this.hasUpdated||this.layerExpressions?.length>0)&&this.layerExpressionsWatchHandler(),e.has("showFeatureSymbol")&&(this.hasUpdated||this.showFeatureSymbol!==!1)&&this.showFeatureSymbolWatchHandler(),(this._flowItems.includes("filter-panel")||this._filterOpen)&&this._filterList?.updateInitDefExpressions({initDefExpressions:this._initDefExpressions})}async isMobileWatchHandler(e){this.updatePanelState(!1,this._showFullPanel),e&&this._flowItems[this._flowItems.length-1]==="filter-panel"?(await this.backFromFilterPanel(),this._filterOpen=!0):!e&&this._filterOpen&&(await this._closeFilter(),this._flowItems=[...this._flowItems,"filter-panel"])}async mapViewWatchHandler(){await this.mapView?.when(async()=>{this.setInitExpressions(),await this.setMapView()})}async floorLevelWatchHandler(){if(this._editableLayerIds)for(let e of this._editableLayerIds){let t=this.mapView&&await d(this.mapView,e);t&&t.floorInfo?.floorField&&this._updateFloorDefinitionExpression(t)}this._flowItems[this._flowItems.length-1]==="layer-list"&&this._layerList.value&&await this._layerList.value.refresh(),this._featureList.value&&this._featureList.value.refresh(),this._createFeature.value&&this._createFeature.value.refresh(this.floorLevel)}async showMyReportsOnlyWatchHandler(){this._editableLayerIds&&(await this._updateFeatures(),this.refreshLists())}async sortOptionWatchHandler(){this.updateSortingOptions()}filterByMapExtentChangeWatchHandler(){this.refreshLists()}async layerExpressionsWatchHandler(){await this.resetFilterList(),await this.handleSelectedLayersFilter(),await this._featureList.value?.refresh()}async showFeatureSymbolWatchHandler(){await this._featureList.value?.refresh()}async updateLayerExpressionsT9n(e){if(this._t9nLayerExpressions=e||this.layerExpressions,this._filterList!=null)await this._filterList.handleUpdatingT9nData(this._t9nLayerExpressions);else if(this._currentLayerExpressions!=null){let t=structuredClone(this._currentLayerExpressions);this.handleLayerExpressionsT9n(t,this._t9nLayerExpressions),this._currentLayerExpressions=t,this._showFilterIcon=this._currentLayerExpressions?.length>0}return Promise.resolve()}async load(){this._urlParamsLoaded=!1,await this.mapView?.when(async()=>{this._layers=this.reportingOptions?Object.keys(this.reportingOptions).filter(e=>{let t=e&&this.reportingOptions&&this.reportingOptions[e];return t&&t.visible}):[],this.setInitExpressions(),await this.setMapView()})}render(){let e=this.theme==="dark"?"calcite-mode-dark":"calcite-mode-light";return l`${this._reportSubmitted&&l`<calcite-alert auto-close class=${`${e} report-submitted-msg`} icon=check-circle kind=success label @calciteAlertClose=${()=>{this._reportSubmitted=!1}} open placement=top><div slot=message .innerHTML=${(this.reportSubmittedMessage||this._translations.submitMsg)??""} ${o(this._reportSubmittedAlertNode)}></div></calcite-alert>`||""}${this._featureCreationFailedErrorMsg&&l`<calcite-alert auto-close class=${u(e)} icon=x-octagon kind=danger label @calciteAlertClose=${()=>{this._featureCreationFailedErrorMsg=""}} open placement=top><div slot=title>${this._translations.error}</div><div slot=message>${this._featureCreationFailedErrorMsg}</div></calcite-alert>`||""}${this._commentSubmitted&&l`<calcite-alert auto-close class=${`report-submitted ${e}`} icon=check-circle kind=success label @calciteAlertClose=${()=>{this._commentSubmitted=!1}} open placement=top><div slot=message .innerHTML=${(this.commentSubmittedMessage||this._translations.commentSubmittedMsg)??""} ${o(this._commentSubmittedAlertNode)}></div></calcite-alert>`||""}${this._addingCommentFailed&&l`<calcite-alert auto-close class=${u(e)} icon=x-octagon kind=danger label @calciteAlertClose=${()=>{this._addingCommentFailed=!1}} open placement=top><div slot=title>${this._translations.error}</div><div slot=message>${this._translations.addingCommentFailedMsg}</div></calcite-alert>`||""}<div><calcite-shell content-behind>${this._getReporter()}</calcite-shell></div>${this.isMobile&&this.filterModal()||""}`}updated(){this._adjustAlertStyles()}async setSelectedLayer(e,t){this._selectedLayerId=e,this._selectedLayer=this.mapView&&await d(this.mapView,e),this._selectedLayerName=t,this._validLayers.forEach(i=>{this._nonVisibleValidLayers.find(s=>s.id===i.id)||i.set("visible",!e||i.id===e)})}_getLayersConfig(e){return this.reportingOptions&&this.reportingOptions[e]?this.reportingOptions[e]:null}_getReporter(){let e=[];this._flowItems.forEach(i=>{switch(i){case"layer-list":e.push(this.getLayerListFlowItem());break;case"feature-list":e.push(this.getFeatureListFlowItem(this._selectedLayerId,this._selectedLayerName));break;case"filter-panel":e.push(this.getFilterPanel());break;case"feature-details":e.push(this.getFeatureDetailsFlowItem());break;case"reporting-layer-list":e.push(this.getChooseCategoryFlowItem());break;case"feature-create":e.push(this.getFeatureCreateFlowItem());break;case"comment-details":e.push(this.getCommentDetailsFlowItem());break;case"add-comment":e.push(this.getAddCommentFlowItem());break}});let t=this.theme==="dark"?"calcite-mode-dark":"calcite-mode-light";return l`<calcite-panel class=${`width-full ${t}`}>${this.mapView?l`<calcite-flow>${e?.length>0&&e||""}</calcite-flow>`:l`<calcite-loader label scale=m></calcite-loader>`}</calcite-panel>`}filterModal(){return(this.layerExpressions?this.layerExpressions.filter(e=>e.id===this._selectedLayerId):[]).length>0&&l`<calcite-dialog aria-labelledby=modal-title class="modal" .heading=${this._translations.filterLayerTitle.replace("{{title}}",this._selectedLayerName)} kind=brand @calciteDialogClose=${()=>{this._closeFilter()}} .open=${this._filterOpen} width=s><div>${this.mapView&&l`<instant-apps-filter-list close-btn .closeBtnOnClick=${()=>{this._closeFilter()}} combobox-overlay-positioning=fixed .layerExpressions=${this._currentLayerExpressions} @filterListReset=${()=>{this._filterActive=!1,this._featureList.value&&this._featureList.value.refresh()}} @filterUpdate=${()=>{this._filterList?.filterCount!==void 0&&this._handleFilterUpdate(this._filterList?.filterCount>0)}} .view=${this.mapView} ${o(this._setFilterList)}></instant-apps-filter-list>`||""}</div></calcite-dialog>`||""}_setFilterList(e){this._filterList=e,e&&(e.autoUpdateUrl=!1,e.resetBtn=this.isMobile,e.resetFiltersOnDisconnect=!1,e.zoomBtn=!1)}_adjustAlertStyles(){this.reportSubmittedMessage&&this._reportSubmittedAlertNode.value?.children[0]&&(this._reportSubmittedAlertNode.value.children[0].style.margin="0px"),this.commentSubmittedMessage&&this._commentSubmittedAlertNode.value?.children[0]&&(this._commentSubmittedAlertNode.value.children[0].style.margin="0px")}_toggleFilter(){this._filterOpen=!this._filterOpen}async _closeFilter(){this._filterOpen=!1,this._filterList!=null&&(this._currentLayerExpressions=await this._filterList.getCurrentLayerExpressions(),this._showFilterIcon=this._currentLayerExpressions?.length>0)}async sortOptionClick(e,t,i){this._updatedSorting={field:e,order:t},this._updatedSortOption=i,this._sortPopoverNode.value&&(this._sortPopoverNode.value.open=!1)}_toggleSort(){let e=this.reportingOptions&&this.reportingOptions[this._selectedLayerId]&&this.reportingOptions[this._selectedLayerId].like&&this.reportingOptions[this._selectedLayerId].likeField;return l`<calcite-popover auto-close label offset-distance=0 .placement=${this.isMobile?"leading-start":"bottom-start"} pointer-disabled reference-element=sort-popover ${o(this._sortPopoverNode)}><calcite-list label selection-mode=single-persist><calcite-list-item .label=${this._translations.sortNewest} @calciteListItemSelect=${()=>{this._selectedLayer&&this.sortOptionClick(this._selectedLayer.objectIdField,"desc","newest")}} .selected=${this._updatedSortOption==="newest"} value=newest></calcite-list-item><calcite-list-item .label=${this._translations.sortOldest} @calciteListItemSelect=${()=>{this._selectedLayer&&this.sortOptionClick(this._selectedLayer.objectIdField,"asc","oldest")}} .selected=${this._updatedSortOption==="oldest"} value=oldest></calcite-list-item>${e&&l`<calcite-list-item .label=${this._translations.sortHighestVoted} @calciteListItemSelect=${()=>{let t=this.reportingOptions&&this.reportingOptions[this._selectedLayerId].likeField;t!==void 0&&this.sortOptionClick(t,"desc","highestVoted")}} .selected=${this._updatedSortOption==="highestVoted"} value=highestVoted></calcite-list-item><calcite-list-item .label=${this._translations.sortLowestVoted} @calciteListItemSelect=${()=>{let t=this.reportingOptions&&this.reportingOptions[this._selectedLayerId].likeField;t&&this.sortOptionClick(t,"asc","lowestVoted")}} .selected=${this._updatedSortOption==="lowestVoted"} value=lowestVoted></calcite-list-item>`||""}</calcite-list></calcite-popover>`}async _handleFilterListReset(){this._filterActive=!1}async _handleFilterUpdate(e){this._showLoadingIndicator=!0,this._filterActive=e,this._featureList.value&&await this._featureList.value.refresh(),this._showLoadingIndicator=!1}getLayerListFlowItem(){return l`<calcite-flow-item .collapsed=${this.isMobile&&this._sidePanelCollapsed} .heading=${this.reportsHeader} .loading=${this._showLoadingIndicator} .selected=${this._flowItems[this._flowItems.length-1]==="layer-list"}>${this.isMobile&&this.getActionToExpandCollapsePanel()||""}${this._hasValidLayers&&this.enableNewReports&&l`<calcite-button appearance=solid @click=${this.navigateToChooseCategory} slot=footer width=full>${this.reportButtonText?this.reportButtonText:this._translations.createReportButtonText}</calcite-button>`||""}<calcite-panel><layer-list .applyLayerViewFilter=${this.showMyReportsOnly} class="height-full" .filterByMapExtent=${this.filterByMapExtent} .layers=${this._editableLayerIds?.length>0?this._editableLayerIds:this._layers} .mapView=${this.mapView} @layerSelect=${this.displayFeaturesList} @layersListLoaded=${this.layerListLoaded} show-feature-count show-next-icon ${o(this._layerList)}></layer-list></calcite-panel></calcite-flow-item>`}getChooseCategoryFlowItem(){let e=this.reportingOptions?Object.keys(this.reportingOptions).filter(t=>this.reportingOptions&&this.reportingOptions[t].visible&&this.reportingOptions[t].reporting&&this._layerItemsHash&&this._layerItemsHash[t]&&this._layerItemsHash[t].supportsAdd):[];return l`<calcite-flow-item .collapsed=${this.isMobile&&this._sidePanelCollapsed} .heading=${this.reportButtonText?this.reportButtonText:this._translations.createReportButtonText} @calciteFlowItemBack=${this.backFromSelectedPanel} .selected=${this._flowItems[this._flowItems.length-1]==="reporting-layer-list"}><calcite-panel><div class="progress-bar"><calcite-progress type=determinate .value=${this._updatedProgressBarStatus}></calcite-progress></div><calcite-notice class="notice-msg" icon=lightbulb kind=success open><div slot=message>${this._translations.chooseCategoryMsg}</div></calcite-notice><layer-list class="height-full" .layers=${e} .mapView=${this.mapView} @layerSelect=${this.navigateToCreateFeature}></layer-list></calcite-panel></calcite-flow-item>`}getFeatureCreateFlowItem(){return l`<calcite-flow-item .collapsed=${this.isMobile&&this._sidePanelCollapsed} .heading=${this._selectedLayerName} @calciteFlowItemBack=${this.backFromCreateFeaturePanel} .selected=${this._flowItems[this._flowItems.length-1]==="feature-create"}>${this._showSubmitCancelButton&&l`<div class=width-full slot=footer><calcite-button appearance=solid class="footer-top-button footer-button" .disabled=${this._submitNextButtonDisabled} @click=${this._showNextButton?this.onNextButtonClick.bind(this):this.onCreateFeatureSubmitButtonClick.bind(this)} width=full>${this._showNextButton?this._translations.next:this._translations.submit}</calcite-button><calcite-button appearance=outline class=footer-button @click=${this.backFromCreateFeaturePanel} width=full>${this._translations.cancel}</calcite-button></div>`||""}<calcite-panel><div class="progress-bar"><calcite-progress type=determinate .value=${this._updatedProgressBarStatus}></calcite-progress></div><create-feature app-name=reporter .aiImageExtraction=${this.aiImageExtraction} class="height-full overflow-auto" customize-submit enable-search .enablePhotoLocation=${this.enablePhotoLocation} .enableSnapping=${this.enableSnapping} .floorLevel=${this.floorLevel} .formElements=${this._formElements.find(e=>e.id===this._selectedLayerId)} .reportingAreaLayer=${this.reportingAreaLayer} .isMobile=${this.isMobile} .mapView=${this.mapView} @drawComplete=${this.onFormReady} @editingLocation=${this.editingLocation} @editingAttachment=${this.showSubmitCancelButton} @fail=${this.createFeatureFailed} @modeChanged=${this.backFromCreateFeaturePanel} @progressStatus=${this.updatedProgressStatus} @success=${this.onReportSubmitted} .searchConfiguration=${this.searchConfiguration} .selectedLayerId=${this._selectedLayerId} .reportingArea=${this.reportingArea} .reportingAreaMessage=${this.reportingAreaMessage} .submitNewReportsMessage=${this.submitNewReportsMessage} update-map-position ${o(this._createFeature)}></create-feature></calcite-panel></calcite-flow-item>`}updatedProgressStatus(e){this._updatedProgressBarStatus=e.detail}onFormReady(e){this._submitNextButtonDisabled=e.detail,this._showSubmitCancelButton=!0}editingLocation(){this._showNextButton=!0}showSubmitCancelButton(e){this._showSubmitCancelButton=!e.detail}onCreateFeatureSubmitButtonClick(){this._createFeature.value&&(this._showNextButton=!1,this._createFeature.value.submit())}backFromCreateFeaturePanel(){this._createFeature.value&&(this._showSubmitCancelButton=!1,this._showNextButton=!1,this.updateNonVisibleLayersOnMap(!1)),this.backFromSelectedPanel()}onNextButtonClick(){this._createFeature.value&&(this._showNextButton=!1,this._showSubmitCancelButton=!0,this._createFeature.value.showForm())}onCreateRelatedFeatureSubmitButtonClick(){this._createRelatedFeature.value&&this._createRelatedFeature.value.submit()}backFromCreateRelatedFeaturePanel(){this._createRelatedFeature.value&&(this._showSubmitCancelButton=!1),this.backFromSelectedPanel()}createFeatureFailed(e){console.error(e.detail),this._featureCreationFailedErrorMsg=e.detail.message}async onReportSubmitted(){this._showSubmitCancelButton=!1,this.updateNonVisibleLayersOnMap(!1),await this.navigateToHomePage(),this._reportSubmitted=!0,this._updatedProgressBarStatus=25,this._showFullPanel&&this.updatePanelState(this._sidePanelCollapsed,!1)}addCommentFailed(e){console.error(e.detail),this._addingCommentFailed=!0}async onCommentSubmitted(){this._commentSubmitted=!0,this.backFromCreateRelatedFeaturePanel(),this._showLoadingIndicator=!0,this._featureDetails.value&&await this._featureDetails.value.refresh(this._currentFeature),setTimeout(()=>{this._showLoadingIndicator=!1},300)}async navigateToHomePage(){await this.setSelectedFeatures([]),this._layerList.value&&await this._layerList.value.refresh(),this._editableLayerIds.length===1?(this._featureList.value&&await this._featureList.value.refresh(),this._flowItems=["feature-list"]):this._flowItems=["layer-list"]}async navigateToCreateFeature(e){e.detail.layerId&&e.detail.layerName&&await this.setSelectedLayer(e.detail.layerId,e.detail.layerName),this.updateNonVisibleLayersOnMap(!0),this._getFormElements(),this._showSubmitCancelButton=!1,this._showNextButton=!1,this.updatePanelState(!1,!0),this._flowItems=[...this._flowItems,"feature-create"]}navigateToChooseCategory(){this.updatePanelState(!1,!0),this._flowItems=[...this._flowItems,"reporting-layer-list"]}updateNonVisibleLayersOnMap(e){this._nonVisibleValidLayers.find(t=>t.id===this._selectedLayerId)&&this._selectedLayer&&this._selectedLayer.set("visible",e)}async layerListLoaded(e){if(this._layerList.value&&this._flowItems[this._flowItems.length-1]==="layer-list"||this._flowItems[0]==="feature-list"){let t=e.detail,i=this.mapView&&await _(this.mapView),s=[];if(this._validLayers=[],this._nonVisibleValidLayers=[],i?.forEach(a=>{t.includes(a.id)&&(this._validLayers.push(a),a.visible||this._nonVisibleValidLayers.push(a),this._getLayersConfig(a.id)?.reporting&&this._layerItemsHash&&this._layerItemsHash[a.id]&&this._layerItemsHash[a.id].supportsAdd&&s.push(a.id))}),this.handleMapClick(),this._hasValidLayers=s.length>0,!this._urlParamsLoaded&&this._editableLayerIds.length>1&&this.layerId&&this.objectId){let a=this.mapView&&await d(this.mapView,this.layerId);a&&await this.displayFeaturesList({detail:{layerId:a.id,layerName:a.title}}),this._urlParamsLoaded=!0,await this.loadFeatureFromURLParams()}}}async displayFeaturesList(e){this._showLoadingIndicator=!0,await this.setSelectedLayer(e.detail.layerId,e.detail.layerName),this.updateSortingOptions(),this.handleSelectedLayersFilter(),this._flowItems=[...this._flowItems,"feature-list"],this._prevSelectedLayerId=this._selectedLayerId,this._showLoadingIndicator=!1}updateSortingOptions(){let e=this.sortOption===""?"newest":this.sortOption,t=e==="oldest"||e==="lowestVoted"?"asc":"desc",i=this.reportingOptions?.[this._selectedLayerId]?.like?this.reportingOptions?.[this._selectedLayerId]?.likeField:"",s=this._selectedLayer&&(e==="newest"||e==="oldest")?this._selectedLayer?.objectIdField:i;this._updatedSorting={field:s||"",order:t},this._updatedSortOption=!i&&(e==="highestVoted"||e==="lowestVoted")?"newest":e}async backFromFilterPanel(){this._filterList!=null&&(this._currentLayerExpressions=await this._filterList.getCurrentLayerExpressions(),this._showFilterIcon=this._currentLayerExpressions?.length>0),this._featureList.value&&await this._featureList.value.refresh(),this.backFromSelectedPanel()}backFromSelectedPanel(){this._updatedProgressBarStatus=25;let e=[...this._flowItems];if(e[e.length-1]==="comment-details"||e[e.length-1]==="add-comment"||this.clearHighlights(),(e[e.length-1]==="reporting-layer-list"||e[e.length-1]==="feature-create"&&(e[0]==="feature-list"||e[e.length-2]==="feature-list"))&&this.updatePanelState(this._sidePanelCollapsed,!1),e.pop(),e.length===1&&e[0]==="layer-list"){this.navigateToHomePage();return}this._flowItems=[...e]}toggleSidePanel(){this._sidePanelCollapsed=!this._sidePanelCollapsed,this.togglePanel.emit({panelState:this._sidePanelCollapsed,isFormOpen:this._showFullPanel})}updatePanelState(e,t){this._sidePanelCollapsed=e,this._showFullPanel=t,this.togglePanel.emit({panelState:this._sidePanelCollapsed,isFormOpen:this._showFullPanel})}async onFeatureSelectFromList(e){await this.setSelectedFeatures([e.detail]),this._flowItems=[...this._flowItems,"feature-details"]}async getRelatedTable(){let e=this._currentFeature?.layer,t=this.mapView&&await f(this.mapView);e.relationships?.some(i=>{let s=t?.filter(a=>e.url===a.url&&a.layerId===i.relatedTableId);return s&&s.length>0?(this._relatedTable=s[0],!0):!1})}async updatingFeatureDetails(e){this._showLoadingIndicator=e}async selectionChanged(e){this.updatingFeatureDetails(!0),await this.setCurrentFeature(e.detail.selectedFeature[0]),this.highlightOnMap(e.detail.selectedFeature[0]),this._selectedFeatureIndex=e.detail.selectedFeatureIndex,this._featureDetails.value&&await this._featureDetails.value.refresh(e.detail.selectedFeature[0])}showAddCommentsPanel(){this._flowItems=[...this._flowItems,"add-comment"]}async onCommentSelectFromList(e){this._selectedRelatedFeature=[e.detail],this._flowItems=[...this._flowItems,"comment-details"]}getFeatureListFlowItem(e,t){let i=this._getLayersConfig(this._selectedLayerId)?.reporting&&this._layerItemsHash&&this._layerItemsHash[this._selectedLayerId].supportsAdd,s=this._showFilterIcon;return l`<calcite-flow-item .collapsed=${this.isMobile&&this._sidePanelCollapsed} .heading=${t} .loading=${!this.isMobile&&this._showLoadingIndicator} @calciteFlowItemBack=${this.backFromSelectedPanel} .selected=${this._flowItems[this._flowItems.length-1]==="feature-list"}>${this._toggleSort()}<calcite-action appearance=solid icon=sort-ascending-arrow id=sort-popover slot=header-actions-end .text=${this._translations.sort} title=${this._translations.sort??p}></calcite-action>${s&&l`<calcite-action appearance=solid icon=filter .indicator=${this._filterActive} @click=${()=>{this.isMobile?this._toggleFilter():this._flowItems=[...this._flowItems,"filter-panel"]}} slot=header-actions-end .text=${this._translations.filter} title=${this._translations.filter??p}></calcite-action>`||""}${this.isMobile&&this.getActionToExpandCollapsePanel()||""}${this.enableNewReports&&i&&l`<calcite-button appearance=solid @click=${this.navigateToCreateFeature} slot=footer width=full>${this.reportButtonText?this.reportButtonText:this._translations.createReportButtonText}</calcite-button>`||""}<calcite-panel>${l`<feature-list .applyLayerViewFilter=${this.showMyReportsOnly} class="height-full" .filterByMapExtent=${this.filterByMapExtent} highlight-on-hover .mapView=${this.mapView} .noFeaturesFoundMsg=${this._translations.featureErrorMsg} @featureClick=${()=>{this._showLoadingIndicator=!0}} @featureSelect=${this.onFeatureSelectFromList} page-size=30 .reportingOptions=${this.reportingOptions} .selectedLayerId=${e} .showFeatureSymbol=${this.showFeatureSymbol} .sortingInfo=${this._updatedSorting} ${o(this._featureList)}></feature-list>`}</calcite-panel></calcite-flow-item>`}getFilterPanel(){return l`<calcite-flow-item .collapsed=${this.isMobile&&this._sidePanelCollapsed} .heading=${this._translations.filterLayerTitle.replace("{{title}}",this._selectedLayerName)} .loading=${this._showLoadingIndicator} @calciteFlowItemBack=${this.backFromFilterPanel} .selected=${this._flowItems[this._flowItems.length-1]==="filter-panel"}>${this.isMobile&&this.getActionToExpandCollapsePanel()||""}<div class=width-full slot=footer><div class=width-full slot=footer><calcite-button appearance=solid class="footer-top-button footer-button" .disabled=${!this._filterActive} @click=${this.resetFilterList} width=full>${this._translations.resetFilter}</calcite-button><calcite-button appearance=outline class=footer-button @click=${this.backFromFilterPanel} width=full>${this._translations.close}</calcite-button></div></div><calcite-panel>${this.mapView&&l`<instant-apps-filter-list .closeBtnOnClick=${()=>{}} combobox-overlay-positioning=fixed .layerExpressions=${this._currentLayerExpressions} @filterListReset=${()=>{this._handleFilterListReset()}} @filterUpdate=${()=>{let e=this._filterList?.filterCount;e!==void 0&&this._handleFilterUpdate(e>0)}} .view=${this.mapView} ${o(this._setFilterList)}></instant-apps-filter-list>`||""}</calcite-panel></calcite-flow-item>`}getFeatureDetailsFlowItem(){let e=this._selectedLayer?.relationships,t=this._getLayersConfig(this._selectedLayerId)?.comment&&e&&e.length>0&&this._relatedTable;return l`<calcite-flow-item .collapsed=${this.isMobile&&this._sidePanelCollapsed} .heading=${this._selectedLayerName} .loading=${this._showLoadingIndicator} @calciteFlowItemBack=${this.backFromSelectedPanel} .selected=${this._flowItems[this._flowItems.length-1]==="feature-details"}>${this.isMobile&&this.getActionToExpandCollapsePanel()||""}${this.mapView&&l`<instant-apps-social-share class=share-node flip-rtl popover-button-icon-scale=s remove-popover-offset scale=m share-button-color=neutral share-button-type=action slot=header-actions-end social-media .view=${this.mapView} ${o(this._shareNode)}></instant-apps-social-share>`||""}${this._selectedFeature.length>1&&this.getFeaturesPagination()||""}<calcite-panel><feature-details class=full-height .enableSnapping=${this.enableSnapping} .graphics=${this._selectedFeature} .layerItemsHash=${this._layerItemsHash} .mapView=${this.mapView} @addComment=${this.showAddCommentsPanel} @commentClick=${()=>{this._showLoadingIndicator=!0}} @commentSelect=${this.onCommentSelectFromList} @featureSelectionChange=${this.selectionChanged} @likeOrDislikeClicked=${()=>{this._featureList.value&&this._featureList.value.refresh(!0)}} @loadingStatus=${i=>{this.updatingFeatureDetails(i.detail)}} .reportingOptions=${this.reportingOptions} .showFullCommentTitle=${this.showFullCommentTitle} .showUserImageInCommentsList=${this.showUserImageInCommentsList} ${o(this._featureDetails)}></feature-details>${t&&l`<calcite-button appearance=solid @click=${this.showAddCommentsPanel} slot=footer width=full>${this.commentButtonText||this._translations.comment}</calcite-button>`||""}</calcite-panel></calcite-flow-item>`}getFeaturesPagination(){return l`<div class="feature-pagination"><div><calcite-button appearance=transparent icon-start=chevron-left icon-flip-rtl=both id=solutions-back @click=${()=>this._featureDetails.value&&void this._featureDetails.value.back()} scale=s width=full></calcite-button><calcite-tooltip placement=top reference-element=solutions-back><span>${this._translations.back}</span></calcite-tooltip></div><calcite-button appearance=transparent @click=${()=>this._featureDetails.value&&void this._featureDetails.value.toggleListView()} scale=s><span class="pagination-count">${this._getCount()}</span></calcite-button><div><calcite-button appearance=transparent icon-flip-rtl=both icon-start=chevron-right id=solutions-next @click=${()=>this._featureDetails.value&&void this._featureDetails.value.next()} scale=s width=full></calcite-button><calcite-tooltip placement=top reference-element=solutions-next><span>${this._translations.next}</span></calcite-tooltip></div></div>`}getCommentDetailsFlowItem(){return l`<calcite-flow-item .collapsed=${this.isMobile&&this._sidePanelCollapsed} .heading=${this._relatedTable?.title||""} @calciteFlowItemBack=${this.backFromSelectedPanel} .selected=${this._flowItems[this._flowItems.length-1]==="comment-details"}>${this.isMobile&&this.getActionToExpandCollapsePanel()||""}<calcite-panel><info-card .enableSnapping=${this.enableSnapping} .graphics=${this._selectedRelatedFeature} .mapView=${this.mapView} @selectionChanged=${()=>{this._showLoadingIndicator=!1}}></info-card></calcite-panel></calcite-flow-item>`}getAddCommentFlowItem(){return l`<calcite-flow-item .collapsed=${this.isMobile&&this._sidePanelCollapsed} .heading=${this._relatedTable?.title||""} @calciteFlowItemBack=${this.backFromCreateRelatedFeaturePanel} .selected=${this._flowItems[this._flowItems.length-1]==="add-comment"}>${this.isMobile&&this.getActionToExpandCollapsePanel()||""}<div class=width-full slot=footer>${this._showSubmitCancelButton&&l`<div class=width-full slot=footer><calcite-button appearance=solid class="footer-top-button footer-button" @click=${this.onCreateRelatedFeatureSubmitButtonClick} width=full>${this._translations.submit}</calcite-button><calcite-button appearance=outline class=footer-button @click=${this.backFromCreateRelatedFeaturePanel} width=full>${this._translations.cancel}</calcite-button></div>`||""}</div><calcite-panel><create-related-feature customize-submit .enableSnapping=${this.enableSnapping} .mapView=${this.mapView} @fail=${this.addCommentFailed} @formReady=${this.onFormReady} @isActionPending=${this.showSubmitCancelButton} @success=${this.onCommentSubmitted} .selectedFeature=${this._currentFeature} .table=${this._relatedTable} ${o(this._createRelatedFeature)}></create-related-feature></calcite-panel></calcite-flow-item>`}async setSelectedFeatures(e){this._selectedFeature=e,await this.setCurrentFeature(this._selectedFeature.length?this._selectedFeature[0]:void 0)}async setCurrentFeature(e){if(this._currentFeature=e,e&&e.layer){let t=e.layer;t.title&&this.setSelectedLayer(t.id,t.title),this._currentFeatureId=e.attributes[t.objectIdField],this._getLayersConfig(t.id)?.comment&&t.relationships&&t.relationships.length>0&&await this.getRelatedTable()}else this._editableLayerIds.length>1&&(this.setSelectedLayer("",""),this.handlePrevLayersFilter()),this._currentFeatureId="";this._updateShareURL()}async highlightOnMap(e){if(this.clearHighlights(),e&&e.geometry&&e.layer&&e.layer.id!==void 0){let t=this.mapView&&await m(this.mapView,e.layer.id.toString());if(t){let i=Number(e.getObjectId());this._highlightHandle=this.mapView&&await x([i],t,this.mapView,!0,this.zoomToScale)}}this.updatingFeatureDetails(!1)}clearHighlights(){this._highlightHandle&&this._highlightHandle.remove()}getActionToExpandCollapsePanel(){return l`<calcite-action appearance=solid .icon=${this._sidePanelCollapsed?"chevrons-up":"chevrons-down"} @click=${this.toggleSidePanel} slot=header-actions-end .text=${(this._sidePanelCollapsed?this._translations.expand:this._translations.collapse)||""}></calcite-action>`}async setMapView(){this.mapView&&await f(this.mapView),await this.getLayersToShowInList(),await this._updateFeatures(),this._editableLayerIds?.length===1?await this.renderFeaturesList():this._flowItems=["layer-list"],this.mapView&&(this.mapView.popupEnabled=!1,this._defaultCenter&&this._defaultLevel&&(await this.mapView.goTo({center:this._defaultCenter,zoom:this._defaultLevel}),this._defaultCenter=void 0,this._defaultLevel=void 0))}handleMapClick(){this._mapClickHandle&&this._mapClickHandle.remove(),this._mapClickHandle=E.on(()=>this.mapView,"click",e=>{this.mapView&&(this.mapView.popupEnabled=!1),this.onMapClick(e)})}async onMapClick(e){if(!(this._flowItems[this._flowItems.length-1]==="feature-create"||this._flowItems[this._flowItems.length-1]==="add-comment")&&this.mapView){let t=await this.mapView.hitTest(e),i=[],s=[],a=[],n=!1;t.results.length>0&&t.results.forEach(r=>{r.type==="graphic"&&i.push(r.graphic)}),i.length>0&&(await this._setReportingGraphics(i),s=this._getNonReportingLayerGraphics(i)),this._mapImageryLayersId.length>0&&(a=await this._getIdentifiedGraphics(e.mapPoint),n=a.length>0);let h=s.concat(a);if(h.length>0){this.mapView.popupEnabled=!0;let r={features:h,location:e.mapPoint,updateLocationEnabled:!n};await this.mapView.openPopup(r)}}}async _setReportingGraphics(e){let t=e.filter(i=>{if(i.layer?.type==="feature"){let s=i.layer;return this._validLayers.includes(s)}else return!1});this._selectedLayer&&this._selectedFeature.length>0&&this._selectedLayer.id===t[0]?.layer?.id&&t[0].attributes[this._selectedLayer.objectIdField]===this._selectedFeature[0].attributes[this._selectedLayer.objectIdField]||t.length>0&&(await this.setSelectedFeatures(t),this._flowItems.length&&this._flowItems.includes("feature-details")?(this._flowItems=[...this._flowItems.slice(0,this._flowItems.indexOf("feature-details")+1)],await this.highlightOnMap(e[0])):this._flowItems=[...this._flowItems,"feature-details"])}_getNonReportingLayerGraphics(e){return e.filter(t=>{if(t.layer?.type==="feature"){let i=t.layer;return!this._validLayers.includes(i)&&i?.popupEnabled&&i?.id}else return!1})}async _getIdentifiedGraphics(e){let t=new O({geometry:e,tolerance:3,mapExtent:this.mapView?.extent}),i,s=[];for(let n of this._mapImageryLayersId){let h=this.mapView&&await d(this.mapView,n);if(h?.url&&t)try{let r=await k?.identify(h.url,t);if(r?.results?.length){s=r.results,i=h;break}}catch(r){console.error(r)}}let a=[];return s.forEach(n=>{let h=n.layerId,r=i?.sublayers?.items.find(P=>P.id===h),w=r?.popupTemplate;r?.popupEnabled&&w&&(n.feature.popupTemplate=w,a.push(n.feature))}),a}_getCount(){let e=(this._selectedFeatureIndex+1).toString(),t=this._selectedFeature.length.toString();return this._translations.indexOfTotal.replace("{{index}}",e).replace("{{total}}",t)}_updateFloorDefinitionExpression(e){let t=`${e?.floorInfo?.floorField} = '${this.floorLevel}'`,i=e.definitionExpression;e.definitionExpression=i&&i?.indexOf(this._floorExpression)>-1?i.replace(this._floorExpression,t):t,this._floorExpression=t}_getFormElements(){let e=this._selectedLayer;if(e?.floorInfo?.floorField&&this.floorLevel&&e?.formTemplate){let t=this._formElements.find(i=>i.id===e.id);(this._formElements.length===0||!t)&&this._formElements.push({id:e.id,orgElements:e.formTemplate.elements,orgExpressionInfos:e.formTemplate.expressionInfos})}}reduceToConfiguredLayers(e,t){return Object.keys(e).reduce((i,s)=>{let a=this.reportingOptions?this._getLayersConfig(s)?.visible:e[s].supportsAdd;return!t.includes(s)&&a&&i.push(s),i},[])}refreshLists(){setTimeout(()=>{this._layerList.value&&this._flowItems[this._flowItems.length-1]==="layer-list"&&this._layerList.value.refresh(),this._featureList.value&&this._featureList.value.refresh()},50)}async _updateFeatures(){for(let e of this._editableLayerIds){let t=this.mapView&&await m(this.mapView,e);t&&(await this._showMyFeaturesOnly(t),t.layer?.floorInfo?.floorField&&this.floorLevel&&this._updateFloorDefinitionExpression(t.layer))}}async _showMyFeaturesOnly(e){let t=(this.mapView?.map).portalItem.portal?.credential?.userId;if(t&&e){let i=e.layer.editFieldsInfo?.creatorField.toLowerCase();e.filter=this.showMyReportsOnly&&i?new V({where:`${i} = '${t}'`}):null}}async getLayersToShowInList(){let e=this.mapView&&await C(this.mapView,!1),t=this.mapView&&await _(this.mapView),i=[];t?.forEach(s=>{s?.type==="feature"&&s?.editingEnabled&&s?.capabilities?.operations?.supportsAdd&&(e[s.id].supportsAdd=!0),s?.editingEnabled||i.push(s.id)}),this._editableLayerIds=this.reduceToConfiguredLayers(e,i),this._layerItemsHash=e}async renderFeaturesList(){this._flowItems=["feature-list"];let e={detail:this._editableLayerIds};await this.layerListLoaded(e),await this.setSelectedLayer(this._validLayers[0].id,this._validLayers[0]?.title||""),this.updateSortingOptions(),await this.handleSelectedLayersFilter(),this._urlParamsLoaded||(this._urlParamsLoaded=!0,await this.loadFeatureFromURLParams())}_updateShareURL(){let e=this._shareNode.value?.shareUrl;if(!e)return;let t=new URL(e);this._selectedLayerId?t.searchParams.set("layerid",this._selectedLayerId):t.searchParams.delete("layerid"),this._selectedFeature?.length?t.searchParams.set("oid",this._currentFeatureId):t.searchParams.delete("oid"),this._shareNode.value&&(this._shareNode.value.autoUpdateShareUrl=!1,this._shareNode.value.shareUrl=t.href)}async loadFeatureFromURLParams(){if(this.center&&this.level&&await this.mapView?.goTo({center:this.center.split(";").map(Number),zoom:parseInt(this.level,10)}),this.layerId&&this.objectId){let e=this.mapView&&await d(this.mapView,this.layerId);if(e){let t=this.mapView&&await v([Number(this.objectId)],e,[],!0,this.mapView.spatialReference);t?.length&&(await this.setSelectedFeatures(t),this._flowItems.length&&this._flowItems[this._flowItems.length-1]!=="feature-details"?this._flowItems=[...this._flowItems,"feature-details"]:this._flowItems=[...this._flowItems])}}}async handleSelectedLayersFilter(){if(this._selectedLayer){let e=this.layerExpressions?structuredClone(this.layerExpressions.filter(t=>t.id===this._selectedLayerId)):[];this._t9nLayerExpressions!=null&&this.handleLayerExpressionsT9n(e,this._t9nLayerExpressions),this._currentLayerExpressions=e,this._showFilterIcon=this._currentLayerExpressions?.length>0,this.setActiveDefinitionExpressions()}}async handlePrevLayersFilter(){if(this._prevSelectedLayerId){let e=this.mapView&&await d(this.mapView,this._prevSelectedLayerId);e&&this._initDefExpressions&&(e.definitionExpression=this._initDefExpressions[this._prevSelectedLayerId])}}async resetFilterList(){await this._filterList?.forceReset(),this._selectedLayer!==void 0&&this._initDefExpressions&&(this._selectedLayer.definitionExpression=this._initDefExpressions[this._selectedLayerId],this._filterActive=!1)}setActiveDefinitionExpressions(){if(this._selectedLayer===void 0)return;let e=[];if(this._currentLayerExpressions&&this._currentLayerExpressions?.length>0){let t=this._currentLayerExpressions[0];for(let i of t.expressions){let{active:s,definitionExpression:a}=i;s&&a&&e.push(`(${a})`)}this._filterActive=e.length>0,this.updateFilterLayerDefExpression(e,t.operator)}}updateFilterLayerDefExpression(e,t){let i=this._initDefExpressions&&this._initDefExpressions[this._selectedLayerId],s=e?.length>0&&i?`(${e.join(t)}) AND (${i})`:e.length>0?e.join(t):i;this._selectedLayer&&(this._selectedLayer.definitionExpression=s)}setInitExpressions(){if(this._initDefExpressions={},this.mapView==null)return;let e=this.mapView.map;e.allLayers.concat(e.allTables.toArray()).forEach(t=>{if(t.type==="map-image"&&t.popupEnabled&&!this._mapImageryLayersId.includes(t.id)){this._mapImageryLayersId.push(t.id);return}if(t.type!=="feature")return;let i=t;this._initDefExpressions&&(this._initDefExpressions[i.id]=i.definitionExpression||"")})}handleLayerExpressionsT9n(e,t){e?.forEach(i=>{let s=t?.find(a=>a.id===i.id);s!=null&&(i.title=s.title,i.expressions?.forEach(a=>{let n=s.expressions?.find(h=>h.id===a.id);n!=null&&(a.name=n.name)}))})}};I("crowdsource-reporter",g);return g},"core/reactiveUtils","layers/support/FeatureFilter","rest/identify","rest/support/IdentifyParameters",a,d)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import{a as M}from"./7NSN2YE4.js";import"./AQKTTVWV.js";import b from"./KDIUYXBA.js";import a from"./UUYUTETH.js";import{a as L}from"./HA5W44KL.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import{b as I}from"./2CMRI2B3.js";import{F as h,G as r,H as $,J as d,K as v,h as g,i as l,l as w,r as _,u as y}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([,{d:C}])=>{var F=g`@layer{:host{display:block;--calcite-label-margin-bottom: 0px;--solutions-theme-foreground-color: var(--calcite-color-foreground-1)}.padding-1-2{padding:.5rem}.display-flex{display:flex}.width-full{width:100%}.width-1-2{position:relative;width:50%}.width-1-3{position:relative;width:33.33%}.width-2-3{position:relative;width:66.66%}.width-0{width:0}.z-index-2{z-index:2!important}.height-full{height:100%}.height-1-2{position:relative;height:50%}.height-0{height:0}.toggle-node{width:51px;height:51px}.overflow-hidden{overflow:hidden}.flex-column{flex-direction:column}.border{border:1px solid var(--calcite-color-border-3)}.border-top{border-top:1px solid var(--calcite-color-border-3)}.border-bottom{border-bottom:1px solid var(--calcite-color-border-3)}.border-sides{border-left:1px solid var(--calcite-color-border-3);border-right:1px solid var(--calcite-color-border-3)}.position-relative{position:relative}.position-absolute{position:absolute}.position-sticky{position:sticky}.height-50{height:50%}.top-51{top:51px}.adjusted-height-50{height:calc(50% - 25px)}.adjusted-height-100{height:calc(100% - 50px)}.adjusted-height-100-51{height:calc(100% - 51px)}.display-none{display:none!important}.adjusted-height-50_25{height:calc(50% + 25px)}.display-grid{display:grid}.padding-inline-start-75{padding-inline-start:.75rem}.align-items-center{align-items:center}.esri-floor-filter__close-levels-button,.esri-floor-filter__level-button,.esri-floor-filter__browse-button{width:40px!important;height:40px!important}.position-absolute-0{position:absolute;inset:0}.visibility-hidden{visibility:hidden;height:0px}.border-width-0{border-width:0px}.floating-container{position:fixed;width:100px;height:10px;bottom:0;margin:100px 0;z-index:1}.left-0{left:0}.right-0{right:0}.floating-container .floating-button{box-shadow:0 10px 25px #5c5d5e99;-webkit-transform:translatey(5px);transform:translatey(5px);-webkit-transition:all .3s;transition:all .3s}.z-index-0{z-index:0!important}.z-index-1{z-index:1!important}.filter-content-space{--calcite-dialog-content-space: 0px}.background-dark{background:var(--calcite-color-background)}.filter-extent-container{display:flex;justify-content:space-between;align-items:center;padding:10px 0}.filter-modal-buttons{display:flex;padding:12px;gap:10px}.filter-extent-message{align-items:center;display:flex;gap:5px}calcite-action-bar{--calcite-internal-action-bar-gap: 0px;--calcite-internal-action-bar-padding: 0px}}`,m=class extends ${constructor(){super(),this.coverPageEnabled=!1,this.customInfoText="",this.defaultCenter="",this.defaultGlobalId="",this.defaultLayer="",this.defaultLevel="",this.defaultOid="",this.defaultWebmap="",this.honorMapFieldSettings=!1,this.introductionWindowEnabled=!1,this.enableAutoRefresh=!1,this.enableBasemap=!0,this.enableColumnReorder=!0,this.enableCSV=!0,this.enableFloorFilter=!0,this.enableFullscreen=!0,this.enableHome=!0,this.enableLegend=!0,this.enableLayerList=!0,this.enableMapList=!0,this.visibilityIcon="eyeball",this.enableSearch=!0,this.enableShare=!1,this.enableSnapping=!0,this.enableZoom=!0,this.mapInfos=[],this.onlyShowUpdatableLayers=!1,this.popupHeaderColor="",this.popupHeaderHoverColor="",this.popupHeaderHoverTextColor="",this.popupHeaderTextColor="",this.shareIncludeEmbed=!1,this.shareIncludeSocial=!1,this.showNewestFirst=!0,this.theme="light",this.zoomAndScrollToSelected=!1,this.enableSelectionTool=!0,this.featureSelectionMode="multiple",this._deleteDialogOpen=!1,this._enableCreateFeatures=!0,this._hideFooter=!1,this._hideTable=!1,this._isMobile=!1,this._translations=L({name:"crowdsource-manager",blocking:!0}),this._layoutMode="GRID",this._panelOpen=!0,this._numSelected=0,this._filterOpen=!1,this._showInformationHeader=!0,this._layerExpressions=[],this._layerIds=[],this._isLoading=!0,this._mapExtentFilterChecked=!1,this._deleteIds=[],this._showInvalidMapAlert=!1,this._currentMapInfos=[],this._defaultAppLayoutHonored=!1,this._defaultCenterHonored=!1,this._defaultLevelHonored=!1,this._layerTable=h(),this._shouldSetMapView=!1,this._filterList=h(),this._mapCard=h(),this._isMapViewOnLoad=!1,this.showIntroductionWindow=_(),this.showCoverPage=_(),this.listenOn(window,"featureSelectionChange",this.featureSelectionChange),this.listenOn(window,"popupClosed",this.popupClosed),this.listenOn(window,"layoutChanged",this.layoutChanged),this.listenOn(window,"mapChanged",this.mapChanged),this.listenOn(window,"layerSelectionChange",this.layerSelectionChange),this.listenOn(window,"showDelete",this.showDelete),this.listenOn(window,"noLayersFound",this.noLayersFound),this.listenOn(window,"clearSelection",this.clearSelection),this.listenOn(window,"relatedRecordToggled",this.relatedRecordToggled),this.listenOn(window,"creatingFeature",this.creatingFeature),M(window)}static{this.properties={appLayout:1,appProxies:1,basemapConfig:0,coverPageEnabled:5,customInfoText:1,defaultAppLayout:1,defaultCenter:1,defaultGlobalId:1,defaultLayer:1,defaultLevel:1,defaultOid:1,defaultWebmap:1,honorMapFieldSettings:5,introductionWindowEnabled:5,enableAutoRefresh:5,enableBasemap:5,enableColumnReorder:5,enableCSV:5,enableFloorFilter:5,enableFullscreen:5,enableHome:5,enableLegend:5,enableLayerList:5,enableMapList:5,visibilityIcon:1,enableSearch:5,enableShare:5,enableSnapping:5,enableZoom:5,mapInfos:0,onlyShowUpdatableLayers:5,popupHeaderColor:1,popupHeaderHoverColor:1,popupHeaderHoverTextColor:1,popupHeaderTextColor:1,searchConfiguration:0,shareIncludeEmbed:5,shareIncludeSocial:5,showNewestFirst:5,theme:1,zoomAndScrollToSelected:5,zoomToScale:9,enableSelectionTool:5,featureSelectionMode:1,_deleteDialogOpen:16,_enableCreateFeatures:16,_hideFooter:16,_hideTable:16,_isMobile:16,_translations:16,_layer:16,_layoutMode:16,_mapInfo:16,_mapView:16,_panelOpen:16,_numSelected:16,_filterOpen:16,_showInformationHeader:16,_layerExpressions:16,_layerIds:16,_isLoading:16,_mapExtentFilterChecked:16,_deleteIds:16,_showInvalidMapAlert:16,_currentMapInfos:16}}static{this.styles=F}static{this.shadowRootOptions=y}willUpdate(e){e.has("appLayout")&&this.appLayout&&this.appLayoutWatchHandler(this.appLayout,e.get("appLayout")),e.has("enableZoom")&&(this.hasUpdated||this.enableZoom!==!0)&&this.enableZoomWatchHandler(),e.has("mapInfos")&&this.hasUpdated&&this.mapInfosWatchHandler()}appLayoutWatchHandler(e,t){e!==t&&(this._layerTable.value?.validateTableUpdate(e==="splitView"),this._setActiveLayout(e),this.appLayout==="mapView"&&this._layer?.isTable&&this._mapCard.value&&this._mapCard.value.updateLayer(),this._isMapViewOnLoad&&this._layerTable.value&&this._layerTable.value.refresh())}enableZoomWatchHandler(){this._initMapZoom()}mapInfosWatchHandler(){this.updateCurrentMapInfos()}async featureSelectionChange(e){this._numSelected=e.detail?.length}async popupClosed(){this._isMobile&&this.showHideMapPopupAndTable(!1)}async layoutChanged(e){this._layoutMode=e.detail}async mapChanged(e){this._isMapViewOnLoad&&(this._showMapInFullView(),this._isMapViewOnLoad=!1),this._mapChange=e.detail,this.showHideMapPopupAndTable(!1),this._mapChange?.isValid?await this._mapChange.mapView?.when(async()=>{await this._setMapView()}):(this._mapInfo=this._mapChange&&this._getMapInfo(this._mapChange.id),this._showInvalidMapAlert=!0)}async layerSelectionChange(e){let t=e.detail[0],i=this._mapView&&await C(this._mapView,t);i&&await i.when(()=>{i.isTable&&!this._isMobile&&(this.appLayout="tableView"),this._layer=i,this._initLayerExpressions(),this._handleFilterListReset(),this._isLoading=!1})}async showDelete(e){this._deleteIds=e.detail.ids,this._deleteDialogOpen=!0}async noLayersFound(){this._layer=void 0,this._isLoading=!1}async clearSelection(){this.showHideMapPopupAndTable(!1)}async relatedRecordToggled(e){let t=e.detail;this._relatedTableLayer=t}async creatingFeature(){this.appLayout="splitView"}load(){this.updateCurrentMapInfos(),this._resizeObserver=new ResizeObserver(()=>this._onResize())}render(){let e=this.popupHeaderColor&&this.popupHeaderColor!=="#FFFFFF"?"border-width-0":"",t=this.theme==="dark"?"calcite-mode-dark":"calcite-mode-light",i=this._translations.invalidWebMapMsg?.replace("{{web_map}}",this._mapInfo?.name||"");return l`${this._showInvalidMapAlert&&l`<calcite-alert auto-close class=${d(t)} icon=check-circle kind=danger label @calciteAlertClose=${()=>{this._showInvalidMapAlert=!1}} open placement=top><div slot=message>${i}</div></calcite-alert>`||""}<calcite-shell class="position-relative"><calcite-panel class=${`width-full height-full ${e}`} .loading=${this._isLoading}>${this._getBody(this._layoutMode,this._panelOpen,this._hideTable)}</calcite-panel>${this._getFooter()}</calcite-shell>${this._filterModal()}${!this._isMobile&&this._deleteModal()||""}`}async updated(){this._shouldSetMapView&&(this._shouldSetMapView=!1,this._mapChange&&await this._setMapView())}loaded(){this._resizeObserver?.observe(this.el),!this._defaultAppLayoutHonored&&this.defaultAppLayout?(this._defaultAppLayoutHonored=!0,this.appLayout=this.defaultAppLayout):this.appLayout||(this.appLayout="splitView"),this._isMapViewOnLoad=this.appLayout==="mapView",this._setActiveLayout(this.appLayout)}_getFooter(){let e=this._numSelected>0,t=this._layerTable.value&&this._layerTable.value.selectedRelatedIds?.length>0?this._relatedTableLayer:this._layer,i=this._layer?.editingEnabled&&this._layer.capabilities?.operations.supportsDelete;return this._isMobile&&e&&!this._hideFooter?l`<div class=${"width-100"} slot=footer><div class="display-flex padding-1-2"><calcite-button appearance=solid id=solutions-show @click=${()=>this.showHideMapPopupAndTable(!0)} width=full>${this._translations.view.replace("{{n}}",this._numSelected.toString())}</calcite-button>${i?l`<delete-button class="padding-inline-start-1 width-full" id=solutions-delete .ids=${this.updateIdsToBeDeleted()} @deleteClicked=${this.updateIdsToBeDeleted} .layer=${t}></delete-button>`:void 0}</div></div>`:void 0}updateIdsToBeDeleted(){return this._deleteIds=this._layerTable.value&&this._layerTable.value.selectedRelatedIds?.length>0?this._layerTable.value.selectedRelatedIds:this._layerTable.value?.selectedIds,this._deleteIds}_setActiveLayout(e){e==="splitView"&&!this._panelOpen&&this._toggleLayout(),e==="mapView"?this._showMapInFullView():this._showMapInCardView()}_getDividerIcon(e,t){return e==="HORIZONTAL"?t?"chevrons-up":"chevrons-down":e==="VERTICAL"||e==="GRID"?t?"chevrons-left":"chevrons-right":void 0}_getMapSizeClass(e,t,i){let a="";switch(e){case"HORIZONTAL":a=`${t&&!i?"height-1-2 display-grid":t&&i?"height-full":"height-0"} width-full position-relative`;break;case"GRID":a=`height-full position-relative ${t?"width-1-3":"width-0"}`;break;case"VERTICAL":a=`height-full position-relative ${t?"width-1-2":"width-0"}`;break}return a}_getTableSizeClass(e,t){let i="";switch(e){case"HORIZONTAL":i=`${t?"height-1-2":"height-full"} width-full display-flex flex-column`;break;case"GRID":i=`${t?"width-2-3":"width-full"} height-full display-flex`;break;case"VERTICAL":i=`${t?"width-1-2":"width-full"} height-full display-flex`;break}return i}_getBody(e,t,i){let a=e==="HORIZONTAL"?"":"display-flex",s=this.theme==="dark"?"calcite-mode-dark":"calcite-mode-light",o=document.dir==="rtl"?"left-0":"right-0";return l`<calcite-panel class="width-full height-full position-absolute"><div class=${`width-full height-full overflow-hidden ${a}`}>${this._getMapAndCard(e,t,i)}${this._getTable(e,t,i)}</div>${this.coverPageEnabled&&l`<div class=${`floating-container ${o}`} @click=${this.coverPageButtonClick}><calcite-button appearance=solid class=${`floating-button ${s}`} icon-start=content-minimal kind=neutral label round scale=l split-child=primary width=auto></calcite-button></div>`||""}${this.introductionWindowEnabled&&l`<div class=${`floating-container ${o}`} @click=${this.infoButtonClick}><calcite-button appearance=solid class=${`floating-button ${s}`} icon-start=information-letter kind=neutral label round scale=l split-child=primary width=auto></calcite-button></div>`||""}</calcite-panel>`}infoButtonClick(){this.showIntroductionWindow.emit()}coverPageButtonClick(){this.showCoverPage.emit()}_getMapAndCard(e,t,i){let a=this._getMapSizeClass(e,t,i);return l`<div class=${`${a} overflow-hidden z-index-2`}>${this._getMapNode(t)}${this._getPopupExpandNode()}</div>`}_getMapNode(e){let t=this.appLayout==="mapView",i=this.appLayout==="tableView",a=this._isMobile?"height-full":t||i?"position-absolute-0":this._layoutMode==="HORIZONTAL"&&(!this._isMobile||e)?"":"adjusted-height-50",s=this.defaultWebmap&&this.defaultLayer,o=this.enableSelectionTool&&this.featureSelectionMode==="multiple"&&!this._layer?.isTable,p=["home","legend","search","fullscreen","basemap","floorfilter","layers-list","selectiontool"],c=["map-picker","map-layer-picker"],n=document.dir||"ltr";return l`<div class=${`${a} overflow-hidden`} id=card-mapView><map-card .appLayout=${this.appLayout} .appProxies=${this.appProxies} .basemapConfig=${this.basemapConfig} class="width-full" .defaultLayerId=${s?this.defaultLayer:""} .defaultWebmapId=${this.defaultWebmap} .enableBasemap=${this.enableBasemap} .enableFloorFilter=${this.enableFloorFilter} .enableFullscreen=${this.enableFullscreen} .enableHome=${this.enableHome} .enableLegend=${this.enableLegend} .enableLayerList=${this.enableLayerList} .enableSearch=${this.enableSearch} .enableSelectionTool=${o} .enableShare=${this.enableShare} enable-single-expand enable-map-layer-picker enable-map-picker .featureSelectionMode=${this.featureSelectionMode} .hide=${!this._isMobile&&i} zoom-tools-size=s .isMapLayout=${t} .isMobile=${this._isMobile} .mapInfo=${this._mapInfo} .mapInfos=${this._currentMapInfos.filter(u=>u.visible!==!1)} map-widgets-index=0 .mapWidgetsPosition=${n==="rtl"?"top-right":"top-left"} .mobileMapWidgetsPosition=${n==="rtl"?"top-left":"top-right"} map-widgets-size=m .showOnlyUpdatableLayers=${this.onlyShowUpdatableLayers} @toggleFilter=${this._toggleFilter} .selectedFeaturesIds=${this._layerTable.value?.selectedIds??[]} .selectedLayer=${this._layer} .shareIncludeEmbed=${this.shareIncludeEmbed} .shareIncludeSocial=${this.shareIncludeSocial} stack-tools .theme=${this.theme} .visibilityIcon=${this.visibilityIcon} .mapToolsOrder=${p} .mobileToolsOrder=${c} .zoomToScale=${this.zoomToScale} ${r(this._mapCard)}></map-card></div>`}_getPopupExpandNode(){let e=this._isMobile?"height-full":"height-full position-relative",t=this._isMobile&&this._showInformationHeader?"display-none height-0":"",i=this.popupHeaderColor?"":this._isMobile?"calcite-mode-light":"calcite-mode-dark",a=this._isMobile&&this._hideTable?"position-absolute-0 width-full height-full":this._isMobile?"display-none height-0":"",s=this._currentMapInfos?.length>1&&this.appLayout==="tableView"?"position-relative top-51":"",o=this.appLayout!=="tableView"?"position-sticky":"";return l`<div class=${`${i} ${e} ${a} ${s} ${o}`} style=${v({"--calcite-color-foreground-1":this.popupHeaderColor,"--calcite-color-foreground-2":this.popupHeaderHoverColor,"--calcite-color-text-3":this.popupHeaderTextColor,"--calcite-color-text-2":this.popupHeaderTextColor})}><calcite-panel>${!this._isMobile&&this._showInformationHeader||this._numSelected>0&&!this._isMobile?l`<div class=${`display-flex align-items-center ${t}`} slot=header-content><calcite-icon icon=information scale=s></calcite-icon><div class="padding-inline-start-75">${this._translations.information}</div></div>`:l`<div></div>`}${this._getCardNode()}</calcite-panel></div>`}_getCardNode(){let e=this.appLayout==="mapView",t=this.appLayout==="tableView",i=this._isMobile?"height-full":t&&this._currentMapInfos?.length>1?"adjusted-height-100-51":e||t?"height-full":this._numSelected>0&&!this._isMobile?"height-50":this._showInformationHeader?this._isMobile?"height-full":"height-50":"adjusted-height-50_25",a=this.theme==="dark"?"calcite-mode-dark":"calcite-mode-light",s=this._layerTable.value&&this._layerTable.value.selectedRelatedIds?.length>0?this._relatedTableLayer:this._layer;return l`<div class=${`width-50 height-full ${a}`}><card-manager class=${`${i} width-full`} .customInfoText=${this.customInfoText} .enableCreateFeatures=${this._enableCreateFeatures&&!this._isMobile} .createBtnLabel=${this._mapInfo?.createFeatureButtonLabel} .enableEditGeometry=${this._mapInfo?.enableEditGeometry} .enableSnapping=${this.enableSnapping} .isMobile=${this._isMobile} .layerOrTable=${s} .mapView=${this?._mapView} @backFromCreateWorkFlow=${()=>{this._showInformationHeader=!0}} @createWorkFlowStarted=${()=>{this.appLayout=s?.isTable?"tableView":"mapView",this._showInformationHeader=!1}} @featureOrRecordSubmitted=${()=>this._layerTable.value&&void this._layerTable.value.refresh()} .selectedFeaturesIds=${this._layerTable.value?.selectedIds} .selectingFeatureFromMap=${this.appLayout==="mapView"} .showSketchWidgets=${s?.geometryType!=="point"} .zoomAndScrollToSelected=${this.zoomAndScrollToSelected}></card-manager></div>`}_getTable(e,t,i){let a=this.appLayout==="mapView",s=this.appLayout==="tableView",o=i&&this._isMobile?"visibility-hidden":a?"display-none":"",p=a?"height-full width-full z-index-0":"display-none",c=this._getTableSizeClass(e,t),n=e==="HORIZONTAL"?"horizontal":"vertical",u=e==="HORIZONTAL"?"header":"panel-start",b=this.defaultWebmap&&this.defaultLayer,x=this._isMobile?"border-top":"",f=this.defaultGlobalId?this.defaultGlobalId?.indexOf(",")>-1?this.defaultGlobalId.split(","):[this.defaultGlobalId]:void 0,T=this.defaultOid?this.defaultOid?.indexOf(",")>-1?this.defaultOid.split(",").map(S=>Number.parseInt(S,10)):[Number.parseInt(this.defaultOid,10)]:void 0;return l`<calcite-shell class=${`${c} ${x} border-bottom z-index-1`}>${this._isMobile?void 0:l`<calcite-action-bar class="border-sides" expand-disabled .layout=${n} slot=${u??w}>${this.getActions(e,t)}</calcite-action-bar>`}<div class=${`width-full height-full position-relative z-index-0 ${o}`}><layer-table .appLayout=${this.appLayout} .defaultGlobalId=${b?f:void 0} .defaultLayerId=${b?this.defaultLayer:""} .defaultOid=${b&&!f?T:void 0} .enableAutoRefresh=${this.enableAutoRefresh} .enableCSV=${this.enableCSV} .enableColumnReorder=${this.enableColumnReorder} .enableInlineEdit=${this?._mapInfo?.enableInlineEdit} .enableTableAutosave=${this._mapInfo?.enableTableAutosave!==void 0?this._mapInfo?.enableTableAutosave:!0} .enableShare=${this.enableShare} .featureSelectionMode=${this.featureSelectionMode} .honorMapFieldSettings=${this.honorMapFieldSettings} .isMobile=${this._isMobile} .mapHidden=${s} .mapInfo=${this._mapInfo} .mapView=${this?._mapView} .showOnlyUpdatableLayers=${this.onlyShowUpdatableLayers} @toggleFilter=${this._toggleFilter} .shareIncludeEmbed=${this.shareIncludeEmbed} .shareIncludeSocial=${this.shareIncludeSocial} .showNewestFirst=${this.showNewestFirst} .zoomAndScrollToSelected=${this.zoomAndScrollToSelected} .zoomToScale=${this.zoomToScale} ${r(this._layerTable)}></layer-table></div><div class=${d(p)} id=full-map-view></div></calcite-shell>`}getActions(e,t){let i=this._getDividerIcon(e,t),a=t?this._translations.close:this._translations.open,s="toggle-layout";return l`<calcite-action .active=${this.appLayout==="splitView"} alignment=center appearance=solid class="toggle-node" icon=browser id=browser-action @click=${()=>{this.appLayout="splitView"}} text></calcite-action><calcite-tooltip placement=right reference-element=browser-action><span>${this._translations.splitView}</span></calcite-tooltip><calcite-action .active=${this.appLayout==="tableView"} alignment=center appearance=solid class="toggle-node" icon=dock-left id=dock-left-action @click=${()=>{this.appLayout="tableView"}} text></calcite-action><calcite-tooltip placement=right reference-element=dock-left-action><span>${this._translations.tableView}</span></calcite-tooltip><calcite-action .active=${this.appLayout==="mapView"} alignment=center appearance=solid class="toggle-node" .disabled=${this._layer?.isTable} icon=browser-map id=browser-map-action @click=${()=>{this.appLayout="mapView"}} text></calcite-action><calcite-tooltip placement=right reference-element=browser-map-action><span>${this._translations.mapView}</span></calcite-tooltip><calcite-action alignment=center appearance=solid class="toggle-node" .icon=${i} id=${s} @click=${()=>this._toggleLayout()} slot=actions-end text></calcite-action><calcite-tooltip placement=bottom .referenceElement=${s}><span>${a}</span></calcite-tooltip>`}_deleteModal(){let e=(this._layerTable.value?.selectedRelatedIds?.length??0)>0?this._relatedTableLayer:this._layer;return l`<delete-dialog id=deleteDialogId .ids=${this._deleteIds} .layer=${e} @deleteDialogClose=${()=>this._deleteDialogOpen=!1} .open=${this._deleteDialogOpen}></delete-dialog>`}_mapExtentFilter(){let e=this._layerExpressions?.length===0;return l`<calcite-panel><div><calcite-block class=${d(this.theme==="dark"?"background-dark":"")} heading menu-placement=bottom-end open><div class="filter-extent-container"><div class="filter-extent-message"><span>${this._translations.filterByExtentMsg}</span><calcite-icon icon=information id=filter-message-info scale=s></calcite-icon><calcite-tooltip overlay-positioning=fixed placement=top reference-element=filter-message-info>${this._translations.filterByExtentTooltipMsg}</calcite-tooltip></div><calcite-switch .checked=${this._mapExtentFilterChecked} @calciteSwitchChange=${t=>{let i=!!(t.target.checked||this._filterList.value?.filterCount&&this._filterList.value?.filterCount>0);this._layerTable.value&&this._layerTable.value?.filterUpdate(i,t.target.checked),this._mapCard.value&&this._mapCard.value?.updateFilterState(i),this._mapExtentFilterChecked=t.target.checked}} scale=m></calcite-switch></div></calcite-block>${e&&l`<div class="filter-modal-buttons" slot=footer><calcite-button appearance=outline @click=${this._handleFilterListReset} width=full>${this._translations.Resetfilter}</calcite-button><calcite-button @click=${this._closeFilter} width=full>${this._translations.close}</calcite-button></div>`||""}</div></calcite-panel>`}_filterModal(){let e=this._layerExpressions?.length>0,t=this.theme==="dark"?"calcite-mode-dark":"calcite-mode-light";return l`<calcite-dialog class=${`filter-content-space ${t}`} .heading=${this._translations.filter.replace("{{title}}",this._layer?.title||"")} id=solutions-filter-dialog-manager kind=brand modal @calciteDialogClose=${()=>{this._closeFilter()}} .open=${this._filterOpen} width=s>${!this._layer?.isTable&&this._mapExtentFilter()||""}${e&&this._mapView&&l`<instant-apps-filter-list close-btn .closeBtnOnClick=${()=>{this._closeFilter()}} combobox-overlay-positioning=fixed .layerExpressions=${this._layerExpressions} @filterListReset=${this._handleFilterListReset} @filterUpdate=${()=>{this._updateFilter()}} .view=${this._mapView} ${r(this._filterList)}></instant-apps-filter-list>`||""}</calcite-dialog>`}_updateFilter(){let e=this._filterList?.value?.filterCount&&this._filterList.value.filterCount>0||this._mapExtentFilterChecked;this._layerTable.value&&this._layerTable.value?.filterUpdate(e),this._mapCard.value&&this._mapCard.value.updateFilterState(e)}_initLayerExpressions(){let e=this._mapInfo?.filterConfig?.layerExpressions;this._layerExpressions=e?e.filter(t=>t.id===this._layer?.id):[]}_toggleFilter(){this._filterOpen=!this._filterOpen}_handleFilterListReset(){this._mapExtentFilterChecked=!1,this._mapCard.value&&this._mapCard.value.resetFilter(),this._layerTable.value&&this._layerTable.value.filterReset()}async _closeFilter(){this._filterOpen&&(this._filterOpen=!1,this._layerTable.value&&this._layerTable.value.closeFilter())}_onResize(){let e=this.el.offsetWidth<=1024,t=!this._isMobile&&e;this._isMobile=e,t&&(this._panelOpen=!0),this._isMobile?(this.showHideMapPopupAndTable(!this._isMobile),this.appLayout="splitView"):(this._layer?.isTable&&(this.appLayout="tableView"),this._isMobile=!1),this._layoutMode=this._isMobile?"HORIZONTAL":"GRID"}updateCurrentMapInfos(){this._currentMapInfos=this.mapInfos,!this.enableMapList&&this.defaultWebmap&&(this._currentMapInfos=this.mapInfos.filter(e=>e.id===this.defaultWebmap))}_toggleLayout(){this._panelOpen=!this._panelOpen}_showMapInCardView(){if(this.appLayout!=="mapView"){let e=document.getElementById("full-map-view")?.childNodes[0],t=document.getElementById("card-mapView");e&&t&&t.appendChild(e)}}_showMapInFullView(){let e=document.getElementById("card-mapView")?.childNodes,t;e?.forEach(a=>{!t&&a.mapView&&(t=a)});let i=document.getElementById("full-map-view");t&&i&&i.appendChild(t)}showHideMapPopupAndTable(e){this._hideTable=e,this._hideFooter=e}_getMapInfo(e){let t;return this._currentMapInfos.some(i=>i.id===e?(t={...i},!0):!1),t}async _setMapView(){let e=this._mapChange&&this._getMapInfo(this._mapChange.id);if(e&&this._mapChange){this._mapInfo=e,this._initLayerExpressions(),this._enableCreateFeatures=this._mapInfo.enableCreateFeatures,this._mapView=this._mapChange.mapView,this._initMapZoom(),this._mapView&&(this._mapView.popupEnabled=!1);let t=!this.defaultCenter||this._defaultCenterHonored?void 0:this.defaultCenter?.split(";").map(a=>Number.parseFloat(a)),i=!this.defaultLevel||this._defaultLevelHonored?void 0:Number.parseInt(this.defaultLevel,10);t&&i&&(await this._mapView?.goTo({center:t,zoom:i}),this._defaultCenterHonored=!0,this._defaultLevelHonored=!0)}}_initMapZoom(){this.enableZoom?this.enableZoom&&this._mapView?.ui.add({component:"zoom",position:"top-left",index:0}):this._mapView?.ui.remove("zoom")}};I("crowdsource-manager",m);return m},a,b)
2
+ import{a as M}from"./7NSN2YE4.js";import"./AQKTTVWV.js";import b from"./KDIUYXBA.js";import a from"./UUYUTETH.js";import{a as L}from"./Y3XY5BXI.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import{b as I}from"./S7XOHDIW.js";import{F as h,G as r,H as $,J as d,K as v,h as g,i as l,l as w,r as _,u as y}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([,{d:C}])=>{var F=g`@layer{:host{display:block;--calcite-label-margin-bottom: 0px;--solutions-theme-foreground-color: var(--calcite-color-foreground-1)}.padding-1-2{padding:.5rem}.display-flex{display:flex}.width-full{width:100%}.width-1-2{position:relative;width:50%}.width-1-3{position:relative;width:33.33%}.width-2-3{position:relative;width:66.66%}.width-0{width:0}.z-index-2{z-index:2!important}.height-full{height:100%}.height-1-2{position:relative;height:50%}.height-0{height:0}.toggle-node{width:51px;height:51px}.overflow-hidden{overflow:hidden}.flex-column{flex-direction:column}.border{border:1px solid var(--calcite-color-border-3)}.border-top{border-top:1px solid var(--calcite-color-border-3)}.border-bottom{border-bottom:1px solid var(--calcite-color-border-3)}.border-sides{border-left:1px solid var(--calcite-color-border-3);border-right:1px solid var(--calcite-color-border-3)}.position-relative{position:relative}.position-absolute{position:absolute}.position-sticky{position:sticky}.height-50{height:50%}.top-51{top:51px}.adjusted-height-50{height:calc(50% - 25px)}.adjusted-height-100{height:calc(100% - 50px)}.adjusted-height-100-51{height:calc(100% - 51px)}.display-none{display:none!important}.adjusted-height-50_25{height:calc(50% + 25px)}.display-grid{display:grid}.padding-inline-start-75{padding-inline-start:.75rem}.align-items-center{align-items:center}.esri-floor-filter__close-levels-button,.esri-floor-filter__level-button,.esri-floor-filter__browse-button{width:40px!important;height:40px!important}.position-absolute-0{position:absolute;inset:0}.visibility-hidden{visibility:hidden;height:0px}.border-width-0{border-width:0px}.floating-container{position:fixed;width:100px;height:10px;bottom:0;margin:100px 0;z-index:1}.left-0{left:0}.right-0{right:0}.floating-container .floating-button{box-shadow:0 10px 25px #5c5d5e99;-webkit-transform:translatey(5px);transform:translatey(5px);-webkit-transition:all .3s;transition:all .3s}.z-index-0{z-index:0!important}.z-index-1{z-index:1!important}.filter-content-space{--calcite-dialog-content-space: 0px}.background-dark{background:var(--calcite-color-background)}.filter-extent-container{display:flex;justify-content:space-between;align-items:center;padding:10px 0}.filter-modal-buttons{display:flex;padding:12px;gap:10px}.filter-extent-message{align-items:center;display:flex;gap:5px}calcite-action-bar{--calcite-internal-action-bar-gap: 0px;--calcite-internal-action-bar-padding: 0px}}`,m=class extends ${constructor(){super(),this.coverPageEnabled=!1,this.customInfoText="",this.defaultCenter="",this.defaultGlobalId="",this.defaultLayer="",this.defaultLevel="",this.defaultOid="",this.defaultWebmap="",this.honorMapFieldSettings=!1,this.introductionWindowEnabled=!1,this.enableAutoRefresh=!1,this.enableBasemap=!0,this.enableColumnReorder=!0,this.enableCSV=!0,this.enableFloorFilter=!0,this.enableFullscreen=!0,this.enableHome=!0,this.enableLegend=!0,this.enableLayerList=!0,this.enableMapList=!0,this.visibilityIcon="eyeball",this.enableSearch=!0,this.enableShare=!1,this.enableSnapping=!0,this.enableZoom=!0,this.mapInfos=[],this.onlyShowUpdatableLayers=!1,this.popupHeaderColor="",this.popupHeaderHoverColor="",this.popupHeaderHoverTextColor="",this.popupHeaderTextColor="",this.shareIncludeEmbed=!1,this.shareIncludeSocial=!1,this.showNewestFirst=!0,this.theme="light",this.zoomAndScrollToSelected=!1,this.enableSelectionTool=!0,this.featureSelectionMode="multiple",this._deleteDialogOpen=!1,this._enableCreateFeatures=!0,this._hideFooter=!1,this._hideTable=!1,this._isMobile=!1,this._translations=L({name:"crowdsource-manager",blocking:!0}),this._layoutMode="GRID",this._panelOpen=!0,this._numSelected=0,this._filterOpen=!1,this._showInformationHeader=!0,this._layerExpressions=[],this._layerIds=[],this._isLoading=!0,this._mapExtentFilterChecked=!1,this._deleteIds=[],this._showInvalidMapAlert=!1,this._currentMapInfos=[],this._defaultAppLayoutHonored=!1,this._defaultCenterHonored=!1,this._defaultLevelHonored=!1,this._layerTable=h(),this._shouldSetMapView=!1,this._filterList=h(),this._mapCard=h(),this._isMapViewOnLoad=!1,this.showIntroductionWindow=_(),this.showCoverPage=_(),this.listenOn(window,"featureSelectionChange",this.featureSelectionChange),this.listenOn(window,"popupClosed",this.popupClosed),this.listenOn(window,"layoutChanged",this.layoutChanged),this.listenOn(window,"mapChanged",this.mapChanged),this.listenOn(window,"layerSelectionChange",this.layerSelectionChange),this.listenOn(window,"showDelete",this.showDelete),this.listenOn(window,"noLayersFound",this.noLayersFound),this.listenOn(window,"clearSelection",this.clearSelection),this.listenOn(window,"relatedRecordToggled",this.relatedRecordToggled),this.listenOn(window,"creatingFeature",this.creatingFeature),M(window)}static{this.properties={appLayout:1,appProxies:1,basemapConfig:0,coverPageEnabled:5,customInfoText:1,defaultAppLayout:1,defaultCenter:1,defaultGlobalId:1,defaultLayer:1,defaultLevel:1,defaultOid:1,defaultWebmap:1,honorMapFieldSettings:5,introductionWindowEnabled:5,enableAutoRefresh:5,enableBasemap:5,enableColumnReorder:5,enableCSV:5,enableFloorFilter:5,enableFullscreen:5,enableHome:5,enableLegend:5,enableLayerList:5,enableMapList:5,visibilityIcon:1,enableSearch:5,enableShare:5,enableSnapping:5,enableZoom:5,mapInfos:0,onlyShowUpdatableLayers:5,popupHeaderColor:1,popupHeaderHoverColor:1,popupHeaderHoverTextColor:1,popupHeaderTextColor:1,searchConfiguration:0,shareIncludeEmbed:5,shareIncludeSocial:5,showNewestFirst:5,theme:1,zoomAndScrollToSelected:5,zoomToScale:9,enableSelectionTool:5,featureSelectionMode:1,_deleteDialogOpen:16,_enableCreateFeatures:16,_hideFooter:16,_hideTable:16,_isMobile:16,_translations:16,_layer:16,_layoutMode:16,_mapInfo:16,_mapView:16,_panelOpen:16,_numSelected:16,_filterOpen:16,_showInformationHeader:16,_layerExpressions:16,_layerIds:16,_isLoading:16,_mapExtentFilterChecked:16,_deleteIds:16,_showInvalidMapAlert:16,_currentMapInfos:16}}static{this.styles=F}static{this.shadowRootOptions=y}willUpdate(e){e.has("appLayout")&&this.appLayout&&this.appLayoutWatchHandler(this.appLayout,e.get("appLayout")),e.has("enableZoom")&&(this.hasUpdated||this.enableZoom!==!0)&&this.enableZoomWatchHandler(),e.has("mapInfos")&&this.hasUpdated&&this.mapInfosWatchHandler()}appLayoutWatchHandler(e,t){e!==t&&(this._layerTable.value?.validateTableUpdate(e==="splitView"),this._setActiveLayout(e),this.appLayout==="mapView"&&this._layer?.isTable&&this._mapCard.value&&this._mapCard.value.updateLayer(),this._isMapViewOnLoad&&this._layerTable.value&&this._layerTable.value.refresh())}enableZoomWatchHandler(){this._initMapZoom()}mapInfosWatchHandler(){this.updateCurrentMapInfos()}async featureSelectionChange(e){this._numSelected=e.detail?.length}async popupClosed(){this._isMobile&&this.showHideMapPopupAndTable(!1)}async layoutChanged(e){this._layoutMode=e.detail}async mapChanged(e){this._isMapViewOnLoad&&(this._showMapInFullView(),this._isMapViewOnLoad=!1),this._mapChange=e.detail,this.showHideMapPopupAndTable(!1),this._mapChange?.isValid?await this._mapChange.mapView?.when(async()=>{await this._setMapView()}):(this._mapInfo=this._mapChange&&this._getMapInfo(this._mapChange.id),this._showInvalidMapAlert=!0)}async layerSelectionChange(e){let t=e.detail[0],i=this._mapView&&await C(this._mapView,t);i&&await i.when(()=>{i.isTable&&!this._isMobile&&(this.appLayout="tableView"),this._layer=i,this._initLayerExpressions(),this._handleFilterListReset(),this._isLoading=!1})}async showDelete(e){this._deleteIds=e.detail.ids,this._deleteDialogOpen=!0}async noLayersFound(){this._layer=void 0,this._isLoading=!1}async clearSelection(){this.showHideMapPopupAndTable(!1)}async relatedRecordToggled(e){let t=e.detail;this._relatedTableLayer=t}async creatingFeature(){this.appLayout="splitView"}load(){this.updateCurrentMapInfos(),this._resizeObserver=new ResizeObserver(()=>this._onResize())}render(){let e=this.popupHeaderColor&&this.popupHeaderColor!=="#FFFFFF"?"border-width-0":"",t=this.theme==="dark"?"calcite-mode-dark":"calcite-mode-light",i=this._translations.invalidWebMapMsg?.replace("{{web_map}}",this._mapInfo?.name||"");return l`${this._showInvalidMapAlert&&l`<calcite-alert auto-close class=${d(t)} icon=check-circle kind=danger label @calciteAlertClose=${()=>{this._showInvalidMapAlert=!1}} open placement=top><div slot=message>${i}</div></calcite-alert>`||""}<calcite-shell class="position-relative"><calcite-panel class=${`width-full height-full ${e}`} .loading=${this._isLoading}>${this._getBody(this._layoutMode,this._panelOpen,this._hideTable)}</calcite-panel>${this._getFooter()}</calcite-shell>${this._filterModal()}${!this._isMobile&&this._deleteModal()||""}`}async updated(){this._shouldSetMapView&&(this._shouldSetMapView=!1,this._mapChange&&await this._setMapView())}loaded(){this._resizeObserver?.observe(this.el),!this._defaultAppLayoutHonored&&this.defaultAppLayout?(this._defaultAppLayoutHonored=!0,this.appLayout=this.defaultAppLayout):this.appLayout||(this.appLayout="splitView"),this._isMapViewOnLoad=this.appLayout==="mapView",this._setActiveLayout(this.appLayout)}_getFooter(){let e=this._numSelected>0,t=this._layerTable.value&&this._layerTable.value.selectedRelatedIds?.length>0?this._relatedTableLayer:this._layer,i=this._layer?.editingEnabled&&this._layer.capabilities?.operations.supportsDelete;return this._isMobile&&e&&!this._hideFooter?l`<div class=${"width-100"} slot=footer><div class="display-flex padding-1-2"><calcite-button appearance=solid id=solutions-show @click=${()=>this.showHideMapPopupAndTable(!0)} width=full>${this._translations.view.replace("{{n}}",this._numSelected.toString())}</calcite-button>${i?l`<delete-button class="padding-inline-start-1 width-full" id=solutions-delete .ids=${this.updateIdsToBeDeleted()} @deleteClicked=${this.updateIdsToBeDeleted} .layer=${t}></delete-button>`:void 0}</div></div>`:void 0}updateIdsToBeDeleted(){return this._deleteIds=this._layerTable.value&&this._layerTable.value.selectedRelatedIds?.length>0?this._layerTable.value.selectedRelatedIds:this._layerTable.value?.selectedIds,this._deleteIds}_setActiveLayout(e){e==="splitView"&&!this._panelOpen&&this._toggleLayout(),e==="mapView"?this._showMapInFullView():this._showMapInCardView()}_getDividerIcon(e,t){return e==="HORIZONTAL"?t?"chevrons-up":"chevrons-down":e==="VERTICAL"||e==="GRID"?t?"chevrons-left":"chevrons-right":void 0}_getMapSizeClass(e,t,i){let a="";switch(e){case"HORIZONTAL":a=`${t&&!i?"height-1-2 display-grid":t&&i?"height-full":"height-0"} width-full position-relative`;break;case"GRID":a=`height-full position-relative ${t?"width-1-3":"width-0"}`;break;case"VERTICAL":a=`height-full position-relative ${t?"width-1-2":"width-0"}`;break}return a}_getTableSizeClass(e,t){let i="";switch(e){case"HORIZONTAL":i=`${t?"height-1-2":"height-full"} width-full display-flex flex-column`;break;case"GRID":i=`${t?"width-2-3":"width-full"} height-full display-flex`;break;case"VERTICAL":i=`${t?"width-1-2":"width-full"} height-full display-flex`;break}return i}_getBody(e,t,i){let a=e==="HORIZONTAL"?"":"display-flex",s=this.theme==="dark"?"calcite-mode-dark":"calcite-mode-light",o=document.dir==="rtl"?"left-0":"right-0";return l`<calcite-panel class="width-full height-full position-absolute"><div class=${`width-full height-full overflow-hidden ${a}`}>${this._getMapAndCard(e,t,i)}${this._getTable(e,t,i)}</div>${this.coverPageEnabled&&l`<div class=${`floating-container ${o}`} @click=${this.coverPageButtonClick}><calcite-button appearance=solid class=${`floating-button ${s}`} icon-start=content-minimal kind=neutral label round scale=l split-child=primary width=auto></calcite-button></div>`||""}${this.introductionWindowEnabled&&l`<div class=${`floating-container ${o}`} @click=${this.infoButtonClick}><calcite-button appearance=solid class=${`floating-button ${s}`} icon-start=information-letter kind=neutral label round scale=l split-child=primary width=auto></calcite-button></div>`||""}</calcite-panel>`}infoButtonClick(){this.showIntroductionWindow.emit()}coverPageButtonClick(){this.showCoverPage.emit()}_getMapAndCard(e,t,i){let a=this._getMapSizeClass(e,t,i);return l`<div class=${`${a} overflow-hidden z-index-2`}>${this._getMapNode(t)}${this._getPopupExpandNode()}</div>`}_getMapNode(e){let t=this.appLayout==="mapView",i=this.appLayout==="tableView",a=this._isMobile?"height-full":t||i?"position-absolute-0":this._layoutMode==="HORIZONTAL"&&(!this._isMobile||e)?"":"adjusted-height-50",s=this.defaultWebmap&&this.defaultLayer,o=this.enableSelectionTool&&this.featureSelectionMode==="multiple"&&!this._layer?.isTable,p=["home","legend","search","fullscreen","basemap","floorfilter","layers-list","selectiontool"],c=["map-picker","map-layer-picker"],n=document.dir||"ltr";return l`<div class=${`${a} overflow-hidden`} id=card-mapView><map-card .appLayout=${this.appLayout} .appProxies=${this.appProxies} .basemapConfig=${this.basemapConfig} class="width-full" .defaultLayerId=${s?this.defaultLayer:""} .defaultWebmapId=${this.defaultWebmap} .enableBasemap=${this.enableBasemap} .enableFloorFilter=${this.enableFloorFilter} .enableFullscreen=${this.enableFullscreen} .enableHome=${this.enableHome} .enableLegend=${this.enableLegend} .enableLayerList=${this.enableLayerList} .enableSearch=${this.enableSearch} .enableSelectionTool=${o} .enableShare=${this.enableShare} enable-single-expand enable-map-layer-picker enable-map-picker .featureSelectionMode=${this.featureSelectionMode} .hide=${!this._isMobile&&i} zoom-tools-size=s .isMapLayout=${t} .isMobile=${this._isMobile} .mapInfo=${this._mapInfo} .mapInfos=${this._currentMapInfos.filter(u=>u.visible!==!1)} map-widgets-index=0 .mapWidgetsPosition=${n==="rtl"?"top-right":"top-left"} .mobileMapWidgetsPosition=${n==="rtl"?"top-left":"top-right"} map-widgets-size=m .showOnlyUpdatableLayers=${this.onlyShowUpdatableLayers} @toggleFilter=${this._toggleFilter} .selectedFeaturesIds=${this._layerTable.value?.selectedIds??[]} .selectedLayer=${this._layer} .shareIncludeEmbed=${this.shareIncludeEmbed} .shareIncludeSocial=${this.shareIncludeSocial} stack-tools .theme=${this.theme} .visibilityIcon=${this.visibilityIcon} .mapToolsOrder=${p} .mobileToolsOrder=${c} .zoomToScale=${this.zoomToScale} ${r(this._mapCard)}></map-card></div>`}_getPopupExpandNode(){let e=this._isMobile?"height-full":"height-full position-relative",t=this._isMobile&&this._showInformationHeader?"display-none height-0":"",i=this.popupHeaderColor?"":this._isMobile?"calcite-mode-light":"calcite-mode-dark",a=this._isMobile&&this._hideTable?"position-absolute-0 width-full height-full":this._isMobile?"display-none height-0":"",s=this._currentMapInfos?.length>1&&this.appLayout==="tableView"?"position-relative top-51":"",o=this.appLayout!=="tableView"?"position-sticky":"";return l`<div class=${`${i} ${e} ${a} ${s} ${o}`} style=${v({"--calcite-color-foreground-1":this.popupHeaderColor,"--calcite-color-foreground-2":this.popupHeaderHoverColor,"--calcite-color-text-3":this.popupHeaderTextColor,"--calcite-color-text-2":this.popupHeaderTextColor})}><calcite-panel>${!this._isMobile&&this._showInformationHeader||this._numSelected>0&&!this._isMobile?l`<div class=${`display-flex align-items-center ${t}`} slot=header-content><calcite-icon icon=information scale=s></calcite-icon><div class="padding-inline-start-75">${this._translations.information}</div></div>`:l`<div></div>`}${this._getCardNode()}</calcite-panel></div>`}_getCardNode(){let e=this.appLayout==="mapView",t=this.appLayout==="tableView",i=this._isMobile?"height-full":t&&this._currentMapInfos?.length>1?"adjusted-height-100-51":e||t?"height-full":this._numSelected>0&&!this._isMobile?"height-50":this._showInformationHeader?this._isMobile?"height-full":"height-50":"adjusted-height-50_25",a=this.theme==="dark"?"calcite-mode-dark":"calcite-mode-light",s=this._layerTable.value&&this._layerTable.value.selectedRelatedIds?.length>0?this._relatedTableLayer:this._layer;return l`<div class=${`width-50 height-full ${a}`}><card-manager class=${`${i} width-full`} .customInfoText=${this.customInfoText} .enableCreateFeatures=${this._enableCreateFeatures&&!this._isMobile} .createBtnLabel=${this._mapInfo?.createFeatureButtonLabel} .enableEditGeometry=${this._mapInfo?.enableEditGeometry} .enableSnapping=${this.enableSnapping} .isMobile=${this._isMobile} .layerOrTable=${s} .mapView=${this?._mapView} @backFromCreateWorkFlow=${()=>{this._showInformationHeader=!0}} @createWorkFlowStarted=${()=>{this.appLayout=s?.isTable?"tableView":"mapView",this._showInformationHeader=!1}} @featureOrRecordSubmitted=${()=>this._layerTable.value&&void this._layerTable.value.refresh()} .selectedFeaturesIds=${this._layerTable.value?.selectedIds} .selectingFeatureFromMap=${this.appLayout==="mapView"} .showSketchWidgets=${s?.geometryType!=="point"} .zoomAndScrollToSelected=${this.zoomAndScrollToSelected}></card-manager></div>`}_getTable(e,t,i){let a=this.appLayout==="mapView",s=this.appLayout==="tableView",o=i&&this._isMobile?"visibility-hidden":a?"display-none":"",p=a?"height-full width-full z-index-0":"display-none",c=this._getTableSizeClass(e,t),n=e==="HORIZONTAL"?"horizontal":"vertical",u=e==="HORIZONTAL"?"header":"panel-start",b=this.defaultWebmap&&this.defaultLayer,x=this._isMobile?"border-top":"",f=this.defaultGlobalId?this.defaultGlobalId?.indexOf(",")>-1?this.defaultGlobalId.split(","):[this.defaultGlobalId]:void 0,T=this.defaultOid?this.defaultOid?.indexOf(",")>-1?this.defaultOid.split(",").map(S=>Number.parseInt(S,10)):[Number.parseInt(this.defaultOid,10)]:void 0;return l`<calcite-shell class=${`${c} ${x} border-bottom z-index-1`}>${this._isMobile?void 0:l`<calcite-action-bar class="border-sides" expand-disabled .layout=${n} slot=${u??w}>${this.getActions(e,t)}</calcite-action-bar>`}<div class=${`width-full height-full position-relative z-index-0 ${o}`}><layer-table .appLayout=${this.appLayout} .defaultGlobalId=${b?f:void 0} .defaultLayerId=${b?this.defaultLayer:""} .defaultOid=${b&&!f?T:void 0} .enableAutoRefresh=${this.enableAutoRefresh} .enableCSV=${this.enableCSV} .enableColumnReorder=${this.enableColumnReorder} .enableInlineEdit=${this?._mapInfo?.enableInlineEdit} .enableTableAutosave=${this._mapInfo?.enableTableAutosave!==void 0?this._mapInfo?.enableTableAutosave:!0} .enableShare=${this.enableShare} .featureSelectionMode=${this.featureSelectionMode} .honorMapFieldSettings=${this.honorMapFieldSettings} .isMobile=${this._isMobile} .mapHidden=${s} .mapInfo=${this._mapInfo} .mapView=${this?._mapView} .showOnlyUpdatableLayers=${this.onlyShowUpdatableLayers} @toggleFilter=${this._toggleFilter} .shareIncludeEmbed=${this.shareIncludeEmbed} .shareIncludeSocial=${this.shareIncludeSocial} .showNewestFirst=${this.showNewestFirst} .zoomAndScrollToSelected=${this.zoomAndScrollToSelected} .zoomToScale=${this.zoomToScale} ${r(this._layerTable)}></layer-table></div><div class=${d(p)} id=full-map-view></div></calcite-shell>`}getActions(e,t){let i=this._getDividerIcon(e,t),a=t?this._translations.close:this._translations.open,s="toggle-layout";return l`<calcite-action .active=${this.appLayout==="splitView"} alignment=center appearance=solid class="toggle-node" icon=browser id=browser-action @click=${()=>{this.appLayout="splitView"}} text></calcite-action><calcite-tooltip placement=right reference-element=browser-action><span>${this._translations.splitView}</span></calcite-tooltip><calcite-action .active=${this.appLayout==="tableView"} alignment=center appearance=solid class="toggle-node" icon=dock-left id=dock-left-action @click=${()=>{this.appLayout="tableView"}} text></calcite-action><calcite-tooltip placement=right reference-element=dock-left-action><span>${this._translations.tableView}</span></calcite-tooltip><calcite-action .active=${this.appLayout==="mapView"} alignment=center appearance=solid class="toggle-node" .disabled=${this._layer?.isTable} icon=browser-map id=browser-map-action @click=${()=>{this.appLayout="mapView"}} text></calcite-action><calcite-tooltip placement=right reference-element=browser-map-action><span>${this._translations.mapView}</span></calcite-tooltip><calcite-action alignment=center appearance=solid class="toggle-node" .icon=${i} id=${s} @click=${()=>this._toggleLayout()} slot=actions-end text></calcite-action><calcite-tooltip placement=bottom .referenceElement=${s}><span>${a}</span></calcite-tooltip>`}_deleteModal(){let e=(this._layerTable.value?.selectedRelatedIds?.length??0)>0?this._relatedTableLayer:this._layer;return l`<delete-dialog id=deleteDialogId .ids=${this._deleteIds} .layer=${e} @deleteDialogClose=${()=>this._deleteDialogOpen=!1} .open=${this._deleteDialogOpen}></delete-dialog>`}_mapExtentFilter(){let e=this._layerExpressions?.length===0;return l`<calcite-panel><div><calcite-block class=${d(this.theme==="dark"?"background-dark":"")} heading menu-placement=bottom-end open><div class="filter-extent-container"><div class="filter-extent-message"><span>${this._translations.filterByExtentMsg}</span><calcite-icon icon=information id=filter-message-info scale=s></calcite-icon><calcite-tooltip overlay-positioning=fixed placement=top reference-element=filter-message-info>${this._translations.filterByExtentTooltipMsg}</calcite-tooltip></div><calcite-switch .checked=${this._mapExtentFilterChecked} @calciteSwitchChange=${t=>{let i=!!(t.target.checked||this._filterList.value?.filterCount&&this._filterList.value?.filterCount>0);this._layerTable.value&&this._layerTable.value?.filterUpdate(i,t.target.checked),this._mapCard.value&&this._mapCard.value?.updateFilterState(i),this._mapExtentFilterChecked=t.target.checked}} scale=m></calcite-switch></div></calcite-block>${e&&l`<div class="filter-modal-buttons" slot=footer><calcite-button appearance=outline @click=${this._handleFilterListReset} width=full>${this._translations.Resetfilter}</calcite-button><calcite-button @click=${this._closeFilter} width=full>${this._translations.close}</calcite-button></div>`||""}</div></calcite-panel>`}_filterModal(){let e=this._layerExpressions?.length>0,t=this.theme==="dark"?"calcite-mode-dark":"calcite-mode-light";return l`<calcite-dialog class=${`filter-content-space ${t}`} .heading=${this._translations.filter.replace("{{title}}",this._layer?.title||"")} id=solutions-filter-dialog-manager kind=brand modal @calciteDialogClose=${()=>{this._closeFilter()}} .open=${this._filterOpen} width=s>${!this._layer?.isTable&&this._mapExtentFilter()||""}${e&&this._mapView&&l`<instant-apps-filter-list close-btn .closeBtnOnClick=${()=>{this._closeFilter()}} combobox-overlay-positioning=fixed .layerExpressions=${this._layerExpressions} @filterListReset=${this._handleFilterListReset} @filterUpdate=${()=>{this._updateFilter()}} .view=${this._mapView} ${r(this._filterList)}></instant-apps-filter-list>`||""}</calcite-dialog>`}_updateFilter(){let e=this._filterList?.value?.filterCount&&this._filterList.value.filterCount>0||this._mapExtentFilterChecked;this._layerTable.value&&this._layerTable.value?.filterUpdate(e),this._mapCard.value&&this._mapCard.value.updateFilterState(e)}_initLayerExpressions(){let e=this._mapInfo?.filterConfig?.layerExpressions;this._layerExpressions=e?e.filter(t=>t.id===this._layer?.id):[]}_toggleFilter(){this._filterOpen=!this._filterOpen}_handleFilterListReset(){this._mapExtentFilterChecked=!1,this._mapCard.value&&this._mapCard.value.resetFilter(),this._layerTable.value&&this._layerTable.value.filterReset()}async _closeFilter(){this._filterOpen&&(this._filterOpen=!1,this._layerTable.value&&this._layerTable.value.closeFilter())}_onResize(){let e=this.el.offsetWidth<=1024,t=!this._isMobile&&e;this._isMobile=e,t&&(this._panelOpen=!0),this._isMobile?(this.showHideMapPopupAndTable(!this._isMobile),this.appLayout="splitView"):(this._layer?.isTable&&(this.appLayout="tableView"),this._isMobile=!1),this._layoutMode=this._isMobile?"HORIZONTAL":"GRID"}updateCurrentMapInfos(){this._currentMapInfos=this.mapInfos,!this.enableMapList&&this.defaultWebmap&&(this._currentMapInfos=this.mapInfos.filter(e=>e.id===this.defaultWebmap))}_toggleLayout(){this._panelOpen=!this._panelOpen}_showMapInCardView(){if(this.appLayout!=="mapView"){let e=document.getElementById("full-map-view")?.childNodes[0],t=document.getElementById("card-mapView");e&&t&&t.appendChild(e)}}_showMapInFullView(){let e=document.getElementById("card-mapView")?.childNodes,t;e?.forEach(a=>{!t&&a.mapView&&(t=a)});let i=document.getElementById("full-map-view");t&&i&&i.appendChild(t)}showHideMapPopupAndTable(e){this._hideTable=e,this._hideFooter=e}_getMapInfo(e){let t;return this._currentMapInfos.some(i=>i.id===e?(t={...i},!0):!1),t}async _setMapView(){let e=this._mapChange&&this._getMapInfo(this._mapChange.id);if(e&&this._mapChange){this._mapInfo=e,this._initLayerExpressions(),this._enableCreateFeatures=this._mapInfo.enableCreateFeatures,this._mapView=this._mapChange.mapView,this._initMapZoom(),this._mapView&&(this._mapView.popupEnabled=!1);let t=!this.defaultCenter||this._defaultCenterHonored?void 0:this.defaultCenter?.split(";").map(a=>Number.parseFloat(a)),i=!this.defaultLevel||this._defaultLevelHonored?void 0:Number.parseInt(this.defaultLevel,10);t&&i&&(await this._mapView?.goTo({center:t,zoom:i}),this._defaultCenterHonored=!0,this._defaultLevelHonored=!0)}}_initMapZoom(){this.enableZoom?this.enableZoom&&this._mapView?.ui.add({component:"zoom",position:"top-left",index:0}):this._mapView?.ui.remove("zoom")}};I("crowdsource-manager",m);return m},a,b)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import{a}from"./RSLHX62X.js";import"./HA5W44KL.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import"./2CMRI2B3.js";import"./46DQNAMV.js";import"./OR4HXHSY.js";export{a as SolutionItemAccordion};
2
+ import{a}from"./WCGF6MFJ.js";import"./Y3XY5BXI.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import"./S7XOHDIW.js";import"./46DQNAMV.js";import"./OR4HXHSY.js";export{a as SolutionItemAccordion};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import{b as n}from"./2CMRI2B3.js";import{H as a,h as t,i}from"./46DQNAMV.js";var r=t`*[tabindex]:focus-visible{outline:2px solid var(--calcite-color-brand);outline-offset:2px}.resources-section{padding:3rem var(--calcite-spacing-md);max-width:1440px;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}`,s=class extends a{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=r}render(){return i`<div class="resources-section"><div class="section-header"><h2 class="section-heading" tabindex=0>${this.heading}</h2><p class="section-subheading" tabindex=0>${this.subheading}</p></div><div class="cards-container">${this.cards.map(e=>i`<solution-resource-card .icon=${e.icon} .meridianIcon=${e.meridianIcon} .heading=${e.heading} .description=${e.description} .url=${e.url} .headingEn=${e.headingEn} .sectionHeadingEn=${e.sectionHeadingEn}></solution-resource-card>`)}</div></div>`}};n("solutions-resources-section",s);export{s as a};
2
+ import{b as n}from"./S7XOHDIW.js";import{H as a,h as t,i}from"./46DQNAMV.js";var r=t`*[tabindex]:focus-visible{outline:2px solid var(--calcite-color-brand);outline-offset:2px}.resources-section{padding:3rem var(--calcite-spacing-md);max-width:1440px;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}`,s=class extends a{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=r}render(){return i`<div class="resources-section"><div class="section-header"><h2 class="section-heading" tabindex=0>${this.heading}</h2><p class="section-subheading" tabindex=0>${this.subheading}</p></div><div class="cards-container">${this.cards.map(e=>i`<solution-resource-card .icon=${e.icon} .meridianIcon=${e.meridianIcon} .heading=${e.heading} .description=${e.description} .url=${e.url} .headingEn=${e.headingEn} .sectionHeadingEn=${e.sectionHeadingEn}></solution-resource-card>`)}</div></div>`}};n("solutions-resources-section",s);export{s as a};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import{a as o}from"./HA5W44KL.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import{b as d}from"./2CMRI2B3.js";import{F as r,G as c,H as u,h as l,i as s,r as a}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([i,h])=>{var f=l`:host{display:block}.c-container{display:inline-flex}.flex-1{flex:"1"}.padding-end-1{padding-inline-end:1rem}.w-50{width:50%}`,n=class extends u{constructor(){super(...arguments),this.appearance="text",this.distance=0,this.geometries=[],this.max=0,this.min=0,this.sliderTicks=10,this.unionResults=!0,this.unit="meters",this.disabled=!1,this._translations=o({name:"buffer-tools",blocking:!0}),this._unitElement=r(),this.bufferComplete=a(),this.distanceChanged=a(),this.unitChanged=a()}static{this.properties={appearance:1,distance:9,geometries:0,max:9,min:9,sliderTicks:9,unionResults:5,unit:1,disabled:5,_translations:16,_units:16}}static{this.styles=f}willUpdate(t){t.has("geometries")&&(this.hasUpdated||this.geometries?.length>0)&&this.geometriesWatchHandler(),t.has("disabled")&&(this.hasUpdated||this.disabled!==!1)&&this.disabledWatchHandler(),t.has("_translations")&&this._defineTranslations(),t.has("unit")&&this.hasUpdated&&this._setUnit(this.unit),t.has("distance")&&this.hasUpdated&&this._setDistance({target:{value:this.distance}})}geometriesWatchHandler(){this._buffer()}disabledWatchHandler(){this._buffer()}async getTranslatedUnit(t){return this._units||await this._defineTranslations(),this._units?this._units[t]:""}render(){return this.appearance==="text"?this._getTextBoxDisplay():this._getSliderDisplay()}async _defineTranslations(){this._units={feet:this._translations.feet||"Feet",meters:this._translations.meters||"Meters",miles:this._translations.miles||"Miles",kilometers:this._translations.kilometers||"Kilometers"}}_getUnits(){return this._units?Object.keys(this._units).map(t=>this._units?s`<calcite-option .label=${this._units[t]} .selected=${this.unit===t} .value=${t}></calcite-option>`:void 0):void 0}_setDistance(t){let e=Number.parseInt(t.target.value,10);this.distance!==e&&e>=this.min&&(this.distanceChanged.emit({oldValue:this.distance,newValue:e}),this.distance=e,this.distance>0?this._buffer():this.bufferComplete.emit(void 0))}_setUnit(t){this.unitChanged.emit({oldValue:this.unit,newValue:t}),this.unit=t,this._buffer()}_buffer(){this.disabled?this.bufferComplete.emit(void 0):(this._bufferTimeout&&clearTimeout(this._bufferTimeout),this._bufferTimeout=setTimeout(async()=>{if(this.geometries?.length>0&&this.unit&&this.distance>0&&i&&h){i.isLoaded()||await i.load();let t=this.geometries[0].spatialReference,e=this.geometries,m=t.isWGS84||t.isWebMercator?i.executeMany(e,[this.distance],{union:this.unionResults,unit:this.unit}):h.executeMany(e,[this.distance],{unit:this.unit,union:this.unionResults});this.bufferComplete.emit(m)}},400))}_getTextBoxDisplay(){return s`<div class="c-container"><calcite-input class="padding-end-1 w-50" .max=${this.max&&this.max>0?this.max:void 0} .min=${this.min} number-button-type=vertical @calciteInputInput=${this._setDistance} placeholder=0 type=number .value=${this.distance?this.distance.toString():void 0}></calcite-input><calcite-select class="flex-1 w-50" label=label @calciteSelectChange=${()=>{this._unitElement?.value&&this._setUnit(this._unitElement?.value.value)}} ${c(this._unitElement)}>${this._getUnits()}</calcite-select></div>`}_getSliderDisplay(){return s`<div><calcite-slider label-handles .max=${this.max&&this.max>0?this.max:void 0} .min=${this.min} .ticks=${this.sliderTicks}></calcite-slider></div>`}_testAccess(t,e){switch(t){case"_setUnit":return this._setUnit(e);case"_setDistance":return this._setDistance(e)}return null}};d("buffer-tools",n);return n},"geometry/operators/geodesicBufferOperator","geometry/operators/bufferOperator")
2
+ import{a as o}from"./Y3XY5BXI.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import{b as d}from"./S7XOHDIW.js";import{F as r,G as c,H as u,h as l,i as s,r as a}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([i,h])=>{var f=l`:host{display:block}.c-container{display:inline-flex}.flex-1{flex:"1"}.padding-end-1{padding-inline-end:1rem}.w-50{width:50%}`,n=class extends u{constructor(){super(...arguments),this.appearance="text",this.distance=0,this.geometries=[],this.max=0,this.min=0,this.sliderTicks=10,this.unionResults=!0,this.unit="meters",this.disabled=!1,this._translations=o({name:"buffer-tools",blocking:!0}),this._unitElement=r(),this.bufferComplete=a(),this.distanceChanged=a(),this.unitChanged=a()}static{this.properties={appearance:1,distance:9,geometries:0,max:9,min:9,sliderTicks:9,unionResults:5,unit:1,disabled:5,_translations:16,_units:16}}static{this.styles=f}willUpdate(t){t.has("geometries")&&(this.hasUpdated||this.geometries?.length>0)&&this.geometriesWatchHandler(),t.has("disabled")&&(this.hasUpdated||this.disabled!==!1)&&this.disabledWatchHandler(),t.has("_translations")&&this._defineTranslations(),t.has("unit")&&this.hasUpdated&&this._setUnit(this.unit),t.has("distance")&&this.hasUpdated&&this._setDistance({target:{value:this.distance}})}geometriesWatchHandler(){this._buffer()}disabledWatchHandler(){this._buffer()}async getTranslatedUnit(t){return this._units||await this._defineTranslations(),this._units?this._units[t]:""}render(){return this.appearance==="text"?this._getTextBoxDisplay():this._getSliderDisplay()}async _defineTranslations(){this._units={feet:this._translations.feet||"Feet",meters:this._translations.meters||"Meters",miles:this._translations.miles||"Miles",kilometers:this._translations.kilometers||"Kilometers"}}_getUnits(){return this._units?Object.keys(this._units).map(t=>this._units?s`<calcite-option .label=${this._units[t]} .selected=${this.unit===t} .value=${t}></calcite-option>`:void 0):void 0}_setDistance(t){let e=Number.parseInt(t.target.value,10);this.distance!==e&&e>=this.min&&(this.distanceChanged.emit({oldValue:this.distance,newValue:e}),this.distance=e,this.distance>0?this._buffer():this.bufferComplete.emit(void 0))}_setUnit(t){this.unitChanged.emit({oldValue:this.unit,newValue:t}),this.unit=t,this._buffer()}_buffer(){this.disabled?this.bufferComplete.emit(void 0):(this._bufferTimeout&&clearTimeout(this._bufferTimeout),this._bufferTimeout=setTimeout(async()=>{if(this.geometries?.length>0&&this.unit&&this.distance>0&&i&&h){i.isLoaded()||await i.load();let t=this.geometries[0].spatialReference,e=this.geometries,m=t.isWGS84||t.isWebMercator?i.executeMany(e,[this.distance],{union:this.unionResults,unit:this.unit}):h.executeMany(e,[this.distance],{unit:this.unit,union:this.unionResults});this.bufferComplete.emit(m)}},400))}_getTextBoxDisplay(){return s`<div class="c-container"><calcite-input class="padding-end-1 w-50" .max=${this.max&&this.max>0?this.max:void 0} .min=${this.min} number-button-type=vertical @calciteInputInput=${this._setDistance} placeholder=0 type=number .value=${this.distance?this.distance.toString():void 0}></calcite-input><calcite-select class="flex-1 w-50" label=label @calciteSelectChange=${()=>{this._unitElement?.value&&this._setUnit(this._unitElement?.value.value)}} ${c(this._unitElement)}>${this._getUnits()}</calcite-select></div>`}_getSliderDisplay(){return s`<div><calcite-slider label-handles .max=${this.max&&this.max>0?this.max:void 0} .min=${this.min} .ticks=${this.sliderTicks}></calcite-slider></div>`}_testAccess(t,e){switch(t){case"_setUnit":return this._setUnit(e);case"_setDistance":return this._setDistance(e)}return null}};d("buffer-tools",n);return n},"geometry/operators/geodesicBufferOperator","geometry/operators/bufferOperator")
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import{a as s,b as n,c as d}from"./CKD45FGQ.js";import{b as y}from"./2CMRI2B3.js";import{F as i,G as c,H as m,h as o,i as t,r as p}from"./46DQNAMV.js";import"./OR4HXHSY.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 ${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 ${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"./CKD45FGQ.js";import{b as y}from"./S7XOHDIW.js";import{F as i,G as c,H as m,h as o,i as t,r as p}from"./46DQNAMV.js";import"./OR4HXHSY.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 ${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 ${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.0/LICENSE.txt */
2
- import b from"./JJUJVV7A.js";import{b as o}from"./PZ4L77M5.js";import{a as s}from"./HA5W44KL.js";import{b as r}from"./2CMRI2B3.js";import{H as e,L as h,h as c,i as a,j as t}from"./46DQNAMV.js";export default $arcgis.t(([{K:z,b:n,t:m}])=>{var p=c`calcite-card{cursor:pointer;height:100%;padding-bottom:2px;border-inline-start:3px solid transparent}calcite-card:hover{outline:1px solid var(--calcite-color-brand);border-inline-start:3px solid var(--calcite-color-brand);box-sizing:border-box}.card-icon{margin-bottom:var(--calcite-spacing-md);display:flex;justify-content:flex-start}.card-heading{font-size:var(--calcite-font-size-0);font-weight:var(--calcite-font-weight-medium);margin:0 0 var(--calcite-spacing-sm) 0;color:var(--calcite-color-text-1)}.card-description{font-size:var(--calcite-font-size--1);color:var(--calcite-color-text-2);margin:0}.meridian-icon{width:48px;height:48px;display:block;color:var(--calcite-color-text-3)}`,v={"arcmap-blog":"M34 28.9H10v-.8h24zm-24 5h20v-.8H10zm31.591-20.8l-.8.8H45.1v25.2H18.583l-9.817 4.245 1.823-4.245H3.9V13.9h22.665l.8-.8H3.1v26.8h6.274l-2.142 4.986L18.666 39.9H45.9V13.1zm-.953-5.141l.449 2.676L32.6 19.12l-.567-.565 8.195-8.196-.286-1.708L24.09 24.476a1.82 1.82 0 0 1-.689.431l-3.52 1.22 1.213-3.525a1.832 1.832 0 0 1 .431-.692L42.461.989l2.578 2.577zm3.268-4.394L42.461 2.12 22.09 22.475a1.036 1.036 0 0 0-.242.388l-.678 1.97 1.968-.682a1.018 1.018 0 0 0 .384-.24z","esri-community":"M24 47.896a3.897 3.897 0 0 1-1.563-.327L3.1 39.106V12.928a6.169 6.169 0 0 1 3.696-5.651L22.436.43a3.905 3.905 0 0 1 3.128 0L44.9 8.894v26.178a6.17 6.17 0 0 1-3.696 5.651l-15.64 6.846a3.897 3.897 0 0 1-1.564.327zM3.9 38.583l18.857 8.254a3.11 3.11 0 0 0 2.486 0l15.64-6.846a5.37 5.37 0 0 0 3.217-4.92V9.418L25.243 1.163a3.11 3.11 0 0 0-2.486 0L7.117 8.01A5.369 5.369 0 0 0 3.9 12.928zm21.364.344a14.156 14.156 0 0 1-14.17-14.111 13.678 13.678 0 0 1 16.893-13.26l.387.103-1.164 4.336-.389-.107a8.052 8.052 0 0 0-2.141-.282 8.907 8.907 0 0 0-8.74 8.838 9.303 9.303 0 0 0 15.277 7.075.809.809 0 0 1 1.104.062l2.451 2.57a.808.808 0 0 1-.047 1.161 14.213 14.213 0 0 1-9.461 3.615zm-.559-27a12.956 12.956 0 0 0-12.81 12.889 13.375 13.375 0 0 0 22.298 9.899L31.73 32.13a10.103 10.103 0 0 1-16.591-7.687 9.718 9.718 0 0 1 9.54-9.637 8.982 8.982 0 0 1 1.965.212l.748-2.787a11.953 11.953 0 0 0-2.687-.305zM36 26.9H24a3.905 3.905 0 0 1-3.9-3.9.901.901 0 0 1 .9-.9h10.84a7.77 7.77 0 0 0-1.875-4.15l-.131-.158 1.332-5.01.475.357a13.413 13.413 0 0 1 5.26 10.705V26a.901.901 0 0 1-.901.9zm-15-4a.1.1 0 0 0-.1.1 3.103 3.103 0 0 0 3.1 3.1h12a.1.1 0 0 0 .1-.1v-2.156a12.643 12.643 0 0 0-4.47-9.693l-.918 3.451a8.135 8.135 0 0 1 1.95 4.898v.4z",faq:"M18.495 23.09a3.22 3.22 0 0 1 3.502 3.123 3.526 3.526 0 0 1-1.593 3.034 3.413 3.413 0 0 0-1.524 3.096V33h-.8v-.657a4.165 4.165 0 0 1 1.812-3.71 2.727 2.727 0 0 0 1.305-2.42 2.425 2.425 0 0 0-2.702-2.322c-1.716 0-2.498.99-2.498 1.912h-.8c0-1.348 1.133-2.712 3.298-2.712zm22.849-2.748l.843 4.81-3.579-1.014.218-.77 2.354.668-.721-4.111.246-.139c3.427-1.927 5.393-4.774 5.393-7.81 0-5.554-6.55-10.072-14.6-10.072s-14.6 4.518-14.6 10.072a8.111 8.111 0 0 0 2.73 5.856l.313.3C29.924 18.47 37.9 24.104 37.9 31c0 7.113-8.479 12.9-18.9 12.9-1.417 0-3.901-.295-4.433-.36l-9.71 3.627 2.062-6.238C2.58 38.47.1 34.867.1 31c0-7.064 8.364-12.813 18.686-12.893a8.769 8.769 0 0 1-2.688-6.131c0-5.995 6.908-10.872 15.4-10.872s15.4 4.877 15.4 10.872c0 3.258-2.02 6.295-5.554 8.366zM19 18.9C9.02 18.9.9 24.328.9 31c0 3.65 2.44 7.073 6.694 9.389l.293.16-1.746 5.285 8.33-3.112.097.012c.03.004 2.923.366 4.432.366 9.98 0 18.1-5.428 18.1-12.1S28.98 18.9 19 18.9zm.4 16.6a.9.9 0 1 1-.9-.9.901.901 0 0 1 .9.9zm-.8 0a.1.1 0 0 0-.2 0c0 .11.2.11.2 0zm12.9-25.025a1.025 1.025 0 1 1-1.025 1.025 1.026 1.026 0 0 1 1.025-1.025zm0 .8a.225.225 0 0 0-.225.225c0 .248.45.248.45 0a.225.225 0 0 0-.225-.225zm6.975.225a1.025 1.025 0 1 1 1.025 1.025 1.026 1.026 0 0 1-1.025-1.025zm.8 0c0 .248.45.248.45 0a.225.225 0 0 0-.45 0zM23.5 10.475a1.025 1.025 0 1 1-1.025 1.025 1.026 1.026 0 0 1 1.025-1.025zm0 .8a.225.225 0 0 0-.225.225c0 .248.45.248.45 0a.225.225 0 0 0-.225-.225z",idea:"M31.858 10.113a12.288 12.288 0 0 0-9.675-3.074 12.438 12.438 0 0 0-7.706 20.764 11.032 11.032 0 0 1 3.016 7.387A1.511 1.511 0 0 0 19 36.9h.187l.388 1.553-.523 1.047.5 1-.41.821-.043 1.033 2.44 2.546h3.921l2.439-2.546V36.9h.307a1.51 1.51 0 0 0 1.508-1.504 11.03 11.03 0 0 1 3.014-7.391 12.45 12.45 0 0 0-.871-17.692zM27.1 42.033L25.12 44.1h-3.24l-1.98-2.068v-.437l.347-.695H24v-.8h-3.753l-.3-.6.3-.6H24v-.8h-3.688l-.3-1.2H27.1zm-5.2-9.869a1.6 1.6 0 1 1 3.2 0V36.1h-3.2zm10.238-4.698a11.814 11.814 0 0 0-3.222 7.924.71.71 0 0 1-.71.71H25.9v-3.936a2.406 2.406 0 0 0-.468-1.42l3.903-12.02-.76-.247-3.786 11.655a2.368 2.368 0 0 0-.89-.344V22.9H25v-.8h-3v.8h1.1v6.888a2.368 2.368 0 0 0-.889.344l-3.785-11.655-.761.248 3.903 12.019a2.406 2.406 0 0 0-.468 1.42V36.1h-2.099a.712.712 0 0 1-.709-.717 11.812 11.812 0 0 0-3.225-7.92 11.638 11.638 0 0 1 7.205-19.429 11.486 11.486 0 0 1 9.053 2.876 11.65 11.65 0 0 1 .813 16.556zM23.9 3h-.8V0h.8zM11.69 7.194l-1.77-2.39.642-.476 1.771 2.39zm24.748-2.866l.642.477-1.77 2.39-.644-.477zM2.483 16.022l2.822.808-.22.77-2.822-.808zm42.252.77l-2.822.808-.22-.77 2.822-.808z",install:"M30.991 21.733l-7.395 7.394-7.395-7.394.567-.566L23.1 27.5V3h.8v24.691l6.525-6.524zm6.7-7.633H26v.8h11.1v26.2H9.9V14.9H21v-.8H9.31L.69 24.748l.62.504L9.1 15.63V41.9h28.8V15.63l7.79 9.622.62-.504z",keys:"M42.52 18.96c-.8-2.67-2.58-4.84-4.98-6.07-.02-.02-.03-.04-.05-.06.34-1.09.41-2.27.41-3.66C37.9 4.08 35.31.1 32 .1c-3.19 0-5.72 3.7-5.88 8.54-6.7 1.555-10.39 8.9-7.57 15.21L5.1 37.08v5.79l6.27.03 3.28-3.57V37.9h1.34l2.41-2.41v-1.34h1.23l4.87-4.55c.57.23 1.16.41 1.76.54L20.79 43.3l1.74 4.39 4.92-1.93 1.5-3.7-.41-1.01 1.15-.45 1.12-2.76-.42-1.06.93-.37 2.33-5.21c6.53.047 10.619-6.336 8.87-12.24zM17.6 35.16l-1.94 1.94h-1.81v1.92l-2.83 3.08-5.12-.03v-4.65l13.61-13.4c-3.048-6.604.758-13.066 6.6-14.56.037 2.097.58 4.415 1.72 6.17-.878 2.281.823 4.77 3.29 4.77 1.95 0 3.53-1.58 3.53-3.52 0-3.417-4.395-4.834-6.39-2.06-.913-1.675-1.336-3.612-1.36-5.52 3.674-.656 7.662.792 10.1 4.22 4.726 6.764-.128 16.08-8.38 16.08-1.426 0-2.9-.303-4.29-.94l-5.01 4.69H17.6v1.81zm16.24-18.1c-1.518.948-3.521.728-5.1-1.5 1.346-2.459 5.11-1.493 5.11 1.32 0 .06 0 .12-.01.18zm-.29 1.04c-.44.89-1.36 1.5-2.43 1.5a2.725 2.725 0 0 1-2.69-3.13c1.322 1.591 3.197 2.391 5.12 1.63zM32 .9c2.81 0 5.1 3.71 5.1 8.27 0 1.09-.04 2.03-.23 2.89-2.58-2.899-6.39-4.152-9.95-3.58C27.13 4.24 29.33.9 32 .9zm1.14 29.48l-2.42 5.41-1.37.54.6 1.51-.88 2.14-1.56.63.57 1.45-1.24 3.08-3.86 1.52-1.33-3.35 5.41-13.02c.665.091 1.147.11 1.698.11l-5.36 12.44.734.316L29.65 30.35c7.71-.716 12.301-9.014 8.82-15.93 6.615 4.993 3.842 16.3-5.33 15.96zM20.38 28.1L9.15 39.34l-.57-.57 11.24-11.23.56.56z","search-files":"M10.9 4h-.8V1.1h13.57l9.23 9.23v13.28c-.26-.04-.53-.07-.8-.09V10.9h-5.08l-.8-.8h5.31L23.9 2.47v5.31l-.8-.8V1.9H10.9V4zm12.27 31.9H6.1V5.1h13.57l9.23 9.23v9.56a6.335 6.335 0 0 0-.8.28V14.9h-9v-9H6.9v29.2h15.99c.03.139.193.611.28.8zM19.9 14.1h7.63L19.9 6.47v7.63zm7.2 18.4v.5h.8v-.5c0-1.985 1.617-3.6 3.602-3.6H32v-.8h-.499a4.408 4.408 0 0 0-4.402 4.4zm18.733 12.096c0 .24-.094.466-.264.636l-1.307 1.307a.897.897 0 0 1-1.274 0l-5.527-5.528.97-.996-2.005-2.005A7.364 7.364 0 0 1 31.5 39.9c-4.08 0-7.4-3.319-7.4-7.4s3.32-7.4 7.4-7.4c4.081 0 7.401 3.32 7.401 7.4a7.36 7.36 0 0 1-1.909 4.944l1.997 1.997 1.018-1.044 5.561 5.561c.167.168.264.4.264.637zM31.5 39.102c3.64 0 6.6-2.961 6.6-6.6 0-3.64-2.96-6.601-6.6-6.601s-6.6 2.96-6.6 6.6c0 3.64 2.96 6.6 6.6 6.6zm13.502 5.423l-4.987-4.988-1.43 1.467 4.969 4.97h.14l1.308-1.307v-.142zM9 19.9h15v-.8H9v.8zm0 10h9v-.8H9v.8zm12-5.8H9v.8h12v-.8z",support:"M39.973 19.342l.069-.016a67.604 67.604 0 0 0-.898-3.54A16.04 16.04 0 0 0 23.514 4.1 16.006 16.006 0 0 0 7.797 16.11c-.175.663-.324 1.326-.477 1.99H6.5a1.402 1.402 0 0 0-1.4 1.4v2a1.402 1.402 0 0 0 1.4 1.4h1.4v-3.792q.304-1.398.67-2.796A15.216 15.216 0 0 1 23.514 4.9a15.248 15.248 0 0 1 14.86 11.104 66.99 66.99 0 0 1 .805 3.156c-.375.029-1.054.27-1.054 1.659v8.47c0 1.376.666 1.625 1.043 1.658-2.449 5.636-4.985 9.933-11.21 10.536a1.979 1.979 0 0 0-1.904-1.464h-2.108a1.981 1.981 0 1 0 0 3.962h2.108a1.978 1.978 0 0 0 1.953-1.699c6.887-.656 9.598-5.636 12.153-11.61 1.29-.717 2.766-2.661 2.766-3.924V23.36c0-1.324-1.624-3.396-2.953-4.018zM7.1 22.1h-.6a.6.6 0 0 1-.6-.6v-2a.6.6 0 0 1 .6-.6h.6zm18.954 21.081h-2.108a1.181 1.181 0 0 1 0-2.362h2.108a1.181 1.181 0 0 1 0 2.362zm16.071-16.433c0 1.207-2.003 3.406-2.856 3.406-.284 0-.343-.47-.343-.865v-8.47c0-.395.06-.865.343-.865.853 0 2.856 2.2 2.856 3.406z",value:"M14.068 13.1l-6.83 7.62L24.5 45.067l17.261-24.345-6.829-7.62H14.068zm19.883.8l-2 6.2H17.049l-2-6.2h18.902zm-19.685.178l1.943 6.022h-7.34l5.397-6.022zM8.346 20.9h8.12l6.779 21.013L8.347 20.9zM24.5 43.198L17.307 20.9h14.386L24.5 43.198zm1.255-1.283L32.533 20.9h8.12L25.755 41.915zM32.79 20.1l1.943-6.022L40.13 20.1h-7.339zM24.9 5h-.8V2h.8v3zm11.42 3.628l-.642-.476 1.771-2.39.643.476-1.772 2.39zm-23.642 0l-1.772-2.39.643-.476 1.771 2.39-.642.476zm35.253 7.164l-2.822.808-.22-.77 2.822-.808.22.77zm-46.644-.77l2.822.809-.22.77-2.822-.809.22-.77z",video:"M11.363 17.1l27.814-8.32-1.697-5.673-31.127 9.311 1.696 5.673.051-.015V41.9h31.8V17.1zm15.783-5.556l-5.179 1.549 1.246-4.883 5.178-1.549zm2.14-5.15l5.178-1.549-1.246 4.883-5.178 1.548zm-8.213 6.966l-5.178 1.549 1.246-4.883 5.178-1.548zm-6.072 1.816l-5.178 1.549 1.246-4.883 5.178-1.548zm23.18-6.933L34.112 9.46l1.246-4.882 1.585-.474zM7.35 12.955l2.826-.845-1.246 4.882-.343.103zM29.044 22.1l2.52-4.2h5.405l-2.52 4.2zm-19.014 0l2.52-4.2h5.405l-2.52 4.2zm8.858-4.2h5.405l-2.52 4.2h-5.405zm6.338 0h5.405l-2.52 4.2h-5.405zM8.9 17.9h2.716l-2.519 4.2H8.9zm30.2 23.2H8.9V22.9h30.2zm-3.718-19l2.52-4.2H39.1v4.2zM36 27.9h-2v-.8h2zm-5 0H13v-.8h18zm-17.9 9h22.8v-5.8H13.1zm.8-5h21.2v4.2H13.9z","speech-bubbles":"M11 15.9v-.8h18v.8zm12 4v-.8H11v.8zm-1 7.2h-3.443L9.9 32.76V27.1H5.75a1.852 1.852 0 0 1-1.85-1.85v-14.5A1.852 1.852 0 0 1 5.75 8.9h27.5a1.852 1.852 0 0 1 1.85 1.85V22h.8V10.75a2.653 2.653 0 0 0-2.65-2.65H5.75a2.653 2.653 0 0 0-2.65 2.65v14.5a2.653 2.653 0 0 0 2.65 2.65H9.1v6.34l9.695-6.34H22zm18.9 9.8h1.35a2.653 2.653 0 0 0 2.65-2.65v-8.5a2.653 2.653 0 0 0-2.65-2.65h-16.5a2.653 2.653 0 0 0-2.65 2.65v8.5a2.653 2.653 0 0 0 2.65 2.65h7.28l7.87 5.628zm1.35-13a1.852 1.852 0 0 1 1.85 1.85v8.5a1.852 1.852 0 0 1-1.85 1.85H40.1v4.872L33.288 36.1H25.75a1.852 1.852 0 0 1-1.85-1.85v-8.5a1.852 1.852 0 0 1 1.85-1.85zm-3.25 4v-.8H29v.8zm-3 5v-.8h-7v.8z"},i=class extends e{constructor(){super(...arguments),this._translations=s({name:"solution-resource-card",blocking:!0}),this._configContextConsumer=o({context:n,subscribe:!0}),this.heading="",this.description=""}static{this.properties={_translations:16,icon:1,meridianIcon:1,heading:1,description:1,url:1,headingEn:1,sectionHeadingEn:1}}static{this.styles=p}get _telemetry(){return this._configContextConsumer.value?.telemetrySession}render(){return a`<calcite-card @click=${()=>this.url&&this._handleCardClick(this.url)} @keydown=${l=>m(l,()=>this.url&&this._handleCardClick(this.url))}>${this.meridianIcon&&v[this.meridianIcon]&&a`<div class="card-icon"><svg class="meridian-icon" xmlns=http://www.w3.org/2000/svg viewBox="0 0 48 48">${t`<path fill=currentColor d=${v[this.meridianIcon]??h} />`}</svg></div>`||""}${this.icon&&a`<div class="card-icon"><calcite-icon .icon=${this.icon} scale=l></calcite-icon></div>`||""}<h3 class="card-heading">${this.heading}</h3><p class="card-description">${this.description}</p></calcite-card>`}_handleCardClick(l){let d=this.headingEn||this.heading,H=this.sectionHeadingEn||"";this._telemetry?.logEvent({category:z.RESOURCES,action:"Open",dimensions:[`${H} - ${d}`]}),window.open(l,"_blank","noopener,noreferrer")}};r("solution-resource-card",i);return i},b)
2
+ import b from"./HHKKBJCY.js";import{b as o}from"./PZ4L77M5.js";import{a as s}from"./Y3XY5BXI.js";import{b as r}from"./S7XOHDIW.js";import{H as e,L as h,h as c,i as a,j as t}from"./46DQNAMV.js";export default $arcgis.t(([{K:z,b:n,t:m}])=>{var p=c`calcite-card{cursor:pointer;height:100%;padding-bottom:2px;border-inline-start:3px solid transparent}calcite-card:hover{outline:1px solid var(--calcite-color-brand);border-inline-start:3px solid var(--calcite-color-brand);box-sizing:border-box}.card-icon{margin-bottom:var(--calcite-spacing-md);display:flex;justify-content:flex-start}.card-heading{font-size:var(--calcite-font-size-0);font-weight:var(--calcite-font-weight-medium);margin:0 0 var(--calcite-spacing-sm) 0;color:var(--calcite-color-text-1)}.card-description{font-size:var(--calcite-font-size--1);color:var(--calcite-color-text-2);margin:0}.meridian-icon{width:48px;height:48px;display:block;color:var(--calcite-color-text-3)}`,v={"arcmap-blog":"M34 28.9H10v-.8h24zm-24 5h20v-.8H10zm31.591-20.8l-.8.8H45.1v25.2H18.583l-9.817 4.245 1.823-4.245H3.9V13.9h22.665l.8-.8H3.1v26.8h6.274l-2.142 4.986L18.666 39.9H45.9V13.1zm-.953-5.141l.449 2.676L32.6 19.12l-.567-.565 8.195-8.196-.286-1.708L24.09 24.476a1.82 1.82 0 0 1-.689.431l-3.52 1.22 1.213-3.525a1.832 1.832 0 0 1 .431-.692L42.461.989l2.578 2.577zm3.268-4.394L42.461 2.12 22.09 22.475a1.036 1.036 0 0 0-.242.388l-.678 1.97 1.968-.682a1.018 1.018 0 0 0 .384-.24z","esri-community":"M24 47.896a3.897 3.897 0 0 1-1.563-.327L3.1 39.106V12.928a6.169 6.169 0 0 1 3.696-5.651L22.436.43a3.905 3.905 0 0 1 3.128 0L44.9 8.894v26.178a6.17 6.17 0 0 1-3.696 5.651l-15.64 6.846a3.897 3.897 0 0 1-1.564.327zM3.9 38.583l18.857 8.254a3.11 3.11 0 0 0 2.486 0l15.64-6.846a5.37 5.37 0 0 0 3.217-4.92V9.418L25.243 1.163a3.11 3.11 0 0 0-2.486 0L7.117 8.01A5.369 5.369 0 0 0 3.9 12.928zm21.364.344a14.156 14.156 0 0 1-14.17-14.111 13.678 13.678 0 0 1 16.893-13.26l.387.103-1.164 4.336-.389-.107a8.052 8.052 0 0 0-2.141-.282 8.907 8.907 0 0 0-8.74 8.838 9.303 9.303 0 0 0 15.277 7.075.809.809 0 0 1 1.104.062l2.451 2.57a.808.808 0 0 1-.047 1.161 14.213 14.213 0 0 1-9.461 3.615zm-.559-27a12.956 12.956 0 0 0-12.81 12.889 13.375 13.375 0 0 0 22.298 9.899L31.73 32.13a10.103 10.103 0 0 1-16.591-7.687 9.718 9.718 0 0 1 9.54-9.637 8.982 8.982 0 0 1 1.965.212l.748-2.787a11.953 11.953 0 0 0-2.687-.305zM36 26.9H24a3.905 3.905 0 0 1-3.9-3.9.901.901 0 0 1 .9-.9h10.84a7.77 7.77 0 0 0-1.875-4.15l-.131-.158 1.332-5.01.475.357a13.413 13.413 0 0 1 5.26 10.705V26a.901.901 0 0 1-.901.9zm-15-4a.1.1 0 0 0-.1.1 3.103 3.103 0 0 0 3.1 3.1h12a.1.1 0 0 0 .1-.1v-2.156a12.643 12.643 0 0 0-4.47-9.693l-.918 3.451a8.135 8.135 0 0 1 1.95 4.898v.4z",faq:"M18.495 23.09a3.22 3.22 0 0 1 3.502 3.123 3.526 3.526 0 0 1-1.593 3.034 3.413 3.413 0 0 0-1.524 3.096V33h-.8v-.657a4.165 4.165 0 0 1 1.812-3.71 2.727 2.727 0 0 0 1.305-2.42 2.425 2.425 0 0 0-2.702-2.322c-1.716 0-2.498.99-2.498 1.912h-.8c0-1.348 1.133-2.712 3.298-2.712zm22.849-2.748l.843 4.81-3.579-1.014.218-.77 2.354.668-.721-4.111.246-.139c3.427-1.927 5.393-4.774 5.393-7.81 0-5.554-6.55-10.072-14.6-10.072s-14.6 4.518-14.6 10.072a8.111 8.111 0 0 0 2.73 5.856l.313.3C29.924 18.47 37.9 24.104 37.9 31c0 7.113-8.479 12.9-18.9 12.9-1.417 0-3.901-.295-4.433-.36l-9.71 3.627 2.062-6.238C2.58 38.47.1 34.867.1 31c0-7.064 8.364-12.813 18.686-12.893a8.769 8.769 0 0 1-2.688-6.131c0-5.995 6.908-10.872 15.4-10.872s15.4 4.877 15.4 10.872c0 3.258-2.02 6.295-5.554 8.366zM19 18.9C9.02 18.9.9 24.328.9 31c0 3.65 2.44 7.073 6.694 9.389l.293.16-1.746 5.285 8.33-3.112.097.012c.03.004 2.923.366 4.432.366 9.98 0 18.1-5.428 18.1-12.1S28.98 18.9 19 18.9zm.4 16.6a.9.9 0 1 1-.9-.9.901.901 0 0 1 .9.9zm-.8 0a.1.1 0 0 0-.2 0c0 .11.2.11.2 0zm12.9-25.025a1.025 1.025 0 1 1-1.025 1.025 1.026 1.026 0 0 1 1.025-1.025zm0 .8a.225.225 0 0 0-.225.225c0 .248.45.248.45 0a.225.225 0 0 0-.225-.225zm6.975.225a1.025 1.025 0 1 1 1.025 1.025 1.026 1.026 0 0 1-1.025-1.025zm.8 0c0 .248.45.248.45 0a.225.225 0 0 0-.45 0zM23.5 10.475a1.025 1.025 0 1 1-1.025 1.025 1.026 1.026 0 0 1 1.025-1.025zm0 .8a.225.225 0 0 0-.225.225c0 .248.45.248.45 0a.225.225 0 0 0-.225-.225z",idea:"M31.858 10.113a12.288 12.288 0 0 0-9.675-3.074 12.438 12.438 0 0 0-7.706 20.764 11.032 11.032 0 0 1 3.016 7.387A1.511 1.511 0 0 0 19 36.9h.187l.388 1.553-.523 1.047.5 1-.41.821-.043 1.033 2.44 2.546h3.921l2.439-2.546V36.9h.307a1.51 1.51 0 0 0 1.508-1.504 11.03 11.03 0 0 1 3.014-7.391 12.45 12.45 0 0 0-.871-17.692zM27.1 42.033L25.12 44.1h-3.24l-1.98-2.068v-.437l.347-.695H24v-.8h-3.753l-.3-.6.3-.6H24v-.8h-3.688l-.3-1.2H27.1zm-5.2-9.869a1.6 1.6 0 1 1 3.2 0V36.1h-3.2zm10.238-4.698a11.814 11.814 0 0 0-3.222 7.924.71.71 0 0 1-.71.71H25.9v-3.936a2.406 2.406 0 0 0-.468-1.42l3.903-12.02-.76-.247-3.786 11.655a2.368 2.368 0 0 0-.89-.344V22.9H25v-.8h-3v.8h1.1v6.888a2.368 2.368 0 0 0-.889.344l-3.785-11.655-.761.248 3.903 12.019a2.406 2.406 0 0 0-.468 1.42V36.1h-2.099a.712.712 0 0 1-.709-.717 11.812 11.812 0 0 0-3.225-7.92 11.638 11.638 0 0 1 7.205-19.429 11.486 11.486 0 0 1 9.053 2.876 11.65 11.65 0 0 1 .813 16.556zM23.9 3h-.8V0h.8zM11.69 7.194l-1.77-2.39.642-.476 1.771 2.39zm24.748-2.866l.642.477-1.77 2.39-.644-.477zM2.483 16.022l2.822.808-.22.77-2.822-.808zm42.252.77l-2.822.808-.22-.77 2.822-.808z",install:"M30.991 21.733l-7.395 7.394-7.395-7.394.567-.566L23.1 27.5V3h.8v24.691l6.525-6.524zm6.7-7.633H26v.8h11.1v26.2H9.9V14.9H21v-.8H9.31L.69 24.748l.62.504L9.1 15.63V41.9h28.8V15.63l7.79 9.622.62-.504z",keys:"M42.52 18.96c-.8-2.67-2.58-4.84-4.98-6.07-.02-.02-.03-.04-.05-.06.34-1.09.41-2.27.41-3.66C37.9 4.08 35.31.1 32 .1c-3.19 0-5.72 3.7-5.88 8.54-6.7 1.555-10.39 8.9-7.57 15.21L5.1 37.08v5.79l6.27.03 3.28-3.57V37.9h1.34l2.41-2.41v-1.34h1.23l4.87-4.55c.57.23 1.16.41 1.76.54L20.79 43.3l1.74 4.39 4.92-1.93 1.5-3.7-.41-1.01 1.15-.45 1.12-2.76-.42-1.06.93-.37 2.33-5.21c6.53.047 10.619-6.336 8.87-12.24zM17.6 35.16l-1.94 1.94h-1.81v1.92l-2.83 3.08-5.12-.03v-4.65l13.61-13.4c-3.048-6.604.758-13.066 6.6-14.56.037 2.097.58 4.415 1.72 6.17-.878 2.281.823 4.77 3.29 4.77 1.95 0 3.53-1.58 3.53-3.52 0-3.417-4.395-4.834-6.39-2.06-.913-1.675-1.336-3.612-1.36-5.52 3.674-.656 7.662.792 10.1 4.22 4.726 6.764-.128 16.08-8.38 16.08-1.426 0-2.9-.303-4.29-.94l-5.01 4.69H17.6v1.81zm16.24-18.1c-1.518.948-3.521.728-5.1-1.5 1.346-2.459 5.11-1.493 5.11 1.32 0 .06 0 .12-.01.18zm-.29 1.04c-.44.89-1.36 1.5-2.43 1.5a2.725 2.725 0 0 1-2.69-3.13c1.322 1.591 3.197 2.391 5.12 1.63zM32 .9c2.81 0 5.1 3.71 5.1 8.27 0 1.09-.04 2.03-.23 2.89-2.58-2.899-6.39-4.152-9.95-3.58C27.13 4.24 29.33.9 32 .9zm1.14 29.48l-2.42 5.41-1.37.54.6 1.51-.88 2.14-1.56.63.57 1.45-1.24 3.08-3.86 1.52-1.33-3.35 5.41-13.02c.665.091 1.147.11 1.698.11l-5.36 12.44.734.316L29.65 30.35c7.71-.716 12.301-9.014 8.82-15.93 6.615 4.993 3.842 16.3-5.33 15.96zM20.38 28.1L9.15 39.34l-.57-.57 11.24-11.23.56.56z","search-files":"M10.9 4h-.8V1.1h13.57l9.23 9.23v13.28c-.26-.04-.53-.07-.8-.09V10.9h-5.08l-.8-.8h5.31L23.9 2.47v5.31l-.8-.8V1.9H10.9V4zm12.27 31.9H6.1V5.1h13.57l9.23 9.23v9.56a6.335 6.335 0 0 0-.8.28V14.9h-9v-9H6.9v29.2h15.99c.03.139.193.611.28.8zM19.9 14.1h7.63L19.9 6.47v7.63zm7.2 18.4v.5h.8v-.5c0-1.985 1.617-3.6 3.602-3.6H32v-.8h-.499a4.408 4.408 0 0 0-4.402 4.4zm18.733 12.096c0 .24-.094.466-.264.636l-1.307 1.307a.897.897 0 0 1-1.274 0l-5.527-5.528.97-.996-2.005-2.005A7.364 7.364 0 0 1 31.5 39.9c-4.08 0-7.4-3.319-7.4-7.4s3.32-7.4 7.4-7.4c4.081 0 7.401 3.32 7.401 7.4a7.36 7.36 0 0 1-1.909 4.944l1.997 1.997 1.018-1.044 5.561 5.561c.167.168.264.4.264.637zM31.5 39.102c3.64 0 6.6-2.961 6.6-6.6 0-3.64-2.96-6.601-6.6-6.601s-6.6 2.96-6.6 6.6c0 3.64 2.96 6.6 6.6 6.6zm13.502 5.423l-4.987-4.988-1.43 1.467 4.969 4.97h.14l1.308-1.307v-.142zM9 19.9h15v-.8H9v.8zm0 10h9v-.8H9v.8zm12-5.8H9v.8h12v-.8z",support:"M39.973 19.342l.069-.016a67.604 67.604 0 0 0-.898-3.54A16.04 16.04 0 0 0 23.514 4.1 16.006 16.006 0 0 0 7.797 16.11c-.175.663-.324 1.326-.477 1.99H6.5a1.402 1.402 0 0 0-1.4 1.4v2a1.402 1.402 0 0 0 1.4 1.4h1.4v-3.792q.304-1.398.67-2.796A15.216 15.216 0 0 1 23.514 4.9a15.248 15.248 0 0 1 14.86 11.104 66.99 66.99 0 0 1 .805 3.156c-.375.029-1.054.27-1.054 1.659v8.47c0 1.376.666 1.625 1.043 1.658-2.449 5.636-4.985 9.933-11.21 10.536a1.979 1.979 0 0 0-1.904-1.464h-2.108a1.981 1.981 0 1 0 0 3.962h2.108a1.978 1.978 0 0 0 1.953-1.699c6.887-.656 9.598-5.636 12.153-11.61 1.29-.717 2.766-2.661 2.766-3.924V23.36c0-1.324-1.624-3.396-2.953-4.018zM7.1 22.1h-.6a.6.6 0 0 1-.6-.6v-2a.6.6 0 0 1 .6-.6h.6zm18.954 21.081h-2.108a1.181 1.181 0 0 1 0-2.362h2.108a1.181 1.181 0 0 1 0 2.362zm16.071-16.433c0 1.207-2.003 3.406-2.856 3.406-.284 0-.343-.47-.343-.865v-8.47c0-.395.06-.865.343-.865.853 0 2.856 2.2 2.856 3.406z",value:"M14.068 13.1l-6.83 7.62L24.5 45.067l17.261-24.345-6.829-7.62H14.068zm19.883.8l-2 6.2H17.049l-2-6.2h18.902zm-19.685.178l1.943 6.022h-7.34l5.397-6.022zM8.346 20.9h8.12l6.779 21.013L8.347 20.9zM24.5 43.198L17.307 20.9h14.386L24.5 43.198zm1.255-1.283L32.533 20.9h8.12L25.755 41.915zM32.79 20.1l1.943-6.022L40.13 20.1h-7.339zM24.9 5h-.8V2h.8v3zm11.42 3.628l-.642-.476 1.771-2.39.643.476-1.772 2.39zm-23.642 0l-1.772-2.39.643-.476 1.771 2.39-.642.476zm35.253 7.164l-2.822.808-.22-.77 2.822-.808.22.77zm-46.644-.77l2.822.809-.22.77-2.822-.809.22-.77z",video:"M11.363 17.1l27.814-8.32-1.697-5.673-31.127 9.311 1.696 5.673.051-.015V41.9h31.8V17.1zm15.783-5.556l-5.179 1.549 1.246-4.883 5.178-1.549zm2.14-5.15l5.178-1.549-1.246 4.883-5.178 1.548zm-8.213 6.966l-5.178 1.549 1.246-4.883 5.178-1.548zm-6.072 1.816l-5.178 1.549 1.246-4.883 5.178-1.548zm23.18-6.933L34.112 9.46l1.246-4.882 1.585-.474zM7.35 12.955l2.826-.845-1.246 4.882-.343.103zM29.044 22.1l2.52-4.2h5.405l-2.52 4.2zm-19.014 0l2.52-4.2h5.405l-2.52 4.2zm8.858-4.2h5.405l-2.52 4.2h-5.405zm6.338 0h5.405l-2.52 4.2h-5.405zM8.9 17.9h2.716l-2.519 4.2H8.9zm30.2 23.2H8.9V22.9h30.2zm-3.718-19l2.52-4.2H39.1v4.2zM36 27.9h-2v-.8h2zm-5 0H13v-.8h18zm-17.9 9h22.8v-5.8H13.1zm.8-5h21.2v4.2H13.9z","speech-bubbles":"M11 15.9v-.8h18v.8zm12 4v-.8H11v.8zm-1 7.2h-3.443L9.9 32.76V27.1H5.75a1.852 1.852 0 0 1-1.85-1.85v-14.5A1.852 1.852 0 0 1 5.75 8.9h27.5a1.852 1.852 0 0 1 1.85 1.85V22h.8V10.75a2.653 2.653 0 0 0-2.65-2.65H5.75a2.653 2.653 0 0 0-2.65 2.65v14.5a2.653 2.653 0 0 0 2.65 2.65H9.1v6.34l9.695-6.34H22zm18.9 9.8h1.35a2.653 2.653 0 0 0 2.65-2.65v-8.5a2.653 2.653 0 0 0-2.65-2.65h-16.5a2.653 2.653 0 0 0-2.65 2.65v8.5a2.653 2.653 0 0 0 2.65 2.65h7.28l7.87 5.628zm1.35-13a1.852 1.852 0 0 1 1.85 1.85v8.5a1.852 1.852 0 0 1-1.85 1.85H40.1v4.872L33.288 36.1H25.75a1.852 1.852 0 0 1-1.85-1.85v-8.5a1.852 1.852 0 0 1 1.85-1.85zm-3.25 4v-.8H29v.8zm-3 5v-.8h-7v.8z"},i=class extends e{constructor(){super(...arguments),this._translations=s({name:"solution-resource-card",blocking:!0}),this._configContextConsumer=o({context:n,subscribe:!0}),this.heading="",this.description=""}static{this.properties={_translations:16,icon:1,meridianIcon:1,heading:1,description:1,url:1,headingEn:1,sectionHeadingEn:1}}static{this.styles=p}get _telemetry(){return this._configContextConsumer.value?.telemetrySession}render(){return a`<calcite-card @click=${()=>this.url&&this._handleCardClick(this.url)} @keydown=${l=>m(l,()=>this.url&&this._handleCardClick(this.url))}>${this.meridianIcon&&v[this.meridianIcon]&&a`<div class="card-icon"><svg class="meridian-icon" xmlns=http://www.w3.org/2000/svg viewBox="0 0 48 48">${t`<path fill=currentColor d=${v[this.meridianIcon]??h} />`}</svg></div>`||""}${this.icon&&a`<div class="card-icon"><calcite-icon .icon=${this.icon} scale=l></calcite-icon></div>`||""}<h3 class="card-heading">${this.heading}</h3><p class="card-description">${this.description}</p></calcite-card>`}_handleCardClick(l){let d=this.headingEn||this.heading,H=this.sectionHeadingEn||"";this._telemetry?.logEvent({category:z.RESOURCES,action:"Open",dimensions:[`${H} - ${d}`]}),window.open(l,"_blank","noopener,noreferrer")}};r("solution-resource-card",i);return i},b)