@arcgis/coding-components 4.33.0-next.94 → 4.33.0-next.96

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 (124) hide show
  1. package/dist/arcgis-coding-components/{EP2YUSNH.js → 3MYLOOCD.js} +2 -2
  2. package/dist/arcgis-coding-components/{IZR6CPOM.js → 4SCRYS5U.js} +2 -2
  3. package/dist/arcgis-coding-components/{ZUZCOEYS.js → 53KDHA4B.js} +2 -2
  4. package/dist/arcgis-coding-components/{CZ76XOMS.js → 5IC57CTN.js} +2 -2
  5. package/dist/arcgis-coding-components/{ZBFJT24O.js → 6ND5QZ7I.js} +2 -2
  6. package/dist/arcgis-coding-components/{SYOOXRWH.js → 7CRQCXXJ.js} +2 -2
  7. package/dist/arcgis-coding-components/{6Q43GJXJ.js.LEGAL.txt → 7CRQCXXJ.js.LEGAL.txt} +1 -1
  8. package/dist/arcgis-coding-components/{QY7PG52Y.js → CWCIUUNN.js} +2 -2
  9. package/dist/arcgis-coding-components/{ARKJVFIT.js.LEGAL.txt → CWCIUUNN.js.LEGAL.txt} +1 -1
  10. package/dist/arcgis-coding-components/{TBUHAI37.js → DM7H3X2U.js} +2 -2
  11. package/dist/arcgis-coding-components/{C6GPTPY4.js → DQVHKB4U.js} +1 -1
  12. package/dist/arcgis-coding-components/{C6GPTPY4.js.LEGAL.txt → DQVHKB4U.js.LEGAL.txt} +1 -1
  13. package/dist/arcgis-coding-components/F3HLFRKQ.js +4 -0
  14. package/dist/arcgis-coding-components/G26TZKTT.js +4 -0
  15. package/dist/arcgis-coding-components/{T63CAV7V.js.LEGAL.txt → G26TZKTT.js.LEGAL.txt} +1 -1
  16. package/dist/arcgis-coding-components/{OXUVXK47.js → GII7XRBS.js} +2 -2
  17. package/dist/arcgis-coding-components/{6W27X4A5.js → ITKOCXUH.js} +2 -2
  18. package/dist/arcgis-coding-components/{PY4OG5MY.js → IZAMYKBT.js} +2 -2
  19. package/dist/arcgis-coding-components/{CFP7ORLC.js.LEGAL.txt → IZAMYKBT.js.LEGAL.txt} +1 -1
  20. package/dist/arcgis-coding-components/{A7MICUG4.js → IZWZ42I2.js} +2 -2
  21. package/dist/arcgis-coding-components/{NRPCKA2V.js → JGWARU5C.js} +2 -2
  22. package/dist/arcgis-coding-components/{B45X2RCU.js → K266OADM.js} +1 -1
  23. package/dist/arcgis-coding-components/MO2KUK6E.js +4 -0
  24. package/dist/arcgis-coding-components/MO2KUK6E.js.LEGAL.txt +3 -0
  25. package/dist/arcgis-coding-components/NBPE4QWT.js +6 -0
  26. package/dist/arcgis-coding-components/{LBDYBLQS.js.LEGAL.txt → NBPE4QWT.js.LEGAL.txt} +1 -1
  27. package/dist/arcgis-coding-components/{FUIHPHGW.js → NVCX3HBG.js} +2 -2
  28. package/dist/arcgis-coding-components/NVCX3HBG.js.LEGAL.txt +3 -0
  29. package/dist/arcgis-coding-components/PLU4WNW5.js +4 -0
  30. package/dist/arcgis-coding-components/PLU4WNW5.js.LEGAL.txt +3 -0
  31. package/dist/arcgis-coding-components/QJJ6FX2R.js +4 -0
  32. package/dist/arcgis-coding-components/QJJ6FX2R.js.LEGAL.txt +3 -0
  33. package/dist/arcgis-coding-components/{6Q43GJXJ.js → QMQVERYO.js} +2 -2
  34. package/dist/arcgis-coding-components/QMQVERYO.js.LEGAL.txt +3 -0
  35. package/dist/arcgis-coding-components/{JWU3LRFA.js → QRA2ZFNA.js} +2 -2
  36. package/dist/arcgis-coding-components/QRA2ZFNA.js.LEGAL.txt +3 -0
  37. package/dist/arcgis-coding-components/{KW7UAGYK.js → RIHTBYCN.js} +3 -3
  38. package/dist/arcgis-coding-components/{KW7UAGYK.js.LEGAL.txt → RIHTBYCN.js.LEGAL.txt} +1 -1
  39. package/dist/arcgis-coding-components/SOSZMCTW.js +4 -0
  40. package/dist/arcgis-coding-components/SOSZMCTW.js.LEGAL.txt +3 -0
  41. package/dist/arcgis-coding-components/TZFVQ7YP.js +4 -0
  42. package/dist/arcgis-coding-components/TZFVQ7YP.js.LEGAL.txt +3 -0
  43. package/dist/arcgis-coding-components/{KYFKKTKR.js → UA5DHEVG.js} +3 -3
  44. package/dist/arcgis-coding-components/UA5DHEVG.js.LEGAL.txt +3 -0
  45. package/dist/arcgis-coding-components/{2UOMUDCU.js → UXZZFJS5.js} +1 -1
  46. package/dist/arcgis-coding-components/{5BIHMNUZ.js → V6KMD3G6.js} +1 -1
  47. package/dist/arcgis-coding-components/{4L75MIPA.js → W3NDSK7A.js} +2 -2
  48. package/dist/arcgis-coding-components/W45F5XYO.js +4 -0
  49. package/dist/arcgis-coding-components/W45F5XYO.js.LEGAL.txt +0 -0
  50. package/dist/arcgis-coding-components/WXBTIG3X.js +4 -0
  51. package/dist/arcgis-coding-components/WXBTIG3X.js.LEGAL.txt +3 -0
  52. package/dist/arcgis-coding-components/{N3T3NW5N.js → XT2MXE54.js} +2 -2
  53. package/dist/arcgis-coding-components/XT2MXE54.js.LEGAL.txt +3 -0
  54. package/dist/arcgis-coding-components/{IDCJQ76C.js → Y4G7MJ7L.js} +2 -2
  55. package/dist/arcgis-coding-components/YVNOL6OA.js +4 -0
  56. package/dist/arcgis-coding-components/YVNOL6OA.js.LEGAL.txt +3 -0
  57. package/dist/arcgis-coding-components/arcgis-coding-components.esm.js +2 -2
  58. package/dist/arcgis-coding-components/arcgis-coding-components.esm.js.LEGAL.txt +1 -1
  59. package/dist/arcgis-coding-components/assets/code-editor/sql-expr.worker.js +32 -32
  60. package/dist/chunks/arcade-defaults.js +1 -1
  61. package/dist/chunks/arcade-executor.js +1 -1
  62. package/dist/chunks/arcade-mode.js +1 -1
  63. package/dist/chunks/arcade-service-accessors.js +1 -1
  64. package/dist/chunks/fields.js +1 -1
  65. package/dist/chunks/language-defaults-base.js +1 -1
  66. package/dist/chunks/markdown.js +1 -1
  67. package/dist/chunks/monaco-importer.js +1 -1
  68. package/dist/chunks/runtime.js +1 -1
  69. package/dist/chunks/sql-expr-defaults.js +1 -1
  70. package/dist/chunks/sql-expr-mode.js +1 -1
  71. package/dist/chunks/useT9n.js +2 -2
  72. package/dist/components/arcgis-arcade-editor/customElement.js +1 -1
  73. package/dist/components/arcgis-arcade-results/customElement.js +64 -72
  74. package/dist/components/arcgis-arcade-suggestions/customElement.js +1 -1
  75. package/dist/components/arcgis-code-editor/customElement.js +2 -2
  76. package/dist/components/arcgis-editor-variables/customElement.js +2 -2
  77. package/dist/components/arcgis-language-api-panel/customElement.js +1 -1
  78. package/dist/components/arcgis-sql-expression-editor/customElement.js +1 -1
  79. package/dist/components/arcgis-sql-expression-fields/customElement.js +1 -1
  80. package/dist/controllers/useT9n.d.ts +1 -1
  81. package/dist/docs/api.json +2 -2
  82. package/dist/docs/docs.json +2 -2
  83. package/dist/docs/web-types.json +1 -1
  84. package/dist/index.js +1 -1
  85. package/dist/loader.js +1 -1
  86. package/package.json +6 -7
  87. package/dist/arcgis-coding-components/ARKJVFIT.js +0 -4
  88. package/dist/arcgis-coding-components/CFP7ORLC.js +0 -4
  89. package/dist/arcgis-coding-components/D7BXQG4L.js +0 -4
  90. package/dist/arcgis-coding-components/D7BXQG4L.js.LEGAL.txt +0 -3
  91. package/dist/arcgis-coding-components/EURLPKDS.js +0 -4
  92. package/dist/arcgis-coding-components/EURLPKDS.js.LEGAL.txt +0 -3
  93. package/dist/arcgis-coding-components/FUIHPHGW.js.LEGAL.txt +0 -3
  94. package/dist/arcgis-coding-components/HDCM3LC5.js +0 -4
  95. package/dist/arcgis-coding-components/HDCM3LC5.js.LEGAL.txt +0 -3
  96. package/dist/arcgis-coding-components/I65OQ4H6.js +0 -4
  97. package/dist/arcgis-coding-components/I65OQ4H6.js.LEGAL.txt +0 -3
  98. package/dist/arcgis-coding-components/JWU3LRFA.js.LEGAL.txt +0 -3
  99. package/dist/arcgis-coding-components/KYFKKTKR.js.LEGAL.txt +0 -3
  100. package/dist/arcgis-coding-components/LBDYBLQS.js +0 -6
  101. package/dist/arcgis-coding-components/N3T3NW5N.js.LEGAL.txt +0 -3
  102. package/dist/arcgis-coding-components/P2YKRZDD.js +0 -4
  103. package/dist/arcgis-coding-components/PATWPXZE.js +0 -4
  104. package/dist/arcgis-coding-components/PATWPXZE.js.LEGAL.txt +0 -3
  105. package/dist/arcgis-coding-components/PY4OG5MY.js.LEGAL.txt +0 -3
  106. package/dist/arcgis-coding-components/QY7PG52Y.js.LEGAL.txt +0 -3
  107. package/dist/arcgis-coding-components/SYOOXRWH.js.LEGAL.txt +0 -3
  108. package/dist/arcgis-coding-components/T63CAV7V.js +0 -4
  109. /package/dist/arcgis-coding-components/{EP2YUSNH.js.LEGAL.txt → 3MYLOOCD.js.LEGAL.txt} +0 -0
  110. /package/dist/arcgis-coding-components/{IZR6CPOM.js.LEGAL.txt → 4SCRYS5U.js.LEGAL.txt} +0 -0
  111. /package/dist/arcgis-coding-components/{ZUZCOEYS.js.LEGAL.txt → 53KDHA4B.js.LEGAL.txt} +0 -0
  112. /package/dist/arcgis-coding-components/{CZ76XOMS.js.LEGAL.txt → 5IC57CTN.js.LEGAL.txt} +0 -0
  113. /package/dist/arcgis-coding-components/{ZBFJT24O.js.LEGAL.txt → 6ND5QZ7I.js.LEGAL.txt} +0 -0
  114. /package/dist/arcgis-coding-components/{TBUHAI37.js.LEGAL.txt → DM7H3X2U.js.LEGAL.txt} +0 -0
  115. /package/dist/arcgis-coding-components/{2UOMUDCU.js.LEGAL.txt → F3HLFRKQ.js.LEGAL.txt} +0 -0
  116. /package/dist/arcgis-coding-components/{OXUVXK47.js.LEGAL.txt → GII7XRBS.js.LEGAL.txt} +0 -0
  117. /package/dist/arcgis-coding-components/{5BIHMNUZ.js.LEGAL.txt → ITKOCXUH.js.LEGAL.txt} +0 -0
  118. /package/dist/arcgis-coding-components/{A7MICUG4.js.LEGAL.txt → IZWZ42I2.js.LEGAL.txt} +0 -0
  119. /package/dist/arcgis-coding-components/{NRPCKA2V.js.LEGAL.txt → JGWARU5C.js.LEGAL.txt} +0 -0
  120. /package/dist/arcgis-coding-components/{6W27X4A5.js.LEGAL.txt → K266OADM.js.LEGAL.txt} +0 -0
  121. /package/dist/arcgis-coding-components/{B45X2RCU.js.LEGAL.txt → UXZZFJS5.js.LEGAL.txt} +0 -0
  122. /package/dist/arcgis-coding-components/{P2YKRZDD.js.LEGAL.txt → V6KMD3G6.js.LEGAL.txt} +0 -0
  123. /package/dist/arcgis-coding-components/{4L75MIPA.js.LEGAL.txt → W3NDSK7A.js.LEGAL.txt} +0 -0
  124. /package/dist/arcgis-coding-components/{IDCJQ76C.js.LEGAL.txt → Y4G7MJ7L.js.LEGAL.txt} +0 -0
@@ -1,4 +0,0 @@
1
- /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
- See https://js.arcgis.com/4.33/esri/copyright.txt for details.
3
- v4.33.0-next.94 */
4
- import{b as f}from"./IZR6CPOM.js";import{a as u}from"./I65OQ4H6.js";import{c as d,f as i,r as a,s as h,w as m}from"./LBDYBLQS.js";import{e as c,o as n}from"./5BIHMNUZ.js";import"./B45X2RCU.js";var g=d`:host{background-color:var(--calcite-color-foreground-1);.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}.sticky{position:sticky;top:0;z-index:10}calcite-flow{height:100%}calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}}`;function b(l){l.key==="Enter"&&l.stopPropagation()}var o=class extends h{constructor(){super(...arguments),this._beforeBack=async()=>{this.removeLastPanelRenderer(),this._filterValue=""},this.messages=u(),this._filterValue="",this._flowItemRenderers=[],this._mode="profile",this._mutationCounter=1,this.loading=!1,this.arcgisClose=a({bubbles:!1}),this.arcgisItemSelected=a({bubbles:!1})}static{this.properties={_filterValue:16,_flowItemRenderers:16,_mode:16,_mutationCounter:16,loading:5,modelId:1,variable:0}}static{this.styles=g}load(){this._variableChanged()}willUpdate(e){e.has("modelId")&&(this._flowItemRenderers=[]),e.has("variable")&&this._variableChanged()}disconnectedCallback(){super.disconnectedCallback(),this._flowObserver?.disconnect()}_variableChanged(){this._mode=this.variable?.type==="featureSet"?"featureSet":"profile"}addPanelRenderer(e){this._flowItemRenderers=[...this._flowItemRenderers,e]}removeLastPanelRenderer(){this._flowItemRenderers=this._flowItemRenderers.slice(0,-1)}_isMode(e){return this._mode===e}flowFocusHandler(e){if(!e){this._flowObserver?.disconnect(),this._flowObserver=void 0;return}this._flowObserver||(this._flowObserver=new MutationObserver(()=>{c(e.querySelector("calcite-flow-item:last-child"),"calcite-input")}),this._flowObserver.observe(e,{attributes:!0,attributeFilter:["id"],childList:!0}))}_updateFilterValue(e){this._filterValue=e.currentTarget.value}_emitClose(){this.arcgisClose.emit()}_backToTop(){this._flowItemRenderers=[]}_emitItemSelected(e,t){if(t.nonInteractive)return;let s=e;(!s.key||s.key==="Enter")&&(e.preventDefault(),this.arcgisItemSelected.emit(t.snippet))}_showCollectionPanel(e,t){e.stopPropagation(),this.addPanelRenderer(s=>this.renderCollectionBasedVariable(t,!1,s))}_getHeadingForCollection(e){if(!e)return"";switch(this._mode){case"profile":return this.messages.profilevariables??"";case"featureSet":return this.messages.fields??""}}_getDescriptionForCollection(e){if(!e)return"";switch(this._mode){case"profile":return e.breadcrumb;case"featureSet":return e.variables[0]?.getLabel()??""}}renderCollectionBasedVariable(e,t=!1,s=!1){if(!e)return null;let r=this.loading;return!r&&!e.loaded&&(e.loadSource().then(()=>setTimeout(()=>{this._mutationCounter+=1})).catch(()=>{console.error("Error loading collection"),r=!1}),r=!0),i`<calcite-flow-item .heading=${this._getHeadingForCollection(e)} .description=${this._getDescriptionForCollection(e)} .beforeBack=${this._beforeBack} closable @calciteFlowItemClose=${this._emitClose} .selected=${s}><calcite-action slot=header-actions-end .text=${this.messages.backtotop??""} scale=m .hidden=${t||this._isMode("featureSet")} icon=chevrons-left icon-flip-rtl @click=${this._backToTop}></calcite-action><calcite-input .value=${this._filterValue} icon=magnifying-glass clearable @calciteInputInput=${this._updateFilterValue} class="sticky" scale=m></calcite-input>${r?i`<calcite-loader scale=s type=indeterminate .label=${this.messages.loading??""}></calcite-loader>`:i`<calcite-list label=variables>${this.renderEditorVariables(e)}</calcite-list>`}</calcite-flow-item>`}renderEditorVariables(e){let t=n(this._filterValue),s=e.variables.filter(r=>r.passFilter(t));return s.length?s.map(r=>this.renderEditorVariable(r)):i`<div class="notice-container">${this.messages.noitems}</div>`}renderEditorVariable(e){switch(e.type){case"group":return this._isMode("featureSet")&&e.isHeader?i`<calcite-list-item-group .heading=${e.getLabel()}></calcite-list-item-group>`:this._isMode("featureSet")&&e._label?.code==="fields"?this.renderEditorVariables(e):i`<calcite-list-item-group .heading=${e.getLabel()}>${this.renderEditorVariables(e)}</calcite-list-item-group>`;default:return i`<calcite-list-item .label=${e.getLabel()} .description=${e.getDescription()} @calciteListItemSelect=${t=>this._emitItemSelected(t,e)} @keydown=${t=>this._emitItemSelected(t,e)}>${e.isCollection?i`<calcite-action slot=actions-end .text=${this.messages.expand??""} scale=s icon=chevron-right icon-flip-rtl @click=${t=>this._showCollectionPanel(t,e)} @keydown=${b}></calcite-action>`:null}${e.icon?i`<calcite-icon .icon=${e.icon} scale=s slot=content-start></calcite-icon>`:null}</calcite-list-item>`}}render(){return!this.loading&&this.variable?.loaded&&!this.variable?.variables.length?i`<calcite-flow><calcite-flow-item .heading=${this.messages.profilevariables} closable @calciteFlowItemClose=${this._emitClose}><div class="notice-container">${this.messages.noprofilevariablesmessage}</div></calcite-flow-item></calcite-flow>`:i`<calcite-flow ${f(this.flowFocusHandler)}>${this.renderCollectionBasedVariable(this.variable,!0,this._flowItemRenderers.length===0)}${this._flowItemRenderers.map((e,t,s)=>e(t===s.length-1))}</calcite-flow>`}};m("arcgis-editor-variables",o);export{o as ArcgisEditorVariables};
@@ -1,4 +0,0 @@
1
- /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
- See https://js.arcgis.com/4.33/esri/copyright.txt for details.
3
- v4.33.0-next.94 */
4
- import{a as b,c as r,d as v,e as n}from"./6Q43GJXJ.js";import{b as l}from"./IZR6CPOM.js";import{a as _}from"./I65OQ4H6.js";import{a as g}from"./KW7UAGYK.js";import"./EP2YUSNH.js";import{c as p,f as s,r as o,s as u,w as f}from"./LBDYBLQS.js";import{d,e as h,q as a}from"./5BIHMNUZ.js";import"./TBUHAI37.js";import"./B45X2RCU.js";var $=p`:host{background-color:var(--calcite-color-foreground-1);.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}.sticky{position:sticky;top:0;z-index:10}calcite-flow{height:100%}calcite-block{p:first-of-type{margin-top:0}code{font-family:var(--calcite-code-family)}pre{direction:ltr;overflow-x:auto;background-color:var(--calcite-color-foreground-2);padding:var(--calcite-spacing-sm);code{font-size:var(--calcite-font-size--2)}}}calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}}`,m=class extends u{constructor(){super(...arguments),this.messages=_(),this._unselectItem=async()=>{this._selectedApiItem=void 0},this._colorizeStyle="",this._filterValue="",this.hideDocumentationActions=!1,this.loading=!1,this.arcgisClose=o({bubbles:!1}),this.arcgisItemSelected=o({bubbles:!1})}static{this.properties={_colorizeStyle:16,_filterValue:16,_selectedApiItem:16,apiLibrary:0,hideDocumentationActions:5,loading:5}}static{this.styles=$}load(){this._colorizeStyle=r(),this._themeChangedListener=v(()=>this._colorizeStyle=r())}willUpdate(e){if(e.has("apiLibrary")){if(!this._selectedApiItem)return;for(let i of this.apiLibrary??[])for(let t of i.items)if(t.name===this._selectedApiItem.name){this._selectedApiItem=t;return}this._selectedApiItem=void 0}}disconnectedCallback(){super.disconnectedCallback(),this._flowObserver?.disconnect(),this._themeChangedListener?.dispose()}flowFocusHandler(e){if(!e){this._flowObserver?.disconnect(),this._flowObserver=void 0;return}this._flowObserver||(this._flowObserver=new MutationObserver(()=>{h(e.querySelector("calcite-flow-item:last-child"),"calcite-input")}),this._flowObserver.observe(e,{attributes:!0,attributeFilter:["id"],childList:!0}))}_emitItemSelected(e,i){if(!i)return;let t=e;(!t.key||t.key==="Enter")&&(e.preventDefault(),this.arcgisItemSelected.emit(i.completion.insertText??""))}_emitClose(){this.arcgisClose.emit()}_emitItemSelectedAndClose(e,i){let t=e;(!t.key||t.key==="Enter")&&(e.preventDefault(),this.arcgisItemSelected.emit(i.completion.insertText??""))}_selectItem(e,i){e.stopPropagation(),this._selectedApiItem=i}_updateFilterValue(e){this._filterValue=e.currentTarget.value??""}_elementToMarkdown(e){e!==void 0&&(e.innerHTML=n(this._selectedApiItem.examples),b(e).catch(console.error))}renderApiCategory(e){let i=g(e.items,"name",this._filterValue);return i.length?s`<calcite-list-item-group .heading=${e.title}>${i.map(t=>s`<calcite-list-item .label=${a(t.completion.detail)} @calciteListItemSelect=${c=>this._emitItemSelected(c,t)} @keydown=${c=>this._emitItemSelected(c,t)}><calcite-action slot=actions-end .text=${this.messages.expand??""} icon=chevron-right icon-flip-rtl scale=s @click=${c=>this._selectItem(c,t)}></calcite-action></calcite-list-item>`)}</calcite-list-item-group>`:null}renderApiItemFlowItem(){let e=this._selectedApiItem;return e?s`<calcite-flow-item .heading=${this.messages.constantsandfunctions} .beforeBack=${this._unselectItem} closable @calciteFlowItemClose=${this._emitClose} selected>${this.hideDocumentationActions?null:s`<calcite-button width=half slot=footer appearance=outline kind=brand scale=s .href=${e.link} target=Help icon-start=information>${this.messages.moreinformation}</calcite-button>`}<calcite-button .width=${this.hideDocumentationActions?"full":"half"} slot=footer appearance=outline kind=brand icon-start=code scale=s @click=${i=>this._emitItemSelectedAndClose(i,e)} ${l(d)}>${this.messages.insert}</calcite-button><calcite-block open .heading=${a(e.completion.detail)}><div .innerHTML=${n(e.completion.documentation)??""}></div>${e.examples?s`<div ${l(this._elementToMarkdown)}></div>`:null}</calcite-block></calcite-flow-item>`:null}render(){let e=(this.apiLibrary??[]).map(t=>this.renderApiCategory(t)),i=e.every(t=>!t);return s`<style>${this._colorizeStyle}</style><calcite-flow ${l(this.flowFocusHandler)}><calcite-flow-item .heading=${this.messages.constantsandfunctions} closable @calciteFlowItemClose=${this._emitClose} .selected=${!this._selectedApiItem}><calcite-input .value=${this._filterValue} icon=magnifying-glass clearable @calciteInputInput=${this._updateFilterValue} class="sticky" scale=m></calcite-input>${this.loading?s`<calcite-loader scale=s type=indeterminate .label=${this.messages.loading??"Loading"}></calcite-loader>`:s`<calcite-list label="arcade api">${i?s`<div class="notice-container">${this.messages.noitems}</div>`:e}</calcite-list>`}</calcite-flow-item>${this.renderApiItemFlowItem()}</calcite-flow>`}};f("arcgis-language-api-panel",m);export{m as ArcgisLanguageApiPanel};
@@ -1,3 +0,0 @@
1
- /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
- See https://js.arcgis.com/4.33/esri/copyright.txt for details.
3
- v4.33.0-next.94 */
@@ -1,4 +0,0 @@
1
- /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
- See https://js.arcgis.com/4.33/esri/copyright.txt for details.
3
- v4.33.0-next.94 */
4
- import{b as u,c as f,d as h,e as k,f as S,g as T}from"./FUIHPHGW.js";import{a as M}from"./I65OQ4H6.js";import{i as P}from"./C6GPTPY4.js";import{c as y,f as t,r as $,s as x,t as v,u as d,w}from"./LBDYBLQS.js";import{n as p,p as n}from"./5BIHMNUZ.js";import"./B45X2RCU.js";var L=y`:host{display:flex;flex-direction:column;width:100%;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);.flex-adjustable{flex:1 1 auto;overflow:hidden}.flex-row{display:flex;flex-direction:row;overflow:hidden}.flex-column{display:flex;flex-direction:column;overflow:hidden}.y-scrollable-container{overflow-y:auto;block-size:100%;background-color:var(--calcite-color-foreground-1)}header{border-bottom:1px solid var(--calcite-color-border-3);flex:0 0 auto}.ltr-container{direction:ltr}calcite-action-bar{calcite-action-group{padding-inline-end:var(--calcite-spacing-sm);calcite-action{padding-inline-end:var(--calcite-spacing-sm)}calcite-action:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}}calcite-action-group:last-child{border-inline-end-width:0px}calcite-action-group:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}}.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}.color-info{color:var(--calcite-color-status-info)}.color-error{color:var(--calcite-color-status-danger)}.color-success{color:var(--calcite-color-status-success)}[class*=result-value-]{font-size:var(--calcite-font-size--2);line-height:1.25rem;background-color:var(--calcite-color-foreground-1);margin:var(--calcite-spacing-md)}.console-logs-container{background-color:var(--calcite-color-foreground-1);padding:0 var(--calcite-spacing-md);font-family:var(--calcite-code-family);font-size:var(--calcite-font-size--2);font-weight:var(--calcite-font-weight-normal)}.result-value-table{table{display:block;max-width:fit-content;overflow-x:auto;border-spacing:0;border-collapse:collapse;text-align:start;white-space:nowrap;thead{background-color:var(--calcite-color-foreground-2)}tr{border-top:1px solid var(--calcite-color-border-3);border-bottom:1px solid var(--calcite-color-border-3)}th,td{border-inline-start:1px solid var(--calcite-color-border-3);border-inline-end:1px solid var(--calcite-color-border-3);text-align:start;padding:var(--calcite-spacing-xxs);.string-value{white-space:pre}}th{font-weight:var(--calcite-font-weight-medium)}}}.tree-item-label,.number-value,.string-value,.boolean-value{font-family:var(--calcite-code-family)}.tree-item-label,.value-type{color:var(--calcite-color-text-2);font-weight:var(--calcite-font-weight-normal)}.dictionary-property{color:var(--arcgis-editor-identifier)}.number-value{color:var(--arcgis-editor-number)}.string-value{color:var(--arcgis-editor-string);white-space:pre-wrap}.constant-value{color:var(--arcgis-editor-constant)}.date-value{color:var(--arcgis-editor-date)}}`,a={lines:!0,selectionMode:"none",scale:"s",oncalciteTreeSelect:l=>l.currentTarget.selectedItems.forEach(e=>e.selected=!1)},r={onClick:l=>{let e=l.currentTarget;e.expanded=!e.expanded}};function o(l){return t`<span class="dictionary-property">${l}</span><span>:&nbsp;</span>`}function C(l,e=!1){return t`<calcite-tree slot=${(e?"children":void 0)??d} .lines=${a.lines} .selectionMode=${a.selectionMode} .scale=${a.scale} @calciteTreeSelect=${a.oncalciteTreeSelect}><calcite-tree-item class="string-value">${JSON.stringify(l.castAsJson(),void 0,2)}</calcite-tree-item></calcite-tree>`}function R(l,e=!1){return t`<calcite-tree slot=${(e?"children":void 0)??d} .lines=${a.lines} .selectionMode=${a.selectionMode} .scale=${a.scale} @calciteTreeSelect=${a.oncalciteTreeSelect}><calcite-tree-item><div class="tree-item-label">${o("type")}${l.type}</div></calcite-tree-item><calcite-tree-item><div class="tree-item-label">${o("value")}<span class="string-value">${JSON.stringify(l,void 0,2)}</span></div></calcite-tree-item></calcite-tree>`}function g(l){switch(l.type){case"unknown":case"null":return t`<span class="constant-value">${l.type}</span>`;case"text":return t`<span class="string-value">${p(l.value)}</span>`;case"number":return t`<span class="number-value">${l.value.toString()}</span>`;case"boolean":return t`<span class="constant-value">${l.value.toString()}</span>`;case"date":return t`<span class="date-value">${k(l)}</span>`;case"dateOnly":return t`<span class="string-value">${p(S(l))}</span>`;case"time":return t`<span class="string-value">${p(T(l))}</span>`;default:return null}}function A(l){let e=P(l.value.fields);return t`<table><thead><tr>${e.map(i=>t`<th>${i.name}</th>`)}</tr></thead><tbody>${l.features.map(i=>t`<tr>${e.map(c=>{try{let s=h(i.field(c.name));return t`<td>${g(s)}</td>`}catch{return t`<td></td>`}})}</tr>`)}</tbody></table>`}var b=class extends x{constructor(){super(...arguments),this.messages=M(),this.openedResultPanel="output",this.arcgisClose=$({bubbles:!1}),this.arcgisOpenedResultPanelChange=$({bubbles:!1})}static{this.properties={consoleLogs:0,loading:5,openedResultPanel:3,result:0}}static{this.styles=L}updateResultPanel(e){this.openedResultPanel=e,this.arcgisOpenedResultPanelChange.emit(e)}_switchResultPanel(e){if(!e.target)return;let i=e.target?.dataset.panelName;i&&this.updateResultPanel(i)}_emitClose(){this.arcgisClose.emit()}renderConsolePanel(){return this.openedResultPanel!=="console"?null:this.loading&&!this.consoleLogs?.length?t`<calcite-loader scale=s type=indeterminate label></calcite-loader>`:t`<div class="console-logs-container ltr-container">${this.consoleLogs?.length?this.consoleLogs.map(e=>t`<p>${e}</p>`):t`<p>${this.messages.consolemessage}</p>`}</div>`}renderLogPanel(){if(this.openedResultPanel!=="log")return null;if(this.loading)return t`<calcite-loader scale=s type=indeterminate label></calcite-loader>`;let e=this.result?.type==="error"?"color-error":"color-success";return t`<calcite-list label=results>${this.result?t`<calcite-list-item .label=${n(this.messages.lastexecutionformat,{timeStamp:new Intl.DateTimeFormat(this.messages._t9nLocale,{dateStyle:"medium",timeStyle:"medium"}).format(this.result.timeStamp)})}><calcite-icon slot=content-start icon=information scale=s class=${v(e)}></calcite-icon></calcite-list-item><calcite-list-item .label=${n(this.messages.compilationtimeformat,{time:new Intl.NumberFormat(this.messages._t9nLocale,{style:"unit",unit:"millisecond",maximumFractionDigits:2}).format(this.result.compilationTime??0)})}><calcite-icon slot=content-start icon=information scale=s class=${v(e)}></calcite-icon></calcite-list-item><calcite-list-item .label=${n(this.messages.executiontimeformat,{time:new Intl.NumberFormat(this.messages._t9nLocale,{style:"unit",unit:"millisecond",maximumFractionDigits:2}).format(this.result.executionTime??0)})}><calcite-icon slot=content-start icon=information scale=s class=${v(e)}></calcite-icon></calcite-list-item>`:t`<calcite-list-item .label=${this.messages.runscriptmessage}><calcite-icon slot=content-start icon=information scale=s class="color-info"></calcite-icon></calcite-list-item>`}</calcite-list>`}renderOutputPanel(){if(this.openedResultPanel!=="output")return null;if(this.loading)return t`<calcite-loader scale=s type=indeterminate label></calcite-loader>`;switch(this.result?.type){case"error":return t`<div class="result-value-simple flex-adjustable">${n(this.messages.executionerrorformat,{message:this.result.value})}</div>`;case"null":case"unknown":return t`<div class="result-value-simple ltr-container">${g(this.result)}</div>`;case"text":case"number":case"date":case"dateOnly":case"time":case"boolean":return t`<div class="result-value-simple ltr-container"><span class="value-type">${this.result.type}:&nbsp;</span>${g(this.result)}</div>`;case"array":{let e=(this.result.value??[]).slice(0,u);return t`<div class="result-value-simple ltr-container"><calcite-tree .lines=${a.lines} .selectionMode=${a.selectionMode} .scale=${a.scale} @calciteTreeSelect=${a.oncalciteTreeSelect}><calcite-tree-item expanded @click=${r.onClick}><div class="tree-item-label">${this.renderArrayHeader(this.result)}</div>${this.renderArrayTree(e,!0)}</calcite-tree-item></calcite-tree></div>`}case"geometry":return t`<div class="result-value-simple ltr-container"><calcite-tree .lines=${a.lines} .selectionMode=${a.selectionMode} .scale=${a.scale} @calciteTreeSelect=${a.oncalciteTreeSelect}><calcite-tree-item expanded @click=${r.onClick}><div class="tree-item-label">${this.result.type}</div>${R(this.result.value,!0)}</calcite-tree-item></calcite-tree></div>`;case"attachment":return t`<div class="result-value-simple ltr-container"><calcite-tree .lines=${a.lines} .selectionMode=${a.selectionMode} .scale=${a.scale} @calciteTreeSelect=${a.oncalciteTreeSelect}><calcite-tree-item expanded @click=${r.onClick}><div class="tree-item-label">${this.result.type}</div>${C(this.result.value,!0)}</calcite-tree-item></calcite-tree></div>`;case"feature":case"dictionary":case"portal":return t`<div class="result-value-simple ltr-container"><calcite-tree .lines=${a.lines} .selectionMode=${a.selectionMode} .scale=${a.scale} @calciteTreeSelect=${a.oncalciteTreeSelect}><calcite-tree-item expanded @click=${r.onClick}><div class="tree-item-label">${this.result.type}</div>${this.renderDictionaryTree(this.result.value,!0)}</calcite-tree-item></calcite-tree></div>`;case"featureSet":return t`<div class="result-value-table ltr-container">${this.renderFeatureSetLabel(this.result)}${A(this.result)}</div>`;case"knowledgeGraph":return t`<div class="result-value-simple ltr-container"><span class="value-type">${this.result.type}:&nbsp;</span><span class="string-value">${this.result.value.url}</span></div>`;default:return t`<div class="result-value-simple flex-adjustable ltr-container">${this.messages.runscriptmessage}</div>`}}renderArrayHeader(e){let i=e.value??[],c=Math.max(i.length-u,0);return t`<span>${`${e.type}(${i.length??0})`}</span>${c>0?t`<span>&nbsp;${n(this.messages.showingfirstitemsformat,{count:u.toString()})}</span>`:null}`}renderArrayTree(e,i=!1){return t`<calcite-tree slot=${(i?"children":void 0)??d} .lines=${a.lines} .selectionMode=${a.selectionMode} .scale=${a.scale} @calciteTreeSelect=${a.oncalciteTreeSelect}>${e.map((c,s)=>{let m=h(c);return this.renderTreeItem(m,s,!i)})}</calcite-tree>`}renderDictionaryTree(e,i=!1){let c=e.geometry?.();return t`<calcite-tree slot=${(i?"children":void 0)??d} .lines=${a.lines} .selectionMode=${a.selectionMode} .scale=${a.scale} @calciteTreeSelect=${a.oncalciteTreeSelect}>${e.keys().map(s=>{let m=h(e.field(s));return e.arcadeDeclaredClass==="esri.arcade.Feature"&&m.type==="geometry"?null:this.renderTreeItem(m,s)})}${c?this.renderTreeItem({type:"geometry",value:c},"geometry"):null}</calcite-tree>`}renderTreeItem(e,i,c=!1){switch(e.type){case"null":case"unknown":case"text":case"number":case"date":case"dateOnly":case"time":case"boolean":return t`<calcite-tree-item><div class="tree-item-label">${o(i)}${g(e)}</div></calcite-tree-item>`;case"array":{let s=(e.value??[]).slice(0,u);return t`<calcite-tree-item .expanded=${c} @click=${r.onClick}><div class="tree-item-label">${o(i)}${this.renderArrayHeader(e)}</div>${this.renderArrayTree(s,!0)}</calcite-tree-item>`}case"geometry":return t`<calcite-tree-item .expanded=${c} @click=${r.onClick}><div class="tree-item-label">${o(i)}<span>${e.type}</span></div>${R(e.value,!0)}</calcite-tree-item>`;case"attachment":return t`<calcite-tree-item .expanded=${c} @click=${r.onClick}><div class="tree-item-label">${o(i)}<span>${e.type}</span></div>${C(e.value,!0)}</calcite-tree-item>`;case"feature":case"dictionary":case"portal":return t`<calcite-tree-item .expanded=${c} @click=${r.onClick}><div class="tree-item-label">${o(i)}<span>${e.type}</span></div>${this.renderDictionaryTree(e.value,!0)}</calcite-tree-item>`;default:return null}}renderFeatureSetLabel(e){return t`<div class="value-type"><span>${e.type}:</span>${e.features.length>=f?t`<span>&nbsp;${n(this.messages.showingfirstitemsformat,{count:f.toString()})}</span>`:null}</div>`}render(){return t`<header class="flex-row"><calcite-action-bar class="flex-adjustable" layout=horizontal scale=s expanded expand-disabled><calcite-action-group scale=s><calcite-action .active=${this.openedResultPanel==="output"} .text=${this.messages.output??""} text-enabled scale=s icon=list-show-all icon-flip-rtl @click=${this._switchResultPanel} data-panel-name=output></calcite-action><calcite-action .active=${this.openedResultPanel==="console"} .text=${this.messages.console??""} text-enabled scale=s icon=console icon-flip-rtl @click=${this._switchResultPanel} data-panel-name=console></calcite-action><calcite-action .active=${this.openedResultPanel==="log"} .text=${this.messages.log??""} text-enabled scale=s icon=list icon-flip-rtl @click=${this._switchResultPanel} data-panel-name=log></calcite-action></calcite-action-group></calcite-action-bar><calcite-action scale=s icon=x .text=${this.messages.close??""} @click=${this._emitClose}></calcite-action></header><article class="flex-adjustable">${this.loading?t`<calcite-loader scale=s type=indeterminate label></calcite-loader>`:t`<div class="flex-column y-scrollable-container">${this.renderOutputPanel()}${this.renderConsolePanel()}${this.renderLogPanel()}</div>`}</article>`}};w("arcgis-arcade-results",b);export{b as ArcgisArcadeResults};
@@ -1,3 +0,0 @@
1
- /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
- See https://js.arcgis.com/4.33/esri/copyright.txt for details.
3
- v4.33.0-next.94 */
@@ -1,3 +0,0 @@
1
- /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
- See https://js.arcgis.com/4.33/esri/copyright.txt for details.
3
- v4.33.0-next.94 */
@@ -1,4 +0,0 @@
1
- /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
- See https://js.arcgis.com/4.33/esri/copyright.txt for details.
3
- v4.33.0-next.94 */
4
- import{a as f,h as c}from"./FUIHPHGW.js";import{a as E,b as S}from"./IZR6CPOM.js";import{a as w}from"./I65OQ4H6.js";import{a as v,b as P,d as s}from"./N3T3NW5N.js";import"./SYOOXRWH.js";import"./2UOMUDCU.js";import"./C6GPTPY4.js";import"./KW7UAGYK.js";import"./EP2YUSNH.js";import{c as g,e as u,f as t,h as n,r,s as _,w as m,x}from"./LBDYBLQS.js";import{a as h,h as p}from"./5BIHMNUZ.js";import{Hl as b,kk as D}from"./TBUHAI37.js";import"./B45X2RCU.js";D();var C=d=>{if(!d.toString().includes("calcite-flow-item"))throw new Error("Renderer must return a JSX node that starts with <calcite-flow-item>");return!0},R=g`@layer{arcgis-arcade-editor{display:flex;flex-direction:column;position:relative;overflow:hidden;border:var(--arcgis-coding-components-border);box-sizing:border-box;background-color:var(--arcgis-coding-components-background-color);height:100%;.flex-adjustable{flex:1 1 auto;overflow:hidden}.flex-panel{flex:1 0 auto}.position-relative{position:relative}.flex-row{display:flex;flex-direction:row;overflow:hidden}.flex-column{display:flex;flex-direction:column;overflow:hidden}.border-inline-start{border-inline-start:var(--arcgis-coding-components-border);box-sizing:border-box}.border-inline-end{border-inline-end:var(--arcgis-coding-components-border);box-sizing:border-box}.sticky{position:sticky;top:0;z-index:10}.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1);text-align:center}.side-action-bar{max-width:var(--arcgis-coding-components-side-action-bar-max-w)}.side-panel{max-width:var(--arcgis-coding-components-side-panel-max-w);width:var(--arcgis-coding-components-side-panel-w);calcite-flow{height:100%}}.main-action-bar{border-bottom:var(--arcgis-coding-components-border);flex:0 0 auto;calcite-action-group{padding-inline-end:var(--calcite-spacing-sm);calcite-action{padding-inline-end:var(--calcite-spacing-sm)}calcite-action:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}}calcite-action-group:last-child{border-inline-end-width:0px}calcite-action-group:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}}arcgis-arcade-results{border-top:var(--arcgis-coding-components-border);box-sizing:border-box;max-height:50%;min-height:50%;margin-bottom:-1px}calcite-flow{[slot=footer]{word-break:break-word}}}}`,l=class extends _{constructor(){super(...arguments),this._codeEditorElt=E(),this._componentReadyDefer=new h,this._disposables=[],this._editorProfilePromise=Promise.resolve(void 0),this.messages=w(),this._modelId=p(),this._openArcadeHelp=()=>void window.open(f,"Arcade Help"),this._toggleSidePanel=e=>{if(!e.target)return;let i=e.target?.dataset.panelName??"none";this.openedSidePanel=i===this.openedSidePanel?"none":i,this.openedSidePanel==="none"&&this._codeEditorElt.value?.setFocus().catch(console.error)},this._consoleLogs=[],this._executingScript=!1,this._preparingArcade=!1,this._resultPanel="output",this._showExecutionPanel=!1,this.hideDocumentationActions=!1,this.hideSideBar=!1,this.openedSidePanel="none",this.script="",this.sideActionBarExpanded=!1,this.arcgisDiagnosticsChange=r({bubbles:!1}),this.arcgisScriptChange=r({bubbles:!1})}static{this.properties={_apiLibrary:16,_consoleLogs:16,_editorProfile:16,_executingScript:16,_executionResult:16,_preparingArcade:16,_resultPanel:16,_showExecutionPanel:16,editorInstance:32,editorOptions:0,hideDocumentationActions:5,hideSideBar:5,openedSidePanel:2,profile:0,script:1,sideActionBarExpanded:7,snippets:0,suggestions:0,testData:0,customPanels:0}}static{this.shadowRootOptions=u}static{this.styles=R}get editorInstance(){return this._codeEditorElt.value?.editorInstance}async getEditorInstance(){return await this._componentReadyDefer.promise,this._codeEditorElt.value?.editorInstance}async getScript(){return await this._componentReadyDefer.promise,this._codeEditorElt.value?.value}async getTestResult(){if(!this.testData)return{type:"error",value:"Missing test data",error:null};let e=await this._editorProfilePromise;if(!e)return{type:"error",value:"Missing editor profile",error:null};await this._componentReadyDefer.promise;let i=this._codeEditorElt.value?.value;return await c(e.definition,i,this.testData)}async setFocus(){await this._componentReadyDefer.promise,await this._codeEditorElt.value?.setFocus()}async load(){let e=x("./assets");v(e),await this._updateEditorProfile()}willUpdate(e){(e.has("messages")||e.has("profile"))&&this._updateDataModelDeps(),e.has("testData")&&this._testDataChanged(),e.has("snippets")&&s.updateApiContextForModel(this._modelId,{snippets:this.snippets})}async loaded(){this._componentReadyDefer.resolve(),await this._updateApiLibrary();let e=await P();this._disposables.push(e.onDiagnosticsChange(i=>!this._preparingArcade&&this.arcgisDiagnosticsChange.emit(i.diagnostics))),this.testData&&this._addExecuteScriptAction(),await this._codeEditorElt.value?.setFocus()}disconnectedCallback(){for(super.disconnectedCallback();this._disposables.length;)this._disposables.pop()?.dispose()}async _updateDataModelDeps(){await this._updateEditorProfile(),await this._updateApiLibrary()}_testDataChanged(){!this.testData&&this._executeScriptAction&&(this._disposeSafely(this._executeScriptAction),this._executeScriptAction=void 0),this.testData&&!this._executeScriptAction&&this._addExecuteScriptAction(),this._showExecutionPanel&&this._executeScript().catch(console.error)}async _updateEditorProfile(){this._preparingArcade=!0;try{await s.setProfileForModel(this._modelId,this.profile,{locale:this.messages._t9nLocale,snippets:this.snippets}),this._editorProfile=s.getEditorProfileForModel(this._modelId)}catch{this._editorProfile=void 0}finally{this._editorProfilePromise=Promise.resolve(this._editorProfile),this._preparingArcade=!1}}async _updateApiLibrary(){this._apiLibrary=await s.getApiLibraryForModel(this._modelId)}async _executeScript(){let e=this.testData;if(!this._codeEditorElt.value||!e)return;let i=await this._editorProfilePromise;if(!i){this._executionResult={type:"error",value:"Missing editor profile",error:null};return}this._showExecutionPanel=!0,this._executingScript=!0,this._consoleLogs=[],setTimeout(()=>void(async()=>{let a=this._codeEditorElt.value?.value;this._executionResult=await c(i.definition,a,e,o=>setTimeout(()=>this._consoleLogs=[...this._consoleLogs,o],0)),this._executingScript=!1})(),0)}_toggleShowExecutionPanel(){this._showExecutionPanel=!this._showExecutionPanel}_toggleSideActionBarExpanded(){this.sideActionBarExpanded=!this.sideActionBarExpanded}_onCodeEditorValueChange(e){e.stopPropagation(),this.script=e.detail,this.arcgisScriptChange.emit(e.detail)}_insertAsSnippet(e){this._codeEditorElt.value?.insertSnippet(e.detail).catch(console.error)}_insertAsText(e){this._insertText(e.detail)}_insertText(e){this._codeEditorElt.value?.insertText(e).catch(console.error)}_onResultPanelChange(e){this._resultPanel=e.detail}_onExecutionPanelClose(){this._showExecutionPanel=!1}_addExecuteScriptAction(){let e=this.editorInstance?.addAction({id:"run-script",label:"Run Arcade Expression",keybindings:[b.F5],contextMenuGroupId:"code",contextMenuOrder:1,run:()=>{this.testData&&this._executeScript().catch(console.error)}});e&&(this._executeScriptAction=e,this._disposables.push(e))}_disposeSafely(e){let i=this._disposables.indexOf(e);i!==-1&&this._disposables.splice(i,1),e.dispose()}renderMainActionBar(){return this.testData?t`<calcite-action-bar class="main-action-bar" layout=horizontal scale=s expanded expand-disabled><calcite-action-group scale=s><calcite-action .text=${this.messages.run??""} text-enabled icon=play scale=s .loading=${this._preparingArcade} @click=${()=>void this._executeScript().catch(console.error)}></calcite-action>${this._executionResult?t`<calcite-action .text=${this.messages.lastresults??""} .active=${this._showExecutionPanel} text-enabled icon=access-string-results icon-flip-rtl scale=s @click=${this._toggleShowExecutionPanel}></calcite-action>`:null}</calcite-action-group></calcite-action-bar>`:null}renderMainPanel(){return t`<arcgis-code-editor class="flex-adjustable" .editorOptions=${this.editorOptions} .language=${s.languageId} .value=${this.script??""} .modelId=${this._modelId} @arcgisValueChange=${this._onCodeEditorValueChange} ${S(this._codeEditorElt)}></arcgis-code-editor>`}renderAction({id:e,label:i,icon:a,active:o,panelName:$,iconFlipRtl:A=!1,onClick:y=this._toggleSidePanel}){return t`<calcite-action id=${e??n} .text=${i} .textEnabled=${this.sideActionBarExpanded} .icon=${a} .active=${o} @click=${y} data-panel-name=${$??n} .iconFlipRtl=${A}></calcite-action>${!this.sideActionBarExpanded&&t`<calcite-tooltip .referenceElement=${e}><span>${i}</span></calcite-tooltip>`||""}`}renderSideActionBar(){return this.hideSideBar?null:t`<calcite-action-bar class="side-action-bar border-inline-start" .expanded=${!!this.sideActionBarExpanded} position=end @calciteActionBarToggle=${this._toggleSideActionBarExpanded}><calcite-action-group>${this.renderAction({id:"profile-variables-action",label:this.messages.profilevariables??"",icon:"profile-variables",active:this.openedSidePanel==="variables",panelName:"variables"})}${this.renderAction({id:"function-action",label:this.messages.constantsandfunctions??"",icon:"function",active:this.openedSidePanel==="api",panelName:"api"})}${this.suggestions?.length?this.renderAction({id:"suggestions-action",label:this.messages.suggestions??"",icon:"lightbulb",active:this.openedSidePanel==="suggestions",panelName:"suggestions"}):null}${this.customPanels?.map(e=>this.renderAction({id:e.id,label:e.name,icon:e.icon,active:this.openedSidePanel===e.id,panelName:e.id}))}${this.hideDocumentationActions?null:this.renderAction({id:"developer-website-action",label:this.messages.help??"",icon:"question",active:!1,panelName:"none",iconFlipRtl:this.messages._lang==="ar",onClick:this._openArcadeHelp})}</calcite-action-group></calcite-action-bar>`}renderSidePanel(){if(this.hideSideBar)return null;switch(this.openedSidePanel){case"api":return t`<arcgis-language-api-panel class="side-panel flex-panel border-inline-start" .loading=${this._preparingArcade} .apiLibrary=${this._apiLibrary} .hideDocumentationActions=${this.hideDocumentationActions} @arcgisItemSelected=${this._insertAsSnippet} @arcgisClose=${this._toggleSidePanel} data-panel-name=none></arcgis-language-api-panel>`;case"variables":return t`<arcgis-editor-variables class="side-panel flex-panel border-inline-start" .loading=${this._preparingArcade} .modelId=${this._modelId} @arcgisItemSelected=${this._insertAsText} @arcgisClose=${this._toggleSidePanel} data-panel-name=none .variable=${this._editorProfile}></arcgis-editor-variables>`;case"suggestions":return t`<arcgis-arcade-suggestions class="side-panel flex-panel border-inline-start" .suggestions=${this.suggestions} @arcgisItemSelected=${this._insertAsText} @arcgisClose=${this._toggleSidePanel} data-panel-name=none></arcgis-arcade-suggestions>`;case"none":return null}let e=this.customPanels?.find(i=>i.id===this.openedSidePanel);if(e){let i=!!e?.useFlows;return t`<calcite-flow class="side-panel flex-panel border-inline-start">${i&&C(e.renderer)?e.renderer({closePanel:this._toggleSidePanel,insertText:this._insertText.bind(this)}):t`<calcite-flow-item .heading=${e.name} closable @calciteFlowItemClose=${this._toggleSidePanel} .description=${e.description}>${e.renderer({closePanel:this._toggleSidePanel,insertText:this._insertText.bind(this)})}</calcite-flow-item>`}</calcite-flow>`}return null}renderResultsPanel(){return this._showExecutionPanel?t`<arcgis-arcade-results class="flex-adjustable" .openedResultPanel=${this._resultPanel} .loading=${this._executingScript} .result=${this._executionResult} .consoleLogs=${this._consoleLogs} @arcgisOpenedResultPanelChange=${this._onResultPanelChange} @arcgisClose=${this._onExecutionPanelClose}></arcgis-arcade-results>`:null}render(){return t`${this.renderMainActionBar()}<div class="flex-row flex-adjustable"><div class="flex-column flex-adjustable">${this.renderMainPanel()}${this.renderResultsPanel()}</div>${this.renderSidePanel()}${this.renderSideActionBar()}</div>`}};m("arcgis-arcade-editor",l);export{l as ArcgisArcadeEditor};
@@ -1,3 +0,0 @@
1
- /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
- See https://js.arcgis.com/4.33/esri/copyright.txt for details.
3
- v4.33.0-next.94 */
@@ -1,4 +0,0 @@
1
- /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
- See https://js.arcgis.com/4.33/esri/copyright.txt for details.
3
- v4.33.0-next.94 */
4
- import{b as o,x as r}from"./LBDYBLQS.js";var s=o(r);export{s as a};
@@ -1,3 +0,0 @@
1
- /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
- See https://js.arcgis.com/4.33/esri/copyright.txt for details.
3
- v4.33.0-next.94 */
@@ -1,3 +0,0 @@
1
- /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
- See https://js.arcgis.com/4.33/esri/copyright.txt for details.
3
- v4.33.0-next.94 */
@@ -1,3 +0,0 @@
1
- /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
- See https://js.arcgis.com/4.33/esri/copyright.txt for details.
3
- v4.33.0-next.94 */
@@ -1,6 +0,0 @@
1
- /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
- See https://js.arcgis.com/4.33/esri/copyright.txt for details.
3
- v4.33.0-next.94 */
4
- import{a as E,f as p,g as z,k as Gt,m as Ft,r as st,s as Kt,u as Yt}from"./5BIHMNUZ.js";var _t=(s=>(s[s.String=1]="String",s[s.Number=2]="Number",s[s.Boolean=4]="Boolean",s[s.Any=8]="Any",s[s.Unknown=16]="Unknown",s[s.State=32]="State",s[s.Method=64]="Method",s[s.Event=128]="Event",s[s.Element=256]="Element",s[s.ReflectAttr=512]="ReflectAttr",s[s.Mutable=1024]="Mutable",s[s.Prop=31]="Prop",s[s.HasAttribute=15]="HasAttribute",s[s.PropLike=63]="PropLike",s[s.ReadOnly=2048]="ReadOnly",s))(_t||{});function Jt(s,t){if(t){let e=s.constructor.elementProperties;s.manager.internals.members=Object.fromEntries(Array.from(e,([o,n])=>n.noAccessor?void 0:[o,[(n.readOnly?2048:0)|(n.state?32:16)]]).filter(Yt))}else{let e=s.constructor,o=e.__registerControllers?.(s)??void 0;if(e.__registerControllers=void 0,typeof o!="object")throw new Error("Failed to retrieve component meta");s.manager.internals.members=Object.fromEntries(Object.entries(o).filter(([n,[r]])=>(r&63)!==0))}}function Zt(s,t=8){return s==null||typeof s=="object"||typeof s=="function"?s:t&4?s==="false"?!1:s===""||!!s:t&2?Number.parseFloat(s):t&1?String(s):s}var Qt=(s,t)=>s.manager.internals.members?.[t]?.[0];var rt=Symbol.for("controller");var ee=s=>typeof s=="object"&&s!==null&&(rt in s||"hostConnected"in s||"hostDisconnected"in s||"hostUpdate"in s||"hostUpdated"in s);function se(s){return typeof s?.then=="function"}var B;function N(s){B!==s&&(B=s,queueMicrotask(()=>{B===s&&(B=void 0)}))}function V(s){return B}var S=[];function xt(s){if(s===void 0){S=[];return}let t=S.indexOf(s);S=t===-1?[...S,s]:S.slice(0,t+1),queueMicrotask(()=>{S=[]})}function wt(){return S}var j;function Ve(s){j!==s&&(j=s,queueMicrotask(()=>{j===s&&(j=void 0)}))}function He(){let s=j;return j=void 0,s}var We=async(s,t)=>{let e=At(s);if(e===void 0)return s;if(await e.ready,typeof t=="function"){let o=e.watchExports(n=>t(n,o))}return e.exports},ze=async s=>{let t=At(s);return await t.ready,t},At=s=>{let e=V().manager.internals.resolveExports(s);if(e!==void 0)return e;if(ee(s))return s;let o=He();if(o!==void 0)return o},q={setter:!1,getter:!1,readOnly:!1},G=new WeakMap,oe;oe=rt;var F=class{constructor(t){this._callbacks={hostConnected:[],hostDisconnected:[],hostLoad:[],hostLoaded:[],hostUpdate:[],hostUpdated:[],hostDestroy:[],hostLifecycle:[]},this._ready=new E,this._lifecycleCleanups=[],this.connectedCalled=!1,this._loadCalled=!1,this.loadedCalled=!1,this[oe]=!0,this.ready=this._ready.promise,this._exports=te(this),this._exportWatchers=new Set;let e=t??V(new.target.name);this.component=e,this.component.addController(this),this.component.manager===void 0||(xt(this),queueMicrotask(()=>this.catchUpLifecycle()))}catchUpLifecycle(){let{manager:t}=this.component;t.connectedCalled&&!this.connectedCalled&&this.triggerConnected(),t._loadCalled&&this.triggerLoad().then(()=>{t.loadedCalled&&this.triggerLoaded()}).catch(console.error)}get exports(){return this._exports}set exports(t){let e=this._exports;e!==t&&(this._exports=t,this._exportWatchers.forEach(p),this.connectedCalled&&this.assignedProperty!==!1&&this.component.requestUpdate(this.assignedProperty,e)),this._ready.resolve(t)}setProvisionalExports(t,e=!0){this._exports=e?te(t):t,this._exportWatchers.forEach(p)}watchExports(t){let e=()=>t(this._exports);return this._exportWatchers.add(e),()=>void this._exportWatchers.delete(e)}get use(){return N(this.component),We}get useRef(){return N(this.component),ze}get useRefSync(){return N(this.component),At}controllerRemoved(){this.component.el.isConnected&&this.triggerDisconnected(),this.triggerDestroy()}onConnected(t){this._callbacks.hostConnected.push(t)}onDisconnected(t){this._callbacks.hostDisconnected.push(t)}onLoad(t){this._callbacks.hostLoad.push(t)}onLoaded(t){this._callbacks.hostLoaded.push(t)}onUpdate(t){this._callbacks.hostUpdate.push(t)}onUpdated(t){this._callbacks.hostUpdated.push(t)}onDestroy(t){this._callbacks.hostDestroy.push(t)}onLifecycle(t){this._callbacks.hostLifecycle.push(t),this.connectedCalled&&this.component.el.isConnected&&this._callLifecycle(t)}triggerConnected(){let t=this;t.hostConnected&&p(t.hostConnected,t),this._callbacks.hostConnected.forEach(p),this.triggerLifecycle(),this.connectedCalled=!0}triggerDisconnected(){let t=this;t.hostDisconnected&&p(t.hostDisconnected,t),this._callbacks.hostDisconnected.forEach(p),this._lifecycleCleanups.forEach(p),this._lifecycleCleanups=[]}async triggerLoad(){if(this._loadCalled)return;this._loadCalled=!0;let t=this;t.hostLoad&&await z(t.hostLoad,t),this._callbacks.hostLoad.length>0&&await Promise.allSettled(this._callbacks.hostLoad.map(z)),this._ready.resolve(this._exports)}triggerLoaded(){if(this.loadedCalled)return;let t=this;t.hostLoaded&&p(t.hostLoaded,t),this._callbacks.hostLoaded.forEach(p),this.loadedCalled=!0}triggerUpdate(t){let e=this;e.hostUpdate&&p(e.hostUpdate,e,t),this._callbacks.hostUpdate.forEach(Xt,t)}triggerUpdated(t){let e=this;e.hostUpdated&&p(e.hostUpdated,e,t),this._callbacks.hostUpdated.forEach(Xt,t)}triggerDestroy(){let t=this;t.hostDestroy&&p(t.hostDestroy,t),this._callbacks.hostDestroy.forEach(p)}triggerLifecycle(){let t=this;t.hostLifecycle&&this._callLifecycle(()=>t.hostLifecycle()),this._callbacks.hostLifecycle.forEach(this._callLifecycle,this)}_callLifecycle(t){N(this.component);let e=p(t);(Array.isArray(e)?e:[e]).forEach(n=>{typeof n=="function"?this._lifecycleCleanups.push(n):typeof n=="object"&&typeof n.remove=="function"&&this._lifecycleCleanups.push(n.remove)})}};function Xt(s){p(s,void 0,this)}var ne=F;function te(s){if(typeof s!="object"&&typeof s!="function"||s===null)return s;let t=new Proxy(s,{get(e,o,n){if(!(Be.has(o)&&o in e&&e[o]===t)&&(o in e||o in Promise.prototype||typeof o=="symbol"))return typeof e=="function"?e[o]:Reflect.get(e,o,n)},set:(e,o,n,r)=>Reflect.set(e,o,n,r)});return t}var Be=new Set(["exports","_exports"]);function re(s,t,e){let o=Object.keys(s),n=o.length;P===void 0&&queueMicrotask(K),P??(P=new Map);let r=P.get(s);return r===void 0&&(r={callbacks:[],keyCount:n},P.set(s,r)),r.keyCount!==n&&(r.callbacks.forEach(i=>i(o)),r.callbacks=[],r.keyCount=n),r.callbacks.push(i=>{let c=l=>p(t,null,l),a=i[n];a===void 0?c(void 0):s[a]===e?c(a):c(void 0)}),e}var P;function K(){Array.from(P?.entries()??[]).forEach(([s,{callbacks:t}])=>{let e=Object.keys(s);t.forEach(o=>o(e))}),P=void 0}var nt=class{constructor(t){this.enabledWatchers={},this.allWatchers={},this.enableReadonly=()=>{if(this.enableReadonly=void 0,!this.component.manager.isLit)return;let e=this.component.manager.internals;Object.entries(e.members).forEach(([o,[n]])=>{var r;n&_t.ReadOnly&&((r=e.setters)[o]??(r[o]=[]),e.setters[o].push(e.readonlySetter))})},this.trackedValue=$t,this.keyTrackers=[],this.getters={},this.setters={},this.accessorGetter={},this.accessorSetter={},this._exports=new WeakMap,this.readonlySetter=(e,o,n)=>{if(q.readOnly)return e;throw new Error(`Cannot assign to read-only property "${n}" of ${this.component.el.localName}. Trying to assign "${String(e)}"`)},this.component=t}firePropTrackers(t,e){let o=this.keyTrackers;this.trackedValue=$t,this.keyTrackers=[],o.forEach(n=>n(t,e))}getSetProxy(t){let e=this.component,o=e.constructor.prototype;if(this._getSetProxy(o,t,"class"),e.manager.isLit)return;let n=e.el.constructor.prototype;o!==n&&this._getSetProxy(n,t,"html")}_getSetProxy(t,e,o){let n=this.component,r=Qt(n,e),i;do i=Object.getOwnPropertyDescriptor(t,e);while(!i&&(t=Object.getPrototypeOf(t)));if(!i)return;let c=i.get,a=i.set,l=ot in c,d=ot in a;if(l&&d)return;let h=!l,m=!d,g=h?function(){let v=c.call(this),_=G.get(this);if(q.getter||_===void 0)return v;let I=_.manager.internals;v=I.accessorGetter[e](v,e);let y=I.getters[e]??Ct;for(let C=0;C<y.length;C++)v=y[C](v,e);return v}:c,L=m?function(v){let _=c.call(this),I=G.get(this);if(I===void 0){a.call(this,v);return}let y=I.manager.isLit?v??void 0:Zt(v,r),C=I.manager.internals;if(y===_)a.call(this,y);else{let qt=q.setter?Ct:C.setters[e]??Ct;for(let W=0;W<qt.length&&(y=qt[W](y,_,e),y!==_);W++);y=C.accessorSetter[e](y,_,e),a.call(this,y),y!==_&&C.enabledWatchers[e]?.forEach(W=>W(y,_,e))}C.keyTrackers.length>0&&C?.firePropTrackers(e,v)}:a;h&&(g[ot]=!0),m&&(L[ot]=!0),Object.defineProperty(t,e,{...i,get:g,set:L})}markExports(t,e){(typeof e=="object"&&e!==null||typeof e=="function")&&this._exports.set(e,t)}resolveExports(t){if(typeof t=="object"&&t!==null||typeof t=="function")return this._exports.get(t)}},Ct=[],ot=Symbol(),$t=Symbol();function it(s,t,e){var o;let n=t,r=s.manager.internals;(o=r.allWatchers)[n]??(o[n]=[]);let i=r.allWatchers[n],c=e,a=(l,d,h)=>p(c,null,l,d,h);return i.push(a),()=>{let l=i.indexOf(a);l!==-1&&i.splice(l,1)}}function ie(s,t,e){let o=s.manager.internals;return o.trackedValue!==$t&&o.trackedValue!==e&&o.firePropTrackers(void 0,void 0),o.keyTrackers.length===0&&queueMicrotask(()=>o.firePropTrackers(void 0,void 0)),o.trackedValue=e,o.keyTrackers.push((n,r)=>p(t,void 0,e===r?n:void 0)),e}function at(s=[V(),...wt()],t,e){let o=Array.isArray(s)?s:[s],n=o.length+1,r=c=>{n-=1,c!==void 0&&(n=Math.min(n,0)),n===0&&t(c)};o.forEach(c=>re(c,a=>r(a===void 0?void 0:{key:a,host:c,isReactive:!1}),e));let i=o.find(c=>"manager"in c&&typeof c.manager=="object"&&c.manager.component===c);return i&&ie(i,c=>r(c===void 0?void 0:{key:c,host:i,isReactive:!0}),e),e}function ae(s){q.readOnly=!0;try{return s()}finally{q.readOnly=!1}}var ce=s=>(...t)=>{let e=wt(),o=new s(...t),n=o.exports;xt(e.at(-1));let r=o.component.manager.internals;r.markExports(o,n),o.watchExports(c=>r.markExports(o,c)),Ve(o);let i=[o.component,...e].reverse();return at(i,c=>c===void 0?void 0:qe(o,c,n),n)};function qe(s,{host:t,key:e,isReactive:o},n){let r=t,i=r[e]!==s.exports,c=r[e]!==n,a=n!==s.exports;if(i&&!c&&a&&(r[e]=s.exports),t===s.component){if(o){let d=s.component.manager.internals;c&&d.markExports(s,r[e]),it(s.component,e,h=>{h!==s.exports&&d.markExports(s,h)})}s.assignedProperty=o?void 0:e}s.watchExports(()=>{if(r[e]===s.exports)return;let d=s.component.manager;d.internals.setters[e]?.includes(d.internals.readonlySetter)?ae(()=>{r[e]=s.exports}):r[e]=s.exports})}var he=(s,t)=>new Lt(s,t),Lt=class extends ne{constructor(t,e){let o="addController"in t,n=new Set;function r(l){n.add(l),!(rt in l)&&t.renderRoot&&t.el.isConnected&&l.hostConnected?.()}function i(l){n.delete(l),l.controllerRemoved?.()}let c=t;if(c.addController=r,c.removeController=i,!o){let l=e??t.constructor.__forceUpdate;c.requestUpdate=()=>l(t)}super(t),this.internals=new nt(this.component),this.destroyed=!1,this._updatePromise=new E,this._originalLifecycles={},this.isLit=o,this.component.manager=this,Jt(t,o),this._controllers=n,this.exports=void 0,this.hasDestroy=Ot in this.component&&typeof this.component.destroy=="function",this._bindLifecycleMethods();let a=this.internals;Object.keys(a.members).forEach(l=>{a.accessorGetter[l]=le,a.accessorSetter[l]=le,a.getSetProxy(l)}),o?this.internals.enabledWatchers=this.internals.allWatchers:Object.defineProperty(t,"updateComplete",{get:async()=>await this._updatePromise.promise}),queueMicrotask(a.enableReadonly),N(t),G.set(t.el,t),G.set(t,t)}_bindLifecycleMethods(){let t=this.component,e=this.isLit,o=t.el===t;this._originalLifecycles={_connectedCallback:e||o?void 0:t.connectedCallback,_disconnectedCallback:e||o?void 0:t.disconnectedCallback,_load:e?t.load:t.componentWillLoad,_loaded:e?t.loaded:t.componentDidLoad,_willUpdate:e?void 0:t.componentWillUpdate,_updated:e?void 0:t.componentDidUpdate,_destroy:t.destroy};let n=this._connectedCallback.bind(this),r=this._disconnectedCallback.bind(this),i=this._update.bind(this),c=this._updated.bind(this);e?t.constructor.prototype.addController.call(t,{hostConnected:n,hostDisconnected:r,hostUpdate:i,hostUpdated:c}):(t.connectedCallback=n,t.disconnectedCallback=r,t.componentWillLoad=this._load.bind(this),t.componentDidLoad=this._loaded.bind(this),t.componentWillUpdate=i,t.componentDidUpdate=c),this.hasDestroy&&(t.destroy=this.destroy.bind(this))}_connectedCallback(){if(this.destroyed){let e=this.component.el.localName;throw this.component.el.remove(),new Error(`The ${e} component has already been destroyed. It cannot be used again. If you meant to disconnect and reconnect a component without automatic destroy, set the ${Ot} prop.`)}this._autoDestroyTimeout!==void 0&&clearTimeout(this._autoDestroyTimeout);let t=this.internals;t.enabledWatchers=t.allWatchers,K(),t.enableReadonly?.(),this._controllers.forEach(Fe),this._originalLifecycles._connectedCallback?.call(this.component)}_disconnectedCallback(){this.destroyed||(this._controllers.forEach(Ke),this._originalLifecycles._disconnectedCallback?.call(this.component),this.hasDestroy&&this._setAutoDestroyTimeout())}async _load(){await Promise.allSettled(Array.from(this._controllers,Ye)),await this._originalLifecycles._load?.call(this.component),this.hasDestroy&&it(this.component,Ot,()=>this._setAutoDestroyTimeout())}_loaded(){this._controllers.forEach(Je),this._originalLifecycles._loaded?.call(this.component)}_update(){let t=this.component;return this._controllers.forEach(Ze,t.$changes),this._originalLifecycles._willUpdate?.call(this.component)}_updated(){let t=this.component;if(this._controllers.forEach(Qe,t.$changes),this._originalLifecycles._updated?.call(this.component),this.isLit)t.$changes=new Map;else{let e=this._updatePromise;this._updatePromise=new E,e.resolve(!0)}}async destroy(){if(!this.destroyed){if(this.component.el.isConnected){this.hasDestroy=!1;try{this.component.el.remove()}finally{this.hasDestroy=!0}}this._autoDestroyTimeout=void 0,this.destroyed=!0,this._controllers.forEach(Xe),this._controllers.clear(),await this._originalLifecycles._destroy?.call(this.component)}}_setAutoDestroyTimeout(){if(this._autoDestroyTimeout!==void 0&&clearTimeout(this._autoDestroyTimeout),!this.component.el.isConnected&&!this.component.autoDestroyDisabled){let t=()=>void this.destroy().catch(console.error);this._autoDestroyTimeout=Kt(t,Ge)}}},Ot="autoDestroyDisabled",Ge=1e3,le=s=>s;function Fe(s){"triggerConnected"in s?s.triggerConnected():p(s.hostConnected,s)}function Ke(s){"triggerDisconnected"in s?s.triggerDisconnected():p(s.hostDisconnected,s)}async function Ye(s){"triggerLoad"in s?await s.triggerLoad():await z(s.hostLoad,s)}function Je(s){"triggerLoaded"in s?s.triggerLoaded():p(s.hostLoaded,s)}function Ze(s){"triggerUpdate"in s?s.triggerUpdate(this):p(s.hostUpdate,s,this)}function Qe(s){"triggerUpdated"in s?s.triggerUpdated(this):p(s.hostUpdated,s,this)}function Xe(s){"triggerDestroy"in s?s.triggerDestroy():p(s.hostDestroy,s)}var de=s=>ts(void 0,s);var St=class extends F{constructor(t,e){super(t);let o=this.exports;try{N(this.component);let n=e(this.component,this),r=this.exports!==o;if(se(n)){r||this.setProvisionalExports(n);let i=n.then(c=>{this.exports=c,super.catchUpLifecycle()}).catch(c=>{this._ready.reject(c),console.error(c)});this.onLoad(async()=>await i)}else(!r||n!==void 0)&&(this.exports=n),queueMicrotask(()=>super.catchUpLifecycle())}catch(n){this._ready.reject(n),console.error(n)}}catchUpLifecycle(){}},ts=ce(St);var Ys=de;var Js=s=>(t={})=>de((e,o)=>{let n=Gt(e.el),r={_lang:n.lang,_t9nLocale:n.t9nLocale,_loading:!0},i=e;o.onLifecycle(()=>Ft(e.el,()=>s("./assets"),({t9nLocale:a,t9nStrings:l,lang:d})=>{let h={...l,_lang:d,_t9nLocale:a,_loading:!1};o.exports=h;let m=l.componentLabel;typeof m=="string"&&"label"in e&&e.label==null&&(e.label??(e.label=m)),c(i.messageOverrides)},t.name));function c(a){let l=o.exports,d=l._original??l,h=pe(d,a);a&&(h._original=d),o.exports=h}return"messageOverrides"in i&&o.onLifecycle(()=>it(i,"messageOverrides",c)),t.blocking?(o.setProvisionalExports(r,!1),o.ready):r});function pe(s,t){if(!t)return s;let e={...s};return Object.entries(t).forEach(([o,n])=>{typeof n=="object"?e[o]=pe(s[o],n):e[o]=n??s[o]}),e}var ct=globalThis,lt=ct.ShadowRoot&&(ct.ShadyCSS===void 0||ct.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Pt=Symbol(),ue=new WeakMap,Y=class{constructor(t,e,o){if(this._$cssResult$=!0,o!==Pt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(lt&&t===void 0){let o=e!==void 0&&e.length===1;o&&(t=ue.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),o&&ue.set(e,t))}return t}toString(){return this.cssText}},me=s=>new Y(typeof s=="string"?s:s+"",void 0,Pt),es=(s,...t)=>{let e=s.length===1?s[0]:t.reduce((o,n,r)=>o+(i=>{if(i._$cssResult$===!0)return i.cssText;if(typeof i=="number")return i;throw Error("Value passed to 'css' function must be a 'css' function result: "+i+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+s[r+1],s[0]);return new Y(e,s,Pt)},Nt=(s,t)=>{if(lt)s.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let o=document.createElement("style"),n=ct.litNonce;n!==void 0&&o.setAttribute("nonce",n),o.textContent=e.cssText,s.appendChild(o)}},ht=lt?s=>s:s=>s instanceof CSSStyleSheet?(t=>{let e="";for(let o of t.cssRules)e+=o.cssText;return me(e)})(s):s;var fe=";",dt=",",ye=":",$=(s=>(s[s.ATTRIBUTE=1]="ATTRIBUTE",s[s.REFLECT=2]="REFLECT",s[s.BOOLEAN=4]="BOOLEAN",s[s.NUMBER=8]="NUMBER",s[s.STATE=16]="STATE",s[s.READ_ONLY=32]="READ_ONLY",s[s.NO_ACCESSOR=64]="NO_ACCESSOR",s))($||{});function kt(s){let t=s;for(;t=t.parentNode??t.host;)if(t?.constructor?.lumina){let e=t;return e.manager?.loadedCalled||e._offspring.push(s),e._postLoad.promise}return!1}var ss=(s,t)=>function(o,n){if(!globalThis.customElements)return;let i=(n??o??{}).resourcesUrl;i&&s.setAssetPath(i),Object.entries(t).forEach(os)};function os([s,[t,e=""]]){if(customElements.get(s))return;let[o,n,r]=e.split(fe),i=o?o?.split(dt).map(ge):void 0,c=i?.map(([l])=>l),a=class extends Dt{static{this.observedAttributes=i?.map(([,l])=>l).filter(l=>l!=="")}static{this._properties=c}static{this._asyncMethods=n?n?.split(dt):void 0}static{this._syncMethods=r?.split(dt)}static{this._name=s}constructor(){!a._loadPromise&&(a._loadPromise=t(),a._initializePrototype()),super()}};customElements.define(s,a)}var pt=Object.defineProperty;function ge(s){let t=s.split(ye);return t.length===1?[t[0],st(t[0])]:t}var ns=globalThis.HTMLElement??ge,Dt=class extends ns{constructor(){super(),this._store={},this._pendingAttributes=[],this._postLoad=new E,this._postLoaded=new E,this._offspring=[],this._saveInstanceProperties();let t=this.constructor;t._LitConstructor?this._initializeComponent({a:t._LitConstructor}):t._loadPromise.then(as).then(this._initializeComponent.bind(this)).catch(e=>{this._postLoaded.reject(e),setTimeout(()=>{throw e})})}static{this.lumina=!0}static _initializePrototype(){this._properties?.forEach(this._bindProp,this),this._asyncMethods?.forEach(this._bindAsync,this),this._syncMethods?.forEach(this._bindSync,this)}static _bindProp(t){pt(this.prototype,t,{configurable:!0,enumerable:!0,get(){return this._store[t]},set(e){this._store[t]=e}})}static _bindAsync(t){pt(this.prototype,t,{async value(...e){return this._litElement||await this._postLoaded.promise,await this._litElement[t](...e)},configurable:!0})}static _bindSync(t){pt(this.prototype,t,{value(...e){return this._litElement[t](...e)},configurable:!0})}get manager(){return this._litElement?.manager}_saveInstanceProperties(){let t=this.constructor,e=this;t._properties?.forEach(o=>{Object.hasOwn(this,o)&&(this._store[o]=e[o],delete e[o])})}attributeChangedCallback(t,e,o){this._litElement?.attributeChangedCallback(t,e,o),this._litElement||this._pendingAttributes.push(t)}connectedCallback(){this._litElement?this._litElement.connectedCallback?.():queueMicrotask(()=>{this._ancestorLoad=kt(this)})}disconnectedCallback(){this._litElement?.disconnectedCallback?.()}async componentOnReady(){return await this._postLoaded.promise,this}_initializeComponent(t){let e=this.constructor,o=e._name,n=this._store,r=Object.values(t).find(h=>h.tagName===o),i=`${o}--lazy`,c=r;for(;c&&!Object.hasOwn(c,"lumina");)c=Object.getPrototypeOf(c);is(c),!e._LitConstructor&&(e._LitConstructor=r,customElements.define(i,r)),r.lazy=this;let l=document.createElement(i);r.lazy=void 0,this._litElement=l,this._store=l,this._pendingAttributes.forEach(h=>{let m=this.getAttribute(h);l.attributeChangedCallback(h,null,m)}),Object.entries(n).forEach(rs,l);let d=this.isConnected;(d||this._ancestorLoad)&&(l.connectedCallback?.(),d||l.disconnectedCallback())}addController(){}requestUpdate(){this._litElement?.requestUpdate()}};function rs([s,t]){this[s]=t}function is(s){let t=s.prototype,e=Element.prototype;Object.hasOwn(t,"isConnected")||(t.setAttribute=function(n,r){e.setAttribute.call(this.el,n,r)},t.removeAttribute=function(n){e.removeAttribute.call(this.el,n)},pt(t,"isConnected",{get(){return Reflect.get(e,"isConnected",this.el)}}))}var as=async s=>(await s.$$,s),Tt={};var Ut=globalThis,ut=Ut.trustedTypes,ve=ut?ut.createPolicy("lit-html",{createHTML:s=>s}):void 0,Mt="$lit$",x=`lit$${Math.random().toFixed(9).slice(2)}$`,It="?"+x,cs=`<${It}>`,T=document,Z=()=>T.createComment(""),Q=s=>s===null||typeof s!="object"&&typeof s!="function",jt=Array.isArray,xe=s=>jt(s)||typeof s?.[Symbol.iterator]=="function",Rt=`[
5
- \f\r]`,J=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ee=/-->/g,be=/>/g,D=RegExp(`>|${Rt}(?:([^\\s"'>=/]+)(${Rt}*=${Rt}*(?:[^
6
- \f\r"'\`<>=]|("|')|))|$)`,"g"),_e=/'/g,Ce=/"/g,we=/^(?:script|style|textarea|title)$/i,Vt=s=>(t,...e)=>({_$litType$:s,strings:t,values:e}),ro=Vt(1),io=Vt(2),ao=Vt(3),f=Symbol.for("lit-noChange"),u=Symbol.for("lit-nothing"),$e=new WeakMap,k=T.createTreeWalker(T,129);function Ae(s,t){if(!jt(s)||!s.hasOwnProperty("raw"))throw Error("invalid template strings array");return ve!==void 0?ve.createHTML(t):t}var Oe=(s,t)=>{let e=s.length-1,o=[],n,r=t===2?"<svg>":t===3?"<math>":"",i=J;for(let c=0;c<e;c++){let a=s[c],l,d,h=-1,m=0;for(;m<a.length&&(i.lastIndex=m,d=i.exec(a),d!==null);)m=i.lastIndex,i===J?d[1]==="!--"?i=Ee:d[1]!==void 0?i=be:d[2]!==void 0?(we.test(d[2])&&(n=RegExp("</"+d[2],"g")),i=D):d[3]!==void 0&&(i=D):i===D?d[0]===">"?(i=n??J,h=-1):d[1]===void 0?h=-2:(h=i.lastIndex-d[2].length,l=d[1],i=d[3]===void 0?D:d[3]==='"'?Ce:_e):i===Ce||i===_e?i=D:i===Ee||i===be?i=J:(i=D,n=void 0);let g=i===D&&s[c+1].startsWith("/>")?" ":"";r+=i===J?a+cs:h>=0?(o.push(l),a.slice(0,h)+Mt+a.slice(h)+x+g):a+x+(h===-2?c:g)}return[Ae(s,r+(s[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),o]},X=class s{constructor({strings:t,_$litType$:e},o){let n;this.parts=[];let r=0,i=0,c=t.length-1,a=this.parts,[l,d]=Oe(t,e);if(this.el=s.createElement(l,o),k.currentNode=this.el.content,e===2||e===3){let h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(n=k.nextNode())!==null&&a.length<c;){if(n.nodeType===1){if(n.hasAttributes())for(let h of n.getAttributeNames())if(h.endsWith(Mt)){let m=d[i++],g=n.getAttribute(h).split(x),L=/([.?@])?(.*)/.exec(m);a.push({type:1,index:r,name:L[2],strings:g,ctor:L[1]==="."?ft:L[1]==="?"?yt:L[1]==="@"?gt:U}),n.removeAttribute(h)}else h.startsWith(x)&&(a.push({type:6,index:r}),n.removeAttribute(h));if(we.test(n.tagName)){let h=n.textContent.split(x),m=h.length-1;if(m>0){n.textContent=ut?ut.emptyScript:"";for(let g=0;g<m;g++)n.append(h[g],Z()),k.nextNode(),a.push({type:2,index:++r});n.append(h[m],Z())}}}else if(n.nodeType===8)if(n.data===It)a.push({type:2,index:r});else{let h=-1;for(;(h=n.data.indexOf(x,h+1))!==-1;)a.push({type:7,index:r}),h+=x.length-1}r++}}static createElement(t,e){let o=T.createElement("template");return o.innerHTML=t,o}};function R(s,t,e=s,o){if(t===f)return t;let n=o!==void 0?e._$Co?.[o]:e._$Cl,r=Q(t)?void 0:t._$litDirective$;return n?.constructor!==r&&(n?._$AO?.(!1),r===void 0?n=void 0:(n=new r(s),n._$AT(s,e,o)),o!==void 0?(e._$Co??=[])[o]=n:e._$Cl=n),n!==void 0&&(t=R(s,n._$AS(s,t.values),n,o)),t}var mt=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:o}=this._$AD,n=(t?.creationScope??T).importNode(e,!0);k.currentNode=n;let r=k.nextNode(),i=0,c=0,a=o[0];for(;a!==void 0;){if(i===a.index){let l;a.type===2?l=new H(r,r.nextSibling,this,t):a.type===1?l=new a.ctor(r,a.name,a.strings,this,t):a.type===6&&(l=new vt(r,this,t)),this._$AV.push(l),a=o[++c]}i!==a?.index&&(r=k.nextNode(),i++)}return k.currentNode=T,n}p(t){let e=0;for(let o of this._$AV)o!==void 0&&(o.strings!==void 0?(o._$AI(t,o,e),e+=o.strings.length-2):o._$AI(t[e])),e++}},H=class s{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,o,n){this.type=2,this._$AH=u,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=o,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=R(this,t,e),Q(t)?t===u||t==null||t===""?(this._$AH!==u&&this._$AR(),this._$AH=u):t!==this._$AH&&t!==f&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):xe(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==u&&Q(this._$AH)?this._$AA.nextSibling.data=t:this.T(T.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:o}=t,n=typeof o=="number"?this._$AC(t):(o.el===void 0&&(o.el=X.createElement(Ae(o.h,o.h[0]),this.options)),o);if(this._$AH?._$AD===n)this._$AH.p(e);else{let r=new mt(n,this),i=r.u(this.options);r.p(e),this.T(i),this._$AH=r}}_$AC(t){let e=$e.get(t.strings);return e===void 0&&$e.set(t.strings,e=new X(t)),e}k(t){jt(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,o,n=0;for(let r of t)n===e.length?e.push(o=new s(this.O(Z()),this.O(Z()),this,this.options)):o=e[n],o._$AI(r),n++;n<e.length&&(this._$AR(o&&o._$AB.nextSibling,n),e.length=n)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){let o=t.nextSibling;t.remove(),t=o}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},U=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,o,n,r){this.type=1,this._$AH=u,this._$AN=void 0,this.element=t,this.name=e,this._$AM=n,this.options=r,o.length>2||o[0]!==""||o[1]!==""?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=u}_$AI(t,e=this,o,n){let r=this.strings,i=!1;if(r===void 0)t=R(this,t,e,0),i=!Q(t)||t!==this._$AH&&t!==f,i&&(this._$AH=t);else{let c=t,a,l;for(t=r[0],a=0;a<r.length-1;a++)l=R(this,c[o+a],e,a),l===f&&(l=this._$AH[a]),i||=!Q(l)||l!==this._$AH[a],l===u?t=u:t!==u&&(t+=(l??"")+r[a+1]),this._$AH[a]=l}i&&!n&&this.j(t)}j(t){t===u?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},ft=class extends U{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===u?void 0:t}},yt=class extends U{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==u)}},gt=class extends U{constructor(t,e,o,n,r){super(t,e,o,n,r),this.type=5}_$AI(t,e=this){if((t=R(this,t,e,0)??u)===f)return;let o=this._$AH,n=t===u&&o!==u||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,r=t!==u&&(o===u||n);n&&this.element.removeEventListener(this.name,this,o),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},vt=class{constructor(t,e,o){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(t){R(this,t)}},Le={M:Mt,P:x,A:It,C:1,L:Oe,R:mt,D:xe,V:R,I:H,H:U,N:yt,U:gt,B:ft,F:vt},ls=Ut.litHtmlPolyfillSupport;ls?.(X,H),(Ut.litHtmlVersions??=[]).push("3.2.1");var Ht=(s,t,e)=>{let o=e?.renderBefore??t,n=o._$litPart$;if(n===void 0){let r=e?.renderBefore??null;o._$litPart$=n=new H(t.insertBefore(Z(),r),r,void 0,e??{})}return n._$AI(s),n};var{is:hs,defineProperty:ds,getOwnPropertyDescriptor:ps,getOwnPropertyNames:us,getOwnPropertySymbols:ms,getPrototypeOf:fs}=Object,bt=globalThis,Se=bt.trustedTypes,ys=Se?Se.emptyScript:"",gs=bt.reactiveElementPolyfillSupport,tt=(s,t)=>s,Et={toAttribute(s,t){switch(t){case Boolean:s=s?ys:null;break;case Object:case Array:s=s==null?s:JSON.stringify(s)}return s},fromAttribute(s,t){let e=s;switch(t){case Boolean:e=s!==null;break;case Number:e=s===null?null:Number(s);break;case Object:case Array:try{e=JSON.parse(s)}catch{e=null}}return e}},Wt=(s,t)=>!hs(s,t),Pe={attribute:!0,type:String,converter:Et,reflect:!1,hasChanged:Wt};Symbol.metadata??=Symbol("metadata"),bt.litPropertyMetadata??=new WeakMap;var w=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=Pe){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){let o=Symbol(),n=this.getPropertyDescriptor(t,o,e);n!==void 0&&ds(this.prototype,t,n)}}static getPropertyDescriptor(t,e,o){let{get:n,set:r}=ps(this.prototype,t)??{get(){return this[e]},set(i){this[e]=i}};return{get(){return n?.call(this)},set(i){let c=n?.call(this);r.call(this,i),this.requestUpdate(t,c,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Pe}static _$Ei(){if(this.hasOwnProperty(tt("elementProperties")))return;let t=fs(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(tt("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(tt("properties"))){let e=this.properties,o=[...us(e),...ms(e)];for(let n of o)this.createProperty(n,e[n])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[o,n]of e)this.elementProperties.set(o,n)}this._$Eh=new Map;for(let[e,o]of this.elementProperties){let n=this._$Eu(e,o);n!==void 0&&this._$Eh.set(n,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let o=new Set(t.flat(1/0).reverse());for(let n of o)e.unshift(ht(n))}else t!==void 0&&e.push(ht(t));return e}static _$Eu(t,e){let o=e.attribute;return o===!1?void 0:typeof o=="string"?o:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let o of e.keys())this.hasOwnProperty(o)&&(t.set(o,this[o]),delete this[o]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Nt(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,o){this._$AK(t,o)}_$EC(t,e){let o=this.constructor.elementProperties.get(t),n=this.constructor._$Eu(t,o);if(n!==void 0&&o.reflect===!0){let r=(o.converter?.toAttribute!==void 0?o.converter:Et).toAttribute(e,o.type);this._$Em=t,r==null?this.removeAttribute(n):this.setAttribute(n,r),this._$Em=null}}_$AK(t,e){let o=this.constructor,n=o._$Eh.get(t);if(n!==void 0&&this._$Em!==n){let r=o.getPropertyOptions(n),i=typeof r.converter=="function"?{fromAttribute:r.converter}:r.converter?.fromAttribute!==void 0?r.converter:Et;this._$Em=n,this[n]=i.fromAttribute(e,r.type),this._$Em=null}}requestUpdate(t,e,o){if(t!==void 0){if(o??=this.constructor.getPropertyOptions(t),!(o.hasChanged??Wt)(this[t],e))return;this.P(t,e,o)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(t,e,o){this._$AL.has(t)||this._$AL.set(t,e),o.reflect===!0&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[n,r]of this._$Ep)this[n]=r;this._$Ep=void 0}let o=this.constructor.elementProperties;if(o.size>0)for(let[n,r]of o)r.wrapped!==!0||this._$AL.has(n)||this[n]===void 0||this.P(n,this[n],r)}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(o=>o.hostUpdate?.()),this.update(e)):this._$EU()}catch(o){throw t=!1,this._$EU(),o}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach(e=>this._$EC(e,this[e])),this._$EU()}updated(t){}firstUpdated(t){}};w.elementStyles=[],w.shadowRootOptions={mode:"open"},w[tt("elementProperties")]=new Map,w[tt("finalized")]=new Map,gs?.({ReactiveElement:w}),(bt.reactiveElementVersions??=[]).push("2.0.4");var A=class extends w{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Ht(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return f}};A._$litElement$=!0,A.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:A});var vs=globalThis.litElementPolyfillSupport;vs?.({LitElement:A});(globalThis.litElementVersions??=[]).push("4.1.1");var b={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},M=s=>(...t)=>({_$litDirective$:s,values:t}),O=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,o){this._$Ct=t,this._$AM=e,this._$Ci=o}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};var ke=M(class extends O{constructor(s){if(super(s),s.type!==b.ATTRIBUTE||s.name!=="class"||s.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(s){return" "+Object.keys(s).filter(t=>s[t]).join(" ")+" "}update(s,[t]){if(this.st===void 0){this.st=new Set,s.strings!==void 0&&(this.nt=new Set(s.strings.join(" ").split(/\s/).filter(o=>o!=="")));for(let o in t)t[o]&&!this.nt?.has(o)&&this.st.add(o);return this.render(t)}let e=s.element.classList;for(let o of this.st)o in t||(e.remove(o),this.st.delete(o));for(let o in t){let n=!!t[o];n===this.st.has(o)||this.nt?.has(o)||(n?(e.add(o),this.st.add(o)):(e.remove(o),this.st.delete(o)))}return f}});var Te="important",bs=" !"+Te,_s=M(class extends O{constructor(s){if(super(s),s.type!==b.ATTRIBUTE||s.name!=="style"||s.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(s){return Object.keys(s).reduce((t,e)=>{let o=s[e];return o==null?t:t+`${e=e.includes("-")?e:e.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${o};`},"")}update(s,[t]){let{style:e}=s.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(let o of this.ft)t[o]==null&&(this.ft.delete(o),o.includes("-")?e.removeProperty(o):e[o]=null);for(let o in t){let n=t[o];if(n!=null){this.ft.add(o);let r=typeof n=="string"&&n.endsWith(bs);o.includes("-")||r?e.setProperty(o,r?n.slice(0,-11):n,r?Te:""):e[o]=n}}return f}});var{I:Cs}=Le;var Ue=s=>s.strings===void 0,Re=()=>document.createComment(""),mn=(s,t,e)=>{let o=s._$AA.parentNode,n=t===void 0?s._$AB:t._$AA;if(e===void 0){let r=o.insertBefore(Re(),n),i=o.insertBefore(Re(),n);e=new Cs(r,i,s,s.options)}else{let r=e._$AB.nextSibling,i=e._$AM,c=i!==s;if(c){let a;e._$AQ?.(s),e._$AM=s,e._$AP!==void 0&&(a=s._$AU)!==i._$AU&&e._$AP(a)}if(r!==n||c){let a=e._$AA;for(;a!==r;){let l=a.nextSibling;o.insertBefore(a,n),a=l}}}return e},fn=(s,t,e=s)=>(s._$AI(t,e),s),$s={},Me=(s,t=$s)=>s._$AH=t,yn=s=>s._$AH,gn=s=>{s._$AP?.(!1,!0);let t=s._$AA,e=s._$AB.nextSibling;for(;t!==e;){let o=t.nextSibling;t.remove(),t=o}};var xs=M(class extends O{constructor(s){if(super(s),s.type!==b.PROPERTY&&s.type!==b.ATTRIBUTE&&s.type!==b.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!Ue(s))throw Error("`live` bindings can only contain a single expression")}render(s){return s}update(s,[t]){if(t===f||t===u)return t;let e=s.element,o=s.name;if(s.type===b.PROPERTY){if(t===e[o])return f}else if(s.type===b.BOOLEAN_ATTRIBUTE){if(!!t===e.hasAttribute(o))return f}else if(s.type===b.ATTRIBUTE&&e.getAttribute(o)===t+"")return f;return Me(s),t}});var Ie=(s="",t={},e=V())=>{let o={emit:n=>{s===""&&K();let r=new CustomEvent(s,{detail:n,cancelable:!0,bubbles:!0,composed:!0,...t});return e.el.dispatchEvent(r),r}};return s===""&&at(void 0,n=>{s=n.key},o),o},Vn=Ie.bind(null,"");var As=()=>{},Bt=class s extends A{constructor(){super(),this.el=this.constructor.lazy??this,this.manager=he(this),this._postLoad=this.constructor.lazy?._postLoad??new E,this._offspring=this.constructor.lazy?._offspring??[],this._postLoaded=this.constructor.lazy?._postLoaded??new E,this._enableUpdating=this.enableUpdating,this.enableUpdating=As;let t=s.prototype.shouldUpdate;this.shouldUpdate!==t&&(this._originalShouldUpdate=this.shouldUpdate,this.shouldUpdate=t),!1}static finalizeStyles(t){let e=super.finalizeStyles(t),o=this.shadowRootOptions===Tt;return this.runtime?.commonStyles===void 0||o?e:[this.runtime.commonStyles,...e]}static createProperty(t,e){let o=typeof e=="number"?e:Array.isArray(e)?e[0]:0,n=Array.isArray(e)?e[1]:void 0;super.createProperty(t,{attribute:o&$.ATTRIBUTE&&typeof t=="string"?st(t):!1,reflect:!!(o&$.REFLECT),type:o&$.BOOLEAN?Boolean:o&$.NUMBER?Number:void 0,state:!!(o&$.STATE),readOnly:!!(o&$.READ_ONLY),noAccessor:!!(o&$.NO_ACCESSOR),...n})}static{this.lumina=!0}connectedCallback(){if(this.el.hasAttribute("defer-hydration"))return;let t=!this.manager.connectedCalled;super.connectedCallback(),t&&queueMicrotask(()=>this._load().catch(e=>{this._postLoaded.reject(e),setTimeout(()=>{throw e})}))}createRenderRoot(){let t=this.el.shadowRoot,e=this.constructor,o=e.shadowRootOptions,r=t??(o===Tt?this.el:this.el.attachShadow(o));if(t)return A.prototype.createRenderRoot.call(this),t;if(this.isConnected){let i=r.getRootNode();i.adoptedStyleSheets=[...i.adoptedStyleSheets,...e.elementStyles.map(c=>"styleSheet"in c?c.styleSheet:c)]}return r}async _load(){let t=this.el._ancestorLoad??kt(this.el);t&&await t,await this.manager._load(),this._enableUpdating(!0),this.performUpdate(),this._postLoad.resolve(),await Promise.resolve();let e=this._offspring.filter(o=>!o.manager?.loadedCalled);e.length&&await Promise.allSettled(e.map(async o=>await o.componentOnReady())),this._offspring.length=0,this.el.setAttribute(this.constructor.runtime.hydratedAttribute,""),this.manager._loaded(),this._postLoaded.resolve()}shouldUpdate(t){return this.$changes=t,this._originalShouldUpdate?.(t)??!0}listen(t,e,o){let n=e?.bind(this)??e;this.manager.onLifecycle(()=>(this.el.addEventListener(t,n,o),()=>this.el.removeEventListener(t,n,o)))}listenOn(t,e,o,n){let r=o?.bind(this)??o;this.manager.onLifecycle(()=>(t.addEventListener(e,r,n),()=>t.removeEventListener(e,r,n)))}async componentOnReady(){return await this._postLoaded.promise,this}};Bt.$createEvent=Ie;function je(s){let t,e=n=>{t=new URL(n,globalThis.location?.href||void 0).href},o={...s,getAssetPath(n){let r=new URL(n,t);return r.origin!==globalThis.location?.origin?r.href:r.pathname},setAssetPath:e,customElement(n,r){r.runtime=o,r.tagName=n,customElements.get(n)||customElements.define(n,r)}};return e(s.defaultAssetPath),o}var Hn=s=>typeof s=="object"&&s!=null?ke(s):s;var Wn=u;var Os=je({defaultAssetPath:"https://jsdev.arcgis.com/coding-components/next/",hydratedAttribute:"hydrated"}),{customElement:qn,getAssetPath:Gn,setAssetPath:Fn}=Os;export{Ys as a,Js as b,es as c,ss as d,Tt as e,ro as f,f as g,u as h,b as i,M as j,O as k,Ue as l,mn as m,fn as n,Me as o,yn as p,gn as q,Vn as r,Bt as s,Hn as t,Wn as u,Os as v,qn as w,Gn as x};
@@ -1,3 +0,0 @@
1
- /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
- See https://js.arcgis.com/4.33/esri/copyright.txt for details.
3
- v4.33.0-next.94 */
@@ -1,4 +0,0 @@
1
- /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
- See https://js.arcgis.com/4.33/esri/copyright.txt for details.
3
- v4.33.0-next.94 */
4
- import{a,b}from"./ZBFJT24O.js";import"./TBUHAI37.js";import"./B45X2RCU.js";export{a as conf,b as language};
@@ -1,4 +0,0 @@
1
- /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
- See https://js.arcgis.com/4.33/esri/copyright.txt for details.
3
- v4.33.0-next.94 */
4
- import{b,c as r,d as _,e as v}from"./6Q43GJXJ.js";import{b as l}from"./IZR6CPOM.js";import{a as f}from"./I65OQ4H6.js";import{a as p}from"./KW7UAGYK.js";import"./EP2YUSNH.js";import{c as u,f as s,h as c,r as a,s as h,w as m}from"./LBDYBLQS.js";import{d as g,e as d}from"./5BIHMNUZ.js";import"./TBUHAI37.js";import"./B45X2RCU.js";function S(o){return!Array.isArray(o)||!o.length?!1:Array.isArray(o[0].suggestions)}var $=u`:host{background-color:var(--calcite-color-foreground-1);.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}.sticky{position:sticky;top:0;z-index:10}calcite-flow{height:100%}calcite-block{p:first-of-type{margin-top:0}code{font-family:var(--calcite-code-family)}pre{direction:ltr;overflow-x:auto;background-color:var(--calcite-color-foreground-2);padding:var(--calcite-spacing-sm);code{font-size:var(--calcite-font-size--2)}}}calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}}`,n=class extends h{constructor(){super(...arguments),this._beforeBack=async()=>{this._selectedSuggestion=void 0},this.messages=f(),this._colorizeStyle="",this._filterValue="",this.arcgisClose=a({bubbles:!1}),this.arcgisItemSelected=a({bubbles:!1})}static{this.properties={_colorizeStyle:16,_filterValue:16,_selectedSuggestion:16,suggestions:0}}static{this.styles=$}load(){this._colorizeStyle=r(),this._themeChangedListener=_(()=>this._colorizeStyle=r())}willUpdate(e){e.has("suggestions")&&this.suggestionsPropChanged()}disconnectedCallback(){super.disconnectedCallback(),this._flowObserver?.disconnect(),this._themeChangedListener?.dispose()}suggestionsPropChanged(){this._selectedSuggestion=void 0}flowFocusHandler(e){if(!e){this._flowObserver?.disconnect(),this._flowObserver=void 0;return}this._flowObserver||(this._flowObserver=new MutationObserver(()=>{d(e.querySelector("calcite-flow-item:last-child"),"calcite-input")}),this._flowObserver.observe(e,{attributes:!0,attributeFilter:["id"],childList:!0}))}_updateFilterValue(e){this._filterValue=e.currentTarget?.value??""}_emitItemSelected(e,t){let i=e;(!i.key||i.key==="Enter")&&(e.preventDefault(),this.arcgisItemSelected.emit(t.code))}_showSuggestionDetail(e,t){e.stopPropagation(),this._selectedSuggestion=t}_emitClose(){this.arcgisClose.emit()}_colorizeCode(e){e!==void 0&&b(e,this._selectedSuggestion.code)}renderSuggestionGroups(){return this.suggestions===void 0?null:S(this.suggestions)?this.suggestions.map(e=>s`<calcite-list-item-group .heading=${e.label}>${this.renderSuggestionListItems(e.suggestions)}</calcite-list-item-group>`):this.renderSuggestionListItems(this.suggestions)}renderSuggestionListItems(e){return e=p(e,"label",this._filterValue),e.length?e.map(t=>s`<calcite-list-item .label=${t.label} .description=${t.description} @calciteListItemSelect=${i=>this._emitItemSelected(i,t)} @keydown=${i=>this._emitItemSelected(i,t)} data-item=${t??c}><calcite-action slot=actions-end .text=${this.messages.expand??""} scale=s icon=chevron-right icon-flip-rtl @click=${i=>this._showSuggestionDetail(i,t)} data-item=${t??c}></calcite-action></calcite-list-item>`):s`<div class="notice-container">${this.messages.noitems}</div>`}renderSuggestionFlowItem(){let e=this._selectedSuggestion;return e?s`<calcite-flow-item .heading=${this.messages.suggestions} closable @calciteFlowItemClose=${this._emitClose} .beforeBack=${this._beforeBack} selected><calcite-button width=half slot=footer appearance=outline kind=brand icon-start=code scale=s @click=${t=>this._emitItemSelected(t,e)} data-item=${e??c} ${l(g)}>${this.messages.insert}</calcite-button><calcite-block open .heading=${e.label} .description=${e.description}><div .innerHTML=${v(e.documentation)??""}></div><pre><code ${l(this._colorizeCode)}></code></pre></calcite-block></calcite-flow-item>`:null}render(){return s`<style>${this._colorizeStyle}</style><calcite-flow ${l(this.flowFocusHandler)}><calcite-flow-item .heading=${this.messages.suggestions} closable @calciteFlowItemClose=${this._emitClose} .selected=${!this._selectedSuggestion}><calcite-input .value=${this._filterValue} icon=magnifying-glass clearable @calciteInputInput=${this._updateFilterValue} class="sticky" scale=m></calcite-input><calcite-list label=suggestions>${this.renderSuggestionGroups()}</calcite-list></calcite-flow-item>${this.renderSuggestionFlowItem()}</calcite-flow>`}};m("arcgis-arcade-suggestions",n);export{n as ArcgisArcadeSuggestions};
@@ -1,3 +0,0 @@
1
- /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
- See https://js.arcgis.com/4.33/esri/copyright.txt for details.
3
- v4.33.0-next.94 */
@@ -1,3 +0,0 @@
1
- /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
- See https://js.arcgis.com/4.33/esri/copyright.txt for details.
3
- v4.33.0-next.94 */
@@ -1,3 +0,0 @@
1
- /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
- See https://js.arcgis.com/4.33/esri/copyright.txt for details.
3
- v4.33.0-next.94 */
@@ -1,3 +0,0 @@
1
- /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
- See https://js.arcgis.com/4.33/esri/copyright.txt for details.
3
- v4.33.0-next.94 */
@@ -1,4 +0,0 @@
1
- /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
- See https://js.arcgis.com/4.33/esri/copyright.txt for details.
3
- v4.33.0-next.94 */
4
- import{a as D}from"./I65OQ4H6.js";import{a as M}from"./PY4OG5MY.js";import"./SYOOXRWH.js";import"./2UOMUDCU.js";import"./C6GPTPY4.js";import"./KW7UAGYK.js";import"./EP2YUSNH.js";import{c as y,f as p,g as x,i as F,j as S,k as R,m as g,n as u,o as V,p as E,q as v,r as $,s as L,w as P}from"./LBDYBLQS.js";import"./5BIHMNUZ.js";import"./TBUHAI37.js";import"./B45X2RCU.js";var q=(a,i,t)=>{let d=new Map;for(let e=i;e<=t;e++)d.set(a[e],e);return d},_=S(class extends R{constructor(a){if(super(a),a.type!==F.CHILD)throw Error("repeat() can only be used in text expressions")}dt(a,i,t){let d;t===void 0?t=i:i!==void 0&&(d=i);let e=[],n=[],o=0;for(let m of a)e[o]=d?d(m,o):o,n[o]=t(m,o),o++;return{values:n,keys:e}}render(a,i,t){return this.dt(a,i,t).values}update(a,[i,t,d]){let e=E(a),{values:n,keys:o}=this.dt(i,t,d);if(!Array.isArray(e))return this.ut=o,n;let m=this.ut??=[],h=[],b,k,s=0,c=e.length-1,l=0,r=n.length-1;for(;s<=c&&l<=r;)if(e[s]===null)s++;else if(e[c]===null)c--;else if(m[s]===o[l])h[l]=u(e[s],n[l]),s++,l++;else if(m[c]===o[r])h[r]=u(e[c],n[r]),c--,r--;else if(m[s]===o[r])h[r]=u(e[s],n[r]),g(a,h[r+1],e[s]),s++,r--;else if(m[c]===o[l])h[l]=u(e[c],n[l]),g(a,e[s],e[c]),c--,l++;else if(b===void 0&&(b=q(o,l,r),k=q(m,s,c)),b.has(m[s]))if(b.has(m[c])){let f=k.get(o[l]),w=f!==void 0?e[f]:null;if(w===null){let I=g(a,e[s]);u(I,n[l]),h[l]=I}else h[l]=u(w,n[l]),g(a,e[s],w),e[f]=null;l++}else v(e[c]),c--;else v(e[s]),s++;for(;l<=r;){let f=g(a,h[r+1]);u(f,n[l]),h[l++]=f}for(;s<=c;){let f=e[s++];f!==null&&v(f)}return this.ut=o,V(a,h),x}});var A=y`:host{calcite-flow{height:100%}calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}}`,C=class extends L{constructor(){super(...arguments),this.messages=D(),this._filterValue="",this._flowItemRenderers=[],this._mutationCounter=1,this.loading=!1,this.arcgisClose=$({bubbles:!1}),this.arcgisFieldSelected=$({bubbles:!1})}static{this.properties={_filterValue:16,_flowItemRenderers:16,_mutationCounter:16,loading:5,modelId:1}}static{this.styles=A}willUpdate(i){i.has("modelId")&&(this._flowItemRenderers=[])}disconnectedCallback(){super.disconnectedCallback(),this._flowObserver?.disconnect()}_handleSelectField(i){if(i.target instanceof HTMLElement)switch(i.target.tagName.toLowerCase()){case"calcite-list-item":{let t=i.target.value;this.arcgisFieldSelected.emit(t??"");break}case"calcite-action":i.stopPropagation();break}}_handleSelectDomain(i){let t=i.target.value;this.arcgisFieldSelected.emit(t?`'${t}'`:"")}_emitClose(){this.arcgisClose.emit()}render(){let i=M.getFeatureLayerForModel(this.modelId??"");return this.loading||!this.modelId||!i?p`<calcite-block .heading=${this.messages.availablefields??""}></calcite-block>`:p`<calcite-flow><calcite-flow-item .heading=${this.messages.availablefields??""} closable @calciteFlowItemClose=${this._emitClose}><calcite-list label=fields filter-enabled>${_(i.fields,t=>t.name,t=>p`<calcite-list-item @click=${this._handleSelectField} .label=${t.name} .description=${t.alias??""} .value=${t.name}>${t.domain&&p`<calcite-action slot=actions-end text=open icon=chevron-right @click=${()=>{let d=t.domain;d?.type==="coded-value"&&(this._flowItemRenderers=[...this._flowItemRenderers,()=>p`<calcite-flow-item closable .heading=${this.messages.domainvalues??""} .description=${t.name} @calciteFlowItemClose=${this._emitClose}><calcite-list label=domains>${_(d.codedValues,e=>e.code,e=>p`<calcite-list-item @click=${this._handleSelectDomain} .label=${e.name} .description=${String(e.code)} .value=${String(e.code)}></calcite-list-item>`)}</calcite-list></calcite-flow-item>`])}}></calcite-action>`||""}</calcite-list-item>`)}</calcite-list></calcite-flow-item>${this._flowItemRenderers.map(t=>t())}</calcite-flow>`}};P("arcgis-sql-expression-fields",C);export{C as SqlExpressionFields};