@arcgis/coding-components 4.31.0-next.5 → 4.31.0-next.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. package/dist/arcgis-coding-components/arcgis-coding-components.esm.js +2 -2
  2. package/dist/arcgis-coding-components/index.esm.js +2 -2
  3. package/dist/arcgis-coding-components/p-24128ac2.js +6 -0
  4. package/dist/arcgis-coding-components/p-2ba0dc32.js +6 -0
  5. package/dist/arcgis-coding-components/{p-7f776266.js → p-51cb7124.js} +2 -2
  6. package/dist/arcgis-coding-components/{p-ae6af9eb.js → p-56ef1db2.js} +2 -2
  7. package/dist/arcgis-coding-components/{p-e31be2c5.js → p-57b9aa11.js} +1 -1
  8. package/dist/arcgis-coding-components/{p-e89166f0.js → p-5fbefa40.js} +1 -1
  9. package/dist/arcgis-coding-components/{p-7bd74de6.entry.js → p-6d76b473.entry.js} +2 -2
  10. package/dist/arcgis-coding-components/{p-2d32fb1b.js → p-7f1b7590.js} +2 -2
  11. package/dist/arcgis-coding-components/{p-28d34a6e.entry.js → p-827f1fff.entry.js} +2 -2
  12. package/dist/arcgis-coding-components/p-8a789638.js +6 -0
  13. package/dist/arcgis-coding-components/p-a3af83b2.js +6 -0
  14. package/dist/arcgis-coding-components/{p-c41f6d7c.js → p-b7927956.js} +2 -2
  15. package/dist/arcgis-coding-components/{p-de85c014.js → p-c753e2e1.js} +1 -1
  16. package/dist/arcgis-coding-components/{p-3d5b8c4b.js → p-c9173dd7.js} +10 -10
  17. package/dist/arcgis-coding-components/{p-2c85c4b2.js → p-d610db5e.js} +2 -2
  18. package/dist/arcgis-coding-components/{p-aa9d06e6.js → p-de0ced33.js} +2 -2
  19. package/dist/arcgis-coding-components/{p-5b62a1ac.entry.js → p-dec9545b.entry.js} +2 -2
  20. package/dist/arcgis-coding-components/{p-60739af5.js → p-eca45afe.js} +2 -2
  21. package/dist/arcgis-coding-components/p-fd9abbee.js +6 -0
  22. package/dist/cjs/{app-globals-886c7ef0.js → app-globals-95a58c45.js} +1 -1
  23. package/dist/cjs/{arcade-defaults-56b6742a.js → arcade-defaults-adce528c.js} +4 -4
  24. package/dist/cjs/arcade-language-features-72d4b0d4.js +274 -0
  25. package/dist/cjs/{arcade-mode-2175ca7d.js → arcade-mode-a8f7893e.js} +7 -266
  26. package/dist/cjs/arcgis-arcade-editor_6.cjs.entry.js +6 -6
  27. package/dist/cjs/arcgis-coding-components.cjs.js +3 -3
  28. package/dist/cjs/arcgis-sql-expression-editor.cjs.entry.js +4 -4
  29. package/dist/cjs/arcgis-sql-expression-fields.cjs.entry.js +4 -4
  30. package/dist/cjs/{css-b5a232da.js → css-10717df1.js} +1 -1
  31. package/dist/cjs/{cssMode-f67c30d4.js → cssMode-af6b6837.js} +3 -3
  32. package/dist/cjs/{html-d57fda6b.js → html-e871b2ae.js} +3 -3
  33. package/dist/cjs/{htmlMode-c1513225.js → htmlMode-33758987.js} +3 -3
  34. package/dist/cjs/{index-6563aa26.js → index-2c90e42e.js} +1 -1
  35. package/dist/cjs/index.cjs.js +4 -4
  36. package/dist/cjs/{javascript-d7362563.js → javascript-03d1437c.js} +4 -4
  37. package/dist/cjs/{jsonMode-1ea2f163.js → jsonMode-3013c90b.js} +3 -3
  38. package/dist/cjs/{language-defaults-base-66e1921b.js → language-defaults-base-081fe837.js} +30 -46
  39. package/dist/cjs/loader.cjs.js +3 -3
  40. package/dist/cjs/{sql-expr-defaults-e30d7627.js → sql-expr-defaults-a8b942e3.js} +13 -18
  41. package/dist/cjs/{sql-expr-mode-74c5c2c2.js → sql-expr-mode-7f91696f.js} +11531 -14828
  42. package/dist/cjs/{tsMode-9db1a5aa.js → tsMode-a47d5976.js} +3 -3
  43. package/dist/cjs/{typescript-f6d1b2b4.js → typescript-eebe50a0.js} +3 -3
  44. package/dist/components/arcade-defaults.js +1 -1
  45. package/dist/components/arcade-language-features.js +271 -0
  46. package/dist/components/arcade-mode.js +4 -264
  47. package/dist/components/arcade-results.js +2 -2
  48. package/dist/components/arcade-suggestions.js +2 -2
  49. package/dist/components/arcade-variables.js +2 -2
  50. package/dist/components/arcgis-arcade-editor.js +2 -2
  51. package/dist/components/arcgis-arcade-results.js +1 -1
  52. package/dist/components/arcgis-arcade-suggestions.js +1 -1
  53. package/dist/components/arcgis-arcade-variables.js +1 -1
  54. package/dist/components/arcgis-assets.d.ts +1 -1
  55. package/dist/components/arcgis-assets.js +1 -1
  56. package/dist/components/arcgis-code-editor.js +1 -1
  57. package/dist/components/arcgis-language-api-panel.js +1 -1
  58. package/dist/components/arcgis-sql-expression-editor.js +2 -2
  59. package/dist/components/arcgis-sql-expression-fields.js +1 -1
  60. package/dist/components/{chunk-6TARY3NN.js → chunk-3IUJHIAA.js} +11 -16
  61. package/dist/components/code-editor.js +2 -2
  62. package/dist/components/fields.js +1 -1
  63. package/dist/components/index.js +1 -1
  64. package/dist/components/index2.js +1 -1
  65. package/dist/components/language-api-panel.js +2 -2
  66. package/dist/components/language-defaults-base.js +21 -37
  67. package/dist/components/markdown.js +1 -1
  68. package/dist/components/sql-expr-defaults.js +1 -1
  69. package/dist/components/sql-expr-mode.js +11529 -14825
  70. package/dist/components/sql-expression-fields.js +2 -2
  71. package/dist/components/useT9n.js +2 -2
  72. package/dist/components/utilities.js +1 -1
  73. package/dist/esm/{app-globals-4531df03.js → app-globals-9b568679.js} +1 -1
  74. package/dist/esm/{arcade-defaults-d85fe608.js → arcade-defaults-3b370e7f.js} +4 -4
  75. package/dist/esm/arcade-language-features-09dbac1a.js +269 -0
  76. package/dist/esm/{arcade-mode-121c8f8b.js → arcade-mode-dc12cdd7.js} +4 -263
  77. package/dist/esm/arcgis-arcade-editor_6.entry.js +6 -6
  78. package/dist/esm/arcgis-coding-components.js +4 -4
  79. package/dist/esm/arcgis-sql-expression-editor.entry.js +4 -4
  80. package/dist/esm/arcgis-sql-expression-fields.entry.js +4 -4
  81. package/dist/esm/{css-f03ce15d.js → css-2ac5d369.js} +1 -1
  82. package/dist/esm/{cssMode-9350af4a.js → cssMode-ee67ef12.js} +3 -3
  83. package/dist/esm/{html-8a5ee186.js → html-db02f025.js} +3 -3
  84. package/dist/esm/{htmlMode-dbcde814.js → htmlMode-d98c6313.js} +3 -3
  85. package/dist/esm/{index-71c8a762.js → index-79a2905d.js} +1 -1
  86. package/dist/esm/index.js +4 -4
  87. package/dist/esm/{javascript-b11dc132.js → javascript-49434450.js} +4 -4
  88. package/dist/esm/{jsonMode-7afef1a4.js → jsonMode-7eb9940c.js} +3 -3
  89. package/dist/esm/{language-defaults-base-47e8d77c.js → language-defaults-base-bb09da9f.js} +31 -47
  90. package/dist/esm/loader.js +4 -4
  91. package/dist/esm/{sql-expr-defaults-fa9b2d75.js → sql-expr-defaults-1aedce82.js} +13 -18
  92. package/dist/esm/{sql-expr-mode-931857be.js → sql-expr-mode-3c0c4ee2.js} +11531 -14828
  93. package/dist/esm/{tsMode-76190ec2.js → tsMode-abf1ffe4.js} +3 -3
  94. package/dist/esm/{typescript-346e9d47.js → typescript-6ebd28ac.js} +3 -3
  95. package/dist/loader/cdn.js +1 -1
  96. package/dist/loader/index.cjs.js +1 -1
  97. package/dist/loader/index.es2017.js +1 -1
  98. package/dist/loader/index.js +1 -1
  99. package/dist/types/components/arcade-editor/arcade-editor.d.ts +1 -1
  100. package/dist/types/components/arcade-results/arcade-results.d.ts +1 -1
  101. package/dist/types/components/arcade-suggestions/arcade-suggestions.d.ts +1 -1
  102. package/dist/types/components/arcade-variables/arcade-variables.d.ts +1 -1
  103. package/dist/types/components/language-api-panel/language-api-panel.d.ts +1 -1
  104. package/dist/types/utils/arcade-monaco/arcade-language-features.d.ts +1 -0
  105. package/dist/types/utils/profile/types.d.ts +29 -69
  106. package/dist/types/utils/profile/utils.d.ts +4 -7
  107. package/dist/types/utils/sql-expr-monaco/sql-expr-completion.d.ts +3 -2
  108. package/dist/types/utils/sql-expr-monaco/sql-expr-language-features.d.ts +6 -485
  109. package/package.json +10 -10
  110. package/dist/arcgis-coding-components/p-43da2244.js +0 -6
  111. package/dist/arcgis-coding-components/p-65bb8c77.js +0 -6
  112. package/dist/arcgis-coding-components/p-88b5d206.js +0 -6
  113. package/dist/arcgis-coding-components/p-cbf4fec2.js +0 -6
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  * See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
- * v4.31.0-next.5
4
+ * v4.31.0-next.7
5
5
  */
6
- import{p as e,b as o}from"./p-e89166f0.js";export{s as setNonce}from"./p-e89166f0.js";import{g as a}from"./p-de85c014.js";(()=>{const o=import.meta.url,a={};return""!==o&&(a.resourcesUrl=new URL(".",o).href),e(a)})().then((async e=>(await a(),o([["p-28d34a6e",[[1,"arcgis-sql-expression-fields",{loading:[4],modelId:[1,"model-id"],_mutationCounter:[32],_flowItemRenderers:[32],_filterValue:[32]},null,{modelId:["modelIdPropChanged"]}]]],["p-5b62a1ac",[[0,"arcgis-arcade-editor",{profile:[16],script:[1025],testData:[16],suggestions:[16],snippets:[16],hideDocumentationActions:[4,"hide-documentation-actions"],hideSideBar:[4,"hide-side-bar"],sideActionBarExpanded:[1540,"side-action-bar-expanded"],openedSidePanel:[1537,"opened-side-panel"],editorOptions:[16],editorInstance:[16],_preparingArcade:[32],_editorProfile:[32],_apiLibrary:[32],_showExecutionPanel:[32],_resultPanel:[32],_executingScript:[32],_consoleLogs:[32],_executionResult:[32],messages:[32],getScript:[64],setFocus:[64],getEditorInstance:[64],getTestResult:[64],updateThemeColors:[64]},null,{messages:["_messagesChanged"],profile:["_profileChanged"],testData:["_testDataChanged"],snippets:["_snippetChanged"]}],[1,"arcgis-arcade-results",{loading:[4],openedResultPanel:[1537,"opened-result-panel"],result:[16],consoleLogs:[16]}],[1,"arcgis-arcade-suggestions",{suggestions:[16],_selectedSuggestion:[32],_filterValue:[32],_colorizeStyle:[32]},null,{suggestions:["suggestionsPropChanged"]}],[1,"arcgis-arcade-variables",{loading:[4],modelId:[1,"model-id"],_mutationCounter:[32],_flowItemRenderers:[32],_filterValue:[32]},null,{modelId:["modelIdPropChanged"]}],[0,"arcgis-code-editor",{value:[1],language:[1],modelId:[1,"model-id"],options:[16],editorInstance:[16],getValue:[64],setValue:[64],insertText:[64],insertSnippet:[64],getEditorInstance:[64],setFocus:[64]},null,{language:["languagePropChange"],modelId:["modelIdPropChange"],options:["optionsPropChange"]}],[1,"arcgis-language-api-panel",{hideDocumentationActions:[4,"hide-documentation-actions"],loading:[4],apiLibrary:[16],_selectedApiItem:[32],_filterValue:[32],_colorizeStyle:[32]}]]],["p-7bd74de6",[[0,"arcgis-sql-expression-editor",{profile:[16],_preparing:[32],_editorProfile:[32],_activeAction:[32],_apiLibrary:[32]},null,{profile:["_profileChanged"]}]]]],e))));
6
+ import{p as e,b as o}from"./p-5fbefa40.js";export{s as setNonce}from"./p-5fbefa40.js";import{g as a}from"./p-c753e2e1.js";(()=>{const o=import.meta.url,a={};return""!==o&&(a.resourcesUrl=new URL(".",o).href),e(a)})().then((async e=>(await a(),o([["p-827f1fff",[[1,"arcgis-sql-expression-fields",{loading:[4],modelId:[1,"model-id"],_mutationCounter:[32],_flowItemRenderers:[32],_filterValue:[32]},null,{modelId:["modelIdPropChanged"]}]]],["p-dec9545b",[[0,"arcgis-arcade-editor",{profile:[16],script:[1025],testData:[16],suggestions:[16],snippets:[16],hideDocumentationActions:[4,"hide-documentation-actions"],hideSideBar:[4,"hide-side-bar"],sideActionBarExpanded:[1540,"side-action-bar-expanded"],openedSidePanel:[1537,"opened-side-panel"],editorOptions:[16],editorInstance:[16],_preparingArcade:[32],_editorProfile:[32],_apiLibrary:[32],_showExecutionPanel:[32],_resultPanel:[32],_executingScript:[32],_consoleLogs:[32],_executionResult:[32],messages:[32],getScript:[64],setFocus:[64],getEditorInstance:[64],getTestResult:[64],updateThemeColors:[64]},null,{messages:["_messagesChanged"],profile:["_profileChanged"],testData:["_testDataChanged"],snippets:["_snippetChanged"]}],[1,"arcgis-arcade-results",{loading:[4],openedResultPanel:[1537,"opened-result-panel"],result:[16],consoleLogs:[16]}],[1,"arcgis-arcade-suggestions",{suggestions:[16],_selectedSuggestion:[32],_filterValue:[32],_colorizeStyle:[32]},null,{suggestions:["suggestionsPropChanged"]}],[1,"arcgis-arcade-variables",{loading:[4],modelId:[1,"model-id"],_mutationCounter:[32],_flowItemRenderers:[32],_filterValue:[32]},null,{modelId:["modelIdPropChanged"]}],[0,"arcgis-code-editor",{value:[1],language:[1],modelId:[1,"model-id"],options:[16],editorInstance:[16],getValue:[64],setValue:[64],insertText:[64],insertSnippet:[64],getEditorInstance:[64],setFocus:[64]},null,{language:["languagePropChange"],modelId:["modelIdPropChange"],options:["optionsPropChange"]}],[1,"arcgis-language-api-panel",{hideDocumentationActions:[4,"hide-documentation-actions"],loading:[4],apiLibrary:[16],_selectedApiItem:[32],_filterValue:[32],_colorizeStyle:[32]}]]],["p-6d76b473",[[0,"arcgis-sql-expression-editor",{profile:[16],_preparing:[32],_editorProfile:[32],_activeAction:[32],_apiLibrary:[32]},null,{profile:["_profileChanged"]}]]]],e))));
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  * See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
- * v4.31.0-next.5
4
+ * v4.31.0-next.7
5
5
  */
6
- export{a as arcade}from"./p-cbf4fec2.js";import"./p-3d5b8c4b.js";import"./p-e89166f0.js";
6
+ export{a as arcade}from"./p-a3af83b2.js";import"./p-c9173dd7.js";import"./p-5fbefa40.js";
@@ -0,0 +1,6 @@
1
+ /*!
2
+ * All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
+ * See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
+ * v4.31.0-next.7
5
+ */
6
+ import{y as t,D as i,z as s,A as e,B as n,i as o,C as r,F as c,L as a,f as h,E as u,U as d}from"./p-c9173dd7.js";import{g as l}from"./p-5fbefa40.js";var f,p=(t,i)=>t.manager.internals.members?.[i]?.[0],y=Symbol.for("controller");function v(t){f!==t&&(f=t,queueMicrotask((()=>{f===t&&(f=void 0)})))}function g(){return f}var w,b=[];function m(t){if(void 0===t)return void(b=[]);const i=b.indexOf(t);b=-1===i?[...b,t]:b.slice(0,i+1),queueMicrotask((()=>{b=[]}))}var k,L=async(t,i)=>{const s=D(t);if(void 0===s)return t;if(await s.ready,"function"==typeof i){const t=s.watchExports((s=>i(s,t)))}return s.exports},M=async t=>{const i=D(t);return await i.ready,i},D=t=>{const i=function(){const t=w;return w=void 0,t}();if(void 0!==i)return i;const s=g().manager.internals.resolveExports(t);return void 0!==s?s:(t=>"object"==typeof t&&null!==t&&(y in t||"hostConnected"in t||"hostDisconnected"in t||"hostUpdate"in t||"hostUpdated"in t))(t)?t:void 0},j={setter:!1,getter:!1,readOnly:!1},x=new WeakMap,$=class{constructor(t){this._callbacks={hostConnected:[],hostDisconnected:[],hostLoad:[],hostLoaded:[],hostUpdate:[],hostUpdated:[],hostDestroy:[],hostLifecycle:[]},this._ready=new i,this._lifecycleCleanups=[],this.connectedCalled=!1,this.willLoadCalled=!1,this.didLoadCalled=!1,this[k]=!0,this.ready=this._ready.promise,this._exports=U(this),this._exportWatchers=new Set;const s=t??g();this.component=s,this.component.addController(this),m(this),void 0===this.component.manager||queueMicrotask((()=>this.catchUpLifecycle()))}catchUpLifecycle(){const{manager:t}=this.component;!t.connectedCalled||this.connectedCalled||this.triggerConnected(),!t.willLoadCalled||this.triggerLoad().then((()=>{!t.didLoadCalled||this.triggerLoaded()})).catch(console.error)}get exports(){return this._exports}set exports(t){const i=this._exports;i!==t&&(this._exports=t,this._exportWatchers.forEach(n),this.connectedCalled&&!1!==this.assignedProperty&&this.component.requestUpdate(this.assignedProperty,i)),this._ready.resolve(t)}setProvisionalExports(t){this._exports=U(t),this._exportWatchers.forEach(n)}watchExports(t){const i=()=>t(this._exports);return this._exportWatchers.add(i),()=>{this._exportWatchers.delete(i)}}get use(){return v(this.component),L}get useRef(){return v(this.component),M}get useRefSync(){return v(this.component),D}controllerRemoved(){this.component.el.isConnected&&this.triggerDisconnected(),this.triggerDestroy()}onConnected(t){this._callbacks.hostConnected.push(t)}onDisconnected(t){this._callbacks.hostDisconnected.push(t)}onLoad(t){this._callbacks.hostLoad.push(t)}onLoaded(t){this._callbacks.hostLoaded.push(t)}onUpdate(t){this._callbacks.hostUpdate.push(t)}onUpdated(t){this._callbacks.hostUpdated.push(t)}onDestroy(t){this._callbacks.hostDestroy.push(t)}onLifecycle(t){this._callbacks.hostLifecycle.push(t),this.connectedCalled&&this.component.el.isConnected&&this._callLifecycle(t)}triggerConnected(){const t=this;t.hostConnected&&n(t.hostConnected,t),this._callbacks.hostConnected.forEach(n),this.triggerLifecycle(),this.connectedCalled=!0}triggerDisconnected(){const t=this;t.hostDisconnected&&n(t.hostDisconnected,t),this._callbacks.hostDisconnected.forEach(n),this._lifecycleCleanups.forEach(n),this._lifecycleCleanups=[]}async triggerLoad(){if(this.willLoadCalled)return;this.willLoadCalled=!0;const t=this;t.hostLoad&&await s(t.hostLoad,t),this._callbacks.hostLoad.length>0&&await Promise.allSettled(this._callbacks.hostLoad.map(s)),this._ready.resolve(this._exports)}triggerLoaded(){if(this.didLoadCalled)return;const t=this;t.hostLoaded&&n(t.hostLoaded,t),this._callbacks.hostLoaded.forEach(n),this.didLoadCalled=!0}triggerUpdate(t){const i=this;i.hostUpdate&&n(i.hostUpdate,i,t),this._callbacks.hostUpdate.forEach(A,t)}triggerUpdated(t){const i=this;i.hostUpdated&&n(i.hostUpdated,i,t),this._callbacks.hostUpdated.forEach(A,t)}triggerDestroy(){const t=this;t.hostDestroy&&n(t.hostDestroy,t),this._callbacks.hostDestroy.forEach(n)}triggerLifecycle(){const t=this;t.hostLifecycle&&this._callLifecycle((()=>t.hostLifecycle())),this._callbacks.hostLifecycle.forEach(this._callLifecycle,this)}_callLifecycle(t){v(this.component);const i=n(t);(Array.isArray(i)?i:[i]).forEach((t=>{"function"==typeof t?this._lifecycleCleanups.push(t):"object"==typeof t&&"function"==typeof t.remove&&this._lifecycleCleanups.push(t.remove)}))}};function A(t){n(t,void 0,this)}k=y;var P=$;function U(t){if("object"!=typeof t&&"function"!=typeof t||null===t)return t;const i=new Proxy(t,{get(t,s,e){if(!C.has(s)||!(s in t)||t[s]!==i)return s in t||s in Promise.prototype||"symbol"==typeof s?"function"==typeof t?t[s]:Reflect.get(t,s,e):void 0},set:(t,i,s,e)=>Reflect.set(t,i,s,e)});return i}var C=new Set(["exports","_exports"]),S=void 0;function O(){Array.from(S?.entries()??[]).forEach((([t,{callbacks:i}])=>{const s=Object.keys(t);i.forEach((t=>t(s)))})),S=void 0}function q(t,i,s){var e;const o=i,r=t.manager.internals;(e=r.allWatchers)[o]??(e[o]=[]);const c=r.allWatchers[o],a=s,h=(t,i,s)=>n(a,null,t,i,s);return c.push(h),()=>{const t=c.indexOf(h);-1!==t&&c.splice(t,1)}}var T=class{constructor(t){this.enabledWatchers={},this.allWatchers={},this.enableReadonly=()=>{if(this.enableReadonly=void 0,!this.component.manager.isLit)return;const t=this.component.manager.internals;Object.entries(t.members).forEach((([i,[s]])=>{var e;2048&s&&((e=t.setters)[i]??(e[i]=[]),t.setters[i].push(t.readonlySetter))}))},this.trackedValue=F,this.keyTrackers=[],this.getters={},this.setters={},this.accessorGetter={},this.accessorSetter={},this.reactiveUtilsIntegrations=new Set,this._exports=new WeakMap,this.readonlySetter=(t,i,s)=>{if(j.readOnly)return t;throw new Error(`Cannot assign to read-only property "${s}" of ${this.component.el.tagName.toLowerCase()}. Trying to assign "${String(t)}"`)},this.component=t}firePropTrackers(t,i){const s=this.keyTrackers;this.trackedValue=F,this.keyTrackers=[],s.forEach((s=>s(t,i)))}getSetProxy(t){const i=this.component,s=i.constructor.prototype;if(this._getSetProxy(s,t,"class"),i.manager.isLit)return;const e=i.el.constructor.prototype;s!==e&&this._getSetProxy(e,t,"html")}_getSetProxy(t,i,s){const e=p(this.component,i),n=Object.getOwnPropertyDescriptor(t,i);if(!n)return;const o=n.get,r=n.set,c=!(E in o),a=!(E in r);if(!c&&!a)return;const h=c?function(){let t=o.call(this);const s=x.get(this);if(void 0===s)return t;const e=s.manager.internals;t=e.accessorGetter[i](t,i);const n=e.getters[i]??_;for(let s=0;s<n.length;s++)t=n[s](t,i);return t}:o,u=a?function(t){const s=o.call(this),n=x.get(this);if(void 0===n)return void r.call(this,t);let c=n.manager.isLit?t:function(t,i=8){return null==t||"object"==typeof t||"function"==typeof t?t:4&i?"false"!==t&&(""===t||!!t):2&i?Number.parseFloat(t):1&i?String(t):t}(t,e);const a=n.manager.internals;if(c===s)r.call(this,t);else{const t=j.setter?_:a.setters[i]??_;for(let e=0;e<t.length&&(c=t[e](c,s,i),c!==s);e++);c=a.accessorSetter[i](c,s,i),r.call(this,c),c!==s&&a.enabledWatchers[i]?.forEach((t=>t(c,s,i)))}a.keyTrackers.length>0&&a?.firePropTrackers(i,t)}:r;c&&(h[E]=!0),a&&(u[E]=!0),Object.defineProperty(t,i,{...n,get:h,set:u})}markExports(t,i){("object"==typeof i&&null!==i||"function"==typeof i)&&this._exports.set(i,t)}resolveExports(t){return"object"==typeof t&&null!==t||"function"==typeof t?this._exports.get(t):void 0}},_=[],E=Symbol(),F=Symbol(),R=(t,i)=>new I(t,i),I=class extends P{constructor(s,e){const n="addController"in s,o=new Set,r=s;if(r.addController=function(t){o.add(t),n&&!(y in t)&&s.el.isConnected&&t.hostConnected?.()},r.removeController=function(t){o.delete(t),t.controllerRemoved?.()},!n){const t=e??s.constructor.__forceUpdate;r.requestUpdate=()=>t(s)}super(s),this.internals=new T(this.component),this.destroyed=!1,this._updatePromise=new i,this._originalLifecycles={},this.isLit=n,this.component.manager=this,function(i,s){if(s)i.manager.internals.members=Object.fromEntries(Array.from(i.constructor.elementProperties,(([t,i])=>i.noAccessor?void 0:[t,[(i.readOnly?2048:0)|(i.state?32:i.type===Number?2:i.type===Boolean?4:1)]])).filter(t));else{const t=i.constructor,s=t.__registerControllers?.(i)??void 0;if(t.__registerControllers=void 0,"object"!=typeof s)throw new Error("Failed to retrieve component meta");i.manager.internals.members=Object.fromEntries(Object.entries(s).filter((([t,[i]])=>!!(63&i))))}}(s,n),this._controllers=o,this.exports=void 0,this.hasDestroy=N in this.component&&"function"==typeof this.component.destroy,this.hasDestroy&&q(s,N,(()=>this._setAutoDestroyTimeout())),this._bindLifecycleMethods();const c=this.internals;Object.keys(c.members).forEach((t=>{c.accessorGetter[t]=B,c.accessorSetter[t]=B,c.getSetProxy(t)})),n||Object.defineProperty(s,"updateComplete",{get:async()=>await this._updatePromise.promise}),queueMicrotask(c.enableReadonly),m(void 0),v(s),x.set(s.el,s),x.set(s,s)}_bindLifecycleMethods(){const t=this.component,i=this.isLit,s=t.el===t;this._originalLifecycles={connectedCallback:i||s?void 0:t.connectedCallback,disconnectedCallback:i||s?void 0:t.disconnectedCallback,componentWillLoad:i?void 0:t.componentWillLoad,componentDidLoad:i?void 0:t.componentDidLoad,componentWillUpdate:i?void 0:t.componentWillUpdate,componentDidUpdate:i?void 0:t.componentDidUpdate,destroy:t.destroy};const e=this._connectedCallback.bind(this),n=this._disconnectedCallback.bind(this),o=this._update.bind(this),r=this._updated.bind(this);i?t.constructor.prototype.addController.call(t,{hostConnected:e,hostDisconnected:n,hostUpdate:o,hostUpdated:r}):(t.connectedCallback=e,t.disconnectedCallback=n,t.componentWillLoad=this._load.bind(this),t.componentDidLoad=this._loaded.bind(this),t.componentWillUpdate=o,t.componentDidUpdate=r),this.hasDestroy&&(t.destroy=this.destroy.bind(this))}_connectedCallback(){if(this.destroyed){const t=this.component.el.tagName.toLowerCase();throw this.component.el.remove(),new Error(`The ${t} component has already been destroyed. It can not be used again. If you meant to disconnect and reconnect a component without automatic destroy, set the ${N} prop.`)}void 0!==this._autoDestroyTimeout&&clearTimeout(this._autoDestroyTimeout);const t=this.internals;t.enabledWatchers=t.allWatchers,O(),t.enableReadonly?.(),this._controllers.forEach(V),this._originalLifecycles.connectedCallback?.call(this.component)}_disconnectedCallback(){this.destroyed||(this._controllers.forEach(z),this._originalLifecycles.disconnectedCallback?.call(this.component),this.hasDestroy&&this._setAutoDestroyTimeout())}async _load(){const t=this.internals.reactiveUtilsIntegrations;if(t.size>0)for(const i of t)"triggerLoad"in i?await i.triggerLoad():await s(i.hostLoad,i);await Promise.allSettled(Array.from(this._controllers,G,t)),await(this._originalLifecycles.componentWillLoad?.call(this.component))}_loaded(){this._controllers.forEach(H),this._originalLifecycles.componentDidLoad?.call(this.component)}_update(){this._controllers.forEach(J,this.component.changedProperties),this._originalLifecycles.componentWillUpdate?.call(this.component)}_updated(){const t=this.component;if(this._controllers.forEach(K,t.changedProperties),this._originalLifecycles.componentDidUpdate?.call(this.component),this.isLit)t.changedProperties=new Map;else{const t=this._updatePromise;this._updatePromise=new i,t.resolve(!0)}}async destroy(){if(!this.destroyed){if(this.component.el.isConnected){this.hasDestroy=!1;try{this.component.el.remove()}finally{this.hasDestroy=!0}}this._autoDestroyTimeout=void 0,this.destroyed=!0,this._controllers.forEach(Q),this._controllers.clear(),await(this._originalLifecycles.destroy?.call(this.component))}}_setAutoDestroyTimeout(){this.component.el.isConnected||this.component.autoDestroyDisabled||(void 0!==this._autoDestroyTimeout&&clearTimeout(this._autoDestroyTimeout),this._autoDestroyTimeout=e((()=>{this.destroy().catch(console.error)}),W))}},N="autoDestroyDisabled",W=1e3,B=t=>t;function V(t){"triggerConnected"in t?t.triggerConnected():n(t.hostConnected,t)}function z(t){"triggerDisconnected"in t?t.triggerDisconnected():n(t.hostDisconnected,t)}async function G(t){this.has(t)||("triggerLoad"in t?await t.triggerLoad():await s(t.hostLoad,t))}function H(t){"triggerLoaded"in t?t.triggerLoaded():n(t.hostLoaded,t)}function J(t){"triggerUpdate"in t?t.triggerUpdate(this):n(t.hostUpdate,t,this)}function K(t){"triggerUpdated"in t?t.triggerUpdated(this):n(t.hostUpdated,t,this)}function Q(t){"triggerDestroy"in t?t.triggerDestroy():n(t.hostDestroy,t)}function X(t,i,s){const e=t.manager.internals;return e.trackedValue!==F&&e.trackedValue!==s&&e.firePropTrackers(void 0,void 0),0===e.keyTrackers.length&&queueMicrotask((()=>e.firePropTrackers(void 0,void 0))),e.trackedValue=s,e.keyTrackers.push(((t,e)=>n(i,void 0,s===e?t:void 0))),s}function Y(t,i){const s=g();return X(s,(e=>{const n=e,o=s.manager,r=s,c=r[n];if(null!=c&&c!==t&&"function"==typeof i.set&&(i.initialSet??1)){const s=i.set(c,t,n);if(s!==c)if(o.isLit)r[n]=s;else{let t=!0;o.onConnected((()=>{t&&(t=!0,function(){j.setter=!0;try{return void(r[n]=s)}finally{j.setter=!1}}())}))}}!function(t,i,s){var e,n;const o=s,r=t.manager.internals,c="function"==typeof o.get?o.get:void 0;c&&((e=r.getters)[i]??(e[i]=[]),r.getters[i].unshift(c));const a="ignore"===o.set?tt:o.set;a&&((n=r.setters)[i]??(n[i]=[]),r.setters[i].unshift(a))}(s,n,i)}),t)}var Z,tt=(t,i)=>i,it=t=>st(void 0,t),st=(Z=class extends ${constructor(t,i){super(t);const s=this.exports;try{v(this.component);const t=i(this.component,this),e=this.exports!==s;if(t instanceof Promise){e||this.setProvisionalExports(t);const i=t.then((t=>{this.exports=t,super.catchUpLifecycle()})).catch((t=>{this._ready.reject(t),console.error(t)}));this.onLoad((async()=>await i))}else e&&void 0===t||(this.exports=t),queueMicrotask((()=>super.catchUpLifecycle()))}catch(t){this._ready.reject(t),console.error(t)}}catchUpLifecycle(){}},(...t)=>{const i=b,s=new Z(...t),e=s.exports;m(i.at(-1));const o=s.component.manager.internals;var r;return o.markExports(s,e),s.watchExports((t=>o.markExports(s,t))),w!==(r=s)&&(w=r,queueMicrotask((()=>{w===r&&(w=void 0)}))),function(t,i,s){const e=Array.isArray(t)?t:[t];let o=e.length+1;const r=t=>{o-=1,void 0!==t&&(o=0),0===o&&i(t)};e.forEach((t=>function(t,i,s){const e=Object.keys(t),o=e.length;void 0===S&&queueMicrotask(O),S??(S=new Map);let r=S.get(t);return void 0===r&&(r={callbacks:[],keyCount:o},S.set(t,r)),r.keyCount!==o&&(r.callbacks.forEach((t=>t(e))),r.callbacks=[],r.keyCount=o),r.callbacks.push((e=>{const r=e[o];n(i,null,void 0===r?void 0:t[r]===s?r:void 0)})),s}(t,(i=>r(void 0===i?void 0:{key:i,host:t,isReactive:!1})),s)));const c=e.find((t=>"manager"in t&&"object"==typeof t.manager&&t.manager.component===t));return c&&X(c,(t=>r(void 0===t?void 0:{key:t,host:c,isReactive:void 0!==p(c,t)})),s),s}([s.component,...i].reverse(),(t=>void 0===t?void 0:function(t,{host:i,key:s,isReactive:e},n){const o=i,r=o[s]!==n;o[s]!==t.exports&&!r&&n!==t.exports&&(o[s]=t.exports);if(i===t.component){if(e){const i=t.component.manager.internals;r&&i.markExports(t,o[s]),q(t.component,s,(s=>{s!==t.exports&&i.markExports(t,s)}))}t.assignedProperty=e?void 0:s}t.watchExports((()=>{if(o[s]===t.exports)return;const i=t.component.manager,e=i.internals.setters[s]?.includes(i.internals.readonlySetter);e?function(){j.readOnly=!0;try{return void(o[s]=t.exports)}finally{j.readOnly=!1}}():o[s]=t.exports}))}(s,t,e)),e)});const et={en:{id:"field-calculation",variables:[{name:"$layer",type:"featureSet",description:"The layer being calculated."}]}};var nt=class{constructor(t){this._settings=t,this.sdkCategoriesCache=new Map}async getApiDatabase(t){let{locale:i="en"}=t,s=this.sdkCategoriesCache.get(i);if(!s){let{assetsPath:t}=this._settings;if(!t)return{categories:[],functionDefinitions:new Map,constantDefinitions:new Map};s=this.loadSdkApiLibrary(i,t),this.sdkCategoriesCache.set(i,s)}return await async function(t,i){try{let s=await t,e=new Map,n=new Map,o=[],r=function(t){let{profile:{apiVersion:i,bundles:s,hiddenApiItems:e=[]}={}}=t,n=rt(i),o=Array.isArray(s)&&s.length>0?new Set(["core",...s]):void 0;return t=>function(t,i){if(!t)return!0;let s=rt(i);return!s||!(t.major>s.major)&&(void 0===t.minor||void 0===s.minor||s.minor<=t.minor)}(n,t.sinceVersion)&&(!o||o.has(t.bundle))&&!e.includes(t.name)}(i);return s.forEach((t=>{let i=[];t.items.forEach((t=>function(t,i,s,e,n){Array.isArray(n)?n.forEach((i=>ot(t,s,e,i))):"constant"===n.type?function(t,i,s,e){if(!s(e))return;t.push(e);let{completion:{label:n}}=e,o=n.toLowerCase();i.set(o,e);let[r,a]=e.completion.label.split(".");if(!a)return;let h=r.toLowerCase(),u=i.get(h);u||(u={type:"namespace",key:h,members:[],completion:{label:r,detail:r,insertText:r,insertTextMode:c.exports.InsertTextMode.adjustIndentation,insertTextFormat:c.exports.InsertTextFormat.PlainText,kind:c.exports.CompletionItemKind.Enum}},i.set(h,u));let d=structuredClone(e);d.name=a,d.completion.label=a,d.completion.insertText=a,d.completion.kind=c.exports.CompletionItemKind.Constant,u.members.push(d),u.completion.documentation=u.members.reduce(((t,i)=>(t.value=`${t.value}${t.value?"\n\n":""}**${i.completion.label}**: ${i.description}`,t)),{kind:c.exports.MarkupKind.Markdown,value:""})}(t,i,e,n):ot(t,s,e,n)}(i,n,e,r,t))),i.length&&o.push({...t,items:i})})),{categories:o,functionDefinitions:e,constantDefinitions:n}}catch{return{categories:[],functionDefinitions:new Map,constantDefinitions:new Map}}}(s,t)}async getApiLibrary(t){let{categories:i}=await this.getApiDatabase(t);return i}async loadSdkApiLibrary(t="en",i=""){if(Array.isArray(this._settings.testSdkCategories))return this._settings.testSdkCategories;if(!(i=i.replace(/\/$/u,"")))return[];try{let s=this._settings.apiPathTemplate.replace("${assetsPath}",i).replace("${locale}",t),e=await fetch(s);return e.ok?await e.json():"en"===t?[]:await this.loadSdkApiLibrary("en",i)}catch{return[]}}};function ot(t,i,s,e){if(!s(e))return;e.disableDocumentation||t.push(e);let{completion:{label:n}}=e,o=n.toLowerCase(),r=i.get(o);r||(r={type:"functionDefinition",key:o,overloads:[]},i.set(o,r)),r.overloads.push(e)}function rt(t){if(!t||"string"!=typeof t)return null;let i=t.split(".").map((t=>Number.parseInt(t)));if(i.some(Number.isNaN))return console.error("Invalid API version string",t),null;let[s,e]=i.slice(0,2);return{major:s,minor:e}}const ct="arcgis-sql-expression",at=new class extends a{constructor(){super(...arguments),this._languageId=ct,this._languageOptions={},this._layerMap=new Map}updateFeatureLayerForModel(t,i){const s=this._getApiKey(t);this._layerMap.set(s,i),this._onDidChange.fire(this)}setLanguageOptions(t){this._languageOptions=t}getFeatureLayerForModel(t){const i=this._getApiKey(t);return this._layerMap.get(i)}async setProfileForModel(t,i,s={locale:"en"}){o(i)&&(i=await async function(t,i="en"){if(!o(t))return;const s=await async function(t="en"){return await Promise.resolve(et[t])}(i);if(!s)return;const e={variables:[],hiddenApiItems:t.hiddenApiItems?.map((t=>t.toLowerCase()))};return s.variables.forEach((i=>{if(t.disabledVariables?.includes(i.name))return;const s=t.definitions[i.name];if("featureSet"===i.type)return r(s)?e.variables.push({...i,type:i.type,definition:s}):void 0;throw Error(`sdkVariable type not supported (yet) type: ${i.type}`)})),e}(i,s.locale));const e=await h(s.locale,l("./assets/arcade-language/t9n"),"profile.t9n.");if(!e)throw new Error(`Failed to load the language bundle for ${s.locale}`);this.disposeForModel(t);const n=this._getApiKey(t),c=new u(i,e);this._profileMap.set(n,c);const a=await c.toLSProfile();this.updateApiContextForModel(t,{locale:s.locale,profile:a});const d=i?.variables?.find((t=>"$layer"===t.name));d&&this.updateFeatureLayerForModel(t,d.definition)}async getApiLibrary(t){const i=d.parse(t);let s=this._apiService;return s||(s=new nt({assetsPath:l("./assets/sql-expression-editor"),languageId:ct,apiPathTemplate:"${assetsPath}/api/sql-expression-api.t9n.${locale}.json"}),this._apiService=s),await s.getApiLibrary(this.getApiContextForModel(i))}};export{Y as g,it as m,at as s,R as u,q as w}
@@ -0,0 +1,6 @@
1
+ /*!
2
+ * All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
+ * See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
+ * v4.31.0-next.7
5
+ */
6
+ import{e as t,M as s,F as e,R as r,u as n,N as a}from"./p-c9173dd7.js";class i{constructor(s,e,{defaults:r,diagnosticsService:n}){this._languageId=s,this._worker=e,this._disposables=[],this._listener=new Map,this._diagnosticsService=n,this._defaults=r;const i=t=>{const s=t.getLanguageId();if(s!==this._languageId)return;const e=a((()=>{this._doValidate(t,s).catch((t=>{throw t}))}));this._listener.set(t.uri.toString(),t.onDidChangeContent(e)),this._doValidate(t,s).catch(console.error)},c=s=>{const e=s.uri.toString();t.setModelMarkers(s,this._languageId,[]);const r=this._listener.get(e);r&&(r.dispose(),this._listener.delete(e))};this._disposables.push(t.onDidCreateModel(i)),this._disposables.push(t.onWillDisposeModel((t=>{c(t)}))),this._disposables.push(t.onDidChangeModelLanguage((t=>{c(t.model),i(t.model)}))),this._disposables.push(r.onDidChange((()=>{t.getModels().forEach((t=>{t.getLanguageId()===this._languageId&&(c(t),i(t))}))}))),this._disposables.push(r.onModelContextDidChange((s=>{t.getModels().forEach((t=>{t.getLanguageId()===this._languageId&&t.uri.toString()===s&&this._doValidate(t,this._languageId).catch(console.error)}))}))),this._disposables.push({dispose:()=>{this._listener.forEach((t=>t.dispose())),this._listener.clear()}}),t.getModels().forEach(i)}dispose(){this._disposables.forEach((t=>t.dispose())),this._disposables=[]}async _doValidate(s,e){if(s.isAttachedToEditor())try{const r=await this._worker(s.uri),n=this._defaults.getApiContextForModel(s.uri),a=await r.doValidation(s.uri.toString(),n),i=a.map((t=>{return{severity:c((s=t).severity),startLineNumber:s.range.start.line+1,startColumn:s.range.start.character+1,endLineNumber:s.range.end.line+1,endColumn:s.range.end.character+1,message:s.message};var s}));this._diagnosticsService.fireDiagnosticsChange(s.uri,a),t.setModelMarkers(s,e,i)}catch(t){console.error(t)}}}function c(t){switch(t){case e.exports.DiagnosticSeverity.Error:return s.Error;case e.exports.DiagnosticSeverity.Warning:return s.Warning;case e.exports.DiagnosticSeverity.Information:return s.Info;case e.exports.DiagnosticSeverity.Hint:return s.Hint;default:return s.Info}}function u(t){return new r(t.start.line+1,t.start.character+1,t.end.line+1,t.end.character+1)}function o(t){return{range:u(t.range),text:t.newText}}function h(t){const s=n.CompletionItemKind;switch(t){case e.exports.CompletionItemKind.Text:return s.Text;case e.exports.CompletionItemKind.Method:return s.Method;case e.exports.CompletionItemKind.Function:return s.Function;case e.exports.CompletionItemKind.Constructor:return s.Constructor;case e.exports.CompletionItemKind.Field:return s.Field;case e.exports.CompletionItemKind.Variable:return s.Variable;case e.exports.CompletionItemKind.Class:return s.Class;case e.exports.CompletionItemKind.Interface:return s.Interface;case e.exports.CompletionItemKind.Module:return s.Module;case e.exports.CompletionItemKind.Property:return s.Property;case e.exports.CompletionItemKind.Unit:return s.Unit;case e.exports.CompletionItemKind.Value:return s.Value;case e.exports.CompletionItemKind.Enum:return s.Enum;case e.exports.CompletionItemKind.Keyword:return s.Keyword;case e.exports.CompletionItemKind.Snippet:return s.Snippet;case e.exports.CompletionItemKind.Color:return s.Color;case e.exports.CompletionItemKind.File:return s.File;case e.exports.CompletionItemKind.Reference:return s.Reference;case e.exports.CompletionItemKind.Folder:return s.Folder;case e.exports.CompletionItemKind.EnumMember:return s.EnumMember;case e.exports.CompletionItemKind.Constant:return s.Constant;case e.exports.CompletionItemKind.Struct:return s.Struct;case e.exports.CompletionItemKind.Event:return s.Event;case e.exports.CompletionItemKind.Operator:return s.Operator;case e.exports.CompletionItemKind.TypeParameter:return s.TypeParameter;default:return s.Property}}class l{constructor(t,s){this._worker=t,this._defaults=s,this.triggerCharacters=[".","("]}async provideCompletionItems(t,s){const a=await this._worker(t.uri),i=this._defaults.getApiContextForModel(t.uri),c=await a.doComplete(t.uri.toString(),function(t){return{character:t.column-1,line:t.lineNumber-1}}(s),i),l=t.getWordUntilPosition(s),d=new r(s.lineNumber,l.startColumn,s.lineNumber,l.endColumn),p=c.items.map((t=>{const s={label:t.label,insertText:t.insertText||t.label,sortText:t.sortText,filterText:t.filterText,detail:t.detail,range:d,kind:h(t.kind)};var r;return t.textEdit&&(s.range=void 0!==(r=t.textEdit).insert&&void 0!==r.replace?{insert:u(t.textEdit.insert),replace:u(t.textEdit.replace)}:u(t.textEdit.range),s.insertText=t.textEdit.newText),t.additionalTextEdits&&(s.additionalTextEdits=t.additionalTextEdits.map(o)),t.insertTextFormat===e.exports.InsertTextFormat.Snippet&&(s.insertTextRules=n.CompletionItemInsertTextRule.InsertAsSnippet),t.documentation&&(s.documentation="string"==typeof t.documentation?t.documentation:{supportThemeIcons:!1,value:t.documentation.value,supportHtml:!0}),s}));return{incomplete:c.isIncomplete,suggestions:p}}}class d{constructor(t,s){this._worker=t,this._defaults=s}async provideDocumentFormattingEdits(t){const s=await this._worker(t.uri),e=this._defaults.getApiContextForModel(t.uri.toString());return(await s.doFormat(t.uri.toString(),e)).map((t=>({range:u(t.range),text:t.newText})))}}export{l as C,i as D,d as F,h as t}
@@ -1,9 +1,9 @@
1
1
  /*!
2
2
  * All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  * See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
- * v4.31.0-next.5
4
+ * v4.31.0-next.7
5
5
  */
6
- import{G as e}from"./p-3d5b8c4b.js";import"./p-e89166f0.js";
6
+ import{G as e}from"./p-c9173dd7.js";import"./p-5fbefa40.js";
7
7
  /*!-----------------------------------------------------------------------------
8
8
  * Copyright (c) Microsoft Corporation. All rights reserved.
9
9
  * Version: 0.45.0(5e5af013f8d295555a7210df0d5f2cea0bf5dd56)
@@ -1,9 +1,9 @@
1
1
  /*!
2
2
  * All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  * See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
- * v4.31.0-next.5
4
+ * v4.31.0-next.7
5
5
  */
6
- import{G as e}from"./p-3d5b8c4b.js";import"./p-e89166f0.js";
6
+ import{G as e}from"./p-c9173dd7.js";import"./p-5fbefa40.js";
7
7
  /*!-----------------------------------------------------------------------------
8
8
  * Copyright (c) Microsoft Corporation. All rights reserved.
9
9
  * Version: 0.45.0(5e5af013f8d295555a7210df0d5f2cea0bf5dd56)
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  * See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
- * v4.31.0-next.5
4
+ * v4.31.0-next.7
5
5
  */
6
6
  /*!-----------------------------------------------------------------------------
7
7
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  * See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
- * v4.31.0-next.5
4
+ * v4.31.0-next.7
5
5
  */
6
6
  var e=Object.defineProperty,n=e=>{const n=new URL(e,ve.t);return n.origin!==de.location.origin?n.href:n.pathname},t={},l=e=>"object"==(e=typeof e)||"function"===e;function o(e){var n,t,l;return null!=(l=null==(t=null==(n=e.head)?void 0:n.querySelector('meta[name="csp-nonce"]'))?void 0:t.getAttribute("content"))?l:void 0}((n,t)=>{for(var l in t)e(n,l,{get:t[l],enumerable:!0})})({},{err:()=>r,map:()=>i,ok:()=>s,unwrap:()=>a,unwrapErr:()=>f});var s=e=>({isOk:!0,isErr:!1,value:e}),r=e=>({isOk:!1,isErr:!0,value:e});function i(e,n){if(e.isOk){const t=n(e.value);return t instanceof Promise?t.then((e=>s(e))):s(t)}if(e.isErr)return r(e.value);throw"should never get here"}var c,u,a=e=>{if(e.isOk)return e.value;throw e.value},f=e=>{if(e.isErr)return e.value;throw e.value},d="slot-fb{display:contents}slot-fb[hidden]{display:none}",p="http://www.w3.org/1999/xlink",v=(e,n,...t)=>{let o=null,s=null,r=!1,i=!1;const c=[],u=n=>{for(let t=0;t<n.length;t++)o=n[t],Array.isArray(o)?u(o):null!=o&&"boolean"!=typeof o&&((r="function"!=typeof e&&!l(o))&&(o+=""),r&&i?c[c.length-1].l+=o:c.push(r?m(null,o):o),i=r)};if(u(t),n){n.key&&(s=n.key);{const e=n.className||n.class;e&&(n.class="object"!=typeof e?e:Object.keys(e).filter((n=>e[n])).join(" "))}}if("function"==typeof e)return e(null===n?{}:n,c,h);const a=m(e,null);return a.o=n,c.length>0&&(a.i=c),a.u=s,a},m=(e,n)=>({p:0,v:e,l:n,m:null,i:null,o:null,u:null}),y={},h={forEach:(e,n)=>e.map(b).forEach(n),map:(e,n)=>e.map(b).map(n).map($)},b=e=>({vattrs:e.o,vchildren:e.i,vkey:e.u,vname:e.h,vtag:e.v,vtext:e.l}),$=e=>{if("function"==typeof e.vtag){const n={...e.vattrs};return e.vkey&&(n.key=e.vkey),e.vname&&(n.name=e.vname),v(e.vtag,n,...e.vchildren||[])}const n=m(e.vtag,e.vtext);return n.o=e.vattrs,n.i=e.vchildren,n.u=e.vkey,n.h=e.vname,n},w=e=>oe(e).$hostElement$,g=(e,n,t)=>{const l=w(e);return{emit:e=>k(l,n,{bubbles:!!(4&t),composed:!!(2&t),cancelable:!!(1&t),detail:e})}},k=(e,n,t)=>{const l=ve.ce(n,t);return e.dispatchEvent(l),l},j=new WeakMap,O=e=>"sc-"+e.$,S=(e,n,t,o,s,r)=>{if(t!==o){let i=ie(e,n),c=n.toLowerCase();if("class"===n){const n=e.classList,l=E(t),s=E(o);n.remove(...l.filter((e=>e&&!s.includes(e)))),n.add(...s.filter((e=>e&&!l.includes(e))))}else if("style"===n){for(const n in t)o&&null!=o[n]||(n.includes("-")?e.style.removeProperty(n):e.style[n]="");for(const n in o)t&&o[n]===t[n]||(n.includes("-")?e.style.setProperty(n,o[n]):e.style[n]=o[n])}else if("key"===n);else if("ref"===n)o&&o(e);else if(i||"o"!==n[0]||"n"!==n[1]){const u=l(o);if((i||u&&null!==o)&&!s)try{if(e.tagName.includes("-"))e[n]=o;else{const l=null==o?"":o;"list"===n?i=!1:null!=t&&e[n]==l||(e[n]=l)}}catch(e){}let a=!1;c!==(c=c.replace(/^xlink\:?/,""))&&(n=c,a=!0),null==o||!1===o?!1===o&&""!==e.getAttribute(n)||(a?e.removeAttributeNS(p,n):e.removeAttribute(n)):(!i||4&r||s)&&!u&&(o=!0===o?"":o,a?e.setAttributeNS(p,n,o):e.setAttribute(n,o))}else if(n="-"===n[2]?n.slice(3):ie(de,c)?c.slice(2):c[2]+n.slice(3),t||o){const l=n.endsWith(M);n=n.replace(x,""),t&&ve.rel(e,n,t,l),o&&ve.ael(e,n,o,l)}}},C=/\s/,E=e=>e?e.split(C):[],M="Capture",x=RegExp(M+"$"),P=(e,n,l,o)=>{const s=11===n.m.nodeType&&n.m.host?n.m.host:n.m,r=e&&e.o||t,i=n.o||t;for(o of L(Object.keys(r)))o in i||S(s,o,r[o],void 0,l,n.p);for(o of L(Object.keys(i)))S(s,o,r[o],i[o],l,n.p)};function L(e){return e.includes("ref")?[...e.filter((e=>"ref"!==e)),"ref"]:e}var U=!1,R=(e,n,t)=>{const l=n.i[t];let o,s,r=0;if(null!==l.l)o=l.m=pe.createTextNode(l.l);else if(o=l.m=pe.createElement(l.v),P(null,l,U),null!=c&&o["s-si"]!==c&&o.classList.add(o["s-si"]=c),l.i)for(r=0;r<l.i.length;++r)s=R(e,l,r),s&&o.appendChild(s);return o["s-hn"]=u,o},W=(e,n,t,l,o,s)=>{let r,i=e;for(i.shadowRoot&&i.tagName===u&&(i=i.shadowRoot);o<=s;++o)l[o]&&(r=R(null,t,o),r&&(l[o].m=r,i.insertBefore(r,n)))},A=(e,n,t)=>{for(let l=n;l<=t;++l){const n=e[l];if(n){const e=n.m;D(n),e&&e.remove()}}},N=(e,n,t=!1)=>e.v===n.v&&(!!t||e.u===n.u),T=(e,n,t=!1)=>{const l=n.m=e.m,o=e.i,s=n.i,r=n.l;null===r?(P(e,n,U),null!==o&&null!==s?((e,n,t,l,o=!1)=>{let s,r,i=0,c=0,u=0,a=0,f=n.length-1,d=n[0],p=n[f],v=l.length-1,m=l[0],y=l[v];for(;i<=f&&c<=v;)if(null==d)d=n[++i];else if(null==p)p=n[--f];else if(null==m)m=l[++c];else if(null==y)y=l[--v];else if(N(d,m,o))T(d,m,o),d=n[++i],m=l[++c];else if(N(p,y,o))T(p,y,o),p=n[--f],y=l[--v];else if(N(d,y,o))T(d,y,o),e.insertBefore(d.m,p.m.nextSibling),d=n[++i],y=l[--v];else if(N(p,m,o))T(p,m,o),e.insertBefore(p.m,d.m),p=n[--f],m=l[++c];else{for(u=-1,a=i;a<=f;++a)if(n[a]&&null!==n[a].u&&n[a].u===m.u){u=a;break}u>=0?(r=n[u],r.v!==m.v?s=R(n&&n[c],t,u):(T(r,m,o),n[u]=void 0,s=r.m),m=l[++c]):(s=R(n&&n[c],t,c),m=l[++c]),s&&d.m.parentNode.insertBefore(s,d.m)}i>f?W(e,null==l[v+1]?null:l[v+1].m,t,l,c,v):c>v&&A(n,i,f)})(l,o,n,s,t):null!==s?(null!==e.l&&(l.textContent=""),W(l,null,n,s,0,s.length-1)):null!==o&&A(o,0,o.length-1)):e.l!==r&&(l.data=r)},D=e=>{e.o&&e.o.ref&&e.o.ref(null),e.i&&e.i.map(D)},F=(e,n)=>{n&&!e.k&&n["s-p"]&&n["s-p"].push(new Promise((n=>e.k=n)))},H=(e,n)=>{if(e.p|=16,!(4&e.p))return F(e,e.j),Oe((()=>q(e,n)));e.p|=512},q=(e,n)=>{const t=e.O;let l;return l=K(t,n?"componentWillLoad":"componentWillUpdate"),V(l,(()=>z(e,t,n)))},V=(e,n)=>_(e)?e.then(n):n(),_=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,z=async(e,n,t)=>{var l;const s=e.$hostElement$,r=s["s-rc"];t&&(e=>{const n=e.S,t=e.$hostElement$,l=n.p,s=((e,n)=>{var t;const l=O(n),s=fe.get(l);if(e=11===e.nodeType?e:pe,s)if("string"==typeof s){let r,i=j.get(e=e.head||e);if(i||j.set(e,i=new Set),!i.has(l)){{r=pe.createElement("style"),r.innerHTML=s;const n=null!=(t=ve.C)?t:o(pe);null!=n&&r.setAttribute("nonce",n),e.insertBefore(r,e.querySelector("link"))}4&n.p&&(r.innerHTML+=d),i&&i.add(l)}}else e.adoptedStyleSheets.includes(s)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,s]);return l})(t.shadowRoot?t.shadowRoot:t.getRootNode(),n);10&l&&(t["s-sc"]=s,t.classList.add(s+"-h"))})(e);B(e,n,s,t),r&&(r.map((e=>e())),s["s-rc"]=void 0);{const n=null!=(l=s["s-p"])?l:[],t=()=>G(e);0===n.length?t():(Promise.all(n).then(t),e.p|=4,n.length=0)}},B=(e,n,t,l)=>{try{n=n.render(),e.p&=-17,e.p|=2,((e,n,t=!1)=>{const l=e.$hostElement$,o=e.S,s=e.M||m(null,null),r=(e=>e&&e.v===y)(n)?n:v(null,null,n);if(u=l.tagName,o.P&&(r.o=r.o||{},o.P.map((([e,n])=>r.o[n]=l[e]))),t&&r.o)for(const e of Object.keys(r.o))l.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(r.o[e]=l[e]);r.v=null,r.p|=4,e.M=r,r.m=s.m=l.shadowRoot||l,c=l["s-sc"],T(s,r,t)})(e,n,l)}catch(n){ce(n,e.$hostElement$)}return null},G=e=>{const n=e.$hostElement$,t=e.O,l=e.j;64&e.p?K(t,"componentDidUpdate"):(e.p|=64,Q(n),K(t,"componentDidLoad"),e.L(n),l||J()),e.U(n),e.k&&(e.k(),e.k=void 0),512&e.p&&je((()=>H(e,!1))),e.p&=-517},I=e=>{{const n=oe(e),t=n.$hostElement$.isConnected;return t&&2==(18&n.p)&&H(n,!1),t}},J=()=>{Q(pe.documentElement),je((()=>k(de,"appload",{detail:{namespace:"arcgis-coding-components"}})))},K=(e,n,t)=>{if(e&&e[n])try{return e[n](t)}catch(e){ce(e)}},Q=e=>e.setAttribute("hydrated",""),X=(e,n,t)=>{var o;const s=e.prototype;if(n.R){e.watchers&&(n.W=e.watchers);const r=Object.entries(n.R);if(r.map((([e,[o]])=>{31&o||2&t&&32&o?Object.defineProperty(s,e,{get(){return((e,n)=>oe(this).A.get(n))(0,e)},set(t){((e,n,t,o)=>{const s=oe(e),r=s.$hostElement$,i=s.A.get(n),c=s.p,u=s.O;if(t=((e,n)=>null==e||l(e)?e:4&n?"false"!==e&&(""===e||!!e):1&n?e+"":e)(t,o.R[n][0]),(!(8&c)||void 0===i)&&t!==i&&(!Number.isNaN(i)||!Number.isNaN(t))&&(s.A.set(n,t),u)){if(o.W&&128&c){const e=o.W[n];e&&e.map((e=>{try{u[e](t,i,n)}catch(e){ce(e,r)}}))}if(2==(18&c)){if(u.componentShouldUpdate&&!1===u.componentShouldUpdate(t,i,n))return;H(s,!1)}}})(this,e,t,n)},configurable:!0,enumerable:!0}):1&t&&64&o&&Object.defineProperty(s,e,{value(...n){var t;const l=oe(this);return null==(t=null==l?void 0:l.N)?void 0:t.then((()=>{var t;return null==(t=l.O)?void 0:t[e](...n)}))}})})),1&t){const t=new Map;s.attributeChangedCallback=function(e,l,o){ve.jmp((()=>{var r;const i=t.get(e);if(this.hasOwnProperty(i))o=this[i],delete this[i];else{if(s.hasOwnProperty(i)&&"number"==typeof this[i]&&this[i]==o)return;if(null==i){const t=oe(this),s=null==t?void 0:t.p;if(s&&!(8&s)&&128&s&&o!==l){const s=t.O,i=null==(r=n.W)?void 0:r[e];null==i||i.forEach((n=>{null!=s[n]&&s[n].call(s,o,l,e)}))}return}}this[i]=(null!==o||"boolean"!=typeof this[i])&&o}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(o=n.W)?o:{}),...r.filter((([e,n])=>15&n[0])).map((([e,l])=>{var o;const s=l[1]||e;return t.set(s,e),512&l[0]&&(null==(o=n.P)||o.push([e,s])),s}))]))}}return e},Y=e=>{K(e,"connectedCallback")},Z=e=>{K(e,"disconnectedCallback")},ee=(e,n={})=>{var t;const l=[],s=n.exclude||[],r=de.customElements,i=pe.head,c=i.querySelector("meta[charset]"),u=pe.createElement("style"),a=[];let f,p=!0;Object.assign(ve,n),ve.t=new URL(n.resourcesUrl||"./",pe.baseURI).href;let v=!1;if(e.map((e=>{e[1].map((n=>{var t;const o={p:n[0],$:n[1],R:n[2],T:n[3]};4&o.p&&(v=!0),o.R=n[2],o.P=[],o.W=null!=(t=n[4])?t:{};const i=o.$,c=class extends HTMLElement{constructor(e){super(e),re(e=this,o),1&o.p&&e.attachShadow({mode:"open"})}connectedCallback(){f&&(clearTimeout(f),f=null),p?a.push(this):ve.jmp((()=>(e=>{if(!(1&ve.p)){const n=oe(e),t=n.S,l=()=>{};if(1&n.p)(null==n?void 0:n.O)?Y(n.O):(null==n?void 0:n.D)&&n.D.then((()=>Y(n.O)));else{n.p|=1;{let t=e;for(;t=t.parentNode||t.host;)if(t["s-p"]){F(n,n.j=t);break}}t.R&&Object.entries(t.R).map((([n,[t]])=>{if(31&t&&e.hasOwnProperty(n)){const t=e[n];delete e[n],e[n]=t}})),(async(e,n,t)=>{let l;if(!(32&n.p)){if(n.p|=32,t.F){if(l=ae(t),l.then){const e=()=>{};l=await l,e()}l.isProxied||(t.W=l.watchers,X(l,t,2),l.isProxied=!0);const e=()=>{};n.p|=8;try{l.__forceUpdate=I,l.__registerControllers=e=>(se(e,n),n.S.R??{}),new l(n),l.__registerControllers=void 0}catch(e){ce(e)}n.p&=-9,n.p|=128,e(),Y(n.O)}else l=e.constructor,customElements.whenDefined(t.$).then((()=>n.p|=128));if(l.style){let e=l.style;const n=O(t);if(!fe.has(n)){const l=()=>{};((e,n,t)=>{let l=fe.get(e);ye&&t?(l=l||new CSSStyleSheet,"string"==typeof l?l=n:l.replaceSync(n)):l=n,fe.set(e,l)})(n,e,!!(1&t.p)),l()}}}const o=n.j,s=()=>H(n,!0);o&&o["s-rc"]?o["s-rc"].push(s):s()})(e,n,t)}l()}})(this)))}disconnectedCallback(){ve.jmp((()=>(async()=>{if(!(1&ve.p)){const e=oe(this);(null==e?void 0:e.O)?Z(e.O):(null==e?void 0:e.D)&&e.D.then((()=>Z(e.O)))}})()))}componentOnReady(){return oe(this).D}};o.F=e[0],s.includes(i)||r.get(i)||(l.push(i),r.define(i,X(c,o,1)))}))})),l.length>0&&(v&&(u.textContent+=d),u.textContent+=l+"{visibility:hidden}[hydrated]{visibility:inherit}",u.innerHTML.length)){u.setAttribute("data-styles","");const e=null!=(t=ve.C)?t:o(pe);null!=e&&u.setAttribute("nonce",e),i.insertBefore(u,c?c.nextSibling:i.firstChild)}p=!1,a.length?a.map((e=>e.connectedCallback())):ve.jmp((()=>f=setTimeout(J,30)))},ne=(e,n)=>n,te=e=>ve.C=e,le=new WeakMap,oe=e=>le.get(e),se=(e,n)=>le.set(n.O=e,n),re=(e,n)=>{const t={p:0,$hostElement$:e,S:n,A:new Map};return t.N=new Promise((e=>t.U=e)),t.D=new Promise((e=>t.L=e)),e["s-p"]=[],e["s-rc"]=[],le.set(e,t)},ie=(e,n)=>n in e,ce=(e,n)=>(0,console.error)(e,n),ue=new Map,ae=e=>{const n=e.$.replace(/-/g,"_"),t=e.F,l=ue.get(t);return l?l[n]:import(`./${t}.entry.js`).then((e=>(ue.set(t,e),e[n])),ce)
7
7
  /*!__STENCIL_STATIC_IMPORT_SWITCH__*/},fe=new Map,de="undefined"!=typeof window?window:{},pe=de.document||{head:{}},ve={p:0,t:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,n,t,l)=>e.addEventListener(n,t,l),rel:(e,n,t,l)=>e.removeEventListener(n,t,l),ce:(e,n)=>new CustomEvent(e,n)},me=e=>Promise.resolve(e),ye=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),he=!1,be=[],$e=[],we=(e,n)=>t=>{e.push(t),he||(he=!0,n&&4&ve.p?je(ke):ve.raf(ke))},ge=e=>{for(let n=0;n<e.length;n++)try{e[n](performance.now())}catch(e){ce(e)}e.length=0},ke=()=>{ge(be),ge($e),(he=be.length>0)&&ve.raf(ke)},je=e=>me().then(e),Oe=we($e,!0);export{ne as F,y as H,w as a,ee as b,g as c,n as g,v as h,me as p,se as r,te as s}
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  * See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
- * v4.31.0-next.5
4
+ * v4.31.0-next.7
5
5
  */
6
- import{r as e,h as i,H as s,a}from"./p-e89166f0.js";import{u as o,s as t}from"./p-43da2244.js";import{j as r}from"./p-3d5b8c4b.js";const l=class{constructor(i){e(this,i),this.manager=o(this),this._modelId=r(),this._insertAsSnippet=e=>{this._codeEditorElt?.insertSnippet(e.detail).catch(console.error)},this._preparing=!1,this._editorProfile=void 0,this._activeAction=void 0,this._apiLibrary=void 0,this.profile=void 0}_profileChanged(){this._updateSqlExprDefaults().catch(console.error)}async _updateSqlExprDefaults(){this._preparing=!0;try{await t.setProfileForModel(this._modelId,this.profile),this._apiLibrary=await t.getApiLibrary(this._modelId)}catch{this._editorProfile=void 0}finally{this._preparing=!1}}_setActiveAction(e){this._activeAction=e}_handleActionClick(e){this._setActiveAction(e.target.dataset.panelName)}async componentWillLoad(){await this._updateSqlExprDefaults().catch(console.error)}disconnectedCallback(){t.disposeForModel(this._modelId)}render(){return i(s,{key:"67f7ebf7a28a8ffc3fe967721389d45c4e2003a1"},i("div",{key:"b3bf4ec2a8d04105e97489593ccec95cd33237f0",class:"flex-row flex-adjustable"},i("div",{key:"fdac47e22baf64c72f786f9e09b637050f417f94",class:"flex-column flex-adjustable"},i("arcgis-code-editor",{key:"f4151dd39ec3523907cd907ebb7558e05bca9cc1",language:"arcgis-sql-expression",modelId:this._modelId,ref:e=>this._codeEditorElt=e})),"fields"===this._activeAction&&i("arcgis-sql-expression-fields",{key:"aa0e5d88429d4bf865b9adc506028efefec1a73a",class:"side-panel flex-panel border-inline-start",loading:this._preparing,modelId:this._modelId,"data-panel-name":"none",onArcgisFieldSelected:this._insertAsSnippet,onArcgisClose:()=>this._setActiveAction(void 0)}),"functions"===this._activeAction&&i("arcgis-language-api-panel",{key:"7826dbb1b08894c6c6385806a3aef6cff77395d0",class:"side-panel flex-panel border-inline-start",onArcgisItemSelected:this._insertAsSnippet,onArcgisClose:()=>this._setActiveAction(void 0),loading:this._preparing,apiLibrary:this._apiLibrary,"data-panel-name":"none"}),i("calcite-action-bar",{key:"ee618d666b70405495627a9d15238e8723c6f961",class:"side-action-bar border-inline-start",expanded:!1,position:"end"},i("calcite-action",{key:"2c828df5dded6347e13e59ba9e313824baa606ff",id:"fields-action",text:"Fields",icon:"profile-variables",active:"fields"===this._activeAction,"data-panel-name":"fields",onClick:e=>this._handleActionClick(e)}),i("calcite-action",{key:"eab785c5b14cadeb5047db1957134f5accfedc76",id:"functions-action",text:"Functions",icon:"function",active:"functions"===this._activeAction,"data-panel-name":"functions",onClick:e=>this._handleActionClick(e)}))))}static get assetsDirs(){return["assets"]}get el(){return a(this)}static get watchers(){return{profile:["_profileChanged"]}}};l.style="arcgis-sql-expression-editor{display:flex;flex-direction:column;position:relative;overflow:hidden;border:1px solid var(--calcite-color-border-3);box-sizing:border-box;background-color:var(--calcite-color-foreground-1);height:100%}arcgis-sql-expression-editor .flex-adjustable{flex:1 1 auto;overflow:hidden}arcgis-sql-expression-editor .flex-panel{flex:1 0 auto}arcgis-sql-expression-editor .position-relative{position:relative}arcgis-sql-expression-editor .flex-row{display:flex;flex-direction:row;overflow:hidden}arcgis-sql-expression-editor .flex-column{display:flex;flex-direction:column;overflow:hidden}arcgis-sql-expression-editor .border-inline-start{border-inline-start:1px solid var(--calcite-color-border-3);box-sizing:border-box}arcgis-sql-expression-editor .border-inline-end{border-inline-end:1px solid var(--calcite-color-border-3);box-sizing:border-box}arcgis-sql-expression-editor .side-action-bar{max-width:25%}arcgis-sql-expression-editor .side-panel{max-width:45%;width:600px}arcgis-sql-expression-editor .side-panel calcite-flow{height:100%}";export{l as arcgis_sql_expression_editor}
6
+ import{r as e,h as i,H as s,a}from"./p-5fbefa40.js";import{u as o,s as t}from"./p-24128ac2.js";import{j as r}from"./p-c9173dd7.js";const l=class{constructor(i){e(this,i),this.manager=o(this),this._modelId=r(),this._insertAsSnippet=e=>{this._codeEditorElt?.insertSnippet(e.detail).catch(console.error)},this._preparing=!1,this._editorProfile=void 0,this._activeAction=void 0,this._apiLibrary=void 0,this.profile=void 0}_profileChanged(){this._updateSqlExprDefaults().catch(console.error)}async _updateSqlExprDefaults(){this._preparing=!0;try{await t.setProfileForModel(this._modelId,this.profile),this._apiLibrary=await t.getApiLibrary(this._modelId)}catch{this._editorProfile=void 0}finally{this._preparing=!1}}_setActiveAction(e){this._activeAction=e}_handleActionClick(e){this._setActiveAction(e.target.dataset.panelName)}async componentWillLoad(){await this._updateSqlExprDefaults().catch(console.error)}disconnectedCallback(){t.disposeForModel(this._modelId)}render(){return i(s,{key:"67f7ebf7a28a8ffc3fe967721389d45c4e2003a1"},i("div",{key:"b3bf4ec2a8d04105e97489593ccec95cd33237f0",class:"flex-row flex-adjustable"},i("div",{key:"fdac47e22baf64c72f786f9e09b637050f417f94",class:"flex-column flex-adjustable"},i("arcgis-code-editor",{key:"f4151dd39ec3523907cd907ebb7558e05bca9cc1",language:"arcgis-sql-expression",modelId:this._modelId,ref:e=>this._codeEditorElt=e})),"fields"===this._activeAction&&i("arcgis-sql-expression-fields",{key:"aa0e5d88429d4bf865b9adc506028efefec1a73a",class:"side-panel flex-panel border-inline-start",loading:this._preparing,modelId:this._modelId,"data-panel-name":"none",onArcgisFieldSelected:this._insertAsSnippet,onArcgisClose:()=>this._setActiveAction(void 0)}),"functions"===this._activeAction&&i("arcgis-language-api-panel",{key:"7826dbb1b08894c6c6385806a3aef6cff77395d0",class:"side-panel flex-panel border-inline-start",onArcgisItemSelected:this._insertAsSnippet,onArcgisClose:()=>this._setActiveAction(void 0),loading:this._preparing,apiLibrary:this._apiLibrary,"data-panel-name":"none"}),i("calcite-action-bar",{key:"ee618d666b70405495627a9d15238e8723c6f961",class:"side-action-bar border-inline-start",expanded:!1,position:"end"},i("calcite-action",{key:"2c828df5dded6347e13e59ba9e313824baa606ff",id:"fields-action",text:"Fields",icon:"profile-variables",active:"fields"===this._activeAction,"data-panel-name":"fields",onClick:e=>this._handleActionClick(e)}),i("calcite-action",{key:"eab785c5b14cadeb5047db1957134f5accfedc76",id:"functions-action",text:"Functions",icon:"function",active:"functions"===this._activeAction,"data-panel-name":"functions",onClick:e=>this._handleActionClick(e)}))))}static get assetsDirs(){return["assets"]}get el(){return a(this)}static get watchers(){return{profile:["_profileChanged"]}}};l.style="arcgis-sql-expression-editor{display:flex;flex-direction:column;position:relative;overflow:hidden;border:1px solid var(--calcite-color-border-3);box-sizing:border-box;background-color:var(--calcite-color-foreground-1);height:100%}arcgis-sql-expression-editor .flex-adjustable{flex:1 1 auto;overflow:hidden}arcgis-sql-expression-editor .flex-panel{flex:1 0 auto}arcgis-sql-expression-editor .position-relative{position:relative}arcgis-sql-expression-editor .flex-row{display:flex;flex-direction:row;overflow:hidden}arcgis-sql-expression-editor .flex-column{display:flex;flex-direction:column;overflow:hidden}arcgis-sql-expression-editor .border-inline-start{border-inline-start:1px solid var(--calcite-color-border-3);box-sizing:border-box}arcgis-sql-expression-editor .border-inline-end{border-inline-end:1px solid var(--calcite-color-border-3);box-sizing:border-box}arcgis-sql-expression-editor .side-action-bar{max-width:25%}arcgis-sql-expression-editor .side-panel{max-width:45%;width:600px}arcgis-sql-expression-editor .side-panel calcite-flow{height:100%}";export{l as arcgis_sql_expression_editor}
@@ -1,9 +1,9 @@
1
1
  /*!
2
2
  * All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  * See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
- * v4.31.0-next.5
4
+ * v4.31.0-next.7
5
5
  */
6
- import{G as t}from"./p-3d5b8c4b.js";import"./p-e89166f0.js";
6
+ import{G as t}from"./p-c9173dd7.js";import"./p-5fbefa40.js";
7
7
  /*!-----------------------------------------------------------------------------
8
8
  * Copyright (c) Microsoft Corporation. All rights reserved.
9
9
  * Version: 0.45.0(5e5af013f8d295555a7210df0d5f2cea0bf5dd56)
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  * See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
- * v4.31.0-next.5
4
+ * v4.31.0-next.7
5
5
  */
6
- import{r as t,c as i,h as e,a as s}from"./p-e89166f0.js";import{u as l,s as c}from"./p-43da2244.js";import"./p-3d5b8c4b.js";const a=class{constructor(e){t(this,e),this.arcgisClose=i(this,"arcgisClose",3),this.arcgisFieldSelected=i(this,"arcgisFieldSelected",3),this.manager=l(this),this._handleSelectField=t=>{if(t.target instanceof HTMLElement)switch(t.target.tagName.toLowerCase()){case"calcite-list-item":this.arcgisFieldSelected.emit(t.target.value??"");break;case"calcite-action":t.stopPropagation()}},this._emitClose=()=>{this.arcgisClose.emit()},this._mutationCounter=1,this._flowItemRenderers=[],this._filterValue="",this.loading=!1,this.modelId=void 0}modelIdPropChanged(){this._flowItemRenderers=[]}disconnectedCallback(){this._flowObserver?.disconnect()}render(){const t=c.getFeatureLayerForModel(this.modelId??"");return!this.loading&&this.modelId&&t?e("calcite-flow",null,e("calcite-flow-item",{heading:"Available Fields",closable:!0,description:"Select a field to insert into the expression",onCalciteFlowItemClose:this._emitClose},e("calcite-list",{filterEnabled:!0},t.fields.map((t=>e("calcite-list-item",{key:t.name,onClick:this._handleSelectField,label:t.name,description:t.alias,value:t.name},t.domain&&e("calcite-action",{slot:"actions-end",text:"open",icon:"chevron-right",onClick:()=>{const i=t.domain;"coded-value"===i.type&&(this._flowItemRenderers=[...this._flowItemRenderers,()=>e("calcite-flow-item",{closable:!0,heading:"Domains",description:t.name,onCalciteFlowItemClose:this._emitClose},e("calcite-list",null,i.codedValues.map((t=>e("calcite-list-item",{key:t.code,onClick:this._handleSelectField,label:t.name,description:String(t.code),value:t.code})))))])}})))))),this._flowItemRenderers.map((t=>t()))):e("calcite-block",{heading:"Available Fields"})}static get assetsDirs(){return["assets"]}get el(){return s(this)}static get watchers(){return{modelId:["modelIdPropChanged"]}}};a.style=":host calcite-flow{height:100%}:host calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}";export{a as arcgis_sql_expression_fields}
6
+ import{r as t,c as i,h as e,a as s}from"./p-5fbefa40.js";import{u as l,s as c}from"./p-24128ac2.js";import"./p-c9173dd7.js";const a=class{constructor(e){t(this,e),this.arcgisClose=i(this,"arcgisClose",3),this.arcgisFieldSelected=i(this,"arcgisFieldSelected",3),this.manager=l(this),this._handleSelectField=t=>{if(t.target instanceof HTMLElement)switch(t.target.tagName.toLowerCase()){case"calcite-list-item":this.arcgisFieldSelected.emit(t.target.value??"");break;case"calcite-action":t.stopPropagation()}},this._emitClose=()=>{this.arcgisClose.emit()},this._mutationCounter=1,this._flowItemRenderers=[],this._filterValue="",this.loading=!1,this.modelId=void 0}modelIdPropChanged(){this._flowItemRenderers=[]}disconnectedCallback(){this._flowObserver?.disconnect()}render(){const t=c.getFeatureLayerForModel(this.modelId??"");return!this.loading&&this.modelId&&t?e("calcite-flow",null,e("calcite-flow-item",{heading:"Available Fields",closable:!0,description:"Select a field to insert into the expression",onCalciteFlowItemClose:this._emitClose},e("calcite-list",{filterEnabled:!0},t.fields.map((t=>e("calcite-list-item",{key:t.name,onClick:this._handleSelectField,label:t.name,description:t.alias,value:t.name},t.domain&&e("calcite-action",{slot:"actions-end",text:"open",icon:"chevron-right",onClick:()=>{const i=t.domain;"coded-value"===i.type&&(this._flowItemRenderers=[...this._flowItemRenderers,()=>e("calcite-flow-item",{closable:!0,heading:"Domains",description:t.name,onCalciteFlowItemClose:this._emitClose},e("calcite-list",null,i.codedValues.map((t=>e("calcite-list-item",{key:t.code,onClick:this._handleSelectField,label:t.name,description:String(t.code),value:t.code})))))])}})))))),this._flowItemRenderers.map((t=>t()))):e("calcite-block",{heading:"Available Fields"})}static get assetsDirs(){return["assets"]}get el(){return s(this)}static get watchers(){return{modelId:["modelIdPropChanged"]}}};a.style=":host calcite-flow{height:100%}:host calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}";export{a as arcgis_sql_expression_fields}
@@ -0,0 +1,6 @@
1
+ /*!
2
+ * All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
+ * See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
+ * v4.31.0-next.7
5
+ */
6
+ import{F as e,e as t,u as n,J as s}from"./p-c9173dd7.js";import{C as r,F as i,D as o}from"./p-2ba0dc32.js";import"./p-5fbefa40.js";var a=[[],[],[]];["++","--"].forEach((e=>a[e.length-1]?.push(e))),["-","+","!","~"].forEach((e=>a[e.length-1]?.push(e))),["||","&&"].forEach((e=>a[e.length-1]?.push(e))),["=","/=","*=","%=","+=","-="].forEach((e=>a[e.length-1]?.push(e))),["|","&",">>","<<",">>>","^","==","!=","<","<=",">",">=","+","-","*","/","%"].forEach((e=>a[e.length-1]?.push(e)));var c=Object.values({Break:"break",Continue:"continue",Else:"else",For:"for",From:"from",Function:"function",If:"if",Import:"import",Export:"export",In:"in",Return:"return",Var:"var",While:"while"});Object.values({False:"false",Null:"null",True:"true"}).map((t=>({label:t,kind:e.exports.CompletionItemKind.Constant}))),c.map((t=>({label:t,kind:e.exports.CompletionItemKind.Keyword})));const u={wordPattern:/(-?\d*\.\d\w*)|([^`~!#%\^&\*\(\)\-=\+\[\{\]\}\\\|;:'",\.<>\/\?\s]+)/gu,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"`",close:"`",notIn:["string","comment"]}],autoCloseBefore:";:.,=}])` \n\t",folding:{markers:{start:/^\s*\/\/\s*#?region\b/u,end:/^\s*\/\/\s*#?endregion\b/u}},indentationRules:{decreaseIndentPattern:/^((?!.*?\/\*).*\*\/)?\s*[\}\]\)].*$/u,increaseIndentPattern:/^((?!\/\/).)*(\{[^}"'`]*|\([^)"'`]*|\[[^\]"'`]*)$/u}},g={defaultToken:"invalid",tokenPostfix:".arc",ignoreCase:!0,keywords:c.filter((e=>"from"!==e)),operators:["<=",">=","==","!=","+","-","*","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","=","+=","-=","*=","**=","/=","%="],constants:["true","false","null"],symbols:/[=><!~?:&|+\-*\/\^%]+/u,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/u,digits:/\d+(_+\d+)*/u,octaldigits:/[0-7]+(_+[0-7]+)*/u,binarydigits:/[0-1]+(_+[0-1]+)*/u,hexdigits:/[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/u,regexpctl:/[(){}\[\]\$\^|\-*+?\.]/u,regexpesc:/\\(?:[bBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})/u,tokenizer:{root:[[/[{}]/u,"delimiter.bracket"],{include:"common"}],common:[[/import(?=\s)/u,{token:"keyword",next:"@import"}],[/[a-z_$][\w$]*/u,{cases:{"@constants":"constant","@keywords":"keyword","@default":"identifier"}}],{include:"@whitespace"},[/\/(?=([^\\\/]|\\.)+\/([gimsuy]*)(\s*)(\.|;|\/|,|\)|\]|\}|$))/u,{token:"regexp",bracket:"@open",next:"@regexp"}],[/[()\[\]]/u,"@brackets"],[/[<>](?!@symbols)/u,"@brackets"],[/@symbols/u,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/u,"number"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/u,"number"],[/0[xX](@hexdigits)/u,"number"],[/0[oO]?(@octaldigits)/u,"number"],[/0[bB](@binarydigits)/u,"number"],[/(@digits)/u,"number"],[/[;,.]/u,"delimiter"],[/"([^"\\]|\\.)*$/u,"string.invalid"],[/'([^'\\]|\\.)*$/u,"string.invalid"],[/"/u,"string","@string_double"],[/'/u,"string","@string_single"],[/`/u,"string","@string_backtick"]],import:[[/import(?=\s)/u,{token:"keyword"}],{include:"@whitespace"},[/[a-z_$][\w$]*/u,"identifier"],{include:"@whitespace"},[/from/u,{token:"keyword",next:"@popall"}]],whitespace:[[/[ \t\r\n]+/u,""],[/\/\*/u,"comment","@comment"],[/\/\/.*$/u,"comment"]],comment:[[/[^\/*]+/u,"comment"],[/\*\//u,"comment","@pop"],[/[\/*]/u,"comment"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/u,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/u,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/u,["regexp.escape.control","regexp.escape.control"]],[/[()]/u,"regexp.escape.control"],[/@regexpctl/u,"regexp.escape.control"],[/[^\\\/]/u,"regexp"],[/@regexpesc/u,"regexp.escape"],[/\\\./u,"regexp.invalid"],[/(\/)([gimsuy]*)/u,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],regexrange:[[/-/u,"regexp.escape.control"],[/\^/u,"regexp.invalid"],[/@regexpesc/u,"regexp.escape"],[/[^\]]/u,"regexp"],[/\]/u,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_double:[[/[^\\"]+/u,"string"],[/@escapes/u,"string.escape"],[/\\./u,"string.escape.invalid"],[/"/u,"string","@pop"]],string_single:[[/[^\\']+/u,"string"],[/@escapes/u,"string.escape"],[/\\./u,"string.escape.invalid"],[/'/u,"string","@pop"]],string_backtick:[[/\$\{/u,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\`$]+/u,"string"],[/@escapes/u,"string.escape"],[/\\./u,"string.escape.invalid"],[/`/u,"string","@pop"]],bracketCounting:[[/\{/u,"delimiter.bracket","@bracketCounting"],[/\}/u,"delimiter.bracket","@pop"],{include:"common"}]}};class p{constructor(e){this._defaults=e,this._worker=null,this._client=null,this._configChangeListener=this._defaults.onDidChange((()=>this.stopWorker()))}dispose(){this._configChangeListener.dispose(),this.stopWorker()}stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}async _getClientProxy(){if(!this._client){const{languageId:e,languageOptions:n}=this._defaults;this._worker=t.createWebWorker({moduleId:"ArcadeWorker",label:e,createData:{languageId:e,languageOptions:n}}),this._client=this._worker.getProxy()}return await this._client}async getLanguageServiceWorker(...e){const t=await this._getClientProxy();return await(this._worker?.withSyncedResources(e)),t}}let l;async function d(...e){return await new Promise(((t,n)=>{l?t(l(...e)):n(new Error("TypeScript not registered!"))}))}const m=new class{constructor(){this._onDiagnosticsChange=new s}get onDiagnosticsChange(){return this._onDiagnosticsChange.event}fireDiagnosticsChange(e,t){this._onDiagnosticsChange.fire({uri:e,diagnostics:t})}};function x(){return m}function k(e){const t=new p(e),s=async(...e)=>await t.getLanguageServiceWorker(...e);l=s,n.setMonarchTokensProvider(e.languageId,g),n.setLanguageConfiguration(e.languageId,u),n.registerCompletionItemProvider(e.languageId,new r(s,e)),n.registerDocumentFormattingEditProvider(e.languageId,new i(s,e)),new o(e.languageId,s,{defaults:e,diagnosticsService:m})}export{x as getArcadeDiagnosticService,d as getArcadeWorker,k as setupMode}
@@ -0,0 +1,6 @@
1
+ /*!
2
+ * All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
+ * See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
+ * v4.31.0-next.7
5
+ */
6
+ import{L as a,i as t,c as s,f as i,E as e,U as n}from"./p-c9173dd7.js";import{g as o}from"./p-5fbefa40.js";async function r(){return(await c()).getArcadeDiagnosticService()}async function c(){return await import("./p-8a789638.js")}const l=new class extends a{constructor(){super(...arguments),this._languageId="arcade",this._languageOptions={}}async setProfileForModel(a,n,r={locale:"en"}){t(n)&&(n=await s(n,r.locale));const c=await i(r.locale,o("./assets/arcade-language/t9n"),"profile.t9n.");if(!c)throw new Error(`Failed to load the language bundle for ${r.locale}`);this.disposeForModel(a);const l=this._getApiKey(a),f=new e(n,c);this._profileMap.set(l,f);const h=await f.toLSProfile();this.updateApiContextForModel(a,{locale:r.locale,profile:h,snippets:r.snippets})}setLanguageOptions(a={}){this._languageOptions.assetsPath!==a.assetsPath&&(this._languageOptions={...this._languageOptions,...a},this._onDidChange.fire(this))}async getApiLibrary(a){const t=n.parse(a),s=await async function(a){const t=await c();return await t.getArcadeWorker(a)}(t);return await s.getApiLibrary(this.getApiContextForModel(t))}},f={setProfileForModel:l.setProfileForModel.bind(l)};export{f as a,l as b,c,r as g}
@@ -1,9 +1,9 @@
1
1
  /*!
2
2
  * All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  * See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
- * v4.31.0-next.5
4
+ * v4.31.0-next.7
5
5
  */
6
- import{G as t}from"./p-3d5b8c4b.js";import"./p-e89166f0.js";
6
+ import{G as t}from"./p-c9173dd7.js";import"./p-5fbefa40.js";
7
7
  /*!-----------------------------------------------------------------------------
8
8
  * Copyright (c) Microsoft Corporation. All rights reserved.
9
9
  * Version: 0.45.0(5e5af013f8d295555a7210df0d5f2cea0bf5dd56)
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  * See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
- * v4.31.0-next.5
4
+ * v4.31.0-next.7
5
5
  */
6
6
  const o=()=>{};export{o as g}