@esri/solutions-components 5.0.4 → 5.0.5

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 (94) hide show
  1. package/dist/cdn/{UB33RJV2.js → 23DKMPGJ.js} +1 -1
  2. package/dist/cdn/{4WNB4SNS.js → 2ECRQJCU.js} +1 -1
  3. package/dist/cdn/{NGBSDZLF.js → 2JBJVGPJ.js} +1 -1
  4. package/dist/cdn/{3ZOEAKII.js → 2YCDW2EI.js} +1 -1
  5. package/dist/cdn/{36QZL2SP.js → 33HIGVEX.js} +1 -1
  6. package/dist/cdn/{HVZTHZYK.js → 4O4QS3DG.js} +1 -1
  7. package/dist/cdn/{F7DGHROD.js → 57INLFON.js} +1 -1
  8. package/dist/cdn/{44QGF64X.js → 5BEMMNL7.js} +1 -1
  9. package/dist/cdn/{RVR6SP4R.js → 5G3AHODR.js} +1 -1
  10. package/dist/cdn/{QOM6K67N.js → 5QP3RIEO.js} +1 -1
  11. package/dist/cdn/{O24ZIQLV.js → 5QSIKX2L.js} +1 -1
  12. package/dist/cdn/{5IWB7DXV.js → 5YORDAVH.js} +1 -1
  13. package/dist/cdn/{KAOZIOH3.js → 67TUHEUB.js} +1 -1
  14. package/dist/cdn/{TTKCR26F.js → 6HNQQRYK.js} +1 -1
  15. package/dist/cdn/{575KOORD.js → 6LSHZOMB.js} +1 -1
  16. package/dist/cdn/{32ZJRLO4.js → 6QODI424.js} +1 -1
  17. package/dist/cdn/{AXGMN3DZ.js → 7DOH2ZMP.js} +1 -1
  18. package/dist/cdn/{CPLUG3BV.js → ADJCIRZS.js} +1 -1
  19. package/dist/cdn/{ZB4IUY3Y.js → BA4FCDQY.js} +1 -1
  20. package/dist/cdn/{IWBYP44R.js → BADKNCL4.js} +1 -1
  21. package/dist/cdn/{5ISRU637.js → BCTFO27G.js} +1 -1
  22. package/dist/cdn/{N3WEX2WW.js → BGBLGDVO.js} +1 -1
  23. package/dist/cdn/BXKV2QC3.js +2 -0
  24. package/dist/cdn/{M5MQY5WC.js → DV233ITZ.js} +1 -1
  25. package/dist/cdn/{L65LKW2L.js → DY3BUOEI.js} +1 -1
  26. package/dist/cdn/EIQZRLWQ.js +2 -0
  27. package/dist/cdn/{CKHU23WZ.js → EKZZ7R2V.js} +1 -1
  28. package/dist/cdn/{PO4PTHS6.js → EPMMVHPO.js} +1 -1
  29. package/dist/cdn/{OZIXJ6HO.js → EQXQ6YNY.js} +1 -1
  30. package/dist/cdn/{L26O3GTC.js → HNPTTIXC.js} +1 -1
  31. package/dist/cdn/{OBMP2HIH.js → IHDRZQU4.js} +1 -1
  32. package/dist/cdn/{G3KEPG5G.js → IQ6XED24.js} +1 -1
  33. package/dist/cdn/{AFNUHTXR.js → JSX7H42C.js} +1 -1
  34. package/dist/cdn/{IGM6M6VG.js → K2BF5736.js} +1 -1
  35. package/dist/cdn/{3L4JPZ3K.js → K7O46PDI.js} +1 -1
  36. package/dist/cdn/{IB4U627P.js → KUZQPBVI.js} +1 -1
  37. package/dist/cdn/{ZRDBHNKL.js → LLIZZGSY.js} +1 -1
  38. package/dist/cdn/{G235DVXM.js → M2MN2QB7.js} +1 -1
  39. package/dist/cdn/{P3DGGTC5.js → M6DR7QBF.js} +1 -1
  40. package/dist/cdn/{SXF342EH.js → MDHKDE77.js} +1 -1
  41. package/dist/cdn/{Q5LUK5CM.js → MJDNGEFJ.js} +1 -1
  42. package/dist/cdn/{GKBTOBYA.js → MP5X6HGT.js} +1 -1
  43. package/dist/cdn/{YA5DNYPF.js → MSGOASUF.js} +1 -1
  44. package/dist/cdn/{G2FGKUNI.js → MWCQXZOT.js} +1 -1
  45. package/dist/cdn/{VPSUD6VW.js → N6EQBPC2.js} +1 -1
  46. package/dist/cdn/{ZZQ73LQE.js → NARQQKRW.js} +1 -1
  47. package/dist/cdn/{R7OZWCO2.js → NJJEOZ2G.js} +1 -1
  48. package/dist/cdn/{FZ5LAVZL.js → NORNRIIE.js} +1 -1
  49. package/dist/cdn/{3UVV2MNJ.js → QPRIL54J.js} +1 -1
  50. package/dist/cdn/{R2KIT5QB.js → QZZ2CQWS.js} +1 -1
  51. package/dist/cdn/{DCOGVHCK.js → R47OTDC2.js} +1 -1
  52. package/dist/cdn/{DQY6HKSD.js → RBCOT3CJ.js} +1 -1
  53. package/dist/cdn/{4WIRUOFC.js → RGFLXW4Q.js} +1 -1
  54. package/dist/cdn/{5QZHZP3H.js → RQEYXUDW.js} +1 -1
  55. package/dist/cdn/{OXUKEA5J.js → RTVWZSKJ.js} +1 -1
  56. package/dist/cdn/{MPJ5N4H3.js → RYRVUHB7.js} +1 -1
  57. package/dist/cdn/{RTZ7K25B.js → S42I3DOW.js} +1 -1
  58. package/dist/cdn/SFZEAERJ.js +2 -0
  59. package/dist/cdn/{643OMX6D.js → SIUK7OO4.js} +1 -1
  60. package/dist/cdn/{VW2776MR.js → SQYHEYVJ.js} +1 -1
  61. package/dist/cdn/{SIUGRN4Q.js → TAZIMIFF.js} +1 -1
  62. package/dist/cdn/{25XM6BTJ.js → TF3C523O.js} +1 -1
  63. package/dist/cdn/{YPV5332T.js → TGH6D5IY.js} +1 -1
  64. package/dist/cdn/{CS224C6F.js → TZPSZTAH.js} +1 -1
  65. package/dist/cdn/{UV3U3JVV.js → UV4D2QFA.js} +1 -1
  66. package/dist/cdn/{SVY3DB6Z.js → VEUUNFWR.js} +1 -1
  67. package/dist/cdn/{2ZUQERRA.js → VGIXK3YM.js} +1 -1
  68. package/dist/cdn/{BE7WFZ3U.js → VPMYUEFF.js} +1 -1
  69. package/dist/cdn/{NRATHJBP.js → VVURRW2F.js} +1 -1
  70. package/dist/cdn/{IHGHHRTQ.js → VW52F2EM.js} +1 -1
  71. package/dist/cdn/{LLCJDTO5.js → W33YWBF5.js} +1 -1
  72. package/dist/cdn/{QCX5HMBY.js → WXE6AACQ.js} +1 -1
  73. package/dist/cdn/{H4AJJYCF.js → X5T6TZW3.js} +1 -1
  74. package/dist/cdn/{UGC66GAG.js → XLBMKYPQ.js} +1 -1
  75. package/dist/cdn/{V7HBTLA3.js → XWJFP7BZ.js} +1 -1
  76. package/dist/cdn/{TWDX3YCN.js → Y3CBLTF5.js} +1 -1
  77. package/dist/cdn/{FYYI54CE.js → YE7JMYIB.js} +1 -1
  78. package/dist/cdn/{ETSHZHZS.js → YT2I5RUD.js} +1 -1
  79. package/dist/cdn/{NNF53M5N.js → YUWQWOOF.js} +1 -1
  80. package/dist/cdn/{5SWGGS6Z.js → Z6NMQGEQ.js} +1 -1
  81. package/dist/cdn/{HV4LZMLU.js → ZD3OZO6O.js} +1 -1
  82. package/dist/cdn/{N2D6RJ3H.js → ZFSMRICA.js} +1 -1
  83. package/dist/cdn/{WDDMJBPJ.js → ZNG42S47.js} +1 -1
  84. package/dist/cdn/index.js +1 -1
  85. package/dist/chunks/runtime.js +2 -2
  86. package/dist/components/layer-list/customElement.js +1 -1
  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 +7 -4
  91. package/package.json +1 -1
  92. package/dist/cdn/2GBXQUSA.js +0 -2
  93. package/dist/cdn/HW7HHHMK.js +0 -2
  94. package/dist/cdn/RORBHQJC.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"./M5MQY5WC.js";import{u as k}from"./2IHQU2FX.js";import{b as O}from"./HW7HHHMK.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"./DV233ITZ.js";import{u as k}from"./2IHQU2FX.js";import{b as O}from"./EIQZRLWQ.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 d from"./LLCJDTO5.js";import c from"./MPJ5N4H3.js";import"./MQF26HKA.js";import"./G4VIPBRX.js";import"./JE7L7M3J.js";import a from"./UUYUTETH.js";import{a as m}from"./M5MQY5WC.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 w}from"./HW7HHHMK.js";import{H as f,J as i,K as b,h as u,i as s,l as _,r as o,u as g}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([x,l,,,v])=>{var E=u`@layer{:host{display:block;--calcite-label-margin-bottom: 0}.padding-1-2{padding:.5rem}.display-none{display:none!important}.display-flex{display:flex}.position-absolute{position:absolute;inset:0;overflow:auto}.feature-node{position:relative!important}.feature-node .esri-features__footer{display:none!important}.button-container{justify-content:center;align-items:center}.top-border{border-top:1px solid var(--calcite-color-border-1)}.width-100{width:100%}.esri-features__container{padding:.5rem!important;background-color:var(--calcite-color-foreground-1)!important;height:100%!important}.end-border{border-inline-end:1px solid var(--calcite-color-border-1)}.font-bold{font-weight:700}.z-index-1{z-index:1}.visibility-hidden{visibility:hidden;height:0px}.padding-inline-start-1{padding-inline-start:1rem}.border-width-0{border-width:0px}.pagination-action{position:relative;left:3px}.pagination-count{color:var(--calcite-color-brand);border-bottom:1px solid var(--calcite-color-brand);font-weight:700}}`,d=class extends f{constructor(){super(),this.enableEditGeometry=!1,this.enableSnapping=!1,this.graphics=[],this.isLoading=!1,this.isMobile=!1,this.allowEditing=!1,this.highlightEnabled=!0,this.paginationEnabled=!0,this.position="absolute",this.showCloseBtn=!1,this._alertOpen=!1,this._count="",this._editRecordOpen=!1,this._isMultipleEdits=!1,this._mobileTitle="",this._showListView=!1,this._translations=m({name:"info-card",blocking:!0}),this._navigatedToRelatedFeature=!1,this._editEnabled=!1,this._featuresNodeId=`features-node${new Date().getMilliseconds().toString()}`,this.popupClosed=o(),this.clearSelection=o(),this.selectionChanged=o(),this.listenOn(window,"closeEdit",this.closeEdit),this.listenOn(window,"layerSelectionChange",this.layerSelectionChange),this.listenOn(window,"refreshGraphics",this.refreshGraphics),this.listenOn(window,"editMultipleFeatures",this.editMultipleFeatures),this.listenOn(window,"selectedLanguageUpdated",this.selectedLanguageUpdated),this.listenOn(window,"clearSelection",this._alertClosed)}static{this.properties={enableEditGeometry:5,enableSnapping:5,graphics:0,isLoading:5,isMobile:5,mapView:0,allowEditing:5,highlightEnabled:5,paginationEnabled:5,position:1,showCloseBtn:5,_alertOpen:16,_count:16,_editRecordOpen:16,_isMultipleEdits:16,_mobileTitle:16,_showListView:16,_translations:16,_navigatedToRelatedFeature:16}}static{this.styles=E}static{this.shadowRootOptions=g}willUpdate(e){if(e.has("graphics")&&this.graphicsWatchHandler(),e.has("isMobile")&&this.isMobileWatchHandler(),e.has("mapView")&&this.mapViewWatchHandler(),e.has("_translations")){let t=this._translations._lang,a=e.get("_translations")?._lang;if(t&&a&&t!==a&&this._features){let r=[...this.graphics];this.graphics=[],this.graphics=r}}}async graphicsWatchHandler(){this._navigatedToRelatedFeature&&this._features&&(this._features.clear(),this._features.close(),this._count="",this._navigatedToRelatedFeature=!1),await this.setGraphics()}async isMobileWatchHandler(){await this._initFeaturesWidget()}async mapViewWatchHandler(){return await this._initFeaturesWidget()}async getSelectedFeature(){return this._features?.selectedFeature}async refresh(){await this.setGraphics()}async back(){this._features?.previous(),this._count=this._getCount()}async next(){this._features?.next(),this._count=this._getCount()}async toggleListView(){if(this._showListView=!this._showListView,this._features){let e=this._features.selectedFeatureIndex;this._features.open({features:this.graphics,featureMenuOpen:this._showListView}),this._features.selectedFeatureIndex=e}}async updateCurrentGraphic(e){this._features?.selectedFeatureWidget&&console.log(e)}async closeEdit(){this._editRecordOpen=!1,this._isMultipleEdits=!1}async layerSelectionChange(){this._showListView=!1,this._features?.viewModel&&(this._features.viewModel.featureMenuOpen=!1,this._features.close())}async refreshGraphics(e){this._navigatedToRelatedFeature||(this.graphics=[...e.detail])}async editMultipleFeatures(e){this._isMultipleEdits=!0,this._openEditRecord()}async selectedLanguageUpdated(e){this._features?.clear(),this._features?.close(),await this._initFeaturesWidget()}async load(){this._popupUtils=new v}async loaded(){this.graphics?.length>0&&await this.setGraphics()}render(){let e=this.isLoading?"":"display-none",t=this.isLoading||this._editRecordOpen?"visibility-hidden":"position-absolute",a=!this.isLoading&&this._editRecordOpen?"position-absolute":"display-none",r=!this.isLoading&&this._editRecordOpen||this._showListView?"display-none":"",h=this._features?.features&&this._features.features.length<2||this._navigatedToRelatedFeature,c=Number(this._features?.selectedFeature?.getObjectId()),y=Number.isNaN(c)?[]:[c],p=this._layer?.editingEnabled&&this._layer?.capabilities?.operations?.supportsDelete,$=this._relatedFeature?[this._relatedFeature]:this.graphics,F=this._navigatedToRelatedFeature?0:this._features?.selectedFeatureIndex,n=this.isMobile?"display-none":"";return s`<calcite-shell class="z-index-1" style=${b({position:this.position})}>${this._getHeader()}<calcite-loader class=${i(e)} .label=${this._translations.fetchingData}></calcite-loader><div class=${i("esri-widget feature-node "+t)} id=${this._featuresNodeId??_}></div><div class=${`${r} width-100`} slot=footer>${this.allowEditing?s`<div class="display-flex top-border padding-1-2"><calcite-button appearance=solid id=solutions-edit @click=${()=>this._openEditRecord()} width=full>${this._translations.edit}</calcite-button>${this.isMobile&&p?s`<delete-button class="padding-inline-start-1 width-100" id=solutions-delete .ids=${y} .layer=${this._layer} @editsComplete=${()=>this._closePopup()}></delete-button>`:void 0}<calcite-tooltip class=${i(n)} placement=bottom reference-element=solutions-edit><span>${this._translations.edit}</span></calcite-tooltip>${this.isMobile&&p?s`<calcite-tooltip class=${i(n)} placement=bottom reference-element=solutions-delete><span>${this._translations.delete}</span></calcite-tooltip>`:void 0}</div>`:""}${this.paginationEnabled&&!h&&s`<div class=${"display-flex padding-1-2 button-container top-border"}><div><calcite-button appearance=transparent .disabled=${h} icon-flip-rtl=both icon-start=chevron-left id=solutions-back @click=${()=>this._back()} width=full></calcite-button><calcite-tooltip class=${i(n)} placement=top reference-element=solutions-back><span>${this._translations.back}</span></calcite-tooltip></div><calcite-action appearance=solid class="pagination-action" icon-flip-rtl @click=${()=>this._toggleListView()} scale=s text text-enabled><span class="pagination-count">${this._count}</span></calcite-action><div><calcite-button appearance=transparent .disabled=${h} icon-flip-rtl=both icon-start=chevron-right id=solutions-next @click=${()=>this._next()} width=full></calcite-button><calcite-tooltip class=${i(n)} placement=top reference-element=solutions-next><span>${this._translations.next}</span></calcite-tooltip></div></div>`||""}</div><edit-card .allowMultipleEditing=${this._isMultipleEdits} class=${i(a)} .enableEditGeometry=${this.enableEditGeometry} .enableSnapping=${this.enableSnapping} .graphicIndex=${F} .graphics=${$} .mapView=${this.mapView} .open=${this._editRecordOpen}></edit-card><calcite-alert auto-close icon=layer-broken kind=warning label @calciteAlertClose=${()=>this._alertClosed()} .open=${this._alertOpen} placement=top><div slot=title>${this._translations.editDisabled}</div><div slot=message>${this._translations.enableEditing}</div></calcite-alert></calcite-shell>`}async setGraphics(){this._features||await this._initFeaturesWidget(),this.graphics.length>0?(this._layer=this.graphics[0]?.layer,this._editEnabled=!!(this._layer.editingEnabled&&this._layer.capabilities?.operations.supportsUpdate),this._mobileTitle=this.mapView?.map&&await this._popupUtils?.getPopupTitle(this.graphics[0],this.mapView.map)||"",this._features?.open({features:this.graphics})):(this._features?.clear(),this._features?.close()),this._count=this._getCount()}async _initFeaturesWidget(){return this.isMobile!==void 0?await this.mapView?.when(()=>{if(this._features)this._features.view=this.mapView,this._features.visibleElements.actionBar=!1,this._features.visibleElements.closeButton=!!this.showCloseBtn,this._features.visibleElements.heading=!this.isMobile;else if(this._features=new x({view:this.mapView,container:this._featuresNodeId,visibleElements:{actionBar:!1,closeButton:this.showCloseBtn,featureMenuHeading:!1,heading:!this.isMobile}}),this._features){this._features.viewModel.highlightEnabled=!!this.highlightEnabled,l.watch(()=>(this._features?.viewModel).featureMenuOpen,t=>{this._updateCount(),t||(this._showListView=t)}),l.watch(()=>this._features?.selectedFeatureIndex,t=>{t!==void 0&&t>-1&&this._features?.selectedFeature&&this.selectionChanged.emit({selectedFeature:[this._features.selectedFeature],selectedFeatureIndex:this._features.selectedFeatureIndex})}),l?.watch(()=>this._features.selectedDrillInFeature,t=>{t?(this._relatedFeature=t,this._navigatedToRelatedFeature=!0):(this._relatedFeature=void 0,this._navigatedToRelatedFeature=!1)});let e=this.el.querySelector("#"+this._featuresNodeId);this.listenOn(e,"calciteFlowItemClose",()=>{this.clearSelection.emit()})}}):Promise.resolve()}_getHeader(){return this.isMobile&&!this._editRecordOpen?s`<calcite-panel class="border-width-0" slot=header><calcite-action appearance=solid class="end-border" icon=chevron-left icon-flip-rtl @click=${()=>this._closePopup()} scale=s slot=header-actions-start text></calcite-action><span class="font-bold" slot=header-content>${this._mobileTitle}</span></calcite-panel>`:void 0}_closePopup(){this.popupClosed.emit()}_alertClosed(){this._alertOpen=!1}_openEditRecord(){this._editEnabled?this._editRecordOpen=!0:this._alertOpen=!0}async _back(){this._features?.previous(),await this._updateCount()}async _next(){this._features?.next(),await this._updateCount()}async _updateCount(){let e=this._features?.selectedFeatureIndex;this._popupUtils&&this.mapView&&this.mapView.map&&e!==void 0&&(this._mobileTitle=await this._popupUtils.getPopupTitle(this.graphics[e],this.mapView.map)),this._count=this._getCount()}_getCount(){let e=this._features?.viewModel&&(this._features?.viewModel.selectedFeatureIndex+1).toString()||"",t=this._features?.features?.length.toString()||"";return this._translations.indexOfTotal.replace("{{index}}",e).replace("{{total}}",t)||""}_toggleListView(){if(this._showListView=!this._showListView,this._features){let e=this._features.selectedFeatureIndex;this._features.open({features:this.graphics,featureMenuOpen:this._showListView}),this._features.selectedFeatureIndex=e}}};w("info-card",d);return d},"widgets/Features","core/reactiveUtils",a,c,d)
2
+ import d from"./W33YWBF5.js";import c from"./RYRVUHB7.js";import"./MQF26HKA.js";import"./G4VIPBRX.js";import"./JE7L7M3J.js";import a from"./UUYUTETH.js";import{a as m}from"./DV233ITZ.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 w}from"./EIQZRLWQ.js";import{H as f,J as i,K as b,h as u,i as s,l as _,r as o,u as g}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([x,l,,,v])=>{var E=u`@layer{:host{display:block;--calcite-label-margin-bottom: 0}.padding-1-2{padding:.5rem}.display-none{display:none!important}.display-flex{display:flex}.position-absolute{position:absolute;inset:0;overflow:auto}.feature-node{position:relative!important}.feature-node .esri-features__footer{display:none!important}.button-container{justify-content:center;align-items:center}.top-border{border-top:1px solid var(--calcite-color-border-1)}.width-100{width:100%}.esri-features__container{padding:.5rem!important;background-color:var(--calcite-color-foreground-1)!important;height:100%!important}.end-border{border-inline-end:1px solid var(--calcite-color-border-1)}.font-bold{font-weight:700}.z-index-1{z-index:1}.visibility-hidden{visibility:hidden;height:0px}.padding-inline-start-1{padding-inline-start:1rem}.border-width-0{border-width:0px}.pagination-action{position:relative;left:3px}.pagination-count{color:var(--calcite-color-brand);border-bottom:1px solid var(--calcite-color-brand);font-weight:700}}`,d=class extends f{constructor(){super(),this.enableEditGeometry=!1,this.enableSnapping=!1,this.graphics=[],this.isLoading=!1,this.isMobile=!1,this.allowEditing=!1,this.highlightEnabled=!0,this.paginationEnabled=!0,this.position="absolute",this.showCloseBtn=!1,this._alertOpen=!1,this._count="",this._editRecordOpen=!1,this._isMultipleEdits=!1,this._mobileTitle="",this._showListView=!1,this._translations=m({name:"info-card",blocking:!0}),this._navigatedToRelatedFeature=!1,this._editEnabled=!1,this._featuresNodeId=`features-node${new Date().getMilliseconds().toString()}`,this.popupClosed=o(),this.clearSelection=o(),this.selectionChanged=o(),this.listenOn(window,"closeEdit",this.closeEdit),this.listenOn(window,"layerSelectionChange",this.layerSelectionChange),this.listenOn(window,"refreshGraphics",this.refreshGraphics),this.listenOn(window,"editMultipleFeatures",this.editMultipleFeatures),this.listenOn(window,"selectedLanguageUpdated",this.selectedLanguageUpdated),this.listenOn(window,"clearSelection",this._alertClosed)}static{this.properties={enableEditGeometry:5,enableSnapping:5,graphics:0,isLoading:5,isMobile:5,mapView:0,allowEditing:5,highlightEnabled:5,paginationEnabled:5,position:1,showCloseBtn:5,_alertOpen:16,_count:16,_editRecordOpen:16,_isMultipleEdits:16,_mobileTitle:16,_showListView:16,_translations:16,_navigatedToRelatedFeature:16}}static{this.styles=E}static{this.shadowRootOptions=g}willUpdate(e){if(e.has("graphics")&&this.graphicsWatchHandler(),e.has("isMobile")&&this.isMobileWatchHandler(),e.has("mapView")&&this.mapViewWatchHandler(),e.has("_translations")){let t=this._translations._lang,a=e.get("_translations")?._lang;if(t&&a&&t!==a&&this._features){let r=[...this.graphics];this.graphics=[],this.graphics=r}}}async graphicsWatchHandler(){this._navigatedToRelatedFeature&&this._features&&(this._features.clear(),this._features.close(),this._count="",this._navigatedToRelatedFeature=!1),await this.setGraphics()}async isMobileWatchHandler(){await this._initFeaturesWidget()}async mapViewWatchHandler(){return await this._initFeaturesWidget()}async getSelectedFeature(){return this._features?.selectedFeature}async refresh(){await this.setGraphics()}async back(){this._features?.previous(),this._count=this._getCount()}async next(){this._features?.next(),this._count=this._getCount()}async toggleListView(){if(this._showListView=!this._showListView,this._features){let e=this._features.selectedFeatureIndex;this._features.open({features:this.graphics,featureMenuOpen:this._showListView}),this._features.selectedFeatureIndex=e}}async updateCurrentGraphic(e){this._features?.selectedFeatureWidget&&console.log(e)}async closeEdit(){this._editRecordOpen=!1,this._isMultipleEdits=!1}async layerSelectionChange(){this._showListView=!1,this._features?.viewModel&&(this._features.viewModel.featureMenuOpen=!1,this._features.close())}async refreshGraphics(e){this._navigatedToRelatedFeature||(this.graphics=[...e.detail])}async editMultipleFeatures(e){this._isMultipleEdits=!0,this._openEditRecord()}async selectedLanguageUpdated(e){this._features?.clear(),this._features?.close(),await this._initFeaturesWidget()}async load(){this._popupUtils=new v}async loaded(){this.graphics?.length>0&&await this.setGraphics()}render(){let e=this.isLoading?"":"display-none",t=this.isLoading||this._editRecordOpen?"visibility-hidden":"position-absolute",a=!this.isLoading&&this._editRecordOpen?"position-absolute":"display-none",r=!this.isLoading&&this._editRecordOpen||this._showListView?"display-none":"",h=this._features?.features&&this._features.features.length<2||this._navigatedToRelatedFeature,c=Number(this._features?.selectedFeature?.getObjectId()),y=Number.isNaN(c)?[]:[c],p=this._layer?.editingEnabled&&this._layer?.capabilities?.operations?.supportsDelete,$=this._relatedFeature?[this._relatedFeature]:this.graphics,F=this._navigatedToRelatedFeature?0:this._features?.selectedFeatureIndex,n=this.isMobile?"display-none":"";return s`<calcite-shell class="z-index-1" style=${b({position:this.position})}>${this._getHeader()}<calcite-loader class=${i(e)} .label=${this._translations.fetchingData}></calcite-loader><div class=${i("esri-widget feature-node "+t)} id=${this._featuresNodeId??_}></div><div class=${`${r} width-100`} slot=footer>${this.allowEditing?s`<div class="display-flex top-border padding-1-2"><calcite-button appearance=solid id=solutions-edit @click=${()=>this._openEditRecord()} width=full>${this._translations.edit}</calcite-button>${this.isMobile&&p?s`<delete-button class="padding-inline-start-1 width-100" id=solutions-delete .ids=${y} .layer=${this._layer} @editsComplete=${()=>this._closePopup()}></delete-button>`:void 0}<calcite-tooltip class=${i(n)} placement=bottom reference-element=solutions-edit><span>${this._translations.edit}</span></calcite-tooltip>${this.isMobile&&p?s`<calcite-tooltip class=${i(n)} placement=bottom reference-element=solutions-delete><span>${this._translations.delete}</span></calcite-tooltip>`:void 0}</div>`:""}${this.paginationEnabled&&!h&&s`<div class=${"display-flex padding-1-2 button-container top-border"}><div><calcite-button appearance=transparent .disabled=${h} icon-flip-rtl=both icon-start=chevron-left id=solutions-back @click=${()=>this._back()} width=full></calcite-button><calcite-tooltip class=${i(n)} placement=top reference-element=solutions-back><span>${this._translations.back}</span></calcite-tooltip></div><calcite-action appearance=solid class="pagination-action" icon-flip-rtl @click=${()=>this._toggleListView()} scale=s text text-enabled><span class="pagination-count">${this._count}</span></calcite-action><div><calcite-button appearance=transparent .disabled=${h} icon-flip-rtl=both icon-start=chevron-right id=solutions-next @click=${()=>this._next()} width=full></calcite-button><calcite-tooltip class=${i(n)} placement=top reference-element=solutions-next><span>${this._translations.next}</span></calcite-tooltip></div></div>`||""}</div><edit-card .allowMultipleEditing=${this._isMultipleEdits} class=${i(a)} .enableEditGeometry=${this.enableEditGeometry} .enableSnapping=${this.enableSnapping} .graphicIndex=${F} .graphics=${$} .mapView=${this.mapView} .open=${this._editRecordOpen}></edit-card><calcite-alert auto-close icon=layer-broken kind=warning label @calciteAlertClose=${()=>this._alertClosed()} .open=${this._alertOpen} placement=top><div slot=title>${this._translations.editDisabled}</div><div slot=message>${this._translations.enableEditing}</div></calcite-alert></calcite-shell>`}async setGraphics(){this._features||await this._initFeaturesWidget(),this.graphics.length>0?(this._layer=this.graphics[0]?.layer,this._editEnabled=!!(this._layer.editingEnabled&&this._layer.capabilities?.operations.supportsUpdate),this._mobileTitle=this.mapView?.map&&await this._popupUtils?.getPopupTitle(this.graphics[0],this.mapView.map)||"",this._features?.open({features:this.graphics})):(this._features?.clear(),this._features?.close()),this._count=this._getCount()}async _initFeaturesWidget(){return this.isMobile!==void 0?await this.mapView?.when(()=>{if(this._features)this._features.view=this.mapView,this._features.visibleElements.actionBar=!1,this._features.visibleElements.closeButton=!!this.showCloseBtn,this._features.visibleElements.heading=!this.isMobile;else if(this._features=new x({view:this.mapView,container:this._featuresNodeId,visibleElements:{actionBar:!1,closeButton:this.showCloseBtn,featureMenuHeading:!1,heading:!this.isMobile}}),this._features){this._features.viewModel.highlightEnabled=!!this.highlightEnabled,l.watch(()=>(this._features?.viewModel).featureMenuOpen,t=>{this._updateCount(),t||(this._showListView=t)}),l.watch(()=>this._features?.selectedFeatureIndex,t=>{t!==void 0&&t>-1&&this._features?.selectedFeature&&this.selectionChanged.emit({selectedFeature:[this._features.selectedFeature],selectedFeatureIndex:this._features.selectedFeatureIndex})}),l?.watch(()=>this._features.selectedDrillInFeature,t=>{t?(this._relatedFeature=t,this._navigatedToRelatedFeature=!0):(this._relatedFeature=void 0,this._navigatedToRelatedFeature=!1)});let e=this.el.querySelector("#"+this._featuresNodeId);this.listenOn(e,"calciteFlowItemClose",()=>{this.clearSelection.emit()})}}):Promise.resolve()}_getHeader(){return this.isMobile&&!this._editRecordOpen?s`<calcite-panel class="border-width-0" slot=header><calcite-action appearance=solid class="end-border" icon=chevron-left icon-flip-rtl @click=${()=>this._closePopup()} scale=s slot=header-actions-start text></calcite-action><span class="font-bold" slot=header-content>${this._mobileTitle}</span></calcite-panel>`:void 0}_closePopup(){this.popupClosed.emit()}_alertClosed(){this._alertOpen=!1}_openEditRecord(){this._editEnabled?this._editRecordOpen=!0:this._alertOpen=!0}async _back(){this._features?.previous(),await this._updateCount()}async _next(){this._features?.next(),await this._updateCount()}async _updateCount(){let e=this._features?.selectedFeatureIndex;this._popupUtils&&this.mapView&&this.mapView.map&&e!==void 0&&(this._mobileTitle=await this._popupUtils.getPopupTitle(this.graphics[e],this.mapView.map)),this._count=this._getCount()}_getCount(){let e=this._features?.viewModel&&(this._features?.viewModel.selectedFeatureIndex+1).toString()||"",t=this._features?.features?.length.toString()||"";return this._translations.indexOfTotal.replace("{{index}}",e).replace("{{total}}",t)||""}_toggleListView(){if(this._showListView=!this._showListView,this._features){let e=this._features.selectedFeatureIndex;this._features.open({features:this.graphics,featureMenuOpen:this._showListView}),this._features.selectedFeatureIndex=e}}};w("info-card",d);return d},"widgets/Features","core/reactiveUtils",a,c,d)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import{b as n}from"./HW7HHHMK.js";import{H as a,h as t,i}from"./46DQNAMV.js";var r=t`*[tabindex]:focus-visible{outline:2px solid var(--calcite-color-brand);outline-offset:2px}.resources-section{padding:3rem var(--calcite-spacing-md);max-width:1440px;margin:0 auto;box-sizing:border-box}.section-header{margin-bottom:3rem;text-align:center}.section-heading{font-size:var(--calcite-font-size-3);font-weight:var(--calcite-font-weight-small);margin:0 0 var(--calcite-spacing-lg) 0;color:var(--calcite-color-text-1)}.section-subheading{font-size:var(--calcite-font-size-0);color:var(--calcite-color-text-2);margin:0}.cards-container{display:flex;gap:var(--calcite-spacing-md);flex-wrap:wrap}.cards-container solution-resource-card{flex:1 1 200px}`,s=class extends a{constructor(){super(...arguments),this.heading="",this.subheading="",this.cards=[]}static{this.properties={heading:[1,{type:String}],subheading:[1,{type:String}],cards:[1,{type:Array}]}}static{this.styles=r}render(){return i`<div class="resources-section"><div class="section-header"><h2 class="section-heading" tabindex=0>${this.heading}</h2><p class="section-subheading" tabindex=0>${this.subheading}</p></div><div class="cards-container">${this.cards.map(e=>i`<solution-resource-card .icon=${e.icon} .meridianIcon=${e.meridianIcon} .heading=${e.heading} .description=${e.description} .url=${e.url} .headingEn=${e.headingEn} .sectionHeadingEn=${e.sectionHeadingEn}></solution-resource-card>`)}</div></div>`}};n("solutions-resources-section",s);export{s as a};
2
+ import{b as n}from"./EIQZRLWQ.js";import{H as a,h as t,i}from"./46DQNAMV.js";var r=t`*[tabindex]:focus-visible{outline:2px solid var(--calcite-color-brand);outline-offset:2px}.resources-section{padding:3rem var(--calcite-spacing-md);max-width:1440px;margin:0 auto;box-sizing:border-box}.section-header{margin-bottom:3rem;text-align:center}.section-heading{font-size:var(--calcite-font-size-3);font-weight:var(--calcite-font-weight-small);margin:0 0 var(--calcite-spacing-lg) 0;color:var(--calcite-color-text-1)}.section-subheading{font-size:var(--calcite-font-size-0);color:var(--calcite-color-text-2);margin:0}.cards-container{display:flex;gap:var(--calcite-spacing-md);flex-wrap:wrap}.cards-container solution-resource-card{flex:1 1 200px}`,s=class extends a{constructor(){super(...arguments),this.heading="",this.subheading="",this.cards=[]}static{this.properties={heading:[1,{type:String}],subheading:[1,{type:String}],cards:[1,{type:Array}]}}static{this.styles=r}render(){return i`<div class="resources-section"><div class="section-header"><h2 class="section-heading" tabindex=0>${this.heading}</h2><p class="section-subheading" tabindex=0>${this.subheading}</p></div><div class="cards-container">${this.cards.map(e=>i`<solution-resource-card .icon=${e.icon} .meridianIcon=${e.meridianIcon} .heading=${e.heading} .description=${e.description} .url=${e.url} .headingEn=${e.headingEn} .sectionHeadingEn=${e.sectionHeadingEn}></solution-resource-card>`)}</div></div>`}};n("solutions-resources-section",s);export{s as a};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import{a as n}from"./UGC66GAG.js";import{b as r}from"./HW7HHHMK.js";import{H as o,L as t,h as i,i as s}from"./46DQNAMV.js";import"./OR4HXHSY.js";var p=i`.item-type-icon{@apply block h-4 pointer-events-none;margin-top:.15em!important;min-width:16px;fill:currentColor;transform:rotate(360deg)}.item-type-icon-margin{@apply m-inline-end-1.5;}`,e=class extends o{constructor(){super(...arguments),this.isPortal=!1,this.type="",this.typeKeywords=[]}static{this.properties={isPortal:5,type:1,typeKeywords:0}}static{this.styles=p}render(){return s`<div title=${this.type??t}><img class="item-type-icon item-type-icon-margin" height=16 role=presentation src=${n(this.type,this.typeKeywords)??t} width=16></div>`}};r("solution-item-icon",e);export{e as SolutionItemIcon};
2
+ import{a as n}from"./XLBMKYPQ.js";import{b as r}from"./EIQZRLWQ.js";import{H as o,L as t,h as i,i as s}from"./46DQNAMV.js";import"./OR4HXHSY.js";var p=i`.item-type-icon{@apply block h-4 pointer-events-none;margin-top:.15em!important;min-width:16px;fill:currentColor;transform:rotate(360deg)}.item-type-icon-margin{@apply m-inline-end-1.5;}`,e=class extends o{constructor(){super(...arguments),this.isPortal=!1,this.type="",this.typeKeywords=[]}static{this.properties={isPortal:5,type:1,typeKeywords:0}}static{this.styles=p}render(){return s`<div title=${this.type??t}><img class="item-type-icon item-type-icon-margin" height=16 role=presentation src=${n(this.type,this.typeKeywords)??t} width=16></div>`}};r("solution-item-icon",e);export{e as SolutionItemIcon};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import{a as s,b as n,c as d}from"./CKD45FGQ.js";import{b as y}from"./HW7HHHMK.js";import{F as i,G as c,H as m,h as o,i as t,r as p}from"./46DQNAMV.js";import"./OR4HXHSY.js";var b=o`:host{display:block;--calcite-label-margin-bottom: 0}.label-display{display:block;padding-bottom:1rem}`,r=class extends m{constructor(){super(...arguments),this._densityElement=i(),this._typeElement=i(),this._severityElement=i(),this._types=Object.keys(n).filter(e=>!Number.isNaN(Number(n[e]))),this.deductValueComplete=p()}static{this.styles=b}render(){return t`<div class="label-display"><calcite-label class="label-display">\r\n Density %${this._getDensityInput()}</calcite-label><calcite-label class="label-display">\r\n Type${this._getTypeInput()}</calcite-label><calcite-label class="label-display">\r\n Severity${this._getSeverityInput()}</calcite-label></div><div>${this._getCalculateInput()}</div>`}_getDensityInput(){return t`<calcite-input max=100 min=0 type=number ${c(this._densityElement)}></calcite-input>`}_getTypeInput(){return t`<calcite-select label ${c(this._typeElement)}>${this._types.map((e,l)=>t`<calcite-option .value=${n[e].toString()}>${`${e} (${l+1})`}</calcite-option>`)}</calcite-select>`}_getSeverityInput(){return t`<calcite-select label ${c(this._severityElement)}><calcite-option .value=${s.H}>\r\n High</calcite-option><calcite-option .value=${s.M}>\r\n Medium</calcite-option><calcite-option .value=${s.L}>\r\n Low</calcite-option></calcite-select>`}_getCalculateInput(){let e=this._typeElement.value&&Number.parseFloat(this._typeElement.value.value),l=this._severityElement.value&&this._severityElement.value.value,a=this._densityElement.value&&Number.parseFloat(this._densityElement.value.value);return t`<calcite-button @click=${()=>this._calculateDeduct(e,l,a)}>\r\n Calculate Deduct Value</calcite-button>`}_calculateDeduct(e,l,a){if(e&&l&&!Number.isNaN(a)){let u=d(e.toString(),l.toString(),a.toString(),!0);this.deductValueComplete.emit(u),alert(u)}else alert("Type, severity, and a density number are required")}};y("deduct-calculator",r);export{r as DeductCalculator};
2
+ import{a as s,b as n,c as d}from"./CKD45FGQ.js";import{b as y}from"./EIQZRLWQ.js";import{F as i,G as c,H as m,h as o,i as t,r as p}from"./46DQNAMV.js";import"./OR4HXHSY.js";var b=o`:host{display:block;--calcite-label-margin-bottom: 0}.label-display{display:block;padding-bottom:1rem}`,r=class extends m{constructor(){super(...arguments),this._densityElement=i(),this._typeElement=i(),this._severityElement=i(),this._types=Object.keys(n).filter(e=>!Number.isNaN(Number(n[e]))),this.deductValueComplete=p()}static{this.styles=b}render(){return t`<div class="label-display"><calcite-label class="label-display">\r\n Density %${this._getDensityInput()}</calcite-label><calcite-label class="label-display">\r\n Type${this._getTypeInput()}</calcite-label><calcite-label class="label-display">\r\n Severity${this._getSeverityInput()}</calcite-label></div><div>${this._getCalculateInput()}</div>`}_getDensityInput(){return t`<calcite-input max=100 min=0 type=number ${c(this._densityElement)}></calcite-input>`}_getTypeInput(){return t`<calcite-select label ${c(this._typeElement)}>${this._types.map((e,l)=>t`<calcite-option .value=${n[e].toString()}>${`${e} (${l+1})`}</calcite-option>`)}</calcite-select>`}_getSeverityInput(){return t`<calcite-select label ${c(this._severityElement)}><calcite-option .value=${s.H}>\r\n High</calcite-option><calcite-option .value=${s.M}>\r\n Medium</calcite-option><calcite-option .value=${s.L}>\r\n Low</calcite-option></calcite-select>`}_getCalculateInput(){let e=this._typeElement.value&&Number.parseFloat(this._typeElement.value.value),l=this._severityElement.value&&this._severityElement.value.value,a=this._densityElement.value&&Number.parseFloat(this._densityElement.value.value);return t`<calcite-button @click=${()=>this._calculateDeduct(e,l,a)}>\r\n Calculate Deduct Value</calcite-button>`}_calculateDeduct(e,l,a){if(e&&l&&!Number.isNaN(a)){let u=d(e.toString(),l.toString(),a.toString(),!0);this.deductValueComplete.emit(u),alert(u)}else alert("Type, severity, and a density number are required")}};y("deduct-calculator",r);export{r as DeductCalculator};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import b from"./O24ZIQLV.js";import{b as o}from"./PZ4L77M5.js";import{a as s}from"./M5MQY5WC.js";import{b as r}from"./HW7HHHMK.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"./5QSIKX2L.js";import{b as o}from"./PZ4L77M5.js";import{a as s}from"./DV233ITZ.js";import{b as r}from"./EIQZRLWQ.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 d from"./DCOGVHCK.js";import c from"./SIUGRN4Q.js";import b from"./Q5LUK5CM.js";import a from"./O24ZIQLV.js";import"./PZ4L77M5.js";import"./JE7L7M3J.js";import"./M5MQY5WC.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"./HW7HHHMK.js";import"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([,,,a])=>{return a},a,b,c,d)
2
+ import d from"./R47OTDC2.js";import c from"./TAZIMIFF.js";import b from"./MJDNGEFJ.js";import a from"./5QSIKX2L.js";import"./PZ4L77M5.js";import"./JE7L7M3J.js";import"./DV233ITZ.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"./EIQZRLWQ.js";import"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([,,,a])=>{return a},a,b,c,d)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import{a as b}from"./M5MQY5WC.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import{b as _}from"./HW7HHHMK.js";import{H as p,J as w,h as m,i as h,r,u}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([g,n])=>{var y=m`@layer{:host{display:block}.hide-editor-toolbar .esri-editor__panel-toolbar,.display-none{display:none!important}.esri-editor__panel-content{padding-block:10px!important}.notice-msg{padding:10px;width:calc(100% - 20px)}}`,c=class extends p{constructor(){super(...arguments),this.customizeSubmit=!1,this.enableSnapping=!1,this.showGuidingMsg=!0,this._editorLoading=!1,this._translations=b({name:"create-related-feature",blocking:!0}),this._addingAttachment=!1,this._isSubmitBtnClicked=!1,this.success=r(),this.fail=r(),this.isActionPending=r(),this.formReady=r()}static{this.properties={customizeSubmit:5,enableSnapping:5,mapView:0,selectedFeature:0,showGuidingMsg:5,table:0,_editorLoading:16,_translations:16}}static{this.styles=y}static{this.shadowRootOptions=u}willUpdate(t){t.has("mapView")&&this.mapViewWatchHandler(),t.has("_editorLoading")&&(this.hasUpdated||this._editorLoading!==!1)&&this._editorLoadingWatchHandler(this._editorLoading)}async mapViewWatchHandler(){await this.mapView?.when(async()=>{await this.init()})}async _editorLoadingWatchHandler(t){t&&(this._container?.classList.add("display-none"),await this.startCreate(),this._container?.classList.remove("display-none"),this._editorLoading=!1)}async submit(){this._editor?.viewModel?.featureFormViewModel&&(this._isSubmitBtnClicked=!0,this._editor.viewModel.featureFormViewModel.submit())}async init(){this.mapView&&await this.createEditorWidget()}render(){let t=this._editorLoading?"":"display-none";return h`${this.showGuidingMsg&&h`<calcite-notice class="notice-msg" icon=lightbulb kind=success open><div slot=message>${this._translations.provideDetailsMsg}</div></calcite-notice>`||""}<calcite-loader class=${w(t)} label scale=s></calcite-loader>`}loaded(){this.init()}disconnectedCallback(){super.disconnectedCallback(),this._editor&&this._editor.destroy()}async createEditorWidget(){this._editor&&this._editor.destroy(),this._container=document.createElement("div"),this._container?.classList.add("display-none"),this.enableSnapping||this._container.classList.add("hide-editor-toolbar"),this._editor=new g({view:this.mapView,visibleElements:{flow:!0,settingsMenu:this.enableSnapping,sketch:!1,snappingControls:this.enableSnapping},container:this._container}),this.el.appendChild(this._container);let t=n.watch(()=>this._editor?.viewModel.featureTemplatesViewModel.state,i=>{i==="ready"&&(this._editorLoading=!0)});this._editor?.viewModel.addHandles(t);let e=n.watch(()=>this._editor?.viewModel.state,i=>{i==="adding-attachment"||i==="editing-attachment"?(this._addingAttachment=!0,this.isActionPending.emit(!0)):this._addingAttachment&&(this.isActionPending.emit(!1),this._addingAttachment=!1)});this._editor?.viewModel.addHandles(e);let o=n.watch(()=>this._editor?.viewModel.featureFormViewModel?.state,i=>{i==="ready"&&this.formReady.emit()});this._editor?.viewModel.addHandles(o)}async startCreate(){let t=this.selectedFeature?.layer,e=this.table;if(t?.relationships&&e?.relationships&&this.selectedFeature&&e.templates){let o=t.relationships[0],i=e.relationships.find(a=>t.layerId===a.relatedTableId),s=Number(this.selectedFeature.getObjectId());if(!Number.isNaN(s)&&i){let a=(await t.queryFeatures({objectIds:[s],outFields:[t.objectIdField,o.keyField]})).features[0],d=e.templates[0],l={attributeOverrides:this.makeAttributesForRelatedFeature(a,o,i),layer:e,template:d};await this._editor?.startCreateFeaturesWorkflowAtFeatureCreation(l),await this.hideEditorsElements(),this._editor?.viewModel?.featureFormViewModel?.addHandles(this._editor.viewModel.featureFormViewModel.on("submit",this.submitted.bind(this)))}}}async hideEditorsElements(){this.customizeSubmit&&(await this.timeout(700),this.el.querySelector(".esri-editor")?.querySelectorAll("calcite-flow-item")?.forEach(t=>{let e=t.shadowRoot?.querySelector("calcite-panel")?.shadowRoot?.querySelector("article");e?.querySelector("header")?.setAttribute("style","display: none"),e?.querySelector("footer")?.setAttribute("style","display: none")}))}makeAttributesForRelatedFeature(t,e,o){let i=e.keyField,s;t.attributes.hasOwnProperty(i)?s=t.getAttribute(i):t.attributes.hasOwnProperty(i.toLowerCase())?s=t.getAttribute(i.toLowerCase()):t.attributes.hasOwnProperty(i.toUpperCase())&&(s=t.getAttribute(i.toUpperCase()));let a=o.keyField,d=this.table?.fields.find(l=>l.name.toLocaleLowerCase()===a.toLocaleLowerCase());if(d)return a=d.name,{[a]:s}}async submitted(t){if(t.invalid.length){this._isSubmitBtnClicked=!1;return}if(t.valid.length&&this._isSubmitBtnClicked){this._isSubmitBtnClicked=!1;try{this._editor?.activeWorkflow&&(await this._editor.activeWorkflow.commit(),this._editor.viewModel.failures?.length&&this._editor.viewModel.failures.some(e=>{if(e.error)throw e.error}))}catch(e){this.fail.emit(e);return}this.success.emit()}}async timeout(t){return new Promise(e=>setTimeout(e,t))}};_("create-related-feature",c);return c},"widgets/Editor","core/reactiveUtils")
2
+ import{a as b}from"./DV233ITZ.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import{b as _}from"./EIQZRLWQ.js";import{H as p,J as w,h as m,i as h,r,u}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([g,n])=>{var y=m`@layer{:host{display:block}.hide-editor-toolbar .esri-editor__panel-toolbar,.display-none{display:none!important}.esri-editor__panel-content{padding-block:10px!important}.notice-msg{padding:10px;width:calc(100% - 20px)}}`,c=class extends p{constructor(){super(...arguments),this.customizeSubmit=!1,this.enableSnapping=!1,this.showGuidingMsg=!0,this._editorLoading=!1,this._translations=b({name:"create-related-feature",blocking:!0}),this._addingAttachment=!1,this._isSubmitBtnClicked=!1,this.success=r(),this.fail=r(),this.isActionPending=r(),this.formReady=r()}static{this.properties={customizeSubmit:5,enableSnapping:5,mapView:0,selectedFeature:0,showGuidingMsg:5,table:0,_editorLoading:16,_translations:16}}static{this.styles=y}static{this.shadowRootOptions=u}willUpdate(t){t.has("mapView")&&this.mapViewWatchHandler(),t.has("_editorLoading")&&(this.hasUpdated||this._editorLoading!==!1)&&this._editorLoadingWatchHandler(this._editorLoading)}async mapViewWatchHandler(){await this.mapView?.when(async()=>{await this.init()})}async _editorLoadingWatchHandler(t){t&&(this._container?.classList.add("display-none"),await this.startCreate(),this._container?.classList.remove("display-none"),this._editorLoading=!1)}async submit(){this._editor?.viewModel?.featureFormViewModel&&(this._isSubmitBtnClicked=!0,this._editor.viewModel.featureFormViewModel.submit())}async init(){this.mapView&&await this.createEditorWidget()}render(){let t=this._editorLoading?"":"display-none";return h`${this.showGuidingMsg&&h`<calcite-notice class="notice-msg" icon=lightbulb kind=success open><div slot=message>${this._translations.provideDetailsMsg}</div></calcite-notice>`||""}<calcite-loader class=${w(t)} label scale=s></calcite-loader>`}loaded(){this.init()}disconnectedCallback(){super.disconnectedCallback(),this._editor&&this._editor.destroy()}async createEditorWidget(){this._editor&&this._editor.destroy(),this._container=document.createElement("div"),this._container?.classList.add("display-none"),this.enableSnapping||this._container.classList.add("hide-editor-toolbar"),this._editor=new g({view:this.mapView,visibleElements:{flow:!0,settingsMenu:this.enableSnapping,sketch:!1,snappingControls:this.enableSnapping},container:this._container}),this.el.appendChild(this._container);let t=n.watch(()=>this._editor?.viewModel.featureTemplatesViewModel.state,i=>{i==="ready"&&(this._editorLoading=!0)});this._editor?.viewModel.addHandles(t);let e=n.watch(()=>this._editor?.viewModel.state,i=>{i==="adding-attachment"||i==="editing-attachment"?(this._addingAttachment=!0,this.isActionPending.emit(!0)):this._addingAttachment&&(this.isActionPending.emit(!1),this._addingAttachment=!1)});this._editor?.viewModel.addHandles(e);let o=n.watch(()=>this._editor?.viewModel.featureFormViewModel?.state,i=>{i==="ready"&&this.formReady.emit()});this._editor?.viewModel.addHandles(o)}async startCreate(){let t=this.selectedFeature?.layer,e=this.table;if(t?.relationships&&e?.relationships&&this.selectedFeature&&e.templates){let o=t.relationships[0],i=e.relationships.find(a=>t.layerId===a.relatedTableId),s=Number(this.selectedFeature.getObjectId());if(!Number.isNaN(s)&&i){let a=(await t.queryFeatures({objectIds:[s],outFields:[t.objectIdField,o.keyField]})).features[0],d=e.templates[0],l={attributeOverrides:this.makeAttributesForRelatedFeature(a,o,i),layer:e,template:d};await this._editor?.startCreateFeaturesWorkflowAtFeatureCreation(l),await this.hideEditorsElements(),this._editor?.viewModel?.featureFormViewModel?.addHandles(this._editor.viewModel.featureFormViewModel.on("submit",this.submitted.bind(this)))}}}async hideEditorsElements(){this.customizeSubmit&&(await this.timeout(700),this.el.querySelector(".esri-editor")?.querySelectorAll("calcite-flow-item")?.forEach(t=>{let e=t.shadowRoot?.querySelector("calcite-panel")?.shadowRoot?.querySelector("article");e?.querySelector("header")?.setAttribute("style","display: none"),e?.querySelector("footer")?.setAttribute("style","display: none")}))}makeAttributesForRelatedFeature(t,e,o){let i=e.keyField,s;t.attributes.hasOwnProperty(i)?s=t.getAttribute(i):t.attributes.hasOwnProperty(i.toLowerCase())?s=t.getAttribute(i.toLowerCase()):t.attributes.hasOwnProperty(i.toUpperCase())&&(s=t.getAttribute(i.toUpperCase()));let a=o.keyField,d=this.table?.fields.find(l=>l.name.toLocaleLowerCase()===a.toLocaleLowerCase());if(d)return a=d.name,{[a]:s}}async submitted(t){if(t.invalid.length){this._isSubmitBtnClicked=!1;return}if(t.valid.length&&this._isSubmitBtnClicked){this._isSubmitBtnClicked=!1;try{this._editor?.activeWorkflow&&(await this._editor.activeWorkflow.commit(),this._editor.viewModel.failures?.length&&this._editor.viewModel.failures.some(e=>{if(e.error)throw e.error}))}catch(e){this.fail.emit(e);return}this.success.emit()}}async timeout(t){return new Promise(e=>setTimeout(e,t))}};_("create-related-feature",c);return c},"widgets/Editor","core/reactiveUtils")
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import{a as S}from"./JOQDD4HN.js";import"./JM5FJEHU.js";import d from"./KDIUYXBA.js";import a from"./UUYUTETH.js";import{a as $}from"./M5MQY5WC.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import{b as I}from"./HW7HHHMK.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"./JOQDD4HN.js";import"./JM5FJEHU.js";import d from"./KDIUYXBA.js";import a from"./UUYUTETH.js";import{a as $}from"./DV233ITZ.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import{b as I}from"./EIQZRLWQ.js";import{F as c,G as o,H as F,J as u,h as y,i as l,l as p,r as b,u as L}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([E,V,k,O,{b:v},{a:C,c:m,d:d,e:_,f:f,g:x}])=>{var M=y`@layer{:host{display:block;--calcite-label-margin-bottom: 0px;--solutions-theme-foreground-color: var(--calcite-color-foreground-1)}.width-full{width:100%!important}.height-full{height:100%!important}.notice-msg{padding:10px;width:calc(100% - 20px)}.progress-bar{padding:12px}.footer-top-button{padding-bottom:7px}.footer-button{height:35px}.feature-pagination{background-color:var(--calcite-color-foreground-1)!important;border-block-end:1px solid var(--calcite-color-border-3);display:flex;justify-content:center;padding:5px 0}.pagination-count{color:var(--calcite-color-brand);border-bottom:1px solid var(--calcite-color-brand);font-weight:700}.report-submitted-msg{position:absolute;z-index:1000}.share-node{display:flex}.overflow-auto{overflow:auto}}`,g=class extends F{constructor(){super(),this.center="",this.commentButtonText="",this.commentSubmittedMessage="",this.defaultWebmap="",this.description="",this.enableAnonymousAccess=!1,this.enableAnonymousComments=!1,this.enableComments=!1,this.enableHome=!0,this.enableLogin=!1,this.enableNewReports=!1,this.enableSearch=!0,this.enableSnapping=!1,this.enableZoom=!0,this.isMobile=!1,this.layerExpressions=[],this.layerId="",this.level="",this.loginTitle="",this.mapInfos=[],this.objectId="",this.reportButtonText="",this.reportsHeader="",this.reportSubmittedMessage="",this.showComments=!1,this.showUserImageInCommentsList=!1,this.showFeatureSymbol=!1,this.showMyReportsOnly=!1,this.submitNewReportsMessage="",this.theme="light",this.floorLevel="",this.showFullCommentTitle=!0,this.filterByMapExtent=!1,this.sortOption="newest",this.reportingArea=!1,this.reportingAreaLayer="",this.reportingAreaMessage="",this.enablePhotoLocation=!1,this.aiImageExtraction=[],this._featureCreationFailedErrorMsg="",this._filterActive=!1,this._flowItems=[],this._hasValidLayers=!1,this._reportSubmitted=!1,this._selectedLayerName="",this._showSubmitCancelButton=!1,this._showLoadingIndicator=!1,this._sidePanelCollapsed=!1,this._translations=$({name:"crowdsource-reporter",blocking:!0}),this._updatedProgressBarStatus=25,this._updatedSortOption="newest",this._commentSubmitted=!1,this._addingCommentFailed=!1,this._filterOpen=!1,this._showNextButton=!1,this._submitNextButtonDisabled=!1,this._showFilterIcon=!1,this._createFeature=c(),this._currentFeatureId="",this._editableLayerIds=[],this._featureDetails=c(),this._featureList=c(),this._selectedRelatedFeature=[],this._layerList=c(),this._createRelatedFeature=c(),this._layers=[],this._mapImageryLayersId=[],this._selectedFeature=[],this._selectedFeatureIndex=0,this._selectedLayerId="",this._shareNode=c(),this._urlParamsLoaded=!1,this._validLayers=[],this._nonVisibleValidLayers=[],this._showFullPanel=!1,this._floorExpression="",this._formElements=[],this._prevSelectedLayerId="",this._t9nLayerExpressions=[],this._reportSubmittedAlertNode=c(),this._commentSubmittedAlertNode=c(),this._sortPopoverNode=c(),this.togglePanel=b(),S(window)}static{this.properties={center:1,commentButtonText:1,commentSubmittedMessage:1,defaultWebmap:1,description:1,enableAnonymousAccess:5,enableAnonymousComments:5,enableComments:5,enableHome:5,enableLogin:5,enableNewReports:5,enableSearch:5,enableSnapping:5,enableZoom:5,isMobile:5,layerExpressions:0,layerId:1,level:1,loginTitle:1,mapInfos:0,mapView:0,objectId:1,reportButtonText:1,reportingOptions:0,reportsHeader:1,reportSubmittedMessage:1,searchConfiguration:0,showComments:5,showUserImageInCommentsList:5,showFeatureSymbol:5,showMyReportsOnly:5,submitNewReportsMessage:1,theme:1,zoomToScale:9,floorLevel:1,showFullCommentTitle:5,filterByMapExtent:5,sortOption:1,reportingArea:5,reportingAreaLayer:1,reportingAreaMessage:1,enablePhotoLocation:5,aiImageExtraction:0,_featureCreationFailedErrorMsg:16,_filterActive:16,_flowItems:16,_hasValidLayers:16,_mapInfo:16,_reportSubmitted:16,_selectedLayerName:16,_showSubmitCancelButton:16,_showLoadingIndicator:16,_sidePanelCollapsed:16,_translations:16,_updatedProgressBarStatus:16,_updatedSorting:16,_updatedSortOption:16,_commentSubmitted:16,_addingCommentFailed:16,_filterOpen:16,_showNextButton:16,_submitNextButtonDisabled:16,_showFilterIcon:16}}static{this.styles=M}static{this.shadowRootOptions=L}willUpdate(e){e.has("isMobile")&&this.isMobileWatchHandler(this.isMobile),e.has("mapView")&&this.hasUpdated&&this.mapViewWatchHandler(),e.has("floorLevel")&&this.floorLevelWatchHandler(),(e.has("reportingAreaLayer")||e.has("reportingArea")&&this.hasUpdated)&&setTimeout(()=>{this._createFeature.value&&this._createFeature.value.refresh(this.floorLevel)},50),e.has("showMyReportsOnly")&&(this.hasUpdated||this.showMyReportsOnly!==!1)&&this.showMyReportsOnlyWatchHandler(),e.has("sortOption")&&(this.hasUpdated||this.sortOption!=="newest")&&this.sortOptionWatchHandler(),e.has("filterByMapExtent")&&(this.hasUpdated||this.filterByMapExtent!==!1)&&this.filterByMapExtentChangeWatchHandler(),e.has("layerExpressions")&&(this.hasUpdated||this.layerExpressions?.length>0)&&this.layerExpressionsWatchHandler(),e.has("showFeatureSymbol")&&(this.hasUpdated||this.showFeatureSymbol!==!1)&&this.showFeatureSymbolWatchHandler(),(this._flowItems.includes("filter-panel")||this._filterOpen)&&this._filterList?.updateInitDefExpressions({initDefExpressions:this._initDefExpressions})}async isMobileWatchHandler(e){this.updatePanelState(!1,this._showFullPanel),e&&this._flowItems[this._flowItems.length-1]==="filter-panel"?(await this.backFromFilterPanel(),this._filterOpen=!0):!e&&this._filterOpen&&(await this._closeFilter(),this._flowItems=[...this._flowItems,"filter-panel"])}async mapViewWatchHandler(){await this.mapView?.when(async()=>{this.setInitExpressions(),await this.setMapView()})}async floorLevelWatchHandler(){if(this._editableLayerIds)for(let e of this._editableLayerIds){let t=this.mapView&&await d(this.mapView,e);t&&t.floorInfo?.floorField&&this._updateFloorDefinitionExpression(t)}this._flowItems[this._flowItems.length-1]==="layer-list"&&this._layerList.value&&await this._layerList.value.refresh(),this._featureList.value&&this._featureList.value.refresh(),this._createFeature.value&&this._createFeature.value.refresh(this.floorLevel)}async showMyReportsOnlyWatchHandler(){this._editableLayerIds&&(await this._updateFeatures(),this.refreshLists())}async sortOptionWatchHandler(){this.updateSortingOptions()}filterByMapExtentChangeWatchHandler(){this.refreshLists()}async layerExpressionsWatchHandler(){await this.resetFilterList(),await this.handleSelectedLayersFilter(),await this._featureList.value?.refresh()}async showFeatureSymbolWatchHandler(){await this._featureList.value?.refresh()}async updateLayerExpressionsT9n(e){if(this._t9nLayerExpressions=e||this.layerExpressions,this._filterList!=null)await this._filterList.handleUpdatingT9nData(this._t9nLayerExpressions);else if(this._currentLayerExpressions!=null){let t=structuredClone(this._currentLayerExpressions);this.handleLayerExpressionsT9n(t,this._t9nLayerExpressions),this._currentLayerExpressions=t,this._showFilterIcon=this._currentLayerExpressions?.length>0}return Promise.resolve()}async load(){this._urlParamsLoaded=!1,await this.mapView?.when(async()=>{this._layers=this.reportingOptions?Object.keys(this.reportingOptions).filter(e=>{let t=e&&this.reportingOptions&&this.reportingOptions[e];return t&&t.visible}):[],this.setInitExpressions(),await this.setMapView()})}render(){let e=this.theme==="dark"?"calcite-mode-dark":"calcite-mode-light";return l`${this._reportSubmitted&&l`<calcite-alert auto-close class=${`${e} report-submitted-msg`} icon=check-circle kind=success label @calciteAlertClose=${()=>{this._reportSubmitted=!1}} open placement=top><div slot=message .innerHTML=${(this.reportSubmittedMessage||this._translations.submitMsg)??""} ${o(this._reportSubmittedAlertNode)}></div></calcite-alert>`||""}${this._featureCreationFailedErrorMsg&&l`<calcite-alert auto-close class=${u(e)} icon=x-octagon kind=danger label @calciteAlertClose=${()=>{this._featureCreationFailedErrorMsg=""}} open placement=top><div slot=title>${this._translations.error}</div><div slot=message>${this._featureCreationFailedErrorMsg}</div></calcite-alert>`||""}${this._commentSubmitted&&l`<calcite-alert auto-close class=${`report-submitted ${e}`} icon=check-circle kind=success label @calciteAlertClose=${()=>{this._commentSubmitted=!1}} open placement=top><div slot=message .innerHTML=${(this.commentSubmittedMessage||this._translations.commentSubmittedMsg)??""} ${o(this._commentSubmittedAlertNode)}></div></calcite-alert>`||""}${this._addingCommentFailed&&l`<calcite-alert auto-close class=${u(e)} icon=x-octagon kind=danger label @calciteAlertClose=${()=>{this._addingCommentFailed=!1}} open placement=top><div slot=title>${this._translations.error}</div><div slot=message>${this._translations.addingCommentFailedMsg}</div></calcite-alert>`||""}<div><calcite-shell content-behind>${this._getReporter()}</calcite-shell></div>${this.isMobile&&this.filterModal()||""}`}updated(){this._adjustAlertStyles()}async setSelectedLayer(e,t){this._selectedLayerId=e,this._selectedLayer=this.mapView&&await d(this.mapView,e),this._selectedLayerName=t,this._validLayers.forEach(i=>{this._nonVisibleValidLayers.find(s=>s.id===i.id)||i.set("visible",!e||i.id===e)})}_getLayersConfig(e){return this.reportingOptions&&this.reportingOptions[e]?this.reportingOptions[e]:null}_getReporter(){let e=[];this._flowItems.forEach(i=>{switch(i){case"layer-list":e.push(this.getLayerListFlowItem());break;case"feature-list":e.push(this.getFeatureListFlowItem(this._selectedLayerId,this._selectedLayerName));break;case"filter-panel":e.push(this.getFilterPanel());break;case"feature-details":e.push(this.getFeatureDetailsFlowItem());break;case"reporting-layer-list":e.push(this.getChooseCategoryFlowItem());break;case"feature-create":e.push(this.getFeatureCreateFlowItem());break;case"comment-details":e.push(this.getCommentDetailsFlowItem());break;case"add-comment":e.push(this.getAddCommentFlowItem());break}});let t=this.theme==="dark"?"calcite-mode-dark":"calcite-mode-light";return l`<calcite-panel class=${`width-full ${t}`}>${this.mapView?l`<calcite-flow>${e?.length>0&&e||""}</calcite-flow>`:l`<calcite-loader label scale=m></calcite-loader>`}</calcite-panel>`}filterModal(){return(this.layerExpressions?this.layerExpressions.filter(e=>e.id===this._selectedLayerId):[]).length>0&&l`<calcite-dialog aria-labelledby=modal-title class="modal" .heading=${this._translations.filterLayerTitle.replace("{{title}}",this._selectedLayerName)} kind=brand @calciteDialogClose=${()=>{this._closeFilter()}} .open=${this._filterOpen} width=s><div>${this.mapView&&l`<instant-apps-filter-list close-btn .closeBtnOnClick=${()=>{this._closeFilter()}} combobox-overlay-positioning=fixed .layerExpressions=${this._currentLayerExpressions} @filterListReset=${()=>{this._filterActive=!1,this._featureList.value&&this._featureList.value.refresh()}} @filterUpdate=${()=>{this._filterList?.filterCount!==void 0&&this._handleFilterUpdate(this._filterList?.filterCount>0)}} .view=${this.mapView} ${o(this._setFilterList)}></instant-apps-filter-list>`||""}</div></calcite-dialog>`||""}_setFilterList(e){this._filterList=e,e&&(e.autoUpdateUrl=!1,e.resetBtn=this.isMobile,e.resetFiltersOnDisconnect=!1,e.zoomBtn=!1)}_adjustAlertStyles(){this.reportSubmittedMessage&&this._reportSubmittedAlertNode.value?.children[0]&&(this._reportSubmittedAlertNode.value.children[0].style.margin="0px"),this.commentSubmittedMessage&&this._commentSubmittedAlertNode.value?.children[0]&&(this._commentSubmittedAlertNode.value.children[0].style.margin="0px")}_toggleFilter(){this._filterOpen=!this._filterOpen}async _closeFilter(){this._filterOpen=!1,this._filterList!=null&&(this._currentLayerExpressions=await this._filterList.getCurrentLayerExpressions(),this._showFilterIcon=this._currentLayerExpressions?.length>0)}async sortOptionClick(e,t,i){this._updatedSorting={field:e,order:t},this._updatedSortOption=i,this._sortPopoverNode.value&&(this._sortPopoverNode.value.open=!1)}_toggleSort(){let e=this.reportingOptions&&this.reportingOptions[this._selectedLayerId]&&this.reportingOptions[this._selectedLayerId].like&&this.reportingOptions[this._selectedLayerId].likeField;return l`<calcite-popover auto-close label offset-distance=0 .placement=${this.isMobile?"leading-start":"bottom-start"} pointer-disabled reference-element=sort-popover ${o(this._sortPopoverNode)}><calcite-list label selection-mode=single-persist><calcite-list-item .label=${this._translations.sortNewest} @calciteListItemSelect=${()=>{this._selectedLayer&&this.sortOptionClick(this._selectedLayer.objectIdField,"desc","newest")}} .selected=${this._updatedSortOption==="newest"} value=newest></calcite-list-item><calcite-list-item .label=${this._translations.sortOldest} @calciteListItemSelect=${()=>{this._selectedLayer&&this.sortOptionClick(this._selectedLayer.objectIdField,"asc","oldest")}} .selected=${this._updatedSortOption==="oldest"} value=oldest></calcite-list-item>${e&&l`<calcite-list-item .label=${this._translations.sortHighestVoted} @calciteListItemSelect=${()=>{let t=this.reportingOptions&&this.reportingOptions[this._selectedLayerId].likeField;t!==void 0&&this.sortOptionClick(t,"desc","highestVoted")}} .selected=${this._updatedSortOption==="highestVoted"} value=highestVoted></calcite-list-item><calcite-list-item .label=${this._translations.sortLowestVoted} @calciteListItemSelect=${()=>{let t=this.reportingOptions&&this.reportingOptions[this._selectedLayerId].likeField;t&&this.sortOptionClick(t,"asc","lowestVoted")}} .selected=${this._updatedSortOption==="lowestVoted"} value=lowestVoted></calcite-list-item>`||""}</calcite-list></calcite-popover>`}async _handleFilterListReset(){this._filterActive=!1}async _handleFilterUpdate(e){this._showLoadingIndicator=!0,this._filterActive=e,this._featureList.value&&await this._featureList.value.refresh(),this._showLoadingIndicator=!1}getLayerListFlowItem(){return l`<calcite-flow-item .collapsed=${this.isMobile&&this._sidePanelCollapsed} .heading=${this.reportsHeader} .loading=${this._showLoadingIndicator} .selected=${this._flowItems[this._flowItems.length-1]==="layer-list"}>${this.isMobile&&this.getActionToExpandCollapsePanel()||""}${this._hasValidLayers&&this.enableNewReports&&l`<calcite-button appearance=solid @click=${this.navigateToChooseCategory} slot=footer width=full>${this.reportButtonText?this.reportButtonText:this._translations.createReportButtonText}</calcite-button>`||""}<calcite-panel><layer-list .applyLayerViewFilter=${this.showMyReportsOnly} class="height-full" .filterByMapExtent=${this.filterByMapExtent} .layers=${this._editableLayerIds?.length>0?this._editableLayerIds:this._layers} .mapView=${this.mapView} @layerSelect=${this.displayFeaturesList} @layersListLoaded=${this.layerListLoaded} show-feature-count show-next-icon ${o(this._layerList)}></layer-list></calcite-panel></calcite-flow-item>`}getChooseCategoryFlowItem(){let e=this.reportingOptions?Object.keys(this.reportingOptions).filter(t=>this.reportingOptions&&this.reportingOptions[t].visible&&this.reportingOptions[t].reporting&&this._layerItemsHash&&this._layerItemsHash[t]&&this._layerItemsHash[t].supportsAdd):[];return l`<calcite-flow-item .collapsed=${this.isMobile&&this._sidePanelCollapsed} .heading=${this.reportButtonText?this.reportButtonText:this._translations.createReportButtonText} @calciteFlowItemBack=${this.backFromSelectedPanel} .selected=${this._flowItems[this._flowItems.length-1]==="reporting-layer-list"}><calcite-panel><div class="progress-bar"><calcite-progress type=determinate .value=${this._updatedProgressBarStatus}></calcite-progress></div><calcite-notice class="notice-msg" icon=lightbulb kind=success open><div slot=message>${this._translations.chooseCategoryMsg}</div></calcite-notice><layer-list class="height-full" .layers=${e} .mapView=${this.mapView} @layerSelect=${this.navigateToCreateFeature}></layer-list></calcite-panel></calcite-flow-item>`}getFeatureCreateFlowItem(){return l`<calcite-flow-item .collapsed=${this.isMobile&&this._sidePanelCollapsed} .heading=${this._selectedLayerName} @calciteFlowItemBack=${this.backFromCreateFeaturePanel} .selected=${this._flowItems[this._flowItems.length-1]==="feature-create"}>${this._showSubmitCancelButton&&l`<div class=width-full slot=footer><calcite-button appearance=solid class="footer-top-button footer-button" .disabled=${this._submitNextButtonDisabled} @click=${this._showNextButton?this.onNextButtonClick.bind(this):this.onCreateFeatureSubmitButtonClick.bind(this)} width=full>${this._showNextButton?this._translations.next:this._translations.submit}</calcite-button><calcite-button appearance=outline class=footer-button @click=${this.backFromCreateFeaturePanel} width=full>${this._translations.cancel}</calcite-button></div>`||""}<calcite-panel><div class="progress-bar"><calcite-progress type=determinate .value=${this._updatedProgressBarStatus}></calcite-progress></div><create-feature app-name=reporter .aiImageExtraction=${this.aiImageExtraction} class="height-full overflow-auto" customize-submit enable-search .enablePhotoLocation=${this.enablePhotoLocation} .enableSnapping=${this.enableSnapping} .floorLevel=${this.floorLevel} .formElements=${this._formElements.find(e=>e.id===this._selectedLayerId)} .reportingAreaLayer=${this.reportingAreaLayer} .isMobile=${this.isMobile} .mapView=${this.mapView} @drawComplete=${this.onFormReady} @editingLocation=${this.editingLocation} @editingAttachment=${this.showSubmitCancelButton} @fail=${this.createFeatureFailed} @modeChanged=${this.backFromCreateFeaturePanel} @progressStatus=${this.updatedProgressStatus} @success=${this.onReportSubmitted} .searchConfiguration=${this.searchConfiguration} .selectedLayerId=${this._selectedLayerId} .reportingArea=${this.reportingArea} .reportingAreaMessage=${this.reportingAreaMessage} .submitNewReportsMessage=${this.submitNewReportsMessage} update-map-position ${o(this._createFeature)}></create-feature></calcite-panel></calcite-flow-item>`}updatedProgressStatus(e){this._updatedProgressBarStatus=e.detail}onFormReady(e){this._submitNextButtonDisabled=e.detail,this._showSubmitCancelButton=!0}editingLocation(){this._showNextButton=!0}showSubmitCancelButton(e){this._showSubmitCancelButton=!e.detail}onCreateFeatureSubmitButtonClick(){this._createFeature.value&&(this._showNextButton=!1,this._createFeature.value.submit())}backFromCreateFeaturePanel(){this._createFeature.value&&(this._showSubmitCancelButton=!1,this._showNextButton=!1,this.updateNonVisibleLayersOnMap(!1)),this.backFromSelectedPanel()}onNextButtonClick(){this._createFeature.value&&(this._showNextButton=!1,this._showSubmitCancelButton=!0,this._createFeature.value.showForm())}onCreateRelatedFeatureSubmitButtonClick(){this._createRelatedFeature.value&&this._createRelatedFeature.value.submit()}backFromCreateRelatedFeaturePanel(){this._createRelatedFeature.value&&(this._showSubmitCancelButton=!1),this.backFromSelectedPanel()}createFeatureFailed(e){console.error(e.detail),this._featureCreationFailedErrorMsg=e.detail.message}async onReportSubmitted(){this._showSubmitCancelButton=!1,this.updateNonVisibleLayersOnMap(!1),await this.navigateToHomePage(),this._reportSubmitted=!0,this._updatedProgressBarStatus=25,this._showFullPanel&&this.updatePanelState(this._sidePanelCollapsed,!1)}addCommentFailed(e){console.error(e.detail),this._addingCommentFailed=!0}async onCommentSubmitted(){this._commentSubmitted=!0,this.backFromCreateRelatedFeaturePanel(),this._showLoadingIndicator=!0,this._featureDetails.value&&await this._featureDetails.value.refresh(this._currentFeature),setTimeout(()=>{this._showLoadingIndicator=!1},300)}async navigateToHomePage(){await this.setSelectedFeatures([]),this._layerList.value&&await this._layerList.value.refresh(),this._editableLayerIds.length===1?(this._featureList.value&&await this._featureList.value.refresh(),this._flowItems=["feature-list"]):this._flowItems=["layer-list"]}async navigateToCreateFeature(e){e.detail.layerId&&e.detail.layerName&&await this.setSelectedLayer(e.detail.layerId,e.detail.layerName),this.updateNonVisibleLayersOnMap(!0),this._getFormElements(),this._showSubmitCancelButton=!1,this._showNextButton=!1,this.updatePanelState(!1,!0),this._flowItems=[...this._flowItems,"feature-create"]}navigateToChooseCategory(){this.updatePanelState(!1,!0),this._flowItems=[...this._flowItems,"reporting-layer-list"]}updateNonVisibleLayersOnMap(e){this._nonVisibleValidLayers.find(t=>t.id===this._selectedLayerId)&&this._selectedLayer&&this._selectedLayer.set("visible",e)}async layerListLoaded(e){if(this._layerList.value&&this._flowItems[this._flowItems.length-1]==="layer-list"||this._flowItems[0]==="feature-list"){let t=e.detail,i=this.mapView&&await _(this.mapView),s=[];if(this._validLayers=[],this._nonVisibleValidLayers=[],i?.forEach(a=>{t.includes(a.id)&&(this._validLayers.push(a),a.visible||this._nonVisibleValidLayers.push(a),this._getLayersConfig(a.id)?.reporting&&this._layerItemsHash&&this._layerItemsHash[a.id]&&this._layerItemsHash[a.id].supportsAdd&&s.push(a.id))}),this.handleMapClick(),this._hasValidLayers=s.length>0,!this._urlParamsLoaded&&this._editableLayerIds.length>1&&this.layerId&&this.objectId){let a=this.mapView&&await d(this.mapView,this.layerId);a&&await this.displayFeaturesList({detail:{layerId:a.id,layerName:a.title}}),this._urlParamsLoaded=!0,await this.loadFeatureFromURLParams()}}}async displayFeaturesList(e){this._showLoadingIndicator=!0,await this.setSelectedLayer(e.detail.layerId,e.detail.layerName),this.updateSortingOptions(),this.handleSelectedLayersFilter(),this._flowItems=[...this._flowItems,"feature-list"],this._prevSelectedLayerId=this._selectedLayerId,this._showLoadingIndicator=!1}updateSortingOptions(){let e=this.sortOption===""?"newest":this.sortOption,t=e==="oldest"||e==="lowestVoted"?"asc":"desc",i=this.reportingOptions?.[this._selectedLayerId]?.like?this.reportingOptions?.[this._selectedLayerId]?.likeField:"",s=this._selectedLayer&&(e==="newest"||e==="oldest")?this._selectedLayer?.objectIdField:i;this._updatedSorting={field:s||"",order:t},this._updatedSortOption=!i&&(e==="highestVoted"||e==="lowestVoted")?"newest":e}async backFromFilterPanel(){this._filterList!=null&&(this._currentLayerExpressions=await this._filterList.getCurrentLayerExpressions(),this._showFilterIcon=this._currentLayerExpressions?.length>0),this._featureList.value&&await this._featureList.value.refresh(),this.backFromSelectedPanel()}backFromSelectedPanel(){this._updatedProgressBarStatus=25;let e=[...this._flowItems];if(e[e.length-1]==="comment-details"||e[e.length-1]==="add-comment"||this.clearHighlights(),(e[e.length-1]==="reporting-layer-list"||e[e.length-1]==="feature-create"&&(e[0]==="feature-list"||e[e.length-2]==="feature-list"))&&this.updatePanelState(this._sidePanelCollapsed,!1),e.pop(),e.length===1&&e[0]==="layer-list"){this.navigateToHomePage();return}this._flowItems=[...e]}toggleSidePanel(){this._sidePanelCollapsed=!this._sidePanelCollapsed,this.togglePanel.emit({panelState:this._sidePanelCollapsed,isFormOpen:this._showFullPanel})}updatePanelState(e,t){this._sidePanelCollapsed=e,this._showFullPanel=t,this.togglePanel.emit({panelState:this._sidePanelCollapsed,isFormOpen:this._showFullPanel})}async onFeatureSelectFromList(e){await this.setSelectedFeatures([e.detail]),this._flowItems=[...this._flowItems,"feature-details"]}async getRelatedTable(){let e=this._currentFeature?.layer,t=this.mapView&&await f(this.mapView);e.relationships?.some(i=>{let s=t?.filter(a=>e.url===a.url&&a.layerId===i.relatedTableId);return s&&s.length>0?(this._relatedTable=s[0],!0):!1})}async updatingFeatureDetails(e){this._showLoadingIndicator=e}async selectionChanged(e){this.updatingFeatureDetails(!0),await this.setCurrentFeature(e.detail.selectedFeature[0]),this.highlightOnMap(e.detail.selectedFeature[0]),this._selectedFeatureIndex=e.detail.selectedFeatureIndex,this._featureDetails.value&&await this._featureDetails.value.refresh(e.detail.selectedFeature[0])}showAddCommentsPanel(){this._flowItems=[...this._flowItems,"add-comment"]}async onCommentSelectFromList(e){this._selectedRelatedFeature=[e.detail],this._flowItems=[...this._flowItems,"comment-details"]}getFeatureListFlowItem(e,t){let i=this._getLayersConfig(this._selectedLayerId)?.reporting&&this._layerItemsHash&&this._layerItemsHash[this._selectedLayerId].supportsAdd,s=this._showFilterIcon;return l`<calcite-flow-item .collapsed=${this.isMobile&&this._sidePanelCollapsed} .heading=${t} .loading=${!this.isMobile&&this._showLoadingIndicator} @calciteFlowItemBack=${this.backFromSelectedPanel} .selected=${this._flowItems[this._flowItems.length-1]==="feature-list"}>${this._toggleSort()}<calcite-action appearance=solid icon=sort-ascending-arrow id=sort-popover slot=header-actions-end .text=${this._translations.sort} title=${this._translations.sort??p}></calcite-action>${s&&l`<calcite-action appearance=solid icon=filter .indicator=${this._filterActive} @click=${()=>{this.isMobile?this._toggleFilter():this._flowItems=[...this._flowItems,"filter-panel"]}} slot=header-actions-end .text=${this._translations.filter} title=${this._translations.filter??p}></calcite-action>`||""}${this.isMobile&&this.getActionToExpandCollapsePanel()||""}${this.enableNewReports&&i&&l`<calcite-button appearance=solid @click=${this.navigateToCreateFeature} slot=footer width=full>${this.reportButtonText?this.reportButtonText:this._translations.createReportButtonText}</calcite-button>`||""}<calcite-panel>${l`<feature-list .applyLayerViewFilter=${this.showMyReportsOnly} class="height-full" .filterByMapExtent=${this.filterByMapExtent} highlight-on-hover .mapView=${this.mapView} .noFeaturesFoundMsg=${this._translations.featureErrorMsg} @featureClick=${()=>{this._showLoadingIndicator=!0}} @featureSelect=${this.onFeatureSelectFromList} page-size=30 .reportingOptions=${this.reportingOptions} .selectedLayerId=${e} .showFeatureSymbol=${this.showFeatureSymbol} .sortingInfo=${this._updatedSorting} ${o(this._featureList)}></feature-list>`}</calcite-panel></calcite-flow-item>`}getFilterPanel(){return l`<calcite-flow-item .collapsed=${this.isMobile&&this._sidePanelCollapsed} .heading=${this._translations.filterLayerTitle.replace("{{title}}",this._selectedLayerName)} .loading=${this._showLoadingIndicator} @calciteFlowItemBack=${this.backFromFilterPanel} .selected=${this._flowItems[this._flowItems.length-1]==="filter-panel"}>${this.isMobile&&this.getActionToExpandCollapsePanel()||""}<div class=width-full slot=footer><div class=width-full slot=footer><calcite-button appearance=solid class="footer-top-button footer-button" .disabled=${!this._filterActive} @click=${this.resetFilterList} width=full>${this._translations.resetFilter}</calcite-button><calcite-button appearance=outline class=footer-button @click=${this.backFromFilterPanel} width=full>${this._translations.close}</calcite-button></div></div><calcite-panel>${this.mapView&&l`<instant-apps-filter-list .closeBtnOnClick=${()=>{}} combobox-overlay-positioning=fixed .layerExpressions=${this._currentLayerExpressions} @filterListReset=${()=>{this._handleFilterListReset()}} @filterUpdate=${()=>{let e=this._filterList?.filterCount;e!==void 0&&this._handleFilterUpdate(e>0)}} .view=${this.mapView} ${o(this._setFilterList)}></instant-apps-filter-list>`||""}</calcite-panel></calcite-flow-item>`}getFeatureDetailsFlowItem(){let e=this._selectedLayer?.relationships,t=this._getLayersConfig(this._selectedLayerId)?.comment&&e&&e.length>0&&this._relatedTable;return l`<calcite-flow-item .collapsed=${this.isMobile&&this._sidePanelCollapsed} .heading=${this._selectedLayerName} .loading=${this._showLoadingIndicator} @calciteFlowItemBack=${this.backFromSelectedPanel} .selected=${this._flowItems[this._flowItems.length-1]==="feature-details"}>${this.isMobile&&this.getActionToExpandCollapsePanel()||""}${this.mapView&&l`<instant-apps-social-share class=share-node flip-rtl popover-button-icon-scale=s remove-popover-offset scale=m share-button-color=neutral share-button-type=action slot=header-actions-end social-media .view=${this.mapView} ${o(this._shareNode)}></instant-apps-social-share>`||""}${this._selectedFeature.length>1&&this.getFeaturesPagination()||""}<calcite-panel><feature-details class=full-height .enableSnapping=${this.enableSnapping} .graphics=${this._selectedFeature} .layerItemsHash=${this._layerItemsHash} .mapView=${this.mapView} @addComment=${this.showAddCommentsPanel} @commentClick=${()=>{this._showLoadingIndicator=!0}} @commentSelect=${this.onCommentSelectFromList} @featureSelectionChange=${this.selectionChanged} @likeOrDislikeClicked=${()=>{this._featureList.value&&this._featureList.value.refresh(!0)}} @loadingStatus=${i=>{this.updatingFeatureDetails(i.detail)}} .reportingOptions=${this.reportingOptions} .showFullCommentTitle=${this.showFullCommentTitle} .showUserImageInCommentsList=${this.showUserImageInCommentsList} ${o(this._featureDetails)}></feature-details>${t&&l`<calcite-button appearance=solid @click=${this.showAddCommentsPanel} slot=footer width=full>${this.commentButtonText||this._translations.comment}</calcite-button>`||""}</calcite-panel></calcite-flow-item>`}getFeaturesPagination(){return l`<div class="feature-pagination"><div><calcite-button appearance=transparent icon-start=chevron-left icon-flip-rtl=both id=solutions-back @click=${()=>this._featureDetails.value&&void this._featureDetails.value.back()} scale=s width=full></calcite-button><calcite-tooltip placement=top reference-element=solutions-back><span>${this._translations.back}</span></calcite-tooltip></div><calcite-button appearance=transparent @click=${()=>this._featureDetails.value&&void this._featureDetails.value.toggleListView()} scale=s><span class="pagination-count">${this._getCount()}</span></calcite-button><div><calcite-button appearance=transparent icon-flip-rtl=both icon-start=chevron-right id=solutions-next @click=${()=>this._featureDetails.value&&void this._featureDetails.value.next()} scale=s width=full></calcite-button><calcite-tooltip placement=top reference-element=solutions-next><span>${this._translations.next}</span></calcite-tooltip></div></div>`}getCommentDetailsFlowItem(){return l`<calcite-flow-item .collapsed=${this.isMobile&&this._sidePanelCollapsed} .heading=${this._relatedTable?.title||""} @calciteFlowItemBack=${this.backFromSelectedPanel} .selected=${this._flowItems[this._flowItems.length-1]==="comment-details"}>${this.isMobile&&this.getActionToExpandCollapsePanel()||""}<calcite-panel><info-card .enableSnapping=${this.enableSnapping} .graphics=${this._selectedRelatedFeature} .mapView=${this.mapView} @selectionChanged=${()=>{this._showLoadingIndicator=!1}}></info-card></calcite-panel></calcite-flow-item>`}getAddCommentFlowItem(){return l`<calcite-flow-item .collapsed=${this.isMobile&&this._sidePanelCollapsed} .heading=${this._relatedTable?.title||""} @calciteFlowItemBack=${this.backFromCreateRelatedFeaturePanel} .selected=${this._flowItems[this._flowItems.length-1]==="add-comment"}>${this.isMobile&&this.getActionToExpandCollapsePanel()||""}<div class=width-full slot=footer>${this._showSubmitCancelButton&&l`<div class=width-full slot=footer><calcite-button appearance=solid class="footer-top-button footer-button" @click=${this.onCreateRelatedFeatureSubmitButtonClick} width=full>${this._translations.submit}</calcite-button><calcite-button appearance=outline class=footer-button @click=${this.backFromCreateRelatedFeaturePanel} width=full>${this._translations.cancel}</calcite-button></div>`||""}</div><calcite-panel><create-related-feature customize-submit .enableSnapping=${this.enableSnapping} .mapView=${this.mapView} @fail=${this.addCommentFailed} @formReady=${this.onFormReady} @isActionPending=${this.showSubmitCancelButton} @success=${this.onCommentSubmitted} .selectedFeature=${this._currentFeature} .table=${this._relatedTable} ${o(this._createRelatedFeature)}></create-related-feature></calcite-panel></calcite-flow-item>`}async setSelectedFeatures(e){this._selectedFeature=e,await this.setCurrentFeature(this._selectedFeature.length?this._selectedFeature[0]:void 0)}async setCurrentFeature(e){if(this._currentFeature=e,e&&e.layer){let t=e.layer;t.title&&this.setSelectedLayer(t.id,t.title),this._currentFeatureId=e.attributes[t.objectIdField],this._getLayersConfig(t.id)?.comment&&t.relationships&&t.relationships.length>0&&await this.getRelatedTable()}else this._editableLayerIds.length>1&&(this.setSelectedLayer("",""),this.handlePrevLayersFilter()),this._currentFeatureId="";this._updateShareURL()}async highlightOnMap(e){if(this.clearHighlights(),e&&e.geometry&&e.layer&&e.layer.id!==void 0){let t=this.mapView&&await m(this.mapView,e.layer.id.toString());if(t){let i=Number(e.getObjectId());this._highlightHandle=this.mapView&&await x([i],t,this.mapView,!0,this.zoomToScale)}}this.updatingFeatureDetails(!1)}clearHighlights(){this._highlightHandle&&this._highlightHandle.remove()}getActionToExpandCollapsePanel(){return l`<calcite-action appearance=solid .icon=${this._sidePanelCollapsed?"chevrons-up":"chevrons-down"} @click=${this.toggleSidePanel} slot=header-actions-end .text=${(this._sidePanelCollapsed?this._translations.expand:this._translations.collapse)||""}></calcite-action>`}async setMapView(){this.mapView&&await f(this.mapView),await this.getLayersToShowInList(),await this._updateFeatures(),this._editableLayerIds?.length===1?await this.renderFeaturesList():this._flowItems=["layer-list"],this.mapView&&(this.mapView.popupEnabled=!1,this._defaultCenter&&this._defaultLevel&&(await this.mapView.goTo({center:this._defaultCenter,zoom:this._defaultLevel}),this._defaultCenter=void 0,this._defaultLevel=void 0))}handleMapClick(){this._mapClickHandle&&this._mapClickHandle.remove(),this._mapClickHandle=E.on(()=>this.mapView,"click",e=>{this.mapView&&(this.mapView.popupEnabled=!1),this.onMapClick(e)})}async onMapClick(e){if(!(this._flowItems[this._flowItems.length-1]==="feature-create"||this._flowItems[this._flowItems.length-1]==="add-comment")&&this.mapView){let t=await this.mapView.hitTest(e),i=[],s=[],a=[],n=!1;t.results.length>0&&t.results.forEach(r=>{r.type==="graphic"&&i.push(r.graphic)}),i.length>0&&(await this._setReportingGraphics(i),s=this._getNonReportingLayerGraphics(i)),this._mapImageryLayersId.length>0&&(a=await this._getIdentifiedGraphics(e.mapPoint),n=a.length>0);let h=s.concat(a);if(h.length>0){this.mapView.popupEnabled=!0;let r={features:h,location:e.mapPoint,updateLocationEnabled:!n};await this.mapView.openPopup(r)}}}async _setReportingGraphics(e){let t=e.filter(i=>{if(i.layer?.type==="feature"){let s=i.layer;return this._validLayers.includes(s)}else return!1});this._selectedLayer&&this._selectedFeature.length>0&&this._selectedLayer.id===t[0]?.layer?.id&&t[0].attributes[this._selectedLayer.objectIdField]===this._selectedFeature[0].attributes[this._selectedLayer.objectIdField]||t.length>0&&(await this.setSelectedFeatures(t),this._flowItems.length&&this._flowItems.includes("feature-details")?(this._flowItems=[...this._flowItems.slice(0,this._flowItems.indexOf("feature-details")+1)],await this.highlightOnMap(e[0])):this._flowItems=[...this._flowItems,"feature-details"])}_getNonReportingLayerGraphics(e){return e.filter(t=>{if(t.layer?.type==="feature"){let i=t.layer;return!this._validLayers.includes(i)&&i?.popupEnabled&&i?.id}else return!1})}async _getIdentifiedGraphics(e){let t=new O({geometry:e,tolerance:3,mapExtent:this.mapView?.extent}),i,s=[];for(let n of this._mapImageryLayersId){let h=this.mapView&&await d(this.mapView,n);if(h?.url&&t)try{let r=await k?.identify(h.url,t);if(r?.results?.length){s=r.results,i=h;break}}catch(r){console.error(r)}}let a=[];return s.forEach(n=>{let h=n.layerId,r=i?.sublayers?.items.find(P=>P.id===h),w=r?.popupTemplate;r?.popupEnabled&&w&&(n.feature.popupTemplate=w,a.push(n.feature))}),a}_getCount(){let e=(this._selectedFeatureIndex+1).toString(),t=this._selectedFeature.length.toString();return this._translations.indexOfTotal.replace("{{index}}",e).replace("{{total}}",t)}_updateFloorDefinitionExpression(e){let t=`${e?.floorInfo?.floorField} = '${this.floorLevel}'`,i=e.definitionExpression;e.definitionExpression=i&&i?.indexOf(this._floorExpression)>-1?i.replace(this._floorExpression,t):t,this._floorExpression=t}_getFormElements(){let e=this._selectedLayer;if(e?.floorInfo?.floorField&&this.floorLevel&&e?.formTemplate){let t=this._formElements.find(i=>i.id===e.id);(this._formElements.length===0||!t)&&this._formElements.push({id:e.id,orgElements:e.formTemplate.elements,orgExpressionInfos:e.formTemplate.expressionInfos})}}reduceToConfiguredLayers(e,t){return Object.keys(e).reduce((i,s)=>{let a=this.reportingOptions?this._getLayersConfig(s)?.visible:e[s].supportsAdd;return!t.includes(s)&&a&&i.push(s),i},[])}refreshLists(){setTimeout(()=>{this._layerList.value&&this._flowItems[this._flowItems.length-1]==="layer-list"&&this._layerList.value.refresh(),this._featureList.value&&this._featureList.value.refresh()},50)}async _updateFeatures(){for(let e of this._editableLayerIds){let t=this.mapView&&await m(this.mapView,e);t&&(await this._showMyFeaturesOnly(t),t.layer?.floorInfo?.floorField&&this.floorLevel&&this._updateFloorDefinitionExpression(t.layer))}}async _showMyFeaturesOnly(e){let t=(this.mapView?.map).portalItem.portal?.credential?.userId;if(t&&e){let i=e.layer.editFieldsInfo?.creatorField.toLowerCase();e.filter=this.showMyReportsOnly&&i?new V({where:`${i} = '${t}'`}):null}}async getLayersToShowInList(){let e=this.mapView&&await C(this.mapView,!1),t=this.mapView&&await _(this.mapView),i=[];t?.forEach(s=>{s?.type==="feature"&&s?.editingEnabled&&s?.capabilities?.operations?.supportsAdd&&(e[s.id].supportsAdd=!0),s?.editingEnabled||i.push(s.id)}),this._editableLayerIds=this.reduceToConfiguredLayers(e,i),this._layerItemsHash=e}async renderFeaturesList(){this._flowItems=["feature-list"];let e={detail:this._editableLayerIds};await this.layerListLoaded(e),await this.setSelectedLayer(this._validLayers[0].id,this._validLayers[0]?.title||""),this.updateSortingOptions(),await this.handleSelectedLayersFilter(),this._urlParamsLoaded||(this._urlParamsLoaded=!0,await this.loadFeatureFromURLParams())}_updateShareURL(){let e=this._shareNode.value?.shareUrl;if(!e)return;let t=new URL(e);this._selectedLayerId?t.searchParams.set("layerid",this._selectedLayerId):t.searchParams.delete("layerid"),this._selectedFeature?.length?t.searchParams.set("oid",this._currentFeatureId):t.searchParams.delete("oid"),this._shareNode.value&&(this._shareNode.value.autoUpdateShareUrl=!1,this._shareNode.value.shareUrl=t.href)}async loadFeatureFromURLParams(){if(this.center&&this.level&&await this.mapView?.goTo({center:this.center.split(";").map(Number),zoom:parseInt(this.level,10)}),this.layerId&&this.objectId){let e=this.mapView&&await d(this.mapView,this.layerId);if(e){let t=this.mapView&&await v([Number(this.objectId)],e,[],!0,this.mapView.spatialReference);t?.length&&(await this.setSelectedFeatures(t),this._flowItems.length&&this._flowItems[this._flowItems.length-1]!=="feature-details"?this._flowItems=[...this._flowItems,"feature-details"]:this._flowItems=[...this._flowItems])}}}async handleSelectedLayersFilter(){if(this._selectedLayer){let e=this.layerExpressions?structuredClone(this.layerExpressions.filter(t=>t.id===this._selectedLayerId)):[];this._t9nLayerExpressions!=null&&this.handleLayerExpressionsT9n(e,this._t9nLayerExpressions),this._currentLayerExpressions=e,this._showFilterIcon=this._currentLayerExpressions?.length>0,this.setActiveDefinitionExpressions()}}async handlePrevLayersFilter(){if(this._prevSelectedLayerId){let e=this.mapView&&await d(this.mapView,this._prevSelectedLayerId);e&&this._initDefExpressions&&(e.definitionExpression=this._initDefExpressions[this._prevSelectedLayerId])}}async resetFilterList(){await this._filterList?.forceReset(),this._selectedLayer!==void 0&&this._initDefExpressions&&(this._selectedLayer.definitionExpression=this._initDefExpressions[this._selectedLayerId],this._filterActive=!1)}setActiveDefinitionExpressions(){if(this._selectedLayer===void 0)return;let e=[];if(this._currentLayerExpressions&&this._currentLayerExpressions?.length>0){let t=this._currentLayerExpressions[0];for(let i of t.expressions){let{active:s,definitionExpression:a}=i;s&&a&&e.push(`(${a})`)}this._filterActive=e.length>0,this.updateFilterLayerDefExpression(e,t.operator)}}updateFilterLayerDefExpression(e,t){let i=this._initDefExpressions&&this._initDefExpressions[this._selectedLayerId],s=e?.length>0&&i?`(${e.join(t)}) AND (${i})`:e.length>0?e.join(t):i;this._selectedLayer&&(this._selectedLayer.definitionExpression=s)}setInitExpressions(){if(this._initDefExpressions={},this.mapView==null)return;let e=this.mapView.map;e.allLayers.concat(e.allTables.toArray()).forEach(t=>{if(t.type==="map-image"&&t.popupEnabled&&!this._mapImageryLayersId.includes(t.id)){this._mapImageryLayersId.push(t.id);return}if(t.type!=="feature")return;let i=t;this._initDefExpressions&&(this._initDefExpressions[i.id]=i.definitionExpression||"")})}handleLayerExpressionsT9n(e,t){e?.forEach(i=>{let s=t?.find(a=>a.id===i.id);s!=null&&(i.title=s.title,i.expressions?.forEach(a=>{let n=s.expressions?.find(h=>h.id===a.id);n!=null&&(a.name=n.name)}))})}};I("crowdsource-reporter",g);return g},"core/reactiveUtils","layers/support/FeatureFilter","rest/identify","rest/support/IdentifyParameters",a,d)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import a from"./O24ZIQLV.js";import"./PZ4L77M5.js";import"./JE7L7M3J.js";import"./M5MQY5WC.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"./HW7HHHMK.js";import"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([{B:o}])=>{return o},a)
2
+ import a from"./5QSIKX2L.js";import"./PZ4L77M5.js";import"./JE7L7M3J.js";import"./DV233ITZ.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"./EIQZRLWQ.js";import"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([{B:o}])=>{return o},a)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import c from"./MPJ5N4H3.js";import"./MQF26HKA.js";import"./G4VIPBRX.js";import"./JE7L7M3J.js";import a from"./UUYUTETH.js";import{a as d}from"./M5MQY5WC.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 g}from"./HW7HHHMK.js";import{F as p,G as o,H as b,h as n,i as r}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([,{b:P,c:m}])=>{var c=[{descriptionPDF:{labelWidthDisplay:"2-5/8",labelHeightDisplay:"1",labelsPerPageDisplay:"30",averyPartNumber:"*60"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.1875,rightMargin:.1875,topMargin:.5,bottomMargin:.5},numLabelsAcross:3,numLabelsDown:10,labelWidth:2.625,labelHeight:1,horizGapIn:.125,vertGapIn:0,labelPadding:.1,fontSizePx:11,maxNumLabelLines:4}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"1",labelsPerPageDisplay:"20",averyPartNumber:"*61"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.15625,rightMargin:.15625,topMargin:.47637821,bottomMargin:.5},numLabelsAcross:2,numLabelsDown:10,labelWidth:4,labelHeight:1.0025,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:11,maxNumLabelLines:4}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"1-1/3",labelsPerPageDisplay:"14",averyPartNumber:"*62"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.15625,rightMargin:.15625,topMargin:.81889808,bottomMargin:.83464612},numLabelsAcross:2,numLabelsDown:7,labelWidth:4,labelHeight:1.3352,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:11,maxNumLabelLines:6}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"2",labelsPerPageDisplay:"10",averyPartNumber:"*63"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.15625,rightMargin:.15625,topMargin:.5,bottomMargin:.5},numLabelsAcross:2,numLabelsDown:5,labelWidth:4,labelHeight:2,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:12,maxNumLabelLines:10}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"3-1/3",labelsPerPageDisplay:"6",averyPartNumber:"*64"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.15625,rightMargin:.15625,topMargin:.4724412,bottomMargin:.50000027},numLabelsAcross:2,numLabelsDown:3,labelWidth:4,labelHeight:3.342,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:14,maxNumLabelLines:12}},{descriptionPDF:{labelWidthDisplay:"1-3/4",labelHeightDisplay:"1/2",labelsPerPageDisplay:"80",averyPartNumber:"*67"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.307086375,rightMargin:.307086375,topMargin:.4724412,bottomMargin:.49606326},numLabelsAcross:4,numLabelsDown:20,labelWidth:1.75,labelHeight:.50155,horizGapIn:.29527575,vertGapIn:0,labelPadding:.1,fontSizePx:8,maxNumLabelLines:3}},{descriptionPDF:{labelWidthDisplay:"1-3/4",labelHeightDisplay:"2/3",labelsPerPageDisplay:"60",averyPartNumber:"*95"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.28936983,rightMargin:.28936983,topMargin:.53937037,bottomMargin:.5511814},numLabelsAcross:4,numLabelsDown:15,labelWidth:1.75,labelHeight:.6605,horizGapIn:.30708678,vertGapIn:0,labelPadding:.1,fontSizePx:8,maxNumLabelLines:4}}],u=Object.freeze(Object.defineProperty({__proto__:null,default:c},Symbol.toStringTag,{value:"Module"})),y=n`:host{display:block}`,s=class extends b{constructor(){super(...arguments),this.disabled=!1,this._translations=d({name:"pdf-download",blocking:!0}),this._labelInfoElement=p()}static{this.properties={defaultNumLabelsPerPage:9,disabled:5,_translations:16}}static{this.styles=y}async downloadCSV(a,e,l,t=!0){return P(a,e,!0,l,t)}async downloadPDF(a,e,l=!1,t="",i=""){let h=this._labelInfoElement.value?this._labelInfoElement.value.selectedOption?.value:"";return m(a,e,h,l,t,i)}render(){return r`<calcite-select .disabled=${this.disabled} label ${o(this._labelInfoElement)}>${this._renderOptions()}</calcite-select>`}_getLabelSizeText(a){let e=a.descriptionPDF.labelsPerPageDisplay,l=a.descriptionPDF.labelWidthDisplay+" x "+a.descriptionPDF.labelHeightDisplay;return this._translations.pdfLabel?this._translations.pdfLabel.replace("{{n}}",e).replace("{{labelSize}}",l):""}_renderOptions(){let a=u;return(a.default||a).sort((e,l)=>{let t=Number.parseInt(e.descriptionPDF.labelsPerPageDisplay,10),i=Number.parseInt(l.descriptionPDF.labelsPerPageDisplay,10);return t<i?-1:t>i?1:0}).map((e,l)=>{let t=!1;return(this.defaultNumLabelsPerPage?Number.parseInt(e.descriptionPDF.labelsPerPageDisplay,10)===this.defaultNumLabelsPerPage:l===0)&&(t=!0),r`<calcite-option .selected=${t} .value=${e}>${this._getLabelSizeText(e)}</calcite-option>`})}};g("pdf-download",s);return s},a,c)
2
+ import c from"./RYRVUHB7.js";import"./MQF26HKA.js";import"./G4VIPBRX.js";import"./JE7L7M3J.js";import a from"./UUYUTETH.js";import{a as d}from"./DV233ITZ.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 g}from"./EIQZRLWQ.js";import{F as p,G as o,H as b,h as n,i as r}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([,{b:P,c:m}])=>{var c=[{descriptionPDF:{labelWidthDisplay:"2-5/8",labelHeightDisplay:"1",labelsPerPageDisplay:"30",averyPartNumber:"*60"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.1875,rightMargin:.1875,topMargin:.5,bottomMargin:.5},numLabelsAcross:3,numLabelsDown:10,labelWidth:2.625,labelHeight:1,horizGapIn:.125,vertGapIn:0,labelPadding:.1,fontSizePx:11,maxNumLabelLines:4}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"1",labelsPerPageDisplay:"20",averyPartNumber:"*61"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.15625,rightMargin:.15625,topMargin:.47637821,bottomMargin:.5},numLabelsAcross:2,numLabelsDown:10,labelWidth:4,labelHeight:1.0025,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:11,maxNumLabelLines:4}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"1-1/3",labelsPerPageDisplay:"14",averyPartNumber:"*62"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.15625,rightMargin:.15625,topMargin:.81889808,bottomMargin:.83464612},numLabelsAcross:2,numLabelsDown:7,labelWidth:4,labelHeight:1.3352,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:11,maxNumLabelLines:6}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"2",labelsPerPageDisplay:"10",averyPartNumber:"*63"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.15625,rightMargin:.15625,topMargin:.5,bottomMargin:.5},numLabelsAcross:2,numLabelsDown:5,labelWidth:4,labelHeight:2,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:12,maxNumLabelLines:10}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"3-1/3",labelsPerPageDisplay:"6",averyPartNumber:"*64"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.15625,rightMargin:.15625,topMargin:.4724412,bottomMargin:.50000027},numLabelsAcross:2,numLabelsDown:3,labelWidth:4,labelHeight:3.342,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:14,maxNumLabelLines:12}},{descriptionPDF:{labelWidthDisplay:"1-3/4",labelHeightDisplay:"1/2",labelsPerPageDisplay:"80",averyPartNumber:"*67"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.307086375,rightMargin:.307086375,topMargin:.4724412,bottomMargin:.49606326},numLabelsAcross:4,numLabelsDown:20,labelWidth:1.75,labelHeight:.50155,horizGapIn:.29527575,vertGapIn:0,labelPadding:.1,fontSizePx:8,maxNumLabelLines:3}},{descriptionPDF:{labelWidthDisplay:"1-3/4",labelHeightDisplay:"2/3",labelsPerPageDisplay:"60",averyPartNumber:"*95"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.28936983,rightMargin:.28936983,topMargin:.53937037,bottomMargin:.5511814},numLabelsAcross:4,numLabelsDown:15,labelWidth:1.75,labelHeight:.6605,horizGapIn:.30708678,vertGapIn:0,labelPadding:.1,fontSizePx:8,maxNumLabelLines:4}}],u=Object.freeze(Object.defineProperty({__proto__:null,default:c},Symbol.toStringTag,{value:"Module"})),y=n`:host{display:block}`,s=class extends b{constructor(){super(...arguments),this.disabled=!1,this._translations=d({name:"pdf-download",blocking:!0}),this._labelInfoElement=p()}static{this.properties={defaultNumLabelsPerPage:9,disabled:5,_translations:16}}static{this.styles=y}async downloadCSV(a,e,l,t=!0){return P(a,e,!0,l,t)}async downloadPDF(a,e,l=!1,t="",i=""){let h=this._labelInfoElement.value?this._labelInfoElement.value.selectedOption?.value:"";return m(a,e,h,l,t,i)}render(){return r`<calcite-select .disabled=${this.disabled} label ${o(this._labelInfoElement)}>${this._renderOptions()}</calcite-select>`}_getLabelSizeText(a){let e=a.descriptionPDF.labelsPerPageDisplay,l=a.descriptionPDF.labelWidthDisplay+" x "+a.descriptionPDF.labelHeightDisplay;return this._translations.pdfLabel?this._translations.pdfLabel.replace("{{n}}",e).replace("{{labelSize}}",l):""}_renderOptions(){let a=u;return(a.default||a).sort((e,l)=>{let t=Number.parseInt(e.descriptionPDF.labelsPerPageDisplay,10),i=Number.parseInt(l.descriptionPDF.labelsPerPageDisplay,10);return t<i?-1:t>i?1:0}).map((e,l)=>{let t=!1;return(this.defaultNumLabelsPerPage?Number.parseInt(e.descriptionPDF.labelsPerPageDisplay,10)===this.defaultNumLabelsPerPage:l===0)&&(t=!0),r`<calcite-option .selected=${t} .value=${e}>${this._getLabelSizeText(e)}</calcite-option>`})}};g("pdf-download",s);return s},a,c)