@esri/solutions-components 5.0.2 → 5.0.3

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 (95) hide show
  1. package/dist/cdn/{PNBTKFO6.js → 254AARKL.js} +1 -1
  2. package/dist/cdn/{VYTGCKEU.js → 2OL2CMZE.js} +1 -1
  3. package/dist/cdn/{5UEEUPL5.js → 3H5S6KGV.js} +1 -1
  4. package/dist/cdn/{XFEOA56B.js → 3NTCGBPK.js} +1 -1
  5. package/dist/cdn/{ASSNR5JI.js → 3QMNW3AL.js} +1 -1
  6. package/dist/cdn/{4CMHNL7Z.js → 3X5E5PEB.js} +1 -1
  7. package/dist/cdn/{TUGGGATS.js → 46N6WE5W.js} +1 -1
  8. package/dist/cdn/{W53A2CNH.js → 47EMI5L2.js} +1 -1
  9. package/dist/cdn/{RDWJHF5P.js → 4H3LGV2O.js} +1 -1
  10. package/dist/cdn/{2642PFUF.js → 4TZGWL7D.js} +1 -1
  11. package/dist/cdn/{FL74XITX.js → 5H3T3ZTG.js} +1 -1
  12. package/dist/cdn/{MMZXFDQZ.js → 632Z67I5.js} +1 -1
  13. package/dist/cdn/{BGO3JXY3.js → 65I7NFWN.js} +1 -1
  14. package/dist/cdn/{WZZG5H7Q.js → 6GMSPYN2.js} +1 -1
  15. package/dist/cdn/{LFIJXE3U.js → 6LLQFZGG.js} +1 -1
  16. package/dist/cdn/{Y4YYE2LG.js → 7G7GTCD2.js} +1 -1
  17. package/dist/cdn/{HAAFUV3J.js → 7QOFBIFO.js} +1 -1
  18. package/dist/cdn/{54WM76XB.js → A25PBMLE.js} +1 -1
  19. package/dist/cdn/{FUUWSZIZ.js → B5ARN6DC.js} +1 -1
  20. package/dist/cdn/{ZQJ2QLO5.js → B7LNGJY2.js} +1 -1
  21. package/dist/cdn/{CK7LURBK.js → BAVJY3AH.js} +1 -1
  22. package/dist/cdn/{YQECYE4M.js → BVBWBQGA.js} +1 -1
  23. package/dist/cdn/{FZ4NFB5R.js → DIG42YV7.js} +1 -1
  24. package/dist/cdn/{D2QNPQWY.js → E5GLDSJZ.js} +1 -1
  25. package/dist/cdn/{E4L5GTBZ.js → EG4OLFS7.js} +1 -1
  26. package/dist/cdn/F7CBQCHQ.js +2 -0
  27. package/dist/cdn/{LGUC7DRT.js → F7KPKXY6.js} +1 -1
  28. package/dist/cdn/{GJJOB4RR.js → FRM6WUOB.js} +1 -1
  29. package/dist/cdn/{USIESVTZ.js → GHL7S2IO.js} +1 -1
  30. package/dist/cdn/{M7OEPT52.js → GVHIJ3IB.js} +1 -1
  31. package/dist/cdn/{QXLM22NS.js → H2ZDTZJM.js} +1 -1
  32. package/dist/cdn/{HNRZHAOD.js → HLTPPQD5.js} +1 -1
  33. package/dist/cdn/{3M6AYSM7.js → IJBEMLYV.js} +1 -1
  34. package/dist/cdn/{VCH6XDEH.js → IKK4EKF4.js} +1 -1
  35. package/dist/cdn/{U75PDOJF.js → JMOT5FWT.js} +1 -1
  36. package/dist/cdn/{JHOXJY5O.js → JO4WX767.js} +1 -1
  37. package/dist/cdn/{C43NWBRR.js → KB2TRJ24.js} +1 -1
  38. package/dist/cdn/LI7AOAAS.js +2 -0
  39. package/dist/cdn/{4OZQG5MW.js → LT26PSOA.js} +1 -1
  40. package/dist/cdn/{OLDYKR5E.js → LYVD54Z4.js} +1 -1
  41. package/dist/cdn/{WDFQGUHD.js → MJM54ITG.js} +1 -1
  42. package/dist/cdn/{2J6ZHQEF.js → MKJGHHQA.js} +1 -1
  43. package/dist/cdn/{BHHQFUCH.js → MOQP5E5H.js} +1 -1
  44. package/dist/cdn/{N5YBX6NM.js → MQ3VVC37.js} +1 -1
  45. package/dist/cdn/{BFHVGXZN.js → O5B2N6WR.js} +1 -1
  46. package/dist/cdn/{DZUVI4S3.js → OELPVFFA.js} +1 -1
  47. package/dist/cdn/OWIJJGEY.js +2 -0
  48. package/dist/cdn/{B5SYTUTT.js → PHNGM56J.js} +1 -1
  49. package/dist/cdn/{ZYTKA3NP.js → PTCD4PWF.js} +1 -1
  50. package/dist/cdn/{5VP4DXWE.js → PUFV6POH.js} +1 -1
  51. package/dist/cdn/{KVR3XE7B.js → PXZF4QLN.js} +1 -1
  52. package/dist/cdn/{LQ3CLDU5.js → Q364IAYO.js} +1 -1
  53. package/dist/cdn/{ZRCMN3AQ.js → Q5CDQ25L.js} +1 -1
  54. package/dist/cdn/{UDTF5SYU.js → QDQVOSEM.js} +1 -1
  55. package/dist/cdn/{VDDTJAF2.js → QFQS5CRA.js} +1 -1
  56. package/dist/cdn/{N7RLYKQG.js → QKSDEEHH.js} +1 -1
  57. package/dist/cdn/{UR6OMPID.js → QO5AMX4U.js} +1 -1
  58. package/dist/cdn/{RTSKNY33.js → QRPBAR4V.js} +1 -1
  59. package/dist/cdn/{LTBO6VJF.js → RNEXKDUX.js} +1 -1
  60. package/dist/cdn/{BVWFZPY7.js → S23N6TCC.js} +1 -1
  61. package/dist/cdn/{6E6CKB2R.js → SHZO2XLE.js} +1 -1
  62. package/dist/cdn/{TAXUQXTN.js → SJEXGZK4.js} +1 -1
  63. package/dist/cdn/{5Z32YRHM.js → SVAPYMHV.js} +1 -1
  64. package/dist/cdn/{HLPUNGB5.js → TH6ZKLKN.js} +1 -1
  65. package/dist/cdn/{KKI72ISR.js → TZR3I4ZP.js} +1 -1
  66. package/dist/cdn/{AJRYDDC7.js → U2XTDZYY.js} +1 -1
  67. package/dist/cdn/{XUFPQNGT.js → UDOITPWM.js} +1 -1
  68. package/dist/cdn/{QKGOQ7EC.js → URNDQQPI.js} +1 -1
  69. package/dist/cdn/{UDPPJCXC.js → UW42HUTN.js} +1 -1
  70. package/dist/cdn/{JN4HYWSX.js → VNMG3E5D.js} +1 -1
  71. package/dist/cdn/{QJ4MQK3Y.js → VPNO4RA7.js} +1 -1
  72. package/dist/cdn/{Y3FTYVXY.js → WEWRDXGB.js} +1 -1
  73. package/dist/cdn/{NQF577F4.js → WUNWHJR5.js} +1 -1
  74. package/dist/cdn/{6EFUV7CH.js → WZGZCVBE.js} +1 -1
  75. package/dist/cdn/{6LPOLFT7.js → XWZ2LVEA.js} +1 -1
  76. package/dist/cdn/{V65IKENN.js → Y3CSVJBO.js} +1 -1
  77. package/dist/cdn/{KSKNVJAL.js → Y7H6OFT6.js} +1 -1
  78. package/dist/cdn/{55CA3AGN.js → YCKE3G3V.js} +1 -1
  79. package/dist/cdn/Z6D47FMI.js +2 -0
  80. package/dist/cdn/{NQXUGAR7.js → ZEFTAU6G.js} +1 -1
  81. package/dist/cdn/{BNQ63VOG.js → ZTRDNR6L.js} +1 -1
  82. package/dist/cdn/{JIPE2UQ3.js → ZV6LDJIX.js} +1 -1
  83. package/dist/cdn/{TBJLV2A3.js → ZWFXFJN5.js} +1 -1
  84. package/dist/cdn/index.js +1 -1
  85. package/dist/chunks/runtime.js +2 -2
  86. package/dist/components/solution-details-panel/customElement.js +15 -14
  87. package/dist/docs/api.json +1 -1
  88. package/dist/docs/docs.json +1 -1
  89. package/dist/docs/web-types.json +1 -1
  90. package/dist/solutions-components_commit.txt +8 -5
  91. package/package.json +1 -1
  92. package/dist/cdn/C2MDLUTX.js +0 -2
  93. package/dist/cdn/NXG2TZQJ.js +0 -2
  94. package/dist/cdn/NZYAEBC7.js +0 -2
  95. package/dist/cdn/VU3OQQKP.js +0 -2
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import{b as y}from"./PZ4L77M5.js";import{ka as C,nb as R,nc as M,oa as x,qa as N,sa as $}from"./JE7L7M3J.js";import{a as I}from"./LFIJXE3U.js";import{u as k}from"./2IHQU2FX.js";import{b as O}from"./VU3OQQKP.js";import{F as b,G as w,H as S,J as A,L as h,h as T,i as r,j as _,r as D}from"./46DQNAMV.js";export default $arcgis.t(([])=>{var V="isMobile";var K="config",H=T`calcite-card{height:100%;padding-bottom:var(--calcite-spacing-base)}@media(max-width:400px){calcite-card{width:100%}}calcite-card:hover img{-webkit-filter:brightness(30%);filter:brightness(30%);-webkit-transition:all .1s ease;-moz-transition:all .1s ease;-o-transition:all .1s ease;-ms-transition:all .1s ease;transition:all .1s ease}calcite-card:hover .hover-text{opacity:1;color:#fff}calcite-card:hover{outline:var(--calcite-spacing-base) solid var(--calcite-color-brand);box-sizing:content-box;cursor:pointer}.hover-text{transition:.1s ease;opacity:0;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);text-align:center;display:flex;flex-direction:row;align-items:center;height:100%;font-size:var(--calcite-spacing-xl)}.card-image-wrap{flex:0 0 auto}.card-image-wrap{width:100%;position:relative;margin-bottom:0;-webkit-box-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto}.card-image{width:100%;display:block}video,img{max-width:100%;height:auto}img{overflow-clip-margin:content-box;overflow:clip}.width-full{width:100%}.deployed-label-override{--calcite-label-text-color: var(--calcite-color-text-3);--calcite-label-margin-bottom: var(--calcite-spacing-none)}.svg-color{fill:var(--calcite-color-text-3)}.padding-end-1-2{padding-inline-end:var(--calcite-spacing-sm)}.padding-bottom-1-2{padding-bottom:var(--calcite-spacing-sm)}.display-flex{display:flex}.display-none{display:none}.flex-direction-column{flex-direction:column}.align-items-center{align-items:center}.font-weight-400,.font-weight-normal{font-weight:400}.font-color-text-2{--calcite-label-text-color: var(--calcite-color-text-2)}.font-line-height{line-height:1.4}.font-size-size--1{font-size:var(--calcite-font-size--1)}.icon-brand-color{--calcite-icon-color: var(--calcite-color-brand)}.header-line-height{--calcite-label-margin-bottom: 0;margin-top:var(--calcite-spacing-sm);margin-bottom:.7rem}.dialog-y-size{--calcite-dialog-size-y: 90% }.dialog-x-size{--calcite-dialog-size-x: 90% }.justify-content-space-between{justify-content:space-between}.panel-bg-color{--calcite-panel-header-background-color: var(--calcite-color-foreground-1);--calcite-panel-background-color: var(--calcite-color-foreground-1)}.cursor-default{cursor:default}`;function z(e){let t="",i="?";return e.forEach(a=>{a.k&&a.v&&(t+=i+a.k+"="+a.v,i="&")}),t}function $e(e){return e?M(e,{}).then(t=>Promise.resolve(!!t)):Promise.resolve(!1)}async function Y(e,t){let i=t,a=await i.getUsername(),s={q:new k().match(e).in("title").and().match(a).in("owner"),filter:"type:Solution",authentication:i},n=(await R(s)).results.map(p=>p.title),{folders:o}=await C(i),d=o.map(p=>p.title),u=[...n,...d].map(p=>p.trim().toLowerCase()),c=e.toLowerCase(),f=u.filter(p=>p===c),F=u.filter(p=>p.startsWith(c));return{conflictingNames:f,similiarNames:F}}async function Re(e,t){return q(e)?{status:!1,type:"empty"}:j(e)?{status:!1,type:"exceed length"}:J(e,"folder")?{status:!1,type:"special character"}:(await Y(e.trim(),t)).conflictingNames.length>0?{status:!1,type:"not unique"}:{status:!0,type:""}}function q(e){return e.length<=0}function j(e){return e.length>ye}function J(e,t){return(t==="item"?/[><~`$^+=|]/u:/[/<>]/u).test(e)}function Me(e){if(e){let t=e.trim();return t?"<div>"+t+"</div>":""}else return""}function Q(e){let t="",i="?";return e.forEach(a=>{a.k&&a.v&&(t+=i+a.k+"="+a.v,i="&")}),t}function Pe(e,t,i,a){let s="";return t?s=a+"/sharing/rest/content/items/"+e+"/info/"+t+Q([{k:"w",v:"400"}]):s=i,s}function Le(e){let t=e?e.replace("https://","").replace("www.",""):"";return t.endsWith("devext.arcgis.com")||t.endsWith("mapsqa.arcgis.com")||t.endsWith("qaext.arcgis.com")?e??"https://www.arcgis.com":"https://www.arcgis.com"}function Ue(e,t,i){return t.some(a=>a.wkid===e?(i=a.defaultExtent,!0):!1),i}function Ge(e,t){return X(t||e)}function Be(e,t="en"){return new Intl.DateTimeFormat(t,{year:"numeric",month:"long",day:"numeric"}).format(e)}function We(e,t){let i="";return e.some(a=>a.startsWith(t)?(i=a.substring(t.length),!0):!1),i}function X(e){let t=e.replace("www.","");return t.endsWith("devext.arcgis.com")?"dev":t.endsWith("mapsqa.arcgis.com")||t.endsWith("qaext.arcgis.com")?"qa":t==="arcgis.com"||t.endsWith(".arcgis.com")?"prod":"dev"}function Fe(e,t){let i=e?.reduce((a,s)=>(a.indexOf(s.id)<0&&a.push(s.id),a),[])||[];return t?i.sort((a,s)=>t.indexOf(a)-t.indexOf(s)):i}function Ve(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Ke(e){return{relevance:"Relevance",title:"Title",new:"New",created:"Date deployed",updated:"Updated",suggested:"Suggested for you"}[e]||e}function He(e){if(!e)return"Unknown error";if(e.message)return e.message;try{let t=JSON.stringify(e);return t&&t!=="{}"?t:e.toString()}catch{return e.toString()}}function ze(e){return e?parseFloat(((Date.now()-e)/1e3).toFixed(2)):0}function m(e,t){(e.key==="Enter"||e.code==="NumpadEnter"||e.key===" ")&&(e.preventDefault(),e.stopPropagation(),t())}async function Z(e,t){let i=await $(e,t);if(!i)throw new Error(`Solution ${e} was not found`);let a=t?.portal.replace("/sharing/rest","")??"https://www.arcgis.com",s=[];if(i.templates[0].item)s=i.templates.map(n=>({id:n.itemId,title:n.item.title,type:n.item.type,typeKeywords:n.item.typeKeywords,dependencies:n.dependencies,snippet:n.item.snippet}));else{let n=i.templates.map(o=>o.type==="Group"?x(o.itemId,t):N(o.itemId,t));s=(await Promise.allSettled(n)).filter(o=>o.status==="fulfilled").map(o=>o.value).map((o,d)=>{let u=typeof o.type>"u"?"group":"item";return{id:o.id,title:o.title,type:o.type??"Group",typeKeywords:o.typeKeywords,dependencies:i.templates[d].dependencies,snippet:o.snippet,url:`${a}/home/${u}.html?id=${o.id}`}})}return s}function Ye(e,t,i){let a=e.templates.map(c=>c.type),s=[];s.push(re),a.indexOf("Group")>=0&&(s.push(P),s.push(U)),a.indexOf("Feature Service")>=0&&s.push(L);let n=a.indexOf("Feed")>-1;n&&s.push(ce);let o=a.indexOf("Big Data Analytic")>-1;o&&s.push(le);let d=a.indexOf("Real Time Analytic")>-1;d&&s.push(ue),(n||o||d)&&s.push(be),a.indexOf("Workflow")>-1&&(s.push(P),s.push(L),s.push(U),s.push(we)),a.indexOf("Geoprocessing Service")>-1&&(s.push(de),i.IsEnterprisePortal&&s.push(he));let u=e.templates.reduce((c,f)=>c.concat(f.item.typeKeywords||[]),[]);return te(s,u,i),ie(s,t),ee(s,e),s}function ee(e,t){t.templates.some(i=>i.type==="Group"&&i.item?.membershipAccess==="collaboration")&&e.push(ne)}function te(e,t,i){let a=G(i),s=ae(i);["Location Tracking View"].some(n=>t.indexOf(n)>-1)&&(!a&&!s?e.push(me):a&&!s?e.push(ge):!a&&s&&e.push(fe))}function ie(e,t){["HubPremium"].some(i=>t.indexOf(i)>-1)&&e.push(pe)}function G(e){return e.PortalUserSubset?.role==="org_admin"&&!e.PortalUserSubset?.roleId}function ae(e){return e.PortalSubset?.locationTrackingEnabled||!1}function qe(e,t){let i={leadingMessages:[],bulletedMessages:[],trailingMessages:[]},a=[l.NOTEBOOK,l.VELOCITY,l.HUBPREMIUM,l.WORKFLOW,l.TRACKINGBASE],s=g(e,t,l.VELOCITY);s&&i.leadingMessages.push(s);let n=g(e,t,l.NOTEBOOK);n&&i.leadingMessages.push(n);let o=g(e,t,l.HUBPREMIUM);o&&i.leadingMessages.push(o);let d=g(e,t,l.WORKFLOW);d&&i.leadingMessages.push(d),t=t.filter(c=>a.indexOf(c)<0),t.forEach(c=>{i.bulletedMessages.push(B(e,c))});let u=g(e,t,l.TRACKINGBASE);return u&&i.trailingMessages.push(u),(i.leadingMessages.length>0||i.trailingMessages.length>0||i.bulletedMessages.length>0)&&i.trailingMessages.push(e.missingPrivilegesPopup.suggestedProblemRemedyMessage),i}function g(e,t,i){return t.filter(a=>a.includes(i)).length>0?B(e,i):""}function B(e,t){let i=e.missingPrivilegesPopup.requiredPrivilegesList,a="";switch(t){case"portal:user:createItem":a=i.createItem;break;case"portal:publisher:publishFeatures":a=i.publishFeatures;break;case"portal:user:createGroup":a=i.createGroup;break;case"portal:user:shareToGroup":a=i.shareToGroup;break;case"portal:user:addExternalMembersToGroup":a=i.addMembers;break;case"portal:publisher:publishFeeds":a=i.publishFeeds;break;case"portal:publisher:publishBigDataAnalytics":a=i.publishBigDataAnalytics;break;case"portal:publisher:publishRealTimeAnalytics":a=i.publishRealTimeAnalytics;break;case"solutions:locationtracking:admin:tracking":a=i.requiresLocationTrackingAndAdmin;break;case"solutions:locationtracking:tracking":a=i.requiresLocationTracking;break;case"solutions:locationtracking:admin":a=i.requiresAdmin;break;case"solutions:hubPremium":a=i.hubPremium;break;case"solutions:workflowManager":a=i.workflowManager;break;case"solutions:velocity":a=i.velocity;break;case"solutions:notebook":a=i.requiresNotebookServer;break;case"portal:publisher:publishServerGPServices":a=i.publishGPServices;break;case"writable:Enterprise":a=i.writableEnterprise;break;case"writable:Online":a=i.writableOnline.replace("{{url}}","https://status.arcgis.com");break}return a}function je(e,t){let i=W(t),a=z([{k:"id",v:e}])||"";return i?`${i}/home/item.html${a}`:""}function Je(e,t,i,a){let s=a||W(i);return s?`${s}/sharing/rest/content/items/${e}/resources/${t}`:""}function W(e){return e?.PortalSubset?.orgUrl||e?.PortalUrl||""}function se(e,t){let i=new URL(e);return i.searchParams.set("token",t),i.toString()}var v=class extends S{constructor(){super(),this.deployedDate="",this.description="",this.diagramKey="",this.heading="",this.itemId="",this.owner="",this.thumbnail="",this.updateAvailable=!1,this.templateInfos=[],this._isDeleteOpen=!1,this._isDiagramOpen=!1,this.isMobile=!1,this.templateInfoGraph=[],this._configureTitlesOpen=!1,this._thumbnailUrl="",this._translations=I({name:"solution-deployed-card",blocking:!0}),this._configContextConsumer=y({context:K,subscribe:!0,callback:async t=>{t&&(this._isOrgAdmin=G(t.authentication),this._thumbnailUrl=`${this.thumbnail}&token=${t.userSession?.token}`)}}),this._deleteDialogRef=b(),this._diagramDialogRef=b(),this._isOrgAdmin=!1,this._isMobileContextConsumer=y({context:V,subscribe:!0,callback:t=>this.isMobile=t}),this.deployedCardSelected=D(),this.listenOn(window,"sessionRefreshed",t=>{this._updateThumbnailToken(t.detail)})}static{this.properties={card:0,deployedDate:1,description:1,diagramKey:1,heading:1,itemId:1,owner:1,thumbnail:1,updateAvailable:5,templateInfos:0,_isDeleteOpen:16,_isDiagramOpen:16,isMobile:16,templateInfoGraph:16,_configureTitlesOpen:16,_thumbnailUrl:16,_translations:16}}static{this.styles=H}get _telemetry(){return this._configContextConsumer.value?.telemetrySession}async renderDeleteDialog(){return this._isDeleteOpen=!0,this._renderDeleteDialog(),this._deleteDialogRef.value}async renderDiagramDialog(t){return await this._viewDiagram(t),await this._renderDiagramDialog(),this._diagramDialogRef.value}async getTemplates(){return this._processTemplates(this.card)}async load(){this._isMobileContextConsumer.value&&(this.isMobile=this._isMobileContextConsumer.value)}render(){return r`<calcite-card .label=${this.description} @click=${this._cardSelected} @keydown=${t=>m(t,()=>this._cardSelected())}>${this._getImage()}${this._getHeader()}<p class="font-color-text-2 font-line-height font-size-size--1" slot=description>${this.description}</p><div class="width-full display-flex flex-direction-column" slot=footer-start><div class="padding-bottom-1-2">${this.owner!==""&&this._getOwnerLabel()||""}${this._getDeployedDate()}</div>${this._getConfigureButton()}</div></calcite-card>${this._renderDeleteDialog()}${this._renderDiagramDialog()}${this._renderConfigureTitlesDialog()}`}_getImage(){return r`<div class="card-image-wrap" slot=thumbnail><img alt=${this.heading??h} class="thumbnail card-image" src=${this._thumbnailUrl??h}><div class="hover-text">${this._translations.openSolution}</div></div>`}_getHeader(){return r`<div class="display-flex justify-content-space-between header-line-height" slot=heading><calcite-label layout=inline-space-between scale=l>${this.heading}</calcite-label></div>`}_getOwnerLabel(){return r`<calcite-label class="font-weight-400 padding-end-1-2" layout=inline scale=s>${`${this._translations.owner}:`}<calcite-link class="font-weight-normal" @click=${this._openUserProfile} @keydown=${t=>m(t,()=>this._openUserProfile(t))}>${this.owner}</calcite-link></calcite-label>`}_getDeployedDate(){return r`<div class="display-flex align-items-center"><div class="padding-end-1-2"><svg height=16px viewBox="0 0 32 32" width=16px xmlns=http://www.w3.org/2000/svg>${_`<path class="svg-color" d="M29.963 7.672a1.586 1.586 0 0 0-1.584-1.585h-5.274a.187.187 0 0 1-.188-.187V3.977A2 2 0 0 0 20.825 2h-9.672A2.095 2.095 0 0 0 9.06 4.093V5.9a.187.187 0 0 1-.187.187H3.598a1.586 1.586 0 0 0-1.584 1.585v4.016a.281.281 0 0 0 .281.28H4.9l.014-.013V9.153a.177.177 0 0 1 .177-.177h21.46a.456.456 0 0 1 .449.45v13.742A1.832 1.832 0 0 1 25.168 25h-8.892a.568.568 0 0 1-.534-.373 3.98 3.98 0 0 0-7.6.373H5.657a.757.757 0 0 1-.757-.757v-3.055A.188.188 0 0 0 4.714 21H2.028l-.014.014v4.58a2.35 2.35 0 0 0 2.347 2.346h4.161a3.963 3.963 0 0 0 6.8.256.569.569 0 0 1 .475-.256h12.065a2.102 2.102 0 0 0 2.101-2.101zM21 5.625a.375.375 0 0 1-.375.375h-9.25A.375.375 0 0 1 11 5.625V4.45a.456.456 0 0 1 .45-.45h9.1a.456.456 0 0 1 .45.45zM12 28a2 2 0 1 1 2-2 2 2 0 0 1-2 2z" /><path class="svg-color" d="M13.273 17.994a.57.57 0 0 1 .479.262A3.73 3.73 0 0 0 17 20a3.74 3.74 0 0 0 3.403-2.006h3.41a.188.188 0 0 0 .187-.188v-2.589a.187.187 0 0 0-.188-.188H20.8A3.8 3.8 0 0 0 17 12a4.058 4.058 0 0 0-3.69 2.647.568.568 0 0 1-.537.383H1.093a.094.094 0 0 0-.093.093V17.9a.094.094 0 0 0 .094.094zM17 13.9a2.1 2.1 0 1 1-2.1 2.1 2.1 2.1 0 0 1 2.1-2.1z" />`}</svg></div><calcite-label class="deployed-label-override" scale=s>${this._translations.deployedDate.replace("{{date}}",this.deployedDate)}</calcite-label></div>`}_getConfigureButton(){let t=this._configContextConsumer.value?.userSession?.username,i=this._configContextConsumer.value?.authentication?.CanUpdateSolution,a=this.card?.owner===t||this._isOrgAdmin||i,s=this.card?.owner===t||this._isOrgAdmin,n=a?"display-none":"";return r`<calcite-split-button appearance=outline aria-label=${this._translations.openSolution??h} dropdown-label=${this._translations.moreActions??h} kind=neutral @calciteSplitButtonPrimaryClick=${this._cardSelected} @click=${o=>o.stopPropagation()} @keydown=${o=>o.stopPropagation()} overlay-positioning=fixed primary-text=${this._translations.openSolution??h} width=full><calcite-dropdown-group selection-mode=none>${!this.isMobile&&r`<calcite-dropdown-item icon-start=model @click=${this._viewDiagram} @keydown=${o=>m(o,()=>this._viewDiagram(o))}>${this._translations.viewDiagram}</calcite-dropdown-item>`||""}<calcite-dropdown-item icon-start=file-text @click=${this._viewDocumentation} @keydown=${o=>m(o,()=>this._viewDocumentation(o))}>${this._translations.documentation}</calcite-dropdown-item><calcite-dropdown-item icon-start=information @click=${this._viewItemDetails} @keydown=${o=>m(o,()=>this._viewItemDetails(o))}>${this._translations.viewItemDetails}</calcite-dropdown-item>${!this.isMobile&&a&&r`<calcite-dropdown-item icon-start=edit-attributes id=solution-configure-titles-dropdown @click=${async()=>{this.templateInfos=await this._processTemplates(this.card),this._configureTitlesOpen=!0}} @keydown=${o=>m(o,async()=>{this.templateInfos=await this._processTemplates(this.card),this._configureTitlesOpen=!0})}>${this._translations.renameItems}</calcite-dropdown-item>`||""}${!this.isMobile&&s&&r`<calcite-dropdown-item icon-start=trash @click=${this._deleteSolution} @keydown=${o=>m(o,()=>this._deleteSolution(o))}>${this._translations.deleteSolution}</calcite-dropdown-item>`||""}</calcite-dropdown-group><calcite-tooltip class=${A(n)} overlay-positioning=fixed reference-element=solution-configure-titles-dropdown><span>${this._translations.mustOwnSolution}</span></calcite-tooltip></calcite-split-button>`}_renderDeleteDialog(){return this._isDeleteOpen?r`<solution-delete-dialog .card=${this.card} @solutionDeleteDialogOpen=${t=>{this._isDeleteOpen=t.detail}} .open=${this._isDeleteOpen} source="Card Dropdown" ${w(this._deleteDialogRef)}></solution-delete-dialog>`:""}_renderDiagramDialog(){return this._isDiagramOpen?r`<calcite-dialog class="dialog-y-size dialog-x-size panel-bg-color" .heading=${this._translations.diagramTitle.replace("{{solution}}",this.card?.title??"")} id=${this._translations.diagramTitle.replace("{{solution}}",this.card?.title??"")??h} modal .open=${this._isDiagramOpen} @calciteDialogClose=${()=>{this._isDiagramOpen=!1}} outside-close-disabled scale=m width=l ${w(this._diagramDialogRef)}><solution-item-diagram .diagramKey=${this.diagramKey} .templateInfoGraph=${this.templateInfoGraph} .typeKeywords=${this.card?.typeKeywords}></solution-item-diagram></calcite-dialog>`:""}_renderConfigureTitlesDialog(){return this._configureTitlesOpen?r`<solution-configure-titles .card=${this.card} @solutionConfigureTitlesBeforeClose=${async()=>{this._processTemplates(this.card).then(t=>{this.templateInfos=t}),this._configureTitlesOpen=!1}} @solutionItemsTitlesChanged=${async()=>{this._processTemplates(this.card).then(t=>{this.templateInfos=t})}} .open=${this._configureTitlesOpen} source="Card Dropdown" .templateInfos=${this.templateInfos}></solution-configure-titles>`:""}_cardSelected(){this.deployedCardSelected.emit({card:this.card,cardRef:this.el})}async _viewDiagram(t){t.stopPropagation(),this.card&&(this._telemetry?.logEvent({category:E.DEPLOYMENTS,action:"View Diagram",dimensions:[this.card.title||"",this.card.deployCommonId||"",this.card.deployVersion||"","Card Dropdown"]}),this.templateInfoGraph=await this._processTemplates(this.card),this._isDiagramOpen=!0)}_viewDocumentation(t){t.stopPropagation(),this._telemetry?.logEvent({category:E.DEPLOYMENTS,action:"Open Help",dimensions:[this.card?.title||"",this.card?.deployCommonId||"",this.card?.deployVersion||"","Card Dropdown"]}),window.open(this.card.learnMoreUrl,"_blank")}_viewItemDetails(t){t.stopPropagation(),this._telemetry?.logEvent({category:E.DEPLOYMENTS,action:"Open Item Details",dimensions:[this.card?.title||"",this.card?.deployCommonId||"",this.card?.deployVersion||"","Card Dropdown"]}),window.open(this.card.itemUrl,"_blank")}_deleteSolution(t){t.stopPropagation(),this._isDeleteOpen=!0}_openUserProfile(t){t.stopPropagation();let i=this._configContextConsumer.value?.authentication?.PortalSubset?.orgUrl;i&&window.open(`${i}/home/user.html?user=${this.owner}`,"_blank")}async _processTemplates(t){return await Z(t.id,this._configContextConsumer.value.userSession)}_updateThumbnailToken(t){this._thumbnailUrl!==""&&(this._thumbnailUrl=se(this._thumbnailUrl,t))}};O("solution-deployed-card",v);var Qe=500,Xe={AEC:"Architecture, Engineering, and Construction (AEC)",AIRPORTPORTRAIL:"Airports, Ports, and Rails",BUSINESS:"Business",CONSERVATION:"Conservation",DEFENSE:"Defense",FACILITIES:"Facilities",HEALTHANDHUMANSERVICES:"Health and Human Services",PIPELINE:"Pipeline",PUBLICSAFETY:"Public Safety",RENEWABLES:"Renewables",STATEANDLOCALGOVERNMENT:"State and Local Government",TELECOMMUNICATIONS:"Telecommunications",UTILITIES:"Utilities"},Ze={AIRPORT:"Airports",AGRICULTURE:"Agriculture",ASSESSMENTANDTAXATION:"Assessment and Taxation",DISTRICTENERGY:"District Energy",ELECTIONS:"Elections",ELECTRIC:"Electric",EMERGENCYMANAGEMENT:"Emergency Management",ENVIRONMENTANDNATURALRESOURCES:"Environment and Natural Resources",FIRESERVICE:"Fire Service",FISHANDWILDLIFE:"Fish and Wildlife",GAS:"Gas",HEALTHANDHUMANSERVICES:"Health and Human Services",LAWENFORCEMENT:"Law Enforcement",NATURALRESOURCES:"Natural Resources",PARKS:"Parks",PLANNINGANDDEVELOPMENT:"Planning and Development",PROTECTEDAREAS:"Protected Areas",PUBLICWORKS:"Public Works",SEWER:"Sewer",STORMWATER:"Stormwater",TELECOMMUNICATIONS:"Telecommunications",TRANSPORTATION:"Transportation",WATER:"Water Distribution"},l=(e=>(e.HUBPREMIUM="solutions:hubPremium",e.NOTEBOOK="solutions:notebook",e.TRACKINGBASE="solutions:locationtracking",e.TRACKING="solutions:locationtracking:tracking",e.TRACKINGADMIN="solutions:locationtracking:admin",e.TRACKINGADMINANDTRACKING="solutions:locationtracking:admin:tracking",e.VELOCITY="solutions:velocity",e.WORKFLOW="solutions:workflowManager",e))(l||{}),oe=(e=>(e.VELOCITYBIGDATA="portal:publisher:publishBigDataAnalytics",e.VELOCITYFEEDS="portal:publisher:publishFeeds",e.VELOCITYREALTIME="portal:publisher:publishRealTimeAnalytics",e))(oe||{}),et='((typekeywords:Solution,Deployed,"ArcGIS Solution") OR ((typekeywords:Solution,Deployed) AND (created:[1577862000000 TO 1622576880000])))',tt="(typekeywords:Solution,Template)",ne="portal:user:addExternalMembersToGroup",re="portal:user:createItem",P="portal:user:createGroup",le="portal:publisher:publishBigDataAnalytics",L="portal:publisher:publishFeatures",ce="portal:publisher:publishFeeds",de="portal:publisher:publishServerGPServices",ue="portal:publisher:publishRealTimeAnalytics",U="portal:user:shareToGroup",pe="solutions:hubPremium",he="solutions:notebook",me="solutions:locationtracking:admin:tracking",ge="solutions:locationtracking:tracking",fe="solutions:locationtracking:admin",be="solutions:velocity",we="solutions:workflowManager",ye=250,E={SOLUTION_DETAILS:"Solution Details",GLOBAL_NAVIGATION:"Global Nav",ALL_SOLUTIONS:"Solutions",DEPLOYMENTS:"Deployments",ASSISTANT:"Assistant",RESOURCES:"Resources"},it={MINE:"My deployments",ORG:"Organization"};return{a:V,b:K,c:$e,d:Y,e:Re,f:J,g:Me,h:Q,i:Pe,j:Le,k:Ue,l:Ge,m:Be,n:We,o:Fe,p:Ve,q:Ke,r:He,s:ze,t:m,u:Z,v:Ye,w:G,x:qe,y:je,z:Je,A:se,B:v,C:Qe,D:Xe,E:Ze,F:l,G:oe,H:et,I:tt,J:ye,K:E,L:it}},"identity/IdentityManager","identity/OAuthInfo","portal/Portal","intl")
2
+ import{b as y}from"./PZ4L77M5.js";import{ka as C,nb as R,nc as M,oa as x,qa as N,sa as $}from"./JE7L7M3J.js";import{a as I}from"./6LLQFZGG.js";import{u as k}from"./2IHQU2FX.js";import{b as O}from"./LI7AOAAS.js";import{F as b,G as w,H as S,J as A,L as h,h as T,i as r,j as _,r as D}from"./46DQNAMV.js";export default $arcgis.t(([])=>{var V="isMobile";var K="config",H=T`calcite-card{height:100%;padding-bottom:var(--calcite-spacing-base)}@media(max-width:400px){calcite-card{width:100%}}calcite-card:hover img{-webkit-filter:brightness(30%);filter:brightness(30%);-webkit-transition:all .1s ease;-moz-transition:all .1s ease;-o-transition:all .1s ease;-ms-transition:all .1s ease;transition:all .1s ease}calcite-card:hover .hover-text{opacity:1;color:#fff}calcite-card:hover{outline:var(--calcite-spacing-base) solid var(--calcite-color-brand);box-sizing:content-box;cursor:pointer}.hover-text{transition:.1s ease;opacity:0;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);text-align:center;display:flex;flex-direction:row;align-items:center;height:100%;font-size:var(--calcite-spacing-xl)}.card-image-wrap{flex:0 0 auto}.card-image-wrap{width:100%;position:relative;margin-bottom:0;-webkit-box-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto}.card-image{width:100%;display:block}video,img{max-width:100%;height:auto}img{overflow-clip-margin:content-box;overflow:clip}.width-full{width:100%}.deployed-label-override{--calcite-label-text-color: var(--calcite-color-text-3);--calcite-label-margin-bottom: var(--calcite-spacing-none)}.svg-color{fill:var(--calcite-color-text-3)}.padding-end-1-2{padding-inline-end:var(--calcite-spacing-sm)}.padding-bottom-1-2{padding-bottom:var(--calcite-spacing-sm)}.display-flex{display:flex}.display-none{display:none}.flex-direction-column{flex-direction:column}.align-items-center{align-items:center}.font-weight-400,.font-weight-normal{font-weight:400}.font-color-text-2{--calcite-label-text-color: var(--calcite-color-text-2)}.font-line-height{line-height:1.4}.font-size-size--1{font-size:var(--calcite-font-size--1)}.icon-brand-color{--calcite-icon-color: var(--calcite-color-brand)}.header-line-height{--calcite-label-margin-bottom: 0;margin-top:var(--calcite-spacing-sm);margin-bottom:.7rem}.dialog-y-size{--calcite-dialog-size-y: 90% }.dialog-x-size{--calcite-dialog-size-x: 90% }.justify-content-space-between{justify-content:space-between}.panel-bg-color{--calcite-panel-header-background-color: var(--calcite-color-foreground-1);--calcite-panel-background-color: var(--calcite-color-foreground-1)}.cursor-default{cursor:default}`;function z(e){let t="",i="?";return e.forEach(a=>{a.k&&a.v&&(t+=i+a.k+"="+a.v,i="&")}),t}function $e(e){return e?M(e,{}).then(t=>Promise.resolve(!!t)):Promise.resolve(!1)}async function Y(e,t){let i=t,a=await i.getUsername(),s={q:new k().match(e).in("title").and().match(a).in("owner"),filter:"type:Solution",authentication:i},n=(await R(s)).results.map(p=>p.title),{folders:o}=await C(i),d=o.map(p=>p.title),u=[...n,...d].map(p=>p.trim().toLowerCase()),c=e.toLowerCase(),f=u.filter(p=>p===c),F=u.filter(p=>p.startsWith(c));return{conflictingNames:f,similiarNames:F}}async function Re(e,t){return q(e)?{status:!1,type:"empty"}:j(e)?{status:!1,type:"exceed length"}:J(e,"folder")?{status:!1,type:"special character"}:(await Y(e.trim(),t)).conflictingNames.length>0?{status:!1,type:"not unique"}:{status:!0,type:""}}function q(e){return e.length<=0}function j(e){return e.length>ye}function J(e,t){return(t==="item"?/[><~`$^+=|]/u:/[/<>]/u).test(e)}function Me(e){if(e){let t=e.trim();return t?"<div>"+t+"</div>":""}else return""}function Q(e){let t="",i="?";return e.forEach(a=>{a.k&&a.v&&(t+=i+a.k+"="+a.v,i="&")}),t}function Pe(e,t,i,a){let s="";return t?s=a+"/sharing/rest/content/items/"+e+"/info/"+t+Q([{k:"w",v:"400"}]):s=i,s}function Le(e){let t=e?e.replace("https://","").replace("www.",""):"";return t.endsWith("devext.arcgis.com")||t.endsWith("mapsqa.arcgis.com")||t.endsWith("qaext.arcgis.com")?e??"https://www.arcgis.com":"https://www.arcgis.com"}function Ue(e,t,i){return t.some(a=>a.wkid===e?(i=a.defaultExtent,!0):!1),i}function Ge(e,t){return X(t||e)}function Be(e,t="en"){return new Intl.DateTimeFormat(t,{year:"numeric",month:"long",day:"numeric"}).format(e)}function We(e,t){let i="";return e.some(a=>a.startsWith(t)?(i=a.substring(t.length),!0):!1),i}function X(e){let t=e.replace("www.","");return t.endsWith("devext.arcgis.com")?"dev":t.endsWith("mapsqa.arcgis.com")||t.endsWith("qaext.arcgis.com")?"qa":t==="arcgis.com"||t.endsWith(".arcgis.com")?"prod":"dev"}function Fe(e,t){let i=e?.reduce((a,s)=>(a.indexOf(s.id)<0&&a.push(s.id),a),[])||[];return t?i.sort((a,s)=>t.indexOf(a)-t.indexOf(s)):i}function Ve(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Ke(e){return{relevance:"Relevance",title:"Title",new:"New",created:"Date deployed",updated:"Updated",suggested:"Suggested for you"}[e]||e}function He(e){if(!e)return"Unknown error";if(e.message)return e.message;try{let t=JSON.stringify(e);return t&&t!=="{}"?t:e.toString()}catch{return e.toString()}}function ze(e){return e?parseFloat(((Date.now()-e)/1e3).toFixed(2)):0}function m(e,t){(e.key==="Enter"||e.code==="NumpadEnter"||e.key===" ")&&(e.preventDefault(),e.stopPropagation(),t())}async function Z(e,t){let i=await $(e,t);if(!i)throw new Error(`Solution ${e} was not found`);let a=t?.portal.replace("/sharing/rest","")??"https://www.arcgis.com",s=[];if(i.templates[0].item)s=i.templates.map(n=>({id:n.itemId,title:n.item.title,type:n.item.type,typeKeywords:n.item.typeKeywords,dependencies:n.dependencies,snippet:n.item.snippet}));else{let n=i.templates.map(o=>o.type==="Group"?x(o.itemId,t):N(o.itemId,t));s=(await Promise.allSettled(n)).filter(o=>o.status==="fulfilled").map(o=>o.value).map((o,d)=>{let u=typeof o.type>"u"?"group":"item";return{id:o.id,title:o.title,type:o.type??"Group",typeKeywords:o.typeKeywords,dependencies:i.templates[d].dependencies,snippet:o.snippet,url:`${a}/home/${u}.html?id=${o.id}`}})}return s}function Ye(e,t,i){let a=e.templates.map(c=>c.type),s=[];s.push(re),a.indexOf("Group")>=0&&(s.push(P),s.push(U)),a.indexOf("Feature Service")>=0&&s.push(L);let n=a.indexOf("Feed")>-1;n&&s.push(ce);let o=a.indexOf("Big Data Analytic")>-1;o&&s.push(le);let d=a.indexOf("Real Time Analytic")>-1;d&&s.push(ue),(n||o||d)&&s.push(be),a.indexOf("Workflow")>-1&&(s.push(P),s.push(L),s.push(U),s.push(we)),a.indexOf("Geoprocessing Service")>-1&&(s.push(de),i.IsEnterprisePortal&&s.push(he));let u=e.templates.reduce((c,f)=>c.concat(f.item.typeKeywords||[]),[]);return te(s,u,i),ie(s,t),ee(s,e),s}function ee(e,t){t.templates.some(i=>i.type==="Group"&&i.item?.membershipAccess==="collaboration")&&e.push(ne)}function te(e,t,i){let a=G(i),s=ae(i);["Location Tracking View"].some(n=>t.indexOf(n)>-1)&&(!a&&!s?e.push(me):a&&!s?e.push(ge):!a&&s&&e.push(fe))}function ie(e,t){["HubPremium"].some(i=>t.indexOf(i)>-1)&&e.push(pe)}function G(e){return e.PortalUserSubset?.role==="org_admin"&&!e.PortalUserSubset?.roleId}function ae(e){return e.PortalSubset?.locationTrackingEnabled||!1}function qe(e,t){let i={leadingMessages:[],bulletedMessages:[],trailingMessages:[]},a=[l.NOTEBOOK,l.VELOCITY,l.HUBPREMIUM,l.WORKFLOW,l.TRACKINGBASE],s=g(e,t,l.VELOCITY);s&&i.leadingMessages.push(s);let n=g(e,t,l.NOTEBOOK);n&&i.leadingMessages.push(n);let o=g(e,t,l.HUBPREMIUM);o&&i.leadingMessages.push(o);let d=g(e,t,l.WORKFLOW);d&&i.leadingMessages.push(d),t=t.filter(c=>a.indexOf(c)<0),t.forEach(c=>{i.bulletedMessages.push(B(e,c))});let u=g(e,t,l.TRACKINGBASE);return u&&i.trailingMessages.push(u),(i.leadingMessages.length>0||i.trailingMessages.length>0||i.bulletedMessages.length>0)&&i.trailingMessages.push(e.missingPrivilegesPopup.suggestedProblemRemedyMessage),i}function g(e,t,i){return t.filter(a=>a.includes(i)).length>0?B(e,i):""}function B(e,t){let i=e.missingPrivilegesPopup.requiredPrivilegesList,a="";switch(t){case"portal:user:createItem":a=i.createItem;break;case"portal:publisher:publishFeatures":a=i.publishFeatures;break;case"portal:user:createGroup":a=i.createGroup;break;case"portal:user:shareToGroup":a=i.shareToGroup;break;case"portal:user:addExternalMembersToGroup":a=i.addMembers;break;case"portal:publisher:publishFeeds":a=i.publishFeeds;break;case"portal:publisher:publishBigDataAnalytics":a=i.publishBigDataAnalytics;break;case"portal:publisher:publishRealTimeAnalytics":a=i.publishRealTimeAnalytics;break;case"solutions:locationtracking:admin:tracking":a=i.requiresLocationTrackingAndAdmin;break;case"solutions:locationtracking:tracking":a=i.requiresLocationTracking;break;case"solutions:locationtracking:admin":a=i.requiresAdmin;break;case"solutions:hubPremium":a=i.hubPremium;break;case"solutions:workflowManager":a=i.workflowManager;break;case"solutions:velocity":a=i.velocity;break;case"solutions:notebook":a=i.requiresNotebookServer;break;case"portal:publisher:publishServerGPServices":a=i.publishGPServices;break;case"writable:Enterprise":a=i.writableEnterprise;break;case"writable:Online":a=i.writableOnline.replace("{{url}}","https://status.arcgis.com");break}return a}function je(e,t){let i=W(t),a=z([{k:"id",v:e}])||"";return i?`${i}/home/item.html${a}`:""}function Je(e,t,i,a){let s=a||W(i);return s?`${s}/sharing/rest/content/items/${e}/resources/${t}`:""}function W(e){return e?.PortalSubset?.orgUrl||e?.PortalUrl||""}function se(e,t){let i=new URL(e);return i.searchParams.set("token",t),i.toString()}var v=class extends S{constructor(){super(),this.deployedDate="",this.description="",this.diagramKey="",this.heading="",this.itemId="",this.owner="",this.thumbnail="",this.updateAvailable=!1,this.templateInfos=[],this._isDeleteOpen=!1,this._isDiagramOpen=!1,this.isMobile=!1,this.templateInfoGraph=[],this._configureTitlesOpen=!1,this._thumbnailUrl="",this._translations=I({name:"solution-deployed-card",blocking:!0}),this._configContextConsumer=y({context:K,subscribe:!0,callback:async t=>{t&&(this._isOrgAdmin=G(t.authentication),this._thumbnailUrl=`${this.thumbnail}&token=${t.userSession?.token}`)}}),this._deleteDialogRef=b(),this._diagramDialogRef=b(),this._isOrgAdmin=!1,this._isMobileContextConsumer=y({context:V,subscribe:!0,callback:t=>this.isMobile=t}),this.deployedCardSelected=D(),this.listenOn(window,"sessionRefreshed",t=>{this._updateThumbnailToken(t.detail)})}static{this.properties={card:0,deployedDate:1,description:1,diagramKey:1,heading:1,itemId:1,owner:1,thumbnail:1,updateAvailable:5,templateInfos:0,_isDeleteOpen:16,_isDiagramOpen:16,isMobile:16,templateInfoGraph:16,_configureTitlesOpen:16,_thumbnailUrl:16,_translations:16}}static{this.styles=H}get _telemetry(){return this._configContextConsumer.value?.telemetrySession}async renderDeleteDialog(){return this._isDeleteOpen=!0,this._renderDeleteDialog(),this._deleteDialogRef.value}async renderDiagramDialog(t){return await this._viewDiagram(t),await this._renderDiagramDialog(),this._diagramDialogRef.value}async getTemplates(){return this._processTemplates(this.card)}async load(){this._isMobileContextConsumer.value&&(this.isMobile=this._isMobileContextConsumer.value)}render(){return r`<calcite-card .label=${this.description} @click=${this._cardSelected} @keydown=${t=>m(t,()=>this._cardSelected())}>${this._getImage()}${this._getHeader()}<p class="font-color-text-2 font-line-height font-size-size--1" slot=description>${this.description}</p><div class="width-full display-flex flex-direction-column" slot=footer-start><div class="padding-bottom-1-2">${this.owner!==""&&this._getOwnerLabel()||""}${this._getDeployedDate()}</div>${this._getConfigureButton()}</div></calcite-card>${this._renderDeleteDialog()}${this._renderDiagramDialog()}${this._renderConfigureTitlesDialog()}`}_getImage(){return r`<div class="card-image-wrap" slot=thumbnail><img alt=${this.heading??h} class="thumbnail card-image" src=${this._thumbnailUrl??h}><div class="hover-text">${this._translations.openSolution}</div></div>`}_getHeader(){return r`<div class="display-flex justify-content-space-between header-line-height" slot=heading><calcite-label layout=inline-space-between scale=l>${this.heading}</calcite-label></div>`}_getOwnerLabel(){return r`<calcite-label class="font-weight-400 padding-end-1-2" layout=inline scale=s>${`${this._translations.owner}:`}<calcite-link class="font-weight-normal" @click=${this._openUserProfile} @keydown=${t=>m(t,()=>this._openUserProfile(t))}>${this.owner}</calcite-link></calcite-label>`}_getDeployedDate(){return r`<div class="display-flex align-items-center"><div class="padding-end-1-2"><svg height=16px viewBox="0 0 32 32" width=16px xmlns=http://www.w3.org/2000/svg>${_`<path class="svg-color" d="M29.963 7.672a1.586 1.586 0 0 0-1.584-1.585h-5.274a.187.187 0 0 1-.188-.187V3.977A2 2 0 0 0 20.825 2h-9.672A2.095 2.095 0 0 0 9.06 4.093V5.9a.187.187 0 0 1-.187.187H3.598a1.586 1.586 0 0 0-1.584 1.585v4.016a.281.281 0 0 0 .281.28H4.9l.014-.013V9.153a.177.177 0 0 1 .177-.177h21.46a.456.456 0 0 1 .449.45v13.742A1.832 1.832 0 0 1 25.168 25h-8.892a.568.568 0 0 1-.534-.373 3.98 3.98 0 0 0-7.6.373H5.657a.757.757 0 0 1-.757-.757v-3.055A.188.188 0 0 0 4.714 21H2.028l-.014.014v4.58a2.35 2.35 0 0 0 2.347 2.346h4.161a3.963 3.963 0 0 0 6.8.256.569.569 0 0 1 .475-.256h12.065a2.102 2.102 0 0 0 2.101-2.101zM21 5.625a.375.375 0 0 1-.375.375h-9.25A.375.375 0 0 1 11 5.625V4.45a.456.456 0 0 1 .45-.45h9.1a.456.456 0 0 1 .45.45zM12 28a2 2 0 1 1 2-2 2 2 0 0 1-2 2z" /><path class="svg-color" d="M13.273 17.994a.57.57 0 0 1 .479.262A3.73 3.73 0 0 0 17 20a3.74 3.74 0 0 0 3.403-2.006h3.41a.188.188 0 0 0 .187-.188v-2.589a.187.187 0 0 0-.188-.188H20.8A3.8 3.8 0 0 0 17 12a4.058 4.058 0 0 0-3.69 2.647.568.568 0 0 1-.537.383H1.093a.094.094 0 0 0-.093.093V17.9a.094.094 0 0 0 .094.094zM17 13.9a2.1 2.1 0 1 1-2.1 2.1 2.1 2.1 0 0 1 2.1-2.1z" />`}</svg></div><calcite-label class="deployed-label-override" scale=s>${this._translations.deployedDate.replace("{{date}}",this.deployedDate)}</calcite-label></div>`}_getConfigureButton(){let t=this._configContextConsumer.value?.userSession?.username,i=this._configContextConsumer.value?.authentication?.CanUpdateSolution,a=this.card?.owner===t||this._isOrgAdmin||i,s=this.card?.owner===t||this._isOrgAdmin,n=a?"display-none":"";return r`<calcite-split-button appearance=outline aria-label=${this._translations.openSolution??h} dropdown-label=${this._translations.moreActions??h} kind=neutral @calciteSplitButtonPrimaryClick=${this._cardSelected} @click=${o=>o.stopPropagation()} @keydown=${o=>o.stopPropagation()} overlay-positioning=fixed primary-text=${this._translations.openSolution??h} width=full><calcite-dropdown-group selection-mode=none>${!this.isMobile&&r`<calcite-dropdown-item icon-start=model @click=${this._viewDiagram} @keydown=${o=>m(o,()=>this._viewDiagram(o))}>${this._translations.viewDiagram}</calcite-dropdown-item>`||""}<calcite-dropdown-item icon-start=file-text @click=${this._viewDocumentation} @keydown=${o=>m(o,()=>this._viewDocumentation(o))}>${this._translations.documentation}</calcite-dropdown-item><calcite-dropdown-item icon-start=information @click=${this._viewItemDetails} @keydown=${o=>m(o,()=>this._viewItemDetails(o))}>${this._translations.viewItemDetails}</calcite-dropdown-item>${!this.isMobile&&a&&r`<calcite-dropdown-item icon-start=edit-attributes id=solution-configure-titles-dropdown @click=${async()=>{this.templateInfos=await this._processTemplates(this.card),this._configureTitlesOpen=!0}} @keydown=${o=>m(o,async()=>{this.templateInfos=await this._processTemplates(this.card),this._configureTitlesOpen=!0})}>${this._translations.renameItems}</calcite-dropdown-item>`||""}${!this.isMobile&&s&&r`<calcite-dropdown-item icon-start=trash @click=${this._deleteSolution} @keydown=${o=>m(o,()=>this._deleteSolution(o))}>${this._translations.deleteSolution}</calcite-dropdown-item>`||""}</calcite-dropdown-group><calcite-tooltip class=${A(n)} overlay-positioning=fixed reference-element=solution-configure-titles-dropdown><span>${this._translations.mustOwnSolution}</span></calcite-tooltip></calcite-split-button>`}_renderDeleteDialog(){return this._isDeleteOpen?r`<solution-delete-dialog .card=${this.card} @solutionDeleteDialogOpen=${t=>{this._isDeleteOpen=t.detail}} .open=${this._isDeleteOpen} source="Card Dropdown" ${w(this._deleteDialogRef)}></solution-delete-dialog>`:""}_renderDiagramDialog(){return this._isDiagramOpen?r`<calcite-dialog class="dialog-y-size dialog-x-size panel-bg-color" .heading=${this._translations.diagramTitle.replace("{{solution}}",this.card?.title??"")} id=${this._translations.diagramTitle.replace("{{solution}}",this.card?.title??"")??h} modal .open=${this._isDiagramOpen} @calciteDialogClose=${()=>{this._isDiagramOpen=!1}} outside-close-disabled scale=m width=l ${w(this._diagramDialogRef)}><solution-item-diagram .diagramKey=${this.diagramKey} .templateInfoGraph=${this.templateInfoGraph} .typeKeywords=${this.card?.typeKeywords}></solution-item-diagram></calcite-dialog>`:""}_renderConfigureTitlesDialog(){return this._configureTitlesOpen?r`<solution-configure-titles .card=${this.card} @solutionConfigureTitlesBeforeClose=${async()=>{this._processTemplates(this.card).then(t=>{this.templateInfos=t}),this._configureTitlesOpen=!1}} @solutionItemsTitlesChanged=${async()=>{this._processTemplates(this.card).then(t=>{this.templateInfos=t})}} .open=${this._configureTitlesOpen} source="Card Dropdown" .templateInfos=${this.templateInfos}></solution-configure-titles>`:""}_cardSelected(){this.deployedCardSelected.emit({card:this.card,cardRef:this.el})}async _viewDiagram(t){t.stopPropagation(),this.card&&(this._telemetry?.logEvent({category:E.DEPLOYMENTS,action:"View Diagram",dimensions:[this.card.title||"",this.card.deployCommonId||"",this.card.deployVersion||"","Card Dropdown"]}),this.templateInfoGraph=await this._processTemplates(this.card),this._isDiagramOpen=!0)}_viewDocumentation(t){t.stopPropagation(),this._telemetry?.logEvent({category:E.DEPLOYMENTS,action:"Open Help",dimensions:[this.card?.title||"",this.card?.deployCommonId||"",this.card?.deployVersion||"","Card Dropdown"]}),window.open(this.card.learnMoreUrl,"_blank")}_viewItemDetails(t){t.stopPropagation(),this._telemetry?.logEvent({category:E.DEPLOYMENTS,action:"Open Item Details",dimensions:[this.card?.title||"",this.card?.deployCommonId||"",this.card?.deployVersion||"","Card Dropdown"]}),window.open(this.card.itemUrl,"_blank")}_deleteSolution(t){t.stopPropagation(),this._isDeleteOpen=!0}_openUserProfile(t){t.stopPropagation();let i=this._configContextConsumer.value?.authentication?.PortalSubset?.orgUrl;i&&window.open(`${i}/home/user.html?user=${this.owner}`,"_blank")}async _processTemplates(t){return await Z(t.id,this._configContextConsumer.value.userSession)}_updateThumbnailToken(t){this._thumbnailUrl!==""&&(this._thumbnailUrl=se(this._thumbnailUrl,t))}};O("solution-deployed-card",v);var Qe=500,Xe={AEC:"Architecture, Engineering, and Construction (AEC)",AIRPORTPORTRAIL:"Airports, Ports, and Rails",BUSINESS:"Business",CONSERVATION:"Conservation",DEFENSE:"Defense",FACILITIES:"Facilities",HEALTHANDHUMANSERVICES:"Health and Human Services",PIPELINE:"Pipeline",PUBLICSAFETY:"Public Safety",RENEWABLES:"Renewables",STATEANDLOCALGOVERNMENT:"State and Local Government",TELECOMMUNICATIONS:"Telecommunications",UTILITIES:"Utilities"},Ze={AIRPORT:"Airports",AGRICULTURE:"Agriculture",ASSESSMENTANDTAXATION:"Assessment and Taxation",DISTRICTENERGY:"District Energy",ELECTIONS:"Elections",ELECTRIC:"Electric",EMERGENCYMANAGEMENT:"Emergency Management",ENVIRONMENTANDNATURALRESOURCES:"Environment and Natural Resources",FIRESERVICE:"Fire Service",FISHANDWILDLIFE:"Fish and Wildlife",GAS:"Gas",HEALTHANDHUMANSERVICES:"Health and Human Services",LAWENFORCEMENT:"Law Enforcement",NATURALRESOURCES:"Natural Resources",PARKS:"Parks",PLANNINGANDDEVELOPMENT:"Planning and Development",PROTECTEDAREAS:"Protected Areas",PUBLICWORKS:"Public Works",SEWER:"Sewer",STORMWATER:"Stormwater",TELECOMMUNICATIONS:"Telecommunications",TRANSPORTATION:"Transportation",WATER:"Water Distribution"},l=(e=>(e.HUBPREMIUM="solutions:hubPremium",e.NOTEBOOK="solutions:notebook",e.TRACKINGBASE="solutions:locationtracking",e.TRACKING="solutions:locationtracking:tracking",e.TRACKINGADMIN="solutions:locationtracking:admin",e.TRACKINGADMINANDTRACKING="solutions:locationtracking:admin:tracking",e.VELOCITY="solutions:velocity",e.WORKFLOW="solutions:workflowManager",e))(l||{}),oe=(e=>(e.VELOCITYBIGDATA="portal:publisher:publishBigDataAnalytics",e.VELOCITYFEEDS="portal:publisher:publishFeeds",e.VELOCITYREALTIME="portal:publisher:publishRealTimeAnalytics",e))(oe||{}),et='((typekeywords:Solution,Deployed,"ArcGIS Solution") OR ((typekeywords:Solution,Deployed) AND (created:[1577862000000 TO 1622576880000])))',tt="(typekeywords:Solution,Template)",ne="portal:user:addExternalMembersToGroup",re="portal:user:createItem",P="portal:user:createGroup",le="portal:publisher:publishBigDataAnalytics",L="portal:publisher:publishFeatures",ce="portal:publisher:publishFeeds",de="portal:publisher:publishServerGPServices",ue="portal:publisher:publishRealTimeAnalytics",U="portal:user:shareToGroup",pe="solutions:hubPremium",he="solutions:notebook",me="solutions:locationtracking:admin:tracking",ge="solutions:locationtracking:tracking",fe="solutions:locationtracking:admin",be="solutions:velocity",we="solutions:workflowManager",ye=250,E={SOLUTION_DETAILS:"Solution Details",GLOBAL_NAVIGATION:"Global Nav",ALL_SOLUTIONS:"Solutions",DEPLOYMENTS:"Deployments",ASSISTANT:"Assistant",RESOURCES:"Resources"},it={MINE:"My deployments",ORG:"Organization"};return{a:V,b:K,c:$e,d:Y,e:Re,f:J,g:Me,h:Q,i:Pe,j:Le,k:Ue,l:Ge,m:Be,n:We,o:Fe,p:Ve,q:Ke,r:He,s:ze,t:m,u:Z,v:Ye,w:G,x:qe,y:je,z:Je,A:se,B:v,C:Qe,D:Xe,E:Ze,F:l,G:oe,H:et,I:tt,J:ye,K:E,L:it}},"identity/IdentityManager","identity/OAuthInfo","portal/Portal","intl")
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import{a as S}from"./UGKLBL7D.js";import"./3LEJ44U2.js";import d from"./KDIUYXBA.js";import a from"./UUYUTETH.js";import{a as $}from"./LFIJXE3U.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import{b as I}from"./VU3OQQKP.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"./UGKLBL7D.js";import"./3LEJ44U2.js";import d from"./KDIUYXBA.js";import a from"./UUYUTETH.js";import{a as $}from"./6LLQFZGG.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import{b as I}from"./LI7AOAAS.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 b from"./RTSKNY33.js";import{b as o}from"./PZ4L77M5.js";import{a as s}from"./LFIJXE3U.js";import{b as r}from"./VU3OQQKP.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"./QRPBAR4V.js";import{b as o}from"./PZ4L77M5.js";import{a as s}from"./6LLQFZGG.js";import{b as r}from"./LI7AOAAS.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)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import{a as h}from"./LFIJXE3U.js";import{b as p}from"./VU3OQQKP.js";import{H as d,h as r,i as l,l as c,r as n}from"./46DQNAMV.js";var y=r`:host{display:block}.padding-start-1{padding-inline-start:1rem}.border-override{--calcite-accordion-border-color: var(--calcite-color-border-1) !important}.display-flex{display:flex}.align-center{align-items:center}.solution-list-item-label{color:var(--calcite-color-text-1);font-size:var(--calcite-font-size--1)}.solution-list-item-label,.solution-list-item-description{font-family:var(--calcite-font-family);font-weight:var(--calcite-font-weight-normal);overflow-wrap:break-word;word-break:break-word}.solution-list-item-description{font-size:var(--calcite-font-size--2);margin-block-start:.125rem;color:var(--calcite-color-text-3)}.solution-list-item-content{display:flex;flex:1 1 auto;flex-direction:column;justify-content:center;line-height:1.375}.underline{text-decoration:underline}calcite-chip{--calcite-chip-icon-color: var(--calcite-color-brand)}`,a=class extends d{constructor(){super(...arguments),this.itemRelationshipDependencies=[],this.linkType="item",this.listSelectionMode="none",this.reuseWarning="",this.templateInfos=[],this.typeKeywords=[],this._sortedTemplateInfos=[],this._translations=h({name:"solution-item-accordion",blocking:!0}),this._sortOrder=["Hub Site Application","Hub Page","Web Experience","Instant App","Web Mapping Application","Dashboard","StoryMap","Form","QuickCapture Project","Workflow","Big Data Analytic (hosted)","Real Time Analytic (hosted)","Feed (hosted)","Tool","Notebook","Data Pipeline","Project Package","Desktop Application Template","TypeNotFound","Web Map","Web Scene","Feature Layer (hosted, view)","Feature Layer (hosted)","Table (hosted, view)","Table (hosted)","Tile Layer","CSV","Microsoft Excel","Microsoft Word","Report Template","Rule Package","Group"],this.solutionItemHover=n(),this.solutionItemSelect=n(),this.solutionTypeHover=n()}static{this.properties={itemRelationshipDependencies:0,linkType:1,listSelectionMode:1,reuseWarning:1,templateInfos:0,typeKeywords:0,_sortedTemplateInfos:16,_translations:16}}static{this.styles=y}willUpdate(e){e.has("templateInfos")&&(this.hasUpdated||this.templateInfos?.length>0)&&this.templateInfosWatchHandler()}async templateInfosWatchHandler(){this._sortedTemplateInfos=this._sortTemplates()}async collapseAll(){this.el?.shadowRoot?.querySelectorAll("calcite-accordion-item")?.forEach(e=>{e.expanded=!1})}async deselectAll(){(this.listSelectionMode==="single"||this.listSelectionMode==="single-persist")&&this.el?.shadowRoot?.querySelectorAll("calcite-list-item")?.forEach(e=>{e.selected&&(e.selected=!1),(e.parentElement?.parentElement).expanded&&((e.parentElement?.parentElement).expanded=!1)})}async expandItemById(e){this.el?.shadowRoot?.querySelectorAll("calcite-list-item")?.forEach(t=>{t.id===e&&((t.parentElement?.parentElement).expanded=!0)})}async expandFirstItem(){let e=this.el?.shadowRoot?.querySelectorAll("calcite-list-item");e?.length&&((e[0].parentElement?.parentElement).expanded=!0)}async expandItems(e){this.el?.shadowRoot?.querySelectorAll("calcite-list-item")?.forEach(t=>{e.indexOf(t.id)>-1&&((t.parentElement?.parentElement).expanded=!0)})}async selectItem(e){(this.listSelectionMode==="single"||this.listSelectionMode==="single-persist")&&this.el?.shadowRoot?.querySelectorAll("calcite-list-item")?.forEach(t=>{t.id===e&&(t.selected=!0,(t.parentElement?.parentElement).expanded=!0)})}async selectFirstItem(){let e=this.el?.shadowRoot?.querySelectorAll("calcite-list-item");e?.length&&(e[0].selected=!0,(e[0].parentElement?.parentElement).expanded=!0)}async selectItems(e){this.listSelectionMode==="multiple"&&this.el?.shadowRoot?.querySelectorAll("calcite-list-item")?.forEach(t=>{e.indexOf(t.id)>-1&&(t.selected=!0,(t.parentElement?.parentElement).expanded=!0)})}async load(){this._sortedTemplateInfos=this._sortTemplates()}render(){return this._getAccordion()}_deselectOthers(e){(this.listSelectionMode==="single"||this.listSelectionMode==="single-persist")&&this.el?.shadowRoot?.querySelectorAll("calcite-list-item")?.forEach(t=>{t.id!==e&&(t.selected=!1)})}_getAccordion(){let e=[],t=this._sortedTemplateInfos.reduce((i,o)=>{let s=this._getTypeForDisplay(o.type,o.typeKeywords);return e.indexOf(s)<0&&(e.push(s),i.push(this._getAccordionItem(o))),i},[]);return l`<calcite-accordion class="border-override" selection-mode=single>${t}</calcite-accordion>`}_getAccordionItem(e){let t=this._getTypeForDisplay(e.type,e.typeKeywords),i=this._sortedTemplateInfos.filter(o=>this._getTypeForDisplay(o.type,o.typeKeywords)===t);return l`<calcite-accordion-item .heading=${`${t} (${i.length})`} @mouseenter=${()=>this.solutionTypeHover.emit({itemType:t,entering:!0})} @mouseleave=${()=>this.solutionTypeHover.emit({itemType:t,entering:!1})}><solution-item-icon class="padding-start-1 display-flex align-center" slot=actions-start .type=${e.type} .typeKeywords=${e.typeKeywords}></solution-item-icon>${this._getList(i)}</calcite-accordion-item>`}_getList(e){let t=this._sortTemplatesByTitle(e);return l`<calcite-list .label=${this._translations.solutionsTemplates} selection-appearance=border .selectionMode=${this.listSelectionMode}>${t.map(i=>this._getListItem(i))}</calcite-list>`}_getListItem(e){let t=this.typeKeywords.includes("Deployed")&&e.url,i=this.linkType==="action";return l`<calcite-list-item id=${e.id??c} @mouseenter=${()=>this.solutionItemHover.emit({itemId:e.id,entering:!0})} @mouseleave=${()=>this.solutionItemHover.emit({itemId:e.id,entering:!1})} @calciteListItemSelect=${()=>{this._deselectOthers(e.id),this.solutionItemSelect.emit({itemId:e.id,selected:!0}),t&&!i&&window.open(e.url,"_blank")}} .value=${e.id}><div class="solution-list-item-content" slot=content><div class=${`solution-list-item-label ${t&&!i?"underline":""}`}>${e.title}</div><div class="solution-list-item-description">${e.snippet}</div></div>${this.itemRelationshipDependencies.length>0&&this.itemRelationshipDependencies.some(o=>o===e.id)&&this.reuseWarning&&this._getReuseWarningChip()||""}${t&&i?l`<div slot=actions-end><calcite-action icon=launch .id=${`${e.id}-launch`} @click=${()=>window.open(e.url,"_blank")} text></calcite-action><calcite-tooltip overlay-positioning=fixed .referenceElement=${`${e.id}-launch`}><span>${this._translations?.openDetails}</span></calcite-tooltip></div>`:null}</calcite-list-item>`}_sortTemplatesByTitle(e){return e.sort((t,i)=>t.title<i.title?-1:t.title>i.title?1:0)}_sortTemplates(){return this.templateInfos.sort((e,t)=>{let i=this._getTypeForSort(e),o=this._getTypeForSort(t),s=this._sortOrder.indexOf(i),m=this._sortOrder.indexOf(o);return s-m})}_getTypeForSort(e){let t=this._getTypeForDisplay(e.type,e.typeKeywords);return this._sortOrder.indexOf(t)<0&&(t="TypeNotFound"),t}_getTypeForDisplay(e,t){let i=e;if(e==="Feature Service"){let o=t.indexOf("View Service")>-1,s=t.indexOf("Table")>-1;i=o&&s?"Table (hosted, view)":s?"Table (hosted)":o?"Feature Layer (hosted, view)":"Feature Layer (hosted)"}return e==="Web Mapping Application"&&(i=t.indexOf("configurableApp")>-1?"Instant App":i),i=e==="Geoprocessing Service"?"Tool":i,i=e==="Feed"?"Feed (hosted)":i,i=e==="Real Time Analytic"?"Real Time Analytic (hosted)":i,i=e==="Big Data Analytic"?"Big Data Analytic (hosted)":i,i=e==="Vector Tile Service"?"Tile Layer":i,i}_getReuseWarningChip(){return l`<calcite-chip icon=information kind=neutral .label=${this.reuseWarning} scale=s slot=actions-end>${this.reuseWarning}</calcite-chip>`}};p("solution-item-accordion",a);export{a};
2
+ import{a as h}from"./6LLQFZGG.js";import{b as p}from"./LI7AOAAS.js";import{H as d,h as r,i as l,l as c,r as n}from"./46DQNAMV.js";var y=r`:host{display:block}.padding-start-1{padding-inline-start:1rem}.border-override{--calcite-accordion-border-color: var(--calcite-color-border-1) !important}.display-flex{display:flex}.align-center{align-items:center}.solution-list-item-label{color:var(--calcite-color-text-1);font-size:var(--calcite-font-size--1)}.solution-list-item-label,.solution-list-item-description{font-family:var(--calcite-font-family);font-weight:var(--calcite-font-weight-normal);overflow-wrap:break-word;word-break:break-word}.solution-list-item-description{font-size:var(--calcite-font-size--2);margin-block-start:.125rem;color:var(--calcite-color-text-3)}.solution-list-item-content{display:flex;flex:1 1 auto;flex-direction:column;justify-content:center;line-height:1.375}.underline{text-decoration:underline}calcite-chip{--calcite-chip-icon-color: var(--calcite-color-brand)}`,a=class extends d{constructor(){super(...arguments),this.itemRelationshipDependencies=[],this.linkType="item",this.listSelectionMode="none",this.reuseWarning="",this.templateInfos=[],this.typeKeywords=[],this._sortedTemplateInfos=[],this._translations=h({name:"solution-item-accordion",blocking:!0}),this._sortOrder=["Hub Site Application","Hub Page","Web Experience","Instant App","Web Mapping Application","Dashboard","StoryMap","Form","QuickCapture Project","Workflow","Big Data Analytic (hosted)","Real Time Analytic (hosted)","Feed (hosted)","Tool","Notebook","Data Pipeline","Project Package","Desktop Application Template","TypeNotFound","Web Map","Web Scene","Feature Layer (hosted, view)","Feature Layer (hosted)","Table (hosted, view)","Table (hosted)","Tile Layer","CSV","Microsoft Excel","Microsoft Word","Report Template","Rule Package","Group"],this.solutionItemHover=n(),this.solutionItemSelect=n(),this.solutionTypeHover=n()}static{this.properties={itemRelationshipDependencies:0,linkType:1,listSelectionMode:1,reuseWarning:1,templateInfos:0,typeKeywords:0,_sortedTemplateInfos:16,_translations:16}}static{this.styles=y}willUpdate(e){e.has("templateInfos")&&(this.hasUpdated||this.templateInfos?.length>0)&&this.templateInfosWatchHandler()}async templateInfosWatchHandler(){this._sortedTemplateInfos=this._sortTemplates()}async collapseAll(){this.el?.shadowRoot?.querySelectorAll("calcite-accordion-item")?.forEach(e=>{e.expanded=!1})}async deselectAll(){(this.listSelectionMode==="single"||this.listSelectionMode==="single-persist")&&this.el?.shadowRoot?.querySelectorAll("calcite-list-item")?.forEach(e=>{e.selected&&(e.selected=!1),(e.parentElement?.parentElement).expanded&&((e.parentElement?.parentElement).expanded=!1)})}async expandItemById(e){this.el?.shadowRoot?.querySelectorAll("calcite-list-item")?.forEach(t=>{t.id===e&&((t.parentElement?.parentElement).expanded=!0)})}async expandFirstItem(){let e=this.el?.shadowRoot?.querySelectorAll("calcite-list-item");e?.length&&((e[0].parentElement?.parentElement).expanded=!0)}async expandItems(e){this.el?.shadowRoot?.querySelectorAll("calcite-list-item")?.forEach(t=>{e.indexOf(t.id)>-1&&((t.parentElement?.parentElement).expanded=!0)})}async selectItem(e){(this.listSelectionMode==="single"||this.listSelectionMode==="single-persist")&&this.el?.shadowRoot?.querySelectorAll("calcite-list-item")?.forEach(t=>{t.id===e&&(t.selected=!0,(t.parentElement?.parentElement).expanded=!0)})}async selectFirstItem(){let e=this.el?.shadowRoot?.querySelectorAll("calcite-list-item");e?.length&&(e[0].selected=!0,(e[0].parentElement?.parentElement).expanded=!0)}async selectItems(e){this.listSelectionMode==="multiple"&&this.el?.shadowRoot?.querySelectorAll("calcite-list-item")?.forEach(t=>{e.indexOf(t.id)>-1&&(t.selected=!0,(t.parentElement?.parentElement).expanded=!0)})}async load(){this._sortedTemplateInfos=this._sortTemplates()}render(){return this._getAccordion()}_deselectOthers(e){(this.listSelectionMode==="single"||this.listSelectionMode==="single-persist")&&this.el?.shadowRoot?.querySelectorAll("calcite-list-item")?.forEach(t=>{t.id!==e&&(t.selected=!1)})}_getAccordion(){let e=[],t=this._sortedTemplateInfos.reduce((i,o)=>{let s=this._getTypeForDisplay(o.type,o.typeKeywords);return e.indexOf(s)<0&&(e.push(s),i.push(this._getAccordionItem(o))),i},[]);return l`<calcite-accordion class="border-override" selection-mode=single>${t}</calcite-accordion>`}_getAccordionItem(e){let t=this._getTypeForDisplay(e.type,e.typeKeywords),i=this._sortedTemplateInfos.filter(o=>this._getTypeForDisplay(o.type,o.typeKeywords)===t);return l`<calcite-accordion-item .heading=${`${t} (${i.length})`} @mouseenter=${()=>this.solutionTypeHover.emit({itemType:t,entering:!0})} @mouseleave=${()=>this.solutionTypeHover.emit({itemType:t,entering:!1})}><solution-item-icon class="padding-start-1 display-flex align-center" slot=actions-start .type=${e.type} .typeKeywords=${e.typeKeywords}></solution-item-icon>${this._getList(i)}</calcite-accordion-item>`}_getList(e){let t=this._sortTemplatesByTitle(e);return l`<calcite-list .label=${this._translations.solutionsTemplates} selection-appearance=border .selectionMode=${this.listSelectionMode}>${t.map(i=>this._getListItem(i))}</calcite-list>`}_getListItem(e){let t=this.typeKeywords.includes("Deployed")&&e.url,i=this.linkType==="action";return l`<calcite-list-item id=${e.id??c} @mouseenter=${()=>this.solutionItemHover.emit({itemId:e.id,entering:!0})} @mouseleave=${()=>this.solutionItemHover.emit({itemId:e.id,entering:!1})} @calciteListItemSelect=${()=>{this._deselectOthers(e.id),this.solutionItemSelect.emit({itemId:e.id,selected:!0}),t&&!i&&window.open(e.url,"_blank")}} .value=${e.id}><div class="solution-list-item-content" slot=content><div class=${`solution-list-item-label ${t&&!i?"underline":""}`}>${e.title}</div><div class="solution-list-item-description">${e.snippet}</div></div>${this.itemRelationshipDependencies.length>0&&this.itemRelationshipDependencies.some(o=>o===e.id)&&this.reuseWarning&&this._getReuseWarningChip()||""}${t&&i?l`<div slot=actions-end><calcite-action icon=launch .id=${`${e.id}-launch`} @click=${()=>window.open(e.url,"_blank")} text></calcite-action><calcite-tooltip overlay-positioning=fixed .referenceElement=${`${e.id}-launch`}><span>${this._translations?.openDetails}</span></calcite-tooltip></div>`:null}</calcite-list-item>`}_sortTemplatesByTitle(e){return e.sort((t,i)=>t.title<i.title?-1:t.title>i.title?1:0)}_sortTemplates(){return this.templateInfos.sort((e,t)=>{let i=this._getTypeForSort(e),o=this._getTypeForSort(t),s=this._sortOrder.indexOf(i),m=this._sortOrder.indexOf(o);return s-m})}_getTypeForSort(e){let t=this._getTypeForDisplay(e.type,e.typeKeywords);return this._sortOrder.indexOf(t)<0&&(t="TypeNotFound"),t}_getTypeForDisplay(e,t){let i=e;if(e==="Feature Service"){let o=t.indexOf("View Service")>-1,s=t.indexOf("Table")>-1;i=o&&s?"Table (hosted, view)":s?"Table (hosted)":o?"Feature Layer (hosted, view)":"Feature Layer (hosted)"}return e==="Web Mapping Application"&&(i=t.indexOf("configurableApp")>-1?"Instant App":i),i=e==="Geoprocessing Service"?"Tool":i,i=e==="Feed"?"Feed (hosted)":i,i=e==="Real Time Analytic"?"Real Time Analytic (hosted)":i,i=e==="Big Data Analytic"?"Big Data Analytic (hosted)":i,i=e==="Vector Tile Service"?"Tile Layer":i,i}_getReuseWarningChip(){return l`<calcite-chip icon=information kind=neutral .label=${this.reuseWarning} scale=s slot=actions-end>${this.reuseWarning}</calcite-chip>`}};p("solution-item-accordion",a);export{a};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import b from"./RTSKNY33.js";import{b as h}from"./PZ4L77M5.js";import"./JE7L7M3J.js";import{a as S}from"./LFIJXE3U.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import"./AOBFPJ2R.js";import"./JK6XUSIM.js";import"./UPHYUDLT.js";import"./QJJXVRMV.js";import"./7FMLZNDR.js";import"./LL5C4DHP.js";import"./WPAMUSBR.js";import"./XJPOVJV7.js";import"./LDNQ56OK.js";import"./3HUY3T5F.js";import"./Z6G5PBUQ.js";import"./J3QMHA2M.js";import"./TKZAMPEI.js";import"./2IHQU2FX.js";import"./CGLFPVBM.js";import"./OEJAW72H.js";import"./5JJMGPOW.js";import"./TYX345MZ.js";import"./5UWT66A7.js";import{b as m}from"./VU3OQQKP.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"./QRPBAR4V.js";import{b as h}from"./PZ4L77M5.js";import"./JE7L7M3J.js";import{a as S}from"./6LLQFZGG.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"./LI7AOAAS.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 from"./RTSKNY33.js";import{ta as i}from"./JE7L7M3J.js";export default $arcgis.t(([{u:p}])=>{async function D(o,a){let r=await v(a,o),I=[],m=[],d=[],f=r.map(async e=>{let c=await h(e.id,"reverse","Solution2Item",o);return{template:e,relatedItems:c}}),u=await Promise.all(f);for(let{template:e,relatedItems:c}of u)for(let w of c){let s=[];for(let t of w.relatedItemIds)s.push({controlItemId:e.id,dependencyItemId:t});let S=s.reduce((t,n)=>(t[n.controlItemId]||(t[n.controlItemId]=new Set),t[n.controlItemId].add(n.dependencyItemId),t),{}),l=Object.entries(S).filter(([t,n])=>n.size>1).flatMap(([t,n])=>Array.from(n).map(g=>({controlItemId:t,dependencyItemId:g})));l.length>0&&(d=d.concat(l))}m=Array.from(new Map([...d].map(e=>[`${e.controlItemId}:${e.dependencyItemId}`,e])).values());let y=m.map(e=>e.controlItemId);return I=[...new Set(y)],{uniqueIitemIds:I,_nonSolutionDependencyItems:m,templateInfos:r}}async function h(o,a,r,I){let m=await i(o,r,a,I);return[{relationshipType:r,relatedItemIds:m.relatedItems.map(d=>d.id)}]}async function v(o,a){return await p(o.id,a)}return{a:D,b:v}},a)
2
+ import a from"./QRPBAR4V.js";import{ta as i}from"./JE7L7M3J.js";export default $arcgis.t(([{u:p}])=>{async function D(o,a){let r=await v(a,o),I=[],m=[],d=[],f=r.map(async e=>{let c=await h(e.id,"reverse","Solution2Item",o);return{template:e,relatedItems:c}}),u=await Promise.all(f);for(let{template:e,relatedItems:c}of u)for(let w of c){let s=[];for(let t of w.relatedItemIds)s.push({controlItemId:e.id,dependencyItemId:t});let S=s.reduce((t,n)=>(t[n.controlItemId]||(t[n.controlItemId]=new Set),t[n.controlItemId].add(n.dependencyItemId),t),{}),l=Object.entries(S).filter(([t,n])=>n.size>1).flatMap(([t,n])=>Array.from(n).map(g=>({controlItemId:t,dependencyItemId:g})));l.length>0&&(d=d.concat(l))}m=Array.from(new Map([...d].map(e=>[`${e.controlItemId}:${e.dependencyItemId}`,e])).values());let y=m.map(e=>e.controlItemId);return I=[...new Set(y)],{uniqueIitemIds:I,_nonSolutionDependencyItems:m,templateInfos:r}}async function h(o,a,r,I){let m=await i(o,r,a,I);return[{relationshipType:r,relatedItemIds:m.relatedItems.map(d=>d.id)}]}async function v(o,a){return await p(o.id,a)}return{a:D,b:v}},a)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import b from"./KDIUYXBA.js";import a from"./UUYUTETH.js";import{b as l}from"./VU3OQQKP.js";import{H as c,h as o,r as s,u as r}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([p,m,,{c:h}])=>{var d=o`@layer{:host{display:block;pointer-events:all!important}}`,a=class extends c{constructor(){super(...arguments),this.selectedLayerId="",this.tool="rectangle",this.drawingComplete=s(),this.featuresSelected=s()}static{this.properties={mapView:0,selectedLayerId:1,tool:1}}static{this.styles=d}static{this.shadowRootOptions=r}willUpdate(e){e.has("mapView")&&this.mapViewWatchHandler()}async mapViewWatchHandler(){await this.mapView?.when(()=>{this._initSketchViewModel()})}async toggleSelectionTool(e,t){if(this._graphicsLayer?.removeAll(),this._selectionTool?.state==="active"&&this._selectionTool.cancel(),t){let i=e??this.tool;this._selectionTool?.create(i)}}async loaded(){await this.init()}render(){return""}async init(){this.mapView&&this._initSketchViewModel()}_initSketchViewModel(){this._graphicsLayer=new p({listMode:"hide"}),this._selectionTool=new m({layer:this._graphicsLayer,view:this.mapView}),this._selectionTool&&this._selectionTool.on("create",e=>{if(e.state==="complete"){this.drawingComplete.emit();let t=e.graphic?.geometry;t&&this._selectFeatures(t),this._graphicsLayer&&this._graphicsLayer.removeAll()}}),this.mapView?.map&&this._graphicsLayer&&this.mapView.map.layers.add(this._graphicsLayer)}async _selectFeatures(e){let t=this.mapView&&await h(this.mapView,this.selectedLayerId);try{let i={geometry:e},n=t&&await t.queryObjectIds(i);this.featuresSelected.emit(n)}catch(i){console.error("Error selecting features:",i)}}};l("selection-tool",a);return a},"layers/GraphicsLayer","widgets/Sketch/SketchViewModel",a,b)
2
+ import b from"./KDIUYXBA.js";import a from"./UUYUTETH.js";import{b as l}from"./LI7AOAAS.js";import{H as c,h as o,r as s,u as r}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([p,m,,{c:h}])=>{var d=o`@layer{:host{display:block;pointer-events:all!important}}`,a=class extends c{constructor(){super(...arguments),this.selectedLayerId="",this.tool="rectangle",this.drawingComplete=s(),this.featuresSelected=s()}static{this.properties={mapView:0,selectedLayerId:1,tool:1}}static{this.styles=d}static{this.shadowRootOptions=r}willUpdate(e){e.has("mapView")&&this.mapViewWatchHandler()}async mapViewWatchHandler(){await this.mapView?.when(()=>{this._initSketchViewModel()})}async toggleSelectionTool(e,t){if(this._graphicsLayer?.removeAll(),this._selectionTool?.state==="active"&&this._selectionTool.cancel(),t){let i=e??this.tool;this._selectionTool?.create(i)}}async loaded(){await this.init()}render(){return""}async init(){this.mapView&&this._initSketchViewModel()}_initSketchViewModel(){this._graphicsLayer=new p({listMode:"hide"}),this._selectionTool=new m({layer:this._graphicsLayer,view:this.mapView}),this._selectionTool&&this._selectionTool.on("create",e=>{if(e.state==="complete"){this.drawingComplete.emit();let t=e.graphic?.geometry;t&&this._selectFeatures(t),this._graphicsLayer&&this._graphicsLayer.removeAll()}}),this.mapView?.map&&this._graphicsLayer&&this.mapView.map.layers.add(this._graphicsLayer)}async _selectFeatures(e){let t=this.mapView&&await h(this.mapView,this.selectedLayerId);try{let i={geometry:e},n=t&&await t.queryObjectIds(i);this.featuresSelected.emit(n)}catch(i){console.error("Error selecting features:",i)}}};l("selection-tool",a);return a},"layers/GraphicsLayer","widgets/Sketch/SketchViewModel",a,b)