@arcgis/coding-components 4.29.0-beta.48 → 4.29.0-beta.49

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 (48) hide show
  1. package/dist/arcgis-coding-components/arcgis-coding-components.esm.js +1 -1
  2. package/dist/arcgis-coding-components/assets/code-editor/arcade.worker.js +13 -13
  3. package/dist/arcgis-coding-components/index.esm.js +1 -1
  4. package/dist/arcgis-coding-components/{p-b5479fc4.js → p-0d616249.js} +8 -8
  5. package/dist/arcgis-coding-components/{p-af7d25aa.js → p-5802524a.js} +1 -1
  6. package/dist/arcgis-coding-components/{p-30618728.js → p-5ddccf04.js} +1 -1
  7. package/dist/arcgis-coding-components/p-7475f3a6.js +1 -0
  8. package/dist/arcgis-coding-components/{p-2e99b56e.js → p-7d8caba9.js} +1 -1
  9. package/dist/arcgis-coding-components/{p-a8d30530.js → p-9f6db08a.js} +1 -1
  10. package/dist/arcgis-coding-components/{p-0823fa31.js → p-aefe77ce.js} +1 -1
  11. package/dist/arcgis-coding-components/p-ce2be55e.entry.js +1 -0
  12. package/dist/arcgis-coding-components/{p-d78367ff.js → p-d425a387.js} +1 -1
  13. package/dist/arcgis-coding-components/{p-ae129dfa.js → p-ff21f230.js} +1 -1
  14. package/dist/cjs/{arcade-defaults-6fa4acb9.js → arcade-defaults-2d513b59.js} +238 -238
  15. package/dist/cjs/{arcade-mode-15687545.js → arcade-mode-6219f1b8.js} +74 -73
  16. package/dist/cjs/arcgis-arcade-api_6.cjs.entry.js +42 -46
  17. package/dist/cjs/{cssMode-644e4ecf.js → cssMode-1ec48254.js} +1 -1
  18. package/dist/cjs/{html-567706f3.js → html-0e1741fe.js} +1 -1
  19. package/dist/cjs/{htmlMode-14c95ab8.js → htmlMode-279d3c29.js} +1 -1
  20. package/dist/cjs/index.cjs.js +1 -1
  21. package/dist/cjs/{javascript-69c3523c.js → javascript-04f1bce0.js} +2 -2
  22. package/dist/cjs/{jsonMode-da8803e7.js → jsonMode-59322f7a.js} +1 -1
  23. package/dist/cjs/{tsMode-eddf280e.js → tsMode-17561f70.js} +1 -1
  24. package/dist/cjs/{typescript-114292ed.js → typescript-b7da8629.js} +1 -1
  25. package/dist/components/arcade-api.js +1 -1
  26. package/dist/components/arcade-contribution.js +4 -4
  27. package/dist/components/arcade-defaults.js +3 -3
  28. package/dist/components/arcade-mode.js +73 -72
  29. package/dist/components/arcade-results.js +26 -30
  30. package/dist/components/arcade-suggestions.js +2 -4
  31. package/dist/components/arcade-variables.js +4 -2
  32. package/dist/components/arcgis-arcade-editor.js +3 -3
  33. package/dist/components/index2.js +2 -2
  34. package/dist/components/markdown.js +1 -1
  35. package/dist/esm/{arcade-defaults-3a952c7e.js → arcade-defaults-0bafa696.js} +238 -238
  36. package/dist/esm/{arcade-mode-619b0989.js → arcade-mode-c17a1fa1.js} +74 -73
  37. package/dist/esm/arcgis-arcade-api_6.entry.js +42 -46
  38. package/dist/esm/{cssMode-4100a9c5.js → cssMode-3d18bd2b.js} +1 -1
  39. package/dist/esm/{html-fbb4fdec.js → html-2bce5d77.js} +1 -1
  40. package/dist/esm/{htmlMode-a896869e.js → htmlMode-69d56956.js} +1 -1
  41. package/dist/esm/index.js +1 -1
  42. package/dist/esm/{javascript-a0bd70ad.js → javascript-ded5c9d7.js} +2 -2
  43. package/dist/esm/{jsonMode-76fe6af1.js → jsonMode-0bf84cb2.js} +1 -1
  44. package/dist/esm/{tsMode-277700f6.js → tsMode-15d4e936.js} +1 -1
  45. package/dist/esm/{typescript-c9f880aa.js → typescript-cc4d00f0.js} +1 -1
  46. package/package.json +6 -6
  47. package/dist/arcgis-coding-components/p-3dd452e0.js +0 -1
  48. package/dist/arcgis-coding-components/p-8f729db2.entry.js +0 -1
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const arcadeDefaults = require('./arcade-defaults-6fa4acb9.js');
3
+ const arcadeDefaults = require('./arcade-defaults-2d513b59.js');
4
4
  require('./index-ac186201.js');
5
5
 
6
6
  var ge=(e=>(e.False="false",e.Null="null",e.True="true",e))(ge||{}),xe=(e=>(e.Break="break",e.Continue="continue",e.Else="else",e.For="for",e.From="from",e.Function="function",e.If="if",e.Import="import",e.Export="export",e.In="in",e.Return="return",e.Var="var",e.While="while",e))(xe||{}),c=(e=>(e.AssignmentExpression="AssignmentExpression",e.ArrayExpression="ArrayExpression",e.BlockComment="BlockComment",e.BlockStatement="BlockStatement",e.BinaryExpression="BinaryExpression",e.BreakStatement="BreakStatement",e.CallExpression="CallExpression",e.ContinueStatement="ContinueStatement",e.EmptyStatement="EmptyStatement",e.ExpressionStatement="ExpressionStatement",e.ExportNamedDeclaration="ExportNamedDeclaration",e.ExportSpecifier="ExportSpecifier",e.ForStatement="ForStatement",e.ForInStatement="ForInStatement",e.FunctionDeclaration="FunctionDeclaration",e.Identifier="Identifier",e.IfStatement="IfStatement",e.ImportDeclaration="ImportDeclaration",e.ImportDefaultSpecifier="ImportDefaultSpecifier",e.LineComment="LineComment",e.Literal="Literal",e.LogicalExpression="LogicalExpression",e.MemberExpression="MemberExpression",e.ObjectExpression="ObjectExpression",e.Program="Program",e.Property="Property",e.ReturnStatement="ReturnStatement",e.TemplateElement="TemplateElement",e.TemplateLiteral="TemplateLiteral",e.UnaryExpression="UnaryExpression",e.UpdateExpression="UpdateExpression",e.VariableDeclaration="VariableDeclaration",e.VariableDeclarator="VariableDeclarator",e.WhileStatement="WhileStatement",e))(c||{}),De=["++","--"],We=["-","+","!","~"],qe=["=","/=","*=","%=","+=","-="],He=["||","&&"],bt=["|","&",">>","<<",">>>","^","==","!=","<","<=",">",">=","+","-","*","/","%"],It=(e=>(e[e.Unknown=0]="Unknown",e[e.BooleanLiteral=1]="BooleanLiteral",e[e.EOF=2]="EOF",e[e.Identifier=3]="Identifier",e[e.Keyword=4]="Keyword",e[e.NullLiteral=5]="NullLiteral",e[e.NumericLiteral=6]="NumericLiteral",e[e.Punctuator=7]="Punctuator",e[e.StringLiteral=8]="StringLiteral",e[e.Template=10]="Template",e))(It||{}),kt=(e=>(e.InvalidModuleUri="InvalidModuleUri",e.ForInOfLoopInitializer="ForInOfLoopInitializer",e.IdentiferExpected="IdentiferExpected",e.InvalidEscapedReservedWord="InvalidEscapedReservedWord",e.InvalidExpression="InvalidExpression",e.InvalidFunctionIdentifier="InvalidFunctionIdentifier",e.InvalidHexEscapeSequence="InvalidHexEscapeSequence",e.InvalidLeftHandSideInAssignment="InvalidLeftHandSideInAssignment",e.InvalidLeftHandSideInForIn="InvalidLeftHandSideInForIn",e.InvalidTemplateHead="InvalidTemplateHead",e.InvalidVariableAssignment="InvalidVariableAssignment",e.KeyMustBeString="KeyMustBeString",e.NoFunctionInsideBlock="NoFunctionInsideBlock",e.NoFunctionInsideFunction="NoFunctionInsideFunction",e.ModuleExportRootOnly="ModuleExportRootOnly",e.ModuleImportRootOnly="ModuleImportRootOnly",e.PunctuatorExpected="PunctuatorExpected",e.TemplateOctalLiteral="TemplateOctalLiteral",e.UnexpectedBoolean="UnexpectedBoolean",e.UnexpectedEndOfScript="UnexpectedEndOfScript",e.UnexpectedIdentifier="UnexpectedIdentifier",e.UnexpectedKeyword="UnexpectedKeyword",e.UnexpectedNull="UnexpectedNull",e.UnexpectedNumber="UnexpectedNumber",e.UnexpectedPunctuator="UnexpectedPunctuator",e.UnexpectedString="UnexpectedString",e.UnexpectedTemplate="UnexpectedTemplate",e.UnexpectedToken="UnexpectedToken",e))(kt||{});var v=[[],[],[]];De.forEach(e=>v[e.length-1].push(e));We.forEach(e=>v[e.length-1].push(e));He.forEach(e=>v[e.length-1].push(e));qe.forEach(e=>v[e.length-1].push(e));bt.forEach(e=>v[e.length-1].push(e));var rt=(D=>(D.AlreadyDefined="AlreadyDefined",D.ApiConflict="ApiConflict",D.AssignedNeverUsed="AssignedNeverUsed",D.DefinedNeverAssigned="DefinedNeverAssigned",D.DefinedNeverUsed="DefinedNeverUsed",D.EmptyBlockStatement="EmptyBlockStatement",D.ExecutionError="ExecutionError",D.InvalidApiFunctionUsage="InvalidApiFunctionUsage",D.InvalidConstantIdentifier="InvalidConstantIdentifier",D.InvalidPropertyIdentifier="InvalidPropertyIdentifier",D.NoArgumentExpected="NoArgumentExpected",D.NotADictionary="NotADictionary",D.NotDefined="NotDefined",D.NotEnoughArguments="NotEnoughArguments",D.ProfileVariablesAreImmutable="ProfileVariablesAreImmutable",D.ProfileVariablesConflict="ProfileVariablesConflict",D.ReservedKeyword="ReservedKeyword",D.TooManyArguments="TooManyArguments",D.UnexpectedEmptyFunction="UnexpectedEmptyFunction",D.UnexpectedPropertyIdentifier="UnexpectedPropertyIdentifier",D.UnknownPropertyIdentifier="UnknownPropertyIdentifier",D))(rt||{});var st=Object.values(xe),at=Object.values(ge);at.map(e=>({label:e,kind:arcadeDefaults.main.CompletionItemKind.Constant}));st.map(e=>({label:e,kind:arcadeDefaults.main.CompletionItemKind.Keyword}));
@@ -37,7 +37,7 @@ const operators = [
37
37
  ];
38
38
  const arcadeLanguageConfiguration = {
39
39
  // the default separators except `@$`
40
- wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
40
+ wordPattern: /(-?\d*\.\d\w*)|([^`~!#%\^&\*\(\)\-=\+\[\{\]\}\\\|;:'",\.<>\/\?\s]+)/gu,
41
41
  comments: {
42
42
  lineComment: "//",
43
43
  blockComment: ["/*", "*/"]
@@ -58,15 +58,15 @@ const arcadeLanguageConfiguration = {
58
58
  autoCloseBefore: ";:.,=}])` \n\t",
59
59
  folding: {
60
60
  markers: {
61
- start: new RegExp("^\\s*//\\s*#?region\\b"),
62
- end: new RegExp("^\\s*//\\s*#?endregion\\b")
61
+ start: /^\s*\/\/\s*#?region\b/u,
62
+ end: /^\s*\/\/\s*#?endregion\b/u
63
63
  }
64
64
  },
65
65
  indentationRules: {
66
66
  // ^(.*\*/)?\s*\}.*$
67
- decreaseIndentPattern: /^((?!.*?\/\*).*\*\/)?\s*[\}\]\)].*$/,
67
+ decreaseIndentPattern: /^((?!.*?\/\*).*\*\/)?\s*[\}\]\)].*$/u,
68
68
  // ^.*\{[^}"']*$
69
- increaseIndentPattern: /^((?!\/\/).)*(\{[^}"'`]*|\([^)"'`]*|\[[^\]"'`]*)$/
69
+ increaseIndentPattern: /^((?!\/\/).)*(\{[^}"'`]*|\([^)"'`]*|\[[^\]"'`]*)$/u
70
70
  }
71
71
  };
72
72
  const arcadeMonarchLanguage = {
@@ -82,23 +82,23 @@ const arcadeMonarchLanguage = {
82
82
  operators,
83
83
  constants: ["true", "false", "null"],
84
84
  // we include these common regular expressions
85
- symbols: /[=><!~?:&|+\-*\/\^%]+/,
86
- escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
87
- digits: /\d+(_+\d+)*/,
88
- octaldigits: /[0-7]+(_+[0-7]+)*/,
89
- binarydigits: /[0-1]+(_+[0-1]+)*/,
90
- hexdigits: /[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,
91
- regexpctl: /[(){}\[\]\$\^|\-*+?\.]/,
92
- regexpesc: /\\(?:[bBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})/,
85
+ symbols: /[=><!~?:&|+\-*\/\^%]+/u,
86
+ escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/u,
87
+ digits: /\d+(_+\d+)*/u,
88
+ octaldigits: /[0-7]+(_+[0-7]+)*/u,
89
+ binarydigits: /[0-1]+(_+[0-1]+)*/u,
90
+ hexdigits: /[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/u,
91
+ regexpctl: /[(){}\[\]\$\^|\-*+?\.]/u,
92
+ regexpesc: /\\(?:[bBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})/u,
93
93
  // The main tokenizer for our languages
94
94
  tokenizer: {
95
- root: [[/[{}]/, "delimiter.bracket"], { include: "common" }],
95
+ root: [[/[{}]/u, "delimiter.bracket"], { include: "common" }],
96
96
  common: [
97
97
  // import statement. import followed by a white space
98
- [/import(?=\s)/, { token: "keyword", next: "@import" }],
98
+ [/import(?=\s)/u, { token: "keyword", next: "@import" }],
99
99
  // identifiers and keywords
100
100
  [
101
- /[a-z_$][\w$]*/,
101
+ /[a-z_$][\w$]*/u,
102
102
  {
103
103
  cases: {
104
104
  "@constants": "constant",
@@ -111,14 +111,14 @@ const arcadeMonarchLanguage = {
111
111
  { include: "@whitespace" },
112
112
  // regular expression: ensure it is terminated before beginning (otherwise it is an opeator)
113
113
  [
114
- /\/(?=([^\\\/]|\\.)+\/([gimsuy]*)(\s*)(\.|;|\/|,|\)|\]|\}|$))/,
114
+ /\/(?=([^\\\/]|\\.)+\/([gimsuy]*)(\s*)(\.|;|\/|,|\)|\]|\}|$))/u,
115
115
  { token: "regexp", bracket: "@open", next: "@regexp" }
116
116
  ],
117
117
  // delimiters and operators
118
- [/[()\[\]]/, "@brackets"],
119
- [/[<>](?!@symbols)/, "@brackets"],
118
+ [/[()\[\]]/u, "@brackets"],
119
+ [/[<>](?!@symbols)/u, "@brackets"],
120
120
  [
121
- /@symbols/,
121
+ /@symbols/u,
122
122
  {
123
123
  cases: {
124
124
  "@operators": "delimiter",
@@ -127,87 +127,87 @@ const arcadeMonarchLanguage = {
127
127
  }
128
128
  ],
129
129
  // numbers
130
- [/(@digits)[eE]([\-+]?(@digits))?/, "number"],
131
- [/(@digits)\.(@digits)([eE][\-+]?(@digits))?/, "number"],
132
- [/0[xX](@hexdigits)/, "number"],
133
- [/0[oO]?(@octaldigits)/, "number"],
134
- [/0[bB](@binarydigits)/, "number"],
135
- [/(@digits)/, "number"],
130
+ [/(@digits)[eE]([\-+]?(@digits))?/u, "number"],
131
+ [/(@digits)\.(@digits)([eE][\-+]?(@digits))?/u, "number"],
132
+ [/0[xX](@hexdigits)/u, "number"],
133
+ [/0[oO]?(@octaldigits)/u, "number"],
134
+ [/0[bB](@binarydigits)/u, "number"],
135
+ [/(@digits)/u, "number"],
136
136
  // delimiter: after number because of .\d floats
137
- [/[;,.]/, "delimiter"],
137
+ [/[;,.]/u, "delimiter"],
138
138
  // strings
139
- [/"([^"\\]|\\.)*$/, "string.invalid"],
140
- [/'([^'\\]|\\.)*$/, "string.invalid"],
141
- [/"/, "string", "@string_double"],
142
- [/'/, "string", "@string_single"],
143
- [/`/, "string", "@string_backtick"]
139
+ [/"([^"\\]|\\.)*$/u, "string.invalid"],
140
+ [/'([^'\\]|\\.)*$/u, "string.invalid"],
141
+ [/"/u, "string", "@string_double"],
142
+ [/'/u, "string", "@string_single"],
143
+ [/`/u, "string", "@string_backtick"]
144
144
  ],
145
145
  import: [
146
146
  // import keyword
147
- [/import(?=\s)/, { token: "keyword" }],
147
+ [/import(?=\s)/u, { token: "keyword" }],
148
148
  // whitespace
149
149
  { include: "@whitespace" },
150
150
  // identifier
151
- [/[a-z_$][\w$]*/, "identifier"],
151
+ [/[a-z_$][\w$]*/u, "identifier"],
152
152
  // whitespace
153
153
  { include: "@whitespace" },
154
154
  // from keyword
155
- [/from/, { token: "keyword", next: "@popall" }]
155
+ [/from/u, { token: "keyword", next: "@popall" }]
156
156
  ],
157
157
  whitespace: [
158
- [/[ \t\r\n]+/, ""],
159
- [/\/\*/, "comment", "@comment"],
160
- [/\/\/.*$/, "comment"]
158
+ [/[ \t\r\n]+/u, ""],
159
+ [/\/\*/u, "comment", "@comment"],
160
+ [/\/\/.*$/u, "comment"]
161
161
  ],
162
162
  comment: [
163
- [/[^\/*]+/, "comment"],
164
- [/\*\//, "comment", "@pop"],
165
- [/[\/*]/, "comment"]
163
+ [/[^\/*]+/u, "comment"],
164
+ [/\*\//u, "comment", "@pop"],
165
+ [/[\/*]/u, "comment"]
166
166
  ],
167
167
  // We match regular expression quite precisely
168
168
  regexp: [
169
- [/(\{)(\d+(?:,\d*)?)(\})/, ["regexp.escape.control", "regexp.escape.control", "regexp.escape.control"]],
169
+ [/(\{)(\d+(?:,\d*)?)(\})/u, ["regexp.escape.control", "regexp.escape.control", "regexp.escape.control"]],
170
170
  [
171
- /(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,
171
+ /(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/u,
172
172
  ["regexp.escape.control", { token: "regexp.escape.control", next: "@regexrange" }]
173
173
  ],
174
- [/(\()(\?:|\?=|\?!)/, ["regexp.escape.control", "regexp.escape.control"]],
175
- [/[()]/, "regexp.escape.control"],
176
- [/@regexpctl/, "regexp.escape.control"],
177
- [/[^\\\/]/, "regexp"],
178
- [/@regexpesc/, "regexp.escape"],
179
- [/\\\./, "regexp.invalid"],
180
- [/(\/)([gimsuy]*)/, [{ token: "regexp", bracket: "@close", next: "@pop" }, "keyword.other"]]
174
+ [/(\()(\?:|\?=|\?!)/u, ["regexp.escape.control", "regexp.escape.control"]],
175
+ [/[()]/u, "regexp.escape.control"],
176
+ [/@regexpctl/u, "regexp.escape.control"],
177
+ [/[^\\\/]/u, "regexp"],
178
+ [/@regexpesc/u, "regexp.escape"],
179
+ [/\\\./u, "regexp.invalid"],
180
+ [/(\/)([gimsuy]*)/u, [{ token: "regexp", bracket: "@close", next: "@pop" }, "keyword.other"]]
181
181
  ],
182
182
  regexrange: [
183
- [/-/, "regexp.escape.control"],
184
- [/\^/, "regexp.invalid"],
185
- [/@regexpesc/, "regexp.escape"],
186
- [/[^\]]/, "regexp"],
187
- [/\]/, { token: "regexp.escape.control", next: "@pop", bracket: "@close" }]
183
+ [/-/u, "regexp.escape.control"],
184
+ [/\^/u, "regexp.invalid"],
185
+ [/@regexpesc/u, "regexp.escape"],
186
+ [/[^\]]/u, "regexp"],
187
+ [/\]/u, { token: "regexp.escape.control", next: "@pop", bracket: "@close" }]
188
188
  ],
189
189
  string_double: [
190
- [/[^\\"]+/, "string"],
191
- [/@escapes/, "string.escape"],
192
- [/\\./, "string.escape.invalid"],
193
- [/"/, "string", "@pop"]
190
+ [/[^\\"]+/u, "string"],
191
+ [/@escapes/u, "string.escape"],
192
+ [/\\./u, "string.escape.invalid"],
193
+ [/"/u, "string", "@pop"]
194
194
  ],
195
195
  string_single: [
196
- [/[^\\']+/, "string"],
197
- [/@escapes/, "string.escape"],
198
- [/\\./, "string.escape.invalid"],
199
- [/'/, "string", "@pop"]
196
+ [/[^\\']+/u, "string"],
197
+ [/@escapes/u, "string.escape"],
198
+ [/\\./u, "string.escape.invalid"],
199
+ [/'/u, "string", "@pop"]
200
200
  ],
201
201
  string_backtick: [
202
- [/\$\{/, { token: "delimiter.bracket", next: "@bracketCounting" }],
203
- [/[^\\`$]+/, "string"],
204
- [/@escapes/, "string.escape"],
205
- [/\\./, "string.escape.invalid"],
206
- [/`/, "string", "@pop"]
202
+ [/\$\{/u, { token: "delimiter.bracket", next: "@bracketCounting" }],
203
+ [/[^\\`$]+/u, "string"],
204
+ [/@escapes/u, "string.escape"],
205
+ [/\\./u, "string.escape.invalid"],
206
+ [/`/u, "string", "@pop"]
207
207
  ],
208
208
  bracketCounting: [
209
- [/\{/, "delimiter.bracket", "@bracketCounting"],
210
- [/\}/, "delimiter.bracket", "@pop"],
209
+ [/\{/u, "delimiter.bracket", "@bracketCounting"],
210
+ [/\}/u, "delimiter.bracket", "@pop"],
211
211
  { include: "common" }
212
212
  ]
213
213
  }
@@ -268,7 +268,7 @@ class DiagnosticsAdapter {
268
268
  }));
269
269
  this._disposables.push({
270
270
  dispose: () => {
271
- for (const key in this._listener) {
271
+ for (const key of Object.keys(this._listener)) {
272
272
  this._listener[key].dispose();
273
273
  }
274
274
  }
@@ -538,7 +538,7 @@ let arcadeWorker;
538
538
  async function getArcadeWorker(...uris) {
539
539
  return new Promise((resolve, reject) => {
540
540
  if (!arcadeWorker) {
541
- return reject("TypeScript not registered!");
541
+ return reject(new Error("TypeScript not registered!"));
542
542
  }
543
543
  resolve(arcadeWorker(...uris));
544
544
  });
@@ -587,6 +587,7 @@ function setupMode(arcadeDefaults$1) {
587
587
  // Creates and registers a Formatter
588
588
  arcadeDefaults.languages.registerDocumentFormattingEditProvider(arcadeDefaults$1.languageId, new FormattingProvider(workerAccessor, arcadeDefaults$1));
589
589
  // Creates a Diagnostic Adapter
590
+ // eslint-disable-next-line no-new
590
591
  new DiagnosticsAdapter(arcadeDefaults$1.languageId, workerAccessor, {
591
592
  defaults: arcadeDefaults$1,
592
593
  diagnosticsService: arcadeDiagnosticService
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-ac186201.js');
6
- const arcadeDefaults = require('./arcade-defaults-6fa4acb9.js');
6
+ const arcadeDefaults = require('./arcade-defaults-2d513b59.js');
7
7
 
8
8
  async function colorizeCode(code) {
9
9
  return arcadeDefaults.editor.colorize(code, "arcade", { tabSize: 2 });
@@ -2923,7 +2923,7 @@ marked_umd.marked.use({
2923
2923
  }
2924
2924
  });
2925
2925
  function convertMarkdownString(value) {
2926
- value = value ?? "";
2926
+ value ?? (value = "");
2927
2927
  const result = marked_umd.marked(typeof value === "string" ? value : value.value, {
2928
2928
  gfm: true,
2929
2929
  breaks: true,
@@ -2934,11 +2934,11 @@ function convertMarkdownString(value) {
2934
2934
  }
2935
2935
 
2936
2936
  function isMonacoEnvironmentSetup() {
2937
- return !!self.MonacoEnvironment?.getWorkerUrl;
2937
+ return !!globalThis.MonacoEnvironment?.getWorkerUrl;
2938
2938
  }
2939
2939
  const additionalLanguageWorkersMap = new Map();
2940
2940
  function getAssetsPath() {
2941
- return self.MonacoEnvironment?.assetsPath;
2941
+ return globalThis.MonacoEnvironment?.assetsPath;
2942
2942
  }
2943
2943
  function setupMonacoEnvironment(assetsPath) {
2944
2944
  //
@@ -2948,7 +2948,7 @@ function setupMonacoEnvironment(assetsPath) {
2948
2948
  }
2949
2949
  // Since we are using workers, monaco needs to find them.
2950
2950
  // Using the global MonacoEnvironment.
2951
- self.MonacoEnvironment = {
2951
+ globalThis.MonacoEnvironment = {
2952
2952
  assetsPath,
2953
2953
  getWorker: async (_, languageId) => {
2954
2954
  // Manufacture the url for the web worker
@@ -2972,7 +2972,7 @@ function setupMonacoEnvironment(assetsPath) {
2972
2972
  break;
2973
2973
  }
2974
2974
  // If we have a relative path or we are on same orgin, we can use the default js implementation
2975
- if (!arcadeDefaults.X(url) || arcadeDefaults.V(url, location.href, true)) {
2975
+ if (!arcadeDefaults.X(url) || arcadeDefaults.V(url, globalThis.location.href, true)) {
2976
2976
  return new Worker(url, { name: languageId });
2977
2977
  }
2978
2978
  // For cross orgin, we will load the worker code as a string and manufacture a blob
@@ -3019,7 +3019,7 @@ async function getArcadeWorker(uri) {
3019
3019
  * @returns mode for arcade
3020
3020
  */
3021
3021
  function getMode() {
3022
- return Promise.resolve().then(function () { return require('./arcade-mode-15687545.js'); });
3022
+ return Promise.resolve().then(function () { return require('./arcade-mode-6219f1b8.js'); });
3023
3023
  }
3024
3024
  // Register the language in Monaco
3025
3025
  arcadeDefaults.languages.register({
@@ -3081,7 +3081,7 @@ const ArcgisArcadeApi = class {
3081
3081
  this._selectedApiItem = undefined;
3082
3082
  };
3083
3083
  // @ts-expect-error
3084
- this._updateFilterValue = (e) => (this._filterValue = e.target?.["value"] ?? "");
3084
+ this._updateFilterValue = (e) => (this._filterValue = e.target?.value ?? "");
3085
3085
  this._lang = "";
3086
3086
  this._t9nLocale = "";
3087
3087
  this._t9nStrings = undefined;
@@ -3319,8 +3319,8 @@ async function loadArcadeResult(result, timeZone = "system") {
3319
3319
  async function executeScript(editorProfile, script, testContext, console) {
3320
3320
  //
3321
3321
  const timeStamp = new Date();
3322
- // Provide a default console function is missing
3323
- console = console ?? (() => undefined);
3322
+ // Provide a default console function if missing
3323
+ console ?? (console = () => undefined);
3324
3324
  try {
3325
3325
  // We want to measure compilation time
3326
3326
  const t0 = performance.now();
@@ -3359,7 +3359,7 @@ async function executeScript(editorProfile, script, testContext, console) {
3359
3359
  type: "error",
3360
3360
  value: message,
3361
3361
  error,
3362
- timeStamp: timeStamp,
3362
+ timeStamp,
3363
3363
  compilationTime: 0,
3364
3364
  executionTime: 0
3365
3365
  };
@@ -3434,7 +3434,7 @@ const ArcgisArcadeEditor = class {
3434
3434
  this.scriptChange = index.createEvent(this, "scriptChange", 3);
3435
3435
  this.diagnosticsChange = index.createEvent(this, "diagnosticsChange", 3);
3436
3436
  this._componentReadyDefer = new arcadeDefaults.p();
3437
- this._modelId = arcadeDefaults.j();
3437
+ this._modelId = arcadeDefaults.$();
3438
3438
  this._editorProfilePromise = Promise.resolve(undefined);
3439
3439
  this._disposables = [];
3440
3440
  this._executeScript = async () => {
@@ -3613,7 +3613,7 @@ const ArcgisArcadeEditor = class {
3613
3613
  // Start listening to the validation diagnostics.
3614
3614
  // We are doing this as late as possible
3615
3615
  const diagnosticsService = await getArcadeDiagnosticService();
3616
- this._disposables.push(diagnosticsService.onDiagnosticsChange((ev) => !this._preparingProfile && this.diagnosticsChange.emit(ev.diagnostics)));
3616
+ this._disposables.push(diagnosticsService.onDiagnosticsChange((event) => !this._preparingProfile && this.diagnosticsChange.emit(event.diagnostics)));
3617
3617
  // Get editor instance and add action
3618
3618
  this._standaloneCodeEditor = await this.getEditorInstance();
3619
3619
  this._standaloneCodeEditor?.addAction({
@@ -3742,7 +3742,7 @@ ArcgisArcadeEditor.style = arcadeEditorCss;
3742
3742
  const indentSpecs = { char: " ", size: 2 };
3743
3743
  const indentType = new Array(indentSpecs.size + 1).join(indentSpecs.char);
3744
3744
  function createPushFunc(p) {
3745
- return (substring) => "\\" + p.push(substring) + "\\";
3745
+ return (substring) => `\\${p.push(substring)}\\`;
3746
3746
  }
3747
3747
  function createPopFunc(p) {
3748
3748
  return (_, offset) => p[offset - 1];
@@ -3755,25 +3755,27 @@ function jsonFormat(json) {
3755
3755
  const p = [];
3756
3756
  const pushFunc = createPushFunc(p);
3757
3757
  const jsonString = JSON.stringify(json)
3758
- .replace(/\\./g, pushFunc)
3759
- .replace(/(".*?"|'.*?')/g, pushFunc)
3760
- .replace(/\s+/, "");
3758
+ .replace(/\\./gu, pushFunc)
3759
+ .replace(/(".*?"|'.*?')/gu, pushFunc)
3760
+ .replace(/\s+/u, "");
3761
3761
  // Indent and insert newlines
3762
3762
  let indentIndex = 0;
3763
3763
  let out = "";
3764
- for (let i = 0; i < jsonString.length; i++) {
3764
+ for (let i = 0; i < jsonString.length; i += 1) {
3765
3765
  const c = jsonString.charAt(i);
3766
3766
  switch (c) {
3767
3767
  case "{":
3768
3768
  case "[":
3769
- out += c + "\n" + indent(++indentIndex, indentType);
3769
+ indentIndex += 1;
3770
+ out += `${c}\n${indent(indentIndex, indentType)}`;
3770
3771
  break;
3771
3772
  case "}":
3772
3773
  case "]":
3773
- out += "\n" + indent(--indentIndex, indentType) + c;
3774
+ indentIndex -= 1;
3775
+ out += `\n${indent(indentIndex, indentType)}${c}`;
3774
3776
  break;
3775
3777
  case ",":
3776
- out += ",\n" + indent(indentIndex, indentType);
3778
+ out += `,\n${indent(indentIndex, indentType)}`;
3777
3779
  break;
3778
3780
  case ":":
3779
3781
  out += ": ";
@@ -3787,11 +3789,9 @@ function jsonFormat(json) {
3787
3789
  // and strings back in
3788
3790
  const popFunc = createPopFunc(p);
3789
3791
  return out
3790
- .replace(/\[[\d,\s]+?\]/g, function (m) {
3791
- return m.replace(/\s/g, "");
3792
- })
3793
- .replace(/\\(\d+)\\/g, popFunc) // strings
3794
- .replace(/\\(\d+)\\/g, popFunc); // backslashes in strings
3792
+ .replace(/\[[\d,\s]+?\]/gu, (m) => m.replace(/\s/gu, ""))
3793
+ .replace(/\\(\d+)\\/gu, popFunc) // strings
3794
+ .replace(/\\(\d+)\\/gu, popFunc); // backslashes in strings
3795
3795
  }
3796
3796
 
3797
3797
  const arcadeResultsCss = ":host{display:flex;flex-direction:column;width:100%;background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-2)}:host .flex-adjustable{flex:1 1 auto;overflow:hidden}:host .flex-row{display:flex;flex-direction:row;overflow:hidden}:host .flex-column{display:flex;flex-direction:column;overflow:hidden}:host .y-scrollable-container{overflow-y:auto;block-size:100%;background-color:var(--calcite-ui-foreground-1)}:host header{border-bottom:1px solid var(--calcite-ui-border-3);flex:0 0 auto}:host .ltr-container{direction:ltr}:host calcite-action-bar calcite-action-group{padding-inline-end:var(--calcite-spacing-half)}:host calcite-action-bar calcite-action-group calcite-action{padding-inline-end:var(--calcite-spacing-half)}:host calcite-action-bar calcite-action-group calcite-action:not(:first-child){padding-inline-start:var(--calcite-spacing-half)}:host calcite-action-bar calcite-action-group:last-child{border-inline-end-width:0px}:host calcite-action-bar calcite-action-group:not(:first-child){padding-inline-start:var(--calcite-spacing-half)}:host .notice-container{margin:var(--calcite-spacing-quarter);padding:var(--calcite-spacing-half);background-color:var(--calcite-ui-foreground-1)}:host .color-info{color:var(--calcite-ui-info)}:host .color-error{color:var(--calcite-ui-danger)}:host .color-success{color:var(--calcite-ui-success)}:host [class*=result-value-]{font-size:var(--calcite-font-size--2);line-height:1.25rem;background-color:var(--calcite-ui-foreground-1);margin:var(--calcite-spacing-three-quarter)}:host .console-logs-container{background-color:var(--calcite-ui-foreground-1);padding:0 var(--calcite-spacing-three-quarter);font-family:var(--calcite-code-family);font-size:var(--calcite-font-size--2);font-weight:var(--calcite-font-weight-normal)}:host .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}:host .result-value-table table thead{background-color:var(--calcite-ui-foreground-2)}:host .result-value-table table tr{border-top:1px solid var(--calcite-ui-border-3);border-bottom:1px solid var(--calcite-ui-border-3)}:host .result-value-table table th,:host .result-value-table table td{border-inline-start:1px solid var(--calcite-ui-border-3);border-inline-end:1px solid var(--calcite-ui-border-3);text-align:start;padding:var(--calcite-spacing-quarter)}:host .result-value-table table th .string-value,:host .result-value-table table td .string-value{white-space:pre}:host .result-value-table table th{font-weight:var(--calcite-font-weight-medium)}:host .tree-item-label,:host .number-value,:host .string-value,:host .boolean-value{font-family:var(--calcite-code-family)}:host .tree-item-label,:host .value-type{color:var(--calcite-text-2);font-weight:var(--calcite-font-weight-normal)}:host .dictionary-property{color:var(--arcgis-arcade-editor-identifier)}:host .number-value{color:var(--arcgis-arcade-editor-number)}:host .string-value{color:var(--arcgis-arcade-editor-string);white-space:pre-wrap}:host .constant-value{color:var(--arcgis-arcade-editor-constant)}:host .date-value{color:var(--arcgis-arcade-editor-date)}";
@@ -3856,9 +3856,7 @@ const ArcgisArcadeResults = class {
3856
3856
  if (this.loading && !this.consoleLogs?.length) {
3857
3857
  return index.h("calcite-loader", { scale: "s", type: "indeterminate", label: "" });
3858
3858
  }
3859
- return (index.h("div", { class: "console-logs-container ltr-container" }, this.consoleLogs?.length ? (this.consoleLogs.map((log) => {
3860
- return index.h("p", null, log);
3861
- })) : (index.h("p", null, this._t9nStrings?.consolemessage))));
3859
+ return (index.h("div", { class: "console-logs-container ltr-container" }, this.consoleLogs?.length ? (this.consoleLogs.map((log) => index.h("p", null, log))) : (index.h("p", null, this._t9nStrings?.consolemessage))));
3862
3860
  }
3863
3861
  renderLogPanel() {
3864
3862
  if (this.openedResultPanel !== "log") {
@@ -4013,17 +4011,15 @@ const ArcgisArcadeResults = class {
4013
4011
  }
4014
4012
  renderFeatureSetTable(arcadeResult) {
4015
4013
  const fields = arcadeDefaults.supportedFields(arcadeResult.value.fields);
4016
- return (index.h("table", null, index.h("thead", null, index.h("tr", null, fields.map((field) => (index.h("th", null, field.name))))), index.h("tbody", null, arcadeResult.features.map((feature) => {
4017
- return (index.h("tr", null, fields.map((field) => {
4018
- try {
4019
- const arcadeResult = valueToArcadeResult(feature.field(field.name));
4020
- return index.h("td", null, this.renderSimpleValue(arcadeResult));
4021
- }
4022
- catch (e) {
4023
- return index.h("td", null);
4024
- }
4025
- })));
4026
- }))));
4014
+ return (index.h("table", null, index.h("thead", null, index.h("tr", null, fields.map((field) => (index.h("th", null, field.name))))), index.h("tbody", null, arcadeResult.features.map((feature) => (index.h("tr", null, fields.map((field) => {
4015
+ try {
4016
+ const arcadeResult = valueToArcadeResult(feature.field(field.name));
4017
+ return index.h("td", null, this.renderSimpleValue(arcadeResult));
4018
+ }
4019
+ catch (e) {
4020
+ return index.h("td", null);
4021
+ }
4022
+ })))))));
4027
4023
  }
4028
4024
  render() {
4029
4025
  return (index.h(index.Host, null, index.h("header", { class: "flex-row" }, index.h("calcite-action-bar", { class: "flex-adjustable", layout: "horizontal", scale: "s", expanded: true, "expand-disabled": true }, index.h("calcite-action-group", { scale: "s" }, index.h("calcite-action", { active: this.openedResultPanel === "output", text: this._t9nStrings?.output ?? "Output", "text-enabled": true, scale: "s", icon: "list-show-all", iconFlipRtl: true, onClick: this._switchResultPanel, "data-panel-name": "output" }), index.h("calcite-action", { active: this.openedResultPanel === "console", text: this._t9nStrings?.console ?? "Console", "text-enabled": true, scale: "s", icon: "console", iconFlipRtl: true, onClick: this._switchResultPanel, "data-panel-name": "console" }), index.h("calcite-action", { active: this.openedResultPanel === "log", text: this._t9nStrings?.log ?? "Log", "text-enabled": true, scale: "s", icon: "list", iconFlipRtl: true, onClick: this._switchResultPanel, "data-panel-name": "log" }))), index.h("calcite-action", { scale: "s", icon: "x", text: this._t9nStrings?.close ?? "", onClick: this._emitClose })), index.h("article", { class: "flex-adjustable" }, this.loading ? (index.h("calcite-loader", { scale: "s", type: "indeterminate", label: "" })) : (index.h("div", { class: "flex-column y-scrollable-container" }, this.renderOutputPanel(), this.renderConsolePanel(), this.renderLogPanel())))));
@@ -4051,7 +4047,7 @@ const ArcgisArcadeSuggestions = class {
4051
4047
  this.close = index.createEvent(this, "close", 3);
4052
4048
  this.itemSelected = index.createEvent(this, "itemSelected", 3);
4053
4049
  // @ts-expect-error
4054
- this._updateFilterValue = (e) => (this._filterValue = e.target?.["value"] ?? "");
4050
+ this._updateFilterValue = (e) => (this._filterValue = e.target?.value ?? "");
4055
4051
  this._emitItemSelected = (e) => {
4056
4052
  // @ts-expect-error
4057
4053
  const item = e.target?.["data-item"];
@@ -4125,9 +4121,7 @@ const ArcgisArcadeSuggestions = class {
4125
4121
  return null;
4126
4122
  }
4127
4123
  if (isSuggestionGroups(this.suggestions)) {
4128
- return this.suggestions.map((suggestionGroup) => {
4129
- return (index.h("calcite-list-item-group", { heading: suggestionGroup.label }, this.renderSuggestionListItems(suggestionGroup.suggestions)));
4130
- });
4124
+ return this.suggestions.map((suggestionGroup) => (index.h("calcite-list-item-group", { heading: suggestionGroup.label }, this.renderSuggestionListItems(suggestionGroup.suggestions))));
4131
4125
  }
4132
4126
  return this.renderSuggestionListItems(this.suggestions);
4133
4127
  }
@@ -4164,7 +4158,7 @@ const ArcgisArcadeVariables = class {
4164
4158
  this.close = index.createEvent(this, "close", 3);
4165
4159
  this.itemSelected = index.createEvent(this, "itemSelected", 3);
4166
4160
  // @ts-expect-error
4167
- this._updateFilterValue = (e) => (this._filterValue = e.target?.["value"] ?? "");
4161
+ this._updateFilterValue = (e) => (this._filterValue = e.target?.value ?? "");
4168
4162
  this._beforeBack = async () => {
4169
4163
  this.removeLastPanelRenderer();
4170
4164
  this._filterValue = "";
@@ -4258,7 +4252,9 @@ const ArcgisArcadeVariables = class {
4258
4252
  let loading = this.loading;
4259
4253
  if (!loading && !collection.loaded) {
4260
4254
  // Request to load and update mutation counter when done
4261
- collection.loadSource().then(() => setTimeout(() => this._mutationCounter++));
4255
+ collection.loadSource().then(() => setTimeout(() => {
4256
+ this._mutationCounter += 1;
4257
+ }));
4262
4258
  loading = true;
4263
4259
  }
4264
4260
  return (index.h("calcite-flow-item", { heading: this._t9nStrings?.profilevariables, beforeBack: this._beforeBack, closable: true, onCalciteFlowItemClose: this._emitClose }, index.h("calcite-action", { slot: "header-actions-end", text: this._t9nStrings?.backtotop ?? "Back to top", scale: "m", hidden: topPanel, icon: "chevrons-left", iconFlipRtl: true, onClick: this._backToTop }), index.h(StickyFilterInput, { filterValue: this._filterValue, onCalciteInputInput: this._updateFilterValue }), loading ? (index.h("calcite-loader", { scale: "s", type: "indeterminate", label: this._t9nStrings?.loading ?? "Loading" })) : (index.h("calcite-list", null, this.renderEditorVariables(collection)))));
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const arcadeDefaults = require('./arcade-defaults-6fa4acb9.js');
3
+ const arcadeDefaults = require('./arcade-defaults-2d513b59.js');
4
4
  require('./index-ac186201.js');
5
5
 
6
6
  /*!-----------------------------------------------------------------------------
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const arcadeDefaults = require('./arcade-defaults-6fa4acb9.js');
3
+ const arcadeDefaults = require('./arcade-defaults-2d513b59.js');
4
4
  require('./index-ac186201.js');
5
5
 
6
6
  /*!-----------------------------------------------------------------------------
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const arcadeDefaults = require('./arcade-defaults-6fa4acb9.js');
3
+ const arcadeDefaults = require('./arcade-defaults-2d513b59.js');
4
4
  require('./index-ac186201.js');
5
5
 
6
6
  /*!-----------------------------------------------------------------------------
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const arcadeDefaults = require('./arcade-defaults-6fa4acb9.js');
5
+ const arcadeDefaults = require('./arcade-defaults-2d513b59.js');
6
6
  require('./index-ac186201.js');
7
7
 
8
8
 
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- const typescript = require('./typescript-114292ed.js');
4
- require('./arcade-defaults-6fa4acb9.js');
3
+ const typescript = require('./typescript-b7da8629.js');
4
+ require('./arcade-defaults-2d513b59.js');
5
5
  require('./index-ac186201.js');
6
6
 
7
7
  /*!-----------------------------------------------------------------------------
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const arcadeDefaults = require('./arcade-defaults-6fa4acb9.js');
3
+ const arcadeDefaults = require('./arcade-defaults-2d513b59.js');
4
4
  require('./index-ac186201.js');
5
5
 
6
6
  /*!-----------------------------------------------------------------------------
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const arcadeDefaults = require('./arcade-defaults-6fa4acb9.js');
3
+ const arcadeDefaults = require('./arcade-defaults-2d513b59.js');
4
4
  require('./index-ac186201.js');
5
5
 
6
6
  /*!-----------------------------------------------------------------------------
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const arcadeDefaults = require('./arcade-defaults-6fa4acb9.js');
3
+ const arcadeDefaults = require('./arcade-defaults-2d513b59.js');
4
4
  require('./index-ac186201.js');
5
5
 
6
6
  /*!-----------------------------------------------------------------------------
@@ -61,7 +61,7 @@ const ArcgisArcadeApi = /*@__PURE__*/ proxyCustomElement(class ArcgisArcadeApi e
61
61
  this._selectedApiItem = undefined;
62
62
  };
63
63
  // @ts-expect-error
64
- this._updateFilterValue = (e) => (this._filterValue = e.target?.["value"] ?? "");
64
+ this._updateFilterValue = (e) => (this._filterValue = e.target?.value ?? "");
65
65
  this._lang = "";
66
66
  this._t9nLocale = "";
67
67
  this._t9nStrings = undefined;
@@ -4,11 +4,11 @@ import { c as importRequest } from './fields.js';
4
4
  import { X, V } from './index2.js';
5
5
 
6
6
  function isMonacoEnvironmentSetup() {
7
- return !!self.MonacoEnvironment?.getWorkerUrl;
7
+ return !!globalThis.MonacoEnvironment?.getWorkerUrl;
8
8
  }
9
9
  const additionalLanguageWorkersMap = new Map();
10
10
  function getAssetsPath() {
11
- return self.MonacoEnvironment?.assetsPath;
11
+ return globalThis.MonacoEnvironment?.assetsPath;
12
12
  }
13
13
  function setupMonacoEnvironment(assetsPath) {
14
14
  //
@@ -18,7 +18,7 @@ function setupMonacoEnvironment(assetsPath) {
18
18
  }
19
19
  // Since we are using workers, monaco needs to find them.
20
20
  // Using the global MonacoEnvironment.
21
- self.MonacoEnvironment = {
21
+ globalThis.MonacoEnvironment = {
22
22
  assetsPath,
23
23
  getWorker: async (_, languageId) => {
24
24
  // Manufacture the url for the web worker
@@ -42,7 +42,7 @@ function setupMonacoEnvironment(assetsPath) {
42
42
  break;
43
43
  }
44
44
  // If we have a relative path or we are on same orgin, we can use the default js implementation
45
- if (!X(url) || V(url, location.href, true)) {
45
+ if (!X(url) || V(url, globalThis.location.href, true)) {
46
46
  return new Worker(url, { name: languageId });
47
47
  }
48
48
  // For cross orgin, we will load the worker code as a string and manufacture a blob