@arcgis/coding-components 4.34.0-next.56 → 4.34.0-next.57
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.
- package/dist/addons.js +1 -1
- package/dist/cdn/{GVBEOAQQ.js → 2FFUAYOE.js} +2 -2
- package/dist/cdn/{YHL3DT53.js → 2OW3QJWO.js} +1 -1
- package/dist/cdn/{XDYZCM6D.js → 2VI6KWLU.js} +2 -2
- package/dist/cdn/{WP5B76HU.js → 3UTLGC5G.js} +2 -2
- package/dist/cdn/{6PY55D3E.js → 5UJ52X7V.js} +2 -2
- package/dist/cdn/{SFWZYHSE.js → 63ORHLZV.js} +2 -2
- package/dist/cdn/{Y7BFDERM.js → 6U4SLBR3.js} +2 -2
- package/dist/cdn/{ADGMGBC4.js → 7IX3GATD.js} +2 -2
- package/dist/cdn/{J3X3R2VF.js → 7MEBOULU.js} +2 -2
- package/dist/cdn/{5RYLFN4V.js → ABMWHQXD.js} +2 -2
- package/dist/cdn/{AH4XN6PY.js → B5RLJU6K.js} +1 -1
- package/dist/cdn/{MVREYNGY.js → BNXYZILQ.js} +2 -2
- package/dist/cdn/{TWDRAHUR.js → CJ74V3ER.js} +1 -1
- package/dist/cdn/{JQ5Y4TZV.js → EGH2BE6W.js} +2 -2
- package/dist/cdn/{6Z5TI3E2.js → EIUGHEWE.js} +2 -2
- package/dist/cdn/{K4ZFLTTM.js → FREXNYRU.js} +2 -2
- package/dist/cdn/{3DAC73ZA.js → H35XNJA2.js} +2 -2
- package/dist/cdn/{U3DWXUCK.js → H56NA6DU.js} +2 -2
- package/dist/cdn/{IC2YZJ2V.js → HAY7HSRS.js} +1 -1
- package/dist/cdn/{SBZXHAUD.js → HEB35GVT.js} +2 -2
- package/dist/cdn/{WKN3GX5L.js → HF7NB6GM.js} +2 -2
- package/dist/cdn/{UYXB5YXV.js → IVC4TD5I.js} +2 -2
- package/dist/cdn/{UVI42ELZ.js → JHBR7EEQ.js} +2 -2
- package/dist/cdn/{3Z3BHWPU.js → JUNWE4PR.js} +2 -2
- package/dist/cdn/{DBMA3XRC.js → JVYFOI5M.js} +2 -2
- package/dist/cdn/{AKONDONK.js → JXQUTGMY.js} +2 -2
- package/dist/cdn/{TSJID5XP.js → JY66YHOV.js} +2 -2
- package/dist/cdn/{2IQJDVTD.js → LTXRIJM6.js} +2 -2
- package/dist/cdn/{6XCCKMD6.js → MI353Z4R.js} +2 -2
- package/dist/cdn/{3AHD2VNA.js → OBGIDV2N.js} +1 -1
- package/dist/cdn/{NKY4BZAZ.js → OEXR2YLO.js} +4 -4
- package/dist/cdn/{7G4QAGSR.js → OVMHNCCS.js} +2 -2
- package/dist/cdn/{75WGCDW3.js → OZDMEYIG.js} +2 -2
- package/dist/cdn/{C3TLU4RN.js → Q6CYBEAJ.js} +2 -2
- package/dist/cdn/{DQUKQ7GU.js → SIBRSU65.js} +2 -2
- package/dist/cdn/{H4YHZ5BO.js → TNY22I7M.js} +2 -2
- package/dist/cdn/{QMJKAFAP.js → UPI36Z6C.js} +2 -2
- package/dist/cdn/{WDWWYBNM.js → V3HOKPHC.js} +2 -2
- package/dist/cdn/{FMD6XRAF.js → XLNARFY5.js} +2 -2
- package/dist/cdn/{TC7QY47I.js → Z2SLMKP6.js} +2 -2
- package/dist/cdn/{BLPGXJ33.js → Z7YV4BV6.js} +1 -1
- package/dist/cdn/{KTT6TQTW.js → ZXWXU4A7.js} +2 -2
- package/dist/cdn/assets/code-editor/sql-expr.worker.js +53301 -53475
- package/dist/cdn/index.js +2 -2
- package/dist/chunks/arcade-defaults.js +1 -1
- package/dist/chunks/arcade-executor.js +1 -1
- package/dist/chunks/arcade-mode.js +1 -1
- package/dist/chunks/arcade-service-accessors.js +1 -1
- package/dist/chunks/editor.js +1 -1
- package/dist/chunks/fields.js +1 -1
- package/dist/chunks/language-defaults-base.js +1 -1
- package/dist/chunks/markdown.js +1 -1
- package/dist/chunks/monaco-importer.js +1 -1
- package/dist/chunks/runtime.js +1 -1
- package/dist/chunks/setup-monaco.js +1 -1
- package/dist/chunks/sql-expr-contribution.js +1 -1
- package/dist/chunks/sql-expr-defaults.js +1 -1
- package/dist/chunks/sql-expr-mode.js +1 -1
- package/dist/chunks/useT9n.js +1 -1
- package/dist/components/arcgis-arcade-coding-assistant/customElement.js +1 -1
- package/dist/components/arcgis-arcade-editor/customElement.js +1 -1
- package/dist/components/arcgis-arcade-results/customElement.js +1 -1
- package/dist/components/arcgis-arcade-suggestions/customElement.js +1 -1
- package/dist/components/arcgis-code-editor/customElement.js +1 -1
- package/dist/components/arcgis-editor-variables/customElement.js +1 -1
- package/dist/components/arcgis-language-api-panel/customElement.js +1 -1
- package/dist/components/arcgis-sql-expression-editor/customElement.js +1 -1
- package/dist/components/arcgis-sql-expression-fields/customElement.js +1 -1
- package/dist/docs/api.json +2 -2
- package/dist/docs/docs.json +2 -2
- package/dist/docs/web-types.json +1 -1
- package/dist/index.js +1 -1
- package/dist/loader.js +1 -1
- package/package.json +6 -6
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
3
|
-
v4.34.0-next.
|
|
4
|
-
import j from"./TWDRAHUR.js";import{a as S}from"./6XCCKMD6.js";import{a as A}from"./6PY55D3E.js";import i from"./5RYLFN4V.js";import e from"./AH4XN6PY.js";import{a as b,b as f}from"./J3X3R2VF.js";import{a as P}from"./7G4QAGSR.js";import"./DQUKQ7GU.js";import d from"./DBMA3XRC.js";import"./BLPGXJ33.js";import"./NKY4BZAZ.js";import"./MVREYNGY.js";import{C as m,D as x,g,h as t,j as r,l as c,n as u,y as _,z as a}from"./WP5B76HU.js";import{a as h,h as p}from"./3AHD2VNA.js";import{Hl as $,kk as C}from"./UVI42ELZ.js";import"./IC2YZJ2V.js";export default $arcgis.t(([,{a:v,h:l},s,E])=>{C();var R=g`@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}}}`,d=class extends _{constructor(){super(...arguments),this._codeEditorElt=b(),this._componentReadyDefer=new h,this._disposables=[],this._editorProfilePromise=Promise.resolve(void 0),this.messages=P(),this._modelId=p(),this._openArcadeHelp=()=>void window.open(v,"Arcade Help"),this._toggleSidePanel=e=>{if(!e.target)return;let i=e.target?.dataset.panelName??"none";this.openedSidePanel=i===this.openedSidePanel?"none":i,this.openedSidePanel==="none"&&this._codeEditorElt.value?.setFocus().catch(console.error)},this._consoleLogs=[],this._executingScript=!1,this._preparingArcade=!1,this._resultPanel="output",this._showExecutionPanel=!1,this.hideDocumentationActions=!1,this.hideSideBar=!1,this.openedSidePanel="none",this.script="",this.sideActionBarExpanded=!1,this.arcgisDiagnosticsChange=c({bubbles:!1}),this.arcgisScriptChange=c({bubbles:!1})}static{this.properties={_apiLibrary:16,_consoleLogs:16,_editorProfile:16,_executingScript:16,_executionResult:16,_preparingArcade:16,_resultPanel:16,_showExecutionPanel:16,editorInstance:32,editorOptions:0,hideDocumentationActions:5,hideSideBar:5,openedSidePanel:2,profile:0,script:1,sideActionBarExpanded:7,snippets:0,suggestions:0,testData:0,customPanels:0}}static{this.shadowRootOptions=u}static{this.styles=[R,A]}get editorInstance(){return this._codeEditorElt.value?.editorInstance}async getEditorInstance(){return await this._componentReadyDefer.promise,this._codeEditorElt.value?.editorInstance}async getScript(){return await this._componentReadyDefer.promise,this._codeEditorElt.value?.value}async getTestResult(){if(!this.testData)return{type:"error",value:"Missing test data",error:null};let e=await this._editorProfilePromise;if(!e)return{type:"error",value:"Missing editor profile",error:null};await this._componentReadyDefer.promise;let i=this._codeEditorElt.value?.value;return await l(e.definition,i,this.testData)}async setFocus(){await this._componentReadyDefer.promise,await this._codeEditorElt.value?.setFocus()}async load(){let e=x("./assets");E(e),await this._updateEditorProfile()}willUpdate(e){(e.has("messages")||e.has("profile"))&&this._updateDataModelDeps(),e.has("testData")&&this._testDataChanged(),e.has("snippets")&&s.updateApiContextForModel(this._modelId,{snippets:this.snippets})}async loaded(){this._componentReadyDefer.resolve(),await this._updateApiLibrary();let e=await S();this._disposables.push(e.onDiagnosticsChange(i=>!this._preparingArcade&&this.arcgisDiagnosticsChange.emit(i.diagnostics))),this.testData&&this._addExecuteScriptAction(),await this._codeEditorElt.value?.setFocus()}disconnectedCallback(){for(super.disconnectedCallback();this._disposables.length;)this._disposables.pop()?.dispose()}async _updateDataModelDeps(){await this._updateEditorProfile(),await this._updateApiLibrary()}_testDataChanged(){!this.testData&&this._executeScriptAction&&(this._disposeSafely(this._executeScriptAction),this._executeScriptAction=void 0),this.testData&&!this._executeScriptAction&&this._addExecuteScriptAction(),this._showExecutionPanel&&this._executeScript().catch(console.error)}async _updateEditorProfile(){this._preparingArcade=!0;try{await s.setProfileForModel(this._modelId,this.profile,{locale:this.messages._t9nLocale,snippets:this.snippets}),this._editorProfile=s.getEditorProfileForModel(this._modelId)}catch{this._editorProfile=void 0}finally{this._editorProfilePromise=Promise.resolve(this._editorProfile),this._preparingArcade=!1}}async _updateApiLibrary(){this._apiLibrary=await s.getApiLibraryForModel(this._modelId)}async _executeScript(){let e=this.testData;if(!this._codeEditorElt.value||!e)return;let i=await this._editorProfilePromise;if(!i){this._executionResult={type:"error",value:"Missing editor profile",error:null};return}this._showExecutionPanel=!0,this._executingScript=!0,this._consoleLogs=[],setTimeout(()=>void(async()=>{let o=this._codeEditorElt.value?.value;this._executionResult=await l(i.definition,o,e,n=>setTimeout(()=>this._consoleLogs=[...this._consoleLogs,n],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:[$.F5],contextMenuGroupId:"code",contextMenuOrder:1,run:()=>{this.testData&&this._executeScript().catch(console.error)}});e&&(this._executeScriptAction=e,this._disposables.push(e))}_disposeSafely(e){let i=this._disposables.indexOf(e);i!==-1&&this._disposables.splice(i,1),e.dispose()}renderMainActionBar(){return this.testData?t`<calcite-action-bar class="main-action-bar" layout=horizontal scale=s expanded expand-disabled><calcite-action-group scale=s><calcite-action .text=${this.messages.run??""} text-enabled icon=play scale=s .loading=${this._preparingArcade} @click=${()=>void this._executeScript().catch(console.error)}></calcite-action>${this._executionResult?t`<calcite-action .text=${this.messages.lastresults??""} .active=${this._showExecutionPanel} text-enabled icon=access-string-results icon-flip-rtl scale=s @click=${this._toggleShowExecutionPanel}></calcite-action>`:null}</calcite-action-group></calcite-action-bar>`:null}renderMainPanel(){return t`<arcgis-code-editor class="flex-adjustable" .editorOptions=${this.editorOptions} .language=${s.languageId} .value=${this.script??""} .modelId=${this._modelId} @arcgisValueChange=${this._onCodeEditorValueChange} ${f(this._codeEditorElt)}></arcgis-code-editor>`}renderAction({id:e,label:i,icon:o,active:n,panelName:w,iconFlipRtl:y=!1,onClick:D=this._toggleSidePanel}){return t`<calcite-action id=${e??r} .text=${i} .textEnabled=${this.sideActionBarExpanded} .icon=${o} .active=${n} @click=${D} data-panel-name=${w??r} .iconFlipRtl=${y}></calcite-action>${!this.sideActionBarExpanded&&t`<calcite-tooltip .referenceElement=${e}><span>${i}</span></calcite-tooltip>`||""}`}renderSideActionBar(){return this.hideSideBar?null:t`<calcite-action-bar class="side-action-bar border-inline-start" .expanded=${!!this.sideActionBarExpanded} position=end @calciteActionBarToggle=${this._toggleSideActionBarExpanded}><calcite-action-group>${this.renderAction({id:"profile-variables-action",label:this.messages.profilevariables??"",icon:"profile-variables",active:this.openedSidePanel==="variables",panelName:"variables"})}${this.renderAction({id:"function-action",label:this.messages.constantsandfunctions??"",icon:"function",active:this.openedSidePanel==="api",panelName:"api"})}${this.suggestions?.length?this.renderAction({id:"suggestions-action",label:this.messages.suggestions??"",icon:"lightbulb",active:this.openedSidePanel==="suggestions",panelName:"suggestions"}):null}${this.customPanels?.map(e=>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 t`<arcgis-language-api-panel class=${a(e==="api"&&"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=${a(e==="variables"&&"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&&t`<arcgis-arcade-suggestions class=${a(e==="suggestions"&&"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.customPanels?.map(i=>i?.useFlows?i.renderer?.({closePanel:this._toggleSidePanel,insertText:this._insertText.bind(this),closed:e!==i.id,editorRef:this.el}):t`<calcite-flow class=${a(e===i.id?"side-panel flex-panel border-inline-start":"hidden")}><calcite-flow-item .heading=${i.name} closable @calciteFlowItemClose=${this._toggleSidePanel} .description=${i.description}>${i.renderer?.({closePanel:this._toggleSidePanel,insertText:this._insertText.bind(this),closed:e!==i.id,editorRef:this.el})}</calcite-flow-item></calcite-flow>`)}`}renderResultsPanel(){return this._showExecutionPanel?t`<arcgis-arcade-results class="flex-adjustable" .openedResultPanel=${this._resultPanel} .loading=${this._executingScript} .result=${this._executionResult} .consoleLogs=${this._consoleLogs} @arcgisOpenedResultPanelChange=${this._onResultPanelChange} @arcgisClose=${this._onExecutionPanelClose}></arcgis-arcade-results>`:null}render(){return t`${this.renderMainActionBar()}<div class="flex-row flex-adjustable"><div class="flex-column flex-adjustable">${this.renderMainPanel()}${this.renderResultsPanel()}</div>${this.renderSidePanel()}${this.renderSideActionBar()}</div>`}};m("arcgis-arcade-editor",d);return d},d,e,i,j)
|
|
3
|
+
v4.34.0-next.57 */
|
|
4
|
+
import j from"./CJ74V3ER.js";import{a as S}from"./MI353Z4R.js";import{a as A}from"./5UJ52X7V.js";import i from"./ABMWHQXD.js";import e from"./B5RLJU6K.js";import{a as b,b as f}from"./7MEBOULU.js";import{a as P}from"./OVMHNCCS.js";import"./SIBRSU65.js";import d from"./JVYFOI5M.js";import"./Z7YV4BV6.js";import"./OEXR2YLO.js";import"./BNXYZILQ.js";import{C as m,D as x,g,h as t,j as r,l as c,n as u,y as _,z as a}from"./3UTLGC5G.js";import{a as h,h as p}from"./OBGIDV2N.js";import{Hl as $,kk as C}from"./JHBR7EEQ.js";import"./HAY7HSRS.js";export default $arcgis.t(([,{a:v,h:l},s,E])=>{C();var R=g`@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}}}`,d=class extends _{constructor(){super(...arguments),this._codeEditorElt=b(),this._componentReadyDefer=new h,this._disposables=[],this._editorProfilePromise=Promise.resolve(void 0),this.messages=P(),this._modelId=p(),this._openArcadeHelp=()=>void window.open(v,"Arcade Help"),this._toggleSidePanel=e=>{if(!e.target)return;let i=e.target?.dataset.panelName??"none";this.openedSidePanel=i===this.openedSidePanel?"none":i,this.openedSidePanel==="none"&&this._codeEditorElt.value?.setFocus().catch(console.error)},this._consoleLogs=[],this._executingScript=!1,this._preparingArcade=!1,this._resultPanel="output",this._showExecutionPanel=!1,this.hideDocumentationActions=!1,this.hideSideBar=!1,this.openedSidePanel="none",this.script="",this.sideActionBarExpanded=!1,this.arcgisDiagnosticsChange=c({bubbles:!1}),this.arcgisScriptChange=c({bubbles:!1})}static{this.properties={_apiLibrary:16,_consoleLogs:16,_editorProfile:16,_executingScript:16,_executionResult:16,_preparingArcade:16,_resultPanel:16,_showExecutionPanel:16,editorInstance:32,editorOptions:0,hideDocumentationActions:5,hideSideBar:5,openedSidePanel:2,profile:0,script:1,sideActionBarExpanded:7,snippets:0,suggestions:0,testData:0,customPanels:0}}static{this.shadowRootOptions=u}static{this.styles=[R,A]}get editorInstance(){return this._codeEditorElt.value?.editorInstance}async getEditorInstance(){return await this._componentReadyDefer.promise,this._codeEditorElt.value?.editorInstance}async getScript(){return await this._componentReadyDefer.promise,this._codeEditorElt.value?.value}async getTestResult(){if(!this.testData)return{type:"error",value:"Missing test data",error:null};let e=await this._editorProfilePromise;if(!e)return{type:"error",value:"Missing editor profile",error:null};await this._componentReadyDefer.promise;let i=this._codeEditorElt.value?.value;return await l(e.definition,i,this.testData)}async setFocus(){await this._componentReadyDefer.promise,await this._codeEditorElt.value?.setFocus()}async load(){let e=x("./assets");E(e),await this._updateEditorProfile()}willUpdate(e){(e.has("messages")||e.has("profile"))&&this._updateDataModelDeps(),e.has("testData")&&this._testDataChanged(),e.has("snippets")&&s.updateApiContextForModel(this._modelId,{snippets:this.snippets})}async loaded(){this._componentReadyDefer.resolve(),await this._updateApiLibrary();let e=await S();this._disposables.push(e.onDiagnosticsChange(i=>!this._preparingArcade&&this.arcgisDiagnosticsChange.emit(i.diagnostics))),this.testData&&this._addExecuteScriptAction(),await this._codeEditorElt.value?.setFocus()}disconnectedCallback(){for(super.disconnectedCallback();this._disposables.length;)this._disposables.pop()?.dispose()}async _updateDataModelDeps(){await this._updateEditorProfile(),await this._updateApiLibrary()}_testDataChanged(){!this.testData&&this._executeScriptAction&&(this._disposeSafely(this._executeScriptAction),this._executeScriptAction=void 0),this.testData&&!this._executeScriptAction&&this._addExecuteScriptAction(),this._showExecutionPanel&&this._executeScript().catch(console.error)}async _updateEditorProfile(){this._preparingArcade=!0;try{await s.setProfileForModel(this._modelId,this.profile,{locale:this.messages._t9nLocale,snippets:this.snippets}),this._editorProfile=s.getEditorProfileForModel(this._modelId)}catch{this._editorProfile=void 0}finally{this._editorProfilePromise=Promise.resolve(this._editorProfile),this._preparingArcade=!1}}async _updateApiLibrary(){this._apiLibrary=await s.getApiLibraryForModel(this._modelId)}async _executeScript(){let e=this.testData;if(!this._codeEditorElt.value||!e)return;let i=await this._editorProfilePromise;if(!i){this._executionResult={type:"error",value:"Missing editor profile",error:null};return}this._showExecutionPanel=!0,this._executingScript=!0,this._consoleLogs=[],setTimeout(()=>void(async()=>{let o=this._codeEditorElt.value?.value;this._executionResult=await l(i.definition,o,e,n=>setTimeout(()=>this._consoleLogs=[...this._consoleLogs,n],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:[$.F5],contextMenuGroupId:"code",contextMenuOrder:1,run:()=>{this.testData&&this._executeScript().catch(console.error)}});e&&(this._executeScriptAction=e,this._disposables.push(e))}_disposeSafely(e){let i=this._disposables.indexOf(e);i!==-1&&this._disposables.splice(i,1),e.dispose()}renderMainActionBar(){return this.testData?t`<calcite-action-bar class="main-action-bar" layout=horizontal scale=s expanded expand-disabled><calcite-action-group scale=s><calcite-action .text=${this.messages.run??""} text-enabled icon=play scale=s .loading=${this._preparingArcade} @click=${()=>void this._executeScript().catch(console.error)}></calcite-action>${this._executionResult?t`<calcite-action .text=${this.messages.lastresults??""} .active=${this._showExecutionPanel} text-enabled icon=access-string-results icon-flip-rtl scale=s @click=${this._toggleShowExecutionPanel}></calcite-action>`:null}</calcite-action-group></calcite-action-bar>`:null}renderMainPanel(){return t`<arcgis-code-editor class="flex-adjustable" .editorOptions=${this.editorOptions} .language=${s.languageId} .value=${this.script??""} .modelId=${this._modelId} @arcgisValueChange=${this._onCodeEditorValueChange} ${f(this._codeEditorElt)}></arcgis-code-editor>`}renderAction({id:e,label:i,icon:o,active:n,panelName:w,iconFlipRtl:y=!1,onClick:D=this._toggleSidePanel}){return t`<calcite-action id=${e??r} .text=${i} .textEnabled=${this.sideActionBarExpanded} .icon=${o} .active=${n} @click=${D} data-panel-name=${w??r} .iconFlipRtl=${y}></calcite-action>${!this.sideActionBarExpanded&&t`<calcite-tooltip .referenceElement=${e}><span>${i}</span></calcite-tooltip>`||""}`}renderSideActionBar(){return this.hideSideBar?null:t`<calcite-action-bar class="side-action-bar border-inline-start" .expanded=${!!this.sideActionBarExpanded} position=end @calciteActionBarToggle=${this._toggleSideActionBarExpanded}><calcite-action-group>${this.renderAction({id:"profile-variables-action",label:this.messages.profilevariables??"",icon:"profile-variables",active:this.openedSidePanel==="variables",panelName:"variables"})}${this.renderAction({id:"function-action",label:this.messages.constantsandfunctions??"",icon:"function",active:this.openedSidePanel==="api",panelName:"api"})}${this.suggestions?.length?this.renderAction({id:"suggestions-action",label:this.messages.suggestions??"",icon:"lightbulb",active:this.openedSidePanel==="suggestions",panelName:"suggestions"}):null}${this.customPanels?.map(e=>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 t`<arcgis-language-api-panel class=${a(e==="api"&&"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=${a(e==="variables"&&"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&&t`<arcgis-arcade-suggestions class=${a(e==="suggestions"&&"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.customPanels?.map(i=>i?.useFlows?i.renderer?.({closePanel:this._toggleSidePanel,insertText:this._insertText.bind(this),closed:e!==i.id,editorRef:this.el}):t`<calcite-flow class=${a(e===i.id?"side-panel flex-panel border-inline-start":"hidden")}><calcite-flow-item .heading=${i.name} closable @calciteFlowItemClose=${this._toggleSidePanel} .description=${i.description}>${i.renderer?.({closePanel:this._toggleSidePanel,insertText:this._insertText.bind(this),closed:e!==i.id,editorRef:this.el})}</calcite-flow-item></calcite-flow>`)}`}renderResultsPanel(){return this._showExecutionPanel?t`<arcgis-arcade-results class="flex-adjustable" .openedResultPanel=${this._resultPanel} .loading=${this._executingScript} .result=${this._executionResult} .consoleLogs=${this._consoleLogs} @arcgisOpenedResultPanelChange=${this._onResultPanelChange} @arcgisClose=${this._onExecutionPanelClose}></arcgis-arcade-results>`:null}render(){return t`${this.renderMainActionBar()}<div class="flex-row flex-adjustable"><div class="flex-column flex-adjustable">${this.renderMainPanel()}${this.renderResultsPanel()}</div>${this.renderSidePanel()}${this.renderSideActionBar()}</div>`}};m("arcgis-arcade-editor",d);return d},d,e,i,j)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
3
|
-
v4.34.0-next.
|
|
4
|
-
import{a as q,b as z,c as A,d as h}from"./
|
|
3
|
+
v4.34.0-next.57 */
|
|
4
|
+
import{a as q,b as z,c as A,d as h}from"./Z7YV4BV6.js";import{b as x,c as I,d as P,e as R,h as K,k as B}from"./OEXR2YLO.js";import{D as O}from"./3UTLGC5G.js";import{l as U,p as T,q as k,t as g,u as M}from"./OBGIDV2N.js";import{Gl as $,Pl as V}from"./JHBR7EEQ.js";export default $arcgis.t(([w,ce,ue,he,de])=>{function te(t){return!!t&&typeof t=="object"&&"declaredClass"in t&&typeof t.declaredClass=="string"&&t.declaredClass.startsWith("esri.layers.")&&F(t)&&"queryFeatures"in t&&typeof t.queryFeatures=="function"}function fe(t){return!!t&&typeof t=="object"&&"allLayers"in t&&"allTables"in t&&typeof t.allLayers=="object"&&typeof t.allTables=="object"}function ie(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 ye(t){return!!t&&typeof t=="object"&&"loadAll"in t&&typeof t.loadAll=="function"}function re(t){return!!t&&typeof t=="object"&&"portalItem"in t&&t.portalItem!=null}function se(t){return!!t&&typeof t=="object"&&"portalItem"in t&&t.portalItem!=null}function F(t){return!!t&&typeof t=="object"&&"fields"in t&&Array.isArray(t.fields)}function v(t){return!!t&&typeof t=="object"&&"url"in t&&typeof t.url=="string"}function _e(t){return v(t)&&/\/(?:featureserver|mapserver)(?:\/|$)/iu.test(t.url??"")}function Ue(t){return v(t)||F(t)||se(t)}function ke(t){return v(t)||F(t)||se(t)}function Oe(t){return re(t)||ie(t)||_e(t)}function H(t){return!!t&&typeof t=="object"&&"declaredClass"in t&&t.declaredClass==="esri.layers.support.Subtype"}function L(t){return!!t&&typeof t=="object"&&"declaredClass"in t&&t.declaredClass==="esri.layers.support.CodedValueDomain"}function me(t){return!!t&&typeof t=="object"&&"declaredClass"in t&&t.declaredClass==="esri.layers.support.InheritedDomain"}function Re(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 C(t){return!!t&&typeof t=="object"&&"title"in t&&typeof t.title=="string"}function be(t){return!!t&&typeof t=="object"&&"url"in t&&typeof t.url=="string"}function ne(t){return!!t&&typeof t=="object"&&"layerId"in t&&typeof t.layerId=="number"}function j(t){return!!t&&typeof t=="object"&&"typeIdField"in t&&"types"in t}function X(t){return!!t&&typeof t=="object"&&"getFieldDomain"in t&&typeof t.getFieldDomain=="function"}function d(t){return!!t&&typeof t=="object"&&"subtypeField"in t}function ge(t){return d(t)&&"subtypes"in t}function we(t){return!!t&&typeof t=="object"&&"portalItem"in t}function Ce(t){return ne(t)&&"relationships"in t&&"url"in t&&Array.isArray(t.relationships)&&typeof t.url=="string"}function De(t){return!!t&&typeof t=="object"&&"isTable"in t&&typeof t.isTable=="boolean"}function Se(t){return!!t&&typeof t=="object"&&"load"in t&&typeof t.load=="function"}async function oe(t){if(!t)return null;let e;return F(t)?e=t:e=new w(t),Se(e)&&await e.load(),e}async function Fe(t){t+="/layers";let e=await ce(t,{responseType:"json",query:{f:"json"}}),i=t.endsWith("MapServer/layers")?"data":"query",r=Y(e.data?.layers,i),s=Y(e.data?.tables,i);return{layers:r,tables:s}}function Y(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 ve(t,e){let i=new w({url:`${t.url}/${e.relatedTableId}`});return await i.load(),i}function ae(t){return(e,i)=>{if(e.type==="oid")return-1;if(i.type==="oid")return 1;if(d(t)){if(e.name===t.subtypeField)return-1;if(i.name===t.subtypeField)return 1}if(j(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 Z(t,e){return t?.every(i=>i.domains?.[e.name]?.type==="inherited")??!1}var Te=/^[a-z_$][a-z0-9_$]*$/giu;function le(t,e=!0){return t.match(Te)?`${e?".":""}${t}`:`["${t}"]`}function pe(t,e){return t?`${t}${le(e)}`:e}function J(t){return we(t)?t.portalItem:null}function Ke(t,e,i=!1){let r=e,s=[],o=[];return A(t).forEach(n=>{r&&(r+=`
|
|
5
5
|
|
|
6
6
|
`),r+=`**${n.name}** (${n.alias})
|
|
7
7
|
${n.type}`,n.description&&(r+=`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
3
|
-
v4.34.0-next.
|
|
4
|
-
import"./
|
|
3
|
+
v4.34.0-next.57 */
|
|
4
|
+
import"./HAY7HSRS.js";var e={wordPattern:/(#?-?\d*\.\d\w*%?)|((::|[@#.!:])?[\w-?]+%?)|::|[@#.!:]/g,comments:{blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/"),end:new RegExp("^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/")}}},t={defaultToken:"",tokenPostfix:".css",ws:`[
|
|
5
5
|
\r\f]*`,identifier:"-?-?([a-zA-Z]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))([\\w\\-]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))*",brackets:[{open:"{",close:"}",token:"delimiter.bracket"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],tokenizer:{root:[{include:"@selector"}],selector:[{include:"@comments"},{include:"@import"},{include:"@strings"},["[@](keyframes|-webkit-keyframes|-moz-keyframes|-o-keyframes)",{token:"keyword",next:"@keyframedeclaration"}],["[@](page|content|font-face|-moz-document)",{token:"keyword"}],["[@](charset|namespace)",{token:"keyword",next:"@declarationbody"}],["(url-prefix)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],["(url)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],{include:"@selectorname"},["[\\*]","tag"],["[>\\+,]","delimiter"],["\\[",{token:"delimiter.bracket",next:"@selectorattribute"}],["{",{token:"delimiter.bracket",next:"@selectorbody"}]],selectorbody:[{include:"@comments"},["[*_]?@identifier@ws:(?=(\\s|\\d|[^{;}]*[;}]))","attribute.name","@rulevalue"],["}",{token:"delimiter.bracket",next:"@pop"}]],selectorname:[["(\\.|#(?=[^{])|%|(@identifier)|:)+","tag"]],selectorattribute:[{include:"@term"},["]",{token:"delimiter.bracket",next:"@pop"}]],term:[{include:"@comments"},["(url-prefix)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],["(url)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],{include:"@functioninvocation"},{include:"@numbers"},{include:"@name"},{include:"@strings"},["([<>=\\+\\-\\*\\/\\^\\|\\~,])","delimiter"],[",","delimiter"]],rulevalue:[{include:"@comments"},{include:"@strings"},{include:"@term"},["!important","keyword"],[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}]],warndebug:[["[@](warn|debug)",{token:"keyword",next:"@declarationbody"}]],import:[["[@](import)",{token:"keyword",next:"@declarationbody"}]],urldeclaration:[{include:"@strings"},[`[^)\r
|
|
6
6
|
]+`,"string"],["\\)",{token:"delimiter.parenthesis",next:"@pop"}]],parenthizedterm:[{include:"@term"},["\\)",{token:"delimiter.parenthesis",next:"@pop"}]],declarationbody:[{include:"@term"},[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}]],comments:[["\\/\\*","comment","@comment"],["\\/\\/+.*","comment"]],comment:[["\\*\\/","comment","@pop"],[/[^*/]+/,"comment"],[/./,"comment"]],name:[["@identifier","attribute.value"]],numbers:[["-?(\\d*\\.)?\\d+([eE][\\-+]?\\d+)?",{token:"attribute.value.number",next:"@units"}],["#[0-9a-fA-F_]+(?!\\w)","attribute.value.hex"]],units:[["(em|ex|ch|rem|fr|vmin|vmax|vw|vh|vm|cm|mm|in|px|pt|pc|deg|grad|rad|turn|s|ms|Hz|kHz|%)?","attribute.value.unit","@pop"]],keyframedeclaration:[["@identifier","attribute.value"],["{",{token:"delimiter.bracket",switchTo:"@keyframebody"}]],keyframebody:[{include:"@term"},["{",{token:"delimiter.bracket",next:"@selectorbody"}],["}",{token:"delimiter.bracket",next:"@pop"}]],functioninvocation:[["@identifier\\(",{token:"attribute.value",next:"@functionarguments"}]],functionarguments:[["\\$@identifier@ws:","attribute.name"],["[,]","delimiter"],{include:"@term"},["\\)",{token:"attribute.value",next:"@pop"}]],strings:[['~?"',{token:"string",next:"@stringenddoublequote"}],["~?'",{token:"string",next:"@stringendquote"}]],stringenddoublequote:[["\\\\.","string"],['"',{token:"string",next:"@pop"}],[/[^\\"]+/,"string"],[".","string"]],stringendquote:[["\\\\.","string"],["'",{token:"string",next:"@pop"}],[/[^\\']+/,"string"],[".","string"]]}};export{e as conf,t as language};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
3
|
-
v4.34.0-next.
|
|
4
|
-
import a from"./
|
|
3
|
+
v4.34.0-next.57 */
|
|
4
|
+
import a from"./JVYFOI5M.js";import{b as m,c as y,d as h}from"./OEXR2YLO.js";import{D as f}from"./3UTLGC5G.js";import{j as u}from"./OBGIDV2N.js";export default $arcgis.t(([{c:b,e:d,f:g,g:F,h:M}])=>{var A=o=>{let e=o.variables[0],i=e&&e.type==="featureSet"?w(e):void 0,{apiVersion:t,bundles:a,hiddenApiItems:s}=o.toEditorProfileDefinition();return{apiVersion:t,bundles:a,variables:i?[i]:[],hiddenApiItems:s?.map(r=>r.toLowerCase())}};function w(o){let{name:e}=o,i=o.getDescription(),{definition:t}=o.toProfileVariableDefinition(),a={label:e,detail:e,insertText:e,insertTextMode:h.asIs,insertTextFormat:y.PlainText,kind:m.Field},s={name:e,description:i,type:"dictionary",properties:[],completion:a};if(!t||!("fields"in t))return s;let[r,l]=g(t.fields,i);return s.properties=r,a.documentation={kind:"markdown",value:l},s}var P={id:"field-calculation",variables:[{name:"$layer",type:"featureSet",description:"The layer being calculated."}]};function T(){return P}function I(o){if(!d(o))return;let e=T();if(!e)return;let i={variables:[],hiddenApiItems:o.hiddenApiItems?.map(t=>t.toLowerCase())};return e.variables.forEach(t=>{if(o.disabledVariables?.includes(t.name))return;let a=o.definitions[t.name];switch(t.type){case"featureSet":return b(a)?i.variables.push({...t,type:t.type,definition:a}):void 0;default:throw Error(`sdkVariable type not supported (yet) type: ${t.type}`)}}),i}var x="arcgis-sql-expression",p=class extends M{constructor(){super(x,{apiPath:"./assets/sql-language/api",apiPrefix:"sql-api.t9n."}),this._languageId=x,this._layerMap=new Map}updateFeatureLayerForModel(e,i){let t=this._getApiKey(e);this._layerMap.set(t,i)}getFeatureLayerForModel(e){let i=this._getApiKey(e);return this._layerMap.get(i)}async setProfileForModel(e,i,t={locale:"en"}){d(i)&&(i=I(i));let a=await u(t.locale,f("./assets/editor-profile/t9n"),"messages.");if(!a)throw new Error(`Failed to load the language bundle for ${t.locale}`);this.disposeForModel(e);let s=this._getApiKey(e),r=new F(i,a);this._modelToProfileMap.set(s,r);let l=A(r);this.updateApiContextForModel(e,{locale:t.locale,profile:l});let c=i?.variables?.find(v=>v.name==="$layer");c&&this.updateFeatureLayerForModel(e,c.definition)}},n=new p,k={setProfileForModel:n.setProfileForModel.bind(n),getApiLibraryForModel:n.getApiLibraryForModel.bind(n)};return n},a)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
3
|
-
v4.34.0-next.
|
|
4
|
-
import{a as t,b as e}from"./
|
|
3
|
+
v4.34.0-next.57 */
|
|
4
|
+
import{a as t,b as e}from"./V3HOKPHC.js";import"./JHBR7EEQ.js";import"./HAY7HSRS.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};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
3
|
-
v4.34.0-next.
|
|
4
|
-
async function t(){return(await a()).getArcadeDiagnosticService()}async function a(){return await import("./
|
|
3
|
+
v4.34.0-next.57 */
|
|
4
|
+
async function t(){return(await a()).getArcadeDiagnosticService()}async function a(){return await import("./IVC4TD5I.js")}export{t as a,a as b};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
3
|
-
v4.34.0-next.
|
|
3
|
+
v4.34.0-next.57 */
|
|
4
4
|
var g=class{constructor(){this.promise=new Promise((t,o)=>{this.resolve=t,this.reject=o})}},y=(e,t)=>{let o=e;for(;o;){if(o===t)return!0;if(!o.parentNode)return!1;o.parentNode instanceof ShadowRoot?o=o.parentNode.host:o=o.parentNode}return!1},$=(e,t,o)=>{let n=N(t).subscribe;return n(s=>{s.some(r=>y(e,r.target))&&o()})},p={},N=e=>{let t=e.join(","),o=p[t];if(o!==void 0)return o;let n=new Set,s=new MutationObserver(r=>n.forEach(a=>a(r)));globalThis.document&&s.observe(document.documentElement,{attributes:!0,attributeFilter:e,subtree:!0});let c={subscribe:r=>(n.add(r),()=>{n.delete(r),n.size===0&&(s.disconnect(),p[t]=void 0)})};return p[t]=c,c},E=(e,t)=>{let o=e;for(;o;){let n=o.closest?.(t);if(n)return n;let s=o.getRootNode?.();if(s===globalThis.document)return null;o=s.host}return null},I=e=>E(e,":is(.calcite-mode-light, .calcite-mode-dark)")?.classList.contains("calcite-mode-dark")?"dark":"light";var A=(e,t,o)=>E(e,`[${t}]`)?.getAttribute(t)??o,S=e=>e.nodeType===Node.ELEMENT_NODE,w=e=>typeof e.setFocus=="function",l=(e,t="")=>{if(!S(e))return!1;if(e.matches(t))return w(e)&&setTimeout(()=>void e.setFocus(),0),!0;for(let n of e.children)if(l(n,t))return!0;let o=e.shadowRoot;if(o){for(let n of o.children)if(l(n,t))return!0}return!1},U=async e=>{e!=null&&(w(e)?await e.setFocus():e.focus())},V=(e,t)=>{if(e?.shadowRoot){if(e.hasAttribute("hydrated")||e.hasAttribute("calcite-hydrated")){l(e,t);return}Promise.resolve(e.componentOnReady?.()).then(()=>l(e,t))}};var q=(e,t,...o)=>{try{return e?.call(t,...o)}catch(n){console.error(n,e)}},_=async(e,t,...o)=>{try{return await e?.call(t,...o)}catch(n){console.error(n,e)}},i=e=>{let t="";for(let o=0;o<e;o++)t+=((1+Math.random())*65536|0).toString(16).substring(1);return t},B=()=>[i(2),i(1),i(1),i(1),i(3)].join("-"),j="ar,bg,bs,ca,cs,da,de,el,en,es,et,fi,fr,he,hr,hu,id,it,ja,ko,lt,lv,nl,nb,no,pl,pt-BR,pt-PT,ro,ru,sk,sl,sr,sv,th,tr,uk,vi,zh-CN,zh-HK,zh-TW".split(","),C=new Set(j),u="en",k={pt:"pt-PT",nb:"no",nn:"no",zh:"zh-CN"},R=async(e,t,o="")=>{let n=`${t}/${o}`,s=`${n}${e}.json`;return f[s]??(f[s]=L(e,n)),await f[s]},f={},L=async(e,t)=>{let o=`${t}${e}.json`;try{let n=await fetch(o);if(n.ok)return await n.json()}catch(n){return console.error(n),{}}return e===u?{}:await L(u,t)},z=e=>{let t=A(e,"lang",globalThis.navigator?.language||u);return{lang:t,t9nLocale:T(t)}},T=e=>{let[t,o]=e.split("-"),n=t.toLowerCase(),s=n;return o&&(s=`${n}-${o.toUpperCase()}`),s=k[s]??s,C.has(s)?s:o?T(n):u},Q=(e,t,o,n)=>{let s,c=()=>O(e,t(),n).then(r=>{(s?.lang!==r.lang||s.t9nLocale!==r.t9nLocale||s.t9nStrings!==r.t9nStrings)&&o(r),s=r}).catch(console.error);return queueMicrotask(c),$(e,["lang"],c)},O=async(e,t,o=e.localName.split("-").slice(1).join("-"))=>{let{lang:n,t9nLocale:s}=z(e),c=`${t}/${o}/t9n`,a=o===null?{}:await R(s,c,"messages.");return{lang:n,t9nLocale:s,t9nStrings:a}};var m='"',b="'",v=(e,t)=>new Array(t+1).join(e),D=e=>{let t=m,o=b;e.includes(t)&&!e.includes(o)&&(o=m,t=b);let s=new RegExp(`(^|[^\\\\])((?:\\\\{2})*)((?:\\\\${o})+)`,"gu");e=e.replace(s,(r,a,d,h)=>a+d+v(o,h.length/2));let c=new RegExp(`(^|[^\\\\])((?:\\\\{2})*)(${t}+)`,"gu");return e=e.replace(c,(r,a,d,h)=>a+d+v(`\\${t}`,h.length)),t+e+t},G=e=>{let t=e?e.replaceAll(/[-[\]/{}()*+?.\\^$|]/gu,"\\$&"):"^.*$";return new RegExp(t,"i")},H=(e,t={})=>(e??"").replace(/\{(?<valueName>.*?)\}/gu,(o,n)=>t[n]??o),K=e=>`\u200E${e??""}\u200E`;var W=e=>e.replace(P,(t,o)=>`${o===0?"":"-"}${t.toLowerCase()}`),P=/[A-Z]+(?![a-z])|[A-Z]/gu;var Z=(e,t)=>{let o=t>x?M:t/F,n=0,s=setInterval(()=>{n+=o,n>=t&&(clearInterval(s),e())},o);return s},x=4e3,M=2e3,F=4,J=e=>e!==null,X=e=>e!==void 0;var Y=(e,t=100)=>{let o;return(...n)=>{let s=()=>{clearTimeout(o),e(...n)};clearTimeout(o),o=setTimeout(s,t)}};export{g as a,$ as b,I as c,U as d,V as e,q as f,_ as g,B as h,C as i,R as j,z as k,T as l,Q as m,D as n,G as o,H as p,K as q,W as r,Z as s,J as t,X as u,Y as v};
|