@arcgis/coding-components 5.0.0-next.6 → 5.0.0-next.7

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 (79) hide show
  1. package/dist/addons.js +1 -1
  2. package/dist/cdn/{DPSP57JD.js → 23HBOQBZ.js} +2 -2
  3. package/dist/cdn/{GND6X3P2.js → 27LOFPF2.js} +2 -2
  4. package/dist/cdn/{AAO7M7EG.js → 27QS4LNH.js} +2 -2
  5. package/dist/cdn/{TN5HTCXB.js → 2NMHU46V.js} +2 -2
  6. package/dist/cdn/{PUXLFKEV.js → 2SZYMAFS.js} +2 -2
  7. package/dist/cdn/{IN6SCSEJ.js → 4TA5DKU6.js} +1 -1
  8. package/dist/cdn/{ZRQZH7FM.js → 6W6HHZR6.js} +2 -2
  9. package/dist/cdn/{F7THRG76.js → 72OD6ZYF.js} +2 -2
  10. package/dist/cdn/{NTSSIWMU.js → AVAQJQNP.js} +2 -2
  11. package/dist/cdn/{PGWWBNDC.js → BKHZCGID.js} +1 -1
  12. package/dist/cdn/{NVMWAEWO.js → CBH564BT.js} +2 -2
  13. package/dist/cdn/{6AYAG4HX.js → CSL5IEXZ.js} +2 -2
  14. package/dist/cdn/{FZYDSYEO.js → DDSKJPP3.js} +2 -2
  15. package/dist/cdn/{IEYLE4CD.js → G5SADTL5.js} +1 -1
  16. package/dist/cdn/{VTZ3NPTR.js → GAXNWWRE.js} +2 -2
  17. package/dist/cdn/{2TB3BSZG.js → GFUZ6WM2.js} +2 -2
  18. package/dist/cdn/{JQV6L7RS.js → GSVQMMB7.js} +2 -2
  19. package/dist/cdn/HM3KGR4P.js +4 -0
  20. package/dist/cdn/{IDEYUZY7.js → HTZ6GKV4.js} +2 -2
  21. package/dist/cdn/{ZX52GAEY.js → I4LVYMSI.js} +2 -2
  22. package/dist/cdn/{AGESTIIU.js → IKQ3SVNH.js} +2 -2
  23. package/dist/cdn/{MIEFJ3RP.js → J4L4JJFL.js} +2 -2
  24. package/dist/cdn/{UIU7JMMF.js → JFE6M4Y3.js} +2 -2
  25. package/dist/cdn/{RYPNU5HE.js → JOUSRXEF.js} +2 -2
  26. package/dist/cdn/{2NLVIJ6Y.js → KNVFNJI6.js} +2 -2
  27. package/dist/cdn/{N5JS7BLE.js → MSZLI6QU.js} +2 -2
  28. package/dist/cdn/{KKVDJIZ6.js → N4FPRXJO.js} +1 -1
  29. package/dist/cdn/{ACKXVYCM.js → PYWGF52Z.js} +2 -2
  30. package/dist/cdn/{5QMPRRXS.js → QCZJ4SNP.js} +1 -1
  31. package/dist/cdn/{HV2LVRPK.js → REXCXF62.js} +2 -2
  32. package/dist/cdn/{AUB7VUJV.js → RUKHZZNR.js} +2 -2
  33. package/dist/cdn/{TVGVG2ZX.js → SXJEEBHT.js} +2 -2
  34. package/dist/cdn/{7NAVZZHL.js → TSTU24GS.js} +2 -2
  35. package/dist/cdn/{FWIY55RI.js → UPZPMIW5.js} +4 -4
  36. package/dist/cdn/{KPPP7SXB.js → UWKWAKQK.js} +1 -1
  37. package/dist/cdn/{FJHKAWQ4.js → VX4WCADC.js} +2 -2
  38. package/dist/cdn/{TSB7MQ4H.js → WBFIECLB.js} +2 -2
  39. package/dist/cdn/{5KKLALEW.js → WINZNQGA.js} +2 -2
  40. package/dist/cdn/{WUQWXHMT.js → WLAE6LRT.js} +2 -2
  41. package/dist/cdn/{5DVLH4XX.js → WLU7D66X.js} +2 -2
  42. package/dist/cdn/{3SZH7ITA.js → WOVRTDCM.js} +2 -2
  43. package/dist/cdn/{VPQVFQVA.js → WXU5Z7D4.js} +2 -2
  44. package/dist/cdn/{Q4MGAVXA.js → XPV6WDON.js} +1 -1
  45. package/dist/cdn/{M64QLEEQ.js → Y5QDQLBM.js} +2 -2
  46. package/dist/cdn/index.js +2 -2
  47. package/dist/chunks/arcade-defaults.js +1 -1
  48. package/dist/chunks/arcade-executor.js +1 -1
  49. package/dist/chunks/arcade-mode.js +1 -1
  50. package/dist/chunks/arcade-service-accessors.js +1 -1
  51. package/dist/chunks/editor.js +1 -1
  52. package/dist/chunks/fields.js +1 -1
  53. package/dist/chunks/language-defaults-base.js +1 -1
  54. package/dist/chunks/markdown.js +1 -1
  55. package/dist/chunks/monaco-importer.js +1 -1
  56. package/dist/chunks/runtime.js +1 -1
  57. package/dist/chunks/setup-monaco.js +1 -1
  58. package/dist/chunks/sql-expr-contribution.js +1 -1
  59. package/dist/chunks/sql-expr-defaults.js +1 -1
  60. package/dist/chunks/sql-expr-mode.js +1 -1
  61. package/dist/chunks/sql-expr-service-accessors.js +1 -1
  62. package/dist/chunks/useT9n.js +1 -1
  63. package/dist/components/arcgis-arcade-coding-assistant/customElement.js +1 -1
  64. package/dist/components/arcgis-arcade-editor/customElement.js +1 -1
  65. package/dist/components/arcgis-arcade-results/customElement.js +1 -1
  66. package/dist/components/arcgis-arcade-suggestions/customElement.js +1 -1
  67. package/dist/components/arcgis-code-editor/customElement.js +1 -1
  68. package/dist/components/arcgis-editor-variables/customElement.js +1 -1
  69. package/dist/components/arcgis-language-api-panel/customElement.js +1 -1
  70. package/dist/components/arcgis-sql-expression-editor/customElement.js +1 -1
  71. package/dist/components/arcgis-sql-expression-fields/customElement.js +1 -1
  72. package/dist/docs/api.json +2 -2
  73. package/dist/docs/docs.json +2 -2
  74. package/dist/docs/web-types.json +1 -1
  75. package/dist/index.js +1 -1
  76. package/dist/loader.js +1 -1
  77. package/dist/monacoStyles.js +1 -1
  78. package/package.json +5 -5
  79. package/dist/cdn/BDBKNTZL.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.6 */
4
- import d from"./IEYLE4CD.js";import{a as F}from"./3SZH7ITA.js";import{a as T}from"./AGESTIIU.js";import c from"./MIEFJ3RP.js";import b from"./PGWWBNDC.js";import{a as B}from"./5KKLALEW.js";import"./HV2LVRPK.js";import a from"./ZX52GAEY.js";import"./5QMPRRXS.js";import"./FWIY55RI.js";import"./ACKXVYCM.js";import"./KKVDJIZ6.js";import{A as n,D as C,E as k,g as S,h as i,j as _,l as m,n as w,x as R,y,z as D}from"./IDEYUZY7.js";import{a as P,g as E}from"./IN6SCSEJ.js";import{Hl as I,kk as z}from"./TSB7MQ4H.js";import"./KPPP7SXB.js";export default $arcgis.t(([N,,{a:L,h:f},o,M])=>{z();var O=S`@layer{arcgis-arcade-editor{display:flex;flex-direction:column;position:relative;overflow:hidden;border:var(--arcgis-coding-components-border)!important;box-sizing:border-box;background-color:var(--arcgis-coding-components-background-color);height:100%;.sticky{position:sticky;top:0;z-index:10}.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1);text-align:center}.main-action-bar{border-bottom:var(--arcgis-coding-components-border)!important;flex:0 0 auto;calcite-action-group{padding-inline-end:var(--calcite-spacing-sm);calcite-action{padding-inline-end:var(--calcite-spacing-sm)}calcite-action:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}}calcite-action-group:last-child{border-inline-end-width:0px}calcite-action-group:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}}arcgis-arcade-results{border-top:var(--arcgis-coding-components-border)!important;box-sizing:border-box;max-height:50%;min-height:50%;margin-bottom:-1px}calcite-flow{[slot=footer]{word-break:break-word}}.hidden{display:none}}}`,H="https://services6.arcgis.com/HXHga6CfMLMBOlBX/ArcGIS/rest/services/survey123_6e349a50b4504ca6b6107216d568db5f_form/FeatureServer/0",V=s=>{let{aiAssistantsEnabled:e}=s;return e===void 0?(console.warn("areAiAssistantsEnabled is not defined in the organizations settings."),!1):e},G=s=>!(!s||!("id"in s)),q=async s=>(await N.getCredential(s)).token;async function K({portalUrl:s,profile:e}){if(!G(e))return console.warn("Arcade assistant addon initialization failed: unsupported profile."),{shouldRender:!1};let t=s.replace(/\/sharing\/rest(\/.*)?$/iu,"").replace(/\/$/u,""),a=await q(s),r=`${t}/sharing/rest/portals/self?f=json&token=${a}`,l=`${t}/sharing/rest/portals/self/settings?f=json&token=${a}`,d=`${t}/sharing/rest/portals/self/signinSettings?f=json&token=${a}`,h=await Promise.allSettled([fetch(r,{credentials:"include"}).then(c=>c.json()),fetch(l,{credentials:"include"}).then(c=>c.json()),fetch(d,{credentials:"include"}).then(c=>c.json())]),[p,g,u]=h,x=p.status==="fulfilled"?p.value:(console.warn("Failed to fetch selfUrl",p.reason),{}),A=g.status==="fulfilled"?g.value:(console.warn("Failed to fetch settingsUrl",g.reason),{}),U=u.status==="fulfilled"?u.value:(console.warn("Failed to fetch signinSettingsUrl",u.reason),{}),$=x?.helperServices?.aiAssistantServices?.url;if(!$)return console.warn("Arcade Assistant service URL is not available in the portal self response."),{shouldRender:!1};let j=x.helpBase||"";if(!A)return console.warn("Arcade Assistant settings response is not available."),{shouldRender:!1};let v=V(A);return U.blockBetaApps===!0&&(console.warn("Arcade Assistant is blocked by the organization settings. To enable it, do not block beta apps in the organization settings."),v=!1),{shouldRender:!0,serviceUrl:$,helpBase:j,assistantsEnabled:v,feedbackServiceUrl:H}}var b=class extends D{constructor(){super(...arguments),this._codeEditorElt=R(),this._componentReadyDefer=new P,this._disposables=[],this._editorProfilePromise=Promise.resolve(void 0),this.messages=B(),this._modelId=E(),this._openArcadeHelp=()=>void window.open(L,"Arcade Help"),this._toggleSidePanel=e=>{if(!e.target)return;let t=e.target?.dataset.panelName??"none";this.openedSidePanel=t===this.openedSidePanel?"none":t,this.openedSidePanel==="none"&&this._codeEditorElt.value?.setFocus().catch(console.error)},this._consoleLogs=[],this._executingScript=!1,this._preparingArcade=!1,this._resultPanel="output",this._showExecutionPanel=!1,this._arcadeAssistantRemoteState={shouldRender:!1},this.hideDocumentationActions=!1,this.hideSideBar=!1,this.openedSidePanel="none",this.script="",this.sideActionBarExpanded=!1,this.arcgisDiagnosticsChange=m({bubbles:!1}),this.arcgisScriptChange=m({bubbles:!1})}static{this.properties={_apiLibrary:16,_consoleLogs:16,_editorProfile:16,_executingScript:16,_executionResult:16,_preparingArcade:16,_resultPanel:16,_showExecutionPanel:16,_arcadeAssistantRemoteState:16,editorInstance:32,editorOptions:0,hideDocumentationActions:5,hideSideBar:5,openedSidePanel:2,profile:0,script:1,sideActionBarExpanded:7,snippets:0,suggestions:0,testData:0,customPanels:0,arcadeAssistant:0}}static{this.shadowRootOptions=w}static{this.styles=[O,T]}get editorInstance(){return this._codeEditorElt.value?.editorInstance}async getEditorInstance(){return await this._componentReadyDefer.promise,this._codeEditorElt.value?.editorInstance}async getScript(){return await this._componentReadyDefer.promise,this._codeEditorElt.value?.value}async getTestResult(){if(!this.testData)return{type:"error",value:"Missing test data",error:null};let e=await this._editorProfilePromise;if(!e)return{type:"error",value:"Missing editor profile",error:null};await this._componentReadyDefer.promise;let t=this._codeEditorElt.value?.value;return await f(e.definition,t,this.testData)}async setFocus(){await this._componentReadyDefer.promise,await this._codeEditorElt.value?.setFocus()}async load(){let e=k("./assets");M(e),await this._updateDataModelDeps(),await this._updateArcadeAssistantRemoteState()}willUpdate(e){(e.has("messages")||e.has("profile"))&&this.hasUpdated&&this._updateDataModelDeps(),e.has("testData")&&this._testDataChanged(),e.has("snippets")&&o.updateApiContextForModel(this._modelId,{snippets:this.snippets}),e.has("arcadeAssistant")&&this._updateArcadeAssistantRemoteState()}async loaded(){this._componentReadyDefer.resolve(),await this._updateApiLibrary();let e=await F();this._disposables.push(e.onDiagnosticsChange(t=>!this._preparingArcade&&this.arcgisDiagnosticsChange.emit(t.diagnostics))),this.testData&&this._addExecuteScriptAction(),await this._codeEditorElt.value?.setFocus()}disconnectedCallback(){for(super.disconnectedCallback();this._disposables.length;)this._disposables.pop()?.dispose()}async _updateDataModelDeps(){await this._updateEditorProfile(),await this._updateApiLibrary()}_testDataChanged(){!this.testData&&this._executeScriptAction&&(this._disposeSafely(this._executeScriptAction),this._executeScriptAction=void 0),this.testData&&!this._executeScriptAction&&this._addExecuteScriptAction(),this._showExecutionPanel&&this._executeScript().catch(console.error)}async _updateEditorProfile(){this._preparingArcade=!0;try{await o.setProfileForModel(this._modelId,this.profile,{locale:this.messages._t9nLocale,snippets:this.snippets}),this._editorProfile=o.getEditorProfileForModel(this._modelId)}catch{this._editorProfile=void 0}finally{this._editorProfilePromise=Promise.resolve(this._editorProfile),this._preparingArcade=!1}}async _updateApiLibrary(){this._apiLibrary=await o.getApiLibraryForModel(this._modelId)}async _executeScript(){let e=this.testData;if(!this._codeEditorElt.value||!e)return;let t=await this._editorProfilePromise;if(!t){this._executionResult={type:"error",value:"Missing editor profile",error:null};return}this._showExecutionPanel=!0,this._executingScript=!0,this._consoleLogs=[],setTimeout(()=>void(async()=>{let a=this._codeEditorElt.value?.value;this._executionResult=await f(t.definition,a,e,r=>setTimeout(()=>this._consoleLogs=[...this._consoleLogs,r],0)),this._executingScript=!1})(),0)}_toggleShowExecutionPanel(){this._showExecutionPanel=!this._showExecutionPanel}_toggleSideActionBarExpanded(){this.sideActionBarExpanded=!this.sideActionBarExpanded}_onCodeEditorValueChange(e){e.stopPropagation(),this.script=e.detail,this.arcgisScriptChange.emit(e.detail)}_insertAsSnippet(e){this._codeEditorElt.value?.insertSnippet(e.detail).catch(console.error)}_insertAsText(e){this._insertText(e.detail)}_insertText(e){this._codeEditorElt.value?.insertText(e).catch(console.error)}_onResultPanelChange(e){this._resultPanel=e.detail}_onExecutionPanelClose(){this._showExecutionPanel=!1}_addExecuteScriptAction(){let e=this.editorInstance?.addAction({id:"run-script",label:"Run Arcade Expression",keybindings:[I.F5],contextMenuGroupId:"code",contextMenuOrder:1,run:()=>{this.testData&&this._executeScript().catch(console.error)}});e&&(this._executeScriptAction=e,this._disposables.push(e))}_disposeSafely(e){let t=this._disposables.indexOf(e);t!==-1&&this._disposables.splice(t,1),e.dispose()}async _updateArcadeAssistantRemoteState(){this.arcadeAssistant&&(this._arcadeAssistantRemoteState=await K({...this.arcadeAssistant,profile:this.profile}))}renderMainActionBar(){return this.testData?i`<calcite-action-bar class="main-action-bar" layout=horizontal scale=s expanded expand-disabled><calcite-action-group scale=s><calcite-action .text=${this.messages.run??""} text-enabled icon=play scale=s .loading=${this._preparingArcade} @click=${()=>void this._executeScript().catch(console.error)}></calcite-action>${this._executionResult?i`<calcite-action .text=${this.messages.lastresults??""} .active=${this._showExecutionPanel} text-enabled icon=access-string-results icon-flip-rtl scale=s @click=${this._toggleShowExecutionPanel}></calcite-action>`:null}</calcite-action-group></calcite-action-bar>`:null}renderMainPanel(){return i`<arcgis-code-editor class="flex-adjustable" .editorOptions=${this.editorOptions} .language=${o.languageId} .value=${this.script??""} .modelId=${this._modelId} @arcgisValueChange=${this._onCodeEditorValueChange} ${y(this._codeEditorElt)}></arcgis-code-editor>`}renderAction({id:e,label:t,icon:a,active:r,panelName:l,iconFlipRtl:d=!1,onClick:h=this._toggleSidePanel}){return i`<calcite-action id=${e??_} .text=${t} .textEnabled=${this.sideActionBarExpanded} .icon=${a} .active=${r} @click=${h} data-panel-name=${l??_} .iconFlipRtl=${d}></calcite-action>${!this.sideActionBarExpanded&&i`<calcite-tooltip .referenceElement=${e}><span>${t}</span></calcite-tooltip>`||""}`}renderSideActionBar(){return this.hideSideBar?null:i`<calcite-action-bar class="side-action-bar border-inline-start" .expanded=${!!this.sideActionBarExpanded} position=end @calciteActionBarToggle=${this._toggleSideActionBarExpanded}><calcite-action-group>${this.renderAction({id:"profile-variables-action",label:this.messages.profilevariables??"",icon:"profile-variables",active:this.openedSidePanel==="variables",panelName:"variables"})}${this.renderAction({id:"function-action",label:this.messages.constantsandfunctions??"",icon:"function",active:this.openedSidePanel==="api",panelName:"api"})}${this.suggestions?.length?this.renderAction({id:"suggestions-action",label:this.messages.suggestions??"",icon:"lightbulb",active:this.openedSidePanel==="suggestions",panelName:"suggestions"}):null}${this._arcadeAssistantRemoteState.shouldRender&&this.renderAction({id:"arcade-assistant-action",label:this.messages.arcadeassistant??"Arcade assistant",icon:"effects",active:this.openedSidePanel==="arcade-assistant",panelName:"arcade-assistant"})||""}${this.customPanels?.map(e=>e.enabled?this.renderAction({id:e.id,label:e.name,icon:e.icon,active:this.openedSidePanel===e.id,panelName:e.id}):null)}${this.hideDocumentationActions?null:this.renderAction({id:"developer-website-action",label:this.messages.help??"",icon:"question",active:!1,panelName:"none",iconFlipRtl:this.messages._lang==="ar",onClick:this._openArcadeHelp})}</calcite-action-group></calcite-action-bar>`}renderSidePanel(){if(this.hideSideBar)return null;let{openedSidePanel:e}=this;return i`<arcgis-language-api-panel class=${n(e==="api"&&"code-editor-side-panel flex-panel border-inline-start")} .loading=${this._preparingArcade} .apiLibrary=${this._apiLibrary} .hideDocumentationActions=${this.hideDocumentationActions} @arcgisItemSelected=${this._insertAsSnippet} @arcgisClose=${this._toggleSidePanel} data-panel-name=none .closed=${e!=="api"}></arcgis-language-api-panel><arcgis-editor-variables class=${n(e==="variables"&&"code-editor-side-panel flex-panel border-inline-start")} .loading=${this._preparingArcade} .modelId=${this._modelId} @arcgisItemSelected=${this._insertAsText} @arcgisClose=${this._toggleSidePanel} data-panel-name=none .variable=${this._editorProfile} .closed=${e!=="variables"}></arcgis-editor-variables>${this.suggestions?.length&&i`<arcgis-arcade-suggestions class=${n(e==="suggestions"&&"code-editor-side-panel flex-panel border-inline-start")} .closed=${e!=="suggestions"} .suggestions=${this.suggestions} @arcgisItemSelected=${this._insertAsText} @arcgisClose=${this._toggleSidePanel} data-panel-name=none></arcgis-arcade-suggestions>`||""}${this.arcadeAssistant&&this._arcadeAssistantRemoteState.shouldRender&&i`<arcgis-arcade-coding-assistant class=${n(e==="arcade-assistant"&&"code-editor-side-panel flex-panel border-inline-start")} .closed=${e!=="arcade-assistant"} .insertText=${this._insertText.bind(this)} .closePanel=${this._toggleSidePanel} .portalUrl=${this.arcadeAssistant.portalUrl} .serviceUrl=${this._arcadeAssistantRemoteState.serviceUrl} .helpBase=${this._arcadeAssistantRemoteState.helpBase} .assistantsEnabled=${this._arcadeAssistantRemoteState.assistantsEnabled} .feedbackServiceUrl=${this._arcadeAssistantRemoteState.feedbackServiceUrl} .editorRef=${this.el} .appVersion=${this.arcadeAssistant.appVersion}></arcgis-arcade-coding-assistant>`||""}${this.customPanels?.map(t=>t?.useFlows?t.renderer?.({closePanel:this._toggleSidePanel,insertText:this._insertText.bind(this),closed:e!==t.id,editorRef:this.el}):i`<calcite-flow class=${n(e===t.id?"code-editor-side-panel flex-panel border-inline-start":"hidden")}><calcite-flow-item .heading=${t.name} heading-level=2 closable @calciteFlowItemClose=${this._toggleSidePanel} .description=${t.description}>${t.renderer?.({closePanel:this._toggleSidePanel,insertText:this._insertText.bind(this),closed:e!==t.id,editorRef:this.el})}</calcite-flow-item></calcite-flow>`)}`}renderResultsPanel(){return this._showExecutionPanel?i`<arcgis-arcade-results class="flex-adjustable" .openedResultPanel=${this._resultPanel} .loading=${this._executingScript} .result=${this._executionResult} .consoleLogs=${this._consoleLogs} @arcgisOpenedResultPanelChange=${this._onResultPanelChange} @arcgisClose=${this._onExecutionPanelClose}></arcgis-arcade-results>`:null}render(){return i`${this.renderMainActionBar()}<div class="flex-row flex-adjustable"><div class="flex-column flex-adjustable">${this.renderMainPanel()}${this.renderResultsPanel()}</div>${this.renderSidePanel()}${this.renderSideActionBar()}</div>`}};C("arcgis-arcade-editor",b);return b},"identity/IdentityManager",a,b,c,d)
3
+ v5.0.0-next.7 */
4
+ import d from"./G5SADTL5.js";import{a as F}from"./WOVRTDCM.js";import{a as T}from"./IKQ3SVNH.js";import c from"./J4L4JJFL.js";import b from"./BKHZCGID.js";import{a as B}from"./WINZNQGA.js";import"./REXCXF62.js";import a from"./I4LVYMSI.js";import"./QCZJ4SNP.js";import"./UPZPMIW5.js";import"./PYWGF52Z.js";import"./N4FPRXJO.js";import{A as n,D as C,E as k,g as S,h as i,j as _,l as m,n as w,x as R,y,z as D}from"./HTZ6GKV4.js";import{a as P,g as E}from"./4TA5DKU6.js";import{Hl as I,kk as z}from"./WBFIECLB.js";import"./UWKWAKQK.js";export default $arcgis.t(([N,,{a:L,h:f},o,M])=>{z();var O=S`@layer{arcgis-arcade-editor{display:flex;flex-direction:column;position:relative;overflow:hidden;border:var(--arcgis-coding-components-border)!important;box-sizing:border-box;background-color:var(--arcgis-coding-components-background-color);height:100%;.sticky{position:sticky;top:0;z-index:10}.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1);text-align:center}.main-action-bar{border-bottom:var(--arcgis-coding-components-border)!important;flex:0 0 auto;calcite-action-group{padding-inline-end:var(--calcite-spacing-sm);calcite-action{padding-inline-end:var(--calcite-spacing-sm)}calcite-action:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}}calcite-action-group:last-child{border-inline-end-width:0px}calcite-action-group:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}}arcgis-arcade-results{border-top:var(--arcgis-coding-components-border)!important;box-sizing:border-box;max-height:50%;min-height:50%;margin-bottom:-1px}calcite-flow{[slot=footer]{word-break:break-word}}.hidden{display:none}}}`,H="https://services6.arcgis.com/HXHga6CfMLMBOlBX/ArcGIS/rest/services/survey123_6e349a50b4504ca6b6107216d568db5f_form/FeatureServer/0",V=s=>{let{aiAssistantsEnabled:e}=s;return e===void 0?(console.warn("areAiAssistantsEnabled is not defined in the organizations settings."),!1):e},G=s=>!(!s||!("id"in s)),q=async s=>(await N.getCredential(s)).token;async function K({portalUrl:s,profile:e}){if(!G(e))return console.warn("Arcade assistant addon initialization failed: unsupported profile."),{shouldRender:!1};let t=s.replace(/\/sharing\/rest(\/.*)?$/iu,"").replace(/\/$/u,""),a=await q(s),r=`${t}/sharing/rest/portals/self?f=json&token=${a}`,l=`${t}/sharing/rest/portals/self/settings?f=json&token=${a}`,d=`${t}/sharing/rest/portals/self/signinSettings?f=json&token=${a}`,h=await Promise.allSettled([fetch(r,{credentials:"include"}).then(c=>c.json()),fetch(l,{credentials:"include"}).then(c=>c.json()),fetch(d,{credentials:"include"}).then(c=>c.json())]),[p,g,u]=h,x=p.status==="fulfilled"?p.value:(console.warn("Failed to fetch selfUrl",p.reason),{}),A=g.status==="fulfilled"?g.value:(console.warn("Failed to fetch settingsUrl",g.reason),{}),U=u.status==="fulfilled"?u.value:(console.warn("Failed to fetch signinSettingsUrl",u.reason),{}),$=x?.helperServices?.aiAssistantServices?.url;if(!$)return console.warn("Arcade Assistant service URL is not available in the portal self response."),{shouldRender:!1};let j=x.helpBase||"";if(!A)return console.warn("Arcade Assistant settings response is not available."),{shouldRender:!1};let v=V(A);return U.blockBetaApps===!0&&(console.warn("Arcade Assistant is blocked by the organization settings. To enable it, do not block beta apps in the organization settings."),v=!1),{shouldRender:!0,serviceUrl:$,helpBase:j,assistantsEnabled:v,feedbackServiceUrl:H}}var b=class extends D{constructor(){super(...arguments),this._codeEditorElt=R(),this._componentReadyDefer=new P,this._disposables=[],this._editorProfilePromise=Promise.resolve(void 0),this.messages=B(),this._modelId=E(),this._openArcadeHelp=()=>void window.open(L,"Arcade Help"),this._toggleSidePanel=e=>{if(!e.target)return;let t=e.target?.dataset.panelName??"none";this.openedSidePanel=t===this.openedSidePanel?"none":t,this.openedSidePanel==="none"&&this._codeEditorElt.value?.setFocus().catch(console.error)},this._consoleLogs=[],this._executingScript=!1,this._preparingArcade=!1,this._resultPanel="output",this._showExecutionPanel=!1,this._arcadeAssistantRemoteState={shouldRender:!1},this.hideDocumentationActions=!1,this.hideSideBar=!1,this.openedSidePanel="none",this.script="",this.sideActionBarExpanded=!1,this.arcgisDiagnosticsChange=m({bubbles:!1}),this.arcgisScriptChange=m({bubbles:!1})}static{this.properties={_apiLibrary:16,_consoleLogs:16,_editorProfile:16,_executingScript:16,_executionResult:16,_preparingArcade:16,_resultPanel:16,_showExecutionPanel:16,_arcadeAssistantRemoteState:16,editorInstance:32,editorOptions:0,hideDocumentationActions:5,hideSideBar:5,openedSidePanel:2,profile:0,script:1,sideActionBarExpanded:7,snippets:0,suggestions:0,testData:0,customPanels:0,arcadeAssistant:0}}static{this.shadowRootOptions=w}static{this.styles=[O,T]}get editorInstance(){return this._codeEditorElt.value?.editorInstance}async getEditorInstance(){return await this._componentReadyDefer.promise,this._codeEditorElt.value?.editorInstance}async getScript(){return await this._componentReadyDefer.promise,this._codeEditorElt.value?.value}async getTestResult(){if(!this.testData)return{type:"error",value:"Missing test data",error:null};let e=await this._editorProfilePromise;if(!e)return{type:"error",value:"Missing editor profile",error:null};await this._componentReadyDefer.promise;let t=this._codeEditorElt.value?.value;return await f(e.definition,t,this.testData)}async setFocus(){await this._componentReadyDefer.promise,await this._codeEditorElt.value?.setFocus()}async load(){let e=k("./assets");M(e),await this._updateDataModelDeps(),await this._updateArcadeAssistantRemoteState()}willUpdate(e){(e.has("messages")||e.has("profile"))&&this.hasUpdated&&this._updateDataModelDeps(),e.has("testData")&&this._testDataChanged(),e.has("snippets")&&o.updateApiContextForModel(this._modelId,{snippets:this.snippets}),e.has("arcadeAssistant")&&this._updateArcadeAssistantRemoteState()}async loaded(){this._componentReadyDefer.resolve(),await this._updateApiLibrary();let e=await F();this._disposables.push(e.onDiagnosticsChange(t=>!this._preparingArcade&&this.arcgisDiagnosticsChange.emit(t.diagnostics))),this.testData&&this._addExecuteScriptAction(),await this._codeEditorElt.value?.setFocus()}disconnectedCallback(){for(super.disconnectedCallback();this._disposables.length;)this._disposables.pop()?.dispose()}async _updateDataModelDeps(){await this._updateEditorProfile(),await this._updateApiLibrary()}_testDataChanged(){!this.testData&&this._executeScriptAction&&(this._disposeSafely(this._executeScriptAction),this._executeScriptAction=void 0),this.testData&&!this._executeScriptAction&&this._addExecuteScriptAction(),this._showExecutionPanel&&this._executeScript().catch(console.error)}async _updateEditorProfile(){this._preparingArcade=!0;try{await o.setProfileForModel(this._modelId,this.profile,{locale:this.messages._t9nLocale,snippets:this.snippets}),this._editorProfile=o.getEditorProfileForModel(this._modelId)}catch{this._editorProfile=void 0}finally{this._editorProfilePromise=Promise.resolve(this._editorProfile),this._preparingArcade=!1}}async _updateApiLibrary(){this._apiLibrary=await o.getApiLibraryForModel(this._modelId)}async _executeScript(){let e=this.testData;if(!this._codeEditorElt.value||!e)return;let t=await this._editorProfilePromise;if(!t){this._executionResult={type:"error",value:"Missing editor profile",error:null};return}this._showExecutionPanel=!0,this._executingScript=!0,this._consoleLogs=[],setTimeout(()=>void(async()=>{let a=this._codeEditorElt.value?.value;this._executionResult=await f(t.definition,a,e,r=>setTimeout(()=>this._consoleLogs=[...this._consoleLogs,r],0)),this._executingScript=!1})(),0)}_toggleShowExecutionPanel(){this._showExecutionPanel=!this._showExecutionPanel}_toggleSideActionBarExpanded(){this.sideActionBarExpanded=!this.sideActionBarExpanded}_onCodeEditorValueChange(e){e.stopPropagation(),this.script=e.detail,this.arcgisScriptChange.emit(e.detail)}_insertAsSnippet(e){this._codeEditorElt.value?.insertSnippet(e.detail).catch(console.error)}_insertAsText(e){this._insertText(e.detail)}_insertText(e){this._codeEditorElt.value?.insertText(e).catch(console.error)}_onResultPanelChange(e){this._resultPanel=e.detail}_onExecutionPanelClose(){this._showExecutionPanel=!1}_addExecuteScriptAction(){let e=this.editorInstance?.addAction({id:"run-script",label:"Run Arcade Expression",keybindings:[I.F5],contextMenuGroupId:"code",contextMenuOrder:1,run:()=>{this.testData&&this._executeScript().catch(console.error)}});e&&(this._executeScriptAction=e,this._disposables.push(e))}_disposeSafely(e){let t=this._disposables.indexOf(e);t!==-1&&this._disposables.splice(t,1),e.dispose()}async _updateArcadeAssistantRemoteState(){this.arcadeAssistant&&(this._arcadeAssistantRemoteState=await K({...this.arcadeAssistant,profile:this.profile}))}renderMainActionBar(){return this.testData?i`<calcite-action-bar class="main-action-bar" layout=horizontal scale=s expanded expand-disabled><calcite-action-group scale=s><calcite-action .text=${this.messages.run??""} text-enabled icon=play scale=s .loading=${this._preparingArcade} @click=${()=>void this._executeScript().catch(console.error)}></calcite-action>${this._executionResult?i`<calcite-action .text=${this.messages.lastresults??""} .active=${this._showExecutionPanel} text-enabled icon=access-string-results icon-flip-rtl scale=s @click=${this._toggleShowExecutionPanel}></calcite-action>`:null}</calcite-action-group></calcite-action-bar>`:null}renderMainPanel(){return i`<arcgis-code-editor class="flex-adjustable" .editorOptions=${this.editorOptions} .language=${o.languageId} .value=${this.script??""} .modelId=${this._modelId} @arcgisValueChange=${this._onCodeEditorValueChange} ${y(this._codeEditorElt)}></arcgis-code-editor>`}renderAction({id:e,label:t,icon:a,active:r,panelName:l,iconFlipRtl:d=!1,onClick:h=this._toggleSidePanel}){return i`<calcite-action id=${e??_} .text=${t} .textEnabled=${this.sideActionBarExpanded} .icon=${a} .active=${r} @click=${h} data-panel-name=${l??_} .iconFlipRtl=${d}></calcite-action>${!this.sideActionBarExpanded&&i`<calcite-tooltip .referenceElement=${e}><span>${t}</span></calcite-tooltip>`||""}`}renderSideActionBar(){return this.hideSideBar?null:i`<calcite-action-bar class="side-action-bar border-inline-start" .expanded=${!!this.sideActionBarExpanded} position=end @calciteActionBarToggle=${this._toggleSideActionBarExpanded}><calcite-action-group>${this.renderAction({id:"profile-variables-action",label:this.messages.profilevariables??"",icon:"profile-variables",active:this.openedSidePanel==="variables",panelName:"variables"})}${this.renderAction({id:"function-action",label:this.messages.constantsandfunctions??"",icon:"function",active:this.openedSidePanel==="api",panelName:"api"})}${this.suggestions?.length?this.renderAction({id:"suggestions-action",label:this.messages.suggestions??"",icon:"lightbulb",active:this.openedSidePanel==="suggestions",panelName:"suggestions"}):null}${this._arcadeAssistantRemoteState.shouldRender&&this.renderAction({id:"arcade-assistant-action",label:this.messages.arcadeassistant??"Arcade assistant",icon:"effects",active:this.openedSidePanel==="arcade-assistant",panelName:"arcade-assistant"})||""}${this.customPanels?.map(e=>e.enabled?this.renderAction({id:e.id,label:e.name,icon:e.icon,active:this.openedSidePanel===e.id,panelName:e.id}):null)}${this.hideDocumentationActions?null:this.renderAction({id:"developer-website-action",label:this.messages.help??"",icon:"question",active:!1,panelName:"none",iconFlipRtl:this.messages._lang==="ar",onClick:this._openArcadeHelp})}</calcite-action-group></calcite-action-bar>`}renderSidePanel(){if(this.hideSideBar)return null;let{openedSidePanel:e}=this;return i`<arcgis-language-api-panel class=${n(e==="api"&&"code-editor-side-panel flex-panel border-inline-start")} .loading=${this._preparingArcade} .apiLibrary=${this._apiLibrary} .hideDocumentationActions=${this.hideDocumentationActions} @arcgisItemSelected=${this._insertAsSnippet} @arcgisClose=${this._toggleSidePanel} data-panel-name=none .closed=${e!=="api"}></arcgis-language-api-panel><arcgis-editor-variables class=${n(e==="variables"&&"code-editor-side-panel flex-panel border-inline-start")} .loading=${this._preparingArcade} .modelId=${this._modelId} @arcgisItemSelected=${this._insertAsText} @arcgisClose=${this._toggleSidePanel} data-panel-name=none .variable=${this._editorProfile} .closed=${e!=="variables"}></arcgis-editor-variables>${this.suggestions?.length&&i`<arcgis-arcade-suggestions class=${n(e==="suggestions"&&"code-editor-side-panel flex-panel border-inline-start")} .closed=${e!=="suggestions"} .suggestions=${this.suggestions} @arcgisItemSelected=${this._insertAsText} @arcgisClose=${this._toggleSidePanel} data-panel-name=none></arcgis-arcade-suggestions>`||""}${this.arcadeAssistant&&this._arcadeAssistantRemoteState.shouldRender&&i`<arcgis-arcade-coding-assistant class=${n(e==="arcade-assistant"&&"code-editor-side-panel flex-panel border-inline-start")} .closed=${e!=="arcade-assistant"} .insertText=${this._insertText.bind(this)} .closePanel=${this._toggleSidePanel} .portalUrl=${this.arcadeAssistant.portalUrl} .serviceUrl=${this._arcadeAssistantRemoteState.serviceUrl} .helpBase=${this._arcadeAssistantRemoteState.helpBase} .assistantsEnabled=${this._arcadeAssistantRemoteState.assistantsEnabled} .feedbackServiceUrl=${this._arcadeAssistantRemoteState.feedbackServiceUrl} .editorRef=${this.el} .appVersion=${this.arcadeAssistant.appVersion}></arcgis-arcade-coding-assistant>`||""}${this.customPanels?.map(t=>t?.useFlows?t.renderer?.({closePanel:this._toggleSidePanel,insertText:this._insertText.bind(this),closed:e!==t.id,editorRef:this.el}):i`<calcite-flow class=${n(e===t.id?"code-editor-side-panel flex-panel border-inline-start":"hidden")}><calcite-flow-item .heading=${t.name} heading-level=2 closable @calciteFlowItemClose=${this._toggleSidePanel} .description=${t.description}>${t.renderer?.({closePanel:this._toggleSidePanel,insertText:this._insertText.bind(this),closed:e!==t.id,editorRef:this.el})}</calcite-flow-item></calcite-flow>`)}`}renderResultsPanel(){return this._showExecutionPanel?i`<arcgis-arcade-results class="flex-adjustable" .openedResultPanel=${this._resultPanel} .loading=${this._executingScript} .result=${this._executionResult} .consoleLogs=${this._consoleLogs} @arcgisOpenedResultPanelChange=${this._onResultPanelChange} @arcgisClose=${this._onExecutionPanelClose}></arcgis-arcade-results>`:null}render(){return i`${this.renderMainActionBar()}<div class="flex-row flex-adjustable"><div class="flex-column flex-adjustable">${this.renderMainPanel()}${this.renderResultsPanel()}</div>${this.renderSidePanel()}${this.renderSideActionBar()}</div>`}};C("arcgis-arcade-editor",b);return b},"identity/IdentityManager",a,b,c,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.6 */
3
+ v5.0.0-next.7 */
4
4
  export default $arcgis.t(([p])=>{function d(){return!!window.MonacoEnvironment?.getWorker}var a="",j=new Map,c=!1;async function l(t,r,e){if(e)return r?r():new Worker(t);let o=window.location.origin;if(new URL(t,window.location.href).origin!==o){let n=await p(t,{responseType:"text"});return new Worker(URL.createObjectURL(new Blob([n.data],{type:"text/javascript"})),{type:"module"})}return new Worker(t,{type:"module"})}function k(t){if(d())return;a=t;let r=`${a}/code-editor`,e={arcade:`${r}/arcade.worker.js`,"arcgis-sql-expression":`${r}/sql-expr.worker.js`,html:`${r}/html.worker.js`,css:`${r}/css.worker.js`,typescript:`${r}/ts.worker.js`,json:`${r}/json.worker.js`,default:`${r}/editor.worker.js`},o={arcade:{url:e.arcade},"arcgis-sql-expression":{url:e["arcgis-sql-expression"]},html:{url:e.html},css:{url:e.css},typescript:{url:e.typescript},javascript:{url:e.typescript},json:{url:e.json},default:{url:e.default}};window.MonacoEnvironment={getWorker:async(n,s)=>{let i=j.get(s);if(i)return await l(i,void 0,c);let{url:u,localWorker:w}=o[s]||o.default;return await l(u,w,c)}}}return k},"request")
@@ -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.6 */
4
- import{a as T}from"./ACKXVYCM.js";import{Tl as F}from"./TSB7MQ4H.js";import"./KPPP7SXB.js";var M=Object.defineProperty,R=Object.getOwnPropertyDescriptor,K=Object.getOwnPropertyNames,E=Object.prototype.hasOwnProperty,P=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of K(t))!E.call(e,l)&&l!==o&&M(e,l,{get:()=>t[l],enumerable:!(r=R(t,l))||r.enumerable});return e},H=(e,t,o)=>(P(e,t,"default"),o&&P(o,t,"default")),n={};H(n,F);var V=class{constructor(e,t){this._modeId=e,this._defaults=t,this._worker=null,this._client=null,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker()),this._updateExtraLibsToken=0,this._extraLibsChangeListener=this._defaults.onDidExtraLibsChange(()=>this._updateExtraLibs())}dispose(){this._configChangeListener.dispose(),this._extraLibsChangeListener.dispose(),this._stopWorker()}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}async _updateExtraLibs(){if(!this._worker)return;let e=++this._updateExtraLibsToken,t=await this._worker.getProxy();this._updateExtraLibsToken===e&&t.updateExtraLibs(this._defaults.getExtraLibs())}_getClient(){return this._client||(this._client=(async()=>(this._worker=n.editor.createWebWorker({moduleId:"vs/language/typescript/tsWorker",label:this._modeId,keepIdleModels:!0,createData:{compilerOptions:this._defaults.getCompilerOptions(),extraLibs:this._defaults.getExtraLibs(),customWorkerPath:this._defaults.workerOptions.customWorkerPath,inlayHintsOptions:this._defaults.inlayHintsOptions}}),this._defaults.getEagerModelSync()?await this._worker.withSyncedResources(n.editor.getModels().filter(e=>e.getLanguageId()===this._modeId).map(e=>e.uri)):await this._worker.getProxy()))()),this._client}async getLanguageServiceWorker(...e){let t=await this._getClient();return this._worker&&await this._worker.withSyncedResources(e),t}},s={};s["lib.d.ts"]=!0;s["lib.decorators.d.ts"]=!0;s["lib.decorators.legacy.d.ts"]=!0;s["lib.dom.asynciterable.d.ts"]=!0;s["lib.dom.d.ts"]=!0;s["lib.dom.iterable.d.ts"]=!0;s["lib.es2015.collection.d.ts"]=!0;s["lib.es2015.core.d.ts"]=!0;s["lib.es2015.d.ts"]=!0;s["lib.es2015.generator.d.ts"]=!0;s["lib.es2015.iterable.d.ts"]=!0;s["lib.es2015.promise.d.ts"]=!0;s["lib.es2015.proxy.d.ts"]=!0;s["lib.es2015.reflect.d.ts"]=!0;s["lib.es2015.symbol.d.ts"]=!0;s["lib.es2015.symbol.wellknown.d.ts"]=!0;s["lib.es2016.array.include.d.ts"]=!0;s["lib.es2016.d.ts"]=!0;s["lib.es2016.full.d.ts"]=!0;s["lib.es2016.intl.d.ts"]=!0;s["lib.es2017.d.ts"]=!0;s["lib.es2017.date.d.ts"]=!0;s["lib.es2017.full.d.ts"]=!0;s["lib.es2017.intl.d.ts"]=!0;s["lib.es2017.object.d.ts"]=!0;s["lib.es2017.sharedmemory.d.ts"]=!0;s["lib.es2017.string.d.ts"]=!0;s["lib.es2017.typedarrays.d.ts"]=!0;s["lib.es2018.asyncgenerator.d.ts"]=!0;s["lib.es2018.asynciterable.d.ts"]=!0;s["lib.es2018.d.ts"]=!0;s["lib.es2018.full.d.ts"]=!0;s["lib.es2018.intl.d.ts"]=!0;s["lib.es2018.promise.d.ts"]=!0;s["lib.es2018.regexp.d.ts"]=!0;s["lib.es2019.array.d.ts"]=!0;s["lib.es2019.d.ts"]=!0;s["lib.es2019.full.d.ts"]=!0;s["lib.es2019.intl.d.ts"]=!0;s["lib.es2019.object.d.ts"]=!0;s["lib.es2019.string.d.ts"]=!0;s["lib.es2019.symbol.d.ts"]=!0;s["lib.es2020.bigint.d.ts"]=!0;s["lib.es2020.d.ts"]=!0;s["lib.es2020.date.d.ts"]=!0;s["lib.es2020.full.d.ts"]=!0;s["lib.es2020.intl.d.ts"]=!0;s["lib.es2020.number.d.ts"]=!0;s["lib.es2020.promise.d.ts"]=!0;s["lib.es2020.sharedmemory.d.ts"]=!0;s["lib.es2020.string.d.ts"]=!0;s["lib.es2020.symbol.wellknown.d.ts"]=!0;s["lib.es2021.d.ts"]=!0;s["lib.es2021.full.d.ts"]=!0;s["lib.es2021.intl.d.ts"]=!0;s["lib.es2021.promise.d.ts"]=!0;s["lib.es2021.string.d.ts"]=!0;s["lib.es2021.weakref.d.ts"]=!0;s["lib.es2022.array.d.ts"]=!0;s["lib.es2022.d.ts"]=!0;s["lib.es2022.error.d.ts"]=!0;s["lib.es2022.full.d.ts"]=!0;s["lib.es2022.intl.d.ts"]=!0;s["lib.es2022.object.d.ts"]=!0;s["lib.es2022.regexp.d.ts"]=!0;s["lib.es2022.sharedmemory.d.ts"]=!0;s["lib.es2022.string.d.ts"]=!0;s["lib.es2023.array.d.ts"]=!0;s["lib.es2023.collection.d.ts"]=!0;s["lib.es2023.d.ts"]=!0;s["lib.es2023.full.d.ts"]=!0;s["lib.es5.d.ts"]=!0;s["lib.es6.d.ts"]=!0;s["lib.esnext.collection.d.ts"]=!0;s["lib.esnext.d.ts"]=!0;s["lib.esnext.decorators.d.ts"]=!0;s["lib.esnext.disposable.d.ts"]=!0;s["lib.esnext.full.d.ts"]=!0;s["lib.esnext.intl.d.ts"]=!0;s["lib.esnext.object.d.ts"]=!0;s["lib.esnext.promise.d.ts"]=!0;s["lib.scripthost.d.ts"]=!0;s["lib.webworker.asynciterable.d.ts"]=!0;s["lib.webworker.d.ts"]=!0;s["lib.webworker.importscripts.d.ts"]=!0;s["lib.webworker.iterable.d.ts"]=!0;function C(e,t,o=0){if(typeof e=="string")return e;if(e===void 0)return"";let r="";if(o){r+=t;for(let l=0;l<o;l++)r+=" "}if(r+=e.messageText,o++,e.next)for(let l of e.next)r+=C(l,t,o);return r}function _(e){return e?e.map(t=>t.text).join(""):""}var m=class{constructor(e){this._worker=e}_textSpanToRange(e,t){let o=e.getPositionAt(t.start),r=e.getPositionAt(t.start+t.length),{lineNumber:l,column:c}=o,{lineNumber:u,column:a}=r;return{startLineNumber:l,startColumn:c,endLineNumber:u,endColumn:a}}},W=class{constructor(e){this._worker=e,this._libFiles={},this._hasFetchedLibFiles=!1,this._fetchLibFilesPromise=null}isLibFile(e){return e&&e.path.indexOf("/lib.")===0?!!s[e.path.slice(1)]:!1}getOrCreateModel(e){let t=n.Uri.parse(e),o=n.editor.getModel(t);if(o)return o;if(this.isLibFile(t)&&this._hasFetchedLibFiles)return n.editor.createModel(this._libFiles[t.path.slice(1)],"typescript",t);let r=T.getExtraLibs()[e];return r?n.editor.createModel(r.content,"typescript",t):null}_containsLibFile(e){for(let t of e)if(this.isLibFile(t))return!0;return!1}async fetchLibFilesIfNecessary(e){this._containsLibFile(e)&&await this._fetchLibFiles()}_fetchLibFiles(){return this._fetchLibFilesPromise||(this._fetchLibFilesPromise=this._worker().then(e=>e.getLibFiles()).then(e=>{this._hasFetchedLibFiles=!0,this._libFiles=e})),this._fetchLibFilesPromise}},j=class extends m{constructor(e,t,o,r){super(r),this._libFiles=e,this._defaults=t,this._selector=o,this._disposables=[],this._listener=Object.create(null);let l=a=>{if(a.getLanguageId()!==o)return;let i=()=>{let{onlyVisible:f}=this._defaults.getDiagnosticsOptions();f?a.isAttachedToEditor()&&this._doValidate(a):this._doValidate(a)},g,d=a.onDidChangeContent(()=>{clearTimeout(g),g=window.setTimeout(i,500)}),h=a.onDidChangeAttached(()=>{let{onlyVisible:f}=this._defaults.getDiagnosticsOptions();f&&(a.isAttachedToEditor()?i():n.editor.setModelMarkers(a,this._selector,[]))});this._listener[a.uri.toString()]={dispose(){d.dispose(),h.dispose(),clearTimeout(g)}},i()},c=a=>{n.editor.setModelMarkers(a,this._selector,[]);let i=a.uri.toString();this._listener[i]&&(this._listener[i].dispose(),delete this._listener[i])};this._disposables.push(n.editor.onDidCreateModel(a=>l(a))),this._disposables.push(n.editor.onWillDisposeModel(c)),this._disposables.push(n.editor.onDidChangeModelLanguage(a=>{c(a.model),l(a.model)})),this._disposables.push({dispose(){for(let a of n.editor.getModels())c(a)}});let u=()=>{for(let a of n.editor.getModels())c(a),l(a)};this._disposables.push(this._defaults.onDidChange(u)),this._disposables.push(this._defaults.onDidExtraLibsChange(u)),n.editor.getModels().forEach(a=>l(a))}dispose(){this._disposables.forEach(e=>e&&e.dispose()),this._disposables=[]}async _doValidate(e){let t=await this._worker(e.uri);if(e.isDisposed())return;let o=[],{noSyntaxValidation:r,noSemanticValidation:l,noSuggestionDiagnostics:c}=this._defaults.getDiagnosticsOptions();r||o.push(t.getSyntacticDiagnostics(e.uri.toString())),l||o.push(t.getSemanticDiagnostics(e.uri.toString())),c||o.push(t.getSuggestionDiagnostics(e.uri.toString()));let u=await Promise.all(o);if(!u||e.isDisposed())return;let a=u.reduce((g,d)=>d.concat(g),[]).filter(g=>(this._defaults.getDiagnosticsOptions().diagnosticCodesToIgnore||[]).indexOf(g.code)===-1),i=a.map(g=>g.relatedInformation||[]).reduce((g,d)=>d.concat(g),[]).map(g=>g.file?n.Uri.parse(g.file.fileName):null);await this._libFiles.fetchLibFilesIfNecessary(i),!e.isDisposed()&&n.editor.setModelMarkers(e,this._selector,a.map(g=>this._convertDiagnostics(e,g)))}_convertDiagnostics(e,t){let o=t.start||0,r=t.length||1,{lineNumber:l,column:c}=e.getPositionAt(o),{lineNumber:u,column:a}=e.getPositionAt(o+r),i=[];return t.reportsUnnecessary&&i.push(n.MarkerTag.Unnecessary),t.reportsDeprecated&&i.push(n.MarkerTag.Deprecated),{severity:this._tsDiagnosticCategoryToMarkerSeverity(t.category),startLineNumber:l,startColumn:c,endLineNumber:u,endColumn:a,message:C(t.messageText,`
3
+ v5.0.0-next.7 */
4
+ import{a as T}from"./PYWGF52Z.js";import{Tl as F}from"./WBFIECLB.js";import"./UWKWAKQK.js";var M=Object.defineProperty,R=Object.getOwnPropertyDescriptor,K=Object.getOwnPropertyNames,E=Object.prototype.hasOwnProperty,P=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of K(t))!E.call(e,l)&&l!==o&&M(e,l,{get:()=>t[l],enumerable:!(r=R(t,l))||r.enumerable});return e},H=(e,t,o)=>(P(e,t,"default"),o&&P(o,t,"default")),n={};H(n,F);var V=class{constructor(e,t){this._modeId=e,this._defaults=t,this._worker=null,this._client=null,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker()),this._updateExtraLibsToken=0,this._extraLibsChangeListener=this._defaults.onDidExtraLibsChange(()=>this._updateExtraLibs())}dispose(){this._configChangeListener.dispose(),this._extraLibsChangeListener.dispose(),this._stopWorker()}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}async _updateExtraLibs(){if(!this._worker)return;let e=++this._updateExtraLibsToken,t=await this._worker.getProxy();this._updateExtraLibsToken===e&&t.updateExtraLibs(this._defaults.getExtraLibs())}_getClient(){return this._client||(this._client=(async()=>(this._worker=n.editor.createWebWorker({moduleId:"vs/language/typescript/tsWorker",label:this._modeId,keepIdleModels:!0,createData:{compilerOptions:this._defaults.getCompilerOptions(),extraLibs:this._defaults.getExtraLibs(),customWorkerPath:this._defaults.workerOptions.customWorkerPath,inlayHintsOptions:this._defaults.inlayHintsOptions}}),this._defaults.getEagerModelSync()?await this._worker.withSyncedResources(n.editor.getModels().filter(e=>e.getLanguageId()===this._modeId).map(e=>e.uri)):await this._worker.getProxy()))()),this._client}async getLanguageServiceWorker(...e){let t=await this._getClient();return this._worker&&await this._worker.withSyncedResources(e),t}},s={};s["lib.d.ts"]=!0;s["lib.decorators.d.ts"]=!0;s["lib.decorators.legacy.d.ts"]=!0;s["lib.dom.asynciterable.d.ts"]=!0;s["lib.dom.d.ts"]=!0;s["lib.dom.iterable.d.ts"]=!0;s["lib.es2015.collection.d.ts"]=!0;s["lib.es2015.core.d.ts"]=!0;s["lib.es2015.d.ts"]=!0;s["lib.es2015.generator.d.ts"]=!0;s["lib.es2015.iterable.d.ts"]=!0;s["lib.es2015.promise.d.ts"]=!0;s["lib.es2015.proxy.d.ts"]=!0;s["lib.es2015.reflect.d.ts"]=!0;s["lib.es2015.symbol.d.ts"]=!0;s["lib.es2015.symbol.wellknown.d.ts"]=!0;s["lib.es2016.array.include.d.ts"]=!0;s["lib.es2016.d.ts"]=!0;s["lib.es2016.full.d.ts"]=!0;s["lib.es2016.intl.d.ts"]=!0;s["lib.es2017.d.ts"]=!0;s["lib.es2017.date.d.ts"]=!0;s["lib.es2017.full.d.ts"]=!0;s["lib.es2017.intl.d.ts"]=!0;s["lib.es2017.object.d.ts"]=!0;s["lib.es2017.sharedmemory.d.ts"]=!0;s["lib.es2017.string.d.ts"]=!0;s["lib.es2017.typedarrays.d.ts"]=!0;s["lib.es2018.asyncgenerator.d.ts"]=!0;s["lib.es2018.asynciterable.d.ts"]=!0;s["lib.es2018.d.ts"]=!0;s["lib.es2018.full.d.ts"]=!0;s["lib.es2018.intl.d.ts"]=!0;s["lib.es2018.promise.d.ts"]=!0;s["lib.es2018.regexp.d.ts"]=!0;s["lib.es2019.array.d.ts"]=!0;s["lib.es2019.d.ts"]=!0;s["lib.es2019.full.d.ts"]=!0;s["lib.es2019.intl.d.ts"]=!0;s["lib.es2019.object.d.ts"]=!0;s["lib.es2019.string.d.ts"]=!0;s["lib.es2019.symbol.d.ts"]=!0;s["lib.es2020.bigint.d.ts"]=!0;s["lib.es2020.d.ts"]=!0;s["lib.es2020.date.d.ts"]=!0;s["lib.es2020.full.d.ts"]=!0;s["lib.es2020.intl.d.ts"]=!0;s["lib.es2020.number.d.ts"]=!0;s["lib.es2020.promise.d.ts"]=!0;s["lib.es2020.sharedmemory.d.ts"]=!0;s["lib.es2020.string.d.ts"]=!0;s["lib.es2020.symbol.wellknown.d.ts"]=!0;s["lib.es2021.d.ts"]=!0;s["lib.es2021.full.d.ts"]=!0;s["lib.es2021.intl.d.ts"]=!0;s["lib.es2021.promise.d.ts"]=!0;s["lib.es2021.string.d.ts"]=!0;s["lib.es2021.weakref.d.ts"]=!0;s["lib.es2022.array.d.ts"]=!0;s["lib.es2022.d.ts"]=!0;s["lib.es2022.error.d.ts"]=!0;s["lib.es2022.full.d.ts"]=!0;s["lib.es2022.intl.d.ts"]=!0;s["lib.es2022.object.d.ts"]=!0;s["lib.es2022.regexp.d.ts"]=!0;s["lib.es2022.sharedmemory.d.ts"]=!0;s["lib.es2022.string.d.ts"]=!0;s["lib.es2023.array.d.ts"]=!0;s["lib.es2023.collection.d.ts"]=!0;s["lib.es2023.d.ts"]=!0;s["lib.es2023.full.d.ts"]=!0;s["lib.es5.d.ts"]=!0;s["lib.es6.d.ts"]=!0;s["lib.esnext.collection.d.ts"]=!0;s["lib.esnext.d.ts"]=!0;s["lib.esnext.decorators.d.ts"]=!0;s["lib.esnext.disposable.d.ts"]=!0;s["lib.esnext.full.d.ts"]=!0;s["lib.esnext.intl.d.ts"]=!0;s["lib.esnext.object.d.ts"]=!0;s["lib.esnext.promise.d.ts"]=!0;s["lib.scripthost.d.ts"]=!0;s["lib.webworker.asynciterable.d.ts"]=!0;s["lib.webworker.d.ts"]=!0;s["lib.webworker.importscripts.d.ts"]=!0;s["lib.webworker.iterable.d.ts"]=!0;function C(e,t,o=0){if(typeof e=="string")return e;if(e===void 0)return"";let r="";if(o){r+=t;for(let l=0;l<o;l++)r+=" "}if(r+=e.messageText,o++,e.next)for(let l of e.next)r+=C(l,t,o);return r}function _(e){return e?e.map(t=>t.text).join(""):""}var m=class{constructor(e){this._worker=e}_textSpanToRange(e,t){let o=e.getPositionAt(t.start),r=e.getPositionAt(t.start+t.length),{lineNumber:l,column:c}=o,{lineNumber:u,column:a}=r;return{startLineNumber:l,startColumn:c,endLineNumber:u,endColumn:a}}},W=class{constructor(e){this._worker=e,this._libFiles={},this._hasFetchedLibFiles=!1,this._fetchLibFilesPromise=null}isLibFile(e){return e&&e.path.indexOf("/lib.")===0?!!s[e.path.slice(1)]:!1}getOrCreateModel(e){let t=n.Uri.parse(e),o=n.editor.getModel(t);if(o)return o;if(this.isLibFile(t)&&this._hasFetchedLibFiles)return n.editor.createModel(this._libFiles[t.path.slice(1)],"typescript",t);let r=T.getExtraLibs()[e];return r?n.editor.createModel(r.content,"typescript",t):null}_containsLibFile(e){for(let t of e)if(this.isLibFile(t))return!0;return!1}async fetchLibFilesIfNecessary(e){this._containsLibFile(e)&&await this._fetchLibFiles()}_fetchLibFiles(){return this._fetchLibFilesPromise||(this._fetchLibFilesPromise=this._worker().then(e=>e.getLibFiles()).then(e=>{this._hasFetchedLibFiles=!0,this._libFiles=e})),this._fetchLibFilesPromise}},j=class extends m{constructor(e,t,o,r){super(r),this._libFiles=e,this._defaults=t,this._selector=o,this._disposables=[],this._listener=Object.create(null);let l=a=>{if(a.getLanguageId()!==o)return;let i=()=>{let{onlyVisible:f}=this._defaults.getDiagnosticsOptions();f?a.isAttachedToEditor()&&this._doValidate(a):this._doValidate(a)},g,d=a.onDidChangeContent(()=>{clearTimeout(g),g=window.setTimeout(i,500)}),h=a.onDidChangeAttached(()=>{let{onlyVisible:f}=this._defaults.getDiagnosticsOptions();f&&(a.isAttachedToEditor()?i():n.editor.setModelMarkers(a,this._selector,[]))});this._listener[a.uri.toString()]={dispose(){d.dispose(),h.dispose(),clearTimeout(g)}},i()},c=a=>{n.editor.setModelMarkers(a,this._selector,[]);let i=a.uri.toString();this._listener[i]&&(this._listener[i].dispose(),delete this._listener[i])};this._disposables.push(n.editor.onDidCreateModel(a=>l(a))),this._disposables.push(n.editor.onWillDisposeModel(c)),this._disposables.push(n.editor.onDidChangeModelLanguage(a=>{c(a.model),l(a.model)})),this._disposables.push({dispose(){for(let a of n.editor.getModels())c(a)}});let u=()=>{for(let a of n.editor.getModels())c(a),l(a)};this._disposables.push(this._defaults.onDidChange(u)),this._disposables.push(this._defaults.onDidExtraLibsChange(u)),n.editor.getModels().forEach(a=>l(a))}dispose(){this._disposables.forEach(e=>e&&e.dispose()),this._disposables=[]}async _doValidate(e){let t=await this._worker(e.uri);if(e.isDisposed())return;let o=[],{noSyntaxValidation:r,noSemanticValidation:l,noSuggestionDiagnostics:c}=this._defaults.getDiagnosticsOptions();r||o.push(t.getSyntacticDiagnostics(e.uri.toString())),l||o.push(t.getSemanticDiagnostics(e.uri.toString())),c||o.push(t.getSuggestionDiagnostics(e.uri.toString()));let u=await Promise.all(o);if(!u||e.isDisposed())return;let a=u.reduce((g,d)=>d.concat(g),[]).filter(g=>(this._defaults.getDiagnosticsOptions().diagnosticCodesToIgnore||[]).indexOf(g.code)===-1),i=a.map(g=>g.relatedInformation||[]).reduce((g,d)=>d.concat(g),[]).map(g=>g.file?n.Uri.parse(g.file.fileName):null);await this._libFiles.fetchLibFilesIfNecessary(i),!e.isDisposed()&&n.editor.setModelMarkers(e,this._selector,a.map(g=>this._convertDiagnostics(e,g)))}_convertDiagnostics(e,t){let o=t.start||0,r=t.length||1,{lineNumber:l,column:c}=e.getPositionAt(o),{lineNumber:u,column:a}=e.getPositionAt(o+r),i=[];return t.reportsUnnecessary&&i.push(n.MarkerTag.Unnecessary),t.reportsDeprecated&&i.push(n.MarkerTag.Deprecated),{severity:this._tsDiagnosticCategoryToMarkerSeverity(t.category),startLineNumber:l,startColumn:c,endLineNumber:u,endColumn:a,message:C(t.messageText,`
5
5
  `),code:t.code.toString(),tags:i,relatedInformation:this._convertRelatedInformation(e,t.relatedInformation)}}_convertRelatedInformation(e,t){if(!t)return[];let o=[];return t.forEach(r=>{let l=e;if(r.file&&(l=this._libFiles.getOrCreateModel(r.file.fileName)),!l)return;let c=r.start||0,u=r.length||1,{lineNumber:a,column:i}=l.getPositionAt(c),{lineNumber:g,column:d}=l.getPositionAt(c+u);o.push({resource:l.uri,startLineNumber:a,startColumn:i,endLineNumber:g,endColumn:d,message:C(r.messageText,`
6
6
  `)})}),o}_tsDiagnosticCategoryToMarkerSeverity(e){switch(e){case 1:return n.MarkerSeverity.Error;case 3:return n.MarkerSeverity.Info;case 0:return n.MarkerSeverity.Warning;case 2:return n.MarkerSeverity.Hint}return n.MarkerSeverity.Info}},B=class x extends m{get triggerCharacters(){return["."]}async provideCompletionItems(t,o,r,l){let c=t.getWordUntilPosition(o),u=new n.Range(o.lineNumber,c.startColumn,o.lineNumber,c.endColumn),a=t.uri,i=t.getOffsetAt(o),g=await this._worker(a);if(t.isDisposed())return;let d=await g.getCompletionsAtPosition(a.toString(),i);return!d||t.isDisposed()?void 0:{suggestions:d.entries.map(f=>{let w=u;if(f.replacementSpan){let k=t.getPositionAt(f.replacementSpan.start),v=t.getPositionAt(f.replacementSpan.start+f.replacementSpan.length);w=new n.Range(k.lineNumber,k.column,v.lineNumber,v.column)}let S=[];return f.kindModifiers!==void 0&&f.kindModifiers.indexOf("deprecated")!==-1&&S.push(n.languages.CompletionItemTag.Deprecated),{uri:a,position:o,offset:i,range:w,label:f.name,insertText:f.name,sortText:f.sortText,kind:x.convertKind(f.kind),tags:S}})}}async resolveCompletionItem(t,o){let r=t,l=r.uri,c=r.position,u=r.offset,i=await(await this._worker(l)).getCompletionEntryDetails(l.toString(),u,r.label);return i?{uri:l,position:c,label:i.name,kind:x.convertKind(i.kind),detail:_(i.displayParts),documentation:{value:x.createDocumentationString(i)}}:r}static convertKind(t){switch(t){case p.primitiveType:case p.keyword:return n.languages.CompletionItemKind.Keyword;case p.variable:case p.localVariable:return n.languages.CompletionItemKind.Variable;case p.memberVariable:case p.memberGetAccessor:case p.memberSetAccessor:return n.languages.CompletionItemKind.Field;case p.function:case p.memberFunction:case p.constructSignature:case p.callSignature:case p.indexSignature:return n.languages.CompletionItemKind.Function;case p.enum:return n.languages.CompletionItemKind.Enum;case p.module:return n.languages.CompletionItemKind.Module;case p.class:return n.languages.CompletionItemKind.Class;case p.interface:return n.languages.CompletionItemKind.Interface;case p.warning:return n.languages.CompletionItemKind.File}return n.languages.CompletionItemKind.Property}static createDocumentationString(t){let o=_(t.documentation);if(t.tags)for(let r of t.tags)o+=`
7
7
 
@@ -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.6 */
4
- import k from"./FJHKAWQ4.js";import j from"./IEYLE4CD.js";import"./3SZH7ITA.js";import e from"./MIEFJ3RP.js";import{a as _}from"./HV2LVRPK.js";import"./UIU7JMMF.js";import b from"./AAO7M7EG.js";import a from"./ZX52GAEY.js";import"./5QMPRRXS.js";import{k as f}from"./FWIY55RI.js";import"./ACKXVYCM.js";import{a as g,b as p}from"./KKVDJIZ6.js";import{D as u,E as m,g as r,l as i,n as h,z as l}from"./IDEYUZY7.js";import{a as d,g as c}from"./IN6SCSEJ.js";import{Hl as s,Il as o,Kl as I,Pl as n}from"./TSB7MQ4H.js";import"./KPPP7SXB.js";export default $arcgis.t(([,,,v])=>{var M=r`@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=new d,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=[M]}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());return 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(t=>{this.arcgisSelectionChange.emit({selection:t.selection,model:this._editorInstance?.getModel()})}),this._themeObserver=g(this.el,["class"],()=>this.updateTheme()),this.updateTheme(),new ResizeObserver(()=>this._editorInstance?.layout()).observe(this.el),this.addCommonEditorActions(),()=>{for(this._editorInstance?.getModel()?.dispose();this._disposables.length;)this._disposables.pop()?.dispose();this._themeObserver?.()}})}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(){let e=this._editorInstance?.getAction("editor.action.fontZoomIn"),t=this._editorInstance?.getAction("editor.action.fontZoomOut");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.7 */
4
+ import k from"./VX4WCADC.js";import j from"./G5SADTL5.js";import"./WOVRTDCM.js";import e from"./J4L4JJFL.js";import{a as _}from"./REXCXF62.js";import"./JFE6M4Y3.js";import b from"./27QS4LNH.js";import a from"./I4LVYMSI.js";import"./QCZJ4SNP.js";import{k as f}from"./UPZPMIW5.js";import"./PYWGF52Z.js";import{a as g,b as p}from"./N4FPRXJO.js";import{D as u,E as m,g as r,l as i,n as h,z as l}from"./HTZ6GKV4.js";import{a as d,g as c}from"./4TA5DKU6.js";import{Hl as s,Il as o,Kl as I,Pl as n}from"./WBFIECLB.js";import"./UWKWAKQK.js";export default $arcgis.t(([,,,v])=>{var M=r`@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=new d,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=[M]}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());return 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(t=>{this.arcgisSelectionChange.emit({selection:t.selection,model:this._editorInstance?.getModel()})}),this._themeObserver=g(this.el,["class"],()=>this.updateTheme()),this.updateTheme(),new ResizeObserver(()=>this._editorInstance?.layout()).observe(this.el),this.addCommonEditorActions(),()=>{for(this._editorInstance?.getModel()?.dispose();this._disposables.length;)this._disposables.pop()?.dispose();this._themeObserver?.()}})}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(){let e=this._editorInstance?.getAction("editor.action.fontZoomIn"),t=this._editorInstance?.getAction("editor.action.fontZoomOut");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.6 */
4
- import{a as t,b as e}from"./M64QLEEQ.js";import"./TSB7MQ4H.js";import"./KPPP7SXB.js";var i=t,o={defaultToken:"invalid",tokenPostfix:".js",keywords:["break","case","catch","class","continue","const","constructor","debugger","default","delete","do","else","export","extends","false","finally","for","from","function","get","if","import","in","instanceof","let","new","null","return","set","static","super","switch","symbol","this","throw","true","try","typeof","undefined","var","void","while","with","yield","async","await","of"],typeKeywords:[],operators:e.operators,symbols:e.symbols,escapes:e.escapes,digits:e.digits,octaldigits:e.octaldigits,binarydigits:e.binarydigits,hexdigits:e.hexdigits,regexpctl:e.regexpctl,regexpesc:e.regexpesc,tokenizer:e.tokenizer};export{i as conf,o as language};
3
+ v5.0.0-next.7 */
4
+ import{a as t,b as e}from"./Y5QDQLBM.js";import"./WBFIECLB.js";import"./UWKWAKQK.js";var i=t,o={defaultToken:"invalid",tokenPostfix:".js",keywords:["break","case","catch","class","continue","const","constructor","debugger","default","delete","do","else","export","extends","false","finally","for","from","function","get","if","import","in","instanceof","let","new","null","return","set","static","super","switch","symbol","this","throw","true","try","typeof","undefined","var","void","while","with","yield","async","await","of"],typeKeywords:[],operators:e.operators,symbols:e.symbols,escapes:e.escapes,digits:e.digits,octaldigits:e.octaldigits,binarydigits:e.binarydigits,hexdigits:e.hexdigits,regexpctl:e.regexpctl,regexpesc:e.regexpesc,tokenizer:e.tokenizer};export{i as conf,o as language};
@@ -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.7 */
4
+ import c from"./CBH564BT.js";import"./JFE6M4Y3.js";import b from"./27QS4LNH.js";import a from"./I4LVYMSI.js";import"./XPV6WDON.js";import"./QCZJ4SNP.js";import"./UPZPMIW5.js";import"./PYWGF52Z.js";import"./N4FPRXJO.js";import"./HTZ6GKV4.js";import"./4TA5DKU6.js";import"./WBFIECLB.js";import"./UWKWAKQK.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.6 */
4
- import{a as A,b as Mt,c as Y}from"./IN6SCSEJ.js";var Z=globalThis,X=Z.ShadowRoot&&(Z.ShadyCSS===void 0||Z.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,mt=Symbol(),It=new WeakMap,I=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==mt)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(X&&t===void 0){let s=e!==void 0&&e.length===1;s&&(t=It.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&It.set(e,t))}return t}toString(){return this.cssText}},kt=o=>new I(typeof o=="string"?o:o+"",void 0,mt),ye=(o,...t)=>{let e=o.length===1?o[0]:t.reduce((s,i,r)=>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.")})(i)+o[r+1],o[0]);return new I(e,o,mt)},Ht=(o,t)=>{if(X)o.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let s=document.createElement("style"),i=Z.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=e.cssText,o.appendChild(s)}},yt=X?o=>o:o=>o instanceof CSSStyleSheet?(t=>{let e="";for(let s of t.cssRules)e+=s.cssText;return kt(e)})(o):o;var{is:ge,defineProperty:ve,getOwnPropertyDescriptor:Ee,getOwnPropertyNames:$e,getOwnPropertySymbols:be,getPrototypeOf:_e}=Object,et=globalThis,jt=et.trustedTypes,Ae=jt?jt.emptyScript:"",Ce=et.reactiveElementPolyfillSupport,k=(o,t)=>o,tt={toAttribute(o,t){switch(t){case Boolean:o=o?Ae: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)=>!ge(o,t),zt={attribute:!0,type:String,converter:tt,reflect:!1,useDefault:!1,hasChanged:H};Symbol.metadata??=Symbol("metadata"),et.litPropertyMetadata??=new WeakMap;var $=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=zt){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let s=Symbol(),i=this.getPropertyDescriptor(t,s,e);i!==void 0&&ve(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){let{get:i,set:r}=Ee(this.prototype,t)??{get(){return this[e]},set(n){this[e]=n}};return{get:i,set(n){let a=i?.call(this);r?.call(this,n),this.requestUpdate(t,a,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??zt}static _$Ei(){if(this.hasOwnProperty(k("elementProperties")))return;let t=_e(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(k("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(k("properties"))){let e=this.properties,s=[...$e(e),...be(e)];for(let i of s)this.createProperty(i,e[i])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[s,i]of e)this.elementProperties.set(s,i)}this._$Eh=new Map;for(let[e,s]of this.elementProperties){let i=this._$Eu(e,s);i!==void 0&&this._$Eh.set(i,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 i of s)e.unshift(yt(i))}else t!==void 0&&e.push(yt(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 Ht(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),i=this.constructor._$Eu(t,s);if(i!==void 0&&s.reflect===!0){let r=(s.converter?.toAttribute!==void 0?s.converter:tt).toAttribute(e,s.type);this._$Em=t,r==null?this.removeAttribute(i):this.setAttribute(i,r),this._$Em=null}}_$AK(t,e){let s=this.constructor,i=s._$Eh.get(t);if(i!==void 0&&this._$Em!==i){let r=s.getPropertyOptions(i),n=typeof r.converter=="function"?{fromAttribute:r.converter}:r.converter?.fromAttribute!==void 0?r.converter:tt;this._$Em=i,this[i]=n.fromAttribute(e,r.type)??this._$Ej?.get(i)??null,this._$Em=null}}requestUpdate(t,e,s){if(t!==void 0){let i=this.constructor,r=this[t];if(s??=i.getPropertyOptions(t),!((s.hasChanged??H)(r,e)||s.useDefault&&s.reflect&&r===this._$Ej?.get(t)&&!this.hasAttribute(i._$Eu(t,s))))return;this.C(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:i,wrapped:r},n){s&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,n??e??this[t]),r!==!0||n!==void 0)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),i===!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[i,r]of this._$Ep)this[i]=r;this._$Ep=void 0}let s=this.constructor.elementProperties;if(s.size>0)for(let[i,r]of s){let{wrapped:n}=r,a=this[i];n!==!0||this._$AL.has(i)||a===void 0||this.C(i,void 0,r,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){}};$.elementStyles=[],$.shadowRootOptions={mode:"open"},$[k("elementProperties")]=new Map,$[k("finalized")]=new Map,Ce?.({ReactiveElement:$}),(et.reactiveElementVersions??=[]).push("2.1.0");var vt=globalThis,st=vt.trustedTypes,Vt=st?st.createPolicy("lit-html",{createHTML:o=>o}):void 0,Et="$lit$",b=`lit$${Math.random().toFixed(9).slice(2)}$`,$t="?"+b,we=`<${$t}>`,S=document,z=()=>S.createComment(""),V=o=>o===null||typeof o!="object"&&typeof o!="function",bt=Array.isArray,Kt=o=>bt(o)||typeof o?.[Symbol.iterator]=="function",gt=`[
3
+ v5.0.0-next.7 */
4
+ import{a as A,b as Mt,c as Y}from"./4TA5DKU6.js";var Z=globalThis,X=Z.ShadowRoot&&(Z.ShadyCSS===void 0||Z.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,mt=Symbol(),It=new WeakMap,I=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==mt)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(X&&t===void 0){let s=e!==void 0&&e.length===1;s&&(t=It.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&It.set(e,t))}return t}toString(){return this.cssText}},kt=o=>new I(typeof o=="string"?o:o+"",void 0,mt),ye=(o,...t)=>{let e=o.length===1?o[0]:t.reduce((s,i,r)=>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.")})(i)+o[r+1],o[0]);return new I(e,o,mt)},Ht=(o,t)=>{if(X)o.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let s=document.createElement("style"),i=Z.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=e.cssText,o.appendChild(s)}},yt=X?o=>o:o=>o instanceof CSSStyleSheet?(t=>{let e="";for(let s of t.cssRules)e+=s.cssText;return kt(e)})(o):o;var{is:ge,defineProperty:ve,getOwnPropertyDescriptor:Ee,getOwnPropertyNames:$e,getOwnPropertySymbols:be,getPrototypeOf:_e}=Object,et=globalThis,jt=et.trustedTypes,Ae=jt?jt.emptyScript:"",Ce=et.reactiveElementPolyfillSupport,k=(o,t)=>o,tt={toAttribute(o,t){switch(t){case Boolean:o=o?Ae: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)=>!ge(o,t),zt={attribute:!0,type:String,converter:tt,reflect:!1,useDefault:!1,hasChanged:H};Symbol.metadata??=Symbol("metadata"),et.litPropertyMetadata??=new WeakMap;var $=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=zt){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let s=Symbol(),i=this.getPropertyDescriptor(t,s,e);i!==void 0&&ve(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){let{get:i,set:r}=Ee(this.prototype,t)??{get(){return this[e]},set(n){this[e]=n}};return{get:i,set(n){let a=i?.call(this);r?.call(this,n),this.requestUpdate(t,a,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??zt}static _$Ei(){if(this.hasOwnProperty(k("elementProperties")))return;let t=_e(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(k("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(k("properties"))){let e=this.properties,s=[...$e(e),...be(e)];for(let i of s)this.createProperty(i,e[i])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[s,i]of e)this.elementProperties.set(s,i)}this._$Eh=new Map;for(let[e,s]of this.elementProperties){let i=this._$Eu(e,s);i!==void 0&&this._$Eh.set(i,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 i of s)e.unshift(yt(i))}else t!==void 0&&e.push(yt(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 Ht(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),i=this.constructor._$Eu(t,s);if(i!==void 0&&s.reflect===!0){let r=(s.converter?.toAttribute!==void 0?s.converter:tt).toAttribute(e,s.type);this._$Em=t,r==null?this.removeAttribute(i):this.setAttribute(i,r),this._$Em=null}}_$AK(t,e){let s=this.constructor,i=s._$Eh.get(t);if(i!==void 0&&this._$Em!==i){let r=s.getPropertyOptions(i),n=typeof r.converter=="function"?{fromAttribute:r.converter}:r.converter?.fromAttribute!==void 0?r.converter:tt;this._$Em=i,this[i]=n.fromAttribute(e,r.type)??this._$Ej?.get(i)??null,this._$Em=null}}requestUpdate(t,e,s){if(t!==void 0){let i=this.constructor,r=this[t];if(s??=i.getPropertyOptions(t),!((s.hasChanged??H)(r,e)||s.useDefault&&s.reflect&&r===this._$Ej?.get(t)&&!this.hasAttribute(i._$Eu(t,s))))return;this.C(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:i,wrapped:r},n){s&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,n??e??this[t]),r!==!0||n!==void 0)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),i===!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[i,r]of this._$Ep)this[i]=r;this._$Ep=void 0}let s=this.constructor.elementProperties;if(s.size>0)for(let[i,r]of s){let{wrapped:n}=r,a=this[i];n!==!0||this._$AL.has(i)||a===void 0||this.C(i,void 0,r,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){}};$.elementStyles=[],$.shadowRootOptions={mode:"open"},$[k("elementProperties")]=new Map,$[k("finalized")]=new Map,Ce?.({ReactiveElement:$}),(et.reactiveElementVersions??=[]).push("2.1.0");var vt=globalThis,st=vt.trustedTypes,Vt=st?st.createPolicy("lit-html",{createHTML:o=>o}):void 0,Et="$lit$",b=`lit$${Math.random().toFixed(9).slice(2)}$`,$t="?"+b,we=`<${$t}>`,S=document,z=()=>S.createComment(""),V=o=>o===null||typeof o!="object"&&typeof o!="function",bt=Array.isArray,Kt=o=>bt(o)||typeof o?.[Symbol.iterator]=="function",gt=`[
5
5
  \f\r]`,j=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Bt=/-->/g,Wt=/>/g,w=RegExp(`>|${gt}(?:([^\\s"'>=/]+)(${gt}*=${gt}*(?:[^
6
6
  \f\r"'\`<>=]|("|')|))|$)`,"g"),Ft=/'/g,Gt=/"/g,Jt=/^(?:script|style|textarea|title)$/i,_t=o=>(t,...e)=>({_$litType$:o,strings:t,values:e}),ps=_t(1),us=_t(2),fs=_t(3),f=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),qt=new WeakMap,O=S.createTreeWalker(S,129);function Qt(o,t){if(!bt(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return Vt!==void 0?Vt.createHTML(t):t}var Yt=(o,t)=>{let e=o.length-1,s=[],i,r=t===2?"<svg>":t===3?"<math>":"",n=j;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===j?u[1]==="!--"?n=Bt:u[1]!==void 0?n=Wt:u[2]!==void 0?(Jt.test(u[2])&&(i=RegExp("</"+u[2],"g")),n=w):u[3]!==void 0&&(n=w):n===w?u[0]===">"?(n=i??j,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]==='"'?Gt:Ft):n===Gt||n===Ft?n=w:n===Bt||n===Wt?n=j:(n=w,i=void 0);let g=n===w&&o[a+1].startsWith("/>")?" ":"";r+=n===j?c+we:h>=0?(s.push(l),c.slice(0,h)+Et+c.slice(h)+b+g):c+b+(h===-2?a:g)}return[Qt(o,r+(o[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]},B=class o{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let r=0,n=0,a=t.length-1,c=this.parts,[l,u]=Yt(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(;(i=O.nextNode())!==null&&c.length<a;){if(i.nodeType===1){if(i.hasAttributes())for(let h of i.getAttributeNames())if(h.endsWith(Et)){let y=u[n++],g=i.getAttribute(h).split(b),C=/([.?@])?(.*)/.exec(y);c.push({type:1,index:r,name:C[2],strings:g,ctor:C[1]==="."?it:C[1]==="?"?rt:C[1]==="@"?nt:P}),i.removeAttribute(h)}else h.startsWith(b)&&(c.push({type:6,index:r}),i.removeAttribute(h));if(Jt.test(i.tagName)){let h=i.textContent.split(b),y=h.length-1;if(y>0){i.textContent=st?st.emptyScript:"";for(let g=0;g<y;g++)i.append(h[g],z()),O.nextNode(),c.push({type:2,index:++r});i.append(h[y],z())}}}else if(i.nodeType===8)if(i.data===$t)c.push({type:2,index:r});else{let h=-1;for(;(h=i.data.indexOf(b,h+1))!==-1;)c.push({type:7,index:r}),h+=b.length-1}r++}}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 i=s!==void 0?e._$Co?.[s]:e._$Cl,r=V(t)?void 0:t._$litDirective$;return i?.constructor!==r&&(i?._$AO?.(!1),r===void 0?i=void 0:(i=new r(o),i._$AT(o,e,s)),s!==void 0?(e._$Co??=[])[s]=i:e._$Cl=i),i!==void 0&&(t=T(o,i._$AS(o,t.values),i,s)),t}var ot=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,i=(t?.creationScope??S).importNode(e,!0);O.currentNode=i;let r=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(r,r.nextSibling,this,t):c.type===1?l=new c.ctor(r,c.name,c.strings,this,t):c.type===6&&(l=new at(r,this,t)),this._$AV.push(l),c=s[++a]}n!==c?.index&&(r=O.nextNode(),n++)}return O.currentNode=S,i}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,i){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=i?.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),V(t)?t===d||t==null||t===""?(this._$AH!==d&&this._$AR(),this._$AH=d):t!==this._$AH&&t!==f&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Kt(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==d&&V(this._$AH)?this._$AA.nextSibling.data=t:this.T(S.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:s}=t,i=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=B.createElement(Qt(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===i)this._$AH.p(e);else{let r=new ot(i,this),n=r.u(this.options);r.p(e),this.T(n),this._$AH=r}}_$AC(t){let e=qt.get(t.strings);return e===void 0&&qt.set(t.strings,e=new B(t)),e}k(t){bt(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,s,i=0;for(let r of t)i===e.length?e.push(s=new o(this.O(z()),this.O(z()),this,this.options)):s=e[i],s._$AI(r),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$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,i,r){this.type=1,this._$AH=d,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=r,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,i){let r=this.strings,n=!1;if(r===void 0)t=T(this,t,e,0),n=!V(t)||t!==this._$AH&&t!==f,n&&(this._$AH=t);else{let a=t,c,l;for(t=r[0],c=0;c<r.length-1;c++)l=T(this,a[s+c],e,c),l===f&&(l=this._$AH[c]),n||=!V(l)||l!==this._$AH[c],l===d?t=d:t!==d&&(t+=(l??"")+r[c+1]),this._$AH[c]=l}n&&!i&&this.j(t)}j(t){t===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},it=class extends P{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===d?void 0:t}},rt=class extends P{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==d)}},nt=class extends P{constructor(t,e,s,i,r){super(t,e,s,i,r),this.type=5}_$AI(t,e=this){if((t=T(this,t,e,0)??d)===f)return;let s=this._$AH,i=t===d&&s!==d||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,r=t!==d&&(s===d||i);i&&this.element.removeEventListener(this.name,this,s),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},at=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)}},Zt={M:Et,P:b,A:$t,C:1,L:Yt,R:ot,D:Kt,V:T,I:U,H:P,N:rt,U:nt,B:it,F:at},Oe=vt.litHtmlPolyfillSupport;Oe?.(B,U),(vt.litHtmlVersions??=[]).push("3.3.0");var At=(o,t,e)=>{let s=e?.renderBefore??t,i=s._$litPart$;if(i===void 0){let r=e?.renderBefore??null;s._$litPart$=i=new U(t.insertBefore(z(),r),r,void 0,e??{})}return i._$AI(o),i};var Ct=globalThis,_=class extends ${constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=At(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return f}};_._$litElement$=!0,_.finalized=!0,Ct.litElementHydrateSupport?.({LitElement:_});var Se=Ct.litElementPolyfillSupport;Se?.({LitElement:_});(Ct.litElementVersions??=[]).push("4.2.0");var p=(o,t,...e)=>{try{return o?.call(t,...e)}catch(s){console.error(s,o)}},W=async(o,t,...e)=>{try{return await o?.call(t,...e)}catch(s){console.error(s,o)}};var G=Symbol.for("controller"),Te=o=>typeof o=="object"&&o!==null&&(G in o||"hostConnected"in o||"hostDisconnected"in o||"hostUpdate"in o||"hostUpdated"in o),Ts=o=>typeof o?.then=="function";var F,x=o=>{F!==o&&(F=o,queueMicrotask(()=>F===o?F=void 0:0))},q=o=>F,N=[],Xt=o=>{if(o===void 0){N=[];return}let t=N.indexOf(o);N=t===-1?[...N,o]:N.slice(0,t+1),queueMicrotask(()=>N=[])},te=()=>N,R,Ps=o=>{R!==o&&(R=o,queueMicrotask(()=>R===o?R=void 0:0))},Pe=()=>{let o=R;return R=void 0,o},ee=async(o,t)=>{let e=lt(o);if(e===void 0)return o;if(await e.ready,typeof t=="function"){let s=e.watchExports(i=>t(i,s))}return e.exports},se=async o=>{let t=lt(o);return await t.ready,t},lt=o=>{let e=q().manager.X(o);if(e!==void 0)return e;if(Te(o))return o;let s=Pe();if(s!==void 0)return s},ct=!1,Ns=o=>{ct=!0;try{return o()}finally{ct=!1}};var Ne=(o,t,e)=>{let s=Object.keys(o),i=s.length;M===void 0&&queueMicrotask(K),M??=new Map;let r=M.get(o);return r===void 0&&(r={callbacks:[],keyCount:i},M.set(o,r)),r.keyCount!==i&&(r.callbacks.forEach(n=>n(s)),r.callbacks=[],r.keyCount=i),r.callbacks.push(n=>{let a=l=>p(t,null,l),c=n[i];c===void 0?a(void 0):o[c]===e?a(c):a(void 0)}),e},M,K=()=>{M?.forEach(({callbacks:o},t)=>{let e=Object.keys(t);o.forEach(s=>s(e))}),M=void 0},xe=(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((i,r)=>p(t,void 0,e===r?i:void 0)),e},De=(o=[q(),...te()],t,e)=>{let s=Array.isArray(o)?o:[o],i=s.length+1,r=n=>{i-=1,n!==void 0&&(i=Math.min(i,0)),i===0&&t(n)};s.forEach(n=>Ne(n,a=>r(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){xe(n,a=>r(a===void 0?void 0:{key:a,host:n,isReactive:!0}),e);break}return e},Le=(o="",t={},e=q())=>{let s={emit:i=>{o===""&&K();let r=new CustomEvent(o,{detail:i,cancelable:!0,bubbles:!0,composed:!0,...t});return e.el.dispatchEvent(r),r}};return o===""&&De(void 0,i=>o=i.key,s),s},Ue=Le.bind(null,""),re;re=G;var wt=class{constructor(t){this.#t=[],this.#e=[],this.#s=[],this.#o=[],this.#i=[],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??q(new.target.name);e.#r=s,e.ready=e.P.promise,e.#n=ie(e),e.component=s,e.#r.addController(e),e.#r.manager===void 0||(Xt(e),queueMicrotask(()=>e.catchUpLifecycle()))}#t;#e;#s;#o;#i;#c;#l;#p;#h;#d;#r;catchUpLifecycle(){let{manager:t}=this.#r;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.#r.requestUpdate(this.O,e)),this.P.resolve(t)}setProvisionalExports(t,e=!0){this.#n=e?ie(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.#r),ee}get useRef(){return x(this.#r),se}get useRefSync(){return x(this.#r),lt}controllerRemoved(){this.#r.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.#i.push(t)}onUpdated(t){this.#c.push(t)}onDestroy(t){this.#l.push(t)}onLifecycle(t){this.#p.push(t),this.connectedCalled&&this.#r.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 W(t.hostLoad,t),this.#s.length>0&&await Promise.allSettled(this.#s.map(W)),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.#i.forEach(oe,t)}triggerUpdated(t){this.hostUpdated&&p(this.hostUpdated,this,t),this.#c.forEach(oe,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.#r);let e=p(t);(Array.isArray(e)?e:[e]).forEach(i=>{typeof i=="function"?this.#h.push(i):typeof i=="object"&&typeof i.remove=="function"&&this.#h.push(i.remove)})}};function oe(o){p(o,void 0,this)}var ne=wt,ie=o=>{if(typeof o!="object"&&typeof o!="function"||o===null)return o;let t={get(s,i,r){if(!((i==="exports"||i==="_exports")&&i in s&&s[i]===e)&&(i in s||i in Promise.prototype||typeof i=="symbol"))return typeof s=="function"?s[i]:Reflect.get(s,i,r)}},e=new Proxy(o,t);return e};var ae=";",ht=",",ce=":";var St=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},Tt={};function Pt(){}var Re=(o,t)=>function(s,i){if(!globalThis.customElements)return;let n=(i??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(ae),g=u?u?.split(ht).map(Me):void 0,C=g?.map(([L])=>L),D=class extends Ot{static{this.observedAttributes=g?.map(([,L])=>L).filter(L=>L!=="")}static{this.C=C}static{this.E=h?h?.split(ht):void 0}static{this.D=y?.split(ht)}static{this.L=a}static{this.K=o}constructor(){!D.B&&(D.B=c(),D.F()),super()}};customElements.define(a,D)}},dt=Object.defineProperty,Me=o=>{let t=o.split(ce);return t.length===1?[t[0],Y(t[0])]:t},Ie=globalThis.HTMLElement??Pt,Ot=class extends Ie{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(i=>typeof i=="function"?{a:i}:i)??s))}).catch(s=>{t.H.reject(s),setTimeout(()=>{throw s})})}static{this.lumina=!0}static F(){for(let t of this.C??[])dt(this.prototype,t,{configurable:!0,enumerable:!0,get(){return this.#e[t]},set(e){this.#e[t]=e}});for(let t of this.E??[])dt(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??[])dt(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=St(this))}disconnectedCallback(){this.#t?.disconnectedCallback?.()}async componentOnReady(){return await this.H.promise,this}#o(t){let e=this.constructor,s=e.L,i=this.#e,r=Object.values(t).find(h=>h.L===s),n=`${s}--lazy`,a=r;for(;a&&!Object.hasOwn(a,"lumina");)a=Object.getPrototypeOf(a);He(a),!e.A&&(e.A=r,customElements.define(n,r)),r.N=this;let l=document.createElement(n);r.N=void 0,this.#t=l,this.#e=l,this.#s.forEach(h=>l.attributeChangedCallback(h,null,this.getAttribute(h))),Object.entries(i).forEach(ke,l);let u=this.isConnected;(u||this.G)&&(l.connectedCallback?.(),u||l.disconnectedCallback())}addController(){}requestUpdate(){this.#t?.requestUpdate()}};function ke([o,t]){this[o]=t}var He=o=>{let t=o.prototype,e=Element.prototype;Object.hasOwn(t,"isConnected")||(t.setAttribute=function(i,r){e.setAttribute.call(this.el,i,r)},t.removeAttribute=function(i){e.removeAttribute.call(this.el,i)},dt(t,"isConnected",{get(){return Reflect.get(e,"isConnected",this.el)}}))};var{I:je}=Zt;var pt=o=>o.strings===void 0,le=()=>document.createComment(""),Fs=(o,t,e)=>{let s=o._$AA.parentNode,i=t===void 0?o._$AB:t._$AA;if(e===void 0){let r=s.insertBefore(le(),i),n=s.insertBefore(le(),i);e=new je(r,n,o,o.options)}else{let r=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(r!==i||a){let c=e._$AA;for(;c!==r;){let l=c.nextSibling;s.insertBefore(c,i),c=l}}}return e},Gs=(o,t,e=o)=>(o._$AI(t,e),o),ze={},he=(o,t=ze)=>o._$AH=t,qs=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 J=(o,t)=>{let e=o._$AN;if(e===void 0)return!1;for(let s of e)s._$AO?.(t,!1),J(s,t);return!0},ut=o=>{let t,e;do{if((t=o._$AM)===void 0)break;e=t._$AN,e.delete(o),o=t}while(e?.size===0)},de=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),We(t)}};function Ve(o){this._$AN!==void 0?(ut(this),this._$AM=o,de(this)):this._$AM=o}function Be(o,t=!1,e=0){let s=this._$AH,i=this._$AN;if(i!==void 0&&i.size!==0)if(t)if(Array.isArray(s))for(let r=e;r<s.length;r++)J(s[r],!1),ut(s[r]);else s!=null&&(J(s,!1),ut(s));else J(this,o)}var We=o=>{o.type==m.CHILD&&(o._$AP??=Be,o._$AQ??=Ve)},ft=class extends v{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,s){super._$AT(t,e,s),de(this),this.isConnected=t._$AU}_$AO(t,e=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),e&&(J(this,t),ut(this))}setValue(t){if(pt(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 io=()=>new xt,xt=class{},Nt=new WeakMap,Dt=E(class extends ft{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=Nt.get(t);e===void 0&&(e=new WeakMap,Nt.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"?Nt.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 pe=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 i=!!t[s];i===this.st.has(s)||this.nt?.has(s)||(i?(e.add(s),this.st.add(s)):(e.remove(s),this.st.delete(s)))}return f}});var ue="important",Ge=" !"+ue,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 i=t[s];if(i!=null){this.ft.add(s);let r=typeof i=="string"&&i.endsWith(Ge);s.includes("-")||r?e.setProperty(s,r?i.slice(0,-11):i,r?ue:""):e[s]=i}}return f}});var Ke=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(!pt(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 he(o),t}});var Lt=class extends ne{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=Ut 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 ${Ut} prop.`)}this.#t!==void 0&&clearTimeout(this.#t),K();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=Mt(t,os)}}S(t,e){let s=this.T;this.V=d,this.T=[],s.forEach(i=>i(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)}},os=1e3,Ut="autoDestroyDisabled",fe=class o extends _{constructor(){super(),this.M=[],this.manager=new Lt(this);let t=this,e=t.constructor,s=e.N,i=e.K.o,r=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=Pt,t.shouldUpdate!==r&&(t.#e=t.shouldUpdate,t.shouldUpdate=r),i&&(t.#t=new Map,e.elementProperties.forEach((n,a)=>t.#t.set(a,i()))),!1}static finalizeStyles(t){let e=super.finalizeStyles(t),s=this.shadowRootOptions===Tt;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,i=Array.isArray(e)?e[1]:void 0,r=i?.hasChanged??H,n={attribute:s&1&&typeof t=="string"?Y(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,...i,hasChanged(a,c){let l=r(a,c);return n.c=l,l}};super.createProperty(t,n)}static getPropertyDescriptor(t,e,s){let i=this.K,r=super.getPropertyDescriptor(t,e,s);return s.d=r,{...r,get(){return i.t?.(this.#t.get(t)),r.get?.call(this)},set(n){let a=this.manager;if(s.readOnly&&!ct&&(a.R||a.connectedCalled))throw Error(`Cannot assign to read-only property "${t}" of ${this.el.localName}. Trying to assign "${n}"`);r.set.call(this,n??void 0),s.c&&this.#t?.get(t)?.notify(),a.T.length>0&&(K(),a?.S(t,n))}}}static{this.lumina=!0}#t;#e;#s;#o;#i;connectedCallback(){if(this.el.hasAttribute("defer-hydration"))return;let t=this.constructor.K.c?.(()=>this.requestUpdate());this.#i=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.#i.clear(),this.constructor.K.r(this.#i,()=>super.update(t))}catch(e){throw this.#i.clear(),e}}disconnectedCallback(){super.disconnectedCallback(),this.#i?.destroy(),this.#i=void 0}createRenderRoot(){let t=this.el.shadowRoot,e=this.constructor,s=e.shadowRootOptions,r=t??(s===Tt?this.el:this.el.attachShadow(s));if(this.isConnected){let n=r.getRootNode();n.adoptedStyleSheets=[...n.adoptedStyleSheets,...e.elementStyles.map(a=>"styleSheet"in a?a.styleSheet:a)]}return r}async#l(){let t=this.el.G??St(this.el);t&&await t;let e=[];for(let i of this.M)"triggerLoad"in i?e.push(i.triggerLoad()):e.push(W(i.hostLoad,i));await Promise.all(e),await this.load?.(),this.manager.hasDestroy&&this.manager.onUpdate(i=>i.has(Ut)&&this.manager.U()),this.#s(!0),this.performUpdate(),this.I.resolve(),await Promise.resolve();let s=this.J.filter(i=>!i.manager?.loadedCalled);s.length&&await Promise.allSettled(s.map(async i=>await i.componentOnReady())),this.J.length=0,this.el.setAttribute(this.constructor.K.hydratedAttribute,"");for(let i of this.M)"triggerLoaded"in i?i.triggerLoaded():p(i.hostLoaded,i);this.loaded?.(),this.#o.resolve()}shouldUpdate(t){return this.manager.Q=t,this.#e?.(t)??!0}update(t){this.#i?this.#c(t):super.update(t)}listen(t,e,s){let i=e?.bind(this)??e;this.manager.onLifecycle(()=>(this.el.addEventListener(t,i,s),()=>this.el.removeEventListener(t,i,s)))}listenOn(t,e,s,i){let r=s?.bind(this)??s;this.manager.onLifecycle(()=>(t.addEventListener(e,r,i),()=>t.removeEventListener(e,r,i)))}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 me=o=>{let t,e=i=>{t=new URL(i,globalThis.location?.href||void 0).href},s={...o,getAssetPath(i){let r=new URL(i,t);return r.origin!==globalThis.location?.origin?r.href:r.pathname},setAssetPath:e,customElement(i,r){r.K=s,r.L=i,customElements.get(i)||customElements.define(i,r)}};return e(o.defaultAssetPath),s};var ri=o=>typeof o=="object"&&o!=null?pe(o):o;var Rt=class extends v{#t;#e;constructor(t){super(t);let e=this;this.#e=function(i){return e.#t.call(this,i)}}render(t){return typeof t=="function"?(this.#t=t,Dt(this.#e)):Dt(t)}},ni=E(Rt);var ai=d;var Q=me({defaultAssetPath:"https://jsdev.arcgis.com/next/coding-components/",hydratedAttribute:"hydrated"}),{customElement:pi,getAssetPath:ui,setAssetPath:fi}=Q;Q.t=void 0;Q.o=void 0;Q.c=void 0;Q.r=void 0;export{Ts as a,x as b,Xt as c,te as d,Ps as e,Ns as f,ye as g,ps as h,f as i,d as j,De as k,Ue as l,wt as m,Tt as n,Re as o,m as p,E as q,v as r,Fs as s,Gs as t,he as u,qs as v,Ks as w,io as x,Dt as y,fe as z,ri as A,ai as B,Q as C,pi as D,ui as E};
@@ -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.6 */
4
- import{a as Q,b as Y,c as Z,d,e as f}from"./5QMPRRXS.js";import{b as D,c as S,d as v,e as H,h as J,k as X}from"./FWIY55RI.js";import{h as z}from"./KKVDJIZ6.js";import{E as B}from"./IDEYUZY7.js";import{f as q,h as V}from"./IN6SCSEJ.js";import{Gl as $,Pl as A}from"./TSB7MQ4H.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 et(t){return he(t)&&"type"in t&&t.type==="voxel"}function tt(t){return he(t)&&"type"in t&&t.type==="pixel"}function it(t){return M(t)||P(t)||ue(t)}function rt(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 st(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 nt(t,e,i=!1){let r=e,s=[],o=[];return d(t).forEach(n=>{r&&(r+=`
3
+ v5.0.0-next.7 */
4
+ import{a as Q,b as Y,c as Z,d,e as f}from"./QCZJ4SNP.js";import{b as D,c as S,d as v,e as H,h as J,k as X}from"./UPZPMIW5.js";import{h as z}from"./N4FPRXJO.js";import{E as B}from"./HTZ6GKV4.js";import{f as q,h as V}from"./4TA5DKU6.js";import{Gl as $,Pl as A}from"./WBFIECLB.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 et(t){return he(t)&&"type"in t&&t.type==="voxel"}function tt(t){return he(t)&&"type"in t&&t.type==="pixel"}function it(t){return M(t)||P(t)||ue(t)}function rt(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 st(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 nt(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.6 */
4
- import{g as e}from"./IDEYUZY7.js";var i=e`@layer{arcgis-arcade-editor,arcgis-sql-expression-editor{.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.7 */
4
+ import{g as e}from"./HTZ6GKV4.js";var i=e`@layer{arcgis-arcade-editor,arcgis-sql-expression-editor{.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};
@@ -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.6 */
4
- import a from"./ZX52GAEY.js";import{b as f,c,d as p}from"./FWIY55RI.js";import{e as h,f as x}from"./KKVDJIZ6.js";import{E as u}from"./IDEYUZY7.js";export default $arcgis.t(([{getDeclaredPixelMembers:C},{b:v,c:g,d:T,e:M,f:F,g:m,h:P,i:k,j:A,k:I}])=>{async function S(e){let{apiVersion:r,bundles:t,hiddenApiItems:a}=e.toEditorProfileDefinition(),i=await V(e.dictionaryVariables);return{apiVersion:r,bundles:t,variables:i,hiddenApiItems:a?.map(n=>n.toLowerCase())}}async function V(e,r=f.Variable){return await Promise.all(e.map(async t=>{switch(t.type){case"dictionary":return await _(t,r);case"pixel":return await K(t,r);case"voxel":case"feature":return await j(t,r);default:return $(t,r)}}))}function $(e,r){let{name:t,type:a}=e,i=e.getDescription();return{name:t,description:i,type:a,completion:{label:t,detail:t,insertText:t,insertTextMode:p.asIs,insertTextFormat:c.PlainText,kind:r,documentation:{kind:"markdown",value:i}}}}async function j(e,r){let t=await e.loadSource(),{name:a}=e,i=e.getDescription(),n={label:a,detail:a,insertText:a,insertTextMode:p.asIs,insertTextFormat:c.PlainText,kind:r},s={name:a,description:i,type:"dictionary",properties:[],completion:n};if(!t)return s;let[o,l]=P(t.fields,i,!0);return s.properties=o,n.documentation={kind:"markdown",value:l},s}async function K(e,r){let t=await e.loadSource(),a=e.toProfileVariableDefinition();if(a.type!=="pixel")throw new Error("Incorrect definition passed to pixel variable");let{name:i}=e,n=e.getDescription(),s={label:i,detail:i,insertText:i,insertTextMode:p.asIs,insertTextFormat:c.PlainText,kind:r},o={name:i,description:n,type:"dictionary",properties:[],completion:s};if(!t||!a.definition)return o;let l=await C(t),[E,L]=k(l,n);return o.properties=E,s.documentation={kind:"markdown",value:L},o}async function _(e,r){let{name:t,dictionaryVariables:a}=e,i=e.getDescription(),n=a.reduce((s,o)=>{s!==""&&(s+=`
3
+ v5.0.0-next.7 */
4
+ import a from"./I4LVYMSI.js";import{b as f,c,d as p}from"./UPZPMIW5.js";import{e as h,f as x}from"./N4FPRXJO.js";import{E as u}from"./HTZ6GKV4.js";export default $arcgis.t(([{getDeclaredPixelMembers:C},{b:v,c:g,d:T,e:M,f:F,g:m,h:P,i:k,j:A,k:I}])=>{async function S(e){let{apiVersion:r,bundles:t,hiddenApiItems:a}=e.toEditorProfileDefinition(),i=await V(e.dictionaryVariables);return{apiVersion:r,bundles:t,variables:i,hiddenApiItems:a?.map(n=>n.toLowerCase())}}async function V(e,r=f.Variable){return await Promise.all(e.map(async t=>{switch(t.type){case"dictionary":return await _(t,r);case"pixel":return await K(t,r);case"voxel":case"feature":return await j(t,r);default:return $(t,r)}}))}function $(e,r){let{name:t,type:a}=e,i=e.getDescription();return{name:t,description:i,type:a,completion:{label:t,detail:t,insertText:t,insertTextMode:p.asIs,insertTextFormat:c.PlainText,kind:r,documentation:{kind:"markdown",value:i}}}}async function j(e,r){let t=await e.loadSource(),{name:a}=e,i=e.getDescription(),n={label:a,detail:a,insertText:a,insertTextMode:p.asIs,insertTextFormat:c.PlainText,kind:r},s={name:a,description:i,type:"dictionary",properties:[],completion:n};if(!t)return s;let[o,l]=P(t.fields,i,!0);return s.properties=o,n.documentation={kind:"markdown",value:l},s}async function K(e,r){let t=await e.loadSource(),a=e.toProfileVariableDefinition();if(a.type!=="pixel")throw new Error("Incorrect definition passed to pixel variable");let{name:i}=e,n=e.getDescription(),s={label:i,detail:i,insertText:i,insertTextMode:p.asIs,insertTextFormat:c.PlainText,kind:r},o={name:i,description:n,type:"dictionary",properties:[],completion:s};if(!t||!a.definition)return o;let l=await C(t),[E,L]=k(l,n);return o.properties=E,s.documentation={kind:"markdown",value:L},o}async function _(e,r){let{name:t,dictionaryVariables:a}=e,i=e.getDescription(),n=a.reduce((s,o)=>{s!==""&&(s+=`
5
5
 
6
6
  `),s+=`**${o.name}**
7
7
  ${o.type}`;let l=o.getDescription();return l&&(s+=`
@@ -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.6 */
4
- async function t(){return await import("./BDBKNTZL.js").then(m=>m.default)}export{t as a};
3
+ v5.0.0-next.7 */
4
+ async function t(){return await import("./HM3KGR4P.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.6 */
4
- import{Tl as le}from"./TSB7MQ4H.js";import"./KPPP7SXB.js";var Ot=Object.defineProperty,Nt=Object.getOwnPropertyDescriptor,Rt=Object.getOwnPropertyNames,Mt=Object.prototype.hasOwnProperty,fe=(e,r,i,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let t of Rt(r))!Mt.call(e,t)&&t!==i&&Ot(e,t,{get:()=>r[t],enumerable:!(n=Nt(r,t))||n.enumerable});return e},Dt=(e,r,i)=>(fe(e,r,"default"),i&&fe(i,r,"default")),f={};Dt(f,le);var Ft=2*60*1e3,Ut=class{constructor(e){this._defaults=e,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;Date.now()-this._lastUsedTime>Ft&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=f.editor.createWebWorker({moduleId:"vs/language/json/jsonWorker",label:this._defaults.languageId,createData:{languageSettings:this._defaults.diagnosticsOptions,languageId:this._defaults.languageId,enableSchemaRequest:this._defaults.diagnosticsOptions.enableSchemaRequest}}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...e){let r;return this._getClient().then(i=>{r=i}).then(i=>{if(this._worker)return this._worker.withSyncedResources(e)}).then(i=>r)}},de;(function(e){function r(i){return typeof i=="string"}e.is=r})(de||(de={}));var Q;(function(e){function r(i){return typeof i=="string"}e.is=r})(Q||(Q={}));var ge;(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function r(i){return typeof i=="number"&&e.MIN_VALUE<=i&&i<=e.MAX_VALUE}e.is=r})(ge||(ge={}));var W;(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function r(i){return typeof i=="number"&&e.MIN_VALUE<=i&&i<=e.MAX_VALUE}e.is=r})(W||(W={}));var O;(function(e){function r(n,t){return n===Number.MAX_VALUE&&(n=W.MAX_VALUE),t===Number.MAX_VALUE&&(t=W.MAX_VALUE),{line:n,character:t}}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&a.uinteger(t.line)&&a.uinteger(t.character)}e.is=i})(O||(O={}));var m;(function(e){function r(n,t,o,s){if(a.uinteger(n)&&a.uinteger(t)&&a.uinteger(o)&&a.uinteger(s))return{start:O.create(n,t),end:O.create(o,s)};if(O.is(n)&&O.is(t))return{start:n,end:t};throw new Error(`Range#create called with invalid arguments[${n}, ${t}, ${o}, ${s}]`)}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&O.is(t.start)&&O.is(t.end)}e.is=i})(m||(m={}));var H;(function(e){function r(n,t){return{uri:n,range:t}}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&m.is(t.range)&&(a.string(t.uri)||a.undefined(t.uri))}e.is=i})(H||(H={}));var pe;(function(e){function r(n,t,o,s){return{targetUri:n,targetRange:t,targetSelectionRange:o,originSelectionRange:s}}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&m.is(t.targetRange)&&a.string(t.targetUri)&&m.is(t.targetSelectionRange)&&(m.is(t.originSelectionRange)||a.undefined(t.originSelectionRange))}e.is=i})(pe||(pe={}));var Y;(function(e){function r(n,t,o,s){return{red:n,green:t,blue:o,alpha:s}}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&a.numberRange(t.red,0,1)&&a.numberRange(t.green,0,1)&&a.numberRange(t.blue,0,1)&&a.numberRange(t.alpha,0,1)}e.is=i})(Y||(Y={}));var ve;(function(e){function r(n,t){return{range:n,color:t}}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&m.is(t.range)&&Y.is(t.color)}e.is=i})(ve||(ve={}));var me;(function(e){function r(n,t,o){return{label:n,textEdit:t,additionalTextEdits:o}}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&a.string(t.label)&&(a.undefined(t.textEdit)||T.is(t))&&(a.undefined(t.additionalTextEdits)||a.typedArray(t.additionalTextEdits,T.is))}e.is=i})(me||(me={}));var P;(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(P||(P={}));var he;(function(e){function r(n,t,o,s,u,g){let c={startLine:n,endLine:t};return a.defined(o)&&(c.startCharacter=o),a.defined(s)&&(c.endCharacter=s),a.defined(u)&&(c.kind=u),a.defined(g)&&(c.collapsedText=g),c}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&a.uinteger(t.startLine)&&a.uinteger(t.startLine)&&(a.undefined(t.startCharacter)||a.uinteger(t.startCharacter))&&(a.undefined(t.endCharacter)||a.uinteger(t.endCharacter))&&(a.undefined(t.kind)||a.string(t.kind))}e.is=i})(he||(he={}));var G;(function(e){function r(n,t){return{location:n,message:t}}e.create=r;function i(n){let t=n;return a.defined(t)&&H.is(t.location)&&a.string(t.message)}e.is=i})(G||(G={}));var F;(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(F||(F={}));var _e;(function(e){e.Unnecessary=1,e.Deprecated=2})(_e||(_e={}));var ke;(function(e){function r(i){let n=i;return a.objectLiteral(n)&&a.string(n.href)}e.is=r})(ke||(ke={}));var z;(function(e){function r(n,t,o,s,u,g){let c={range:n,message:t};return a.defined(o)&&(c.severity=o),a.defined(s)&&(c.code=s),a.defined(u)&&(c.source=u),a.defined(g)&&(c.relatedInformation=g),c}e.create=r;function i(n){var t;let o=n;return a.defined(o)&&m.is(o.range)&&a.string(o.message)&&(a.number(o.severity)||a.undefined(o.severity))&&(a.integer(o.code)||a.string(o.code)||a.undefined(o.code))&&(a.undefined(o.codeDescription)||a.string((t=o.codeDescription)===null||t===void 0?void 0:t.href))&&(a.string(o.source)||a.undefined(o.source))&&(a.undefined(o.relatedInformation)||a.typedArray(o.relatedInformation,G.is))}e.is=i})(z||(z={}));var U;(function(e){function r(n,t,...o){let s={title:n,command:t};return a.defined(o)&&o.length>0&&(s.arguments=o),s}e.create=r;function i(n){let t=n;return a.defined(t)&&a.string(t.title)&&a.string(t.command)}e.is=i})(U||(U={}));var T;(function(e){function r(o,s){return{range:o,newText:s}}e.replace=r;function i(o,s){return{range:{start:o,end:o},newText:s}}e.insert=i;function n(o){return{range:o,newText:""}}e.del=n;function t(o){let s=o;return a.objectLiteral(s)&&a.string(s.newText)&&m.is(s.range)}e.is=t})(T||(T={}));var Z;(function(e){function r(n,t,o){let s={label:n};return t!==void 0&&(s.needsConfirmation=t),o!==void 0&&(s.description=o),s}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&a.string(t.label)&&(a.boolean(t.needsConfirmation)||t.needsConfirmation===void 0)&&(a.string(t.description)||t.description===void 0)}e.is=i})(Z||(Z={}));var j;(function(e){function r(i){let n=i;return a.string(n)}e.is=r})(j||(j={}));var be;(function(e){function r(o,s,u){return{range:o,newText:s,annotationId:u}}e.replace=r;function i(o,s,u){return{range:{start:o,end:o},newText:s,annotationId:u}}e.insert=i;function n(o,s){return{range:o,newText:"",annotationId:s}}e.del=n;function t(o){let s=o;return T.is(s)&&(Z.is(s.annotationId)||j.is(s.annotationId))}e.is=t})(be||(be={}));var K;(function(e){function r(n,t){return{textDocument:n,edits:t}}e.create=r;function i(n){let t=n;return a.defined(t)&&re.is(t.textDocument)&&Array.isArray(t.edits)}e.is=i})(K||(K={}));var C;(function(e){function r(n,t,o){let s={kind:"create",uri:n};return t!==void 0&&(t.overwrite!==void 0||t.ignoreIfExists!==void 0)&&(s.options=t),o!==void 0&&(s.annotationId=o),s}e.create=r;function i(n){let t=n;return t&&t.kind==="create"&&a.string(t.uri)&&(t.options===void 0||(t.options.overwrite===void 0||a.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||a.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||j.is(t.annotationId))}e.is=i})(C||(C={}));var ee;(function(e){function r(n,t,o,s){let u={kind:"rename",oldUri:n,newUri:t};return o!==void 0&&(o.overwrite!==void 0||o.ignoreIfExists!==void 0)&&(u.options=o),s!==void 0&&(u.annotationId=s),u}e.create=r;function i(n){let t=n;return t&&t.kind==="rename"&&a.string(t.oldUri)&&a.string(t.newUri)&&(t.options===void 0||(t.options.overwrite===void 0||a.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||a.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||j.is(t.annotationId))}e.is=i})(ee||(ee={}));var te;(function(e){function r(n,t,o){let s={kind:"delete",uri:n};return t!==void 0&&(t.recursive!==void 0||t.ignoreIfNotExists!==void 0)&&(s.options=t),o!==void 0&&(s.annotationId=o),s}e.create=r;function i(n){let t=n;return t&&t.kind==="delete"&&a.string(t.uri)&&(t.options===void 0||(t.options.recursive===void 0||a.boolean(t.options.recursive))&&(t.options.ignoreIfNotExists===void 0||a.boolean(t.options.ignoreIfNotExists)))&&(t.annotationId===void 0||j.is(t.annotationId))}e.is=i})(te||(te={}));var ne;(function(e){function r(i){let n=i;return n&&(n.changes!==void 0||n.documentChanges!==void 0)&&(n.documentChanges===void 0||n.documentChanges.every(t=>a.string(t.kind)?C.is(t)||ee.is(t)||te.is(t):K.is(t)))}e.is=r})(ne||(ne={}));var we;(function(e){function r(n){return{uri:n}}e.create=r;function i(n){let t=n;return a.defined(t)&&a.string(t.uri)}e.is=i})(we||(we={}));var Ae;(function(e){function r(n,t){return{uri:n,version:t}}e.create=r;function i(n){let t=n;return a.defined(t)&&a.string(t.uri)&&a.integer(t.version)}e.is=i})(Ae||(Ae={}));var re;(function(e){function r(n,t){return{uri:n,version:t}}e.create=r;function i(n){let t=n;return a.defined(t)&&a.string(t.uri)&&(t.version===null||a.integer(t.version))}e.is=i})(re||(re={}));var Ie;(function(e){function r(n,t,o,s){return{uri:n,languageId:t,version:o,text:s}}e.create=r;function i(n){let t=n;return a.defined(t)&&a.string(t.uri)&&a.string(t.languageId)&&a.integer(t.version)&&a.string(t.text)}e.is=i})(Ie||(Ie={}));var ie;(function(e){e.PlainText="plaintext",e.Markdown="markdown";function r(i){let n=i;return n===e.PlainText||n===e.Markdown}e.is=r})(ie||(ie={}));var V;(function(e){function r(i){let n=i;return a.objectLiteral(i)&&ie.is(n.kind)&&a.string(n.value)}e.is=r})(V||(V={}));var h;(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(h||(h={}));var oe;(function(e){e.PlainText=1,e.Snippet=2})(oe||(oe={}));var Ee;(function(e){e.Deprecated=1})(Ee||(Ee={}));var Le;(function(e){function r(n,t,o){return{newText:n,insert:t,replace:o}}e.create=r;function i(n){let t=n;return t&&a.string(t.newText)&&m.is(t.insert)&&m.is(t.replace)}e.is=i})(Le||(Le={}));var Oe;(function(e){e.asIs=1,e.adjustIndentation=2})(Oe||(Oe={}));var Ne;(function(e){function r(i){let n=i;return n&&(a.string(n.detail)||n.detail===void 0)&&(a.string(n.description)||n.description===void 0)}e.is=r})(Ne||(Ne={}));var Re;(function(e){function r(i){return{label:i}}e.create=r})(Re||(Re={}));var Me;(function(e){function r(i,n){return{items:i||[],isIncomplete:!!n}}e.create=r})(Me||(Me={}));var X;(function(e){function r(n){return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=r;function i(n){let t=n;return a.string(t)||a.objectLiteral(t)&&a.string(t.language)&&a.string(t.value)}e.is=i})(X||(X={}));var De;(function(e){function r(i){let n=i;return!!n&&a.objectLiteral(n)&&(V.is(n.contents)||X.is(n.contents)||a.typedArray(n.contents,X.is))&&(i.range===void 0||m.is(i.range))}e.is=r})(De||(De={}));var Fe;(function(e){function r(i,n){return n?{label:i,documentation:n}:{label:i}}e.create=r})(Fe||(Fe={}));var Ue;(function(e){function r(i,n,...t){let o={label:i};return a.defined(n)&&(o.documentation=n),a.defined(t)?o.parameters=t:o.parameters=[],o}e.create=r})(Ue||(Ue={}));var S;(function(e){e.Text=1,e.Read=2,e.Write=3})(S||(S={}));var Te;(function(e){function r(i,n){let t={range:i};return a.number(n)&&(t.kind=n),t}e.create=r})(Te||(Te={}));var _;(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(_||(_={}));var je;(function(e){e.Deprecated=1})(je||(je={}));var xe;(function(e){function r(i,n,t,o,s){let u={name:i,kind:n,location:{uri:o,range:t}};return s&&(u.containerName=s),u}e.create=r})(xe||(xe={}));var ye;(function(e){function r(i,n,t,o){return o!==void 0?{name:i,kind:n,location:{uri:t,range:o}}:{name:i,kind:n,location:{uri:t}}}e.create=r})(ye||(ye={}));var Pe;(function(e){function r(n,t,o,s,u,g){let c={name:n,detail:t,kind:o,range:s,selectionRange:u};return g!==void 0&&(c.children=g),c}e.create=r;function i(n){let t=n;return t&&a.string(t.name)&&a.number(t.kind)&&m.is(t.range)&&m.is(t.selectionRange)&&(t.detail===void 0||a.string(t.detail))&&(t.deprecated===void 0||a.boolean(t.deprecated))&&(t.children===void 0||Array.isArray(t.children))&&(t.tags===void 0||Array.isArray(t.tags))}e.is=i})(Pe||(Pe={}));var Se;(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"})(Se||(Se={}));var q;(function(e){e.Invoked=1,e.Automatic=2})(q||(q={}));var Ve;(function(e){function r(n,t,o){let s={diagnostics:n};return t!=null&&(s.only=t),o!=null&&(s.triggerKind=o),s}e.create=r;function i(n){let t=n;return a.defined(t)&&a.typedArray(t.diagnostics,z.is)&&(t.only===void 0||a.typedArray(t.only,a.string))&&(t.triggerKind===void 0||t.triggerKind===q.Invoked||t.triggerKind===q.Automatic)}e.is=i})(Ve||(Ve={}));var Be;(function(e){function r(n,t,o){let s={title:n},u=!0;return typeof t=="string"?(u=!1,s.kind=t):U.is(t)?s.command=t:s.edit=t,u&&o!==void 0&&(s.kind=o),s}e.create=r;function i(n){let t=n;return t&&a.string(t.title)&&(t.diagnostics===void 0||a.typedArray(t.diagnostics,z.is))&&(t.kind===void 0||a.string(t.kind))&&(t.edit!==void 0||t.command!==void 0)&&(t.command===void 0||U.is(t.command))&&(t.isPreferred===void 0||a.boolean(t.isPreferred))&&(t.edit===void 0||ne.is(t.edit))}e.is=i})(Be||(Be={}));var We;(function(e){function r(n,t){let o={range:n};return a.defined(t)&&(o.data=t),o}e.create=r;function i(n){let t=n;return a.defined(t)&&m.is(t.range)&&(a.undefined(t.command)||U.is(t.command))}e.is=i})(We||(We={}));var He;(function(e){function r(n,t){return{tabSize:n,insertSpaces:t}}e.create=r;function i(n){let t=n;return a.defined(t)&&a.uinteger(t.tabSize)&&a.boolean(t.insertSpaces)}e.is=i})(He||(He={}));var ze;(function(e){function r(n,t,o){return{range:n,target:t,data:o}}e.create=r;function i(n){let t=n;return a.defined(t)&&m.is(t.range)&&(a.undefined(t.target)||a.string(t.target))}e.is=i})(ze||(ze={}));var Xe;(function(e){function r(n,t){return{range:n,parent:t}}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&m.is(t.range)&&(t.parent===void 0||e.is(t.parent))}e.is=i})(Xe||(Xe={}));var qe;(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"})(qe||(qe={}));var Je;(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(Je||(Je={}));var $e;(function(e){function r(i){let n=i;return a.objectLiteral(n)&&(n.resultId===void 0||typeof n.resultId=="string")&&Array.isArray(n.data)&&(n.data.length===0||typeof n.data[0]=="number")}e.is=r})($e||($e={}));var Qe;(function(e){function r(n,t){return{range:n,text:t}}e.create=r;function i(n){let t=n;return t!=null&&m.is(t.range)&&a.string(t.text)}e.is=i})(Qe||(Qe={}));var Ye;(function(e){function r(n,t,o){return{range:n,variableName:t,caseSensitiveLookup:o}}e.create=r;function i(n){let t=n;return t!=null&&m.is(t.range)&&a.boolean(t.caseSensitiveLookup)&&(a.string(t.variableName)||t.variableName===void 0)}e.is=i})(Ye||(Ye={}));var Ge;(function(e){function r(n,t){return{range:n,expression:t}}e.create=r;function i(n){let t=n;return t!=null&&m.is(t.range)&&(a.string(t.expression)||t.expression===void 0)}e.is=i})(Ge||(Ge={}));var Ze;(function(e){function r(n,t){return{frameId:n,stoppedLocation:t}}e.create=r;function i(n){let t=n;return a.defined(t)&&m.is(n.stoppedLocation)}e.is=i})(Ze||(Ze={}));var se;(function(e){e.Type=1,e.Parameter=2;function r(i){return i===1||i===2}e.is=r})(se||(se={}));var ae;(function(e){function r(n){return{value:n}}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&(t.tooltip===void 0||a.string(t.tooltip)||V.is(t.tooltip))&&(t.location===void 0||H.is(t.location))&&(t.command===void 0||U.is(t.command))}e.is=i})(ae||(ae={}));var Ke;(function(e){function r(n,t,o){let s={position:n,label:t};return o!==void 0&&(s.kind=o),s}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&O.is(t.position)&&(a.string(t.label)||a.typedArray(t.label,ae.is))&&(t.kind===void 0||se.is(t.kind))&&t.textEdits===void 0||a.typedArray(t.textEdits,T.is)&&(t.tooltip===void 0||a.string(t.tooltip)||V.is(t.tooltip))&&(t.paddingLeft===void 0||a.boolean(t.paddingLeft))&&(t.paddingRight===void 0||a.boolean(t.paddingRight))}e.is=i})(Ke||(Ke={}));var Ce;(function(e){function r(i){return{kind:"snippet",value:i}}e.createSnippet=r})(Ce||(Ce={}));var et;(function(e){function r(i,n,t,o){return{insertText:i,filterText:n,range:t,command:o}}e.create=r})(et||(et={}));var tt;(function(e){function r(i){return{items:i}}e.create=r})(tt||(tt={}));var nt;(function(e){e.Invoked=0,e.Automatic=1})(nt||(nt={}));var rt;(function(e){function r(i,n){return{range:i,text:n}}e.create=r})(rt||(rt={}));var it;(function(e){function r(i,n){return{triggerKind:i,selectedCompletionInfo:n}}e.create=r})(it||(it={}));var ot;(function(e){function r(i){let n=i;return a.objectLiteral(n)&&Q.is(n.uri)&&a.string(n.name)}e.is=r})(ot||(ot={}));var st;(function(e){function r(o,s,u,g){return new Tt(o,s,u,g)}e.create=r;function i(o){let s=o;return!!(a.defined(s)&&a.string(s.uri)&&(a.undefined(s.languageId)||a.string(s.languageId))&&a.uinteger(s.lineCount)&&a.func(s.getText)&&a.func(s.positionAt)&&a.func(s.offsetAt))}e.is=i;function n(o,s){let u=o.getText(),g=t(s,(v,d)=>{let k=v.range.start.line-d.range.start.line;return k===0?v.range.start.character-d.range.start.character:k}),c=u.length;for(let v=g.length-1;v>=0;v--){let d=g[v],k=o.offsetAt(d.range.start),p=o.offsetAt(d.range.end);if(p<=c)u=u.substring(0,k)+d.newText+u.substring(p,u.length);else throw new Error("Overlapping edit");c=k}return u}e.applyEdits=n;function t(o,s){if(o.length<=1)return o;let u=o.length/2|0,g=o.slice(0,u),c=o.slice(u);t(g,s),t(c,s);let v=0,d=0,k=0;for(;v<g.length&&d<c.length;)s(g[v],c[d])<=0?o[k++]=g[v++]:o[k++]=c[d++];for(;v<g.length;)o[k++]=g[v++];for(;d<c.length;)o[k++]=c[d++];return o}})(st||(st={}));var Tt=class{constructor(e,r,i,n){this._uri=e,this._languageId=r,this._version=i,this._content=n,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let r=this.offsetAt(e.start),i=this.offsetAt(e.end);return this._content.substring(r,i)}return this._content}update(e,r){this._content=e.text,this._version=r,this._lineOffsets=void 0}getLineOffsets(){if(this._lineOffsets===void 0){let e=[],r=this._content,i=!0;for(let n=0;n<r.length;n++){i&&(e.push(n),i=!1);let t=r.charAt(n);i=t==="\r"||t===`
3
+ v5.0.0-next.7 */
4
+ import{Tl as le}from"./WBFIECLB.js";import"./UWKWAKQK.js";var Ot=Object.defineProperty,Nt=Object.getOwnPropertyDescriptor,Rt=Object.getOwnPropertyNames,Mt=Object.prototype.hasOwnProperty,fe=(e,r,i,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let t of Rt(r))!Mt.call(e,t)&&t!==i&&Ot(e,t,{get:()=>r[t],enumerable:!(n=Nt(r,t))||n.enumerable});return e},Dt=(e,r,i)=>(fe(e,r,"default"),i&&fe(i,r,"default")),f={};Dt(f,le);var Ft=2*60*1e3,Ut=class{constructor(e){this._defaults=e,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;Date.now()-this._lastUsedTime>Ft&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=f.editor.createWebWorker({moduleId:"vs/language/json/jsonWorker",label:this._defaults.languageId,createData:{languageSettings:this._defaults.diagnosticsOptions,languageId:this._defaults.languageId,enableSchemaRequest:this._defaults.diagnosticsOptions.enableSchemaRequest}}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...e){let r;return this._getClient().then(i=>{r=i}).then(i=>{if(this._worker)return this._worker.withSyncedResources(e)}).then(i=>r)}},de;(function(e){function r(i){return typeof i=="string"}e.is=r})(de||(de={}));var Q;(function(e){function r(i){return typeof i=="string"}e.is=r})(Q||(Q={}));var ge;(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function r(i){return typeof i=="number"&&e.MIN_VALUE<=i&&i<=e.MAX_VALUE}e.is=r})(ge||(ge={}));var W;(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function r(i){return typeof i=="number"&&e.MIN_VALUE<=i&&i<=e.MAX_VALUE}e.is=r})(W||(W={}));var O;(function(e){function r(n,t){return n===Number.MAX_VALUE&&(n=W.MAX_VALUE),t===Number.MAX_VALUE&&(t=W.MAX_VALUE),{line:n,character:t}}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&a.uinteger(t.line)&&a.uinteger(t.character)}e.is=i})(O||(O={}));var m;(function(e){function r(n,t,o,s){if(a.uinteger(n)&&a.uinteger(t)&&a.uinteger(o)&&a.uinteger(s))return{start:O.create(n,t),end:O.create(o,s)};if(O.is(n)&&O.is(t))return{start:n,end:t};throw new Error(`Range#create called with invalid arguments[${n}, ${t}, ${o}, ${s}]`)}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&O.is(t.start)&&O.is(t.end)}e.is=i})(m||(m={}));var H;(function(e){function r(n,t){return{uri:n,range:t}}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&m.is(t.range)&&(a.string(t.uri)||a.undefined(t.uri))}e.is=i})(H||(H={}));var pe;(function(e){function r(n,t,o,s){return{targetUri:n,targetRange:t,targetSelectionRange:o,originSelectionRange:s}}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&m.is(t.targetRange)&&a.string(t.targetUri)&&m.is(t.targetSelectionRange)&&(m.is(t.originSelectionRange)||a.undefined(t.originSelectionRange))}e.is=i})(pe||(pe={}));var Y;(function(e){function r(n,t,o,s){return{red:n,green:t,blue:o,alpha:s}}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&a.numberRange(t.red,0,1)&&a.numberRange(t.green,0,1)&&a.numberRange(t.blue,0,1)&&a.numberRange(t.alpha,0,1)}e.is=i})(Y||(Y={}));var ve;(function(e){function r(n,t){return{range:n,color:t}}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&m.is(t.range)&&Y.is(t.color)}e.is=i})(ve||(ve={}));var me;(function(e){function r(n,t,o){return{label:n,textEdit:t,additionalTextEdits:o}}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&a.string(t.label)&&(a.undefined(t.textEdit)||T.is(t))&&(a.undefined(t.additionalTextEdits)||a.typedArray(t.additionalTextEdits,T.is))}e.is=i})(me||(me={}));var P;(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(P||(P={}));var he;(function(e){function r(n,t,o,s,u,g){let c={startLine:n,endLine:t};return a.defined(o)&&(c.startCharacter=o),a.defined(s)&&(c.endCharacter=s),a.defined(u)&&(c.kind=u),a.defined(g)&&(c.collapsedText=g),c}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&a.uinteger(t.startLine)&&a.uinteger(t.startLine)&&(a.undefined(t.startCharacter)||a.uinteger(t.startCharacter))&&(a.undefined(t.endCharacter)||a.uinteger(t.endCharacter))&&(a.undefined(t.kind)||a.string(t.kind))}e.is=i})(he||(he={}));var G;(function(e){function r(n,t){return{location:n,message:t}}e.create=r;function i(n){let t=n;return a.defined(t)&&H.is(t.location)&&a.string(t.message)}e.is=i})(G||(G={}));var F;(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(F||(F={}));var _e;(function(e){e.Unnecessary=1,e.Deprecated=2})(_e||(_e={}));var ke;(function(e){function r(i){let n=i;return a.objectLiteral(n)&&a.string(n.href)}e.is=r})(ke||(ke={}));var z;(function(e){function r(n,t,o,s,u,g){let c={range:n,message:t};return a.defined(o)&&(c.severity=o),a.defined(s)&&(c.code=s),a.defined(u)&&(c.source=u),a.defined(g)&&(c.relatedInformation=g),c}e.create=r;function i(n){var t;let o=n;return a.defined(o)&&m.is(o.range)&&a.string(o.message)&&(a.number(o.severity)||a.undefined(o.severity))&&(a.integer(o.code)||a.string(o.code)||a.undefined(o.code))&&(a.undefined(o.codeDescription)||a.string((t=o.codeDescription)===null||t===void 0?void 0:t.href))&&(a.string(o.source)||a.undefined(o.source))&&(a.undefined(o.relatedInformation)||a.typedArray(o.relatedInformation,G.is))}e.is=i})(z||(z={}));var U;(function(e){function r(n,t,...o){let s={title:n,command:t};return a.defined(o)&&o.length>0&&(s.arguments=o),s}e.create=r;function i(n){let t=n;return a.defined(t)&&a.string(t.title)&&a.string(t.command)}e.is=i})(U||(U={}));var T;(function(e){function r(o,s){return{range:o,newText:s}}e.replace=r;function i(o,s){return{range:{start:o,end:o},newText:s}}e.insert=i;function n(o){return{range:o,newText:""}}e.del=n;function t(o){let s=o;return a.objectLiteral(s)&&a.string(s.newText)&&m.is(s.range)}e.is=t})(T||(T={}));var Z;(function(e){function r(n,t,o){let s={label:n};return t!==void 0&&(s.needsConfirmation=t),o!==void 0&&(s.description=o),s}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&a.string(t.label)&&(a.boolean(t.needsConfirmation)||t.needsConfirmation===void 0)&&(a.string(t.description)||t.description===void 0)}e.is=i})(Z||(Z={}));var j;(function(e){function r(i){let n=i;return a.string(n)}e.is=r})(j||(j={}));var be;(function(e){function r(o,s,u){return{range:o,newText:s,annotationId:u}}e.replace=r;function i(o,s,u){return{range:{start:o,end:o},newText:s,annotationId:u}}e.insert=i;function n(o,s){return{range:o,newText:"",annotationId:s}}e.del=n;function t(o){let s=o;return T.is(s)&&(Z.is(s.annotationId)||j.is(s.annotationId))}e.is=t})(be||(be={}));var K;(function(e){function r(n,t){return{textDocument:n,edits:t}}e.create=r;function i(n){let t=n;return a.defined(t)&&re.is(t.textDocument)&&Array.isArray(t.edits)}e.is=i})(K||(K={}));var C;(function(e){function r(n,t,o){let s={kind:"create",uri:n};return t!==void 0&&(t.overwrite!==void 0||t.ignoreIfExists!==void 0)&&(s.options=t),o!==void 0&&(s.annotationId=o),s}e.create=r;function i(n){let t=n;return t&&t.kind==="create"&&a.string(t.uri)&&(t.options===void 0||(t.options.overwrite===void 0||a.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||a.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||j.is(t.annotationId))}e.is=i})(C||(C={}));var ee;(function(e){function r(n,t,o,s){let u={kind:"rename",oldUri:n,newUri:t};return o!==void 0&&(o.overwrite!==void 0||o.ignoreIfExists!==void 0)&&(u.options=o),s!==void 0&&(u.annotationId=s),u}e.create=r;function i(n){let t=n;return t&&t.kind==="rename"&&a.string(t.oldUri)&&a.string(t.newUri)&&(t.options===void 0||(t.options.overwrite===void 0||a.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||a.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||j.is(t.annotationId))}e.is=i})(ee||(ee={}));var te;(function(e){function r(n,t,o){let s={kind:"delete",uri:n};return t!==void 0&&(t.recursive!==void 0||t.ignoreIfNotExists!==void 0)&&(s.options=t),o!==void 0&&(s.annotationId=o),s}e.create=r;function i(n){let t=n;return t&&t.kind==="delete"&&a.string(t.uri)&&(t.options===void 0||(t.options.recursive===void 0||a.boolean(t.options.recursive))&&(t.options.ignoreIfNotExists===void 0||a.boolean(t.options.ignoreIfNotExists)))&&(t.annotationId===void 0||j.is(t.annotationId))}e.is=i})(te||(te={}));var ne;(function(e){function r(i){let n=i;return n&&(n.changes!==void 0||n.documentChanges!==void 0)&&(n.documentChanges===void 0||n.documentChanges.every(t=>a.string(t.kind)?C.is(t)||ee.is(t)||te.is(t):K.is(t)))}e.is=r})(ne||(ne={}));var we;(function(e){function r(n){return{uri:n}}e.create=r;function i(n){let t=n;return a.defined(t)&&a.string(t.uri)}e.is=i})(we||(we={}));var Ae;(function(e){function r(n,t){return{uri:n,version:t}}e.create=r;function i(n){let t=n;return a.defined(t)&&a.string(t.uri)&&a.integer(t.version)}e.is=i})(Ae||(Ae={}));var re;(function(e){function r(n,t){return{uri:n,version:t}}e.create=r;function i(n){let t=n;return a.defined(t)&&a.string(t.uri)&&(t.version===null||a.integer(t.version))}e.is=i})(re||(re={}));var Ie;(function(e){function r(n,t,o,s){return{uri:n,languageId:t,version:o,text:s}}e.create=r;function i(n){let t=n;return a.defined(t)&&a.string(t.uri)&&a.string(t.languageId)&&a.integer(t.version)&&a.string(t.text)}e.is=i})(Ie||(Ie={}));var ie;(function(e){e.PlainText="plaintext",e.Markdown="markdown";function r(i){let n=i;return n===e.PlainText||n===e.Markdown}e.is=r})(ie||(ie={}));var V;(function(e){function r(i){let n=i;return a.objectLiteral(i)&&ie.is(n.kind)&&a.string(n.value)}e.is=r})(V||(V={}));var h;(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(h||(h={}));var oe;(function(e){e.PlainText=1,e.Snippet=2})(oe||(oe={}));var Ee;(function(e){e.Deprecated=1})(Ee||(Ee={}));var Le;(function(e){function r(n,t,o){return{newText:n,insert:t,replace:o}}e.create=r;function i(n){let t=n;return t&&a.string(t.newText)&&m.is(t.insert)&&m.is(t.replace)}e.is=i})(Le||(Le={}));var Oe;(function(e){e.asIs=1,e.adjustIndentation=2})(Oe||(Oe={}));var Ne;(function(e){function r(i){let n=i;return n&&(a.string(n.detail)||n.detail===void 0)&&(a.string(n.description)||n.description===void 0)}e.is=r})(Ne||(Ne={}));var Re;(function(e){function r(i){return{label:i}}e.create=r})(Re||(Re={}));var Me;(function(e){function r(i,n){return{items:i||[],isIncomplete:!!n}}e.create=r})(Me||(Me={}));var X;(function(e){function r(n){return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=r;function i(n){let t=n;return a.string(t)||a.objectLiteral(t)&&a.string(t.language)&&a.string(t.value)}e.is=i})(X||(X={}));var De;(function(e){function r(i){let n=i;return!!n&&a.objectLiteral(n)&&(V.is(n.contents)||X.is(n.contents)||a.typedArray(n.contents,X.is))&&(i.range===void 0||m.is(i.range))}e.is=r})(De||(De={}));var Fe;(function(e){function r(i,n){return n?{label:i,documentation:n}:{label:i}}e.create=r})(Fe||(Fe={}));var Ue;(function(e){function r(i,n,...t){let o={label:i};return a.defined(n)&&(o.documentation=n),a.defined(t)?o.parameters=t:o.parameters=[],o}e.create=r})(Ue||(Ue={}));var S;(function(e){e.Text=1,e.Read=2,e.Write=3})(S||(S={}));var Te;(function(e){function r(i,n){let t={range:i};return a.number(n)&&(t.kind=n),t}e.create=r})(Te||(Te={}));var _;(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(_||(_={}));var je;(function(e){e.Deprecated=1})(je||(je={}));var xe;(function(e){function r(i,n,t,o,s){let u={name:i,kind:n,location:{uri:o,range:t}};return s&&(u.containerName=s),u}e.create=r})(xe||(xe={}));var ye;(function(e){function r(i,n,t,o){return o!==void 0?{name:i,kind:n,location:{uri:t,range:o}}:{name:i,kind:n,location:{uri:t}}}e.create=r})(ye||(ye={}));var Pe;(function(e){function r(n,t,o,s,u,g){let c={name:n,detail:t,kind:o,range:s,selectionRange:u};return g!==void 0&&(c.children=g),c}e.create=r;function i(n){let t=n;return t&&a.string(t.name)&&a.number(t.kind)&&m.is(t.range)&&m.is(t.selectionRange)&&(t.detail===void 0||a.string(t.detail))&&(t.deprecated===void 0||a.boolean(t.deprecated))&&(t.children===void 0||Array.isArray(t.children))&&(t.tags===void 0||Array.isArray(t.tags))}e.is=i})(Pe||(Pe={}));var Se;(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"})(Se||(Se={}));var q;(function(e){e.Invoked=1,e.Automatic=2})(q||(q={}));var Ve;(function(e){function r(n,t,o){let s={diagnostics:n};return t!=null&&(s.only=t),o!=null&&(s.triggerKind=o),s}e.create=r;function i(n){let t=n;return a.defined(t)&&a.typedArray(t.diagnostics,z.is)&&(t.only===void 0||a.typedArray(t.only,a.string))&&(t.triggerKind===void 0||t.triggerKind===q.Invoked||t.triggerKind===q.Automatic)}e.is=i})(Ve||(Ve={}));var Be;(function(e){function r(n,t,o){let s={title:n},u=!0;return typeof t=="string"?(u=!1,s.kind=t):U.is(t)?s.command=t:s.edit=t,u&&o!==void 0&&(s.kind=o),s}e.create=r;function i(n){let t=n;return t&&a.string(t.title)&&(t.diagnostics===void 0||a.typedArray(t.diagnostics,z.is))&&(t.kind===void 0||a.string(t.kind))&&(t.edit!==void 0||t.command!==void 0)&&(t.command===void 0||U.is(t.command))&&(t.isPreferred===void 0||a.boolean(t.isPreferred))&&(t.edit===void 0||ne.is(t.edit))}e.is=i})(Be||(Be={}));var We;(function(e){function r(n,t){let o={range:n};return a.defined(t)&&(o.data=t),o}e.create=r;function i(n){let t=n;return a.defined(t)&&m.is(t.range)&&(a.undefined(t.command)||U.is(t.command))}e.is=i})(We||(We={}));var He;(function(e){function r(n,t){return{tabSize:n,insertSpaces:t}}e.create=r;function i(n){let t=n;return a.defined(t)&&a.uinteger(t.tabSize)&&a.boolean(t.insertSpaces)}e.is=i})(He||(He={}));var ze;(function(e){function r(n,t,o){return{range:n,target:t,data:o}}e.create=r;function i(n){let t=n;return a.defined(t)&&m.is(t.range)&&(a.undefined(t.target)||a.string(t.target))}e.is=i})(ze||(ze={}));var Xe;(function(e){function r(n,t){return{range:n,parent:t}}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&m.is(t.range)&&(t.parent===void 0||e.is(t.parent))}e.is=i})(Xe||(Xe={}));var qe;(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"})(qe||(qe={}));var Je;(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(Je||(Je={}));var $e;(function(e){function r(i){let n=i;return a.objectLiteral(n)&&(n.resultId===void 0||typeof n.resultId=="string")&&Array.isArray(n.data)&&(n.data.length===0||typeof n.data[0]=="number")}e.is=r})($e||($e={}));var Qe;(function(e){function r(n,t){return{range:n,text:t}}e.create=r;function i(n){let t=n;return t!=null&&m.is(t.range)&&a.string(t.text)}e.is=i})(Qe||(Qe={}));var Ye;(function(e){function r(n,t,o){return{range:n,variableName:t,caseSensitiveLookup:o}}e.create=r;function i(n){let t=n;return t!=null&&m.is(t.range)&&a.boolean(t.caseSensitiveLookup)&&(a.string(t.variableName)||t.variableName===void 0)}e.is=i})(Ye||(Ye={}));var Ge;(function(e){function r(n,t){return{range:n,expression:t}}e.create=r;function i(n){let t=n;return t!=null&&m.is(t.range)&&(a.string(t.expression)||t.expression===void 0)}e.is=i})(Ge||(Ge={}));var Ze;(function(e){function r(n,t){return{frameId:n,stoppedLocation:t}}e.create=r;function i(n){let t=n;return a.defined(t)&&m.is(n.stoppedLocation)}e.is=i})(Ze||(Ze={}));var se;(function(e){e.Type=1,e.Parameter=2;function r(i){return i===1||i===2}e.is=r})(se||(se={}));var ae;(function(e){function r(n){return{value:n}}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&(t.tooltip===void 0||a.string(t.tooltip)||V.is(t.tooltip))&&(t.location===void 0||H.is(t.location))&&(t.command===void 0||U.is(t.command))}e.is=i})(ae||(ae={}));var Ke;(function(e){function r(n,t,o){let s={position:n,label:t};return o!==void 0&&(s.kind=o),s}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&O.is(t.position)&&(a.string(t.label)||a.typedArray(t.label,ae.is))&&(t.kind===void 0||se.is(t.kind))&&t.textEdits===void 0||a.typedArray(t.textEdits,T.is)&&(t.tooltip===void 0||a.string(t.tooltip)||V.is(t.tooltip))&&(t.paddingLeft===void 0||a.boolean(t.paddingLeft))&&(t.paddingRight===void 0||a.boolean(t.paddingRight))}e.is=i})(Ke||(Ke={}));var Ce;(function(e){function r(i){return{kind:"snippet",value:i}}e.createSnippet=r})(Ce||(Ce={}));var et;(function(e){function r(i,n,t,o){return{insertText:i,filterText:n,range:t,command:o}}e.create=r})(et||(et={}));var tt;(function(e){function r(i){return{items:i}}e.create=r})(tt||(tt={}));var nt;(function(e){e.Invoked=0,e.Automatic=1})(nt||(nt={}));var rt;(function(e){function r(i,n){return{range:i,text:n}}e.create=r})(rt||(rt={}));var it;(function(e){function r(i,n){return{triggerKind:i,selectedCompletionInfo:n}}e.create=r})(it||(it={}));var ot;(function(e){function r(i){let n=i;return a.objectLiteral(n)&&Q.is(n.uri)&&a.string(n.name)}e.is=r})(ot||(ot={}));var st;(function(e){function r(o,s,u,g){return new Tt(o,s,u,g)}e.create=r;function i(o){let s=o;return!!(a.defined(s)&&a.string(s.uri)&&(a.undefined(s.languageId)||a.string(s.languageId))&&a.uinteger(s.lineCount)&&a.func(s.getText)&&a.func(s.positionAt)&&a.func(s.offsetAt))}e.is=i;function n(o,s){let u=o.getText(),g=t(s,(v,d)=>{let k=v.range.start.line-d.range.start.line;return k===0?v.range.start.character-d.range.start.character:k}),c=u.length;for(let v=g.length-1;v>=0;v--){let d=g[v],k=o.offsetAt(d.range.start),p=o.offsetAt(d.range.end);if(p<=c)u=u.substring(0,k)+d.newText+u.substring(p,u.length);else throw new Error("Overlapping edit");c=k}return u}e.applyEdits=n;function t(o,s){if(o.length<=1)return o;let u=o.length/2|0,g=o.slice(0,u),c=o.slice(u);t(g,s),t(c,s);let v=0,d=0,k=0;for(;v<g.length&&d<c.length;)s(g[v],c[d])<=0?o[k++]=g[v++]:o[k++]=c[d++];for(;v<g.length;)o[k++]=g[v++];for(;d<c.length;)o[k++]=c[d++];return o}})(st||(st={}));var Tt=class{constructor(e,r,i,n){this._uri=e,this._languageId=r,this._version=i,this._content=n,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let r=this.offsetAt(e.start),i=this.offsetAt(e.end);return this._content.substring(r,i)}return this._content}update(e,r){this._content=e.text,this._version=r,this._lineOffsets=void 0}getLineOffsets(){if(this._lineOffsets===void 0){let e=[],r=this._content,i=!0;for(let n=0;n<r.length;n++){i&&(e.push(n),i=!1);let t=r.charAt(n);i=t==="\r"||t===`
5
5
  `,t==="\r"&&n+1<r.length&&r.charAt(n+1)===`
6
6
  `&&n++}i&&r.length>0&&e.push(r.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let r=this.getLineOffsets(),i=0,n=r.length;if(n===0)return O.create(0,e);for(;i<n;){let o=Math.floor((i+n)/2);r[o]>e?n=o:i=o+1}let t=i-1;return O.create(t,e-r[t])}offsetAt(e){let r=this.getLineOffsets();if(e.line>=r.length)return this._content.length;if(e.line<0)return 0;let i=r[e.line],n=e.line+1<r.length?r[e.line+1]:this._content.length;return Math.max(Math.min(i+e.character,n),i)}get lineCount(){return this.getLineOffsets().length}},a;(function(e){let r=Object.prototype.toString;function i(p){return typeof p<"u"}e.defined=i;function n(p){return typeof p>"u"}e.undefined=n;function t(p){return p===!0||p===!1}e.boolean=t;function o(p){return r.call(p)==="[object String]"}e.string=o;function s(p){return r.call(p)==="[object Number]"}e.number=s;function u(p,N,J){return r.call(p)==="[object Number]"&&N<=p&&p<=J}e.numberRange=u;function g(p){return r.call(p)==="[object Number]"&&-2147483648<=p&&p<=2147483647}e.integer=g;function c(p){return r.call(p)==="[object Number]"&&0<=p&&p<=2147483647}e.uinteger=c;function v(p){return r.call(p)==="[object Function]"}e.func=v;function d(p){return p!==null&&typeof p=="object"}e.objectLiteral=d;function k(p,N){return Array.isArray(p)&&p.every(N)}e.typedArray=k})(a||(a={}));var jt=class{constructor(e,r,i){this._languageId=e,this._worker=r,this._disposables=[],this._listener=Object.create(null);let n=o=>{let s=o.getLanguageId();if(s!==this._languageId)return;let u;this._listener[o.uri.toString()]=o.onDidChangeContent(()=>{window.clearTimeout(u),u=window.setTimeout(()=>this._doValidate(o.uri,s),500)}),this._doValidate(o.uri,s)},t=o=>{f.editor.setModelMarkers(o,this._languageId,[]);let s=o.uri.toString(),u=this._listener[s];u&&(u.dispose(),delete this._listener[s])};this._disposables.push(f.editor.onDidCreateModel(n)),this._disposables.push(f.editor.onWillDisposeModel(t)),this._disposables.push(f.editor.onDidChangeModelLanguage(o=>{t(o.model),n(o.model)})),this._disposables.push(i(o=>{f.editor.getModels().forEach(s=>{s.getLanguageId()===this._languageId&&(t(s),n(s))})})),this._disposables.push({dispose:()=>{f.editor.getModels().forEach(t);for(let o in this._listener)this._listener[o].dispose()}}),f.editor.getModels().forEach(n)}dispose(){this._disposables.forEach(e=>e&&e.dispose()),this._disposables.length=0}_doValidate(e,r){this._worker(e).then(i=>i.doValidation(e.toString())).then(i=>{let n=i.map(o=>yt(e,o)),t=f.editor.getModel(e);t&&t.getLanguageId()===r&&f.editor.setModelMarkers(t,r,n)}).then(void 0,i=>{console.error(i)})}};function xt(e){switch(e){case F.Error:return f.MarkerSeverity.Error;case F.Warning:return f.MarkerSeverity.Warning;case F.Information:return f.MarkerSeverity.Info;case F.Hint:return f.MarkerSeverity.Hint;default:return f.MarkerSeverity.Info}}function yt(e,r){let i=typeof r.code=="number"?String(r.code):r.code;return{severity:xt(r.severity),startLineNumber:r.range.start.line+1,startColumn:r.range.start.character+1,endLineNumber:r.range.end.line+1,endColumn:r.range.end.character+1,message:r.message,code:i,source:r.source}}var Pt=class{constructor(e,r){this._worker=e,this._triggerCharacters=r}get triggerCharacters(){return this._triggerCharacters}provideCompletionItems(e,r,i,n){let t=e.uri;return this._worker(t).then(o=>o.doComplete(t.toString(),R(r))).then(o=>{if(!o)return;let s=e.getWordUntilPosition(r),u=new f.Range(r.lineNumber,s.startColumn,r.lineNumber,s.endColumn),g=o.items.map(c=>{let v={label:c.label,insertText:c.insertText||c.label,sortText:c.sortText,filterText:c.filterText,documentation:c.documentation,detail:c.detail,command:Bt(c.command),range:u,kind:Vt(c.kind)};return c.textEdit&&(St(c.textEdit)?v.range={insert:w(c.textEdit.insert),replace:w(c.textEdit.replace)}:v.range=w(c.textEdit.range),v.insertText=c.textEdit.newText),c.additionalTextEdits&&(v.additionalTextEdits=c.additionalTextEdits.map(B)),c.insertTextFormat===oe.Snippet&&(v.insertTextRules=f.languages.CompletionItemInsertTextRule.InsertAsSnippet),v});return{isIncomplete:o.isIncomplete,suggestions:g}})}};function R(e){if(e)return{character:e.column-1,line:e.lineNumber-1}}function mt(e){if(e)return{start:{line:e.startLineNumber-1,character:e.startColumn-1},end:{line:e.endLineNumber-1,character:e.endColumn-1}}}function w(e){if(e)return new f.Range(e.start.line+1,e.start.character+1,e.end.line+1,e.end.character+1)}function St(e){return typeof e.insert<"u"&&typeof e.replace<"u"}function Vt(e){let r=f.languages.CompletionItemKind;switch(e){case h.Text:return r.Text;case h.Method:return r.Method;case h.Function:return r.Function;case h.Constructor:return r.Constructor;case h.Field:return r.Field;case h.Variable:return r.Variable;case h.Class:return r.Class;case h.Interface:return r.Interface;case h.Module:return r.Module;case h.Property:return r.Property;case h.Unit:return r.Unit;case h.Value:return r.Value;case h.Enum:return r.Enum;case h.Keyword:return r.Keyword;case h.Snippet:return r.Snippet;case h.Color:return r.Color;case h.File:return r.File;case h.Reference:return r.Reference}return r.Property}function B(e){if(e)return{range:w(e.range),text:e.newText}}function Bt(e){return e&&e.command==="editor.action.triggerSuggest"?{id:e.command,title:e.title,arguments:e.arguments}:void 0}var Wt=class{constructor(e){this._worker=e}provideHover(e,r,i){let n=e.uri;return this._worker(n).then(t=>t.doHover(n.toString(),R(r))).then(t=>{if(t)return{range:w(t.range),contents:zt(t.contents)}})}};function Ht(e){return e&&typeof e=="object"&&typeof e.kind=="string"}function at(e){return typeof e=="string"?{value:e}:Ht(e)?e.kind==="plaintext"?{value:e.value.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}:{value:e.value}:{value:"```"+e.language+`
7
7
  `+e.value+"\n```\n"}}function zt(e){if(e)return Array.isArray(e)?e.map(at):[at(e)]}var mn=class{constructor(e){this._worker=e}provideDocumentHighlights(e,r,i){let n=e.uri;return this._worker(n).then(t=>t.findDocumentHighlights(n.toString(),R(r))).then(t=>{if(t)return t.map(o=>({range:w(o.range),kind:Xt(o.kind)}))})}};function Xt(e){switch(e){case S.Read:return f.languages.DocumentHighlightKind.Read;case S.Write:return f.languages.DocumentHighlightKind.Write;case S.Text:return f.languages.DocumentHighlightKind.Text}return f.languages.DocumentHighlightKind.Text}var hn=class{constructor(e){this._worker=e}provideDefinition(e,r,i){let n=e.uri;return this._worker(n).then(t=>t.findDefinition(n.toString(),R(r))).then(t=>{if(t)return[ht(t)]})}};function ht(e){return{uri:f.Uri.parse(e.uri),range:w(e.range)}}var _n=class{constructor(e){this._worker=e}provideReferences(e,r,i,n){let t=e.uri;return this._worker(t).then(o=>o.findReferences(t.toString(),R(r))).then(o=>{if(o)return o.map(ht)})}},kn=class{constructor(e){this._worker=e}provideRenameEdits(e,r,i,n){let t=e.uri;return this._worker(t).then(o=>o.doRename(t.toString(),R(r),i)).then(o=>qt(o))}};function qt(e){if(!e||!e.changes)return;let r=[];for(let i in e.changes){let n=f.Uri.parse(i);for(let t of e.changes[i])r.push({resource:n,versionId:void 0,textEdit:{range:w(t.range),text:t.newText}})}return{edits:r}}var Jt=class{constructor(e){this._worker=e}provideDocumentSymbols(e,r){let i=e.uri;return this._worker(i).then(n=>n.findDocumentSymbols(i.toString())).then(n=>{if(n)return n.map(t=>$t(t)?_t(t):{name:t.name,detail:"",containerName:t.containerName,kind:kt(t.kind),range:w(t.location.range),selectionRange:w(t.location.range),tags:[]})})}};function $t(e){return"children"in e}function _t(e){return{name:e.name,detail:e.detail??"",kind:kt(e.kind),range:w(e.range),selectionRange:w(e.selectionRange),tags:e.tags??[],children:(e.children??[]).map(r=>_t(r))}}function kt(e){let r=f.languages.SymbolKind;switch(e){case _.File:return r.File;case _.Module:return r.Module;case _.Namespace:return r.Namespace;case _.Package:return r.Package;case _.Class:return r.Class;case _.Method:return r.Method;case _.Property:return r.Property;case _.Field:return r.Field;case _.Constructor:return r.Constructor;case _.Enum:return r.Enum;case _.Interface:return r.Interface;case _.Function:return r.Function;case _.Variable:return r.Variable;case _.Constant:return r.Constant;case _.String:return r.String;case _.Number:return r.Number;case _.Boolean:return r.Boolean;case _.Array:return r.Array}return r.Function}var bn=class{constructor(e){this._worker=e}provideLinks(e,r){let i=e.uri;return this._worker(i).then(n=>n.findDocumentLinks(i.toString())).then(n=>{if(n)return{links:n.map(t=>({range:w(t.range),url:t.target}))}})}},Qt=class{constructor(e){this._worker=e}provideDocumentFormattingEdits(e,r,i){let n=e.uri;return this._worker(n).then(t=>t.format(n.toString(),null,bt(r)).then(o=>{if(!(!o||o.length===0))return o.map(B)}))}},Yt=class{constructor(e){this._worker=e,this.canFormatMultipleRanges=!1}provideDocumentRangeFormattingEdits(e,r,i,n){let t=e.uri;return this._worker(t).then(o=>o.format(t.toString(),mt(r),bt(i)).then(s=>{if(!(!s||s.length===0))return s.map(B)}))}};function bt(e){return{tabSize:e.tabSize,insertSpaces:e.insertSpaces}}var Gt=class{constructor(e){this._worker=e}provideDocumentColors(e,r){let i=e.uri;return this._worker(i).then(n=>n.findDocumentColors(i.toString())).then(n=>{if(n)return n.map(t=>({color:t.color,range:w(t.range)}))})}provideColorPresentations(e,r,i){let n=e.uri;return this._worker(n).then(t=>t.getColorPresentations(n.toString(),r.color,mt(r.range))).then(t=>{if(t)return t.map(o=>{let s={label:o.label};return o.textEdit&&(s.textEdit=B(o.textEdit)),o.additionalTextEdits&&(s.additionalTextEdits=o.additionalTextEdits.map(B)),s})})}},Zt=class{constructor(e){this._worker=e}provideFoldingRanges(e,r,i){let n=e.uri;return this._worker(n).then(t=>t.getFoldingRanges(n.toString(),r)).then(t=>{if(t)return t.map(o=>{let s={start:o.startLine+1,end:o.endLine+1};return typeof o.kind<"u"&&(s.kind=Kt(o.kind)),s})})}};function Kt(e){switch(e){case P.Comment:return f.languages.FoldingRangeKind.Comment;case P.Imports:return f.languages.FoldingRangeKind.Imports;case P.Region:return f.languages.FoldingRangeKind.Region}}var Ct=class{constructor(e){this._worker=e}provideSelectionRanges(e,r,i){let n=e.uri;return this._worker(n).then(t=>t.getSelectionRanges(n.toString(),r.map(R))).then(t=>{if(t)return t.map(o=>{let s=[];for(;o;)s.push({range:w(o.range)}),o=o.parent;return s})})}};function en(e,r=!1){let i=e.length,n=0,t="",o=0,s=16,u=0,g=0,c=0,v=0,d=0;function k(l,A){let L=0,I=0;for(;L<l||!A;){let b=e.charCodeAt(n);if(b>=48&&b<=57)I=I*16+b-48;else if(b>=65&&b<=70)I=I*16+b-65+10;else if(b>=97&&b<=102)I=I*16+b-97+10;else break;n++,L++}return L<l&&(I=-1),I}function p(l){n=l,t="",o=0,s=16,d=0}function N(){let l=n;if(e.charCodeAt(n)===48)n++;else for(n++;n<e.length&&M(e.charCodeAt(n));)n++;if(n<e.length&&e.charCodeAt(n)===46)if(n++,n<e.length&&M(e.charCodeAt(n)))for(n++;n<e.length&&M(e.charCodeAt(n));)n++;else return d=3,e.substring(l,n);let A=n;if(n<e.length&&(e.charCodeAt(n)===69||e.charCodeAt(n)===101))if(n++,(n<e.length&&e.charCodeAt(n)===43||e.charCodeAt(n)===45)&&n++,n<e.length&&M(e.charCodeAt(n))){for(n++;n<e.length&&M(e.charCodeAt(n));)n++;A=n}else d=3;return e.substring(l,A)}function J(){let l="",A=n;for(;;){if(n>=i){l+=e.substring(A,n),d=2;break}let L=e.charCodeAt(n);if(L===34){l+=e.substring(A,n),n++;break}if(L===92){if(l+=e.substring(A,n),n++,n>=i){d=2;break}switch(e.charCodeAt(n++)){case 34:l+='"';break;case 92:l+="\\";break;case 47:l+="/";break;case 98:l+="\b";break;case 102:l+="\f";break;case 110:l+=`