@arcgis/portal-components 5.2.0-next.89 → 5.2.0-next.90

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 (76) hide show
  1. package/dist/cdn/2T33E2DS.js +2 -0
  2. package/dist/cdn/{O2WST7EA.js → 2VGYRITT.js} +1 -1
  3. package/dist/cdn/3HAZNYCD.js +2 -0
  4. package/dist/cdn/{RJPGQVI2.js → 42FCLPNH.js} +1 -1
  5. package/dist/cdn/{5HEZSRAM.js → 433M2GP4.js} +1 -1
  6. package/dist/cdn/{DC37QXXI.js → 4XSXCKIG.js} +1 -1
  7. package/dist/cdn/{MK3S5P4U.js → 546M6SVH.js} +1 -1
  8. package/dist/cdn/{S47JWYSF.js → 5IXABPXR.js} +1 -1
  9. package/dist/cdn/{PMQCCLS5.js → 5YCQRL4K.js} +1 -1
  10. package/dist/cdn/{GAZBGDIO.js → 6XLTWENT.js} +1 -1
  11. package/dist/cdn/{APIPQGZL.js → 7FVPT4SA.js} +1 -1
  12. package/dist/cdn/{P7YQCAM2.js → 7HHPKD5C.js} +1 -1
  13. package/dist/cdn/{BSUUZZ2V.js → 7TXGDAEX.js} +1 -1
  14. package/dist/cdn/{5A54YFFZ.js → 7XD6KSXV.js} +1 -1
  15. package/dist/cdn/{BXCQOWAD.js → BTSXQQKZ.js} +2 -2
  16. package/dist/cdn/{P2PZMKRD.js → CBXQFKN5.js} +1 -1
  17. package/dist/cdn/{77U3PPBC.js → CNDTRZJT.js} +1 -1
  18. package/dist/cdn/{4GRTJ7XT.js → CYGZYLOQ.js} +1 -1
  19. package/dist/cdn/{4UANPBCB.js → E7MAKHJ5.js} +1 -1
  20. package/dist/cdn/{ZD6WCKLD.js → EUWBMLIT.js} +1 -1
  21. package/dist/cdn/{X6XTK2TE.js → EZNTXOKK.js} +1 -1
  22. package/dist/cdn/{FUZGJQMO.js → FDZ3XHNB.js} +1 -1
  23. package/dist/cdn/G2G3GSS7.js +2 -0
  24. package/dist/cdn/{KL4DIIKW.js → GJ7GKO7I.js} +1 -1
  25. package/dist/cdn/{5RYUVYNA.js → GRZLC33Y.js} +1 -1
  26. package/dist/cdn/{OSA2BEVZ.js → H76EB2WF.js} +1 -1
  27. package/dist/cdn/HNWQS7DU.js +2 -0
  28. package/dist/cdn/{BTLJZVSE.js → I2KQQXOO.js} +1 -1
  29. package/dist/cdn/IJUSJCYL.js +2 -0
  30. package/dist/cdn/{GP3HHUGX.js → JMPVXCF5.js} +1 -1
  31. package/dist/cdn/{6WGPYUA4.js → K6A3QM3A.js} +1 -1
  32. package/dist/cdn/{H4SORY4B.js → KIKZIZGV.js} +1 -1
  33. package/dist/cdn/{DPDTU2XT.js → LTHZ2TRG.js} +1 -1
  34. package/dist/cdn/{5CB5N3QF.js → MRHDSM6U.js} +1 -1
  35. package/dist/cdn/NVGQFC2K.js +2 -0
  36. package/dist/cdn/O3JIWIMI.js +2 -0
  37. package/dist/cdn/{EZYI6JU7.js → O6ZQ4BRU.js} +1 -1
  38. package/dist/cdn/{RHABZWTF.js → O7KHFGHS.js} +1 -1
  39. package/dist/cdn/{X5B4PAML.js → OJCKEXGE.js} +1 -1
  40. package/dist/cdn/{2TQ4B2LU.js → P4ELMYQQ.js} +1 -1
  41. package/dist/cdn/{GY2BYUKF.js → PF3TB3QZ.js} +1 -1
  42. package/dist/cdn/{YDYJ5MIY.js → PJLV3EQS.js} +1 -1
  43. package/dist/cdn/{TZ4TGONL.js → Q54ZD7WJ.js} +1 -1
  44. package/dist/cdn/{O3RR6UMN.js → QLHCXOVQ.js} +1 -1
  45. package/dist/cdn/{OFAEJ3GS.js → QMA3U3H3.js} +1 -1
  46. package/dist/cdn/{5EMPEJ65.js → QTFWIDAL.js} +1 -1
  47. package/dist/cdn/{XRPX4IA3.js → RBQG66FL.js} +1 -1
  48. package/dist/cdn/RDAUPHB6.js +2 -0
  49. package/dist/cdn/RVWAHK4A.js +2 -0
  50. package/dist/cdn/{44ORWHRO.js → SFD33DHG.js} +1 -1
  51. package/dist/cdn/{SYDYG3CL.js → STLVXLPU.js} +1 -1
  52. package/dist/cdn/{VBJRF4J7.js → TB4YQUMO.js} +1 -1
  53. package/dist/cdn/{UEL7BVMB.js → W7O7ZYZ4.js} +1 -1
  54. package/dist/cdn/{Y36YTONO.js → WNYL4EZA.js} +1 -1
  55. package/dist/cdn/{T4DHIZOR.js → WYLEYSM3.js} +1 -1
  56. package/dist/cdn/{QTKBB22S.js → XAPOJUIC.js} +1 -1
  57. package/dist/cdn/{F76RXJ66.js → YMLZCVEI.js} +1 -1
  58. package/dist/cdn/{H5X6CZD4.js → YS2SZ3DL.js} +1 -1
  59. package/dist/cdn/{C747DAF4.js → YUVVUBJB.js} +1 -1
  60. package/dist/cdn/{7FISFQAB.js → ZDU24JOQ.js} +1 -1
  61. package/dist/cdn/{WNZF3XVD.js → ZGNXS6U5.js} +1 -1
  62. package/dist/cdn/{F3M3R7X2.js → ZTGGJIVB.js} +1 -1
  63. package/dist/cdn/index.js +1 -1
  64. package/dist/docs/api.json +1 -1
  65. package/dist/docs/docs.json +1 -1
  66. package/dist/docs/web-types.json +1 -1
  67. package/package.json +5 -5
  68. package/dist/cdn/EHJZA2TD.js +0 -2
  69. package/dist/cdn/F3LFFR3K.js +0 -2
  70. package/dist/cdn/FQTFZLHT.js +0 -2
  71. package/dist/cdn/FWJOBVEA.js +0 -2
  72. package/dist/cdn/K3HEPB7Q.js +0 -2
  73. package/dist/cdn/LDYOCDG6.js +0 -2
  74. package/dist/cdn/OTP4IA4V.js +0 -2
  75. package/dist/cdn/Y72RYETN.js +0 -2
  76. package/dist/cdn/YBWCEZJP.js +0 -2
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import c from"./V6VNED6L.js";import{a as m,b as f}from"./6TO2BYXU.js";import{a as C}from"./6KVA4AKM.js";import{a as D}from"./CFBSBZSS.js";import{a as h,b as d,c as b,d as M,e as $,f as x,g as L,h as W,i as B}from"./ILDTKRON.js";import a from"./TGTT2CVD.js";import{a as R}from"./O3RR6UMN.js";import{M as v,N as w,P as S,S as A,h as T,j as u}from"./BXCQOWAD.js";export default $arcgis.t(([{substitute:k},{d:I},_])=>{var G=T`.badge{--calcite-color-foreground-2: var(--arcgis-item-badge-info-background, #dfeffa);--calcite-color-text-1: var(--arcgis-item-badge-info-foreground, #00619b);--arcgis-item-badge-color: var(--arcgis-item-badge-info-foreground, #00619b);--calcite-chip-background-color: var(--arcgis-item-badge-info-background, #dfeffa);border:0}.badge--colored{--calcite-chip-icon-color: var(--calcite-color-brand)}.authoritative{--calcite-color-foreground-2: var(--arcgis-item-badge-success-background, #e4f0e4);--calcite-color-text-1: var(--arcgis-item-badge-success-foreground, #1a6324);--arcgis-item-badge-color: var(--arcgis-item-badge-success-foreground, #1a6324);--calcite-chip-background-color: var(--arcgis-item-badge-success-background, #e4f0e4)}.deprecated{--calcite-color-foreground-2: var(--arcgis-item-badge-danger-background, #fadfdc);--calcite-color-text-1: var(--arcgis-item-badge-danger-foreground, #a82b1e);--arcgis-item-badge-color: var(--arcgis-item-badge-danger-foreground, #a82b1e);--calcite-chip-background-color: var(--arcgis-item-badge-danger-background, #fadfdc)}.beta{border:0}.narrow{box-sizing:border-box;width:2rem;--calcite-chip-spacing-unit-l: 0}.narrow--s{width:1.5rem}.narrow--l{width:2.75rem}.tooltip-title{font-size:var(--calcite-font-size--1);color:var(--calcite-color-text-1);margin:0 0 .25rem;padding:0}.tooltip-text{font-size:var(--calcite-font-size--2);color:var(--calcite-color-text-1);margin:0;padding:0}:host-context(.calcite-mode-dark) .badge{--calcite-color-foreground-2: var(--arcgis-item-badge-info-background, #214155);--calcite-color-text-1: var(--arcgis-item-badge-info-foreground, #9fd4f3);--arcgis-item-badge-color: var(--arcgis-item-badge-info-foreground, #9fd4f3);--calcite-chip-background-color: var(--arcgis-item-badge-info-background, #214155)}:host-context(.calcite-mode-dark) .authoritative{--calcite-color-foreground-2: var(--arcgis-item-badge-success-background, #2b472a);--calcite-color-text-1: var(--arcgis-item-badge-success-foreground, #a2e4ab);--arcgis-item-badge-color: var(--arcgis-item-badge-success-foreground, #a2e4ab);--calcite-chip-background-color: var(--arcgis-item-badge-success-background, #2b472a)}:host-context(.calcite-mode-dark) .deprecated{--calcite-color-foreground-2: var(--arcgis-item-badge-danger-background, #5e241e);--calcite-color-text-1: var(--arcgis-item-badge-danger-foreground, #ffaaa1);--arcgis-item-badge-color: var(--arcgis-item-badge-danger-foreground, #ffaaa1);--calcite-chip-background-color: var(--arcgis-item-badge-danger-background, #5e241e)}`,z=["Operations Dashboard Add In","Operations Dashboard Extension","Operation View","CityEngine Web Scene","Big Data File Share","Globe Document","Map Document","Published Map","Scene Document","Map Template","Mobile Basemap Package","Desktop Add In"],U=["Cascade","MapTour","MapJournal","MapSeries","Shortlist","StoryMapCrowdsource","StorytellingSwipe"],J={"Geoprocessing Package":".gpk",Layer:".lyr","Layer Package":".lpk","Map Package":".mpk","Scene Package":".spk"},O="",j="template_name";function F(e){let t=decodeURIComponent(e.url||h(e).url||"");return U.find(i=>t.includes(`/apps/${i}/index.html`))}function V(e){return $(e)}function N(e){return x(e)}function Q(e){return L(e)}function K(e){return e.type==="Web Mapping Application"&&d(e).includes("Web AppBuilder")}function P(e,t){return(t?.isPortal??!1)&&d(e).includes("AppBuilder Extension")}function g(e,t){return e.typeKeywords?.some(i=>t.includes(i))}function E(e,t){let i=["HTML3D/HTML","App Builder","Widget"],a=["HTML3D/HTML","Web AppBuilder","Widget"],r=e.type==="Web Mapping Application",n=r&&g(e,["Web AppBuilder"]),l=r&&g(e,["WABTemplate"]),c=e.type==="AppBuilder Widget Package"&&g(e,i),o=e.type==="Web AppBuilder Widget"&&g(e,a),s=!!e?.owner?.startsWith("esri_")&&r&&g(e,["Web AppBuilder for ArcGIS"]);return n||l||c||o||P(e,t)||s}function X(e,t){return t?.isPortal&&["Insights Workbook","Insights Page","Insights Model","Insights Theme","Insights Workbook Package","Kernel Gateway Connection","Insights Script","Insights Data Engineering Workbook","Insights Data Engineering Model","Relational Database Connection"].includes(e.type||"")}var Y=(e,t)=>(t?.isPortal??!1)&&(K(e)||P(e,t)||m(e)||X(e,t));function Z(e,t,i){return e.type===t&&(h(e).name?.endsWith(i)??!1)}function ee(e){return Object.entries(J).some(([t,i])=>Z(e,t,i))}function te(e,t){return z.includes(e.type)||ee(e)||f(e)||V(e)||m(e)||Y(e,t)}function ie(e){return(e.owner||"").toLowerCase().includes("esri")&&d(e).includes("Requires Credits")}function ae(e){return(e.owner||"").toLowerCase().includes("esri")&&d(e).includes("Requires Subscription")}function re(e){return b(e)==="org_authoritative"}function q(e){return b(e)==="public_authoritative"}function oe(e,t){return t==="Registered API Key Credentials (Standard)"||t==="Registered OAuth 2.0 Credentials (Standard)"?O:e[t].title||O}function we(e,t,i){let a=[],r=d(e),n=h(e),l=M(e);if((re(e)||q(e))&&a.push("Authoritative"),b(e)==="deprecated"&&a.push("Deprecated"),E(e,t)&&a.push("DeprecatedItemType"),W(e)&&a.push("Beta"),e.type==="Solution"&&r.includes("ArcGIS Solution")&&a.push("Solution"),r.includes("Public Data Collection")&&i&&a.push("Public Data Collection"),te(e,t)&&a.push("Retired"),l.includes("livingatlas")&&a.push("Living Atlas"),l.includes("opendata")&&a.push("Open Data"),ie(e)&&a.push("Premium"),ae(e)&&a.push("Subscriber"),n.origin&&a.push("Collaboration"),e.owner!=="esri_apps"&&n.listed&&!t?.isPortal&&a.push("Marketplace"),r.includes("Registered App")){let c=t?.isPortal??!1;if(e.type!=="API Key"&&(!c||e.owner!=="esri_apps")){let o=r.includes("APIToken"),s=r.includes("Personal API Token")&&!c;o?a.push(s?"Registered API Key Credentials (Personal)":"Registered API Key Credentials (Standard)"):a.push(s?"Registered OAuth 2.0 Credentials (Personal)":"Registered OAuth 2.0 Credentials (Standard)")}}return r.includes("hasReplacementItem")&&a.push("Has Replacement"),a}function se({badgeType:e,i18n:t,portal:i}){let a=i?.isPortal??!1;if(e==="Registered API Key Credentials (Standard)"){let r=t[e].title;return a?r.enterprise:r.online}if(e==="Registered OAuth 2.0 Credentials (Standard)"){let r=t[e].title;return a?r.enterprise:r.online}return oe(t,e)}function ne(e){let t={MapSeries:"Series",MapJournal:"Journal",SwipeSpyglass:"Swipe & Spyglass",Shortlist:"Shortlist",Cascade:"Cascade",MapTour:"Tour",StoryMapCrowdsource:"Crowdsource",StorytellingSwipe:"Swipe & Spyglass"},i=d(e).find(r=>r in t);if(i)return t[i];let a=F(e);return a&&t[a]||!1}async function le({badgeType:e,i18n:t,item:i,locale:a,portal:r,user:n,useProduction:l}){let c=!n||C(n);switch(e){case"Authoritative":{if(q(i)){let o=await _(i,a,r,l),s=t.Authoritative.tooltip,p=r?.isPortal&&!l?r?.name:o?.name||r?.name||i.owner;return k(s.public,{name:p||""})}return t.Authoritative.tooltip.org}case"Deprecated":{let o=i.owner||"",s=await I(o,r,l),p=D(s,a);return k(t.Deprecated.tooltip,{owner:p})}case"DeprecatedItemType":{let o=t.DeprecatedItemType.tooltip;return E(i,r)?o.webAppBuilder:o.general}case"Retired":{let o=t.Retired.tooltip;if(f(i)){let s=ne(i);if(s){let p={[j]:s};return k(o.classicStoryMap,p)}return o.classicStoryMapGeneric}return Q(i)?o.cityEngine:K(i)||P(i,r)?o.webAppBuilder:m(i)?o.app:N(i)?o.bdfs:o.general}case"Subscriber":{let o=t.Subscriber.tooltip;return c?o.public:o.org}case"Premium":{let o=t.Premium.tooltip;return c?o.public:o.org}case"Registered":{let o=t.Registered.tooltip;return r?.isPortal?o.enterprise:o.online}case"Personal credential":return t["Personal credential"].tooltip;case"Has Replacement":{let o=t["Has Replacement"];return r.isPortal?(globalThis.location?.href||"").includes("item.html")?o.itemPageTooltip:o.tooltip:o.itemPageTooltip}default:return t[e].tooltip}}function ce({badgeType:e,i18n:t,item:i,portal:a}){if(e!=="Has Replacement"||a.isPortal)return null;let r=B(i);return r?{title:t["Has Replacement"].link,href:de({portal:a,itemId:r})}:null}function de({itemId:e,portal:t}){return t?.restUrl?`${t.restUrl.replace("sharing/rest","home")}/item.html?id=${e}`:""}function H(){return{loading:!1,title:"",tooltip:"",tooltipLink:null}}var y=class extends v{constructor(){super(...arguments),this._messages=R({name:"portal-item-badges",blocking:!0}),this.tooltipRequestId=0,this.tooltipId=`portal-item-badge-${Math.random().toString(36).slice(2,10)}`,this.details=H(),this.width="full",this.scale="m",this.showTooltip=!1}static{this.properties={details:16,item:0,portal:0,user:0,badgeType:1,width:1,appearance:1,scale:1,showTooltip:5,useProduction:5}}static{this.styles=G}willUpdate(t){(t.has("badgeType")||t.has("item")||t.has("portal")||t.has("user")||t.has("showTooltip")||t.has("useProduction"))&&this.loadDetails()}loadDetails(){if(!this.badgeType||!this.portal){this.details=H();return}let t=se({badgeType:this.badgeType,i18n:this._messages,portal:this.portal}),i=this.item&&this.portal?ce({badgeType:this.badgeType,i18n:this._messages,item:this.item,portal:this.portal}):null;if(!this.showTooltip||!this.item){this.details={loading:!1,title:t,tooltip:"",tooltipLink:i};return}let a=++this.tooltipRequestId;this.details={loading:!0,title:t,tooltip:"",tooltipLink:i},le({badgeType:this.badgeType,i18n:this._messages,item:this.item,locale:this._messages._lang||"en",portal:this.portal,user:this.user,useProduction:this.useProduction}).then(r=>{a===this.tooltipRequestId&&(this.details={loading:!1,title:t,tooltip:r,tooltipLink:i})}).catch(()=>{a===this.tooltipRequestId&&(this.details={loading:!1,title:t,tooltip:"",tooltipLink:i})})}render(){if(!this.badgeType)return null;let t=pe[this.badgeType],i=this.width==="narrow",a=this.showTooltip&&(this.details.loading||!!this.details.tooltip||!!this.details.tooltipLink),r={badge:this.badgeType!=="Beta","badge--colored":this.badgeType==="Living Atlas"||this.badgeType==="Open Data"||this.badgeType==="Solution",beta:this.badgeType==="Beta",authoritative:this.badgeType==="Authoritative",deprecated:this.badgeType==="Deprecated"||this.badgeType==="DeprecatedItemType",narrow:i,[`narrow--${this.scale}`]:i};return u`<calcite-chip id=${this.tooltipId??S} class=${w(r)} .value=${this.badgeType} .tabIndex=${this.showTooltip?0:-1} .scale=${this.scale} .appearance=${this.appearance} .label=${this.details.title} .icon=${t}>${i?null:this.details.title}</calcite-chip>${a?u`<calcite-tooltip .referenceElement=${this.tooltipId} close-on-click placement=bottom-start overlay-positioning=fixed offset-distance=6 offset-skidding=0>${i?u`<h3 class="tooltip-title">${this.details.title}</h3>`:null}<p class="tooltip-text"><calcite-loader .hidden=${!this.details.loading} .label=${this._messages.loading} inline scale=s></calcite-loader>${this.details.loading?this._messages.loading:this.details.tooltip}</p>${this.details.tooltipLink?u`<calcite-link @click=${n=>n.stopPropagation()} icon-end=launch .href=${this.details.tooltipLink.href} target=_blank>${this.details.tooltipLink.title}</calcite-link>`:null}</calcite-tooltip>`:null}`}},pe={Authoritative:"check-circle",Beta:"beaker",Collaboration:"collaboration-distributed",Deprecated:"circle-disallowed",DeprecatedItemType:"exclamation-mark-triangle","Has Replacement":"arrow-right-left","Living Atlas":"arcgis-living-atlas",Marketplace:"marketplace","Open Data":"open-data","Personal credential":"user-key",Premium:"shield-coin","Public Data Collection":"pencil",Registered:"key","Registered API Key Credentials (Personal)":"key","Registered API Key Credentials (Standard)":"key","Registered Application":"app-gear","Registered OAuth 2.0 Credentials (Personal)":"app-gear","Registered OAuth 2.0 Credentials (Standard)":"app-gear",Retired:"exclamation-mark-triangle",Solution:"arcgis-solutions",Subscriber:"security"};A("arcgis-portal-item-badge",y);return{a:we,b:y}},"intl",a,c)
2
+ import c from"./V6VNED6L.js";import{a as m,b as f}from"./6TO2BYXU.js";import{a as C}from"./6KVA4AKM.js";import{a as D}from"./CFBSBZSS.js";import{a as h,b as d,c as b,d as M,e as $,f as x,g as L,h as W,i as B}from"./ILDTKRON.js";import a from"./TGTT2CVD.js";import{a as R}from"./QLHCXOVQ.js";import{M as v,N as w,P as S,S as A,h as T,j as u}from"./BTSXQQKZ.js";export default $arcgis.t(([{substitute:k},{d:I},_])=>{var G=T`.badge{--calcite-color-foreground-2: var(--arcgis-item-badge-info-background, #dfeffa);--calcite-color-text-1: var(--arcgis-item-badge-info-foreground, #00619b);--arcgis-item-badge-color: var(--arcgis-item-badge-info-foreground, #00619b);--calcite-chip-background-color: var(--arcgis-item-badge-info-background, #dfeffa);border:0}.badge--colored{--calcite-chip-icon-color: var(--calcite-color-brand)}.authoritative{--calcite-color-foreground-2: var(--arcgis-item-badge-success-background, #e4f0e4);--calcite-color-text-1: var(--arcgis-item-badge-success-foreground, #1a6324);--arcgis-item-badge-color: var(--arcgis-item-badge-success-foreground, #1a6324);--calcite-chip-background-color: var(--arcgis-item-badge-success-background, #e4f0e4)}.deprecated{--calcite-color-foreground-2: var(--arcgis-item-badge-danger-background, #fadfdc);--calcite-color-text-1: var(--arcgis-item-badge-danger-foreground, #a82b1e);--arcgis-item-badge-color: var(--arcgis-item-badge-danger-foreground, #a82b1e);--calcite-chip-background-color: var(--arcgis-item-badge-danger-background, #fadfdc)}.beta{border:0}.narrow{box-sizing:border-box;width:2rem;--calcite-chip-spacing-unit-l: 0}.narrow--s{width:1.5rem}.narrow--l{width:2.75rem}.tooltip-title{font-size:var(--calcite-font-size--1);color:var(--calcite-color-text-1);margin:0 0 .25rem;padding:0}.tooltip-text{font-size:var(--calcite-font-size--2);color:var(--calcite-color-text-1);margin:0;padding:0}:host-context(.calcite-mode-dark) .badge{--calcite-color-foreground-2: var(--arcgis-item-badge-info-background, #214155);--calcite-color-text-1: var(--arcgis-item-badge-info-foreground, #9fd4f3);--arcgis-item-badge-color: var(--arcgis-item-badge-info-foreground, #9fd4f3);--calcite-chip-background-color: var(--arcgis-item-badge-info-background, #214155)}:host-context(.calcite-mode-dark) .authoritative{--calcite-color-foreground-2: var(--arcgis-item-badge-success-background, #2b472a);--calcite-color-text-1: var(--arcgis-item-badge-success-foreground, #a2e4ab);--arcgis-item-badge-color: var(--arcgis-item-badge-success-foreground, #a2e4ab);--calcite-chip-background-color: var(--arcgis-item-badge-success-background, #2b472a)}:host-context(.calcite-mode-dark) .deprecated{--calcite-color-foreground-2: var(--arcgis-item-badge-danger-background, #5e241e);--calcite-color-text-1: var(--arcgis-item-badge-danger-foreground, #ffaaa1);--arcgis-item-badge-color: var(--arcgis-item-badge-danger-foreground, #ffaaa1);--calcite-chip-background-color: var(--arcgis-item-badge-danger-background, #5e241e)}`,z=["Operations Dashboard Add In","Operations Dashboard Extension","Operation View","CityEngine Web Scene","Big Data File Share","Globe Document","Map Document","Published Map","Scene Document","Map Template","Mobile Basemap Package","Desktop Add In"],U=["Cascade","MapTour","MapJournal","MapSeries","Shortlist","StoryMapCrowdsource","StorytellingSwipe"],J={"Geoprocessing Package":".gpk",Layer:".lyr","Layer Package":".lpk","Map Package":".mpk","Scene Package":".spk"},O="",j="template_name";function F(e){let t=decodeURIComponent(e.url||h(e).url||"");return U.find(i=>t.includes(`/apps/${i}/index.html`))}function V(e){return $(e)}function N(e){return x(e)}function Q(e){return L(e)}function K(e){return e.type==="Web Mapping Application"&&d(e).includes("Web AppBuilder")}function P(e,t){return(t?.isPortal??!1)&&d(e).includes("AppBuilder Extension")}function g(e,t){return e.typeKeywords?.some(i=>t.includes(i))}function E(e,t){let i=["HTML3D/HTML","App Builder","Widget"],a=["HTML3D/HTML","Web AppBuilder","Widget"],r=e.type==="Web Mapping Application",n=r&&g(e,["Web AppBuilder"]),l=r&&g(e,["WABTemplate"]),c=e.type==="AppBuilder Widget Package"&&g(e,i),o=e.type==="Web AppBuilder Widget"&&g(e,a),s=!!e?.owner?.startsWith("esri_")&&r&&g(e,["Web AppBuilder for ArcGIS"]);return n||l||c||o||P(e,t)||s}function X(e,t){return t?.isPortal&&["Insights Workbook","Insights Page","Insights Model","Insights Theme","Insights Workbook Package","Kernel Gateway Connection","Insights Script","Insights Data Engineering Workbook","Insights Data Engineering Model","Relational Database Connection"].includes(e.type||"")}var Y=(e,t)=>(t?.isPortal??!1)&&(K(e)||P(e,t)||m(e)||X(e,t));function Z(e,t,i){return e.type===t&&(h(e).name?.endsWith(i)??!1)}function ee(e){return Object.entries(J).some(([t,i])=>Z(e,t,i))}function te(e,t){return z.includes(e.type)||ee(e)||f(e)||V(e)||m(e)||Y(e,t)}function ie(e){return(e.owner||"").toLowerCase().includes("esri")&&d(e).includes("Requires Credits")}function ae(e){return(e.owner||"").toLowerCase().includes("esri")&&d(e).includes("Requires Subscription")}function re(e){return b(e)==="org_authoritative"}function q(e){return b(e)==="public_authoritative"}function oe(e,t){return t==="Registered API Key Credentials (Standard)"||t==="Registered OAuth 2.0 Credentials (Standard)"?O:e[t].title||O}function we(e,t,i){let a=[],r=d(e),n=h(e),l=M(e);if((re(e)||q(e))&&a.push("Authoritative"),b(e)==="deprecated"&&a.push("Deprecated"),E(e,t)&&a.push("DeprecatedItemType"),W(e)&&a.push("Beta"),e.type==="Solution"&&r.includes("ArcGIS Solution")&&a.push("Solution"),r.includes("Public Data Collection")&&i&&a.push("Public Data Collection"),te(e,t)&&a.push("Retired"),l.includes("livingatlas")&&a.push("Living Atlas"),l.includes("opendata")&&a.push("Open Data"),ie(e)&&a.push("Premium"),ae(e)&&a.push("Subscriber"),n.origin&&a.push("Collaboration"),e.owner!=="esri_apps"&&n.listed&&!t?.isPortal&&a.push("Marketplace"),r.includes("Registered App")){let c=t?.isPortal??!1;if(e.type!=="API Key"&&(!c||e.owner!=="esri_apps")){let o=r.includes("APIToken"),s=r.includes("Personal API Token")&&!c;o?a.push(s?"Registered API Key Credentials (Personal)":"Registered API Key Credentials (Standard)"):a.push(s?"Registered OAuth 2.0 Credentials (Personal)":"Registered OAuth 2.0 Credentials (Standard)")}}return r.includes("hasReplacementItem")&&a.push("Has Replacement"),a}function se({badgeType:e,i18n:t,portal:i}){let a=i?.isPortal??!1;if(e==="Registered API Key Credentials (Standard)"){let r=t[e].title;return a?r.enterprise:r.online}if(e==="Registered OAuth 2.0 Credentials (Standard)"){let r=t[e].title;return a?r.enterprise:r.online}return oe(t,e)}function ne(e){let t={MapSeries:"Series",MapJournal:"Journal",SwipeSpyglass:"Swipe & Spyglass",Shortlist:"Shortlist",Cascade:"Cascade",MapTour:"Tour",StoryMapCrowdsource:"Crowdsource",StorytellingSwipe:"Swipe & Spyglass"},i=d(e).find(r=>r in t);if(i)return t[i];let a=F(e);return a&&t[a]||!1}async function le({badgeType:e,i18n:t,item:i,locale:a,portal:r,user:n,useProduction:l}){let c=!n||C(n);switch(e){case"Authoritative":{if(q(i)){let o=await _(i,a,r,l),s=t.Authoritative.tooltip,p=r?.isPortal&&!l?r?.name:o?.name||r?.name||i.owner;return k(s.public,{name:p||""})}return t.Authoritative.tooltip.org}case"Deprecated":{let o=i.owner||"",s=await I(o,r,l),p=D(s,a);return k(t.Deprecated.tooltip,{owner:p})}case"DeprecatedItemType":{let o=t.DeprecatedItemType.tooltip;return E(i,r)?o.webAppBuilder:o.general}case"Retired":{let o=t.Retired.tooltip;if(f(i)){let s=ne(i);if(s){let p={[j]:s};return k(o.classicStoryMap,p)}return o.classicStoryMapGeneric}return Q(i)?o.cityEngine:K(i)||P(i,r)?o.webAppBuilder:m(i)?o.app:N(i)?o.bdfs:o.general}case"Subscriber":{let o=t.Subscriber.tooltip;return c?o.public:o.org}case"Premium":{let o=t.Premium.tooltip;return c?o.public:o.org}case"Registered":{let o=t.Registered.tooltip;return r?.isPortal?o.enterprise:o.online}case"Personal credential":return t["Personal credential"].tooltip;case"Has Replacement":{let o=t["Has Replacement"];return r.isPortal?(globalThis.location?.href||"").includes("item.html")?o.itemPageTooltip:o.tooltip:o.itemPageTooltip}default:return t[e].tooltip}}function ce({badgeType:e,i18n:t,item:i,portal:a}){if(e!=="Has Replacement"||a.isPortal)return null;let r=B(i);return r?{title:t["Has Replacement"].link,href:de({portal:a,itemId:r})}:null}function de({itemId:e,portal:t}){return t?.restUrl?`${t.restUrl.replace("sharing/rest","home")}/item.html?id=${e}`:""}function H(){return{loading:!1,title:"",tooltip:"",tooltipLink:null}}var y=class extends v{constructor(){super(...arguments),this._messages=R({name:"portal-item-badges",blocking:!0}),this.tooltipRequestId=0,this.tooltipId=`portal-item-badge-${Math.random().toString(36).slice(2,10)}`,this.details=H(),this.width="full",this.scale="m",this.showTooltip=!1}static{this.properties={details:16,item:0,portal:0,user:0,badgeType:1,width:1,appearance:1,scale:1,showTooltip:5,useProduction:5}}static{this.styles=G}willUpdate(t){(t.has("badgeType")||t.has("item")||t.has("portal")||t.has("user")||t.has("showTooltip")||t.has("useProduction"))&&this.loadDetails()}loadDetails(){if(!this.badgeType||!this.portal){this.details=H();return}let t=se({badgeType:this.badgeType,i18n:this._messages,portal:this.portal}),i=this.item&&this.portal?ce({badgeType:this.badgeType,i18n:this._messages,item:this.item,portal:this.portal}):null;if(!this.showTooltip||!this.item){this.details={loading:!1,title:t,tooltip:"",tooltipLink:i};return}let a=++this.tooltipRequestId;this.details={loading:!0,title:t,tooltip:"",tooltipLink:i},le({badgeType:this.badgeType,i18n:this._messages,item:this.item,locale:this._messages._lang||"en",portal:this.portal,user:this.user,useProduction:this.useProduction}).then(r=>{a===this.tooltipRequestId&&(this.details={loading:!1,title:t,tooltip:r,tooltipLink:i})}).catch(()=>{a===this.tooltipRequestId&&(this.details={loading:!1,title:t,tooltip:"",tooltipLink:i})})}render(){if(!this.badgeType)return null;let t=pe[this.badgeType],i=this.width==="narrow",a=this.showTooltip&&(this.details.loading||!!this.details.tooltip||!!this.details.tooltipLink),r={badge:this.badgeType!=="Beta","badge--colored":this.badgeType==="Living Atlas"||this.badgeType==="Open Data"||this.badgeType==="Solution",beta:this.badgeType==="Beta",authoritative:this.badgeType==="Authoritative",deprecated:this.badgeType==="Deprecated"||this.badgeType==="DeprecatedItemType",narrow:i,[`narrow--${this.scale}`]:i};return u`<calcite-chip id=${this.tooltipId??S} class=${w(r)} .value=${this.badgeType} .tabIndex=${this.showTooltip?0:-1} .scale=${this.scale} .appearance=${this.appearance} .label=${this.details.title} .icon=${t}>${i?null:this.details.title}</calcite-chip>${a?u`<calcite-tooltip .referenceElement=${this.tooltipId} close-on-click placement=bottom-start overlay-positioning=fixed offset-distance=6 offset-skidding=0>${i?u`<h3 class="tooltip-title">${this.details.title}</h3>`:null}<p class="tooltip-text"><calcite-loader .hidden=${!this.details.loading} .label=${this._messages.loading} inline scale=s></calcite-loader>${this.details.loading?this._messages.loading:this.details.tooltip}</p>${this.details.tooltipLink?u`<calcite-link @click=${n=>n.stopPropagation()} icon-end=launch .href=${this.details.tooltipLink.href} target=_blank>${this.details.tooltipLink.title}</calcite-link>`:null}</calcite-tooltip>`:null}`}},pe={Authoritative:"check-circle",Beta:"beaker",Collaboration:"collaboration-distributed",Deprecated:"circle-disallowed",DeprecatedItemType:"exclamation-mark-triangle","Has Replacement":"arrow-right-left","Living Atlas":"arcgis-living-atlas",Marketplace:"marketplace","Open Data":"open-data","Personal credential":"user-key",Premium:"shield-coin","Public Data Collection":"pencil",Registered:"key","Registered API Key Credentials (Personal)":"key","Registered API Key Credentials (Standard)":"key","Registered Application":"app-gear","Registered OAuth 2.0 Credentials (Personal)":"app-gear","Registered OAuth 2.0 Credentials (Standard)":"app-gear",Retired:"exclamation-mark-triangle",Solution:"arcgis-solutions",Subscriber:"security"};A("arcgis-portal-item-badge",y);return{a:we,b:y}},"intl",a,c)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{e as f}from"./OBBYT2AV.js";import{a as m}from"./GAZBGDIO.js";import{a as b}from"./O3RR6UMN.js";import{M as p,S as u,h,j as i,w as r}from"./BXCQOWAD.js";var g={sm:640,md:768,lg:1024};var w=h`:host{display:flex;align-items:center}.status-list{display:flex;align-items:center;max-width:100%}.status-chip{max-width:100%;--calcite-color-foreground-2: var(--calcite-color-foreground-1)}.chip-group{max-width:100%;min-width:0}.status-chip__label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.popover-content{max-width:28rem;padding:.75rem}.clear-button{margin-inline-start:.25rem}`,o=class extends p{constructor(){super(...arguments),this._messages=b({name:"portal-browser",blocking:!0}),this.inBounds=[],this.outOfBounds=[],this.filters={},this.hiddenFilterIds=[],this.arcgisBrowserFilterClear=r(),this.arcgisBrowserFilterRemove=r()}static{this.properties={inBounds:16,outOfBounds:16,filters:0,hiddenFilterIds:0,componentWidth:9,browserWidth:9}}static{this.styles=w}connectedCallback(){super.connectedCallback(),this.processValidFilters()}willUpdate(t){(t.has("filters")||t.has("hiddenFilterIds")||t.has("componentWidth")||t.has("browserWidth"))&&this.processValidFilters()}isFilterValid(t){return this.hiddenFilterIds.includes(t.id)?!1:t.id==="collaborations"&&"additionalParams"in t?!!(t.additionalParams&&t.label):!!(t.value&&t.label)}processValidFilters(){let t=Object.values(this.filters).filter(this.isFilterValid.bind(this)),s=this.componentWidth??0;if((this.browserWidth??s??window.innerWidth)<g.sm){this.inBounds=t,this.outOfBounds=[];return}let a=Math.max(s-460,0),e=0,n=[],c=[];t.forEach(l=>{let d=f({text:l.label});!s||e+d<=a?(n.push(l),e+=d):c.push(l)}),this.inBounds=n,this.outOfBounds=c}renderChip(t){return m(t.id,i`<calcite-chip class="status-chip" scale=s .label=${t.label} .value=${t.id} closable appearance=outline @calciteChipClose=${()=>{this.arcgisBrowserFilterRemove.emit(t.id)}}><span class="status-chip__label">${t.label}</span></calcite-chip>`)}render(){let t=this._messages.filterStatus,s=this.outOfBounds.length>0,a=this.inBounds.length+this.outOfBounds.length;return a?i`<div class="status-list"><calcite-chip-group class="chip-group" .label=${t.filters} scale=s>${this.inBounds.map(e=>this.renderChip(e))}${s&&i`<calcite-button id=popover-button round kind=neutral appearance=outline scale=s>+ ${this.outOfBounds.length}</calcite-button>`||""}</calcite-chip-group>${s&&i`<calcite-popover .label=${t.additional} reference-element=popover-button placement=bottom-end><div class="popover-content"><calcite-chip-group .label=${t.additional} scale=s>${this.outOfBounds.map(e=>this.renderChip(e))}</calcite-chip-group></div></calcite-popover>`||""}${a>1&&i`<calcite-button class="clear-button" scale=s appearance=transparent kind=brand @click=${()=>this.arcgisBrowserFilterClear.emit(null)}>${t.clearAllFilters}</calcite-button>`||""}</div>`:null}};u("arcgis-portal-browser-filter-status",o);export{g as a,o as b};
2
+ import{e as f}from"./OBBYT2AV.js";import{a as m}from"./6XLTWENT.js";import{a as b}from"./QLHCXOVQ.js";import{M as p,S as u,h,j as i,w as r}from"./BTSXQQKZ.js";var g={sm:640,md:768,lg:1024};var w=h`:host{display:flex;align-items:center}.status-list{display:flex;align-items:center;max-width:100%}.status-chip{max-width:100%;--calcite-color-foreground-2: var(--calcite-color-foreground-1)}.chip-group{max-width:100%;min-width:0}.status-chip__label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.popover-content{max-width:28rem;padding:.75rem}.clear-button{margin-inline-start:.25rem}`,o=class extends p{constructor(){super(...arguments),this._messages=b({name:"portal-browser",blocking:!0}),this.inBounds=[],this.outOfBounds=[],this.filters={},this.hiddenFilterIds=[],this.arcgisBrowserFilterClear=r(),this.arcgisBrowserFilterRemove=r()}static{this.properties={inBounds:16,outOfBounds:16,filters:0,hiddenFilterIds:0,componentWidth:9,browserWidth:9}}static{this.styles=w}connectedCallback(){super.connectedCallback(),this.processValidFilters()}willUpdate(t){(t.has("filters")||t.has("hiddenFilterIds")||t.has("componentWidth")||t.has("browserWidth"))&&this.processValidFilters()}isFilterValid(t){return this.hiddenFilterIds.includes(t.id)?!1:t.id==="collaborations"&&"additionalParams"in t?!!(t.additionalParams&&t.label):!!(t.value&&t.label)}processValidFilters(){let t=Object.values(this.filters).filter(this.isFilterValid.bind(this)),s=this.componentWidth??0;if((this.browserWidth??s??window.innerWidth)<g.sm){this.inBounds=t,this.outOfBounds=[];return}let a=Math.max(s-460,0),e=0,n=[],c=[];t.forEach(l=>{let d=f({text:l.label});!s||e+d<=a?(n.push(l),e+=d):c.push(l)}),this.inBounds=n,this.outOfBounds=c}renderChip(t){return m(t.id,i`<calcite-chip class="status-chip" scale=s .label=${t.label} .value=${t.id} closable appearance=outline @calciteChipClose=${()=>{this.arcgisBrowserFilterRemove.emit(t.id)}}><span class="status-chip__label">${t.label}</span></calcite-chip>`)}render(){let t=this._messages.filterStatus,s=this.outOfBounds.length>0,a=this.inBounds.length+this.outOfBounds.length;return a?i`<div class="status-list"><calcite-chip-group class="chip-group" .label=${t.filters} scale=s>${this.inBounds.map(e=>this.renderChip(e))}${s&&i`<calcite-button id=popover-button round kind=neutral appearance=outline scale=s>+ ${this.outOfBounds.length}</calcite-button>`||""}</calcite-chip-group>${s&&i`<calcite-popover .label=${t.additional} reference-element=popover-button placement=bottom-end><div class="popover-content"><calcite-chip-group .label=${t.additional} scale=s>${this.outOfBounds.map(e=>this.renderChip(e))}</calcite-chip-group></div></calcite-popover>`||""}${a>1&&i`<calcite-button class="clear-button" scale=s appearance=transparent kind=brand @click=${()=>this.arcgisBrowserFilterClear.emit(null)}>${t.clearAllFilters}</calcite-button>`||""}</div>`:null}};u("arcgis-portal-browser-filter-status",o);export{g as a,o as b};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{C as s,D as i,G as o,m as r}from"./BXCQOWAD.js";var u=s(class extends i{constructor(){super(...arguments),this.key=r}render(t,e){return this.key=t,e}update(t,[e,m]){return e!==this.key&&(o(t),this.key=e),m}});export{u as a};
2
+ import{C as s,D as i,G as o,m as r}from"./BTSXQQKZ.js";var u=s(class extends i{constructor(){super(...arguments),this.key=r}render(t,e){return this.key=t,e}update(t,[e,m]){return e!==this.key&&(o(t),this.key=e),m}});export{u as a};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import d from"./XRPX4IA3.js";import"./5A54YFFZ.js";import b from"./T4DHIZOR.js";import a from"./F3ODJVJC.js";import{a as f}from"./O3RR6UMN.js";import"./BTLJZVSE.js";import"./UEL7BVMB.js";import{M as n,O as c,S as l,h as e,j as s,q as o}from"./BXCQOWAD.js";import"./UZLQALHY.js";export default $arcgis.t(([,,{a:d,b:h}])=>{var p=e`.banner{box-sizing:border-box;width:100%;left:0;text-align:center;font-family:var(--calcite-font-family);background-color:#fff;color:#000;padding:var(--calcite-spacing-sm);font-size:var(--calcite-font-size);text-transform:uppercase;overflow-wrap:break-word}.invalid-container{background-color:#fff;color:#000;display:flex;align-items:center;justify-content:center;gap:8px}.invalid-icon{--calcite-icon-color: var(--calcite-color-status-danger)}.invalid-message{text-align:center;font-family:var(--calcite-font-family);background-color:#fff;color:#000;padding:var(--calcite-spacing-sm);font-size:var(--calcite-font-size);overflow-wrap:break-word}`,r=class extends n{constructor(){super(...arguments),this.classificationModel=d(this),this.messages=f(),this._classificationDataTask=h(this),this.portalClassificationSchema=this.classificationModel.portalClassificationSchema,this.status=this.classificationModel.status,this.missingExistingClassification=!1,this.variant="full",this.autoDestroyDisabled=!1,this.validationErrors=""}static{this.properties={portalClassificationSchema:16,status:16,itemClassification:16,portalItem:0,missingExistingClassification:5,variant:1,autoDestroyDisabled:5,validationErrors:1}}static{this.styles=p}async destroy(){await this.manager.destroy()}willUpdate(a){if(a.has("portalItem")){let{portalItem:i}=this;i?.load().then(()=>{i?.id&&i?.loaded&&i?.classification&&!this.missingExistingClassification?this.classificationModel.validateClassification(this.variant==="preview"?null:i.id,i.classification,i?.portal.restUrl).catch(o(this)).then(t=>{this.validationErrors=t??""}):this.validationErrors=""}).catch(o(this))}}getStyle(){let a={};if(this.variant==="preview"&&(a.fontSize="var(--calcite-font-size-sm)",a.padding="var(--calcite-spacing-xs)"),this.itemClassification&&this.portalClassificationSchema){let i=this.itemClassification.classification,t=this.portalClassificationSchema.classificationMetadata.classificationValueProperties.find(({value:m})=>m===i);t?.backgroundColor&&(a.backgroundColor=t.backgroundColor),t?.textColor&&(a.color=t.textColor)}return a}render(){return this._classificationDataTask.render({pending:void 0,error:void 0,complete:()=>this.portalClassificationSchema&&this.portalItem?.portal.authMode!=="anonymous"?this.validationErrors&&this.variant==="full"?s`<div class="invalid-container"><calcite-icon class="invalid-icon" scale=s icon=exclamation-mark-triangle .textLabel=${this.messages.invalidclassificationerror}></calcite-icon><span class="invalid-message">${this.messages.invalidclassificationerror}</span></div>`:s`<div class="banner" style=${c(this.getStyle())}>${this.itemClassification?.banner??this.messages.notyetclassified??"Not yet classified"}</div>`:""})}};l("arcgis-portal-classification-banner",r);return r},a,b,d)
2
+ import d from"./RBQG66FL.js";import"./7XD6KSXV.js";import b from"./WYLEYSM3.js";import a from"./F3ODJVJC.js";import{a as f}from"./QLHCXOVQ.js";import"./I2KQQXOO.js";import"./W7O7ZYZ4.js";import{M as n,O as c,S as l,h as e,j as s,q as o}from"./BTSXQQKZ.js";import"./UZLQALHY.js";export default $arcgis.t(([,,{a:d,b:h}])=>{var p=e`.banner{box-sizing:border-box;width:100%;left:0;text-align:center;font-family:var(--calcite-font-family);background-color:#fff;color:#000;padding:var(--calcite-spacing-sm);font-size:var(--calcite-font-size);text-transform:uppercase;overflow-wrap:break-word}.invalid-container{background-color:#fff;color:#000;display:flex;align-items:center;justify-content:center;gap:8px}.invalid-icon{--calcite-icon-color: var(--calcite-color-status-danger)}.invalid-message{text-align:center;font-family:var(--calcite-font-family);background-color:#fff;color:#000;padding:var(--calcite-spacing-sm);font-size:var(--calcite-font-size);overflow-wrap:break-word}`,r=class extends n{constructor(){super(...arguments),this.classificationModel=d(this),this.messages=f(),this._classificationDataTask=h(this),this.portalClassificationSchema=this.classificationModel.portalClassificationSchema,this.status=this.classificationModel.status,this.missingExistingClassification=!1,this.variant="full",this.autoDestroyDisabled=!1,this.validationErrors=""}static{this.properties={portalClassificationSchema:16,status:16,itemClassification:16,portalItem:0,missingExistingClassification:5,variant:1,autoDestroyDisabled:5,validationErrors:1}}static{this.styles=p}async destroy(){await this.manager.destroy()}willUpdate(a){if(a.has("portalItem")){let{portalItem:i}=this;i?.load().then(()=>{i?.id&&i?.loaded&&i?.classification&&!this.missingExistingClassification?this.classificationModel.validateClassification(this.variant==="preview"?null:i.id,i.classification,i?.portal.restUrl).catch(o(this)).then(t=>{this.validationErrors=t??""}):this.validationErrors=""}).catch(o(this))}}getStyle(){let a={};if(this.variant==="preview"&&(a.fontSize="var(--calcite-font-size-sm)",a.padding="var(--calcite-spacing-xs)"),this.itemClassification&&this.portalClassificationSchema){let i=this.itemClassification.classification,t=this.portalClassificationSchema.classificationMetadata.classificationValueProperties.find(({value:m})=>m===i);t?.backgroundColor&&(a.backgroundColor=t.backgroundColor),t?.textColor&&(a.color=t.textColor)}return a}render(){return this._classificationDataTask.render({pending:void 0,error:void 0,complete:()=>this.portalClassificationSchema&&this.portalItem?.portal.authMode!=="anonymous"?this.validationErrors&&this.variant==="full"?s`<div class="invalid-container"><calcite-icon class="invalid-icon" scale=s icon=exclamation-mark-triangle .textLabel=${this.messages.invalidclassificationerror}></calcite-icon><span class="invalid-message">${this.messages.invalidclassificationerror}</span></div>`:s`<div class="banner" style=${c(this.getStyle())}>${this.itemClassification?.banner??this.messages.notyetclassified??"Not yet classified"}</div>`:""})}};l("arcgis-portal-classification-banner",r);return r},a,b,d)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{B as k,C as w,D as V,E as m,F as h,G as A,H as D,I as y,l as P}from"./BXCQOWAD.js";var b=(s,f,c)=>{let p=new Map;for(let e=f;e<=c;e++)p.set(s[e],e);return p},I=w(class extends V{constructor(s){if(super(s),s.type!==k.CHILD)throw Error("repeat() can only be used in text expressions")}dt(s,f,c){let p;c===void 0?c=f:f!==void 0&&(p=f);let e=[],n=[],o=0;for(let a of s)e[o]=p?p(a,o):o,n[o]=c(a,o),o++;return{values:n,keys:e}}render(s,f,c){return this.dt(s,f,c).values}update(s,[f,c,p]){let e=D(s),{values:n,keys:o}=this.dt(f,c,p);if(!Array.isArray(e))return this.ut=o,n;let a=this.ut??=[],u=[],v,g,t=0,l=e.length-1,r=0,i=n.length-1;for(;t<=l&&r<=i;)if(e[t]===null)t++;else if(e[l]===null)l--;else if(a[t]===o[r])u[r]=h(e[t],n[r]),t++,r++;else if(a[l]===o[i])u[i]=h(e[l],n[i]),l--,i--;else if(a[t]===o[i])u[i]=h(e[t],n[i]),m(s,u[i+1],e[t]),t++,i--;else if(a[l]===o[r])u[r]=h(e[l],n[r]),m(s,e[t],e[l]),l--,r++;else if(v===void 0&&(v=b(o,r,i),g=b(a,t,l)),v.has(a[t]))if(v.has(a[l])){let d=g.get(o[r]),x=d!==void 0?e[d]:null;if(x===null){let C=m(s,e[t]);h(C,n[r]),u[r]=C}else u[r]=h(x,n[r]),m(s,e[t],x),e[d]=null;r++}else y(e[l]),l--;else y(e[t]),t++;for(;r<=i;){let d=m(s,u[i+1]);h(d,n[r]),u[r++]=d}for(;t<=l;){let d=e[t++];d!==null&&y(d)}return this.ut=o,A(s,u),P}});export{I as a};
2
+ import{B as k,C as w,D as V,E as m,F as h,G as A,H as D,I as y,l as P}from"./BTSXQQKZ.js";var b=(s,f,c)=>{let p=new Map;for(let e=f;e<=c;e++)p.set(s[e],e);return p},I=w(class extends V{constructor(s){if(super(s),s.type!==k.CHILD)throw Error("repeat() can only be used in text expressions")}dt(s,f,c){let p;c===void 0?c=f:f!==void 0&&(p=f);let e=[],n=[],o=0;for(let a of s)e[o]=p?p(a,o):o,n[o]=c(a,o),o++;return{values:n,keys:e}}render(s,f,c){return this.dt(s,f,c).values}update(s,[f,c,p]){let e=D(s),{values:n,keys:o}=this.dt(f,c,p);if(!Array.isArray(e))return this.ut=o,n;let a=this.ut??=[],u=[],v,g,t=0,l=e.length-1,r=0,i=n.length-1;for(;t<=l&&r<=i;)if(e[t]===null)t++;else if(e[l]===null)l--;else if(a[t]===o[r])u[r]=h(e[t],n[r]),t++,r++;else if(a[l]===o[i])u[i]=h(e[l],n[i]),l--,i--;else if(a[t]===o[i])u[i]=h(e[t],n[i]),m(s,u[i+1],e[t]),t++,i--;else if(a[l]===o[r])u[r]=h(e[l],n[r]),m(s,e[t],e[l]),l--,r++;else if(v===void 0&&(v=b(o,r,i),g=b(a,t,l)),v.has(a[t]))if(v.has(a[l])){let d=g.get(o[r]),x=d!==void 0?e[d]:null;if(x===null){let C=m(s,e[t]);h(C,n[r]),u[r]=C}else u[r]=h(x,n[r]),m(s,e[t],x),e[d]=null;r++}else y(e[l]),l--;else y(e[t]),t++;for(;r<=i;){let d=m(s,u[i+1]);h(d,n[r]),u[r++]=d}for(;t<=l;){let d=e[t++];d!==null&&y(d)}return this.ut=o,A(s,u),P}});export{I as a};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{b as f}from"./YDYJ5MIY.js";import{a as g}from"./ILDTKRON.js";import{b as _}from"./QS3GXAIH.js";import{K as d,L as n,M as w,N as p,P as o,S as u,h as v,j as r,w as l}from"./BXCQOWAD.js";export default $arcgis.t(([{formatDate:y}])=>{var $=v`:host{display:block;min-width:0;container-type:inline-size}.preview-card{position:relative;display:flex;width:100%;height:100%;flex-direction:column;color:var(--calcite-color-text-1);opacity:0;background-color:var(--calcite-color-foreground-1);border:1px solid var(--calcite-color-border-3);transition:background-color .15s ease-in-out,opacity .15s ease-in-out}.preview-card--loaded{opacity:1}.preview-card--hoverable{cursor:pointer}.preview-card--hoverable .preview-card__upper:hover{background-color:var(--calcite-color-background)}.preview-card__upper{display:flex;align-items:stretch;min-width:0;flex:1 1 auto;padding:.75rem;background-color:var(--calcite-color-foreground-1)}.preview-card__upper--link{color:var(--calcite-color-text-1);text-decoration:none}.preview-card__top{display:flex;align-self:stretch;flex:0 0 auto}.preview-card__thumbnail{box-sizing:border-box;display:grid;place-items:center;width:4rem;height:100%;margin:0;margin-inline-start:.75rem;border-radius:2px;overflow:hidden;background-color:var(--calcite-color-foreground-2)}.preview-card__thumbnail-image{width:100%;height:100%;object-fit:cover}.preview-card__thumbnail--fallback{color:var(--calcite-color-text-3)}.preview-card__content{min-width:0;flex:1 1 auto}.preview-card__body{display:grid;min-width:0;gap:.25rem}.preview-card__title{margin:0;height:2rem;font-size:var(--calcite-font-size--1);font-weight:var(--calcite-font-weight-medium);line-height:1.15;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow-wrap:anywhere}.preview-card__title--padded{margin-bottom:.125rem}.preview-card__title-span{position:relative}.preview-card__summary{color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--2);line-height:1.35;margin:0;overflow:hidden;text-overflow:ellipsis}.preview-card__details{align-items:center;display:flex;flex-wrap:wrap;gap:.25rem}.preview-card__detail,.preview-card__meta{color:var(--calcite-color-text-1);font-size:var(--calcite-font-size--2);margin:0}.preview-card__meta{color:var(--calcite-color-text-2)}.preview-card__status{--calcite-chip-background-color: var(--calcite-color-foreground-2);text-transform:capitalize}.preview-card__divider{align-items:center;display:flex;flex:0 0 auto}.preview-card__divider:before{content:"";height:1rem;width:1px;margin-inline-end:.5rem;background-color:var(--calcite-color-border-2)}.preview-card__details :first-child.preview-card__divider:before{display:none}.preview-card__footer{align-items:center;border-top:1px solid var(--calcite-color-border-2);display:flex;margin-top:auto;min-height:2.25rem;padding:.375rem .75rem}.preview-card__footer-start{align-items:center;display:flex;flex:1 1 auto;min-width:0}.preview-card__owner{min-width:0}@container (max-width: 480px){.preview-card__upper{padding:.625rem}.preview-card__thumbnail{width:3.5rem;margin-inline-start:.5rem}.preview-card__footer{padding:.25rem .625rem}}`,h=class extends w{constructor(){super(...arguments),this.sectionEl=d(),this.linkEl=d(),this.cachedOwner="",this.cachedStatus="",this.cachedTitle="-",this.cachedType="-",this.cachedSummary="",this.cachedUpdatedText="",this.cachedThumbnailUri=null,this.handleCardClick=()=>{let{link:e,item:t}=this;e||this.arcgisGroupBrowserPreviewCardSelect.emit(t)},this.isLoaded=!1,this.imageError=!1,this.newTab=!1,this.hideThumbnail=!1,this.hideOwner=!1,this.hideItemType=!1,this.showDateUpdated=!1,this.showSummary=!1,this.showBadges=!1,this.showOwnerPopup=!1,this.interactive=!1,this.arcgisGroupBrowserInternalUIAction=l(),this.arcgisGroupBrowserPreviewCardSelect=l()}static{this.properties={isLoaded:16,imageError:16,item:0,portal:0,user:0,baseUrl:1,link:1,newTab:5,hideThumbnail:5,hideOwner:5,hideItemType:5,showDateUpdated:5,showSummary:5,showBadges:5,showOwnerPopup:5,interactive:5}}static{this.styles=$}async restoreFocus(){if(this.link&&this.linkEl.value){this.linkEl.value.focus();return}this.sectionEl.value?.focus()}connectedCallback(){super.connectedCallback(),requestAnimationFrame(()=>{this.isLoaded=!0})}willUpdate(e){(e.has("item")||e.has("portal")||e.has("showSummary")||e.has("showDateUpdated"))&&(this.imageError=!1,this.updateCachedItemData())}get resolvedBaseUrl(){if(!this.portal)return"";let e=_({portal:this.portal});return this.baseUrl||`${e}/home`}getItemThumbnailUri(e){return e.thumbnailUrl?e.thumbnailUrl:this.portal?f(this.portal,e):null}updateCachedItemData(){let{item:e,showSummary:t,showDateUpdated:s}=this,i=g(e),a=i.snippet?.trim()||"";this.cachedOwner=i.owner||"",this.cachedStatus=i.contentStatus||"",this.cachedTitle=i.title?.trim()||e.title?.trim()||"-",this.cachedType=i.type?.trim()||"-",this.cachedSummary=t?a.length>250?`${a.slice(0,250)}...`:a:"",this.cachedUpdatedText=s?y(i.modified??e.modified,{dateStyle:"medium"}):"",this.cachedThumbnailUri=this.getItemThumbnailUri(e)}renderStatusBadge(){let e=this.cachedStatus;return!this.showBadges||!e?null:r`<calcite-chip class="preview-card__status" scale=s .value=${e} .label=${e}>${e}</calcite-chip>`}renderThumbnail(){if(this.hideThumbnail)return null;let e=this.cachedThumbnailUri;return e&&!this.imageError?r`<figure class="preview-card__thumbnail"><img class="preview-card__thumbnail-image" src=${e??o} alt @error=${()=>{this.imageError=!0}}></figure>`:r`<figure class="preview-card__thumbnail preview-card__thumbnail--fallback" aria-hidden=true><calcite-icon icon=file scale=m></calcite-icon></figure>`}renderOwner(){let e=this.cachedOwner;return this.hideOwner||!e||!this.portal?null:this.showOwnerPopup?r`<arcgis-portal-user-popup underline .username=${e} .portal=${this.portal} .baseUrl=${this.resolvedBaseUrl} class="preview-card__owner" scale=s @arcgisUserPopupInternalUIAction=${t=>{t.stopPropagation(),this.arcgisGroupBrowserInternalUIAction.emit(t.detail)}}></arcgis-portal-user-popup>`:r`<arcgis-portal-user-avatar scale=s show-name hide-avatar .username=${e} .portal=${this.portal} class="preview-card__owner"></arcgis-portal-user-avatar>`}renderBody(e){let{showSummary:t,showDateUpdated:s}=this,i=!this.hideItemType,a=this.cachedTitle,b=this.cachedType,c=this.cachedSummary,m=this.cachedUpdatedText;return r`<div class="preview-card__body"><h3 class=${p({"preview-card__title":!0,"preview-card__title--padded":i||t&&!!c})}><span class="preview-card__title-span">${a}</span></h3>${t&&c?r`<p class="preview-card__summary">${c}</p>`:null}${i?r`<arcgis-portal-item-type scale=s .item=${e} .portal=${this.portal} .user=${this.user}></arcgis-portal-item-type>`:null}<div class="preview-card__details">${s&&m?r`<span class="preview-card__detail preview-card__divider">${m}</span>`:null}${this.renderStatusBadge()}${i?null:r`<p class="preview-card__meta">${b}</p>`}</div></div>`}render(){let{item:e,interactive:t,link:s,newTab:i}=this;return r`<section class=${p({"preview-card":!0,"preview-card--hoverable":t,"preview-card--loaded":this.isLoaded})} .part=${"card"} tabindex=${(t?0:void 0)??o} @click=${s?void 0:this.handleCardClick} ${n(this.sectionEl)}><slot name=content-top></slot>${s?r`<a class="preview-card__upper preview-card__upper--link" href=${s??o} target=${(i?"_blank":void 0)??o} rel=${(i?"noopener noreferrer":void 0)??o} ${n(this.linkEl)}>${r`<div class="preview-card__content">${this.renderBody(e)}</div><div class="preview-card__top">${this.renderThumbnail()}</div>`}</a>`:r`<div class="preview-card__upper"><div class="preview-card__content">${this.renderBody(e)}</div><div class="preview-card__top">${this.renderThumbnail()}</div></div>`}<div class="preview-card__footer" @click=${a=>{a.stopPropagation()}} @keydown=${a=>{(a.key==="Enter"||a.key===" ")&&a.stopPropagation()}}><div class="preview-card__footer-start">${this.renderOwner()}</div><slot name=actions-end></slot></div></section>`}};u("arcgis-portal-group-browser-preview-card",h);return h},"intl")
2
+ import{b as f}from"./PJLV3EQS.js";import{a as g}from"./ILDTKRON.js";import{b as _}from"./QS3GXAIH.js";import{K as d,L as n,M as w,N as p,P as o,S as u,h as v,j as r,w as l}from"./BTSXQQKZ.js";export default $arcgis.t(([{formatDate:y}])=>{var $=v`:host{display:block;min-width:0;container-type:inline-size}.preview-card{position:relative;display:flex;width:100%;height:100%;flex-direction:column;color:var(--calcite-color-text-1);opacity:0;background-color:var(--calcite-color-foreground-1);border:1px solid var(--calcite-color-border-3);transition:background-color .15s ease-in-out,opacity .15s ease-in-out}.preview-card--loaded{opacity:1}.preview-card--hoverable{cursor:pointer}.preview-card--hoverable .preview-card__upper:hover{background-color:var(--calcite-color-background)}.preview-card__upper{display:flex;align-items:stretch;min-width:0;flex:1 1 auto;padding:.75rem;background-color:var(--calcite-color-foreground-1)}.preview-card__upper--link{color:var(--calcite-color-text-1);text-decoration:none}.preview-card__top{display:flex;align-self:stretch;flex:0 0 auto}.preview-card__thumbnail{box-sizing:border-box;display:grid;place-items:center;width:4rem;height:100%;margin:0;margin-inline-start:.75rem;border-radius:2px;overflow:hidden;background-color:var(--calcite-color-foreground-2)}.preview-card__thumbnail-image{width:100%;height:100%;object-fit:cover}.preview-card__thumbnail--fallback{color:var(--calcite-color-text-3)}.preview-card__content{min-width:0;flex:1 1 auto}.preview-card__body{display:grid;min-width:0;gap:.25rem}.preview-card__title{margin:0;height:2rem;font-size:var(--calcite-font-size--1);font-weight:var(--calcite-font-weight-medium);line-height:1.15;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow-wrap:anywhere}.preview-card__title--padded{margin-bottom:.125rem}.preview-card__title-span{position:relative}.preview-card__summary{color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--2);line-height:1.35;margin:0;overflow:hidden;text-overflow:ellipsis}.preview-card__details{align-items:center;display:flex;flex-wrap:wrap;gap:.25rem}.preview-card__detail,.preview-card__meta{color:var(--calcite-color-text-1);font-size:var(--calcite-font-size--2);margin:0}.preview-card__meta{color:var(--calcite-color-text-2)}.preview-card__status{--calcite-chip-background-color: var(--calcite-color-foreground-2);text-transform:capitalize}.preview-card__divider{align-items:center;display:flex;flex:0 0 auto}.preview-card__divider:before{content:"";height:1rem;width:1px;margin-inline-end:.5rem;background-color:var(--calcite-color-border-2)}.preview-card__details :first-child.preview-card__divider:before{display:none}.preview-card__footer{align-items:center;border-top:1px solid var(--calcite-color-border-2);display:flex;margin-top:auto;min-height:2.25rem;padding:.375rem .75rem}.preview-card__footer-start{align-items:center;display:flex;flex:1 1 auto;min-width:0}.preview-card__owner{min-width:0}@container (max-width: 480px){.preview-card__upper{padding:.625rem}.preview-card__thumbnail{width:3.5rem;margin-inline-start:.5rem}.preview-card__footer{padding:.25rem .625rem}}`,h=class extends w{constructor(){super(...arguments),this.sectionEl=d(),this.linkEl=d(),this.cachedOwner="",this.cachedStatus="",this.cachedTitle="-",this.cachedType="-",this.cachedSummary="",this.cachedUpdatedText="",this.cachedThumbnailUri=null,this.handleCardClick=()=>{let{link:e,item:t}=this;e||this.arcgisGroupBrowserPreviewCardSelect.emit(t)},this.isLoaded=!1,this.imageError=!1,this.newTab=!1,this.hideThumbnail=!1,this.hideOwner=!1,this.hideItemType=!1,this.showDateUpdated=!1,this.showSummary=!1,this.showBadges=!1,this.showOwnerPopup=!1,this.interactive=!1,this.arcgisGroupBrowserInternalUIAction=l(),this.arcgisGroupBrowserPreviewCardSelect=l()}static{this.properties={isLoaded:16,imageError:16,item:0,portal:0,user:0,baseUrl:1,link:1,newTab:5,hideThumbnail:5,hideOwner:5,hideItemType:5,showDateUpdated:5,showSummary:5,showBadges:5,showOwnerPopup:5,interactive:5}}static{this.styles=$}async restoreFocus(){if(this.link&&this.linkEl.value){this.linkEl.value.focus();return}this.sectionEl.value?.focus()}connectedCallback(){super.connectedCallback(),requestAnimationFrame(()=>{this.isLoaded=!0})}willUpdate(e){(e.has("item")||e.has("portal")||e.has("showSummary")||e.has("showDateUpdated"))&&(this.imageError=!1,this.updateCachedItemData())}get resolvedBaseUrl(){if(!this.portal)return"";let e=_({portal:this.portal});return this.baseUrl||`${e}/home`}getItemThumbnailUri(e){return e.thumbnailUrl?e.thumbnailUrl:this.portal?f(this.portal,e):null}updateCachedItemData(){let{item:e,showSummary:t,showDateUpdated:s}=this,i=g(e),a=i.snippet?.trim()||"";this.cachedOwner=i.owner||"",this.cachedStatus=i.contentStatus||"",this.cachedTitle=i.title?.trim()||e.title?.trim()||"-",this.cachedType=i.type?.trim()||"-",this.cachedSummary=t?a.length>250?`${a.slice(0,250)}...`:a:"",this.cachedUpdatedText=s?y(i.modified??e.modified,{dateStyle:"medium"}):"",this.cachedThumbnailUri=this.getItemThumbnailUri(e)}renderStatusBadge(){let e=this.cachedStatus;return!this.showBadges||!e?null:r`<calcite-chip class="preview-card__status" scale=s .value=${e} .label=${e}>${e}</calcite-chip>`}renderThumbnail(){if(this.hideThumbnail)return null;let e=this.cachedThumbnailUri;return e&&!this.imageError?r`<figure class="preview-card__thumbnail"><img class="preview-card__thumbnail-image" src=${e??o} alt @error=${()=>{this.imageError=!0}}></figure>`:r`<figure class="preview-card__thumbnail preview-card__thumbnail--fallback" aria-hidden=true><calcite-icon icon=file scale=m></calcite-icon></figure>`}renderOwner(){let e=this.cachedOwner;return this.hideOwner||!e||!this.portal?null:this.showOwnerPopup?r`<arcgis-portal-user-popup underline .username=${e} .portal=${this.portal} .baseUrl=${this.resolvedBaseUrl} class="preview-card__owner" scale=s @arcgisUserPopupInternalUIAction=${t=>{t.stopPropagation(),this.arcgisGroupBrowserInternalUIAction.emit(t.detail)}}></arcgis-portal-user-popup>`:r`<arcgis-portal-user-avatar scale=s show-name hide-avatar .username=${e} .portal=${this.portal} class="preview-card__owner"></arcgis-portal-user-avatar>`}renderBody(e){let{showSummary:t,showDateUpdated:s}=this,i=!this.hideItemType,a=this.cachedTitle,b=this.cachedType,c=this.cachedSummary,m=this.cachedUpdatedText;return r`<div class="preview-card__body"><h3 class=${p({"preview-card__title":!0,"preview-card__title--padded":i||t&&!!c})}><span class="preview-card__title-span">${a}</span></h3>${t&&c?r`<p class="preview-card__summary">${c}</p>`:null}${i?r`<arcgis-portal-item-type scale=s .item=${e} .portal=${this.portal} .user=${this.user}></arcgis-portal-item-type>`:null}<div class="preview-card__details">${s&&m?r`<span class="preview-card__detail preview-card__divider">${m}</span>`:null}${this.renderStatusBadge()}${i?null:r`<p class="preview-card__meta">${b}</p>`}</div></div>`}render(){let{item:e,interactive:t,link:s,newTab:i}=this;return r`<section class=${p({"preview-card":!0,"preview-card--hoverable":t,"preview-card--loaded":this.isLoaded})} .part=${"card"} tabindex=${(t?0:void 0)??o} @click=${s?void 0:this.handleCardClick} ${n(this.sectionEl)}><slot name=content-top></slot>${s?r`<a class="preview-card__upper preview-card__upper--link" href=${s??o} target=${(i?"_blank":void 0)??o} rel=${(i?"noopener noreferrer":void 0)??o} ${n(this.linkEl)}>${r`<div class="preview-card__content">${this.renderBody(e)}</div><div class="preview-card__top">${this.renderThumbnail()}</div>`}</a>`:r`<div class="preview-card__upper"><div class="preview-card__content">${this.renderBody(e)}</div><div class="preview-card__top">${this.renderThumbnail()}</div></div>`}<div class="preview-card__footer" @click=${a=>{a.stopPropagation()}} @keydown=${a=>{(a.key==="Enter"||a.key===" ")&&a.stopPropagation()}}><div class="preview-card__footer-start">${this.renderOwner()}</div><slot name=actions-end></slot></div></section>`}};u("arcgis-portal-group-browser-preview-card",h);return h},"intl")
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{i as o}from"./BXCQOWAD.js";var c={INITIAL:0,PENDING:1,COMPLETE:2,ERROR:3},n=Symbol(),e=class{get taskComplete(){return this.t||(this.i===1?this.t=new Promise(((t,s)=>{this.o=t,this.h=s})):this.i===3?this.t=Promise.reject(this.l):this.t=Promise.resolve(this.u)),this.t}constructor(t,s,r){this.p=0,this.i=0,(this._=t).addController(this);let i=typeof s=="object"?s:{task:s,args:r};this.v=i.task,this.j=i.args,this.m=i.argsEqual??u,this.k=i.onComplete,this.A=i.onError,this.autoRun=i.autoRun??!0,"initialValue"in i&&(this.u=i.initialValue,this.i=2,this.O=this.T?.())}hostUpdate(){this.autoRun===!0&&this.S()}hostUpdated(){this.autoRun==="afterUpdate"&&this.S()}T(){if(this.j===void 0)return;let t=this.j();if(!Array.isArray(t))throw Error("The args function must return an array");return t}async S(){let t=this.T(),s=this.O;this.O=t,t===s||t===void 0||s!==void 0&&this.m(s,t)||await this.run(t)}async run(t){let s,r;t??=this.T(),this.O=t,this.i===1?this.q?.abort():(this.t=void 0,this.o=void 0,this.h=void 0),this.i=1,this.autoRun==="afterUpdate"?queueMicrotask((()=>this._.requestUpdate())):this._.requestUpdate();let i=++this.p;this.q=new AbortController;let a=!1;try{s=await this.v(t,{signal:this.q.signal})}catch(l){a=!0,r=l}if(this.p===i){if(s===n)this.i=0;else{if(a===!1){try{this.k?.(s)}catch{}this.i=2,this.o?.(s)}else{try{this.A?.(r)}catch{}this.i=3,this.h?.(r)}this.u=s,this.l=r}this._.requestUpdate()}}abort(t){this.i===1&&this.q?.abort(t)}get value(){return this.u}get error(){return this.l}get status(){return this.i}render(t){switch(this.i){case 0:return t.initial?.();case 1:return t.pending?.();case 2:return t.complete?.(this.value);case 3:return t.error?.(this.error);default:throw Error("Unexpected status: "+this.i)}}},u=(h,t)=>h===t||h.length===t.length&&h.every(((s,r)=>!o(s,t[r])));export{c as a,e as b};
2
+ import{i as o}from"./BTSXQQKZ.js";var c={INITIAL:0,PENDING:1,COMPLETE:2,ERROR:3},n=Symbol(),e=class{get taskComplete(){return this.t||(this.i===1?this.t=new Promise(((t,s)=>{this.o=t,this.h=s})):this.i===3?this.t=Promise.reject(this.l):this.t=Promise.resolve(this.u)),this.t}constructor(t,s,r){this.p=0,this.i=0,(this._=t).addController(this);let i=typeof s=="object"?s:{task:s,args:r};this.v=i.task,this.j=i.args,this.m=i.argsEqual??u,this.k=i.onComplete,this.A=i.onError,this.autoRun=i.autoRun??!0,"initialValue"in i&&(this.u=i.initialValue,this.i=2,this.O=this.T?.())}hostUpdate(){this.autoRun===!0&&this.S()}hostUpdated(){this.autoRun==="afterUpdate"&&this.S()}T(){if(this.j===void 0)return;let t=this.j();if(!Array.isArray(t))throw Error("The args function must return an array");return t}async S(){let t=this.T(),s=this.O;this.O=t,t===s||t===void 0||s!==void 0&&this.m(s,t)||await this.run(t)}async run(t){let s,r;t??=this.T(),this.O=t,this.i===1?this.q?.abort():(this.t=void 0,this.o=void 0,this.h=void 0),this.i=1,this.autoRun==="afterUpdate"?queueMicrotask((()=>this._.requestUpdate())):this._.requestUpdate();let i=++this.p;this.q=new AbortController;let a=!1;try{s=await this.v(t,{signal:this.q.signal})}catch(l){a=!0,r=l}if(this.p===i){if(s===n)this.i=0;else{if(a===!1){try{this.k?.(s)}catch{}this.i=2,this.o?.(s)}else{try{this.A?.(r)}catch{}this.i=3,this.h?.(r)}this.u=s,this.l=r}this._.requestUpdate()}}abort(t){this.i===1&&this.q?.abort(t)}get value(){return this.u}get error(){return this.l}get status(){return this.i}render(t){switch(this.i){case 0:return t.initial?.();case 1:return t.pending?.();case 2:return t.complete?.(this.value);case 3:return t.error?.(this.error);default:throw Error("Unexpected status: "+this.i)}}},u=(h,t)=>h===t||h.length===t.length&&h.every(((s,r)=>!o(s,t[r])));export{c as a,e as b};
@@ -1,4 +1,4 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- var Y=globalThis,Z=Y.ShadowRoot&&(Y.ShadyCSS===void 0||Y.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,vt=Symbol(),Mt=new WeakMap,M=class{constructor(t,e,o){if(this._$cssResult$=!0,o!==vt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(Z&&t===void 0){let o=e!==void 0&&e.length===1;o&&(t=Mt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),o&&Mt.set(e,t))}return t}toString(){return this.cssText}},kt=s=>new M(typeof s=="string"?s:s+"",void 0,vt),Ce=(s,...t)=>{let e=s.length===1?s[0]:t.reduce((o,n,r)=>o+(i=>{if(i._$cssResult$===!0)return i.cssText;if(typeof i=="number")return i;throw Error("Value passed to 'css' function must be a 'css' function result: "+i+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+s[r+1],s[0]);return new M(e,s,vt)},jt=(s,t)=>{if(Z)s.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let o=document.createElement("style"),n=Y.litNonce;n!==void 0&&o.setAttribute("nonce",n),o.textContent=e.cssText,s.appendChild(o)}},Et=Z?s=>s:s=>s instanceof CSSStyleSheet?(t=>{let e="";for(let o of t.cssRules)e+=o.cssText;return kt(e)})(s):s;var{is:we,defineProperty:Oe,getOwnPropertyDescriptor:Te,getOwnPropertyNames:Se,getOwnPropertySymbols:Pe,getPrototypeOf:Ne}=Object,tt=globalThis,Ht=tt.trustedTypes,xe=Ht?Ht.emptyScript:"",De=tt.reactiveElementPolyfillSupport,k=(s,t)=>s,X={toAttribute(s,t){switch(t){case Boolean:s=s?xe:null;break;case Object:case Array:s=s==null?s:JSON.stringify(s)}return s},fromAttribute(s,t){let e=s;switch(t){case Boolean:e=s!==null;break;case Number:e=s===null?null:Number(s);break;case Object:case Array:try{e=JSON.parse(s)}catch{e=null}}return e}},j=(s,t)=>!we(s,t),zt={attribute:!0,type:String,converter:X,reflect:!1,useDefault:!1,hasChanged:j};Symbol.metadata??=Symbol("metadata"),tt.litPropertyMetadata??=new WeakMap;var A=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=zt){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let o=Symbol(),n=this.getPropertyDescriptor(t,o,e);n!==void 0&&Oe(this.prototype,t,n)}}static getPropertyDescriptor(t,e,o){let{get:n,set:r}=Te(this.prototype,t)??{get(){return this[e]},set(i){this[e]=i}};return{get:n,set(i){let a=n?.call(this);r?.call(this,i),this.requestUpdate(t,a,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??zt}static _$Ei(){if(this.hasOwnProperty(k("elementProperties")))return;let t=Ne(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(k("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(k("properties"))){let e=this.properties,o=[...Se(e),...Pe(e)];for(let n of o)this.createProperty(n,e[n])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[o,n]of e)this.elementProperties.set(o,n)}this._$Eh=new Map;for(let[e,o]of this.elementProperties){let n=this._$Eu(e,o);n!==void 0&&this._$Eh.set(n,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let o=new Set(t.flat(1/0).reverse());for(let n of o)e.unshift(Et(n))}else t!==void 0&&e.push(Et(t));return e}static _$Eu(t,e){let o=e.attribute;return o===!1?void 0:typeof o=="string"?o:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let o of e.keys())this.hasOwnProperty(o)&&(t.set(o,this[o]),delete this[o]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return jt(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,o){this._$AK(t,o)}_$ET(t,e){let o=this.constructor.elementProperties.get(t),n=this.constructor._$Eu(t,o);if(n!==void 0&&o.reflect===!0){let r=(o.converter?.toAttribute!==void 0?o.converter:X).toAttribute(e,o.type);this._$Em=t,r==null?this.removeAttribute(n):this.setAttribute(n,r),this._$Em=null}}_$AK(t,e){let o=this.constructor,n=o._$Eh.get(t);if(n!==void 0&&this._$Em!==n){let r=o.getPropertyOptions(n),i=typeof r.converter=="function"?{fromAttribute:r.converter}:r.converter?.fromAttribute!==void 0?r.converter:X;this._$Em=n;let a=i.fromAttribute(e,r.type);this[n]=a??this._$Ej?.get(n)??a,this._$Em=null}}requestUpdate(t,e,o,n=!1,r){if(t!==void 0){let i=this.constructor;if(n===!1&&(r=this[t]),o??=i.getPropertyOptions(t),!((o.hasChanged??j)(r,e)||o.useDefault&&o.reflect&&r===this._$Ej?.get(t)&&!this.hasAttribute(i._$Eu(t,o))))return;this.C(t,e,o)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:o,reflect:n,wrapped:r},i){o&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,i??e??this[t]),r!==!0||i!==void 0)||(this._$AL.has(t)||(this.hasUpdated||o||(e=void 0),this._$AL.set(t,e)),n===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[n,r]of this._$Ep)this[n]=r;this._$Ep=void 0}let o=this.constructor.elementProperties;if(o.size>0)for(let[n,r]of o){let{wrapped:i}=r,a=this[n];i!==!0||this._$AL.has(n)||a===void 0||this.C(n,void 0,r,a)}}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(o=>o.hostUpdate?.()),this.update(e)):this._$EM()}catch(o){throw t=!1,this._$EM(),o}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(t){}firstUpdated(t){}};A.elementStyles=[],A.shadowRootOptions={mode:"open"},A[k("elementProperties")]=new Map,A[k("finalized")]=new Map,De?.({ReactiveElement:A}),(tt.reactiveElementVersions??=[]).push("2.1.2");var bt=globalThis,Vt=s=>s,et=bt.trustedTypes,Bt=et?et.createPolicy("lit-html",{createHTML:s=>s}):void 0,At="$lit$",_=`lit$${Math.random().toFixed(9).slice(2)}$`,_t="?"+_,Le=`<${_t}>`,T=document,z=()=>T.createComment(""),V=s=>s===null||typeof s!="object"&&typeof s!="function",Ct=Array.isArray,Qt=s=>Ct(s)||typeof s?.[Symbol.iterator]=="function",$t=`[
2
+ var Y=globalThis,Z=Y.ShadowRoot&&(Y.ShadyCSS===void 0||Y.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,vt=Symbol(),Mt=new WeakMap,M=class{constructor(t,e,o){if(this._$cssResult$=!0,o!==vt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(Z&&t===void 0){let o=e!==void 0&&e.length===1;o&&(t=Mt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),o&&Mt.set(e,t))}return t}toString(){return this.cssText}},kt=s=>new M(typeof s=="string"?s:s+"",void 0,vt),Ce=(s,...t)=>{let e=s.length===1?s[0]:t.reduce((o,n,r)=>o+(i=>{if(i._$cssResult$===!0)return i.cssText;if(typeof i=="number")return i;throw Error("Value passed to 'css' function must be a 'css' function result: "+i+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+s[r+1],s[0]);return new M(e,s,vt)},jt=(s,t)=>{if(Z)s.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let o=document.createElement("style"),n=Y.litNonce;n!==void 0&&o.setAttribute("nonce",n),o.textContent=e.cssText,s.appendChild(o)}},Et=Z?s=>s:s=>s instanceof CSSStyleSheet?(t=>{let e="";for(let o of t.cssRules)e+=o.cssText;return kt(e)})(s):s;var{is:we,defineProperty:Oe,getOwnPropertyDescriptor:Te,getOwnPropertyNames:Se,getOwnPropertySymbols:Pe,getPrototypeOf:Ne}=Object,tt=globalThis,Ht=tt.trustedTypes,De=Ht?Ht.emptyScript:"",xe=tt.reactiveElementPolyfillSupport,k=(s,t)=>s,X={toAttribute(s,t){switch(t){case Boolean:s=s?De:null;break;case Object:case Array:s=s==null?s:JSON.stringify(s)}return s},fromAttribute(s,t){let e=s;switch(t){case Boolean:e=s!==null;break;case Number:e=s===null?null:Number(s);break;case Object:case Array:try{e=JSON.parse(s)}catch{e=null}}return e}},j=(s,t)=>!we(s,t),Vt={attribute:!0,type:String,converter:X,reflect:!1,useDefault:!1,hasChanged:j};Symbol.metadata??=Symbol("metadata"),tt.litPropertyMetadata??=new WeakMap;var A=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=Vt){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let o=Symbol(),n=this.getPropertyDescriptor(t,o,e);n!==void 0&&Oe(this.prototype,t,n)}}static getPropertyDescriptor(t,e,o){let{get:n,set:r}=Te(this.prototype,t)??{get(){return this[e]},set(i){this[e]=i}};return{get:n,set(i){let a=n?.call(this);r?.call(this,i),this.requestUpdate(t,a,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Vt}static _$Ei(){if(this.hasOwnProperty(k("elementProperties")))return;let t=Ne(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(k("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(k("properties"))){let e=this.properties,o=[...Se(e),...Pe(e)];for(let n of o)this.createProperty(n,e[n])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[o,n]of e)this.elementProperties.set(o,n)}this._$Eh=new Map;for(let[e,o]of this.elementProperties){let n=this._$Eu(e,o);n!==void 0&&this._$Eh.set(n,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let o=new Set(t.flat(1/0).reverse());for(let n of o)e.unshift(Et(n))}else t!==void 0&&e.push(Et(t));return e}static _$Eu(t,e){let o=e.attribute;return o===!1?void 0:typeof o=="string"?o:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let o of e.keys())this.hasOwnProperty(o)&&(t.set(o,this[o]),delete this[o]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return jt(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,o){this._$AK(t,o)}_$ET(t,e){let o=this.constructor.elementProperties.get(t),n=this.constructor._$Eu(t,o);if(n!==void 0&&o.reflect===!0){let r=(o.converter?.toAttribute!==void 0?o.converter:X).toAttribute(e,o.type);this._$Em=t,r==null?this.removeAttribute(n):this.setAttribute(n,r),this._$Em=null}}_$AK(t,e){let o=this.constructor,n=o._$Eh.get(t);if(n!==void 0&&this._$Em!==n){let r=o.getPropertyOptions(n),i=typeof r.converter=="function"?{fromAttribute:r.converter}:r.converter?.fromAttribute!==void 0?r.converter:X;this._$Em=n;let a=i.fromAttribute(e,r.type);this[n]=a??this._$Ej?.get(n)??a,this._$Em=null}}requestUpdate(t,e,o,n=!1,r){if(t!==void 0){let i=this.constructor;if(n===!1&&(r=this[t]),o??=i.getPropertyOptions(t),!((o.hasChanged??j)(r,e)||o.useDefault&&o.reflect&&r===this._$Ej?.get(t)&&!this.hasAttribute(i._$Eu(t,o))))return;this.C(t,e,o)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:o,reflect:n,wrapped:r},i){o&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,i??e??this[t]),r!==!0||i!==void 0)||(this._$AL.has(t)||(this.hasUpdated||o||(e=void 0),this._$AL.set(t,e)),n===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[n,r]of this._$Ep)this[n]=r;this._$Ep=void 0}let o=this.constructor.elementProperties;if(o.size>0)for(let[n,r]of o){let{wrapped:i}=r,a=this[n];i!==!0||this._$AL.has(n)||a===void 0||this.C(n,void 0,r,a)}}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(o=>o.hostUpdate?.()),this.update(e)):this._$EM()}catch(o){throw t=!1,this._$EM(),o}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(t){}firstUpdated(t){}};A.elementStyles=[],A.shadowRootOptions={mode:"open"},A[k("elementProperties")]=new Map,A[k("finalized")]=new Map,xe?.({ReactiveElement:A}),(tt.reactiveElementVersions??=[]).push("2.1.2");var bt=globalThis,zt=s=>s,et=bt.trustedTypes,Bt=et?et.createPolicy("lit-html",{createHTML:s=>s}):void 0,At="$lit$",_=`lit$${Math.random().toFixed(9).slice(2)}$`,_t="?"+_,Le=`<${_t}>`,T=document,V=()=>T.createComment(""),z=s=>s===null||typeof s!="object"&&typeof s!="function",Ct=Array.isArray,Qt=s=>Ct(s)||typeof s?.[Symbol.iterator]=="function",$t=`[
3
3
  \f\r]`,H=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Wt=/-->/g,Ft=/>/g,w=RegExp(`>|${$t}(?:([^\\s"'>=/]+)(${$t}*=${$t}*(?:[^
4
- \f\r"'\`<>=]|("|')|))|$)`,"g"),qt=/'/g,Gt=/"/g,Jt=/^(?:script|style|textarea|title)$/i,wt=s=>(t,...e)=>({_$litType$:s,strings:t,values:e}),ys=wt(1),gs=wt(2),vs=wt(3),f=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),Kt=new WeakMap,O=T.createTreeWalker(T,129);function Yt(s,t){if(!Ct(s)||!s.hasOwnProperty("raw"))throw Error("invalid template strings array");return Bt!==void 0?Bt.createHTML(t):t}var Zt=(s,t)=>{let e=s.length-1,o=[],n,r=t===2?"<svg>":t===3?"<math>":"",i=H;for(let a=0;a<e;a++){let c=s[a],l,u,h=-1,m=0;for(;m<c.length&&(i.lastIndex=m,u=i.exec(c),u!==null);)m=i.lastIndex,i===H?u[1]==="!--"?i=Wt:u[1]!==void 0?i=Ft:u[2]!==void 0?(Jt.test(u[2])&&(n=RegExp("</"+u[2],"g")),i=w):u[3]!==void 0&&(i=w):i===w?u[0]===">"?(i=n??H,h=-1):u[1]===void 0?h=-2:(h=i.lastIndex-u[2].length,l=u[1],i=u[3]===void 0?w:u[3]==='"'?Gt:qt):i===Gt||i===qt?i=w:i===Wt||i===Ft?i=H:(i=w,n=void 0);let v=i===w&&s[a+1].startsWith("/>")?" ":"";r+=i===H?c+Le:h>=0?(o.push(l),c.slice(0,h)+At+c.slice(h)+_+v):c+_+(h===-2?a:v)}return[Yt(s,r+(s[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),o]},B=class s{constructor({strings:t,_$litType$:e},o){let n;this.parts=[];let r=0,i=0,a=t.length-1,c=this.parts,[l,u]=Zt(t,e);if(this.el=s.createElement(l,o),O.currentNode=this.el.content,e===2||e===3){let h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(n=O.nextNode())!==null&&c.length<a;){if(n.nodeType===1){if(n.hasAttributes())for(let h of n.getAttributeNames())if(h.endsWith(At)){let m=u[i++],v=n.getAttribute(h).split(_),C=/([.?@])?(.*)/.exec(m);c.push({type:1,index:r,name:C[2],strings:v,ctor:C[1]==="."?ot:C[1]==="?"?nt:C[1]==="@"?rt:P}),n.removeAttribute(h)}else h.startsWith(_)&&(c.push({type:6,index:r}),n.removeAttribute(h));if(Jt.test(n.tagName)){let h=n.textContent.split(_),m=h.length-1;if(m>0){n.textContent=et?et.emptyScript:"";for(let v=0;v<m;v++)n.append(h[v],z()),O.nextNode(),c.push({type:2,index:++r});n.append(h[m],z())}}}else if(n.nodeType===8)if(n.data===_t)c.push({type:2,index:r});else{let h=-1;for(;(h=n.data.indexOf(_,h+1))!==-1;)c.push({type:7,index:r}),h+=_.length-1}r++}}static createElement(t,e){let o=T.createElement("template");return o.innerHTML=t,o}};function S(s,t,e=s,o){if(t===f)return t;let n=o!==void 0?e._$Co?.[o]:e._$Cl,r=V(t)?void 0:t._$litDirective$;return n?.constructor!==r&&(n?._$AO?.(!1),r===void 0?n=void 0:(n=new r(s),n._$AT(s,e,o)),o!==void 0?(e._$Co??=[])[o]=n:e._$Cl=n),n!==void 0&&(t=S(s,n._$AS(s,t.values),n,o)),t}var st=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:o}=this._$AD,n=(t?.creationScope??T).importNode(e,!0);O.currentNode=n;let r=O.nextNode(),i=0,a=0,c=o[0];for(;c!==void 0;){if(i===c.index){let l;c.type===2?l=new L(r,r.nextSibling,this,t):c.type===1?l=new c.ctor(r,c.name,c.strings,this,t):c.type===6&&(l=new it(r,this,t)),this._$AV.push(l),c=o[++a]}i!==c?.index&&(r=O.nextNode(),i++)}return O.currentNode=T,n}p(t){let e=0;for(let o of this._$AV)o!==void 0&&(o.strings!==void 0?(o._$AI(t,o,e),e+=o.strings.length-2):o._$AI(t[e])),e++}},L=class s{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,o,n){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=o,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=S(this,t,e),V(t)?t===d||t==null||t===""?(this._$AH!==d&&this._$AR(),this._$AH=d):t!==this._$AH&&t!==f&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Qt(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==d&&V(this._$AH)?this._$AA.nextSibling.data=t:this.T(T.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:o}=t,n=typeof o=="number"?this._$AC(t):(o.el===void 0&&(o.el=B.createElement(Yt(o.h,o.h[0]),this.options)),o);if(this._$AH?._$AD===n)this._$AH.p(e);else{let r=new st(n,this),i=r.u(this.options);r.p(e),this.T(i),this._$AH=r}}_$AC(t){let e=Kt.get(t.strings);return e===void 0&&Kt.set(t.strings,e=new B(t)),e}k(t){Ct(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,o,n=0;for(let r of t)n===e.length?e.push(o=new s(this.O(z()),this.O(z()),this,this.options)):o=e[n],o._$AI(r),n++;n<e.length&&(this._$AR(o&&o._$AB.nextSibling,n),e.length=n)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){let o=Vt(t).nextSibling;Vt(t).remove(),t=o}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},P=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,o,n,r){this.type=1,this._$AH=d,this._$AN=void 0,this.element=t,this.name=e,this._$AM=n,this.options=r,o.length>2||o[0]!==""||o[1]!==""?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=d}_$AI(t,e=this,o,n){let r=this.strings,i=!1;if(r===void 0)t=S(this,t,e,0),i=!V(t)||t!==this._$AH&&t!==f,i&&(this._$AH=t);else{let a=t,c,l;for(t=r[0],c=0;c<r.length-1;c++)l=S(this,a[o+c],e,c),l===f&&(l=this._$AH[c]),i||=!V(l)||l!==this._$AH[c],l===d?t=d:t!==d&&(t+=(l??"")+r[c+1]),this._$AH[c]=l}i&&!n&&this.j(t)}j(t){t===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},ot=class extends P{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===d?void 0:t}},nt=class extends P{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==d)}},rt=class extends P{constructor(t,e,o,n,r){super(t,e,o,n,r),this.type=5}_$AI(t,e=this){if((t=S(this,t,e,0)??d)===f)return;let o=this._$AH,n=t===d&&o!==d||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,r=t!==d&&(o===d||n);n&&this.element.removeEventListener(this.name,this,o),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},it=class{constructor(t,e,o){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(t){S(this,t)}},Xt={M:At,P:_,A:_t,C:1,L:Zt,R:st,D:Qt,V:S,I:L,H:P,N:nt,U:rt,B:ot,F:it},Ue=bt.litHtmlPolyfillSupport;Ue?.(B,L),(bt.litHtmlVersions??=[]).push("3.3.2");var at=(s,t,e)=>{let o=e?.renderBefore??t,n=o._$litPart$;if(n===void 0){let r=e?.renderBefore??null;o._$litPart$=n=new L(t.insertBefore(z(),r),r,void 0,e??{})}return n._$AI(s),n};var Ot=globalThis,E=class extends A{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=at(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return f}};E._$litElement$=!0,E.finalized=!0,Ot.litElementHydrateSupport?.({LitElement:E});var Re=Ot.litElementPolyfillSupport;Re?.({LitElement:E});(Ot.litElementVersions??=[]).push("4.2.2");var te=new Set,ee;var se=s=>typeof s=="string"?s:"el"in s?s.el.localName:"localName"in s?s.localName:s.declaredClass,xs=(s,t,e,o)=>{let n=se(t);if(o?.once){let i=`${s}${n}${e}`;if(te.has(i))return;te.add(i)}let r;if(o?.detail){r={};for(let[i,a]of Object.entries(o.detail))if((typeof a=="object"||typeof a=="function")&&a!==null){let c=new WeakRef(a);Object.defineProperty(r,i,{enumerable:!0,get(){return c.deref()}})}else r[i]=a;ee?.log.interceptors?.forEach(i=>i(s,n,e,r)),console[s](`[${n}]: ${e}`,r)}else ee?.log.interceptors?.forEach(i=>i(s,n,e)),console[s](`[${n}]: ${e}`)},oe=s=>{let t=`[${se(s)}] `;return e=>{let o=e instanceof Error&&e.message?e:new Error(String(e));o.message=`${t}${o.message}`,setTimeout(()=>{throw e})}},Ds=s=>`The property \`${s.toString()}\` is required but missing.`,Ls=s=>`The property \`${s.toString()}\` is empty but must have at least one element.`;var p=(s,t,...e)=>{try{return s?.call(t,...e)}catch(o){console.error(o,s)}},W=async(s,t,...e)=>{try{return await s?.call(t,...e)}catch(o){console.error(o,s)}};var q=Symbol.for("controller"),Ie=s=>typeof s=="object"&&s!==null&&(q in s||"hostConnected"in s||"hostDisconnected"in s||"hostUpdate"in s||"hostUpdated"in s),Is=s=>typeof s?.then=="function";var F,x=s=>{F!==s&&(F=s,queueMicrotask(()=>F===s?F=void 0:0))},G=s=>F,N=[],ne=s=>{if(s===void 0){N=[];return}let t=N.indexOf(s);N=t===-1?[...N,s]:N.slice(0,t+1),queueMicrotask(()=>N=[])},re=()=>N,U,Ms=s=>{U!==s&&(U=s,queueMicrotask(()=>U===s?U=void 0:0))},Me=()=>{let s=U;return U=void 0,s},ie=async(s,t)=>{let e=lt(s);if(e===void 0)return s;if(await e.ready,typeof t=="function"){let o=e.watchExports(n=>t(n,o))}return e.exports},ae=async s=>{let t=lt(s);return await t.ready,t},lt=s=>{let e=G().manager.X(s);if(e!==void 0)return e;if(Ie(s))return s;let o=Me();if(o!==void 0)return o},ct=!1,ks=s=>{ct=!0;try{return s()}finally{ct=!1}};var b=class{constructor(){this.promise=new Promise((t,e)=>{this.resolve=t,this.reject=e})}};var ce=(s,t)=>{let e=t>ke?je:t/He,o=0,n=setInterval(()=>{o+=e,o>=t&&(clearInterval(n),s())},e);return n},ke=4e3,je=2e3,He=4;var ze=(s,t,e)=>{let o=Object.keys(s),n=o.length;R===void 0&&queueMicrotask(I),R??=new Map;let r=R.get(s);return r===void 0&&(r={callbacks:[],keyCount:n},R.set(s,r)),r.keyCount!==n&&(r.callbacks.forEach(i=>i(o)),r.callbacks=[],r.keyCount=n),r.callbacks.push(i=>{let a=l=>p(t,null,l),c=i[n];c===void 0?a(void 0):s[c]===e?a(c):a(void 0)}),e},R,I=()=>{R?.forEach(({callbacks:s},t)=>{let e=Object.keys(t);s.forEach(o=>o(e))}),R=void 0},Ve=(s,t,e)=>{let o=s.manager;return o.V!==d&&o.V!==e&&o.S(void 0,void 0),o.T.length===0&&queueMicrotask(()=>o.S(void 0,void 0)),o.V=e,o.T.push((n,r)=>p(t,void 0,e===r?n:void 0)),e},Be=(s=[G(),...re()],t,e)=>{let o=Array.isArray(s)?s:[s],n=o.length+1,r=i=>{n-=1,i!==void 0&&(n=Math.min(n,0)),n===0&&t(i)};o.forEach(i=>ze(i,a=>r(a===void 0?void 0:{key:a,host:i,isReactive:!1}),e));for(let i of o)if("manager"in i&&i.manager.component===i){Ve(i,a=>r(a===void 0?void 0:{key:a,host:i,isReactive:!0}),e);break}return e},We=(s="",t={},e=G())=>{let o={emit:n=>{s===""&&I();let r=new CustomEvent(s,{detail:n,cancelable:!0,bubbles:!0,composed:!0,...t});return e.el.dispatchEvent(r),r}};return s===""&&Be(void 0,n=>s=n.key,o),o},Fe=We.bind(null,""),de;de=q;var Tt=class{constructor(t){this.#t=[],this.#e=[],this.#s=[],this.#n=[],this.#r=[],this.#c=[],this.#l=[],this.#d=[],this.#i=[],this.#p=!1,this.P=new b,this.connectedCalled=!1,this.loadedCalled=!1,this[de]=!0,this.#h=[];let e=this,o=t??G(new.target.name);e.#o=o,e.ready=e.P.promise,e.#a=he(e),e.component=o,e.#o.addController(e),e.#o.manager===void 0||(ne(e),queueMicrotask(()=>e.catchUpLifecycle()))}#t;#e;#s;#n;#r;#c;#l;#d;#i;#p;#o;catchUpLifecycle(){let{manager:t}=this.#o;t.connectedCalled&&!this.connectedCalled&&this.triggerConnected(),t.#p&&this.triggerLoad().then(()=>t.loadedCalled&&this.triggerLoaded()).catch(oe(this.#o))}#a;get exports(){return this.#a}set exports(t){let e=this.#a;e!==t&&(this.#a=t,this.#h.forEach(p),this.connectedCalled&&this.O!==!1&&this.#o.requestUpdate(this.O,e)),this.P.resolve(t)}setProvisionalExports(t,e=!0){this.#a=e?he(t):t,this.#h.forEach(p)}#h;watchExports(t){let e=()=>t(this.#a);return this.#h.push(e),()=>{this.#h.splice(this.#h.indexOf(e),1)}}get use(){return x(this.#o),ie}get useRef(){return x(this.#o),ae}get useRefSync(){return x(this.#o),lt}controllerRemoved(){this.#o.el.isConnected&&this.triggerDisconnected(),this.triggerDestroy()}onConnected(t){this.#t.push(t)}onDisconnected(t){this.#e.push(t)}onLoad(t){this.#s.push(t)}onLoaded(t){this.#n.push(t)}onUpdate(t){this.#r.push(t)}onUpdated(t){this.#c.push(t)}onDestroy(t){this.#l.push(t)}onLifecycle(t){this.#d.push(t),this.connectedCalled&&this.#o.el.isConnected&&this.#u(t)}triggerConnected(){let t=this;t.hostConnected&&p(t.hostConnected,t),t.#t.forEach(p),t.triggerLifecycle(),t.connectedCalled=!0}triggerDisconnected(){let t=this;t.hostDisconnected&&p(t.hostDisconnected,t),t.#e.forEach(p),t.#i.forEach(p),t.#i=[]}async triggerLoad(){if(this.#p)return;this.#p=!0;let t=this;t.hostLoad&&await W(t.hostLoad,t),this.#s.length>0&&await Promise.allSettled(this.#s.map(W)),this.P.resolve(this.#a)}triggerLoaded(){this.loadedCalled||(this.hostLoaded&&p(this.hostLoaded,this),this.#n.forEach(p),this.loadedCalled=!0)}triggerUpdate(t){this.hostUpdate&&p(this.hostUpdate,this,t),this.#r.forEach(le,t)}triggerUpdated(t){this.hostUpdated&&p(this.hostUpdated,this,t),this.#c.forEach(le,t)}triggerDestroy(){this.hostDestroy&&p(this.hostDestroy,this),this.#l.forEach(p)}triggerLifecycle(){this.hostLifecycle&&this.#u(()=>this.hostLifecycle()),this.#d.forEach(this.#u,this)}#u(t){x(this.#o);let e=p(t);(Array.isArray(e)?e:[e]).forEach(n=>{typeof n=="function"?this.#i.push(n):typeof n=="object"&&typeof n.remove=="function"&&this.#i.push(n.remove)})}};function le(s){p(s,void 0,this)}var he=s=>{if(typeof s!="object"&&typeof s!="function"||s===null)return s;let t={get(o,n,r){if(!((n==="exports"||n==="_exports")&&n in o&&o[n]===e)&&(n in o||n in Promise.prototype||typeof n=="symbol"))return typeof o=="function"?o[n]:Reflect.get(o,n,r)}},e=new Proxy(s,t);return e};var pe=Tt;var y={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},$=s=>(...t)=>({_$litDirective$:s,values:t}),g=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,o){this._$Ct=t,this._$AM=e,this._$Ci=o}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};var{I:qe}=Xt,ue=s=>s;var ht=s=>s.strings===void 0,fe=()=>document.createComment(""),Js=(s,t,e)=>{let o=s._$AA.parentNode,n=t===void 0?s._$AB:t._$AA;if(e===void 0){let r=o.insertBefore(fe(),n),i=o.insertBefore(fe(),n);e=new qe(r,i,s,s.options)}else{let r=e._$AB.nextSibling,i=e._$AM,a=i!==s;if(a){let c;e._$AQ?.(s),e._$AM=s,e._$AP!==void 0&&(c=s._$AU)!==i._$AU&&e._$AP(c)}if(r!==n||a){let c=e._$AA;for(;c!==r;){let l=ue(c).nextSibling;ue(o).insertBefore(c,n),c=l}}}return e},Ys=(s,t,e=s)=>(s._$AI(t,e),s),Ge={},me=(s,t=Ge)=>s._$AH=t,Zs=s=>s._$AH,Xs=s=>{s._$AR(),s._$AA.remove()};var Ke=$(class extends g{constructor(s){if(super(s),s.type!==y.PROPERTY&&s.type!==y.ATTRIBUTE&&s.type!==y.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!ht(s))throw Error("`live` bindings can only contain a single expression")}render(s){return s}update(s,[t]){if(t===f||t===d)return t;let e=s.element,o=s.name;if(s.type===y.PROPERTY){if(t===e[o])return f}else if(s.type===y.BOOLEAN_ATTRIBUTE){if(!!t===e.hasAttribute(o))return f}else if(s.type===y.ATTRIBUTE&&e.getAttribute(o)===t+"")return f;return me(s),t}});var K=(s,t)=>{let e=s._$AN;if(e===void 0)return!1;for(let o of e)o._$AO?.(t,!1),K(o,t);return!0},dt=s=>{let t,e;do{if((t=s._$AM)===void 0)break;e=t._$AN,e.delete(s),s=t}while(e?.size===0)},ye=s=>{for(let t;t=s._$AM;s=t){let e=t._$AN;if(e===void 0)t._$AN=e=new Set;else if(e.has(s))break;e.add(s),Ye(t)}};function Qe(s){this._$AN!==void 0?(dt(this),this._$AM=s,ye(this)):this._$AM=s}function Je(s,t=!1,e=0){let o=this._$AH,n=this._$AN;if(n!==void 0&&n.size!==0)if(t)if(Array.isArray(o))for(let r=e;r<o.length;r++)K(o[r],!1),dt(o[r]);else o!=null&&(K(o,!1),dt(o));else K(this,s)}var Ye=s=>{s.type==y.CHILD&&(s._$AP??=Je,s._$AQ??=Qe)},pt=class extends g{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,o){super._$AT(t,e,o),ye(this),this.isConnected=t._$AU}_$AO(t,e=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),e&&(K(this,t),dt(this))}setValue(t){if(ht(this._$Ct))this._$Ct._$AI(t,this);else{let e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}};var yo=()=>new Pt,Pt=class{},St=new WeakMap,Nt=$(class extends pt{render(s){return d}update(s,[t]){let e=t!==this.G;return e&&this.G!==void 0&&this.rt(void 0),(e||this.lt!==this.ct)&&(this.G=t,this.ht=s.options?.host,this.rt(this.ct=s.element)),d}rt(s){if(this.isConnected||(s=void 0),typeof this.G=="function"){let t=this.ht??globalThis,e=St.get(t);e===void 0&&(e=new WeakMap,St.set(t,e)),e.get(this.G)!==void 0&&this.G.call(this.ht,void 0),e.set(this.G,s),s!==void 0&&this.G.call(this.ht,s)}else this.G.value=s}get lt(){return typeof this.G=="function"?St.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var ut=s=>s.replace(Xe,(t,e)=>`${e===0?"":"-"}${t.toLowerCase()}`),Xe=/[A-Z]+(?![a-z])|[A-Z]/gu;var ts="randomUUID"in crypto,Po=()=>{if(ts)return crypto.randomUUID();let s=crypto.getRandomValues(new Uint16Array(8));s[3]=s[3]&4095|16384,s[4]=s[4]&16383|32768;let t=e=>s[e].toString(16).padStart(4,"0");return`${t(0)+t(1)}-${t(2)}-${t(3)}-${t(4)}-${t(5)}${t(6)}${t(7)}`};var Dt=s=>{let t=s;for(;t=t.parentNode??t.host;)if(t?.constructor?.lumina){let e=t;return e.manager?.loadedCalled||(e.J??e._offspring).push(s),(e.I??e._postLoad).promise}return!1},Lt={};function Ut(){}function Rt(s){for(let t of["Associated","Disabled","Reset","StateRestore"]){let e=`orm${t}Callback`;s.prototype["f"+e]=async function(...o){await this.componentOnReady(),(this.el??this).dispatchEvent(new CustomEvent(`luminaF${e}`,{detail:o}))}}}var es=(s,t)=>function(o,n){if(!globalThis.customElements)return;let i=(n??o??{}).resourcesUrl;i&&s.setAssetPath(i);for(let[a,[c,l="",u=0]]of Object.entries(t)){if(customElements.get(a))continue;let[h,m,v]=l.split(";"),C=h?h?.split(",").map(ss):void 0,gt=C?.map(([D])=>D),J=class extends xt{static{this.formAssociated=u===1}static{this.observedAttributes=C?.map(([,D])=>D).filter(D=>D!=="")}static{this.C=gt}static{this.E=m?m?.split(","):void 0}static{this.D=v?.split(",")}static{this.L=a}static{this.K=s}constructor(){!J.B&&(J.B=c(),J.F()),super()}};customElements.define(a,J)}},ft=Object.defineProperty,ss=s=>{let t=s.split(":");return t.length===1?[t[0],ut(t[0])]:t},os=globalThis.HTMLElement??Ut,xt=class extends os{constructor(){super(),this.#e={},this.#s=[],this.I=new b,this.H=new b,this.J=[];let t=this,e=t.constructor;t._offspring=t.J,t._postLoad=t.I,e.C?.forEach(o=>{Object.hasOwn(t,o)&&(t.#e[o]=t[o],delete t[o])}),e.A?t.#n({a:e.A}):e.B.then(async o=>{await e.K.p,t.#n(await(o.default?.then(n=>typeof n=="function"?{a:n}:n)??o))}).catch(o=>{t.H.reject(o),setTimeout(()=>{throw o})})}static{this.lumina=!0}static F(){for(let t of this.C??[])ft(this.prototype,t,{configurable:!0,enumerable:!0,get(){return this.#e[t]},set(e){this.#e[t]=e}});for(let t of this.E??[])ft(this.prototype,t,{async value(...e){return this.#t||await this.H.promise,await this.#t[t](...e)},configurable:!0});for(let t of this.D??[])ft(this.prototype,t,{value(...e){return this.#t[t](...e)},configurable:!0})}static{Rt(this)}#t;#e;#s;get manager(){return this.#t?.manager}attributeChangedCallback(t,e,o){this.#t?.attributeChangedCallback(t,e,o),this.#t||this.#s.push(t)}connectedCallback(){this.#t?this.#t.connectedCallback?.():queueMicrotask(()=>this.G=Dt(this))}disconnectedCallback(){this.#t?.disconnectedCallback?.()}async componentOnReady(){return await this.H.promise,this}#n(t){let e=this.constructor,o=e.L,n=this.#e,r=Object.values(t).find(h=>h.L===o),i=`${o}--lazy`,a=r;for(;a&&!Object.hasOwn(a,"lumina");)a=Object.getPrototypeOf(a);rs(a),!e.A&&(e.A=r,customElements.define(i,r)),r.N=this;let l=document.createElement(i);r.N=void 0,this.#t=l,this.#e=l,this.#s.forEach(h=>l.attributeChangedCallback(h,null,this.getAttribute(h))),Object.entries(n).forEach(ns,l);let u=this.isConnected;(u||this.G)&&(l.connectedCallback?.(),u||l.disconnectedCallback())}addController(){}requestUpdate(){this.#t?.requestUpdate()}};function ns([s,t]){this[s]=t}var rs=s=>{let t=s.prototype,e=Element.prototype;Object.hasOwn(t,"isConnected")||(t.setAttribute=function(n,r){e.setAttribute.call(this.el,n,r)},t.removeAttribute=function(n){e.removeAttribute.call(this.el,n)},t.hasAttribute=function(n){return e.hasAttribute.call(this.el,n)},ft(t,"isConnected",{get(){return Reflect.get(e,"isConnected",this.el)}}))};var mt=class extends pe{constructor(t){super(t),this.destroyed=!1,this.R=!1,this.V=d,this.T=[],this.#s=new WeakMap,this.#e=t,this.exports=void 0,this.hasDestroy=yt in t&&typeof t.destroy=="function",E.prototype.addController.call(t,{hostConnected:()=>{if(this.destroyed){let e=t.el.localName;throw t.el.remove(),new Error(`The ${e} component has already been destroyed. It cannot be used again. If you meant to disconnect and reconnect a component without automatic destroy, set the ${yt} prop.`)}this.#t!==void 0&&clearTimeout(this.#t),I();for(let e of t.M)"triggerConnected"in e?e.triggerConnected():p(e.hostConnected,e)},hostDisconnected:()=>{for(let e of t.M)"triggerDisconnected"in e?e.triggerDisconnected():p(e.hostDisconnected,e);this.hasDestroy&&!this.destroyed&&this.U()},hostUpdate:()=>{for(let e of t.M)"triggerUpdate"in e?e.triggerUpdate(this.Q):p(e.hostUpdate,e,this.Q)},hostUpdated:()=>{for(let e of t.M)"triggerUpdated"in e?e.triggerUpdated(this.Q):p(e.hostUpdated,e,this.Q);this.Q=void 0}}),queueMicrotask(()=>this.R=!0),x(t)}#t;#e;async destroy(){if(!this.destroyed){this.#e.el.isConnected&&(this.hasDestroy=!1,this.#e.el.remove()),this.#t=void 0,this.destroyed=!0;for(let t of this.#e.M)"triggerDestroy"in t?t.triggerDestroy():p(t.hostDestroy,t);this.#e.M.splice(0)}}U(){if(this.#t!==void 0&&clearTimeout(this.#t),!this.#e.el.isConnected&&!this.#e.autoDestroyDisabled){let t=()=>{this.#e.destroy()};this.#t=ce(t,is)}}S(t,e){let o=this.T;this.V=d,this.T=[],o.forEach(n=>n(t,e))}#s;W(t,e){(typeof e=="object"&&e!==null||typeof e=="function")&&this.#s.set(e,t)}X(t){if(typeof t=="object"&&t!==null||typeof t=="function")return this.#s.get(t)}},is=1e3,yt="autoDestroyDisabled";var ve=$(class extends g{constructor(s){if(super(s),s.type!==y.ATTRIBUTE||s.name!=="class"||s.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(s){return" "+Object.keys(s).filter(t=>s[t]).join(" ")+" "}update(s,[t]){if(this.st===void 0){this.st=new Set,s.strings!==void 0&&(this.nt=new Set(s.strings.join(" ").split(/\s/).filter(o=>o!=="")));for(let o in t)t[o]&&!this.nt?.has(o)&&this.st.add(o);return this.render(t)}let e=s.element.classList;for(let o of this.st)o in t||(e.remove(o),this.st.delete(o));for(let o in t){let n=!!t[o];n===this.st.has(o)||this.nt?.has(o)||(n?(e.add(o),this.st.add(o)):(e.remove(o),this.st.delete(o)))}return f}});var Ee="important",as=" !"+Ee,$e=$(class extends g{constructor(s){if(super(s),s.type!==y.ATTRIBUTE||s.name!=="style"||s.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(s){return Object.keys(s).reduce((t,e)=>{let o=s[e];return o==null?t:t+`${e=e.includes("-")?e:e.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${o};`},"")}update(s,[t]){let{style:e}=s.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(let o of this.ft)t[o]==null&&(this.ft.delete(o),o.includes("-")?e.removeProperty(o):e[o]=null);for(let o in t){let n=t[o];if(n!=null){this.ft.add(o);let r=typeof n=="string"&&n.endsWith(as);o.includes("-")||r?e.setProperty(o,r?n.slice(0,-11):n,r?Ee:""):e[o]=n}}return f}});var be=class s extends E{constructor(){super(),this.M=[],this.manager=new mt(this);let t=this,e=t.constructor,o=e.N,n=e.K.o,r=s.prototype.shouldUpdate;t.#n=o?.H??new b,t.I=o?.I??new b,t.J=o?.J??[],t._offspring=t.J,t._postLoad=t.I,t.el=o??t,t.#s=t.enableUpdating,t.enableUpdating=Ut,t.shouldUpdate!==r&&(t.#e=t.shouldUpdate,t.shouldUpdate=r),n&&(t.#t=new Map,e.elementProperties.forEach((i,a)=>t.#t.set(a,n()))),!1}static finalizeStyles(t){let e=super.finalizeStyles(t),o=this.shadowRootOptions===Lt;return this.K?.commonStyles===void 0||o?e:[this.K.commonStyles,...e]}static createProperty(t,e){let o=typeof e=="number"?e:Array.isArray(e)?e[0]:0,n=Array.isArray(e)?e[1]:void 0,r=n?.hasChanged??j,i={attribute:o&1&&typeof t=="string"?ut(t):!1,reflect:!!(o&2),type:o&4?Boolean:o&8?Number:void 0,state:!!(o&16),readOnly:!!(o&32),noAccessor:!!(o&64),useDefault:!!(o&128),c:!1,...n,hasChanged(a,c){let l=r(a,c);return i.c=l,l}};super.createProperty(t,i)}static getPropertyDescriptor(t,e,o){let n=this.K,r=super.getPropertyDescriptor(t,e,o);return o.d=r,{...r,get(){return n.t?.(this.#t.get(t)),r.get?.call(this)},set(i){let a=this.manager;if(o.readOnly&&!ct&&(a.R||a.connectedCalled))throw Error(`Cannot assign to read-only property "${t}" of ${this.el.localName}. Trying to assign "${i}"`);r.set.call(this,i??void 0),o.c&&this.#t?.get(t)?.notify(),a.T.length>0&&(I(),a?.S(t,i))}}}static{this.lumina=!0}static{Rt(this)}#t;#e;#s;#n;#r;#c;get elementInternals(){return this.#c??=this.el.attachInternals(),this.#c}connectedCallback(){this.hasAttribute("defer-hydration")||this.#l(!0)}#l(t){let e=this.constructor.K.c?.(()=>this.requestUpdate());this.#r=e;let o=!this.manager.connectedCalled;t&&super.connectedCallback(),o?queueMicrotask(()=>this.#i().catch(n=>{this.#n.reject(n),setTimeout(()=>{throw n})})):e&&this.requestUpdate()}#d(t){try{this.#r.clear(),this.constructor.K.r(this.#r,()=>super.update(t))}catch(e){throw this.#r.clear(),e}}disconnectedCallback(){super.disconnectedCallback(),this.#r?.destroy(),this.#r=void 0}createRenderRoot(){let t=this.el.shadowRoot,e=this.constructor,o=e.shadowRootOptions,r=t??(o===Lt?this.el:this.el.attachShadow(o));if(t)return this.manager.connectedCalled||this.#l(!1),E.prototype.createRenderRoot.call(this),t;if(this.isConnected){let i=r.getRootNode();i.adoptedStyleSheets=[...i.adoptedStyleSheets,...e.elementStyles.map(a=>"styleSheet"in a?a.styleSheet:a)]}return r}async#i(){let t=this.el.G??Dt(this.el);t&&await t;let e=[];for(let n of this.M)"triggerLoad"in n?e.push(n.triggerLoad()):e.push(W(n.hostLoad,n));await Promise.all(e),await this.load?.(),this.manager.hasDestroy&&this.manager.onUpdate(n=>n.has(yt)&&this.manager.U()),this.#s(!0),this.performUpdate(),this.I.resolve(),await 0;let o=this.J.filter(n=>!n.manager?.loadedCalled);o.length&&await Promise.allSettled(o.map(async n=>await n.componentOnReady())),this.J.length=0,this.el.setAttribute(this.constructor.K.hydratedAttribute,"");for(let n of this.M)"triggerLoaded"in n?n.triggerLoaded():p(n.hostLoaded,n);this.loaded?.(),this.#n.resolve()}shouldUpdate(t){return this.manager.Q=t,this.#e?.(t)??!0}update(t){this.#r?this.#d(t):super.update(t)}listen(t,e,o){let n=e?.bind(this)??e;this.manager.onLifecycle(()=>(this.el.addEventListener(t,n,o),()=>this.el.removeEventListener(t,n,o)))}listenOn(t,e,o,n){let r=o?.bind(this)??o;this.manager.onLifecycle(()=>(t.addEventListener(e,r,n),()=>t.removeEventListener(e,r,n)))}async componentOnReady(){return await this.#n.promise,this}addController(t){this.M.push(t),!(q in t)&&this.renderRoot&&this.el.isConnected&&t.hostConnected?.()}removeController(t){this.M.splice(this.M.indexOf(t),1),t.controllerRemoved?.()}};var _e=s=>{let t,e=n=>{t=new URL(n,globalThis.location?.href||void 0).href},o={...s,getAssetPath(n){let r=new URL(n,t);return r.origin!==globalThis.location?.origin?r.href:r.pathname},setAssetPath:e,customElement(n,r){r.K=o,r.L=n,customElements.get(n)||customElements.define(n,r)}};return e(s.defaultAssetPath),o};var Ln=s=>typeof s=="object"&&s!=null?ve(s):s,Un=s=>typeof s=="object"&&s!=null?$e(s):s;var It=class extends g{#t;#e;constructor(t){super(t);let e=this;this.#e=function(n){return e.#t.call(this,n)}}render(t){return typeof t=="function"?(this.#t=t,Nt(this.#e)):Nt(t)}},Rn=$(It);var In=d;var Mn=s=>{let t=document.createElement("div");return at(s,t),t.firstElementChild};var Q=_e({defaultAssetPath:"https://jsdev.arcgis.com/5.2.0-next/portal-components/",hydratedAttribute:"hydrated"}),{customElement:Vn,getAssetPath:Bn,setAssetPath:Wn}=Q;Q.t=void 0;Q.o=void 0;Q.c=void 0;Q.r=void 0;export{Is as a,x as b,G as c,ne as d,re as e,Ms as f,ks as g,Ce as h,j as i,ys as j,gs as k,f as l,d as m,at as n,b as o,xs as p,oe as q,Ds as r,Ls as s,Ve as t,Be as u,We as v,Fe as w,Tt as x,pe as y,Po as z,es as A,y as B,$ as C,g as D,Js as E,Ys as F,me as G,Zs as H,Xs as I,Ke as J,yo as K,Nt as L,be as M,Ln as N,Un as O,In as P,Mn as Q,Q as R,Vn as S,Bn as T};
4
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),qt=/'/g,Gt=/"/g,Jt=/^(?:script|style|textarea|title)$/i,wt=s=>(t,...e)=>({_$litType$:s,strings:t,values:e}),ys=wt(1),gs=wt(2),vs=wt(3),f=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),Kt=new WeakMap,O=T.createTreeWalker(T,129);function Yt(s,t){if(!Ct(s)||!s.hasOwnProperty("raw"))throw Error("invalid template strings array");return Bt!==void 0?Bt.createHTML(t):t}var Zt=(s,t)=>{let e=s.length-1,o=[],n,r=t===2?"<svg>":t===3?"<math>":"",i=H;for(let a=0;a<e;a++){let c=s[a],l,u,h=-1,m=0;for(;m<c.length&&(i.lastIndex=m,u=i.exec(c),u!==null);)m=i.lastIndex,i===H?u[1]==="!--"?i=Wt:u[1]!==void 0?i=Ft:u[2]!==void 0?(Jt.test(u[2])&&(n=RegExp("</"+u[2],"g")),i=w):u[3]!==void 0&&(i=w):i===w?u[0]===">"?(i=n??H,h=-1):u[1]===void 0?h=-2:(h=i.lastIndex-u[2].length,l=u[1],i=u[3]===void 0?w:u[3]==='"'?Gt:qt):i===Gt||i===qt?i=w:i===Wt||i===Ft?i=H:(i=w,n=void 0);let v=i===w&&s[a+1].startsWith("/>")?" ":"";r+=i===H?c+Le:h>=0?(o.push(l),c.slice(0,h)+At+c.slice(h)+_+v):c+_+(h===-2?a:v)}return[Yt(s,r+(s[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),o]},B=class s{constructor({strings:t,_$litType$:e},o){let n;this.parts=[];let r=0,i=0,a=t.length-1,c=this.parts,[l,u]=Zt(t,e);if(this.el=s.createElement(l,o),O.currentNode=this.el.content,e===2||e===3){let h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(n=O.nextNode())!==null&&c.length<a;){if(n.nodeType===1){if(n.hasAttributes())for(let h of n.getAttributeNames())if(h.endsWith(At)){let m=u[i++],v=n.getAttribute(h).split(_),C=/([.?@])?(.*)/.exec(m);c.push({type:1,index:r,name:C[2],strings:v,ctor:C[1]==="."?ot:C[1]==="?"?nt:C[1]==="@"?rt:P}),n.removeAttribute(h)}else h.startsWith(_)&&(c.push({type:6,index:r}),n.removeAttribute(h));if(Jt.test(n.tagName)){let h=n.textContent.split(_),m=h.length-1;if(m>0){n.textContent=et?et.emptyScript:"";for(let v=0;v<m;v++)n.append(h[v],V()),O.nextNode(),c.push({type:2,index:++r});n.append(h[m],V())}}}else if(n.nodeType===8)if(n.data===_t)c.push({type:2,index:r});else{let h=-1;for(;(h=n.data.indexOf(_,h+1))!==-1;)c.push({type:7,index:r}),h+=_.length-1}r++}}static createElement(t,e){let o=T.createElement("template");return o.innerHTML=t,o}};function S(s,t,e=s,o){if(t===f)return t;let n=o!==void 0?e._$Co?.[o]:e._$Cl,r=z(t)?void 0:t._$litDirective$;return n?.constructor!==r&&(n?._$AO?.(!1),r===void 0?n=void 0:(n=new r(s),n._$AT(s,e,o)),o!==void 0?(e._$Co??=[])[o]=n:e._$Cl=n),n!==void 0&&(t=S(s,n._$AS(s,t.values),n,o)),t}var st=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:o}=this._$AD,n=(t?.creationScope??T).importNode(e,!0);O.currentNode=n;let r=O.nextNode(),i=0,a=0,c=o[0];for(;c!==void 0;){if(i===c.index){let l;c.type===2?l=new L(r,r.nextSibling,this,t):c.type===1?l=new c.ctor(r,c.name,c.strings,this,t):c.type===6&&(l=new it(r,this,t)),this._$AV.push(l),c=o[++a]}i!==c?.index&&(r=O.nextNode(),i++)}return O.currentNode=T,n}p(t){let e=0;for(let o of this._$AV)o!==void 0&&(o.strings!==void 0?(o._$AI(t,o,e),e+=o.strings.length-2):o._$AI(t[e])),e++}},L=class s{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,o,n){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=o,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=S(this,t,e),z(t)?t===d||t==null||t===""?(this._$AH!==d&&this._$AR(),this._$AH=d):t!==this._$AH&&t!==f&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Qt(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==d&&z(this._$AH)?this._$AA.nextSibling.data=t:this.T(T.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:o}=t,n=typeof o=="number"?this._$AC(t):(o.el===void 0&&(o.el=B.createElement(Yt(o.h,o.h[0]),this.options)),o);if(this._$AH?._$AD===n)this._$AH.p(e);else{let r=new st(n,this),i=r.u(this.options);r.p(e),this.T(i),this._$AH=r}}_$AC(t){let e=Kt.get(t.strings);return e===void 0&&Kt.set(t.strings,e=new B(t)),e}k(t){Ct(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,o,n=0;for(let r of t)n===e.length?e.push(o=new s(this.O(V()),this.O(V()),this,this.options)):o=e[n],o._$AI(r),n++;n<e.length&&(this._$AR(o&&o._$AB.nextSibling,n),e.length=n)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){let o=zt(t).nextSibling;zt(t).remove(),t=o}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},P=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,o,n,r){this.type=1,this._$AH=d,this._$AN=void 0,this.element=t,this.name=e,this._$AM=n,this.options=r,o.length>2||o[0]!==""||o[1]!==""?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=d}_$AI(t,e=this,o,n){let r=this.strings,i=!1;if(r===void 0)t=S(this,t,e,0),i=!z(t)||t!==this._$AH&&t!==f,i&&(this._$AH=t);else{let a=t,c,l;for(t=r[0],c=0;c<r.length-1;c++)l=S(this,a[o+c],e,c),l===f&&(l=this._$AH[c]),i||=!z(l)||l!==this._$AH[c],l===d?t=d:t!==d&&(t+=(l??"")+r[c+1]),this._$AH[c]=l}i&&!n&&this.j(t)}j(t){t===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},ot=class extends P{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===d?void 0:t}},nt=class extends P{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==d)}},rt=class extends P{constructor(t,e,o,n,r){super(t,e,o,n,r),this.type=5}_$AI(t,e=this){if((t=S(this,t,e,0)??d)===f)return;let o=this._$AH,n=t===d&&o!==d||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,r=t!==d&&(o===d||n);n&&this.element.removeEventListener(this.name,this,o),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},it=class{constructor(t,e,o){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(t){S(this,t)}},Xt={M:At,P:_,A:_t,C:1,L:Zt,R:st,D:Qt,V:S,I:L,H:P,N:nt,U:rt,B:ot,F:it},Ue=bt.litHtmlPolyfillSupport;Ue?.(B,L),(bt.litHtmlVersions??=[]).push("3.3.2");var at=(s,t,e)=>{let o=e?.renderBefore??t,n=o._$litPart$;if(n===void 0){let r=e?.renderBefore??null;o._$litPart$=n=new L(t.insertBefore(V(),r),r,void 0,e??{})}return n._$AI(s),n};var Ot=globalThis,E=class extends A{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=at(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return f}};E._$litElement$=!0,E.finalized=!0,Ot.litElementHydrateSupport?.({LitElement:E});var Re=Ot.litElementPolyfillSupport;Re?.({LitElement:E});(Ot.litElementVersions??=[]).push("4.2.2");var te=new Set,ee;var se=s=>typeof s=="string"?s:"el"in s?s.el.localName:"localName"in s?s.localName:s.declaredClass,Ds=(s,t,e,o)=>{let n=se(t);if(o?.once){let i=`${s}${n}${e}`;if(te.has(i))return;te.add(i)}let r;if(o?.detail){r={};for(let[i,a]of Object.entries(o.detail))if((typeof a=="object"||typeof a=="function")&&a!==null){let c=new WeakRef(a);Object.defineProperty(r,i,{enumerable:!0,get(){return c.deref()}})}else r[i]=a;ee?.log.interceptors?.forEach(i=>i(s,n,e,r)),console[s](`[${n}]: ${e}`,r)}else ee?.log.interceptors?.forEach(i=>i(s,n,e)),console[s](`[${n}]: ${e}`)},oe=s=>{let t=`[${se(s)}] `;return e=>{let o=e instanceof Error&&e.message?e:new Error(String(e));o.message=`${t}${o.message}`,setTimeout(()=>{throw e})}},xs=s=>`The property \`${s.toString()}\` is required but missing.`,Ls=s=>`The property \`${s.toString()}\` is empty but must have at least one element.`;var p=(s,t,...e)=>{try{return s?.call(t,...e)}catch(o){console.error(o,s)}},W=async(s,t,...e)=>{try{return await s?.call(t,...e)}catch(o){console.error(o,s)}};var q=Symbol.for("controller"),Ie=s=>typeof s=="object"&&s!==null&&(q in s||"hostConnected"in s||"hostDisconnected"in s||"hostUpdate"in s||"hostUpdated"in s),Is=s=>typeof s?.then=="function";var F,D=s=>{F!==s&&(F=s,queueMicrotask(()=>F===s?F=void 0:0))},G=s=>F,N=[],ne=s=>{if(s===void 0){N=[];return}let t=N.indexOf(s);N=t===-1?[...N,s]:N.slice(0,t+1),queueMicrotask(()=>N=[])},re=()=>N,U,Ms=s=>{U!==s&&(U=s,queueMicrotask(()=>U===s?U=void 0:0))},Me=()=>{let s=U;return U=void 0,s},ie=async(s,t)=>{let e=lt(s);if(e===void 0)return s;if(await e.ready,typeof t=="function"){let o=e.watchExports(n=>t(n,o))}return e.exports},ae=async s=>{let t=lt(s);return await t.ready,t},lt=s=>{let e=G().manager.X(s);if(e!==void 0)return e;if(Ie(s))return s;let o=Me();if(o!==void 0)return o},ct=!1,ks=s=>{ct=!0;try{return s()}finally{ct=!1}};var b=class{constructor(){this.promise=new Promise((t,e)=>{this.resolve=t,this.reject=e})}};var ce=(s,t)=>{let e=t>ke?je:t/He,o=0,n=setInterval(()=>{o+=e,o>=t&&(clearInterval(n),s())},e);return n},ke=4e3,je=2e3,He=4;var Ve=(s,t,e)=>{let o=Object.keys(s),n=o.length;R===void 0&&queueMicrotask(I),R??=new Map;let r=R.get(s);return r===void 0&&(r={callbacks:[],keyCount:n},R.set(s,r)),r.keyCount!==n&&(r.callbacks.forEach(i=>i(o)),r.callbacks=[],r.keyCount=n),r.callbacks.push(i=>{let a=l=>p(t,null,l),c=i[n];c===void 0?a(void 0):s[c]===e?a(c):a(void 0)}),e},R,I=()=>{R?.forEach(({callbacks:s},t)=>{let e=Object.keys(t);s.forEach(o=>o(e))}),R=void 0},ze=(s,t,e)=>{let o=s.manager;return o.V!==d&&o.V!==e&&o.S(void 0,void 0),o.T.length===0&&queueMicrotask(()=>o.S(void 0,void 0)),o.V=e,o.T.push((n,r)=>p(t,void 0,e===r?n:void 0)),e},Be=(s=[G(),...re()],t,e)=>{let o=Array.isArray(s)?s:[s],n=o.length+1,r=i=>{n-=1,i!==void 0&&(n=Math.min(n,0)),n===0&&t(i)};o.forEach(i=>Ve(i,a=>r(a===void 0?void 0:{key:a,host:i,isReactive:!1}),e));for(let i of o)if("manager"in i&&i.manager.component===i){ze(i,a=>r(a===void 0?void 0:{key:a,host:i,isReactive:!0}),e);break}return e},We=(s="",t={},e=G())=>{let o={emit:n=>{s===""&&I();let r=new CustomEvent(s,{detail:n,cancelable:!0,bubbles:!0,composed:!0,...t});return e.el.dispatchEvent(r),r}};return s===""&&Be(void 0,n=>s=n.key,o),o},Fe=We.bind(null,""),de;de=q;var Tt=class{constructor(t){this.#t=[],this.#e=[],this.#s=[],this.#n=[],this.#r=[],this.#c=[],this.#l=[],this.#d=[],this.#i=[],this.#p=!1,this.P=new b,this.connectedCalled=!1,this.loadedCalled=!1,this[de]=!0,this.#h=[];let e=this,o=t??G(new.target.name);e.#o=o,e.ready=e.P.promise,e.#a=he(e),e.component=o,e.#o.addController(e),e.#o.manager===void 0||(ne(e),queueMicrotask(()=>e.catchUpLifecycle()))}#t;#e;#s;#n;#r;#c;#l;#d;#i;#p;#o;catchUpLifecycle(){let{manager:t}=this.#o;t.connectedCalled&&!this.connectedCalled&&this.triggerConnected(),t.#p&&this.triggerLoad().then(()=>t.loadedCalled&&this.triggerLoaded()).catch(oe(this.#o))}#a;get exports(){return this.#a}set exports(t){let e=this.#a;e!==t&&(this.#a=t,this.#h.forEach(p),this.connectedCalled&&this.O!==!1&&this.#o.requestUpdate(this.O,e)),this.P.resolve(t)}setProvisionalExports(t,e=!0){this.#a=e?he(t):t,this.#h.forEach(p)}#h;watchExports(t){let e=()=>t(this.#a);return this.#h.push(e),()=>{this.#h.splice(this.#h.indexOf(e),1)}}get use(){return D(this.#o),ie}get useRef(){return D(this.#o),ae}get useRefSync(){return D(this.#o),lt}controllerRemoved(){this.#o.el.isConnected&&this.triggerDisconnected(),this.triggerDestroy()}onConnected(t){this.#t.push(t)}onDisconnected(t){this.#e.push(t)}onLoad(t){this.#s.push(t)}onLoaded(t){this.#n.push(t)}onUpdate(t){this.#r.push(t)}onUpdated(t){this.#c.push(t)}onDestroy(t){this.#l.push(t)}onLifecycle(t){this.#d.push(t),this.connectedCalled&&this.#o.el.isConnected&&this.#u(t)}triggerConnected(){let t=this;t.hostConnected&&p(t.hostConnected,t),t.#t.forEach(p),t.triggerLifecycle(),t.connectedCalled=!0}triggerDisconnected(){let t=this;t.hostDisconnected&&p(t.hostDisconnected,t),t.#e.forEach(p),t.#i.forEach(p),t.#i=[]}async triggerLoad(){if(this.#p)return;this.#p=!0;let t=this;t.hostLoad&&await W(t.hostLoad,t),this.#s.length>0&&await Promise.allSettled(this.#s.map(W)),this.P.resolve(this.#a)}triggerLoaded(){this.loadedCalled||(this.hostLoaded&&p(this.hostLoaded,this),this.#n.forEach(p),this.loadedCalled=!0)}triggerUpdate(t){this.hostUpdate&&p(this.hostUpdate,this,t),this.#r.forEach(le,t)}triggerUpdated(t){this.hostUpdated&&p(this.hostUpdated,this,t),this.#c.forEach(le,t)}triggerDestroy(){this.hostDestroy&&p(this.hostDestroy,this),this.#l.forEach(p)}triggerLifecycle(){this.hostLifecycle&&this.#u(()=>this.hostLifecycle()),this.#d.forEach(this.#u,this)}#u(t){D(this.#o);let e=p(t);(Array.isArray(e)?e:[e]).forEach(n=>{typeof n=="function"?this.#i.push(n):typeof n=="object"&&typeof n.remove=="function"&&this.#i.push(n.remove)})}};function le(s){p(s,void 0,this)}var he=s=>{if(typeof s!="object"&&typeof s!="function"||s===null)return s;let t={get(o,n,r){if(!((n==="exports"||n==="_exports")&&n in o&&o[n]===e)&&(n in o||n in Promise.prototype||typeof n=="symbol"))return typeof o=="function"?o[n]:Reflect.get(o,n,r)}},e=new Proxy(s,t);return e};var pe=Tt;var y={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},$=s=>(...t)=>({_$litDirective$:s,values:t}),g=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,o){this._$Ct=t,this._$AM=e,this._$Ci=o}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};var{I:qe}=Xt,ue=s=>s;var ht=s=>s.strings===void 0,fe=()=>document.createComment(""),Js=(s,t,e)=>{let o=s._$AA.parentNode,n=t===void 0?s._$AB:t._$AA;if(e===void 0){let r=o.insertBefore(fe(),n),i=o.insertBefore(fe(),n);e=new qe(r,i,s,s.options)}else{let r=e._$AB.nextSibling,i=e._$AM,a=i!==s;if(a){let c;e._$AQ?.(s),e._$AM=s,e._$AP!==void 0&&(c=s._$AU)!==i._$AU&&e._$AP(c)}if(r!==n||a){let c=e._$AA;for(;c!==r;){let l=ue(c).nextSibling;ue(o).insertBefore(c,n),c=l}}}return e},Ys=(s,t,e=s)=>(s._$AI(t,e),s),Ge={},me=(s,t=Ge)=>s._$AH=t,Zs=s=>s._$AH,Xs=s=>{s._$AR(),s._$AA.remove()};var Ke=$(class extends g{constructor(s){if(super(s),s.type!==y.PROPERTY&&s.type!==y.ATTRIBUTE&&s.type!==y.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!ht(s))throw Error("`live` bindings can only contain a single expression")}render(s){return s}update(s,[t]){if(t===f||t===d)return t;let e=s.element,o=s.name;if(s.type===y.PROPERTY){if(t===e[o])return f}else if(s.type===y.BOOLEAN_ATTRIBUTE){if(!!t===e.hasAttribute(o))return f}else if(s.type===y.ATTRIBUTE&&e.getAttribute(o)===t+"")return f;return me(s),t}});var K=(s,t)=>{let e=s._$AN;if(e===void 0)return!1;for(let o of e)o._$AO?.(t,!1),K(o,t);return!0},dt=s=>{let t,e;do{if((t=s._$AM)===void 0)break;e=t._$AN,e.delete(s),s=t}while(e?.size===0)},ye=s=>{for(let t;t=s._$AM;s=t){let e=t._$AN;if(e===void 0)t._$AN=e=new Set;else if(e.has(s))break;e.add(s),Ye(t)}};function Qe(s){this._$AN!==void 0?(dt(this),this._$AM=s,ye(this)):this._$AM=s}function Je(s,t=!1,e=0){let o=this._$AH,n=this._$AN;if(n!==void 0&&n.size!==0)if(t)if(Array.isArray(o))for(let r=e;r<o.length;r++)K(o[r],!1),dt(o[r]);else o!=null&&(K(o,!1),dt(o));else K(this,s)}var Ye=s=>{s.type==y.CHILD&&(s._$AP??=Je,s._$AQ??=Qe)},pt=class extends g{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,o){super._$AT(t,e,o),ye(this),this.isConnected=t._$AU}_$AO(t,e=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),e&&(K(this,t),dt(this))}setValue(t){if(ht(this._$Ct))this._$Ct._$AI(t,this);else{let e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}};var yo=()=>new Pt,Pt=class{},St=new WeakMap,Nt=$(class extends pt{render(s){return d}update(s,[t]){let e=t!==this.G;return e&&this.G!==void 0&&this.rt(void 0),(e||this.lt!==this.ct)&&(this.G=t,this.ht=s.options?.host,this.rt(this.ct=s.element)),d}rt(s){if(this.isConnected||(s=void 0),typeof this.G=="function"){let t=this.ht??globalThis,e=St.get(t);e===void 0&&(e=new WeakMap,St.set(t,e)),e.get(this.G)!==void 0&&this.G.call(this.ht,void 0),e.set(this.G,s),s!==void 0&&this.G.call(this.ht,s)}else this.G.value=s}get lt(){return typeof this.G=="function"?St.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var ut=s=>s.replace(Xe,(t,e)=>`${e===0?"":"-"}${t.toLowerCase()}`),Xe=/[A-Z]+(?![a-z])|[A-Z]/gu;var ts="randomUUID"in crypto,Po=()=>{if(ts)return crypto.randomUUID();let s=crypto.getRandomValues(new Uint16Array(8));s[3]=s[3]&4095|16384,s[4]=s[4]&16383|32768;let t=e=>s[e].toString(16).padStart(4,"0");return`${t(0)+t(1)}-${t(2)}-${t(3)}-${t(4)}-${t(5)}${t(6)}${t(7)}`};var xt=s=>{let t=s;for(;t=t.parentNode??t.host;)if(t?.constructor?.lumina){let e=t;return e.manager?.loadedCalled||(e.J??e._offspring).push(s),(e.I??e._postLoad).promise}return!1},Lt={};function Ut(){}function Rt(s){for(let t of["Associated","Disabled","Reset","StateRestore"]){let e=`orm${t}Callback`;s.prototype["f"+e]=async function(...o){await this.componentOnReady(),(this.el??this).dispatchEvent(new CustomEvent(`luminaF${e}`,{detail:o}))}}}var es=(s,t)=>function(o,n){if(!globalThis.customElements)return;let i=(n??o??{}).resourcesUrl;i&&s.setAssetPath(i);for(let[a,[c,l="",u=0]]of Object.entries(t)){if(customElements.get(a))continue;let[h,m,v]=l.split(";"),C=h?h?.split(",").map(ss):void 0,gt=C?.map(([x])=>x),J=class extends Dt{static{this.formAssociated=u===1}static{this.observedAttributes=C?.map(([,x])=>x).filter(x=>x!=="")}static{this.C=gt}static{this.E=m?m?.split(","):void 0}static{this.D=v?.split(",")}static{this.L=a}static{this.K=s}constructor(){!J.B&&(J.B=c(),J.F()),super()}};customElements.define(a,J)}},ft=Object.defineProperty,ss=s=>{let t=s.split(":");return t.length===1?[t[0],ut(t[0])]:t},os=globalThis.HTMLElement??Ut,Dt=class extends os{constructor(){super(),this.#e={},this.#s=[],this.I=new b,this.H=new b,this.J=[];let t=this,e=t.constructor;t._offspring=t.J,t._postLoad=t.I,e.C?.forEach(o=>{Object.hasOwn(t,o)&&(t.#e[o]=t[o],delete t[o])}),e.A?t.#n({a:e.A}):e.B.then(async o=>{await e.K.p,t.#n(await(o.default?.then(n=>typeof n=="function"?{a:n}:n)??o))}).catch(o=>{t.H.reject(o),setTimeout(()=>{throw o})})}static{this.lumina=!0}static F(){for(let t of this.C??[])ft(this.prototype,t,{configurable:!0,enumerable:!0,get(){return this.#e[t]},set(e){this.#e[t]=e}});for(let t of this.E??[])ft(this.prototype,t,{async value(...e){return this.#t||await this.H.promise,await this.#t[t](...e)},configurable:!0});for(let t of this.D??[])ft(this.prototype,t,{value(...e){return this.#t[t](...e)},configurable:!0})}static{Rt(this)}#t;#e;#s;get manager(){return this.#t?.manager}attributeChangedCallback(t,e,o){this.#t?.attributeChangedCallback(t,e,o),this.#t||this.#s.push(t)}connectedCallback(){this.#t?this.#t.connectedCallback?.():queueMicrotask(()=>this.G=xt(this))}disconnectedCallback(){this.#t?.disconnectedCallback?.()}async componentOnReady(){return await this.H.promise,this}#n(t){let e=this.constructor,o=e.L,n=this.#e,r=Object.values(t).find(h=>h.L===o),i=`${o}--lazy`,a=r;for(;a&&!Object.hasOwn(a,"lumina");)a=Object.getPrototypeOf(a);rs(a),!e.A&&(e.A=r,customElements.define(i,r)),r.N=this;let l=document.createElement(i);r.N=void 0,this.#t=l,this.#e=l,this.#s.forEach(h=>l.attributeChangedCallback(h,null,this.getAttribute(h))),Object.entries(n).forEach(ns,l);let u=this.isConnected;(u||this.G)&&(l.connectedCallback?.(),u||l.disconnectedCallback())}addController(){}requestUpdate(){this.#t?.requestUpdate()}};function ns([s,t]){this[s]=t}var rs=s=>{let t=s.prototype,e=Element.prototype;Object.hasOwn(t,"isConnected")||(t.setAttribute=function(n,r){e.setAttribute.call(this.el,n,r)},t.removeAttribute=function(n){e.removeAttribute.call(this.el,n)},t.hasAttribute=function(n){return e.hasAttribute.call(this.el,n)},ft(t,"isConnected",{get(){return Reflect.get(e,"isConnected",this.el)}}))};var mt=class extends pe{constructor(t){super(t),this.destroyed=!1,this.R=!1,this.V=d,this.T=[],this.#s=new WeakMap,this.#e=t,this.exports=void 0,this.hasDestroy=yt in t&&typeof t.destroy=="function",E.prototype.addController.call(t,{hostConnected:()=>{if(this.destroyed){let e=t.el.localName;throw t.el.remove(),new Error(`The ${e} component has already been destroyed. It cannot be used again. If you meant to disconnect and reconnect a component without automatic destroy, set the ${yt} prop.`)}this.#t!==void 0&&clearTimeout(this.#t),I();for(let e of t.M)"triggerConnected"in e?e.triggerConnected():p(e.hostConnected,e)},hostDisconnected:()=>{for(let e of t.M)"triggerDisconnected"in e?e.triggerDisconnected():p(e.hostDisconnected,e);this.hasDestroy&&!this.destroyed&&this.U()},hostUpdate:()=>{for(let e of t.M)"triggerUpdate"in e?e.triggerUpdate(this.Q):p(e.hostUpdate,e,this.Q)},hostUpdated:()=>{for(let e of t.M)"triggerUpdated"in e?e.triggerUpdated(this.Q):p(e.hostUpdated,e,this.Q);this.Q=void 0}}),queueMicrotask(()=>this.R=!0),D(t)}#t;#e;async destroy(){if(!this.destroyed){this.#e.el.isConnected&&(this.hasDestroy=!1,this.#e.el.remove()),this.#t=void 0,this.destroyed=!0;for(let t of this.#e.M)"triggerDestroy"in t?t.triggerDestroy():p(t.hostDestroy,t);this.#e.M.splice(0)}}U(){if(this.#t!==void 0&&clearTimeout(this.#t),!this.#e.el.isConnected&&!this.#e.autoDestroyDisabled){let t=()=>{this.#e.destroy()};this.#t=ce(t,is)}}S(t,e){let o=this.T;this.V=d,this.T=[],o.forEach(n=>n(t,e))}#s;W(t,e){(typeof e=="object"&&e!==null||typeof e=="function")&&this.#s.set(e,t)}X(t){if(typeof t=="object"&&t!==null||typeof t=="function")return this.#s.get(t)}},is=1e3,yt="autoDestroyDisabled";var ve=$(class extends g{constructor(s){if(super(s),s.type!==y.ATTRIBUTE||s.name!=="class"||s.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(s){return" "+Object.keys(s).filter(t=>s[t]).join(" ")+" "}update(s,[t]){if(this.st===void 0){this.st=new Set,s.strings!==void 0&&(this.nt=new Set(s.strings.join(" ").split(/\s/).filter(o=>o!=="")));for(let o in t)t[o]&&!this.nt?.has(o)&&this.st.add(o);return this.render(t)}let e=s.element.classList;for(let o of this.st)o in t||(e.remove(o),this.st.delete(o));for(let o in t){let n=!!t[o];n===this.st.has(o)||this.nt?.has(o)||(n?(e.add(o),this.st.add(o)):(e.remove(o),this.st.delete(o)))}return f}});var Ee="important",as=" !"+Ee,$e=$(class extends g{constructor(s){if(super(s),s.type!==y.ATTRIBUTE||s.name!=="style"||s.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(s){return Object.keys(s).reduce((t,e)=>{let o=s[e];return o==null?t:t+`${e=e.includes("-")?e:e.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${o};`},"")}update(s,[t]){let{style:e}=s.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(let o of this.ft)t[o]==null&&(this.ft.delete(o),o.includes("-")?e.removeProperty(o):e[o]=null);for(let o in t){let n=t[o];if(n!=null){this.ft.add(o);let r=typeof n=="string"&&n.endsWith(as);o.includes("-")||r?e.setProperty(o,r?n.slice(0,-11):n,r?Ee:""):e[o]=n}}return f}});var be=class s extends E{constructor(){super(),this.M=[],this.manager=new mt(this);let t=this,e=t.constructor,o=e.N,n=e.K.o,r=s.prototype.shouldUpdate;t.#n=o?.H??new b,t.I=o?.I??new b,t.J=o?.J??[],t._offspring=t.J,t._postLoad=t.I,t.el=o??t,t.#s=t.enableUpdating,t.enableUpdating=Ut,t.shouldUpdate!==r&&(t.#e=t.shouldUpdate,t.shouldUpdate=r),n&&(t.#t=new Map,e.elementProperties.forEach((i,a)=>t.#t.set(a,n()))),!1}static finalizeStyles(t){let e=super.finalizeStyles(t),o=this.shadowRootOptions===Lt;return this.K?.commonStyles===void 0||o?e:[this.K.commonStyles,...e]}static createProperty(t,e){let o=typeof e=="number"?e:Array.isArray(e)?e[0]:0,n=Array.isArray(e)?e[1]:void 0,r=n?.hasChanged??j,i={attribute:o&1&&typeof t=="string"?ut(t):!1,reflect:!!(o&2),type:o&4?Boolean:o&8?Number:void 0,state:!!(o&16),readOnly:!!(o&32),noAccessor:!!(o&64),useDefault:!!(o&128),c:!1,...n,hasChanged(a,c){let l=r(a,c);return i.c=l,l}};super.createProperty(t,i)}static getPropertyDescriptor(t,e,o){let n=this.K,r=super.getPropertyDescriptor(t,e,o);return o.d=r,{...r,get(){return n.t?.(this.#t.get(t)),r.get?.call(this)},set(i){let a=this.manager;if(o.readOnly&&!ct&&(a.R||a.connectedCalled))throw Error(`Cannot assign to read-only property "${t}" of ${this.el.localName}. Trying to assign "${i}"`);r.set.call(this,i??void 0),o.c&&this.#t?.get(t)?.notify(),a.T.length>0&&(I(),a?.S(t,i))}}}static{this.lumina=!0}static{Rt(this)}#t;#e;#s;#n;#r;#c;get elementInternals(){return this.#c??=this.el.attachInternals(),this.#c}connectedCallback(){this.hasAttribute("defer-hydration")||this.#l(!0)}#l(t){let e=this.constructor.K.c?.(()=>this.requestUpdate());this.#r=e;let o=!this.manager.connectedCalled;t&&super.connectedCallback(),o?queueMicrotask(()=>this.#i().catch(n=>{this.#n.reject(n),setTimeout(()=>{throw n})})):e&&this.requestUpdate()}#d(t){try{this.#r.clear(),this.constructor.K.r(this.#r,()=>super.update(t))}catch(e){throw this.#r.clear(),e}}disconnectedCallback(){super.disconnectedCallback(),this.#r?.destroy(),this.#r=void 0}createRenderRoot(){let t=this.el.shadowRoot,e=this.constructor,o=e.shadowRootOptions,r=t??(o===Lt?this.el:this.el.attachShadow(o));if(t)return this.manager.connectedCalled||this.#l(!1),E.prototype.createRenderRoot.call(this),t;if(this.isConnected){let i=r.getRootNode();i.adoptedStyleSheets=[...i.adoptedStyleSheets,...e.elementStyles.map(a=>"styleSheet"in a?a.styleSheet:a)]}return r}async#i(){let t=this.el.G??xt(this.el);t&&await t;let e=[];for(let n of this.M)"triggerLoad"in n?e.push(n.triggerLoad()):e.push(W(n.hostLoad,n));await Promise.all(e),await this.load?.(),this.manager.hasDestroy&&this.manager.onUpdate(n=>n.has(yt)&&this.manager.U()),this.#s(!0),this.performUpdate(),this.I.resolve(),await 0;let o=this.J.filter(n=>!n.manager?.loadedCalled);o.length&&await Promise.allSettled(o.map(async n=>await n.componentOnReady())),this.J.length=0,this.el.setAttribute(this.constructor.K.hydratedAttribute,"");for(let n of this.M)"triggerLoaded"in n?n.triggerLoaded():p(n.hostLoaded,n);this.loaded?.(),this.#n.resolve()}shouldUpdate(t){return this.manager.Q=t,this.#e?.(t)??!0}update(t){this.#r?this.#d(t):super.update(t)}listen(t,e,o){let n=e?.bind(this)??e;this.manager.onLifecycle(()=>(this.el.addEventListener(t,n,o),()=>this.el.removeEventListener(t,n,o)))}listenOn(t,e,o,n){let r=o?.bind(this)??o;this.manager.onLifecycle(()=>(t.addEventListener(e,r,n),()=>t.removeEventListener(e,r,n)))}async componentOnReady(){return await this.#n.promise,this}addController(t){this.M.push(t),!(q in t)&&this.renderRoot&&this.el.isConnected&&t.hostConnected?.()}removeController(t){this.M.splice(this.M.indexOf(t),1),t.controllerRemoved?.()}};var _e=s=>{let t,e=n=>{t=new URL(n,globalThis.location?.href||void 0).href},o={...s,getAssetPath(n){let r=new URL(n,t);return r.origin!==globalThis.location?.origin?r.href:r.pathname},setAssetPath:e,customElement(n,r){r.K=o,r.L=n,customElements.get(n)||customElements.define(n,r)}};return e(s.defaultAssetPath),o};var Ln=s=>typeof s=="object"&&s!=null?ve(s):s,Un=s=>typeof s=="object"&&s!=null?$e(s):s;var It=class extends g{#t;#e;constructor(t){super(t);let e=this;this.#e=function(n){return e.#t.call(this,n)}}render(t){return typeof t=="function"?(this.#t=t,Nt(this.#e)):Nt(t)}},Rn=$(It);var In=d;var Mn=s=>{let t=document.createElement("div");return at(s,t),t.firstElementChild};var Q=_e({defaultAssetPath:"https://jsdev.arcgis.com/5.2.0-next/portal-components/",hydratedAttribute:"hydrated"}),{customElement:zn,getAssetPath:Bn,setAssetPath:Wn}=Q;Q.t=void 0;Q.o=void 0;Q.c=void 0;Q.r=void 0;export{Is as a,D as b,G as c,ne as d,re as e,Ms as f,ks as g,Ce as h,j as i,ys as j,gs as k,f as l,d as m,at as n,b as o,Ds as p,oe as q,xs as r,Ls as s,ze as t,Be as u,We as v,Fe as w,Tt as x,pe as y,Po as z,es as A,y as B,$ as C,g as D,Js as E,Ys as F,me as G,Zs as H,Xs as I,Ke as J,yo as K,Nt as L,be as M,Ln as N,Un as O,In as P,Mn as Q,Q as R,zn as S,Bn as T};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as g}from"./O3RR6UMN.js";import{M as m,P as l,S as u,h as p,j as s,w as d}from"./BXCQOWAD.js";var w=p`.sort-accordion-wrap{border-bottom:1px solid var(--calcite-color-border-2)}.sort-title{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-text-1);font-size:var(--calcite-font-size-0);padding:1rem .5rem;margin:0 0 -1px;line-height:1;border-bottom:1px solid var(--calcite-color-border-2)}.dropdown-sort-order-items--in-dialog{max-height:var(--arcgis-browser-sort-max-height, none)}.sort-accordion-item{--calcite-accordion-item-content-space: .75rem .25rem;--calcite-accordion-icon-margin: .5rem;border-top:1px solid var(--calcite-color-border-1)}.sort-accordion-content{margin:-.75rem .5rem 0}`,b={title:["asc","alphabetical"],owner:["asc","alphabetical"],numviews:["desc","num"],relevance:["desc"],modified:["desc","recent"],created:["desc","recent"],size:["desc","size"],fullname:["asc","alphabetical"],username:["asc","alphabetical"],name:["asc","alphabetical"],membertype:["asc","alphabetical"],joined:["desc","recent"],lastlogin:["desc","recent"],added:["desc","recent"],dataset:["asc","alphabetical"],mfaenabled:["desc","default"],description:["asc","alphabetical"],lastSyncFailureCount:["desc","num"],invitationsPendingCount:["desc","num"],participantGroupLinksCount:["desc","num"]};function n(a,e,r){let[t,o]=b[a],i=a==="modified"&&r?e.deleted||"Date deleted":e[a]||a,c={asc:(o?e[`${o}Asc`]:void 0)||e.defaultAsc,desc:(o?e[`${o}Desc`]:void 0)||e.defaultDesc};return{label:i,showSortOrder:!!o,defaultSortOrder:t,sortOrderLabels:c}}var h=class extends m{constructor(){super(...arguments),this._messages=g({name:"portal-browser",blocking:!0}),this.sortOrders=["asc","desc"],this.options=[],this.appearance="dropdown",this.showText=!0,this.useDeleted=!1,this.arcgisBrowserSortFieldChange=d(),this.arcgisBrowserSortOrderChange=d()}static{this.properties={options:0,field:1,order:1,appearance:1,showText:5,useDeleted:5}}static{this.styles=w}getI18n(){return this._messages.sort}renderFieldOption(e,r){let t=this.getI18n(),o=n(e,t,this.useDeleted);return s`<calcite-dropdown-item .selected=${r===e} @calciteDropdownItemSelect=${()=>this.arcgisBrowserSortFieldChange.emit(e)}>${o.label}</calcite-dropdown-item>`}renderButton(e){let r=this.getI18n(),t=n(e,r,this.useDeleted),o=`${r.sortBy} ${t.label}`;return s`<calcite-button class="button" slot=trigger scale=m appearance=outline-fill kind=neutral icon-start=sort-descending icon-flip-rtl=start .label=${o}>${this.showText?t.label:null}</calcite-button>`}renderDropdown(){if(!this.options.length)return null;let e=this.getI18n(),r=this.field&&this.options.includes(this.field)?this.field:this.options[0],t=n(r,e,this.useDeleted),o=this.order||t.defaultSortOrder;return s`<calcite-dropdown placement=bottom-end scale=m overlay-positioning=fixed width=m>${this.renderButton(r)}<calcite-dropdown-group selection-mode=single .groupTitle=${e.sortBy}>${this.options.map(i=>this.renderFieldOption(i,r))}</calcite-dropdown-group>${t.showSortOrder&&s`<calcite-dropdown-group selection-mode=single .groupTitle=${e.sortDirection}>${this.sortOrders.map(i=>s`<calcite-dropdown-item .selected=${o===i} @calciteDropdownItemSelect=${()=>this.arcgisBrowserSortOrderChange.emit(i)}>${t.sortOrderLabels[i]}</calcite-dropdown-item>`)}</calcite-dropdown-group>`||""}</calcite-dropdown>`}renderTreeItem(e,r){let t=this.getI18n(),o=n(e,t,this.useDeleted);return s`<calcite-tree-item data-value=${e??l} .selected=${r===e}><a>${o.label}</a></calcite-tree-item>`}renderAccordion(e,r,t){return t?null:s`<calcite-accordion-item .heading=${e} class="sort-accordion-item"><div class="sort-accordion-content">${r}</div></calcite-accordion-item>`}renderAccordions(){if(!this.options.length)return null;let e=this.getI18n(),r=this.field&&this.options.includes(this.field)?this.field:this.options[0],t=n(r,e,this.useDeleted),o=this.order||t.defaultSortOrder;return s`<div class="sort-accordion-wrap"><h3 class="sort-title">${e.sort}</h3><calcite-accordion appearance=transparent icon-type=chevron scale=m icon-position=start>${this.renderAccordion(e.sortBy,s`<calcite-tree @calciteTreeSelect=${i=>{let c=i.target.selectedItems?.[0]?.dataset.value;c&&typeof c=="string"&&this.arcgisBrowserSortFieldChange.emit(c)}}>${this.options.map(i=>this.renderTreeItem(i,r))}</calcite-tree>`)}${this.renderAccordion(e.sortDirection,s`<calcite-tree @calciteTreeSelect=${i=>{let c=i.target.selectedItems?.[0]?.dataset.value;(c==="asc"||c==="desc")&&this.arcgisBrowserSortOrderChange.emit(c)}}>${this.sortOrders.map(i=>s`<calcite-tree-item data-value=${i??l} .selected=${o===i}><a>${t.sortOrderLabels[i]}</a></calcite-tree-item>`)}</calcite-tree>`,!t.showSortOrder)}</calcite-accordion></div>`}render(){return this.appearance==="accordion"?this.renderAccordions():this.renderDropdown()}};u("arcgis-portal-browser-sort",h);export{h as a};
2
+ import{a as g}from"./QLHCXOVQ.js";import{M as m,P as l,S as u,h as p,j as s,w as d}from"./BTSXQQKZ.js";var w=p`.sort-accordion-wrap{border-bottom:1px solid var(--calcite-color-border-2)}.sort-title{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-text-1);font-size:var(--calcite-font-size-0);padding:1rem .5rem;margin:0 0 -1px;line-height:1;border-bottom:1px solid var(--calcite-color-border-2)}.dropdown-sort-order-items--in-dialog{max-height:var(--arcgis-browser-sort-max-height, none)}.sort-accordion-item{--calcite-accordion-item-content-space: .75rem .25rem;--calcite-accordion-icon-margin: .5rem;border-top:1px solid var(--calcite-color-border-1)}.sort-accordion-content{margin:-.75rem .5rem 0}`,b={title:["asc","alphabetical"],owner:["asc","alphabetical"],numviews:["desc","num"],relevance:["desc"],modified:["desc","recent"],created:["desc","recent"],size:["desc","size"],fullname:["asc","alphabetical"],username:["asc","alphabetical"],name:["asc","alphabetical"],membertype:["asc","alphabetical"],joined:["desc","recent"],lastlogin:["desc","recent"],added:["desc","recent"],dataset:["asc","alphabetical"],mfaenabled:["desc","default"],description:["asc","alphabetical"],lastSyncFailureCount:["desc","num"],invitationsPendingCount:["desc","num"],participantGroupLinksCount:["desc","num"]};function n(a,e,r){let[t,o]=b[a],i=a==="modified"&&r?e.deleted||"Date deleted":e[a]||a,c={asc:(o?e[`${o}Asc`]:void 0)||e.defaultAsc,desc:(o?e[`${o}Desc`]:void 0)||e.defaultDesc};return{label:i,showSortOrder:!!o,defaultSortOrder:t,sortOrderLabels:c}}var h=class extends m{constructor(){super(...arguments),this._messages=g({name:"portal-browser",blocking:!0}),this.sortOrders=["asc","desc"],this.options=[],this.appearance="dropdown",this.showText=!0,this.useDeleted=!1,this.arcgisBrowserSortFieldChange=d(),this.arcgisBrowserSortOrderChange=d()}static{this.properties={options:0,field:1,order:1,appearance:1,showText:5,useDeleted:5}}static{this.styles=w}getI18n(){return this._messages.sort}renderFieldOption(e,r){let t=this.getI18n(),o=n(e,t,this.useDeleted);return s`<calcite-dropdown-item .selected=${r===e} @calciteDropdownItemSelect=${()=>this.arcgisBrowserSortFieldChange.emit(e)}>${o.label}</calcite-dropdown-item>`}renderButton(e){let r=this.getI18n(),t=n(e,r,this.useDeleted),o=`${r.sortBy} ${t.label}`;return s`<calcite-button class="button" slot=trigger scale=m appearance=outline-fill kind=neutral icon-start=sort-descending icon-flip-rtl=start .label=${o}>${this.showText?t.label:null}</calcite-button>`}renderDropdown(){if(!this.options.length)return null;let e=this.getI18n(),r=this.field&&this.options.includes(this.field)?this.field:this.options[0],t=n(r,e,this.useDeleted),o=this.order||t.defaultSortOrder;return s`<calcite-dropdown placement=bottom-end scale=m overlay-positioning=fixed width=m>${this.renderButton(r)}<calcite-dropdown-group selection-mode=single .groupTitle=${e.sortBy}>${this.options.map(i=>this.renderFieldOption(i,r))}</calcite-dropdown-group>${t.showSortOrder&&s`<calcite-dropdown-group selection-mode=single .groupTitle=${e.sortDirection}>${this.sortOrders.map(i=>s`<calcite-dropdown-item .selected=${o===i} @calciteDropdownItemSelect=${()=>this.arcgisBrowserSortOrderChange.emit(i)}>${t.sortOrderLabels[i]}</calcite-dropdown-item>`)}</calcite-dropdown-group>`||""}</calcite-dropdown>`}renderTreeItem(e,r){let t=this.getI18n(),o=n(e,t,this.useDeleted);return s`<calcite-tree-item data-value=${e??l} .selected=${r===e}><a>${o.label}</a></calcite-tree-item>`}renderAccordion(e,r,t){return t?null:s`<calcite-accordion-item .heading=${e} class="sort-accordion-item"><div class="sort-accordion-content">${r}</div></calcite-accordion-item>`}renderAccordions(){if(!this.options.length)return null;let e=this.getI18n(),r=this.field&&this.options.includes(this.field)?this.field:this.options[0],t=n(r,e,this.useDeleted),o=this.order||t.defaultSortOrder;return s`<div class="sort-accordion-wrap"><h3 class="sort-title">${e.sort}</h3><calcite-accordion appearance=transparent icon-type=chevron scale=m icon-position=start>${this.renderAccordion(e.sortBy,s`<calcite-tree @calciteTreeSelect=${i=>{let c=i.target.selectedItems?.[0]?.dataset.value;c&&typeof c=="string"&&this.arcgisBrowserSortFieldChange.emit(c)}}>${this.options.map(i=>this.renderTreeItem(i,r))}</calcite-tree>`)}${this.renderAccordion(e.sortDirection,s`<calcite-tree @calciteTreeSelect=${i=>{let c=i.target.selectedItems?.[0]?.dataset.value;(c==="asc"||c==="desc")&&this.arcgisBrowserSortOrderChange.emit(c)}}>${this.sortOrders.map(i=>s`<calcite-tree-item data-value=${i??l} .selected=${o===i}><a>${t.sortOrderLabels[i]}</a></calcite-tree-item>`)}</calcite-tree>`,!t.showSortOrder)}</calcite-accordion></div>`}render(){return this.appearance==="accordion"?this.renderAccordions():this.renderDropdown()}};u("arcgis-portal-browser-sort",h);export{h as a};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import f from"./XRPX4IA3.js";import e from"./Q75EBGI2.js";import{a as S,b as P}from"./5A54YFFZ.js";import c from"./T4DHIZOR.js";import a from"./F3ODJVJC.js";import{a as w}from"./O3RR6UMN.js";import{a as E,e as I}from"./BTLJZVSE.js";import"./UEL7BVMB.js";import{K as d,L as m,M as b,P as C,S as y,h as g,j as n}from"./BXCQOWAD.js";import"./UZLQALHY.js";export default $arcgis.t(([{createArcadeExecutor:F},{watch:q},{c:v},,{a:f,b:c,c:p,d:R,e:_,f:O},{a:x,b:$}])=>{async function k({portalClassificationSchema:r,itemClassification:t}){let i=Object.entries(r.attributes).map(async([e])=>{let s=await T(e,r,t);return{[e]:{enabled:s}}}),a=await Promise.all(i);return Object.assign({},...a)}async function T(r,t,i){let a=t?.attributes?.[r];if(!a)return!1;let{isAttributeEnabled:e}=a;return e?await h(e,JSON.stringify(t),i):!0}async function j({portalClassificationSchema:r,itemClassification:t}){let i=Object.entries(r.attributes).map(async([e])=>{let s=await M(e,r,t);return{[e]:{valueExpressionResult:s}}}),a=await Promise.all(i);return Object.assign({},...a)}async function M(r,t,i){let a=t.attributes[r];if(!a)throw Error(`Attribute ${r} not found in schema`);let e=a.valueExpression,s=a.validValues,o=a.validValuesMap;return s?.length?s:o&&Object.keys(o)?.length?o:e?await h(e,t,i,r):null}async function N({portalClassificationSchema:r,itemClassification:t}){let i=Object.entries(r.attributes).map(async([e])=>{let s=await H(e,r,t);return{[e]:{attributeValidationResult:s}}}),a=await Promise.all(i);return Object.assign({},...a)}async function H(r,t,i){let a=t?.attributes?.[r];if(!a)return null;let e=a?.attributeValidation;return e?await h(e,JSON.stringify(t),i,r):null}var D=async(r,t)=>{let i=r?.bannerExpression;return i?.length?await h(i,r,t):W(r,t)},W=(r,t)=>{let i=Object.entries(r.attributes).sort(([,s],[,o])=>(s?.bannerOrder??0)-(o?.bannerOrder??0)),a=[],e=[];return i.forEach(([s,o])=>{let l=t?.[s];l&&o.bannerOrder&&(a.push(U({elementType:o.uiElement??"",selectionDisplayLabel:o.bannerLabel??"",labelDelimiter:o.labelDelimiter??"",classificationProp:l,valueDelimiter:o.valueDelimiter??""})),e.push(o.attributeDelimiter??""))}),a.length>0?a.reduce((s,o,l)=>l===0?o:`${s}${e[l-1]}${o}`,""):""},U=({elementType:r,selectionDisplayLabel:t,labelDelimiter:i,classificationProp:a,valueDelimiter:e})=>{let s=r.includes("multi")&&a?a.split("").join(e):a;return`${t}${i}${s}`};async function h(r,t,i,a=""){let e={schemaJsonString:typeof t=="string"?t:JSON.stringify(t),valueJsonString:JSON.stringify(i),attributeId:a};return(await J(r)).execute(e)}async function J(r){return await F(r,{variables:[{name:"schemaJsonString",type:"text"},{name:"valueJsonString",type:"text"},{name:"attributeId",type:"text"}]})}var L=g`:host{height:100%;box-sizing:border-box;display:flex;flex-direction:column}.header-section{padding:var(--calcite-spacing-sm)}.header-section__title-container{display:flex;align-items:center;justify-content:space-between}.header-section__title-text{margin:unset;font-weight:unset;font-size:var(--calcite-font-size)}.header-section__title-popover{padding:var(--calcite-spacing-md)}.form-section{display:flex;border-top:var(--calcite-border-width-sm) solid var(--calcite-color-border-1);padding:var(--calcite-spacing-sm);height:100%;overflow:hidden}.form-section__sidebar{flex:1;padding:var(--calcite-spacing-sm)}.form-section__main-content{flex:3;padding:var(--calcite-spacing-sm);overflow:auto}.danger{color:var(--calcite-color-status-danger)}.spacing-y{margin:var(--calcite-spacing-md) 0}`,u=class extends b{constructor(){super(),this.classificationModel=x(this),this.messages=w(),this.formMainContentRef=d(),this.bannerRef=d(),this._classificationDataTask=$(this),this._formCreationTask=new P(this,{task:async()=>{if(await this._classificationDataTask.taskComplete,!this.portalClassificationSchema||!this.portalItem)throw new Error("Portal item and classification schema are required to render the form");let t=this.portalItem.clone();if(await t.load(),!this.primaryAttribute)throw new Error("primaryAttribute is required but was undefined.");this.existingClassification=!!t.classification,t.classification=f(t.classification,this.primaryAttribute,this.portalClassificationSchema),t.classification&&(t.classification.banner=await D(this.portalClassificationSchema,t.classification)),this.pendingPortalItem=t,this.cleanupItemClassificationWatchHandle(),this._itemClassificationWatchHandle=q(()=>this.portalItem.classification,i=>{if(this.pendingPortalItem){let a=this.pendingPortalItem.clone();a.load().then(()=>{a.classification=i,this.pendingPortalItem=a}).catch(e=>{console.error(e)})}}),this._itemClassificationWatchPortalItem=this.portalItem,this._itemClassificationWatchPortalItem.addHandles(this._itemClassificationWatchHandle,"arcgis-classification-config"),await this.evaluateAttributeExpressions(this.portalClassificationSchema,this.pendingPortalItem),this.pendingPortalItem.classification=c(this.pendingPortalItem.classification,this.attributeExpressionResults),this.pendingPortalItem=this.pendingPortalItem.clone(),this.existingClassification&&this.validateForm()},args:()=>[this.portalItem,this.portalClassificationSchema]}),this.getFormDisplayOrder=t=>this.portalClassificationSchema?.layouts.default.layoutElements[t].formDisplayOrder??0,this.addEditInfoAttributes=()=>{if(!this.pendingPortalItem?.classification)return{};let t=structuredClone(this.pendingPortalItem.classification),i=O(this.pendingPortalItem,t);return{...t,...i}},this.updateFavoriteClassification=t=>{this.favoriteClassifications=t},this.updateClassificationData=async t=>{let i=t.classification;if(this.selectedFavoriteClassificationName=t.name,this.pendingPortalItem){let a=this.pendingPortalItem.clone();if(await a.load(),a.classification=p(this.portalClassificationSchema,i),!this.portalClassificationSchema)return;await this.evaluateAttributeExpressions(this.portalClassificationSchema,a),a.classification=c(a.classification,this.attributeExpressionResults),this.pendingPortalItem=a}},this.existingClassification=!1,this.portalClassificationSchema=this.classificationModel.portalClassificationSchema,this.primaryAttribute=this.classificationModel.primaryAttribute,this.attributeExpressionResults=new Map,this.formValidationErrors=[],this.remoteValidationErrors="",this.canUserConfigureClassification=!0,this.favoriteClassifications=[],this.isRequiredErrors=new Set,this.status=this.classificationModel.status,this.values={},this.valid=!1,this.autoDestroyDisabled=!1,this.arcgisPropertyChange=I()("status","values","valid")}static{this.properties={existingClassification:16,portalClassificationSchema:16,primaryAttribute:16,attributeExpressionResults:16,formValidationErrors:16,itemClassification:16,pendingPortalItem:16,selectedCategory:16,remoteValidationErrors:16,canUserConfigureClassification:16,favoriteClassifications:16,selectedFavoriteClassificationName:16,isRequiredErrors:16,portalItem:0,status:35,values:[1,{type:Object}],valid:7,autoDestroyDisabled:5}}static{this.styles=L}async destroy(){this.cleanupItemClassificationWatchHandle(),await this.destroyManagedChildren(),await this.manager.destroy()}async resetForm(){if(this.existingClassification)this.pendingPortalItem=this.portalItem?.clone(),this.portalClassificationSchema&&this.pendingPortalItem&&(await this.evaluateAttributeExpressions(this.portalClassificationSchema,this.pendingPortalItem),this.pendingPortalItem.classification=c(this.pendingPortalItem.classification,this.attributeExpressionResults),this.validateForm());else if(this.portalItem&&this.primaryAttribute&&this.portalClassificationSchema){let t=this.portalItem.clone();await t.load(),this.pendingPortalItem=this.portalItem?.clone(),this.pendingPortalItem.classification=f(t.classification,this.primaryAttribute,this.portalClassificationSchema),this.portalClassificationSchema&&this.pendingPortalItem&&(await this.evaluateAttributeExpressions(this.portalClassificationSchema,this.pendingPortalItem),this.pendingPortalItem.classification=c(this.pendingPortalItem.classification,this.attributeExpressionResults))}}async validateForm(){this.updateFormValidationErrors(),await this.updateRemoteValidationErrors()}async load(){try{await _(this.portalItem)||(this.canUserConfigureClassification=!1);let t=await v(this.portalItem);if(t){let{result:i,error:a}=t;if(a&&a.details.raw.messageCode!=="COM_1177"){console.error(a);return}i&&(this.favoriteClassifications=i.favorites)}}catch(t){console.error("Error occured while loading arcgis-classification-config:",t)}}willUpdate(t){if(t.has("pendingPortalItem")){let i=this.addEditInfoAttributes();this.values=i}(t.has("formValidationErrors")||t.has("remoteValidationErrors"))&&(this.valid=!this.formValidationErrors.length&&!this.remoteValidationErrors)}loaded(){let t=E(this.el,"form");t&&(this.listenOn(t,"formdata",this.updateFormData),this.listenOn(t,"submit",this.handleFormSubmit)),this.listen("submit",this.handleFormSubmit)}async updateClassificationProperty(t){if(!this.pendingPortalItem||!this.portalClassificationSchema)return;let i=this.pendingPortalItem.clone();await i.load(),Object.entries(t??{}).forEach(([a,e])=>{if(a===this.primaryAttribute){let s=R(e,i.classification,this.primaryAttribute);s=p(this.portalClassificationSchema,s),i.classification=s}else{let s=new Map(Object.entries(i.classification??{}));if(e===void 0||e===""||Array.isArray(e)&&e.length===0)s.delete(a);else if(s.set(a,e),a==="fgi"&&!s.has("fgiOptions")){let o=this.portalClassificationSchema?.attributes?.fgiOptions?.defaultValue??[];s.set("fgiOptions",Array.isArray(o)?o:[o])}i.classification=Object.fromEntries(s)}}),i.classification&&!i.classification.fgi&&delete i.classification.fgiOptions,await this.evaluateAttributeExpressions(this.portalClassificationSchema,i),i.classification=c(i.classification,this.attributeExpressionResults),i.classification&&(i.classification.banner=await D(this.portalClassificationSchema,i.classification)),this.pendingPortalItem=i,this.existingClassification&&this.validateForm(),t&&"classification"in t&&this.updateIsRequiredErrors()}handleCategorySelectChange(t){this.selectedCategory=t.target.selectedItems[0].value}async evaluateAttributeExpressions(t,i){let a=await k({portalClassificationSchema:t,itemClassification:i.classification}),e=await j({portalClassificationSchema:t,itemClassification:i.classification}),s=await N({portalClassificationSchema:t,itemClassification:i.classification});Object.keys(t.attributes).forEach(o=>{let l=a[o]?.enabled??!0,V=e[o]?.valueExpressionResult,A=s[o]?.attributeValidationResult;this.attributeExpressionResults.set(o,{enabled:l,valueExpressionResult:V,attributeValidationResult:A})})}updateIsRequiredErrors(){let t=new Set;Object.entries(this.portalClassificationSchema?.attributes??{})?.forEach(([i,a])=>{a.isRequired&&!this.pendingPortalItem?.classification?.[i]&&this.pendingPortalItem?.classification?.[i]!==0&&t.add(i)}),this.isRequiredErrors=t}updateFormValidationErrors(t=!1){let i=[];Object.entries(this.portalClassificationSchema?.attributes??{})?.forEach(([a,e])=>{e.isRequired&&!this.pendingPortalItem?.classification?.[a]&&this.pendingPortalItem?.classification?.[a]!==0&&(!t||this.isRequiredErrors.has(a))&&i.push({attribute:e.label,reason:this.messages.isrequired??"is required",category:e.attributeCategory}),this.attributeExpressionResults.get(a)?.attributeValidationResult&&i.push({attribute:e.label,reason:this.attributeExpressionResults.get(a)?.attributeValidationResult??"",category:e.attributeCategory})}),this.formValidationErrors=i}async updateRemoteValidationErrors(){if(!this.pendingPortalItem?.classification)return;let t=await this.classificationModel.validateClassification(void 0,this.pendingPortalItem?.classification,this.pendingPortalItem.portal.restUrl);this.remoteValidationErrors=t}cleanupItemClassificationWatchHandle(){this._itemClassificationWatchHandle?.remove(),this._itemClassificationWatchHandle=void 0,this._itemClassificationWatchPortalItem?.removeHandles("arcgis-classification-config"),this._itemClassificationWatchPortalItem=void 0}async destroyManagedChildren(){let t=this.bannerRef.value;!t?.autoDestroyDisabled||t.manager?.destroyed||await t.destroy()}async handleFormSubmit(t){this.validateForm(),this.updateIsRequiredErrors(),this.formMainContentRef.value?.scrollIntoView()}updateFormData(t){let i=t.formData,a=this.addEditInfoAttributes();a=c(a,this.attributeExpressionResults),Object.entries(a??{}).forEach(([e,s])=>{i.set(e,s)})}renderCategoryTabs(){return this._classificationDataTask.render({complete:()=>{if(this.portalClassificationSchema?.attributeCategories?.length)return this.selectedCategory||(this.selectedCategory=this.portalClassificationSchema?.attributeCategories[0]),n`<calcite-list .label=${this.messages.selectcategory??"select category"} selection-appearance=border selection-mode=single-persist @calciteListChange=${this.handleCategorySelectChange}>${this.portalClassificationSchema.attributeCategories.map(t=>{let i=this.formValidationErrors.filter(a=>a.category===t).length;return n`<calcite-list-item .label=${t} .value=${t} .selected=${this.selectedCategory===t} .description=${i?`${i} ${i>1?this.messages.errors:this.messages.error}`:void 0}>${i&&n`<div slot=content-end class="danger"><calcite-icon icon=exclamation-mark-triangle scale=s></calcite-icon></div>`||""}</calcite-list-item>`})}</calcite-list>`}})}renderValidationErrors(){return this.formValidationErrors.length&&(!this.selectedCategory||this.formValidationErrors.some(t=>this.selectedCategory===t.category))?n`<calcite-notice open icon=exclamation-mark-triangle class="spacing-y" kind=danger><div slot=message>${this.messages.bannererror??"Some fields are incomplete or contain errors. Check the highlighted fields for details."}</div></calcite-notice>`:null}renderFavoriteClassification(){let t=this.portalClassificationSchema?.attributeCategories?.[0]??"Default";return this.selectedCategory=this.portalClassificationSchema?.attributeCategories?.length?this.selectedCategory:"Default",this.selectedCategory===t?n`<arcgis-portal-classification-favorite .portalItem=${this.pendingPortalItem??this.portalItem} .classificationValue=${this.pendingPortalItem?.classification} .favoriteClassifications=${this.favoriteClassifications} .selectedFavoriteClassificationName=${this.selectedFavoriteClassificationName} .attributeExpressionResults=${this.attributeExpressionResults} .resetFavoriteClassification=${i=>this.updateFavoriteClassification(i)} .updateClassificationData=${async i=>{await this.updateClassificationData(i),this.updateFormValidationErrors(),this.updateIsRequiredErrors()}}></arcgis-portal-classification-favorite>`:null}renderForm(){return this._formCreationTask.render({pending:()=>n`<calcite-loader .label=${this.messages.loading??"loading"}></calcite-loader>`,complete:()=>{if(!this.pendingPortalItem||!this.portalClassificationSchema)return;let t=Object.entries(this.portalClassificationSchema.attributes).sort(([i],[a])=>this.getFormDisplayOrder(i)-this.getFormDisplayOrder(a));return n`${this.renderValidationErrors()}${this.renderFavoriteClassification()}${t.filter(([,{attributeCategory:i}])=>this.selectedCategory===i||!i).map(([i,a])=>{if(this.attributeExpressionResults.get(i)?.enabled===!1)return null;let e=this.pendingPortalItem?.classification?.[i];return n`<arcgis-portal-classification-form-element .attributeKey=${i} .attribute=${a} .value=${e} @arcgisAttributeValueChange=${async s=>{await this.updateClassificationProperty(s.detail),a.isRequired&&!s.detail[i]?this.isRequiredErrors.add(i):this.isRequiredErrors=new Set(Array.from(this.isRequiredErrors).filter(o=>o!==i)),this.updateFormValidationErrors(!0)}} .renderingInfo=${this.attributeExpressionResults.get(i)} .isRequiredErrors=${this.isRequiredErrors}></arcgis-portal-classification-form-element>`})}`}})}renderNotice(t,i="warning"){return n`<calcite-notice icon=exclamation-mark-triangle open class="spacing-y" .kind=${i}><div slot=message>${t}</div></calcite-notice>`}renderHelpTooltip(){return this.portalClassificationSchema?.helpTooltip?n`<calcite-action id=portal-classification-config-tooltip-button .text=${this.portalClassificationSchema?.helpTooltip} icon=information></calcite-action><calcite-popover .label=${this.portalClassificationSchema?.helpTooltip} reference-element=portal-classification-config-tooltip-button placement=bottom-end overlay-positioning=fixed auto-close><div class="header-section__title-popover"><calcite-link .href=${this.portalClassificationSchema?.helpUrl} target=_blank id=portal-classification-config-tooltip-button>${this.portalClassificationSchema?.helpTooltip}</calcite-link></div></calcite-popover>`:null}render(){return this.portalItem?this._classificationDataTask.render({pending:()=>n`<calcite-loader .label=${this.messages.loading??"loading"}></calcite-loader>`,error:()=>this.renderNotice(this.messages.anerroroccurred??"An error has occurred.","danger"),complete:()=>this.portalItem?this.canUserConfigureClassification?this.portalItem.portal.hasClassificationSchema?n`<div class="header-section" role=region aria-label=${this.messages.documentbannerpreview??"documentbannerpreview"??C}><div class="header-section__title-container"><h2 class="header-section__title-text">${this.messages.documentbannerpreview??"documentbannerpreview"}</h2>${this.renderHelpTooltip()}</div>${this._formCreationTask.status===S.COMPLETE&&n`<arcgis-portal-classification-banner .portalItem=${this.pendingPortalItem??this.portalItem} variant=preview .missingExistingClassification=${!this.existingClassification} .autoDestroyDisabled=${this.autoDestroyDisabled} ${m(this.bannerRef)}></arcgis-portal-classification-banner>`||""}</div><div class="form-section">${this.portalClassificationSchema?.attributeCategories?.length&&n`<div class="form-section__sidebar">${this.renderCategoryTabs()}</div>`||""}<div class="form-section__main-content" ${m(this.formMainContentRef)}>${this.renderForm()}</div></div>`:this.renderNotice(this.messages.missingclassificationschema??"Portal is missing classification schema."):this.renderNotice(this.messages.userconfigurepermissionrequired??"User configuration permission is required."):this.renderNotice(this.messages.portalitemrequired??"Portal item is required.")}):this.renderNotice(this.messages.portalitemrequired??"Portal item is required.")}};y("arcgis-portal-classification-config",u);return u},"arcade","core/reactiveUtils",a,c,e,f)
2
+ import f from"./RBQG66FL.js";import e from"./Q75EBGI2.js";import{a as S,b as P}from"./7XD6KSXV.js";import c from"./WYLEYSM3.js";import a from"./F3ODJVJC.js";import{a as w}from"./QLHCXOVQ.js";import{a as E,e as I}from"./I2KQQXOO.js";import"./W7O7ZYZ4.js";import{K as d,L as m,M as b,P as C,S as y,h as g,j as n}from"./BTSXQQKZ.js";import"./UZLQALHY.js";export default $arcgis.t(([{createArcadeExecutor:F},{watch:q},{c:v},,{a:f,b:c,c:p,d:R,e:_,f:O},{a:x,b:$}])=>{async function k({portalClassificationSchema:r,itemClassification:t}){let i=Object.entries(r.attributes).map(async([e])=>{let s=await T(e,r,t);return{[e]:{enabled:s}}}),a=await Promise.all(i);return Object.assign({},...a)}async function T(r,t,i){let a=t?.attributes?.[r];if(!a)return!1;let{isAttributeEnabled:e}=a;return e?await h(e,JSON.stringify(t),i):!0}async function j({portalClassificationSchema:r,itemClassification:t}){let i=Object.entries(r.attributes).map(async([e])=>{let s=await M(e,r,t);return{[e]:{valueExpressionResult:s}}}),a=await Promise.all(i);return Object.assign({},...a)}async function M(r,t,i){let a=t.attributes[r];if(!a)throw Error(`Attribute ${r} not found in schema`);let e=a.valueExpression,s=a.validValues,o=a.validValuesMap;return s?.length?s:o&&Object.keys(o)?.length?o:e?await h(e,t,i,r):null}async function N({portalClassificationSchema:r,itemClassification:t}){let i=Object.entries(r.attributes).map(async([e])=>{let s=await H(e,r,t);return{[e]:{attributeValidationResult:s}}}),a=await Promise.all(i);return Object.assign({},...a)}async function H(r,t,i){let a=t?.attributes?.[r];if(!a)return null;let e=a?.attributeValidation;return e?await h(e,JSON.stringify(t),i,r):null}var D=async(r,t)=>{let i=r?.bannerExpression;return i?.length?await h(i,r,t):W(r,t)},W=(r,t)=>{let i=Object.entries(r.attributes).sort(([,s],[,o])=>(s?.bannerOrder??0)-(o?.bannerOrder??0)),a=[],e=[];return i.forEach(([s,o])=>{let l=t?.[s];l&&o.bannerOrder&&(a.push(U({elementType:o.uiElement??"",selectionDisplayLabel:o.bannerLabel??"",labelDelimiter:o.labelDelimiter??"",classificationProp:l,valueDelimiter:o.valueDelimiter??""})),e.push(o.attributeDelimiter??""))}),a.length>0?a.reduce((s,o,l)=>l===0?o:`${s}${e[l-1]}${o}`,""):""},U=({elementType:r,selectionDisplayLabel:t,labelDelimiter:i,classificationProp:a,valueDelimiter:e})=>{let s=r.includes("multi")&&a?a.split("").join(e):a;return`${t}${i}${s}`};async function h(r,t,i,a=""){let e={schemaJsonString:typeof t=="string"?t:JSON.stringify(t),valueJsonString:JSON.stringify(i),attributeId:a};return(await J(r)).execute(e)}async function J(r){return await F(r,{variables:[{name:"schemaJsonString",type:"text"},{name:"valueJsonString",type:"text"},{name:"attributeId",type:"text"}]})}var L=g`:host{height:100%;box-sizing:border-box;display:flex;flex-direction:column}.header-section{padding:var(--calcite-spacing-sm)}.header-section__title-container{display:flex;align-items:center;justify-content:space-between}.header-section__title-text{margin:unset;font-weight:unset;font-size:var(--calcite-font-size)}.header-section__title-popover{padding:var(--calcite-spacing-md)}.form-section{display:flex;border-top:var(--calcite-border-width-sm) solid var(--calcite-color-border-1);padding:var(--calcite-spacing-sm);height:100%;overflow:hidden}.form-section__sidebar{flex:1;padding:var(--calcite-spacing-sm)}.form-section__main-content{flex:3;padding:var(--calcite-spacing-sm);overflow:auto}.danger{color:var(--calcite-color-status-danger)}.spacing-y{margin:var(--calcite-spacing-md) 0}`,u=class extends b{constructor(){super(),this.classificationModel=x(this),this.messages=w(),this.formMainContentRef=d(),this.bannerRef=d(),this._classificationDataTask=$(this),this._formCreationTask=new P(this,{task:async()=>{if(await this._classificationDataTask.taskComplete,!this.portalClassificationSchema||!this.portalItem)throw new Error("Portal item and classification schema are required to render the form");let t=this.portalItem.clone();if(await t.load(),!this.primaryAttribute)throw new Error("primaryAttribute is required but was undefined.");this.existingClassification=!!t.classification,t.classification=f(t.classification,this.primaryAttribute,this.portalClassificationSchema),t.classification&&(t.classification.banner=await D(this.portalClassificationSchema,t.classification)),this.pendingPortalItem=t,this.cleanupItemClassificationWatchHandle(),this._itemClassificationWatchHandle=q(()=>this.portalItem.classification,i=>{if(this.pendingPortalItem){let a=this.pendingPortalItem.clone();a.load().then(()=>{a.classification=i,this.pendingPortalItem=a}).catch(e=>{console.error(e)})}}),this._itemClassificationWatchPortalItem=this.portalItem,this._itemClassificationWatchPortalItem.addHandles(this._itemClassificationWatchHandle,"arcgis-classification-config"),await this.evaluateAttributeExpressions(this.portalClassificationSchema,this.pendingPortalItem),this.pendingPortalItem.classification=c(this.pendingPortalItem.classification,this.attributeExpressionResults),this.pendingPortalItem=this.pendingPortalItem.clone(),this.existingClassification&&this.validateForm()},args:()=>[this.portalItem,this.portalClassificationSchema]}),this.getFormDisplayOrder=t=>this.portalClassificationSchema?.layouts.default.layoutElements[t].formDisplayOrder??0,this.addEditInfoAttributes=()=>{if(!this.pendingPortalItem?.classification)return{};let t=structuredClone(this.pendingPortalItem.classification),i=O(this.pendingPortalItem,t);return{...t,...i}},this.updateFavoriteClassification=t=>{this.favoriteClassifications=t},this.updateClassificationData=async t=>{let i=t.classification;if(this.selectedFavoriteClassificationName=t.name,this.pendingPortalItem){let a=this.pendingPortalItem.clone();if(await a.load(),a.classification=p(this.portalClassificationSchema,i),!this.portalClassificationSchema)return;await this.evaluateAttributeExpressions(this.portalClassificationSchema,a),a.classification=c(a.classification,this.attributeExpressionResults),this.pendingPortalItem=a}},this.existingClassification=!1,this.portalClassificationSchema=this.classificationModel.portalClassificationSchema,this.primaryAttribute=this.classificationModel.primaryAttribute,this.attributeExpressionResults=new Map,this.formValidationErrors=[],this.remoteValidationErrors="",this.canUserConfigureClassification=!0,this.favoriteClassifications=[],this.isRequiredErrors=new Set,this.status=this.classificationModel.status,this.values={},this.valid=!1,this.autoDestroyDisabled=!1,this.arcgisPropertyChange=I()("status","values","valid")}static{this.properties={existingClassification:16,portalClassificationSchema:16,primaryAttribute:16,attributeExpressionResults:16,formValidationErrors:16,itemClassification:16,pendingPortalItem:16,selectedCategory:16,remoteValidationErrors:16,canUserConfigureClassification:16,favoriteClassifications:16,selectedFavoriteClassificationName:16,isRequiredErrors:16,portalItem:0,status:35,values:[1,{type:Object}],valid:7,autoDestroyDisabled:5}}static{this.styles=L}async destroy(){this.cleanupItemClassificationWatchHandle(),await this.destroyManagedChildren(),await this.manager.destroy()}async resetForm(){if(this.existingClassification)this.pendingPortalItem=this.portalItem?.clone(),this.portalClassificationSchema&&this.pendingPortalItem&&(await this.evaluateAttributeExpressions(this.portalClassificationSchema,this.pendingPortalItem),this.pendingPortalItem.classification=c(this.pendingPortalItem.classification,this.attributeExpressionResults),this.validateForm());else if(this.portalItem&&this.primaryAttribute&&this.portalClassificationSchema){let t=this.portalItem.clone();await t.load(),this.pendingPortalItem=this.portalItem?.clone(),this.pendingPortalItem.classification=f(t.classification,this.primaryAttribute,this.portalClassificationSchema),this.portalClassificationSchema&&this.pendingPortalItem&&(await this.evaluateAttributeExpressions(this.portalClassificationSchema,this.pendingPortalItem),this.pendingPortalItem.classification=c(this.pendingPortalItem.classification,this.attributeExpressionResults))}}async validateForm(){this.updateFormValidationErrors(),await this.updateRemoteValidationErrors()}async load(){try{await _(this.portalItem)||(this.canUserConfigureClassification=!1);let t=await v(this.portalItem);if(t){let{result:i,error:a}=t;if(a&&a.details.raw.messageCode!=="COM_1177"){console.error(a);return}i&&(this.favoriteClassifications=i.favorites)}}catch(t){console.error("Error occured while loading arcgis-classification-config:",t)}}willUpdate(t){if(t.has("pendingPortalItem")){let i=this.addEditInfoAttributes();this.values=i}(t.has("formValidationErrors")||t.has("remoteValidationErrors"))&&(this.valid=!this.formValidationErrors.length&&!this.remoteValidationErrors)}loaded(){let t=E(this.el,"form");t&&(this.listenOn(t,"formdata",this.updateFormData),this.listenOn(t,"submit",this.handleFormSubmit)),this.listen("submit",this.handleFormSubmit)}async updateClassificationProperty(t){if(!this.pendingPortalItem||!this.portalClassificationSchema)return;let i=this.pendingPortalItem.clone();await i.load(),Object.entries(t??{}).forEach(([a,e])=>{if(a===this.primaryAttribute){let s=R(e,i.classification,this.primaryAttribute);s=p(this.portalClassificationSchema,s),i.classification=s}else{let s=new Map(Object.entries(i.classification??{}));if(e===void 0||e===""||Array.isArray(e)&&e.length===0)s.delete(a);else if(s.set(a,e),a==="fgi"&&!s.has("fgiOptions")){let o=this.portalClassificationSchema?.attributes?.fgiOptions?.defaultValue??[];s.set("fgiOptions",Array.isArray(o)?o:[o])}i.classification=Object.fromEntries(s)}}),i.classification&&!i.classification.fgi&&delete i.classification.fgiOptions,await this.evaluateAttributeExpressions(this.portalClassificationSchema,i),i.classification=c(i.classification,this.attributeExpressionResults),i.classification&&(i.classification.banner=await D(this.portalClassificationSchema,i.classification)),this.pendingPortalItem=i,this.existingClassification&&this.validateForm(),t&&"classification"in t&&this.updateIsRequiredErrors()}handleCategorySelectChange(t){this.selectedCategory=t.target.selectedItems[0].value}async evaluateAttributeExpressions(t,i){let a=await k({portalClassificationSchema:t,itemClassification:i.classification}),e=await j({portalClassificationSchema:t,itemClassification:i.classification}),s=await N({portalClassificationSchema:t,itemClassification:i.classification});Object.keys(t.attributes).forEach(o=>{let l=a[o]?.enabled??!0,V=e[o]?.valueExpressionResult,A=s[o]?.attributeValidationResult;this.attributeExpressionResults.set(o,{enabled:l,valueExpressionResult:V,attributeValidationResult:A})})}updateIsRequiredErrors(){let t=new Set;Object.entries(this.portalClassificationSchema?.attributes??{})?.forEach(([i,a])=>{a.isRequired&&!this.pendingPortalItem?.classification?.[i]&&this.pendingPortalItem?.classification?.[i]!==0&&t.add(i)}),this.isRequiredErrors=t}updateFormValidationErrors(t=!1){let i=[];Object.entries(this.portalClassificationSchema?.attributes??{})?.forEach(([a,e])=>{e.isRequired&&!this.pendingPortalItem?.classification?.[a]&&this.pendingPortalItem?.classification?.[a]!==0&&(!t||this.isRequiredErrors.has(a))&&i.push({attribute:e.label,reason:this.messages.isrequired??"is required",category:e.attributeCategory}),this.attributeExpressionResults.get(a)?.attributeValidationResult&&i.push({attribute:e.label,reason:this.attributeExpressionResults.get(a)?.attributeValidationResult??"",category:e.attributeCategory})}),this.formValidationErrors=i}async updateRemoteValidationErrors(){if(!this.pendingPortalItem?.classification)return;let t=await this.classificationModel.validateClassification(void 0,this.pendingPortalItem?.classification,this.pendingPortalItem.portal.restUrl);this.remoteValidationErrors=t}cleanupItemClassificationWatchHandle(){this._itemClassificationWatchHandle?.remove(),this._itemClassificationWatchHandle=void 0,this._itemClassificationWatchPortalItem?.removeHandles("arcgis-classification-config"),this._itemClassificationWatchPortalItem=void 0}async destroyManagedChildren(){let t=this.bannerRef.value;!t?.autoDestroyDisabled||t.manager?.destroyed||await t.destroy()}async handleFormSubmit(t){this.validateForm(),this.updateIsRequiredErrors(),this.formMainContentRef.value?.scrollIntoView()}updateFormData(t){let i=t.formData,a=this.addEditInfoAttributes();a=c(a,this.attributeExpressionResults),Object.entries(a??{}).forEach(([e,s])=>{i.set(e,s)})}renderCategoryTabs(){return this._classificationDataTask.render({complete:()=>{if(this.portalClassificationSchema?.attributeCategories?.length)return this.selectedCategory||(this.selectedCategory=this.portalClassificationSchema?.attributeCategories[0]),n`<calcite-list .label=${this.messages.selectcategory??"select category"} selection-appearance=border selection-mode=single-persist @calciteListChange=${this.handleCategorySelectChange}>${this.portalClassificationSchema.attributeCategories.map(t=>{let i=this.formValidationErrors.filter(a=>a.category===t).length;return n`<calcite-list-item .label=${t} .value=${t} .selected=${this.selectedCategory===t} .description=${i?`${i} ${i>1?this.messages.errors:this.messages.error}`:void 0}>${i&&n`<div slot=content-end class="danger"><calcite-icon icon=exclamation-mark-triangle scale=s></calcite-icon></div>`||""}</calcite-list-item>`})}</calcite-list>`}})}renderValidationErrors(){return this.formValidationErrors.length&&(!this.selectedCategory||this.formValidationErrors.some(t=>this.selectedCategory===t.category))?n`<calcite-notice open icon=exclamation-mark-triangle class="spacing-y" kind=danger><div slot=message>${this.messages.bannererror??"Some fields are incomplete or contain errors. Check the highlighted fields for details."}</div></calcite-notice>`:null}renderFavoriteClassification(){let t=this.portalClassificationSchema?.attributeCategories?.[0]??"Default";return this.selectedCategory=this.portalClassificationSchema?.attributeCategories?.length?this.selectedCategory:"Default",this.selectedCategory===t?n`<arcgis-portal-classification-favorite .portalItem=${this.pendingPortalItem??this.portalItem} .classificationValue=${this.pendingPortalItem?.classification} .favoriteClassifications=${this.favoriteClassifications} .selectedFavoriteClassificationName=${this.selectedFavoriteClassificationName} .attributeExpressionResults=${this.attributeExpressionResults} .resetFavoriteClassification=${i=>this.updateFavoriteClassification(i)} .updateClassificationData=${async i=>{await this.updateClassificationData(i),this.updateFormValidationErrors(),this.updateIsRequiredErrors()}}></arcgis-portal-classification-favorite>`:null}renderForm(){return this._formCreationTask.render({pending:()=>n`<calcite-loader .label=${this.messages.loading??"loading"}></calcite-loader>`,complete:()=>{if(!this.pendingPortalItem||!this.portalClassificationSchema)return;let t=Object.entries(this.portalClassificationSchema.attributes).sort(([i],[a])=>this.getFormDisplayOrder(i)-this.getFormDisplayOrder(a));return n`${this.renderValidationErrors()}${this.renderFavoriteClassification()}${t.filter(([,{attributeCategory:i}])=>this.selectedCategory===i||!i).map(([i,a])=>{if(this.attributeExpressionResults.get(i)?.enabled===!1)return null;let e=this.pendingPortalItem?.classification?.[i];return n`<arcgis-portal-classification-form-element .attributeKey=${i} .attribute=${a} .value=${e} @arcgisAttributeValueChange=${async s=>{await this.updateClassificationProperty(s.detail),a.isRequired&&!s.detail[i]?this.isRequiredErrors.add(i):this.isRequiredErrors=new Set(Array.from(this.isRequiredErrors).filter(o=>o!==i)),this.updateFormValidationErrors(!0)}} .renderingInfo=${this.attributeExpressionResults.get(i)} .isRequiredErrors=${this.isRequiredErrors}></arcgis-portal-classification-form-element>`})}`}})}renderNotice(t,i="warning"){return n`<calcite-notice icon=exclamation-mark-triangle open class="spacing-y" .kind=${i}><div slot=message>${t}</div></calcite-notice>`}renderHelpTooltip(){return this.portalClassificationSchema?.helpTooltip?n`<calcite-action id=portal-classification-config-tooltip-button .text=${this.portalClassificationSchema?.helpTooltip} icon=information></calcite-action><calcite-popover .label=${this.portalClassificationSchema?.helpTooltip} reference-element=portal-classification-config-tooltip-button placement=bottom-end overlay-positioning=fixed auto-close><div class="header-section__title-popover"><calcite-link .href=${this.portalClassificationSchema?.helpUrl} target=_blank id=portal-classification-config-tooltip-button>${this.portalClassificationSchema?.helpTooltip}</calcite-link></div></calcite-popover>`:null}render(){return this.portalItem?this._classificationDataTask.render({pending:()=>n`<calcite-loader .label=${this.messages.loading??"loading"}></calcite-loader>`,error:()=>this.renderNotice(this.messages.anerroroccurred??"An error has occurred.","danger"),complete:()=>this.portalItem?this.canUserConfigureClassification?this.portalItem.portal.hasClassificationSchema?n`<div class="header-section" role=region aria-label=${this.messages.documentbannerpreview??"documentbannerpreview"??C}><div class="header-section__title-container"><h2 class="header-section__title-text">${this.messages.documentbannerpreview??"documentbannerpreview"}</h2>${this.renderHelpTooltip()}</div>${this._formCreationTask.status===S.COMPLETE&&n`<arcgis-portal-classification-banner .portalItem=${this.pendingPortalItem??this.portalItem} variant=preview .missingExistingClassification=${!this.existingClassification} .autoDestroyDisabled=${this.autoDestroyDisabled} ${m(this.bannerRef)}></arcgis-portal-classification-banner>`||""}</div><div class="form-section">${this.portalClassificationSchema?.attributeCategories?.length&&n`<div class="form-section__sidebar">${this.renderCategoryTabs()}</div>`||""}<div class="form-section__main-content" ${m(this.formMainContentRef)}>${this.renderForm()}</div></div>`:this.renderNotice(this.messages.missingclassificationschema??"Portal is missing classification schema."):this.renderNotice(this.messages.userconfigurepermissionrequired??"User configuration permission is required."):this.renderNotice(this.messages.portalitemrequired??"Portal item is required.")}):this.renderNotice(this.messages.portalitemrequired??"Portal item is required.")}};y("arcgis-portal-classification-config",u);return u},"arcade","core/reactiveUtils",a,c,e,f)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as d}from"./P7YQCAM2.js";import{a as f}from"./KYNL256E.js";import"./VMQIDO4Z.js";import"./QS3GXAIH.js";import"./2GBRZSEC.js";import{a as h}from"./F3M3R7X2.js";import{a as m}from"./O3RR6UMN.js";import"./BTLJZVSE.js";import"./UEL7BVMB.js";import{M as u,S as p,j as n,w as a}from"./BXCQOWAD.js";import"./UZLQALHY.js";export default $arcgis.t(([{substitute:o}])=>{var l=class extends u{constructor(){super(...arguments),this.messages=m({blocking:!0,name:"portal-account-switcher"}),this.tipReference=null,this.tooltipText="",this.linkedAccounts=[],this.interactive=!1,this.signedInUsers=[],this.accountAccess={},this.arcgisAccountSwitch=a(),this.arcgisAccountUnlink=a()}static{this.properties={tipReference:16,tooltipText:16,portal:0,linkedAccounts:0,interactive:5,signedInUsers:0,accountAccess:0}}static{this.styles=h}formatProvider(i){if(i.startsWith("oidc_"))return"OpenID";switch(i){case"arcgis":return"ArcGIS";case"enterprise":return"SAML";case"apple":return"Apple";case"facebook":return"Facebook";case"github":return"GitHub";case"google":return"Google";default:return"Unknown"}}formatSwitchToLabel(i,s,c=!0){let{messages:r}=this;return i.disabled?r.userDisabled:s[i.username]?.allowed??!0?c?i.orgName?o(r.switchToOrgUser,i):o(r.switchToPublicUser,i):r.switchTo:r.userNotAllowed}render(){let{linkedAccounts:i,messages:s,accountAccess:c,interactive:r,portal:$}=this;return n`${d(i,t=>t.id??t.username,t=>n`<calcite-block .label=${t.orgName?`${t.username}, ${t.orgName}`:t.username} heading-level=4 .heading=${t.username} .description=${t.orgName?`${t.fullname}, ${t.orgName}`:t.fullname} class="linked-account"><calcite-avatar slot=content-start inert .fullName=${t.fullname} .username=${t.username} .userId=${t.id} .thumbnail=${f({fullName:t.fullname,...t},$)??void 0}></calcite-avatar><calcite-chip slot=content-end kind=neutral scale=s .label=${this.formatProvider(t.provider)} class="provider-chip">${this.formatProvider(t.provider)}</calcite-chip>${r&&n`<calcite-button appearance=transparent slot=actions-end kind=danger icon-start=unlink .label=${o(t.orgName?s.unlinkOrgUser:s.unlinkPublicUser,t)} .id=${`unlink-${t.username}`} @mouseenter=${e=>{this.tipReference=e.currentTarget,this.tooltipText=s.unlinkAccount}} @mouseleave=${()=>{this.tipReference=null,this.tooltipText=""}} @focusin=${e=>{this.tipReference=e.currentTarget,this.tooltipText=s.unlinkAccount}} @focusout=${()=>{this.tipReference=null,this.tooltipText=""}} @click=${e=>{e.preventDefault(),this.arcgisAccountUnlink.emit({account:t})}}></calcite-button><calcite-button appearance=transparent slot=actions-end kind=neutral icon-start=sign-in .label=${this.formatSwitchToLabel(t,c)} .disabled=${t.disabled||!(c[t.username]?.allowed??!0)} .id=${`switch-${t.username}`} @mouseenter=${e=>{this.tipReference=e.currentTarget,this.tooltipText=this.formatSwitchToLabel(t,c,!1)}} @mouseleave=${()=>{this.tipReference=null,this.tooltipText=""}} @focusin=${e=>{this.tipReference=e.currentTarget,this.tooltipText=this.formatSwitchToLabel(t,c,!1)}} @focusout=${()=>{this.tipReference=null,this.tooltipText=""}} @click=${e=>{e.preventDefault(),this.arcgisAccountSwitch.emit({account:t})}}></calcite-button>`||""}</calcite-block>`)}${r&&n`<calcite-tooltip .open=${!!this.tipReference} .referenceElement=${this.tipReference}>${this.tooltipText}</calcite-tooltip>`||""}`}};p("arcgis-portal-account-switcher-list",l);return l},"intl")
2
+ import{a as d}from"./7HHPKD5C.js";import{a as f}from"./KYNL256E.js";import"./VMQIDO4Z.js";import"./QS3GXAIH.js";import"./2GBRZSEC.js";import{a as h}from"./ZTGGJIVB.js";import{a as m}from"./QLHCXOVQ.js";import"./I2KQQXOO.js";import"./W7O7ZYZ4.js";import{M as u,S as p,j as n,w as a}from"./BTSXQQKZ.js";import"./UZLQALHY.js";export default $arcgis.t(([{substitute:o}])=>{var l=class extends u{constructor(){super(...arguments),this.messages=m({blocking:!0,name:"portal-account-switcher"}),this.tipReference=null,this.tooltipText="",this.linkedAccounts=[],this.interactive=!1,this.signedInUsers=[],this.accountAccess={},this.arcgisAccountSwitch=a(),this.arcgisAccountUnlink=a()}static{this.properties={tipReference:16,tooltipText:16,portal:0,linkedAccounts:0,interactive:5,signedInUsers:0,accountAccess:0}}static{this.styles=h}formatProvider(i){if(i.startsWith("oidc_"))return"OpenID";switch(i){case"arcgis":return"ArcGIS";case"enterprise":return"SAML";case"apple":return"Apple";case"facebook":return"Facebook";case"github":return"GitHub";case"google":return"Google";default:return"Unknown"}}formatSwitchToLabel(i,s,c=!0){let{messages:r}=this;return i.disabled?r.userDisabled:s[i.username]?.allowed??!0?c?i.orgName?o(r.switchToOrgUser,i):o(r.switchToPublicUser,i):r.switchTo:r.userNotAllowed}render(){let{linkedAccounts:i,messages:s,accountAccess:c,interactive:r,portal:$}=this;return n`${d(i,t=>t.id??t.username,t=>n`<calcite-block .label=${t.orgName?`${t.username}, ${t.orgName}`:t.username} heading-level=4 .heading=${t.username} .description=${t.orgName?`${t.fullname}, ${t.orgName}`:t.fullname} class="linked-account"><calcite-avatar slot=content-start inert .fullName=${t.fullname} .username=${t.username} .userId=${t.id} .thumbnail=${f({fullName:t.fullname,...t},$)??void 0}></calcite-avatar><calcite-chip slot=content-end kind=neutral scale=s .label=${this.formatProvider(t.provider)} class="provider-chip">${this.formatProvider(t.provider)}</calcite-chip>${r&&n`<calcite-button appearance=transparent slot=actions-end kind=danger icon-start=unlink .label=${o(t.orgName?s.unlinkOrgUser:s.unlinkPublicUser,t)} .id=${`unlink-${t.username}`} @mouseenter=${e=>{this.tipReference=e.currentTarget,this.tooltipText=s.unlinkAccount}} @mouseleave=${()=>{this.tipReference=null,this.tooltipText=""}} @focusin=${e=>{this.tipReference=e.currentTarget,this.tooltipText=s.unlinkAccount}} @focusout=${()=>{this.tipReference=null,this.tooltipText=""}} @click=${e=>{e.preventDefault(),this.arcgisAccountUnlink.emit({account:t})}}></calcite-button><calcite-button appearance=transparent slot=actions-end kind=neutral icon-start=sign-in .label=${this.formatSwitchToLabel(t,c)} .disabled=${t.disabled||!(c[t.username]?.allowed??!0)} .id=${`switch-${t.username}`} @mouseenter=${e=>{this.tipReference=e.currentTarget,this.tooltipText=this.formatSwitchToLabel(t,c,!1)}} @mouseleave=${()=>{this.tipReference=null,this.tooltipText=""}} @focusin=${e=>{this.tipReference=e.currentTarget,this.tooltipText=this.formatSwitchToLabel(t,c,!1)}} @focusout=${()=>{this.tipReference=null,this.tooltipText=""}} @click=${e=>{e.preventDefault(),this.arcgisAccountSwitch.emit({account:t})}}></calcite-button>`||""}</calcite-block>`)}${r&&n`<calcite-tooltip .open=${!!this.tipReference} .referenceElement=${this.tipReference}>${this.tooltipText}</calcite-tooltip>`||""}`}};p("arcgis-portal-account-switcher-list",l);return l},"intl")
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import c from"./SKRCLDPZ.js";import b from"./T3LU5V74.js";import"./VMQIDO4Z.js";import"./QS3GXAIH.js";import"./2GBRZSEC.js";import{a as f}from"./O3RR6UMN.js";import"./BTLJZVSE.js";import"./UEL7BVMB.js";import{M as d,N as h,P as p,S as g,T as y,h as m,j as a}from"./BXCQOWAD.js";import"./UZLQALHY.js";export default $arcgis.t(([,{b:x}])=>{var $=m`:host{display:inline-flex;align-items:center}:host([scale="s"]){--arcgis-portal-item-type-font-size: var(--calcite-font-size--2);--arcgis-portal-item-type-spacing: 1rem}:host([scale="m"]){--arcgis-portal-item-type-font-size: var(--calcite-font-size--1);--arcgis-portal-item-type-spacing: 1rem}:host([scale="l"]){--arcgis-portal-item-type-font-size: var(--calcite-font-size-0);--arcgis-portal-item-type-spacing: 1rem}.icon{display:block;flex-grow:0;flex-shrink:0;width:var(--arcgis-portal-item-type-spacing);height:var(--arcgis-portal-item-type-spacing)}.text{color:var(--calcite-text-color-2);font-size:var(--arcgis-portal-item-type-font-size);line-height:1.25rem}.text--ellipsis{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.text--spaced{margin-inline-start:calc(var(--arcgis-portal-item-type-spacing) / 2);word-wrap:break-word;word-break:break-word}`,n=class extends d{constructor(){super(...arguments),this.messages=f({blocking:!0}),this.icon=null,this.displayName="",this.displayNameHosted="",this.scale="s"}static{this.properties={icon:16,displayName:16,displayNameHosted:16,item:0,serviceInfo:0,portal:0,user:0,scale:3,hideText:5,hideIcon:5,ellipsis:5,showHosted:5}}static{this.styles=$}async load(){this.item&&await this.getItemDisplayInformation()}async getItemDisplayInformation(){let{messages:o,user:r,serviceInfo:l,portal:e,item:t}=this,{displayName:i,displayNameHosted:c,icon:s}=await x({item:t,messages:o,serviceInfo:l,user:r,portal:e||t.portal});this.displayName=i,this.displayNameHosted=c,this.icon=s}render(){let{showHosted:o,displayNameHosted:r,scale:l,icon:e,hideText:t,hideIcon:i,ellipsis:c}=this;if(!e)return null;let s=o?r:this.displayName,v=s?.includes("(")?"":"&#x202D;",w=y(`./assets/portal-item-type/icons/${e}16.svg`),u=this.hideText?s:void 0;return a`${!i&&a`<span class="icon"><img src=${w??p} alt=${(u||"")??p} class=${`icon icon--${l}`}></span>`||""}${!t&&a`<span class=${h({text:!0,"text--spaced":!i,"text--ellipsis":c})} .innerHTML=${`${v}${s}`}></span>`||""}`}};g("arcgis-portal-item-type",n);return n},b,c)
2
+ import c from"./SKRCLDPZ.js";import b from"./T3LU5V74.js";import"./VMQIDO4Z.js";import"./QS3GXAIH.js";import"./2GBRZSEC.js";import{a as f}from"./QLHCXOVQ.js";import"./I2KQQXOO.js";import"./W7O7ZYZ4.js";import{M as d,N as h,P as p,S as g,T as y,h as m,j as a}from"./BTSXQQKZ.js";import"./UZLQALHY.js";export default $arcgis.t(([,{b:x}])=>{var $=m`:host{display:inline-flex;align-items:center}:host([scale="s"]){--arcgis-portal-item-type-font-size: var(--calcite-font-size--2);--arcgis-portal-item-type-spacing: 1rem}:host([scale="m"]){--arcgis-portal-item-type-font-size: var(--calcite-font-size--1);--arcgis-portal-item-type-spacing: 1rem}:host([scale="l"]){--arcgis-portal-item-type-font-size: var(--calcite-font-size-0);--arcgis-portal-item-type-spacing: 1rem}.icon{display:block;flex-grow:0;flex-shrink:0;width:var(--arcgis-portal-item-type-spacing);height:var(--arcgis-portal-item-type-spacing)}.text{color:var(--calcite-text-color-2);font-size:var(--arcgis-portal-item-type-font-size);line-height:1.25rem}.text--ellipsis{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.text--spaced{margin-inline-start:calc(var(--arcgis-portal-item-type-spacing) / 2);word-wrap:break-word;word-break:break-word}`,n=class extends d{constructor(){super(...arguments),this.messages=f({blocking:!0}),this.icon=null,this.displayName="",this.displayNameHosted="",this.scale="s"}static{this.properties={icon:16,displayName:16,displayNameHosted:16,item:0,serviceInfo:0,portal:0,user:0,scale:3,hideText:5,hideIcon:5,ellipsis:5,showHosted:5}}static{this.styles=$}async load(){this.item&&await this.getItemDisplayInformation()}async getItemDisplayInformation(){let{messages:o,user:r,serviceInfo:l,portal:e,item:t}=this,{displayName:i,displayNameHosted:c,icon:s}=await x({item:t,messages:o,serviceInfo:l,user:r,portal:e||t.portal});this.displayName=i,this.displayNameHosted=c,this.icon=s}render(){let{showHosted:o,displayNameHosted:r,scale:l,icon:e,hideText:t,hideIcon:i,ellipsis:c}=this;if(!e)return null;let s=o?r:this.displayName,v=s?.includes("(")?"":"&#x202D;",w=y(`./assets/portal-item-type/icons/${e}16.svg`),u=this.hideText?s:void 0;return a`${!i&&a`<span class="icon"><img src=${w??p} alt=${(u||"")??p} class=${`icon icon--${l}`}></span>`||""}${!t&&a`<span class=${h({text:!0,"text--spaced":!i,"text--ellipsis":c})} .innerHTML=${`${v}${s}`}></span>`||""}`}};g("arcgis-portal-item-type",n);return n},b,c)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as b,d as k}from"./VMQIDO4Z.js";import"./QS3GXAIH.js";import"./2GBRZSEC.js";import{K as c,L as h,M as g,O as f,P as $,S as d,h as m,j as l}from"./BXCQOWAD.js";import"./UZLQALHY.js";var E=/^#[0-9a-f]{3}$/iu,x=/^#[0-9a-f]{6}$/iu;function u(o){return I(o)||v(o)}function I(o){return o?.length===4&&E.test(o)}function v(o){return o?.length===7&&x.test(o)}function O(o){if(!u(o))return null;let t=o.replace("#","");if(t.length===3){let[e,i,r]=t.split("");return{r:Number.parseInt(`${e}${e}`,16),g:Number.parseInt(`${i}${i}`,16),b:Number.parseInt(`${r}${r}`,16)}}return{r:Number.parseInt(t.slice(0,2),16),g:Number.parseInt(t.slice(2,4),16),b:Number.parseInt(t.slice(4,6),16)}}function w(o){let t=0;for(let i=0;i<o.length;i++)t=o.charCodeAt(i)+((t<<5)-t);let e="#";for(let i=0;i<3;i++){let r=t>>i*8&255;e+=`00${r.toString(16)}`.slice(-2)}return e}function y(o){let{r:t,g:e,b:i}=o;t/=255,e/=255,i/=255;let r=Math.max(t,e,i),n=Math.min(t,e,i),s=r-n;if(s===0)return 0;let a=0;switch(r){case t:a=(e-i)/s+(e<i?6:0);break;case e:a=(i-t)/s+2;break;default:a=(t-e)/s+4;break}return Math.round(a*60)}function M(o){let t=O(o);return t?y(t):0}var T=m`:host{display:inline-block}:host([scale="s"]){height:1.5rem;width:1.5rem;font-size:.625rem}:host([scale="m"]){height:2rem;width:2rem;font-size:.75rem}:host([scale="l"]){font-size:1rem;height:2.75rem;width:2.75rem}:host([scale="xl"]){font-size:1.25rem;height:4rem;width:4rem}.icon{display:flex;color:var(--calcite-color-text-3)}.background{position:relative;display:flex;height:100%;width:100%;align-items:center;justify-content:center}.initials{position:absolute;font-weight:700;text-transform:uppercase;color:var(--calcite-color-text-2)}.thumbnail{height:100%;width:100%}.tooltip-text{margin:0;padding:0;font-size:.75rem;color:var(--calcite-color-text-2)}calcite-tooltip{pointer-events:none}`,p=class extends g{constructor(){super(...arguments),this.imageEl=c(),this.fallbackEl=c(),this.tooltipEl=c(),this.imageError=!1,this.tooltipOpen=!1,this.tooltip=!1,this.scale="m"}static{this.properties={imageError:16,tooltipOpen:16,group:0,portal:0,tooltip:5,scale:3}}static{this.styles=T}willUpdate(t){t.has("group")&&(this.imageError=!1)}updated(){let t=this.tooltipEl.value,e=this.imageEl.value||this.fallbackEl.value;t&&e&&(t.referenceElement=e)}isDarkMode(){return!!this.el.closest(".calcite-mode-dark")}getThumbnailURI(){let{group:t,portal:e}=this;if(!t)return null;if(t.thumbnailUrl)return t.thumbnailUrl;let i=t.thumbnail;if(!i)return null;if(i.startsWith("http"))return i;if(!e||!t.id)return null;let r=k(e),n=r?`?token=${r}`:"";return`${b(e)}community/groups/${t.id}/info/${i}${n}`}generateFillColor(){let{id:t,title:e}=this.group||{},i=t?`#${t.slice(Math.max(0,t.length-6))}`:"",r=t&&u(i)?i:w(e||"");if(!t&&!e||!u(r))return"var(--calcite-color-foreground-2)";let n=M(r),s=this.isDarkMode()?20:90;return`hsl(${n}, 60%, ${s}%)`}generateInitials(){let t=this.group?.title?.trim().charAt(0);return t?.match(/^\w+$/u)?t:null}getIconScale(){return this.scale==="xl"?"l":this.scale==="xs"?"s":this.scale}renderTooltip(){return!this.tooltip||!this.group?.title?null:l`<calcite-tooltip .open=${this.tooltipOpen} close-on-click placement=bottom-start offset-distance=6 offset-skidding=0 ${h(this.tooltipEl)}><p class="tooltip-text">${this.group.title}</p></calcite-tooltip>`}render(){let t=this.getThumbnailURI();if(t&&!this.imageError)return l`<img class="thumbnail" src=${t??$} alt @error=${()=>{this.imageError=!0}} @mouseenter=${()=>{this.tooltipOpen=!0}} @mouseleave=${()=>{this.tooltipOpen=!1}} @focusin=${()=>{this.tooltipOpen=!0}} @focusout=${()=>{this.tooltipOpen=!1}} ${h(this.imageEl)}>${this.renderTooltip()}`;let e=this.generateInitials();return l`<span class="background" style=${f({backgroundColor:this.generateFillColor()})} @mouseenter=${()=>{this.tooltipOpen=!0}} @mouseleave=${()=>{this.tooltipOpen=!1}} @focusin=${()=>{this.tooltipOpen=!0}} @focusout=${()=>{this.tooltipOpen=!1}} ${h(this.fallbackEl)}>${e?l`<span aria-hidden=true class="initials">${e}</span>`:l`<calcite-icon class="icon" icon=users .scale=${this.getIconScale()}></calcite-icon>`}</span>${this.renderTooltip()}`}};d("arcgis-portal-group-thumbnail",p);export{p as ArcgisPortalGroupThumbnail};
2
+ import{a as b,d as k}from"./VMQIDO4Z.js";import"./QS3GXAIH.js";import"./2GBRZSEC.js";import{K as c,L as h,M as g,O as f,P as $,S as d,h as m,j as l}from"./BTSXQQKZ.js";import"./UZLQALHY.js";var E=/^#[0-9a-f]{3}$/iu,x=/^#[0-9a-f]{6}$/iu;function u(o){return I(o)||v(o)}function I(o){return o?.length===4&&E.test(o)}function v(o){return o?.length===7&&x.test(o)}function O(o){if(!u(o))return null;let t=o.replace("#","");if(t.length===3){let[e,i,r]=t.split("");return{r:Number.parseInt(`${e}${e}`,16),g:Number.parseInt(`${i}${i}`,16),b:Number.parseInt(`${r}${r}`,16)}}return{r:Number.parseInt(t.slice(0,2),16),g:Number.parseInt(t.slice(2,4),16),b:Number.parseInt(t.slice(4,6),16)}}function w(o){let t=0;for(let i=0;i<o.length;i++)t=o.charCodeAt(i)+((t<<5)-t);let e="#";for(let i=0;i<3;i++){let r=t>>i*8&255;e+=`00${r.toString(16)}`.slice(-2)}return e}function y(o){let{r:t,g:e,b:i}=o;t/=255,e/=255,i/=255;let r=Math.max(t,e,i),n=Math.min(t,e,i),s=r-n;if(s===0)return 0;let a=0;switch(r){case t:a=(e-i)/s+(e<i?6:0);break;case e:a=(i-t)/s+2;break;default:a=(t-e)/s+4;break}return Math.round(a*60)}function M(o){let t=O(o);return t?y(t):0}var T=m`:host{display:inline-block}:host([scale="s"]){height:1.5rem;width:1.5rem;font-size:.625rem}:host([scale="m"]){height:2rem;width:2rem;font-size:.75rem}:host([scale="l"]){font-size:1rem;height:2.75rem;width:2.75rem}:host([scale="xl"]){font-size:1.25rem;height:4rem;width:4rem}.icon{display:flex;color:var(--calcite-color-text-3)}.background{position:relative;display:flex;height:100%;width:100%;align-items:center;justify-content:center}.initials{position:absolute;font-weight:700;text-transform:uppercase;color:var(--calcite-color-text-2)}.thumbnail{height:100%;width:100%}.tooltip-text{margin:0;padding:0;font-size:.75rem;color:var(--calcite-color-text-2)}calcite-tooltip{pointer-events:none}`,p=class extends g{constructor(){super(...arguments),this.imageEl=c(),this.fallbackEl=c(),this.tooltipEl=c(),this.imageError=!1,this.tooltipOpen=!1,this.tooltip=!1,this.scale="m"}static{this.properties={imageError:16,tooltipOpen:16,group:0,portal:0,tooltip:5,scale:3}}static{this.styles=T}willUpdate(t){t.has("group")&&(this.imageError=!1)}updated(){let t=this.tooltipEl.value,e=this.imageEl.value||this.fallbackEl.value;t&&e&&(t.referenceElement=e)}isDarkMode(){return!!this.el.closest(".calcite-mode-dark")}getThumbnailURI(){let{group:t,portal:e}=this;if(!t)return null;if(t.thumbnailUrl)return t.thumbnailUrl;let i=t.thumbnail;if(!i)return null;if(i.startsWith("http"))return i;if(!e||!t.id)return null;let r=k(e),n=r?`?token=${r}`:"";return`${b(e)}community/groups/${t.id}/info/${i}${n}`}generateFillColor(){let{id:t,title:e}=this.group||{},i=t?`#${t.slice(Math.max(0,t.length-6))}`:"",r=t&&u(i)?i:w(e||"");if(!t&&!e||!u(r))return"var(--calcite-color-foreground-2)";let n=M(r),s=this.isDarkMode()?20:90;return`hsl(${n}, 60%, ${s}%)`}generateInitials(){let t=this.group?.title?.trim().charAt(0);return t?.match(/^\w+$/u)?t:null}getIconScale(){return this.scale==="xl"?"l":this.scale==="xs"?"s":this.scale}renderTooltip(){return!this.tooltip||!this.group?.title?null:l`<calcite-tooltip .open=${this.tooltipOpen} close-on-click placement=bottom-start offset-distance=6 offset-skidding=0 ${h(this.tooltipEl)}><p class="tooltip-text">${this.group.title}</p></calcite-tooltip>`}render(){let t=this.getThumbnailURI();if(t&&!this.imageError)return l`<img class="thumbnail" src=${t??$} alt @error=${()=>{this.imageError=!0}} @mouseenter=${()=>{this.tooltipOpen=!0}} @mouseleave=${()=>{this.tooltipOpen=!1}} @focusin=${()=>{this.tooltipOpen=!0}} @focusout=${()=>{this.tooltipOpen=!1}} ${h(this.imageEl)}>${this.renderTooltip()}`;let e=this.generateInitials();return l`<span class="background" style=${f({backgroundColor:this.generateFillColor()})} @mouseenter=${()=>{this.tooltipOpen=!0}} @mouseleave=${()=>{this.tooltipOpen=!1}} @focusin=${()=>{this.tooltipOpen=!0}} @focusout=${()=>{this.tooltipOpen=!1}} ${h(this.fallbackEl)}>${e?l`<span aria-hidden=true class="initials">${e}</span>`:l`<calcite-icon class="icon" icon=users .scale=${this.getIconScale()}></calcite-icon>`}</span>${this.renderTooltip()}`}};d("arcgis-portal-group-thumbnail",p);export{p as ArcgisPortalGroupThumbnail};