@arcgis/coding-components 5.0.0-next.86 → 5.0.0-next.88

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 (105) hide show
  1. package/dist/addons/arcade-coding-assistant/chat-helper.d.ts +2 -2
  2. package/dist/addons.js +1 -1
  3. package/dist/cdn/{CEE3ZJUA.js → 36XPZFOT.js} +2 -2
  4. package/dist/cdn/{WI4BDXBY.js → 3M7SZYPN.js} +2 -2
  5. package/dist/cdn/{OVV6WXX7.js → 472G7GZ4.js} +2 -2
  6. package/dist/cdn/{J2SETKWM.js → 4GT2KL7A.js} +2 -2
  7. package/dist/cdn/{JPLSYGHT.js → 4RXKRZBZ.js} +2 -2
  8. package/dist/cdn/{SWSJLICP.js → 57XZ5RMI.js} +3 -3
  9. package/dist/cdn/{IVXRAZY5.js → 5M26RSF3.js} +1 -1
  10. package/dist/cdn/{HI5LKY6R.js → 5QVEAJ73.js} +2 -2
  11. package/dist/cdn/{33X46FFL.js → 5TX2G7XJ.js} +2 -2
  12. package/dist/cdn/{RZ4DRTSI.js → 64XMCCSN.js} +2 -2
  13. package/dist/cdn/{XDOANCWB.js → 6NHI3LBU.js} +2 -2
  14. package/dist/cdn/{5MPQLT5X.js → 7EIT3Q6J.js} +2 -2
  15. package/dist/cdn/BQ7FHQUX.js +4 -0
  16. package/dist/cdn/{DD6ZRT43.js → BQLGOZSH.js} +2 -2
  17. package/dist/cdn/{HNMU72SH.js → C6BD4IBD.js} +2 -2
  18. package/dist/cdn/{N3MHW6AM.js → C6JXJQWK.js} +2 -2
  19. package/dist/cdn/{W7DH63B3.js → CIIPVQFF.js} +2 -2
  20. package/dist/cdn/{KT6E5ZTM.js → DH5FCW7L.js} +2 -2
  21. package/dist/cdn/{S5A4U67W.js → EF6D3U5O.js} +2 -2
  22. package/dist/cdn/{5WXTHFB6.js → HD4ON74D.js} +1 -1
  23. package/dist/cdn/{5JYRNSC3.js → HGZJRTUC.js} +2 -2
  24. package/dist/cdn/HLGHGJVC.js +6 -0
  25. package/dist/cdn/{GGKL5FWT.js → HY3ILV5W.js} +1 -1
  26. package/dist/cdn/{HMWZEC7D.js → I4FXINPB.js} +2 -2
  27. package/dist/cdn/{MCGQ6KRV.js → J76PBJ7W.js} +1 -1
  28. package/dist/cdn/{VYCA3AJT.js → JEX3DDG3.js} +1 -1
  29. package/dist/cdn/{3JQZLQ6X.js → JSKAVLMU.js} +1 -1
  30. package/dist/cdn/{WHDQGCW7.js → KBNJTYAP.js} +2 -2
  31. package/dist/cdn/{MDIQFVFA.js → LTLA7NXM.js} +2 -2
  32. package/dist/cdn/{IC67HR3V.js → LYEKOYZT.js} +2 -2
  33. package/dist/cdn/{BTHHVPUO.js → MOPDGBIL.js} +2 -2
  34. package/dist/cdn/{BCHJVYE5.js → NCOVKISH.js} +2 -2
  35. package/dist/cdn/{ZK3HCKLO.js → ND46SRRX.js} +2 -2
  36. package/dist/cdn/{FITYHC24.js → OXDUPWIV.js} +2 -2
  37. package/dist/cdn/{XIOTAEZY.js → Q3EJREP5.js} +2 -2
  38. package/dist/cdn/{V4TG6GDW.js → QJMI3PBT.js} +2 -2
  39. package/dist/cdn/{GGTAF434.js → QXMHPMV7.js} +2 -2
  40. package/dist/cdn/{3DX6HUJZ.js → SNWULMXU.js} +2 -2
  41. package/dist/cdn/{2LDLCX6R.js → SXRTIYTX.js} +2 -2
  42. package/dist/cdn/{A7GC2RAP.js → TWLAYRFG.js} +1 -1
  43. package/dist/cdn/{HMLBWY5X.js → TXYUJLT6.js} +2 -2
  44. package/dist/cdn/{G2MNT5MH.js → U33ZYSZW.js} +2 -2
  45. package/dist/cdn/{HUDN4YMY.js → V2VZZXEA.js} +1 -1
  46. package/dist/cdn/{TTAY72VH.js → V3QTIBFO.js} +2 -2
  47. package/dist/cdn/{ROG4QBVE.js → V7N4GWXK.js} +2 -2
  48. package/dist/cdn/{USZ2KUJP.js → WPA27SNO.js} +1 -1
  49. package/dist/cdn/{7I7EBDPY.js → XCOFPTGU.js} +2 -2
  50. package/dist/cdn/{SE4PPQQW.js → XQAIHQEQ.js} +2 -2
  51. package/dist/cdn/assets/code-editor/sql-expr.worker.js +888 -879
  52. package/dist/cdn/index.js +2 -2
  53. package/dist/chunks/arcade-contribution.js +1 -1
  54. package/dist/chunks/arcade-defaults.js +1 -1
  55. package/dist/chunks/arcade-executor.js +1 -1
  56. package/dist/chunks/arcade-mode.js +1 -1
  57. package/dist/chunks/arcade-service-accessors.js +1 -1
  58. package/dist/chunks/colorize.js +1 -1
  59. package/dist/chunks/editor.js +1 -1
  60. package/dist/chunks/fields.js +1 -1
  61. package/dist/chunks/language-defaults-base.js +1 -1
  62. package/dist/chunks/markdown.js +1 -1
  63. package/dist/chunks/monaco-importer.js +1 -1
  64. package/dist/chunks/monaco-theme.js +1 -1
  65. package/dist/chunks/runtime.js +1 -1
  66. package/dist/chunks/sql-expr-defaults.js +1 -1
  67. package/dist/chunks/sql-expr-mode.js +1 -1
  68. package/dist/chunks/sql-expr-service-accessors.js +1 -1
  69. package/dist/chunks/useT9n.js +1 -1
  70. package/dist/chunks/utilities.js +1 -1
  71. package/dist/components/arcgis-arcade-coding-assistant/customElement.d.ts +12 -2
  72. package/dist/components/arcgis-arcade-coding-assistant/customElement.js +42 -42
  73. package/dist/components/arcgis-arcade-coding-assistant/types.d.ts +2 -2
  74. package/dist/components/arcgis-arcade-editor/customElement.js +1 -1
  75. package/dist/components/arcgis-arcade-results/customElement.js +1 -1
  76. package/dist/components/arcgis-arcade-results/functional.d.ts +2 -2
  77. package/dist/components/arcgis-arcade-suggestions/customElement.js +1 -1
  78. package/dist/components/arcgis-code-editor/customElement.js +1 -1
  79. package/dist/components/arcgis-code-viewer/customElement.js +1 -1
  80. package/dist/components/arcgis-editor-variables/customElement.js +1 -1
  81. package/dist/components/arcgis-language-api-panel/customElement.js +1 -1
  82. package/dist/components/arcgis-sql-expression-editor/customElement.js +1 -1
  83. package/dist/components/arcgis-sql-expression-fields/customElement.js +1 -1
  84. package/dist/docs/api.json +2 -2
  85. package/dist/docs/docs.json +2 -2
  86. package/dist/docs/web-types.json +1 -1
  87. package/dist/index.js +1 -1
  88. package/dist/loader.js +1 -1
  89. package/dist/monacoStyles.js +1 -1
  90. package/dist/utils/arcade-executor.d.ts +11 -8
  91. package/dist/utils/fields.d.ts +7 -6
  92. package/dist/utils/profile/editor-profile.d.ts +11 -7
  93. package/dist/utils/profile/types.d.ts +26 -21
  94. package/dist/utils/profile/utils.d.ts +13 -7
  95. package/dist/utils/sql-expr-monaco/sql-expr-completion.d.ts +2 -2
  96. package/dist/utils/sql-expr-monaco/sql-expr-constants.d.ts +14 -13
  97. package/dist/utils/sql-expr-monaco/sql-expr-defaults.d.ts +3 -3
  98. package/dist/utils/sql-expr-monaco/sql-expr-parser-utils.d.ts +8 -8
  99. package/dist/utils/sql-expr-monaco/sql-expr-validation-utils.d.ts +10 -10
  100. package/dist/utils/sql-expr-monaco/sql-expr-validation.d.ts +2 -2
  101. package/dist/utils/sql-expr-monaco/types.d.ts +9 -7
  102. package/dist/utils/utilities.d.ts +2 -2
  103. package/package.json +5 -5
  104. package/dist/cdn/BLVE5YQR.js +0 -6
  105. package/dist/cdn/QFHNOTXM.js +0 -4
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
- v5.0.0-next.86 */
3
+ v5.0.0-next.88 */
4
4
  export default $arcgis.t(([{createArcadeExecutor:m}])=>{var E="https://developers.arcgis.com/arcade/",B=100,C=100;function v(e){return!!e&&typeof e=="object"&&"declaredRootClass"in e&&typeof e.declaredRootClass=="string"&&e.declaredRootClass==="esri.arcade.featureset.support.FeatureSet"}function g(e){return!!e&&typeof e=="object"&&"arcadeDeclaredClass"in e&&typeof e.arcadeDeclaredClass=="string"&&e.arcadeDeclaredClass==="esri.arcade.Feature"}function b(e){return!!e&&typeof e=="object"&&"declaredClass"in e&&typeof e.declaredClass=="string"&&e.declaredClass==="esri.arcade.Dictionary"}function w(e){return!!e&&typeof e=="object"&&"declaredClass"in e&&typeof e.declaredClass=="string"&&e.declaredClass.startsWith("esri.geometry.")}function R(e){return!!e&&typeof e=="object"&&"declaredClass"in e&&typeof e.declaredClass=="string"&&e.declaredClass.startsWith("esri.rest.knowledgeGraph.KnowledgeGraph")}function j(e){return!!e&&typeof e=="object"&&"declaredClass"in e&&typeof e.declaredClass=="string"&&e.declaredClass==="esri.arcade.Portal"}function D(e){return!!e&&typeof e=="object"&&"declaredClass"in e&&typeof e.declaredClass=="string"&&e.declaredClass==="esri.arcade.Attachment"}function h(e){return!!e&&typeof e=="object"&&"declaredRootClass"in e&&typeof e.declaredRootClass=="string"&&e.declaredRootClass==="esri.arcade.arcadedate"}function A(e){return!!e&&typeof e=="object"&&"declaredRootClass"in e&&typeof e.declaredRootClass=="string"&&e.declaredRootClass==="esri.core.sql.dateonly"}function x(e){return!!e&&typeof e=="object"&&"declaredRootClass"in e&&typeof e.declaredRootClass=="string"&&e.declaredRootClass==="esri.core.sql.timeonly"}function F(e){return!!e&&typeof e=="object"&&"arcadeDeclaredClass"in e&&typeof e.arcadeDeclaredClass=="string"&&e.arcadeDeclaredClass==="esri.arcade.Pixel"}function S(e){return!!e&&typeof e=="object"&&"length"in e&&typeof e.length=="function"&&"get"in e&&typeof e.get=="function"&&"toArray"in e&&typeof e.toArray=="function"&&"_elements"in e&&Array.isArray(e._elements)}function Z(e){return e==null?{type:"null"}:Array.isArray(e)?{type:"array",value:e}:S(e)?{type:"array",value:e.toArray()}:e instanceof Date?{type:"date",value:e}:typeof e=="string"?{type:"text",value:e}:typeof e=="number"?{type:"number",value:e}:typeof e=="boolean"?{type:"boolean",value:e}:typeof e!="object"?{type:"unknown"}:h(e)?{type:"date",value:e}:A(e)?{type:"dateOnly",value:e}:x(e)?{type:"time",value:e}:D(e)?{type:"attachment",value:e}:j(e)?{type:"portal",value:e}:v(e)?{type:"featureSet",value:e,features:[],iterator:null}:g(e)?{type:"feature",value:e}:F(e)?{type:"pixel",value:e}:b(e)?{type:"dictionary",value:e}:w(e)?{type:"geometry",value:e}:R(e)?{type:"knowledgeGraph",value:e}:{type:"unknown"}}function G(e,r="en"){return e.value instanceof Date?new Intl.DateTimeFormat(r,{dateStyle:"medium",timeStyle:"long"}).format(e.value):e.value.toDateTime().setLocale(r).toFormat(e.value.isUnknownTimeZone?"FF":"FF ZZZZZ")}function I(e){return e.value.toString()}function O(e){return e.value.toString()}async function T(e,r="system"){let a=Z(e);return a.type!=="featureSet"||(await a.value.load(),a.iterator=a.value.iterator({aborted:!1}),a.features=await a.iterator.nextBatchAsArcadeFeatures(C,r)??[]),a}async function P(e,r,a,s){let l=new Date;s??=()=>{};try{let o=performance.now(),n=await m(r??"",{variables:e?.variables??[]}),c=performance.now(),{profileVariableInstances:d,spatialReference:u,timeZone:i,services:y}=a,p={spatialReference:u,timeZone:i,rawOutput:!0,console:s,services:y},f=await n.executeAsync(d,p),t=await T(f,i);return t.timeStamp=l,t.compilationTime=c-o,t.executionTime=performance.now()-c,t}catch(o){let n="Unknown Error";return o instanceof Error&&(n=o.message),{type:"error",value:n,error:o,timeStamp:l,compilationTime:0,executionTime:0}}}return{a:E,b:B,c:C,d:Z,e:G,f:I,g:O,h:P}},"arcade")
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
- v5.0.0-next.86 */
4
- import a from"./RZ4DRTSI.js";import{b as m,c as y,d as h}from"./5WXTHFB6.js";import{g as f}from"./A7GC2RAP.js";import{L as u}from"./DD6ZRT43.js";export default $arcgis.t(([{e:b,g:d,h:g,j:F,k:M}])=>{var A=o=>{let e=o.variables[0],i=e&&e.type==="featureSet"?w(e):void 0,{apiVersion:t,bundles:a,hiddenApiItems:s}=o.toEditorProfileDefinition();return{apiVersion:t,bundles:a,variables:i?[i]:[],hiddenApiItems:s?.map(r=>r.toLowerCase())}};function w(o){let{name:e}=o,i=o.getDescription(),{definition:t}=o.toProfileVariableDefinition(),a={label:e,detail:e,insertText:e,insertTextMode:h.asIs,insertTextFormat:y.PlainText,kind:m.Field},s={name:e,description:i,type:"dictionary",properties:[],completion:a};if(!t||!("fields"in t))return s;let[r,l]=g(t.fields,i);return s.properties=r,a.documentation={kind:"markdown",value:l},s}var P={id:"field-calculation",variables:[{name:"$layer",type:"featureSet",description:"The layer being calculated."}]};function T(){return P}function I(o){if(!d(o))return;let e=T();if(!e)return;let i={variables:[],hiddenApiItems:o.hiddenApiItems?.map(t=>t.toLowerCase())};return e.variables.forEach(t=>{if(o.disabledVariables?.includes(t.name))return;let a=o.definitions[t.name];switch(t.type){case"featureSet":return b(a)?i.variables.push({...t,type:t.type,definition:a}):void 0;default:throw Error(`sdkVariable type not supported (yet) type: ${t.type}`)}}),i}var x="arcgis-sql-expression",p=class extends M{constructor(){super(x,{apiPath:"./assets/sql-language/api",apiPrefix:"sql-api.t9n."}),this._languageId=x,this._layerMap=new Map}updateFeatureLayerForModel(e,i){let t=this._getApiKey(e);this._layerMap.set(t,i)}getFeatureLayerForModel(e){let i=this._getApiKey(e);return this._layerMap.get(i)}async setProfileForModel(e,i,t={locale:"en"}){d(i)&&(i=I(i));let a=await f(t.locale,u("./assets/editor-profile/t9n"),"messages.");if(!a)throw new Error(`Failed to load the language bundle for ${t.locale}`);this.disposeForModel(e);let s=this._getApiKey(e),r=new F(i,a);this._modelToProfileMap.set(s,r);let l=A(r);this.updateApiContextForModel(e,{locale:t.locale,profile:l});let c=i?.variables?.find(v=>v.name==="$layer");c&&this.updateFeatureLayerForModel(e,c.definition)}},n=new p,k={setProfileForModel:n.setProfileForModel.bind(n),getApiLibraryForModel:n.getApiLibraryForModel.bind(n)};return n},a)
3
+ v5.0.0-next.88 */
4
+ import a from"./64XMCCSN.js";import{b as m,c as y,d as h}from"./HD4ON74D.js";import{g as f}from"./TWLAYRFG.js";import{L as u}from"./BQLGOZSH.js";export default $arcgis.t(([{e:b,g:d,h:g,j:F,k:M}])=>{var A=o=>{let e=o.variables[0],i=e&&e.type==="featureSet"?w(e):void 0,{apiVersion:t,bundles:a,hiddenApiItems:s}=o.toEditorProfileDefinition();return{apiVersion:t,bundles:a,variables:i?[i]:[],hiddenApiItems:s?.map(r=>r.toLowerCase())}};function w(o){let{name:e}=o,i=o.getDescription(),{definition:t}=o.toProfileVariableDefinition(),a={label:e,detail:e,insertText:e,insertTextMode:h.asIs,insertTextFormat:y.PlainText,kind:m.Field},s={name:e,description:i,type:"dictionary",properties:[],completion:a};if(!t||!("fields"in t))return s;let[r,l]=g(t.fields,i);return s.properties=r,a.documentation={kind:"markdown",value:l},s}var P={id:"field-calculation",variables:[{name:"$layer",type:"featureSet",description:"The layer being calculated."}]};function T(){return P}function I(o){if(!d(o))return;let e=T();if(!e)return;let i={variables:[],hiddenApiItems:o.hiddenApiItems?.map(t=>t.toLowerCase())};return e.variables.forEach(t=>{if(o.disabledVariables?.includes(t.name))return;let a=o.definitions[t.name];switch(t.type){case"featureSet":return b(a)?i.variables.push({...t,type:t.type,definition:a}):void 0;default:throw Error(`sdkVariable type not supported (yet) type: ${t.type}`)}}),i}var x="arcgis-sql-expression",p=class extends M{constructor(){super(x,{apiPath:"./assets/sql-language/api",apiPrefix:"sql-api.t9n."}),this._languageId=x,this._layerMap=new Map}updateFeatureLayerForModel(e,i){let t=this._getApiKey(e);this._layerMap.set(t,i)}getFeatureLayerForModel(e){let i=this._getApiKey(e);return this._layerMap.get(i)}async setProfileForModel(e,i,t={locale:"en"}){d(i)&&(i=I(i));let a=await f(t.locale,u("./assets/editor-profile/t9n"),"messages.");if(!a)throw new Error(`Failed to load the language bundle for ${t.locale}`);this.disposeForModel(e);let s=this._getApiKey(e),r=new F(i,a);this._modelToProfileMap.set(s,r);let l=A(r);this.updateApiContextForModel(e,{locale:t.locale,profile:l});let c=i?.variables?.find(v=>v.name==="$layer");c&&this.updateFeatureLayerForModel(e,c.definition)}},n=new p,k={setProfileForModel:n.setProfileForModel.bind(n),getApiLibraryForModel:n.getApiLibraryForModel.bind(n)};return n},a)
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
- v5.0.0-next.86 */
4
- import h from"./G2MNT5MH.js";import e from"./J2SETKWM.js";import d from"./FITYHC24.js";import"./GGKL5FWT.js";import{a as O,c as u,d as k}from"./5MPQLT5X.js";import{a as b}from"./JPLSYGHT.js";import"./W7DH63B3.js";import c from"./HI5LKY6R.js";import a from"./RZ4DRTSI.js";import{a as N}from"./3JQZLQ6X.js";import"./HUDN4YMY.js";import"./N3MHW6AM.js";import{a as C}from"./SWSJLICP.js";import"./5WXTHFB6.js";import"./WHDQGCW7.js";import{a as T,b as y,c as E}from"./A7GC2RAP.js";import{G as f,K as v,L as S,h as g,i as _,j as l}from"./DD6ZRT43.js";import"./VYCA3AJT.js";import"./ZK3HCKLO.js";import"./MCGQ6KRV.js";export default $arcgis.t(([,,,{a:w},{a:c,b:p}])=>{var L=Symbol(),h=class{get taskComplete(){return this.t||(this.i===1?this.t=new Promise(((t,e)=>{this.o=t,this.h=e})):this.i===3?this.t=Promise.reject(this.l):this.t=Promise.resolve(this.u)),this.t}constructor(t,e,s){this.p=0,this.i=0,(this._=t).addController(this);let i=typeof e=="object"?e:{task:e,args:s};this.v=i.task,this.j=i.args,this.m=i.argsEqual??M,this.k=i.onComplete,this.A=i.onError,this.autoRun=i.autoRun??!0,"initialValue"in i&&(this.u=i.initialValue,this.i=2,this.O=this.T?.())}hostUpdate(){this.autoRun===!0&&this.S()}hostUpdated(){this.autoRun==="afterUpdate"&&this.S()}T(){if(this.j===void 0)return;let t=this.j();if(!Array.isArray(t))throw Error("The args function must return an array");return t}async S(){let t=this.T(),e=this.O;this.O=t,t===e||t===void 0||e!==void 0&&this.m(e,t)||await this.run(t)}async run(t){let e,s;t??=this.T(),this.O=t,this.i===1?this.q?.abort():(this.t=void 0,this.o=void 0,this.h=void 0),this.i=1,this.autoRun==="afterUpdate"?queueMicrotask((()=>this._.requestUpdate())):this._.requestUpdate();let i=++this.p;this.q=new AbortController;let o=!1;try{e=await this.v(t,{signal:this.q.signal})}catch(d){o=!0,s=d}if(this.p===i){if(e===L)this.i=0;else{if(o===!1){try{this.k?.(e)}catch{}this.i=2,this.o?.(e)}else{try{this.A?.(s)}catch{}this.i=3,this.h?.(s)}this.u=e,this.l=s}this._.requestUpdate()}}abort(t){this.i===1&&this.q?.abort(t)}get value(){return this.u}get error(){return this.l}get status(){return this.i}render(t){switch(this.i){case 0:return t.initial?.();case 1:return t.pending?.();case 2:return t.complete?.(this.value);case 3:return t.error?.(this.error);default:throw Error("Unexpected status: "+this.i)}}},M=(n,t)=>n===t||n.length===t.length&&n.every(((e,s)=>!_(e,t[s])));var A=g`pre{direction:ltr;overflow-x:auto;background-color:var(--calcite-color-foreground-2);padding:var(--calcite-spacing-sm);white-space:pre-line;code{font-size:var(--calcite-font-size--2);font-family:var(--calcite-font-family-code)}}:host([round]){pre{border-radius:var(--calcite-corner-radius-round)}}`,m=class extends f{constructor(){super(...arguments),this._monacoEditor=b(C),this.#e=Promise.withResolvers(),this.#t="",this._slotContentObservers=[],this._onDefaultSlotChange=async t=>{T(t)||(this._codeFromSlot="");let e=t.target instanceof HTMLSlotElement?t.target:null,s=e?this._computeSlotText(e):"";e&&this._observeAssignedSlotNodes(e),s!==this._codeFromSlot&&(this._codeFromSlot=s),this.#e.resolve()},this._colorizeTask=new h(this,{task:async([t,e],{signal:s})=>{if(await this.#e.promise,s.aborted)return this.#t;if(await c(e),s.aborted)return this.#t;let i=await O(t,e);return s.aborted?this.#t:(this.#t=i,i)},args:()=>[this._codeFromSlot,this.language]}),this._codeFromSlot="",this.language="arcade",this.round=!1}static{this.properties={_codeFromSlot:16,language:1,round:7}}static{this.styles=A}#e;#t;async load(){w(S("./assets")),await p(this.language),await c(this.language),this._applyColorizeStyles(u()),this.manager.onLifecycle(()=>(this._themeObserver=y(this.el,["class"],()=>this.updateTheme()),this._themeChangedListener=k(()=>{this._applyColorizeStyles(u())}),this.updateTheme(),()=>{this._themeObserver?.(),this._themeObserver=void 0,this._themeChangedListener?.dispose(),this._themeChangedListener=void 0}))}loaded(){this.el.hasChildNodes()||this.#e.resolve()}willUpdate(t){t.has("language")&&p(this.language).then(()=>c(this.language)).catch(e=>console.error(e))}disconnectedCallback(){super.disconnectedCallback(),this._disposeSlotObservers()}_disposeSlotObservers(){this._slotContentObservers.length&&(this._slotContentObservers.forEach(t=>t.disconnect()),this._slotContentObservers=[])}_observeAssignedSlotNodes(t){this._disposeSlotObservers();let e=t.assignedNodes({flatten:!0});if(!e.length)return;let s=new Set;for(let r of e)r.nodeType===Node.ELEMENT_NODE?s.add(r):r.nodeType===Node.TEXT_NODE&&r.parentElement&&s.add(r.parentElement);let i={characterData:!0,childList:!0,subtree:!0},o=N(()=>{let r=this._computeSlotText(t);r!==this._codeFromSlot&&(this._codeFromSlot=r)},100),d=r=>{if(r.some(a=>a.type==="childList")){let a=this._computeSlotText(t);a!==this._codeFromSlot&&(this._codeFromSlot=a);return}o()};s.forEach(r=>{let a=new MutationObserver(d);a.observe(r,i),this._slotContentObservers.push(a)})}_computeSlotText(t){let e=t.assignedNodes({flatten:!0}).filter(s=>s.nodeType!==Node.COMMENT_NODE);if(this.language==="html"&&e.length){let s=e.find(o=>o.nodeType===Node.ELEMENT_NODE&&o.tagName==="TEMPLATE");if(s)return(s.innerHTML??"").trim();let i=e.map(o=>o.nodeType===Node.ELEMENT_NODE?o.outerHTML:o.nodeType===Node.TEXT_NODE?o.textContent??"":"").join("").trim();return i}return e.map(s=>s.textContent??"").join("").trim()}updateTheme(){let t=E(this.el)==="light"?"vs":"vs-dark";t!==this._currentTheme&&(this._currentTheme=t,this._monacoEditor.setTheme(t))}_applyColorizeStyles(t){if(!this._colorizeSheet){this._colorizeSheet=new CSSStyleSheet;let e=this.renderRoot;e.adoptedStyleSheets=[...e.adoptedStyleSheets,this._colorizeSheet]}this._colorizeSheet.replaceSync(t)}render(){return l`<div><slot @slotchange=${this._onDefaultSlotChange} style="display:none" aria-hidden=true></slot><pre class="arcgis-code-viewer" aria-label=${`${this.language} code snippet`}>${this._colorizeTask.render({error:()=>null,pending:()=>l`<code class=${`language-${this.language}`}></code>`,complete:t=>l`<code class=${`language-${this.language}`} .innerHTML=${t??""}></code>`})}</pre></div>`}};v("arcgis-code-viewer",m);return m},a,c,d,e,h)
3
+ v5.0.0-next.88 */
4
+ import h from"./U33ZYSZW.js";import e from"./4GT2KL7A.js";import d from"./OXDUPWIV.js";import"./HY3ILV5W.js";import{a as O,c as u,d as k}from"./7EIT3Q6J.js";import{a as b}from"./4RXKRZBZ.js";import"./CIIPVQFF.js";import c from"./5QVEAJ73.js";import a from"./64XMCCSN.js";import{a as N}from"./JSKAVLMU.js";import"./V2VZZXEA.js";import"./C6JXJQWK.js";import{a as C}from"./57XZ5RMI.js";import"./HD4ON74D.js";import"./KBNJTYAP.js";import{a as T,b as y,c as E}from"./TWLAYRFG.js";import{G as f,K as v,L as S,h as g,i as _,j as l}from"./BQLGOZSH.js";import"./JEX3DDG3.js";import"./ND46SRRX.js";import"./J76PBJ7W.js";export default $arcgis.t(([,,,{a:w},{a:c,b:p}])=>{var L=Symbol(),h=class{get taskComplete(){return this.t||(this.i===1?this.t=new Promise(((t,e)=>{this.o=t,this.h=e})):this.i===3?this.t=Promise.reject(this.l):this.t=Promise.resolve(this.u)),this.t}constructor(t,e,s){this.p=0,this.i=0,(this._=t).addController(this);let i=typeof e=="object"?e:{task:e,args:s};this.v=i.task,this.j=i.args,this.m=i.argsEqual??M,this.k=i.onComplete,this.A=i.onError,this.autoRun=i.autoRun??!0,"initialValue"in i&&(this.u=i.initialValue,this.i=2,this.O=this.T?.())}hostUpdate(){this.autoRun===!0&&this.S()}hostUpdated(){this.autoRun==="afterUpdate"&&this.S()}T(){if(this.j===void 0)return;let t=this.j();if(!Array.isArray(t))throw Error("The args function must return an array");return t}async S(){let t=this.T(),e=this.O;this.O=t,t===e||t===void 0||e!==void 0&&this.m(e,t)||await this.run(t)}async run(t){let e,s;t??=this.T(),this.O=t,this.i===1?this.q?.abort():(this.t=void 0,this.o=void 0,this.h=void 0),this.i=1,this.autoRun==="afterUpdate"?queueMicrotask((()=>this._.requestUpdate())):this._.requestUpdate();let i=++this.p;this.q=new AbortController;let o=!1;try{e=await this.v(t,{signal:this.q.signal})}catch(d){o=!0,s=d}if(this.p===i){if(e===L)this.i=0;else{if(o===!1){try{this.k?.(e)}catch{}this.i=2,this.o?.(e)}else{try{this.A?.(s)}catch{}this.i=3,this.h?.(s)}this.u=e,this.l=s}this._.requestUpdate()}}abort(t){this.i===1&&this.q?.abort(t)}get value(){return this.u}get error(){return this.l}get status(){return this.i}render(t){switch(this.i){case 0:return t.initial?.();case 1:return t.pending?.();case 2:return t.complete?.(this.value);case 3:return t.error?.(this.error);default:throw Error("Unexpected status: "+this.i)}}},M=(n,t)=>n===t||n.length===t.length&&n.every(((e,s)=>!_(e,t[s])));var A=g`pre{direction:ltr;overflow-x:auto;background-color:var(--calcite-color-foreground-2);padding:var(--calcite-spacing-sm);white-space:pre-line;code{font-size:var(--calcite-font-size--2);font-family:var(--calcite-font-family-code)}}:host([round]){pre{border-radius:var(--calcite-corner-radius-round)}}`,m=class extends f{constructor(){super(...arguments),this._monacoEditor=b(C),this.#e=Promise.withResolvers(),this.#t="",this._slotContentObservers=[],this._onDefaultSlotChange=async t=>{T(t)||(this._codeFromSlot="");let e=t.target instanceof HTMLSlotElement?t.target:null,s=e?this._computeSlotText(e):"";e&&this._observeAssignedSlotNodes(e),s!==this._codeFromSlot&&(this._codeFromSlot=s),this.#e.resolve()},this._colorizeTask=new h(this,{task:async([t,e],{signal:s})=>{if(await this.#e.promise,s.aborted)return this.#t;if(await c(e),s.aborted)return this.#t;let i=await O(t,e);return s.aborted?this.#t:(this.#t=i,i)},args:()=>[this._codeFromSlot,this.language]}),this._codeFromSlot="",this.language="arcade",this.round=!1}static{this.properties={_codeFromSlot:16,language:1,round:7}}static{this.styles=A}#e;#t;async load(){w(S("./assets")),await p(this.language),await c(this.language),this._applyColorizeStyles(u()),this.manager.onLifecycle(()=>(this._themeObserver=y(this.el,["class"],()=>this.updateTheme()),this._themeChangedListener=k(()=>{this._applyColorizeStyles(u())}),this.updateTheme(),()=>{this._themeObserver?.(),this._themeObserver=void 0,this._themeChangedListener?.dispose(),this._themeChangedListener=void 0}))}loaded(){this.el.hasChildNodes()||this.#e.resolve()}willUpdate(t){t.has("language")&&p(this.language).then(()=>c(this.language)).catch(e=>console.error(e))}disconnectedCallback(){super.disconnectedCallback(),this._disposeSlotObservers()}_disposeSlotObservers(){this._slotContentObservers.length&&(this._slotContentObservers.forEach(t=>t.disconnect()),this._slotContentObservers=[])}_observeAssignedSlotNodes(t){this._disposeSlotObservers();let e=t.assignedNodes({flatten:!0});if(!e.length)return;let s=new Set;for(let r of e)r.nodeType===Node.ELEMENT_NODE?s.add(r):r.nodeType===Node.TEXT_NODE&&r.parentElement&&s.add(r.parentElement);let i={characterData:!0,childList:!0,subtree:!0},o=N(()=>{let r=this._computeSlotText(t);r!==this._codeFromSlot&&(this._codeFromSlot=r)},100),d=r=>{if(r.some(a=>a.type==="childList")){let a=this._computeSlotText(t);a!==this._codeFromSlot&&(this._codeFromSlot=a);return}o()};s.forEach(r=>{let a=new MutationObserver(d);a.observe(r,i),this._slotContentObservers.push(a)})}_computeSlotText(t){let e=t.assignedNodes({flatten:!0}).filter(s=>s.nodeType!==Node.COMMENT_NODE);if(this.language==="html"&&e.length){let s=e.find(o=>o.nodeType===Node.ELEMENT_NODE&&o.tagName==="TEMPLATE");if(s)return(s.innerHTML??"").trim();let i=e.map(o=>o.nodeType===Node.ELEMENT_NODE?o.outerHTML:o.nodeType===Node.TEXT_NODE?o.textContent??"":"").join("").trim();return i}return e.map(s=>s.textContent??"").join("").trim()}updateTheme(){let t=E(this.el)==="light"?"vs":"vs-dark";t!==this._currentTheme&&(this._currentTheme=t,this._monacoEditor.setTheme(t))}_applyColorizeStyles(t){if(!this._colorizeSheet){this._colorizeSheet=new CSSStyleSheet;let e=this.renderRoot;e.adoptedStyleSheets=[...e.adoptedStyleSheets,this._colorizeSheet]}this._colorizeSheet.replaceSync(t)}render(){return l`<div><slot @slotchange=${this._onDefaultSlotChange} style="display:none" aria-hidden=true></slot><pre class="arcgis-code-viewer" aria-label=${`${this.language} code snippet`}>${this._colorizeTask.render({error:()=>null,pending:()=>l`<code class=${`language-${this.language}`}></code>`,complete:t=>l`<code class=${`language-${this.language}`} .innerHTML=${t??""}></code>`})}</pre></div>`}};v("arcgis-code-viewer",m);return m},a,c,d,e,h)
@@ -1,7 +1,7 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
- v5.0.0-next.86 */
4
- import{a as Q,b as X,c as Z,d,e as f}from"./HUDN4YMY.js";import{b as J}from"./N3MHW6AM.js";import{a as Y}from"./SWSJLICP.js";import{b as D,c as S,d as v,e as H}from"./5WXTHFB6.js";import{i as z}from"./A7GC2RAP.js";import{L as B,r as q,t as V}from"./DD6ZRT43.js";import{Gl as $,Pl as A}from"./ZK3HCKLO.js";export default $arcgis.t(([x,_e,me,be,ge,{getDeclaredVoxelMembers:we,getDeclaredPixelMembers:Ce}])=>{var L=t=>t!==void 0,F=t=>t!==null;function le(t){return!!t&&typeof t=="object"&&"declaredClass"in t&&typeof t.declaredClass=="string"&&t.declaredClass.startsWith("esri.layers.")&&P(t)&&"queryFeatures"in t&&typeof t.queryFeatures=="function"}function pe(t){return!!t&&typeof t=="object"&&"declaredClass"in t&&typeof t.declaredClass=="string"&&(t.declaredClass==="esri.Map"||t.declaredClass==="esri.WebMap"||t.declaredClass==="esri.WebScene")}function De(t){return!!t&&typeof t=="object"&&"loadAll"in t&&typeof t.loadAll=="function"}function ce(t){return!!t&&typeof t=="object"&&"portalItem"in t&&t.portalItem!=null}function ue(t){return!!t&&typeof t=="object"&&"portalItem"in t&&t.portalItem!=null}function P(t){return!!t&&typeof t=="object"&&"fields"in t&&Array.isArray(t.fields)}function M(t){return!!t&&typeof t=="object"&&"url"in t&&typeof t.url=="string"}function Se(t){return M(t)&&/\/(?:featureserver|mapserver)(?:\/|$)/iu.test(t.url??"")}function he(t){return M(t)||P(t)||ue(t)}function tt(t){return he(t)&&"type"in t&&t.type==="voxel"}function it(t){return he(t)&&"type"in t&&(t.type==="imagery"||t.type==="imagery-tile")}function rt(t){return M(t)||P(t)||ue(t)}function st(t){return ce(t)||pe(t)||Se(t)}function ee(t){return!!t&&typeof t=="object"&&"declaredClass"in t&&t.declaredClass==="esri.layers.support.Subtype"}function j(t){return!!t&&typeof t=="object"&&"declaredClass"in t&&t.declaredClass==="esri.layers.support.CodedValueDomain"}function ve(t){return!!t&&typeof t=="object"&&"declaredClass"in t&&t.declaredClass==="esri.layers.support.InheritedDomain"}function nt(t){return!!t&&typeof t=="object"&&"id"in t&&typeof t.id=="string"&&"definitions"in t&&typeof t.definitions=="object"&&!Array.isArray(t.definitions)}function h(t){return!!t&&typeof t=="object"&&"title"in t&&typeof t.title=="string"}function Fe(t){return!!t&&typeof t=="object"&&"url"in t&&typeof t.url=="string"}function de(t){return!!t&&typeof t=="object"&&"layerId"in t&&typeof t.layerId=="number"}function E(t){return!!t&&typeof t=="object"&&"typeIdField"in t&&"types"in t}function te(t){return!!t&&typeof t=="object"&&"getFieldDomain"in t&&typeof t.getFieldDomain=="function"}function y(t){return!!t&&typeof t=="object"&&"subtypeField"in t}function xe(t){return y(t)&&"subtypes"in t}function Te(t){return!!t&&typeof t=="object"&&"portalItem"in t}function Ie(t){return de(t)&&"relationships"in t&&"url"in t&&Array.isArray(t.relationships)&&typeof t.url=="string"}function Pe(t){return!!t&&typeof t=="object"&&"isTable"in t&&typeof t.isTable=="boolean"}function Me(t){if(t&&typeof t=="object"){if(Pe(t))return t.isTable||"type"in t&&t.type==="table";if("geometryType"in t)return t.geometryType===""||t.geometryType==="esriGeometryNull"||t.geometryType===null}return!1}function Ve(t){return!Me(t)}function $e(t){return!!t&&typeof t=="object"&&"load"in t&&typeof t.load=="function"}function Ae(t){return!!t&&typeof t=="object"&&"type"in t&&t.type==="voxel"}function ie(t){return!!t&&typeof t=="object"&&"type"in t&&typeof t.type=="string"&&["imagery","imagery-tile"].includes(t.type)}async function fe(t){if(!t)return null;let e;return P(t)?e=t:e=new x(t),$e(e)&&await e.load(),e}async function Le(t){t+="/layers";let e=await _e(t,{responseType:"json",query:{f:"json"}}),i=t.endsWith("MapServer/layers")?"data":"query",r=re(e.data?.layers,i),s=re(e.data?.tables,i);return{layers:r,tables:s}}function re(t,e){return t?t.filter(i=>{switch(i.type){case"Feature Layer":case"Oriented Imagery Layer":case"Catalog Layer":case"Table":return(i.capabilities?i.capabilities.toLowerCase().split(",").map(r=>r.trim()):[]).includes(e);default:return!1}}):[]}async function je(t,e){let i=new x({url:`${t.url}/${e.relatedTableId}`});return await i.load(),i}function R(t){return(e,i)=>{if(e.type==="oid")return-1;if(i.type==="oid")return 1;if(y(t)){if(e.name===t.subtypeField)return-1;if(i.name===t.subtypeField)return 1}if(E(t)){if(e.name===t.typeIdField)return-1;if(i.name===t.typeIdField)return 1}return e.name.localeCompare(i.name,"en",{sensitivity:"base"})}}function se(t,e){return t?.every(i=>i.domains?.[e.name]?.type==="inherited")??!1}var Ee=/^[a-z_$][a-z0-9_$]*$/giu;function O(t,e=!0){return t.match(Ee)?`${e?".":""}${t}`:`["${t}"]`}function ye(t,e){return t?`${t}${O(e)}`:e}function ne(t){return Te(t)?t.portalItem:null}function ot(t,e,i=!1){let r=e,s=[],o=[];return d(t).forEach(n=>{r&&(r+=`
3
+ v5.0.0-next.88 */
4
+ import{a as Q,b as X,c as Z,d,e as f}from"./V2VZZXEA.js";import{b as J}from"./C6JXJQWK.js";import{a as Y}from"./57XZ5RMI.js";import{b as D,c as S,d as v,e as H}from"./HD4ON74D.js";import{i as z}from"./TWLAYRFG.js";import{L as B,r as q,t as V}from"./BQLGOZSH.js";import{Gl as $,Pl as A}from"./ND46SRRX.js";export default $arcgis.t(([x,_e,me,be,ge,{getDeclaredVoxelMembers:we,getDeclaredPixelMembers:Ce}])=>{var L=t=>t!==void 0,F=t=>t!==null;function le(t){return!!t&&typeof t=="object"&&"declaredClass"in t&&typeof t.declaredClass=="string"&&t.declaredClass.startsWith("esri.layers.")&&P(t)&&"queryFeatures"in t&&typeof t.queryFeatures=="function"}function pe(t){return!!t&&typeof t=="object"&&"declaredClass"in t&&typeof t.declaredClass=="string"&&(t.declaredClass==="esri.Map"||t.declaredClass==="esri.WebMap"||t.declaredClass==="esri.WebScene")}function De(t){return!!t&&typeof t=="object"&&"loadAll"in t&&typeof t.loadAll=="function"}function ce(t){return!!t&&typeof t=="object"&&"portalItem"in t&&t.portalItem!=null}function ue(t){return!!t&&typeof t=="object"&&"portalItem"in t&&t.portalItem!=null}function P(t){return!!t&&typeof t=="object"&&"fields"in t&&Array.isArray(t.fields)}function M(t){return!!t&&typeof t=="object"&&"url"in t&&typeof t.url=="string"}function Se(t){return M(t)&&/\/(?:featureserver|mapserver)(?:\/|$)/iu.test(t.url??"")}function he(t){return M(t)||P(t)||ue(t)}function tt(t){return he(t)&&"type"in t&&t.type==="voxel"}function it(t){return he(t)&&"type"in t&&(t.type==="imagery"||t.type==="imagery-tile")}function rt(t){return M(t)||P(t)||ue(t)}function st(t){return ce(t)||pe(t)||Se(t)}function ee(t){return!!t&&typeof t=="object"&&"declaredClass"in t&&t.declaredClass==="esri.layers.support.Subtype"}function j(t){return!!t&&typeof t=="object"&&"declaredClass"in t&&t.declaredClass==="esri.layers.support.CodedValueDomain"}function ve(t){return!!t&&typeof t=="object"&&"declaredClass"in t&&t.declaredClass==="esri.layers.support.InheritedDomain"}function nt(t){return!!t&&typeof t=="object"&&"id"in t&&typeof t.id=="string"&&"definitions"in t&&typeof t.definitions=="object"&&!Array.isArray(t.definitions)}function h(t){return!!t&&typeof t=="object"&&"title"in t&&typeof t.title=="string"}function Fe(t){return!!t&&typeof t=="object"&&"url"in t&&typeof t.url=="string"}function de(t){return!!t&&typeof t=="object"&&"layerId"in t&&typeof t.layerId=="number"}function E(t){return!!t&&typeof t=="object"&&"typeIdField"in t&&"types"in t}function te(t){return!!t&&typeof t=="object"&&"getFieldDomain"in t&&typeof t.getFieldDomain=="function"}function y(t){return!!t&&typeof t=="object"&&"subtypeField"in t}function xe(t){return y(t)&&"subtypes"in t}function Te(t){return!!t&&typeof t=="object"&&"portalItem"in t}function Ie(t){return de(t)&&"relationships"in t&&"url"in t&&Array.isArray(t.relationships)&&typeof t.url=="string"}function Pe(t){return!!t&&typeof t=="object"&&"isTable"in t&&typeof t.isTable=="boolean"}function Me(t){if(t&&typeof t=="object"){if(Pe(t))return t.isTable||"type"in t&&t.type==="table";if("geometryType"in t)return t.geometryType===""||t.geometryType==="esriGeometryNull"||t.geometryType===null}return!1}function Ve(t){return!Me(t)}function $e(t){return!!t&&typeof t=="object"&&"load"in t&&typeof t.load=="function"}function Ae(t){return!!t&&typeof t=="object"&&"type"in t&&t.type==="voxel"}function ie(t){return!!t&&typeof t=="object"&&"type"in t&&typeof t.type=="string"&&["imagery","imagery-tile"].includes(t.type)}async function fe(t){if(!t)return null;let e;return P(t)?e=t:e=new x(t),$e(e)&&await e.load(),e}async function Le(t){t+="/layers";let e=await _e(t,{responseType:"json",query:{f:"json"}}),i=t.endsWith("MapServer/layers")?"data":"query",r=re(e.data?.layers,i),s=re(e.data?.tables,i);return{layers:r,tables:s}}function re(t,e){return t?t.filter(i=>{switch(i.type){case"Feature Layer":case"Oriented Imagery Layer":case"Catalog Layer":case"Table":return(i.capabilities?i.capabilities.toLowerCase().split(",").map(r=>r.trim()):[]).includes(e);default:return!1}}):[]}async function je(t,e){let i=new x({url:`${t.url}/${e.relatedTableId}`});return await i.load(),i}function R(t){return(e,i)=>{if(e.type==="oid")return-1;if(i.type==="oid")return 1;if(y(t)){if(e.name===t.subtypeField)return-1;if(i.name===t.subtypeField)return 1}if(E(t)){if(e.name===t.typeIdField)return-1;if(i.name===t.typeIdField)return 1}return e.name.localeCompare(i.name,"en",{sensitivity:"base"})}}function se(t,e){return t?.every(i=>i.domains?.[e.name]?.type==="inherited")??!1}var Ee=/^[a-z_$][a-z0-9_$]*$/giu;function O(t,e=!0){return t.match(Ee)?`${e?".":""}${t}`:`["${t}"]`}function ye(t,e){return t?`${t}${O(e)}`:e}function ne(t){return Te(t)?t.portalItem:null}function ot(t,e,i=!1){let r=e,s=[],o=[];return d(t).forEach(n=>{r&&(r+=`
5
5
 
6
6
  `),r+=`**${n.name}** (${n.alias})
7
7
  ${n.type}`,n.description&&(r+=`
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
- v5.0.0-next.86 */
4
- import k from"./G2MNT5MH.js";import j from"./J2SETKWM.js";import e from"./FITYHC24.js";import"./GGKL5FWT.js";import{a as _}from"./JPLSYGHT.js";import"./W7DH63B3.js";import b from"./HI5LKY6R.js";import a from"./RZ4DRTSI.js";import"./HUDN4YMY.js";import"./N3MHW6AM.js";import{a as f}from"./SWSJLICP.js";import"./5WXTHFB6.js";import"./WHDQGCW7.js";import{b as g,c as p}from"./A7GC2RAP.js";import{G as l,K as u,L as m,h as d,n as i,s as c,u as h}from"./DD6ZRT43.js";import"./VYCA3AJT.js";import{Hl as s,Il as o,Kl as I,Pl as n}from"./ZK3HCKLO.js";import"./MCGQ6KRV.js";export default $arcgis.t(([,,,{a:v}])=>{var y=d`@layer{arcgis-code-editor{display:flex;width:100%;height:100%;flex-direction:column;direction:ltr;.monaco-editor{flex:1 1 auto;.monaco-hover,.editor-widget,.suggest-details-container{z-index:9999}div[widgetid="editor.contrib.resizableContentHoverWidget"],div[widgetid="editor.widget.suggestWidget"],div[widgetid="suggest.details"]{z-index:calc(var(--calcite-z-index-header) + 1)!important}}}}`,b={autoIndent:"advanced",automaticLayout:!0,bracketPairColorization:{enabled:!0},minimap:{enabled:!1},renderLineHighlight:"none",scrollBeyondLastLine:!1,suggest:{snippetsPreventQuickSuggestions:!1,showWords:!1},tabSize:2,useShadowDOM:!0},a=class extends l{constructor(){super(...arguments),this._componentReadyDefer=Promise.withResolvers(),this._disposables=[],this._monacoEditor=_(f),this.modelId=c(),this.value="",this.arcgisSelectionChange=i({bubbles:!1}),this.arcgisValueChange=i({bubbles:!1})}static{this.properties={editorInstance:32,editorOptions:0,language:1,modelId:0,value:1}}static{this.shadowRootOptions=h}static{this.styles=[y]}get editorInstance(){return this._editorInstance}async getEditorInstance(){return await this._componentReadyDefer.promise,this._editorInstance}async getValue(){return await this._componentReadyDefer.promise,this.value}async insertSnippet(e){await this._componentReadyDefer.promise,this._editorInstance&&(this._editorInstance.getContribution("snippetController2")?.insert(e??""),this._editorInstance.focus())}async insertText(e){if(await this._componentReadyDefer.promise,!this._editorInstance||!this._editorInstance.getModel())return;let t=this._editorInstance.getSelection()??new I(1,1,1,1);this._editorInstance.executeEdits("",[{range:t,text:e??"",forceMoveMarkers:!0}])}async setFocus(){await this._componentReadyDefer.promise,this._editorInstance?.focus()}async setValue(e){await this._componentReadyDefer.promise,this.value=e??""}load(){v(m("./assets")),this.manager.onLifecycle(()=>{this._monacoEditor.getModel(this.getUri())?.dispose();let e=this._monacoEditor.createModel(this.value,this.language,this.getUri());this._editorInstance=this._monacoEditor.create(this.el,{...b,...this.editorOptions??{},model:e,fixedOverflowWidgets:!0}),this._disposables.push(this._editorInstance),this._componentReadyDefer.resolve(),this._editorInstance.onDidChangeModelContent(()=>{this.value=this._editorInstance?.getValue()??"",this.arcgisValueChange.emit(this.value)}),this._editorInstance.onDidChangeCursorSelection(M=>{this.arcgisSelectionChange.emit({selection:M.selection,model:this._editorInstance?.getModel()})});let t=g(this.el,["class"],()=>this.updateTheme());this.updateTheme();let r=new ResizeObserver(()=>this._editorInstance?.layout());return r.observe(this.el),this.addCommonEditorActions(),()=>{for(this._editorInstance?.getModel()?.dispose();this._disposables.length;)this._disposables.pop()?.dispose();t?.(),r.disconnect()}})}willUpdate(e){e.has("value")&&this._updateModelValue(),(e.has("language")||e.has("modelId"))&&this.hasUpdated&&this._updateModel(),e.has("editorOptions")&&this._editorInstance?.updateOptions(this.editorOptions??{})}_updateModelValue(){if(!this._editorInstance)return;let e=this._editorInstance.getModel();if(!e||e.getValue()===this.value)return;let t=e.getFullModelRange();this._editorInstance.executeEdits("",[{range:t,text:this.value,forceMoveMarkers:!0}]),this._editorInstance.pushUndoStop()}_updateModel(){if(!this._editorInstance)return;let e=this._editorInstance;e.getModel()?.dispose(),e.setModel(this._monacoEditor.createModel(this.value,this.language,this.getUri()))}getUri(){return this.modelId?n.parse(this.modelId):n.parse("")}updateTheme(){let e=p(this.el)==="light"?"vs":"vs-dark";e!==this._currentTheme&&(this._currentTheme=e,this._monacoEditor.setTheme(e))}addCommonEditorActions(){if(!this._editorInstance)return;let e=this._editorInstance.getAction("editor.action.fontZoomIn"),t=this._editorInstance.getAction("editor.action.fontZoomOut");this._disposables.push(this._editorInstance.addAction({id:"editor.action.fontZoomIn",label:"Editor Font Zoom In",keybindings:[o.CtrlCmd|s.Equal],contextMenuGroupId:"zooming",contextMenuOrder:1,run:async()=>await e?.run()}),this._editorInstance.addAction({id:"editor.action.fontZoomOut",label:"Editor Font Zoom Out",keybindings:[o.CtrlCmd|s.Minus],contextMenuGroupId:"zooming",contextMenuOrder:2,run:async()=>await t?.run()}))}};u("arcgis-code-editor",a);return a},a,b,e,j,k)
3
+ v5.0.0-next.88 */
4
+ import k from"./U33ZYSZW.js";import j from"./4GT2KL7A.js";import e from"./OXDUPWIV.js";import"./HY3ILV5W.js";import{a as _}from"./4RXKRZBZ.js";import"./CIIPVQFF.js";import b from"./5QVEAJ73.js";import a from"./64XMCCSN.js";import"./V2VZZXEA.js";import"./C6JXJQWK.js";import{a as f}from"./57XZ5RMI.js";import"./HD4ON74D.js";import"./KBNJTYAP.js";import{b as g,c as p}from"./TWLAYRFG.js";import{G as l,K as u,L as m,h as d,n as i,s as c,u as h}from"./BQLGOZSH.js";import"./JEX3DDG3.js";import{Hl as s,Il as o,Kl as I,Pl as n}from"./ND46SRRX.js";import"./J76PBJ7W.js";export default $arcgis.t(([,,,{a:v}])=>{var y=d`@layer{arcgis-code-editor{display:flex;width:100%;height:100%;flex-direction:column;direction:ltr;.monaco-editor{flex:1 1 auto;.monaco-hover,.editor-widget,.suggest-details-container{z-index:9999}div[widgetid="editor.contrib.resizableContentHoverWidget"],div[widgetid="editor.widget.suggestWidget"],div[widgetid="suggest.details"]{z-index:calc(var(--calcite-z-index-header) + 1)!important}}}}`,b={autoIndent:"advanced",automaticLayout:!0,bracketPairColorization:{enabled:!0},minimap:{enabled:!1},renderLineHighlight:"none",scrollBeyondLastLine:!1,suggest:{snippetsPreventQuickSuggestions:!1,showWords:!1},tabSize:2,useShadowDOM:!0},a=class extends l{constructor(){super(...arguments),this._componentReadyDefer=Promise.withResolvers(),this._disposables=[],this._monacoEditor=_(f),this.modelId=c(),this.value="",this.arcgisSelectionChange=i({bubbles:!1}),this.arcgisValueChange=i({bubbles:!1})}static{this.properties={editorInstance:32,editorOptions:0,language:1,modelId:0,value:1}}static{this.shadowRootOptions=h}static{this.styles=[y]}get editorInstance(){return this._editorInstance}async getEditorInstance(){return await this._componentReadyDefer.promise,this._editorInstance}async getValue(){return await this._componentReadyDefer.promise,this.value}async insertSnippet(e){await this._componentReadyDefer.promise,this._editorInstance&&(this._editorInstance.getContribution("snippetController2")?.insert(e??""),this._editorInstance.focus())}async insertText(e){if(await this._componentReadyDefer.promise,!this._editorInstance||!this._editorInstance.getModel())return;let t=this._editorInstance.getSelection()??new I(1,1,1,1);this._editorInstance.executeEdits("",[{range:t,text:e??"",forceMoveMarkers:!0}])}async setFocus(){await this._componentReadyDefer.promise,this._editorInstance?.focus()}async setValue(e){await this._componentReadyDefer.promise,this.value=e??""}load(){v(m("./assets")),this.manager.onLifecycle(()=>{this._monacoEditor.getModel(this.getUri())?.dispose();let e=this._monacoEditor.createModel(this.value,this.language,this.getUri());this._editorInstance=this._monacoEditor.create(this.el,{...b,...this.editorOptions??{},model:e,fixedOverflowWidgets:!0}),this._disposables.push(this._editorInstance),this._componentReadyDefer.resolve(),this._editorInstance.onDidChangeModelContent(()=>{this.value=this._editorInstance?.getValue()??"",this.arcgisValueChange.emit(this.value)}),this._editorInstance.onDidChangeCursorSelection(M=>{this.arcgisSelectionChange.emit({selection:M.selection,model:this._editorInstance?.getModel()})});let t=g(this.el,["class"],()=>this.updateTheme());this.updateTheme();let r=new ResizeObserver(()=>this._editorInstance?.layout());return r.observe(this.el),this.addCommonEditorActions(),()=>{for(this._editorInstance?.getModel()?.dispose();this._disposables.length;)this._disposables.pop()?.dispose();t?.(),r.disconnect()}})}willUpdate(e){e.has("value")&&this._updateModelValue(),(e.has("language")||e.has("modelId"))&&this.hasUpdated&&this._updateModel(),e.has("editorOptions")&&this._editorInstance?.updateOptions(this.editorOptions??{})}_updateModelValue(){if(!this._editorInstance)return;let e=this._editorInstance.getModel();if(!e||e.getValue()===this.value)return;let t=e.getFullModelRange();this._editorInstance.executeEdits("",[{range:t,text:this.value,forceMoveMarkers:!0}]),this._editorInstance.pushUndoStop()}_updateModel(){if(!this._editorInstance)return;let e=this._editorInstance;e.getModel()?.dispose(),e.setModel(this._monacoEditor.createModel(this.value,this.language,this.getUri()))}getUri(){return this.modelId?n.parse(this.modelId):n.parse("")}updateTheme(){let e=p(this.el)==="light"?"vs":"vs-dark";e!==this._currentTheme&&(this._currentTheme=e,this._monacoEditor.setTheme(e))}addCommonEditorActions(){if(!this._editorInstance)return;let e=this._editorInstance.getAction("editor.action.fontZoomIn"),t=this._editorInstance.getAction("editor.action.fontZoomOut");this._disposables.push(this._editorInstance.addAction({id:"editor.action.fontZoomIn",label:"Editor Font Zoom In",keybindings:[o.CtrlCmd|s.Equal],contextMenuGroupId:"zooming",contextMenuOrder:1,run:async()=>await e?.run()}),this._editorInstance.addAction({id:"editor.action.fontZoomOut",label:"Editor Font Zoom Out",keybindings:[o.CtrlCmd|s.Minus],contextMenuGroupId:"zooming",contextMenuOrder:2,run:async()=>await t?.run()}))}};u("arcgis-code-editor",a);return a},a,b,e,j,k)
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
- v5.0.0-next.86 */
4
- import{a as t}from"./SWSJLICP.js";import{ck as r,jk as a,kk as m,pk as n}from"./ZK3HCKLO.js";m();async function c(o,e){return await(await t()).colorize(o,e,{tabSize:2})}async function S(o,e,i){!o||o.tagName!=="CODE"||(o.innerHTML=await c(e??"",i))}function l(){let o=n.get(a).getColorTheme();return r(o.tokenTheme.getColorMap())}function p(o){return n.get(a).onDidColorThemeChange(()=>o())}export{c as a,S as b,l as c,p as d};
3
+ v5.0.0-next.88 */
4
+ import{a as t}from"./57XZ5RMI.js";import{ck as r,jk as a,kk as m,pk as n}from"./ND46SRRX.js";m();async function c(o,e){return await(await t()).colorize(o,e,{tabSize:2})}async function S(o,e,i){!o||o.tagName!=="CODE"||(o.innerHTML=await c(e??"",i))}function l(){let o=n.get(a).getColorTheme();return r(o.tokenTheme.getColorMap())}function p(o){return n.get(a).onDidColorThemeChange(()=>o())}export{c as a,S as b,l as c,p as d};
@@ -0,0 +1,4 @@
1
+ /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
+ See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
+ v5.0.0-next.88 */
4
+ import c from"./QJMI3PBT.js";import"./CIIPVQFF.js";import b from"./5QVEAJ73.js";import a from"./64XMCCSN.js";import"./JSKAVLMU.js";import"./V2VZZXEA.js";import"./C6JXJQWK.js";import"./57XZ5RMI.js";import"./HD4ON74D.js";import"./KBNJTYAP.js";import"./TWLAYRFG.js";import"./BQLGOZSH.js";import"./JEX3DDG3.js";import"./ND46SRRX.js";import"./J76PBJ7W.js";export default $arcgis.t(([,,{a:a,b:b,c:c}])=>{return{getSqlExprDiagnosticService:b,getSqlExprWorker:a,setupMode:c}},a,b,c)
@@ -1,6 +1,6 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
- v5.0.0-next.86 */
4
- import{a as A,b as Rt}from"./VYCA3AJT.js";var Y=globalThis,Z=Y.ShadowRoot&&(Y.ShadyCSS===void 0||Y.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,yt=Symbol(),Mt=new WeakMap,k=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==yt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(Z&&t===void 0){let s=e!==void 0&&e.length===1;s&&(t=Mt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&Mt.set(e,t))}return t}toString(){return this.cssText}},It=o=>new k(typeof o=="string"?o:o+"",void 0,yt),me=(o,...t)=>{let e=o.length===1?o[0]:t.reduce(((s,r,i)=>s+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+o[i+1]),o[0]);return new k(e,o,yt)},kt=(o,t)=>{if(Z)o.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(let e of t){let s=document.createElement("style"),r=Y.litNonce;r!==void 0&&s.setAttribute("nonce",r),s.textContent=e.cssText,o.appendChild(s)}},gt=Z?o=>o:o=>o instanceof CSSStyleSheet?(t=>{let e="";for(let s of t.cssRules)e+=s.cssText;return It(e)})(o):o;var{is:ye,defineProperty:ge,getOwnPropertyDescriptor:ve,getOwnPropertyNames:Ee,getOwnPropertySymbols:$e,getPrototypeOf:be}=Object,tt=globalThis,jt=tt.trustedTypes,_e=jt?jt.emptyScript:"",Ae=tt.reactiveElementPolyfillSupport,j=(o,t)=>o,X={toAttribute(o,t){switch(t){case Boolean:o=o?_e:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,t){let e=o;switch(t){case Boolean:e=o!==null;break;case Number:e=o===null?null:Number(o);break;case Object:case Array:try{e=JSON.parse(o)}catch{e=null}}return e}},H=(o,t)=>!ye(o,t),Ht={attribute:!0,type:String,converter:X,reflect:!1,useDefault:!1,hasChanged:H};Symbol.metadata??=Symbol("metadata"),tt.litPropertyMetadata??=new WeakMap;var b=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=Ht){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let s=Symbol(),r=this.getPropertyDescriptor(t,s,e);r!==void 0&&ge(this.prototype,t,r)}}static getPropertyDescriptor(t,e,s){let{get:r,set:i}=ve(this.prototype,t)??{get(){return this[e]},set(n){this[e]=n}};return{get:r,set(n){let a=r?.call(this);i?.call(this,n),this.requestUpdate(t,a,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Ht}static _$Ei(){if(this.hasOwnProperty(j("elementProperties")))return;let t=be(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(j("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(j("properties"))){let e=this.properties,s=[...Ee(e),...$e(e)];for(let r of s)this.createProperty(r,e[r])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[s,r]of e)this.elementProperties.set(s,r)}this._$Eh=new Map;for(let[e,s]of this.elementProperties){let r=this._$Eu(e,s);r!==void 0&&this._$Eh.set(r,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let s=new Set(t.flat(1/0).reverse());for(let r of s)e.unshift(gt(r))}else t!==void 0&&e.push(gt(t));return e}static _$Eu(t,e){let s=e.attribute;return s===!1?void 0:typeof s=="string"?s: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 s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return kt(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,s){this._$AK(t,s)}_$ET(t,e){let s=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,s);if(r!==void 0&&s.reflect===!0){let i=(s.converter?.toAttribute!==void 0?s.converter:X).toAttribute(e,s.type);this._$Em=t,i==null?this.removeAttribute(r):this.setAttribute(r,i),this._$Em=null}}_$AK(t,e){let s=this.constructor,r=s._$Eh.get(t);if(r!==void 0&&this._$Em!==r){let i=s.getPropertyOptions(r),n=typeof i.converter=="function"?{fromAttribute:i.converter}:i.converter?.fromAttribute!==void 0?i.converter:X;this._$Em=r,this[r]=n.fromAttribute(e,i.type)??this._$Ej?.get(r)??null,this._$Em=null}}requestUpdate(t,e,s){if(t!==void 0){let r=this.constructor,i=this[t];if(s??=r.getPropertyOptions(t),!((s.hasChanged??H)(i,e)||s.useDefault&&s.reflect&&i===this._$Ej?.get(t)&&!this.hasAttribute(r._$Eu(t,s))))return;this.C(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:r,wrapped:i},n){s&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,n??e??this[t]),i!==!0||n!==void 0)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),r===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[r,i]of this._$Ep)this[r]=i;this._$Ep=void 0}let s=this.constructor.elementProperties;if(s.size>0)for(let[r,i]of s){let{wrapped:n}=i,a=this[r];n!==!0||this._$AL.has(r)||a===void 0||this.C(r,void 0,i,a)}}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((s=>s.hostUpdate?.())),this.update(e)):this._$EM()}catch(s){throw t=!1,this._$EM(),s}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((e=>e.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((e=>this._$ET(e,this[e]))),this._$EM()}updated(t){}firstUpdated(t){}};b.elementStyles=[],b.shadowRootOptions={mode:"open"},b[j("elementProperties")]=new Map,b[j("finalized")]=new Map,Ae?.({ReactiveElement:b}),(tt.reactiveElementVersions??=[]).push("2.1.0");var Et=globalThis,et=Et.trustedTypes,Vt=et?et.createPolicy("lit-html",{createHTML:o=>o}):void 0,$t="$lit$",_=`lit$${Math.random().toFixed(9).slice(2)}$`,bt="?"+_,Ce=`<${bt}>`,S=document,z=()=>S.createComment(""),B=o=>o===null||typeof o!="object"&&typeof o!="function",_t=Array.isArray,Gt=o=>_t(o)||typeof o?.[Symbol.iterator]=="function",vt=`[
3
+ v5.0.0-next.88 */
4
+ import{a as A,b as Rt}from"./JEX3DDG3.js";var Y=globalThis,Z=Y.ShadowRoot&&(Y.ShadyCSS===void 0||Y.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,yt=Symbol(),Mt=new WeakMap,k=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==yt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(Z&&t===void 0){let s=e!==void 0&&e.length===1;s&&(t=Mt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&Mt.set(e,t))}return t}toString(){return this.cssText}},It=o=>new k(typeof o=="string"?o:o+"",void 0,yt),me=(o,...t)=>{let e=o.length===1?o[0]:t.reduce(((s,r,i)=>s+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+o[i+1]),o[0]);return new k(e,o,yt)},kt=(o,t)=>{if(Z)o.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(let e of t){let s=document.createElement("style"),r=Y.litNonce;r!==void 0&&s.setAttribute("nonce",r),s.textContent=e.cssText,o.appendChild(s)}},gt=Z?o=>o:o=>o instanceof CSSStyleSheet?(t=>{let e="";for(let s of t.cssRules)e+=s.cssText;return It(e)})(o):o;var{is:ye,defineProperty:ge,getOwnPropertyDescriptor:ve,getOwnPropertyNames:Ee,getOwnPropertySymbols:$e,getPrototypeOf:be}=Object,tt=globalThis,jt=tt.trustedTypes,_e=jt?jt.emptyScript:"",Ae=tt.reactiveElementPolyfillSupport,j=(o,t)=>o,X={toAttribute(o,t){switch(t){case Boolean:o=o?_e:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,t){let e=o;switch(t){case Boolean:e=o!==null;break;case Number:e=o===null?null:Number(o);break;case Object:case Array:try{e=JSON.parse(o)}catch{e=null}}return e}},H=(o,t)=>!ye(o,t),Ht={attribute:!0,type:String,converter:X,reflect:!1,useDefault:!1,hasChanged:H};Symbol.metadata??=Symbol("metadata"),tt.litPropertyMetadata??=new WeakMap;var b=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=Ht){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let s=Symbol(),r=this.getPropertyDescriptor(t,s,e);r!==void 0&&ge(this.prototype,t,r)}}static getPropertyDescriptor(t,e,s){let{get:r,set:i}=ve(this.prototype,t)??{get(){return this[e]},set(n){this[e]=n}};return{get:r,set(n){let a=r?.call(this);i?.call(this,n),this.requestUpdate(t,a,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Ht}static _$Ei(){if(this.hasOwnProperty(j("elementProperties")))return;let t=be(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(j("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(j("properties"))){let e=this.properties,s=[...Ee(e),...$e(e)];for(let r of s)this.createProperty(r,e[r])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[s,r]of e)this.elementProperties.set(s,r)}this._$Eh=new Map;for(let[e,s]of this.elementProperties){let r=this._$Eu(e,s);r!==void 0&&this._$Eh.set(r,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let s=new Set(t.flat(1/0).reverse());for(let r of s)e.unshift(gt(r))}else t!==void 0&&e.push(gt(t));return e}static _$Eu(t,e){let s=e.attribute;return s===!1?void 0:typeof s=="string"?s: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 s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return kt(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,s){this._$AK(t,s)}_$ET(t,e){let s=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,s);if(r!==void 0&&s.reflect===!0){let i=(s.converter?.toAttribute!==void 0?s.converter:X).toAttribute(e,s.type);this._$Em=t,i==null?this.removeAttribute(r):this.setAttribute(r,i),this._$Em=null}}_$AK(t,e){let s=this.constructor,r=s._$Eh.get(t);if(r!==void 0&&this._$Em!==r){let i=s.getPropertyOptions(r),n=typeof i.converter=="function"?{fromAttribute:i.converter}:i.converter?.fromAttribute!==void 0?i.converter:X;this._$Em=r,this[r]=n.fromAttribute(e,i.type)??this._$Ej?.get(r)??null,this._$Em=null}}requestUpdate(t,e,s){if(t!==void 0){let r=this.constructor,i=this[t];if(s??=r.getPropertyOptions(t),!((s.hasChanged??H)(i,e)||s.useDefault&&s.reflect&&i===this._$Ej?.get(t)&&!this.hasAttribute(r._$Eu(t,s))))return;this.C(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:r,wrapped:i},n){s&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,n??e??this[t]),i!==!0||n!==void 0)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),r===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[r,i]of this._$Ep)this[r]=i;this._$Ep=void 0}let s=this.constructor.elementProperties;if(s.size>0)for(let[r,i]of s){let{wrapped:n}=i,a=this[r];n!==!0||this._$AL.has(r)||a===void 0||this.C(r,void 0,i,a)}}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((s=>s.hostUpdate?.())),this.update(e)):this._$EM()}catch(s){throw t=!1,this._$EM(),s}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((e=>e.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((e=>this._$ET(e,this[e]))),this._$EM()}updated(t){}firstUpdated(t){}};b.elementStyles=[],b.shadowRootOptions={mode:"open"},b[j("elementProperties")]=new Map,b[j("finalized")]=new Map,Ae?.({ReactiveElement:b}),(tt.reactiveElementVersions??=[]).push("2.1.0");var Et=globalThis,et=Et.trustedTypes,Vt=et?et.createPolicy("lit-html",{createHTML:o=>o}):void 0,$t="$lit$",_=`lit$${Math.random().toFixed(9).slice(2)}$`,bt="?"+_,Ce=`<${bt}>`,S=document,z=()=>S.createComment(""),B=o=>o===null||typeof o!="object"&&typeof o!="function",_t=Array.isArray,Gt=o=>_t(o)||typeof o?.[Symbol.iterator]=="function",vt=`[
5
5
  \f\r]`,V=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,zt=/-->/g,Bt=/>/g,w=RegExp(`>|${vt}(?:([^\\s"'>=/]+)(${vt}*=${vt}*(?:[^
6
6
  \f\r"'\`<>=]|("|')|))|$)`,"g"),Wt=/'/g,Ft=/"/g,Kt=/^(?:script|style|textarea|title)$/i,At=o=>(t,...e)=>({_$litType$:o,strings:t,values:e}),ns=At(1),as=At(2),cs=At(3),f=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),qt=new WeakMap,O=S.createTreeWalker(S,129);function Qt(o,t){if(!_t(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return Vt!==void 0?Vt.createHTML(t):t}var Jt=(o,t)=>{let e=o.length-1,s=[],r,i=t===2?"<svg>":t===3?"<math>":"",n=V;for(let a=0;a<e;a++){let c=o[a],l,u,h=-1,y=0;for(;y<c.length&&(n.lastIndex=y,u=n.exec(c),u!==null);)y=n.lastIndex,n===V?u[1]==="!--"?n=zt:u[1]!==void 0?n=Bt:u[2]!==void 0?(Kt.test(u[2])&&(r=RegExp("</"+u[2],"g")),n=w):u[3]!==void 0&&(n=w):n===w?u[0]===">"?(n=r??V,h=-1):u[1]===void 0?h=-2:(h=n.lastIndex-u[2].length,l=u[1],n=u[3]===void 0?w:u[3]==='"'?Ft:Wt):n===Ft||n===Wt?n=w:n===zt||n===Bt?n=V:(n=w,r=void 0);let g=n===w&&o[a+1].startsWith("/>")?" ":"";i+=n===V?c+Ce:h>=0?(s.push(l),c.slice(0,h)+$t+c.slice(h)+_+g):c+_+(h===-2?a:g)}return[Qt(o,i+(o[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]},W=class o{constructor({strings:t,_$litType$:e},s){let r;this.parts=[];let i=0,n=0,a=t.length-1,c=this.parts,[l,u]=Jt(t,e);if(this.el=o.createElement(l,s),O.currentNode=this.el.content,e===2||e===3){let h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(r=O.nextNode())!==null&&c.length<a;){if(r.nodeType===1){if(r.hasAttributes())for(let h of r.getAttributeNames())if(h.endsWith($t)){let y=u[n++],g=r.getAttribute(h).split(_),C=/([.?@])?(.*)/.exec(y);c.push({type:1,index:i,name:C[2],strings:g,ctor:C[1]==="."?ot:C[1]==="?"?rt:C[1]==="@"?it:P}),r.removeAttribute(h)}else h.startsWith(_)&&(c.push({type:6,index:i}),r.removeAttribute(h));if(Kt.test(r.tagName)){let h=r.textContent.split(_),y=h.length-1;if(y>0){r.textContent=et?et.emptyScript:"";for(let g=0;g<y;g++)r.append(h[g],z()),O.nextNode(),c.push({type:2,index:++i});r.append(h[y],z())}}}else if(r.nodeType===8)if(r.data===bt)c.push({type:2,index:i});else{let h=-1;for(;(h=r.data.indexOf(_,h+1))!==-1;)c.push({type:7,index:i}),h+=_.length-1}i++}}static createElement(t,e){let s=S.createElement("template");return s.innerHTML=t,s}};function T(o,t,e=o,s){if(t===f)return t;let r=s!==void 0?e._$Co?.[s]:e._$Cl,i=B(t)?void 0:t._$litDirective$;return r?.constructor!==i&&(r?._$AO?.(!1),i===void 0?r=void 0:(r=new i(o),r._$AT(o,e,s)),s!==void 0?(e._$Co??=[])[s]=r:e._$Cl=r),r!==void 0&&(t=T(o,r._$AS(o,t.values),r,s)),t}var st=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:s}=this._$AD,r=(t?.creationScope??S).importNode(e,!0);O.currentNode=r;let i=O.nextNode(),n=0,a=0,c=s[0];for(;c!==void 0;){if(n===c.index){let l;c.type===2?l=new U(i,i.nextSibling,this,t):c.type===1?l=new c.ctor(i,c.name,c.strings,this,t):c.type===6&&(l=new nt(i,this,t)),this._$AV.push(l),c=s[++a]}n!==c?.index&&(i=O.nextNode(),n++)}return O.currentNode=S,r}p(t){let e=0;for(let s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}},U=class o{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,s,r){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=T(this,t,e),B(t)?t===d||t==null||t===""?(this._$AH!==d&&this._$AR(),this._$AH=d):t!==this._$AH&&t!==f&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Gt(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==d&&B(this._$AH)?this._$AA.nextSibling.data=t:this.T(S.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:s}=t,r=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=W.createElement(Qt(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===r)this._$AH.p(e);else{let i=new st(r,this),n=i.u(this.options);i.p(e),this.T(n),this._$AH=i}}_$AC(t){let e=qt.get(t.strings);return e===void 0&&qt.set(t.strings,e=new W(t)),e}k(t){_t(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,s,r=0;for(let i of t)r===e.length?e.push(s=new o(this.O(z()),this.O(z()),this,this.options)):s=e[r],s._$AI(i),r++;r<e.length&&(this._$AR(s&&s._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){let s=t.nextSibling;t.remove(),t=s}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},P=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,r,i){this.type=1,this._$AH=d,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=i,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=d}_$AI(t,e=this,s,r){let i=this.strings,n=!1;if(i===void 0)t=T(this,t,e,0),n=!B(t)||t!==this._$AH&&t!==f,n&&(this._$AH=t);else{let a=t,c,l;for(t=i[0],c=0;c<i.length-1;c++)l=T(this,a[s+c],e,c),l===f&&(l=this._$AH[c]),n||=!B(l)||l!==this._$AH[c],l===d?t=d:t!==d&&(t+=(l??"")+i[c+1]),this._$AH[c]=l}n&&!r&&this.j(t)}j(t){t===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},ot=class extends P{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===d?void 0:t}},rt=class extends P{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==d)}},it=class extends P{constructor(t,e,s,r,i){super(t,e,s,r,i),this.type=5}_$AI(t,e=this){if((t=T(this,t,e,0)??d)===f)return;let s=this._$AH,r=t===d&&s!==d||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,i=t!==d&&(s===d||r);r&&this.element.removeEventListener(this.name,this,s),i&&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)}},nt=class{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){T(this,t)}},Yt={M:$t,P:_,A:bt,C:1,L:Jt,R:st,D:Gt,V:T,I:U,H:P,N:rt,U:it,B:ot,F:nt},we=Et.litHtmlPolyfillSupport;we?.(W,U),(Et.litHtmlVersions??=[]).push("3.3.0");var Ct=(o,t,e)=>{let s=e?.renderBefore??t,r=s._$litPart$;if(r===void 0){let i=e?.renderBefore??null;s._$litPart$=r=new U(t.insertBefore(z(),i),i,void 0,e??{})}return r._$AI(o),r};var wt=globalThis,$=class extends b{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=Ct(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return f}};$._$litElement$=!0,$.finalized=!0,wt.litElementHydrateSupport?.({LitElement:$});var Oe=wt.litElementPolyfillSupport;Oe?.({LitElement:$});(wt.litElementVersions??=[]).push("4.2.0");var p=(o,t,...e)=>{try{return o?.call(t,...e)}catch(s){console.error(s,o)}},F=async(o,t,...e)=>{try{return await o?.call(t,...e)}catch(s){console.error(s,o)}};var G=Symbol.for("controller"),Se=o=>typeof o=="object"&&o!==null&&(G in o||"hostConnected"in o||"hostDisconnected"in o||"hostUpdate"in o||"hostUpdated"in o),_s=o=>typeof o?.then=="function";var q,x=o=>{q!==o&&(q=o,queueMicrotask(()=>q===o?q=void 0:0))},K=o=>q,N=[],Zt=o=>{if(o===void 0){N=[];return}let t=N.indexOf(o);N=t===-1?[...N,o]:N.slice(0,t+1),queueMicrotask(()=>N=[])},Xt=()=>N,R,As=o=>{R!==o&&(R=o,queueMicrotask(()=>R===o?R=void 0:0))},Te=()=>{let o=R;return R=void 0,o},te=async(o,t)=>{let e=ct(o);if(e===void 0)return o;if(await e.ready,typeof t=="function"){let s=e.watchExports(r=>t(r,s))}return e.exports},ee=async o=>{let t=ct(o);return await t.ready,t},ct=o=>{let e=K().manager.X(o);if(e!==void 0)return e;if(Se(o))return o;let s=Te();if(s!==void 0)return s},at=!1,Cs=o=>{at=!0;try{return o()}finally{at=!1}};var Pe=(o,t,e)=>{let s=Object.keys(o),r=s.length;M===void 0&&queueMicrotask(I),M??=new Map;let i=M.get(o);return i===void 0&&(i={callbacks:[],keyCount:r},M.set(o,i)),i.keyCount!==r&&(i.callbacks.forEach(n=>n(s)),i.callbacks=[],i.keyCount=r),i.callbacks.push(n=>{let a=l=>p(t,null,l),c=n[r];c===void 0?a(void 0):o[c]===e?a(c):a(void 0)}),e},M,I=()=>{M?.forEach(({callbacks:o},t)=>{let e=Object.keys(t);o.forEach(s=>s(e))}),M=void 0},Ne=(o,t,e)=>{let s=o.manager;return s.V!==d&&s.V!==e&&s.S(void 0,void 0),s.T.length===0&&queueMicrotask(()=>s.S(void 0,void 0)),s.V=e,s.T.push((r,i)=>p(t,void 0,e===i?r:void 0)),e},xe=(o=[K(),...Xt()],t,e)=>{let s=Array.isArray(o)?o:[o],r=s.length+1,i=n=>{r-=1,n!==void 0&&(r=Math.min(r,0)),r===0&&t(n)};s.forEach(n=>Pe(n,a=>i(a===void 0?void 0:{key:a,host:n,isReactive:!1}),e));for(let n of s)if("manager"in n&&n.manager.component===n){Ne(n,a=>i(a===void 0?void 0:{key:a,host:n,isReactive:!0}),e);break}return e},De=(o="",t={},e=K())=>{let s={emit:r=>{o===""&&I();let i=new CustomEvent(o,{detail:r,cancelable:!0,bubbles:!0,composed:!0,...t});return e.el.dispatchEvent(i),i}};return o===""&&xe(void 0,r=>o=r.key,s),s},Le=De.bind(null,""),re;re=G;var Ot=class{constructor(t){this.#t=[],this.#e=[],this.#s=[],this.#o=[],this.#r=[],this.#c=[],this.#l=[],this.#p=[],this.#h=[],this.#d=!1,this.P=new A,this.connectedCalled=!1,this.loadedCalled=!1,this[re]=!0,this.#a=[];let e=this,s=t??K(new.target.name);e.#i=s,e.ready=e.P.promise,e.#n=oe(e),e.component=s,e.#i.addController(e),e.#i.manager===void 0||(Zt(e),queueMicrotask(()=>e.catchUpLifecycle()))}#t;#e;#s;#o;#r;#c;#l;#p;#h;#d;#i;catchUpLifecycle(){let{manager:t}=this.#i;t.connectedCalled&&!this.connectedCalled&&this.triggerConnected(),t.#d&&this.triggerLoad().then(()=>t.loadedCalled&&this.triggerLoaded()).catch(console.error)}#n;get exports(){return this.#n}set exports(t){let e=this.#n;e!==t&&(this.#n=t,this.#a.forEach(p),this.connectedCalled&&this.O!==!1&&this.#i.requestUpdate(this.O,e)),this.P.resolve(t)}setProvisionalExports(t,e=!0){this.#n=e?oe(t):t,this.#a.forEach(p)}#a;watchExports(t){let e=()=>t(this.#n);return this.#a.push(e),()=>void this.#a.splice(this.#a.indexOf(e),1)}get use(){return x(this.#i),te}get useRef(){return x(this.#i),ee}get useRefSync(){return x(this.#i),ct}controllerRemoved(){this.#i.el.isConnected&&this.triggerDisconnected(),this.triggerDestroy()}onConnected(t){this.#t.push(t)}onDisconnected(t){this.#e.push(t)}onLoad(t){this.#s.push(t)}onLoaded(t){this.#o.push(t)}onUpdate(t){this.#r.push(t)}onUpdated(t){this.#c.push(t)}onDestroy(t){this.#l.push(t)}onLifecycle(t){this.#p.push(t),this.connectedCalled&&this.#i.el.isConnected&&this.#u(t)}triggerConnected(){let t=this;t.hostConnected&&p(t.hostConnected,t),t.#t.forEach(p),t.triggerLifecycle(),t.connectedCalled=!0}triggerDisconnected(){let t=this;t.hostDisconnected&&p(t.hostDisconnected,t),t.#e.forEach(p),t.#h.forEach(p),t.#h=[]}async triggerLoad(){if(this.#d)return;this.#d=!0;let t=this;t.hostLoad&&await F(t.hostLoad,t),this.#s.length>0&&await Promise.allSettled(this.#s.map(F)),this.P.resolve(this.#n)}triggerLoaded(){this.loadedCalled||(this.hostLoaded&&p(this.hostLoaded,this),this.#o.forEach(p),this.loadedCalled=!0)}triggerUpdate(t){this.hostUpdate&&p(this.hostUpdate,this,t),this.#r.forEach(se,t)}triggerUpdated(t){this.hostUpdated&&p(this.hostUpdated,this,t),this.#c.forEach(se,t)}triggerDestroy(){this.hostDestroy&&p(this.hostDestroy,this),this.#l.forEach(p)}triggerLifecycle(){this.hostLifecycle&&this.#u(()=>this.hostLifecycle()),this.#p.forEach(this.#u,this)}#u(t){x(this.#i);let e=p(t);(Array.isArray(e)?e:[e]).forEach(r=>{typeof r=="function"?this.#h.push(r):typeof r=="object"&&typeof r.remove=="function"&&this.#h.push(r.remove)})}};function se(o){p(o,void 0,this)}var ie=Ot,oe=o=>{if(typeof o!="object"&&typeof o!="function"||o===null)return o;let t={get(s,r,i){if(!((r==="exports"||r==="_exports")&&r in s&&s[r]===e)&&(r in s||r in Promise.prototype||typeof r=="symbol"))return typeof s=="function"?s[r]:Reflect.get(s,r,i)}},e=new Proxy(o,t);return e};var lt=o=>o.replace(Ue,(t,e)=>`${e===0?"":"-"}${t.toLowerCase()}`),Ue=/[A-Z]+(?![a-z])|[A-Z]/gu;var ne=(o,t)=>new Array(t+1).join(o),Ds=o=>{let t='"',e="'";o.includes(t)&&!o.includes(e)&&(e='"',t="'");let r=new RegExp(`(^|[^\\\\])((?:\\\\{2})*)((?:\\\\${e})+)`,"gu");o=o.replace(r,(n,a,c,l)=>a+c+ne(e,l.length/2));let i=new RegExp(`(^|[^\\\\])((?:\\\\{2})*)(${t}+)`,"gu");return o=o.replace(i,(n,a,c,l)=>a+c+ne(`\\${t}`,l.length)),t+o+t},Ls=o=>{let t=o?o.replaceAll(/[-[\]/{}()*+?.\\^$|]/gu,"\\$&"):"^.*$";return new RegExp(t,"i")},Us=o=>`\u200E${o??""}\u200E`,Re="randomUUID"in crypto,Rs=()=>{if(Re)return crypto.randomUUID();let o=crypto.getRandomValues(new Uint16Array(8));o[3]=o[3]&4095|16384,o[4]=o[4]&16383|32768;let t=e=>o[e].toString(16).padStart(4,"0");return`${t(0)+t(1)}-${t(2)}-${t(3)}-${t(4)}-${t(5)}${t(6)}${t(7)}`};var Ms=(o,t={})=>(o??"").replace(/\{(?<valueName>.*?)\}/gu,(e,s)=>t[s]??e);var Tt=o=>{let t=o;for(;t=t.parentNode??t.host;)if(t?.constructor?.lumina){let e=t;return e.manager?.loadedCalled||(e.J??e._offspring).push(o),(e.I??e._postLoad).promise}return!1},Pt={};function Nt(){}var Me=(o,t)=>function(s,r){if(!globalThis.customElements)return;let n=(r??s??{}).resourcesUrl;n&&o.setAssetPath(n);for(let[a,[c,l=""]]of Object.entries(t)){if(customElements.get(a))continue;let[u,h,y]=l.split(";"),g=u?u?.split(",").map(Ie):void 0,C=g?.map(([L])=>L),D=class extends St{static{this.observedAttributes=g?.map(([,L])=>L).filter(L=>L!=="")}static{this.C=C}static{this.E=h?h?.split(","):void 0}static{this.D=y?.split(",")}static{this.L=a}static{this.K=o}constructor(){!D.B&&(D.B=c(),D.F()),super()}};customElements.define(a,D)}},ht=Object.defineProperty,Ie=o=>{let t=o.split(":");return t.length===1?[t[0],lt(t[0])]:t},ke=globalThis.HTMLElement??Nt,St=class extends ke{constructor(){super(),this.#e={},this.#s=[],this.I=new A,this.H=new A,this.J=[];let t=this,e=t.constructor;t._offspring=t.J,t._postLoad=t.I,e.C?.forEach(s=>{Object.hasOwn(t,s)&&(t.#e[s]=t[s],delete t[s])}),e.A?t.#o({a:e.A}):e.B.then(async s=>{await e.K.p,t.#o(await(s.default?.then(r=>typeof r=="function"?{a:r}:r)??s))}).catch(s=>{t.H.reject(s),setTimeout(()=>{throw s})})}static{this.lumina=!0}static F(){for(let t of this.C??[])ht(this.prototype,t,{configurable:!0,enumerable:!0,get(){return this.#e[t]},set(e){this.#e[t]=e}});for(let t of this.E??[])ht(this.prototype,t,{async value(...e){return this.#t||await this.H.promise,await this.#t[t](...e)},configurable:!0});for(let t of this.D??[])ht(this.prototype,t,{value(...e){return this.#t[t](...e)},configurable:!0})}#t;#e;#s;get manager(){return this.#t?.manager}attributeChangedCallback(t,e,s){this.#t?.attributeChangedCallback(t,e,s),this.#t||this.#s.push(t)}connectedCallback(){this.#t?this.#t.connectedCallback?.():queueMicrotask(()=>this.G=Tt(this))}disconnectedCallback(){this.#t?.disconnectedCallback?.()}async componentOnReady(){return await this.H.promise,this}#o(t){let e=this.constructor,s=e.L,r=this.#e,i=Object.values(t).find(h=>h.L===s),n=`${s}--lazy`,a=i;for(;a&&!Object.hasOwn(a,"lumina");)a=Object.getPrototypeOf(a);He(a),!e.A&&(e.A=i,customElements.define(n,i)),i.N=this;let l=document.createElement(n);i.N=void 0,this.#t=l,this.#e=l,this.#s.forEach(h=>l.attributeChangedCallback(h,null,this.getAttribute(h))),Object.entries(r).forEach(je,l);let u=this.isConnected;(u||this.G)&&(l.connectedCallback?.(),u||l.disconnectedCallback())}addController(){}requestUpdate(){this.#t?.requestUpdate()}};function je([o,t]){this[o]=t}var He=o=>{let t=o.prototype,e=Element.prototype;Object.hasOwn(t,"isConnected")||(t.setAttribute=function(r,i){e.setAttribute.call(this.el,r,i)},t.removeAttribute=function(r){e.removeAttribute.call(this.el,r)},ht(t,"isConnected",{get(){return Reflect.get(e,"isConnected",this.el)}}))};var{I:Ve}=Yt;var dt=o=>o.strings===void 0,ce=()=>document.createComment(""),Fs=(o,t,e)=>{let s=o._$AA.parentNode,r=t===void 0?o._$AB:t._$AA;if(e===void 0){let i=s.insertBefore(ce(),r),n=s.insertBefore(ce(),r);e=new Ve(i,n,o,o.options)}else{let i=e._$AB.nextSibling,n=e._$AM,a=n!==o;if(a){let c;e._$AQ?.(o),e._$AM=o,e._$AP!==void 0&&(c=o._$AU)!==n._$AU&&e._$AP(c)}if(i!==r||a){let c=e._$AA;for(;c!==i;){let l=c.nextSibling;s.insertBefore(c,r),c=l}}}return e},qs=(o,t,e=o)=>(o._$AI(t,e),o),ze={},le=(o,t=ze)=>o._$AH=t,Gs=o=>o._$AH,Ks=o=>{o._$AP?.(!1,!0);let t=o._$AA,e=o._$AB.nextSibling;for(;t!==e;){let s=t.nextSibling;t.remove(),t=s}};var m={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},E=o=>(...t)=>({_$litDirective$:o,values:t}),v=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,s){this._$Ct=t,this._$AM=e,this._$Ci=s}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};var Q=(o,t)=>{let e=o._$AN;if(e===void 0)return!1;for(let s of e)s._$AO?.(t,!1),Q(s,t);return!0},pt=o=>{let t,e;do{if((t=o._$AM)===void 0)break;e=t._$AN,e.delete(o),o=t}while(e?.size===0)},he=o=>{for(let t;t=o._$AM;o=t){let e=t._$AN;if(e===void 0)t._$AN=e=new Set;else if(e.has(o))break;e.add(o),Fe(t)}};function Be(o){this._$AN!==void 0?(pt(this),this._$AM=o,he(this)):this._$AM=o}function We(o,t=!1,e=0){let s=this._$AH,r=this._$AN;if(r!==void 0&&r.size!==0)if(t)if(Array.isArray(s))for(let i=e;i<s.length;i++)Q(s[i],!1),pt(s[i]);else s!=null&&(Q(s,!1),pt(s));else Q(this,o)}var Fe=o=>{o.type==m.CHILD&&(o._$AP??=We,o._$AQ??=Be)},ut=class extends v{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,s){super._$AT(t,e,s),he(this),this.isConnected=t._$AU}_$AO(t,e=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),e&&(Q(this,t),pt(this))}setValue(t){if(dt(this._$Ct))this._$Ct._$AI(t,this);else{let e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}};var ro=()=>new Dt,Dt=class{},xt=new WeakMap,Lt=E(class extends ut{render(o){return d}update(o,[t]){let e=t!==this.G;return e&&this.G!==void 0&&this.rt(void 0),(e||this.lt!==this.ct)&&(this.G=t,this.ht=o.options?.host,this.rt(this.ct=o.element)),d}rt(o){if(this.isConnected||(o=void 0),typeof this.G=="function"){let t=this.ht??globalThis,e=xt.get(t);e===void 0&&(e=new WeakMap,xt.set(t,e)),e.get(this.G)!==void 0&&this.G.call(this.ht,void 0),e.set(this.G,o),o!==void 0&&this.G.call(this.ht,o)}else this.G.value=o}get lt(){return typeof this.G=="function"?xt.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var ft=class extends ie{constructor(t){super(t),this.destroyed=!1,this.R=!1,this.V=d,this.T=[],this.#s=new WeakMap,this.#e=t,this.exports=void 0,this.hasDestroy=mt in t&&typeof t.destroy=="function",$.prototype.addController.call(t,{hostConnected:()=>{if(this.destroyed){let e=t.el.localName;throw t.el.remove(),new Error(`The ${e} component has already been destroyed. It cannot be used again. If you meant to disconnect and reconnect a component without automatic destroy, set the ${mt} prop.`)}this.#t!==void 0&&clearTimeout(this.#t),I();for(let e of t.M)"triggerConnected"in e?e.triggerConnected():p(e.hostConnected,e)},hostDisconnected:()=>{for(let e of t.M)"triggerDisconnected"in e?e.triggerDisconnected():p(e.hostDisconnected,e);this.hasDestroy&&!this.destroyed&&this.U()},hostUpdate:()=>{for(let e of t.M)"triggerUpdate"in e?e.triggerUpdate(this.Q):p(e.hostUpdate,e,this.Q)},hostUpdated:()=>{for(let e of t.M)"triggerUpdated"in e?e.triggerUpdated(this.Q):p(e.hostUpdated,e,this.Q);this.Q=void 0}}),queueMicrotask(()=>this.R=!0),x(t)}#t;#e;async destroy(){if(!this.destroyed){this.#e.el.isConnected&&(this.hasDestroy=!1,this.#e.el.remove()),this.#t=void 0,this.destroyed=!0;for(let t of this.#e.M)"triggerDestroy"in t?t.triggerDestroy():p(t.hostDestroy,t);this.#e.M.splice(0)}}U(){if(this.#t!==void 0&&clearTimeout(this.#t),!this.#e.el.isConnected&&!this.#e.autoDestroyDisabled){let t=()=>void this.#e.destroy();this.#t=Rt(t,Ge)}}S(t,e){let s=this.T;this.V=d,this.T=[],s.forEach(r=>r(t,e))}#s;W(t,e){(typeof e=="object"&&e!==null||typeof e=="function")&&this.#s.set(e,t)}X(t){if(typeof t=="object"&&t!==null||typeof t=="function")return this.#s.get(t)}},Ge=1e3,mt="autoDestroyDisabled";var de=E(class extends v{constructor(o){if(super(o),o.type!==m.ATTRIBUTE||o.name!=="class"||o.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(o){return" "+Object.keys(o).filter((t=>o[t])).join(" ")+" "}update(o,[t]){if(this.st===void 0){this.st=new Set,o.strings!==void 0&&(this.nt=new Set(o.strings.join(" ").split(/\s/).filter((s=>s!==""))));for(let s in t)t[s]&&!this.nt?.has(s)&&this.st.add(s);return this.render(t)}let e=o.element.classList;for(let s of this.st)s in t||(e.remove(s),this.st.delete(s));for(let s in t){let r=!!t[s];r===this.st.has(s)||this.nt?.has(s)||(r?(e.add(s),this.st.add(s)):(e.remove(s),this.st.delete(s)))}return f}});var pe="important",Ke=" !"+pe,Qe=E(class extends v{constructor(o){if(super(o),o.type!==m.ATTRIBUTE||o.name!=="style"||o.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(o){return Object.keys(o).reduce(((t,e)=>{let s=o[e];return s==null?t:t+`${e=e.includes("-")?e:e.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${s};`}),"")}update(o,[t]){let{style:e}=o.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(let s of this.ft)t[s]==null&&(this.ft.delete(s),s.includes("-")?e.removeProperty(s):e[s]=null);for(let s in t){let r=t[s];if(r!=null){this.ft.add(s);let i=typeof r=="string"&&r.endsWith(Ke);s.includes("-")||i?e.setProperty(s,i?r.slice(0,-11):r,i?pe:""):e[s]=r}}return f}});var Je=E(class extends v{constructor(o){if(super(o),o.type!==m.PROPERTY&&o.type!==m.ATTRIBUTE&&o.type!==m.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!dt(o))throw Error("`live` bindings can only contain a single expression")}render(o){return o}update(o,[t]){if(t===f||t===d)return t;let e=o.element,s=o.name;if(o.type===m.PROPERTY){if(t===e[s])return f}else if(o.type===m.BOOLEAN_ATTRIBUTE){if(!!t===e.hasAttribute(s))return f}else if(o.type===m.ATTRIBUTE&&e.getAttribute(s)===t+"")return f;return le(o),t}});var ue=class o extends ${constructor(){super(),this.M=[],this.manager=new ft(this);let t=this,e=t.constructor,s=e.N,r=e.K.o,i=o.prototype.shouldUpdate;t.#o=s?.H??new A,t.I=s?.I??new A,t.J=s?.J??[],t._offspring=t.J,t._postLoad=t.I,t.el=s??t,t.#s=t.enableUpdating,t.enableUpdating=Nt,t.shouldUpdate!==i&&(t.#e=t.shouldUpdate,t.shouldUpdate=i),r&&(t.#t=new Map,e.elementProperties.forEach((n,a)=>t.#t.set(a,r()))),!1}static finalizeStyles(t){let e=super.finalizeStyles(t),s=this.shadowRootOptions===Pt;return this.K?.commonStyles===void 0||s?e:[this.K.commonStyles,...e]}static createProperty(t,e){let s=typeof e=="number"?e:Array.isArray(e)?e[0]:0,r=Array.isArray(e)?e[1]:void 0,i=r?.hasChanged??H,n={attribute:s&1&&typeof t=="string"?lt(t):!1,reflect:!!(s&2),type:s&4?Boolean:s&8?Number:void 0,state:!!(s&16),readOnly:!!(s&32),noAccessor:!!(s&64),c:!1,...r,hasChanged(a,c){let l=i(a,c);return n.c=l,l}};super.createProperty(t,n)}static getPropertyDescriptor(t,e,s){let r=this.K,i=super.getPropertyDescriptor(t,e,s);return s.d=i,{...i,get(){return r.t?.(this.#t.get(t)),i.get?.call(this)},set(n){let a=this.manager;if(s.readOnly&&!at&&(a.R||a.connectedCalled))throw Error(`Cannot assign to read-only property "${t}" of ${this.el.localName}. Trying to assign "${n}"`);i.set.call(this,n??void 0),s.c&&this.#t?.get(t)?.notify(),a.T.length>0&&(I(),a?.S(t,n))}}}static{this.lumina=!0}#t;#e;#s;#o;#r;connectedCallback(){if(this.el.hasAttribute("defer-hydration"))return;let t=this.constructor.K.c?.(()=>this.requestUpdate());this.#r=t;let e=!this.manager.connectedCalled;super.connectedCallback(),e?queueMicrotask(()=>this.#l().catch(s=>{this.#o.reject(s),setTimeout(()=>{throw s})})):t&&this.requestUpdate()}#c(t){try{this.#r.clear(),this.constructor.K.r(this.#r,()=>super.update(t))}catch(e){throw this.#r.clear(),e}}disconnectedCallback(){super.disconnectedCallback(),this.#r?.destroy(),this.#r=void 0}createRenderRoot(){let t=this.el.shadowRoot,e=this.constructor,s=e.shadowRootOptions,i=t??(s===Pt?this.el:this.el.attachShadow(s));if(this.isConnected){let n=i.getRootNode();n.adoptedStyleSheets=[...n.adoptedStyleSheets,...e.elementStyles.map(a=>"styleSheet"in a?a.styleSheet:a)]}return i}async#l(){let t=this.el.G??Tt(this.el);t&&await t;let e=[];for(let r of this.M)"triggerLoad"in r?e.push(r.triggerLoad()):e.push(F(r.hostLoad,r));await Promise.all(e),await this.load?.(),this.manager.hasDestroy&&this.manager.onUpdate(r=>r.has(mt)&&this.manager.U()),this.#s(!0),this.performUpdate(),this.I.resolve(),await Promise.resolve();let s=this.J.filter(r=>!r.manager?.loadedCalled);s.length&&await Promise.allSettled(s.map(async r=>await r.componentOnReady())),this.J.length=0,this.el.setAttribute(this.constructor.K.hydratedAttribute,"");for(let r of this.M)"triggerLoaded"in r?r.triggerLoaded():p(r.hostLoaded,r);this.loaded?.(),this.#o.resolve()}shouldUpdate(t){return this.manager.Q=t,this.#e?.(t)??!0}update(t){this.#r?this.#c(t):super.update(t)}listen(t,e,s){let r=e?.bind(this)??e;this.manager.onLifecycle(()=>(this.el.addEventListener(t,r,s),()=>this.el.removeEventListener(t,r,s)))}listenOn(t,e,s,r){let i=s?.bind(this)??s;this.manager.onLifecycle(()=>(t.addEventListener(e,i,r),()=>t.removeEventListener(e,i,r)))}async componentOnReady(){return await this.#o.promise,this}addController(t){this.M.push(t),!(G in t)&&this.renderRoot&&this.el.isConnected&&t.hostConnected?.()}removeController(t){this.M.splice(this.M.indexOf(t),1),t.controllerRemoved?.()}};var fe=o=>{let t,e=r=>{t=new URL(r,globalThis.location?.href||void 0).href},s={...o,getAssetPath(r){let i=new URL(r,t);return i.origin!==globalThis.location?.origin?i.href:i.pathname},setAssetPath:e,customElement(r,i){i.K=s,i.L=r,customElements.get(r)||customElements.define(r,i)}};return e(o.defaultAssetPath),s};var Er=o=>typeof o=="object"&&o!=null?de(o):o;var Ut=class extends v{#t;#e;constructor(t){super(t);let e=this;this.#e=function(r){return e.#t.call(this,r)}}render(t){return typeof t=="function"?(this.#t=t,Lt(this.#e)):Lt(t)}},$r=E(Ut);var br=d;var J=fe({defaultAssetPath:"https://jsdev.arcgis.com/5.0.0-next/coding-components/",hydratedAttribute:"hydrated"}),{customElement:Or,getAssetPath:Sr,setAssetPath:Tr}=J;J.t=void 0;J.o=void 0;J.c=void 0;J.r=void 0;export{_s as a,x as b,Zt as c,Xt as d,As as e,Cs as f,It as g,me as h,H as i,ns as j,f as k,d as l,xe as m,Le as n,Ot as o,Ds as p,Ls as q,Us as r,Rs as s,Ms as t,Pt as u,Me as v,m as w,E as x,v as y,Fs as z,qs as A,le as B,Gs as C,Ks as D,ro as E,Lt as F,ue as G,Er as H,br as I,J,Or as K,Sr as L};
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
- v5.0.0-next.86 */
4
- import{A as h,B as A,C as D,D as y,k as P,w as k,x as w,y as V,z as m}from"./DD6ZRT43.js";var b=(s,f,c)=>{let p=new Map;for(let e=f;e<=c;e++)p.set(s[e],e);return p},I=w(class extends V{constructor(s){if(super(s),s.type!==k.CHILD)throw Error("repeat() can only be used in text expressions")}dt(s,f,c){let p;c===void 0?c=f:f!==void 0&&(p=f);let e=[],n=[],o=0;for(let a of s)e[o]=p?p(a,o):o,n[o]=c(a,o),o++;return{values:n,keys:e}}render(s,f,c){return this.dt(s,f,c).values}update(s,[f,c,p]){let e=D(s),{values:n,keys:o}=this.dt(f,c,p);if(!Array.isArray(e))return this.ut=o,n;let a=this.ut??=[],u=[],v,g,t=0,l=e.length-1,r=0,i=n.length-1;for(;t<=l&&r<=i;)if(e[t]===null)t++;else if(e[l]===null)l--;else if(a[t]===o[r])u[r]=h(e[t],n[r]),t++,r++;else if(a[l]===o[i])u[i]=h(e[l],n[i]),l--,i--;else if(a[t]===o[i])u[i]=h(e[t],n[i]),m(s,u[i+1],e[t]),t++,i--;else if(a[l]===o[r])u[r]=h(e[l],n[r]),m(s,e[t],e[l]),l--,r++;else if(v===void 0&&(v=b(o,r,i),g=b(a,t,l)),v.has(a[t]))if(v.has(a[l])){let d=g.get(o[r]),x=d!==void 0?e[d]:null;if(x===null){let C=m(s,e[t]);h(C,n[r]),u[r]=C}else u[r]=h(x,n[r]),m(s,e[t],x),e[d]=null;r++}else y(e[l]),l--;else y(e[t]),t++;for(;r<=i;){let d=m(s,u[i+1]);h(d,n[r]),u[r++]=d}for(;t<=l;){let d=e[t++];d!==null&&y(d)}return this.ut=o,A(s,u),P}});export{I as a};
3
+ v5.0.0-next.88 */
4
+ import{A as h,B as A,C as D,D as y,k as P,w as k,x as w,y as V,z as m}from"./BQLGOZSH.js";var b=(s,f,c)=>{let p=new Map;for(let e=f;e<=c;e++)p.set(s[e],e);return p},I=w(class extends V{constructor(s){if(super(s),s.type!==k.CHILD)throw Error("repeat() can only be used in text expressions")}dt(s,f,c){let p;c===void 0?c=f:f!==void 0&&(p=f);let e=[],n=[],o=0;for(let a of s)e[o]=p?p(a,o):o,n[o]=c(a,o),o++;return{values:n,keys:e}}render(s,f,c){return this.dt(s,f,c).values}update(s,[f,c,p]){let e=D(s),{values:n,keys:o}=this.dt(f,c,p);if(!Array.isArray(e))return this.ut=o,n;let a=this.ut??=[],u=[],v,g,t=0,l=e.length-1,r=0,i=n.length-1;for(;t<=l&&r<=i;)if(e[t]===null)t++;else if(e[l]===null)l--;else if(a[t]===o[r])u[r]=h(e[t],n[r]),t++,r++;else if(a[l]===o[i])u[i]=h(e[l],n[i]),l--,i--;else if(a[t]===o[i])u[i]=h(e[t],n[i]),m(s,u[i+1],e[t]),t++,i--;else if(a[l]===o[r])u[r]=h(e[l],n[r]),m(s,e[t],e[l]),l--,r++;else if(v===void 0&&(v=b(o,r,i),g=b(a,t,l)),v.has(a[t]))if(v.has(a[l])){let d=g.get(o[r]),x=d!==void 0?e[d]:null;if(x===null){let C=m(s,e[t]);h(C,n[r]),u[r]=C}else u[r]=h(x,n[r]),m(s,e[t],x),e[d]=null;r++}else y(e[l]),l--;else y(e[t]),t++;for(;r<=i;){let d=m(s,u[i+1]);h(d,n[r]),u[r++]=d}for(;t<=l;){let d=e[t++];d!==null&&y(d)}return this.ut=o,A(s,u),P}});export{I as a};
@@ -1,6 +1,6 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
- v5.0.0-next.86 */
4
- import{f as d}from"./5WXTHFB6.js";import{q as c}from"./DD6ZRT43.js";function L(t,r,m,u){if(!r)return[];let e=Array.isArray(r)?r:[r];if(!e.length)return[];let l=c(m);return t.filter(o=>e.some(a=>l.test(String(o[a]??""))))}function N(t){return t?`${t.portal.url}/home/item.html?id=${t.id}`:""}function C(t,r,m="add",u){if(!t)return;let e=t.getSelection(),l=e&&(e.startLineNumber!==e.endLineNumber||e.startColumn!==e.endColumn),o=[],a=t.getValue()??"";if(m==="replace"){let i=`${u}
3
+ v5.0.0-next.88 */
4
+ import{f as d}from"./HD4ON74D.js";import{q as c}from"./BQLGOZSH.js";function L(t,r,m,u){if(!r)return[];let e=Array.isArray(r)?r:[r];if(!e.length)return[];let l=c(m);return t.filter(o=>e.some(a=>l.test(String(o[a]??""))))}function N(t){return t?`${t.portal.url}/home/item.html?id=${t.id}`:""}function C(t,r,m="add",u){if(!t)return;let e=t.getSelection(),l=e&&(e.startLineNumber!==e.endLineNumber||e.startColumn!==e.endColumn),o=[],a=t.getValue()??"";if(m==="replace"){let i=`${u}
5
5
  ${r}`,s=t.getModel(),n=s?.getLineCount()??1,f=s?.getLineMaxColumn(n)??1;o=[{range:{startLineNumber:1,startColumn:1,endLineNumber:n,endColumn:f},text:i}]}else{let i=l?{startLineNumber:e.startLineNumber,startColumn:e.startColumn,endLineNumber:e.endLineNumber,endColumn:e.endColumn}:(()=>{let n=t.getPosition();return{startLineNumber:n?.lineNumber??1,startColumn:n?.column??1,endLineNumber:n?.lineNumber??1,endColumn:n?.column??1}})(),s=!1;if(u){let n=u.replace(/[.*+?^${}()|[\]\\]/gu,"\\$&");s=!new RegExp(`^\\s*${n}\\s*$`,"mu").test(a)}s&&o.push({range:{startLineNumber:1,startColumn:1,endLineNumber:1,endColumn:1},text:`${u}
6
6
  `}),o.push({range:i,text:r})}try{t.pushUndoStop(),t.executeEdits("insertText",o),t.pushUndoStop(),t.focus()}catch(i){console.error("Failed to edit model:",i)}}function g(t){try{return d(t)}catch{return t}}export{L as a,N as b,C as c,g as d};
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
- v5.0.0-next.86 */
4
- async function t(){return await import("./QFHNOTXM.js").then(m=>m.default)}export{t as a};
3
+ v5.0.0-next.88 */
4
+ async function t(){return await import("./BQ7FHQUX.js").then(m=>m.default)}export{t as a};
@@ -1,7 +1,7 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
- v5.0.0-next.86 */
4
- import{a as S}from"./GGKL5FWT.js";import a from"./IVXRAZY5.js";import{a as O}from"./BTHHVPUO.js";import"./JPLSYGHT.js";import"./3JQZLQ6X.js";import{d as F}from"./HUDN4YMY.js";import{b as C,c as L}from"./A7GC2RAP.js";import{E as m,F as p,G as T,H as v,I as y,K as M,g as P,h as b,j as t,n as x,p as d,t as r}from"./DD6ZRT43.js";import"./VYCA3AJT.js";import"./MCGQ6KRV.js";export default $arcgis.t(([{b:o,c:R,d:h,e:_,f:j,g:D}])=>{var J=b`: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)}}`,l={lines:!0,selectionMode:"none",scale:"s",oncalciteTreeSelect:e=>e.currentTarget.selectedItems.forEach(a=>a.selected=!1)},g={onClick:e=>{let a=e.currentTarget;a.expanded=!a.expanded}},n=({name:e})=>t`<span class="dictionary-property">${e}</span><span>:&nbsp;</span>`,z=({value:e,subtree:a=!1})=>t`<calcite-tree slot=${(a?"children":void 0)??y} .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}><calcite-tree-item class="string-value">${JSON.stringify(e.castAsJson(),void 0,2)}</calcite-tree-item></calcite-tree>`,N=({value:e,subtree:a=!1})=>t`<calcite-tree slot=${(a?"children":void 0)??y} .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}><calcite-tree-item><div class="tree-item-label">${n({name:"type"})}${e.type}</div></calcite-tree-item><calcite-tree-item><div class="tree-item-label">${n({name:"value"})}<span class="string-value">${JSON.stringify(e,void 0,2)}</span></div></calcite-tree-item></calcite-tree>`,f=({arcadeResult:e})=>{switch(e.type){case"unknown":case"null":return t`<span class="constant-value">${e.type}</span>`;case"text":return t`<span class="string-value">${d(e.value)}</span>`;case"number":return t`<span class="number-value">${e.value.toString()}</span>`;case"boolean":return t`<span class="constant-value">${e.value.toString()}</span>`;case"date":return t`<span class="date-value">${_(e)}</span>`;case"dateOnly":return t`<span class="string-value">${d(j(e))}</span>`;case"time":return t`<span class="string-value">${d(D(e))}</span>`;default:return null}},E=({arcadeResult:e,t9nStrings:a})=>{let s=e.value??[],c=Math.max(s.length-o,0);return t`<span>${`${e.type}(${s.length??0})`}</span>${c>0?t`<span>&nbsp;${r(a.showingfirstitemsformat,{count:o.toString()})}</span>`:null}`},I=({value:e,subtree:a,t9nStrings:s})=>{let c=e.geometry?.();return t`<calcite-tree slot=${"children"} .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}>${e.keys().map(i=>{let u=h(e.field(i));return e.arcadeDeclaredClass==="esri.arcade.Feature"&&u.type==="geometry"?null:k({arcadeResult:u,name:i,t9nStrings:s})})}${c?k({arcadeResult:{type:"geometry",value:c},name:"geometry",t9nStrings:s}):null}</calcite-tree>`},G=({arcadeResult:e,t9nStrings:a})=>t`<div class="value-type"><span>${e.type}:</span>${e.features.length>=R?t`<span>&nbsp;${r(a.showingfirstitemsformat,{count:R.toString()})}</span>`:null}</div>`,A=({items:e,subtree:a,t9nStrings:s})=>t`<calcite-tree slot=${"children"} .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}>${e.map((c,i)=>{let u=h(c);return k({arcadeResult:u,name:i,expanded:!a,t9nStrings:s})})}</calcite-tree>`,k=({arcadeResult:e,name:a,expanded:s,t9nStrings:c})=>{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">${n({name:a})}${f({arcadeResult:e})}</div></calcite-tree-item>`;case"array":{let i=(e.value??[]).slice(0,o);return t`<calcite-tree-item .expanded=${s} @click=${g.onClick}><div class="tree-item-label">${n({name:a})}${E({arcadeResult:e,t9nStrings:c})}</div>${A({items:i,subtree:!0,t9nStrings:c})}</calcite-tree-item>`}case"geometry":return t`<calcite-tree-item .expanded=${s} @click=${g.onClick}><div class="tree-item-label">${n({name:a})}<span>${e.type}</span></div>${N({value:e.value,subtree:!0})}</calcite-tree-item>`;case"attachment":return t`<calcite-tree-item .expanded=${s} @click=${g.onClick}><div class="tree-item-label">${n({name:a})}<span>${e.type}</span></div>${z({value:e.value,subtree:!0})}</calcite-tree-item>`;case"feature":case"dictionary":case"portal":return t`<calcite-tree-item .expanded=${s} @click=${g.onClick}><div class="tree-item-label">${n({name:a})}<span>${e.type}</span></div>${I({value:e.value,subtree:!0,t9nStrings:c})}</calcite-tree-item>`;default:return null}},V=({arcadeResult:e})=>{let a=F(e.value.fields);return t`<table><thead><tr>${a.map(s=>t`<th>${s.name}</th>`)}</tr></thead><tbody>${e.features.map(s=>t`<tr>${a.map(c=>{try{let i=h(s.field(c.name));return t`<td>${f({arcadeResult:i})}</td>`}catch{return t`<td></td>`}})}</tr>`)}</tbody></table>`};function q(){let e=`:host {
3
+ v5.0.0-next.88 */
4
+ import{a as S}from"./HY3ILV5W.js";import a from"./5M26RSF3.js";import{a as O}from"./MOPDGBIL.js";import"./4RXKRZBZ.js";import"./JSKAVLMU.js";import{d as F}from"./V2VZZXEA.js";import{b as C,c as L}from"./TWLAYRFG.js";import{E as m,F as p,G as T,H as v,I as y,K as M,g as P,h as b,j as t,n as x,p as d,t as r}from"./BQLGOZSH.js";import"./JEX3DDG3.js";import"./J76PBJ7W.js";export default $arcgis.t(([{b:o,c:R,d:h,e:_,f:j,g:D}])=>{var J=b`: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)}}`,l={lines:!0,selectionMode:"none",scale:"s",oncalciteTreeSelect:e=>e.currentTarget.selectedItems.forEach(a=>a.selected=!1)},g={onClick:e=>{let a=e.currentTarget;a.expanded=!a.expanded}},n=({name:e})=>t`<span class="dictionary-property">${e}</span><span>:&nbsp;</span>`,z=({value:e,subtree:a=!1})=>t`<calcite-tree slot=${(a?"children":void 0)??y} .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}><calcite-tree-item class="string-value">${JSON.stringify(e.castAsJson(),void 0,2)}</calcite-tree-item></calcite-tree>`,N=({value:e,subtree:a=!1})=>t`<calcite-tree slot=${(a?"children":void 0)??y} .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}><calcite-tree-item><div class="tree-item-label">${n({name:"type"})}${e.type}</div></calcite-tree-item><calcite-tree-item><div class="tree-item-label">${n({name:"value"})}<span class="string-value">${JSON.stringify(e,void 0,2)}</span></div></calcite-tree-item></calcite-tree>`,f=({arcadeResult:e})=>{switch(e.type){case"unknown":case"null":return t`<span class="constant-value">${e.type}</span>`;case"text":return t`<span class="string-value">${d(e.value)}</span>`;case"number":return t`<span class="number-value">${e.value.toString()}</span>`;case"boolean":return t`<span class="constant-value">${e.value.toString()}</span>`;case"date":return t`<span class="date-value">${_(e)}</span>`;case"dateOnly":return t`<span class="string-value">${d(j(e))}</span>`;case"time":return t`<span class="string-value">${d(D(e))}</span>`;default:return null}},E=({arcadeResult:e,t9nStrings:a})=>{let s=e.value??[],c=Math.max(s.length-o,0);return t`<span>${`${e.type}(${s.length??0})`}</span>${c>0?t`<span>&nbsp;${r(a.showingfirstitemsformat,{count:o.toString()})}</span>`:null}`},I=({value:e,subtree:a,t9nStrings:s})=>{let c=e.geometry?.();return t`<calcite-tree slot=${"children"} .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}>${e.keys().map(i=>{let u=h(e.field(i));return e.arcadeDeclaredClass==="esri.arcade.Feature"&&u.type==="geometry"?null:k({arcadeResult:u,name:i,t9nStrings:s})})}${c?k({arcadeResult:{type:"geometry",value:c},name:"geometry",t9nStrings:s}):null}</calcite-tree>`},G=({arcadeResult:e,t9nStrings:a})=>t`<div class="value-type"><span>${e.type}:</span>${e.features.length>=R?t`<span>&nbsp;${r(a.showingfirstitemsformat,{count:R.toString()})}</span>`:null}</div>`,A=({items:e,subtree:a,t9nStrings:s})=>t`<calcite-tree slot=${"children"} .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}>${e.map((c,i)=>{let u=h(c);return k({arcadeResult:u,name:i,expanded:!a,t9nStrings:s})})}</calcite-tree>`,k=({arcadeResult:e,name:a,expanded:s,t9nStrings:c})=>{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">${n({name:a})}${f({arcadeResult:e})}</div></calcite-tree-item>`;case"array":{let i=(e.value??[]).slice(0,o);return t`<calcite-tree-item .expanded=${s} @click=${g.onClick}><div class="tree-item-label">${n({name:a})}${E({arcadeResult:e,t9nStrings:c})}</div>${A({items:i,subtree:!0,t9nStrings:c})}</calcite-tree-item>`}case"geometry":return t`<calcite-tree-item .expanded=${s} @click=${g.onClick}><div class="tree-item-label">${n({name:a})}<span>${e.type}</span></div>${N({value:e.value,subtree:!0})}</calcite-tree-item>`;case"attachment":return t`<calcite-tree-item .expanded=${s} @click=${g.onClick}><div class="tree-item-label">${n({name:a})}<span>${e.type}</span></div>${z({value:e.value,subtree:!0})}</calcite-tree-item>`;case"feature":case"dictionary":case"portal":return t`<calcite-tree-item .expanded=${s} @click=${g.onClick}><div class="tree-item-label">${n({name:a})}<span>${e.type}</span></div>${I({value:e.value,subtree:!0,t9nStrings:c})}</calcite-tree-item>`;default:return null}},V=({arcadeResult:e})=>{let a=F(e.value.fields);return t`<table><thead><tr>${a.map(s=>t`<th>${s.name}</th>`)}</tr></thead><tbody>${e.features.map(s=>t`<tr>${a.map(c=>{try{let i=h(s.field(c.name));return t`<td>${f({arcadeResult:i})}</td>`}catch{return t`<td></td>`}})}</tr>`)}</tbody></table>`};function q(){let e=`:host {
5
5
  `,a=S["light-theme"];Object.entries(a).forEach(([c,i])=>{e+=` --arcgis-editor-${c}: ${i};
6
6
  `}),e+=`}
7
7
  `,e+=`:host([calcite-mode-dark]) {
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
- v5.0.0-next.86 */
4
- import{a as f}from"./BTHHVPUO.js";import"./JPLSYGHT.js";import{e as u}from"./A7GC2RAP.js";import{F as d,G as h,K as m,h as c,j as i,n as r,q as n}from"./DD6ZRT43.js";import"./VYCA3AJT.js";import"./MCGQ6KRV.js";var b=c`: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);word-break:break-word}}`;function g(a){a.key==="Enter"&&a.stopPropagation()}var o=class extends h{constructor(){super(...arguments),this._beforeBack=async()=>{this.removeLastPanelRenderer(),this._filterValue=""},this.messages=f(),this._filterValue="",this._flowItemRenderers=[],this._mode="profile",this._mutationCounter=1,this.loading=!1,this.closed=!1,this.arcgisClose=r({bubbles:!1}),this.arcgisItemSelected=r({bubbles:!1})}static{this.properties={_filterValue:16,_flowItemRenderers:16,_mode:16,_mutationCounter:16,loading:5,modelId:1,closed:5,variable:0}}static{this.styles=b}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(()=>{u(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 l=this.loading;return!l&&!e.loaded&&(e.loadSource().then(()=>setTimeout(()=>{this._mutationCounter+=1})).catch(()=>{console.error("Error loading collection"),l=!1}),l=!0),i`<calcite-flow-item heading-level=2 .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 .label=${this.messages.filterthevariablesbyname??""} name=variable-filter></calcite-input>${l?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(l=>l.passFilter(t));return s.length?s.map(l=>this.renderEditorVariable(l)):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=${g}></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.closed?null:!this.loading&&this.variable?.loaded&&!this.variable?.variables.length?i`<calcite-flow><calcite-flow-item heading-level=2 .heading=${this.messages.profilevariables} closable @calciteFlowItemClose=${this._emitClose}><div class="notice-container">${this.messages.noprofilevariablesmessage}</div></calcite-flow-item></calcite-flow>`:i`<calcite-flow ${d(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};
3
+ v5.0.0-next.88 */
4
+ import{a as f}from"./MOPDGBIL.js";import"./4RXKRZBZ.js";import{e as u}from"./TWLAYRFG.js";import{F as d,G as h,K as m,h as c,j as i,n as r,q as n}from"./BQLGOZSH.js";import"./JEX3DDG3.js";import"./J76PBJ7W.js";var b=c`: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);word-break:break-word}}`;function g(a){a.key==="Enter"&&a.stopPropagation()}var o=class extends h{constructor(){super(...arguments),this._beforeBack=async()=>{this.removeLastPanelRenderer(),this._filterValue=""},this.messages=f(),this._filterValue="",this._flowItemRenderers=[],this._mode="profile",this._mutationCounter=1,this.loading=!1,this.closed=!1,this.arcgisClose=r({bubbles:!1}),this.arcgisItemSelected=r({bubbles:!1})}static{this.properties={_filterValue:16,_flowItemRenderers:16,_mode:16,_mutationCounter:16,loading:5,modelId:1,closed:5,variable:0}}static{this.styles=b}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(()=>{u(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 l=this.loading;return!l&&!e.loaded&&(e.loadSource().then(()=>setTimeout(()=>{this._mutationCounter+=1})).catch(()=>{console.error("Error loading collection"),l=!1}),l=!0),i`<calcite-flow-item heading-level=2 .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 .label=${this.messages.filterthevariablesbyname??""} name=variable-filter></calcite-input>${l?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(l=>l.passFilter(t));return s.length?s.map(l=>this.renderEditorVariable(l)):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=${g}></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.closed?null:!this.loading&&this.variable?.loaded&&!this.variable?.variables.length?i`<calcite-flow><calcite-flow-item heading-level=2 .heading=${this.messages.profilevariables} closable @calciteFlowItemClose=${this._emitClose}><div class="notice-container">${this.messages.noprofilevariablesmessage}</div></calcite-flow-item></calcite-flow>`:i`<calcite-flow ${d(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,6 +1,6 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
- v5.0.0-next.86 */
3
+ v5.0.0-next.88 */
4
4
  var et;(function(i){function e(t){return typeof t=="string"}i.is=e})(et||(et={}));var pe;(function(i){function e(t){return typeof t=="string"}i.is=e})(pe||(pe={}));var tt;(function(i){i.MIN_VALUE=-2147483648,i.MAX_VALUE=2147483647;function e(t){return typeof t=="number"&&i.MIN_VALUE<=t&&t<=i.MAX_VALUE}i.is=e})(tt||(tt={}));var J;(function(i){i.MIN_VALUE=0,i.MAX_VALUE=2147483647;function e(t){return typeof t=="number"&&i.MIN_VALUE<=t&&t<=i.MAX_VALUE}i.is=e})(J||(J={}));var k;(function(i){function e(n,r){return n===Number.MAX_VALUE&&(n=J.MAX_VALUE),r===Number.MAX_VALUE&&(r=J.MAX_VALUE),{line:n,character:r}}i.create=e;function t(n){let r=n;return o.objectLiteral(r)&&o.uinteger(r.line)&&o.uinteger(r.character)}i.is=t})(k||(k={}));var A;(function(i){function e(n,r,s,u){if(o.uinteger(n)&&o.uinteger(r)&&o.uinteger(s)&&o.uinteger(u))return{start:k.create(n,r),end:k.create(s,u)};if(k.is(n)&&k.is(r))return{start:n,end:r};throw new Error(`Range#create called with invalid arguments[${n}, ${r}, ${s}, ${u}]`)}i.create=e;function t(n){let r=n;return o.objectLiteral(r)&&k.is(r.start)&&k.is(r.end)}i.is=t})(A||(A={}));var Q;(function(i){function e(n,r){return{uri:n,range:r}}i.create=e;function t(n){let r=n;return o.objectLiteral(r)&&A.is(r.range)&&(o.string(r.uri)||o.undefined(r.uri))}i.is=t})(Q||(Q={}));var it;(function(i){function e(n,r,s,u){return{targetUri:n,targetRange:r,targetSelectionRange:s,originSelectionRange:u}}i.create=e;function t(n){let r=n;return o.objectLiteral(r)&&A.is(r.targetRange)&&o.string(r.targetUri)&&A.is(r.targetSelectionRange)&&(A.is(r.originSelectionRange)||o.undefined(r.originSelectionRange))}i.is=t})(it||(it={}));var De;(function(i){function e(n,r,s,u){return{red:n,green:r,blue:s,alpha:u}}i.create=e;function t(n){let r=n;return o.objectLiteral(r)&&o.numberRange(r.red,0,1)&&o.numberRange(r.green,0,1)&&o.numberRange(r.blue,0,1)&&o.numberRange(r.alpha,0,1)}i.is=t})(De||(De={}));var nt;(function(i){function e(n,r){return{range:n,color:r}}i.create=e;function t(n){let r=n;return o.objectLiteral(r)&&A.is(r.range)&&De.is(r.color)}i.is=t})(nt||(nt={}));var rt;(function(i){function e(n,r,s){return{label:n,textEdit:r,additionalTextEdits:s}}i.create=e;function t(n){let r=n;return o.objectLiteral(r)&&o.string(r.label)&&(o.undefined(r.textEdit)||O.is(r))&&(o.undefined(r.additionalTextEdits)||o.typedArray(r.additionalTextEdits,O.is))}i.is=t})(rt||(rt={}));var st;(function(i){i.Comment="comment",i.Imports="imports",i.Region="region"})(st||(st={}));var ut;(function(i){function e(n,r,s,u,c,l){let D={startLine:n,endLine:r};return o.defined(s)&&(D.startCharacter=s),o.defined(u)&&(D.endCharacter=u),o.defined(c)&&(D.kind=c),o.defined(l)&&(D.collapsedText=l),D}i.create=e;function t(n){let r=n;return o.objectLiteral(r)&&o.uinteger(r.startLine)&&o.uinteger(r.startLine)&&(o.undefined(r.startCharacter)||o.uinteger(r.startCharacter))&&(o.undefined(r.endCharacter)||o.uinteger(r.endCharacter))&&(o.undefined(r.kind)||o.string(r.kind))}i.is=t})(ut||(ut={}));var fe;(function(i){function e(n,r){return{location:n,message:r}}i.create=e;function t(n){let r=n;return o.defined(r)&&Q.is(r.location)&&o.string(r.message)}i.is=t})(fe||(fe={}));var Y;(function(i){i.Error=1,i.Warning=2,i.Information=3,i.Hint=4})(Y||(Y={}));var at;(function(i){i.Unnecessary=1,i.Deprecated=2})(at||(at={}));var ot;(function(i){function e(t){let n=t;return o.objectLiteral(n)&&o.string(n.href)}i.is=e})(ot||(ot={}));var Z;(function(i){function e(n,r,s,u,c,l){let D={range:n,message:r};return o.defined(s)&&(D.severity=s),o.defined(u)&&(D.code=u),o.defined(c)&&(D.source=c),o.defined(l)&&(D.relatedInformation=l),D}i.create=e;function t(n){var r;let s=n;return o.defined(s)&&A.is(s.range)&&o.string(s.message)&&(o.number(s.severity)||o.undefined(s.severity))&&(o.integer(s.code)||o.string(s.code)||o.undefined(s.code))&&(o.undefined(s.codeDescription)||o.string((r=s.codeDescription)===null||r===void 0?void 0:r.href))&&(o.string(s.source)||o.undefined(s.source))&&(o.undefined(s.relatedInformation)||o.typedArray(s.relatedInformation,fe.is))}i.is=t})(Z||(Z={}));var j;(function(i){function e(n,r,...s){let u={title:n,command:r};return o.defined(s)&&s.length>0&&(u.arguments=s),u}i.create=e;function t(n){let r=n;return o.defined(r)&&o.string(r.title)&&o.string(r.command)}i.is=t})(j||(j={}));var O;(function(i){function e(s,u){return{range:s,newText:u}}i.replace=e;function t(s,u){return{range:{start:s,end:s},newText:u}}i.insert=t;function n(s){return{range:s,newText:""}}i.del=n;function r(s){let u=s;return o.objectLiteral(u)&&o.string(u.newText)&&A.is(u.range)}i.is=r})(O||(O={}));var me;(function(i){function e(n,r,s){let u={label:n};return r!==void 0&&(u.needsConfirmation=r),s!==void 0&&(u.description=s),u}i.create=e;function t(n){let r=n;return o.objectLiteral(r)&&o.string(r.label)&&(o.boolean(r.needsConfirmation)||r.needsConfirmation===void 0)&&(o.string(r.description)||r.description===void 0)}i.is=t})(me||(me={}));var z;(function(i){function e(t){let n=t;return o.string(n)}i.is=e})(z||(z={}));var ct;(function(i){function e(s,u,c){return{range:s,newText:u,annotationId:c}}i.replace=e;function t(s,u,c){return{range:{start:s,end:s},newText:u,annotationId:c}}i.insert=t;function n(s,u){return{range:s,newText:"",annotationId:u}}i.del=n;function r(s){let u=s;return O.is(u)&&(me.is(u.annotationId)||z.is(u.annotationId))}i.is=r})(ct||(ct={}));var ge;(function(i){function e(n,r){return{textDocument:n,edits:r}}i.create=e;function t(n){let r=n;return o.defined(r)&&Ae.is(r.textDocument)&&Array.isArray(r.edits)}i.is=t})(ge||(ge={}));var xe;(function(i){function e(n,r,s){let u={kind:"create",uri:n};return r!==void 0&&(r.overwrite!==void 0||r.ignoreIfExists!==void 0)&&(u.options=r),s!==void 0&&(u.annotationId=s),u}i.create=e;function t(n){let r=n;return r&&r.kind==="create"&&o.string(r.uri)&&(r.options===void 0||(r.options.overwrite===void 0||o.boolean(r.options.overwrite))&&(r.options.ignoreIfExists===void 0||o.boolean(r.options.ignoreIfExists)))&&(r.annotationId===void 0||z.is(r.annotationId))}i.is=t})(xe||(xe={}));var Ee;(function(i){function e(n,r,s,u){let c={kind:"rename",oldUri:n,newUri:r};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(c.options=s),u!==void 0&&(c.annotationId=u),c}i.create=e;function t(n){let r=n;return r&&r.kind==="rename"&&o.string(r.oldUri)&&o.string(r.newUri)&&(r.options===void 0||(r.options.overwrite===void 0||o.boolean(r.options.overwrite))&&(r.options.ignoreIfExists===void 0||o.boolean(r.options.ignoreIfExists)))&&(r.annotationId===void 0||z.is(r.annotationId))}i.is=t})(Ee||(Ee={}));var Ce;(function(i){function e(n,r,s){let u={kind:"delete",uri:n};return r!==void 0&&(r.recursive!==void 0||r.ignoreIfNotExists!==void 0)&&(u.options=r),s!==void 0&&(u.annotationId=s),u}i.create=e;function t(n){let r=n;return r&&r.kind==="delete"&&o.string(r.uri)&&(r.options===void 0||(r.options.recursive===void 0||o.boolean(r.options.recursive))&&(r.options.ignoreIfNotExists===void 0||o.boolean(r.options.ignoreIfNotExists)))&&(r.annotationId===void 0||z.is(r.annotationId))}i.is=t})(Ce||(Ce={}));var Fe;(function(i){function e(t){let n=t;return n&&(n.changes!==void 0||n.documentChanges!==void 0)&&(n.documentChanges===void 0||n.documentChanges.every(r=>o.string(r.kind)?xe.is(r)||Ee.is(r)||Ce.is(r):ge.is(r)))}i.is=e})(Fe||(Fe={}));var lt;(function(i){function e(n){return{uri:n}}i.create=e;function t(n){let r=n;return o.defined(r)&&o.string(r.uri)}i.is=t})(lt||(lt={}));var ht;(function(i){function e(n,r){return{uri:n,version:r}}i.create=e;function t(n){let r=n;return o.defined(r)&&o.string(r.uri)&&o.integer(r.version)}i.is=t})(ht||(ht={}));var Ae;(function(i){function e(n,r){return{uri:n,version:r}}i.create=e;function t(n){let r=n;return o.defined(r)&&o.string(r.uri)&&(r.version===null||o.integer(r.version))}i.is=t})(Ae||(Ae={}));var dt;(function(i){function e(n,r,s,u){return{uri:n,languageId:r,version:s,text:u}}i.create=e;function t(n){let r=n;return o.defined(r)&&o.string(r.uri)&&o.string(r.languageId)&&o.integer(r.version)&&o.string(r.text)}i.is=t})(dt||(dt={}));var W;(function(i){i.PlainText="plaintext",i.Markdown="markdown";function e(t){let n=t;return n===i.PlainText||n===i.Markdown}i.is=e})(W||(W={}));var H;(function(i){function e(t){let n=t;return o.objectLiteral(t)&&W.is(n.kind)&&o.string(n.value)}i.is=e})(H||(H={}));var b;(function(i){i.Text=1,i.Method=2,i.Function=3,i.Constructor=4,i.Field=5,i.Variable=6,i.Class=7,i.Interface=8,i.Module=9,i.Property=10,i.Unit=11,i.Value=12,i.Enum=13,i.Keyword=14,i.Snippet=15,i.Color=16,i.File=17,i.Reference=18,i.Folder=19,i.EnumMember=20,i.Constant=21,i.Struct=22,i.Event=23,i.Operator=24,i.TypeParameter=25})(b||(b={}));var B;(function(i){i.PlainText=1,i.Snippet=2})(B||(B={}));var pt;(function(i){i.Deprecated=1})(pt||(pt={}));var Dt;(function(i){function e(n,r,s){return{newText:n,insert:r,replace:s}}i.create=e;function t(n){let r=n;return r&&o.string(r.newText)&&A.is(r.insert)&&A.is(r.replace)}i.is=t})(Dt||(Dt={}));var w;(function(i){i.asIs=1,i.adjustIndentation=2})(w||(w={}));var ft;(function(i){function e(t){let n=t;return n&&(o.string(n.detail)||n.detail===void 0)&&(o.string(n.description)||n.description===void 0)}i.is=e})(ft||(ft={}));var mt;(function(i){function e(t){return{label:t}}i.create=e})(mt||(mt={}));var gt;(function(i){function e(t,n){return{items:t||[],isIncomplete:!!n}}i.create=e})(gt||(gt={}));var ee;(function(i){function e(n){return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}i.fromPlainText=e;function t(n){let r=n;return o.string(r)||o.objectLiteral(r)&&o.string(r.language)&&o.string(r.value)}i.is=t})(ee||(ee={}));var xt;(function(i){function e(t){let n=t;return!!n&&o.objectLiteral(n)&&(H.is(n.contents)||ee.is(n.contents)||o.typedArray(n.contents,ee.is))&&(t.range===void 0||A.is(t.range))}i.is=e})(xt||(xt={}));var Et;(function(i){function e(t,n){return n?{label:t,documentation:n}:{label:t}}i.create=e})(Et||(Et={}));var Ct;(function(i){function e(t,n,...r){let s={label:t};return o.defined(n)&&(s.documentation=n),o.defined(r)?s.parameters=r:s.parameters=[],s}i.create=e})(Ct||(Ct={}));var Ft;(function(i){i.Text=1,i.Read=2,i.Write=3})(Ft||(Ft={}));var At;(function(i){function e(t,n){let r={range:t};return o.number(n)&&(r.kind=n),r}i.create=e})(At||(At={}));var yt;(function(i){i.File=1,i.Module=2,i.Namespace=3,i.Package=4,i.Class=5,i.Method=6,i.Property=7,i.Field=8,i.Constructor=9,i.Enum=10,i.Interface=11,i.Function=12,i.Variable=13,i.Constant=14,i.String=15,i.Number=16,i.Boolean=17,i.Array=18,i.Object=19,i.Key=20,i.Null=21,i.EnumMember=22,i.Struct=23,i.Event=24,i.Operator=25,i.TypeParameter=26})(yt||(yt={}));var bt;(function(i){i.Deprecated=1})(bt||(bt={}));var Bt;(function(i){function e(t,n,r,s,u){let c={name:t,kind:n,location:{uri:s,range:r}};return u&&(c.containerName=u),c}i.create=e})(Bt||(Bt={}));var wt;(function(i){function e(t,n,r,s){return s!==void 0?{name:t,kind:n,location:{uri:r,range:s}}:{name:t,kind:n,location:{uri:r}}}i.create=e})(wt||(wt={}));var It;(function(i){function e(n,r,s,u,c,l){let D={name:n,detail:r,kind:s,range:u,selectionRange:c};return l!==void 0&&(D.children=l),D}i.create=e;function t(n){let r=n;return r&&o.string(r.name)&&o.number(r.kind)&&A.is(r.range)&&A.is(r.selectionRange)&&(r.detail===void 0||o.string(r.detail))&&(r.deprecated===void 0||o.boolean(r.deprecated))&&(r.children===void 0||Array.isArray(r.children))&&(r.tags===void 0||Array.isArray(r.tags))}i.is=t})(It||(It={}));var kt;(function(i){i.Empty="",i.QuickFix="quickfix",i.Refactor="refactor",i.RefactorExtract="refactor.extract",i.RefactorInline="refactor.inline",i.RefactorRewrite="refactor.rewrite",i.Source="source",i.SourceOrganizeImports="source.organizeImports",i.SourceFixAll="source.fixAll"})(kt||(kt={}));var te;(function(i){i.Invoked=1,i.Automatic=2})(te||(te={}));var vt;(function(i){function e(n,r,s){let u={diagnostics:n};return r!=null&&(u.only=r),s!=null&&(u.triggerKind=s),u}i.create=e;function t(n){let r=n;return o.defined(r)&&o.typedArray(r.diagnostics,Z.is)&&(r.only===void 0||o.typedArray(r.only,o.string))&&(r.triggerKind===void 0||r.triggerKind===te.Invoked||r.triggerKind===te.Automatic)}i.is=t})(vt||(vt={}));var Lt;(function(i){function e(n,r,s){let u={title:n},c=!0;return typeof r=="string"?(c=!1,u.kind=r):j.is(r)?u.command=r:u.edit=r,c&&s!==void 0&&(u.kind=s),u}i.create=e;function t(n){let r=n;return r&&o.string(r.title)&&(r.diagnostics===void 0||o.typedArray(r.diagnostics,Z.is))&&(r.kind===void 0||o.string(r.kind))&&(r.edit!==void 0||r.command!==void 0)&&(r.command===void 0||j.is(r.command))&&(r.isPreferred===void 0||o.boolean(r.isPreferred))&&(r.edit===void 0||Fe.is(r.edit))}i.is=t})(Lt||(Lt={}));var St;(function(i){function e(n,r){let s={range:n};return o.defined(r)&&(s.data=r),s}i.create=e;function t(n){let r=n;return o.defined(r)&&A.is(r.range)&&(o.undefined(r.command)||j.is(r.command))}i.is=t})(St||(St={}));var Tt;(function(i){function e(n,r){return{tabSize:n,insertSpaces:r}}i.create=e;function t(n){let r=n;return o.defined(r)&&o.uinteger(r.tabSize)&&o.boolean(r.insertSpaces)}i.is=t})(Tt||(Tt={}));var Pt;(function(i){function e(n,r,s){return{range:n,target:r,data:s}}i.create=e;function t(n){let r=n;return o.defined(r)&&A.is(r.range)&&(o.undefined(r.target)||o.string(r.target))}i.is=t})(Pt||(Pt={}));var Nt;(function(i){function e(n,r){return{range:n,parent:r}}i.create=e;function t(n){let r=n;return o.objectLiteral(r)&&A.is(r.range)&&(r.parent===void 0||i.is(r.parent))}i.is=t})(Nt||(Nt={}));var Mt;(function(i){i.namespace="namespace",i.type="type",i.class="class",i.enum="enum",i.interface="interface",i.struct="struct",i.typeParameter="typeParameter",i.parameter="parameter",i.variable="variable",i.property="property",i.enumMember="enumMember",i.event="event",i.function="function",i.method="method",i.macro="macro",i.keyword="keyword",i.modifier="modifier",i.comment="comment",i.string="string",i.number="number",i.regexp="regexp",i.operator="operator",i.decorator="decorator"})(Mt||(Mt={}));var Ut;(function(i){i.declaration="declaration",i.definition="definition",i.readonly="readonly",i.static="static",i.deprecated="deprecated",i.abstract="abstract",i.async="async",i.modification="modification",i.documentation="documentation",i.defaultLibrary="defaultLibrary"})(Ut||(Ut={}));var _t;(function(i){function e(t){let n=t;return o.objectLiteral(n)&&(n.resultId===void 0||typeof n.resultId=="string")&&Array.isArray(n.data)&&(n.data.length===0||typeof n.data[0]=="number")}i.is=e})(_t||(_t={}));var jt;(function(i){function e(n,r){return{range:n,text:r}}i.create=e;function t(n){let r=n;return r!=null&&A.is(r.range)&&o.string(r.text)}i.is=t})(jt||(jt={}));var Ot;(function(i){function e(n,r,s){return{range:n,variableName:r,caseSensitiveLookup:s}}i.create=e;function t(n){let r=n;return r!=null&&A.is(r.range)&&o.boolean(r.caseSensitiveLookup)&&(o.string(r.variableName)||r.variableName===void 0)}i.is=t})(Ot||(Ot={}));var zt;(function(i){function e(n,r){return{range:n,expression:r}}i.create=e;function t(n){let r=n;return r!=null&&A.is(r.range)&&(o.string(r.expression)||r.expression===void 0)}i.is=t})(zt||(zt={}));var Vt;(function(i){function e(n,r){return{frameId:n,stoppedLocation:r}}i.create=e;function t(n){let r=n;return o.defined(r)&&A.is(n.stoppedLocation)}i.is=t})(Vt||(Vt={}));var ye;(function(i){i.Type=1,i.Parameter=2;function e(t){return t===1||t===2}i.is=e})(ye||(ye={}));var be;(function(i){function e(n){return{value:n}}i.create=e;function t(n){let r=n;return o.objectLiteral(r)&&(r.tooltip===void 0||o.string(r.tooltip)||H.is(r.tooltip))&&(r.location===void 0||Q.is(r.location))&&(r.command===void 0||j.is(r.command))}i.is=t})(be||(be={}));var $t;(function(i){function e(n,r,s){let u={position:n,label:r};return s!==void 0&&(u.kind=s),u}i.create=e;function t(n){let r=n;return o.objectLiteral(r)&&k.is(r.position)&&(o.string(r.label)||o.typedArray(r.label,be.is))&&(r.kind===void 0||ye.is(r.kind))&&r.textEdits===void 0||o.typedArray(r.textEdits,O.is)&&(r.tooltip===void 0||o.string(r.tooltip)||H.is(r.tooltip))&&(r.paddingLeft===void 0||o.boolean(r.paddingLeft))&&(r.paddingRight===void 0||o.boolean(r.paddingRight))}i.is=t})($t||($t={}));var Rt;(function(i){function e(t){return{kind:"snippet",value:t}}i.createSnippet=e})(Rt||(Rt={}));var Wt;(function(i){function e(t,n,r,s){return{insertText:t,filterText:n,range:r,command:s}}i.create=e})(Wt||(Wt={}));var Ht;(function(i){function e(t){return{items:t}}i.create=e})(Ht||(Ht={}));var qt;(function(i){i.Invoked=0,i.Automatic=1})(qt||(qt={}));var Gt;(function(i){function e(t,n){return{range:t,text:n}}i.create=e})(Gt||(Gt={}));var Kt;(function(i){function e(t,n){return{triggerKind:t,selectedCompletionInfo:n}}i.create=e})(Kt||(Kt={}));var Xt;(function(i){function e(t){let n=t;return o.objectLiteral(n)&&pe.is(n.uri)&&o.string(n.name)}i.is=e})(Xt||(Xt={}));var Jt;(function(i){function e(s,u,c,l){return new Be(s,u,c,l)}i.create=e;function t(s){let u=s;return!!(o.defined(u)&&o.string(u.uri)&&(o.undefined(u.languageId)||o.string(u.languageId))&&o.uinteger(u.lineCount)&&o.func(u.getText)&&o.func(u.positionAt)&&o.func(u.offsetAt))}i.is=t;function n(s,u){let c=s.getText(),l=r(u,(x,E)=>{let F=x.range.start.line-E.range.start.line;return F===0?x.range.start.character-E.range.start.character:F}),D=c.length;for(let x=l.length-1;x>=0;x--){let E=l[x],F=s.offsetAt(E.range.start),m=s.offsetAt(E.range.end);if(m<=D)c=c.substring(0,F)+E.newText+c.substring(m,c.length);else throw new Error("Overlapping edit");D=F}return c}i.applyEdits=n;function r(s,u){if(s.length<=1)return s;let c=s.length/2|0,l=s.slice(0,c),D=s.slice(c);r(l,u),r(D,u);let x=0,E=0,F=0;for(;x<l.length&&E<D.length;)u(l[x],D[E])<=0?s[F++]=l[x++]:s[F++]=D[E++];for(;x<l.length;)s[F++]=l[x++];for(;E<D.length;)s[F++]=D[E++];return s}})(Jt||(Jt={}));var Be=class{constructor(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0}getLineOffsets(){if(this._lineOffsets===void 0){let e=[],t=this._content,n=!0;for(let r=0;r<t.length;r++){n&&(e.push(r),n=!1);let s=t.charAt(r);n=s==="\r"||s===`
5
5
  `,s==="\r"&&r+1<t.length&&t.charAt(r+1)===`
6
6
  `&&r++}n&&t.length>0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),n=0,r=t.length;if(r===0)return k.create(0,e);for(;n<r;){let u=Math.floor((n+r)/2);t[u]>e?r=u:n=u+1}let s=n-1;return k.create(s,e-t[s])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line],r=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,r),n)}get lineCount(){return this.getLineOffsets().length}},o;(function(i){let e=Object.prototype.toString;function t(m){return typeof m<"u"}i.defined=t;function n(m){return typeof m>"u"}i.undefined=n;function r(m){return m===!0||m===!1}i.boolean=r;function s(m){return e.call(m)==="[object String]"}i.string=s;function u(m){return e.call(m)==="[object Number]"}i.number=u;function c(m,P,de){return e.call(m)==="[object Number]"&&P<=m&&m<=de}i.numberRange=c;function l(m){return e.call(m)==="[object Number]"&&-2147483648<=m&&m<=2147483647}i.integer=l;function D(m){return e.call(m)==="[object Number]"&&0<=m&&m<=2147483647}i.uinteger=D;function x(m){return e.call(m)==="[object Function]"}i.func=x;function E(m){return m!==null&&typeof m=="object"}i.objectLiteral=E;function F(m,P){return Array.isArray(m)&&m.every(P)}i.typedArray=F})(o||(o={}));async function Ji(i,e){try{let t=await i,n=new Map,r=new Map,s=[],u=xi(e);return t.forEach(c=>{let l=[];c.items.forEach(D=>Ei(l,r,n,u,D)),l.length&&s.push({...c,items:l})}),{categories:s,functionDefinitions:n,constantDefinitions:r}}catch(t){return console.error(t),{categories:[],functionDefinitions:new Map,constantDefinitions:new Map}}}function xi(i){let{profile:{apiVersion:e,bundles:t,hiddenApiItems:n=[]}={}}=i,r=Yt(e),s=Array.isArray(t)&&t.length>0?new Set(["core",...t]):void 0;return u=>Fi(r,u.sinceVersion)&&(!s||s.has(u.bundle))&&!n.includes(u.name)}function Ei(i,e,t,n,r){if(Array.isArray(r)){r.forEach(s=>Qt(i,t,n,s));return}r.type==="constant"?Ci(i,e,n,r):Qt(i,t,n,r)}function Qt(i,e,t,n){if(!t(n))return;n.disableDocumentation||i.push(n);let{completion:{label:r}}=n,s=r.toLowerCase(),u=e.get(s);u||(u={type:"functionDefinition",key:s,overloads:[]},e.set(s,u)),u.overloads.push(n)}function Ci(i,e,t,n){if(!t(n))return;i.push(n);let{completion:{label:r}}=n,s=r.toLowerCase();e.set(s,n);let[u,c]=n.completion.label.split(".");if(!c)return;let l=u.toLowerCase(),D=e.get(l);D||(D={type:"namespace",key:l,members:[],completion:{label:u,detail:u,insertText:u,insertTextMode:w.adjustIndentation,insertTextFormat:B.PlainText,kind:b.Enum}},e.set(l,D));let x=structuredClone(n);x.name=c,x.completion.label=c,x.completion.insertText=c,x.completion.kind=b.Constant,D.members.push(x),D.completion.documentation=D.members.reduce((E,F)=>(E.value=`${E.value}${E.value?`
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
- v5.0.0-next.86 */
4
- import{h as o}from"./DD6ZRT43.js";var i=o`@layer{arcgis-arcade-editor,arcgis-sql-expression-editor{--arcgis-coding-components-border: 1px solid var(--calcite-color-border-3);--arcgis-coding-components-background-color: var(--calcite-color-foreground-1);--arcgis-coding-components-side-action-bar-max-w: 25%;--arcgis-coding-components-code-editor-side-panel-w: 600px;--arcgis-coding-components-code-editor-side-panel-max-w: 45%;.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)!important;box-sizing:border-box}.border-inline-end{border-inline-end:var(--arcgis-coding-components-border)!important;box-sizing:border-box}.side-action-bar{max-width:var(--arcgis-coding-components-side-action-bar-max-w)}.code-editor-side-panel{max-width:var(--arcgis-coding-components-code-editor-side-panel-max-w);width:var(--arcgis-coding-components-code-editor-side-panel-w)}.code-editor-side-panel calcite-flow{height:100%}}}`;export{i as a};
3
+ v5.0.0-next.88 */
4
+ import{h as o}from"./BQLGOZSH.js";var i=o`@layer{arcgis-arcade-editor,arcgis-sql-expression-editor{--arcgis-coding-components-border: 1px solid var(--calcite-color-border-3);--arcgis-coding-components-background-color: var(--calcite-color-foreground-1);--arcgis-coding-components-side-action-bar-max-w: 25%;--arcgis-coding-components-code-editor-side-panel-w: 600px;--arcgis-coding-components-code-editor-side-panel-max-w: 45%;.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)!important;box-sizing:border-box}.border-inline-end{border-inline-end:var(--arcgis-coding-components-border)!important;box-sizing:border-box}.side-action-bar{max-width:var(--arcgis-coding-components-side-action-bar-max-w)}.code-editor-side-panel{max-width:var(--arcgis-coding-components-code-editor-side-panel-max-w);width:var(--arcgis-coding-components-code-editor-side-panel-w)}.code-editor-side-panel calcite-flow{height:100%}}}`;export{i as a};
@@ -0,0 +1,6 @@
1
+ /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
+ See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
+ v5.0.0-next.88 */
4
+ import{a as T}from"./C6BD4IBD.js";import b from"./OXDUPWIV.js";import{a as L}from"./MOPDGBIL.js";import"./4RXKRZBZ.js";import a from"./64XMCCSN.js";import"./JSKAVLMU.js";import"./V2VZZXEA.js";import{c as j,d as B}from"./C6JXJQWK.js";import"./57XZ5RMI.js";import"./HD4ON74D.js";import"./KBNJTYAP.js";import"./TWLAYRFG.js";import{E as z,F as V,G as D,I as C,K as H,h as P,j as l,k as U,l as A,s as q,w as _,x as F,y as O}from"./BQLGOZSH.js";import"./JEX3DDG3.js";import"./ND46SRRX.js";import"./J76PBJ7W.js";export default $arcgis.t(([ne,W,le,de,pe,{a:Q},S])=>{var $=class extends O{constructor(e){if(super(e),this.it=A,e.type!==_.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===A||e==null)return this._t=void 0,this.it=e;if(e===U)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;let t=[e];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}};$.directiveName="unsafeHTML",$.resultType=1;var k=F($);var G=new Set,J;var re=i=>typeof i=="string"?i:"el"in i?i.el.localName:"localName"in i?i.localName:i.declaredClass,b=(i,e,t,s)=>{let o=re(e);if(s?.once){let r=`${i}${o}${t}`;if(G.has(r))return;G.add(r)}let c;if(s?.detail){c={};for(let[r,p]of Object.entries(s.detail))if((typeof p=="object"||typeof p=="function")&&p!==null){let n=new WeakRef(p);Object.defineProperty(c,r,{get(){return n.deref()}})}else c[r]=p;J?.log.interceptors?.forEach(r=>r(i,o,t,c)),console[i](`[${o}]`,t,c)}else J?.log.interceptors?.forEach(r=>r(i,o,t)),console[i](`[${o}]`,t)};var ue=P`:host(:not([closed])){container-type:size;--calcite-block-border-color: var(--calcite-color-transparent);flex:1 0 auto;border-inline-start:var(--arcgis-coding-components-border);box-sizing:border-box;max-width:var(--arcgis-coding-components-code-editor-side-panel-max-w);width:var(--arcgis-coding-components-code-editor-side-panel-w);.submission-actions-wrapper{display:flex;flex-direction:column;width:100%;gap:.75rem}.submission-actions{display:flex;flex-direction:row;gap:.5rem;justify-content:space-between}@container (max-width: 380px){.hidden-below-380{display:none}}@container (min-width: 380px){.hidden-above-380{display:none}}.gaps{display:flex;gap:.25rem}.align-inline-end{margin-inline-start:auto}.action .error-display{display:flex;flex-direction:row;gap:.5rem;justify-content:space-between}.context-popover p{padding:0 .5rem;font-size:var(--calcite-font-size-sm)}.feedback-content{padding:1rem;display:flex;flex-direction:column;gap:.75rem;max-height:30vh;overflow-y:auto}.feedback-sheet{--calcite-sheet-height: auto;--calcite-sheet-max-height: 100%;--calcite-sheet-min-height: auto}calcite-chip[slot=header-actions-end]{align-self:center;margin-inline-end:.5rem}calcite-flow-item calcite-shell{background:transparent}calcite-block{width:100%;max-width:100%;align-self:flex-end;background-color:transparent;margin-block:0}calcite-sheet{--calcite-sheet-scrim-background: rgba(200, 200, 200, .5)}.type-suggestion{--calcite-color-foreground-1: var(--calcite-color-foreground-current);--calcite-color-text-3: var(--calcite-color-text-2);--calcite-icon-color: var(--calcite-color-brand)}.type-history{--calcite-icon-color: var(--calcite-color-text-2)}.type-response{--calcite-icon-color: var(--calcite-color-brand);--calcite-font-family: monospace}.block-response{align-self:flex-start;margin-block-end:4rem;border-block-end:0;--calcite-block-text-color: var(--calcite-color-brand)}calcite-list-item calcite-button{margin-inline-end:.25rem}.type-docs{--calcite-color-foreground-1: var(--calcite-color-foreground-3);--calcite-icon-color: var(--calcite-color-text-1)}.type-error{--calcite-icon-color: var(--calcite-color-status-danger);--calcite-font-family: monospace;border:1px solid var(--calcite-color-status-danger)}#thumbs-up{margin-inline-start:auto;--calcite-icon-color: var(--calcite-color-border-input)}#thumbs-down{--calcite-icon-color: var(--calcite-color-border-input)}calcite-flow-item calcite-shell calcite-notice{margin-block:1rem}.no-space-block,.no-space-block[open]{margin:0}calcite-block[open]:last-of-type{border-block-end:0}.text-area-wrapper{display:flex;border-radius:var(--calcite-corner-radius-round);margin:.75rem;overflow:hidden;--calcite-color-border-input: transparent;position:sticky;box-shadow:var(--calcite-shadow-sm);flex:none}calcite-text-area{height:auto;min-height:5.75rem;overflow:hidden;border-radius:var(--calcite-corner-radius-round) var(--calcite-corner-radius-round) 0 0;--calcite-font-weight-normal: 500;font-weight:500;line-height:1.2}calcite-tooltip{--calcite-tooltip-z-index: 1000}.standalone-list{margin:1rem;width:calc(100% - 2rem)}.result-disclaimer{display:block;width:24rem;max-width:90%;margin:1rem auto;text-align:center;line-height:1.125rem;font-size:.875rem;font-style:italic}calcite-flow{height:100%}calcite-popover calcite-list{--calcite-list-background-color: transparent;--calcite-input-border-color: transparent}calcite-popover calcite-list calcite-filter{--calcite-spacing-sm: 0}.contained-popover-or-tooltip{--calcite-popover-max-size-x: 100%;--calcite-tooltip-max-size-x: 100%}.break-spaces{white-space:break-spaces}.feedback-button-container{margin-inline-start:auto;gap:0}.info-heading{font-size:var(--calcite-font-size-1);color:var(--calcite-color-text-1)}.unstyled-h3{margin:unset;font-size:var(--calcite-font-size-md)}.unstyled-shell{position:unset;inset:unset;display:unset;block-size:unset;inline-size:unset}.suggestion-button{font-weight:var(--calcite-font-weight-medium)}.info-block{max-width:450px}#result-block{calcite-card-group{--calcite-card-group-gap: 1.25rem}calcite-card{--calcite-card-corner-radius: var(--calcite-corner-radius-round);--calcite-card-border-color: transparent;width:100%}.positioned-code-content{display:flex;flex-direction:row;gap:.5rem;padding:.5rem}calcite-card [slot=title] calcite-chip{margin-block-start:.25rem}.code-response-wrapper{position:relative;background:var(--calcite-color-foreground-2);border-radius:var(--calcite-corner-radius-round);margin-top:-1.5rem}.prior-prompt{display:flex;flex-direction:row;padding:0;overflow-y:hidden;overflow-x:auto;margin:.25rem 0 .75rem;align-items:center;max-width:100%;span{overflow-x:auto;overflow-y:hidden}}.copy-feedback{display:none}.copy-prompt-button{align-self:flex-start;margin-inline-start:auto}.response-secondary-action-button[data-copied]+.copy-feedback,.copy-prompt-button[data-copied]+.copy-feedback{display:block;span{padding:.75rem 1rem;font-size:var(--calcite-font-size--2);line-height:1.375;color:var(--calcite-color-text--2);font-weight:var(--calcite-font-weight-medium)}}.copy-prompt-button[data-copied]~.copy-tooltip,.response-secondary-action-button[data-copied]~.copy-tooltip{display:none}code{white-space:pre;font-size:12px;margin:0;overflow-x:auto;font-family:Fira Mono,Consolas,Menlo,monospace;display:block;max-height:12rem;position:relative;padding:.5rem}.code-collapse{margin-inline-start:auto}.response-secondary-action-button{margin-left:.5rem}.add-to-editor-button{--calcite-internal-button-border-color: unset}}.collapsible-code{padding:.5rem}.collapsible-code summary{cursor:pointer;font-weight:500;color:var(--calcite-color-brand);outline:none;padding:.25rem 0}.collapsible-code[open] summary{color:var(--calcite-color-text-2)}.collapsible-error{padding:.5rem}.collapsible-error summary{cursor:pointer;font-weight:500;color:var(--calcite-color-status-danger);outline:none;padding:.25rem 0}.collapsible-error[open] summary{color:var(--calcite-color-text-2)}.response-error-container{padding:.5rem;background:color-mix(in srgb,var(--calcite-color-status-warning) 10%,transparent);border-radius:var(--calcite-corner-radius-round);margin:1rem 0;font-size:var(--calcite-font-size--2);--calcite-input-message-icon-color: var(--calcite-color-status-warning)}.response-error-chip{--calcite-internal-chip-background-color: var(--calcite-color-status-warning);--calcite-chip-icon-color: var(--calcite-color-foreground-1);--calcite-chip-border-color: var(--calcite-color-transparent)}.feedback-actions{gap:unset}.contained{max-width:100%;max-height:100%;max-width:100cqi;max-height:75cqb;overflow-y:auto}}:host([closed]){display:none}`,f=class extends Error{constructor({message:e,code:t,subCode:s,details:o,source:c}){super(e),this.name="ArcadeAssistantError",this.code=t,this.subCode=s,this.details=o,this.source=c}};function Y(i){if(!i)return;let e=i.indexOf('{"error":');if(e!==-1)try{let t=i.slice(e),s=JSON.parse(t);if(s&&typeof s=="object"&&s.error)return s.error}catch{return}}async function me(i){let{baseUrl:e,skillId:t,message:s,authToken:o,previousConversationId:c,context:r}=i,p=t?`${e}/skills/${t}/chat`:`${e}/chat`,n=[],a={message:s,context:r};c&&(a.conversation_id=c);let d;try{d=await W(p,{method:"post",headers:{"Content-Type":"application/json",token:o},body:JSON.stringify(a),responseType:"json"})}catch(h){let g=h,w=g.details?.rawResponse||g.message||String(h),v=Y(w);throw v?new f(v):h}let u=d.data;n.push(u);let x=u.conversationId,se=u.inquiryId,R=u.sequenceNumber;async function ae(){let h=0,g=25;for(;h<g;){await new Promise(y=>setTimeout(y,1e3));let w=he(x,R,se),v;try{v=await W(p,{method:"post",headers:{"Content-Type":"application/json",token:o},body:JSON.stringify(w),responseType:"json"})}catch(y){let N=y,ce=N.details?.rawResponse||N.message||String(y),M=Y(ce);throw M?new f(M):y}let m=v.data;if(m.context?.kind==="ArcgisErrorAsContext"&&m.context.error)throw new f({message:m.context.error.message||"ArcGIS Assistant error",code:m.context.error.code,subCode:m.context.error.subCode,details:m.context.error.details,source:"polling-response"});if(n.push(m),R=m.sequenceNumber,h++,!m.hasMore)break}if(h===g)throw new f({message:"Request timed out",code:"TIMEOUT",source:"polling"})}let oe=120*1e3;return await Promise.race([ae(),new Promise((h,g)=>setTimeout(()=>g(new f({message:"Request timed out",code:"TIMEOUT",source:"hard-timeout"})),oe))]),n}function he(i,e,t){return{conversationId:i,inquiryId:t,ackSequenceNumber:e}}function ge(i){return i.message.match(/Error in prompt shield/u)?"I'm having trouble with this request. Try again by rephrasing the question.":i.code==="TIMEOUT"?"I'm having trouble with this request. Try again by re-asking the same question or rephrasing it.":i.message}var be=i=>{let e=i.value.length,t=72,s=180,o=i.offsetWidth,c=Math.max(1,Math.floor(o/8)),r=Math.ceil(e/c),p=t+(r-2)*24;i.style.setProperty("--calcite-text-area-min-height",`${Math.min(p,s)}px`)};function fe({messages:i}){return l`<calcite-chip slot=header-actions-end scale=s appearance=outline-fill .label=${i.beta??"Beta"}>${i.beta??"Beta"}</calcite-chip>`}function ve({popoverContent:i}){return l`<calcite-action icon=information slot=header-actions-end id=legal-disclaimer text></calcite-action><calcite-popover reference-element=legal-disclaimer label=legal-disclaimer placement=bottom auto-close focus-trap-disabled><div class="contained">${i}</div></calcite-popover>`}function ie({errorMessage:i,slot:e}){return l`<div class="error-display"><calcite-input-message id=error-message status=invalid icon=exclamation-mark-triangle scale=m slot=${e??C}>${i}</calcite-input-message></div>`}function ye({active:i,setActive:e,messages:t}){return l`<calcite-alert slot=alerts .open=${i} placement=bottom kind=success icon=check-circle-f auto-close @calciteAlertClose=${()=>e(!1)} .label=${t.expressionapplied??"Expression applied"}><div slot=message>${t.expressionapplied??"Expression applied to editor."}</div></calcite-alert>`}function $e({context:i,messages:e}){return i?l`<div class="gaps">${i.profileName&&l`<calcite-popover auto-close placement=top .label=${(e.profilecontextlabel??"Profile context: {profileName}").replace("{profileName}",i.profileName)} reference-element=profile-context-button class="context-popover contained-popover-or-tooltip"><p>${(e.profilecontextlabel??"Profile context: {profileName}").replace("{profileName}",i.profileName)}</p></calcite-popover><calcite-button round kind=neutral icon-start=map-information id=profile-context-button></calcite-button>`||""}${i.layerName&&l`<calcite-popover auto-close placement=top .label=${(e.layercontextlabel??"Layer context: {layerName}").replace("{layerName}",i.layerName)} reference-element=layer-context-button class="context-popover contained-popover-or-tooltip"><p>${(e.layercontextlabel??"Layer context: {layerName}").replace("{layerName}",i.layerName)}</p></calcite-popover><calcite-button round kind=neutral icon-start=layers id=layer-context-button></calcite-button>`||""}</div>`:null}function ke({isDisabled:i,isReadOnly:e,setQuestion:t,setIsViewingResult:s,textAreaRef:o,question:c,errorMessage:r,setErrorMessage:p,submitQuestion:n,messages:a,mode:d,context:u}){return l`<div class="text-area-wrapper"><calcite-text-area resize=vertical .readOnly=${i||e} class="styled-text-area" .placeholder=${a.askaquestion??`Specify the calculation or logic you need in an Arcade expression. (e.g., 'Return "Yes" if value > 10')`} .value=${c} @calciteTextAreaInput=${x=>{be(x.target),t(x.target.value)}} ${V(o)}><div class="submission-actions-wrapper" slot=footer-start>${r&&ie({errorMessage:r,slot:"footer-start"})||""}<div class="submission-actions">${$e({context:u,messages:a})}<div class="align-inline-end gaps"><calcite-button round kind=neutral .hidden=${d!=="refine"} icon-start=arrow-left icon-flip-rtl=both appearance=solid .disabled=${i} @click=${async()=>{s(!1),t("")}} .label=${a.startover??"Start Over"} class="hidden-above-380" id=small-start-over-button></calcite-button><calcite-tooltip reference-element=small-start-over-button placement=top-start class="hidden-above-380">${a.startover??"Start Over"}</calcite-tooltip><calcite-button round kind=neutral .hidden=${d!=="refine"} icon-start=arrow-left icon-flip-rtl=both appearance=solid .disabled=${i} @click=${async()=>{s(!1),t("")}} class="hidden-below-380">${a.startover??"Start Over"}</calcite-button><calcite-button round icon-end=effects appearance=solid .loading=${i} .disabled=${i} @click=${async()=>{p(c?"":a.enteraprompt??"Please enter a prompt"),await n()}}>${d==="prompt"?a.ask??"Generate":a.refine??"Refine"}</calcite-button></div></div></div></calcite-text-area></div>`}var xe="https://www.esri.com/en-us/privacy/privacy-statements/privacy-statement",we="https://www.esri.com/en-us/privacy/privacy-statements/privacy-supplement";function Ae({setOpen:i,messages:e,feedback:t,setFeedback:s,onSubmit:o}){return t.active?l`<calcite-sheet class="feedback-sheet" .label=${e.feedback??"Feedback"} slot=sheets display-mode=float position=block-end .open=${t.active} @calciteSheetClose=${()=>i(!1)}><calcite-panel .heading=${e.providefeedback??"Provide feedback"} .description=${e.experiencehelps??"Your experience helps guide future improvements"}><div class="feedback-content"><calcite-label>${e.experiencehelpful??"Was the assistant helpful?"}<calcite-segmented-control scale=l .disabled=${t.submitting}><calcite-segmented-control-item icon-start=thumbs-up .checked=${t.value==="good"} @click=${()=>s({...t,value:"good"})}></calcite-segmented-control-item><calcite-segmented-control-item icon-start=thumbs-down .checked=${t.value==="bad"} @click=${()=>s({...t,value:"bad"})}></calcite-segmented-control-item></calcite-segmented-control></calcite-label><calcite-label>${e.describeexperience??"Describe your experience"}<calcite-text-area resize=vertical .value=${t.text} @calciteTextAreaInput=${c=>s({...t,text:c.target.value})} .disabled=${t.submitting}></calcite-text-area></calcite-label><calcite-label layout=inline scale=s><calcite-checkbox scale=l .checked=${t.termsAccepted} @calciteCheckboxChange=${c=>{s({...t,termsAccepted:c.target.checked})}} .disabled=${t.submitting}></calcite-checkbox><span>${k((e.agreement??"I agree to the {EsriPrivacyStatement} (and {Supplement}).").replace("{EsriPrivacyStatement}",`<calcite-link href=${xe} target="_blank">${e.esriprivacystatement??"Esri Privacy Statement"}</calcite-link>`).replace("{Supplement}",`<calcite-link href=${we} target="_blank">${e.supplement??"Supplement"}</calcite-link>`))}</span></calcite-label></div><calcite-button slot=footer width=full @click=${o} .disabled=${!t.termsAccepted||t.submitting} .loading=${t.submitting}>${e.submitfeedback??"Submit Feedback"}</calcite-button></calcite-panel></calcite-sheet>`:null}function K({assistantsEnabled:i,messages:e,slot:t,assistantHelpUrl:s,helpTopicUrl:o}){return l`<calcite-block .label=${e.assistantinformation??"Assistant information"} slot=${t??C} expanded class="info-block"><calcite-chip .label=${e.new??"New"} kind=brand>${e.new??"New"}</calcite-chip><h1 class="info-heading">${e.introducing??"Introducing Arcade Assistant (beta)"}</h1><p>${e.capabilities??"The assistant uses artificial intelligence to generate Arcade expressions."}</p>${i?l`<p>${e.keepinmind??"Keep in mind the following:"}<ul><li>${e.beconsise??"Be concise, but also clear in your request"}</li><li>${e.avoidambiguity??"Avoid ambiguity and vagueness"}</li><li>${e.moredetails??"you do not need to use exact field names in your instructions, but more detail is generally better"}</li></ul>${k((e.seedocumentation??"Please see the {documentation} for more information, including limitations and additional resources.").replace("{documentation}",`<calcite-link href=${o} target="_blank">${e.documentation??"documentation"}</calcite-link>`))}</p>`:l`<p>${k(e.useofassistant?.replace("{aiassistants}",`<strong>${e.aiassistants??"Ai Assistants"}</strong>`))}<calcite-link .href=${s} target=_blank icon-end=launch-2>${e.configureassistants??"Configure Assistants"}</calcite-link></p>`}</calcite-block>`}function Ce({messages:i,onProceed:e,onExit:t,helpTopicUrl:s}){return l`<calcite-dialog close-disabled placement=top .heading=${i.welcome??"Welcome to the new assistant experience"} slot=dialogs open width-scale=m id=welcome-dialog><h3 class="unstyled-h3">${i.beforeyougetstarted??"Before you get started be aware:"}</h3><ul><li>${i.maybeincorrect??"AI generated code may occasionally be incorrect or biased. Review carefully."}</li><li>${k((i.pleasereadhelp??"Read the Arcade Assistant (beta) {helpTopic} to get started and learn details on security, privacy and limitations.").replace("{helpTopic}",`<calcite-link href=${s} target="_blank">${i.helptopic??"help topic"}</calcite-link>`))}</li></ul><calcite-button id=welcome-proceed slot=footer-end @click=${e}>${i.proceed??"Proceed"}</calcite-button><calcite-button id=welcome-decline slot=footer-start @click=${t} kind=neutral>${i.exit??"Exit"}</calcite-button></calcite-dialog>`}function Se({messages:i,suggestions:e,onSuggestionClick:t}){return l`<calcite-block .heading=${i.promptsuggestions} expanded collapsible id=suggestion-block><calcite-chip-group class="suggestions" .label=${i.promptsuggestions??"Prompt Suggestions"}>${T(e,s=>s,s=>l`<calcite-button round appearance=outline-fill kind=neutral .label=${i.promptsuggestion} class="suggestion-button" @click=${()=>t?.(s)}>${s}</calcite-button>`)}</calcite-chip-group></calcite-block>`}var X=200;function Z({hidden:i=!1,expanded:e=!1,messages:t,cards:s,heading:o,collapsible:c=!1,showEffectsIcon:r=!1,onCopyCode:p,standalone:n}){return l`<calcite-block .hidden=${i} id=result-block .heading=${o??t.besteffort??"Here is the assistant's best effort"} .expanded=${e} .collapsible=${c}>${r&&l`<calcite-chip .label=${t.assistantresponses??"Assistant responses"} slot=content-start icon=effects scale=m class="suggestion-chips"></calcite-chip>`||""}<calcite-card-group .label=${t.assistantresponses??"Assistant responses"}>${T(s,a=>a.conversationId,a=>l`<calcite-card><div slot=heading><div class="prior-prompt"><span>${a.priorPrompt.length>X?`${a.priorPrompt.slice(0,X)}...`:a.priorPrompt}</span><calcite-action icon=duplicate scale=s slot=actions-end class="copy-prompt-button" text .id=${`copy-prompt-${a.conversationId}-${n?"standalone":"list"}`} @click=${d=>{let u=d.currentTarget;navigator.clipboard.writeText(a.priorPrompt).then(()=>{u.setAttribute("data-copied","true"),setTimeout(()=>u.removeAttribute("data-copied"),1500)})}}></calcite-action><calcite-popover .referenceElement=${`copy-prompt-${a.conversationId}-${n?"standalone":"list"}`} placement=top-start class="copy-feedback" .label=${t.copiedsuccessfully??"copied successfully"} open trigger-disabled><span>${t.copiedsuccessfully??"copied successfully"}</span></calcite-popover><calcite-tooltip .referenceElement=${`copy-prompt-${a.conversationId}-${n?"standalone":"list"}`} placement=top-start class="copy-tooltip">${t.copyprompttoclipboard??"Copy prompt to clipboard"}</calcite-tooltip></div>${a.message&&n&&l`<div class="response-error-container">${ie({errorMessage:a.message})}</div>`||""}</div><div><div class="code-response-wrapper"><div class="positioned-code-content"><calcite-chip-group .label=${t.responsecontext??"Response Context"} scale=s>${a.message&&!n&&l`<calcite-tooltip .referenceElement=${`response-chip-${a.conversationId}-error`} placement=top-start>${a.message}</calcite-tooltip><calcite-chip .id=${`response-chip-${a.conversationId}-error`} .label=${t.error??"Error"} scale=s appearance=outline icon=exclamation-mark-triangle-f class="response-error-chip"></calcite-chip>`||""}${a.chips?.map(d=>{let u=q();return l`${d.tooltip&&l`<calcite-tooltip .referenceElement=${`response-chip-${d.conversationId}-${u}`} placement=top-start class="contained-popover-or-tooltip">${d.tooltip}</calcite-tooltip>`||""}<calcite-chip .label=${d.label} .scale=${d.scale??"s"} .appearance=${d.appearance??"outline"} .icon=${d.icon} .id=${`response-chip-${d.conversationId}-${u}`}>${d.label}</calcite-chip>`})}</calcite-chip-group></div><details class="collapsible-code" open><summary>Code response</summary><arcgis-code-viewer language=arcade round>${a.code}</arcgis-code-viewer></details></div></div><div slot=footer-start class="feedback-actions"><calcite-button class="add-to-editor-button hidden-above-380" @click=${()=>a.onAddToEditor("add")} scale=s icon-start=plus round .label=${t.addtoeditor??"Add to editor"} .id=${`add-to-editor-button-${a.conversationId}-${n?"standalone":"list"}`}></calcite-button><calcite-tooltip class="hidden-above-380" .referenceElement=${`add-to-editor-button-${a.conversationId}-${n?"standalone":"list"}`} placement=top-start>${t.addtoeditor??"Add to editor"}</calcite-tooltip><calcite-button class="add-to-editor-button hidden-below-380" @click=${()=>a.onAddToEditor("add")} scale=s icon-start=plus round>${t.addtoeditor??"Add to editor"}</calcite-button><calcite-button round icon-start=file-code kind=neutral scale=s @click=${()=>a.onAddToEditor("replace")} class="response-secondary-action-button" .id=${`replace-${a.conversationId}-${n?"standalone":"list"}`}></calcite-button><calcite-tooltip .referenceElement=${`replace-${a.conversationId}-${n?"standalone":"list"}`} placement=top-start><span>${t.replaceineditor??"Replace all code in editor"}</span></calcite-tooltip><calcite-button round icon-start=copy-to-clipboard kind=neutral scale=s @click=${d=>{let u=d.currentTarget;p(a.code).then(()=>{u.setAttribute("data-copied","true"),setTimeout(()=>u.removeAttribute("data-copied"),1500)})}} class="response-secondary-action-button" .id=${`copy-response-${a.conversationId}-${n?"standalone":"list"}`}></calcite-button><calcite-popover .referenceElement=${`copy-response-${a.conversationId}-${n?"standalone":"list"}`} placement=top-start class="copy-feedback" .label=${t.copiedsuccessfully??"copied successfully"} open trigger-disabled><span>${t.copiedsuccessfully??"copied successfully"}</span></calcite-popover><calcite-tooltip .referenceElement=${`copy-response-${a.conversationId}-${n?"standalone":"list"}`} placement=top-start class="copy-tooltip">${t.copytoclipboard??"Copy code to clipboard"}</calcite-tooltip></div><div slot=footer-end class="feedback-actions"><calcite-action .text=${t.thumbsup??"Thumbs up"} scale=s icon=thumbs-up @click=${a.onThumbsUp} .id=${`thumbs-up-${a.conversationId}-${n?"standalone":"list"}`}></calcite-action><calcite-tooltip .referenceElement=${`thumbs-up-${a.conversationId}-${n?"standalone":"list"}`} placement=top-start><span>${t.helpful??"Helpful"}</span></calcite-tooltip><calcite-action .text=${t.thumbsdown??"Thumbs down"} scale=s icon=thumbs-down @click=${a.onThumbsDown} .id=${`thumbs-down-${a.conversationId}-${n?"standalone":"list"}`}></calcite-action><calcite-tooltip .referenceElement=${`thumbs-down-${a.conversationId}-${n?"standalone":"list"}`} placement=top-start><span>${t.unhelpful??"Unhelpful"}</span></calcite-tooltip></div></calcite-card>`)}</calcite-card-group></calcite-block>`}var Te="arcade_generation",Ee="ArcadeCodeRequest",E="visualization",Ie="ArcadeAssistant",Re=["your_comments","user_evaluation","question","answer","useragent","_source","version","context","extras"],ee=[],te=!0,I=class extends D{constructor(){super(...arguments),this.textAreaRef=z(),this.messages=L(),this._feedbackService=void 0,this.handleFeedbackButton=(e,t)=>{this.feedback={active:!0,value:e,item:t,termsAccepted:!1,text:"",submitting:!1}},this.handleFeedbackSheetClose=()=>{this.feedback={active:!1}},this.handleFeedbackSubmit=async()=>{if(!this.feedback.active)return;this.feedback={...this.feedback,submitting:!0};let e=await this.ensureFeedbackService();if(!e){this.handleFeedbackSheetClose();return}let t=this.getModel(),s=t?await this.getProfileAndMetadata(t.uri):void 0,o=de.applicationName;!o&&!this.appVersion&&b("warn",this,"esriConfig.applicationName is not set. Consider setting it to help identify the application version in feedback.");let c={user_evaluation:this.feedback.value,your_comments:this.feedback.text||void 0,question:this.feedback.item?.question??"",answer:encodeURIComponent(this.feedback.item?.formattedScript??""),useragent:navigator.userAgent,_source:Ie,version:this.appVersion||o||"NOT_SET",context:s?JSON.stringify(s):"",extras:s?.profileName??"",conversation_id:this.feedback.item?.conversationId??"",privacy_statement:this.feedback.termsAccepted?"I_agree":""};try{await e.applyEdits({addFeatures:[new pe({attributes:c})]})}catch(r){b("error",this,`Error submitting feedback. ${String(r)}`)}this.handleFeedbackSheetClose()},this.handleClose=e=>{this.closed=!0,this.closePanel?.(e)},this.setQuestion=e=>{this.question=e},this.onSuggestionClick=e=>{this.textAreaRef.value&&(this.textAreaRef.value.value=e,this.textAreaRef.value.setFocus(),this.setQuestion(e))},this.isViewingResult=!1,this.confirmationActive=!1,this.isSubmitting=!1,this.errorMessage=void 0,this.question="",this.history=[],this.feedback={active:!1},this.splashActive=!0,this.context=void 0,this.historyCards=[],this.helpBase="",this.assistantsEnabled=!1,this.closed=!1}static{this.properties={isViewingResult:16,confirmationActive:16,isSubmitting:16,errorMessage:16,question:16,history:16,feedback:16,splashActive:16,context:16,historyCards:16,closePanel:0,insertText:0,helpBase:1,assistantsEnabled:5,layer:[1,{type:Object}],portalUrl:1,serviceUrl:1,closed:7,editorRef:0,feedbackServiceUrl:1,appVersion:1}}static{this.styles=ue}get disclaimerComment(){return`// ${this.messages.disclaimercomment}
5
+ // ${this.messages.disclaimerpt2??"AI-generated content may be inaccurate. Review before using."}`}get assistantHelpUrl(){return`${this.helpBase??"https://doc.arcgis.com/en/arcgis-online/"}administer/configure-assistants.htm`}get assistantOverviewDocUrl(){return`${this.helpBase??"https://doc.arcgis.com/en/arcgis-online/"}create-maps/understand-arcade-assistant.htm`}get usingTheAssitantDocUrl(){return`${this.helpBase??"https://doc.arcgis.com/en/arcgis-online/"}create-maps/use-arcade-assistant.htm`}async destroy(){}load(){let e=async()=>{let t=this.getModel();if(!t){this.context=void 0;return}let s=await this.getProfileAndMetadata(t.uri);this.context=s};e().catch(t=>{b("error",this,`Error setting initial context. ${String(t)}`)}),this.manager.onLifecycle(()=>({remove:S.onModelContextDidChange(async()=>{e().catch(t=>{b("error",this,`Error setting context. ${String(t)}`)})}).dispose}))}willUpdate(e){(e.has("history")||e.has("messages"))&&(this.historyCards=this.getHistoryCards())}connectedCallback(){super.connectedCallback(),this.history=ee,this.splashActive=te}disconnectedCallback(){super.disconnectedCallback(),ee=this.history,te=this.splashActive,this.copySuccessTimer&&(clearTimeout(this.copySuccessTimer),this.copySuccessTimer=void 0)}getHistoryCards(){return this.history.reduce((e,t)=>(!t.script||(e.push({priorPrompt:t.question,code:t.formattedScript||t.error||"",chips:[{label:t.profile??E,icon:"map-information",appearance:"outline",scale:"s",conversationId:t.conversationId??"",tooltip:(this.messages.profilecontextlabel??"Profile context: {profileName}").replace("{profileName}",t.profile??E)},...t.layerName?[{label:(this.messages.numlayers??"{numLayers} {layerOrLayers}").replace("{numLayers}","1").replace("{layerOrLayers}",this.messages.numlayerssingular??"layer"),icon:"layer",appearance:"outline",scale:"s",conversationId:t.conversationId??"",tooltip:(this.messages.layercontextlabel??"Layer context: {layerName}").replace("{layerName}",t.layerName??"No layer")}]:[]],onAddToEditor:s=>{j(this.editorRef.editorInstance,t.formattedScript??"",s,this.disclaimerComment)},onThumbsUp:()=>this.handleFeedbackButton("good",t),onThumbsDown:()=>this.handleFeedbackButton("bad",t),conversationId:t.conversationId??"",message:t.message}),this.isViewingResult),e),[])}setFeedbackState(e){this.feedback=e}async ensureFeedbackService(){if(this._feedbackService)return this._feedbackService;if(!this.feedbackServiceUrl)return;let e=new le({url:this.feedbackServiceUrl});await e.load();let t=Re.filter(s=>!e.fields.some(o=>o.name===s));if(t.length>0){b("error",this,`Missing the following fields in feedback service: ${t.join(", ")}. Feedback will not be logged.`);return}return this._feedbackService=e,e}getModel(){return this.editorRef.editorInstance?.getModel()}async submitQuestion(){if(this.question){this.isSubmitting=!0;try{let e=await this.getToken(),t=this.getModel();if(!t)return;let{profileName:s,metadata:o,layerName:c}=await this.getProfileAndMetadata(t.uri),r=(await me({baseUrl:this.serviceUrl,skillId:Te,message:this.question,authToken:e,context:{kind:Ee,context:{profile_name:s,metadata:o}}})).find(p=>p.context?.kind==="ArcadeCodeResponse");if(!r)return;r.context?.kind==="ArcadeCodeResponse"&&(this.history=[{script:r?.context?.arcadeCode?.code,formattedScript:B(r?.context?.arcadeCode?.code??""),error:void 0,question:this.question,profile:s,conversationId:r.conversationId,layerName:c??void 0,...r.message?{message:r.message}:{}},...this.history],this.isViewingResult=!0,this.errorMessage=void 0)}catch(e){e instanceof Error&&e.name==="ArcadeAssistantError"?this.errorMessage=ge(e)||this.messages.erroroccurred||"An error occurred.":this.errorMessage=this.messages.erroroccurred||"An error occurred.",b("error",this,"Error submitting question",{detail:{error:e}})}finally{this.isSubmitting=!1}}}async getToken(){let{token:e}=await ne.getCredential(this.portalUrl);return e}async getProfileAndMetadata(e){let t=E,s=S.getEditorProfileForModel(e);s?.loaded||await s?.loadSource();let o=this.editorRef.profile;o&&"id"in o&&(t=o.id);let c=s?.definition?.variables?.find(n=>n.type==="feature"),r=[],p;return c?.definition&&"fields"in c.definition&&(r=c.definition.fields.map(n=>({name:n.name,type:n.type,alias:n.alias})),Q(c?.definition)&&(p=c.definition.title)),{profileName:t,metadata:r,layerName:p}}onCopyCode(e){let t=e?`${this.disclaimerComment}
6
+ ${e}`:"";return navigator.clipboard.writeText(t)}render(){return this.closed?null:this.assistantsEnabled?l`<calcite-flow><calcite-flow-item closable heading-level=2 .heading=${this.messages.arcadeassistant??"Arcade assistant"} @calciteFlowItemClose=${this.handleClose}>${this.splashActive&&l`<calcite-scrim></calcite-scrim>`||""}${fe({messages:this.messages})}${ve({popoverContent:K({assistantsEnabled:this.assistantsEnabled,messages:this.messages,assistantHelpUrl:this.assistantHelpUrl,helpTopicUrl:this.usingTheAssitantDocUrl})})}<calcite-shell class="unstyled-shell">${this.splashActive&&Ce({messages:this.messages,onProceed:()=>{this.splashActive=!1},helpTopicUrl:this.assistantOverviewDocUrl,onExit:e=>this.closePanel?.(e)})||""}${ye({active:this.confirmationActive,setActive:e=>this.confirmationActive=e,messages:this.messages})}${ke({isDisabled:this.isSubmitting,isReadOnly:!1,setQuestion:this.setQuestion,setIsViewingResult:e=>this.isViewingResult=e,mode:this.isViewingResult?"refine":"prompt",textAreaRef:this.textAreaRef,question:this.question,errorMessage:this.errorMessage,setErrorMessage:e=>this.errorMessage=e,submitQuestion:this.submitQuestion.bind(this),messages:this.messages,context:this.context})}<calcite-block-group label="interactive blocks">${!this.isViewingResult&&!this.isSubmitting&&Se({messages:this.messages,suggestions:[this.messages.prompsuggestion1??"",this.messages.prompsuggestion2??""],onSuggestionClick:this.onSuggestionClick})||""}<calcite-block .hidden=${!this.isSubmitting} .heading=${this.messages.generatingresponse??"Generating response..."}></calcite-block>${Z({expanded:this.isViewingResult,messages:this.messages,collapsible:!0,showEffectsIcon:!0,cards:this.historyCards.length?[this.historyCards[0]]:[],heading:this.messages.besteffort??"Here's the assistant's best effort",hidden:this.isSubmitting||!this.isViewingResult,onCopyCode:this.onCopyCode.bind(this),standalone:!0})}${Z({expanded:!this.isViewingResult,messages:this.messages,collapsible:!0,cards:this.isViewingResult?this.historyCards.slice(1):this.historyCards,heading:this.messages.recentprompts??"Recent prompts",hidden:this.isSubmitting||this.history.length===0,onCopyCode:this.onCopyCode.bind(this)})}</calcite-block-group>${this.feedback.active?Ae({setOpen:this.handleFeedbackSheetClose,messages:this.messages,onSubmit:this.handleFeedbackSubmit,feedback:this.feedback,setFeedback:this.setFeedbackState.bind(this)}):null}</calcite-shell></calcite-flow-item></calcite-flow>`:l`<calcite-flow><calcite-flow-item .selected=${!this.isViewingResult} closable heading-level=2 .heading=${this.messages.arcadeassistant??"Arcade assistant"} @calciteFlowItemClose=${this.handleClose}>${K({slot:"content-top",messages:this.messages,assistantsEnabled:this.assistantsEnabled,assistantHelpUrl:this.assistantHelpUrl,helpTopicUrl:this.usingTheAssitantDocUrl})}</calcite-flow-item></calcite-flow>`}};H("arcgis-arcade-coding-assistant",I);return I},"identity/IdentityManager","request","layers/FeatureLayer","config","Graphic",a,b)