@arcgis/portal-components 5.1.0-next.54 → 5.1.0-next.55

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 (65) hide show
  1. package/dist/cdn/37ZQQP3E.js +2 -0
  2. package/dist/cdn/3OTUKLZI.js +2 -0
  3. package/dist/cdn/{OLQ432RE.js → A6YUOK3J.js} +1 -1
  4. package/dist/cdn/AJZHPBED.js +2 -0
  5. package/dist/cdn/CQYRDCAS.js +2 -0
  6. package/dist/cdn/{VGBWDFZT.js → DBENQABR.js} +1 -1
  7. package/dist/cdn/{TU5JIOHN.js → E5QVAI6E.js} +1 -1
  8. package/dist/cdn/{6OLXILWA.js → EVOIJL6Z.js} +1 -1
  9. package/dist/cdn/{QVXQMXLU.js → GPSI4ROI.js} +1 -1
  10. package/dist/cdn/{P7WBU7KL.js → GWHFVZ3O.js} +1 -1
  11. package/dist/cdn/JA7IJOC7.js +2 -0
  12. package/dist/cdn/JI4ITHDM.js +2 -0
  13. package/dist/cdn/{OM7K22G5.js → JZGIPSEH.js} +1 -1
  14. package/dist/cdn/LKSVLCAW.js +60 -0
  15. package/dist/cdn/{4MBNZKKB.js → MEE5ZP4M.js} +1 -1
  16. package/dist/cdn/PA26Q7CJ.js +2 -0
  17. package/dist/cdn/{UMUGJED2.js → RBDKEFSK.js} +1 -1
  18. package/dist/cdn/S2PHM4WZ.js +2 -0
  19. package/dist/cdn/{YY4M3XQ4.js → TZYWAETV.js} +1 -1
  20. package/dist/cdn/{JTX53F4S.js → UVUVRFDE.js} +1 -1
  21. package/dist/cdn/UXUVTFIJ.js +2 -0
  22. package/dist/cdn/{LH3LANGS.js → WZGUYBTB.js} +1 -1
  23. package/dist/cdn/{VQUHRNHT.js → YNYDJOWH.js} +1 -1
  24. package/dist/cdn/assets/portal-ai-assistant/t9n/messages.en.json +1 -0
  25. package/dist/cdn/index.js +1 -1
  26. package/dist/cdn/main.css +1 -1
  27. package/dist/chunks/common.js +1 -1
  28. package/dist/chunks/fieldAddDelete.js +14 -13
  29. package/dist/chunks/item.js +16 -20
  30. package/dist/chunks/portal.js +16 -0
  31. package/dist/chunks/user.js +113 -0
  32. package/dist/components/arcgis-portal-ai-assistant/customElement.d.ts +76 -0
  33. package/dist/components/arcgis-portal-ai-assistant/customElement.js +333 -0
  34. package/dist/components/arcgis-portal-ai-assistant/index.d.ts +1 -0
  35. package/dist/components/arcgis-portal-ai-assistant/index.js +9 -0
  36. package/dist/components/arcgis-portal-field-delete/customElement.js +1 -1
  37. package/dist/components/arcgis-portal-mentionable-text-area/customElement.d.ts +73 -0
  38. package/dist/components/arcgis-portal-mentionable-text-area/customElement.js +205 -0
  39. package/dist/components/arcgis-portal-mentionable-text-area/index.d.ts +1 -0
  40. package/dist/components/arcgis-portal-mentionable-text-area/index.js +8 -0
  41. package/dist/components/arcgis-portal-mentionable-text-area/types.d.ts +5 -0
  42. package/dist/components/arcgis-portal-replacement-item-redirect/customElement.js +1 -1
  43. package/dist/components/arcgis-user-avatar/customElement.d.ts +57 -0
  44. package/dist/components/arcgis-user-avatar/customElement.js +63 -0
  45. package/dist/components/arcgis-user-avatar/index.d.ts +1 -0
  46. package/dist/components/arcgis-user-avatar/index.js +2 -0
  47. package/dist/docs/api.json +1 -1
  48. package/dist/docs/docs.json +1 -1
  49. package/dist/docs/vscode.html-custom-data.json +1 -1
  50. package/dist/docs/web-types.json +1 -1
  51. package/dist/index.d.ts +24 -0
  52. package/dist/loader.js +3 -0
  53. package/dist/types/group.d.ts +51 -0
  54. package/dist/types/item.d.ts +4 -0
  55. package/dist/types/lumina.d.ts +22 -0
  56. package/dist/types/preact.d.ts +25 -0
  57. package/dist/types/react.d.ts +28 -0
  58. package/dist/types/stencil.d.ts +22 -0
  59. package/dist/types/ui.d.ts +8 -0
  60. package/dist/types/user.d.ts +74 -0
  61. package/package.json +4 -3
  62. package/dist/cdn/4K5FRH7Q.js +0 -2
  63. package/dist/cdn/GPE3KZNW.js +0 -2
  64. package/dist/cdn/GVEUS7RX.js +0 -2
  65. package/dist/cdn/RALY4IZG.js +0 -2
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import a from"./3OTUKLZI.js";import"./S2PHM4WZ.js";import{d as R}from"./AJZHPBED.js";import{A as M,B as S,E,H as P,I as g,J as D,K as v,P as L,h as k,j as m,l as A,u as d}from"./GWHFVZ3O.js";export default $arcgis.t(([{a:x,c:q}])=>{var O=(r,e=100)=>{let s;return(...n)=>{let a=()=>{clearTimeout(s),r(...n)};clearTimeout(s),s=setTimeout(a,e)}};var U=M(class extends S{constructor(){super(...arguments),this.key=A}render(r,e){return this.key=r,e}update(r,[e,s]){return e!==this.key&&(E(r),this.key=e),s}});var $=["@","#","$"],N=400;function K(r,e){let s=null;for(let n of e){let a=n.replace(/[.*+?^${}()|[\]\\]/gu,"\\$&"),i=new RegExp(`${a}"([^"\\n]*)"?$`,"u"),t=r.match(i);if(t){let c=t[0],l=r.length-c.length,u=t[1]??"";(!s||l>s.startIndex)&&(s={starter:n,mentionText:c,query:u,startIndex:l})}let o=new RegExp(`${a}[\\p{L}\\p{N}_-]+$`,"u"),h=r.match(o);if(h){let c=h[0],l=r.length-c.length,u=c.slice(n.length);(!s||l>s.startIndex)&&(s={starter:n,mentionText:c,query:u,startIndex:l})}}return s}async function V(r,e={}){return await r.queryGroups(e)}var Q=async(r,e,s)=>{try{return{result:await r.queryItems({...s,query:`title:${e}`})}}catch(n){return console.error(n),{error:{code:"unhandledError"}}}},_=r=>$.includes(r)?r:"@",G=R(r=>{let e=[],s=async i=>await x({requester:async()=>await Q(r.portal,i,{num:3}),key:"items",id:i}),n=async i=>await x({requester:async()=>await V(r.portal,{query:`title:${i}`,num:3}),key:"groups",id:i}),a=O(async(i,t)=>{r.isFetchingEntities=!0;let o=i.toLowerCase();switch(_(t)){case"@":r.filteredItemsInfo={type:"user",items:e.filter(l=>l.username?.toLowerCase().includes(o)||l.fullName?.toLowerCase().includes(o)).slice(0,10)};break;case"#":let{result:h}=await s(o);r.filteredItemsInfo={type:"item",items:h?.results??[]};break;case"$":let{results:c}=await n(o);r.filteredItemsInfo={type:"group",items:c};break}(r.filteredItemsInfo?.items?.length??0)===0&&await r.closePopover(),r.isFetchingEntities=!1},N);return{fetchUsers:async()=>{try{let{users:i}=await q(r.portal);e=i??[]}catch(i){e=[],console.error("error fetching org users:",i)}},filterItems:a,getItemText:(i,t)=>{let o="";switch(_(t)){case"@":o=i.username;break;case"#":o=i.title??"";break;case"$":o=i.title??"";break}return o.trim()}}}),y=({id:r,label:e,selected:s,description:n,contentStart:a,onSelect:i})=>U(r,m`<calcite-list-item class=${v({selected:s})} .label=${e} .description=${n} .selected=${s} @pointerdown=${async t=>{t.preventDefault(),t.stopPropagation(),await i()}} ${g(t=>{s&&t&&t.scrollIntoView({block:"nearest",behavior:"smooth"})})}>${a}</calcite-list-item>`),j=k`.selected{--calcite-list-background-color: var(--calcite-color-foreground-2)}.mentionable-list{max-height:13rem;overflow-y:auto;padding:.25rem;width:min(100vw,24rem)}.mentionable-list--loading{min-height:10rem}`,w=class extends D{constructor(){super(...arguments),this.calciteTextAreaRef=P(),this.mentionableEntityController=G(this),this.handleInput=e=>{let{bubbleNewValueChange:s,checkForMention:n}=this,a=e.target.value;this._value=a,s(this._value);let i=this.nativeTextAreaRef?.selectionStart??0;n(a,i)},this.handleKeyDown=e=>{if(!this.popoverOpen){this.arcgisUserMentionableTextAreaKeyDown.emit(e),this.arcgisMentionableTextAreaKeyDown.emit(e);return}switch(e.key){case"ArrowDown":e.preventDefault(),this.selectedItemIndex=Math.min(this.selectedItemIndex+1,this.filteredItems.length-1);break;case"ArrowUp":e.preventDefault(),this.selectedItemIndex=Math.max(this.selectedItemIndex-1,0);break;case"Enter":e.preventDefault(),this.selectItem(this.filteredItems[this.selectedItemIndex]);break;case"Escape":e.preventDefault(),this.closePopover.bind(this)();break}},this.handleClosePopover=()=>{this.popoverOpen=!1,this.currentMentionQuery="",this.selectedItemIndex=0,this.currentStarter=null},this.bubbleNewValueChange=e=>{this.arcgisUserMentionableTextAreaChange.emit(e),this.arcgisMentionableTextAreaChange.emit(e)},this.checkForMention=(e,s)=>{let n=e.substring(0,s),a=K(n,this.starters??$);if(a){let{starter:i}=a;this.currentStarter=i,this.filterMentionItems(a),this.popoverOpen=!0;return}this.handleClosePopover()},this.filterMentionItems=e=>{let{mentionText:s,query:n,starter:a,startIndex:i}=e;this.currentMentionQuery=s,this.mentionStartPosition=i;let t=n.toLowerCase();this.mentionableEntityController.filterItems(t,a),this.selectedItemIndex=0},this.popoverOpen=!1,this.currentMentionQuery="",this.mentionStartPosition=0,this.selectedItemIndex=0,this.currentStarter=null,this._value="",this.filteredItemsInfo=null,this.isFetchingEntities=!1,this.popoverPlacement="bottom-start",this.disabled=!1,this.scale="m",this.rows=3,this.starters=$,this.readOnly=!1,this.arcgisMentionableSelectedIndexChange=d(),this.arcgisMentionableTextAreaChange=d(),this.arcgisMentionableTextAreaKeyDown=d(),this.arcgisUserMentionableTextAreaChange=d(),this.arcgisUserMentionableTextAreaKeyDown=d(),this.renderItemInfo=()=>{let{filteredItemsInfo:e,selectedItemIndex:s,portal:n}=this;if(!e)return null;let{items:a,type:i}=e;switch(i){case"user":return a.map((t,o)=>y({id:t.id,label:`@${t.username}`,description:t.fullName,selected:o===s,contentStart:m`<arcgis-user-avatar slot=content-start .user=${t} .portal=${n} scale=m></arcgis-user-avatar>`,onSelect:async()=>await this.selectItem(t)}));case"item":return a.map((t,o)=>y({id:t.id??`item-${o}`,label:`#${t.title}`,description:t.id??void 0,selected:o===s,onSelect:async()=>await this.selectItem(t),contentStart:m`<calcite-avatar slot=content-start .fullName=${t.title??void 0} .thumbnail=${t.thumbnailUrl??void 0} scale=m></calcite-avatar>`}));case"group":return a.map((t,o)=>y({id:t.id??`group-${o}`,label:`${t.title}`,description:t.id??void 0,selected:o===s,onSelect:async()=>await this.selectItem(t),contentStart:m`<calcite-avatar slot=content-start .fullName=${t.title??void 0} .thumbnail=${t.thumbnailUrl??void 0} scale=m></calcite-avatar>`}))}}}static{this.properties={popoverOpen:16,currentMentionQuery:16,mentionStartPosition:16,selectedItemIndex:16,currentStarter:16,_value:16,filteredItemsInfo:16,isFetchingEntities:16,popoverListLabel:1,popoverPlacement:1,disabled:5,portal:0,user:0,scale:1,value:1,maxLength:9,rows:9,starters:0,placeholder:1,readOnly:5}}static{this.styles=j}get filteredItems(){return this.filteredItemsInfo?.items??[]}async closePopover(){this.handleClosePopover()}async focusTextArea(){await this.calciteTextAreaRef.value?.setFocus()}async selectItem(e){let{currentStarter:s,_value:n,mentionStartPosition:a,currentMentionQuery:i,handleClosePopover:t,calciteTextAreaRef:o,nativeTextAreaRef:h,bubbleNewValueChange:c}=this;if(!e||!s)return;let l=this.mentionableEntityController.getItemText(e,s).replaceAll('"',"").trim(),u=/\s/u.test(l)?`${s}"${l}"`:`${s}${l}`,f=(n??"").substring(0,a),p=(n??"").substring(a+i.length),I=`${f}${u} ${p}`;this._value=I,c(this._value);let b=a+u.length+1;t(),await this.updateComplete,o.value?.setFocus(),h&&(h.selectionEnd=b)}willUpdate(e){e.has("value")&&(this._value=this.value??""),e.has("selectedItemIndex")&&this.arcgisMentionableSelectedIndexChange.emit(this.selectedItemIndex)}loaded(){this.updateComplete.then(()=>{let e=this.calciteTextAreaRef.value?.shadowRoot?.querySelector("textarea");e&&(this.nativeTextAreaRef=e)}),this.mentionableEntityController.fetchUsers()}render(){let{popoverPlacement:e,scale:s,_value:n,maxLength:a,rows:i,placeholder:t,readOnly:o,popoverOpen:h,closePopover:c,handleInput:l,handleKeyDown:u,disabled:f,isFetchingEntities:p,filteredItemsInfo:I,renderItemInfo:b,popoverListLabel:T}=this,C=this.calciteTextAreaRef.value,F=I?.items??[];return m`<calcite-text-area .placeholder=${t} .value=${n} .maxLength=${a} .rows=${i} .scale=${s} .readOnly=${o} .disabled=${f} @blur=${c} @calciteTextAreaInput=${l} @keydown=${u} ${g(this.calciteTextAreaRef)}></calcite-text-area>${C&&m`<calcite-popover .open=${h} .placement=${e} class="mention-popover" .label=${T} .referenceElement=${C} trigger-disabled pointer-disabled focus-trap-disabled><div class=${v({"mentionable-list":!0,"mentionable-list--loading":p})}>${p&&m`<calcite-scrim .loading=${p}></calcite-scrim>`||""}${F.length>0&&m`<calcite-list .label=${T}>${b()}</calcite-list>`||""}</div></calcite-popover>`||""}`}};L("arcgis-portal-mentionable-text-area",w);return w},a)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import{a as u,b as g,c as k}from"./S2PHM4WZ.js";export default $arcgis.t(([q,x])=>{var c={},l={},d={};async function y({requester:t,key:r,id:o,cacheOption:a}){let e=d[r]?.[o]?.expireAt,n=!!e&&new Date().getTime()>e;if(c[r]?.[o]&&!n)return c[r][o];l[r]||(l[r]={}),(!l[r][o]||n)&&(l[r][o]=t());let i=await l[r][o];if(c[r]||(c[r]={}),d[r]||(d[r]={}),c[r][o]=i,a){let{expireAfter:m,getExpireAfterFromResult:s}=a,f=s||m?new Date().getTime()+(s?.(i)??m??0):null;d[r][o]={...d[r][o],expireAt:f}}return i}async function A({url:t,portal:r,params:o={},options:a={},method:e,abortControllerId:n,excludeJson:i}){let m=T(n)?.signal,{customToken:s,addTokenManually:f,addSSL:S,useProxy:b}=a,w={...o};if(!t.includes("f=")&&!i&&(w.f="json"),s)w.token=s;else if(f!==!1){let h=await E(r);h&&(w.token=h)}let C=S?M(t,r):t,P={query:w,method:e||"auto",...a,timeout:a.timeout||0,useProxy:b,...a?.disableIdentityLookup?{authMode:"anonymous"}:{}},$=await x(C,{signal:m,...P});return n&&(p[n]=void 0),$.data}var p={};function T(t){if(t)return p[t]&&p[t].abort(),p[t]=new AbortController,p[t]}var E=async t=>{let r=k(t);if(!t?.isPortal||!r)return g(t);let o=t?.user;if(!o&&r)return;let{token:a}=await y({requester:async()=>await I(t),key:"platformSelf",id:o?.id??t.id??"<unknown>",cacheOption:{getExpireAfterFromResult:e=>e.expires_in}});return a},I=async t=>{let r={"X-Esri-Auth-Client-Id":await L(t),"X-Esri-Auth-Redirect-Uri":window.location.href.replace(/#.*$/u,"")};return(await x(`${u(t)}/oauth2/platformSelf`,{authMode:"no-prompt",headers:r,withCredentials:!0,method:"post"})).data},L=async t=>(await y({requester:async()=>await q.getCredential(u(t),{oAuthPopupConfirmation:!1}),key:"credential",id:t.user?.id??"<unknown>"})).oAuthState?.appId??"arcgisonline";function M(t,r){return window.location.protocol==="https:"||r.allSSL?t.replace("http:","https:"):t}async function D(t,r,o){let a=`${o?"https://www.arcgis.com/sharing/rest/":u(r)}community/users/${t}`,e=a?.includes("www.arcgis.com")&&r.isPortal,n=a?.includes(".arcgis.com")&&!r.isPortal&&!r.user,i=e||n?{disableIdentityLookup:!0,addTokenManually:!1}:{};return await y({requester:async()=>{try{return await A({url:a,portal:r,options:i})}catch{return{username:t}}},key:"user",id:a})}var U=async t=>{let r=`${u(t)}/portals/${t.id}/users`;return await A({url:r,portal:t,params:{num:100,sortField:"lastlogin",sortOrder:"desc"}})};return{a:y,b:D,c:U}},"identity/IdentityManager","request")
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{d as r}from"./GVEUS7RX.js";import{P as o}from"./P7WBU7KL.js";var s=r(o);export{s as a};
2
+ import{f as r}from"./AJZHPBED.js";import{Q as o}from"./GWHFVZ3O.js";var s=r(o);export{s as a};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import{a as O,b as P,c as N,d as g,e as v,f as A,g as T,n as b,s as E,t as $,v as k}from"./GWHFVZ3O.js";var Q=(...e)=>{let s=[];for(let o=0;o<e.length;++o){let n=e[o];if(typeof n=="string")s.push(n);else if(Array.isArray(n))s.push.apply(s,n);else if(typeof n=="object")for(let r in n)n[r]&&s.push(r)}let t=s.join(" ");return s.length=0,t},R=(e,s)=>{let t=e;for(;t;){if(t===s)return!0;if(!t.parentNode)return!1;t.parentNode instanceof ShadowRoot?t=t.parentNode.host:t=t.parentNode}return!1},h=(e,s,t)=>{let o=U(s).subscribe;return o(n=>{n.some(i=>R(e,i.target))&&t()})},y={},U=e=>{let s=e.join(","),t=y[s];if(t!==void 0)return t;let o=new Set,n=new MutationObserver(i=>o.forEach(a=>a(i)));globalThis.document&&n.observe(document.documentElement,{attributes:!0,attributeFilter:e,subtree:!0});let r={subscribe:i=>(o.add(i),()=>{o.delete(i),o.size===0&&(n.disconnect(),y[s]=void 0)})};return y[s]=r,r},G=(e,s)=>{let t=e;for(;t;){let o=t.closest?.(s);if(o)return o;let n=t.getRootNode?.();if(n===globalThis.document)return;t=n?.host}};var f=(e,s,t)=>G(e,`[${s}]`)?.getAttribute(s)??t;var M=e=>(...s)=>{let t=v(),o=new e(...s),n=o.exports;g(t.at(-1));let r=o.component.manager;r.W(o,n),o.watchExports(r.W.bind(r,o)),A(o);let i=[o.component,...t].reverse();return E(i,a=>a===void 0?void 0:W(o,a,n),n)},W=(e,{host:s,key:t,isReactive:o},n)=>{let r=s,i=r[t]!==e.exports,a=r[t]!==n,c=n!==e.exports;if(i&&!a&&c&&(r[t]=e.exports),s===e.component){if(o){let l=e.component.manager;a&&l.W(e,r[t]),e.onUpdate(d=>{if(d.has(t)){let w=r[t];w!==e.exports&&l.W(e,w)}})}e.O=o?void 0:t}let u=e.component.constructor.elementProperties.get(t)?.readOnly;e.watchExports(()=>{r[t]!==e.exports&&(u?T(()=>{r[t]=e.exports}):r[t]=e.exports)})};var H="ar,bg,bs,ca,cs,da,de,el,en,es,et,fi,fr,he,hr,hu,id,it,ja,ko,lt,lv,nl,nb,no,pl,pt-BR,pt-PT,ro,ru,sk,sl,sr,sv,th,tr,uk,vi,zh-CN,zh-HK,zh-TW".split(","),K=new Set(H),m="en",I={pt:"pt-PT",nb:"no",nn:"no",zh:"zh-CN"},q=async(e,s,t="")=>{let o=`${s}/${t}`,n=`${o}${e}.json`;return C[n]??(C[n]=_(e,o)),await C[n]},C={},_=async(e,s)=>{let t=`${s}${e}.json`;try{let o=await fetch(t);if(o.ok)return await o.json()}catch(o){return b("error","intl",`An unknown error occurred while fetching localization strings at ${t}`,{detail:{error:o}}),{}}return e===m?{}:await _(m,s)},x=e=>{let s=f(e,"lang",globalThis.navigator?.language||m);return{lang:s,t9nLocale:D(s)}},D=e=>{let[s,t]=e.split("-"),o=s.toLowerCase(),n=o;return t&&(n=`${o}-${t.toUpperCase()}`),n=I[n]??n,K.has(n)?n:t?D(o):m},S=(e,s,t,o)=>{let n,r=()=>B(e,s(),o).then(i=>{(n?.lang!==i.lang||n.t9nLocale!==i.t9nLocale||n.t9nStrings!==i.t9nStrings)&&t(i),n=i}).catch(i=>{b("error","intl","Error updating component locale state",{detail:{error:i}})});return queueMicrotask(r),h(e,["lang"],r)},B=async(e,s,t=e.localName.split("-").slice(1).join("-"))=>{let{lang:o,t9nLocale:n}=x(e),r=`${s}/${t}/t9n`,a=t===null?{}:await q(n,r,"messages.");return{lang:o,t9nLocale:n,t9nStrings:a}};var F=e=>z(void 0,e),ht=e=>s=>z(s,e),L=class extends k{constructor(s,t){super(s);let o=this.exports;try{P(this.component);let n=t(this.component,this),r=this.exports!==o;if(O(n)){r||this.setProvisionalExports(n);let i=n.then(a=>{this.exports=a,super.catchUpLifecycle()}).catch(a=>{this.P.reject(a)});this.onLoad(async()=>await i)}else(!r||n!==void 0)&&(this.exports=n),queueMicrotask(()=>super.catchUpLifecycle())}catch(n){this.P.reject(n)}}catchUpLifecycle(){}},z=M(L);var j="ltr",ft=()=>F((e,s)=>{s.exports=j,s.onLifecycle(()=>{let t=()=>{let o=f(e.el,"dir",j);s.exports=o==="rtl"?"rtl":"ltr"};return t(),h(e.el,["dir"],t)})}),mt=e=>(s={})=>F((t,o)=>{let n=x(t.el),r={_lang:n.lang,_t9nLocale:n.t9nLocale,_loading:!0},i=t;o.onLifecycle(()=>S(t.el,()=>e("./assets"),({t9nLocale:c,t9nStrings:p,lang:u})=>{let l={...p,_lang:u,_t9nLocale:c,_loading:!1};o.exports=l;let d=p.componentLabel;typeof d=="string"&&"label"in t&&t.label==null&&(t.label??=d),a(i.messageOverrides)},s.name));let a=c=>{let p=o.exports,u=p._original??p,l=V(u,c);c&&(l._original=u),o.exports=l};return"messageOverrides"in i&&o.onUpdate(c=>{c.has("messageOverrides")&&a(i.messageOverrides)}),s.blocking?(o.setProvisionalExports(r,!1),o.ready):r}),V=(e,s)=>{if(!s)return e;let t={...e};return Object.entries(s).forEach(([o,n])=>{e[o]!==void 0&&(typeof n=="object"?t[o]=V(e[o],n):t[o]=n??e[o])}),t},gt=e=>X,J="arcgisPropertyChange",X=(...e)=>{let s=N(),t=$(J,void 0,s),o=!0;return s.manager.onUpdated(n=>{if(o||!s.el.isConnected){o=!1;return}for(let r of e)n.has(r)&&t.emit({name:r})}),t};export{M as a,Q as b,G as c,ht as d,ft as e,mt as f,gt as g};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import{A as o,B as a,k as r,l as s,z as n}from"./GWHFVZ3O.js";var i=class extends a{constructor(t){if(super(t),this.it=s,t.type!==n.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===s||t==null)return this._t=void 0,this.it=t;if(t===r)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;let e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}};i.directiveName="unsafeHTML",i.resultType=1;var f=o(i);export{f as a};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{a as m}from"./LH3LANGS.js";import{a as h}from"./OLQ432RE.js";import"./GVEUS7RX.js";import{I as b,L as a,O as d,h as c,j as i,u}from"./P7WBU7KL.js";var g=c`.spacing-y{margin:var(--calcite-spacing-md) 0}.portal-classification-form-element-tooltip{display:flex;justify-content:space-between;align-items:center}`;function s(o,e){return o.uiElement===e}var n=class extends b{constructor(){super(...arguments),this.messages=h(),this.isRequiredErrors=new Set,this.arcgisAttributeValueChange=u()}static{this.properties={validationMsg:16,attributeKey:1,attribute:0,value:0,renderingInfo:0,isRequiredErrors:0}}static{this.styles=g}willUpdate(e){(e.has("renderingInfo")||e.has("isRequiredErrors"))&&(this.validationMsg=this._getValidationMessage())}_getValidationMessage(){if(this.renderingInfo?.attributeValidationResult)return this.renderingInfo.attributeValidationResult;if(this.isRequiredErrors.has(this.attributeKey))return this.messages.requiredfield??"This is a required field."}renderCheckbox(){return s(this.attribute,"checkbox")?i`<calcite-label class="spacing-y" .for=${this.attributeKey} layout=inline><calcite-checkbox .checked=${this.value} id=${this.attributeKey??a} @calciteCheckboxChange=${e=>this.arcgisAttributeValueChange.emit({[this.attributeKey]:e.target.checked})} .required=${this.attribute.isRequired??!1} .status=${this.validationMsg?"invalid":"valid"}></calcite-checkbox>${this.attribute.label}</calcite-label>`:null}renderDateInput(){return s(this.attribute,"date")?i`<calcite-label .for=${this.attributeKey}>${this.attribute.label}<calcite-input-date-picker id=${this.attributeKey??a} .name=${this.attribute.label} @calciteInputDatePickerChange=${e=>this.isConnected&&this.arcgisAttributeValueChange.emit({[this.attributeKey]:e.target.value})} overlay-positioning=fixed .required=${this.attribute.isRequired} .status=${this.validationMsg?"invalid":"valid"} validation-icon=exclamation-mark-triangle .validationMessage=${this.validationMsg} .value=${this.value}></calcite-input-date-picker></calcite-label>`:null}renderTextInput(){if(!s(this.attribute,"text"))return null;let e=this.attribute.label,t=this.attribute.description;return i`<calcite-label .for=${this.attributeKey}><div class="portal-classification-form-element-tooltip">${e}${this.attribute.labelTooltip&&i`<div><calcite-icon scale=s icon=information .id=${`tooltip-button-${this.attribute.bannerLabel}`} text-label=${this.messages.information??"Information"??a}></calcite-icon><calcite-tooltip .referenceElement=${`tooltip-button-${this.attribute.bannerLabel}`} placement=right>${this.attribute.labelTooltip}</calcite-tooltip></div>`||""}</div><calcite-input-text id=${this.attributeKey??a} .label=${e} .name=${this.attributeKey} @calciteInputTextChange=${r=>this.arcgisAttributeValueChange.emit({[this.attributeKey]:r.target.value})} .placeholder=${t} .required=${this.attribute.isRequired} .status=${this.validationMsg?"invalid":"valid"} validation-icon=exclamation-mark-triangle .validationMessage=${this.validationMsg} .value=${this.value}></calcite-input-text></calcite-label>`}renderSingleSelect(){return s(this.attribute,"single-select")?i`<calcite-label .for=${this.attributeKey}>${this.attribute.label}<calcite-combobox selection-mode=single id=${this.attributeKey??a} .label=${this.attribute.label} .name=${this.attributeKey} @calciteComboboxChange=${e=>this.arcgisAttributeValueChange.emit({[this.attributeKey]:e.target.value})} .placeholder=${this.attribute.description??this.messages.selectanoption} .required=${this.attribute.isRequired} .status=${this.validationMsg?"invalid":"valid"} overlay-positioning=fixed validation-icon=exclamation-mark-triangle .validationMessage=${this.validationMsg} .value=${this.value} data-testid=${`single-select-${this.attributeKey}`}>${this._renderSingleSelectComboboxOptions()}</calcite-combobox></calcite-label>`:null}_renderSingleSelectComboboxOptions(){if(!Array.isArray(this.renderingInfo?.valueExpressionResult))return;let e=this.value;return m(this.renderingInfo?.valueExpressionResult,t=>t.label,t=>i`<calcite-combobox-item .selected=${e===t.value} .heading=${t.label} .value=${t.value} data-testid=${`single-combobox-item-${t.value}`}></calcite-combobox-item>`)}_renderComboboxOptions(){if(!Array.isArray(this.renderingInfo?.valueExpressionResult))return;let e=this.value;return this.renderingInfo?.valueExpressionResult.map(t=>i`<calcite-combobox-item .selected=${e?.includes(t.value)} .heading=${t.label} .value=${t.value} data-testid=${`combobox-item-${t.value}`}></calcite-combobox-item>`)}renderMultiSelect(){return s(this.attribute,"multi-select")?i`<calcite-label .for=${this.attributeKey}>${this.attribute.label}<calcite-combobox id=${this.attributeKey??a} .label=${this.attribute.label} .name=${this.attributeKey} @calciteComboboxChange=${e=>{let t=e.target.value;this.arcgisAttributeValueChange.emit({[this.attributeKey]:t?Array.isArray(t)?t:[t]:void 0})}} .placeholder=${this.attribute.description??this.messages.selectoptions} .required=${this.attribute.isRequired} .status=${this.validationMsg?"invalid":"valid"} validation-icon=exclamation-mark-triangle .validationMessage=${this.validationMsg} .value=${this.value}>${this._renderComboboxOptions()}</calcite-combobox></calcite-label>`:null}_renderGroupedComboboxOptions(){if(!this.renderingInfo?.valueExpressionResult||Array.isArray(this.renderingInfo?.valueExpressionResult))return;let e=this.value;return Object.entries(this.renderingInfo?.valueExpressionResult).map(([t,r])=>i`<calcite-combobox-item .selected=${e?.includes(t)} .heading=${t} .value=${t}>${r.map(l=>i`<calcite-combobox-item .selected=${e?.includes(l.value)} .heading=${l.label} .value=${l.value} data-testid=${`grouped-combobox-item-${l.value}`}></calcite-combobox-item>`)}</calcite-combobox-item>`)}renderMultiGroupedSelectNested(){return s(this.attribute,"multi-grouped-select-nested")?i`<calcite-label .for=${this.attributeKey}>${this.attribute.label}<calcite-combobox id=${this.attributeKey??a} .label=${this.attribute.label} .name=${this.attributeKey} @calciteComboboxChange=${e=>{let t=e.target.value;this.arcgisAttributeValueChange.emit({[this.attributeKey]:t?Array.isArray(t)?t:[t]:void 0})}} .placeholder=${this.attribute.description??this.messages.selectoptions} .required=${this.attribute.isRequired} .status=${this.validationMsg?"invalid":"valid"} validation-icon=exclamation-mark-triangle .validationMessage=${this.validationMsg} .value=${this.value}>${this._renderGroupedComboboxOptions()}</calcite-combobox></calcite-label>`:null}render(){switch(this.attribute.uiElement){case"checkbox":return this.renderCheckbox();case"date":return this.renderDateInput();case"multi-select":return this.renderMultiSelect();case"multi-grouped-select-nested":return this.renderMultiGroupedSelectNested();case"single-select":return this.renderSingleSelect();case"text":return this.renderTextInput();default:return i`<div>Not Implemented Yet.</div>`}}};d("arcgis-portal-classification-form-element",n);export{n as ArcgisPortalClassificationFormElement};
2
+ import{a as m}from"./WZGUYBTB.js";import{a as h}from"./A6YUOK3J.js";import"./AJZHPBED.js";import{J as b,M as a,P as d,h as c,j as i,u}from"./GWHFVZ3O.js";var g=c`.spacing-y{margin:var(--calcite-spacing-md) 0}.portal-classification-form-element-tooltip{display:flex;justify-content:space-between;align-items:center}`;function s(o,e){return o.uiElement===e}var n=class extends b{constructor(){super(...arguments),this.messages=h(),this.isRequiredErrors=new Set,this.arcgisAttributeValueChange=u()}static{this.properties={validationMsg:16,attributeKey:1,attribute:0,value:0,renderingInfo:0,isRequiredErrors:0}}static{this.styles=g}willUpdate(e){(e.has("renderingInfo")||e.has("isRequiredErrors"))&&(this.validationMsg=this._getValidationMessage())}_getValidationMessage(){if(this.renderingInfo?.attributeValidationResult)return this.renderingInfo.attributeValidationResult;if(this.isRequiredErrors.has(this.attributeKey))return this.messages.requiredfield??"This is a required field."}renderCheckbox(){return s(this.attribute,"checkbox")?i`<calcite-label class="spacing-y" .for=${this.attributeKey} layout=inline><calcite-checkbox .checked=${this.value} id=${this.attributeKey??a} @calciteCheckboxChange=${e=>this.arcgisAttributeValueChange.emit({[this.attributeKey]:e.target.checked})} .required=${this.attribute.isRequired??!1} .status=${this.validationMsg?"invalid":"valid"}></calcite-checkbox>${this.attribute.label}</calcite-label>`:null}renderDateInput(){return s(this.attribute,"date")?i`<calcite-label .for=${this.attributeKey}>${this.attribute.label}<calcite-input-date-picker id=${this.attributeKey??a} .name=${this.attribute.label} @calciteInputDatePickerChange=${e=>this.isConnected&&this.arcgisAttributeValueChange.emit({[this.attributeKey]:e.target.value})} overlay-positioning=fixed .required=${this.attribute.isRequired} .status=${this.validationMsg?"invalid":"valid"} validation-icon=exclamation-mark-triangle .validationMessage=${this.validationMsg} .value=${this.value}></calcite-input-date-picker></calcite-label>`:null}renderTextInput(){if(!s(this.attribute,"text"))return null;let e=this.attribute.label,t=this.attribute.description;return i`<calcite-label .for=${this.attributeKey}><div class="portal-classification-form-element-tooltip">${e}${this.attribute.labelTooltip&&i`<div><calcite-icon scale=s icon=information .id=${`tooltip-button-${this.attribute.bannerLabel}`} text-label=${this.messages.information??"Information"??a}></calcite-icon><calcite-tooltip .referenceElement=${`tooltip-button-${this.attribute.bannerLabel}`} placement=right>${this.attribute.labelTooltip}</calcite-tooltip></div>`||""}</div><calcite-input-text id=${this.attributeKey??a} .label=${e} .name=${this.attributeKey} @calciteInputTextChange=${r=>this.arcgisAttributeValueChange.emit({[this.attributeKey]:r.target.value})} .placeholder=${t} .required=${this.attribute.isRequired} .status=${this.validationMsg?"invalid":"valid"} validation-icon=exclamation-mark-triangle .validationMessage=${this.validationMsg} .value=${this.value}></calcite-input-text></calcite-label>`}renderSingleSelect(){return s(this.attribute,"single-select")?i`<calcite-label .for=${this.attributeKey}>${this.attribute.label}<calcite-combobox selection-mode=single id=${this.attributeKey??a} .label=${this.attribute.label} .name=${this.attributeKey} @calciteComboboxChange=${e=>this.arcgisAttributeValueChange.emit({[this.attributeKey]:e.target.value})} .placeholder=${this.attribute.description??this.messages.selectanoption} .required=${this.attribute.isRequired} .status=${this.validationMsg?"invalid":"valid"} overlay-positioning=fixed validation-icon=exclamation-mark-triangle .validationMessage=${this.validationMsg} .value=${this.value} data-testid=${`single-select-${this.attributeKey}`}>${this._renderSingleSelectComboboxOptions()}</calcite-combobox></calcite-label>`:null}_renderSingleSelectComboboxOptions(){if(!Array.isArray(this.renderingInfo?.valueExpressionResult))return;let e=this.value;return m(this.renderingInfo?.valueExpressionResult,t=>t.label,t=>i`<calcite-combobox-item .selected=${e===t.value} .heading=${t.label} .value=${t.value} data-testid=${`single-combobox-item-${t.value}`}></calcite-combobox-item>`)}_renderComboboxOptions(){if(!Array.isArray(this.renderingInfo?.valueExpressionResult))return;let e=this.value;return this.renderingInfo?.valueExpressionResult.map(t=>i`<calcite-combobox-item .selected=${e?.includes(t.value)} .heading=${t.label} .value=${t.value} data-testid=${`combobox-item-${t.value}`}></calcite-combobox-item>`)}renderMultiSelect(){return s(this.attribute,"multi-select")?i`<calcite-label .for=${this.attributeKey}>${this.attribute.label}<calcite-combobox id=${this.attributeKey??a} .label=${this.attribute.label} .name=${this.attributeKey} @calciteComboboxChange=${e=>{let t=e.target.value;this.arcgisAttributeValueChange.emit({[this.attributeKey]:t?Array.isArray(t)?t:[t]:void 0})}} .placeholder=${this.attribute.description??this.messages.selectoptions} .required=${this.attribute.isRequired} .status=${this.validationMsg?"invalid":"valid"} validation-icon=exclamation-mark-triangle .validationMessage=${this.validationMsg} .value=${this.value}>${this._renderComboboxOptions()}</calcite-combobox></calcite-label>`:null}_renderGroupedComboboxOptions(){if(!this.renderingInfo?.valueExpressionResult||Array.isArray(this.renderingInfo?.valueExpressionResult))return;let e=this.value;return Object.entries(this.renderingInfo?.valueExpressionResult).map(([t,r])=>i`<calcite-combobox-item .selected=${e?.includes(t)} .heading=${t} .value=${t}>${r.map(l=>i`<calcite-combobox-item .selected=${e?.includes(l.value)} .heading=${l.label} .value=${l.value} data-testid=${`grouped-combobox-item-${l.value}`}></calcite-combobox-item>`)}</calcite-combobox-item>`)}renderMultiGroupedSelectNested(){return s(this.attribute,"multi-grouped-select-nested")?i`<calcite-label .for=${this.attributeKey}>${this.attribute.label}<calcite-combobox id=${this.attributeKey??a} .label=${this.attribute.label} .name=${this.attributeKey} @calciteComboboxChange=${e=>{let t=e.target.value;this.arcgisAttributeValueChange.emit({[this.attributeKey]:t?Array.isArray(t)?t:[t]:void 0})}} .placeholder=${this.attribute.description??this.messages.selectoptions} .required=${this.attribute.isRequired} .status=${this.validationMsg?"invalid":"valid"} validation-icon=exclamation-mark-triangle .validationMessage=${this.validationMsg} .value=${this.value}>${this._renderGroupedComboboxOptions()}</calcite-combobox></calcite-label>`:null}render(){switch(this.attribute.uiElement){case"checkbox":return this.renderCheckbox();case"date":return this.renderDateInput();case"multi-select":return this.renderMultiSelect();case"multi-grouped-select-nested":return this.renderMultiGroupedSelectNested();case"single-select":return this.renderSingleSelect();case"text":return this.renderTextInput();default:return i`<div>Not Implemented Yet.</div>`}}};d("arcgis-portal-classification-form-element",n);export{n as ArcgisPortalClassificationFormElement};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{i as o}from"./P7WBU7KL.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"./GWHFVZ3O.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,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import b from"./OM7K22G5.js";import a from"./PBZ25RYU.js";import"./TU5JIOHN.js";import{a as h}from"./OLQ432RE.js";import"./GVEUS7RX.js";import{I as n,K as c,O as l,h as e,j as s,o}from"./P7WBU7KL.js";export default $arcgis.t(([,{a:f,b:d}])=>{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=f(this),this.messages=h(),this._classificationDataTask=d(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)
2
+ import b from"./JZGIPSEH.js";import"./E5QVAI6E.js";import a from"./PBZ25RYU.js";import{a as f}from"./A6YUOK3J.js";import"./AJZHPBED.js";import{J as n,L as c,P as l,h as e,j as s,o}from"./GWHFVZ3O.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)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- export default $arcgis.t(([c,{once:l}])=>{var D=(t,e,r)=>{let a=d(t,e,r);return a=m(r,a),a},d=(t,e,r)=>{let a=r.classificationMetadata.defaultValue,s=structuredClone(t)??{[e]:a};return s[e]??=a,s},$=(t,e)=>t&&Object.fromEntries(Object.entries(t).filter(([r])=>e.get(r)?.enabled!==!1)),m=(t,e)=>{let r=structuredClone(e);return Object.entries(t.attributes).forEach(([a,s])=>{if(r?.[a])return;let{uiElement:o,defaultValue:n}=s;switch(o){case"date":r&&(r[a]=p(s));break;case"multi-select":case"multi-grouped-select-nested":n&&r&&(r[a]=[n]);break;case"checkbox":n&&r&&(r[a]=n==="true");break;case"single-select":case"text":n&&r&&(r[a]=n);break}}),r?.fgi||delete r?.fgiOptions,r},p=t=>{let e=new Date,{type:r,defaultDateTimeline:a,defaultDateTimelineUnits:s}=t;if(r==="date"&&a&&s)switch(s.toLowerCase()){case"years":e.setFullYear(e.getFullYear()+a);break;case"months":e.setMonth(e.getMonth()+a);break;case"days":e.setDate(e.getDate()+a);break}let o=(e.getMonth()+1).toString(),n=e.getDate().toString();return`${e.getFullYear()}-${o.length===1?`0${o}`:o}-${n.length===1?`0${n}`:n}`},k=(t,e,r)=>{let a=e?.createdUser,s=e?.createdDate;return e={[r]:t,...a?{createdUser:a}:{},...s?{createdDate:s}:{}},e},U=async t=>{try{if(!t)return!1;t.loaded||await t.load();let e=t.portal.user??await l(()=>t?.portal.user);if(!e)return!1;let r=e.privileges.includes("portal:admin:updateItems");return i(t,e)||g(t,e)||r||t.access==="shared"&&await f(t,e)}catch(e){return console.error(e),!1}};function i(t,e){return t.owner===e.username}function g(t,e){let r=t.owner,a=t.itemControl==="admin",s=["esri_livingatlas","esri_demographics","esri_boundaries"];return t.portal?.isPortal&&!i(t,e)&&a&&r?.includes("esri_")&&!s.includes(r)?!1:a}var f=async(t,e)=>{let r=t.portal.restUrl,a=(await h(e,r)).result??[],s=(await b(t,r)).result??[];return a?.some(o=>s?.some(n=>o.id===n.id&&o.capabilities.includes("updateitemcontrol")))},h=async(t,e)=>{let r=`${e}/community/users/${t.username}`;try{return{result:(await c(r,{query:{f:"json"},responseType:"json"})).data?.groups??[]}}catch{return{error:{code:"unhandledError"}}}},b=async(t,e)=>{let r=t.id,a=`${e}/content/items/${r}/groups`;try{let s=await c(a,{query:{f:"json",method:"post"},responseType:"json"}),o=s.data?.admin??[],n=s.data?.member??[],u=s.data?.other??[];return{result:[...o,...n,...u]}}catch{return{error:{code:"unhandledError"}}}},j=(t,e)=>{let r=Date.now(),a=t?.portal.user?.username??"",{createdUser:s=a,createdDate:o=r}=e??{};return{createdUser:s,createdDate:o,lastEditedUser:a,lastEditedDate:r}};return{a:D,b:$,c:m,d:k,e:U,f:j}},"request","core/reactiveUtils")
2
+ export default $arcgis.t(([{once:l},c])=>{var D=(t,e,r)=>{let a=d(t,e,r);return a=m(r,a),a},d=(t,e,r)=>{let a=r.classificationMetadata.defaultValue,s=structuredClone(t)??{[e]:a};return s[e]??=a,s},$=(t,e)=>t&&Object.fromEntries(Object.entries(t).filter(([r])=>e.get(r)?.enabled!==!1)),m=(t,e)=>{let r=structuredClone(e);return Object.entries(t.attributes).forEach(([a,s])=>{if(r?.[a])return;let{uiElement:o,defaultValue:n}=s;switch(o){case"date":r&&(r[a]=p(s));break;case"multi-select":case"multi-grouped-select-nested":n&&r&&(r[a]=[n]);break;case"checkbox":n&&r&&(r[a]=n==="true");break;case"single-select":case"text":n&&r&&(r[a]=n);break}}),r?.fgi||delete r?.fgiOptions,r},p=t=>{let e=new Date,{type:r,defaultDateTimeline:a,defaultDateTimelineUnits:s}=t;if(r==="date"&&a&&s)switch(s.toLowerCase()){case"years":e.setFullYear(e.getFullYear()+a);break;case"months":e.setMonth(e.getMonth()+a);break;case"days":e.setDate(e.getDate()+a);break}let o=(e.getMonth()+1).toString(),n=e.getDate().toString();return`${e.getFullYear()}-${o.length===1?`0${o}`:o}-${n.length===1?`0${n}`:n}`},k=(t,e,r)=>{let a=e?.createdUser,s=e?.createdDate;return e={[r]:t,...a?{createdUser:a}:{},...s?{createdDate:s}:{}},e},U=async t=>{try{if(!t)return!1;t.loaded||await t.load();let e=t.portal.user??await l(()=>t?.portal.user);if(!e)return!1;let r=e.privileges.includes("portal:admin:updateItems");return i(t,e)||g(t,e)||r||t.access==="shared"&&await f(t,e)}catch(e){return console.error(e),!1}};function i(t,e){return t.owner===e.username}function g(t,e){let r=t.owner,a=t.itemControl==="admin",s=["esri_livingatlas","esri_demographics","esri_boundaries"];return t.portal?.isPortal&&!i(t,e)&&a&&r?.includes("esri_")&&!s.includes(r)?!1:a}var f=async(t,e)=>{let r=t.portal.restUrl,a=(await h(e,r)).result??[],s=(await b(t,r)).result??[];return a?.some(o=>s?.some(n=>o.id===n.id&&o.capabilities.includes("updateitemcontrol")))},h=async(t,e)=>{let r=`${e}/community/users/${t.username}`;try{return{result:(await c(r,{query:{f:"json"},responseType:"json"})).data?.groups??[]}}catch{return{error:{code:"unhandledError"}}}},b=async(t,e)=>{let r=t.id,a=`${e}/content/items/${r}/groups`;try{let s=await c(a,{query:{f:"json",method:"post"},responseType:"json"}),o=s.data?.admin??[],n=s.data?.member??[],u=s.data?.other??[];return{result:[...o,...n,...u]}}catch{return{error:{code:"unhandledError"}}}},j=(t,e)=>{let r=Date.now(),a=t?.portal.user?.username??"",{createdUser:s=a,createdDate:o=r}=e??{};return{createdUser:s,createdDate:o,lastEditedUser:a,lastEditedDate:r}};return{a:D,b:$,c:m,d:k,e:U,f:j}},"core/reactiveUtils","request")
@@ -1,4 +1,4 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
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,r,n)=>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.")})(r)+s[n+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"),r=Y.litNonce;r!==void 0&&o.setAttribute("nonce",r),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),zt={attribute:!0,type:String,converter:X,reflect:!1,useDefault:!1,hasChanged:j};Symbol.metadata??=Symbol("metadata"),tt.litPropertyMetadata??=new WeakMap;var _=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(),r=this.getPropertyDescriptor(t,o,e);r!==void 0&&Oe(this.prototype,t,r)}}static getPropertyDescriptor(t,e,o){let{get:r,set:n}=Te(this.prototype,t)??{get(){return this[e]},set(i){this[e]=i}};return{get:r,set(i){let a=r?.call(this);n?.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 r of o)this.createProperty(r,e[r])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[o,r]of e)this.elementProperties.set(o,r)}this._$Eh=new Map;for(let[e,o]of this.elementProperties){let r=this._$Eu(e,o);r!==void 0&&this._$Eh.set(r,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 r of o)e.unshift(Et(r))}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),r=this.constructor._$Eu(t,o);if(r!==void 0&&o.reflect===!0){let n=(o.converter?.toAttribute!==void 0?o.converter:X).toAttribute(e,o.type);this._$Em=t,n==null?this.removeAttribute(r):this.setAttribute(r,n),this._$Em=null}}_$AK(t,e){let o=this.constructor,r=o._$Eh.get(t);if(r!==void 0&&this._$Em!==r){let n=o.getPropertyOptions(r),i=typeof n.converter=="function"?{fromAttribute:n.converter}:n.converter?.fromAttribute!==void 0?n.converter:X;this._$Em=r;let a=i.fromAttribute(e,n.type);this[r]=a??this._$Ej?.get(r)??a,this._$Em=null}}requestUpdate(t,e,o,r=!1,n){if(t!==void 0){let i=this.constructor;if(r===!1&&(n=this[t]),o??=i.getPropertyOptions(t),!((o.hasChanged??j)(n,e)||o.useDefault&&o.reflect&&n===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:r,wrapped:n},i){o&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,i??e??this[t]),n!==!0||i!==void 0)||(this._$AL.has(t)||(this.hasUpdated||o||(e=void 0),this._$AL.set(t,e)),r===!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[r,n]of this._$Ep)this[r]=n;this._$Ep=void 0}let o=this.constructor.elementProperties;if(o.size>0)for(let[r,n]of o){let{wrapped:i}=n,a=this[r];i!==!0||this._$AL.has(r)||a===void 0||this.C(r,void 0,n,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){}};_.elementStyles=[],_.shadowRootOptions={mode:"open"},_[k("elementProperties")]=new Map,_[k("finalized")]=new Map,xe?.({ReactiveElement:_}),(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,_t="$lit$",A=`lit$${Math.random().toFixed(9).slice(2)}$`,At="?"+A,Le=`<${At}>`,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=`[
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}),ms=wt(1),ys=wt(2),gs=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=[],r,n=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])&&(r=RegExp("</"+u[2],"g")),i=w):u[3]!==void 0&&(i=w):i===w?u[0]===">"?(i=r??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,r=void 0);let v=i===w&&s[a+1].startsWith("/>")?" ":"";n+=i===H?c+Le:h>=0?(o.push(l),c.slice(0,h)+_t+c.slice(h)+A+v):c+A+(h===-2?a:v)}return[Yt(s,n+(s[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),o]},B=class s{constructor({strings:t,_$litType$:e},o){let r;this.parts=[];let n=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(;(r=O.nextNode())!==null&&c.length<a;){if(r.nodeType===1){if(r.hasAttributes())for(let h of r.getAttributeNames())if(h.endsWith(_t)){let m=u[i++],v=r.getAttribute(h).split(A),C=/([.?@])?(.*)/.exec(m);c.push({type:1,index:n,name:C[2],strings:v,ctor:C[1]==="."?ot:C[1]==="?"?rt:C[1]==="@"?nt:P}),r.removeAttribute(h)}else h.startsWith(A)&&(c.push({type:6,index:n}),r.removeAttribute(h));if(Jt.test(r.tagName)){let h=r.textContent.split(A),m=h.length-1;if(m>0){r.textContent=et?et.emptyScript:"";for(let v=0;v<m;v++)r.append(h[v],z()),O.nextNode(),c.push({type:2,index:++n});r.append(h[m],z())}}}else if(r.nodeType===8)if(r.data===At)c.push({type:2,index:n});else{let h=-1;for(;(h=r.data.indexOf(A,h+1))!==-1;)c.push({type:7,index:n}),h+=A.length-1}n++}}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 r=o!==void 0?e._$Co?.[o]:e._$Cl,n=V(t)?void 0:t._$litDirective$;return r?.constructor!==n&&(r?._$AO?.(!1),n===void 0?r=void 0:(r=new n(s),r._$AT(s,e,o)),o!==void 0?(e._$Co??=[])[o]=r:e._$Cl=r),r!==void 0&&(t=S(s,r._$AS(s,t.values),r,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,r=(t?.creationScope??T).importNode(e,!0);O.currentNode=r;let n=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(n,n.nextSibling,this,t):c.type===1?l=new c.ctor(n,c.name,c.strings,this,t):c.type===6&&(l=new it(n,this,t)),this._$AV.push(l),c=o[++a]}i!==c?.index&&(n=O.nextNode(),i++)}return O.currentNode=T,r}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,r){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=o,this.options=r,this._$Cv=r?.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,r=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===r)this._$AH.p(e);else{let n=new st(r,this),i=n.u(this.options);n.p(e),this.T(i),this._$AH=n}}_$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,r=0;for(let n of t)r===e.length?e.push(o=new s(this.O(z()),this.O(z()),this,this.options)):o=e[r],o._$AI(n),r++;r<e.length&&(this._$AR(o&&o._$AB.nextSibling,r),e.length=r)}_$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,r,n){this.type=1,this._$AH=d,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=n,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,r){let n=this.strings,i=!1;if(n===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=n[0],c=0;c<n.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??"")+n[c+1]),this._$AH[c]=l}i&&!r&&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}},rt=class extends P{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==d)}},nt=class extends P{constructor(t,e,o,r,n){super(t,e,o,r,n),this.type=5}_$AI(t,e=this){if((t=S(this,t,e,0)??d)===f)return;let o=this._$AH,r=t===d&&o!==d||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,n=t!==d&&(o===d||r);r&&this.element.removeEventListener(this.name,this,o),n&&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:_t,P:A,A:At,C:1,L:Zt,R:st,D:Qt,V:S,I:L,H:P,N:rt,U:nt,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,r=o._$litPart$;if(r===void 0){let n=e?.renderBefore??null;o._$litPart$=r=new L(t.insertBefore(z(),n),n,void 0,e??{})}return r._$AI(s),r};var Ot=globalThis,E=class extends _{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,Ns=(s,t,e,o)=>{let r=se(t);if(o?.once){let i=`${s}${r}${e}`;if(te.has(i))return;te.add(i)}let n;if(o?.detail){n={};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(n,i,{get(){return c.deref()}})}else n[i]=a;ee?.log.interceptors?.forEach(i=>i(s,r,e,n)),console[s](`[${r}]: ${e}`,n)}else ee?.log.interceptors?.forEach(i=>i(s,r,e)),console[s](`[${r}]: ${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.`,xs=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),Rs=s=>typeof s?.then=="function";var F,D=s=>{F!==s&&(F=s,queueMicrotask(()=>F===s?F=void 0:0))},G=s=>F,N=[],re=s=>{if(s===void 0){N=[];return}let t=N.indexOf(s);N=t===-1?[...N,s]:N.slice(0,t+1),queueMicrotask(()=>N=[])},ne=()=>N,U,Is=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(r=>t(r,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,Ms=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})}},ce=(s,t)=>{let e=t>ke?je:t/He,o=0,r=setInterval(()=>{o+=e,o>=t&&(clearInterval(r),s())},e);return r},ke=4e3,je=2e3,He=4;var ze=(s,t,e)=>{let o=Object.keys(s),r=o.length;R===void 0&&queueMicrotask(I),R??=new Map;let n=R.get(s);return n===void 0&&(n={callbacks:[],keyCount:r},R.set(s,n)),n.keyCount!==r&&(n.callbacks.forEach(i=>i(o)),n.callbacks=[],n.keyCount=r),n.callbacks.push(i=>{let a=l=>p(t,null,l),c=i[r];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((r,n)=>p(t,void 0,e===n?r:void 0)),e},Be=(s=[G(),...ne()],t,e)=>{let o=Array.isArray(s)?s:[s],r=o.length+1,n=i=>{r-=1,i!==void 0&&(r=Math.min(r,0)),r===0&&t(i)};o.forEach(i=>ze(i,a=>n(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=>n(a===void 0?void 0:{key:a,host:i,isReactive:!0}),e);break}return e},We=(s="",t={},e=G())=>{let o={emit:r=>{s===""&&I();let n=new CustomEvent(s,{detail:r,cancelable:!0,bubbles:!0,composed:!0,...t});return e.el.dispatchEvent(n),n}};return s===""&&Be(void 0,r=>s=r.key,o),o},Fe=We.bind(null,""),de;de=q;var Tt=class{constructor(t){this.#t=[],this.#e=[],this.#s=[],this.#r=[],this.#n=[],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||(re(e),queueMicrotask(()=>e.catchUpLifecycle()))}#t;#e;#s;#r;#n;#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),()=>void 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.#r.push(t)}onUpdate(t){this.#n.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.#r.forEach(p),this.loadedCalled=!0)}triggerUpdate(t){this.hostUpdate&&p(this.hostUpdate,this,t),this.#n.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(r=>{typeof r=="function"?this.#i.push(r):typeof r=="object"&&typeof r.remove=="function"&&this.#i.push(r.remove)})}};function le(s){p(s,void 0,this)}var pe=Tt,he=s=>{if(typeof s!="object"&&typeof s!="function"||s===null)return s;let t={get(o,r,n){if(!((r==="exports"||r==="_exports")&&r in o&&o[r]===e)&&(r in o||r in Promise.prototype||typeof r=="symbol"))return typeof o=="function"?o[r]:Reflect.get(o,r,n)}},e=new Proxy(s,t);return e};var{I:qe}=Xt,ue=s=>s;var ht=s=>s.strings===void 0,fe=()=>document.createComment(""),Ks=(s,t,e)=>{let o=s._$AA.parentNode,r=t===void 0?s._$AB:t._$AA;if(e===void 0){let n=o.insertBefore(fe(),r),i=o.insertBefore(fe(),r);e=new qe(n,i,s,s.options)}else{let n=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(n!==r||a){let c=e._$AA;for(;c!==n;){let l=ue(c).nextSibling;ue(o).insertBefore(c,r),c=l}}}return e},Qs=(s,t,e=s)=>(s._$AI(t,e),s),Ge={},me=(s,t=Ge)=>s._$AH=t,Js=s=>s._$AH,Ys=s=>{s._$AR(),s._$AA.remove()};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 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),Je(t)}};function Ke(s){this._$AN!==void 0?(dt(this),this._$AM=s,ye(this)):this._$AM=s}function Qe(s,t=!1,e=0){let o=this._$AH,r=this._$AN;if(r!==void 0&&r.size!==0)if(t)if(Array.isArray(o))for(let n=e;n<o.length;n++)K(o[n],!1),dt(o[n]);else o!=null&&(K(o,!1),dt(o));else K(this,s)}var Je=s=>{s.type==y.CHILD&&(s._$AP??=Qe,s._$AQ??=Ke)},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 ao=()=>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(Ze,(t,e)=>`${e===0?"":"-"}${t.toLowerCase()}`),Ze=/[A-Z]+(?![a-z])|[A-Z]/gu;var bo="randomUUID"in crypto;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 Xe=(s,t)=>function(o,r){if(!globalThis.customElements)return;let i=(r??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(ts):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,ts=s=>{let t=s.split(":");return t.length===1?[t[0],ut(t[0])]:t},es=globalThis.HTMLElement??Ut,Dt=class extends es{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.#r({a:e.A}):e.B.then(async o=>{await e.K.p,t.#r(await(o.default?.then(r=>typeof r=="function"?{a:r}:r)??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}#r(t){let e=this.constructor,o=e.L,r=this.#e,n=Object.values(t).find(h=>h.L===o),i=`${o}--lazy`,a=n;for(;a&&!Object.hasOwn(a,"lumina");)a=Object.getPrototypeOf(a);os(a),!e.A&&(e.A=n,customElements.define(i,n)),n.N=this;let l=document.createElement(i);n.N=void 0,this.#t=l,this.#e=l,this.#s.forEach(h=>l.attributeChangedCallback(h,null,this.getAttribute(h))),Object.entries(r).forEach(ss,l);let u=this.isConnected;(u||this.G)&&(l.connectedCallback?.(),u||l.disconnectedCallback())}addController(){}requestUpdate(){this.#t?.requestUpdate()}};function ss([s,t]){this[s]=t}var os=s=>{let t=s.prototype,e=Element.prototype;Object.hasOwn(t,"isConnected")||(t.setAttribute=function(r,n){e.setAttribute.call(this.el,r,n)},t.removeAttribute=function(r){e.removeAttribute.call(this.el,r)},t.hasAttribute=function(r){return e.hasAttribute.call(this.el,r)},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=()=>void this.#e.destroy();this.#t=ce(t,rs)}}S(t,e){let o=this.T;this.V=d,this.T=[],o.forEach(r=>r(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)}},rs=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 r=!!t[o];r===this.st.has(o)||this.nt?.has(o)||(r?(e.add(o),this.st.add(o)):(e.remove(o),this.st.delete(o)))}return f}});var Ee="important",ns=" !"+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 r=t[o];if(r!=null){this.ft.add(o);let n=typeof r=="string"&&r.endsWith(ns);o.includes("-")||n?e.setProperty(o,n?r.slice(0,-11):r,n?Ee:""):e[o]=r}}return f}});var is=$(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 be=class s extends E{constructor(){super(),this.M=[],this.manager=new mt(this);let t=this,e=t.constructor,o=e.N,r=e.K.o,n=s.prototype.shouldUpdate;t.#r=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!==n&&(t.#e=t.shouldUpdate,t.shouldUpdate=n),r&&(t.#t=new Map,e.elementProperties.forEach((i,a)=>t.#t.set(a,r()))),!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,r=Array.isArray(e)?e[1]:void 0,n=r?.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),c:!1,...r,hasChanged(a,c){let l=n(a,c);return i.c=l,l}};super.createProperty(t,i)}static getPropertyDescriptor(t,e,o){let r=this.K,n=super.getPropertyDescriptor(t,e,o);return o.d=n,{...n,get(){return r.t?.(this.#t.get(t)),n.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}"`);n.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;#r;#n;#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.#n=e;let o=!this.manager.connectedCalled;t&&super.connectedCallback(),o?queueMicrotask(()=>this.#i().catch(r=>{this.#r.reject(r),setTimeout(()=>{throw r})})):e&&this.requestUpdate()}#d(t){try{this.#n.clear(),this.constructor.K.r(this.#n,()=>super.update(t))}catch(e){throw this.#n.clear(),e}}disconnectedCallback(){super.disconnectedCallback(),this.#n?.destroy(),this.#n=void 0}createRenderRoot(){let t=this.el.shadowRoot,e=this.constructor,o=e.shadowRootOptions,n=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=n.getRootNode();i.adoptedStyleSheets=[...i.adoptedStyleSheets,...e.elementStyles.map(a=>"styleSheet"in a?a.styleSheet:a)]}return n}async#i(){let t=this.el.G??xt(this.el);t&&await t;let e=[];for(let r of this.M)"triggerLoad"in r?e.push(r.triggerLoad()):e.push(W(r.hostLoad,r));await Promise.all(e),await this.load?.(),this.manager.hasDestroy&&this.manager.onUpdate(r=>r.has(yt)&&this.manager.U()),this.#s(!0),this.performUpdate(),this.I.resolve(),await 0;let o=this.J.filter(r=>!r.manager?.loadedCalled);o.length&&await Promise.allSettled(o.map(async r=>await r.componentOnReady())),this.J.length=0,this.el.setAttribute(this.constructor.K.hydratedAttribute,"");for(let r of this.M)"triggerLoaded"in r?r.triggerLoaded():p(r.hostLoaded,r);this.loaded?.(),this.#r.resolve()}shouldUpdate(t){return this.manager.Q=t,this.#e?.(t)??!0}update(t){this.#n?this.#d(t):super.update(t)}listen(t,e,o){let r=e?.bind(this)??e;this.manager.onLifecycle(()=>(this.el.addEventListener(t,r,o),()=>this.el.removeEventListener(t,r,o)))}listenOn(t,e,o,r){let n=o?.bind(this)??o;this.manager.onLifecycle(()=>(t.addEventListener(e,n,r),()=>t.removeEventListener(e,n,r)))}async componentOnReady(){return await this.#r.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 Ae=s=>{let t,e=r=>{t=new URL(r,globalThis.location?.href||void 0).href},o={...s,getAssetPath(r){let n=new URL(r,t);return n.origin!==globalThis.location?.origin?n.href:n.pathname},setAssetPath:e,customElement(r,n){n.K=o,n.L=r,customElements.get(r)||customElements.define(r,n)}};return e(s.defaultAssetPath),o};var Nr=s=>typeof s=="object"&&s!=null?ve(s):s,Dr=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(r){return e.#t.call(this,r)}}render(t){return typeof t=="function"?(this.#t=t,Nt(this.#e)):Nt(t)}},xr=$(It);var Lr=d;var Ur=s=>{let t=document.createElement("div");return at(s,t),t.firstElementChild};var Q=Ae({defaultAssetPath:"https://jsdev.arcgis.com/5.1.0-next/portal-components/",hydratedAttribute:"hydrated"}),{customElement:jr,getAssetPath:Hr,setAssetPath:zr}=Q;Q.t=void 0;Q.o=void 0;Q.c=void 0;Q.r=void 0;export{Rs as a,D as b,G as c,re as d,ne as e,Is as f,Ms as g,Ce as h,j as i,ms as j,f as k,d as l,b as m,Ns as n,oe as o,Ds as p,xs as q,Ve as r,Be as s,We as t,Fe as u,Tt as v,pe as w,Xe as x,y,$ as z,g as A,Ks as B,Qs as C,me as D,Js as E,Ys as F,ao as G,Nt as H,be as I,Nr as J,Dr as K,Lr as L,Ur as M,Q as N,jr as O,Hr as P};
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=[],r,n=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])&&(r=RegExp("</"+u[2],"g")),i=w):u[3]!==void 0&&(i=w):i===w?u[0]===">"?(i=r??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,r=void 0);let v=i===w&&s[a+1].startsWith("/>")?" ":"";n+=i===H?c+Le:h>=0?(o.push(l),c.slice(0,h)+_t+c.slice(h)+A+v):c+A+(h===-2?a:v)}return[Yt(s,n+(s[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),o]},B=class s{constructor({strings:t,_$litType$:e},o){let r;this.parts=[];let n=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(;(r=O.nextNode())!==null&&c.length<a;){if(r.nodeType===1){if(r.hasAttributes())for(let h of r.getAttributeNames())if(h.endsWith(_t)){let m=u[i++],v=r.getAttribute(h).split(A),C=/([.?@])?(.*)/.exec(m);c.push({type:1,index:n,name:C[2],strings:v,ctor:C[1]==="."?ot:C[1]==="?"?rt:C[1]==="@"?nt:P}),r.removeAttribute(h)}else h.startsWith(A)&&(c.push({type:6,index:n}),r.removeAttribute(h));if(Jt.test(r.tagName)){let h=r.textContent.split(A),m=h.length-1;if(m>0){r.textContent=et?et.emptyScript:"";for(let v=0;v<m;v++)r.append(h[v],z()),O.nextNode(),c.push({type:2,index:++n});r.append(h[m],z())}}}else if(r.nodeType===8)if(r.data===At)c.push({type:2,index:n});else{let h=-1;for(;(h=r.data.indexOf(A,h+1))!==-1;)c.push({type:7,index:n}),h+=A.length-1}n++}}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 r=o!==void 0?e._$Co?.[o]:e._$Cl,n=V(t)?void 0:t._$litDirective$;return r?.constructor!==n&&(r?._$AO?.(!1),n===void 0?r=void 0:(r=new n(s),r._$AT(s,e,o)),o!==void 0?(e._$Co??=[])[o]=r:e._$Cl=r),r!==void 0&&(t=S(s,r._$AS(s,t.values),r,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,r=(t?.creationScope??T).importNode(e,!0);O.currentNode=r;let n=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(n,n.nextSibling,this,t):c.type===1?l=new c.ctor(n,c.name,c.strings,this,t):c.type===6&&(l=new it(n,this,t)),this._$AV.push(l),c=o[++a]}i!==c?.index&&(n=O.nextNode(),i++)}return O.currentNode=T,r}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,r){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=o,this.options=r,this._$Cv=r?.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,r=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===r)this._$AH.p(e);else{let n=new st(r,this),i=n.u(this.options);n.p(e),this.T(i),this._$AH=n}}_$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,r=0;for(let n of t)r===e.length?e.push(o=new s(this.O(z()),this.O(z()),this,this.options)):o=e[r],o._$AI(n),r++;r<e.length&&(this._$AR(o&&o._$AB.nextSibling,r),e.length=r)}_$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,r,n){this.type=1,this._$AH=d,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=n,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,r){let n=this.strings,i=!1;if(n===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=n[0],c=0;c<n.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??"")+n[c+1]),this._$AH[c]=l}i&&!r&&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}},rt=class extends P{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==d)}},nt=class extends P{constructor(t,e,o,r,n){super(t,e,o,r,n),this.type=5}_$AI(t,e=this){if((t=S(this,t,e,0)??d)===f)return;let o=this._$AH,r=t===d&&o!==d||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,n=t!==d&&(o===d||r);r&&this.element.removeEventListener(this.name,this,o),n&&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:_t,P:A,A:At,C:1,L:Zt,R:st,D:Qt,V:S,I:L,H:P,N:rt,U:nt,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,r=o._$litPart$;if(r===void 0){let n=e?.renderBefore??null;o._$litPart$=r=new L(t.insertBefore(z(),n),n,void 0,e??{})}return r._$AI(s),r};var Ot=globalThis,E=class extends _{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 r=se(t);if(o?.once){let i=`${s}${r}${e}`;if(te.has(i))return;te.add(i)}let n;if(o?.detail){n={};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(n,i,{get(){return c.deref()}})}else n[i]=a;ee?.log.interceptors?.forEach(i=>i(s,r,e,n)),console[s](`[${r}]: ${e}`,n)}else ee?.log.interceptors?.forEach(i=>i(s,r,e)),console[s](`[${r}]: ${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=[],re=s=>{if(s===void 0){N=[];return}let t=N.indexOf(s);N=t===-1?[...N,s]:N.slice(0,t+1),queueMicrotask(()=>N=[])},ne=()=>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(r=>t(r,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})}},ce=(s,t)=>{let e=t>ke?je:t/He,o=0,r=setInterval(()=>{o+=e,o>=t&&(clearInterval(r),s())},e);return r},ke=4e3,je=2e3,He=4;var ze=(s,t,e)=>{let o=Object.keys(s),r=o.length;R===void 0&&queueMicrotask(I),R??=new Map;let n=R.get(s);return n===void 0&&(n={callbacks:[],keyCount:r},R.set(s,n)),n.keyCount!==r&&(n.callbacks.forEach(i=>i(o)),n.callbacks=[],n.keyCount=r),n.callbacks.push(i=>{let a=l=>p(t,null,l),c=i[r];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((r,n)=>p(t,void 0,e===n?r:void 0)),e},Be=(s=[G(),...ne()],t,e)=>{let o=Array.isArray(s)?s:[s],r=o.length+1,n=i=>{r-=1,i!==void 0&&(r=Math.min(r,0)),r===0&&t(i)};o.forEach(i=>ze(i,a=>n(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=>n(a===void 0?void 0:{key:a,host:i,isReactive:!0}),e);break}return e},We=(s="",t={},e=G())=>{let o={emit:r=>{s===""&&I();let n=new CustomEvent(s,{detail:r,cancelable:!0,bubbles:!0,composed:!0,...t});return e.el.dispatchEvent(n),n}};return s===""&&Be(void 0,r=>s=r.key,o),o},Fe=We.bind(null,""),de;de=q;var Tt=class{constructor(t){this.#t=[],this.#e=[],this.#s=[],this.#r=[],this.#n=[],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||(re(e),queueMicrotask(()=>e.catchUpLifecycle()))}#t;#e;#s;#r;#n;#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),()=>void 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.#r.push(t)}onUpdate(t){this.#n.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.#r.forEach(p),this.loadedCalled=!0)}triggerUpdate(t){this.hostUpdate&&p(this.hostUpdate,this,t),this.#n.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(r=>{typeof r=="function"?this.#i.push(r):typeof r=="object"&&typeof r.remove=="function"&&this.#i.push(r.remove)})}};function le(s){p(s,void 0,this)}var pe=Tt,he=s=>{if(typeof s!="object"&&typeof s!="function"||s===null)return s;let t={get(o,r,n){if(!((r==="exports"||r==="_exports")&&r in o&&o[r]===e)&&(r in o||r in Promise.prototype||typeof r=="symbol"))return typeof o=="function"?o[r]:Reflect.get(o,r,n)}},e=new Proxy(s,t);return e};var ht=s=>s.replace(qe,(t,e)=>`${e===0?"":"-"}${t.toLowerCase()}`),qe=/[A-Z]+(?![a-z])|[A-Z]/gu;var Ge="randomUUID"in crypto,Ks=()=>{if(Ge)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{I:Ke}=Xt,ue=s=>s;var dt=s=>s.strings===void 0,fe=()=>document.createComment(""),Ys=(s,t,e)=>{let o=s._$AA.parentNode,r=t===void 0?s._$AB:t._$AA;if(e===void 0){let n=o.insertBefore(fe(),r),i=o.insertBefore(fe(),r);e=new Ke(n,i,s,s.options)}else{let n=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(n!==r||a){let c=e._$AA;for(;c!==n;){let l=ue(c).nextSibling;ue(o).insertBefore(c,r),c=l}}}return e},Zs=(s,t,e=s)=>(s._$AI(t,e),s),Qe={},me=(s,t=Qe)=>s._$AH=t,Xs=s=>s._$AH,to=s=>{s._$AR(),s._$AA.remove()};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 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},pt=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),Ze(t)}};function Je(s){this._$AN!==void 0?(pt(this),this._$AM=s,ye(this)):this._$AM=s}function Ye(s,t=!1,e=0){let o=this._$AH,r=this._$AN;if(r!==void 0&&r.size!==0)if(t)if(Array.isArray(o))for(let n=e;n<o.length;n++)K(o[n],!1),pt(o[n]);else o!=null&&(K(o,!1),pt(o));else K(this,s)}var Ze=s=>{s.type==y.CHILD&&(s._$AP??=Ye,s._$AQ??=Je)},ut=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),pt(this))}setValue(t){if(dt(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 ho=()=>new Pt,Pt=class{},St=new WeakMap,Nt=$(class extends ut{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 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 ts=(s,t)=>function(o,r){if(!globalThis.customElements)return;let i=(r??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(es):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,es=s=>{let t=s.split(":");return t.length===1?[t[0],ht(t[0])]:t},ss=globalThis.HTMLElement??Ut,Dt=class extends ss{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.#r({a:e.A}):e.B.then(async o=>{await e.K.p,t.#r(await(o.default?.then(r=>typeof r=="function"?{a:r}:r)??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}#r(t){let e=this.constructor,o=e.L,r=this.#e,n=Object.values(t).find(h=>h.L===o),i=`${o}--lazy`,a=n;for(;a&&!Object.hasOwn(a,"lumina");)a=Object.getPrototypeOf(a);rs(a),!e.A&&(e.A=n,customElements.define(i,n)),n.N=this;let l=document.createElement(i);n.N=void 0,this.#t=l,this.#e=l,this.#s.forEach(h=>l.attributeChangedCallback(h,null,this.getAttribute(h))),Object.entries(r).forEach(os,l);let u=this.isConnected;(u||this.G)&&(l.connectedCallback?.(),u||l.disconnectedCallback())}addController(){}requestUpdate(){this.#t?.requestUpdate()}};function os([s,t]){this[s]=t}var rs=s=>{let t=s.prototype,e=Element.prototype;Object.hasOwn(t,"isConnected")||(t.setAttribute=function(r,n){e.setAttribute.call(this.el,r,n)},t.removeAttribute=function(r){e.removeAttribute.call(this.el,r)},t.hasAttribute=function(r){return e.hasAttribute.call(this.el,r)},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=()=>void this.#e.destroy();this.#t=ce(t,ns)}}S(t,e){let o=this.T;this.V=d,this.T=[],o.forEach(r=>r(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)}},ns=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 r=!!t[o];r===this.st.has(o)||this.nt?.has(o)||(r?(e.add(o),this.st.add(o)):(e.remove(o),this.st.delete(o)))}return f}});var Ee="important",is=" !"+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 r=t[o];if(r!=null){this.ft.add(o);let n=typeof r=="string"&&r.endsWith(is);o.includes("-")||n?e.setProperty(o,n?r.slice(0,-11):r,n?Ee:""):e[o]=r}}return f}});var as=$(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(!dt(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 be=class s extends E{constructor(){super(),this.M=[],this.manager=new mt(this);let t=this,e=t.constructor,o=e.N,r=e.K.o,n=s.prototype.shouldUpdate;t.#r=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!==n&&(t.#e=t.shouldUpdate,t.shouldUpdate=n),r&&(t.#t=new Map,e.elementProperties.forEach((i,a)=>t.#t.set(a,r()))),!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,r=Array.isArray(e)?e[1]:void 0,n=r?.hasChanged??j,i={attribute:o&1&&typeof t=="string"?ht(t):!1,reflect:!!(o&2),type:o&4?Boolean:o&8?Number:void 0,state:!!(o&16),readOnly:!!(o&32),noAccessor:!!(o&64),c:!1,...r,hasChanged(a,c){let l=n(a,c);return i.c=l,l}};super.createProperty(t,i)}static getPropertyDescriptor(t,e,o){let r=this.K,n=super.getPropertyDescriptor(t,e,o);return o.d=n,{...n,get(){return r.t?.(this.#t.get(t)),n.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}"`);n.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;#r;#n;#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.#n=e;let o=!this.manager.connectedCalled;t&&super.connectedCallback(),o?queueMicrotask(()=>this.#i().catch(r=>{this.#r.reject(r),setTimeout(()=>{throw r})})):e&&this.requestUpdate()}#d(t){try{this.#n.clear(),this.constructor.K.r(this.#n,()=>super.update(t))}catch(e){throw this.#n.clear(),e}}disconnectedCallback(){super.disconnectedCallback(),this.#n?.destroy(),this.#n=void 0}createRenderRoot(){let t=this.el.shadowRoot,e=this.constructor,o=e.shadowRootOptions,n=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=n.getRootNode();i.adoptedStyleSheets=[...i.adoptedStyleSheets,...e.elementStyles.map(a=>"styleSheet"in a?a.styleSheet:a)]}return n}async#i(){let t=this.el.G??xt(this.el);t&&await t;let e=[];for(let r of this.M)"triggerLoad"in r?e.push(r.triggerLoad()):e.push(W(r.hostLoad,r));await Promise.all(e),await this.load?.(),this.manager.hasDestroy&&this.manager.onUpdate(r=>r.has(yt)&&this.manager.U()),this.#s(!0),this.performUpdate(),this.I.resolve(),await 0;let o=this.J.filter(r=>!r.manager?.loadedCalled);o.length&&await Promise.allSettled(o.map(async r=>await r.componentOnReady())),this.J.length=0,this.el.setAttribute(this.constructor.K.hydratedAttribute,"");for(let r of this.M)"triggerLoaded"in r?r.triggerLoaded():p(r.hostLoaded,r);this.loaded?.(),this.#r.resolve()}shouldUpdate(t){return this.manager.Q=t,this.#e?.(t)??!0}update(t){this.#n?this.#d(t):super.update(t)}listen(t,e,o){let r=e?.bind(this)??e;this.manager.onLifecycle(()=>(this.el.addEventListener(t,r,o),()=>this.el.removeEventListener(t,r,o)))}listenOn(t,e,o,r){let n=o?.bind(this)??o;this.manager.onLifecycle(()=>(t.addEventListener(e,n,r),()=>t.removeEventListener(e,n,r)))}async componentOnReady(){return await this.#r.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 Ae=s=>{let t,e=r=>{t=new URL(r,globalThis.location?.href||void 0).href},o={...s,getAssetPath(r){let n=new URL(r,t);return n.origin!==globalThis.location?.origin?n.href:n.pathname},setAssetPath:e,customElement(r,n){n.K=o,n.L=r,customElements.get(r)||customElements.define(r,n)}};return e(s.defaultAssetPath),o};var Dr=s=>typeof s=="object"&&s!=null?ve(s):s,xr=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(r){return e.#t.call(this,r)}}render(t){return typeof t=="function"?(this.#t=t,Nt(this.#e)):Nt(t)}},Lr=$(It);var Ur=d;var Rr=s=>{let t=document.createElement("div");return at(s,t),t.firstElementChild};var Q=Ae({defaultAssetPath:"https://jsdev.arcgis.com/5.1.0-next/portal-components/",hydratedAttribute:"hydrated"}),{customElement:Hr,getAssetPath:zr,setAssetPath:Vr}=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,re as d,ne as e,Ms as f,ks as g,Ce as h,j as i,ys as j,f as k,d as l,b as m,Ds as n,oe as o,xs as p,Ls as q,Ve as r,Be as s,We as t,Fe as u,Tt as v,pe as w,Ks as x,ts as y,y as z,$ as A,g as B,Ys as C,Zs as D,me as E,Xs as F,to as G,ho as H,Nt as I,be as J,Dr as K,xr as L,Ur as M,Rr as N,Q as O,Hr as P,zr as Q};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import a from"./UXUVTFIJ.js";import"./S2PHM4WZ.js";import{a as f}from"./CQYRDCAS.js";import{a as w}from"./A6YUOK3J.js";import"./AJZHPBED.js";import{H as u,I as g,J as h,M as b,P as y,Q as I,h as m,j as l,u as d}from"./GWHFVZ3O.js";export default $arcgis.t(([,R,{i:k}])=>{var S=m`.thumbnail-container{width:100%}.replacement-container{margin:.5rem}.replacement-message{margin-bottom:.5rem}.replacement-card__title{margin-bottom:.25rem}`,C=["3DInsetMap","3DScene","3DViz","AttachmentViewer","CapacityAnalysis","Cascade","Compare","Compare/Configure","Compare/Multiviewer","Compare/Search","Compare/SideBySideViewer_Configure","Compare/storytelling_compare","Compare/storytelling_sidepanel","Compare/storytelling_tabbed","Compare3d","CompareAnalysis","CompareMaps","CrowdsourceManager","CrowdsourcePolling","CrowdsourceReporter","Directions","Edit","Editor","Elevations","ElevationsProfile","Embed","Filter","FilterGallery","GeoForm","GeoList","GeoTour","HeaderFooter","Identify","ImageInterpretation","ImageMask","ImageVisit","ImageryViewer","ImpactSummary","InformationLookup","InteractiveFilter","InteractiveLegend","LayerShowcase","Legend","LiveMaps","LocalPerspective","MapAndAppGallery","MapCarousel","MapJournal","MapSeries","Shortlist","MapTools","MapTour","Media","MinimalGallery","Minimalist","MobileViewer","Nearby","OnePane","Panels","PanelsLegend","Profile","PublicGallery","PublicInformation","ServiceLookup","SimpleMapViewer","SimpleViewer","SocialMedia","Solutions/s2.html?app=apps2/FindEditFilter","Solutions/s2.html?app=apps2/Finder","Solutions/s2.html","StoryMapBasic","StorytellingSwipe","StorytellingTextLegend","Styler","SummaryViewer","Time","TimeAware","TwoPane","View","Viewer","ZoneLookup"],M=i=>{if(!i)return!1;let e=C.some(t=>{let r=t.includes(".html"),n=`/apps/${t}${r?"":"/"}`;return decodeURIComponent(i.url)?.includes(n)});return i.type==="Web Mapping Application"&&!!i.url&&e};function T(i){let e=["Cascade","MapTour","MapJournal","MapSeries","Shortlist","StoryMapCrowdsource","SwipeSpyglass","Story Map"];return i.type==="Web Mapping Application"&&(D(e,i)||A(i))}function A(i){return["Cascade","MapTour","MapJournal","MapSeries","Shortlist","StoryMapCrowdsource","StorytellingSwipe"].some(e=>{let t=`/apps/${e}/index.html`;return decodeURIComponent(i.url)?.includes(t)})}function D(i,e){return i?.some(t=>e?.typeKeywords?.includes(t))}function $(i){let e=P(i);return I(`assets/portal-item-thumbnail/${e}`)}function P(i){let e=i.type?.toLowerCase(),t=i.typeKeywords||[];switch(e){case"web mapping application":return"webapp.png";case"mobile application":return"mobileapp.png";case"notebook code snippets":case"notebook code snippet library":return"notebookcodesnippets.png";case"notebook":return"notebook.png";case"style":return t.includes("Dictionary")?"dictionarystyle.png":"style.png";case"feature service":return t.includes("Location Tracking View")?"locationtrackingservice.png":t.includes("IndoorPositioningDataService")?"indoor-positioning-data-service.png":"default.png";case"pro presentation":return"pro-presentation.png";case"reality mapping project":return"realitymappingproject.png";case"raster function template":return"rasterfunctiontemplate.png";case"workforce project":return"workforceproject.png";case"hub initiative":return"hubinitiative.png";case"hub page":return"hubpage.png";case"hub site application":case"site application":return"hubsite.png";case"hub event":return"hubevent.png";case"hub project":return"hubproject.png";case"dashboard":return t.includes("ArcGIS Dashboards")?"dashboards.png":"opsdashboard.png";case"geoprocessing service":return t.includes("Notebook Web Tool")?"notebookwebtool.png":"webtool.png";case"web scene":case"scene service":return"scene.png";case"ortho mapping project":return"orthomappingproject.png";case"ortho mapping template":return"orthomappingtemplate.png";case"insights theme":return"insightstheme.png";case"insights workbook package":return"insightsworkbookpackage.png";case"solution":return"solution.png";case"mobile scene package":return"mobilescenepackage.png";case"deep learning package":return"deeplearningpackage.png";case"big data analytic":return"bigdataanalytic.png";case"real time analytic":return"realtimeanalytic.png";case"feed":return"feed.png";case"excalibur imagery project":return"excaliburimageryproject.png";case"storymap":return t?.includes("storymapcollection")?"storymapcollection.png":"storymap.png";case"survey123 add in":return"survey123addin.png";case"mission":return"mission.png";case"mission template":return"missiontemplate.png";case"quickcapture project":return"quickcaptureproject.png";case"pro report":return"proreport.png";case"pro package":return"propackage.png";case"pro report template":return"proreporttemplate.png";case"urban model":return"urbanmodel.png";case"urban project":return"urbanproject.png";case"web experience":return"webexperience.png";case"web experience template":return"webexperiencetemplate.png";case"experience builder widget":return"experiencebuilderwidget.png";case"experience builder widget package":return"experiencebuilderwidgetpackage.png";case"workflow":return"workflow.png";case"insights script":return"insightsscript.png";case"kernel gateway connection":return"kernelgatewayconnection.png";case"hub initiative template":return"hubinitiativetemplate.png";case"image service":return t?.includes("Tile Imagery")?"tiledimagerylayer.png":"imagerylayer.png";case"mission report":return"missionreport.png";case"administrative report":return"administrativereport.png";case"storymap theme":return"storymaptheme.png";case"knowledge graph":return"knowledgegraph.png";case"knowledge graph layer":return"knowledgegraphlayer.png";case"knowledge studio project":return"knowledgestudio.png";case"earth configuration":return"earthconfiguration.png";case"link chart":return"linkchart.png";case"investigation":return"investigation.png";case"apache parquet":return"apacheparquet.png";case"curated collection":return"curatedcollection.png";case"video service":return"mediaservice.png";case"geodata service":return"geodataservice.png";case"suitability model":return"suitabilitymodel.png";case"esri classifier definition":return"classifierdefinition.png";case"esri spectral library":return"spectrallibrary.png";case"deep learning studio project":return"deeplearningstudioproject.png";case"esri classification schema":return"classificationschema.png";case"insights data engineering workbook":return"dataengineeringworkbook.png";case"insights data engineering model":return"dataengineeringmodel.png";case"discussion":return"discussion.png";case"api key":return"apikey.png";case"data pipeline":return"datapipeline.png";case"analysis model":return"analysismodel.png";case"service connection":return"serviceconnection.png";case"xr experience":return"xrexperience.png";case"3dtiles service":return t?.includes("GaussianSplat")?"gaussiansplatlayer.png":"default.png";default:return"default.png"}}function U(i,e,t){let{restUrl:r}=i,n=j(i),a=n?`token=${n}`:"",c=`${r}/content/items/${e.id}`;if(e.thumbnail){let o=e.thumbnailUrl;if(o){let s=new URL(o);return s.searchParams.append("w","400"),s.href}return`${c}/info/${e.thumbnail}?w=400${n?"&":""}${a}`}else if(e.type==="Image")return`${c}/data?${a}`;return $(e)}function j(i){return i?.credential?.token||i?.token||i?.user?.credential?.token||i?.portalUser?.token||""}function x({portal:i,usePortalHostname:e}){let{customBaseUrl:t,portalHostname:r,urlKey:n}=i,{protocol:a}=window.location,c=!e&&n?`${n}.${t}`:r;return`${a}//${c}`}var v=5e3,p=class extends h{constructor(){super(...arguments),this.replacementId=null,this.replacementItemInRecycleBin=!1,this.hasInaccessibleReplacementItem=!1,this.thumbnailUrl=null,this.timer=void 0,this.t9n=w({blocking:!0}),this.primaryActionRef=u(),this.getItemDetailsUrl=({portal:e,itemId:t,redirect:r})=>{let n=x({portal:e,usePortalHostname:!this.user});return n?`${`${n}/home`}/item.html?id=${t}${r?"&performRedirectAction=true":""}`:""},this.performRedirectAction=()=>{window.open(this.getItemDetailsUrl({portal:this.portal,itemId:this.replacementId,redirect:!0}),"_self")},this.viewItemDetailsPage=()=>{window.open(this.getItemDetailsUrl({portal:this.portal,itemId:this.replacementId??this.itemId}),this.canRedirect?"_self":"_blank")},this.item=null,this.replacementItem=null,this.redirectAction=null,this.canRedirect=!1,this.redirectDisabled=!1,this.open=!1,this.redirectTimeRemaining=v/1e3,this.arcgisPortalReplacementItemFetch=d()}static{this.properties={item:16,replacementItem:16,redirectAction:16,canRedirect:16,redirectDisabled:16,open:16,redirectTimeRemaining:16,itemId:1,portal:0,user:0}}static{this.styles=S}async setFocus(){this.primaryActionRef.value?.setFocus()}willUpdate(e){(e.has("itemId")||e.has("portal")||e.has("user"))&&(this.user??=this.portal?.user??null,this.initItem())}setupTimer({onComplete:e}){typeof this.timer=="number"&&clearInterval(this.timer),this.redirectTimeRemaining=v/1e3,this.timer=setInterval(()=>{if(this.redirectTimeRemaining<=0){clearInterval(this.timer),this.timer=void 0,e();return}this.redirectTimeRemaining-=1},1e3)}cancelTimer({onCancel:e}={}){e?.(),clearInterval(this.timer)}handleClose(){this.cancelTimer(),this.itemId="",this.item=null,this.open=!1}disableRedirect(){this.cancelTimer(),this.redirectDisabled=this.canRedirect}isItemRetired(e){return M(e)||T(e)}async initItem(){if(!this.itemId)return;let{itemId:e,portal:t,performRedirectAction:r}=this,n=new R({id:e,portal:t});this.item=await n?.load();let a=await k(e,t,{relationshipType:"ReplacementItem2Item",direction:"reverse"},!0),c=a.data?.relatedItems?.[0];this.replacementItemInRecycleBin=c?.inRecycleBin;let o=c?.id,s=!this.replacementItemInRecycleBin&&o?new R({id:o,portal:t}):null;await s?.load(),this.replacementItem=s,this.hasInaccessibleReplacementItem=this.replacementItemInRecycleBin||!s&&a.data?.aggregations?.total?.count>0&&a.data?.relatedItems?.length===0,this.arcgisPortalReplacementItemFetch.emit({replacementItem:this.hasInaccessibleReplacementItem?{}:s||null}),this.replacementItem=s,this.thumbnailUrl=U(t,s??this.item),this.canRedirect=!!s&&this.isItemRetired(n),this.replacementId=s?.id||null,this.canRedirect&&this.setupTimer({onComplete:()=>r()}),this.open=!0}getReplacementHeading(){let{t9n:e,hasInaccessibleReplacementItem:t,canRedirect:r}=this;return t?e.replacementUnavailable:r?e.redirectToReplacement:this.isItemRetired(this.item)&&!this.replacementItem?e.retiredTitle:e.replacementAvailable}getReplacementMessage(){let{t9n:e,hasInaccessibleReplacementItem:t,canRedirect:r}=this;return t?e.retiredReplacementUnavailable:r?e.deprecatedHasReplacement:this.isItemRetired(this.item)&&!this.replacementItem?e.retired:e.deprecatedHasReplacement}renderCard(e){let{canRedirect:t,t9n:r}=this;return l`<calcite-card thumbnail-position=inline-start><img slot=thumbnail class="thumbnail" src=${(this.thumbnailUrl||void 0)??b} @error=${async()=>this.thumbnailUrl=$(e)}><span slot=heading class="replacement-card__title">${e.title}</span><span slot=description>${r.ownedBy?.replace("${owner}",e.owner||"")||""}</span>${t&&l`<calcite-link slot=footer-start icon-end=launch icon-flip-rtl=end .href=${this.getItemDetailsUrl({portal:this.portal,itemId:this.replacementId})} target=_blank>${r.moreDetails}</calcite-link>`||""}</calcite-card>`}render(){let{open:e,t9n:t,item:r,replacementItem:n,canRedirect:a,redirectDisabled:c,redirectTimeRemaining:o}=this;if(!(!r||!this.isItemRetired(r)))return l`<calcite-dialog modal .open=${e} width=s kind=info outside-close-disabled escape-disabled close-disabled .heading=${this.getReplacementHeading()} @calciteDialogClose=${()=>this.handleClose()}><div class="replacement-container"><div class="replacement-message">${f(this.getReplacementMessage()?.replace("${itemTitle}",this.item?.title||""))}</div>${this.renderCard(a?n:r)}</div>${a&&!c&&l`<calcite-button slot=footer-end appearance=outline-fill kind=neutral @click=${()=>{this.disableRedirect()}}>${t.cancel}</calcite-button>`||""}<calcite-button .disabled=${c} slot=footer-end @click=${()=>{this.cancelTimer(),a?this.performRedirectAction():this.viewItemDetailsPage()}} .iconEnd=${a?void 0:"launch"} icon-flip-rtl=end ${g(this.primaryActionRef)}>${a?t.redirect.replace("${seconds}",`${o}`):t.moreDetails}</calcite-button></calcite-dialog>`}};y("arcgis-portal-replacement-item-redirect",p);return p},"request","portal/PortalItem",a)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import a from"./3OTUKLZI.js";import{a as f,b as w}from"./S2PHM4WZ.js";import{a as v}from"./A6YUOK3J.js";import"./AJZHPBED.js";import{J as p,K as l,P as g,h as d,j as i}from"./GWHFVZ3O.js";export default $arcgis.t(([,{b:x}])=>{function A(s,e){let{fullName:r,firstName:a,lastName:t,username:n}=s;return r||(a&&t?e==="ja"?`${t} ${a}`:`${a} ${t}`:n)}var j=d`:host{max-width:100%;display:flex;align-items:center;min-width:0}.skeleton{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite;display:flex;align-items:center}.skeleton-avatar{border-radius:100%;background-color:var(--calcite-color-foreground-3);width:var(--arcgis-user-avatar-size);height:var(--arcgis-user-avatar-size)}.skeleton-name{background-color:var(--calcite-color-foreground-3);border-radius:var(--calcite-border-radius);width:var(--arcgis-user-avatar-skeleton-width);border-radius:var(--arcgis-user-avatar-spacing);height:var(--arcgis-user-avatar-spacing);margin-inline-start:var(--arcgis-user-avatar-spacing)}@keyframes pulse{0%,to{opacity:1}50%{opacity:.5}}.avatar{display:block;flex-grow:0;flex-shrink:0;border-radius:100%;background-color:var(--calcite-color-foreground-3);width:var(--arcgis-user-avatar-size);height:var(--arcgis-user-avatar-size)}.text{color:var(--calcite-color-text-2);display:flex;flex-direction:column;justify-content:center;min-width:0;text-align:start;margin-inline-start:var(--arcgis-user-avatar-spacing);line-height:calc(var(--arcgis-user-avatar-size) / 2)}.text--no-avatar{margin-inline-start:0}.-text-underline .title{text-decoration:underline}.text--clamp{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.text--ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.has-description{font-weight:500}.description{font-weight:400;color:var(--calcite-color-text-2)}:host([scale="xs"]){font-size:.75rem;--arcgis-user-avatar-size: 18px;--arcgis-user-avatar-spacing: .25rem ;.description{font-size:.625rem;margin-top:-.125rem}.text{line-height:1.35}}:host([scale="s"]){font-size:.75rem;--arcgis-user-avatar-size: 1.5rem ;--arcgis-user-avatar-spacing: .5rem ;--arcgis-user-avatar-skeleton-width: 4rem ;.description{font-size:.625rem}}:host([scale="m"]){font-size:.875rem;--arcgis-user-avatar-size: 2rem ;--arcgis-user-avatar-spacing: .75rem ;--arcgis-user-avatar-skeleton-width: 5rem ;.description{font-size:.75rem}}:host([scale="l"]){font-size:1rem;--arcgis-user-avatar-size: 2.5rem ;--arcgis-user-avatar-spacing: 1rem ;--arcgis-user-avatar-skeleton-width: 6rem ;.description{font-size:.875rem}}`,O=s=>s.thumbnailUrl!==void 0;function k(s,e,r=!1){if(O(s))return s.thumbnailUrl;let a=s.thumbnail;if(!a)return null;if(a.startsWith("http"))return a;let t=w(e);return`${r?"https://www.arcgis.com/sharing/rest/":f(e)}community/users/${s.username}/info/${a}${t&&!r?`?token=${t}`:""}`}var c=class extends p{constructor(){super(...arguments),this.messages=v({name:null}),this.thumbnailUrl=null,this.scale="m",this.showAvatar=!0}static{this.properties={user:0,portal:0,scale:3,showName:5,showAvatar:5,heading:1,description:1,underline:5,username:1,wrap:5,checkOnline:5}}static{this.styles=j}async load(){let{username:e,checkOnline:r,portal:a,user:t}=this;e&&a?this.user=await x(e,a,r):t&&a&&(this.thumbnailUrl=k(t,a,r))}updated(e){let r=e.get("user");r&&this.portal&&(this.thumbnailUrl=k(r,this.portal,this.checkOnline))}renderSkeleton(){return i`<div class="skeleton">${this.showAvatar&&i`<div class="skeleton-avatar"></div>`||""}${this.showName&&i`<div class="skeleton-name"></div>`||""}</div>`}renderUser(){let{user:e,messages:r,thumbnailUrl:a,showAvatar:t,showName:n,description:u,scale:m,underline:b,heading:$}=this;if(!e)return[];let{fullName:z,username:y,id:U}=e,o=!!u,N=(z?.split(" ")||[]).slice(0,2).join(" "),h=this.wrap?"text--clamp":"text--ellipsis";return[t&&i`<calcite-avatar class="avatar" .scale=${m==="xs"?"s":m} .fullName=${N} .username=${y} .userId=${U} .thumbnail=${a||void 0} .inert=${n||o?!0:void 0}></calcite-avatar>`||"",(n||o)&&i`<span class=${l({text:!0,"text--underline":b,"text--no-avatar":!t})}>${n&&i`<span class=${l({title:!0,"has-description":o,[h]:!0})}>${$||A(e,r._lang)}</span>`||""}${o&&i`<span class=${l({description:!0,[h]:!0})}>${u}</span>`||""}</span>`||""]}render(){return this.user&&this.messages._lang?this.renderUser():this.renderSkeleton()}};g("arcgis-user-avatar",c);return c},"portal/PortalUser",a)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import a from"./PBZ25RYU.js";import{b as P}from"./TU5JIOHN.js";import{a as x}from"./GVEUS7RX.js";import{m as v,r as g,s as C,w}from"./P7WBU7KL.js";export default $arcgis.t(([j,{property:p,subclass:I},{on:Y,watch:M},{createObservable:D,trackAccess:O},{property:J,subclass:Q},z,{a:E,b:b}])=>{var A=(t,o)=>i=>U(i,t),u=class extends w{constructor(o,i){super(o),this.Y=new Map,this.A=void 0,this.#e=D();let e=this;e.#t=i,e.Z(),e.setProvisionalExports(S(o,new WeakRef(e),o.M.length-1,e.instance,e.Y),!1),g(o,r=>{if(r){let n=M(()=>o[r],s=>{if(s===e.instance)return;let c=e.instance;e.exports=s,e.instance=s,e.Y.forEach((d,m)=>o.requestUpdate(d,c[m])),e.#o&&c.destroy(),e.#o=!1},{sync:!0});e.onDestroy(n.remove)}},e.exports)}#o;#e;#t;get exports(){return O(this.#e),super.exports}set exports(o){super.exports=o,this.#e.notify()}Z(){let o=this;o.instance="prototype"in o.#t&&"declaredClass"in o.#t.prototype?new o.#t:o.#t(),o.#o=!0}hostConnected(){this.exports=this.instance}hostDestroy(){this.#o&&this.instance.destroy?.()}},U=x(u),S=(t,o,i,e,r)=>new Proxy(e,{get:(n,s)=>{let c=n[s];if(typeof s=="symbol"||r.has(s))return c;let d=t.M[i];return d.A=s,C(t,m=>{if(d.A=void 0,m!==void 0){let f=m.key;r.set(s,f);let h=t.constructor.getPropertyOptions(f),y=s!==f&&f.toLowerCase().includes("disable");$(o,h,s,f,y),h.i===void 0&&N(h,i,s,y)}},c)}}),$=(t,o,i,e,r,n)=>n=M(()=>{let s=t.deref();return s===void 0||s.component.manager.destroyed?n=n.remove():s.exports[i]},(s,c)=>{if(!n)return;t.deref().component?.requestUpdate(e,r?!c:c),o.c=!1},{sync:!0}),N=(t,o,i,e)=>{t.d.get=function(){let r=this.M[o]?.exports[i];return e?!r:r},t.d.set=function(r){let n=this.M[o];n.A!==i&&(n.exports[i]=e?!r:r)}};var L=Object.defineProperty,V=Object.getOwnPropertyDescriptor,l=(t,o,i,e)=>{for(var r=e>1?void 0:e?V(o,i):o,n=t.length-1,s;n>=0;n--)(s=t[n])&&(r=(e?s(o,i,r):s(r))||r);return e&&r&&L(o,i,r),r},a=class extends j{constructor(){super(...arguments),this.fetching=!1,this.status="idle",this.error=void 0,this.portalUrl=void 0,this._itemClassificationValidationErrors=new Map,this.fetchingPromise=new v}get primaryAttribute(){return this.portalClassificationSchema?.classificationMetadata.primaryAttribute}setPortalClassificationData({portalUrl:t,schema:o}){this.portalUrl=t,this.portalClassificationSchema=o,this.status="loaded",this.fetchingPromise.resolve(!0)}setFetching(t){this.fetching=t}async loadPortalClassificationData(t,{signal:o}){this.status="loading";let{result:i,error:e}=await E(t,o);if(e){e.name==="AbortError"?console.log("Request aborted."):(this.error=e,this.status="error",this.fetchingPromise.reject(e));return}else this.setPortalClassificationData({schema:i,portalUrl:t})}async validateClassification(t,o,i,e){if(!o)return"";let r=t?this._itemClassificationValidationErrors.get(t):void 0;if(r)return await r;let n=(async()=>{let{error:s}=await b(i,o,e??{});return s?s?.details.raw.messages.join(", "):""})();return t&&this._itemClassificationValidationErrors.set(t,n),t?await this._itemClassificationValidationErrors.get(t):await n}};l([p()],a.prototype,"portalClassificationSchema",2);l([p()],a.prototype,"fetching",2);l([p()],a.prototype,"status",2);l([p()],a.prototype,"error",2);l([p()],a.prototype,"portalUrl",2);l([p()],a.prototype,"_itemClassificationValidationErrors",2);a=l([I("custom.ClassificationModel")],a);var k;function _(t){return k??=new a(t),k}var at=A(_),ct=t=>new P(t,{task:async([o],{signal:i})=>{if(!o)throw new Error("Portal item is required to load classification data");if(o.loaded||await o.load({signal:i}),t.itemClassification=o.classification,t.classificationModel.status==="loading"&&await t.classificationModel.fetchingPromise.promise,!t.portalItem?.portal.hasClassificationSchema){t.classificationModel.setPortalClassificationData({portalUrl:o.portal.restUrl,schema:void 0});return}(t.classificationModel.status==="idle"||t.classificationModel.status==="loaded"&&t.classificationModel.portalUrl!==o.portal.restUrl)&&await t.classificationModel.loadPortalClassificationData(o.portal.restUrl,{signal:i})},args:()=>[t.portalItem]});return{a:at,b:ct}},"core/Accessor","core/accessorSupport/decorators","core/reactiveUtils","applications/Components/reactiveUtils","core/accessorSupport/decorators","core/Accessor",a)
2
+ import{b as P}from"./E5QVAI6E.js";import a from"./PBZ25RYU.js";import{a as E}from"./AJZHPBED.js";import{m as v,r as g,s as C,w}from"./GWHFVZ3O.js";export default $arcgis.t(([j,{property:p,subclass:I},{on:Y,watch:M},{createObservable:D,trackAccess:O},{property:J,subclass:Q},z,{a:b,b:x}])=>{var A=(t,o)=>i=>U(i,t),u=class extends w{constructor(o,i){super(o),this.Y=new Map,this.A=void 0,this.#e=D();let e=this;e.#t=i,e.Z(),e.setProvisionalExports(S(o,new WeakRef(e),o.M.length-1,e.instance,e.Y),!1),g(o,r=>{if(r){let n=M(()=>o[r],s=>{if(s===e.instance)return;let c=e.instance;e.exports=s,e.instance=s,e.Y.forEach((d,m)=>o.requestUpdate(d,c[m])),e.#o&&c.destroy(),e.#o=!1},{sync:!0});e.onDestroy(n.remove)}},e.exports)}#o;#e;#t;get exports(){return O(this.#e),super.exports}set exports(o){super.exports=o,this.#e.notify()}Z(){let o=this;o.instance="prototype"in o.#t&&"declaredClass"in o.#t.prototype?new o.#t:o.#t(),o.#o=!0}hostConnected(){this.exports=this.instance}hostDestroy(){this.#o&&this.instance.destroy?.()}},U=E(u),S=(t,o,i,e,r)=>new Proxy(e,{get:(n,s)=>{let c=n[s];if(typeof s=="symbol"||r.has(s))return c;let d=t.M[i];return d.A=s,C(t,m=>{if(d.A=void 0,m!==void 0){let f=m.key;r.set(s,f);let h=t.constructor.getPropertyOptions(f),y=s!==f&&f.toLowerCase().includes("disable");$(o,h,s,f,y),h.i===void 0&&N(h,i,s,y)}},c)}}),$=(t,o,i,e,r,n)=>n=M(()=>{let s=t.deref();return s===void 0||s.component.manager.destroyed?n=n.remove():s.exports[i]},(s,c)=>{if(!n)return;t.deref().component?.requestUpdate(e,r?!c:c),o.c=!1},{sync:!0}),N=(t,o,i,e)=>{t.d.get=function(){let r=this.M[o]?.exports[i];return e?!r:r},t.d.set=function(r){let n=this.M[o];n.A!==i&&(n.exports[i]=e?!r:r)}};var L=Object.defineProperty,V=Object.getOwnPropertyDescriptor,l=(t,o,i,e)=>{for(var r=e>1?void 0:e?V(o,i):o,n=t.length-1,s;n>=0;n--)(s=t[n])&&(r=(e?s(o,i,r):s(r))||r);return e&&r&&L(o,i,r),r},a=class extends j{constructor(){super(...arguments),this.fetching=!1,this.status="idle",this.error=void 0,this.portalUrl=void 0,this._itemClassificationValidationErrors=new Map,this.fetchingPromise=new v}get primaryAttribute(){return this.portalClassificationSchema?.classificationMetadata.primaryAttribute}setPortalClassificationData({portalUrl:t,schema:o}){this.portalUrl=t,this.portalClassificationSchema=o,this.status="loaded",this.fetchingPromise.resolve(!0)}setFetching(t){this.fetching=t}async loadPortalClassificationData(t,{signal:o}){this.status="loading";let{result:i,error:e}=await b(t,o);if(e){e.name==="AbortError"?console.log("Request aborted."):(this.error=e,this.status="error",this.fetchingPromise.reject(e));return}else this.setPortalClassificationData({schema:i,portalUrl:t})}async validateClassification(t,o,i,e){if(!o)return"";let r=t?this._itemClassificationValidationErrors.get(t):void 0;if(r)return await r;let n=(async()=>{let{error:s}=await x(i,o,e??{});return s?s?.details.raw.messages.join(", "):""})();return t&&this._itemClassificationValidationErrors.set(t,n),t?await this._itemClassificationValidationErrors.get(t):await n}};l([p()],a.prototype,"portalClassificationSchema",2);l([p()],a.prototype,"fetching",2);l([p()],a.prototype,"status",2);l([p()],a.prototype,"error",2);l([p()],a.prototype,"portalUrl",2);l([p()],a.prototype,"_itemClassificationValidationErrors",2);a=l([I("custom.ClassificationModel")],a);var k;function _(t){return k??=new a(t),k}var at=A(_),ct=t=>new P(t,{task:async([o],{signal:i})=>{if(!o)throw new Error("Portal item is required to load classification data");if(o.loaded||await o.load({signal:i}),t.itemClassification=o.classification,t.classificationModel.status==="loading"&&await t.classificationModel.fetchingPromise.promise,!t.portalItem?.portal.hasClassificationSchema){t.classificationModel.setPortalClassificationData({portalUrl:o.portal.restUrl,schema:void 0});return}(t.classificationModel.status==="idle"||t.classificationModel.status==="loaded"&&t.classificationModel.portalUrl!==o.portal.restUrl)&&await t.classificationModel.loadPortalClassificationData(o.portal.restUrl,{signal:i})},args:()=>[t.portalItem]});return{a:at,b:ct}},"core/Accessor","core/accessorSupport/decorators","core/reactiveUtils","applications/Components/reactiveUtils","core/accessorSupport/decorators","core/Accessor",a)