@arcgis/coding-components 5.0.0-next.83 → 5.0.0-next.84
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/{NC5SGZMJ.js → 257CE7RC.js} +2 -2
- package/dist/cdn/{UNYMWSGX.js → 3LJIRG7F.js} +2 -2
- package/dist/cdn/{GTNCGSVU.js → 3PSCA6KH.js} +2 -2
- package/dist/cdn/{GBACYLGY.js → 3QR7YQXI.js} +2 -2
- package/dist/cdn/{H73JKOYZ.js → 44GQ5ENQ.js} +2 -2
- package/dist/cdn/{46YZN2VU.js → 5KWWFBRA.js} +2 -2
- package/dist/cdn/{3KDK7BGM.js → 5NR5BXSU.js} +2 -2
- package/dist/cdn/{GTATUPXR.js → 5V3AU2MS.js} +2 -2
- package/dist/cdn/{AY5TB2GS.js → 6VMHDHOO.js} +2 -2
- package/dist/cdn/{QWZQVIUL.js → 6Y5QJLC2.js} +1 -1
- package/dist/cdn/{PU7HICPA.js → 7JSSJVPI.js} +2 -2
- package/dist/cdn/{XVYJ4WNB.js → ARAAJHTT.js} +2 -2
- package/dist/cdn/{2MGIKJYM.js → BQLRNY6M.js} +2 -2
- package/dist/cdn/{RK7RXCYN.js → DB7JAMFD.js} +2 -2
- package/dist/cdn/{VXJFL73H.js → FERNZR6V.js} +1 -1
- package/dist/cdn/{Y7CYXDPE.js → FMGFKQ7C.js} +2 -2
- package/dist/cdn/{S6M7JCFZ.js → G2JKJDVX.js} +2 -2
- package/dist/cdn/{XMTXLNX4.js → GMJZSPF2.js} +2 -2
- package/dist/cdn/{XRNHDR4P.js → HB2ES4YL.js} +2 -2
- package/dist/cdn/{WIVKQ2GP.js → HBCKUC46.js} +2 -2
- package/dist/cdn/{AK5DGBBT.js → I6JGARO3.js} +2 -2
- package/dist/cdn/{AQEYBNHM.js → JFCDQ5Y5.js} +2 -2
- package/dist/cdn/{UUOHJKLI.js → JOZPVCEH.js} +1 -1
- package/dist/cdn/{H2ITGNXU.js → KDSG4AQ2.js} +1 -1
- package/dist/cdn/{HK7AJNG2.js → KJYFRF6Z.js} +1 -1
- package/dist/cdn/{2D45PU4R.js → LNCKWEAE.js} +2 -2
- package/dist/cdn/{D3ZNBNNC.js → MCREPNON.js} +2 -2
- package/dist/cdn/{SBZENX4Q.js → MTMFT4XD.js} +2 -2
- package/dist/cdn/{AVUR3AOC.js → NR6DB7IX.js} +2 -2
- package/dist/cdn/{LWYZHBPE.js → NYBDXWA5.js} +2 -2
- package/dist/cdn/{ETWRTA4I.js → OQUYSN7I.js} +3 -3
- package/dist/cdn/{QKBCMLIS.js → PUM6S2YR.js} +2 -2
- package/dist/cdn/{TGVJW33Q.js → R64NEFA4.js} +1 -1
- package/dist/cdn/{KTQPZNUF.js → RFJMS2XV.js} +2 -2
- package/dist/cdn/{BLLASOJQ.js → S25WEGDV.js} +2 -2
- package/dist/cdn/{GW5OH6LO.js → SNIPKZ5D.js} +1 -1
- package/dist/cdn/{W6ZQVGFI.js → TE762HZP.js} +1 -1
- package/dist/cdn/{IZHQCLVH.js → TJOEBZIJ.js} +1 -1
- package/dist/cdn/{ICS4SRUN.js → TYMP4EQA.js} +2 -2
- package/dist/cdn/{6AIBDXKV.js → U3UR7PMI.js} +2 -2
- package/dist/cdn/{NLZCPVJB.js → VI5BXG53.js} +2 -2
- package/dist/cdn/{GYOGKNMP.js → W5KQ34S3.js} +2 -2
- package/dist/cdn/{CD2XMR4V.js → WJ6J6EFT.js} +2 -2
- package/dist/cdn/{3F3GIC6O.js → WJI37X25.js} +2 -2
- package/dist/cdn/{MMRPPQHF.js → YCRGKFVI.js} +2 -2
- package/dist/cdn/{PAXQTO2K.js → YE3Q4QRS.js} +2 -2
- package/dist/cdn/{QOAVZGYZ.js → YJM4YZTR.js} +2 -2
- package/dist/cdn/ZNJU2F6X.js +4 -0
- package/dist/cdn/index.js +2 -2
- package/dist/chunks/arcade-contribution.js +1 -1
- 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/colorize.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/monaco-theme.js +1 -1
- package/dist/chunks/runtime.js +1 -1
- package/dist/chunks/sql-expr-defaults.js +1 -1
- package/dist/chunks/sql-expr-mode.js +1 -1
- package/dist/chunks/sql-expr-service-accessors.js +1 -1
- package/dist/chunks/useT9n.js +1 -1
- package/dist/chunks/utilities.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-code-viewer/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/dist/monacoStyles.js +1 -1
- package/package.json +5 -5
- package/dist/cdn/KRXNNCPA.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.
|
|
4
|
-
import{a as t,b as e}from"./
|
|
3
|
+
v5.0.0-next.84 */
|
|
4
|
+
import{a as t,b as e}from"./VI5BXG53.js";import"./3LJIRG7F.js";import"./JOZPVCEH.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/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
3
|
+
v5.0.0-next.84 */
|
|
4
4
|
var e={"light-theme":{comment:"#606060",constant:"#9809C8",date:"#296389",identifier:"#0000B3",keyword:"#BF4900",number:"#136D3D",string:"#A31515",operator:"#9809C8",predefined:"#0000B3"},"dark-theme":{comment:"#BFBFBF",constant:"#CDBAEA",date:"#97A6CE",identifier:"#9FD4F3",keyword:"#EEAA5A",number:"#AAD04B",string:"#F2877B",operator:"#CDBAEA",predefined:"#9FD4F3"}};export{e 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.
|
|
4
|
-
import{a as S}from"./
|
|
3
|
+
v5.0.0-next.84 */
|
|
4
|
+
import{a as S}from"./R64NEFA4.js";import a from"./6Y5QJLC2.js";import{a as O}from"./6VMHDHOO.js";import"./LNCKWEAE.js";import"./TE762HZP.js";import{d as F}from"./SNIPKZ5D.js";import{b as C,c as L}from"./KJYFRF6Z.js";import{E as m,F as p,G as T,H as v,I as y,K as M,g as P,h as b,j as t,n as x,p as d,t as r}from"./YJM4YZTR.js";import"./FERNZR6V.js";import"./JOZPVCEH.js";export default $arcgis.t(([{b:o,c:R,d:h,e:_,f:j,g:D}])=>{var J=b`:host{display:flex;flex-direction:column;width:100%;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);.flex-adjustable{flex:1 1 auto;overflow:hidden}.flex-row{display:flex;flex-direction:row;overflow:hidden}.flex-column{display:flex;flex-direction:column;overflow:hidden}.y-scrollable-container{overflow-y:auto;block-size:100%;background-color:var(--calcite-color-foreground-1)}header{border-bottom:1px solid var(--calcite-color-border-3);flex:0 0 auto}.ltr-container{direction:ltr}calcite-action-bar{calcite-action-group{padding-inline-end:var(--calcite-spacing-sm);calcite-action{padding-inline-end:var(--calcite-spacing-sm)}calcite-action:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}}calcite-action-group:last-child{border-inline-end-width:0px}calcite-action-group:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}}.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}.color-info{color:var(--calcite-color-status-info)}.color-error{color:var(--calcite-color-status-danger)}.color-success{color:var(--calcite-color-status-success)}[class*=result-value-]{font-size:var(--calcite-font-size--2);line-height:1.25rem;background-color:var(--calcite-color-foreground-1);margin:var(--calcite-spacing-md)}.console-logs-container{background-color:var(--calcite-color-foreground-1);padding:0 var(--calcite-spacing-md);font-family:var(--calcite-code-family);font-size:var(--calcite-font-size--2);font-weight:var(--calcite-font-weight-normal)}.result-value-table{table{display:block;max-width:fit-content;overflow-x:auto;border-spacing:0;border-collapse:collapse;text-align:start;white-space:nowrap;thead{background-color:var(--calcite-color-foreground-2)}tr{border-top:1px solid var(--calcite-color-border-3);border-bottom:1px solid var(--calcite-color-border-3)}th,td{border-inline-start:1px solid var(--calcite-color-border-3);border-inline-end:1px solid var(--calcite-color-border-3);text-align:start;padding:var(--calcite-spacing-xxs);.string-value{white-space:pre}}th{font-weight:var(--calcite-font-weight-medium)}}}.tree-item-label,.number-value,.string-value,.boolean-value{font-family:var(--calcite-code-family)}.tree-item-label,.value-type{color:var(--calcite-color-text-2);font-weight:var(--calcite-font-weight-normal)}.dictionary-property{color:var(--arcgis-editor-identifier)}.number-value{color:var(--arcgis-editor-number)}.string-value{color:var(--arcgis-editor-string);white-space:pre-wrap}.constant-value{color:var(--arcgis-editor-constant)}.date-value{color:var(--arcgis-editor-date)}}`,l={lines:!0,selectionMode:"none",scale:"s",oncalciteTreeSelect:e=>e.currentTarget.selectedItems.forEach(a=>a.selected=!1)},g={onClick:e=>{let a=e.currentTarget;a.expanded=!a.expanded}},n=({name:e})=>t`<span class="dictionary-property">${e}</span><span>: </span>`,z=({value:e,subtree:a=!1})=>t`<calcite-tree slot=${(a?"children":void 0)??y} .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}><calcite-tree-item class="string-value">${JSON.stringify(e.castAsJson(),void 0,2)}</calcite-tree-item></calcite-tree>`,N=({value:e,subtree:a=!1})=>t`<calcite-tree slot=${(a?"children":void 0)??y} .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}><calcite-tree-item><div class="tree-item-label">${n({name:"type"})}${e.type}</div></calcite-tree-item><calcite-tree-item><div class="tree-item-label">${n({name:"value"})}<span class="string-value">${JSON.stringify(e,void 0,2)}</span></div></calcite-tree-item></calcite-tree>`,f=({arcadeResult:e})=>{switch(e.type){case"unknown":case"null":return t`<span class="constant-value">${e.type}</span>`;case"text":return t`<span class="string-value">${d(e.value)}</span>`;case"number":return t`<span class="number-value">${e.value.toString()}</span>`;case"boolean":return t`<span class="constant-value">${e.value.toString()}</span>`;case"date":return t`<span class="date-value">${_(e)}</span>`;case"dateOnly":return t`<span class="string-value">${d(j(e))}</span>`;case"time":return t`<span class="string-value">${d(D(e))}</span>`;default:return null}},E=({arcadeResult:e,t9nStrings:a})=>{let s=e.value??[],c=Math.max(s.length-o,0);return t`<span>${`${e.type}(${s.length??0})`}</span>${c>0?t`<span> ${r(a.showingfirstitemsformat,{count:o.toString()})}</span>`:null}`},I=({value:e,subtree:a,t9nStrings:s})=>{let c=e.geometry?.();return t`<calcite-tree slot=${"children"} .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}>${e.keys().map(i=>{let u=h(e.field(i));return e.arcadeDeclaredClass==="esri.arcade.Feature"&&u.type==="geometry"?null:k({arcadeResult:u,name:i,t9nStrings:s})})}${c?k({arcadeResult:{type:"geometry",value:c},name:"geometry",t9nStrings:s}):null}</calcite-tree>`},G=({arcadeResult:e,t9nStrings:a})=>t`<div class="value-type"><span>${e.type}:</span>${e.features.length>=R?t`<span> ${r(a.showingfirstitemsformat,{count:R.toString()})}</span>`:null}</div>`,A=({items:e,subtree:a,t9nStrings:s})=>t`<calcite-tree slot=${"children"} .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}>${e.map((c,i)=>{let u=h(c);return k({arcadeResult:u,name:i,expanded:!a,t9nStrings:s})})}</calcite-tree>`,k=({arcadeResult:e,name:a,expanded:s,t9nStrings:c})=>{switch(e.type){case"null":case"unknown":case"text":case"number":case"date":case"dateOnly":case"time":case"boolean":return t`<calcite-tree-item><div class="tree-item-label">${n({name:a})}${f({arcadeResult:e})}</div></calcite-tree-item>`;case"array":{let i=(e.value??[]).slice(0,o);return t`<calcite-tree-item .expanded=${s} @click=${g.onClick}><div class="tree-item-label">${n({name:a})}${E({arcadeResult:e,t9nStrings:c})}</div>${A({items:i,subtree:!0,t9nStrings:c})}</calcite-tree-item>`}case"geometry":return t`<calcite-tree-item .expanded=${s} @click=${g.onClick}><div class="tree-item-label">${n({name:a})}<span>${e.type}</span></div>${N({value:e.value,subtree:!0})}</calcite-tree-item>`;case"attachment":return t`<calcite-tree-item .expanded=${s} @click=${g.onClick}><div class="tree-item-label">${n({name:a})}<span>${e.type}</span></div>${z({value:e.value,subtree:!0})}</calcite-tree-item>`;case"feature":case"dictionary":case"portal":return t`<calcite-tree-item .expanded=${s} @click=${g.onClick}><div class="tree-item-label">${n({name:a})}<span>${e.type}</span></div>${I({value:e.value,subtree:!0,t9nStrings:c})}</calcite-tree-item>`;default:return null}},V=({arcadeResult:e})=>{let a=F(e.value.fields);return t`<table><thead><tr>${a.map(s=>t`<th>${s.name}</th>`)}</tr></thead><tbody>${e.features.map(s=>t`<tr>${a.map(c=>{try{let i=h(s.field(c.name));return t`<td>${f({arcadeResult:i})}</td>`}catch{return t`<td></td>`}})}</tr>`)}</tbody></table>`};function q(){let e=`:host {
|
|
5
5
|
`,a=S["light-theme"];Object.entries(a).forEach(([c,i])=>{e+=` --arcgis-editor-${c}: ${i};
|
|
6
6
|
`}),e+=`}
|
|
7
7
|
`,e+=`:host([calcite-mode-dark]) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{Fl as a,Gl as b,Hl as c,Il as d,Jl as e,Kl as f,Ll as g,Ml as h,Nl as i,Ol as j,Pl as k,Ql as l,Rl as m,Sl as n}from"./
|
|
3
|
+
v5.0.0-next.84 */
|
|
4
|
+
import{Fl as a,Gl as b,Hl as c,Il as d,Jl as e,Kl as f,Ll as g,Ml as h,Nl as i,Ol as j,Pl as k,Ql as l,Rl as m,Sl as n}from"./3LJIRG7F.js";import"./JOZPVCEH.js";export{a as CancellationTokenSource,b as Emitter,c as KeyCode,d as KeyMod,i as MarkerSeverity,j as MarkerTag,e as Position,f as Range,g as Selection,h as SelectionDirection,l as Token,k as Uri,m as editor,n as languages};
|
|
@@ -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.
|
|
3
|
+
v5.0.0-next.84 */
|
|
4
4
|
var a="cube";function u(e,t){switch(e.type){case"oid":return"key";case"small-integer":case"big-integer":case"integer":case"single":case"double":case"long":return"number";case"global-id":case"guid":return"key";case"string":if(t?.some(n=>n.name===e.name&&n.type==="array")){let n=t?.find(c=>c.name===e.name);return n&&r(n)&&r(n)?s(n.elementType.type):"double-float-set"}return"string";case"date":return"date-time";case"date-only":return"calendar";case"time-only":return"clock";case"timestamp-offset":return"time-zone";default:return"cube"}}function i(e){switch(e.type){case"number":return"number";case"text":return"string";case"array":return r(e)?s(e.elementType.type):a;case"date":return"date-time";case"dateOnly":return"calendar";case"time":return"clock";default:return a}}function l(e){switch(e.type){case"small-integer":case"integer":case"big-integer":case"single":case"double":case"long":case"oid":return"number";case"global-id":case"guid":case"string":return"text";case"date":return"date";case"date-only":return"dateOnly";case"time-only":return"time";default:return"text"}}function o(e){return(e??[]).filter(t=>{switch(t.type){case"string":case"small-integer":case"integer":case"big-integer":case"single":case"double":case"long":case"date":case"date-only":case"time-only":case"timestamp-offset":case"oid":case"guid":case"global-id":return!0;default:return!1}})}function d(e){return e.alias||e.name}function r(e){if(typeof e=="object"&&e!==null&&"elementType"in e){let t=e.elementType;return typeof t=="object"&&t!==null&&"type"in t&&typeof t.type=="string"}return!1}function s(e){switch(e){case"text":return"string-set";case"number":return"double-float-set";default:return a}}export{u as a,i as b,l as c,o as d,d as e};
|
|
@@ -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.
|
|
3
|
+
v5.0.0-next.84 */
|
|
4
4
|
var n=(e,o=100)=>{let t;return(...c)=>{let i=()=>{clearTimeout(t),e(...c)};clearTimeout(t),t=setTimeout(i,o)}};export{n as a};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
3
|
+
v5.0.0-next.84 */
|
|
4
4
|
function M(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var R=M();function se(r){R=r}var _={exec:()=>null};function p(r,e=""){let n=typeof r=="string"?r:r.source,s={replace:(t,i)=>{let l=typeof i=="string"?i:i.source;return l=l.replace(x.caret,"$1"),n=n.replace(t,l),s},getRegex:()=>new RegExp(n,e)};return s}var fe=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),x={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:r=>new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}#`),htmlBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}<(?:[a-z].*>|!--)`,"i")},xe=/^(?:[ \t]*(?:\n|$))+/,be=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,we=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,P=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,me=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,H=/(?:[*+-]|\d{1,9}[.)])/,le=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ie=p(le).replace(/bull/g,H).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),ye=p(le).replace(/bull/g,H).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),N=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,$e=/^[^\n]+/,O=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Re=p(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",O).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Se=p(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,H).getRegex(),B="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",j=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Te=p("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",j).replace("tag",B).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ae=p(N).replace("hr",P).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",B).getRegex(),ze=p(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ae).getRegex(),G={blockquote:ze,code:be,def:Re,fences:we,heading:me,hr:P,html:Te,lheading:ie,list:Se,newline:xe,paragraph:ae,table:_,text:$e},V=p("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",P).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",B).getRegex(),Ae={...G,lheading:ye,table:V,paragraph:p(N).replace("hr",P).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",V).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",B).getRegex()},_e={...G,html:p(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",j).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:_,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:p(N).replace("hr",P).replace("heading",` *#{1,6} *[^
|
|
5
5
|
]`).replace("lheading",ie).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Pe=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Ie=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,oe=/^( {2,}|\\)\n(?!\s*$)/,Le=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,E=/[\p{P}\p{S}]/u,X=/[\s\p{P}\p{S}]/u,ce=/[^\s\p{P}\p{S}]/u,Ce=p(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,X).getRegex(),he=/(?!~)[\p{P}\p{S}]/u,qe=/(?!~)[\s\p{P}\p{S}]/u,Be=/(?:[^\s\p{P}\p{S}]|~)/u,Ee=p(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",fe?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),pe=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,ve=p(pe,"u").replace(/punct/g,E).getRegex(),Ze=p(pe,"u").replace(/punct/g,he).getRegex(),ue="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Qe=p(ue,"gu").replace(/notPunctSpace/g,ce).replace(/punctSpace/g,X).replace(/punct/g,E).getRegex(),De=p(ue,"gu").replace(/notPunctSpace/g,Be).replace(/punctSpace/g,qe).replace(/punct/g,he).getRegex(),Me=p("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,ce).replace(/punctSpace/g,X).replace(/punct/g,E).getRegex(),He=p(/\\(punct)/,"gu").replace(/punct/g,E).getRegex(),Ne=p(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Oe=p(j).replace("(?:-->|$)","-->").getRegex(),je=p("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Oe).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),L=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,Ge=p(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",L).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ge=p(/^!?\[(label)\]\[(ref)\]/).replace("label",L).replace("ref",O).getRegex(),ke=p(/^!?\[(ref)\](?:\[\])?/).replace("ref",O).getRegex(),Xe=p("reflink|nolink(?!\\()","g").replace("reflink",ge).replace("nolink",ke).getRegex(),Y=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,F={_backpedal:_,anyPunctuation:He,autolink:Ne,blockSkip:Ee,br:oe,code:Ie,del:_,emStrongLDelim:ve,emStrongRDelimAst:Qe,emStrongRDelimUnd:Me,escape:Pe,link:Ge,nolink:ke,punctuation:Ce,reflink:ge,reflinkSearch:Xe,tag:je,text:Le,url:_},Fe={...F,link:p(/^!?\[(label)\]\((.*?)\)/).replace("label",L).getRegex(),reflink:p(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",L).getRegex()},Z={...F,emStrongRDelimAst:De,emStrongLDelim:Ze,url:p(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Y).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:p(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Y).getRegex()},We={...Z,br:p(oe).replace("{2,}","*").getRegex(),text:p(Z.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},I={normal:G,gfm:Ae,pedantic:_e},T={normal:F,gfm:Z,breaks:We,pedantic:Fe},Ue={"&":"&","<":"<",">":">",'"':""","'":"'"},ee=r=>Ue[r];function y(r,e){if(e){if(x.escapeTest.test(r))return r.replace(x.escapeReplace,ee)}else if(x.escapeTestNoEncode.test(r))return r.replace(x.escapeReplaceNoEncode,ee);return r}function te(r){try{r=encodeURI(r).replace(x.percentDecode,"%")}catch{return null}return r}function ne(r,e){let n=r.replace(x.findPipe,(i,l,o)=>{let a=!1,h=l;for(;--h>=0&&o[h]==="\\";)a=!a;return a?"|":" |"}),s=n.split(x.splitPipe),t=0;if(s[0].trim()||s.shift(),s.length>0&&!s.at(-1)?.trim()&&s.pop(),e)if(s.length>e)s.splice(e);else for(;s.length<e;)s.push("");for(;t<s.length;t++)s[t]=s[t].trim().replace(x.slashPipe,"|");return s}function z(r,e,n){let s=r.length;if(s===0)return"";let t=0;for(;t<s&&r.charAt(s-t-1)===e;)t++;return r.slice(0,s-t)}function Je(r,e){if(r.indexOf(e[1])===-1)return-1;let n=0;for(let s=0;s<r.length;s++)if(r[s]==="\\")s++;else if(r[s]===e[0])n++;else if(r[s]===e[1]&&(n--,n<0))return s;return n>0?-2:-1}function re(r,e,n,s,t){let i=e.href,l=e.title||null,o=r[1].replace(t.other.outputLinkReplace,"$1");s.state.inLink=!0;let a={type:r[0].charAt(0)==="!"?"image":"link",raw:n,href:i,title:l,text:o,tokens:s.inlineTokens(o)};return s.state.inLink=!1,a}function Ke(r,e,n){let s=r.match(n.other.indentCodeCompensation);if(s===null)return e;let t=s[1];return e.split(`
|
|
6
6
|
`).map(i=>{let l=i.match(n.other.beginningSpace);if(l===null)return i;let[o]=l;return o.length>=t.length?i.slice(t.length):i}).join(`
|
|
@@ -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.
|
|
4
|
-
import k from"./
|
|
3
|
+
v5.0.0-next.84 */
|
|
4
|
+
import k from"./YCRGKFVI.js";import j from"./44GQ5ENQ.js";import e from"./5KWWFBRA.js";import"./R64NEFA4.js";import{a as _}from"./LNCKWEAE.js";import"./MTMFT4XD.js";import b from"./I6JGARO3.js";import a from"./ARAAJHTT.js";import"./SNIPKZ5D.js";import"./U3UR7PMI.js";import{a as f}from"./OQUYSN7I.js";import"./KDSG4AQ2.js";import"./HB2ES4YL.js";import{b as g,c as p}from"./KJYFRF6Z.js";import{G as l,K as u,L as m,h as d,n as i,s as c,u as h}from"./YJM4YZTR.js";import"./FERNZR6V.js";import{Hl as s,Il as o,Kl as I,Pl as n}from"./3LJIRG7F.js";import"./JOZPVCEH.js";export default $arcgis.t(([,,,{a:v}])=>{var y=d`@layer{arcgis-code-editor{display:flex;width:100%;height:100%;flex-direction:column;direction:ltr;.monaco-editor{flex:1 1 auto;.monaco-hover,.editor-widget,.suggest-details-container{z-index:9999}div[widgetid="editor.contrib.resizableContentHoverWidget"],div[widgetid="editor.widget.suggestWidget"],div[widgetid="suggest.details"]{z-index:calc(var(--calcite-z-index-header) + 1)!important}}}}`,b={autoIndent:"advanced",automaticLayout:!0,bracketPairColorization:{enabled:!0},minimap:{enabled:!1},renderLineHighlight:"none",scrollBeyondLastLine:!1,suggest:{snippetsPreventQuickSuggestions:!1,showWords:!1},tabSize:2,useShadowDOM:!0},a=class extends l{constructor(){super(...arguments),this._componentReadyDefer=Promise.withResolvers(),this._disposables=[],this._monacoEditor=_(f),this.modelId=c(),this.value="",this.arcgisSelectionChange=i({bubbles:!1}),this.arcgisValueChange=i({bubbles:!1})}static{this.properties={editorInstance:32,editorOptions:0,language:1,modelId:0,value:1}}static{this.shadowRootOptions=h}static{this.styles=[y]}get editorInstance(){return this._editorInstance}async getEditorInstance(){return await this._componentReadyDefer.promise,this._editorInstance}async getValue(){return await this._componentReadyDefer.promise,this.value}async insertSnippet(e){await this._componentReadyDefer.promise,this._editorInstance&&(this._editorInstance.getContribution("snippetController2")?.insert(e??""),this._editorInstance.focus())}async insertText(e){if(await this._componentReadyDefer.promise,!this._editorInstance||!this._editorInstance.getModel())return;let t=this._editorInstance.getSelection()??new I(1,1,1,1);this._editorInstance.executeEdits("",[{range:t,text:e??"",forceMoveMarkers:!0}])}async setFocus(){await this._componentReadyDefer.promise,this._editorInstance?.focus()}async setValue(e){await this._componentReadyDefer.promise,this.value=e??""}load(){v(m("./assets")),this.manager.onLifecycle(()=>{this._monacoEditor.getModel(this.getUri())?.dispose();let e=this._monacoEditor.createModel(this.value,this.language,this.getUri());this._editorInstance=this._monacoEditor.create(this.el,{...b,...this.editorOptions??{},model:e,fixedOverflowWidgets:!0}),this._disposables.push(this._editorInstance),this._componentReadyDefer.resolve(),this._editorInstance.onDidChangeModelContent(()=>{this.value=this._editorInstance?.getValue()??"",this.arcgisValueChange.emit(this.value)}),this._editorInstance.onDidChangeCursorSelection(M=>{this.arcgisSelectionChange.emit({selection:M.selection,model:this._editorInstance?.getModel()})});let t=g(this.el,["class"],()=>this.updateTheme());this.updateTheme();let r=new ResizeObserver(()=>this._editorInstance?.layout());return r.observe(this.el),this.addCommonEditorActions(),()=>{for(this._editorInstance?.getModel()?.dispose();this._disposables.length;)this._disposables.pop()?.dispose();t?.(),r.disconnect()}})}willUpdate(e){e.has("value")&&this._updateModelValue(),(e.has("language")||e.has("modelId"))&&this.hasUpdated&&this._updateModel(),e.has("editorOptions")&&this._editorInstance?.updateOptions(this.editorOptions??{})}_updateModelValue(){if(!this._editorInstance)return;let e=this._editorInstance.getModel();if(!e||e.getValue()===this.value)return;let t=e.getFullModelRange();this._editorInstance.executeEdits("",[{range:t,text:this.value,forceMoveMarkers:!0}]),this._editorInstance.pushUndoStop()}_updateModel(){if(!this._editorInstance)return;let e=this._editorInstance;e.getModel()?.dispose(),e.setModel(this._monacoEditor.createModel(this.value,this.language,this.getUri()))}getUri(){return this.modelId?n.parse(this.modelId):n.parse("")}updateTheme(){let e=p(this.el)==="light"?"vs":"vs-dark";e!==this._currentTheme&&(this._currentTheme=e,this._monacoEditor.setTheme(e))}addCommonEditorActions(){if(!this._editorInstance)return;let e=this._editorInstance.getAction("editor.action.fontZoomIn"),t=this._editorInstance.getAction("editor.action.fontZoomOut");this._disposables.push(this._editorInstance.addAction({id:"editor.action.fontZoomIn",label:"Editor Font Zoom In",keybindings:[o.CtrlCmd|s.Equal],contextMenuGroupId:"zooming",contextMenuOrder:1,run:async()=>await e?.run()}),this._editorInstance.addAction({id:"editor.action.fontZoomOut",label:"Editor Font Zoom Out",keybindings:[o.CtrlCmd|s.Minus],contextMenuGroupId:"zooming",contextMenuOrder:2,run:async()=>await t?.run()}))}};u("arcgis-code-editor",a);return a},a,b,e,j,k)
|
|
@@ -1,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.
|
|
4
|
-
import{f as d}from"./
|
|
3
|
+
v5.0.0-next.84 */
|
|
4
|
+
import{f as d}from"./KDSG4AQ2.js";import{q as c}from"./YJM4YZTR.js";function L(t,r,m,u){if(!r)return[];let e=Array.isArray(r)?r:[r];if(!e.length)return[];let l=c(m);return t.filter(o=>e.some(a=>l.test(String(o[a]??""))))}function N(t){return t?`${t.portal.url}/home/item.html?id=${t.id}`:""}function C(t,r,m="add",u){if(!t)return;let e=t.getSelection(),l=e&&(e.startLineNumber!==e.endLineNumber||e.startColumn!==e.endColumn),o=[],a=t.getValue()??"";if(m==="replace"){let i=`${u}
|
|
5
5
|
${r}`,s=t.getModel(),n=s?.getLineCount()??1,f=s?.getLineMaxColumn(n)??1;o=[{range:{startLineNumber:1,startColumn:1,endLineNumber:n,endColumn:f},text:i}]}else{let i=l?{startLineNumber:e.startLineNumber,startColumn:e.startColumn,endLineNumber:e.endLineNumber,endColumn:e.endColumn}:(()=>{let n=t.getPosition();return{startLineNumber:n?.lineNumber??1,startColumn:n?.column??1,endLineNumber:n?.lineNumber??1,endColumn:n?.column??1}})(),s=!1;if(u){let n=u.replace(/[.*+?^${}()|[\]\\]/gu,"\\$&");s=!new RegExp(`^\\s*${n}\\s*$`,"mu").test(a)}s&&o.push({range:{startLineNumber:1,startColumn:1,endLineNumber:1,endColumn:1},text:`${u}
|
|
6
6
|
`}),o.push({range:i,text:r})}try{t.pushUndoStop(),t.executeEdits("insertText",o),t.pushUndoStop(),t.focus()}catch(i){console.error("Failed to edit model:",i)}}function g(t){try{return d(t)}catch{return t}}export{L as a,N as b,C as c,g as d};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{Tl as s}from"./
|
|
3
|
+
v5.0.0-next.84 */
|
|
4
|
+
import{Tl as s}from"./3LJIRG7F.js";var c=Object.defineProperty,p=Object.getOwnPropertyDescriptor,g=Object.getOwnPropertyNames,l=Object.prototype.hasOwnProperty,a=(t,e,o,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of g(e))!l.call(t,n)&&n!==o&&c(t,n,{get:()=>e[n],enumerable:!(i=p(e,n))||i.enumerable});return t},d=(t,e,o)=>(a(t,e,"default"),o&&a(o,e,"default")),r={};d(r,s);var m={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],onEnterRules:[{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,afterText:/^\s*\*\/$/,action:{indentAction:r.languages.IndentAction.IndentOutdent,appendText:" * "}},{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,action:{indentAction:r.languages.IndentAction.None,appendText:" * "}},{beforeText:/^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,action:{indentAction:r.languages.IndentAction.None,appendText:"* "}},{beforeText:/^(\t|(\ \ ))*\ \*\/\s*$/,action:{indentAction:r.languages.IndentAction.None,removeText:1}}],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"`",close:"`",notIn:["string","comment"]},{open:"/**",close:" */",notIn:["string"]}],folding:{markers:{start:new RegExp("^\\s*//\\s*#?region\\b"),end:new RegExp("^\\s*//\\s*#?endregion\\b")}}},x={defaultToken:"invalid",tokenPostfix:".ts",keywords:["abstract","any","as","asserts","bigint","boolean","break","case","catch","class","continue","const","constructor","debugger","declare","default","delete","do","else","enum","export","extends","false","finally","for","from","function","get","if","implements","import","in","infer","instanceof","interface","is","keyof","let","module","namespace","never","new","null","number","object","out","package","private","protected","public","override","readonly","require","global","return","satisfies","set","static","string","super","switch","symbol","this","throw","true","try","type","typeof","undefined","unique","unknown","var","void","while","with","yield","async","await","of"],operators:["<=",">=","==","!=","===","!==","=>","+","-","**","*","/","%","++","--","<<","</",">>",">>>","&","|","^","!","~","&&","||","??","?",":","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=","@"],symbols:/[=><!~?:&|+\-*\/\^%]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,digits:/\d+(_+\d+)*/,octaldigits:/[0-7]+(_+[0-7]+)*/,binarydigits:/[0-1]+(_+[0-1]+)*/,hexdigits:/[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,regexpctl:/[(){}\[\]\$\^|\-*+?\.]/,regexpesc:/\\(?:[bBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})/,tokenizer:{root:[[/[{}]/,"delimiter.bracket"],{include:"common"}],common:[[/#?[a-z_$][\w$]*/,{cases:{"@keywords":"keyword","@default":"identifier"}}],[/[A-Z][\w\$]*/,"type.identifier"],{include:"@whitespace"},[/\/(?=([^\\\/]|\\.)+\/([dgimsuy]*)(\s*)(\.|;|,|\)|\]|\}|$))/,{token:"regexp",bracket:"@open",next:"@regexp"}],[/[()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/!(?=([^=]|$))/,"delimiter"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/,"number.float"],[/0[xX](@hexdigits)n?/,"number.hex"],[/0[oO]?(@octaldigits)n?/,"number.octal"],[/0[bB](@binarydigits)n?/,"number.binary"],[/(@digits)n?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string_double"],[/'/,"string","@string_single"],[/`/,"string","@string_backtick"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@jsdoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],jsdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/,["regexp.escape.control","regexp.escape.control"]],[/[()]/,"regexp.escape.control"],[/@regexpctl/,"regexp.escape.control"],[/[^\\\/]/,"regexp"],[/@regexpesc/,"regexp.escape"],[/\\\./,"regexp.invalid"],[/(\/)([dgimsuy]*)/,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],regexrange:[[/-/,"regexp.escape.control"],[/\^/,"regexp.invalid"],[/@regexpesc/,"regexp.escape"],[/[^\]]/,"regexp"],[/\]/,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_double:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],string_single:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]],string_backtick:[[/\$\{/,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\`$]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/`/,"string","@pop"]],bracketCounting:[[/\{/,"delimiter.bracket","@bracketCounting"],[/\}/,"delimiter.bracket","@pop"],{include:"common"}]}};export{m as a,x 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/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{b,c as r,d as _}from"./
|
|
3
|
+
v5.0.0-next.84 */
|
|
4
|
+
import{b,c as r,d as _}from"./G2JKJDVX.js";import{a as v}from"./TJOEBZIJ.js";import{a as p}from"./6VMHDHOO.js";import"./LNCKWEAE.js";import{a as f}from"./U3UR7PMI.js";import"./OQUYSN7I.js";import"./KDSG4AQ2.js";import"./HB2ES4YL.js";import{d as h,e as m}from"./KJYFRF6Z.js";import{F as l,G as d,K as u,h as g,j as s,l as c,n as a}from"./YJM4YZTR.js";import"./FERNZR6V.js";import"./3LJIRG7F.js";import"./JOZPVCEH.js";function S(o){return!Array.isArray(o)||!o.length?!1:Array.isArray(o[0].suggestions)}var $=g`:host{background-color:var(--calcite-color-foreground-1);.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}.sticky{position:sticky;top:0;z-index:10}calcite-flow{height:100%}calcite-block{p:first-of-type{margin-top:0}code{font-family:var(--calcite-code-family)}pre{direction:ltr;overflow-x:auto;background-color:var(--calcite-color-foreground-2);padding:var(--calcite-spacing-sm);code{font-size:var(--calcite-font-size--2)}}}calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}}`,n=class extends d{constructor(){super(...arguments),this._beforeBack=async()=>{this._selectedSuggestion=void 0},this.messages=p(),this._colorizeStyle="",this._filterValue="",this.closed=!1,this.arcgisClose=a({bubbles:!1}),this.arcgisItemSelected=a({bubbles:!1})}static{this.properties={_colorizeStyle:16,_filterValue:16,_selectedSuggestion:16,suggestions:0,closed:5}}static{this.styles=$}load(){this._colorizeStyle=r(),this._themeChangedListener=_(()=>this._colorizeStyle=r())}willUpdate(e){e.has("suggestions")&&this.suggestionsPropChanged()}disconnectedCallback(){super.disconnectedCallback(),this._flowObserver?.disconnect(),this._themeChangedListener?.dispose()}suggestionsPropChanged(){this._selectedSuggestion=void 0}flowFocusHandler(e){if(!e){this._flowObserver?.disconnect(),this._flowObserver=void 0;return}this._flowObserver||(this._flowObserver=new MutationObserver(()=>{m(e.querySelector("calcite-flow-item:last-child"),"calcite-input")}),this._flowObserver.observe(e,{attributes:!0,attributeFilter:["id"],childList:!0}))}_updateFilterValue(e){this._filterValue=e.currentTarget?.value??""}_emitItemSelected(e,t){let i=e;(!i.key||i.key==="Enter")&&(e.preventDefault(),this.arcgisItemSelected.emit(t.code))}_showSuggestionDetail(e,t){e.stopPropagation(),this._selectedSuggestion=t}_emitClose(){this.arcgisClose.emit()}_colorizeCode(e){e!==void 0&&b(e,this._selectedSuggestion.code,"arcade")}renderSuggestionGroups(){return this.suggestions===void 0?null:S(this.suggestions)?this.suggestions.map(e=>s`<calcite-list-item-group .heading=${e.label}>${this.renderSuggestionListItems(e.suggestions)}</calcite-list-item-group>`):this.renderSuggestionListItems(this.suggestions)}renderSuggestionListItems(e){return e=f(e,"label",this._filterValue),e.length?e.map(t=>s`<calcite-list-item .label=${t.label} .description=${t.description} @calciteListItemSelect=${i=>this._emitItemSelected(i,t)} @keydown=${i=>this._emitItemSelected(i,t)} data-item=${t??c}><calcite-action slot=actions-end .text=${this.messages.expand??""} scale=s icon=chevron-right icon-flip-rtl @click=${i=>this._showSuggestionDetail(i,t)} data-item=${t??c}></calcite-action></calcite-list-item>`):s`<div class="notice-container">${this.messages.noitems}</div>`}renderSuggestionFlowItem(){let e=this._selectedSuggestion;return e?s`<calcite-flow-item heading-level=2 .heading=${this.messages.suggestions} closable @calciteFlowItemClose=${this._emitClose} .beforeBack=${this._beforeBack} selected><calcite-button width=half slot=footer appearance=outline kind=brand icon-start=code scale=s @click=${t=>this._emitItemSelected(t,e)} data-item=${e??c} ${l(h)}>${this.messages.insert}</calcite-button><calcite-block open .heading=${e.label} .description=${e.description}><div .innerHTML=${v(e.documentation)??""}></div><pre><code ${l(this._colorizeCode)}></code></pre></calcite-block></calcite-flow-item>`:null}render(){return this.closed?null:s`<style>${this._colorizeStyle}</style><calcite-flow ${l(this.flowFocusHandler)}><calcite-flow-item heading-level=2 .heading=${this.messages.suggestions} closable @calciteFlowItemClose=${this._emitClose} .selected=${!this._selectedSuggestion}><calcite-input .value=${this._filterValue} icon=magnifying-glass clearable @calciteInputInput=${this._updateFilterValue} class="sticky" scale=m></calcite-input><calcite-list label=suggestions>${this.renderSuggestionGroups()}</calcite-list></calcite-flow-item>${this.renderSuggestionFlowItem()}</calcite-flow>`}};u("arcgis-arcade-suggestions",n);export{n as ArcgisArcadeSuggestions};
|
|
@@ -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.
|
|
4
|
-
import d from"./H73JKOYZ.js";import{a as T}from"./GTATUPXR.js";import c from"./46YZN2VU.js";import b from"./QWZQVIUL.js";import{a as B}from"./AY5TB2GS.js";import"./2D45PU4R.js";import a from"./XVYJ4WNB.js";import"./GW5OH6LO.js";import"./6AIBDXKV.js";import"./ETWRTA4I.js";import"./H2ITGNXU.js";import"./XRNHDR4P.js";import"./HK7AJNG2.js";import{E as R,F as y,G as D,H as n,K as C,L as k,h as S,j as i,l as _,n as m,s as E,u as w}from"./QOAVZGYZ.js";import{a as P}from"./VXJFL73H.js";import{Hl as I,kk as z}from"./UNYMWSGX.js";import"./UUOHJKLI.js";export default $arcgis.t(([N,,{a:L,h:f},o,{a:M,b:F}])=>{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()}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===!1?null:this.renderAction({id:e.id,label:e.name,icon:e.icon,active:this.openedSidePanel===e.id,panelName:e.id}))}${this.hideDocumentationActions?null:this.renderAction({id:"developer-website-action",label:this.messages.help??"",icon:"question",active:!1,panelName:"none",iconFlipRtl:this.messages._lang==="ar",onClick:this._openArcadeHelp})}</calcite-action-group></calcite-action-bar>`}renderSidePanel(){if(this.hideSideBar)return null;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=>i`<calcite-flow class=${n(e===t.id?"code-editor-side-panel flex-panel border-inline-start":"hidden")}>${t?.useFlows?t.renderer?.({closePanel:this._toggleSidePanel,insertText:this._insertText.bind(this),closed:e!==t.id,editorRef:this.el}):i`<calcite-flow-item .heading=${t.name} heading-level=2 closable .closed=${e!==t.id} @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.84 */
|
|
4
|
+
import d from"./44GQ5ENQ.js";import{a as T}from"./5V3AU2MS.js";import c from"./5KWWFBRA.js";import b from"./6Y5QJLC2.js";import{a as B}from"./6VMHDHOO.js";import"./LNCKWEAE.js";import a from"./ARAAJHTT.js";import"./SNIPKZ5D.js";import"./U3UR7PMI.js";import"./OQUYSN7I.js";import"./KDSG4AQ2.js";import"./HB2ES4YL.js";import"./KJYFRF6Z.js";import{E as R,F as y,G as D,H as n,K as C,L as k,h as S,j as i,l as _,n as m,s as E,u as w}from"./YJM4YZTR.js";import{a as P}from"./FERNZR6V.js";import{Hl as I,kk as z}from"./3LJIRG7F.js";import"./JOZPVCEH.js";export default $arcgis.t(([N,,{a:L,h:f},o,{a:M,b:F}])=>{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()}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===!1?null:this.renderAction({id:e.id,label:e.name,icon:e.icon,active:this.openedSidePanel===e.id,panelName:e.id}))}${this.hideDocumentationActions?null:this.renderAction({id:"developer-website-action",label:this.messages.help??"",icon:"question",active:!1,panelName:"none",iconFlipRtl:this.messages._lang==="ar",onClick:this._openArcadeHelp})}</calcite-action-group></calcite-action-bar>`}renderSidePanel(){if(this.hideSideBar)return null;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=>i`<calcite-flow class=${n(e===t.id?"code-editor-side-panel flex-panel border-inline-start":"hidden")}>${t?.useFlows?t.renderer?.({closePanel:this._toggleSidePanel,insertText:this._insertText.bind(this),closed:e!==t.id,editorRef:this.el}):i`<calcite-flow-item .heading=${t.name} heading-level=2 closable .closed=${e!==t.id} @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.
|
|
4
|
-
import{a as n}from"./
|
|
3
|
+
v5.0.0-next.84 */
|
|
4
|
+
import{a as n}from"./TJOEBZIJ.js";import{a as f}from"./6VMHDHOO.js";import"./LNCKWEAE.js";import{a as g}from"./U3UR7PMI.js";import"./KDSG4AQ2.js";import{d as p,e as u}from"./KJYFRF6Z.js";import{F as c,G as d,K as h,h as m,j as s,n as a,r as o}from"./YJM4YZTR.js";import"./FERNZR6V.js";import"./JOZPVCEH.js";var b=m`:host{background-color:var(--calcite-color-foreground-1);.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}.sticky{position:sticky;top:0;z-index:10}calcite-flow{height:100%}calcite-block{p:first-of-type{margin-top:0}}calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}}`,r=class extends d{constructor(){super(...arguments),this.messages=f(),this._unselectItem=async()=>{this._selectedApiItem=void 0},this._filterValue="",this.languageId="arcade",this.hideDocumentationActions=!1,this.loading=!1,this.closed=!1,this.arcgisClose=a({bubbles:!1}),this.arcgisItemSelected=a({bubbles:!1})}static{this.properties={_filterValue:16,_selectedApiItem:16,languageId:1,apiLibrary:0,hideDocumentationActions:5,loading:5,closed:5}}static{this.styles=b}willUpdate(e){if(e.has("apiLibrary")){if(!this._selectedApiItem)return;for(let i of this.apiLibrary??[])for(let t of i.items)if(t.name===this._selectedApiItem.name){this._selectedApiItem=t;return}this._selectedApiItem=void 0}}disconnectedCallback(){super.disconnectedCallback(),this._flowObserver?.disconnect()}flowFocusHandler(e){if(!e){this._flowObserver?.disconnect(),this._flowObserver=void 0;return}this._flowObserver||(this._flowObserver=new MutationObserver(()=>{u(e.querySelector("calcite-flow-item:last-child"),"calcite-input")}),this._flowObserver.observe(e,{attributes:!0,attributeFilter:["id"],childList:!0}))}_emitItemSelected(e,i){if(!i)return;let t=e;(!t.key||t.key==="Enter")&&(e.preventDefault(),this.arcgisItemSelected.emit(i.completion.insertText??""))}_emitClose(){this.arcgisClose.emit()}_emitItemSelectedAndClose(e,i){let t=e;(!t.key||t.key==="Enter")&&(e.preventDefault(),this.arcgisItemSelected.emit(i.completion.insertText??""))}_selectItem(e,i){e.stopPropagation(),this._selectedApiItem=i}_updateFilterValue(e){this._filterValue=e.currentTarget.value??""}_elementToMarkdown(e){e!==void 0&&(e.innerHTML=n(this._selectedApiItem.examples))}renderApiCategory(e){let i=g(e.items,"name",this._filterValue);return i.length?s`<calcite-list-item-group .heading=${e.title}>${i.map(t=>s`<calcite-list-item .label=${o(t.completion.detail)} @calciteListItemSelect=${l=>this._emitItemSelected(l,t)} @keydown=${l=>this._emitItemSelected(l,t)}><calcite-action slot=actions-end .text=${this.messages.expand??""} icon=chevron-right icon-flip-rtl scale=s @click=${l=>this._selectItem(l,t)}></calcite-action></calcite-list-item>`)}</calcite-list-item-group>`:null}renderApiItemFlowItem(){let e=this._selectedApiItem;return e?s`<calcite-flow-item heading-level=2 .heading=${this.messages.constantsandfunctions} .beforeBack=${this._unselectItem} closable @calciteFlowItemClose=${this._emitClose} selected>${this.hideDocumentationActions?null:s`<calcite-button width=half slot=footer appearance=outline kind=brand scale=s .href=${e.link} target=Help icon-start=information>${this.messages.moreinformation}</calcite-button>`}<calcite-button .width=${this.hideDocumentationActions?"full":"half"} slot=footer appearance=outline kind=brand icon-start=code scale=s @click=${i=>this._emitItemSelectedAndClose(i,e)} ${c(p)}>${this.messages.insert}</calcite-button><calcite-block open .heading=${o(e.completion.detail)}><div .innerHTML=${n(e.completion.documentation)??""}></div>${e.examples?s`<div ${c(this._elementToMarkdown)}></div>`:null}</calcite-block></calcite-flow-item>`:null}render(){if(this.closed)return null;let e=(this.apiLibrary??[]).map(t=>this.renderApiCategory(t)),i=e.every(t=>!t);return s`<calcite-flow ${c(this.flowFocusHandler)}><calcite-flow-item heading-level=2 .heading=${this.messages.constantsandfunctions} closable @calciteFlowItemClose=${this._emitClose} .selected=${!this._selectedApiItem}><calcite-input .value=${this._filterValue} icon=magnifying-glass clearable @calciteInputInput=${this._updateFilterValue} class="sticky" scale=m></calcite-input>${this.loading?s`<calcite-loader scale=s type=indeterminate .label=${this.messages.loading??"Loading"}></calcite-loader>`:s`<calcite-list label="arcade api">${i?s`<div class="notice-container">${this.messages.noitems}</div>`:e}</calcite-list>`}</calcite-flow-item>${this.renderApiItemFlowItem()}</calcite-flow>`}};h("arcgis-language-api-panel",r);export{r as ArcgisLanguageApiPanel};
|
|
@@ -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.
|
|
4
|
-
import c from"./
|
|
3
|
+
v5.0.0-next.84 */
|
|
4
|
+
import c from"./44GQ5ENQ.js";import b from"./5KWWFBRA.js";import{a as u}from"./R64NEFA4.js";import{a as m}from"./MTMFT4XD.js";import a from"./I6JGARO3.js";import{a as t}from"./OQUYSN7I.js";import{Pl as d,Sl as s,kk as k}from"./3LJIRG7F.js";export default $arcgis.t(([a,n,{c:c}])=>{k();var w=["arcade","arcgis-sql-expression"],i=new Set,p=new Map;function f(e){let r=p.get(e);return r||(r=Promise.withResolvers(),p.set(e,r)),r}function l(e){f(e).resolve()}function A(e){return w.includes(e)?f(e).promise:Promise.resolve()}function h(e,r){return()=>{i.has(e)||i.add(e),r()}}async function R(e){i.has(e)||(await t()).createModel("",e,d.parse("")).dispose()}x();function x(){t().then(e=>{["light","dark"].forEach(r=>{let g=r==="light"?"vs":"vs-dark",o=u[`${r}-theme`];e.defineTheme(g,{base:g,inherit:!0,rules:[{token:"comment.arcgis",foreground:o.comment},{token:"constant.arcgis",foreground:o.constant},{token:"keyword.arcgis",foreground:o.keyword},{token:"identifier.arcgis",foreground:o.identifier},{token:"number.arcgis",foreground:o.number},{token:"string.arcgis",foreground:o.string},{token:"operator.arcgis",foreground:o.operator},{token:"predefined.arcgis",foreground:o.predefined},{token:"date.arcgis",foreground:o.date}],colors:{}})})})}s.register({id:a.languageId,aliases:["EsiSqlExpression","sql-expression"],extensions:[".sql-expression"],mimetypes:["application/sql-expression"]});s.onLanguage(a.languageId,h(a.languageId,()=>{m().then(e=>{e.setupMode(a),l(a.languageId)}).catch(e=>{throw e})}));s.register({id:n.languageId,aliases:["Arcade","arcade"],extensions:[".arc"],mimetypes:["application/arcade"]});s.onLanguage(n.languageId,h(n.languageId,()=>{c().then(e=>{e.setupMode(n),l(n.languageId)}).catch(e=>{throw e})}));return{a:A,b:R}},a,b,c)
|
|
@@ -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.
|
|
4
|
-
import{Tl as a}from"./
|
|
3
|
+
v5.0.0-next.84 */
|
|
4
|
+
import{Tl as a}from"./3LJIRG7F.js";import"./JOZPVCEH.js";var p=Object.defineProperty,m=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyNames,c=Object.prototype.hasOwnProperty,s=(t,e,n,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of l(e))!c.call(t,r)&&r!==n&&p(t,r,{get:()=>e[r],enumerable:!(o=m(e,r))||o.enumerable});return t},u=(t,e,n)=>(s(t,e,"default"),n&&s(n,e,"default")),i={};u(i,a);var d=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],b={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:["<!--","-->"]},brackets:[["<!--","-->"],["<",">"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${d.join("|")}))([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:i.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${d.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:i.languages.IndentAction.Indent}}],folding:{markers:{start:new RegExp("^\\s*<!--\\s*#region\\b.*-->"),end:new RegExp("^\\s*<!--\\s*#endregion\\b.*-->")}}},x={defaultToken:"",tokenPostfix:".html",ignoreCase:!0,tokenizer:{root:[[/<!DOCTYPE/,"metatag","@doctype"],[/<!--/,"comment","@comment"],[/(<)((?:[\w\-]+:)?[\w\-]+)(\s*)(\/>)/,["delimiter","tag","","delimiter"]],[/(<)(script)/,["delimiter",{token:"tag",next:"@script"}]],[/(<)(style)/,["delimiter",{token:"tag",next:"@style"}]],[/(<)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/(<\/)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/</,"delimiter"],[/[^<]+/]],doctype:[[/[^>]+/,"metatag.content"],[/>/,"metatag","@pop"]],comment:[[/-->/,"comment","@pop"],[/[^-]+/,"comment.content"],[/./,"comment.content"]],otherTag:[[/\/?>/,"delimiter","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],scriptAfterType:[[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/"module"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.text/javascript"}],[/'module'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.text/javascript"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/>/,{token:"delimiter",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]],style:[[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],styleAfterType:[[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/>/,{token:"delimiter",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]]}};export{b as conf,x as language};
|
|
@@ -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.
|
|
4
|
-
import{a as A,b as Rt}from"./
|
|
3
|
+
v5.0.0-next.84 */
|
|
4
|
+
import{a as A,b as Rt}from"./FERNZR6V.js";var Y=globalThis,Z=Y.ShadowRoot&&(Y.ShadyCSS===void 0||Y.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,yt=Symbol(),Mt=new WeakMap,k=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==yt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(Z&&t===void 0){let s=e!==void 0&&e.length===1;s&&(t=Mt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&Mt.set(e,t))}return t}toString(){return this.cssText}},It=o=>new k(typeof o=="string"?o:o+"",void 0,yt),me=(o,...t)=>{let e=o.length===1?o[0]:t.reduce(((s,r,i)=>s+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+o[i+1]),o[0]);return new k(e,o,yt)},kt=(o,t)=>{if(Z)o.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(let e of t){let s=document.createElement("style"),r=Y.litNonce;r!==void 0&&s.setAttribute("nonce",r),s.textContent=e.cssText,o.appendChild(s)}},gt=Z?o=>o:o=>o instanceof CSSStyleSheet?(t=>{let e="";for(let s of t.cssRules)e+=s.cssText;return It(e)})(o):o;var{is:ye,defineProperty:ge,getOwnPropertyDescriptor:ve,getOwnPropertyNames:Ee,getOwnPropertySymbols:$e,getPrototypeOf:be}=Object,tt=globalThis,jt=tt.trustedTypes,_e=jt?jt.emptyScript:"",Ae=tt.reactiveElementPolyfillSupport,j=(o,t)=>o,X={toAttribute(o,t){switch(t){case Boolean:o=o?_e:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,t){let e=o;switch(t){case Boolean:e=o!==null;break;case Number:e=o===null?null:Number(o);break;case Object:case Array:try{e=JSON.parse(o)}catch{e=null}}return e}},H=(o,t)=>!ye(o,t),Ht={attribute:!0,type:String,converter:X,reflect:!1,useDefault:!1,hasChanged:H};Symbol.metadata??=Symbol("metadata"),tt.litPropertyMetadata??=new WeakMap;var b=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=Ht){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let s=Symbol(),r=this.getPropertyDescriptor(t,s,e);r!==void 0&&ge(this.prototype,t,r)}}static getPropertyDescriptor(t,e,s){let{get:r,set:i}=ve(this.prototype,t)??{get(){return this[e]},set(n){this[e]=n}};return{get:r,set(n){let a=r?.call(this);i?.call(this,n),this.requestUpdate(t,a,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Ht}static _$Ei(){if(this.hasOwnProperty(j("elementProperties")))return;let t=be(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(j("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(j("properties"))){let e=this.properties,s=[...Ee(e),...$e(e)];for(let r of s)this.createProperty(r,e[r])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[s,r]of e)this.elementProperties.set(s,r)}this._$Eh=new Map;for(let[e,s]of this.elementProperties){let r=this._$Eu(e,s);r!==void 0&&this._$Eh.set(r,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let s=new Set(t.flat(1/0).reverse());for(let r of s)e.unshift(gt(r))}else t!==void 0&&e.push(gt(t));return e}static _$Eu(t,e){let s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return kt(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$ET(t,e){let s=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,s);if(r!==void 0&&s.reflect===!0){let i=(s.converter?.toAttribute!==void 0?s.converter:X).toAttribute(e,s.type);this._$Em=t,i==null?this.removeAttribute(r):this.setAttribute(r,i),this._$Em=null}}_$AK(t,e){let s=this.constructor,r=s._$Eh.get(t);if(r!==void 0&&this._$Em!==r){let i=s.getPropertyOptions(r),n=typeof i.converter=="function"?{fromAttribute:i.converter}:i.converter?.fromAttribute!==void 0?i.converter:X;this._$Em=r,this[r]=n.fromAttribute(e,i.type)??this._$Ej?.get(r)??null,this._$Em=null}}requestUpdate(t,e,s){if(t!==void 0){let r=this.constructor,i=this[t];if(s??=r.getPropertyOptions(t),!((s.hasChanged??H)(i,e)||s.useDefault&&s.reflect&&i===this._$Ej?.get(t)&&!this.hasAttribute(r._$Eu(t,s))))return;this.C(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:r,wrapped:i},n){s&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,n??e??this[t]),i!==!0||n!==void 0)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),r===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[r,i]of this._$Ep)this[r]=i;this._$Ep=void 0}let s=this.constructor.elementProperties;if(s.size>0)for(let[r,i]of s){let{wrapped:n}=i,a=this[r];n!==!0||this._$AL.has(r)||a===void 0||this.C(r,void 0,i,a)}}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((s=>s.hostUpdate?.())),this.update(e)):this._$EM()}catch(s){throw t=!1,this._$EM(),s}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((e=>e.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((e=>this._$ET(e,this[e]))),this._$EM()}updated(t){}firstUpdated(t){}};b.elementStyles=[],b.shadowRootOptions={mode:"open"},b[j("elementProperties")]=new Map,b[j("finalized")]=new Map,Ae?.({ReactiveElement:b}),(tt.reactiveElementVersions??=[]).push("2.1.0");var Et=globalThis,et=Et.trustedTypes,Vt=et?et.createPolicy("lit-html",{createHTML:o=>o}):void 0,$t="$lit$",_=`lit$${Math.random().toFixed(9).slice(2)}$`,bt="?"+_,Ce=`<${bt}>`,S=document,z=()=>S.createComment(""),B=o=>o===null||typeof o!="object"&&typeof o!="function",_t=Array.isArray,Gt=o=>_t(o)||typeof o?.[Symbol.iterator]=="function",vt=`[
|
|
5
5
|
\f\r]`,V=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,zt=/-->/g,Bt=/>/g,w=RegExp(`>|${vt}(?:([^\\s"'>=/]+)(${vt}*=${vt}*(?:[^
|
|
6
6
|
\f\r"'\`<>=]|("|')|))|$)`,"g"),Wt=/'/g,Ft=/"/g,Kt=/^(?:script|style|textarea|title)$/i,At=o=>(t,...e)=>({_$litType$:o,strings:t,values:e}),ns=At(1),as=At(2),cs=At(3),f=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),qt=new WeakMap,O=S.createTreeWalker(S,129);function Qt(o,t){if(!_t(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return Vt!==void 0?Vt.createHTML(t):t}var Jt=(o,t)=>{let e=o.length-1,s=[],r,i=t===2?"<svg>":t===3?"<math>":"",n=V;for(let a=0;a<e;a++){let c=o[a],l,u,h=-1,y=0;for(;y<c.length&&(n.lastIndex=y,u=n.exec(c),u!==null);)y=n.lastIndex,n===V?u[1]==="!--"?n=zt:u[1]!==void 0?n=Bt:u[2]!==void 0?(Kt.test(u[2])&&(r=RegExp("</"+u[2],"g")),n=w):u[3]!==void 0&&(n=w):n===w?u[0]===">"?(n=r??V,h=-1):u[1]===void 0?h=-2:(h=n.lastIndex-u[2].length,l=u[1],n=u[3]===void 0?w:u[3]==='"'?Ft:Wt):n===Ft||n===Wt?n=w:n===zt||n===Bt?n=V:(n=w,r=void 0);let g=n===w&&o[a+1].startsWith("/>")?" ":"";i+=n===V?c+Ce:h>=0?(s.push(l),c.slice(0,h)+$t+c.slice(h)+_+g):c+_+(h===-2?a:g)}return[Qt(o,i+(o[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]},W=class o{constructor({strings:t,_$litType$:e},s){let r;this.parts=[];let i=0,n=0,a=t.length-1,c=this.parts,[l,u]=Jt(t,e);if(this.el=o.createElement(l,s),O.currentNode=this.el.content,e===2||e===3){let h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(r=O.nextNode())!==null&&c.length<a;){if(r.nodeType===1){if(r.hasAttributes())for(let h of r.getAttributeNames())if(h.endsWith($t)){let y=u[n++],g=r.getAttribute(h).split(_),C=/([.?@])?(.*)/.exec(y);c.push({type:1,index:i,name:C[2],strings:g,ctor:C[1]==="."?ot:C[1]==="?"?rt:C[1]==="@"?it:P}),r.removeAttribute(h)}else h.startsWith(_)&&(c.push({type:6,index:i}),r.removeAttribute(h));if(Kt.test(r.tagName)){let h=r.textContent.split(_),y=h.length-1;if(y>0){r.textContent=et?et.emptyScript:"";for(let g=0;g<y;g++)r.append(h[g],z()),O.nextNode(),c.push({type:2,index:++i});r.append(h[y],z())}}}else if(r.nodeType===8)if(r.data===bt)c.push({type:2,index:i});else{let h=-1;for(;(h=r.data.indexOf(_,h+1))!==-1;)c.push({type:7,index:i}),h+=_.length-1}i++}}static createElement(t,e){let s=S.createElement("template");return s.innerHTML=t,s}};function T(o,t,e=o,s){if(t===f)return t;let r=s!==void 0?e._$Co?.[s]:e._$Cl,i=B(t)?void 0:t._$litDirective$;return r?.constructor!==i&&(r?._$AO?.(!1),i===void 0?r=void 0:(r=new i(o),r._$AT(o,e,s)),s!==void 0?(e._$Co??=[])[s]=r:e._$Cl=r),r!==void 0&&(t=T(o,r._$AS(o,t.values),r,s)),t}var st=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:s}=this._$AD,r=(t?.creationScope??S).importNode(e,!0);O.currentNode=r;let i=O.nextNode(),n=0,a=0,c=s[0];for(;c!==void 0;){if(n===c.index){let l;c.type===2?l=new U(i,i.nextSibling,this,t):c.type===1?l=new c.ctor(i,c.name,c.strings,this,t):c.type===6&&(l=new nt(i,this,t)),this._$AV.push(l),c=s[++a]}n!==c?.index&&(i=O.nextNode(),n++)}return O.currentNode=S,r}p(t){let e=0;for(let s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}},U=class o{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,s,r){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=T(this,t,e),B(t)?t===d||t==null||t===""?(this._$AH!==d&&this._$AR(),this._$AH=d):t!==this._$AH&&t!==f&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Gt(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==d&&B(this._$AH)?this._$AA.nextSibling.data=t:this.T(S.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:s}=t,r=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=W.createElement(Qt(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===r)this._$AH.p(e);else{let i=new st(r,this),n=i.u(this.options);i.p(e),this.T(n),this._$AH=i}}_$AC(t){let e=qt.get(t.strings);return e===void 0&&qt.set(t.strings,e=new W(t)),e}k(t){_t(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,s,r=0;for(let i of t)r===e.length?e.push(s=new o(this.O(z()),this.O(z()),this,this.options)):s=e[r],s._$AI(i),r++;r<e.length&&(this._$AR(s&&s._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){let s=t.nextSibling;t.remove(),t=s}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},P=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,r,i){this.type=1,this._$AH=d,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=i,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=d}_$AI(t,e=this,s,r){let i=this.strings,n=!1;if(i===void 0)t=T(this,t,e,0),n=!B(t)||t!==this._$AH&&t!==f,n&&(this._$AH=t);else{let a=t,c,l;for(t=i[0],c=0;c<i.length-1;c++)l=T(this,a[s+c],e,c),l===f&&(l=this._$AH[c]),n||=!B(l)||l!==this._$AH[c],l===d?t=d:t!==d&&(t+=(l??"")+i[c+1]),this._$AH[c]=l}n&&!r&&this.j(t)}j(t){t===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},ot=class extends P{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===d?void 0:t}},rt=class extends P{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==d)}},it=class extends P{constructor(t,e,s,r,i){super(t,e,s,r,i),this.type=5}_$AI(t,e=this){if((t=T(this,t,e,0)??d)===f)return;let s=this._$AH,r=t===d&&s!==d||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,i=t!==d&&(s===d||r);r&&this.element.removeEventListener(this.name,this,s),i&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},nt=class{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){T(this,t)}},Yt={M:$t,P:_,A:bt,C:1,L:Jt,R:st,D:Gt,V:T,I:U,H:P,N:rt,U:it,B:ot,F:nt},we=Et.litHtmlPolyfillSupport;we?.(W,U),(Et.litHtmlVersions??=[]).push("3.3.0");var Ct=(o,t,e)=>{let s=e?.renderBefore??t,r=s._$litPart$;if(r===void 0){let i=e?.renderBefore??null;s._$litPart$=r=new U(t.insertBefore(z(),i),i,void 0,e??{})}return r._$AI(o),r};var wt=globalThis,$=class extends b{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Ct(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return f}};$._$litElement$=!0,$.finalized=!0,wt.litElementHydrateSupport?.({LitElement:$});var Oe=wt.litElementPolyfillSupport;Oe?.({LitElement:$});(wt.litElementVersions??=[]).push("4.2.0");var p=(o,t,...e)=>{try{return o?.call(t,...e)}catch(s){console.error(s,o)}},F=async(o,t,...e)=>{try{return await o?.call(t,...e)}catch(s){console.error(s,o)}};var G=Symbol.for("controller"),Se=o=>typeof o=="object"&&o!==null&&(G in o||"hostConnected"in o||"hostDisconnected"in o||"hostUpdate"in o||"hostUpdated"in o),_s=o=>typeof o?.then=="function";var q,x=o=>{q!==o&&(q=o,queueMicrotask(()=>q===o?q=void 0:0))},K=o=>q,N=[],Zt=o=>{if(o===void 0){N=[];return}let t=N.indexOf(o);N=t===-1?[...N,o]:N.slice(0,t+1),queueMicrotask(()=>N=[])},Xt=()=>N,R,As=o=>{R!==o&&(R=o,queueMicrotask(()=>R===o?R=void 0:0))},Te=()=>{let o=R;return R=void 0,o},te=async(o,t)=>{let e=ct(o);if(e===void 0)return o;if(await e.ready,typeof t=="function"){let s=e.watchExports(r=>t(r,s))}return e.exports},ee=async o=>{let t=ct(o);return await t.ready,t},ct=o=>{let e=K().manager.X(o);if(e!==void 0)return e;if(Se(o))return o;let s=Te();if(s!==void 0)return s},at=!1,Cs=o=>{at=!0;try{return o()}finally{at=!1}};var Pe=(o,t,e)=>{let s=Object.keys(o),r=s.length;M===void 0&&queueMicrotask(I),M??=new Map;let i=M.get(o);return i===void 0&&(i={callbacks:[],keyCount:r},M.set(o,i)),i.keyCount!==r&&(i.callbacks.forEach(n=>n(s)),i.callbacks=[],i.keyCount=r),i.callbacks.push(n=>{let a=l=>p(t,null,l),c=n[r];c===void 0?a(void 0):o[c]===e?a(c):a(void 0)}),e},M,I=()=>{M?.forEach(({callbacks:o},t)=>{let e=Object.keys(t);o.forEach(s=>s(e))}),M=void 0},Ne=(o,t,e)=>{let s=o.manager;return s.V!==d&&s.V!==e&&s.S(void 0,void 0),s.T.length===0&&queueMicrotask(()=>s.S(void 0,void 0)),s.V=e,s.T.push((r,i)=>p(t,void 0,e===i?r:void 0)),e},xe=(o=[K(),...Xt()],t,e)=>{let s=Array.isArray(o)?o:[o],r=s.length+1,i=n=>{r-=1,n!==void 0&&(r=Math.min(r,0)),r===0&&t(n)};s.forEach(n=>Pe(n,a=>i(a===void 0?void 0:{key:a,host:n,isReactive:!1}),e));for(let n of s)if("manager"in n&&n.manager.component===n){Ne(n,a=>i(a===void 0?void 0:{key:a,host:n,isReactive:!0}),e);break}return e},De=(o="",t={},e=K())=>{let s={emit:r=>{o===""&&I();let i=new CustomEvent(o,{detail:r,cancelable:!0,bubbles:!0,composed:!0,...t});return e.el.dispatchEvent(i),i}};return o===""&&xe(void 0,r=>o=r.key,s),s},Le=De.bind(null,""),re;re=G;var Ot=class{constructor(t){this.#t=[],this.#e=[],this.#s=[],this.#o=[],this.#r=[],this.#c=[],this.#l=[],this.#p=[],this.#h=[],this.#d=!1,this.P=new A,this.connectedCalled=!1,this.loadedCalled=!1,this[re]=!0,this.#a=[];let e=this,s=t??K(new.target.name);e.#i=s,e.ready=e.P.promise,e.#n=oe(e),e.component=s,e.#i.addController(e),e.#i.manager===void 0||(Zt(e),queueMicrotask(()=>e.catchUpLifecycle()))}#t;#e;#s;#o;#r;#c;#l;#p;#h;#d;#i;catchUpLifecycle(){let{manager:t}=this.#i;t.connectedCalled&&!this.connectedCalled&&this.triggerConnected(),t.#d&&this.triggerLoad().then(()=>t.loadedCalled&&this.triggerLoaded()).catch(console.error)}#n;get exports(){return this.#n}set exports(t){let e=this.#n;e!==t&&(this.#n=t,this.#a.forEach(p),this.connectedCalled&&this.O!==!1&&this.#i.requestUpdate(this.O,e)),this.P.resolve(t)}setProvisionalExports(t,e=!0){this.#n=e?oe(t):t,this.#a.forEach(p)}#a;watchExports(t){let e=()=>t(this.#n);return this.#a.push(e),()=>void this.#a.splice(this.#a.indexOf(e),1)}get use(){return x(this.#i),te}get useRef(){return x(this.#i),ee}get useRefSync(){return x(this.#i),ct}controllerRemoved(){this.#i.el.isConnected&&this.triggerDisconnected(),this.triggerDestroy()}onConnected(t){this.#t.push(t)}onDisconnected(t){this.#e.push(t)}onLoad(t){this.#s.push(t)}onLoaded(t){this.#o.push(t)}onUpdate(t){this.#r.push(t)}onUpdated(t){this.#c.push(t)}onDestroy(t){this.#l.push(t)}onLifecycle(t){this.#p.push(t),this.connectedCalled&&this.#i.el.isConnected&&this.#u(t)}triggerConnected(){let t=this;t.hostConnected&&p(t.hostConnected,t),t.#t.forEach(p),t.triggerLifecycle(),t.connectedCalled=!0}triggerDisconnected(){let t=this;t.hostDisconnected&&p(t.hostDisconnected,t),t.#e.forEach(p),t.#h.forEach(p),t.#h=[]}async triggerLoad(){if(this.#d)return;this.#d=!0;let t=this;t.hostLoad&&await F(t.hostLoad,t),this.#s.length>0&&await Promise.allSettled(this.#s.map(F)),this.P.resolve(this.#n)}triggerLoaded(){this.loadedCalled||(this.hostLoaded&&p(this.hostLoaded,this),this.#o.forEach(p),this.loadedCalled=!0)}triggerUpdate(t){this.hostUpdate&&p(this.hostUpdate,this,t),this.#r.forEach(se,t)}triggerUpdated(t){this.hostUpdated&&p(this.hostUpdated,this,t),this.#c.forEach(se,t)}triggerDestroy(){this.hostDestroy&&p(this.hostDestroy,this),this.#l.forEach(p)}triggerLifecycle(){this.hostLifecycle&&this.#u(()=>this.hostLifecycle()),this.#p.forEach(this.#u,this)}#u(t){x(this.#i);let e=p(t);(Array.isArray(e)?e:[e]).forEach(r=>{typeof r=="function"?this.#h.push(r):typeof r=="object"&&typeof r.remove=="function"&&this.#h.push(r.remove)})}};function se(o){p(o,void 0,this)}var ie=Ot,oe=o=>{if(typeof o!="object"&&typeof o!="function"||o===null)return o;let t={get(s,r,i){if(!((r==="exports"||r==="_exports")&&r in s&&s[r]===e)&&(r in s||r in Promise.prototype||typeof r=="symbol"))return typeof s=="function"?s[r]:Reflect.get(s,r,i)}},e=new Proxy(o,t);return e};var lt=o=>o.replace(Ue,(t,e)=>`${e===0?"":"-"}${t.toLowerCase()}`),Ue=/[A-Z]+(?![a-z])|[A-Z]/gu;var ne=(o,t)=>new Array(t+1).join(o),Ds=o=>{let t='"',e="'";o.includes(t)&&!o.includes(e)&&(e='"',t="'");let r=new RegExp(`(^|[^\\\\])((?:\\\\{2})*)((?:\\\\${e})+)`,"gu");o=o.replace(r,(n,a,c,l)=>a+c+ne(e,l.length/2));let i=new RegExp(`(^|[^\\\\])((?:\\\\{2})*)(${t}+)`,"gu");return o=o.replace(i,(n,a,c,l)=>a+c+ne(`\\${t}`,l.length)),t+o+t},Ls=o=>{let t=o?o.replaceAll(/[-[\]/{}()*+?.\\^$|]/gu,"\\$&"):"^.*$";return new RegExp(t,"i")},Us=o=>`\u200E${o??""}\u200E`,Re="randomUUID"in crypto,Rs=()=>{if(Re)return crypto.randomUUID();let o=crypto.getRandomValues(new Uint16Array(8));o[3]=o[3]&4095|16384,o[4]=o[4]&16383|32768;let t=e=>o[e].toString(16).padStart(4,"0");return`${t(0)+t(1)}-${t(2)}-${t(3)}-${t(4)}-${t(5)}${t(6)}${t(7)}`};var Ms=(o,t={})=>(o??"").replace(/\{(?<valueName>.*?)\}/gu,(e,s)=>t[s]??e);var Tt=o=>{let t=o;for(;t=t.parentNode??t.host;)if(t?.constructor?.lumina){let e=t;return e.manager?.loadedCalled||(e.J??e._offspring).push(o),(e.I??e._postLoad).promise}return!1},Pt={};function Nt(){}var Me=(o,t)=>function(s,r){if(!globalThis.customElements)return;let n=(r??s??{}).resourcesUrl;n&&o.setAssetPath(n);for(let[a,[c,l=""]]of Object.entries(t)){if(customElements.get(a))continue;let[u,h,y]=l.split(";"),g=u?u?.split(",").map(Ie):void 0,C=g?.map(([L])=>L),D=class extends St{static{this.observedAttributes=g?.map(([,L])=>L).filter(L=>L!=="")}static{this.C=C}static{this.E=h?h?.split(","):void 0}static{this.D=y?.split(",")}static{this.L=a}static{this.K=o}constructor(){!D.B&&(D.B=c(),D.F()),super()}};customElements.define(a,D)}},ht=Object.defineProperty,Ie=o=>{let t=o.split(":");return t.length===1?[t[0],lt(t[0])]:t},ke=globalThis.HTMLElement??Nt,St=class extends ke{constructor(){super(),this.#e={},this.#s=[],this.I=new A,this.H=new A,this.J=[];let t=this,e=t.constructor;t._offspring=t.J,t._postLoad=t.I,e.C?.forEach(s=>{Object.hasOwn(t,s)&&(t.#e[s]=t[s],delete t[s])}),e.A?t.#o({a:e.A}):e.B.then(async s=>{await e.K.p,t.#o(await(s.default?.then(r=>typeof r=="function"?{a:r}:r)??s))}).catch(s=>{t.H.reject(s),setTimeout(()=>{throw s})})}static{this.lumina=!0}static F(){for(let t of this.C??[])ht(this.prototype,t,{configurable:!0,enumerable:!0,get(){return this.#e[t]},set(e){this.#e[t]=e}});for(let t of this.E??[])ht(this.prototype,t,{async value(...e){return this.#t||await this.H.promise,await this.#t[t](...e)},configurable:!0});for(let t of this.D??[])ht(this.prototype,t,{value(...e){return this.#t[t](...e)},configurable:!0})}#t;#e;#s;get manager(){return this.#t?.manager}attributeChangedCallback(t,e,s){this.#t?.attributeChangedCallback(t,e,s),this.#t||this.#s.push(t)}connectedCallback(){this.#t?this.#t.connectedCallback?.():queueMicrotask(()=>this.G=Tt(this))}disconnectedCallback(){this.#t?.disconnectedCallback?.()}async componentOnReady(){return await this.H.promise,this}#o(t){let e=this.constructor,s=e.L,r=this.#e,i=Object.values(t).find(h=>h.L===s),n=`${s}--lazy`,a=i;for(;a&&!Object.hasOwn(a,"lumina");)a=Object.getPrototypeOf(a);He(a),!e.A&&(e.A=i,customElements.define(n,i)),i.N=this;let l=document.createElement(n);i.N=void 0,this.#t=l,this.#e=l,this.#s.forEach(h=>l.attributeChangedCallback(h,null,this.getAttribute(h))),Object.entries(r).forEach(je,l);let u=this.isConnected;(u||this.G)&&(l.connectedCallback?.(),u||l.disconnectedCallback())}addController(){}requestUpdate(){this.#t?.requestUpdate()}};function je([o,t]){this[o]=t}var He=o=>{let t=o.prototype,e=Element.prototype;Object.hasOwn(t,"isConnected")||(t.setAttribute=function(r,i){e.setAttribute.call(this.el,r,i)},t.removeAttribute=function(r){e.removeAttribute.call(this.el,r)},ht(t,"isConnected",{get(){return Reflect.get(e,"isConnected",this.el)}}))};var{I:Ve}=Yt;var dt=o=>o.strings===void 0,ce=()=>document.createComment(""),Fs=(o,t,e)=>{let s=o._$AA.parentNode,r=t===void 0?o._$AB:t._$AA;if(e===void 0){let i=s.insertBefore(ce(),r),n=s.insertBefore(ce(),r);e=new Ve(i,n,o,o.options)}else{let i=e._$AB.nextSibling,n=e._$AM,a=n!==o;if(a){let c;e._$AQ?.(o),e._$AM=o,e._$AP!==void 0&&(c=o._$AU)!==n._$AU&&e._$AP(c)}if(i!==r||a){let c=e._$AA;for(;c!==i;){let l=c.nextSibling;s.insertBefore(c,r),c=l}}}return e},qs=(o,t,e=o)=>(o._$AI(t,e),o),ze={},le=(o,t=ze)=>o._$AH=t,Gs=o=>o._$AH,Ks=o=>{o._$AP?.(!1,!0);let t=o._$AA,e=o._$AB.nextSibling;for(;t!==e;){let s=t.nextSibling;t.remove(),t=s}};var m={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},E=o=>(...t)=>({_$litDirective$:o,values:t}),v=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,s){this._$Ct=t,this._$AM=e,this._$Ci=s}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};var Q=(o,t)=>{let e=o._$AN;if(e===void 0)return!1;for(let s of e)s._$AO?.(t,!1),Q(s,t);return!0},pt=o=>{let t,e;do{if((t=o._$AM)===void 0)break;e=t._$AN,e.delete(o),o=t}while(e?.size===0)},he=o=>{for(let t;t=o._$AM;o=t){let e=t._$AN;if(e===void 0)t._$AN=e=new Set;else if(e.has(o))break;e.add(o),Fe(t)}};function Be(o){this._$AN!==void 0?(pt(this),this._$AM=o,he(this)):this._$AM=o}function We(o,t=!1,e=0){let s=this._$AH,r=this._$AN;if(r!==void 0&&r.size!==0)if(t)if(Array.isArray(s))for(let i=e;i<s.length;i++)Q(s[i],!1),pt(s[i]);else s!=null&&(Q(s,!1),pt(s));else Q(this,o)}var Fe=o=>{o.type==m.CHILD&&(o._$AP??=We,o._$AQ??=Be)},ut=class extends v{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,s){super._$AT(t,e,s),he(this),this.isConnected=t._$AU}_$AO(t,e=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),e&&(Q(this,t),pt(this))}setValue(t){if(dt(this._$Ct))this._$Ct._$AI(t,this);else{let e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}};var ro=()=>new Dt,Dt=class{},xt=new WeakMap,Lt=E(class extends ut{render(o){return d}update(o,[t]){let e=t!==this.G;return e&&this.G!==void 0&&this.rt(void 0),(e||this.lt!==this.ct)&&(this.G=t,this.ht=o.options?.host,this.rt(this.ct=o.element)),d}rt(o){if(this.isConnected||(o=void 0),typeof this.G=="function"){let t=this.ht??globalThis,e=xt.get(t);e===void 0&&(e=new WeakMap,xt.set(t,e)),e.get(this.G)!==void 0&&this.G.call(this.ht,void 0),e.set(this.G,o),o!==void 0&&this.G.call(this.ht,o)}else this.G.value=o}get lt(){return typeof this.G=="function"?xt.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var ft=class extends ie{constructor(t){super(t),this.destroyed=!1,this.R=!1,this.V=d,this.T=[],this.#s=new WeakMap,this.#e=t,this.exports=void 0,this.hasDestroy=mt in t&&typeof t.destroy=="function",$.prototype.addController.call(t,{hostConnected:()=>{if(this.destroyed){let e=t.el.localName;throw t.el.remove(),new Error(`The ${e} component has already been destroyed. It cannot be used again. If you meant to disconnect and reconnect a component without automatic destroy, set the ${mt} prop.`)}this.#t!==void 0&&clearTimeout(this.#t),I();for(let e of t.M)"triggerConnected"in e?e.triggerConnected():p(e.hostConnected,e)},hostDisconnected:()=>{for(let e of t.M)"triggerDisconnected"in e?e.triggerDisconnected():p(e.hostDisconnected,e);this.hasDestroy&&!this.destroyed&&this.U()},hostUpdate:()=>{for(let e of t.M)"triggerUpdate"in e?e.triggerUpdate(this.Q):p(e.hostUpdate,e,this.Q)},hostUpdated:()=>{for(let e of t.M)"triggerUpdated"in e?e.triggerUpdated(this.Q):p(e.hostUpdated,e,this.Q);this.Q=void 0}}),queueMicrotask(()=>this.R=!0),x(t)}#t;#e;async destroy(){if(!this.destroyed){this.#e.el.isConnected&&(this.hasDestroy=!1,this.#e.el.remove()),this.#t=void 0,this.destroyed=!0;for(let t of this.#e.M)"triggerDestroy"in t?t.triggerDestroy():p(t.hostDestroy,t);this.#e.M.splice(0)}}U(){if(this.#t!==void 0&&clearTimeout(this.#t),!this.#e.el.isConnected&&!this.#e.autoDestroyDisabled){let t=()=>void this.#e.destroy();this.#t=Rt(t,Ge)}}S(t,e){let s=this.T;this.V=d,this.T=[],s.forEach(r=>r(t,e))}#s;W(t,e){(typeof e=="object"&&e!==null||typeof e=="function")&&this.#s.set(e,t)}X(t){if(typeof t=="object"&&t!==null||typeof t=="function")return this.#s.get(t)}},Ge=1e3,mt="autoDestroyDisabled";var de=E(class extends v{constructor(o){if(super(o),o.type!==m.ATTRIBUTE||o.name!=="class"||o.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(o){return" "+Object.keys(o).filter((t=>o[t])).join(" ")+" "}update(o,[t]){if(this.st===void 0){this.st=new Set,o.strings!==void 0&&(this.nt=new Set(o.strings.join(" ").split(/\s/).filter((s=>s!==""))));for(let s in t)t[s]&&!this.nt?.has(s)&&this.st.add(s);return this.render(t)}let e=o.element.classList;for(let s of this.st)s in t||(e.remove(s),this.st.delete(s));for(let s in t){let r=!!t[s];r===this.st.has(s)||this.nt?.has(s)||(r?(e.add(s),this.st.add(s)):(e.remove(s),this.st.delete(s)))}return f}});var pe="important",Ke=" !"+pe,Qe=E(class extends v{constructor(o){if(super(o),o.type!==m.ATTRIBUTE||o.name!=="style"||o.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(o){return Object.keys(o).reduce(((t,e)=>{let s=o[e];return s==null?t:t+`${e=e.includes("-")?e:e.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${s};`}),"")}update(o,[t]){let{style:e}=o.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(let s of this.ft)t[s]==null&&(this.ft.delete(s),s.includes("-")?e.removeProperty(s):e[s]=null);for(let s in t){let r=t[s];if(r!=null){this.ft.add(s);let i=typeof r=="string"&&r.endsWith(Ke);s.includes("-")||i?e.setProperty(s,i?r.slice(0,-11):r,i?pe:""):e[s]=r}}return f}});var Je=E(class extends v{constructor(o){if(super(o),o.type!==m.PROPERTY&&o.type!==m.ATTRIBUTE&&o.type!==m.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!dt(o))throw Error("`live` bindings can only contain a single expression")}render(o){return o}update(o,[t]){if(t===f||t===d)return t;let e=o.element,s=o.name;if(o.type===m.PROPERTY){if(t===e[s])return f}else if(o.type===m.BOOLEAN_ATTRIBUTE){if(!!t===e.hasAttribute(s))return f}else if(o.type===m.ATTRIBUTE&&e.getAttribute(s)===t+"")return f;return le(o),t}});var ue=class o extends ${constructor(){super(),this.M=[],this.manager=new ft(this);let t=this,e=t.constructor,s=e.N,r=e.K.o,i=o.prototype.shouldUpdate;t.#o=s?.H??new A,t.I=s?.I??new A,t.J=s?.J??[],t._offspring=t.J,t._postLoad=t.I,t.el=s??t,t.#s=t.enableUpdating,t.enableUpdating=Nt,t.shouldUpdate!==i&&(t.#e=t.shouldUpdate,t.shouldUpdate=i),r&&(t.#t=new Map,e.elementProperties.forEach((n,a)=>t.#t.set(a,r()))),!1}static finalizeStyles(t){let e=super.finalizeStyles(t),s=this.shadowRootOptions===Pt;return this.K?.commonStyles===void 0||s?e:[this.K.commonStyles,...e]}static createProperty(t,e){let s=typeof e=="number"?e:Array.isArray(e)?e[0]:0,r=Array.isArray(e)?e[1]:void 0,i=r?.hasChanged??H,n={attribute:s&1&&typeof t=="string"?lt(t):!1,reflect:!!(s&2),type:s&4?Boolean:s&8?Number:void 0,state:!!(s&16),readOnly:!!(s&32),noAccessor:!!(s&64),c:!1,...r,hasChanged(a,c){let l=i(a,c);return n.c=l,l}};super.createProperty(t,n)}static getPropertyDescriptor(t,e,s){let r=this.K,i=super.getPropertyDescriptor(t,e,s);return s.d=i,{...i,get(){return r.t?.(this.#t.get(t)),i.get?.call(this)},set(n){let a=this.manager;if(s.readOnly&&!at&&(a.R||a.connectedCalled))throw Error(`Cannot assign to read-only property "${t}" of ${this.el.localName}. Trying to assign "${n}"`);i.set.call(this,n??void 0),s.c&&this.#t?.get(t)?.notify(),a.T.length>0&&(I(),a?.S(t,n))}}}static{this.lumina=!0}#t;#e;#s;#o;#r;connectedCallback(){if(this.el.hasAttribute("defer-hydration"))return;let t=this.constructor.K.c?.(()=>this.requestUpdate());this.#r=t;let e=!this.manager.connectedCalled;super.connectedCallback(),e?queueMicrotask(()=>this.#l().catch(s=>{this.#o.reject(s),setTimeout(()=>{throw s})})):t&&this.requestUpdate()}#c(t){try{this.#r.clear(),this.constructor.K.r(this.#r,()=>super.update(t))}catch(e){throw this.#r.clear(),e}}disconnectedCallback(){super.disconnectedCallback(),this.#r?.destroy(),this.#r=void 0}createRenderRoot(){let t=this.el.shadowRoot,e=this.constructor,s=e.shadowRootOptions,i=t??(s===Pt?this.el:this.el.attachShadow(s));if(this.isConnected){let n=i.getRootNode();n.adoptedStyleSheets=[...n.adoptedStyleSheets,...e.elementStyles.map(a=>"styleSheet"in a?a.styleSheet:a)]}return i}async#l(){let t=this.el.G??Tt(this.el);t&&await t;let e=[];for(let r of this.M)"triggerLoad"in r?e.push(r.triggerLoad()):e.push(F(r.hostLoad,r));await Promise.all(e),await this.load?.(),this.manager.hasDestroy&&this.manager.onUpdate(r=>r.has(mt)&&this.manager.U()),this.#s(!0),this.performUpdate(),this.I.resolve(),await Promise.resolve();let s=this.J.filter(r=>!r.manager?.loadedCalled);s.length&&await Promise.allSettled(s.map(async r=>await r.componentOnReady())),this.J.length=0,this.el.setAttribute(this.constructor.K.hydratedAttribute,"");for(let r of this.M)"triggerLoaded"in r?r.triggerLoaded():p(r.hostLoaded,r);this.loaded?.(),this.#o.resolve()}shouldUpdate(t){return this.manager.Q=t,this.#e?.(t)??!0}update(t){this.#r?this.#c(t):super.update(t)}listen(t,e,s){let r=e?.bind(this)??e;this.manager.onLifecycle(()=>(this.el.addEventListener(t,r,s),()=>this.el.removeEventListener(t,r,s)))}listenOn(t,e,s,r){let i=s?.bind(this)??s;this.manager.onLifecycle(()=>(t.addEventListener(e,i,r),()=>t.removeEventListener(e,i,r)))}async componentOnReady(){return await this.#o.promise,this}addController(t){this.M.push(t),!(G in t)&&this.renderRoot&&this.el.isConnected&&t.hostConnected?.()}removeController(t){this.M.splice(this.M.indexOf(t),1),t.controllerRemoved?.()}};var fe=o=>{let t,e=r=>{t=new URL(r,globalThis.location?.href||void 0).href},s={...o,getAssetPath(r){let i=new URL(r,t);return i.origin!==globalThis.location?.origin?i.href:i.pathname},setAssetPath:e,customElement(r,i){i.K=s,i.L=r,customElements.get(r)||customElements.define(r,i)}};return e(o.defaultAssetPath),s};var Er=o=>typeof o=="object"&&o!=null?de(o):o;var Ut=class extends v{#t;#e;constructor(t){super(t);let e=this;this.#e=function(r){return e.#t.call(this,r)}}render(t){return typeof t=="function"?(this.#t=t,Lt(this.#e)):Lt(t)}},$r=E(Ut);var br=d;var J=fe({defaultAssetPath:"https://jsdev.arcgis.com/5.0.0-next/coding-components/",hydratedAttribute:"hydrated"}),{customElement:Or,getAssetPath:Sr,setAssetPath:Tr}=J;J.t=void 0;J.o=void 0;J.c=void 0;J.r=void 0;export{_s as a,x as b,Zt as c,Xt as d,As as e,Cs as f,It as g,me as h,H as i,ns as j,f as k,d as l,xe as m,Le as n,Ot as o,Ds as p,Ls as q,Us as r,Rs as s,Ms as t,Pt as u,Me as v,m as w,E as x,v as y,Fs as z,qs as A,le as B,Gs as C,Ks as D,ro as E,Lt as F,ue as G,Er as H,br as I,J,Or as K,Sr as L};
|
|
@@ -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.84 */
|
|
4
|
+
import c from"./5NR5BXSU.js";import"./MTMFT4XD.js";import b from"./I6JGARO3.js";import a from"./ARAAJHTT.js";import"./TE762HZP.js";import"./SNIPKZ5D.js";import"./U3UR7PMI.js";import"./OQUYSN7I.js";import"./KDSG4AQ2.js";import"./HB2ES4YL.js";import"./KJYFRF6Z.js";import"./YJM4YZTR.js";import"./FERNZR6V.js";import"./3LJIRG7F.js";import"./JOZPVCEH.js";export default $arcgis.t(([,,{a:a,b:b,c:c}])=>{return{getSqlExprDiagnosticService:b,getSqlExprWorker:a,setupMode:c}},a,b,c)
|