@arcgis/portal-components 6.0.0-next.6 → 6.0.0-next.8

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 (136) hide show
  1. package/dist/cdn/{REM3KCX6.js → 246SJJBA.js} +1 -1
  2. package/dist/cdn/{YYTEJVBL.js → 2JAJY2VO.js} +1 -1
  3. package/dist/cdn/{R3PK7XOP.js → 2TKT6SAB.js} +1 -1
  4. package/dist/cdn/{TXC7YBGL.js → 3Y4Q2QIO.js} +1 -1
  5. package/dist/cdn/{CFRJU6VA.js → 44QEELTO.js} +1 -1
  6. package/dist/cdn/45VDX7UP.js +2 -0
  7. package/dist/cdn/{JIJO4CAS.js → 4GW4GUU2.js} +1 -1
  8. package/dist/cdn/{74T6IXSN.js → 4PE6HPG5.js} +1 -1
  9. package/dist/cdn/{5C5GHX4D.js → 4ZBV347A.js} +1 -1
  10. package/dist/cdn/{LISDTBEX.js → 57MB3EJS.js} +1 -1
  11. package/dist/cdn/{D2YQWKME.js → 5A2EOWEO.js} +1 -1
  12. package/dist/cdn/{HCNTXLUT.js → 5B4JGREM.js} +1 -1
  13. package/dist/cdn/{UZP4YMTE.js → 5UJQ4NJH.js} +1 -1
  14. package/dist/cdn/{SVROAT3Z.js → 5XZ6DP7W.js} +1 -1
  15. package/dist/cdn/{QWHGLE3O.js → 62JOBFQ4.js} +1 -1
  16. package/dist/cdn/6GOK3RN3.js +2 -0
  17. package/dist/cdn/{JWBUJT43.js → 6GP2LNEV.js} +1 -1
  18. package/dist/cdn/{3EYB5GQX.js → 6NENX7Z3.js} +1 -1
  19. package/dist/cdn/{3NSHGKZA.js → 7BHYNG4B.js} +1 -1
  20. package/dist/cdn/7LVML2FZ.js +2 -0
  21. package/dist/cdn/7TUFA422.js +2 -0
  22. package/dist/cdn/A55BLLIF.js +2 -0
  23. package/dist/cdn/{QROXYP6V.js → AWRRQ7RJ.js} +1 -1
  24. package/dist/cdn/{2CN754CY.js → AYS4RM4F.js} +1 -1
  25. package/dist/cdn/{MQK63FV7.js → BM5GFRA5.js} +1 -1
  26. package/dist/cdn/{MKSFNVXL.js → CSRZ3UYP.js} +1 -1
  27. package/dist/cdn/DG42CMOW.js +2 -0
  28. package/dist/cdn/{TUUUK3VX.js → DG6ZTIXN.js} +1 -1
  29. package/dist/cdn/EIY4PTKE.js +2 -0
  30. package/dist/cdn/EOOIJFXY.js +106 -0
  31. package/dist/cdn/{FNLBJ4ZQ.js → FCXGMUKN.js} +1 -1
  32. package/dist/cdn/{7ZWYUHGK.js → FJ3I3AJE.js} +1 -1
  33. package/dist/cdn/FYGYVFYN.js +2 -0
  34. package/dist/cdn/{DDBXEXOV.js → GI7FP7QS.js} +1 -1
  35. package/dist/cdn/GLSO37KO.js +2 -0
  36. package/dist/cdn/HL6DIHGB.js +2 -0
  37. package/dist/cdn/{JPUUMGX5.js → HNJ4WG6S.js} +1 -1
  38. package/dist/cdn/{URQML7KV.js → I2BD4LLC.js} +1 -1
  39. package/dist/cdn/I6JPDE5A.js +2 -0
  40. package/dist/cdn/{A2SQ4EMZ.js → I6WGLIEC.js} +1 -1
  41. package/dist/cdn/ICBR2OCU.js +2 -0
  42. package/dist/cdn/IQ5E2SBI.js +2 -0
  43. package/dist/cdn/J3TKEUDM.js +2 -0
  44. package/dist/cdn/{J5NPDIZM.js → JJMPNXBB.js} +1 -1
  45. package/dist/cdn/JQWP52DP.js +2 -0
  46. package/dist/cdn/{DHMNNIXZ.js → JYCYDBAG.js} +1 -1
  47. package/dist/cdn/JZ7EM2ZO.js +66 -0
  48. package/dist/cdn/{TNUCSWBN.js → KPPWXDMB.js} +1 -1
  49. package/dist/cdn/{LYLQCBVX.js → KPRVCJDS.js} +1 -1
  50. package/dist/cdn/{BYHX3UWV.js → LH2BYW64.js} +1 -1
  51. package/dist/cdn/LXCJCIZR.js +2 -0
  52. package/dist/cdn/{2TDHJSMP.js → MBED25WP.js} +1 -1
  53. package/dist/cdn/{VNU4QX7M.js → MEEQR6TP.js} +1 -1
  54. package/dist/cdn/{JN23JH3T.js → MFNIHL5Z.js} +1 -1
  55. package/dist/cdn/NH5FUP2R.js +68 -0
  56. package/dist/cdn/{ZKZDKJ6D.js → NQIA6PUB.js} +1 -1
  57. package/dist/cdn/{24QSQLRY.js → OFTSD4KV.js} +1 -1
  58. package/dist/cdn/{QTAYXO5T.js → OFWQLRQE.js} +1 -1
  59. package/dist/cdn/{E66BDC6N.js → QXBFIAOL.js} +1 -1
  60. package/dist/cdn/{RNWICLRH.js → SZBYKEBD.js} +1 -1
  61. package/dist/cdn/{Z3HGPBOR.js → U5V6FHGD.js} +1 -1
  62. package/dist/cdn/{ULFFGJXZ.js → UAOTCRUQ.js} +1 -1
  63. package/dist/cdn/UFSITLDM.js +409 -0
  64. package/dist/cdn/{EY5S6ICQ.js → UTIQNPTO.js} +1 -1
  65. package/dist/cdn/{OXPXXIWL.js → VKMH5MIX.js} +1 -1
  66. package/dist/cdn/{QUOLQGKP.js → WFCA26YH.js} +1 -1
  67. package/dist/cdn/{DLI4XKJ3.js → XARJNTJM.js} +1 -1
  68. package/dist/cdn/{4QFTKB6T.js → XQE23XTL.js} +1 -1
  69. package/dist/cdn/XWAEM6AR.js +2 -0
  70. package/dist/cdn/{JE2376SE.js → YGFVCV25.js} +1 -1
  71. package/dist/cdn/{J5FKIZAM.js → YLIARVQ3.js} +1 -1
  72. package/dist/cdn/Z3CMSP24.js +2 -0
  73. package/dist/cdn/{FIQZPIIK.js → Z6UZJYCX.js} +1 -1
  74. package/dist/cdn/{UEP2NYJK.js → ZSUK7J3T.js} +1 -1
  75. package/dist/cdn/index.js +1 -1
  76. package/dist/chunks/fieldAddDelete.js +1 -1
  77. package/dist/chunks/item.js +127 -33
  78. package/dist/chunks/item2.js +69 -126
  79. package/dist/chunks/portal-related-items-list-item.js +1 -1
  80. package/dist/chunks/portalEntitySelection.js +49 -0
  81. package/dist/chunks/query.js +10 -10
  82. package/dist/chunks/utils3.js +1 -1
  83. package/dist/components/arcgis-portal-add-gps-metadata/customElement.d.ts +6 -0
  84. package/dist/components/arcgis-portal-add-gps-metadata/customElement.js +10 -10
  85. package/dist/components/arcgis-portal-ai-assistant/customElement.d.ts +4 -0
  86. package/dist/components/arcgis-portal-ai-assistant/customElement.js +1241 -1145
  87. package/dist/components/arcgis-portal-ai-assistant/index.js +1 -0
  88. package/dist/components/arcgis-portal-ai-assistant/types/portalEntityTools.d.ts +13 -0
  89. package/dist/components/arcgis-portal-ai-assistant-interrupt/customElement.d.ts +27 -0
  90. package/dist/components/arcgis-portal-ai-assistant-interrupt/customElement.js +61 -26
  91. package/dist/components/arcgis-portal-ai-assistant-interrupt/index.js +3 -1
  92. package/dist/components/arcgis-portal-delete-items/customElement.js +344 -313
  93. package/dist/components/arcgis-portal-field-delete/customElement.js +31 -29
  94. package/dist/components/arcgis-portal-field-delete/index.js +1 -1
  95. package/dist/components/arcgis-portal-group-browser/customElement.js +8 -8
  96. package/dist/components/arcgis-portal-item-thumbnail/customElement.js +1 -1
  97. package/dist/components/arcgis-portal-mentionable-text-area/customElement.js +1 -1
  98. package/dist/components/arcgis-portal-navigation/customElement.js +1 -2
  99. package/dist/components/arcgis-portal-navigation/index.js +1 -1
  100. package/dist/components/arcgis-portal-replacement-item-redirect/customElement.js +1 -1
  101. package/dist/components/arcgis-portal-review-related-items/customElement.js +35 -20
  102. package/dist/components/portal-related-items-list-item/customElement.js +14 -14
  103. package/dist/docs/api.json +1 -1
  104. package/dist/docs/docs.json +1 -1
  105. package/dist/docs/vscode.html-custom-data.json +1 -1
  106. package/dist/docs/web-types.json +1 -1
  107. package/dist/index.d.ts +1 -0
  108. package/dist/loader.js +3 -3
  109. package/dist/types/lumina.d.ts +3 -3
  110. package/dist/types/preact.d.ts +3 -3
  111. package/dist/types/react.d.ts +3 -3
  112. package/dist/types/stencil.d.ts +3 -3
  113. package/package.json +7 -7
  114. package/dist/cdn/23NXHNPU.js +0 -2
  115. package/dist/cdn/26PILQCA.js +0 -2
  116. package/dist/cdn/2FQKDFEE.js +0 -2
  117. package/dist/cdn/2RDQX6UR.js +0 -2
  118. package/dist/cdn/3FSPL34I.js +0 -170
  119. package/dist/cdn/3LEQ37YT.js +0 -68
  120. package/dist/cdn/4PRXQFCV.js +0 -2
  121. package/dist/cdn/EEAVX4PP.js +0 -2
  122. package/dist/cdn/GSOBDGLK.js +0 -2
  123. package/dist/cdn/GXM3XY3J.js +0 -2
  124. package/dist/cdn/MRJO2LXU.js +0 -2
  125. package/dist/cdn/N4VOTJ25.js +0 -2
  126. package/dist/cdn/RDXUP624.js +0 -2
  127. package/dist/cdn/S6F7U36E.js +0 -400
  128. package/dist/cdn/SMX2LEJB.js +0 -2
  129. package/dist/cdn/TBZXKKGP.js +0 -2
  130. package/dist/cdn/TOICLGFK.js +0 -2
  131. package/dist/cdn/WWEK2CFY.js +0 -2
  132. package/dist/cdn/YB3DR4VO.js +0 -2
  133. package/dist/cdn/ZDDN7UKS.js +0 -2
  134. package/dist/cdn/ZXNF77OB.js +0 -2
  135. package/dist/chunks/functional.js +0 -9
  136. /package/dist/cdn/{XYMBRPC7.js → ZDMCDQRC.js} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import b from"./RHCRPJWS.js";import{c as d}from"./EMJQI4MA.js";import{a as p}from"./7ZWYUHGK.js";import{J as a,K as l,L as o,M as n,R as c,h as i,j as t,w as s}from"./AICPYLWE.js";export default $arcgis.t(([{a:h,c:b}])=>{var f=i`:host{position:relative;display:block;background-color:var(--arcgis-browser-top-bar-background, var(--calcite-color-foreground-1));container-type:inline-size;container-name:browser-top-bar}.wrapper{display:flex;margin-inline:auto;max-width:var(--arcgis-browser-max-width)}.bucket{display:flex}.search-and-sort{display:flex;flex:1;align-items:center;padding-inline-end:1.5rem;min-height:3rem}.search{flex:1}.filter{margin-block:.25rem;padding-inline:.5rem;display:flex;justify-content:center;align-items:center}.bucket--mobile{display:none;text-align:center;border-bottom:1px solid var(--calcite-color-border-3)}.rel{position:relative}.bucket--desktop{display:flex}.indicator{width:.5rem;height:.5rem;position:absolute;border-radius:999px;top:0;pointer-events:none;z-index:20;background-color:var(--calcite-color-brand);inset-inline-start:0}.filter-status--with-toggle{display:none}@container browser-top-bar (min-width: 769px){.filter{display:none}.filter-status--with-toggle{display:inline-flex}}@container browser-top-bar (max-width: 640px){.bucket--mobile{display:block}.bucket--desktop{display:none}.search-and-sort{padding-inline-end:0}}`,r=class extends o{constructor(){super(...arguments),this.searchWrapper=a(),this.resizeObserver=null,this._messages=p({name:"portal-browser",blocking:!0}),this.width=0,this.store=b(),this.filtersDisabled=!1,this.arcgisBrowserFilterClear=s(),this.arcgisBrowserFilterRemove=s()}static{this.properties={width:16,store:0,filtersDisabled:5}}static{this.styles=f}firstUpdated(){this.updateWidth(),!(typeof ResizeObserver>"u"||!this.searchWrapper.value)&&(this.resizeObserver=new ResizeObserver(()=>this.updateWidth()),this.resizeObserver.observe(this.searchWrapper.value))}disconnectedCallback(){this.resizeObserver?.disconnect(),this.resizeObserver=null,super.disconnectedCallback()}updateWidth(){requestAnimationFrame(()=>{this.width=this.searchWrapper.value?.offsetWidth||0})}hasActiveFilter(){return Object.values(this.store.filters).some(e=>!!e.value&&!d(h,e.id))}handleClick(){this.store.preview=null,this.store.filtersExpanded=!this.store.filtersExpanded}render(){let e=(!this.store.filtersEmpty||!this.store.sortEmpty&&this.store.panel)&&!this.filtersDisabled,m=this._messages.topBar.filter;return t`<div><div class="bucket bucket--mobile"><slot name=bucket></slot></div><slot name=primary-filter></slot><div class="wrapper"><slot name=content-start></slot><div class="bucket bucket--desktop"><slot name=bucket></slot></div><div class="search-and-sort" ${l(this.searchWrapper)}><div class="search"><slot name=search></slot></div>${!this.filtersDisabled&&t`<arcgis-portal-browser-filter-status .componentWidth=${this.width} .browserWidth=${this.width} class=${n({"filter-status":!0,"filter-status--with-toggle":e})} .filters=${this.store.filters} .hiddenFilterIds=${this.store.hiddenFilters||[]} @arcgisBrowserFilterClear=${()=>{this.arcgisBrowserFilterClear.emit(null)}} @arcgisBrowserFilterRemove=${u=>{this.arcgisBrowserFilterRemove.emit(u.detail)}}></arcgis-portal-browser-filter-status>`||""}</div>${e&&t`<div class="filter"><div class="rel">${this.hasActiveFilter()&&t`<span class="indicator"></span>`||""}<calcite-button class="filter-toggle" scale=s appearance=transparent kind=neutral icon-start=sliders .label=${m} @click=${()=>this.handleClick()} aria-expanded=${this.store.filtersExpanded?"true":"false"}></calcite-button></div></div>`||""}<slot name=content-end></slot></div></div>`}};c("arcgis-portal-browser-top-bar",r);return r},b)
2
+ import b from"./RHCRPJWS.js";import{c as d}from"./EMJQI4MA.js";import{a as p}from"./FJ3I3AJE.js";import{J as a,K as l,L as o,M as n,R as c,h as i,j as t,w as s}from"./AICPYLWE.js";export default $arcgis.t(([{a:h,c:b}])=>{var f=i`:host{position:relative;display:block;background-color:var(--arcgis-browser-top-bar-background, var(--calcite-color-foreground-1));container-type:inline-size;container-name:browser-top-bar}.wrapper{display:flex;margin-inline:auto;max-width:var(--arcgis-browser-max-width)}.bucket{display:flex}.search-and-sort{display:flex;flex:1;align-items:center;padding-inline-end:1.5rem;min-height:3rem}.search{flex:1}.filter{margin-block:.25rem;padding-inline:.5rem;display:flex;justify-content:center;align-items:center}.bucket--mobile{display:none;text-align:center;border-bottom:1px solid var(--calcite-color-border-3)}.rel{position:relative}.bucket--desktop{display:flex}.indicator{width:.5rem;height:.5rem;position:absolute;border-radius:999px;top:0;pointer-events:none;z-index:20;background-color:var(--calcite-color-brand);inset-inline-start:0}.filter-status--with-toggle{display:none}@container browser-top-bar (min-width: 769px){.filter{display:none}.filter-status--with-toggle{display:inline-flex}}@container browser-top-bar (max-width: 640px){.bucket--mobile{display:block}.bucket--desktop{display:none}.search-and-sort{padding-inline-end:0}}`,r=class extends o{constructor(){super(...arguments),this.searchWrapper=a(),this.resizeObserver=null,this._messages=p({name:"portal-browser",blocking:!0}),this.width=0,this.store=b(),this.filtersDisabled=!1,this.arcgisBrowserFilterClear=s(),this.arcgisBrowserFilterRemove=s()}static{this.properties={width:16,store:0,filtersDisabled:5}}static{this.styles=f}firstUpdated(){this.updateWidth(),!(typeof ResizeObserver>"u"||!this.searchWrapper.value)&&(this.resizeObserver=new ResizeObserver(()=>this.updateWidth()),this.resizeObserver.observe(this.searchWrapper.value))}disconnectedCallback(){this.resizeObserver?.disconnect(),this.resizeObserver=null,super.disconnectedCallback()}updateWidth(){requestAnimationFrame(()=>{this.width=this.searchWrapper.value?.offsetWidth||0})}hasActiveFilter(){return Object.values(this.store.filters).some(e=>!!e.value&&!d(h,e.id))}handleClick(){this.store.preview=null,this.store.filtersExpanded=!this.store.filtersExpanded}render(){let e=(!this.store.filtersEmpty||!this.store.sortEmpty&&this.store.panel)&&!this.filtersDisabled,m=this._messages.topBar.filter;return t`<div><div class="bucket bucket--mobile"><slot name=bucket></slot></div><slot name=primary-filter></slot><div class="wrapper"><slot name=content-start></slot><div class="bucket bucket--desktop"><slot name=bucket></slot></div><div class="search-and-sort" ${l(this.searchWrapper)}><div class="search"><slot name=search></slot></div>${!this.filtersDisabled&&t`<arcgis-portal-browser-filter-status .componentWidth=${this.width} .browserWidth=${this.width} class=${n({"filter-status":!0,"filter-status--with-toggle":e})} .filters=${this.store.filters} .hiddenFilterIds=${this.store.hiddenFilters||[]} @arcgisBrowserFilterClear=${()=>{this.arcgisBrowserFilterClear.emit(null)}} @arcgisBrowserFilterRemove=${u=>{this.arcgisBrowserFilterRemove.emit(u.detail)}}></arcgis-portal-browser-filter-status>`||""}</div>${e&&t`<div class="filter"><div class="rel">${this.hasActiveFilter()&&t`<span class="indicator"></span>`||""}<calcite-button class="filter-toggle" scale=s appearance=transparent kind=neutral icon-start=sliders .label=${m} @click=${()=>this.handleClick()} aria-expanded=${this.store.filtersExpanded?"true":"false"}></calcite-button></div></div>`||""}<slot name=content-end></slot></div></div>`}};c("arcgis-portal-browser-top-bar",r);return r},b)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{a as U}from"./GUL7EIJ4.js";import{a as f,b as O}from"./PNIFJ5DQ.js";import h from"./4TSXFX3M.js";import e from"./TBZXKKGP.js";import"./JOUR2FB2.js";import"./VDXESPJK.js";import"./DAAON2UO.js";import c from"./RQYNPDN3.js";import b from"./ROX3GKKA.js";import{a as P}from"./TWCJJCPC.js";import a from"./PMRFXB4F.js";import"./K75JTQPW.js";import"./KV4ZZSNW.js";import"./EMJQI4MA.js";import{b as D}from"./A2SQ4EMZ.js";import"./K2XSYDAP.js";import{J as T,K as g,L as S,M as $,R as k,h as M,j as o,w as d}from"./AICPYLWE.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";export default $arcgis.t(([{a:x},,{b:E},{a:R},{a:L}])=>{var F=n=>f.includes(n)?n:"@",q=D(n=>{let e=[],i=async s=>await x({requester:async()=>await R(n.portal,s,{num:3}),key:"items",id:s}),l=async s=>await x({requester:async()=>await L(n.portal,{query:`title:${s}`,num:3}),key:"groups",id:s}),a=U(async(s,t)=>{n.isFetchingEntities=!0;let r=s.toLowerCase();switch(F(t)){case"@":let m=10;n.filteredItemsInfo={type:"user",items:e.filter(h=>h.username?.toLowerCase().includes(r)||h.fullName?.toLowerCase().includes(r)).slice(0,m)};break;case"#":let{result:u}=await i(r);n.filteredItemsInfo={type:"item",items:u?.results??[]};break;case"$":let{results:c}=await l(r);n.filteredItemsInfo={type:"group",items:c};break}(n.filteredItemsInfo?.items?.length??0)===0&&await n.closePopover(),n.isFetchingEntities=!1},400);return{fetchUsers:async()=>{try{let{users:s}=await E(n.portal);e=s??[]}catch(s){e=[],console.error("error fetching org users:",s)}},filterItems:a,getItemText:(s,t)=>{let r="";switch(F(t)){case"@":r=s.username;break;case"#":r=s.title??"";break;case"$":r=s.title??"";break}return r.trim()}}}),y=({id:n,label:e,selected:i,description:l,contentStart:a,onSelect:s})=>P(n,o`<calcite-list-item class=${$({selected:i})} .label=${e} .description=${l} .selected=${i} @pointerdown=${async t=>{t.preventDefault(),t.stopPropagation(),await s()}} ${g(t=>{i&&t&&t.scrollIntoView({block:"nearest",behavior:"smooth"})})}>${a}</calcite-list-item>`),Q=M`.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 S{constructor(){super(...arguments),this.calciteTextAreaRef=T(),this.mentionableEntityController=q(this),this.handleInput=e=>{let{bubbleNewValueChange:i,checkForMention:l}=this,a=e.target.value;this._value=a,i(this._value);let s=this.nativeTextAreaRef?.selectionStart??0;l(a,s)},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,i)=>{let l=e.substring(0,i),a=O(l,this.starters??f);if(a){let{starter:s}=a;this.currentStarter=s,this.filterMentionItems(a),this.popoverOpen=!0;return}this.handleClosePopover()},this.filterMentionItems=e=>{let{mentionText:i,query:l,starter:a,startIndex:s}=e;this.currentMentionQuery=i,this.mentionStartPosition=s;let t=l.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=f,this.readOnly=!1,this.arcgisMentionableSelectedIndexChange=d(),this.arcgisMentionableTextAreaChange=d(),this.arcgisMentionableTextAreaKeyDown=d(),this.arcgisUserMentionableTextAreaChange=d(),this.arcgisUserMentionableTextAreaKeyDown=d(),this.renderItemInfo=()=>{let{filteredItemsInfo:e,selectedItemIndex:i,portal:l}=this;if(!e)return null;let{items:a,type:s}=e;switch(s){case"user":return a.map((t,r)=>y({id:t.id,label:`@${t.username}`,description:t.fullName,selected:r===i,contentStart:o`<arcgis-portal-user-avatar slot=content-start .user=${t} .portal=${l} scale=m></arcgis-portal-user-avatar>`,onSelect:async()=>await this.selectItem(t)}));case"item":return a.map((t,r)=>y({id:t.id??`item-${r}`,label:`#${t.title}`,description:t.id??void 0,selected:r===i,onSelect:async()=>await this.selectItem(t),contentStart:o`<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,r)=>y({id:t.id??`group-${r}`,label:`${t.title}`,description:t.id??void 0,selected:r===i,onSelect:async()=>await this.selectItem(t),contentStart:o`<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=Q}get filteredItems(){return this.filteredItemsInfo?.items??[]}async closePopover(){this.handleClosePopover()}async focusTextArea(){await this.calciteTextAreaRef.value?.setFocus()}async selectItem(e){let{currentStarter:i,_value:l,mentionStartPosition:a,currentMentionQuery:s,handleClosePopover:t,calciteTextAreaRef:r,nativeTextAreaRef:m,bubbleNewValueChange:u}=this;if(!e||!i)return;let c=this.mentionableEntityController.getItemText(e,i).replaceAll('"',"").trim(),h=/\s/u.test(c)?`${i}"${c}"`:`${i}${c}`,b=(l??"").substring(0,a),p=(l??"").substring(a+s.length),v=`${b}${h} ${p}`;this._value=v,u(this._value);let I=a+h.length+1;t(),await this.updateComplete,r.value?.setFocus(),m&&(m.selectionEnd=I)}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:i,_value:l,maxLength:a,rows:s,placeholder:t,readOnly:r,popoverOpen:m,closePopover:u,handleInput:c,handleKeyDown:h,disabled:b,isFetchingEntities:p,filteredItemsInfo:v,renderItemInfo:I,popoverListLabel:C}=this,A=this.calciteTextAreaRef.value,_=v?.items??[];return o`<calcite-text-area .placeholder=${t} .value=${l} .maxLength=${a} .rows=${s} .scale=${i} .readOnly=${r} .disabled=${b} @blur=${u} @calciteTextAreaInput=${c} @keydown=${h} ${g(this.calciteTextAreaRef)}></calcite-text-area>${A&&o`<calcite-popover .open=${m} .placement=${e} class="mention-popover" .label=${C} .referenceElement=${A} trigger-disabled pointer-disabled focus-trap-disabled><div class=${$({"mentionable-list":!0,"mentionable-list--loading":p})}>${p&&o`<calcite-scrim .loading=${p}></calcite-scrim>`||""}${_.length>0&&o`<calcite-list .label=${C}>${I()}</calcite-list>`||""}</div></calcite-popover>`||""}`}};k("arcgis-portal-mentionable-text-area",w);return w},a,b,c,e,h)
2
+ import{a as U}from"./GUL7EIJ4.js";import{a as f,b as O}from"./PNIFJ5DQ.js";import h from"./4TSXFX3M.js";import e from"./I6JPDE5A.js";import"./JOUR2FB2.js";import"./VDXESPJK.js";import"./DAAON2UO.js";import c from"./RQYNPDN3.js";import b from"./ROX3GKKA.js";import{a as P}from"./TWCJJCPC.js";import a from"./PMRFXB4F.js";import"./K75JTQPW.js";import"./KV4ZZSNW.js";import"./EMJQI4MA.js";import{c as D}from"./I6WGLIEC.js";import"./K2XSYDAP.js";import{J as T,K as g,L as S,M as $,R as k,h as M,j as o,w as d}from"./AICPYLWE.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";export default $arcgis.t(([{a:x},,{b:E},{d:R},{a:L}])=>{var F=n=>f.includes(n)?n:"@",q=D(n=>{let e=[],i=async s=>await x({requester:async()=>await R(n.portal,s,{num:3}),key:"items",id:s}),l=async s=>await x({requester:async()=>await L(n.portal,{query:`title:${s}`,num:3}),key:"groups",id:s}),a=U(async(s,t)=>{n.isFetchingEntities=!0;let r=s.toLowerCase();switch(F(t)){case"@":let m=10;n.filteredItemsInfo={type:"user",items:e.filter(h=>h.username?.toLowerCase().includes(r)||h.fullName?.toLowerCase().includes(r)).slice(0,m)};break;case"#":let{result:u}=await i(r);n.filteredItemsInfo={type:"item",items:u?.results??[]};break;case"$":let{results:c}=await l(r);n.filteredItemsInfo={type:"group",items:c};break}(n.filteredItemsInfo?.items?.length??0)===0&&await n.closePopover(),n.isFetchingEntities=!1},400);return{fetchUsers:async()=>{try{let{users:s}=await E(n.portal);e=s??[]}catch(s){e=[],console.error("error fetching org users:",s)}},filterItems:a,getItemText:(s,t)=>{let r="";switch(F(t)){case"@":r=s.username;break;case"#":r=s.title??"";break;case"$":r=s.title??"";break}return r.trim()}}}),y=({id:n,label:e,selected:i,description:l,contentStart:a,onSelect:s})=>P(n,o`<calcite-list-item class=${$({selected:i})} .label=${e} .description=${l} .selected=${i} @pointerdown=${async t=>{t.preventDefault(),t.stopPropagation(),await s()}} ${g(t=>{i&&t&&t.scrollIntoView({block:"nearest",behavior:"smooth"})})}>${a}</calcite-list-item>`),Q=M`.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 S{constructor(){super(...arguments),this.calciteTextAreaRef=T(),this.mentionableEntityController=q(this),this.handleInput=e=>{let{bubbleNewValueChange:i,checkForMention:l}=this,a=e.target.value;this._value=a,i(this._value);let s=this.nativeTextAreaRef?.selectionStart??0;l(a,s)},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,i)=>{let l=e.substring(0,i),a=O(l,this.starters??f);if(a){let{starter:s}=a;this.currentStarter=s,this.filterMentionItems(a),this.popoverOpen=!0;return}this.handleClosePopover()},this.filterMentionItems=e=>{let{mentionText:i,query:l,starter:a,startIndex:s}=e;this.currentMentionQuery=i,this.mentionStartPosition=s;let t=l.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=f,this.readOnly=!1,this.arcgisMentionableSelectedIndexChange=d(),this.arcgisMentionableTextAreaChange=d(),this.arcgisMentionableTextAreaKeyDown=d(),this.arcgisUserMentionableTextAreaChange=d(),this.arcgisUserMentionableTextAreaKeyDown=d(),this.renderItemInfo=()=>{let{filteredItemsInfo:e,selectedItemIndex:i,portal:l}=this;if(!e)return null;let{items:a,type:s}=e;switch(s){case"user":return a.map((t,r)=>y({id:t.id,label:`@${t.username}`,description:t.fullName,selected:r===i,contentStart:o`<arcgis-portal-user-avatar slot=content-start .user=${t} .portal=${l} scale=m></arcgis-portal-user-avatar>`,onSelect:async()=>await this.selectItem(t)}));case"item":return a.map((t,r)=>y({id:t.id??`item-${r}`,label:`#${t.title}`,description:t.id??void 0,selected:r===i,onSelect:async()=>await this.selectItem(t),contentStart:o`<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,r)=>y({id:t.id??`group-${r}`,label:`${t.title}`,description:t.id??void 0,selected:r===i,onSelect:async()=>await this.selectItem(t),contentStart:o`<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=Q}get filteredItems(){return this.filteredItemsInfo?.items??[]}async closePopover(){this.handleClosePopover()}async focusTextArea(){await this.calciteTextAreaRef.value?.setFocus()}async selectItem(e){let{currentStarter:i,_value:l,mentionStartPosition:a,currentMentionQuery:s,handleClosePopover:t,calciteTextAreaRef:r,nativeTextAreaRef:m,bubbleNewValueChange:u}=this;if(!e||!i)return;let c=this.mentionableEntityController.getItemText(e,i).replaceAll('"',"").trim(),h=/\s/u.test(c)?`${i}"${c}"`:`${i}${c}`,b=(l??"").substring(0,a),p=(l??"").substring(a+s.length),v=`${b}${h} ${p}`;this._value=v,u(this._value);let I=a+h.length+1;t(),await this.updateComplete,r.value?.setFocus(),m&&(m.selectionEnd=I)}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:i,_value:l,maxLength:a,rows:s,placeholder:t,readOnly:r,popoverOpen:m,closePopover:u,handleInput:c,handleKeyDown:h,disabled:b,isFetchingEntities:p,filteredItemsInfo:v,renderItemInfo:I,popoverListLabel:C}=this,A=this.calciteTextAreaRef.value,_=v?.items??[];return o`<calcite-text-area .placeholder=${t} .value=${l} .maxLength=${a} .rows=${s} .scale=${i} .readOnly=${r} .disabled=${b} @blur=${u} @calciteTextAreaInput=${c} @keydown=${h} ${g(this.calciteTextAreaRef)}></calcite-text-area>${A&&o`<calcite-popover .open=${m} .placement=${e} class="mention-popover" .label=${C} .referenceElement=${A} trigger-disabled pointer-disabled focus-trap-disabled><div class=${$({"mentionable-list":!0,"mentionable-list--loading":p})}>${p&&o`<calcite-scrim .loading=${p}></calcite-scrim>`||""}${_.length>0&&o`<calcite-list .label=${C}>${I()}</calcite-list>`||""}</div></calcite-popover>`||""}`}};k("arcgis-portal-mentionable-text-area",w);return w},a,b,c,e,h)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import h from"./Z3HGPBOR.js";import"./PNIFJ5DQ.js";import g from"./URQML7KV.js";import f from"./QROXYP6V.js";import"./4KTRAA2J.js";import d from"./JIJO4CAS.js";import"./PKA745KL.js";import"./JOUR2FB2.js";import"./4MUB6TL6.js";import"./VDXESPJK.js";import"./DAAON2UO.js";import c from"./RQYNPDN3.js";import b from"./ROX3GKKA.js";import"./TWCJJCPC.js";import"./AXOBMX3S.js";import a from"./PMRFXB4F.js";import"./K75JTQPW.js";import"./KV4ZZSNW.js";import"./EMJQI4MA.js";import"./7ZWYUHGK.js";import"./A2SQ4EMZ.js";import"./K2XSYDAP.js";import{R as e}from"./AICPYLWE.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";export default $arcgis.t(([,,,,,,r])=>{var t=class extends r{constructor(){super(...arguments),this.entityType="user",this.selected=null}static{this.properties={entityType:32,selected:0}}};e("arcgis-portal-user-picker",t);return t},a,b,c,d,f,g,h)
2
+ import h from"./U5V6FHGD.js";import"./PNIFJ5DQ.js";import g from"./I2BD4LLC.js";import f from"./AWRRQ7RJ.js";import"./4KTRAA2J.js";import d from"./4GW4GUU2.js";import"./PKA745KL.js";import"./JOUR2FB2.js";import"./4MUB6TL6.js";import"./VDXESPJK.js";import"./DAAON2UO.js";import c from"./RQYNPDN3.js";import b from"./ROX3GKKA.js";import"./TWCJJCPC.js";import"./AXOBMX3S.js";import a from"./PMRFXB4F.js";import"./K75JTQPW.js";import"./KV4ZZSNW.js";import"./EMJQI4MA.js";import"./FJ3I3AJE.js";import"./I6WGLIEC.js";import"./K2XSYDAP.js";import{R as e}from"./AICPYLWE.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";export default $arcgis.t(([,,,,,,r])=>{var t=class extends r{constructor(){super(...arguments),this.entityType="user",this.selected=null}static{this.properties={entityType:32,selected:0}}};e("arcgis-portal-user-picker",t);return t},a,b,c,d,f,g,h)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import{a}from"./2TKT6SAB.js";import"./MEEQR6TP.js";import"./EOOIJFXY.js";import"./GGDOGNH4.js";import"./JZ7EM2ZO.js";import"./3UFTKKFG.js";import"./5PV2GUZW.js";export{a as createChatModel};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import c from"./GAF4YT5N.js";import{a as m,b as f}from"./V6A6MKLU.js";import{a as W}from"./SLQQ44IA.js";import{a as h,b as d,c as b,d as D,e as M,f as x,g as $,h as L,i as B}from"./4KTRAA2J.js";import{a as C}from"./PKA745KL.js";import a from"./RQYNPDN3.js";import{a as R}from"./7ZWYUHGK.js";import{L as v,M as w,O as S,R as A,h as T,j as g}from"./AICPYLWE.js";export default $arcgis.t(([{substitute:k},{a:I},_])=>{var z=T`.badge{--calcite-color-foreground-2: var(--arcgis-item-badge-info-background, #dfeffa);--calcite-color-text-1: var(--arcgis-item-badge-info-foreground, #00619b);--arcgis-item-badge-color: var(--arcgis-item-badge-info-foreground, #00619b);--calcite-chip-background-color: var(--arcgis-item-badge-info-background, #dfeffa);border:0}.badge--colored{--calcite-chip-icon-color: var(--calcite-color-brand)}.authoritative{--calcite-color-foreground-2: var(--arcgis-item-badge-success-background, #e4f0e4);--calcite-color-text-1: var(--arcgis-item-badge-success-foreground, #1a6324);--arcgis-item-badge-color: var(--arcgis-item-badge-success-foreground, #1a6324);--calcite-chip-background-color: var(--arcgis-item-badge-success-background, #e4f0e4)}.deprecated{--calcite-color-foreground-2: var(--arcgis-item-badge-danger-background, #fadfdc);--calcite-color-text-1: var(--arcgis-item-badge-danger-foreground, #a82b1e);--arcgis-item-badge-color: var(--arcgis-item-badge-danger-foreground, #a82b1e);--calcite-chip-background-color: var(--arcgis-item-badge-danger-background, #fadfdc)}.beta{border:0}.narrow{box-sizing:border-box;width:2rem;--calcite-chip-spacing-unit-l: 0}.narrow--s{width:1.5rem}.narrow--l{width:2.75rem}.tooltip-title{font-size:var(--calcite-font-size--1);color:var(--calcite-color-text-1);margin:0 0 .25rem;padding:0}.tooltip-text{font-size:var(--calcite-font-size--2);color:var(--calcite-color-text-1);margin:0;padding:0}:host-context(.calcite-mode-dark) .badge{--calcite-color-foreground-2: var(--arcgis-item-badge-info-background, #214155);--calcite-color-text-1: var(--arcgis-item-badge-info-foreground, #9fd4f3);--arcgis-item-badge-color: var(--arcgis-item-badge-info-foreground, #9fd4f3);--calcite-chip-background-color: var(--arcgis-item-badge-info-background, #214155)}:host-context(.calcite-mode-dark) .authoritative{--calcite-color-foreground-2: var(--arcgis-item-badge-success-background, #2b472a);--calcite-color-text-1: var(--arcgis-item-badge-success-foreground, #a2e4ab);--arcgis-item-badge-color: var(--arcgis-item-badge-success-foreground, #a2e4ab);--calcite-chip-background-color: var(--arcgis-item-badge-success-background, #2b472a)}:host-context(.calcite-mode-dark) .deprecated{--calcite-color-foreground-2: var(--arcgis-item-badge-danger-background, #5e241e);--calcite-color-text-1: var(--arcgis-item-badge-danger-foreground, #ffaaa1);--arcgis-item-badge-color: var(--arcgis-item-badge-danger-foreground, #ffaaa1);--calcite-chip-background-color: var(--arcgis-item-badge-danger-background, #5e241e)}`,U=["Operations Dashboard Add In","Operations Dashboard Extension","Operation View","CityEngine Web Scene","Big Data File Share","Globe Document","Map Document","Published Map","Scene Document","Map Template","Mobile Basemap Package","Desktop Add In"],J=["Cascade","MapTour","MapJournal","MapSeries","Shortlist","StoryMapCrowdsource","StorytellingSwipe"],j={"Geoprocessing Package":".gpk",Layer:".lyr","Layer Package":".lpk","Map Package":".mpk","Scene Package":".spk"},O="",F="template_name";function V(e){let t=decodeURIComponent(e.url||h(e).url||"");return J.find(i=>t.includes(`/apps/${i}/index.html`))}function N(e){return M(e)}function Q(e){return x(e)}function X(e){return $(e)}function E(e){return e.type==="Web Mapping Application"&&p(e,["Web AppBuilder","AppBuilder Extension"])}function P(e,t){return(t?.isPortal??!1)&&d(e).includes("AppBuilder Extension")}function p(e,t){return e.typeKeywords?.some(i=>t.includes(i))}function Y(e,t){return K(e,t)&&!q(e,t)}function K(e,t){let i=["HTML3D/HTML","App Builder","Widget"],a=["HTML3D/HTML","Web AppBuilder","Widget"],r=e.type==="Web Mapping Application",n=r&&p(e,["Web AppBuilder"]),l=r&&p(e,["WABTemplate"]),c=e.type==="AppBuilder Widget Package"&&p(e,i),o=e.type==="Web AppBuilder Widget"&&p(e,a),s=!!e?.owner?.startsWith("esri_")&&r&&p(e,["Web AppBuilder for ArcGIS"]);return n||l||c||o||P(e,t)||s}function Z(e,t){return t?.isPortal&&["Insights Workbook","Insights Page","Insights Model","Insights Theme","Insights Workbook Package","Kernel Gateway Connection","Insights Script","Insights Data Engineering Workbook","Insights Data Engineering Model","Relational Database Connection"].includes(e.type||"")}var q=(e,t)=>(t?.isPortal??!1)&&(E(e)||P(e,t)||m(e)||Z(e,t));function ee(e,t,i){return e.type===t&&(h(e).name?.endsWith(i)??!1)}function te(e){return Object.entries(j).some(([t,i])=>ee(e,t,i))}function ie(e,t){return U.includes(e.type)||te(e)||f(e)||N(e)||m(e)||q(e,t)}function ae(e){return(e.owner||"").toLowerCase().includes("esri")&&d(e).includes("Requires Credits")}function re(e){return(e.owner||"").toLowerCase().includes("esri")&&d(e).includes("Requires Subscription")}function oe(e){return b(e)==="org_authoritative"}function G(e){return b(e)==="public_authoritative"}function se(e,t){return t==="Registered API Key Credentials (Standard)"||t==="Registered OAuth 2.0 Credentials (Standard)"?O:e[t].title||O}function Se(e,t,i){let a=[],r=d(e),n=h(e),l=D(e);if((oe(e)||G(e))&&a.push("Authoritative"),b(e)==="deprecated"&&a.push("Deprecated"),Y(e,t)&&a.push("DeprecatedItemType"),L(e)&&a.push("Beta"),e.type==="Solution"&&r.includes("ArcGIS Solution")&&a.push("Solution"),r.includes("Public Data Collection")&&i&&a.push("Public Data Collection"),ie(e,t)&&a.push("Retired"),l.includes("livingatlas")&&a.push("Living Atlas"),l.includes("opendata")&&a.push("Open Data"),ae(e)&&a.push("Premium"),re(e)&&a.push("Subscriber"),n.origin&&a.push("Collaboration"),e.owner!=="esri_apps"&&n.listed&&!t?.isPortal&&a.push("Marketplace"),r.includes("Registered App")){let c=t?.isPortal??!1;if(e.type!=="API Key"&&(!c||e.owner!=="esri_apps")){let o=r.includes("APIToken"),s=r.includes("Personal API Token")&&!c;o?a.push(s?"Registered API Key Credentials (Personal)":"Registered API Key Credentials (Standard)"):a.push(s?"Registered OAuth 2.0 Credentials (Personal)":"Registered OAuth 2.0 Credentials (Standard)")}}return r.includes("hasReplacementItem")&&a.push("Has Replacement"),a}function ne({badgeType:e,i18n:t,portal:i}){let a=i?.isPortal??!1;if(e==="Registered API Key Credentials (Standard)"){let r=t[e].title;return a?r.enterprise:r.online}if(e==="Registered OAuth 2.0 Credentials (Standard)"){let r=t[e].title;return a?r.enterprise:r.online}return se(t,e)}function le(e){let t={MapSeries:"Series",MapJournal:"Journal",SwipeSpyglass:"Swipe & Spyglass",Shortlist:"Shortlist",Cascade:"Cascade",MapTour:"Tour",StoryMapCrowdsource:"Crowdsource",StorytellingSwipe:"Swipe & Spyglass"},i=d(e).find(r=>r in t);if(i)return t[i];let a=V(e);return a&&t[a]||!1}async function ce({badgeType:e,i18n:t,item:i,locale:a,portal:r,user:n,useProduction:l}){let c=!n||W(n);switch(e){case"Authoritative":{if(G(i)){let o=await _(i,a,r,l),s=t.Authoritative.tooltip,u=r?.isPortal&&!l?r?.name:o?.name||r?.name||i.owner;return k(s.public,{name:u||""})}return t.Authoritative.tooltip.org}case"Deprecated":{let o=i.owner||"",s=await I(o,r,l),u=C(s,a);return k(t.Deprecated.tooltip,{owner:u})}case"DeprecatedItemType":{let o=t.DeprecatedItemType.tooltip;return K(i,r)?o.webAppBuilder:o.general}case"Retired":{let o=t.Retired.tooltip;if(f(i)){let s=le(i);if(s){let u={[F]:s};return k(o.classicStoryMap,u)}return o.classicStoryMapGeneric}return X(i)?o.cityEngine:E(i)||P(i,r)?o.webAppBuilder:m(i)?o.app:Q(i)?o.bdfs:o.general}case"Subscriber":{let o=t.Subscriber.tooltip;return c?o.public:o.org}case"Premium":{let o=t.Premium.tooltip;return c?o.public:o.org}case"Registered":{let o=t.Registered.tooltip;return r?.isPortal?o.enterprise:o.online}case"Personal credential":return t["Personal credential"].tooltip;case"Has Replacement":{let o=t["Has Replacement"];return r.isPortal?(globalThis.location?.href||"").includes("item.html")?o.itemPageTooltip:o.tooltip:o.itemPageTooltip}default:return t[e].tooltip}}function de({badgeType:e,i18n:t,item:i,portal:a}){if(e!=="Has Replacement"||a.isPortal)return null;let r=B(i);return r?{title:t["Has Replacement"].link,href:pe({portal:a,itemId:r})}:null}function pe({itemId:e,portal:t}){return t?.restUrl?`${t.restUrl.replace("sharing/rest","home")}/item.html?id=${e}`:""}function H(){return{loading:!1,title:"",tooltip:"",tooltipLink:null}}var y=class extends v{constructor(){super(...arguments),this._messages=R({name:"portal-item-badges",blocking:!0}),this.tooltipRequestId=0,this.tooltipId=`portal-item-badge-${Math.random().toString(36).slice(2,10)}`,this.details=H(),this.width="full",this.scale="m",this.showTooltip=!1}static{this.properties={details:16,item:0,portal:0,user:0,badgeType:1,width:1,appearance:1,scale:1,showTooltip:5,useProduction:5}}static{this.styles=z}willUpdate(t){(t.has("badgeType")||t.has("item")||t.has("portal")||t.has("user")||t.has("showTooltip")||t.has("useProduction"))&&this.loadDetails()}loadDetails(){if(!this.badgeType||!this.portal){this.details=H();return}let t=ne({badgeType:this.badgeType,i18n:this._messages,portal:this.portal}),i=this.item&&this.portal?de({badgeType:this.badgeType,i18n:this._messages,item:this.item,portal:this.portal}):null;if(!this.showTooltip||!this.item){this.details={loading:!1,title:t,tooltip:"",tooltipLink:i};return}let a=++this.tooltipRequestId;this.details={loading:!0,title:t,tooltip:"",tooltipLink:i},ce({badgeType:this.badgeType,i18n:this._messages,item:this.item,locale:this._messages._lang||"en",portal:this.portal,user:this.user,useProduction:this.useProduction}).then(r=>{a===this.tooltipRequestId&&(this.details={loading:!1,title:t,tooltip:r,tooltipLink:i})}).catch(()=>{a===this.tooltipRequestId&&(this.details={loading:!1,title:t,tooltip:"",tooltipLink:i})})}render(){if(!this.badgeType)return null;let t=ue[this.badgeType],i=this.width==="narrow",a=this.showTooltip&&(this.details.loading||!!this.details.tooltip||!!this.details.tooltipLink),r={badge:this.badgeType!=="Beta","badge--colored":this.badgeType==="Living Atlas"||this.badgeType==="Open Data"||this.badgeType==="Solution",beta:this.badgeType==="Beta",authoritative:this.badgeType==="Authoritative",deprecated:this.badgeType==="Deprecated"||this.badgeType==="DeprecatedItemType",narrow:i,[`narrow--${this.scale}`]:i};return g`<calcite-chip id=${this.tooltipId??S} class=${w(r)} .value=${this.badgeType} .tabIndex=${this.showTooltip?0:-1} .scale=${this.scale} .appearance=${this.appearance} .label=${this.details.title} .icon=${t}>${i?null:this.details.title}</calcite-chip>${a?g`<calcite-tooltip .referenceElement=${this.tooltipId} close-on-click placement=bottom-start overlay-positioning=fixed offset-distance=6 offset-skidding=0>${i?g`<h3 class="tooltip-title">${this.details.title}</h3>`:null}<p class="tooltip-text"><calcite-loader .hidden=${!this.details.loading} .label=${this._messages.loading} inline scale=s></calcite-loader>${this.details.loading?this._messages.loading:this.details.tooltip}</p>${this.details.tooltipLink?g`<calcite-link @click=${n=>n.stopPropagation()} icon-end=launch .href=${this.details.tooltipLink.href} target=_blank>${this.details.tooltipLink.title}</calcite-link>`:null}</calcite-tooltip>`:null}`}},ue={Authoritative:"check-circle",Beta:"beaker",Collaboration:"collaboration-distributed",Deprecated:"circle-disallowed",DeprecatedItemType:"exclamation-mark-triangle","Has Replacement":"arrow-right-left","Living Atlas":"arcgis-living-atlas",Marketplace:"marketplace","Open Data":"open-data","Personal credential":"user-key",Premium:"shield-coin","Public Data Collection":"pencil",Registered:"key","Registered API Key Credentials (Personal)":"key","Registered API Key Credentials (Standard)":"key","Registered Application":"app-gear","Registered OAuth 2.0 Credentials (Personal)":"app-gear","Registered OAuth 2.0 Credentials (Standard)":"app-gear",Retired:"exclamation-mark-triangle",Solution:"arcgis-solutions",Subscriber:"security"};A("arcgis-portal-item-badge",y);return{a:Se,b:y}},"intl",a,c)
2
+ import c from"./GAF4YT5N.js";import{a as m,b as f}from"./V6A6MKLU.js";import{a as W}from"./SLQQ44IA.js";import{a as h,b as d,c as b,d as D,e as M,f as x,g as $,h as L,i as B}from"./4KTRAA2J.js";import{a as C}from"./PKA745KL.js";import a from"./RQYNPDN3.js";import{a as R}from"./FJ3I3AJE.js";import{L as v,M as w,O as S,R as A,h as T,j as g}from"./AICPYLWE.js";export default $arcgis.t(([{substitute:k},{a:I},_])=>{var z=T`.badge{--calcite-color-foreground-2: var(--arcgis-item-badge-info-background, #dfeffa);--calcite-color-text-1: var(--arcgis-item-badge-info-foreground, #00619b);--arcgis-item-badge-color: var(--arcgis-item-badge-info-foreground, #00619b);--calcite-chip-background-color: var(--arcgis-item-badge-info-background, #dfeffa);border:0}.badge--colored{--calcite-chip-icon-color: var(--calcite-color-brand)}.authoritative{--calcite-color-foreground-2: var(--arcgis-item-badge-success-background, #e4f0e4);--calcite-color-text-1: var(--arcgis-item-badge-success-foreground, #1a6324);--arcgis-item-badge-color: var(--arcgis-item-badge-success-foreground, #1a6324);--calcite-chip-background-color: var(--arcgis-item-badge-success-background, #e4f0e4)}.deprecated{--calcite-color-foreground-2: var(--arcgis-item-badge-danger-background, #fadfdc);--calcite-color-text-1: var(--arcgis-item-badge-danger-foreground, #a82b1e);--arcgis-item-badge-color: var(--arcgis-item-badge-danger-foreground, #a82b1e);--calcite-chip-background-color: var(--arcgis-item-badge-danger-background, #fadfdc)}.beta{border:0}.narrow{box-sizing:border-box;width:2rem;--calcite-chip-spacing-unit-l: 0}.narrow--s{width:1.5rem}.narrow--l{width:2.75rem}.tooltip-title{font-size:var(--calcite-font-size--1);color:var(--calcite-color-text-1);margin:0 0 .25rem;padding:0}.tooltip-text{font-size:var(--calcite-font-size--2);color:var(--calcite-color-text-1);margin:0;padding:0}:host-context(.calcite-mode-dark) .badge{--calcite-color-foreground-2: var(--arcgis-item-badge-info-background, #214155);--calcite-color-text-1: var(--arcgis-item-badge-info-foreground, #9fd4f3);--arcgis-item-badge-color: var(--arcgis-item-badge-info-foreground, #9fd4f3);--calcite-chip-background-color: var(--arcgis-item-badge-info-background, #214155)}:host-context(.calcite-mode-dark) .authoritative{--calcite-color-foreground-2: var(--arcgis-item-badge-success-background, #2b472a);--calcite-color-text-1: var(--arcgis-item-badge-success-foreground, #a2e4ab);--arcgis-item-badge-color: var(--arcgis-item-badge-success-foreground, #a2e4ab);--calcite-chip-background-color: var(--arcgis-item-badge-success-background, #2b472a)}:host-context(.calcite-mode-dark) .deprecated{--calcite-color-foreground-2: var(--arcgis-item-badge-danger-background, #5e241e);--calcite-color-text-1: var(--arcgis-item-badge-danger-foreground, #ffaaa1);--arcgis-item-badge-color: var(--arcgis-item-badge-danger-foreground, #ffaaa1);--calcite-chip-background-color: var(--arcgis-item-badge-danger-background, #5e241e)}`,U=["Operations Dashboard Add In","Operations Dashboard Extension","Operation View","CityEngine Web Scene","Big Data File Share","Globe Document","Map Document","Published Map","Scene Document","Map Template","Mobile Basemap Package","Desktop Add In"],J=["Cascade","MapTour","MapJournal","MapSeries","Shortlist","StoryMapCrowdsource","StorytellingSwipe"],j={"Geoprocessing Package":".gpk",Layer:".lyr","Layer Package":".lpk","Map Package":".mpk","Scene Package":".spk"},O="",F="template_name";function V(e){let t=decodeURIComponent(e.url||h(e).url||"");return J.find(i=>t.includes(`/apps/${i}/index.html`))}function N(e){return M(e)}function Q(e){return x(e)}function X(e){return $(e)}function E(e){return e.type==="Web Mapping Application"&&p(e,["Web AppBuilder","AppBuilder Extension"])}function P(e,t){return(t?.isPortal??!1)&&d(e).includes("AppBuilder Extension")}function p(e,t){return e.typeKeywords?.some(i=>t.includes(i))}function Y(e,t){return K(e,t)&&!q(e,t)}function K(e,t){let i=["HTML3D/HTML","App Builder","Widget"],a=["HTML3D/HTML","Web AppBuilder","Widget"],r=e.type==="Web Mapping Application",n=r&&p(e,["Web AppBuilder"]),l=r&&p(e,["WABTemplate"]),c=e.type==="AppBuilder Widget Package"&&p(e,i),o=e.type==="Web AppBuilder Widget"&&p(e,a),s=!!e?.owner?.startsWith("esri_")&&r&&p(e,["Web AppBuilder for ArcGIS"]);return n||l||c||o||P(e,t)||s}function Z(e,t){return t?.isPortal&&["Insights Workbook","Insights Page","Insights Model","Insights Theme","Insights Workbook Package","Kernel Gateway Connection","Insights Script","Insights Data Engineering Workbook","Insights Data Engineering Model","Relational Database Connection"].includes(e.type||"")}var q=(e,t)=>(t?.isPortal??!1)&&(E(e)||P(e,t)||m(e)||Z(e,t));function ee(e,t,i){return e.type===t&&(h(e).name?.endsWith(i)??!1)}function te(e){return Object.entries(j).some(([t,i])=>ee(e,t,i))}function ie(e,t){return U.includes(e.type)||te(e)||f(e)||N(e)||m(e)||q(e,t)}function ae(e){return(e.owner||"").toLowerCase().includes("esri")&&d(e).includes("Requires Credits")}function re(e){return(e.owner||"").toLowerCase().includes("esri")&&d(e).includes("Requires Subscription")}function oe(e){return b(e)==="org_authoritative"}function G(e){return b(e)==="public_authoritative"}function se(e,t){return t==="Registered API Key Credentials (Standard)"||t==="Registered OAuth 2.0 Credentials (Standard)"?O:e[t].title||O}function Se(e,t,i){let a=[],r=d(e),n=h(e),l=D(e);if((oe(e)||G(e))&&a.push("Authoritative"),b(e)==="deprecated"&&a.push("Deprecated"),Y(e,t)&&a.push("DeprecatedItemType"),L(e)&&a.push("Beta"),e.type==="Solution"&&r.includes("ArcGIS Solution")&&a.push("Solution"),r.includes("Public Data Collection")&&i&&a.push("Public Data Collection"),ie(e,t)&&a.push("Retired"),l.includes("livingatlas")&&a.push("Living Atlas"),l.includes("opendata")&&a.push("Open Data"),ae(e)&&a.push("Premium"),re(e)&&a.push("Subscriber"),n.origin&&a.push("Collaboration"),e.owner!=="esri_apps"&&n.listed&&!t?.isPortal&&a.push("Marketplace"),r.includes("Registered App")){let c=t?.isPortal??!1;if(e.type!=="API Key"&&(!c||e.owner!=="esri_apps")){let o=r.includes("APIToken"),s=r.includes("Personal API Token")&&!c;o?a.push(s?"Registered API Key Credentials (Personal)":"Registered API Key Credentials (Standard)"):a.push(s?"Registered OAuth 2.0 Credentials (Personal)":"Registered OAuth 2.0 Credentials (Standard)")}}return r.includes("hasReplacementItem")&&a.push("Has Replacement"),a}function ne({badgeType:e,i18n:t,portal:i}){let a=i?.isPortal??!1;if(e==="Registered API Key Credentials (Standard)"){let r=t[e].title;return a?r.enterprise:r.online}if(e==="Registered OAuth 2.0 Credentials (Standard)"){let r=t[e].title;return a?r.enterprise:r.online}return se(t,e)}function le(e){let t={MapSeries:"Series",MapJournal:"Journal",SwipeSpyglass:"Swipe & Spyglass",Shortlist:"Shortlist",Cascade:"Cascade",MapTour:"Tour",StoryMapCrowdsource:"Crowdsource",StorytellingSwipe:"Swipe & Spyglass"},i=d(e).find(r=>r in t);if(i)return t[i];let a=V(e);return a&&t[a]||!1}async function ce({badgeType:e,i18n:t,item:i,locale:a,portal:r,user:n,useProduction:l}){let c=!n||W(n);switch(e){case"Authoritative":{if(G(i)){let o=await _(i,a,r,l),s=t.Authoritative.tooltip,u=r?.isPortal&&!l?r?.name:o?.name||r?.name||i.owner;return k(s.public,{name:u||""})}return t.Authoritative.tooltip.org}case"Deprecated":{let o=i.owner||"",s=await I(o,r,l),u=C(s,a);return k(t.Deprecated.tooltip,{owner:u})}case"DeprecatedItemType":{let o=t.DeprecatedItemType.tooltip;return K(i,r)?o.webAppBuilder:o.general}case"Retired":{let o=t.Retired.tooltip;if(f(i)){let s=le(i);if(s){let u={[F]:s};return k(o.classicStoryMap,u)}return o.classicStoryMapGeneric}return X(i)?o.cityEngine:E(i)||P(i,r)?o.webAppBuilder:m(i)?o.app:Q(i)?o.bdfs:o.general}case"Subscriber":{let o=t.Subscriber.tooltip;return c?o.public:o.org}case"Premium":{let o=t.Premium.tooltip;return c?o.public:o.org}case"Registered":{let o=t.Registered.tooltip;return r?.isPortal?o.enterprise:o.online}case"Personal credential":return t["Personal credential"].tooltip;case"Has Replacement":{let o=t["Has Replacement"];return r.isPortal?(globalThis.location?.href||"").includes("item.html")?o.itemPageTooltip:o.tooltip:o.itemPageTooltip}default:return t[e].tooltip}}function de({badgeType:e,i18n:t,item:i,portal:a}){if(e!=="Has Replacement"||a.isPortal)return null;let r=B(i);return r?{title:t["Has Replacement"].link,href:pe({portal:a,itemId:r})}:null}function pe({itemId:e,portal:t}){return t?.restUrl?`${t.restUrl.replace("sharing/rest","home")}/item.html?id=${e}`:""}function H(){return{loading:!1,title:"",tooltip:"",tooltipLink:null}}var y=class extends v{constructor(){super(...arguments),this._messages=R({name:"portal-item-badges",blocking:!0}),this.tooltipRequestId=0,this.tooltipId=`portal-item-badge-${Math.random().toString(36).slice(2,10)}`,this.details=H(),this.width="full",this.scale="m",this.showTooltip=!1}static{this.properties={details:16,item:0,portal:0,user:0,badgeType:1,width:1,appearance:1,scale:1,showTooltip:5,useProduction:5}}static{this.styles=z}willUpdate(t){(t.has("badgeType")||t.has("item")||t.has("portal")||t.has("user")||t.has("showTooltip")||t.has("useProduction"))&&this.loadDetails()}loadDetails(){if(!this.badgeType||!this.portal){this.details=H();return}let t=ne({badgeType:this.badgeType,i18n:this._messages,portal:this.portal}),i=this.item&&this.portal?de({badgeType:this.badgeType,i18n:this._messages,item:this.item,portal:this.portal}):null;if(!this.showTooltip||!this.item){this.details={loading:!1,title:t,tooltip:"",tooltipLink:i};return}let a=++this.tooltipRequestId;this.details={loading:!0,title:t,tooltip:"",tooltipLink:i},ce({badgeType:this.badgeType,i18n:this._messages,item:this.item,locale:this._messages._lang||"en",portal:this.portal,user:this.user,useProduction:this.useProduction}).then(r=>{a===this.tooltipRequestId&&(this.details={loading:!1,title:t,tooltip:r,tooltipLink:i})}).catch(()=>{a===this.tooltipRequestId&&(this.details={loading:!1,title:t,tooltip:"",tooltipLink:i})})}render(){if(!this.badgeType)return null;let t=ue[this.badgeType],i=this.width==="narrow",a=this.showTooltip&&(this.details.loading||!!this.details.tooltip||!!this.details.tooltipLink),r={badge:this.badgeType!=="Beta","badge--colored":this.badgeType==="Living Atlas"||this.badgeType==="Open Data"||this.badgeType==="Solution",beta:this.badgeType==="Beta",authoritative:this.badgeType==="Authoritative",deprecated:this.badgeType==="Deprecated"||this.badgeType==="DeprecatedItemType",narrow:i,[`narrow--${this.scale}`]:i};return g`<calcite-chip id=${this.tooltipId??S} class=${w(r)} .value=${this.badgeType} .tabIndex=${this.showTooltip?0:-1} .scale=${this.scale} .appearance=${this.appearance} .label=${this.details.title} .icon=${t}>${i?null:this.details.title}</calcite-chip>${a?g`<calcite-tooltip .referenceElement=${this.tooltipId} close-on-click placement=bottom-start overlay-positioning=fixed offset-distance=6 offset-skidding=0>${i?g`<h3 class="tooltip-title">${this.details.title}</h3>`:null}<p class="tooltip-text"><calcite-loader .hidden=${!this.details.loading} .label=${this._messages.loading} inline scale=s></calcite-loader>${this.details.loading?this._messages.loading:this.details.tooltip}</p>${this.details.tooltipLink?g`<calcite-link @click=${n=>n.stopPropagation()} icon-end=launch .href=${this.details.tooltipLink.href} target=_blank>${this.details.tooltipLink.title}</calcite-link>`:null}</calcite-tooltip>`:null}`}},ue={Authoritative:"check-circle",Beta:"beaker",Collaboration:"collaboration-distributed",Deprecated:"circle-disallowed",DeprecatedItemType:"exclamation-mark-triangle","Has Replacement":"arrow-right-left","Living Atlas":"arcgis-living-atlas",Marketplace:"marketplace","Open Data":"open-data","Personal credential":"user-key",Premium:"shield-coin","Public Data Collection":"pencil",Registered:"key","Registered API Key Credentials (Personal)":"key","Registered API Key Credentials (Standard)":"key","Registered Application":"app-gear","Registered OAuth 2.0 Credentials (Personal)":"app-gear","Registered OAuth 2.0 Credentials (Standard)":"app-gear",Retired:"exclamation-mark-triangle",Solution:"arcgis-solutions",Subscriber:"security"};A("arcgis-portal-item-badge",y);return{a:Se,b:y}},"intl",a,c)
@@ -1,5 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{Aa as Wc,Ca as di,Ha as Ma,I as is,Ja as qc,Ma as Hc,O as Dc,W as li,Y as pi,Z as zc,_ as E,b as Tc,d as Cc,e as $c,ea as Lc,f as Nc,g as jc,h as ss,k as Mc,la as Uc,oa as fi,pa as Na,qa as Tn,r as F,sa as ja,ta as Bc,u as $a,ua as Fc,x as En,ya as Kc}from"./3FSPL34I.js";import{$ as Rn,Ga as Ec,Ha as Ne,J as ui,K as Oc,Q as Rr,T as xc,Y as dt,Z as Pc,aa as ci,ba as Sc,fa as vc,ja as kc,l as ii,oa as Ca,r as Ea,ra as Rc,s as Ta,t as ai}from"./GGDOGNH4.js";import{a as um,b as cm,c as lm}from"./5PV2GUZW.js";var Wl=um((G,Si)=>{"use strict";if(typeof Si<"u"&&Si!==globalThis.module&&typeof G<"u"&&Si.exports===G){Object.defineProperty(G,"__esModule",{value:!0}),G.findX509Credential=G.rememberX509Credential=G.findX509OAuthError=G.rememberX509OAuthError=G.isApprovedX509Client=G.markApprovedX509Client=G.isRetryableX509IssuerError=G.markRetryableX509IssuerError=G.isTransientX509ConnectionError=G.markTransientX509ConnectionError=G.rememberRegisteredX509Transport=G.findRegisteredX509Transport=void 0;let t=new WeakMap,e=new WeakSet,r=new WeakSet,n=new WeakSet,o=new WeakMap,s=new WeakMap;G.findRegisteredX509Transport=WeakMap.prototype.get.bind(t),G.rememberRegisteredX509Transport=WeakMap.prototype.set.bind(t),G.markTransientX509ConnectionError=WeakSet.prototype.add.bind(e),G.isTransientX509ConnectionError=WeakSet.prototype.has.bind(e),G.markRetryableX509IssuerError=WeakSet.prototype.add.bind(r),G.isRetryableX509IssuerError=WeakSet.prototype.has.bind(r),G.markApprovedX509Client=WeakSet.prototype.add.bind(n),G.isApprovedX509Client=WeakSet.prototype.has.bind(n),G.rememberX509OAuthError=WeakMap.prototype.set.bind(o),G.findX509OAuthError=WeakMap.prototype.get.bind(o),G.rememberX509Credential=WeakMap.prototype.set.bind(s),G.findX509Credential=WeakMap.prototype.get.bind(s)}});function Xc(t,e){let r;return pi(t)?r=qc(t):r=t,e?.strict!==void 0&&(r.function.strict=e.strict),r}function pm(t){return t.anyOf!==void 0&&Array.isArray(t.anyOf)}function Zc(t){let e=["namespace functions {",""];for(let r of t)r.description&&e.push(`// ${r.description}`),Object.keys(r.parameters.properties??{}).length>0?(e.push(`type ${r.name} = (_: {`),e.push(Jc(r.parameters,0)),e.push("}) => any;")):e.push(`type ${r.name} = () => any;`),e.push("");return e.push("} // namespace functions"),e.join(`
2
+ import{Ba as Ma,Da as qc,E as is,Ga as Hc,K as Dc,S as li,U as pi,_ as Lc,b as Nc,c as jc,d as ss,fa as Uc,g as Mc,ia as fi,ja as Na,ka as Tn,ma as ja,n as F,na as Bc,oa as Fc,q as $a,sa as Kc,t as En,ua as Wc,wa as di}from"./EOOIJFXY.js";import{$ as Rn,Ga as Ec,Ha as Ne,J as ui,K as Oc,Q as Rr,T as xc,Y as dt,Z as Pc,aa as ci,ba as Sc,fa as vc,ja as kc,l as ii,oa as Ca,r as Ea,ra as Rc,s as Ta,t as ai}from"./GGDOGNH4.js";import{c as Tc,i as Cc,m as $c,n as zc,o as E}from"./JZ7EM2ZO.js";import{a as um,b as cm,c as lm}from"./5PV2GUZW.js";var Wl=um((G,Si)=>{"use strict";if(typeof Si<"u"&&Si!==globalThis.module&&typeof G<"u"&&Si.exports===G){Object.defineProperty(G,"__esModule",{value:!0}),G.findX509Credential=G.rememberX509Credential=G.findX509OAuthError=G.rememberX509OAuthError=G.isApprovedX509Client=G.markApprovedX509Client=G.isRetryableX509IssuerError=G.markRetryableX509IssuerError=G.isTransientX509ConnectionError=G.markTransientX509ConnectionError=G.rememberRegisteredX509Transport=G.findRegisteredX509Transport=void 0;let t=new WeakMap,e=new WeakSet,r=new WeakSet,n=new WeakSet,o=new WeakMap,s=new WeakMap;G.findRegisteredX509Transport=WeakMap.prototype.get.bind(t),G.rememberRegisteredX509Transport=WeakMap.prototype.set.bind(t),G.markTransientX509ConnectionError=WeakSet.prototype.add.bind(e),G.isTransientX509ConnectionError=WeakSet.prototype.has.bind(e),G.markRetryableX509IssuerError=WeakSet.prototype.add.bind(r),G.isRetryableX509IssuerError=WeakSet.prototype.has.bind(r),G.markApprovedX509Client=WeakSet.prototype.add.bind(n),G.isApprovedX509Client=WeakSet.prototype.has.bind(n),G.rememberX509OAuthError=WeakMap.prototype.set.bind(o),G.findX509OAuthError=WeakMap.prototype.get.bind(o),G.rememberX509Credential=WeakMap.prototype.set.bind(s),G.findX509Credential=WeakMap.prototype.get.bind(s)}});function Xc(t,e){let r;return pi(t)?r=qc(t):r=t,e?.strict!==void 0&&(r.function.strict=e.strict),r}function pm(t){return t.anyOf!==void 0&&Array.isArray(t.anyOf)}function Zc(t){let e=["namespace functions {",""];for(let r of t)r.description&&e.push(`// ${r.description}`),Object.keys(r.parameters.properties??{}).length>0?(e.push(`type ${r.name} = (_: {`),e.push(Jc(r.parameters,0)),e.push("}) => any;")):e.push(`type ${r.name} = () => any;`),e.push("");return e.push("} // namespace functions"),e.join(`
3
3
  `)}function Jc(t,e){let r=[];for(let[n,o]of Object.entries(t.properties??{}))o.description&&e<2&&r.push(`// ${o.description}`),t.required?.includes(n)?r.push(`${n}: ${mi(o,e)},`):r.push(`${n}?: ${mi(o,e)},`);return r.map(n=>" ".repeat(e)+n).join(`
4
4
  `)}function mi(t,e){if(pm(t))return t.anyOf.map(r=>mi(r,e)).join(" | ");switch(t.type){case"string":return t.enum?t.enum.map(r=>`"${r}"`).join(" | "):"string";case"number":return t.enum?t.enum.map(r=>`${r}`).join(" | "):"number";case"integer":return t.enum?t.enum.map(r=>`${r}`).join(" | "):"number";case"boolean":return"boolean";case"null":return"null";case"object":return["{",Jc(t,e+2),"}"].join(`
5
5
  `);case"array":return t.items?`${mi(t.items,e)}[]`:"any[]";default:return""}}function hi(t){if(t)return t==="any"||t==="required"?"required":t==="auto"?"auto":t==="none"?"none":typeof t=="string"?{type:"function",function:{name:t}}:t}function Cn(t){return"type"in t&&t.type!=="function"}function Vc(t){return typeof t=="object"&&t!==null&&"extras"in t&&typeof t.extras=="object"&&t.extras!==null&&"providerToolDefinition"in t.extras&&typeof t.extras.providerToolDefinition=="object"&&t.extras.providerToolDefinition!==null}function Gc(t){return t!=null&&typeof t=="object"&&"type"in t&&t.type!=="function"}function Er(t){return typeof t=="object"&&t!==null&&"metadata"in t&&typeof t.metadata=="object"&&t.metadata!==null&&"customTool"in t.metadata&&typeof t.metadata.customTool=="object"&&t.metadata.customTool!==null}function _i(t){return"type"in t&&t.type==="custom"&&"custom"in t&&typeof t.custom=="object"&&t.custom!==null}function Yc(t){if(t.type==="custom_tool_call")return{...t,type:"tool_call",call_id:t.id,id:t.call_id,name:t.name,isCustomTool:!0,args:{input:t.input}}}function Qc(t){if(t.type==="computer_call")return{...t,type:"tool_call",call_id:t.id,id:t.call_id,name:"computer_use",isComputerTool:!0,args:{action:t.action}}}function el(t){return typeof t=="object"&&t!==null&&"type"in t&&t.type==="tool_call"&&"isComputerTool"in t&&t.isComputerTool===!0}function tl(t,e){return typeof t!="object"||t===null||!("type"in t)||t.type!=="tool_call"?!1:!!("isCustomTool"in t&&t.isCustomTool===!0||e&&"id"in t&&typeof t.id=="string"&&t.id in e)}function rl(t){let e=()=>{if(t.custom.format){if(t.custom.format.type==="grammar")return{type:"grammar",definition:t.custom.format.grammar.definition,syntax:t.custom.format.grammar.syntax};if(t.custom.format.type==="text")return{type:"text"}}};return{type:"custom",name:t.custom.name,description:t.custom.description,format:e()}}function nl(t){let e=()=>{if(t.format){if(t.format.type==="grammar")return{type:"grammar",grammar:{definition:t.format.definition,syntax:t.format.syntax}};if(t.format.type==="text")return{type:"text"}}};return{type:"custom",custom:{name:t.name,description:t.description,format:e()}}}var et=t=>t();function Ot(t){return t?!!(/^o\d/.test(t??"")||t.startsWith("gpt-5")&&!t.startsWith("gpt-5-chat")):!1}function fm(t){return t.role!=="system"&&t.role!=="developer"&&t.role!=="assistant"&&t.role!=="user"&&t.role!=="function"&&t.role!=="tool"&&console.warn(`Unknown message role: ${t.role}`),t.role}function yi(t){return t.metadata?.filename??t.metadata?.name??t.metadata?.title}var dm="LC_AUTOGENERATED";function Tr(t){let e=t.metadata?.filename??t.metadata?.name??t.metadata?.title;return e||(console.warn("OpenAI may require a filename for file uploads. Specify a filename in the content block metadata, e.g.: { type: 'file', mimeType: '...', data: '...', metadata: { filename: 'my-file.pdf' } }. Using placeholder filename 'LC_AUTOGENERATED'."),dm)}function xt(t){let e=t._getType();switch(e){case"system":return"system";case"ai":return"assistant";case"human":return"user";case"function":return"function";case"tool":return"tool";case"generic":if(!ci.isInstance(t))throw new Error("Invalid generic chat message");return fm(t);default:throw new Error(`Unknown message type: ${e}`)}}function ol(t){return!!(t.includes("gpt-5.2-pro")||t.includes("gpt-5.4-pro")||t.includes("gpt-5.5-pro")||t.includes("codex"))}function as(t,e){return t.lc_error_code=e,t.message=`${t.message}
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{b as v}from"./EMJQI4MA.js";import{a as w}from"./7ZWYUHGK.js";import"./A2SQ4EMZ.js";import"./K2XSYDAP.js";import{J as r,K as a,L as u,O as p,R as m,h as d,j as s}from"./AICPYLWE.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";var b=d`:host{display:flex;justify-content:flex-end;margin-inline:1rem;position:relative}.wrapper{padding-inline-start:.25rem;display:flex;border-inline-start:1px solid var(--calcite-color-border-1);border-inline-end:1px solid var(--calcite-color-border-1)}.tooltip-container{width:9rem}.button{margin-inline-end:.25rem}.measure-container{position:absolute;width:100%;height:0;overflow:hidden}.measure-text{visibility:hidden;height:0;width:auto;overflow:hidden;font-size:var(--calcite-font-size--1)}`,c=class extends u{constructor(){super(...arguments),this.measureText=r(),this.overflowButton=r(),this.resizeObserver=null,this.actionWidths=[],this._messages=w({name:"portal-browser",blocking:!0}),this.buttonPadding=88,this.moreWidth=0,this.elementWidth=0,this.visibleActions=[],this.overflowActions=[],this.calculating=!1,this.actions=[]}static{this.properties={visibleActions:16,overflowActions:16,calculating:16,actions:0,selection:0}}static{this.styles=b}async restoreFocus(){this.lastExecutedAction?.setFocus()}willUpdate(t){t.has("actions")&&(this.measureAndCacheWidths(this.actions),this.calculateOverflow()),t.has("selection")&&(this.hasSelection()?v(100).then(()=>{this.calculating=!1}):this.calculating=!0)}firstUpdated(){this.measureAndCacheWidths(this.actions),this.calculateOverflow(),!(typeof ResizeObserver>"u")&&(this.resizeObserver=new ResizeObserver(t=>{for(let e of t)e.contentRect.width>0&&(this.elementWidth=e.contentRect.width,this.calculateOverflow())}),this.resizeObserver.observe(this.el))}disconnectedCallback(){this.resizeObserver?.disconnect(),this.resizeObserver=null,super.disconnectedCallback()}measureAndCacheWidths(t){let e=this.measureText.value;if(!e)return;this.actionWidths=t.map(o=>(e.textContent=o.text,{action:o,width:e.offsetWidth+this.buttonPadding}));let i=this._messages.actions.more;e.textContent=i,this.moreWidth=e.scrollWidth+this.buttonPadding}calculateOverflow(){let t=this.moreWidth,e=this.actionWidths.reduce(({width:i,visible:o,overflow:l},{action:h,width:f})=>{let n=i+f;return n>=this.elementWidth?{width:n,visible:o,overflow:[...l,h]}:{width:n,visible:[...o,h],overflow:l}},{visible:[],overflow:[],width:t});this.visibleActions=e.visible,this.overflowActions=e.overflow}hasSelection(){return!!this.selection?.length}renderButton(t){let e=t.id||`${t.text}-${t.icon||"none"}`;return s`<div><calcite-button class="button" .iconStart=${t.icon} @click=${i=>{this.lastExecutedAction=i.currentTarget,t.onClick()}} appearance=transparent kind=neutral id=${e??p}>${t.text}</calcite-button>${t.tooltip&&s`<calcite-tooltip .referenceElement=${e}><span class="tooltip-container">${t.tooltip}</span></calcite-tooltip>`||""}</div>`}render(){let t=this.overflowActions.length>0,e=this._messages.actions.more;return s`<div><span class="measure-container"><span class="measure-text" aria-hidden ${a(this.measureText)}></span></span>${this.hasSelection()&&(this.visibleActions.length>0||t)&&!this.calculating&&s`<nav class="wrapper">${this.visibleActions.map(i=>this.renderButton(i))}${t&&s`<calcite-dropdown width=m placement=bottom-end><calcite-button slot=trigger kind=neutral icon-end=chevron-down appearance=transparent ${a(this.overflowButton)}>${e}</calcite-button><calcite-dropdown-group selection-mode=none>${this.overflowActions.map(i=>s`<calcite-dropdown-item .iconStart=${i.icon||"blank"} @calciteDropdownItemSelect=${()=>{this.lastExecutedAction=this.overflowButton.value||void 0,i.onClick()}}>${i.text}</calcite-dropdown-item>`)}</calcite-dropdown-group></calcite-dropdown>`||""}</nav>`||""}</div>`}};m("arcgis-portal-browser-actions",c);export{c as ArcgisPortalBrowserActions};
2
+ import{b as v}from"./EMJQI4MA.js";import{a as w}from"./FJ3I3AJE.js";import"./I6WGLIEC.js";import"./K2XSYDAP.js";import{J as r,K as a,L as u,O as p,R as m,h as d,j as s}from"./AICPYLWE.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";var b=d`:host{display:flex;justify-content:flex-end;margin-inline:1rem;position:relative}.wrapper{padding-inline-start:.25rem;display:flex;border-inline-start:1px solid var(--calcite-color-border-1);border-inline-end:1px solid var(--calcite-color-border-1)}.tooltip-container{width:9rem}.button{margin-inline-end:.25rem}.measure-container{position:absolute;width:100%;height:0;overflow:hidden}.measure-text{visibility:hidden;height:0;width:auto;overflow:hidden;font-size:var(--calcite-font-size--1)}`,c=class extends u{constructor(){super(...arguments),this.measureText=r(),this.overflowButton=r(),this.resizeObserver=null,this.actionWidths=[],this._messages=w({name:"portal-browser",blocking:!0}),this.buttonPadding=88,this.moreWidth=0,this.elementWidth=0,this.visibleActions=[],this.overflowActions=[],this.calculating=!1,this.actions=[]}static{this.properties={visibleActions:16,overflowActions:16,calculating:16,actions:0,selection:0}}static{this.styles=b}async restoreFocus(){this.lastExecutedAction?.setFocus()}willUpdate(t){t.has("actions")&&(this.measureAndCacheWidths(this.actions),this.calculateOverflow()),t.has("selection")&&(this.hasSelection()?v(100).then(()=>{this.calculating=!1}):this.calculating=!0)}firstUpdated(){this.measureAndCacheWidths(this.actions),this.calculateOverflow(),!(typeof ResizeObserver>"u")&&(this.resizeObserver=new ResizeObserver(t=>{for(let e of t)e.contentRect.width>0&&(this.elementWidth=e.contentRect.width,this.calculateOverflow())}),this.resizeObserver.observe(this.el))}disconnectedCallback(){this.resizeObserver?.disconnect(),this.resizeObserver=null,super.disconnectedCallback()}measureAndCacheWidths(t){let e=this.measureText.value;if(!e)return;this.actionWidths=t.map(o=>(e.textContent=o.text,{action:o,width:e.offsetWidth+this.buttonPadding}));let i=this._messages.actions.more;e.textContent=i,this.moreWidth=e.scrollWidth+this.buttonPadding}calculateOverflow(){let t=this.moreWidth,e=this.actionWidths.reduce(({width:i,visible:o,overflow:l},{action:h,width:f})=>{let n=i+f;return n>=this.elementWidth?{width:n,visible:o,overflow:[...l,h]}:{width:n,visible:[...o,h],overflow:l}},{visible:[],overflow:[],width:t});this.visibleActions=e.visible,this.overflowActions=e.overflow}hasSelection(){return!!this.selection?.length}renderButton(t){let e=t.id||`${t.text}-${t.icon||"none"}`;return s`<div><calcite-button class="button" .iconStart=${t.icon} @click=${i=>{this.lastExecutedAction=i.currentTarget,t.onClick()}} appearance=transparent kind=neutral id=${e??p}>${t.text}</calcite-button>${t.tooltip&&s`<calcite-tooltip .referenceElement=${e}><span class="tooltip-container">${t.tooltip}</span></calcite-tooltip>`||""}</div>`}render(){let t=this.overflowActions.length>0,e=this._messages.actions.more;return s`<div><span class="measure-container"><span class="measure-text" aria-hidden ${a(this.measureText)}></span></span>${this.hasSelection()&&(this.visibleActions.length>0||t)&&!this.calculating&&s`<nav class="wrapper">${this.visibleActions.map(i=>this.renderButton(i))}${t&&s`<calcite-dropdown width=m placement=bottom-end><calcite-button slot=trigger kind=neutral icon-end=chevron-down appearance=transparent ${a(this.overflowButton)}>${e}</calcite-button><calcite-dropdown-group selection-mode=none>${this.overflowActions.map(i=>s`<calcite-dropdown-item .iconStart=${i.icon||"blank"} @calciteDropdownItemSelect=${()=>{this.lastExecutedAction=this.overflowButton.value||void 0,i.onClick()}}>${i.text}</calcite-dropdown-item>`)}</calcite-dropdown-group></calcite-dropdown>`||""}</nav>`||""}</div>`}};m("arcgis-portal-browser-actions",c);export{c as ArcgisPortalBrowserActions};
@@ -0,0 +1,68 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import{a as X}from"./IN4JPZTY.js";import{d as fe}from"./FYGYVFYN.js";import{a as ke}from"./DAAON2UO.js";import{a as de}from"./EMJQI4MA.js";import{a as U}from"./FJ3I3AJE.js";import"./I6WGLIEC.js";import"./K2XSYDAP.js";import{J as ce,K as pe,L as he,O as ue,R as ge,h as oe,j as y,w as G}from"./AICPYLWE.js";import"./OUMTV5H5.js";import"./JZ7EM2ZO.js";import"./5PV2GUZW.js";function V(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var A=V();function Ae(r){A=r}var z={exec:()=>null};function P(r){let e=[];return t=>{let s=Math.max(0,Math.min(3,t-1)),n=e[s];return n||(n=r(s),e[s]=n),n}}function u(r,e=""){let t=typeof r=="string"?r:r.source,s={replace:(n,i)=>{let a=typeof i=="string"?i:i.source;return a=a.replace(x.caret,"$1"),t=t.replace(n,a),s},getRegex:()=>new RegExp(t,e)};return s}var Oe=((r="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+r)}catch{return!1}})(),x={codeRemoveIndent:/^(?: {0,3}\t| {1,4})/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,endingSpaceTabChar:/[ \t]$/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,leadingSpaceTab:/^[ \t]+/,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,numericCharacterReference:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));/g,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:r=>new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:P(r=>new RegExp(`^ {0,${r}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:P(r=>new RegExp(`^ {0,${r}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:P(r=>new RegExp(`^ {0,${r}}(?:\`\`\`|~~~)`)),headingBeginRegex:P(r=>new RegExp(`^ {0,${r}}#`)),htmlBeginRegex:P(r=>new RegExp(`^ {0,${r}}(?:</?(?:${D})(?: +|$|/?>)|<(?:script|pre|style|textarea|!--))`,"i")),blockquoteBeginRegex:P(r=>new RegExp(`^ {0,${r}}>`))},Qe=/^(?:[ \t]*(?:\n|$))+/,je=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Ne=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Z=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,He=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Y=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,ve=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Pe=u(ve).replace(/bull/g,Y).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Fe=u(ve).replace(/bull/g,Y).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),ee=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,Ge=/^[^\n]+/,te=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Ue=u(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",te).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Xe=u(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,Y).getRegex(),D="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ne=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,We=u("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",ne).replace("tag",D).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ie=r=>u(ee).replace("hr",Z).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list",r).replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",D).getRegex(),Je=Ie(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),Ke=Ie(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),Ve=u(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Ke).getRegex(),re={blockquote:Ve,code:je,def:Ue,fences:Ne,heading:He,hr:Z,html:We,lheading:Pe,list:Xe,newline:Qe,paragraph:Je,table:z,text:Ge},be=u("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Z).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",D).getRegex(),Ye={...re,lheading:Fe,table:be,paragraph:u(ee).replace("hr",Z).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",be).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",D).getRegex()},et={...re,html:u(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ne).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:z,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:u(ee).replace("hr",Z).replace("heading",` *#{1,6} *[^
3
+ ]`).replace("lheading",Pe).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},tt=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,nt=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Ee=/^( {2,}|\\)\n(?!\s*$)[ \t]*/,rt=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,R=/[\p{P}\p{S}]/u,I=/[\s\p{P}\p{S}]/u,M=/[^\s\p{P}\p{S}]/u,st=u(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,I).getRegex(),it=/[\p{Pi}\p{Ps}"']/u,Le=/(?!~)[\p{P}\p{S}]/u,lt=/(?!~)[\s\p{P}\p{S}]/u,at=/(?:[^\s\p{P}\p{S}]|~)/u,ot=u(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Oe?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Ce=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,ct=u(Ce,"u").replace(/punct/g,R).getRegex(),pt=u(Ce,"u").replace(/punct/g,Le).getRegex(),ht=/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,ut=u(ht,"u").replace(/openQuote/g,it).replace(/punct/g,R).getRegex(),qe="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",gt=u(qe,"gu").replace(/notPunctSpace/g,M).replace(/punctSpace/g,I).replace(/punct/g,R).getRegex(),dt=u(qe,"gu").replace(/notPunctSpace/g,at).replace(/punctSpace/g,lt).replace(/punct/g,Le).getRegex(),kt="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)",ft=u(kt,"gu").replace(/notPunctSpace/g,M).replace(/punctSpace/g,I).replace(/punct/g,R).getRegex(),bt=u("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,M).replace(/punctSpace/g,I).replace(/punct/g,R).getRegex(),xt="^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)",mt=u(xt,"gu").replace(/notPunctSpace/g,M).replace(/punctSpace/g,I).replace(/punct/g,R).getRegex(),wt=u(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,R).getRegex(),yt="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",$t=u(yt,"gu").replace(/notPunctSpace/g,M).replace(/punctSpace/g,I).replace(/punct/g,R).getRegex(),St=u(/\\(punct)/,"gu").replace(/punct/g,R).getRegex(),Rt=u(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Tt=u(ne).replace("(?:-->|$)","-->").getRegex(),zt=u("^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Tt).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Be=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,Q=u(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets",Be).getRegex(),_t=u(/^!?\[(label)\]\([ \t\n]*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?[ \t\n]*\)/).replace("label",Q).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),At=u(/^!?\[(label)\]\[(ref)\]/).replace("label",Q).replace("ref",te).getRegex(),vt=u(/^!?\[(ref)\](?:\[\])?/).replace("ref",te).getRegex(),xe=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/,Pt=u(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets",Be).getRegex(),It=u("reflink|nolink(?!\\()","g").replace("reflink",u(/^!?\[(label)\]\[(ref)\]/).replace("label",Pt).replace("ref",xe).getRegex()).replace("nolink",u(/^!?\[(ref)\](?:\[\])?/).replace("ref",xe).getRegex()).getRegex(),me=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Et=/[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/,Lt=u(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g,Et).getRegex(),se={_backpedal:z,anyPunctuation:St,autolink:Rt,blockSkip:ot,br:Ee,code:nt,del:z,delLDelim:z,delRDelim:z,emStrongLDelim:ct,emStrongRDelimAst:gt,emStrongRDelimUnd:bt,escape:tt,link:_t,nolink:vt,punctuation:st,reflink:At,reflinkSearch:It,tag:zt,text:rt,url:z},Ct={...se,emStrongLDelim:ut,emStrongRDelimAst:ft,emStrongRDelimUnd:mt,link:u(/^!?\[(label)\]\((.*?)\)/).replace("label",Q).getRegex(),reflink:u(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Q).getRegex()},W={...se,emStrongRDelimAst:dt,emStrongLDelim:pt,delLDelim:wt,delRDelim:$t,url:u(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("emailProtocol",Lt).replace("protocol",me).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:u(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9](?=emailProtocol)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))))/).replace("protocol",me).replace(/emailProtocol/g,/(?:mailto|xmpp):/).getRegex()},qt={...W,br:u(Ee).replace("{2,}","*").getRegex(),text:u(W.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},O={normal:re,gfm:Ye,pedantic:et},q={normal:se,gfm:W,breaks:qt,pedantic:Ct},Bt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},we=r=>Bt[r];function w(r,e){if(e){if(x.escapeTest.test(r))return r.replace(x.escapeReplace,we)}else if(x.escapeTestNoEncode.test(r))return r.replace(x.escapeReplaceNoEncode,we);return r}function Zt(r){return r.replace(x.numericCharacterReference,(e,t,s)=>{let n=t===void 0?Number.parseInt(s,16):Number.parseInt(t,10);return n===0||n>1114111||n>=55296&&n<=57343?"\uFFFD":String.fromCodePoint(n)})}function ye(r){try{r=encodeURI(r).replace(x.percentDecode,"%")}catch{return null}return r}function $e(r,e){let t=r.replace(x.findPipe,(i,a,l)=>{let c=!1,o=a;for(;--o>=0&&l[o]==="\\";)c=!c;return c?"|":" |"}),s=t.split(x.splitPipe),n=0;if(s[0].trim()||s.shift(),s.length>0&&!s.at(-1)?.trim()&&s.pop(),e)if(s.length>e)s.splice(e);else for(;s.length<e;)s.push("");for(;n<s.length;n++)s[n]=s[n].trim().replace(x.slashPipe,"|");return s}function T(r,e,t){let s=r.length;if(s===0)return"";let n=0;for(;n<s;){let i=r.charAt(s-n-1);if(i===e&&!t)n++;else if(i!==e&&t)n++;else break}return r.slice(0,s-n)}function Se(r){let e=r.split(`
4
+ `),t=e.length-1;for(;t>=0&&x.blankLine.test(e[t]);)t--;return e.length-t<=2?r:e.slice(0,t+1).join(`
5
+ `)}function j(r){return r.trim().toLowerCase().toUpperCase().toLowerCase()}function Re(r,e){if(r.indexOf(e[0])===-1&&r.indexOf(e[1])===-1)return-1;let t=0;for(let s=0;s<r.length;s++)if(r[s]==="\\")s++;else if(r[s]===e[0])t++;else if(r[s]===e[1]&&(t--,t<0))return s;return t>0?-2:-1}function Te(r,e=0){let t=e,s="";for(let n of r)if(n===" "){let i=4-t%4;s+=" ".repeat(i),t+=i}else s+=n,t++;return s}function ze(r,e,t,s,n){let i=e.href,a=e.title||null,l=r[1].replace(n.other.outputLinkReplace,"$1"),c=r[0].charAt(0)==="!";s.state.inLink=!0;let o=s.state.linkEmitted,p=s.state.inRawBlock;s.state.linkEmitted=!1;let h=s.inlineTokens(l),b=s.state.linkEmitted;if(s.state.linkEmitted=o,s.state.inLink=!1,!c){if(b){s.state.inRawBlock=p;return}s.state.linkEmitted=!0}return{type:c?"image":"link",raw:t,href:i,title:a,text:l,tokens:h}}function Dt(r,e,t){let s=r.match(t.other.indentCodeCompensation);if(s===null)return e;let n=s[1];return e.split(`
6
+ `).map(i=>{let a=i.match(t.other.beginningSpace);if(a===null)return i;let[l]=a;return i.slice(Math.min(l.length,n.length))}).join(`
7
+ `)}function _e(r,e,t,s){if(!e.includes("<"))return!1;for(let n=0;n<e.length;n++){if(e[n]==="\\"){n++;continue}if(e[n]==="`"){let l=s.inline.code.exec(e.slice(n));if(l){n+=l[0].length-1;continue}}if(e[n]!=="<")continue;let i=r.slice(t+n),a=s.inline.tag.exec(i)||s.inline.autolink.exec(i);if(a){if(a[0].length>e.length-n)return!0;n+=a[0].length-1}}return!1}var N=class{options;rules;lexer;constructor(r){this.options=r||A}space(r){let e=this.rules.block.newline.exec(r);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(r){let e=this.rules.block.code.exec(r);if(e){let t=this.options.pedantic?e[0]:Se(e[0]),s=t.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t,codeBlockStyle:"indented",text:s}}}fences(r){let e=this.rules.block.fences.exec(r);if(e){let t=e[0],s=Dt(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:s}}}heading(r){let e=this.rules.block.heading.exec(r);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){let s=T(t,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceTabChar.test(s))&&(t=s.trim())}return{type:"heading",raw:T(e[0],`
8
+ `),depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(r){let e=this.rules.block.hr.exec(r);if(e)return{type:"hr",raw:T(e[0],`
9
+ `)}}blockquote(r){let e=this.rules.block.blockquote.exec(r);if(e){let t=T(e[0],`
10
+ `).split(`
11
+ `),s="",n="",i=[];for(;t.length>0;){let a=!1,l=[],c;for(c=0;c<t.length;c++)if(this.rules.other.blockquoteStart.test(t[c]))l.push(t[c]),a=!0;else if(!a)l.push(t[c]);else break;t=t.slice(c);let o=l.join(`
12
+ `),p=o.replace(this.rules.other.blockquoteSetextReplace,`
13
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
14
+ ${o}`:o,n=n?`${n}
15
+ ${p}`:p;let h=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(p,i,!0),this.lexer.state.top=h,t.length===0)break;let b=i.at(-1);if(b?.type==="code")break;if(b?.type==="blockquote"){let f=b,d=t.join(`
16
+ `),m=f.raw+`
17
+ `+d.replace(this.rules.other.blockquoteSetextReplace2,""),k=this.blockquote(m);i[i.length-1]=k;let v=m.substring(k.raw.length).replace(/^\n/,""),E=v?v.split(`
18
+ `).length:0,L=E?t.slice(0,-E):t;L.length>0&&(s=`${s}
19
+ ${L.join(`
20
+ `)}`),n=n.substring(0,n.length-f.text.length)+k.text;break}else if(b?.type==="list"){let f=b,d=f.raw+`
21
+ `+t.join(`
22
+ `),m=this.list(d);i[i.length-1]=m,s=s.substring(0,s.length-b.raw.length)+m.raw,n=n.substring(0,n.length-f.raw.length)+m.raw,t=d.substring(i.at(-1).raw.length).split(`
23
+ `);continue}}return{type:"blockquote",raw:s,tokens:i,text:n}}}list(r){let e=this.rules.block.list.exec(r);if(e){let t=e[1].trim(),s=t.length>1,n={type:"list",raw:"",ordered:s,start:s?+t.slice(0,-1):"",loose:!1,items:[]};t=s?`\\d{1,9}\\${t.slice(-1)}`:`\\${t}`,this.options.pedantic&&(t=s?t:"[*+-]");let i=this.rules.other.listItemRegex(t),a=!1;for(;r;){let c=!1,o="",p="";if(!(e=i.exec(r))||this.rules.block.hr.test(r))break;o=e[0],r=r.substring(o.length);let h=e[2].split(`
24
+ `,1)[0],b=e[1].length,f=this.options.pedantic?Te(h,b):h.replace(this.rules.other.leadingSpaceTab,v=>Te(v,b)),d=r.split(`
25
+ `,1)[0],m=!f.trim(),k=0;if(this.options.pedantic?(k=2,p=f.trimStart()):m?k=b+1:(k=f.search(this.rules.other.nonSpaceChar),k=k>4?1:k,p=f.slice(k),k+=b),m&&this.rules.other.blankLine.test(d)&&(o+=d+`
26
+ `,r=r.substring(d.length+1),c=!0),!c){let v=this.rules.other.nextBulletRegex(k),E=this.rules.other.hrRegex(k),L=this.rules.other.fencesBeginRegex(k),ae=this.rules.other.headingBeginRegex(k),Ze=this.rules.other.htmlBeginRegex(k),De=this.rules.other.blockquoteBeginRegex(k);for(;r;){let F=r.split(`
27
+ `,1)[0],C;if(d=F,this.options.pedantic?(d=d.replace(this.rules.other.listReplaceNesting," "),C=d):C=d.replace(this.rules.other.leadingSpaceTab,Me=>Me.replace(this.rules.other.tabCharGlobal," ")),L.test(d)||ae.test(d)||Ze.test(d)||De.test(d)||v.test(d)||E.test(d))break;if(C.search(this.rules.other.nonSpaceChar)>=k||!d.trim())p+=`
28
+ `+C.slice(k);else{if(m||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||L.test(f)||ae.test(f)||E.test(f))break;p+=`
29
+ `+d}m=!d.trim(),o+=F+`
30
+ `,r=r.substring(F.length+1),f=C.slice(k)}}n.loose||(a?n.loose=!0:this.rules.other.doubleBlankLine.test(o)&&(a=!0)),n.items.push({type:"list_item",raw:o,task:!!this.options.gfm&&this.rules.other.listIsTask.test(p),loose:!1,text:p,tokens:[]}),n.raw+=o}let l=n.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;n.raw=n.raw.trimEnd();for(let c of n.items)if(this.lexer.state.top=!1,c.tokens=this.lexer.blockTokens(c.text,[]),!n.loose){let o=c.tokens.filter(h=>h.type==="space"),p=o.length>0&&o.some(h=>this.rules.other.anyLine.test(h.raw));n.loose=p}for(let c of n.items){let o=c.tokens[0];if(c.task&&(o?.type==="text"||o?.type==="paragraph")){c.text=c.text.replace(this.rules.other.listReplaceTask,""),o.raw=o.raw.replace(this.rules.other.listReplaceTask,""),o.text=o.text.replace(this.rules.other.listReplaceTask,"");for(let h=this.lexer.inlineQueue.length-1;h>=0;h--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[h].src)){this.lexer.inlineQueue[h].src=this.lexer.inlineQueue[h].src.replace(this.rules.other.listReplaceTask,"");break}let p=this.rules.other.listTaskCheckbox.exec(c.raw);if(p){let h={type:"checkbox",raw:p[0]+" ",checked:p[0]!=="[ ]"};c.checked=h.checked,n.loose?c.tokens[0]&&["paragraph","text"].includes(c.tokens[0].type)&&"tokens"in c.tokens[0]&&c.tokens[0].tokens?(c.tokens[0].raw=h.raw+c.tokens[0].raw,c.tokens[0].text=h.raw+c.tokens[0].text,c.tokens[0].tokens.unshift(h)):c.tokens.unshift({type:"paragraph",raw:h.raw,text:h.raw,tokens:[h]}):c.tokens.unshift(h)}}else c.task&&(c.task=!1)}if(n.loose)for(let c of n.items){c.loose=!0;for(let o of c.tokens)o.type==="text"&&(o.type="paragraph")}return n}}html(r){let e=this.rules.block.html.exec(r);if(e){let t=Se(e[0]);return{type:"html",block:!0,raw:t,pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:t}}}def(r){let e=this.rules.block.def.exec(r);if(e){if(!this.rules.other.startAngleBracket.test(e[2])&&Re(e[2],"()")!==-1)return;let t=j(e[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:T(e[0],`
31
+ `),href:s,title:n}}}table(r){let e=this.rules.block.table.exec(r);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let t=$e(e[1]),s=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),n=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
32
+ `):[],i={type:"table",raw:T(e[0],`
33
+ `),header:[],align:[],rows:[]};if(t.length===s.length){for(let a of s)this.rules.other.tableAlignRight.test(a)?i.align.push("right"):this.rules.other.tableAlignCenter.test(a)?i.align.push("center"):this.rules.other.tableAlignLeft.test(a)?i.align.push("left"):i.align.push(null);for(let a=0;a<t.length;a++)i.header.push({text:t[a],tokens:this.lexer.inline(t[a]),header:!0,align:i.align[a]});for(let a of n)i.rows.push($e(a,i.header.length).map((l,c)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:i.align[c]})));return i}}lheading(r){let e=this.rules.block.lheading.exec(r);if(e){let t=e[1].trim();return{type:"heading",raw:T(e[0],`
34
+ `),depth:e[2].charAt(0)==="="?1:2,text:t,tokens:this.lexer.inline(t)}}}paragraph(r){let e=this.rules.block.paragraph.exec(r);if(e){let t=e[1].charAt(e[1].length-1)===`
35
+ `?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(r){let e=this.rules.block.text.exec(r);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(r){let e=this.rules.inline.escape.exec(r);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(r){let e=this.rules.inline.tag.exec(r);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(r){if(this.lexer.state.linkParenPossible===!1)return;let e=this.rules.inline.link.exec(r);if(e){let t=e[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&_e(r,e[1],t,this.rules))return;let s=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(s)){if(!this.rules.other.endAngleBracket.test(s))return;let a=T(s.slice(0,-1),"\\");if((s.length-a.length)%2===0)return}else{let a=Re(e[2],"()");if(a===-2)return;if(a>-1){let l=(e[0].indexOf("!")===0?5:4)+e[1].length+a;e[2]=e[2].substring(0,a),e[0]=e[0].substring(0,l).trim(),e[3]=""}}let n=e[2],i="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(n);a&&(n=a[1],i=a[3])}else i=e[3]?e[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(s)?n=n.slice(1):n=n.slice(1,-1)),ze(e,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(r,e){let t;if((t=this.rules.inline.reflink.exec(r))||(t=this.rules.inline.nolink.exec(r))){let s=t[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&_e(r,t[1],s,this.rules))return;let n=(t[2]||t[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=e[j(n)];if(!i){let a=t[0].charAt(0);return{type:"text",raw:a,text:a}}return ze(t,i,t[0],this.lexer,this.rules)}}emStrong(r,e,t=""){let s=this.rules.inline.emStrongLDelim.exec(r);if(!(!s||!s[1]&&!s[2]&&!s[3]&&!s[4]||s[4]&&t.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[3])||!t||this.rules.inline.punctuation.exec(t))){let n=[...s[0]].length-1,i,a,l=n,c=0,o=s[0][0],p=t===o,h=o==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,e=e.slice(-1*r.length+n);(s=h.exec(e))!==null;){if(i=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!i)continue;if(a=[...i].length,s[3]||s[4]){l+=a;continue}else if(s[5]||s[6]){if(n%3&&!((n+a)%3)){c+=a;continue}if(p)break}if(l-=a,l>0)continue;a=Math.min(a,a+l+c);let b=[...s[0]][0].length,f=r.slice(0,n+s.index+b+a);if(Math.min(n,a)%2){let m=f.slice(1,-1);return{type:"em",raw:f,text:m,tokens:this.lexer.inlineTokens(m)}}let d=f.slice(2,-2);return{type:"strong",raw:f,text:d,tokens:this.lexer.inlineTokens(d)}}}}codespan(r){let e=this.rules.inline.code.exec(r);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(t),n=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return s&&n&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(r){let e=this.rules.inline.br.exec(r);if(e)return{type:"br",raw:e[0]}}del(r,e,t=""){let s=this.rules.inline.delLDelim.exec(r);if(s&&(!s[1]||!t||this.rules.inline.punctuation.exec(t))){let n=[...s[0]].length-1,i,a,l=n,c=this.rules.inline.delRDelim;for(c.lastIndex=0,e=e.slice(-1*r.length+n);(s=c.exec(e))!==null;){if(i=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!i||(a=[...i].length,a!==n))continue;if(s[3]||s[4]){l+=a;continue}if(l-=a,l>0)continue;a=Math.min(a,a+l);let o=[...s[0]][0].length,p=r.slice(0,n+s.index+o+a),h=p.slice(n,-n);return{type:"del",raw:p,text:h,tokens:this.lexer.inlineTokens(h)}}}}autolink(r){let e=this.rules.inline.autolink.exec(r);if(e){let t,s;return e[2]==="@"?(t=e[1],s="mailto:"+t):(t=e[1],s=t),{type:"link",raw:e[0],text:t,href:s,autolink:!0,tokens:[{type:"text",raw:t,text:t}]}}}url(r){let e;if(e=this.rules.inline.url.exec(r)){let t,s;if(e[2]==="@")t=e[0],s="mailto:"+t;else{let n;do n=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(n!==e[0]);t=e[0],e[1]==="www."?s="http://"+e[0]:s=e[0]}return{type:"link",raw:e[0],text:t,href:s,autolink:!0,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(r){let e=this.rules.inline.text.exec(r);if(e){let t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:t?e[0]:Zt(e[0]),escaped:t}}}},$=class J{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||A,this.options.tokenizer=this.options.tokenizer||new N,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,linkEmitted:!1,linkParenPossible:!0,top:!0};let t={other:x,block:O.normal,inline:q.normal};this.options.pedantic?(t.block=O.pedantic,t.inline=q.pedantic):this.options.gfm&&(t.block=O.gfm,this.options.breaks?t.inline=q.breaks:t.inline=q.gfm),this.tokenizer.rules=t}static get rules(){return{block:O,inline:q}}static lex(e,t){return new J(t).lex(e)}static lexInline(e,t){return new J(t).inlineTokens(e)}lex(e){e=e.replace(x.carriageReturn,`
36
+ `),this.blockTokens(e,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){let s=this.inlineQueue[t];this.inlineTokens(s.src,s.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],s=!1){this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(x.tabCharGlobal," ").replace(x.spaceLine,""));let n=1/0;for(;e;){if(e.length<n)n=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}let i;if(this.options.extensions?.block?.some(l=>(i=l.call({lexer:this},e,t))?(e=e.substring(i.raw.length),t.push(i),!0):!1))continue;if(i=this.tokenizer.space(e)){e=e.substring(i.raw.length);let l=t.at(-1);i.raw.length===1&&l!==void 0?l.raw+=`
37
+ `:t.push(i);continue}if(i=this.tokenizer.code(e)){e=e.substring(i.raw.length);let l=t.at(-1);l?.type==="paragraph"||l?.type==="text"?(l.raw+=(l.raw.endsWith(`
38
+ `)?"":`
39
+ `)+i.raw,l.text+=`
40
+ `+i.text,this.inlineQueue.at(-1).src=l.text):t.push(i);continue}if(i=this.tokenizer.fences(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.heading(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.hr(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.blockquote(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.list(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.html(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.def(e)){e=e.substring(i.raw.length);let l=t.at(-1);l?.type==="paragraph"||l?.type==="text"?(l.raw+=(l.raw.endsWith(`
41
+ `)?"":`
42
+ `)+i.raw,l.text+=`
43
+ `+i.raw,this.inlineQueue.at(-1).src=l.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},t.push(i));continue}if(i=this.tokenizer.table(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.lheading(e)){e=e.substring(i.raw.length),t.push(i);continue}let a=e;if(this.options.extensions?.startBlock){let l=1/0,c=e.slice(1),o;this.options.extensions.startBlock.forEach(p=>{o=p.call({lexer:this},c),typeof o=="number"&&o>=0&&(l=Math.min(l,o))}),l<1/0&&l>=0&&(a=e.substring(0,l+1))}if(this.state.top&&(i=this.tokenizer.paragraph(a))){let l=t.at(-1);s&&l?.type==="paragraph"?(l.raw+=(l.raw.endsWith(`
44
+ `)?"":`
45
+ `)+i.raw,l.text+=`
46
+ `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):t.push(i),s=a.length!==e.length,e=e.substring(i.raw.length);continue}if(i=this.tokenizer.text(e)){e=e.substring(i.raw.length);let l=t.at(-1);l?.type==="text"?(l.raw+=(l.raw.endsWith(`
47
+ `)?"":`
48
+ `)+i.raw,l.text+=`
49
+ `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):t.push(i);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}linkInText(e){if(!e.includes("["))return!1;let t=this.tokenizer.rules.inline.link;for(let s of e.matchAll(this.tokenizer.rules.inline.blockSkip))if(t.test(s[0])&&e.charAt(s.index-1)!=="!")return!0;for(let s of e.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let n=s[0],i=n.lastIndexOf("[");if(!(n.charAt(0)==="!"||!Object.hasOwn(this.tokens.links,j(n.slice(i+1,-1))))&&!(i>1&&this.linkInText(n.slice(1,i-1))))return!0}return!1}inlineTokens(e,t=[]){this.tokenizer.lexer=this;let s=this.state.linkParenPossible;this.state.linkParenPossible=s&&e.includes(")");try{return this.#e(e,t)}finally{this.state.linkParenPossible=s}}#e(e,t){let s=e;if(this.tokens.links&&e.includes("[")){let l=this.tokenizer.rules.inline.reflinkSearch,c=o=>{let p=o.lastIndexOf("[");if(!Object.hasOwn(this.tokens.links,j(o.slice(p+1,-1))))return o;if(p>1&&o.charAt(0)!=="!"){let h=o.slice(1,p-1);if(this.linkInText(h))return"["+h.replace(l,c)+"]["+"a".repeat(o.length-p-2)+"]"}return"["+"a".repeat(o.length-2)+"]"};s=s.replace(l,c)}s=s.replace(this.tokenizer.rules.inline.anyPunctuation,l=>"+".repeat(l.length)),s=s.replace(this.tokenizer.rules.inline.blockSkip,(l,c,o)=>{let p=o?o.length:0;return l.slice(0,p)+"["+"a".repeat(l.length-p-2)+"]"}),s=this.options.hooks?.emStrongMask?.call({lexer:this},s)??s;let n=!1,i="",a=1/0;for(;e;){if(e.length<a)a=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}n||(i=""),n=!1;let l;if(this.options.extensions?.inline?.some(o=>(l=o.call({lexer:this},e,t))?(e=e.substring(l.raw.length),t.push(l),!0):!1))continue;if(l=this.tokenizer.escape(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.tag(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.link(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(l.raw.length);let o=t.at(-1);l.type==="text"&&o?.type==="text"?(o.raw+=l.raw,o.text+=l.text):t.push(l);continue}if(l=this.tokenizer.emStrong(e,s,i)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.codespan(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.br(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.del(e,s,i)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.autolink(e)){e=e.substring(l.raw.length),t.push(l);continue}if(!this.state.inLink&&(l=this.tokenizer.url(e))){e=e.substring(l.raw.length),t.push(l);continue}let c=e;if(this.options.extensions?.startInline){let o=1/0,p=e.slice(1),h;this.options.extensions.startInline.forEach(b=>{h=b.call({lexer:this},p),typeof h=="number"&&h>=0&&(o=Math.min(o,h))}),o<1/0&&o>=0&&(c=e.substring(0,o+1))}if(l=this.tokenizer.inlineText(c)){e=e.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(i=l.raw.slice(-1)),n=!0;let o=t.at(-1);o?.type==="text"?(o.raw+=l.raw,o.text+=l.text):t.push(l);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return t}infiniteLoopError(e){let t="Infinite loop on byte: "+e;if(this.options.silent)console.error(t);else throw new Error(t)}},H=class{options;parser;constructor(r){this.options=r||A}space(r){return""}code({text:r,lang:e,escaped:t}){let s=(e||"").match(x.notSpaceStart)?.[0],n=r?r.replace(x.endingNewline,"")+`
50
+ `:"";return s?'<pre><code class="language-'+w(s)+'">'+(t?n:w(n,!0))+`</code></pre>
51
+ `:"<pre><code>"+(t?n:w(n,!0))+`</code></pre>
52
+ `}blockquote({tokens:r}){return`<blockquote>
53
+ ${this.parser.parse(r)}</blockquote>
54
+ `}html({text:r}){return r}def(r){return""}heading({tokens:r,depth:e}){return`<h${e}>${this.parser.parseInline(r)}</h${e}>
55
+ `}hr(r){return`<hr>
56
+ `}list(r){let e=r.ordered,t=r.start,s="";for(let a=0;a<r.items.length;a++){let l=r.items[a];s+=this.listitem(l)}let n=e?"ol":"ul",i=e&&t!==1?' start="'+t+'"':"";return"<"+n+i+`>
57
+ `+s+"</"+n+`>
58
+ `}listitem(r){return`<li>${this.parser.parse(r.tokens)}</li>
59
+ `}checkbox({checked:r}){return"<input "+(r?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:r}){return`<p>${this.parser.parseInline(r)}</p>
60
+ `}table(r){let e="",t="";for(let n=0;n<r.header.length;n++)t+=this.tablecell(r.header[n]);e+=this.tablerow({text:t});let s="";for(let n=0;n<r.rows.length;n++){let i=r.rows[n];t="";for(let a=0;a<i.length;a++)t+=this.tablecell(i[a]);s+=this.tablerow({text:t})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
61
+ <thead>
62
+ `+e+`</thead>
63
+ `+s+`</table>
64
+ `}tablerow({text:r}){return`<tr>
65
+ ${r}</tr>
66
+ `}tablecell(r){let e=this.parser.parseInline(r.tokens),t=r.header?"th":"td";return(r.align?`<${t} align="${r.align}">`:`<${t}>`)+e+`</${t}>
67
+ `}strong({tokens:r}){return`<strong>${this.parser.parseInline(r)}</strong>`}em({tokens:r}){return`<em>${this.parser.parseInline(r)}</em>`}codespan({text:r}){return`<code>${w(r,!0)}</code>`}br(r){return"<br>"}del({tokens:r}){return`<del>${this.parser.parseInline(r)}</del>`}link({href:r,title:e,text:t,tokens:s,autolink:n}){let i=n?w(t,!0):this.parser.parseInline(s),a=ye(r);if(a===null)return i;r=w(a,n);let l='<a href="'+r+'"';return e&&(l+=' title="'+w(e)+'"'),l+=">"+i+"</a>",l}image({href:r,title:e,text:t,tokens:s}){s&&(t=this.parser.parseInline(s,this.parser.textRenderer));let n=ye(r);if(n===null)return w(t);r=n;let i=`<img src="${w(r)}" alt="${w(t)}"`;return e&&(i+=` title="${w(e)}"`),i+=">",i}text(r){return"tokens"in r&&r.tokens?this.parser.parseInline(r.tokens):"escaped"in r&&r.escaped?r.text:w(r.text)}},ie=class{strong({text:r}){return r}em({text:r}){return r}codespan({text:r}){return r}del({text:r}){return r}html({text:r}){return r}text({text:r}){return r}link({text:r}){return""+r}image({text:r}){return""+r}br(){return""}checkbox({raw:r}){return r}},S=class K{options;renderer;textRenderer;constructor(e){this.options=e||A,this.options.renderer=this.options.renderer||new H,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new ie}static parse(e,t){return new K(t).parse(e)}static parseInline(e,t){return new K(t).parseInline(e)}parse(e){this.renderer.parser=this;let t="";for(let s=0;s<e.length;s++){let n=e[s];if(this.options.extensions?.renderers?.[n.type]){let a=n,l=this.options.extensions.renderers[a.type].call({parser:this},a);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","checkbox","html","def","paragraph","text"].includes(a.type)){t+=l||"";continue}}let i=n;switch(i.type){case"space":{t+=this.renderer.space(i);break}case"hr":{t+=this.renderer.hr(i);break}case"heading":{t+=this.renderer.heading(i);break}case"code":{t+=this.renderer.code(i);break}case"table":{t+=this.renderer.table(i);break}case"blockquote":{t+=this.renderer.blockquote(i);break}case"list":{t+=this.renderer.list(i);break}case"checkbox":{t+=this.renderer.checkbox(i);break}case"html":{t+=this.renderer.html(i);break}case"def":{t+=this.renderer.def(i);break}case"paragraph":{t+=this.renderer.paragraph(i);break}case"text":{t+=this.renderer.text(i);break}default:{let a='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return t}parseInline(e,t=this.renderer){this.renderer.parser=this;let s="";for(let n=0;n<e.length;n++){let i=e[n];if(this.options.extensions?.renderers?.[i.type]){let l=this.options.extensions.renderers[i.type].call({parser:this},i);if(l!==!1||!["escape","html","link","image","checkbox","strong","em","codespan","br","del","text"].includes(i.type)){s+=l||"";continue}}let a=i;switch(a.type){case"escape":{s+=t.text(a);break}case"html":{s+=t.html(a);break}case"link":{s+=t.link(a);break}case"image":{s+=t.image(a);break}case"checkbox":{s+=t.checkbox(a);break}case"strong":{s+=t.strong(a);break}case"em":{s+=t.em(a);break}case"codespan":{s+=t.codespan(a);break}case"br":{s+=t.br(a);break}case"del":{s+=t.del(a);break}case"text":{s+=t.text(a);break}default:{let l='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return s}},B=class{options;block;constructor(r){this.options=r||A}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(r){return r}postprocess(r){return r}processAllTokens(r){return r}emStrongMask(r){return r}provideLexer(r=this.block){return r?$.lex:$.lexInline}provideParser(r=this.block){return r?S.parse:S.parseInline}},Mt=class{defaults=V();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=S;Renderer=H;TextRenderer=ie;Lexer=$;Tokenizer=N;Hooks=B;constructor(...r){this.use(...r)}walkTokens(r,e){let t=[];for(let s of r)switch(t=t.concat(e.call(this,s)),s.type){case"table":{let n=s;for(let i of n.header)t=t.concat(this.walkTokens(i.tokens,e));for(let i of n.rows)for(let a of i)t=t.concat(this.walkTokens(a.tokens,e));break}case"list":{let n=s;t=t.concat(this.walkTokens(n.items,e));break}default:{let n=s;this.defaults.extensions?.childTokens?.[n.type]?this.defaults.extensions.childTokens[n.type].forEach(i=>{let a=n[i].flat(1/0);t=t.concat(this.walkTokens(a,e))}):n.tokens&&(t=t.concat(this.walkTokens(n.tokens,e)))}}return t}use(...r){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return r.forEach(t=>{let s={...t};if(s.async=this.defaults.async||s.async||!1,t.extensions&&(t.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){let i=e.renderers[n.name];i?e.renderers[n.name]=function(...a){let l=n.renderer.apply(this,a);return l===!1&&(l=i.apply(this,a)),l}:e.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||n.level!=="block"&&n.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let i=e[n.level];i?i.unshift(n.tokenizer):e[n.level]=[n.tokenizer],n.start&&(n.level==="block"?e.startBlock?e.startBlock.push(n.start):e.startBlock=[n.start]:n.level==="inline"&&(e.startInline?e.startInline.push(n.start):e.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(e.childTokens[n.name]=n.childTokens)}),s.extensions=e),t.renderer){let n=this.defaults.renderer||new H(this.defaults);for(let i in t.renderer){if(!(i in n))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;let a=i,l=t.renderer[a],c=n[a];n[a]=(...o)=>{let p=l.apply(n,o);return p===!1&&(p=c.apply(n,o)),p||""}}s.renderer=n}if(t.tokenizer){let n=this.defaults.tokenizer||new N(this.defaults);for(let i in t.tokenizer){if(!(i in n))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;let a=i,l=t.tokenizer[a],c=n[a];n[a]=(...o)=>{let p=l.apply(n,o);return p===!1&&(p=c.apply(n,o)),p}}s.tokenizer=n}if(t.hooks){let n=this.defaults.hooks||new B;for(let i in t.hooks){if(!(i in n))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;let a=i,l=t.hooks[a],c=n[a];B.passThroughHooks.has(i)?n[a]=o=>{if(this.defaults.async&&B.passThroughHooksRespectAsync.has(i))return(async()=>{let h=await l.call(n,o);return c.call(n,h)})();let p=l.call(n,o);return c.call(n,p)}:n[a]=(...o)=>{if(this.defaults.async)return(async()=>{let h=await l.apply(n,o);return h===!1&&(h=await c.apply(n,o)),h})();let p=l.apply(n,o);return p===!1&&(p=c.apply(n,o)),p}}s.hooks=n}if(t.walkTokens){let n=this.defaults.walkTokens,i=t.walkTokens;s.walkTokens=function(a){let l=[];return l.push(i.call(this,a)),n&&(l=l.concat(n.call(this,a))),l}}this.defaults={...this.defaults,...s}}),this}setOptions(r){return this.defaults={...this.defaults,...r},this}lexer(r,e){return $.lex(r,e??this.defaults)}parser(r,e){return S.parse(r,e??this.defaults)}parseMarkdown(r){return(e,t)=>{let s={...t},n={...this.defaults,...s},i=this.onError(!!n.silent,!!n.async);if(this.defaults.async===!0&&s.async===!1)return i(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return i(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(n.hooks&&(n.hooks.options=n,n.hooks.block=r),n.async)return(async()=>{let a=n.hooks?await n.hooks.preprocess(e):e,l=await(n.hooks?await n.hooks.provideLexer(r):r?$.lex:$.lexInline)(a,n),c=n.hooks?await n.hooks.processAllTokens(l):l;n.walkTokens&&await Promise.all(this.walkTokens(c,n.walkTokens));let o=await(n.hooks?await n.hooks.provideParser(r):r?S.parse:S.parseInline)(c,n);return n.hooks?await n.hooks.postprocess(o):o})().catch(i);try{n.hooks&&(e=n.hooks.preprocess(e));let a=(n.hooks?n.hooks.provideLexer(r):r?$.lex:$.lexInline)(e,n);n.hooks&&(a=n.hooks.processAllTokens(a)),n.walkTokens&&this.walkTokens(a,n.walkTokens);let l=(n.hooks?n.hooks.provideParser(r):r?S.parse:S.parseInline)(a,n);return n.hooks&&(l=n.hooks.postprocess(l)),l}catch(a){return i(a)}}}onError(r,e){return t=>{if(t.message+=`
68
+ Please report this to https://github.com/markedjs/marked.`,r){let s="<p>An error occurred:</p><pre>"+w(t.message+"",!0)+"</pre>";return e?Promise.resolve(s):s}if(e)return Promise.reject(t);throw t}}},_=new Mt;function g(r,e){return _.parse(r,e)}g.options=g.setOptions=function(r){return _.setOptions(r),g.defaults=_.defaults,Ae(g.defaults),g};g.getDefaults=V;g.defaults=A;function Ot(...r){return _.use(...r),g.defaults=_.defaults,Ae(g.defaults),g}g.use=Ot;g.walkTokens=function(r,e){return _.walkTokens(r,e)};g.parseInline=_.parseInline;g.Parser=S;g.parser=S.parse;g.Renderer=H;g.TextRenderer=ie;g.Lexer=$;g.lexer=$.lex;g.Tokenizer=N;g.Hooks=B;g.parse=g;var Nt=g.options,Ht=g.setOptions,Ft=g.walkTokens,Gt=g.parseInline;var Ut=S.parse,Xt=$.lex;var Qt=oe`:host{container-type:inline-size;display:block;min-inline-size:0}.interrupt-container{display:flex;flex-direction:column;gap:.75rem}.interrupt-actions,.interrupt-buttons{display:flex;justify-content:flex-end;gap:.5rem}.interrupt-message{white-space:normal}.interrupt-message :where(p){margin:0}.interrupt-message :where(ul,ol){margin:0;padding-inline-start:1.25rem}.entity-interrupt{background:var(--calcite-color-foreground-1);border-block-start:2px solid var(--calcite-color-brand);gap:0}.entity-heading{align-items:center;display:flex;gap:.75rem;padding:1rem 1rem .75rem}.entity-heading-icon{color:var(--calcite-color-brand);flex:none}.entity-heading-content{display:grid;gap:.25rem;min-inline-size:0}.entity-eyebrow{color:var(--calcite-color-text-3);font-size:var(--calcite-font-size-relative-sm);line-height:1.25}.entity-question{color:var(--calcite-color-text-1);font-size:var(--calcite-font-size-relative-md);font-weight:500;line-height:1.4;overflow-wrap:anywhere}.interrupt-picker{--arcgis-portal-entity-picker-results-max-block-size: min(22rem, 40vh);--arcgis-portal-entity-picker-selection-display: none;box-sizing:border-box;padding:0 1rem .75rem}.entity-interrupt .interrupt-actions{align-items:center;border-block-start:1px solid var(--calcite-color-border-3);display:grid;gap:.75rem;grid-template-columns:minmax(0,1fr) auto;min-block-size:2.25rem;padding:.625rem 1rem}.entity-selection{align-items:center;color:var(--calcite-color-text-2);display:flex;font-size:var(--calcite-font-size-relative-base);gap:.5rem;min-inline-size:0}.entity-selection calcite-icon{color:var(--calcite-color-status-success);flex:none}.entity-selection-label{flex:1;min-inline-size:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@container (max-width: 24rem){.entity-heading{padding:.875rem .75rem .625rem}.interrupt-picker{padding:0 .75rem .625rem}.entity-interrupt .interrupt-actions{gap:.5rem;grid-template-columns:minmax(0,1fr);padding:.625rem .75rem}.entity-selection:empty{display:none}}`;g.use({gfm:!0,breaks:!0,async:!1});var jt=new ke,le=class extends he{constructor(){super(...arguments),this.#e=[],this._messages=U({blocking:!0}),this.pickerMessages=U({blocking:!0,name:"portal-entity-picker"}),this.pickerRef=ce(),this.selectedEntity=null,this.selectionSubmitted=!1,this.arcgisCancel=G(),this.arcgisSubmit=G()}static{this.properties={selectedEntity:16,selectionSubmitted:16,type:1,message:1,options:0,portal:0,entityRequest:0,requestId:1}}static{this.styles=Qt}#e;get selectedReference(){return this.selectedEntity&&this.selectedEntity.entityType===this.entityRequest?.entityType?fe(this.selectedEntity):void 0}willUpdate(e){(e.has("entityRequest")||e.has("requestId")||e.has("portal"))&&(this.selectedEntity=null,this.selectionSubmitted=!1,this.#e=[])}updated(e){this.isConnected&&this.entityRequest&&(e.has("entityRequest")||e.has("requestId")||e.has("portal"))&&this.pickerRef.value?.setFocus()}submit(){if(this.entityRequest){let e=this.selectedReference;if(!e||this.selectionSubmitted)return;this.selectionSubmitted=!0,this.arcgisSubmit.emit(JSON.stringify(e));return}this.arcgisSubmit.emit(this.type==="boolean-choice"?!0:this.#e)}_renderMessageContent(){let e=this.message??"",t=g.parse(e,{async:!1});return jt.sanitize(t)}_renderInterruptInput(){let{_messages:e,type:t,options:s}=this;switch(t){case"single-select":return y`<calcite-list class="interrupt-list" .label=${e.singleSelectLabel} selection-mode=single-persist @calciteListChange=${n=>this.#e=n.target.selectedItems[0]?.value}>${s?.map(n=>y`<calcite-list-item .label=${n} .value=${n}></calcite-list-item>`)}</calcite-list>`;case"multi-select":return y`<calcite-list class="interrupt-list" .label=${e.multiSelectLabel} selection-mode=multiple @calciteListChange=${n=>this.#e=n.target.selectedItems.map(i=>i.value)}>${s?.map(n=>y`<calcite-list-item .label=${n} .value=${n}></calcite-list-item>`)}</calcite-list>`;case"text-input":return y`<calcite-input class="interrupt-input" .label=${e.textInputLabel} @calciteInputInput=${n=>this.#e=n.target.value}></calcite-input>`;case"boolean-choice":return null;default:return de(t)}}_renderInterruptButtons(e=!1){let{_messages:t,type:s,selectedReference:n}=this,i=s==="boolean-choice";return y`<div class="interrupt-buttons"><calcite-button .appearance=${e?"transparent":"outline"} .kind=${e?"neutral":void 0} @click=${()=>this.arcgisCancel.emit()}>${i?t.cancelButton:t.skipButton}</calcite-button><calcite-button appearance=solid .iconEnd=${e?"arrow-right":void 0} .disabled=${e&&(!n||this.selectionSubmitted)} @click=${this.submit}>${i?t.confirmButton:t.submitButton}</calcite-button></div>`}_renderEntityInterrupt(e){let{_messages:t,selectedReference:s}=this;return y`<div class="interrupt-container entity-interrupt"><div class="entity-heading"><calcite-icon class="entity-heading-icon" .icon=${e==="user"?"user":e==="group"?"group":"file"} scale=m></calcite-icon><div class="entity-heading-content"><span class="entity-eyebrow">${t.titleInput}</span><div class="interrupt-message entity-question">${X(this._renderMessageContent())}</div></div></div>${this.portal?y`<arcgis-portal-entity-picker class="interrupt-picker" .portal=${this.portal} .entityType=${e} mode=inline icon=search .selected=${this.selectedEntity} @arcgisSelectionChange=${({detail:n})=>{!this.selectionSubmitted&&(!n||n.entityType===this.entityRequest?.entityType)&&(this.selectedEntity=n)}} ${pe(this.pickerRef)}></arcgis-portal-entity-picker>`:this._renderInterruptInput()}<div class="interrupt-actions"><div class="entity-selection" role=status>${s&&y`<calcite-icon icon=check-circle scale=s></calcite-icon><span class="entity-selection-label" title=${s.label??ue}>${s.label}</span><calcite-button appearance=transparent .disabled=${this.selectionSubmitted} icon-start=x kind=neutral .label=${this.pickerMessages.clearSelection} scale=s @click=${()=>{this.selectedEntity=null,this.pickerRef.value?.setFocus()}}></calcite-button>`||""}</div>${this._renderInterruptButtons(!0)}</div></div>`}render(){if(this.entityRequest)return this._renderEntityInterrupt(this.entityRequest.entityType);let{_messages:e,type:t}=this;return y`<div class="interrupt-container"><calcite-notice open kind=neutral width=full><div slot=title>${t==="boolean-choice"?e.titleConfirm:e.titleInput}</div><div slot=message class="interrupt-message">${X(this._renderMessageContent())}</div></calcite-notice>${this._renderInterruptInput()}<div class="interrupt-actions">${this._renderInterruptButtons()}</div></div>`}};ge("arcgis-portal-ai-assistant-interrupt",le);export{le as ArcgisPortalAiAssistantInterrupt};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{a as k,b as D,c as _}from"./V6A6MKLU.js";import l from"./7LMZHJZG.js";import{a as C,c as U}from"./U3KMGSVH.js";import j from"./XYMBRPC7.js";import"./4KTRAA2J.js";import{a as T}from"./PKA745KL.js";import{a as w}from"./IN4JPZTY.js";import i from"./RQYNPDN3.js";import e from"./ROX3GKKA.js";import a from"./PMRFXB4F.js";import{f as b}from"./K75JTQPW.js";import{b as f}from"./KV4ZZSNW.js";import"./EMJQI4MA.js";import{a as v}from"./7ZWYUHGK.js";import"./A2SQ4EMZ.js";import"./K2XSYDAP.js";import{J as d,K as I,L as u,O as R,R as g,h as p,j as c,w as h}from"./AICPYLWE.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";export default $arcgis.t(([P,,,{a:$},{q:A},{f:y}])=>{var H=p`.thumbnail{object-fit:cover;max-height:8rem}.replacement-container{margin:.5rem}.replacement-message{margin-bottom:.5rem}.replacement-card__title{margin-bottom:.25rem}`,B=5e3,m=class extends u{constructor(){super(...arguments),this.replacementId=null,this.itemOwnerName="",this.replacementItemInRecycleBin=!1,this.hasInaccessibleReplacementItem=!1,this.replacementItemSupportsOpenActions=!1,this.thumbnailUrl=null,this.timer=void 0,this.messages=v({blocking:!0}),this.primaryActionRef=d(),this.getItemDetailsUrl=({portal:e,itemId:t,redirect:i})=>{let s=f({portal:e,usePortalHostname:!this.user});return s?`${`${s}/home`}/item.html?id=${t}${i?"&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.supportsReplacement?"_self":"_blank")},this.canRedirect=!1,this.item=null,this.replacementItem=null,this.redirectAction=null,this.supportsReplacement=!1,this.redirectCancelled=!1,this.open=!1,this.redirectTimeRemaining=B/1e3,this.arcgisPortalReplacementItemFetch=h()}static{this.properties={item:16,replacementItem:16,redirectAction:16,supportsReplacement:16,redirectCancelled:16,open:16,redirectTimeRemaining:16,itemId:1,portal:0,user:0}}static{this.styles=H}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=B/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}cancelRedirect(){this.cancelTimer(),this.redirectCancelled=!0}isItemRetired(e){return k(e)||D(e)}async initItem(){if(!this.itemId)return;let{itemId:e,portal:t,performRedirectAction:i}=this,s=new P({id:e,portal:t});this.item=await s?.load();let n=await A(e,t,{relationshipType:"ReplacementItem2Item",direction:"reverse"},!0),r=n.data?.relatedItems?.[0];this.replacementItemInRecycleBin=r?.inRecycleBin;let l=r?.id,a=!this.replacementItemInRecycleBin&&l?new P({id:l,portal:t}):null;await a?.load(),this.replacementItem=a,this.hasInaccessibleReplacementItem=this.replacementItemInRecycleBin||!a&&n.data?.aggregations?.total?.count>0&&n.data?.relatedItems?.length===0,this.arcgisPortalReplacementItemFetch.emit({replacementItem:this.hasInaccessibleReplacementItem?{}:a||null}),this.replacementItem=a;let o=this.replacementItem?.owner??(s?.owner||null);this.itemOwnerName=o?T(await $(o,t),this.messages?._t9nLocale||"en"):"",this.replacementItemSupportsOpenActions=_(a),this.thumbnailUrl=U(t,a??this.item),this.supportsReplacement=!!a&&this.isItemRetired(s);let O=b(this.replacementItem,await y(this.portal),this.portal?.isPortal??!1);this.canRedirect=this.supportsReplacement&&this.replacementItemSupportsOpenActions&&!O,this.replacementId=a?.id||null,this.canRedirect&&this.setupTimer({onComplete:()=>i()}),this.open=!0}getReplacementHeading(){let{messages:e,hasInaccessibleReplacementItem:t,canRedirect:i}=this;return t?e.replacementUnavailable:i?e.redirectToReplacement:this.isItemRetired(this.item)&&!this.replacementItem?e.replacementUnavailable:e.replacementAvailable}getReplacementMessage(){let{messages:e,hasInaccessibleReplacementItem:t,supportsReplacement:i}=this;return t?e.retiredReplacementUnavailable:i?e.deprecatedHasReplacement:this.isItemRetired(this.item)&&!this.replacementItem?e.retired:e.deprecatedHasReplacement}getRedirectActionMessage(){let{messages:e,canRedirect:t,redirectTimeRemaining:i,redirectCancelled:s}=this;return s?e.redirectToReplacement:t?e.redirect.replace("${seconds}",`${i}`):e.moreDetails}renderCard(e){let{canRedirect:t,messages:i}=this;return c`<calcite-card thumbnail-position=inline-start><img slot=thumbnail class="thumbnail" src=${(this.thumbnailUrl||void 0)??R} @error=${async()=>this.thumbnailUrl=C(e)}><span slot=heading class="replacement-card__title">${e.title}</span><span slot=description>${i.ownedBy?.replace("${owner}",this.itemOwnerName)}</span>${t&&c`<calcite-link slot=footer-start icon-end=launch .href=${this.getItemDetailsUrl({portal:this.portal,itemId:this.replacementId})} target=_blank>${i.moreDetails}</calcite-link>`||""}</calcite-card>`}render(){let{open:e,messages:t,item:i,replacementItem:s,supportsReplacement:n,canRedirect:r,redirectCancelled:l}=this;if(!(!i||!this.isItemRetired(i)))return c`<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">${w(this.getReplacementMessage()?.replace("${itemTitle}",this.item?.title||""))}</div>${this.renderCard(n?s:i)}</div>${r&&!l&&c`<calcite-button slot=footer-end appearance=outline-fill kind=neutral @click=${()=>{this.cancelRedirect()}}>${t.cancelRedirection}</calcite-button>`||""}<calcite-button slot=footer-end @click=${()=>{this.cancelTimer(),r?this.performRedirectAction():this.viewItemDetailsPage()}} .iconEnd=${r?void 0:"launch"} ${I(this.primaryActionRef)}>${this.getRedirectActionMessage()}</calcite-button></calcite-dialog>`}};g("arcgis-portal-replacement-item-redirect",m);return m},"portal/PortalItem",a,e,i,j,l)
2
+ import{a as k,b as D,c as _}from"./V6A6MKLU.js";import l from"./7LMZHJZG.js";import{a as C,c as U}from"./U3KMGSVH.js";import j from"./ZDMCDQRC.js";import"./4KTRAA2J.js";import{a as A}from"./PKA745KL.js";import{a as w}from"./IN4JPZTY.js";import i from"./RQYNPDN3.js";import e from"./ROX3GKKA.js";import a from"./PMRFXB4F.js";import{f as b}from"./K75JTQPW.js";import{b as f}from"./KV4ZZSNW.js";import"./EMJQI4MA.js";import{a as v}from"./FJ3I3AJE.js";import"./I6WGLIEC.js";import"./K2XSYDAP.js";import{J as d,K as I,L as u,O as R,R as g,h as p,j as c,w as h}from"./AICPYLWE.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";export default $arcgis.t(([P,,,{a:$},{q:T},{f:y}])=>{var H=p`.thumbnail{object-fit:cover;max-height:8rem}.replacement-container{margin:.5rem}.replacement-message{margin-bottom:.5rem}.replacement-card__title{margin-bottom:.25rem}`,B=5e3,m=class extends u{constructor(){super(...arguments),this.replacementId=null,this.itemOwnerName="",this.replacementItemInRecycleBin=!1,this.hasInaccessibleReplacementItem=!1,this.replacementItemSupportsOpenActions=!1,this.thumbnailUrl=null,this.timer=void 0,this.messages=v({blocking:!0}),this.primaryActionRef=d(),this.getItemDetailsUrl=({portal:e,itemId:t,redirect:i})=>{let s=f({portal:e,usePortalHostname:!this.user});return s?`${`${s}/home`}/item.html?id=${t}${i?"&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.supportsReplacement?"_self":"_blank")},this.canRedirect=!1,this.item=null,this.replacementItem=null,this.redirectAction=null,this.supportsReplacement=!1,this.redirectCancelled=!1,this.open=!1,this.redirectTimeRemaining=B/1e3,this.arcgisPortalReplacementItemFetch=h()}static{this.properties={item:16,replacementItem:16,redirectAction:16,supportsReplacement:16,redirectCancelled:16,open:16,redirectTimeRemaining:16,itemId:1,portal:0,user:0}}static{this.styles=H}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=B/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}cancelRedirect(){this.cancelTimer(),this.redirectCancelled=!0}isItemRetired(e){return k(e)||D(e)}async initItem(){if(!this.itemId)return;let{itemId:e,portal:t,performRedirectAction:i}=this,s=new P({id:e,portal:t});this.item=await s?.load();let n=await T(e,t,{relationshipType:"ReplacementItem2Item",direction:"reverse"},!0),r=n.data?.relatedItems?.[0];this.replacementItemInRecycleBin=r?.inRecycleBin;let l=r?.id,a=!this.replacementItemInRecycleBin&&l?new P({id:l,portal:t}):null;await a?.load(),this.replacementItem=a,this.hasInaccessibleReplacementItem=this.replacementItemInRecycleBin||!a&&n.data?.aggregations?.total?.count>0&&n.data?.relatedItems?.length===0,this.arcgisPortalReplacementItemFetch.emit({replacementItem:this.hasInaccessibleReplacementItem?{}:a||null}),this.replacementItem=a;let o=this.replacementItem?.owner??(s?.owner||null);this.itemOwnerName=o?A(await $(o,t),this.messages?._t9nLocale||"en"):"",this.replacementItemSupportsOpenActions=_(a),this.thumbnailUrl=U(t,a??this.item),this.supportsReplacement=!!a&&this.isItemRetired(s);let O=b(this.replacementItem,await y(this.portal),this.portal?.isPortal??!1);this.canRedirect=this.supportsReplacement&&this.replacementItemSupportsOpenActions&&!O,this.replacementId=a?.id||null,this.canRedirect&&this.setupTimer({onComplete:()=>i()}),this.open=!0}getReplacementHeading(){let{messages:e,hasInaccessibleReplacementItem:t,canRedirect:i}=this;return t?e.replacementUnavailable:i?e.redirectToReplacement:this.isItemRetired(this.item)&&!this.replacementItem?e.replacementUnavailable:e.replacementAvailable}getReplacementMessage(){let{messages:e,hasInaccessibleReplacementItem:t,supportsReplacement:i}=this;return t?e.retiredReplacementUnavailable:i?e.deprecatedHasReplacement:this.isItemRetired(this.item)&&!this.replacementItem?e.retired:e.deprecatedHasReplacement}getRedirectActionMessage(){let{messages:e,canRedirect:t,redirectTimeRemaining:i,redirectCancelled:s}=this;return s?e.redirectToReplacement:t?e.redirect.replace("${seconds}",`${i}`):e.moreDetails}renderCard(e){let{canRedirect:t,messages:i}=this;return c`<calcite-card thumbnail-position=inline-start><img slot=thumbnail class="thumbnail" src=${(this.thumbnailUrl||void 0)??R} @error=${async()=>this.thumbnailUrl=C(e)}><span slot=heading class="replacement-card__title">${e.title}</span><span slot=description>${i.ownedBy?.replace("${owner}",this.itemOwnerName)}</span>${t&&c`<calcite-link slot=footer-start icon-end=launch .href=${this.getItemDetailsUrl({portal:this.portal,itemId:this.replacementId})} target=_blank>${i.moreDetails}</calcite-link>`||""}</calcite-card>`}render(){let{open:e,messages:t,item:i,replacementItem:s,supportsReplacement:n,canRedirect:r,redirectCancelled:l}=this;if(!(!i||!this.isItemRetired(i)))return c`<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">${w(this.getReplacementMessage()?.replace("${itemTitle}",this.item?.title||""))}</div>${this.renderCard(n?s:i)}</div>${r&&!l&&c`<calcite-button slot=footer-end appearance=outline-fill kind=neutral @click=${()=>{this.cancelRedirect()}}>${t.cancelRedirection}</calcite-button>`||""}<calcite-button slot=footer-end @click=${()=>{this.cancelTimer(),r?this.performRedirectAction():this.viewItemDetailsPage()}} .iconEnd=${r?void 0:"launch"} ${I(this.primaryActionRef)}>${this.getRedirectActionMessage()}</calcite-button></calcite-dialog>`}};g("arcgis-portal-replacement-item-redirect",m);return m},"portal/PortalItem",a,e,i,j,l)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import c from"./DHMNNIXZ.js";import b from"./XYMBRPC7.js";import"./K75JTQPW.js";import"./KV4ZZSNW.js";import"./EMJQI4MA.js";import{a as f}from"./7ZWYUHGK.js";import"./A2SQ4EMZ.js";import"./K2XSYDAP.js";import{L as d,M as h,O as p,R as g,S as y,h as m,j as a}from"./AICPYLWE.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";export default $arcgis.t(([,{b:x}])=>{var $=m`:host{display:inline-flex;align-items:center}:host([scale="s"]){--arcgis-portal-item-type-font-size: var(--calcite-font-size--2);--arcgis-portal-item-type-spacing: 1rem}:host([scale="m"]){--arcgis-portal-item-type-font-size: var(--calcite-font-size--1);--arcgis-portal-item-type-spacing: 1rem}:host([scale="l"]){--arcgis-portal-item-type-font-size: var(--calcite-font-size-0);--arcgis-portal-item-type-spacing: 1rem}.icon{display:block;flex-grow:0;flex-shrink:0;width:var(--arcgis-portal-item-type-spacing);height:var(--arcgis-portal-item-type-spacing)}.text{color:var(--calcite-text-color-2);font-size:var(--arcgis-portal-item-type-font-size);line-height:1.25rem}.text--ellipsis{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.text--spaced{margin-inline-start:calc(var(--arcgis-portal-item-type-spacing) / 2);word-wrap:break-word;word-break:break-word}`,n=class extends d{constructor(){super(...arguments),this.messages=f({blocking:!0}),this.icon=null,this.displayName="",this.displayNameHosted="",this.scale="s"}static{this.properties={icon:16,displayName:16,displayNameHosted:16,item:0,serviceInfo:0,portal:0,user:0,scale:3,hideText:5,hideIcon:5,ellipsis:5,showHosted:5}}static{this.styles=$}async load(){this.item&&await this.getItemDisplayInformation()}async getItemDisplayInformation(){let{messages:o,user:r,serviceInfo:l,portal:e,item:t}=this,{displayName:i,displayNameHosted:c,icon:s}=await x({item:t,messages:o,serviceInfo:l,user:r,portal:e||t.portal});this.displayName=i,this.displayNameHosted=c,this.icon=s}render(){let{showHosted:o,displayNameHosted:r,scale:l,icon:e,hideText:t,hideIcon:i,ellipsis:c}=this;if(!e)return null;let s=o?r:this.displayName,v=s?.includes("(")?"":"&#x202D;",w=y(`./assets/portal-item-type/icons/${e}16.svg`),u=this.hideText?s:void 0;return a`${!i&&a`<span class="icon"><img src=${w??p} alt=${(u||"")??p} class=${`icon icon--${l}`}></span>`||""}${!t&&a`<span class=${h({text:!0,"text--spaced":!i,"text--ellipsis":c})} .innerHTML=${`${v}${s}`}></span>`||""}`}};g("arcgis-portal-item-type",n);return n},b,c)
2
+ import c from"./JYCYDBAG.js";import b from"./ZDMCDQRC.js";import"./K75JTQPW.js";import"./KV4ZZSNW.js";import"./EMJQI4MA.js";import{a as f}from"./FJ3I3AJE.js";import"./I6WGLIEC.js";import"./K2XSYDAP.js";import{L as d,M as h,O as p,R as g,S as y,h as m,j as a}from"./AICPYLWE.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";export default $arcgis.t(([,{b:x}])=>{var $=m`:host{display:inline-flex;align-items:center}:host([scale="s"]){--arcgis-portal-item-type-font-size: var(--calcite-font-size--2);--arcgis-portal-item-type-spacing: 1rem}:host([scale="m"]){--arcgis-portal-item-type-font-size: var(--calcite-font-size--1);--arcgis-portal-item-type-spacing: 1rem}:host([scale="l"]){--arcgis-portal-item-type-font-size: var(--calcite-font-size-0);--arcgis-portal-item-type-spacing: 1rem}.icon{display:block;flex-grow:0;flex-shrink:0;width:var(--arcgis-portal-item-type-spacing);height:var(--arcgis-portal-item-type-spacing)}.text{color:var(--calcite-text-color-2);font-size:var(--arcgis-portal-item-type-font-size);line-height:1.25rem}.text--ellipsis{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.text--spaced{margin-inline-start:calc(var(--arcgis-portal-item-type-spacing) / 2);word-wrap:break-word;word-break:break-word}`,n=class extends d{constructor(){super(...arguments),this.messages=f({blocking:!0}),this.icon=null,this.displayName="",this.displayNameHosted="",this.scale="s"}static{this.properties={icon:16,displayName:16,displayNameHosted:16,item:0,serviceInfo:0,portal:0,user:0,scale:3,hideText:5,hideIcon:5,ellipsis:5,showHosted:5}}static{this.styles=$}async load(){this.item&&await this.getItemDisplayInformation()}async getItemDisplayInformation(){let{messages:o,user:r,serviceInfo:l,portal:e,item:t}=this,{displayName:i,displayNameHosted:c,icon:s}=await x({item:t,messages:o,serviceInfo:l,user:r,portal:e||t.portal});this.displayName=i,this.displayNameHosted=c,this.icon=s}render(){let{showHosted:o,displayNameHosted:r,scale:l,icon:e,hideText:t,hideIcon:i,ellipsis:c}=this;if(!e)return null;let s=o?r:this.displayName,v=s?.includes("(")?"":"&#x202D;",w=y(`./assets/portal-item-type/icons/${e}16.svg`),u=this.hideText?s:void 0;return a`${!i&&a`<span class="icon"><img src=${w??p} alt=${(u||"")??p} class=${`icon icon--${l}`}></span>`||""}${!t&&a`<span class=${h({text:!0,"text--spaced":!i,"text--ellipsis":c})} .innerHTML=${`${v}${s}`}></span>`||""}`}};g("arcgis-portal-item-type",n);return n},b,c)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{a as r}from"./Z6R3C4AK.js";import{a as g}from"./7ZWYUHGK.js";import"./A2SQ4EMZ.js";import"./K2XSYDAP.js";import{J as a,K as o,L as l,R as n,j as c,w as i}from"./AICPYLWE.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";export default $arcgis.t(([{substitute:m}])=>{var s=class extends l{constructor(){super(...arguments),this.messages=g({blocking:!0,name:"portal-account-switcher"}),this.dialogRef=a(),this.signedInAccounts=[],this.arcgisSignOutSwitchAccount=i(),this.arcgisSignOutAll=i(),this.arcgisSignOutCloseDialog=i()}static{this.properties={portal:0,signedInAccounts:0}}static{this.styles=r}render(){let{messages:t,portal:e,signedInAccounts:u}=this,d=e.user?.username??"";return c`<calcite-dialog scale=m width=s open outside-close-disabled close-disabled modal kind=success .heading=${t.signedOut} heading-level=2 @calciteDialogClose=${()=>this.arcgisSignOutCloseDialog.emit()} ${o(this.dialogRef)}><calcite-notice kind=neutral open width=full><h3 slot=title class="notice-title" .innerHTML=${m(t.signedOutHeader,{username:d})??""}></h3><p slot=message class="account-description">${t.closeWindow}</p></calcite-notice><calcite-block .heading=${t.stillSignedIn} .description=${t.clickToSwitch} expanded heading-level=3><arcgis-portal-account-switcher-list .portal=${e} .linkedAccounts=${u} .actions=${["switch"]} interactive @arcgisAccountListSwitch=${h=>{this.arcgisSignOutSwitchAccount.emit(h.detail)}}></arcgis-portal-account-switcher-list></calcite-block><calcite-button slot=footer width=full @click=${()=>this.arcgisSignOutAll.emit()}>${t.signOutAll}</calcite-button></calcite-dialog>`}};n("arcgis-portal-account-switcher-signout",s);return s},"intl")
2
+ import{a as r}from"./Z6R3C4AK.js";import{a as g}from"./FJ3I3AJE.js";import"./I6WGLIEC.js";import"./K2XSYDAP.js";import{J as a,K as o,L as l,R as n,j as c,w as i}from"./AICPYLWE.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";export default $arcgis.t(([{substitute:m}])=>{var s=class extends l{constructor(){super(...arguments),this.messages=g({blocking:!0,name:"portal-account-switcher"}),this.dialogRef=a(),this.signedInAccounts=[],this.arcgisSignOutSwitchAccount=i(),this.arcgisSignOutAll=i(),this.arcgisSignOutCloseDialog=i()}static{this.properties={portal:0,signedInAccounts:0}}static{this.styles=r}render(){let{messages:t,portal:e,signedInAccounts:u}=this,d=e.user?.username??"";return c`<calcite-dialog scale=m width=s open outside-close-disabled close-disabled modal kind=success .heading=${t.signedOut} heading-level=2 @calciteDialogClose=${()=>this.arcgisSignOutCloseDialog.emit()} ${o(this.dialogRef)}><calcite-notice kind=neutral open width=full><h3 slot=title class="notice-title" .innerHTML=${m(t.signedOutHeader,{username:d})??""}></h3><p slot=message class="account-description">${t.closeWindow}</p></calcite-notice><calcite-block .heading=${t.stillSignedIn} .description=${t.clickToSwitch} expanded heading-level=3><arcgis-portal-account-switcher-list .portal=${e} .linkedAccounts=${u} .actions=${["switch"]} interactive @arcgisAccountListSwitch=${h=>{this.arcgisSignOutSwitchAccount.emit(h.detail)}}></arcgis-portal-account-switcher-list></calcite-block><calcite-button slot=footer width=full @click=${()=>this.arcgisSignOutAll.emit()}>${t.signOutAll}</calcite-button></calcite-dialog>`}};n("arcgis-portal-account-switcher-signout",s);return s},"intl")
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import c from"./3NSHGKZA.js";import b from"./RHCRPJWS.js";import a from"./5HZNBMW6.js";import"./7ZWYUHGK.js";import"./A2SQ4EMZ.js";import"./K2XSYDAP.js";import"./AICPYLWE.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";export default $arcgis.t(([,,a])=>{return a},a,b,c)
2
+ import c from"./7BHYNG4B.js";import b from"./RHCRPJWS.js";import a from"./5HZNBMW6.js";import"./FJ3I3AJE.js";import"./I6WGLIEC.js";import"./K2XSYDAP.js";import"./AICPYLWE.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";export default $arcgis.t(([,,a])=>{return a},a,b,c)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import h from"./Z3HGPBOR.js";import"./PNIFJ5DQ.js";import g from"./URQML7KV.js";import f from"./QROXYP6V.js";import"./4KTRAA2J.js";import d from"./JIJO4CAS.js";import"./PKA745KL.js";import"./JOUR2FB2.js";import"./4MUB6TL6.js";import"./VDXESPJK.js";import"./DAAON2UO.js";import c from"./RQYNPDN3.js";import b from"./ROX3GKKA.js";import"./TWCJJCPC.js";import"./AXOBMX3S.js";import a from"./PMRFXB4F.js";import"./K75JTQPW.js";import"./KV4ZZSNW.js";import"./EMJQI4MA.js";import"./7ZWYUHGK.js";import"./A2SQ4EMZ.js";import"./K2XSYDAP.js";import{R as e}from"./AICPYLWE.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";export default $arcgis.t(([,,,,,,r])=>{var t=class extends r{constructor(){super(...arguments),this.entityType="item",this.selected=null}static{this.properties={entityType:32,selected:0}}};e("arcgis-portal-item-picker",t);return t},a,b,c,d,f,g,h)
2
+ import h from"./U5V6FHGD.js";import"./PNIFJ5DQ.js";import g from"./I2BD4LLC.js";import f from"./AWRRQ7RJ.js";import"./4KTRAA2J.js";import d from"./4GW4GUU2.js";import"./PKA745KL.js";import"./JOUR2FB2.js";import"./4MUB6TL6.js";import"./VDXESPJK.js";import"./DAAON2UO.js";import c from"./RQYNPDN3.js";import b from"./ROX3GKKA.js";import"./TWCJJCPC.js";import"./AXOBMX3S.js";import a from"./PMRFXB4F.js";import"./K75JTQPW.js";import"./KV4ZZSNW.js";import"./EMJQI4MA.js";import"./FJ3I3AJE.js";import"./I6WGLIEC.js";import"./K2XSYDAP.js";import{R as e}from"./AICPYLWE.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";export default $arcgis.t(([,,,,,,r])=>{var t=class extends r{constructor(){super(...arguments),this.entityType="item",this.selected=null}static{this.properties={entityType:32,selected:0}}};e("arcgis-portal-item-picker",t);return t},a,b,c,d,f,g,h)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{c as w}from"./JOUR2FB2.js";import{a as k}from"./VDXESPJK.js";import{a as c}from"./TWCJJCPC.js";import d from"./PMRFXB4F.js";import{a as $}from"./K75JTQPW.js";import{a as b}from"./7ZWYUHGK.js";import{J as h,K as u,L as v,N as g,R as f,h as m,j as a,w as y}from"./AICPYLWE.js";export default $arcgis.t(([{b:T}])=>{var S=["esri_livingatlas","esri_boundaries","esri_demographics","esri_nav","esri_webstyles"];function I(o){return k(o.trim()).replace(/[!*+\-&|()[\]{}^~?:"\\]/gu,"\\$&")}async function _({portal:o,searchTerm:e,num:t=100,query:s}){let i=I(e),l=`${$(o)}portals/self/users/search`,r=[i?`(${i})`:void 0,s?.trim()?`(${s.trim()})`:void 0];o.isPortal&&r.push(...S.map(p=>`-username:${p}`));let n=l.includes("www.arcgis.com")&&o.isPortal?{disableIdentityLookup:!0,addTokenManually:!1}:{};return await T({url:l,portal:o,params:{num:Math.min(Math.max(t,1),100),q:r.filter(Boolean).join(" AND "),sortField:"relevance"},options:n})}function A(...o){return o.map(e=>e?.trim()).filter(e=>!!e).map(e=>`(${e})`).join(" AND ")}async function C(o,e,t,s={}){let i=Math.min(Math.max(s.num??10,1),100);if(e==="user")try{return{result:{entityType:e,result:await _({portal:o,searchTerm:t,num:i,query:s.query})}}}catch(n){return console.error(n),{error:{code:"unhandledError"}}}let l=w(t);if(!l)return{};let r={num:i,query:A(l,s.query)};try{return e==="group"?{result:{entityType:e,result:await o.queryGroups(r)}}:{result:{entityType:e,result:await o.queryItems(r)}}}catch(n){return console.error(n),{error:{code:"unhandledError"}}}}var P=m`:host{display:block;inline-size:100%}.entity-picker{display:flex;flex-direction:column;gap:.5rem;min-inline-size:16rem}.entity-picker__results{max-block-size:var(--arcgis-portal-entity-picker-results-max-block-size, 22rem);overflow-y:auto}.entity-picker__cards{display:flex;flex-direction:column;gap:.5rem}.entity-picker__status{color:var(--calcite-color-text-3);font-size:.875rem;margin:0;padding:.75rem}.entity-picker__selection{align-items:center;display:var(--arcgis-portal-entity-picker-selection-display, flex);gap:.5rem}.entity-picker__selection-label{flex:1;min-inline-size:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.entity-picker__input{inline-size:100%}`,d=class extends v{constructor(){super(...arguments),this._messages=b({blocking:!0,name:"portal-entity-picker"}),this.inputRef=h(),this.inputContainerRef=h(),this.resizeObserver=null,this.searchId=0,this.searchTerm="",this.isSearching=!1,this.searchFailed=!1,this.popoverOpen=!1,this.popoverWidth=0,this.entityType="group",this.mode="inline",this.selectionMode="single",this.selected=null,this.num=10,this.arcgisSelectionChange=y()}static{this.properties={searchTerm:16,isSearching:16,searchFailed:16,searchResult:16,popoverOpen:16,popoverWidth:16,portal:0,entityType:1,mode:1,selectionMode:1,selected:0,query:1,num:9,icon:1,messageOverrides:0}}static{this.styles=P}get searchLabel(){let{entityType:e,_messages:t}=this;return e==="group"?t.searchGroups:e==="item"?t.searchItems:t.searchUsers}get selectedLabel(){let{entityType:e,selected:t}=this;if(t?.entityType===e)return t.entityType==="user"?t.entity.fullName||t.entity.username:t.entity.title||t.entity.id||void 0}async togglePicker(e){this.mode==="popover"&&(this.popoverOpen=e,await this.updateComplete,await this.setFocus())}async setFocus(){await this.inputRef.value?.setFocus()}firstUpdated(){this.updatePopoverWidth(),!(typeof ResizeObserver>"u"||!this.inputContainerRef.value)&&(this.resizeObserver=new ResizeObserver(()=>this.updatePopoverWidth()),this.resizeObserver.observe(this.inputContainerRef.value))}willUpdate(e){(e.has("portal")||e.has("entityType")||e.has("query")||e.has("num"))&&this.resetSearch(),e.has("mode")&&this.mode==="inline"&&(this.popoverOpen=!1)}disconnectedCallback(){this.cancelPendingSearch(),this.resizeObserver?.disconnect(),this.resizeObserver=null,super.disconnectedCallback()}updatePopoverWidth(){requestAnimationFrame(()=>{this.popoverWidth=this.inputContainerRef.value?.offsetWidth??0})}cancelPendingSearch(){return this.debounceId!==void 0&&(window.clearTimeout(this.debounceId),this.debounceId=void 0),this.searchId+=1,this.searchId}resetSearch(){this.cancelPendingSearch(),this.searchTerm="",this.isSearching=!1,this.searchFailed=!1,this.searchResult=void 0,this.popoverOpen=!1}scheduleSearch(e){let t=e.trim(),s=this.cancelPendingSearch();if(this.searchFailed=!1,this.searchResult=void 0,!t){this.isSearching=!1,this.popoverOpen=!1;return}this.isSearching=!0,this.mode==="popover"&&(this.popoverOpen=!0),this.debounceId=window.setTimeout(()=>{this.debounceId=void 0,this.search(t,s)},400)}async search(e,t){let{entityType:s,num:i,portal:l,query:r}=this;try{let{error:n,result:p}=await C(l,s,e,{num:i,query:r});if(t!==this.searchId)return;this.searchFailed=!!n,this.searchResult=p}catch{if(t!==this.searchId)return;this.searchFailed=!0,this.searchResult=void 0}finally{t===this.searchId&&(this.isSearching=!1)}}emitSelection(e){this.arcgisSelectionChange.emit(e),this.mode==="popover"&&this.togglePicker(!1)}getFocusableResults(){let e=Array.from(this.renderRoot.querySelector('slot[name="list-start"]')?.assignedElements({flatten:!0})??[]).filter(s=>s instanceof HTMLElement&&(s.tagName==="CALCITE-LIST-ITEM"||s.tabIndex>=0)),t=Array.from(this.renderRoot.querySelectorAll("calcite-list-item, arcgis-portal-group-card, arcgis-portal-item-card"));return[...e,...t]}async focusResult(e){if(e.tagName==="CALCITE-LIST-ITEM"){await e.setFocus();return}if(e.tagName==="ARCGIS-PORTAL-GROUP-CARD"){await e.restoreFocus();return}if(e.tagName==="ARCGIS-PORTAL-ITEM-CARD"){await e.restoreFocus();return}e.focus()}async focusResultAt(e){let t=this.getFocusableResults();if(!t.length)return;let s=(e+t.length)%t.length;await this.focusResult(t[s])}handleResultsKeyDown(e){if(e.defaultPrevented)return;let t=this.getFocusableResults(),s=e.composedPath(),i=t.findIndex(r=>s.includes(r));if(i===-1)return;if(this.mode==="inline"&&(e.key==="ArrowDown"||e.key==="ArrowUp")){e.preventDefault(),this.focusResultAt(i+(e.key==="ArrowDown"?1:-1));return}let l=t[i];if(l.tagName==="ARCGIS-PORTAL-GROUP-CARD"&&(e.key==="Enter"||e.key===" ")){e.preventDefault();let{group:r}=l;this.emitSelection({entityType:"group",entity:r});return}if(l.tagName==="ARCGIS-PORTAL-ITEM-CARD"&&(e.key==="Enter"||e.key===" ")){e.preventDefault();let{item:r}=l;this.emitSelection({entityType:"item",entity:r})}}renderGroup(e){return c(e.id,a`<calcite-list-item .label=${e.title||e.id||""} .description=${[e.owner,e.access].filter(Boolean).join(" \xB7 ")} .selected=${this.selected?.entityType==="group"&&this.selected.entity.id===e.id} @calciteListItemSelect=${()=>this.emitSelection({entityType:"group",entity:e})}><calcite-avatar slot=content-start .fullName=${e.title??void 0} .thumbnail=${e.thumbnailUrl??void 0} scale=m></calcite-avatar></calcite-list-item>`)}renderInlineGroup(e){return c(e.id,a`<arcgis-portal-group-card .group=${e} .portal=${this.portal} .preview=${this.selectionMode==="none"?"top":void 0} .selected=${this.selected?.entityType==="group"&&this.selected.entity.id===e.id} .selection=${this.selectionMode} @arcgisGroupBrowserCardPreview=${()=>this.emitSelection({entityType:"group",entity:e})} @arcgisGroupCardSelect=${({detail:t})=>{t.selected&&this.emitSelection({entityType:"group",entity:t.group})}} .user=${this.portal.user??void 0} view=compact></arcgis-portal-group-card>`)}renderItem(e){return c(e.id,a`<calcite-list-item .label=${e.title||e.id||""} .description=${[e.type,e.owner].filter(Boolean).join(" \xB7 ")} .selected=${this.selected?.entityType==="item"&&this.selected.entity.id===e.id} @calciteListItemSelect=${()=>this.emitSelection({entityType:"item",entity:e})}><calcite-avatar slot=content-start .fullName=${e.title??void 0} .thumbnail=${e.thumbnailUrl??void 0} scale=m></calcite-avatar></calcite-list-item>`)}renderInlineItem(e){return c(e.id,a`<arcgis-portal-item-card .item=${e} .portal=${this.portal} .preview=${this.selectionMode==="none"?"top":void 0} .selected=${this.selected?.entityType==="item"&&this.selected.entity.id===e.id} .selection=${this.selectionMode} @arcgisItemBrowserCardPreview=${()=>this.emitSelection({entityType:"item",entity:e})} @arcgisItemCardSelect=${({detail:t})=>{t.selected&&this.emitSelection({entityType:"item",entity:t.item})}} .user=${this.portal.user??void 0} view=list></arcgis-portal-item-card>`)}renderUser(e){return c(e.username,a`<calcite-list-item .label=${e.fullName||e.username} .description=${e.username} .selected=${this.selected?.entityType==="user"&&this.selected.entity.username===e.username} @calciteListItemSelect=${()=>this.emitSelection({entityType:"user",entity:e})}><arcgis-portal-user-avatar slot=content-start .portal=${this.portal} .user=${e} scale=m></arcgis-portal-user-avatar></calcite-list-item>`)}renderSearchResults(){let{entityType:e,isSearching:t,searchFailed:s,searchResult:i,searchTerm:l,_messages:r}=this;if(!l.trim())return null;if(t)return a`<div role=status><calcite-loader .label=${r.searching} scale=s></calcite-loader></div>`;if(s)return a`<p class="entity-picker__status" role=alert>${r.searchFailed}</p>`;if(!(i?.result.results??[]).length){let n=e==="group"?r.noGroupsFound:e==="item"?r.noItemsFound:r.noUsersFound;return a`<p class="entity-picker__status" role=status>${n}</p>`}return this.mode==="inline"&&i?.entityType==="group"?a`<div class="entity-picker__cards"><slot name=list-start></slot>${i.result.results.map(n=>this.renderInlineGroup(n))}</div>`:this.mode==="inline"&&i?.entityType==="item"?a`<div class="entity-picker__cards"><slot name=list-start></slot>${i.result.results.map(n=>this.renderInlineItem(n))}</div>`:a`<calcite-list interaction-mode=interactive .label=${this.searchLabel} .selectionMode=${this.mode==="inline"&&this.selectionMode==="single"?"single-persist":"none"}><slot name=list-start></slot>${i?.entityType==="group"?i.result.results.map(n=>this.renderGroup(n)):i?.entityType==="item"?i.result.results.map(n=>this.renderItem(n)):i?.result.results.map(n=>this.renderUser(n))}</calcite-list>`}renderPicker(e=!0){return a`<div class="entity-picker">${this.selectedLabel&&a`<div class="entity-picker__selection"><span class="entity-picker__selection-label">${this.selectedLabel}</span><calcite-button appearance=transparent icon-start=x kind=neutral .label=${this._messages.clearSelection} @click=${()=>this.arcgisSelectionChange.emit(null)} scale=s></calcite-button></div>`||""}<div class="entity-picker__input" ${u(this.inputContainerRef)}><calcite-input .icon=${this.icon} .clearable=${this.mode==="inline"} .label=${this.searchLabel} .placeholder=${this.searchLabel} .value=${this.searchTerm} @click=${()=>{this.mode==="popover"&&this.searchTerm.trim()&&(this.popoverOpen=!0)}} @keydown=${t=>{(t.key==="ArrowDown"||t.key==="ArrowUp")&&this.searchResult?.result.results.length&&(t.preventDefault(),this.focusResultAt(t.key==="ArrowDown"?0:-1))}} @focus=${()=>{this.mode==="popover"&&this.searchTerm.trim()&&(this.popoverOpen=!0)}} @calciteInputInput=${t=>{this.searchTerm=t.target.value,this.scheduleSearch(this.searchTerm)}} ${u(this.inputRef)}></calcite-input></div>${e&&a`<div class="entity-picker__results" @keydown=${this.handleResultsKeyDown}>${this.renderSearchResults()}</div>`||""}</div>`}render(){return this.mode==="inline"?this.renderPicker():a`${this.renderPicker(!1)}<calcite-popover .label=${this.searchLabel} .open=${this.popoverOpen} placement=bottom-start .referenceElement=${this.inputContainerRef.value} trigger-disabled @calcitePopoverClose=${e=>{!e.target.open&&this.popoverOpen&&(this.popoverOpen=!1,requestAnimationFrame(()=>{this.setFocus()}))}}><div class="entity-picker__results" style=${g({inlineSize:this.popoverWidth?`${this.popoverWidth}px`:void 0})}>${this.renderSearchResults()}</div></calcite-popover>`}};f("arcgis-portal-entity-picker",d);return d},d)
2
+ import{c as w}from"./JOUR2FB2.js";import{a as k}from"./VDXESPJK.js";import{a as c}from"./TWCJJCPC.js";import d from"./PMRFXB4F.js";import{a as $}from"./K75JTQPW.js";import{a as b}from"./FJ3I3AJE.js";import{J as h,K as u,L as v,N as g,R as f,h as m,j as a,w as y}from"./AICPYLWE.js";export default $arcgis.t(([{b:T}])=>{var S=["esri_livingatlas","esri_boundaries","esri_demographics","esri_nav","esri_webstyles"];function I(o){return k(o.trim()).replace(/[!*+\-&|()[\]{}^~?:"\\]/gu,"\\$&")}async function _({portal:o,searchTerm:e,num:t=100,query:s}){let i=I(e),l=`${$(o)}portals/self/users/search`,r=[i?`(${i})`:void 0,s?.trim()?`(${s.trim()})`:void 0];o.isPortal&&r.push(...S.map(p=>`-username:${p}`));let n=l.includes("www.arcgis.com")&&o.isPortal?{disableIdentityLookup:!0,addTokenManually:!1}:{};return await T({url:l,portal:o,params:{num:Math.min(Math.max(t,1),100),q:r.filter(Boolean).join(" AND "),sortField:"relevance"},options:n})}function A(...o){return o.map(e=>e?.trim()).filter(e=>!!e).map(e=>`(${e})`).join(" AND ")}async function C(o,e,t,s={}){let i=Math.min(Math.max(s.num??10,1),100);if(e==="user")try{return{result:{entityType:e,result:await _({portal:o,searchTerm:t,num:i,query:s.query})}}}catch(n){return console.error(n),{error:{code:"unhandledError"}}}let l=w(t);if(!l)return{};let r={num:i,query:A(l,s.query)};try{return e==="group"?{result:{entityType:e,result:await o.queryGroups(r)}}:{result:{entityType:e,result:await o.queryItems(r)}}}catch(n){return console.error(n),{error:{code:"unhandledError"}}}}var P=m`:host{display:block;inline-size:100%}.entity-picker{display:flex;flex-direction:column;gap:.5rem;min-inline-size:16rem}.entity-picker__results{max-block-size:var(--arcgis-portal-entity-picker-results-max-block-size, 22rem);overflow-y:auto}.entity-picker__cards{display:flex;flex-direction:column;gap:.5rem}.entity-picker__status{color:var(--calcite-color-text-3);font-size:.875rem;margin:0;padding:.75rem}.entity-picker__selection{align-items:center;display:var(--arcgis-portal-entity-picker-selection-display, flex);gap:.5rem}.entity-picker__selection-label{flex:1;min-inline-size:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.entity-picker__input{inline-size:100%}`,d=class extends v{constructor(){super(...arguments),this._messages=b({blocking:!0,name:"portal-entity-picker"}),this.inputRef=h(),this.inputContainerRef=h(),this.resizeObserver=null,this.searchId=0,this.searchTerm="",this.isSearching=!1,this.searchFailed=!1,this.popoverOpen=!1,this.popoverWidth=0,this.entityType="group",this.mode="inline",this.selectionMode="single",this.selected=null,this.num=10,this.arcgisSelectionChange=y()}static{this.properties={searchTerm:16,isSearching:16,searchFailed:16,searchResult:16,popoverOpen:16,popoverWidth:16,portal:0,entityType:1,mode:1,selectionMode:1,selected:0,query:1,num:9,icon:1,messageOverrides:0}}static{this.styles=P}get searchLabel(){let{entityType:e,_messages:t}=this;return e==="group"?t.searchGroups:e==="item"?t.searchItems:t.searchUsers}get selectedLabel(){let{entityType:e,selected:t}=this;if(t?.entityType===e)return t.entityType==="user"?t.entity.fullName||t.entity.username:t.entity.title||t.entity.id||void 0}async togglePicker(e){this.mode==="popover"&&(this.popoverOpen=e,await this.updateComplete,await this.setFocus())}async setFocus(){await this.inputRef.value?.setFocus()}firstUpdated(){this.updatePopoverWidth(),!(typeof ResizeObserver>"u"||!this.inputContainerRef.value)&&(this.resizeObserver=new ResizeObserver(()=>this.updatePopoverWidth()),this.resizeObserver.observe(this.inputContainerRef.value))}willUpdate(e){(e.has("portal")||e.has("entityType")||e.has("query")||e.has("num"))&&this.resetSearch(),e.has("mode")&&this.mode==="inline"&&(this.popoverOpen=!1)}disconnectedCallback(){this.cancelPendingSearch(),this.resizeObserver?.disconnect(),this.resizeObserver=null,super.disconnectedCallback()}updatePopoverWidth(){requestAnimationFrame(()=>{this.popoverWidth=this.inputContainerRef.value?.offsetWidth??0})}cancelPendingSearch(){return this.debounceId!==void 0&&(window.clearTimeout(this.debounceId),this.debounceId=void 0),this.searchId+=1,this.searchId}resetSearch(){this.cancelPendingSearch(),this.searchTerm="",this.isSearching=!1,this.searchFailed=!1,this.searchResult=void 0,this.popoverOpen=!1}scheduleSearch(e){let t=e.trim(),s=this.cancelPendingSearch();if(this.searchFailed=!1,this.searchResult=void 0,!t){this.isSearching=!1,this.popoverOpen=!1;return}this.isSearching=!0,this.mode==="popover"&&(this.popoverOpen=!0),this.debounceId=window.setTimeout(()=>{this.debounceId=void 0,this.search(t,s)},400)}async search(e,t){let{entityType:s,num:i,portal:l,query:r}=this;try{let{error:n,result:p}=await C(l,s,e,{num:i,query:r});if(t!==this.searchId)return;this.searchFailed=!!n,this.searchResult=p}catch{if(t!==this.searchId)return;this.searchFailed=!0,this.searchResult=void 0}finally{t===this.searchId&&(this.isSearching=!1)}}emitSelection(e){this.arcgisSelectionChange.emit(e),this.mode==="popover"&&this.togglePicker(!1)}getFocusableResults(){let e=Array.from(this.renderRoot.querySelector('slot[name="list-start"]')?.assignedElements({flatten:!0})??[]).filter(s=>s instanceof HTMLElement&&(s.tagName==="CALCITE-LIST-ITEM"||s.tabIndex>=0)),t=Array.from(this.renderRoot.querySelectorAll("calcite-list-item, arcgis-portal-group-card, arcgis-portal-item-card"));return[...e,...t]}async focusResult(e){if(e.tagName==="CALCITE-LIST-ITEM"){await e.setFocus();return}if(e.tagName==="ARCGIS-PORTAL-GROUP-CARD"){await e.restoreFocus();return}if(e.tagName==="ARCGIS-PORTAL-ITEM-CARD"){await e.restoreFocus();return}e.focus()}async focusResultAt(e){let t=this.getFocusableResults();if(!t.length)return;let s=(e+t.length)%t.length;await this.focusResult(t[s])}handleResultsKeyDown(e){if(e.defaultPrevented)return;let t=this.getFocusableResults(),s=e.composedPath(),i=t.findIndex(r=>s.includes(r));if(i===-1)return;if(this.mode==="inline"&&(e.key==="ArrowDown"||e.key==="ArrowUp")){e.preventDefault(),this.focusResultAt(i+(e.key==="ArrowDown"?1:-1));return}let l=t[i];if(l.tagName==="ARCGIS-PORTAL-GROUP-CARD"&&(e.key==="Enter"||e.key===" ")){e.preventDefault();let{group:r}=l;this.emitSelection({entityType:"group",entity:r});return}if(l.tagName==="ARCGIS-PORTAL-ITEM-CARD"&&(e.key==="Enter"||e.key===" ")){e.preventDefault();let{item:r}=l;this.emitSelection({entityType:"item",entity:r})}}renderGroup(e){return c(e.id,a`<calcite-list-item .label=${e.title||e.id||""} .description=${[e.owner,e.access].filter(Boolean).join(" \xB7 ")} .selected=${this.selected?.entityType==="group"&&this.selected.entity.id===e.id} @calciteListItemSelect=${()=>this.emitSelection({entityType:"group",entity:e})}><calcite-avatar slot=content-start .fullName=${e.title??void 0} .thumbnail=${e.thumbnailUrl??void 0} scale=m></calcite-avatar></calcite-list-item>`)}renderInlineGroup(e){return c(e.id,a`<arcgis-portal-group-card .group=${e} .portal=${this.portal} .preview=${this.selectionMode==="none"?"top":void 0} .selected=${this.selected?.entityType==="group"&&this.selected.entity.id===e.id} .selection=${this.selectionMode} @arcgisGroupBrowserCardPreview=${()=>this.emitSelection({entityType:"group",entity:e})} @arcgisGroupCardSelect=${({detail:t})=>{t.selected&&this.emitSelection({entityType:"group",entity:t.group})}} .user=${this.portal.user??void 0} view=compact></arcgis-portal-group-card>`)}renderItem(e){return c(e.id,a`<calcite-list-item .label=${e.title||e.id||""} .description=${[e.type,e.owner].filter(Boolean).join(" \xB7 ")} .selected=${this.selected?.entityType==="item"&&this.selected.entity.id===e.id} @calciteListItemSelect=${()=>this.emitSelection({entityType:"item",entity:e})}><calcite-avatar slot=content-start .fullName=${e.title??void 0} .thumbnail=${e.thumbnailUrl??void 0} scale=m></calcite-avatar></calcite-list-item>`)}renderInlineItem(e){return c(e.id,a`<arcgis-portal-item-card .item=${e} .portal=${this.portal} .preview=${this.selectionMode==="none"?"top":void 0} .selected=${this.selected?.entityType==="item"&&this.selected.entity.id===e.id} .selection=${this.selectionMode} @arcgisItemBrowserCardPreview=${()=>this.emitSelection({entityType:"item",entity:e})} @arcgisItemCardSelect=${({detail:t})=>{t.selected&&this.emitSelection({entityType:"item",entity:t.item})}} .user=${this.portal.user??void 0} view=list></arcgis-portal-item-card>`)}renderUser(e){return c(e.username,a`<calcite-list-item .label=${e.fullName||e.username} .description=${e.username} .selected=${this.selected?.entityType==="user"&&this.selected.entity.username===e.username} @calciteListItemSelect=${()=>this.emitSelection({entityType:"user",entity:e})}><arcgis-portal-user-avatar slot=content-start .portal=${this.portal} .user=${e} scale=m></arcgis-portal-user-avatar></calcite-list-item>`)}renderSearchResults(){let{entityType:e,isSearching:t,searchFailed:s,searchResult:i,searchTerm:l,_messages:r}=this;if(!l.trim())return null;if(t)return a`<div role=status><calcite-loader .label=${r.searching} scale=s></calcite-loader></div>`;if(s)return a`<p class="entity-picker__status" role=alert>${r.searchFailed}</p>`;if(!(i?.result.results??[]).length){let n=e==="group"?r.noGroupsFound:e==="item"?r.noItemsFound:r.noUsersFound;return a`<p class="entity-picker__status" role=status>${n}</p>`}return this.mode==="inline"&&i?.entityType==="group"?a`<div class="entity-picker__cards"><slot name=list-start></slot>${i.result.results.map(n=>this.renderInlineGroup(n))}</div>`:this.mode==="inline"&&i?.entityType==="item"?a`<div class="entity-picker__cards"><slot name=list-start></slot>${i.result.results.map(n=>this.renderInlineItem(n))}</div>`:a`<calcite-list interaction-mode=interactive .label=${this.searchLabel} .selectionMode=${this.mode==="inline"&&this.selectionMode==="single"?"single-persist":"none"}><slot name=list-start></slot>${i?.entityType==="group"?i.result.results.map(n=>this.renderGroup(n)):i?.entityType==="item"?i.result.results.map(n=>this.renderItem(n)):i?.result.results.map(n=>this.renderUser(n))}</calcite-list>`}renderPicker(e=!0){return a`<div class="entity-picker">${this.selectedLabel&&a`<div class="entity-picker__selection"><span class="entity-picker__selection-label">${this.selectedLabel}</span><calcite-button appearance=transparent icon-start=x kind=neutral .label=${this._messages.clearSelection} @click=${()=>this.arcgisSelectionChange.emit(null)} scale=s></calcite-button></div>`||""}<div class="entity-picker__input" ${u(this.inputContainerRef)}><calcite-input .icon=${this.icon} .clearable=${this.mode==="inline"} .label=${this.searchLabel} .placeholder=${this.searchLabel} .value=${this.searchTerm} @click=${()=>{this.mode==="popover"&&this.searchTerm.trim()&&(this.popoverOpen=!0)}} @keydown=${t=>{(t.key==="ArrowDown"||t.key==="ArrowUp")&&this.searchResult?.result.results.length&&(t.preventDefault(),this.focusResultAt(t.key==="ArrowDown"?0:-1))}} @focus=${()=>{this.mode==="popover"&&this.searchTerm.trim()&&(this.popoverOpen=!0)}} @calciteInputInput=${t=>{this.searchTerm=t.target.value,this.scheduleSearch(this.searchTerm)}} ${u(this.inputRef)}></calcite-input></div>${e&&a`<div class="entity-picker__results" @keydown=${this.handleResultsKeyDown}>${this.renderSearchResults()}</div>`||""}</div>`}render(){return this.mode==="inline"?this.renderPicker():a`${this.renderPicker(!1)}<calcite-popover .label=${this.searchLabel} .open=${this.popoverOpen} placement=bottom-start .referenceElement=${this.inputContainerRef.value} trigger-disabled @calcitePopoverClose=${e=>{!e.target.open&&this.popoverOpen&&(this.popoverOpen=!1,requestAnimationFrame(()=>{this.setFocus()}))}}><div class="entity-picker__results" style=${g({inlineSize:this.popoverWidth?`${this.popoverWidth}px`:void 0})}>${this.renderSearchResults()}</div></calcite-popover>`}};f("arcgis-portal-entity-picker",d);return d},d)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import a from"./26PILQCA.js";import{c as u}from"./KV4ZZSNW.js";import{a as g}from"./7ZWYUHGK.js";import{L as h,R as p,h as m,j as c}from"./AICPYLWE.js";export default $arcgis.t(([{substitute:k},{a:d,b:f}])=>{var w=m`:host{display:block}calcite-notice{margin-top:.75rem}calcite-list{margin-block:.75rem}`;function b(o,s,t,e){let i=["id","ja","ko","th","vi","zh-cn","zh-hk","zh-tw"],n=["en","ca","da","de","el","es","et","fi","hi","hu","it","nb","nl","pt-pt","sv","tr"],l=o??"en",r=s.unknown;return(t===1||i.includes(l))&&(r=s.single),t!==1&&n.includes(l)&&(r=s.multiple),k(r,{...e,number:t})}var a=class extends h{constructor(){super(...arguments),this.messages=g({blocking:!0}),this.items=[],this.user=null}static{this.properties={items:0,portal:0,user:0}}static{this.styles=[w,d]}render(){let s=this.items.filter(({usedByItems:t})=>t.length>0);return s.length?c`<calcite-notice open icon kind=warning class="notice"><span slot=message>${b(this.messages._lang,this.messages.notice,0,{affectedCount:this.items.length,totalCount:this.items.reduce((t,{usedByItems:e})=>t+e.length,0)})}</span></calcite-notice><calcite-list .label=${this.messages.reviewItemsList}>${s.map(({item:t,usedByItems:e})=>f({item:t,portal:this.portal,user:this.user,lang:this.messages._lang,relatedItemsCount:e.length,relatedItemsCountTitle:this.messages.usedBy.replace("{count}",String(e.length)),onRelatedItemsClick:()=>{let i=new URL(`${u({portal:this.portal})}/search.html`);i.searchParams.set("searchTerm",e.map(({id:n})=>`id: ${n}`).join(" OR ")),window.open(i.toString(),"_blank","noopener,noreferrer")},showAccessInfo:!1}))}</calcite-list>`:null}};p("arcgis-portal-delete-items-review",a);return{a:b,b:a}},"intl",a)
2
+ import a from"./J3TKEUDM.js";import{c as u}from"./KV4ZZSNW.js";import{a as g}from"./FJ3I3AJE.js";import{L as h,R as p,h as m,j as c}from"./AICPYLWE.js";export default $arcgis.t(([{substitute:k},{a:d,b:f}])=>{var w=m`:host{display:block}calcite-notice{margin-top:.75rem}calcite-list{margin-block:.75rem}`;function b(o,s,t,e){let i=["id","ja","ko","th","vi","zh-cn","zh-hk","zh-tw"],n=["en","ca","da","de","el","es","et","fi","hi","hu","it","nb","nl","pt-pt","sv","tr"],l=o??"en",r=s.unknown;return(t===1||i.includes(l))&&(r=s.single),t!==1&&n.includes(l)&&(r=s.multiple),k(r,{...e,number:t})}var a=class extends h{constructor(){super(...arguments),this.messages=g({blocking:!0}),this.items=[],this.user=null}static{this.properties={items:0,portal:0,user:0}}static{this.styles=[w,d]}render(){let s=this.items.filter(({usedByItems:t})=>t.length>0);return s.length?c`<calcite-notice open icon kind=warning class="notice"><span slot=message>${b(this.messages._lang,this.messages.notice,0,{affectedCount:this.items.length,totalCount:this.items.reduce((t,{usedByItems:e})=>t+e.length,0)})}</span></calcite-notice><calcite-list .label=${this.messages.reviewItemsList}>${s.map(({item:t,usedByItems:e})=>f({item:t,portal:this.portal,user:this.user,lang:this.messages._lang,relatedItemsCount:e.length,relatedItemsCountTitle:this.messages.usedBy.replace("{count}",String(e.length)),onRelatedItemsClick:()=>{let i=new URL(`${u({portal:this.portal})}/search.html`);i.searchParams.set("searchTerm",e.map(({id:n})=>`id: ${n}`).join(" OR ")),window.open(i.toString(),"_blank","noopener,noreferrer")},showAccessInfo:!1}))}</calcite-list>`:null}};p("arcgis-portal-delete-items-review",a);return{a:b,b:a}},"intl",a)