@arcgis/lumina-compiler 4.33.0-next.133 → 4.33.0-next.135

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,20 +1,20 @@
1
- import { nodeExternals as ys } from "rollup-plugin-node-externals";
2
- import { stringToStartsWithGlob as Wt, path as u, toSystemPathSeparators as Y, retrievePackageJson as R, fetchPackageLocation as Be, asyncRetrievePackageJson as _e, existsAsync as q, findPath as hs, toPosixPathSeparators as Ie, isPosix as Wi, getCwd as Bi } from "@arcgis/components-build-utils";
3
- import gs from "vite-plugin-dts";
1
+ import { nodeExternals as ms } from "rollup-plugin-node-externals";
2
+ import { stringToStartsWithGlob as Wt, path as u, toSystemPathSeparators as Y, retrievePackageJson as R, fetchPackageLocation as Be, asyncRetrievePackageJson as _e, existsAsync as z, findPath as fs, toPosixPathSeparators as Ie, isPosix as Ji, getCwd as Ki } from "@arcgis/components-build-utils";
3
+ import ys from "vite-plugin-dts";
4
4
  import o from "typescript";
5
- import { f as w, l as C } from "./logger-KpGU2b3R.js";
6
- import { getMemberName as X, apiMemberToSynthesizedComments as V, globalPackageIdentifier as _i, setApiDocFromJsDoc as ue, ApiExtractor as vs, hasIgnoredModifier as Ss, symbolToDocs as Bt, setDefaultFromInitializer as _t, multipleJsDocTags as bs, findDecorator as Ht, isApiMethod as ws, isApiProperty as Ts } from "@arcgis/api-extractor";
7
- import { isNotUndefined as D, mappedFind as ye, camelToKebab as wt, kebabToPascal as Es, uncapitalize as ut, identity as Hi, Deferred as Cs, getPreamble as $s, capitalize as xs } from "@arcgis/components-utils";
8
- import { readdir as He, readFile as J, rm as Ps, mkdir as _, cp as As, writeFile as F, copyFile as ks } from "node:fs/promises";
9
- import { lazyMetaSubItemJoiner as Is, lazyMetaItemJoiner as et, lazyMetaGroupJoiner as Ls, propertyFlagAttribute as zt, propertyFlagReflect as Fs, propertyFlagBoolean as Ns, propertyFlagNumber as js, propertyFlagState as Ds, propertyFlagReadOnly as Rs, propertyFlagNoAccessor as Ms } from "@arcgis/lumina/config";
10
- import { build as Os } from "esbuild";
11
- import { glob as Js } from "glob";
12
- import Ks from "mime-types";
13
- import { writeFileSync as zi } from "node:fs";
14
- import Ws from "chalk";
15
- function Bs(e) {
5
+ import { f as b, l as C } from "./logger-KpGU2b3R.js";
6
+ import { getMemberName as X, apiMemberToSynthesizedComments as V, globalPackageIdentifier as Wi, setApiDocFromJsDoc as ue, ApiExtractor as hs, hasIgnoredModifier as gs, symbolToDocs as Bt, setDefaultFromInitializer as _t, multipleJsDocTags as vs, findDecorator as Ht, isApiMethod as Ss, isApiProperty as ws } from "@arcgis/api-extractor";
7
+ import { isNotUndefined as j, mappedFind as ye, camelToKebab as bt, kebabToPascal as bs, uncapitalize as ut, identity as Bi, Deferred as Ts, getPreamble as Es, capitalize as Cs } from "@arcgis/components-utils";
8
+ import { readdir as He, readFile as J, rm as $s, mkdir as _, cp as Ps, writeFile as F, copyFile as xs } from "node:fs/promises";
9
+ import { lazyMetaSubItemJoiner as As, lazyMetaItemJoiner as et, lazyMetaGroupJoiner as ks, propertyFlagAttribute as Ut, propertyFlagReflect as Is, propertyFlagBoolean as Ls, propertyFlagNumber as Fs, propertyFlagState as Ns, propertyFlagReadOnly as Ds, propertyFlagNoAccessor as js } from "@arcgis/lumina/config";
10
+ import { build as Rs } from "esbuild";
11
+ import { glob as Ms } from "glob";
12
+ import Os from "mime-types";
13
+ import { writeFileSync as _i } from "node:fs";
14
+ import Js from "chalk";
15
+ function Ks(e) {
16
16
  const { externalize: t = [], bundleIn: i = [], ...n } = e.options?.build?.dependencies ?? {}, r = {
17
- ...ys({
17
+ ...ms({
18
18
  ...n,
19
19
  /*
20
20
  * This property name is a bit confusing. "include" means "externalize these"
@@ -36,8 +36,8 @@ function Bs(e) {
36
36
  };
37
37
  return r;
38
38
  }
39
- const Tt = "customElement.js", qi = "customElement.d.ts", _s = "playwright";
40
- function Hs(e, t, i) {
39
+ const Tt = "customElement.js", Hi = "customElement.d.ts", Ws = "playwright";
40
+ function Bs(e, t, i) {
41
41
  const s = i.split(u.sep).slice(2);
42
42
  let r = t._componentPathMapping;
43
43
  return s.forEach((a, c) => {
@@ -47,10 +47,10 @@ function Hs(e, t, i) {
47
47
  function he(e, t, i) {
48
48
  if (!e.startsWith(t))
49
49
  return e;
50
- const n = e.slice(t.length), s = zs(n, i);
50
+ const n = e.slice(t.length), s = _s(n, i);
51
51
  return `${t}${s}`;
52
52
  }
53
- function zs(e, t) {
53
+ function _s(e, t) {
54
54
  const i = e.split(u.sep);
55
55
  i.push(".");
56
56
  let n = t._componentPathMapping, s = 0;
@@ -62,17 +62,17 @@ function zs(e, t) {
62
62
  n = n[r], s += 1;
63
63
  return e;
64
64
  }
65
- const qs = ({ filePath: e, content: t }, i) => {
65
+ const Hs = ({ filePath: e, content: t }, i) => {
66
66
  const n = e.startsWith(i.dir.distComponents) ? he(
67
67
  Ui(i.dir.distComponents, e),
68
68
  i.dir.distComponents,
69
69
  i
70
- ) : e, s = u.dirname(e), r = n.endsWith(qi), a = Gi(
70
+ ) : e, s = u.dirname(e), r = n.endsWith(Hi), a = zi(
71
71
  t,
72
72
  i,
73
73
  e === n ? s : u.dirname(n),
74
74
  s
75
- ), c = r ? Xs(a) : a;
75
+ ), c = r ? Gs(a) : a;
76
76
  return {
77
77
  filePath: n,
78
78
  content: c
@@ -82,12 +82,12 @@ function Ui(e, t, i = ".d.ts") {
82
82
  if (!t.startsWith(e))
83
83
  return t;
84
84
  const s = (i === "" ? t : t.slice(0, -i.length)).split(u.sep);
85
- return s.at(Us) !== s.at(Gs) ? t : u.join(
85
+ return s.at(Us) !== s.at(zs) ? t : u.join(
86
86
  s.slice(0, -1).join(u.sep),
87
- i === "" ? Tt : qi
87
+ i === "" ? Tt : Hi
88
88
  );
89
89
  }
90
- const Us = -1, Gs = -2, Vs = /["']\.\.?\/[^'"]+/gu, Gi = (e, t, i, n) => e.replaceAll(Vs, (s) => {
90
+ const Us = -1, zs = -2, qs = /["']\.\.?\/[^'"]+/gu, zi = (e, t, i, n) => e.replaceAll(qs, (s) => {
91
91
  const r = s.slice(1);
92
92
  if (!r.startsWith("./") && !r.startsWith("../"))
93
93
  return s;
@@ -100,15 +100,15 @@ const Us = -1, Gs = -2, Vs = /["']\.\.?\/[^'"]+/gu, Gi = (e, t, i, n) => e.repla
100
100
  const i = u.relative(e, t);
101
101
  return i.startsWith(".") ? i : `.${u.sep}${i}`;
102
102
  };
103
- function Xs(e) {
103
+ function Gs(e) {
104
104
  return `/// <reference types="../../index.d.ts" />
105
105
  ${e}`;
106
106
  }
107
- const qt = "customElement", Qs = (e, t) => {
107
+ const zt = "customElement", Vs = (e, t) => {
108
108
  const { filePath: i, content: n } = e;
109
109
  if (!i.startsWith(t.dir.distComponents))
110
110
  return e;
111
- const s = Xi(n);
111
+ const s = Gi(n);
112
112
  if (s === void 0)
113
113
  return e;
114
114
  {
@@ -118,12 +118,12 @@ const qt = "customElement", Qs = (e, t) => {
118
118
  content: r
119
119
  };
120
120
  }
121
- }, Zs = (e, t) => {
121
+ }, Xs = (e, t) => {
122
122
  const i = [];
123
123
  if (t.apiModule?.declarations.forEach((r) => {
124
124
  "customElement" in r && i.push(
125
125
  o.factory.createExpressionStatement(
126
- o.factory.createCallExpression(o.factory.createIdentifier(qt), void 0, [
126
+ o.factory.createCallExpression(o.factory.createIdentifier(zt), void 0, [
127
127
  o.factory.createStringLiteral(r.tagName),
128
128
  o.factory.createIdentifier(r.name)
129
129
  ])
@@ -141,18 +141,18 @@ const qt = "customElement", Qs = (e, t) => {
141
141
  !1,
142
142
  void 0,
143
143
  o.factory.createNamedImports([
144
- o.factory.createImportSpecifier(!1, void 0, o.factory.createIdentifier(qt))
144
+ o.factory.createImportSpecifier(!1, void 0, o.factory.createIdentifier(zt))
145
145
  ])
146
146
  ),
147
147
  o.factory.createStringLiteral(n)
148
148
  ), ...e.statements, ...i];
149
149
  };
150
- function Vi(e) {
151
- const t = Xi(e);
150
+ function qi(e) {
151
+ const t = Gi(e);
152
152
  return t === void 0 ? void 0 : t.split(`
153
153
  `).filter((n) => n.includes(":")).map((n) => n.replace(";", "").replaceAll('"', "").replaceAll("'", "").split(":")).map(([n, s]) => [n.trim(), s.trim()]).filter(([n]) => !n.startsWith("/") && !n.startsWith("*"));
154
154
  }
155
- function Xi(e) {
155
+ function Gi(e) {
156
156
  const t = e.indexOf("declare global {");
157
157
  if (t === -1)
158
158
  return;
@@ -160,39 +160,39 @@ function Xi(e) {
160
160
  }`, t) + 2;
161
161
  return e.slice(t, i);
162
162
  }
163
- const Ys = (e) => (t, i) => (
163
+ const Qs = (e) => (t, i) => (
164
164
  /*
165
165
  * `declarationTextTransformers` arrays can be mutated between plugin
166
166
  * initialization and beforeWriteFile() call, so do not read the value
167
167
  * of declarationTextTransformers outside of beforeWriteFile
168
168
  */
169
169
  [
170
+ Zs,
170
171
  er,
172
+ tr,
173
+ Ys,
174
+ Hs,
171
175
  ir,
172
176
  nr,
173
- tr,
174
- qs,
177
+ Vs,
175
178
  sr,
176
- rr,
177
- Qs,
178
- or,
179
179
  ...e.options.types?.declarationTextTransformers ?? [],
180
180
  ...e._declarationTextTransformers
181
181
  ].reduce(
182
182
  (n, s) => n === !1 ? !1 : s(n, e),
183
183
  { filePath: t, content: i }
184
184
  )
185
- ), er = (e, t) => t.isInStorybook ? !1 : e, tr = (e, t) => (
185
+ ), Zs = (e, t) => t.isInStorybook ? !1 : e, Ys = (e, t) => (
186
186
  // Short-circuit quickly if file doesn't look like the one we want to exclude
187
- e.filePath.endsWith(Ut) && e.filePath === u.join(t.dir.dist, Ut) ? !1 : e
188
- ), Ut = "lumina.d.ts", ir = (e, t) => {
187
+ e.filePath.endsWith(qt) && e.filePath === u.join(t.dir.dist, qt) ? !1 : e
188
+ ), qt = "lumina.d.ts", er = (e, t) => {
189
189
  const i = t.dir.dist, n = `${i}src/`;
190
190
  return e.filePath.startsWith(n) ? { ...e, filePath: `${i}${e.filePath.slice(n.length)}` } : !1;
191
- }, Et = (e) => e.includes("__test") || e.includes(".e2e.") || e.includes(".spec.") || e.includes(".test."), nr = (e) => Et(e.filePath) || e.filePath.includes(".stories.") || e.filePath.includes(".story.") ? !1 : e, sr = (e) => e.content.includes("__esri.") ? {
191
+ }, Et = (e) => e.includes("__test") || e.includes(".e2e.") || e.includes(".spec.") || e.includes(".test."), tr = (e) => Et(e.filePath) || e.filePath.includes(".stories.") || e.filePath.includes(".story.") ? !1 : e, ir = (e) => e.content.includes("__esri.") ? {
192
192
  filePath: e.filePath,
193
193
  content: `/// <reference types="@arcgis/core/interfaces.d.ts" />
194
194
  ${e.content}`
195
- } : e, rr = (e, t) => {
195
+ } : e, nr = (e, t) => {
196
196
  t._htmlElementReferencesReplacer ??= {
197
197
  regex: new RegExp(
198
198
  `(${t.apiJsonComponents.map((n) => n.name).join("|")})\\[['"\`]el['"\`]\\]`,
@@ -207,11 +207,11 @@ ${e.content}`
207
207
  filePath: e.filePath,
208
208
  content: e.content.replace(i.regex, (n, s) => i.replacements[s])
209
209
  };
210
- }, or = (e) => {
211
- const t = e.content.match(ar)?.[1] ?? e.content.match(cr)?.[1];
210
+ }, sr = (e) => {
211
+ const t = e.content.match(rr)?.[1] ?? e.content.match(or)?.[1];
212
212
  if (t !== void 0)
213
213
  throw Error(
214
- w(
214
+ b(
215
215
  "@arcgis/lumina:failOnJsonImport",
216
216
  `Found a .json import (${t}). This can cause TypeScript errors for consumers of your package. See alternative options: https://devtopia.esri.com/WebGIS/arcgis-web-components/issues/2047
217
217
  File content:
@@ -223,19 +223,19 @@ ${e.content}
223
223
  )
224
224
  );
225
225
  return e;
226
- }, ar = /^import (?:type \* as )?[^"'\n]+["'](\.[^\n]*?\.json)["'];$/mu, cr = /(?<![.\w\d-])import\(['"]([\w@\-/\\.]+)\.json['"]\)/u;
227
- function lr(e, t) {
226
+ }, rr = /^import (?:type \* as )?[^"'\n]+["'](\.[^\n]*?\.json)["'];$/mu, or = /(?<![.\w\d-])import\(['"]([\w@\-/\\.]+)\.json['"]\)/u;
227
+ function ar(e, t) {
228
228
  const i = X(t.name);
229
229
  return e.members.find((n) => n.name === i);
230
230
  }
231
- function dr(e, t, i) {
231
+ function cr(e, t, i) {
232
232
  const n = u.relative(t, e);
233
233
  return i.modules.find((s) => s.path === n);
234
234
  }
235
- function Qi(e, t, i, n) {
235
+ function Vi(e, t, i, n) {
236
236
  const s = {
237
237
  compiler: e,
238
- apiModule: e.isInPuppeteerTestBackEnd ? void 0 : dr(i.fileName, e.dir.root, e.privateApiJson),
238
+ apiModule: e.isInPuppeteerTestBackEnd ? void 0 : cr(i.fileName, e.dir.root, e.privateApiJson),
239
239
  transformation: t
240
240
  }, r = i.statements;
241
241
  let a = i.statements;
@@ -246,9 +246,9 @@ function Qi(e, t, i, n) {
246
246
  a = c(i, s);
247
247
  }), Object.defineProperty(i, "statements", {
248
248
  value: r
249
- }), pr(i, a);
249
+ }), lr(i, a);
250
250
  }
251
- const pr = (e, t) => o.factory.updateSourceFile(
251
+ const lr = (e, t) => o.factory.updateSourceFile(
252
252
  e,
253
253
  t,
254
254
  /*
@@ -262,11 +262,11 @@ const pr = (e, t) => o.factory.updateSourceFile(
262
262
  e.typeReferenceDirectives,
263
263
  e.hasNoDefaultLib,
264
264
  e.libReferenceDirectives
265
- ), ur = (e) => `${Gt}${" ".repeat(e.length - Gt.length - Vt.length)}${Vt}`, Gt = "/*", Vt = "*/", mr = (e) => e.statements.map(gr), fr = "@arcgis/lumina", yr = "LitElement", hr = "PublicLitElement", Zi = "TargetedEvent";
266
- function gr(e) {
267
- if (o.isImportDeclaration(e) && o.isStringLiteral(e.moduleSpecifier) && e.moduleSpecifier.text === fr && e.importClause?.namedBindings && o.isNamedImports(e.importClause.namedBindings)) {
265
+ ), dr = (e) => `${Gt}${" ".repeat(e.length - Gt.length - Vt.length)}${Vt}`, Gt = "/*", Vt = "*/", pr = (e) => e.statements.map(yr), ur = "@arcgis/lumina", mr = "LitElement", fr = "PublicLitElement", Xi = "TargetedEvent";
266
+ function yr(e) {
267
+ if (o.isImportDeclaration(e) && o.isStringLiteral(e.moduleSpecifier) && e.moduleSpecifier.text === ur && e.importClause?.namedBindings && o.isNamedImports(e.importClause.namedBindings)) {
268
268
  const t = e.importClause.namedBindings.elements.findIndex(
269
- (n) => (n.propertyName ?? n.name).text === yr
269
+ (n) => (n.propertyName ?? n.name).text === mr
270
270
  );
271
271
  if (t === -1)
272
272
  return e;
@@ -283,14 +283,14 @@ function gr(e) {
283
283
  o.factory.updateImportSpecifier(
284
284
  i,
285
285
  i.isTypeOnly,
286
- o.factory.createIdentifier(hr),
286
+ o.factory.createIdentifier(fr),
287
287
  i.name
288
288
  ),
289
289
  ...e.importClause.namedBindings.elements.slice(t + 1),
290
290
  o.factory.createImportSpecifier(
291
291
  !e.importClause.isTypeOnly,
292
292
  void 0,
293
- o.factory.createIdentifier(Zi)
293
+ o.factory.createIdentifier(Xi)
294
294
  )
295
295
  ])
296
296
  ),
@@ -300,15 +300,15 @@ function gr(e) {
300
300
  } else
301
301
  return e;
302
302
  }
303
- const Yi = "_setterTypes";
304
- function vr(e, t, i) {
303
+ const Qi = "_setterTypes";
304
+ function hr(e, t, i) {
305
305
  return o.factory.createPropertyDeclaration(
306
306
  [o.factory.createModifier(o.SyntaxKind.ReadonlyKeyword)],
307
- o.factory.createIdentifier(Yi),
307
+ o.factory.createIdentifier(Qi),
308
308
  void 0,
309
309
  o.factory.createTypeLiteralNode(
310
310
  e.map((n) => {
311
- const [s, r] = Sr(n.name, n.type, i._typeScriptPrinter, t);
311
+ const [s, r] = gr(n.name, n.type, i._typeScriptPrinter, t);
312
312
  return o.factory.createPropertySignature(
313
313
  void 0,
314
314
  s,
@@ -320,7 +320,7 @@ function vr(e, t, i) {
320
320
  void 0
321
321
  );
322
322
  }
323
- function Sr(e, t, i, n) {
323
+ function gr(e, t, i, n) {
324
324
  const s = i.printNode(o.EmitHint.Unspecified, e, n), r = i.printNode(o.EmitHint.Unspecified, t, n), a = `declare class A { ${s}: ${r} }`, d = o.createSourceFile(
325
325
  "a.d.ts",
326
326
  a,
@@ -330,8 +330,8 @@ function Sr(e, t, i, n) {
330
330
  ).statements[0].members[0];
331
331
  return [d.name, d.type];
332
332
  }
333
- const br = (e, t) => t.apiModule === void 0 ? e.statements : e.statements.map((i) => wr(i, e, t));
334
- function wr(e, t, i) {
333
+ const vr = (e, t) => t.apiModule === void 0 ? e.statements : e.statements.map((i) => Sr(i, e, t));
334
+ function Sr(e, t, i) {
335
335
  if (o.isClassDeclaration(e)) {
336
336
  const n = e, s = n.name?.text, r = i.apiModule.declarations.find(
337
337
  (y) => y.name === s && "customElement" in y
@@ -341,13 +341,13 @@ function wr(e, t, i) {
341
341
  const a = [], c = /* @__PURE__ */ new Set(), l = [], d = [];
342
342
  mt = void 0;
343
343
  for (let y = 0; y < n.members.length; y++) {
344
- const h = n.members[y], g = Tr(h, r, l, c, t);
344
+ const h = n.members[y], g = wr(h, r, l, c, t);
345
345
  g === void 0 ? a.push(h) : Array.isArray(g) ? d.push(...g) : (o.setEmitFlags(g, o.EmitFlags.NoComments), d.push(g));
346
346
  }
347
347
  c.size > 0 && a.forEach((y) => {
348
348
  const h = X(y.name);
349
- h !== void 0 && c.has(h) && d.push(Cr(y));
350
- }), l.length > 0 && d.push(vr(l, t, i.compiler));
349
+ h !== void 0 && c.has(h) && d.push(Tr(y));
350
+ }), l.length > 0 && d.push(hr(l, t, i.compiler));
351
351
  const p = o.factory.updateClassDeclaration(
352
352
  n,
353
353
  n.modifiers,
@@ -378,7 +378,7 @@ function wr(e, t, i) {
378
378
  return e;
379
379
  }
380
380
  let mt;
381
- function Tr(e, t, i, n, s) {
381
+ function wr(e, t, i, n, s) {
382
382
  const r = X(e.name);
383
383
  if (r === void 0)
384
384
  return;
@@ -396,7 +396,7 @@ function Tr(e, t, i, n, s) {
396
396
  Zt(e.modifiers),
397
397
  e.name,
398
398
  void 0,
399
- $r(e.type, s),
399
+ Er(e.type, s),
400
400
  e.initializer
401
401
  );
402
402
  return o.setSyntheticLeadingComments(d, V(l)), d;
@@ -475,15 +475,15 @@ function Tr(e, t, i, n, s) {
475
475
  }
476
476
  const Xt = /^typeof this\.(?<accessor>[^.]+)\.(?<boundProperty>[^.]+)$/u;
477
477
  function Qt(e, t, i) {
478
- const s = (t?.pos !== -1 ? t?.getText(i) : void 0)?.match(Er) ?? [];
478
+ const s = (t?.pos !== -1 ? t?.getText(i) : void 0)?.match(br) ?? [];
479
479
  for (const r of s)
480
480
  e.add(r);
481
481
  return t;
482
482
  }
483
- const Er = /(?<=this.)[\w$]+/gu;
484
- function Cr(e) {
483
+ const br = /(?<=this.)[\w$]+/gu;
484
+ function Tr(e) {
485
485
  if (o.setEmitFlags(e, o.EmitFlags.NoComments), o.isPropertyDeclaration(e)) {
486
- const t = Pe(e.modifiers);
486
+ const t = xe(e.modifiers);
487
487
  if (t !== e.modifiers)
488
488
  return o.factory.updatePropertyDeclaration(
489
489
  e,
@@ -494,7 +494,7 @@ function Cr(e) {
494
494
  e.initializer
495
495
  );
496
496
  } else if (o.isGetAccessor(e)) {
497
- const t = Pe(e.modifiers);
497
+ const t = xe(e.modifiers);
498
498
  if (t !== e.modifiers)
499
499
  return o.factory.updateGetAccessorDeclaration(
500
500
  e,
@@ -505,11 +505,11 @@ function Cr(e) {
505
505
  e.body
506
506
  );
507
507
  } else if (o.isSetAccessor(e)) {
508
- const t = Pe(e.modifiers);
508
+ const t = xe(e.modifiers);
509
509
  if (t !== e.modifiers)
510
510
  return o.factory.updateSetAccessorDeclaration(e, t, e.name, e.parameters, e.body);
511
511
  } else if (o.isMethodDeclaration(e)) {
512
- const t = Pe(e.modifiers);
512
+ const t = xe(e.modifiers);
513
513
  if (t !== e.modifiers)
514
514
  return o.factory.updateMethodDeclaration(
515
515
  e,
@@ -528,7 +528,7 @@ function Cr(e) {
528
528
  function Zt(e) {
529
529
  return e?.some((i) => i.kind === o.SyntaxKind.ReadonlyKeyword) ? e : [o.factory.createModifier(o.SyntaxKind.ReadonlyKeyword), ...e ?? []];
530
530
  }
531
- function Pe(e) {
531
+ function xe(e) {
532
532
  return e?.some((i) => i.kind === o.SyntaxKind.PrivateKeyword) ? e : [
533
533
  o.factory.createModifier(o.SyntaxKind.PrivateKeyword),
534
534
  ...(e ?? []).filter(
@@ -536,11 +536,11 @@ function Pe(e) {
536
536
  )
537
537
  ];
538
538
  }
539
- function $r(e, t) {
539
+ function Er(e, t) {
540
540
  if (e === void 0)
541
541
  return;
542
542
  const i = o.isImportTypeNode(e) && e.qualifier && o.isIdentifier(e.qualifier) && e.qualifier.escapedText === "EventEmitter" ? e.typeArguments ?? [] : o.isTypeReferenceNode(e) && o.isIdentifier(e.typeName) && e.typeName.escapedText === "EventEmitter" ? e.typeArguments ?? [] : void 0;
543
- return typeof i == "object" ? o.factory.createTypeReferenceNode(Zi, [
543
+ return typeof i == "object" ? o.factory.createTypeReferenceNode(Xi, [
544
544
  o.factory.createThisTypeNode(),
545
545
  ...i
546
546
  ]) : (C.warn(
@@ -549,10 +549,10 @@ function $r(e, t) {
549
549
  t.fileName
550
550
  ), e);
551
551
  }
552
- const xr = [mr, br], Yt = "@arcgis/lumina:componentDtsTransformer";
553
- function Pr(e) {
552
+ const Cr = [pr, vr], Yt = "@arcgis/lumina:componentDtsTransformer";
553
+ function $r(e) {
554
554
  let t;
555
- const i = Ar(e);
555
+ const i = Pr(e);
556
556
  return {
557
557
  name: Yt,
558
558
  supports(n) {
@@ -563,7 +563,7 @@ function Pr(e) {
563
563
  return [];
564
564
  const s = e.typeScriptProgram.getSourceFile(n);
565
565
  if (s === void 0)
566
- throw Error(w(Yt, `Could not find source file: ${Y(n)}`));
566
+ throw Error(b(Yt, `Could not find source file: ${Y(n)}`));
567
567
  const r = [];
568
568
  return e.typeScriptProgram.emit(
569
569
  s,
@@ -580,22 +580,22 @@ function Pr(e) {
580
580
  }
581
581
  };
582
582
  }
583
- const Ar = (e) => (t) => (i) => Qi(e, t, i, [
584
- ...xr,
583
+ const Pr = (e) => (t) => (i) => Vi(e, t, i, [
584
+ ...Cr,
585
585
  ...e.options.types?.declarationAstTransformers ?? []
586
- ]), kr = (e) => new Proxy(e, {
587
- get: Ir,
588
- set: Lr
586
+ ]), xr = (e) => new Proxy(e, {
587
+ get: Ar,
588
+ set: kr
589
589
  });
590
- function Ir(e, t, i) {
590
+ function Ar(e, t, i) {
591
591
  if (t in e)
592
592
  return Reflect.get(e, t, i);
593
593
  throw new Error(`Requested unexpected property ${String(t)}`);
594
594
  }
595
- function Lr(e, t) {
595
+ function kr(e, t) {
596
596
  throw new Error(`Unexpectedly tried to set the ${String(t)} property.`);
597
597
  }
598
- function Fr(e) {
598
+ function Ir(e) {
599
599
  const t = e.options.types ?? {};
600
600
  let i = !1;
601
601
  const n = {
@@ -603,7 +603,7 @@ function Fr(e) {
603
603
  // For details, see comment above excludeOutsideFiles in
604
604
  // https://devtopia.esri.com/WebGIS/arcgis-web-components/blob/main/packages/support-packages/lit-compiler/src/types/textTransformers.ts
605
605
  rootDir: "."
606
- }, s = gs({
606
+ }, s = ys({
607
607
  ...t,
608
608
  compilerOptions: n,
609
609
  tsconfigPath: e.options.types?.tsconfigPath,
@@ -616,7 +616,7 @@ function Fr(e) {
616
616
  }
617
617
  return t?.afterDiagnostic?.(r);
618
618
  },
619
- beforeWriteFile: Ys(e),
619
+ beforeWriteFile: Qs(e),
620
620
  resolvers: [
621
621
  /**
622
622
  * The vite-plugin-dts does not provide a way to get a reference to the
@@ -640,7 +640,7 @@ function Fr(e) {
640
640
  }
641
641
  },
642
642
  ...t?.resolvers ?? [],
643
- Pr(e)
643
+ $r(e)
644
644
  ]
645
645
  });
646
646
  return {
@@ -661,7 +661,7 @@ function Fr(e) {
661
661
  if (typeof c != "function")
662
662
  throw new Error("Expected transform to be a function");
663
663
  if (await a.call(this, r), await c.call(
664
- kr({}),
664
+ xr({}),
665
665
  "",
666
666
  /*
667
667
  * Have to give it a file that will be matched by the tsconfig's
@@ -673,7 +673,7 @@ function Fr(e) {
673
673
  }
674
674
  };
675
675
  }
676
- const Nr = "Fragment", tt = "DynamicHtmlTag", it = "DynamicSvgTag", De = Symbol("dynamic html tag name"), ft = Symbol("dynamic svg tag name"), en = /* @__PURE__ */ new Set([
676
+ const Lr = "Fragment", tt = "DynamicHtmlTag", it = "DynamicSvgTag", je = Symbol("dynamic html tag name"), ft = Symbol("dynamic svg tag name"), Zi = /* @__PURE__ */ new Set([
677
677
  /**
678
678
  * There is a "className" property. However, in JSX typings we use "class"
679
679
  * instead to keep name shorter and to match Stencil's name. Thus, it should
@@ -694,7 +694,7 @@ const Nr = "Fragment", tt = "DynamicHtmlTag", it = "DynamicSvgTag", De = Symbol(
694
694
  "resource",
695
695
  "typeof",
696
696
  "vocab"
697
- ]), tn = /* @__PURE__ */ new Set([
697
+ ]), Yi = /* @__PURE__ */ new Set([
698
698
  /*
699
699
  * From https://github.com/preactjs/preact/blob/f3edc902447dae7393de7fccaff3b722dee79467/src/diff/props.js#L107-L118
700
700
  * See also https://github.com/facebook/react/blob/8fd963a1e5ec89459cac27fb1d9ad193a0604110/packages/react-dom-bindings/src/client/ReactDOMComponent.js#L389
@@ -1534,9 +1534,9 @@ const Nr = "Fragment", tt = "DynamicHtmlTag", it = "DynamicSvgTag", De = Symbol(
1534
1534
  }
1535
1535
  }
1536
1536
  };
1537
- nn(B.common);
1538
- Object.values(B.perElement).forEach(nn);
1539
- function nn(e) {
1537
+ en(B.common);
1538
+ Object.values(B.perElement).forEach(en);
1539
+ function en(e) {
1540
1540
  e?.reflected !== void 0 && (e.reflected = Object.assign(/* @__PURE__ */ Object.create(null), e.reflected)), e?.stringifiedReflected !== void 0 && (e.stringifiedReflected = Object.assign(
1541
1541
  /* @__PURE__ */ Object.create(null),
1542
1542
  e.stringifiedReflected
@@ -1545,7 +1545,7 @@ function nn(e) {
1545
1545
  e.stringifiedNonReflected
1546
1546
  ));
1547
1547
  }
1548
- const ei = /* @__PURE__ */ new Set(["itemScope"]), sn = /* @__PURE__ */ new Set([
1548
+ const ei = /* @__PURE__ */ new Set(["itemScope"]), tn = /* @__PURE__ */ new Set([
1549
1549
  "abort",
1550
1550
  "animationCancel",
1551
1551
  "animationEnd",
@@ -1644,7 +1644,7 @@ const ei = /* @__PURE__ */ new Set(["itemScope"]), sn = /* @__PURE__ */ new Set(
1644
1644
  "volumeChange",
1645
1645
  "waiting",
1646
1646
  "wheel"
1647
- ]), jr = /* @__PURE__ */ new Set([
1647
+ ]), Fr = /* @__PURE__ */ new Set([
1648
1648
  "area",
1649
1649
  "base",
1650
1650
  "br",
@@ -1720,7 +1720,7 @@ const ei = /* @__PURE__ */ new Set(["itemScope"]), sn = /* @__PURE__ */ new Set(
1720
1720
  "tspan",
1721
1721
  "use",
1722
1722
  "view"
1723
- ]), Dr = /* @__PURE__ */ new Set(["title", "svg", "a", "script", "style"]), $t = /* @__PURE__ */ new Set([
1723
+ ]), Nr = /* @__PURE__ */ new Set(["title", "svg", "a", "script", "style"]), $t = /* @__PURE__ */ new Set([
1724
1724
  "annotation-xml",
1725
1725
  "annotation",
1726
1726
  "maction",
@@ -1752,7 +1752,7 @@ const ei = /* @__PURE__ */ new Set(["itemScope"]), sn = /* @__PURE__ */ new Set(
1752
1752
  "munder",
1753
1753
  "munderover",
1754
1754
  "semantics"
1755
- ]), Rr = /* @__PURE__ */ new Set([
1755
+ ]), Dr = /* @__PURE__ */ new Set([
1756
1756
  "annotation-xml",
1757
1757
  "color-profile",
1758
1758
  "font-face",
@@ -1761,7 +1761,7 @@ const ei = /* @__PURE__ */ new Set(["itemScope"]), sn = /* @__PURE__ */ new Set(
1761
1761
  "font-face-format",
1762
1762
  "font-face-name",
1763
1763
  "missing-glyph"
1764
- ]), Mr = /\r\n|[\\`\u0000-\u001f\t\v\f\b\r\u2028\u2029\u0085]/gu, Or = new Map(
1764
+ ]), jr = /\r\n|[\\`\u0000-\u001f\t\v\f\b\r\u2028\u2029\u0085]/gu, Rr = new Map(
1765
1765
  Object.entries({
1766
1766
  " ": "\\t",
1767
1767
  "\v": "\\v",
@@ -1785,23 +1785,23 @@ const ei = /* @__PURE__ */ new Set(["itemScope"]), sn = /* @__PURE__ */ new Set(
1785
1785
  // special case for CRLFs in backticks
1786
1786
  })
1787
1787
  );
1788
- function rn(e) {
1789
- return `\\u${`0000${e.toString(Jr).toUpperCase()}`.slice(-4)}`;
1788
+ function nn(e) {
1789
+ return `\\u${`0000${e.toString(Mr).toUpperCase()}`.slice(-4)}`;
1790
1790
  }
1791
- const Jr = 16;
1792
- function Kr(e, t, i) {
1793
- if (e.charCodeAt(0) === Hr) {
1791
+ const Mr = 16;
1792
+ function Or(e, t, i) {
1793
+ if (e.charCodeAt(0) === Br) {
1794
1794
  const n = i.charCodeAt(t + e.length);
1795
- return n >= zr && n <= qr ? "\\x00" : "\\0";
1795
+ return n >= _r && n <= Hr ? "\\x00" : "\\0";
1796
1796
  }
1797
- return Or.get(e) || rn(e.charCodeAt(0));
1797
+ return Rr.get(e) || nn(e.charCodeAt(0));
1798
1798
  }
1799
- const Wr = (e) => e.replace(Mr, Kr), ti = /[^\u0000-\u007F]/g;
1800
- function Br(e) {
1801
- return e = Wr(e), ti.test(e) ? e.replace(ti, (t) => rn(t.charCodeAt(0))) : e;
1799
+ const Jr = (e) => e.replace(jr, Or), ti = /[^\u0000-\u007F]/g;
1800
+ function Kr(e) {
1801
+ return e = Jr(e), ti.test(e) ? e.replace(ti, (t) => nn(t.charCodeAt(0))) : e;
1802
1802
  }
1803
- const _r = Br, Hr = 0, zr = 48, qr = 57, Ur = /\$\{/gu, Gr = (e) => e.replace(Ur, "\\${");
1804
- function Vr(e) {
1803
+ const Wr = Kr, Br = 0, _r = 48, Hr = 57, Ur = /\$\{/gu, zr = (e) => e.replace(Ur, "\\${");
1804
+ function qr(e) {
1805
1805
  if (e.length === 0)
1806
1806
  return "";
1807
1807
  const t = e[0];
@@ -1814,13 +1814,13 @@ function Vr(e) {
1814
1814
  }
1815
1815
  return e.trim().length === 0 ? t : e;
1816
1816
  }
1817
- const ze = (e) => Gr(_r(e)), Xr = (e) => !Qr.test(e), Qr = /^[^\s"'=<>`]+$/u, Zr = /[&<>]/gu, Yr = {
1817
+ const Ue = (e) => zr(Wr(e)), Gr = (e) => !Vr.test(e), Vr = /^[^\s"'=<>`]+$/u, Xr = /[&<>]/gu, Qr = {
1818
1818
  "&": "&amp;",
1819
1819
  "<": "&lt;",
1820
1820
  ">": "&gt;"
1821
- }, on = (e) => e.replace(Zr, (t) => Yr[t]), xt = (e) => typeof e == "string" && e.includes("-") && !Rr.has(e), eo = async (e) => Object.fromEntries(
1822
- (await e.componentFilesPromise).map((t) => [an(t), t])
1823
- ), an = (e, t = u.resolve("src")) => u.relative(t, u.join(e, "..", Tt.slice(0, -3))), Pt = async (e, t, i = t) => await He(i, { recursive: !0 }).catch((n) => {
1821
+ }, sn = (e) => e.replace(Xr, (t) => Qr[t]), Pt = (e) => typeof e == "string" && e.includes("-") && !Dr.has(e), Zr = async (e) => Object.fromEntries(
1822
+ (await e.componentFilesPromise).map((t) => [rn(t), t])
1823
+ ), rn = (e, t = u.resolve("src")) => u.relative(t, u.join(e, "..", Tt.slice(0, -3))), xt = async (e, t, i = t) => await He(i, { recursive: !0 }).catch((n) => {
1824
1824
  if (String(n).includes("ENOENT"))
1825
1825
  return C.error("@arcgis/lumina", `Unable to find the ${i} directory (cwd: ${process.cwd()})`), [];
1826
1826
  throw n;
@@ -1832,21 +1832,21 @@ const ze = (e) => Gr(_r(e)), Xr = (e) => !Qr.test(e), Qr = /^[^\s"'=<>`]+$/u, Zr
1832
1832
  if (ge(c, t))
1833
1833
  return c;
1834
1834
  a.endsWith(".stories.tsx") && c.startsWith(t) && s.push(c);
1835
- }).filter(D);
1835
+ }).filter(j);
1836
1836
  return e.componentFiles = r, e.componentStoryFiles = s, r;
1837
1837
  });
1838
1838
  function ge(e, t) {
1839
1839
  if (!e.startsWith(t) || !e.endsWith(".tsx"))
1840
1840
  return !1;
1841
- const [i, n] = e.slice(0, -4).split(u.sep).slice(to);
1841
+ const [i, n] = e.slice(0, -4).split(u.sep).slice(Yr);
1842
1842
  return i === n;
1843
1843
  }
1844
- const to = -2, ii = 5, ni = 1, si = 1, ri = 3, oi = 4, qe = o;
1845
- io(qe.createSourceMapGenerator);
1846
- no(qe.createTextWriter);
1847
- so(qe.getNewLineCharacter);
1848
- const me = qe;
1849
- function io(e) {
1844
+ const Yr = -2, ii = 5, ni = 1, si = 1, ri = 3, oi = 4, ze = o;
1845
+ eo(ze.createSourceMapGenerator);
1846
+ to(ze.createTextWriter);
1847
+ io(ze.getNewLineCharacter);
1848
+ const me = ze;
1849
+ function eo(e) {
1850
1850
  if (typeof e != "function")
1851
1851
  throw new Error(
1852
1852
  "Failed to find ts.createSourceMapGenerator() function. Lumina needs to be updated to support the new TypeScript version"
@@ -1856,7 +1856,7 @@ function io(e) {
1856
1856
  `ts.createSourceMapGenerator() signature changed. Expected ${ii} arguments. Lumina needs to be updated to support the new TypeScript version`
1857
1857
  );
1858
1858
  }
1859
- function no(e) {
1859
+ function to(e) {
1860
1860
  if (typeof e != "function")
1861
1861
  throw new Error(
1862
1862
  "Failed to find ts.createTextWriter() function. Lumina needs to be updated to support the new TypeScript version"
@@ -1866,7 +1866,7 @@ function no(e) {
1866
1866
  `ts.createTextWriter() signature changed. Expected ${ni} arguments. Lumina needs to be updated to support the new TypeScript version`
1867
1867
  );
1868
1868
  }
1869
- function so(e) {
1869
+ function io(e) {
1870
1870
  if (typeof e != "function")
1871
1871
  throw new Error(
1872
1872
  "Failed to find ts.getNewLineCharacter() function. Lumina needs to be updated to support the new TypeScript version"
@@ -1876,7 +1876,7 @@ function so(e) {
1876
1876
  `ts.getNewLineCharacter() signature changed. Expected ${si} argument. Lumina needs to be updated to support the new TypeScript version`
1877
1877
  );
1878
1878
  }
1879
- function ro(e) {
1879
+ function no(e) {
1880
1880
  if (typeof e != "function")
1881
1881
  throw new Error(
1882
1882
  "Failed to find ts.Printer.writeFile() function. Lumina needs to be updated to support the new TypeScript version"
@@ -1886,7 +1886,7 @@ function ro(e) {
1886
1886
  `ts.Printer.writeFile() signature changed. Expected ${ri} arguments. Lumina needs to be updated to support the new TypeScript version`
1887
1887
  );
1888
1888
  }
1889
- function oo(e) {
1889
+ function so(e) {
1890
1890
  if (typeof e != "function")
1891
1891
  throw new Error(
1892
1892
  "Failed to find ts.Printer.writeNode() function. Lumina needs to be updated to support the new TypeScript version"
@@ -1896,25 +1896,25 @@ function oo(e) {
1896
1896
  `ts.Printer.writeNode() signature changed. Expected ${oi} arguments. Lumina needs to be updated to support the new TypeScript version`
1897
1897
  );
1898
1898
  }
1899
- function cn(e) {
1899
+ function on(e) {
1900
1900
  const t = me.createPrinter(e);
1901
- return ro(t.writeFile), oo(t.writeNode), t;
1901
+ return no(t.writeFile), so(t.writeNode), t;
1902
1902
  }
1903
1903
  function ai(e) {
1904
1904
  const t = o.isUnionTypeNode(e) ? e.types.map(ci) : [ci(e)], i = new Set(t), n = i.delete("true"), s = i.delete("false");
1905
1905
  (n || s) && i.add("boolean");
1906
1906
  let r = Array.from(i).sort();
1907
- if (r.length > 1 && (r = r.map((a) => a.includes("=>") ? `(${a})` : a)), !(r.length > ao))
1908
- return r.map(po);
1907
+ if (r.length > 1 && (r = r.map((a) => a.includes("=>") ? `(${a})` : a)), !(r.length > ro))
1908
+ return r.map(co);
1909
1909
  }
1910
- const ao = 40, co = (e) => e?.some(
1910
+ const ro = 40, oo = (e) => e?.some(
1911
1911
  (t) => t.type === "number" || t.type === "boolean" || t.type === "string" || /**
1912
1912
  * Treat "any" as possibly literal, but not "unknown". Matches Stencil
1913
1913
  * behavior.
1914
1914
  */
1915
1915
  t.type === "any"
1916
- ) ?? !1, lo = (e) => e.length === 1 && e[0].type !== "string" && e[0].type !== "number" && e[0].type !== "boolean" && e[0].type !== "any" ? void 0 : e, ln = (e) => e.map(dn).join(" | "), dn = (e) => e.type === "string" && e.value !== void 0 ? `"${e.value}"` : e.value ?? e.type;
1917
- function po(e) {
1916
+ ) ?? !1, ao = (e) => e.length === 1 && e[0].type !== "string" && e[0].type !== "number" && e[0].type !== "boolean" && e[0].type !== "any" ? void 0 : e, an = (e) => e.map(cn).join(" | "), cn = (e) => e.type === "string" && e.value !== void 0 ? `"${e.value}"` : e.value ?? e.type;
1917
+ function co(e) {
1918
1918
  return e === "boolean" ? { type: "boolean" } : Number.isNaN(Number.parseFloat(e)) ? e.startsWith('"') || e.startsWith("'") ? {
1919
1919
  value: e.slice(1, -1),
1920
1920
  type: "string"
@@ -1925,25 +1925,25 @@ function po(e) {
1925
1925
  type: "number"
1926
1926
  };
1927
1927
  }
1928
- const uo = (e, t, i, n) => {
1928
+ const lo = (e, t, i, n) => {
1929
1929
  const s = e.typeScriptTypeChecker, r = o.isSetAccessor(t) ? t.parameters[0] : t, a = s.getTypeAtLocation(r), c = !i;
1930
1930
  return Re(s, a, n, e.dir, c);
1931
1931
  };
1932
- function mo(e, t) {
1932
+ function po(e, t) {
1933
1933
  if (e.length === 0)
1934
1934
  return;
1935
- const i = t.matchAll(fo), n = [];
1935
+ const i = t.matchAll(uo), n = [];
1936
1936
  for (const s of i) {
1937
1937
  const r = e.find((a) => a.name === s[0]);
1938
1938
  r !== void 0 && n.push({ ...r, start: s.index, end: s.index + r.name.length });
1939
1939
  }
1940
1940
  return n.length === 0 ? void 0 : n;
1941
1941
  }
1942
- const fo = /"[^"]+"|'[^"]+'|\w+/gu;
1942
+ const uo = /"[^"]+"|'[^"]+'|\w+/gu;
1943
1943
  function Re(e, t, i, n, s = !1) {
1944
1944
  let { typeNode: r, references: a } = di(e, t, i, n), c = ai(r);
1945
1945
  c === void 0 && ({ typeNode: r, references: a } = di(e, t, i, n, !1), c = ai(r) ?? []);
1946
- const l = s ? c.filter((f) => f.type !== "null" && f.type !== "undefined") : c, d = ln(l), p = lo(l), m = mo(a, d);
1946
+ const l = s ? c.filter((f) => f.type !== "null" && f.type !== "undefined") : c, d = an(l), p = ao(l), m = po(a, d);
1947
1947
  return {
1948
1948
  text: d,
1949
1949
  references: m,
@@ -1951,21 +1951,21 @@ function Re(e, t, i, n, s = !1) {
1951
1951
  };
1952
1952
  }
1953
1953
  function ci(e) {
1954
- yo.writeNode(o.EmitHint.Unspecified, e, void 0, nt);
1954
+ mo.writeNode(o.EmitHint.Unspecified, e, void 0, nt);
1955
1955
  const t = nt.getText();
1956
1956
  return nt.clear(), t;
1957
1957
  }
1958
- const yo = cn({ removeComments: !0 }), nt = me.createTextWriter(`
1959
- `), pn = o.TypeFormatFlags.NoTruncation | o.TypeFormatFlags.WriteArrayAsGenericType | o.TypeFormatFlags.SuppressAnyReturnType | o.TypeFormatFlags.MultilineObjectLiterals, ho = pn & o.TypeFormatFlags.NodeBuilderFlagsMask, go = ho | o.NodeBuilderFlags.IgnoreErrors | o.NodeBuilderFlags.NoTruncation;
1960
- function vo(e, t, i, n = !0) {
1958
+ const mo = on({ removeComments: !0 }), nt = me.createTextWriter(`
1959
+ `), ln = o.TypeFormatFlags.NoTruncation | o.TypeFormatFlags.WriteArrayAsGenericType | o.TypeFormatFlags.SuppressAnyReturnType | o.TypeFormatFlags.MultilineObjectLiterals, fo = ln & o.TypeFormatFlags.NodeBuilderFlagsMask, yo = fo | o.NodeBuilderFlags.IgnoreErrors | o.NodeBuilderFlags.NoTruncation;
1960
+ function ho(e, t, i, n = !0) {
1961
1961
  const s = /* @__PURE__ */ new Map();
1962
1962
  se(t, s, i, n);
1963
1963
  const r = t.flags & o.TypeFlags.Union ? t.types.every(li) : li(t), a = e.typeToTypeNode(
1964
1964
  t,
1965
1965
  void 0,
1966
- go & (r ? ~o.TypeFormatFlags.MultilineObjectLiterals : -1)
1966
+ yo & (r ? ~o.TypeFormatFlags.MultilineObjectLiterals : -1)
1967
1967
  );
1968
- return s.forEach(So), a === void 0 ? (C.warn("@arcgis/lumina", "Unexpected case: Failed to convert type to type node."), o.factory.createTypeReferenceNode(o.factory.createIdentifier("unknown"), void 0)) : a;
1968
+ return s.forEach(go), a === void 0 ? (C.warn("@arcgis/lumina", "Unexpected case: Failed to convert type to type node."), o.factory.createTypeReferenceNode(o.factory.createIdentifier("unknown"), void 0)) : a;
1969
1969
  }
1970
1970
  const li = (e) => e.flags & o.TypeFlags.Object ? e.getProperties().length === 1 : !!(e.flags & o.TypeFlags.PossiblyFalsy);
1971
1971
  function di(e, t, i, n, s = !0) {
@@ -1997,10 +1997,10 @@ function di(e, t, i, n, s = !0) {
1997
1997
  name: f,
1998
1998
  package: void 0,
1999
1999
  module: "index.js"
2000
- } : bo(m, f, i, n);
2000
+ } : vo(m, f, i, n);
2001
2001
  r.push(y), a.add(f);
2002
2002
  }
2003
- return { typeNode: vo(e, t, c, s), references: r };
2003
+ return { typeNode: ho(e, t, c, s), references: r };
2004
2004
  }
2005
2005
  function se(e, t, i, n = !0) {
2006
2006
  if (typeof e != "object" || e === null || !("checker" in e))
@@ -2030,10 +2030,10 @@ function se(e, t, i, n = !0) {
2030
2030
  c !== "resolvedBaseConstructorType" && c !== "resolvedBaseTypes" && c !== "typeParameters" && c !== "typeParameter" && (Array.isArray(l) ? l.forEach((d) => se(d, t, i, n)) : se(l, t, i, n));
2031
2031
  });
2032
2032
  }
2033
- function So(e, t) {
2033
+ function go(e, t) {
2034
2034
  e.origin !== void 0 && (t.origin = e.origin), e.aliasSymbol !== void 0 && (t.aliasSymbol = e.aliasSymbol), e.aliasTypeArguments !== void 0 && (t.aliasTypeArguments = e.aliasTypeArguments);
2035
2035
  }
2036
- function bo(e, t, i, n) {
2036
+ function vo(e, t, i, n) {
2037
2037
  const s = e?.declarations?.map((c) => c.getSourceFile()) ?? [];
2038
2038
  if (s.length === 0) {
2039
2039
  if (t === "Array")
@@ -2051,10 +2051,10 @@ function bo(e, t, i, n) {
2051
2051
  if (s.length === 0)
2052
2052
  return {
2053
2053
  name: t,
2054
- package: _i,
2054
+ package: Wi,
2055
2055
  module: void 0
2056
2056
  };
2057
- const { packageName: r, moduleName: a } = wo(s[0].fileName, n);
2057
+ const { packageName: r, moduleName: a } = So(s[0].fileName, n);
2058
2058
  return r ? {
2059
2059
  name: t,
2060
2060
  package: r,
@@ -2066,11 +2066,11 @@ function bo(e, t, i, n) {
2066
2066
  module: a
2067
2067
  };
2068
2068
  }
2069
- function wo(e, t) {
2069
+ function So(e, t) {
2070
2070
  const i = e.split("/node_modules/");
2071
2071
  if (i.length > 1) {
2072
2072
  const a = i.at(-1);
2073
- return un(a);
2073
+ return dn(a);
2074
2074
  }
2075
2075
  const s = e.split("/dist/");
2076
2076
  if (s.length > 1) {
@@ -2079,18 +2079,18 @@ function wo(e, t) {
2079
2079
  }
2080
2080
  return {
2081
2081
  packageName: void 0,
2082
- moduleName: u.relative(t.root, Eo(To(e, t)))
2082
+ moduleName: u.relative(t.root, bo(wo(e, t)))
2083
2083
  };
2084
2084
  }
2085
- function To(e, t) {
2086
- return ge(e, t.srcComponents) ? u.join(t.dist, an(e, t.src)) : e.startsWith(t.src) ? u.join(t.dist, e.slice(t.src.length)) : e;
2085
+ function wo(e, t) {
2086
+ return ge(e, t.srcComponents) ? u.join(t.dist, rn(e, t.src)) : e.startsWith(t.src) ? u.join(t.dist, e.slice(t.src.length)) : e;
2087
2087
  }
2088
- const Eo = (e) => e.endsWith(".js") || e.endsWith(".d.ts") ? e : `${e.endsWith(".ts") ? e.slice(0, -3) : e.endsWith(".tsx") ? e.slice(0, -4) : e}.d.ts`;
2089
- function un(e) {
2088
+ const bo = (e) => e.endsWith(".js") || e.endsWith(".d.ts") ? e : `${e.endsWith(".ts") ? e.slice(0, -3) : e.endsWith(".tsx") ? e.slice(0, -4) : e}.d.ts`;
2089
+ function dn(e) {
2090
2090
  const t = e.split("/"), n = e[0].startsWith("@") ? 2 : 1, s = t.slice(0, n).join("/"), r = t.slice(n).join("/");
2091
2091
  return { packageName: s, moduleName: r };
2092
2092
  }
2093
- const Co = (e) => e.includes("/node_modules/") || e.includes("/dist/");
2093
+ const To = (e) => e.includes("/node_modules/") || e.includes("/dist/");
2094
2094
  function pi(e, t, i) {
2095
2095
  const n = e.declarations;
2096
2096
  if (n !== void 0)
@@ -2104,7 +2104,7 @@ function pi(e, t, i) {
2104
2104
  for (const c of a) {
2105
2105
  const l = ui(c, t, i);
2106
2106
  if (l !== void 0)
2107
- return $o(l);
2107
+ return Eo(l);
2108
2108
  }
2109
2109
  }
2110
2110
  }
@@ -2128,25 +2128,25 @@ function ui(e, t, i) {
2128
2128
  });
2129
2129
  });
2130
2130
  }
2131
- const $o = (e) => e.split("#")[0];
2132
- function xo(e) {
2131
+ const Eo = (e) => e.split("#")[0];
2132
+ function Co(e) {
2133
2133
  const t = [];
2134
- for (const i of e.matchAll(Po)) {
2135
- const n = i.groups.name, s = i.groups.description.replaceAll(Ao, " ").trim();
2134
+ for (const i of e.matchAll($o)) {
2135
+ const n = i.groups.name, s = i.groups.description.replaceAll(Po, " ").trim();
2136
2136
  t.push({ name: n, description: s.endsWith("*") ? s.slice(0, -1).trim() : s });
2137
2137
  }
2138
2138
  return t.length === 0 ? void 0 : t;
2139
2139
  }
2140
- const Po = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, Ao = /\n\s+\*? ?/gu, ko = ["css", "less", "sass", "scss", "styl", "stylus", "pcss", "postcss", "sss"], Me = new RegExp(`\\.(${ko.join("|")})(\\?|$)`, "u"), Io = /^import ["'](?<specifier>[^"']+)["'];$/gmu, Lo = () => "throwError", te = "@arcgis/lumina:loadLitCss", Q = "?layered", Le = "?global", Fo = (e) => ({
2140
+ const $o = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, Po = /\n\s+\*? ?/gu, xo = ["css", "less", "sass", "scss", "styl", "stylus", "pcss", "postcss", "sss"], Me = new RegExp(`\\.(${xo.join("|")})(\\?|$)`, "u"), Ao = /^import ["'](?<specifier>[^"']+)["'];$/gmu, ko = () => "throwError", te = "@arcgis/lumina:loadLitCss", Q = "?layered", Le = "?global", Io = (e) => ({
2141
2141
  name: te,
2142
2142
  enforce: "pre",
2143
2143
  configResolved(t) {
2144
2144
  const i = t.plugins.find(({ name: s }) => s === "vite:css-post");
2145
2145
  if (i === void 0)
2146
- throw Error(w(te, "Unable to find the vite's built-in vite:css-post plugin"));
2146
+ throw Error(b(te, "Unable to find the vite's built-in vite:css-post plugin"));
2147
2147
  const n = i.transform;
2148
2148
  if (typeof n != "function")
2149
- throw Error(w(te, "Expected vite:css-post to declare a transform() function"));
2149
+ throw Error(b(te, "Expected vite:css-post to declare a transform() function"));
2150
2150
  i.transform = async function(r, a) {
2151
2151
  const c = a.endsWith(Q);
2152
2152
  c && (a = a.slice(0, -Q.length));
@@ -2154,7 +2154,7 @@ const Po = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, Ao = /\n\s+\
2154
2154
  if (l && (a = a.slice(0, -Le.length)), !Me.test(a) || a.includes("?"))
2155
2155
  return await n.call(this, r, a);
2156
2156
  const d = `${a}?inline`, p = await n.call(this, r, d), { code: m, ...f } = typeof p == "string" ? { code: p } : p ?? {};
2157
- if (typeof m != "string" || !m.startsWith(mn) || !m.endsWith(fn))
2157
+ if (typeof m != "string" || !m.startsWith(pn) || !m.endsWith(un))
2158
2158
  return C.warn(
2159
2159
  te,
2160
2160
  `Expected vite:css-post to return a JS module with a string literal. Received: ${JSON.stringify(
@@ -2162,9 +2162,9 @@ const Po = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, Ao = /\n\s+\
2162
2162
  )}`
2163
2163
  ), p;
2164
2164
  if (l)
2165
- return e._globalCssString = yn(m), { code: "", map: { mappings: "" } };
2165
+ return e._globalCssString = mn(m), { code: "", map: { mappings: "" } };
2166
2166
  {
2167
- const y = e.isFullApiExtraction ? xo(r) : void 0;
2167
+ const y = e.isFullApiExtraction ? Co(r) : void 0;
2168
2168
  if (y !== void 0) {
2169
2169
  e._cssDocs ??= /* @__PURE__ */ new Map(), e._cssDocs.set(a, y);
2170
2170
  const h = e._cssImports.get(a);
@@ -2184,7 +2184,7 @@ const Po = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, Ao = /\n\s+\
2184
2184
  }
2185
2185
  return {
2186
2186
  ...f,
2187
- code: Ro(m, e.hmrEnabled, e.shouldMinify, c),
2187
+ code: Do(m, e.hmrEnabled, e.shouldMinify, c),
2188
2188
  /**
2189
2189
  * Vite's original transform does not generate source maps for inlined
2190
2190
  * css, thus we can't either
@@ -2198,22 +2198,22 @@ const Po = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, Ao = /\n\s+\
2198
2198
  if (!(i.endsWith(".js") || i.endsWith(".ts") || i.endsWith(".tsx") || e.isInStorybook && i.endsWith(".mdx")))
2199
2199
  return;
2200
2200
  let s = 0;
2201
- const r = Co(i);
2201
+ const r = To(i);
2202
2202
  let a = !1;
2203
- const c = t.replaceAll(Io, (l, d) => {
2203
+ const c = t.replaceAll(Ao, (l, d) => {
2204
2204
  if (!Me.test(d) || d.includes("?"))
2205
2205
  return l;
2206
2206
  if (r) {
2207
- if ((e.options.css?.sideEffectImportHandling ?? Lo)(d, i) === "drop")
2208
- return a = !0, ur(l);
2207
+ if ((e.options.css?.sideEffectImportHandling ?? ko)(d, i) === "drop")
2208
+ return a = !0, dr(l);
2209
2209
  throw Error(
2210
- w(
2210
+ b(
2211
2211
  te,
2212
2212
  `Found a side-effect CSS import \`${l}\`. Such import is not allowed as it won't work with shadow DOM. This file appears to be external so such import may not be under your control. To ignore this import, please set the css.sideEffectImportHandling property in useLumina() plugin to a function that will return "drop" for this import to indicate that you wish to have this style import dropped. Then, you would have to import the dropped manually in your component like so: \`import { styles } from "example.css";\` and then add \`static override styles = styles;\` to your component`,
2213
2213
  i
2214
2214
  )
2215
2215
  );
2216
- } else if (e.isInStorybook && Oo(i, e)) {
2216
+ } else if (e.isInStorybook && Ro(i, e)) {
2217
2217
  a = !0;
2218
2218
  const p = `storybookCss$${s}`;
2219
2219
  return s += 1, [
@@ -2231,7 +2231,7 @@ const Po = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, Ao = /\n\s+\
2231
2231
  if (d.endsWith(Le))
2232
2232
  return l;
2233
2233
  throw Error(
2234
- w(
2234
+ b(
2235
2235
  te,
2236
2236
  `Found a side-effect CSS import \`${l}\`. Such import is not allowed as it won't work with shadow DOM. Please use \`import { styles } from "example.css";\` instead and then add \`static override styles = styles;\` to your component`,
2237
2237
  i
@@ -2244,7 +2244,7 @@ const Po = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, Ao = /\n\s+\
2244
2244
  map: null
2245
2245
  } : void 0;
2246
2246
  }
2247
- }), mn = 'export default "', fn = '"', No = "import { css } from '@lit/reactive-element/css-tag.js';\nexport const styles = css`", jo = "`;\nexport default styles;", Do = `
2247
+ }), pn = 'export default "', un = '"', Lo = "import { css } from '@lit/reactive-element/css-tag.js';\nexport const styles = css`", Fo = "`;\nexport default styles;", No = `
2248
2248
 
2249
2249
  if(import.meta.hot) {
2250
2250
  import.meta.hot.data.styles ??= styles;
@@ -2255,26 +2255,26 @@ if(import.meta.hot) {
2255
2255
  }
2256
2256
  import.meta.hot.data.styles.styleSheet.replaceSync(nextExports.styles.cssText);
2257
2257
  });
2258
- }`, yn = (e) => e.slice(mn.length, -fn.length);
2259
- function Ro(e, t, i, n) {
2260
- const r = yn(e).replaceAll('\\"', '"').replaceAll("`", "\\`").replaceAll("\\r", ""), a = ze(Mo(r)), c = n ? `@layer{${i ? "" : `
2258
+ }`, mn = (e) => e.slice(pn.length, -un.length);
2259
+ function Do(e, t, i, n) {
2260
+ const r = mn(e).replaceAll('\\"', '"').replaceAll("`", "\\`").replaceAll("\\r", ""), a = Ue(jo(r)), c = n ? `@layer{${i ? "" : `
2261
2261
  `}${a}${i ? "" : `
2262
2262
  `}}` : a;
2263
- return `${No}${c}${jo}${t ? Do : ""}`;
2263
+ return `${Lo}${c}${Fo}${t ? No : ""}`;
2264
2264
  }
2265
- const Mo = (e) => e.replaceAll("\\n", `
2266
- `), Oo = (e, t) => e.endsWith(".mdx") || e.includes(".stories.") || e.includes(".story.") || e.startsWith(`${t.dir.root}stories/`);
2267
- function Jo(e) {
2268
- return `import("${Ko}").then(({ setCustomElementsManifest }) => {
2269
- setCustomElementsManifest(${Wo(e)});
2265
+ const jo = (e) => e.replaceAll("\\n", `
2266
+ `), Ro = (e, t) => e.endsWith(".mdx") || e.includes(".stories.") || e.includes(".story.") || e.startsWith(`${t.dir.root}stories/`);
2267
+ function Mo(e) {
2268
+ return `import("${Oo}").then(({ setCustomElementsManifest }) => {
2269
+ setCustomElementsManifest(${Jo(e)});
2270
2270
  });`;
2271
2271
  }
2272
- const Ko = "@storybook/web-components", Wo = (e) => `JSON.parse(\`${Bo(JSON.stringify(JSON.stringify(e)).slice(1, -1))}\`)`;
2273
- function Bo(e) {
2272
+ const Oo = "@storybook/web-components", Jo = (e) => `JSON.parse(\`${Ko(JSON.stringify(JSON.stringify(e)).slice(1, -1))}\`)`;
2273
+ function Ko(e) {
2274
2274
  return e.replaceAll('\\"', '"').replaceAll("`", "\\`").replaceAll("${", "\\${");
2275
2275
  }
2276
- function _o(e) {
2277
- Ho(e);
2276
+ function Wo(e) {
2277
+ Bo(e);
2278
2278
  const t = e.options.css?.globalStylesPath;
2279
2279
  if (t === void 0)
2280
2280
  return "";
@@ -2282,21 +2282,21 @@ function _o(e) {
2282
2282
  return e.viteCommand === "serve" || e.isInStorybook ? [
2283
2283
  `import globalStyles from "${i}${Q}";`,
2284
2284
  "document.adoptedStyleSheets = [...document.adoptedStyleSheets, globalStyles.styleSheet!];",
2285
- gn("", e)
2285
+ yn("", e)
2286
2286
  ].join(`
2287
2287
  `) : `import "${i}${Le}";`;
2288
2288
  }
2289
- const hn = "hydrated";
2290
- function Ho(e) {
2289
+ const fn = "hydrated";
2290
+ function Bo(e) {
2291
2291
  e._globalHydratedCssString = [
2292
2292
  ":not([",
2293
- e.options.css?.hydratedAttribute ?? hn,
2293
+ e.options.css?.hydratedAttribute ?? fn,
2294
2294
  "]):is(",
2295
2295
  e.apiJsonComponents.map((t) => t.tagName).join(","),
2296
2296
  "){visibility:hidden}"
2297
2297
  ].join("");
2298
2298
  }
2299
- function gn(e, t) {
2299
+ function yn(e, t) {
2300
2300
  return [
2301
2301
  "const globalCss = new CSSStyleSheet;",
2302
2302
  `globalCss.replaceSync("@layer{${`${t._globalHydratedCssString}${t.shouldMinify ? "" : "\\n\\n"}${e || ""}`}}");`,
@@ -2304,15 +2304,15 @@ function gn(e, t) {
2304
2304
  ].join(`
2305
2305
  `);
2306
2306
  }
2307
- const zo = (e) => `${e._globalHydratedCssString}${e.shouldMinify ? "" : `
2307
+ const _o = (e) => `${e._globalHydratedCssString}${e.shouldMinify ? "" : `
2308
2308
 
2309
2309
  `}${e._globalCssString ? JSON.parse(`"${e._globalCssString}"`) : ""}`;
2310
- function qo(e) {
2310
+ function Ho(e) {
2311
2311
  const t = [], i = [];
2312
2312
  for (const s of e.privateApiJson.modules) {
2313
2313
  t.push(s.path);
2314
2314
  for (const r of s.declarations)
2315
- "customElement" in r && i.push(Go(r, e, s.path));
2315
+ "customElement" in r && i.push(zo(r, e, s.path));
2316
2316
  }
2317
2317
  return [
2318
2318
  // Deprecated feature will be dropped in https://devtopia.esri.com/WebGIS/arcgis-web-components/issues/2765
@@ -2320,33 +2320,33 @@ function qo(e) {
2320
2320
  e.viteCommand === "build" && e.options.build?.ssr?.stencilCompatibility?.enabled === !0 ? 'import "@lit-labs/ssr-client/lit-element-hydrate-support.js";' : "",
2321
2321
  'import { runtime } from "./runtime";',
2322
2322
  'import { makeDefineCustomElements } from "@arcgis/lumina";',
2323
- _o(e),
2324
- e.hmrEnabled ? Xo : "",
2323
+ Wo(e),
2324
+ e.hmrEnabled ? Go : "",
2325
2325
  "",
2326
- e.isInStorybook ? Jo(e.apiJson) : "",
2326
+ e.isInStorybook ? Mo(e.apiJson) : "",
2327
2327
  "",
2328
2328
  "export const defineCustomElements = makeDefineCustomElements(runtime, {",
2329
2329
  i.join(`,
2330
2330
  `),
2331
2331
  "});",
2332
- e.hmrEnabled ? Qo(t) : ""
2332
+ e.hmrEnabled ? Vo(t) : ""
2333
2333
  ].join(`
2334
2334
  `);
2335
2335
  }
2336
2336
  const Uo = `import "./index";
2337
- export declare const defineCustomElements: import("@arcgis/lumina").DefineCustomElements;`, Go = (e, t, i) => [
2337
+ export declare const defineCustomElements: import("@arcgis/lumina").DefineCustomElements;`, zo = (e, t, i) => [
2338
2338
  ` "${e.tagName}": [`,
2339
2339
  `()=>import("${u.join(t.dir.root, i)}"),`,
2340
- Vo(e),
2340
+ qo(e),
2341
2341
  "]"
2342
2342
  ].join("");
2343
- function Vo(e) {
2344
- const { properties: t, asyncMethods: i, syncMethods: n } = vn(e), s = t.map((p) => p.join(Is)).join(et), r = i.join(et), a = n.join(et), c = [s, r, a], l = c.findLastIndex((p) => p.length > 0), d = c.slice(0, l + 1);
2345
- return d.length > 0 ? `"${d.join(Ls)}"` : "";
2343
+ function qo(e) {
2344
+ const { properties: t, asyncMethods: i, syncMethods: n } = hn(e), s = t.map((p) => p.join(As)).join(et), r = i.join(et), a = n.join(et), c = [s, r, a], l = c.findLastIndex((p) => p.length > 0), d = c.slice(0, l + 1);
2345
+ return d.length > 0 ? `"${d.join(ks)}"` : "";
2346
2346
  }
2347
- function vn(e) {
2347
+ function hn(e) {
2348
2348
  const t = e.members.filter((r) => r.kind === "field").map((r) => {
2349
- const a = typeof r.attribute == "string", c = a && r.attribute !== wt(r.name);
2349
+ const a = typeof r.attribute == "string", c = a && r.attribute !== bt(r.name);
2350
2350
  return a && !c ? [r.name] : [r.name, c ? String(r.attribute) : ""];
2351
2351
  }), i = e.members.filter(
2352
2352
  (r) => r.kind === "method" && /**
@@ -2357,23 +2357,23 @@ function vn(e) {
2357
2357
  ), n = i.filter((r) => r.async === !0).map((r) => r.name), s = i.filter((r) => r.async !== !0).map((r) => r.name);
2358
2358
  return { tagName: e.tagName, properties: t, asyncMethods: n, syncMethods: s };
2359
2359
  }
2360
- const Xo = `import { handleHmrUpdate, handleComponentMetaUpdate } from "@arcgis/lumina/hmrSupport";
2361
- `, Qo = (e) => `
2360
+ const Go = `import { handleHmrUpdate, handleComponentMetaUpdate } from "@arcgis/lumina/hmrSupport";
2361
+ `, Vo = (e) => `
2362
2362
  if(import.meta.hot) {
2363
2363
  import.meta.hot.on("component-meta-update", handleComponentMetaUpdate);
2364
2364
  import.meta.hot.accept([
2365
2365
  ${e.map((t) => ` "/${t}",`).join(`
2366
2366
  `)}
2367
2367
  ], handleHmrUpdate);
2368
- }`, Zo = "@arcgis/lumina:addMethodMetadata";
2369
- function Yo(e, t, i, n, s) {
2368
+ }`, Xo = "@arcgis/lumina:addMethodMetadata";
2369
+ function Qo(e, t, i, n, s) {
2370
2370
  const r = i.getSignatureFromDeclaration(e);
2371
2371
  if (r === void 0)
2372
2372
  return;
2373
2373
  for (const d of e.parameters) {
2374
2374
  if (!o.isIdentifier(d.name)) {
2375
2375
  C.warn(
2376
- Zo,
2376
+ Xo,
2377
2377
  `Object binding patterns are not yet supported in the docs. Found ${d.name?.getText(n)} in ${e.name.getText(n)}`,
2378
2378
  n.fileName
2379
2379
  );
@@ -2389,13 +2389,13 @@ function Yo(e, t, i, n, s) {
2389
2389
  });
2390
2390
  }
2391
2391
  t.parameters.length === 0 && (t.parameters = void 0);
2392
- const a = i.getReturnTypeOfSignature(r), c = Re(i, a, n, s), l = i.signatureToString(r, e, pn, o.SignatureKind.Call);
2392
+ const a = i.getReturnTypeOfSignature(r), c = Re(i, a, n, s), l = i.signatureToString(r, e, ln, o.SignatureKind.Call);
2393
2393
  ue(e.name, i, t), t.return = {
2394
2394
  type: c
2395
2395
  }, t.signature = l.replace(" =>", ":");
2396
2396
  }
2397
- const ea = (e) => e.modifiers?.some?.((t) => t.kind === o.SyntaxKind.AsyncKeyword) ?? !1;
2398
- function ta(e, t, i, n) {
2397
+ const Zo = (e) => e.modifiers?.some?.((t) => t.kind === o.SyntaxKind.AsyncKeyword) ?? !1;
2398
+ function Yo(e, t, i, n) {
2399
2399
  const s = i.typeScriptTypeChecker, a = s.getTypeAtLocation(e).getProperty("emit");
2400
2400
  if (a?.valueDeclaration === void 0)
2401
2401
  return;
@@ -2420,11 +2420,11 @@ function ta(e, t, i, n) {
2420
2420
  composed: void 0,
2421
2421
  privacy: void 0
2422
2422
  };
2423
- return ue(e.name, s, y), ia(e, y, n), y.privacy === void 0 ? y : void 0;
2423
+ return ue(e.name, s, y), ea(e, y, n), y.privacy === void 0 ? y : void 0;
2424
2424
  }
2425
2425
  }
2426
2426
  const Ae = "createEvent";
2427
- function ia(e, t, i) {
2427
+ function ea(e, t, i) {
2428
2428
  if (!e.initializer || !o.isCallExpression(e.initializer))
2429
2429
  return;
2430
2430
  const n = e.initializer;
@@ -2434,14 +2434,14 @@ function ia(e, t, i) {
2434
2434
  if (s !== void 0) {
2435
2435
  if (!o.isObjectLiteralExpression(s))
2436
2436
  throw Error(
2437
- w(
2437
+ b(
2438
2438
  "@arcgis/lumina:extractEventMeta",
2439
2439
  `Expected object literal expression as first argument of ${Ae}(). Found ${t.name} = createEvent(${s.getText(i)})`
2440
2440
  )
2441
2441
  );
2442
2442
  if (s.properties.some((r) => o.isSpreadAssignment(r)))
2443
2443
  throw Error(
2444
- w(
2444
+ b(
2445
2445
  "@arcgis/lumina:extractEventMeta",
2446
2446
  `Unexpected spread syntax in ${Ae}() argument. ${Ae}() arguments must be statically parsable at compile time`
2447
2447
  )
@@ -2456,16 +2456,16 @@ function re(e, t) {
2456
2456
  if (e.kind === o.SyntaxKind.FalseKeyword)
2457
2457
  return !1;
2458
2458
  throw Error(
2459
- w(
2459
+ b(
2460
2460
  "@arcgis/lumina:extractBooleanInitializer",
2461
2461
  `Expected boolean literal. Instead found ${e?.getText(t)}`
2462
2462
  )
2463
2463
  );
2464
2464
  }
2465
2465
  const At = "@arcgis/lumina-compiler";
2466
- class Oe extends vs {
2466
+ class Oe extends hs {
2467
2467
  constructor(t, i) {
2468
- super({ isFullApiExtraction: t.isFullApiExtraction, cwd: t.dir.root }), this.context = t, this.isPathOnly = i, this.localCssImports = void 0, this.localDeclaredComponents = void 0, this.indexedComponents = /* @__PURE__ */ new Map(), this.apiComponent = void 0, this.pairedSetter = void 0, this.copyDocDefinitions = void 0, this._resolvedInheritance = /* @__PURE__ */ new Map(), this.copyDocDefinitions = t.options.documentation?.copyDefinitions, t.environment === "production" ? (this.normalizedDocumentationUrl = mi, this.alternativeDocumentationUrl = fi) : (this.normalizedDocumentationUrl = fi, this.alternativeDocumentationUrl = mi);
2468
+ super({ isFullApiExtraction: t.isFullApiExtraction, cwd: t.dir.root }), this.context = t, this.isPathOnly = i, this.localCssImports = void 0, this.localDeclaredComponents = void 0, this.indexedComponents = /* @__PURE__ */ new Map(), this.apiComponent = void 0, this.pairedSetter = void 0, this.copyDocDefinitions = void 0, this._resolvedInheritance = /* @__PURE__ */ new Map(), this.copyDocDefinitions = t.options.documentation?.copyDefinitions;
2469
2469
  }
2470
2470
  extract(t) {
2471
2471
  const i = super.extract(t);
@@ -2475,18 +2475,12 @@ class Oe extends vs {
2475
2475
  const i = super.extractModules(t);
2476
2476
  for (const n of i)
2477
2477
  for (const s of n.declarations)
2478
- "customElement" in s && (this.context.isFullApiExtraction && ra(
2479
- s,
2480
- this.context,
2481
- this.indexedComponents,
2482
- this.alternativeDocumentationUrl,
2483
- this.normalizedDocumentationUrl
2484
- ), this.inheritMembers(s, i), this.context.isFullApiExtraction && (s.members.sort(st), s.attributes?.sort(st), s.events?.sort(st)));
2478
+ "customElement" in s && (this.context.isFullApiExtraction && na(s, this.context, this.indexedComponents), this.inheritMembers(s, i), this.context.isFullApiExtraction && (s.members.sort(st), s.attributes?.sort(st), s.events?.sort(st)));
2485
2479
  return i;
2486
2480
  }
2487
2481
  extractDeclarations(t) {
2488
2482
  return this.localDeclaredComponents = new Map(
2489
- Vi(t.text)?.map(([i, n]) => [n, i]) ?? []
2483
+ qi(t.text)?.map(([i, n]) => [n, i]) ?? []
2490
2484
  ), this.localDeclaredComponents.size === 0 ? [] : super.extractDeclarations(t);
2491
2485
  }
2492
2486
  extractDeclaration(t) {
@@ -2528,7 +2522,7 @@ class Oe extends vs {
2528
2522
  * prefix (Arcgis), where as tag name always does. This also matches
2529
2523
  * Stencil's behavior.
2530
2524
  */
2531
- pascalCaseName: Es(n),
2525
+ pascalCaseName: bs(n),
2532
2526
  privacy: void 0,
2533
2527
  importPath: "",
2534
2528
  members: [],
@@ -2541,7 +2535,7 @@ class Oe extends vs {
2541
2535
  }, r = t.heritageClauses?.find((a) => a.token === o.SyntaxKind.ExtendsKeyword)?.types[0]?.expression;
2542
2536
  if (r === void 0)
2543
2537
  throw Error(
2544
- w(
2538
+ b(
2545
2539
  "@arcgis/lumina:extractComponentDeclaration",
2546
2540
  `Lumina component must extend LitElement class. Found ${i} in ${this.apiModule.path} that does not extend any class.`
2547
2541
  )
@@ -2554,7 +2548,7 @@ class Oe extends vs {
2554
2548
  }
2555
2549
  if (this.apiComponent = s, s.members = this.extractComponentMembers(t), this.context.isFullApiExtraction) {
2556
2550
  s.attributes = this.inferAttributes(s.members), this.indexedComponents.set(i, s);
2557
- const a = Hs(n, this.context, this.apiModule.path);
2551
+ const a = Bs(n, this.context, this.apiModule.path);
2558
2552
  if (s.importPath = `components/${a}`, this.localCssImports !== void 0) {
2559
2553
  for (const f of this.localCssImports) {
2560
2554
  const y = this.context._cssImports.get(f);
@@ -2626,7 +2620,7 @@ ${c}.componentOnReady().then(() => {
2626
2620
  return i;
2627
2621
  }
2628
2622
  extractComponentMember(t, i) {
2629
- if (Ss(t) || i === void 0) {
2623
+ if (gs(t) || i === void 0) {
2630
2624
  o.isPropertyDeclaration(t) && o.isIdentifier(t.name) && t.name.text === "shadowRootOptions" && t.initializer !== void 0 && o.isIdentifier(t.initializer) && t.initializer.text === "noShadowRoot" && (this.apiComponent.encapsulation = "none");
2631
2625
  return;
2632
2626
  }
@@ -2655,7 +2649,7 @@ ${c}.componentOnReady().then(() => {
2655
2649
  default: void 0,
2656
2650
  deprecated: void 0,
2657
2651
  readonly: c || (s ? t.modifiers?.some((d) => d.kind === o.SyntaxKind.ReadonlyKeyword) : o.isGetAccessor(t) && this.pairedSetter === void 0) ? !0 : void 0,
2658
- attribute: r === !1 ? void 0 : typeof r == "string" ? r : wt(i),
2652
+ attribute: r === !1 ? void 0 : typeof r == "string" ? r : bt(i),
2659
2653
  reflects: a || void 0,
2660
2654
  docsTags: void 0,
2661
2655
  getterType: void 0,
@@ -2663,13 +2657,13 @@ ${c}.componentOnReady().then(() => {
2663
2657
  inheritedFrom: void 0,
2664
2658
  privacy: void 0
2665
2659
  };
2666
- return this.context.isFullApiExtraction && (this.extractComponentFieldDetails(t, l), (r === void 0 && (l.type.values === void 0 || !co(l.type.values)) || l.readonly && !l.reflects) && (l.attribute = void 0)), l;
2660
+ return this.context.isFullApiExtraction && (this.extractComponentFieldDetails(t, l), (r === void 0 && (l.type.values === void 0 || !oo(l.type.values)) || l.readonly && !l.reflects) && (l.attribute = void 0)), l;
2667
2661
  }
2668
2662
  /**
2669
2663
  * Based on a `non-@property()` property, extract a public event if it is one.
2670
2664
  */
2671
2665
  extractComponentEvent(t, i) {
2672
- const n = ta(t, i, this.context, this.file);
2666
+ const n = Yo(t, i, this.context, this.file);
2673
2667
  return n !== void 0 && this.copyDoc(this.copyDocDefinitions?.events?.[i], n, this.apiComponent), n;
2674
2668
  }
2675
2669
  /**
@@ -2682,29 +2676,29 @@ ${c}.componentOnReady().then(() => {
2682
2676
  const d = this.pairedSetter ?? t, p = i.default;
2683
2677
  _t(t, i, this.file);
2684
2678
  const m = p === void 0 && i.default === "true", f = i.docsTags?.some((g) => g.name === "required") ?? !1;
2685
- i.type = uo(this.context, d, f, this.file);
2679
+ i.type = lo(this.context, d, f, this.file);
2686
2680
  const y = o.isPropertyDeclaration(t) && t.type !== void 0 && t.initializer !== void 0 && o.isPropertyAccessExpression(t.initializer) && o.isPropertyAccessExpression(t.initializer.expression) && t.initializer.expression.expression.kind === o.SyntaxKind.ThisKeyword && o.isIdentifier(t.initializer.expression.name) && o.isIdentifier(t.initializer.name);
2687
2681
  if ("initializer" in t && t.initializer !== void 0 && (!i.default || !i.description) || y) {
2688
2682
  const g = t.initializer, v = s.getSymbolAtLocation(g), S = v !== void 0 && ((v.flags ?? 0) & o.SymbolFlags.Alias) !== 0 ? s.getAliasedSymbol(v) : v, E = S?.getDeclarations() ?? [];
2689
2683
  if (S !== void 0) {
2690
- const x = Bt(s, S);
2691
- if (x.docsTags.length > 0) {
2692
- x.docsTags = x.docsTags.filter(
2693
- (T) => !c.has(T.name) || bs.has(T.name)
2684
+ const P = Bt(s, S);
2685
+ if (P.docsTags.length > 0) {
2686
+ P.docsTags = P.docsTags.filter(
2687
+ (T) => !c.has(T.name) || vs.has(T.name)
2694
2688
  );
2695
- const b = i.description;
2696
- ue(t.name, s, i, x), x.docsTags.forEach((T) => {
2689
+ const w = i.description;
2690
+ ue(t.name, s, i, P), P.docsTags.forEach((T) => {
2697
2691
  c.add(T.name);
2698
- }), i.description = b ?? i.description;
2692
+ }), i.description = w ?? i.description;
2699
2693
  } else
2700
- i.description ||= x.description;
2694
+ i.description ||= P.description;
2701
2695
  }
2702
2696
  let $, I;
2703
- E.forEach((x) => {
2704
- if ($ ??= o.isGetAccessor(x) ? x : void 0, I ??= o.isSetAccessor(x) ? x : void 0, !("initializer" in x))
2697
+ E.forEach((P) => {
2698
+ if ($ ??= o.isGetAccessor(P) ? P : void 0, I ??= o.isSetAccessor(P) ? P : void 0, !("initializer" in P))
2705
2699
  return;
2706
- const b = x;
2707
- l ||= b.modifiers?.some((T) => T.kind === o.SyntaxKind.ReadonlyKeyword) ?? !1, _t(b, i, b.getSourceFile());
2700
+ const w = P;
2701
+ l ||= w.modifiers?.some((T) => T.kind === o.SyntaxKind.ReadonlyKeyword) ?? !1, _t(w, i, w.getSourceFile());
2708
2702
  }), y && $ !== void 0 && I !== void 0 && $.type?.getText() !== I.parameters[0]?.type?.getText() && (i.getterType = { text: `typeof ${g.getText(this.file)}` });
2709
2703
  }
2710
2704
  if (l && (i.readonly = !0, n || (i.docsOnlyReadonly = !0)), i.type.values && i.type.values.length > 0 && i.type.values?.every((g) => g.type === "boolean") && (i.default ? m && this.context.viteCommand === "build" && i.deprecated === void 0 && (Oe.loggedBooleanWarning || this.context.logLintWarning(
@@ -2739,12 +2733,12 @@ ${c}.componentOnReady().then(() => {
2739
2733
  inheritedFrom: void 0,
2740
2734
  docsTags: void 0,
2741
2735
  signature: "",
2742
- async: ea(t) ? !0 : void 0,
2736
+ async: Zo(t) ? !0 : void 0,
2743
2737
  privacy: void 0
2744
2738
  };
2745
2739
  if (this.context.isFullApiExtraction) {
2746
2740
  const s = this.context.typeScriptTypeChecker;
2747
- Yo(t, n, s, this.file, this.context.dir), this.copyDoc(this.copyDocDefinitions?.methods?.[i], n, this.apiComponent);
2741
+ Qo(t, n, s, this.file, this.context.dir), this.copyDoc(this.copyDocDefinitions?.methods?.[i], n, this.apiComponent);
2748
2742
  }
2749
2743
  return n;
2750
2744
  }
@@ -2765,7 +2759,7 @@ ${c}.componentOnReady().then(() => {
2765
2759
  description: n.description,
2766
2760
  inheritedFrom: n.inheritedFrom,
2767
2761
  type: s === void 0 || s.length === 0 ? n.type : {
2768
- text: ln(s),
2762
+ text: an(s),
2769
2763
  references: void 0,
2770
2764
  values: s
2771
2765
  },
@@ -2838,20 +2832,20 @@ ${c}.componentOnReady().then(() => {
2838
2832
  const le = {
2839
2833
  name: "LitElement",
2840
2834
  package: "@arcgis/lumina"
2841
- }, mi = "developers.arcgis.com", fi = "next.sites.afd.arcgis.com", st = (e, t) => e.name.localeCompare(t.name);
2842
- async function na(e, t) {
2843
- t || (e.componentFilesPromise = Pt(e, e.dir.srcComponents));
2844
- const i = await e.componentFilesPromise, n = await ma(e, i);
2835
+ }, st = (e, t) => e.name.localeCompare(t.name);
2836
+ async function ta(e, t) {
2837
+ t || (e.componentFilesPromise = xt(e, e.dir.srcComponents));
2838
+ const i = await e.componentFilesPromise, n = await pa(e, i);
2845
2839
  await e.componentStoriesPromise, e._componentPathMapping = {}, e._localDefinedComponents = void 0;
2846
- const s = Sn(n, e, !1);
2840
+ const s = gn(n, e, !1);
2847
2841
  e.privateApiJson = s;
2848
- const [r, a] = bn(s);
2842
+ const [r, a] = vn(s);
2849
2843
  return e.apiJsonComponents = a, e.apiJson = r, s;
2850
2844
  }
2851
- function sa(e, t, i) {
2852
- const n = e.getSourceFile(t, i), s = Sn([n], e, !0), r = s.modules[0];
2845
+ function ia(e, t, i) {
2846
+ const n = e.getSourceFile(t, i), s = gn([n], e, !0), r = s.modules[0];
2853
2847
  {
2854
- const f = bn(s)[0].modules[0], y = e.apiJson.modules.findIndex((v) => v.path === f.path), h = e.apiJson.modules[y], g = Array.from(e.apiJson.modules);
2848
+ const f = vn(s)[0].modules[0], y = e.apiJson.modules.findIndex((v) => v.path === f.path), h = e.apiJson.modules[y], g = Array.from(e.apiJson.modules);
2855
2849
  g.splice(y, 1, f), e.apiJson = { ...e.apiJson, modules: g }, e.apiJsonComponents = e.apiJsonComponents.filter(
2856
2850
  (v) => !h.declarations.includes(v)
2857
2851
  );
@@ -2873,11 +2867,11 @@ function sa(e, t, i) {
2873
2867
  }
2874
2868
  return d ||= m.length !== p.length, d ? void 0 : m;
2875
2869
  }
2876
- function Sn(e, t, i) {
2870
+ function gn(e, t, i) {
2877
2871
  const n = t.options.apiJson?.Extractor ?? Oe, r = new n(t, i).extract(e);
2878
2872
  return t.options.apiJson?.afterCreate?.(r, i), r;
2879
2873
  }
2880
- function bn(e) {
2874
+ function vn(e) {
2881
2875
  const t = { ...e, modules: [] }, i = [];
2882
2876
  for (const n of e.modules) {
2883
2877
  const s = { ...n, declarations: [] };
@@ -2893,58 +2887,61 @@ function bn(e) {
2893
2887
  }
2894
2888
  return [t, i];
2895
2889
  }
2896
- function ra(e, t, i, n, s) {
2897
- const r = oa(i, e);
2898
- O(e, r, n, s);
2899
- for (const a of e.members) {
2900
- if (a.kind === "field")
2901
- ke(a.type, i, t);
2890
+ function na(e, t, i) {
2891
+ const n = sa(i, e);
2892
+ O(e, n, t);
2893
+ for (const s of e.members) {
2894
+ if (s.kind === "field")
2895
+ ke(s.type, i, t);
2902
2896
  else {
2903
- if (ke(a.return?.type, i, t), a.parameters !== void 0)
2904
- for (const c of a.parameters)
2905
- ke(c.type, i, t), O(c, r, n, s);
2906
- a.return !== void 0 && O(a.return, r, n, s);
2897
+ if (ke(s.return?.type, i, t), s.parameters !== void 0)
2898
+ for (const r of s.parameters)
2899
+ ke(r.type, i, t), O(r, n, t);
2900
+ s.return !== void 0 && O(s.return, n, t);
2907
2901
  }
2908
- O(a, r, n, s);
2902
+ O(s, n, t);
2909
2903
  }
2910
2904
  if (e.events !== void 0)
2911
- for (const a of e.events)
2912
- ke(a.type, i, t), O(a, r, n, s);
2905
+ for (const s of e.events)
2906
+ ke(s.type, i, t), O(s, n, t);
2913
2907
  if (e.attributes !== void 0)
2914
- for (const a of e.attributes)
2915
- O(a, r, n, s);
2908
+ for (const s of e.attributes)
2909
+ O(s, n, t);
2916
2910
  if (e.slots !== void 0)
2917
- for (const a of e.slots)
2918
- O(a, r, n, s);
2911
+ for (const s of e.slots)
2912
+ O(s, n, t);
2919
2913
  if (e.cssProperties !== void 0)
2920
- for (const a of e.cssProperties)
2921
- O(a, r, n, s);
2914
+ for (const s of e.cssProperties)
2915
+ O(s, n, t);
2922
2916
  if (e.cssParts !== void 0)
2923
- for (const a of e.cssParts)
2924
- O(a, r, n, s);
2917
+ for (const s of e.cssParts)
2918
+ O(s, n, t);
2925
2919
  if (e.cssStates !== void 0)
2926
- for (const a of e.cssStates)
2927
- O(a, r, n, s);
2920
+ for (const s of e.cssStates)
2921
+ O(s, n, t);
2928
2922
  if (e.demos !== void 0)
2929
- for (const a of e.demos)
2930
- O(a, r, n, s);
2923
+ for (const s of e.demos)
2924
+ O(s, n, t);
2931
2925
  }
2932
2926
  function ke(e, t, i) {
2933
2927
  e !== void 0 && (e.references?.reduce(
2934
- (n, s) => aa(s, t, i, n),
2928
+ (n, s) => ra(s, t, i, n),
2935
2929
  0
2936
2930
  ), e.text = e.text.replaceAll(
2937
- ua,
2931
+ da,
2938
2932
  (n, s) => kt(t.get(s)) ?? n
2939
- ), e.values?.forEach(ca, t));
2940
- }
2941
- function O(e, t, i, n) {
2942
- if (e.description && (e.description = e.description.replaceAll(i, n).replaceAll(yi, t)), e.docsTags)
2943
- for (const s of e.docsTags)
2944
- s.text && (s.text = s.text.replaceAll(i, n).replaceAll(yi, t));
2945
- typeof e.deprecated == "string" && (e.deprecated = e.deprecated.replaceAll(i, n));
2933
+ ), e.values?.forEach(oa, t));
2934
+ }
2935
+ function O(e, t, i) {
2936
+ if (e.description && (e.description = e.description.replaceAll(mi, t).replaceAll(i.alternativeDocumentationUrl, i.normalizedDocumentationUrl)), e.docsTags)
2937
+ for (const n of e.docsTags)
2938
+ n.text && (n.text = n.text.replaceAll(mi, t).replaceAll(i.alternativeDocumentationUrl, i.normalizedDocumentationUrl));
2939
+ typeof e.deprecated == "string" && (e.deprecated = e.deprecated.replaceAll(
2940
+ i.alternativeDocumentationUrl,
2941
+ i.normalizedDocumentationUrl
2942
+ ));
2946
2943
  }
2947
- const yi = /\{@link ([^}]+)\}/gu, oa = (e, t) => (i, n) => {
2944
+ const mi = /\{@link ([^}]+)\}/gu, sa = (e, t) => (i, n) => {
2948
2945
  let s = n.indexOf(" ");
2949
2946
  s === -1 && (s = n.length);
2950
2947
  const r = n.slice(0, s), a = n.slice(s + 1);
@@ -2968,8 +2965,11 @@ const yi = /\{@link ([^}]+)\}/gu, oa = (e, t) => (i, n) => {
2968
2965
  );
2969
2966
  return `[${a || (d === t ? l : `${d.tagName}.${l}`)}](${p}#${l})`;
2970
2967
  };
2971
- function aa(e, t, i, n) {
2972
- if (n > 0 && (e.start !== void 0 && (e.start += n), e.end !== void 0 && (e.end += n)), e.package !== void 0)
2968
+ function ra(e, t, i, n) {
2969
+ if (e.viewUrl !== void 0 && (e.viewUrl = e.viewUrl.replace(
2970
+ i.alternativeDocumentationUrl,
2971
+ i.normalizedDocumentationUrl
2972
+ )), n > 0 && (e.start !== void 0 && (e.start += n), e.end !== void 0 && (e.end += n)), e.package !== void 0)
2973
2973
  return n;
2974
2974
  if (e.module?.startsWith("dist/components/") === !0)
2975
2975
  e.module = he(e.module, "dist/components/", i);
@@ -2978,17 +2978,17 @@ function aa(e, t, i, n) {
2978
2978
  if (s !== void 0) {
2979
2979
  const r = e.name.length;
2980
2980
  e.name = kt(s);
2981
- const a = e.name.length - r - hi;
2982
- e.viewUrl = s.demos?.at(0)?.url, e.start = e.start - hi, e.end = e.end + a, n += a - pa;
2981
+ const a = e.name.length - r - fi;
2982
+ e.viewUrl = s.demos?.at(0)?.url.replace(i.alternativeDocumentationUrl, i.normalizedDocumentationUrl), e.start = e.start - fi, e.end = e.end + a, n += a - la;
2983
2983
  }
2984
2984
  }
2985
2985
  return n;
2986
2986
  }
2987
- function ca(e) {
2987
+ function oa(e) {
2988
2988
  e.type.startsWith("ToElement<") && (e.type = kt(this.get(e.type.slice(10, -1))) ?? e.type);
2989
2989
  }
2990
- const kt = (e) => e ? `HTML${e.pascalCaseName}Element` : void 0, la = "ToElement<", hi = la.length, da = ">", pa = da.length, ua = /ToElement<(\w+)>/gu;
2991
- async function ma(e, t) {
2990
+ const kt = (e) => e ? `HTML${e.pascalCaseName}Element` : void 0, aa = "ToElement<", fi = aa.length, ca = ">", la = ca.length, da = /ToElement<(\w+)>/gu;
2991
+ async function pa(e, t) {
2992
2992
  if (e.viteCommand === "serve" && (Object.hasOwn(e, "typeScriptHost") || (e.typeScriptHost = o.createCompilerHost(e.typeScriptConfig, !1))), e.typeScriptProgram !== void 0) {
2993
2993
  const i = e.typeScriptProgram.getSourceFiles(), n = new Set(t);
2994
2994
  return i.filter((s) => n.has(s.fileName));
@@ -3000,36 +3000,36 @@ async function ma(e, t) {
3000
3000
  })
3001
3001
  );
3002
3002
  }
3003
- async function wn(e) {
3004
- return ve ??= ya(e), await ve;
3003
+ async function Sn(e) {
3004
+ return ve ??= ma(e), await ve;
3005
3005
  }
3006
- function fa() {
3006
+ function ua() {
3007
3007
  if (ht === void 0)
3008
3008
  throw Error(
3009
- w(
3009
+ b(
3010
3010
  "@arcgis/lumina:retrieveComponentDependencies",
3011
3011
  "Component dependencies have not yet been initialized. Await componentDependenciesPromise promise first."
3012
3012
  )
3013
3013
  );
3014
3014
  return ht;
3015
3015
  }
3016
- function Tn() {
3016
+ function wn() {
3017
3017
  if (gt === void 0)
3018
3018
  throw Error(
3019
- w(
3019
+ b(
3020
3020
  "@arcgis/lumina:retrieveFlatComponentDependencies",
3021
3021
  "Component dependencies have not yet been initialized. Await componentDependenciesPromise promise first."
3022
3022
  )
3023
3023
  );
3024
3024
  return gt;
3025
3025
  }
3026
- async function ya(e) {
3026
+ async function ma(e) {
3027
3027
  const t = R(e), i = t.dependencies ?? {}, n = t.peerDependencies ?? {}, r = (await Promise.all(
3028
- [...Object.keys(i), ...Object.keys(n)].filter((a) => !ha.has(a)).flatMap(async (a) => await En(a, e))
3029
- )).filter(D);
3028
+ [...Object.keys(i), ...Object.keys(n)].filter((a) => !fa.has(a)).flatMap(async (a) => await bn(a, e))
3029
+ )).filter(j);
3030
3030
  return ht ??= r, gt = Object.fromEntries(r.flatMap((a) => Object.entries(a.components))), r;
3031
3031
  }
3032
- const ha = /* @__PURE__ */ new Set([
3032
+ const fa = /* @__PURE__ */ new Set([
3033
3033
  "@arcgis/arcade-languageservice",
3034
3034
  "@arcgis/components-build-utils",
3035
3035
  "@arcgis/components-utils",
@@ -3066,29 +3066,29 @@ const ha = /* @__PURE__ */ new Set([
3066
3066
  "vscode-languageserver-types"
3067
3067
  ]);
3068
3068
  let ht, gt, ve;
3069
- async function En(e, t) {
3070
- const i = await Be(e, t), n = await _e(i), s = "exports" in n, r = Ta.bind(void 0, s), a = "@stencil/core" in (n.dependencies ?? {}) || "@stencil/core" in (n.devDependencies ?? {}), c = u.join(i, "dist/esm/loader.js");
3071
- if (a ? await q(c) : !1) {
3072
- const y = await J(c, "utf8"), h = ga(y, "bootstrapLazy("), g = y.indexOf(", options", h), v = y.slice(h, g), S = v.startsWith('JSON.parse("') ? v.slice(12, -2).replaceAll('\\"', '"') : v;
3069
+ async function bn(e, t) {
3070
+ const i = await Be(e, t), n = await _e(i), s = "exports" in n, r = wa.bind(void 0, s), a = "@stencil/core" in (n.dependencies ?? {}) || "@stencil/core" in (n.devDependencies ?? {}), c = u.join(i, "dist/esm/loader.js");
3071
+ if (a ? await z(c) : !1) {
3072
+ const y = await J(c, "utf8"), h = ya(y, "bootstrapLazy("), g = y.indexOf(", options", h), v = y.slice(h, g), S = v.startsWith('JSON.parse("') ? v.slice(12, -2).replaceAll('\\"', '"') : v;
3073
3073
  try {
3074
- const E = JSON.parse(S), $ = ba(E, { packageName: e, getImportPath: r });
3074
+ const E = JSON.parse(S), $ = va(E, { packageName: e, getImportPath: r });
3075
3075
  return { packageName: e, type: "stencil", components: $ };
3076
3076
  } catch (E) {
3077
3077
  C.warn("@arcgis/lumina", `Failed to parse dist/esm/loader.js for ${e}.
3078
3078
  Error: ${String(E)}`);
3079
3079
  }
3080
3080
  }
3081
- const d = gi(n.customElements);
3081
+ const d = yi(n.customElements);
3082
3082
  if (d != null) {
3083
- const y = u.join(i, d), h = JSON.parse(await J(y, "utf-8")), g = va(h), v = Cn(h, {
3083
+ const y = u.join(i, d), h = JSON.parse(await J(y, "utf-8")), g = ha(h), v = Tn(h, {
3084
3084
  packageName: e,
3085
3085
  getImportPath: r
3086
3086
  });
3087
3087
  return { type: g ? "@arcgis/lumina" : "unknown", packageName: e, components: v };
3088
3088
  }
3089
- const p = gi(n["web-types"]);
3089
+ const p = yi(n["web-types"]);
3090
3090
  if (p != null) {
3091
- const y = u.join(i, p), h = JSON.parse(await J(y, "utf-8")), g = Sa(h, {
3091
+ const y = u.join(i, p), h = JSON.parse(await J(y, "utf-8")), g = ga(h, {
3092
3092
  packageName: e,
3093
3093
  getImportPath: r,
3094
3094
  packageRoot: i
@@ -3096,20 +3096,20 @@ Error: ${String(E)}`);
3096
3096
  return { type: "unknown", packageName: e, components: g };
3097
3097
  }
3098
3098
  const m = u.join(i, "dist/components");
3099
- if (await q(m)) {
3100
- const y = await wa(m, {
3099
+ if (await z(m)) {
3100
+ const y = await Sa(m, {
3101
3101
  packageName: e,
3102
3102
  getImportPath: r
3103
3103
  });
3104
3104
  return { type: "unknown", packageName: e, components: y };
3105
3105
  }
3106
3106
  }
3107
- const gi = (e) => Array.isArray(e) ? e[0] : e;
3108
- function ga(e, t) {
3107
+ const yi = (e) => Array.isArray(e) ? e[0] : e;
3108
+ function ya(e, t) {
3109
3109
  const i = e.indexOf(t);
3110
3110
  return i === -1 ? -1 : i + t.length;
3111
3111
  }
3112
- function Cn(e, t) {
3112
+ function Tn(e, t) {
3113
3113
  const i = {};
3114
3114
  for (const n of e.modules ?? [])
3115
3115
  if (n.declarations !== void 0)
@@ -3127,7 +3127,7 @@ function Cn(e, t) {
3127
3127
  }
3128
3128
  return i;
3129
3129
  }
3130
- const va = (e) => e.compiler?.name === At, Sa = (e, t) => Object.fromEntries(
3130
+ const ha = (e) => e.compiler?.name === At, ga = (e, t) => Object.fromEntries(
3131
3131
  (e.contributions?.html?.elements ?? e.contributions?.html?.tags)?.map(
3132
3132
  (i) => [
3133
3133
  i.name,
@@ -3138,7 +3138,7 @@ const va = (e) => e.compiler?.name === At, Sa = (e, t) => Object.fromEntries(
3138
3138
  }
3139
3139
  ]
3140
3140
  ) ?? []
3141
- ), ba = (e, t) => Object.fromEntries(
3141
+ ), va = (e, t) => Object.fromEntries(
3142
3142
  e.flatMap(
3143
3143
  ([i, n]) => n.map(
3144
3144
  ([s, r, a]) => [
@@ -3156,7 +3156,7 @@ const va = (e) => e.compiler?.name === At, Sa = (e, t) => Object.fromEntries(
3156
3156
  ]
3157
3157
  )
3158
3158
  )
3159
- ), wa = async (e, t) => Object.fromEntries(
3159
+ ), Sa = async (e, t) => Object.fromEntries(
3160
3160
  (await He(e)).filter((i) => i.endsWith(".d.ts")).map((i) => {
3161
3161
  const n = i.slice(0, -5);
3162
3162
  return [
@@ -3168,16 +3168,16 @@ const va = (e) => e.compiler?.name === At, Sa = (e, t) => Object.fromEntries(
3168
3168
  }
3169
3169
  ];
3170
3170
  })
3171
- ), Ta = (e, t) => e ? `components/${t}` : `dist/components/${t}.js`, Ea = (e) => e.startsWith("/") ? e : `/${e}`, It = (e, t) => `${e}@fs${Ea(t)}`;
3172
- function Ue(e = R(), t = !1, i = e.name === "@esri/calcite-components") {
3171
+ ), wa = (e, t) => e ? `components/${t}` : `dist/components/${t}.js`, ba = (e) => e.startsWith("/") ? e : `/${e}`, It = (e, t) => `${e}@fs${ba(t)}`;
3172
+ function qe(e = R(), t = !1, i = e.name === "@esri/calcite-components") {
3173
3173
  const n = e.version.includes("next"), s = e.name === "@esri/calcite-components";
3174
3174
  if (s && n)
3175
3175
  return `https://cdn.jsdelivr.net/npm/@esri/calcite-components@${e.version}/dist/calcite/`;
3176
- const r = t || n ? "jsdev.arcgis.com" : "js.arcgis.com", a = Ca(e.name), c = $a(e.version, i);
3176
+ const r = t || n ? "jsdev.arcgis.com" : "js.arcgis.com", a = Ta(e.name), c = Ea(e.version, i);
3177
3177
  return a.length === 0 ? `https://${r}/${c}/` : s ? `https://${r}/${a}/${c}/` : `https://${r}/${c}/${a}/`;
3178
3178
  }
3179
- const Ca = (e) => e.split("/").pop() ?? e;
3180
- function $a(e, t) {
3179
+ const Ta = (e) => e.split("/").pop() ?? e;
3180
+ function Ea(e, t) {
3181
3181
  if (/\d+\.\d+\.\d+-(?:.*)$/u.test(e))
3182
3182
  return "next";
3183
3183
  const n = /^(?<major>\d+)\.(?<minor>\d+)\.(?<patch>\d+)/u, s = e.match(n);
@@ -3187,8 +3187,8 @@ function $a(e, t) {
3187
3187
  }
3188
3188
  return "next";
3189
3189
  }
3190
- const xa = ["keyed", "ref", "repeat", "live"], ae = "staticHtml", Z = "staticSvg", ce = "html", oe = "svg", $n = Symbol("maybe HTML namespace or maybe SVG"), xn = "css", Pn = "mathml", An = [xn, ce, Pn, ae, Z, oe], Pa = new Set(An), Aa = ["safeClassMap", "safeStyleMap", "deferLoad"], ka = "nothing", Ia = [...xa, ...An, ...Aa, ka], Je = (e) => o.isJsxElement(e) || o.isJsxSelfClosingElement(e) || o.isJsxFragment(e);
3191
- function vi(e, t, i) {
3190
+ const Ca = ["keyed", "ref", "repeat", "live"], ae = "staticHtml", Z = "staticSvg", ce = "html", oe = "svg", En = Symbol("maybe HTML namespace or maybe SVG"), Cn = "css", $n = "mathml", Pn = [Cn, ce, $n, ae, Z, oe], $a = new Set(Pn), Pa = ["safeClassMap", "safeStyleMap", "deferLoad"], xa = "nothing", Aa = [...Ca, ...Pn, ...Pa, xa], Je = (e) => o.isJsxElement(e) || o.isJsxSelfClosingElement(e) || o.isJsxFragment(e);
3191
+ function hi(e, t, i) {
3192
3192
  if (ne(e))
3193
3193
  return e;
3194
3194
  {
@@ -3207,14 +3207,14 @@ function ne(e) {
3207
3207
  return (
3208
3208
  // Inlined string literal
3209
3209
  typeof e == "string" || // Syntax kinds that are never undefined
3210
- La.has(e.kind) || // Ternary with both branches never undefined
3210
+ ka.has(e.kind) || // Ternary with both branches never undefined
3211
3211
  o.isConditionalExpression(e) && ne(e.whenTrue) && ne(e.whenFalse) || // Binary expression with operator that never results in undefined Or both sides are definitely not undefined
3212
- o.isBinaryExpression(e) && (Fa.has(e.operatorToken.kind) || ne(e.left) && ne(e.right)) || // `as`, `satisfies`, `()` with definitely not undefined expression
3212
+ o.isBinaryExpression(e) && (Ia.has(e.operatorToken.kind) || ne(e.left) && ne(e.right)) || // `as`, `satisfies`, `()` with definitely not undefined expression
3213
3213
  (o.isParenthesizedExpression(e) || o.isSatisfiesExpression(e) || o.isAsExpression(e)) && ne(e.expression) || // JSX that got converted to html`<p>Something</p>`
3214
- o.isTaggedTemplateExpression(e) && o.isIdentifier(e.tag) && Pa.has(e.tag.text)
3214
+ o.isTaggedTemplateExpression(e) && o.isIdentifier(e.tag) && $a.has(e.tag.text)
3215
3215
  );
3216
3216
  }
3217
- const La = /* @__PURE__ */ new Set([
3217
+ const ka = /* @__PURE__ */ new Set([
3218
3218
  o.SyntaxKind.NumericLiteral,
3219
3219
  o.SyntaxKind.BigIntLiteral,
3220
3220
  o.SyntaxKind.StringLiteral,
@@ -3233,7 +3233,7 @@ const La = /* @__PURE__ */ new Set([
3233
3233
  o.SyntaxKind.ClassExpression,
3234
3234
  // Trust? Trust.
3235
3235
  o.SyntaxKind.NonNullExpression
3236
- ]), Fa = /* @__PURE__ */ new Set([
3236
+ ]), Ia = /* @__PURE__ */ new Set([
3237
3237
  o.SyntaxKind.PlusEqualsToken,
3238
3238
  o.SyntaxKind.MinusEqualsToken,
3239
3239
  o.SyntaxKind.AsteriskAsteriskEqualsToken,
@@ -3268,9 +3268,9 @@ const La = /* @__PURE__ */ new Set([
3268
3268
  o.SyntaxKind.SlashToken,
3269
3269
  o.SyntaxKind.PercentToken,
3270
3270
  o.SyntaxKind.AsteriskAsteriskToken
3271
- ]), Na = {
3271
+ ]), La = {
3272
3272
  property(e, t, i, n) {
3273
- const s = ja(n, i, e), r = s?.type === "stringifiedReflected", a = s?.type === "reflected" || r;
3273
+ const s = Fa(n, i, e), r = s?.type === "stringifiedReflected", a = s?.type === "reflected" || r;
3274
3274
  if (a) {
3275
3275
  const f = ot(t);
3276
3276
  if (f === !0)
@@ -3283,11 +3283,11 @@ const La = /* @__PURE__ */ new Set([
3283
3283
  return [s.name, ...c];
3284
3284
  const [d, p] = c, m = s?.type === "stringifiedNonReflected";
3285
3285
  if (r || m) {
3286
- const f = vi(
3286
+ const f = hi(
3287
3287
  p,
3288
3288
  e,
3289
3289
  m ? "" : void 0
3290
- ), h = i === "value" && (n === "input" || n === "textarea" || n === De) ? Ra(f, e) : f;
3290
+ ), h = i === "value" && (n === "input" || n === "textarea" || n === je) ? Da(f, e) : f;
3291
3291
  if (h !== p)
3292
3292
  return [m ? `.${i}` : s.name, d, h];
3293
3293
  }
@@ -3299,7 +3299,7 @@ const La = /* @__PURE__ */ new Set([
3299
3299
  return [i];
3300
3300
  if (n === !1)
3301
3301
  return [];
3302
- const s = Fe(e, t, !0), a = s[0] !== "=" ? s : [s[0], vi(s[1], e)];
3302
+ const s = Fe(e, t, !0), a = s[0] !== "=" ? s : [s[0], hi(s[1], e)];
3303
3303
  return [i, ...a];
3304
3304
  },
3305
3305
  booleanAttribute(e, t, i) {
@@ -3312,7 +3312,7 @@ const La = /* @__PURE__ */ new Set([
3312
3312
  `Event prop value must be an expression. Found ${String(t?.getText(e.sourceFile))}`
3313
3313
  );
3314
3314
  const n = i.slice(2), s = ut(n);
3315
- return [`@${sn.has(s) ? n.toLowerCase() : ut(n)}=`, ...Nt(e, t, void 0)];
3315
+ return [`@${tn.has(s) ? n.toLowerCase() : ut(n)}=`, ...Nt(e, t, void 0)];
3316
3316
  },
3317
3317
  directives(e, t) {
3318
3318
  if (t === void 0 || !o.isJsxExpression(t))
@@ -3328,7 +3328,7 @@ const La = /* @__PURE__ */ new Set([
3328
3328
  throw new Error(
3329
3329
  `Directives prop cannot contain a spread argument - it needs to be statically analyzable. Still, the following are allowed: directives={[directiveA, condition ? a : b, c()]}. Found ${String(t.expression?.getText(e.sourceFile))}`
3330
3330
  );
3331
- return U(e, void 0, s);
3331
+ return q(e, void 0, s);
3332
3332
  });
3333
3333
  },
3334
3334
  ref(e, t) {
@@ -3340,24 +3340,24 @@ const La = /* @__PURE__ */ new Set([
3340
3340
  );
3341
3341
  return [
3342
3342
  o.factory.createCallExpression(o.factory.createIdentifier(i), void 0, [
3343
- U(e, void 0, t.expression)
3343
+ q(e, void 0, t.expression)
3344
3344
  ])
3345
3345
  ];
3346
3346
  },
3347
- class: bi,
3348
- style: bi,
3347
+ class: vi,
3348
+ style: vi,
3349
3349
  key: (e, t) => [Lt(t, e.sourceFile)],
3350
3350
  deferLoad(e, t, i, n) {
3351
3351
  if (typeof n != "string")
3352
3352
  throw Error("deferLoad prop is not currently supported on dynamic tag names.");
3353
- if (!xt(n))
3353
+ if (!Pt(n))
3354
3354
  throw Error(`deferLoad prop is only supported on custom elements. Found ${String(n)}`);
3355
3355
  e.neededImports.add("deferLoad");
3356
3356
  const s = e.importRenames.deferLoad;
3357
3357
  return [o.factory.createIdentifier(s)];
3358
3358
  }
3359
3359
  };
3360
- function ja(e, t, i) {
3360
+ function Fa(e, t, i) {
3361
3361
  if (typeof e == "string") {
3362
3362
  const r = (i.externalComponents[e] ?? i.localComponents[e])?.propToAttribute?.[t];
3363
3363
  if (r !== void 0)
@@ -3412,10 +3412,10 @@ function Fe(e, t, i = !1) {
3412
3412
  `Invalid JSX syntax detected or there is a bug in Lumina. Found ${t.getText(e.sourceFile)}. Expected JSX attribute value to be wrapped in { }`
3413
3413
  );
3414
3414
  if (o.isStringLiteral(t))
3415
- return Si(t, i);
3415
+ return gi(t, i);
3416
3416
  if (o.isJsxExpression(t) && t.expression) {
3417
3417
  if (o.isStringLiteral(t.expression))
3418
- return Si(t.expression, i);
3418
+ return gi(t.expression, i);
3419
3419
  if (i) {
3420
3420
  if (o.isNumericLiteral(t.expression))
3421
3421
  return [`=${t.expression.text}`];
@@ -3425,14 +3425,14 @@ function Fe(e, t, i = !1) {
3425
3425
  }
3426
3426
  return ["=", ...Nt(e, t, void 0)];
3427
3427
  }
3428
- function Si(e, t) {
3428
+ function gi(e, t) {
3429
3429
  if (!t)
3430
3430
  return ["=", e];
3431
3431
  const i = e.text;
3432
3432
  if (i.length === 0)
3433
3433
  return [];
3434
- const n = on(i);
3435
- if (Xr(n)) {
3434
+ const n = sn(i);
3435
+ if (Gr(n)) {
3436
3436
  const s = n.replaceAll('"', "&#34;");
3437
3437
  if (s.length > n.length) {
3438
3438
  const r = n.replaceAll("'", "&#39;");
@@ -3443,7 +3443,7 @@ function Si(e, t) {
3443
3443
  } else
3444
3444
  return [`=${n}`];
3445
3445
  }
3446
- function bi(e, t, i) {
3446
+ function vi(e, t, i) {
3447
3447
  if (t !== void 0 && o.isStringLiteral(t))
3448
3448
  return [`${i}="${t.text}"`];
3449
3449
  if (t === void 0 || !o.isJsxExpression(t) || t.expression === void 0)
@@ -3451,28 +3451,28 @@ function bi(e, t, i) {
3451
3451
  `${i} prop value must be an expression. Found ${String(t?.getText(e.sourceFile))}`
3452
3452
  );
3453
3453
  const n = t.expression;
3454
- if (Da(n)) {
3454
+ if (Na(n)) {
3455
3455
  const r = i === "class" ? "safeClassMap" : "safeStyleMap";
3456
3456
  e.neededImports.add(r);
3457
3457
  const a = e.importRenames[r], c = o.factory.createCallExpression(o.factory.createIdentifier(a), void 0, [
3458
- U(e, void 0, n)
3458
+ q(e, void 0, n)
3459
3459
  ]);
3460
3460
  return [`${i}=`, c];
3461
3461
  } else
3462
3462
  return [i, ...Fe(e, t, !0)];
3463
3463
  }
3464
- const Da = (e) => o.isObjectLiteralExpression(e) || o.isPropertyAccessExpression(e) || o.isIdentifier(e) || o.isCallExpression(e) || o.isBinaryExpression(e) || o.isConditionalExpression(e);
3465
- function Ra(e, t) {
3464
+ const Na = (e) => o.isObjectLiteralExpression(e) || o.isPropertyAccessExpression(e) || o.isIdentifier(e) || o.isCallExpression(e) || o.isBinaryExpression(e) || o.isConditionalExpression(e);
3465
+ function Da(e, t) {
3466
3466
  t.neededImports.add("live");
3467
3467
  const i = t.importRenames.live;
3468
3468
  return o.factory.createCallExpression(o.factory.createIdentifier(i), void 0, [
3469
3469
  typeof e == "string" ? o.factory.createStringLiteral(e) : e
3470
3470
  ]);
3471
3471
  }
3472
- function Ma(e) {
3473
- if (e && o.isJsxExpression(e) && e.expression && o.isCallExpression(e.expression) && o.isIdentifier(e.expression.expression) && e.expression.expression.text in wi && e.expression.arguments.length <= 1)
3472
+ function ja(e) {
3473
+ if (e && o.isJsxExpression(e) && e.expression && o.isCallExpression(e.expression) && o.isIdentifier(e.expression.expression) && e.expression.expression.text in Si && e.expression.arguments.length <= 1)
3474
3474
  return {
3475
- propType: wi[e.expression.expression.text],
3475
+ propType: Si[e.expression.expression.text],
3476
3476
  // To simplify checking logic in convertProps, wrap expression in JSX expression
3477
3477
  initializer: o.factory.createJsxExpression(
3478
3478
  void 0,
@@ -3481,21 +3481,21 @@ function Ma(e) {
3481
3481
  )
3482
3482
  };
3483
3483
  }
3484
- const wi = {
3484
+ const Si = {
3485
3485
  bindProperty: "property",
3486
3486
  bindAttribute: "attribute",
3487
3487
  bindBooleanAttribute: "booleanAttribute",
3488
3488
  bindEvent: "event"
3489
3489
  };
3490
- function Oa(e, t, i) {
3491
- return Ka.has(e) ? e : e.startsWith("on") && t !== void 0 && o.isJsxExpression(t) && t.expression !== void 0 ? "event" : (en.has(e) || e.includes("-")) && (e !== "itemId" || i !== "arcgis-map" && i !== "arcgis-scene") ? "attribute" : !xt(i) && (tn.has(e) || (i === ft ? !1 : i === De ? (
3490
+ function Ra(e, t, i) {
3491
+ return Oa.has(e) ? e : e.startsWith("on") && t !== void 0 && o.isJsxExpression(t) && t.expression !== void 0 ? "event" : (Zi.has(e) || e.includes("-")) && (e !== "itemId" || i !== "arcgis-map" && i !== "arcgis-scene") ? "attribute" : !Pt(i) && (Yi.has(e) || (i === ft ? !1 : i === je ? (
3492
3492
  // When tag name is dynamic, we can't help but check if the prop name matches an "always attribute" in any html element
3493
3493
  Object.values(yt).some((r) => r.has(e))
3494
- ) : yt[i]?.has(e) === !0)) ? ei.has(e) ? "booleanAttribute" : "attribute" : i === "svg" || i === "math" || i === ft || i !== De && (Ct.has(i) || $t.has(i)) ? e in B.common.reflected || e in B.common.stringifiedReflected || e in B.common.stringifiedNonReflected ? "property" : ei.has(e) ? "booleanAttribute" : "attribute" : "property";
3494
+ ) : yt[i]?.has(e) === !0)) ? ei.has(e) ? "booleanAttribute" : "attribute" : i === "svg" || i === "math" || i === ft || i !== je && (Ct.has(i) || $t.has(i)) ? e in B.common.reflected || e in B.common.stringifiedReflected || e in B.common.stringifiedNonReflected ? "property" : ei.has(e) ? "booleanAttribute" : "attribute" : "property";
3495
3495
  }
3496
- const Ja = ["class", "style", "ref", "directives", "key", "deferLoad"], Ka = new Set(Ja), Wa = (e) => typeof e != "string" || e.trim().length > 0;
3496
+ const Ma = ["class", "style", "ref", "directives", "key", "deferLoad"], Oa = new Set(Ma), Ja = (e) => typeof e != "string" || e.trim().length > 0;
3497
3497
  function Ge({ key: e, parts: t, litTag: i }, n) {
3498
- const s = Ba(t);
3498
+ const s = Ka(t);
3499
3499
  if (s.length % 2 === 0)
3500
3500
  throw new Error("Normalized template parts array length must be odd");
3501
3501
  const [r, ...a] = s;
@@ -3513,17 +3513,17 @@ function Ge({ key: e, parts: t, litTag: i }, n) {
3513
3513
  }
3514
3514
  const c = typeof i == "string" ? i : ce;
3515
3515
  n.neededImports.add(c);
3516
- const l = n.importRenames[c], d = ze(r), p = o.factory.createTaggedTemplateExpression(
3516
+ const l = n.importRenames[c], d = Ue(r), p = o.factory.createTaggedTemplateExpression(
3517
3517
  o.factory.createIdentifier(l),
3518
3518
  void 0,
3519
3519
  a.length === 0 ? o.factory.createNoSubstitutionTemplateLiteral(d, d) : o.factory.createTemplateExpression(
3520
3520
  o.factory.createTemplateHead(d, d),
3521
- _a(a)
3521
+ Wa(a)
3522
3522
  )
3523
3523
  );
3524
3524
  return at(n, e, p);
3525
3525
  }
3526
- const Ba = (e) => e.reduce(
3526
+ const Ka = (e) => e.reduce(
3527
3527
  (t, i, n) => {
3528
3528
  const s = t.at(-1), r = typeof s == "string", a = typeof i == "string";
3529
3529
  if (r && a)
@@ -3533,7 +3533,7 @@ const Ba = (e) => e.reduce(
3533
3533
  },
3534
3534
  [""]
3535
3535
  );
3536
- function _a(e) {
3536
+ function Wa(e) {
3537
3537
  if (!(e.length % 2 === 0))
3538
3538
  throw new Error("templatePartsToSpans should be called with normalized parts array without the first item");
3539
3539
  const i = e.length / 2;
@@ -3544,7 +3544,7 @@ function _a(e) {
3544
3544
  const c = r + 1, l = e[c];
3545
3545
  if (typeof l != "string")
3546
3546
  throw new Error("Expected to receive a normalized array of parts");
3547
- const d = s === i - 1, p = ze(l);
3547
+ const d = s === i - 1, p = Ue(l);
3548
3548
  return o.factory.createTemplateSpan(
3549
3549
  a,
3550
3550
  /*
@@ -3565,8 +3565,8 @@ function at(e, t, i) {
3565
3565
  const n = e.importRenames.keyed;
3566
3566
  return o.factory.createCallExpression(o.factory.createIdentifier(n), void 0, [t, i]);
3567
3567
  }
3568
- const kn = (e, t) => e.getFullText(t.sourceFile).slice(0, e.getLeadingTriviaWidth(t.sourceFile));
3569
- function In(e, t) {
3568
+ const xn = (e, t) => e.getFullText(t.sourceFile).slice(0, e.getLeadingTriviaWidth(t.sourceFile));
3569
+ function An(e, t) {
3570
3570
  const i = Ft(e);
3571
3571
  return i.length === 0 ? t : o.setSyntheticLeadingComments(
3572
3572
  t,
@@ -3574,18 +3574,18 @@ function In(e, t) {
3574
3574
  ...n,
3575
3575
  pos: -1,
3576
3576
  end: -1,
3577
- text: Ln(e.slice(n.pos, n.end))
3577
+ text: kn(e.slice(n.pos, n.end))
3578
3578
  }))
3579
3579
  );
3580
3580
  }
3581
3581
  const Ft = (e) => e.trim().length === 0 ? [] : o.getLeadingCommentRanges(e, 0) ?? [];
3582
- function Ha(e) {
3582
+ function Ba(e) {
3583
3583
  const t = Ft(e);
3584
3584
  if (t.length === 0)
3585
3585
  return [e || " "];
3586
3586
  const i = t.reduceRight(
3587
3587
  ([s, ...r], a) => {
3588
- const c = za(s), l = ze(Ln(c.slice(a.pos, a.end)));
3588
+ const c = _a(s), l = Ue(kn(c.slice(a.pos, a.end)));
3589
3589
  return [
3590
3590
  c.slice(0, a.pos),
3591
3591
  /**
@@ -3603,13 +3603,13 @@ function Ha(e) {
3603
3603
  const n = i.at(-1);
3604
3604
  return (typeof n != "string" || n.trim() !== "") && i.push(" "), i;
3605
3605
  }
3606
- const Ln = (e) => e.startsWith("//") ? e.slice(2) : e.slice(2, -2);
3607
- function za(e) {
3606
+ const kn = (e) => e.startsWith("//") ? e.slice(2) : e.slice(2, -2);
3607
+ function _a(e) {
3608
3608
  if (typeof e == "string")
3609
3609
  return e;
3610
3610
  throw new Error(`Expected string, got ${typeof e}: ${String(e)}`);
3611
3611
  }
3612
- function qa(e, t) {
3612
+ function Ha(e, t) {
3613
3613
  if (!(o.isPropertyAccessExpression(t.expression) && t.expression.name.text === "map"))
3614
3614
  return t;
3615
3615
  const n = t.arguments[0];
@@ -3621,7 +3621,7 @@ function qa(e, t) {
3621
3621
  return t;
3622
3622
  const c = Se(n.body);
3623
3623
  let l = !0, d;
3624
- if (Ti(c))
3624
+ if (wi(c))
3625
3625
  d = c;
3626
3626
  else {
3627
3627
  if (!o.isBlock(c))
@@ -3630,14 +3630,14 @@ function qa(e, t) {
3630
3630
  if (!(v && o.isReturnStatement(v) && v.expression))
3631
3631
  return t;
3632
3632
  const E = Se(v.expression);
3633
- if (!Ti(E))
3633
+ if (!wi(E))
3634
3634
  return t;
3635
3635
  const $ = c.statements.slice(0, -1);
3636
- if ($.some(Fn))
3636
+ if ($.some(In))
3637
3637
  return t;
3638
3638
  l = $.length === 0, d = E;
3639
3639
  }
3640
- const p = o.isJsxElement(d) ? d.openingElement : d, m = Mn(p);
3640
+ const p = o.isJsxElement(d) ? d.openingElement : d, m = jn(p);
3641
3641
  if (m === -1)
3642
3642
  return t;
3643
3643
  const f = p.attributes.properties[m];
@@ -3665,14 +3665,14 @@ function qa(e, t) {
3665
3665
  )
3666
3666
  ]);
3667
3667
  }
3668
- const Ti = (e) => o.isJsxElement(e) || o.isJsxSelfClosingElement(e);
3669
- function Fn(e) {
3668
+ const wi = (e) => o.isJsxElement(e) || o.isJsxSelfClosingElement(e);
3669
+ function In(e) {
3670
3670
  if (o.isReturnStatement(e))
3671
3671
  return !0;
3672
3672
  let t = !1;
3673
3673
  return o.visitEachChild(
3674
3674
  e,
3675
- (i) => (t ||= Fn(i), i),
3675
+ (i) => (t ||= In(i), i),
3676
3676
  void 0
3677
3677
  ), t;
3678
3678
  }
@@ -3680,7 +3680,7 @@ function Ua(e, t, i, n, s) {
3680
3680
  const r = W(i);
3681
3681
  if (r === void 0)
3682
3682
  return;
3683
- let a = Nn(e.name, r);
3683
+ let a = Ln(e.name, r);
3684
3684
  const c = t.parameters.at(1);
3685
3685
  if (c !== void 0 && o.isIdentifier(c.name) && // A more basic check is also provided in lumina/no-unnecessary-key rule
3686
3686
  r.every(Ke, c.name)) {
@@ -3692,7 +3692,7 @@ function Ua(e, t, i, n, s) {
3692
3692
  return;
3693
3693
  }
3694
3694
  if (!n) {
3695
- const l = Va(r, a, t);
3695
+ const l = qa(r, a, t);
3696
3696
  if (l === void 0)
3697
3697
  return;
3698
3698
  a = l;
@@ -3722,7 +3722,7 @@ function W(e) {
3722
3722
  const t = W(e.left), i = W(e.right);
3723
3723
  return t === void 0 || i === void 0 ? void 0 : [...t, ...i];
3724
3724
  } else {
3725
- if (Ga.has(e.kind))
3725
+ if (za.has(e.kind))
3726
3726
  return [];
3727
3727
  {
3728
3728
  const t = Se(e);
@@ -3730,7 +3730,7 @@ function W(e) {
3730
3730
  }
3731
3731
  }
3732
3732
  }
3733
- const Ga = /* @__PURE__ */ new Set([
3733
+ const za = /* @__PURE__ */ new Set([
3734
3734
  o.SyntaxKind.NumericLiteral,
3735
3735
  o.SyntaxKind.BigIntLiteral,
3736
3736
  o.SyntaxKind.StringLiteral,
@@ -3739,20 +3739,20 @@ const Ga = /* @__PURE__ */ new Set([
3739
3739
  o.SyntaxKind.FalseKeyword,
3740
3740
  o.SyntaxKind.NullKeyword,
3741
3741
  o.SyntaxKind.TrueKeyword
3742
- ]), Se = (e) => o.isAsExpression(e) || o.isNonNullExpression(e) || o.isSatisfiesExpression(e) || o.isParenthesizedExpression(e) ? Se(e.expression) : e, Nn = (e, t) => o.isObjectBindingPattern(e) ? Za(e, t) : e;
3743
- function Va(e, t, i) {
3742
+ ]), Se = (e) => o.isAsExpression(e) || o.isNonNullExpression(e) || o.isSatisfiesExpression(e) || o.isParenthesizedExpression(e) ? Se(e.expression) : e, Ln = (e, t) => o.isObjectBindingPattern(e) ? Xa(e, t) : e;
3743
+ function qa(e, t, i) {
3744
3744
  if (e.every(Ke, t))
3745
3745
  return t;
3746
3746
  if (o.isIdentifier(t)) {
3747
- const n = o.isBlock(i.body) ? ye(i.body.statements, (r) => Xa(r, t)) : void 0;
3747
+ const n = o.isBlock(i.body) ? ye(i.body.statements, (r) => Ga(r, t)) : void 0;
3748
3748
  if (n === void 0)
3749
3749
  return;
3750
- const s = Nn(n, e);
3750
+ const s = Ln(n, e);
3751
3751
  if (e.every(Ke, s))
3752
3752
  return s;
3753
3753
  }
3754
3754
  }
3755
- function Xa(e, t) {
3755
+ function Ga(e, t) {
3756
3756
  if (!o.isVariableStatement(e) || !(e.declarationList.flags & o.NodeFlags.Const))
3757
3757
  return;
3758
3758
  const i = e.declarationList.declarations[0];
@@ -3760,19 +3760,19 @@ function Xa(e, t) {
3760
3760
  }
3761
3761
  function Ke(e) {
3762
3762
  const t = this;
3763
- return o.isIdentifier(t) ? t.text === e : t.elements.some(Qa, e);
3763
+ return o.isIdentifier(t) ? t.text === e : t.elements.some(Va, e);
3764
3764
  }
3765
- function Qa(e) {
3765
+ function Va(e) {
3766
3766
  const t = this;
3767
3767
  return o.isOmittedExpression(e) ? !1 : Ke.call(e.name, t);
3768
3768
  }
3769
- function Za(e, t) {
3769
+ function Xa(e, t) {
3770
3770
  let i = !1;
3771
3771
  const n = e.elements.filter((s) => o.isIdentifier(s.name) ? t.includes(s.name.text) : (i = !0, !0));
3772
3772
  return i || n.length === 0 ? e : o.factory.updateObjectBindingPattern(e, n);
3773
3773
  }
3774
- const jn = (e, t) => t.liftedKeys.has(e), Ya = (e) => e.apiJsonComponents.map(({ name: t, importPath: i }) => `import type { ${t} } from "./${i}";`).join(`
3775
- `), ec = /^[a-zA-Z_$][a-zA-Z\d_$]*$/u, Ve = (e) => !ec.test(e), Ee = (e) => Ve(e) ? `"${e}"` : e;
3774
+ const Fn = (e, t) => t.liftedKeys.has(e), Qa = (e) => e.apiJsonComponents.map(({ name: t, importPath: i }) => `import type { ${t} } from "./${i}";`).join(`
3775
+ `), Za = /^[a-zA-Z_$][a-zA-Z\d_$]*$/u, Ve = (e) => !Za.test(e), Ee = (e) => Ve(e) ? `"${e}"` : e;
3776
3776
  function Xe(e, t) {
3777
3777
  const i = [], n = [];
3778
3778
  let s = !1;
@@ -3786,31 +3786,31 @@ function Xe(e, t) {
3786
3786
  }
3787
3787
  m.docsTags?.some((y) => y.name === "required") ? i.push(p.name) : n.push(p.name);
3788
3788
  });
3789
- const r = Ei(i), a = Ei(n), c = [
3789
+ const r = bi(i), a = bi(n), c = [
3790
3790
  r ? `Required<Pick<${e}, ${r}>>` : "",
3791
3791
  a ? `Partial<Pick<${e}, ${a}>>` : "",
3792
3792
  s ? `${e}SetterTypes` : ""
3793
3793
  ], l = s ? `
3794
- type ${e}SetterTypes = ${e}["${Yi}"]` : "", d = c.filter(Boolean).join(", ");
3794
+ type ${e}SetterTypes = ${e}["${Qi}"]` : "", d = c.filter(Boolean).join(", ");
3795
3795
  return [d.length === 0 ? "" : `${d}, `, l];
3796
3796
  }
3797
- const Ei = (e) => e.map((t) => `'${t}'`).join(" | ");
3798
- function U(e, t, i) {
3797
+ const bi = (e) => e.map((t) => `'${t}'`).join(" | ");
3798
+ function q(e, t, i) {
3799
3799
  if (Je(i))
3800
- return Dn(e, i);
3801
- const n = o.isCallExpression(i) ? qa(e, i) : i, s = o.visitEachChild(
3800
+ return Nn(e, i);
3801
+ const n = o.isCallExpression(i) ? Ha(e, i) : i, s = o.visitEachChild(
3802
3802
  n,
3803
3803
  // Do not add "" if parent is binary expression to not turn {(a && <b />) || c} into {(a && <b />) || "" || c}
3804
- U.bind(null, e, t !== void 0 && o.isBinaryExpression(t) ? void 0 : i),
3804
+ q.bind(null, e, t !== void 0 && o.isBinaryExpression(t) ? void 0 : i),
3805
3805
  e.transformationContext
3806
3806
  );
3807
- return t !== void 0 && o.isBinaryExpression(i) && (o.isJsxExpression(t) || Je(Se(i.right))) ? nc(s) : s;
3807
+ return t !== void 0 && o.isBinaryExpression(i) && (o.isJsxExpression(t) || Je(Se(i.right))) ? tc(s) : s;
3808
3808
  }
3809
- function Dn(e, t) {
3810
- const i = Rn(e, t);
3809
+ function Nn(e, t) {
3810
+ const i = Dn(e, t);
3811
3811
  return Ge(i, e);
3812
3812
  }
3813
- function Rn(e, t) {
3813
+ function Dn(e, t) {
3814
3814
  const i = "children" in t ? t.children : [];
3815
3815
  if (o.isJsxFragment(t))
3816
3816
  return { key: void 0, ...Ne(i, e) };
@@ -3818,19 +3818,19 @@ function Rn(e, t) {
3818
3818
  if (o.isJsxNamespacedName(r))
3819
3819
  throw Error(`JSX namespaced elements are not supported. Found ${r.getText(e.sourceFile)} `);
3820
3820
  if (!o.isIdentifier(r) || !r.text.startsWith(r.text[0].toLowerCase()) && r.text !== tt && r.text !== it) {
3821
- const x = o.isIdentifier(r) && r.text === Nr ? Ne(i, e) : {
3821
+ const P = o.isIdentifier(r) && r.text === Lr ? Ne(i, e) : {
3822
3822
  // No need to wrap the function call in a lit-html tag
3823
3823
  litTag: void 0,
3824
- parts: [ic(e, t, r, i)]
3824
+ parts: [ec(e, t, r, i)]
3825
3825
  };
3826
3826
  return {
3827
- key: tc(s, e),
3828
- ...x
3827
+ key: Ya(s, e),
3828
+ ...P
3829
3829
  };
3830
3830
  }
3831
- const c = r.text === tt ? De : r.text === it ? ft : r.text, l = r.text === tt ? ae : r.text === it ? Z : Dr.has(c) ? $n : Ct.has(c) ? oe : ce, d = xt(c);
3831
+ const c = r.text === tt ? je : r.text === it ? ft : r.text, l = r.text === tt ? ae : r.text === it ? Z : Nr.has(c) ? En : Ct.has(c) ? oe : ce, d = Pt(c);
3832
3832
  let p;
3833
- d && e.compiler.viteCommand === "build" && (p = sc(e, c));
3833
+ d && e.compiler.viteCommand === "build" && (p = ic(e, c));
3834
3834
  let m;
3835
3835
  const f = [];
3836
3836
  let y = !1;
@@ -3840,21 +3840,21 @@ function Rn(e, t) {
3840
3840
  `JSX spread attribute syntax is not supported. See alternatives: https://qawebgis.esri.com/components/lumina/jsx#spread-attributes
3841
3841
  Found ${I.getText(e.sourceFile)}`
3842
3842
  );
3843
- const { name: x, initializer: b } = I;
3844
- if (o.isJsxNamespacedName(x))
3845
- throw Error(`JSX namespaced attributes are not supported. Found ${x.getText(e.sourceFile)}`);
3846
- const T = x.text, L = Ma(b), N = L?.propType ?? Oa(T, b, c);
3843
+ const { name: P, initializer: w } = I;
3844
+ if (o.isJsxNamespacedName(P))
3845
+ throw Error(`JSX namespaced attributes are not supported. Found ${P.getText(e.sourceFile)}`);
3846
+ const T = P.text, L = ja(w), N = L?.propType ?? Ra(T, w, c);
3847
3847
  p?.delete(T);
3848
- const j = Na[N](e, L?.initializer ?? b, T, c);
3849
- if (j.length === 0)
3848
+ const D = La[N](e, L?.initializer ?? w, T, c);
3849
+ if (D.length === 0)
3850
3850
  return [];
3851
- const M = e.compiler.shouldMinifyJsx ? [" "] : Ha(kn(x, e));
3852
- return N === "key" ? (m = typeof j[0] == "object" && !jn(x, e) ? j[0] : void 0, M.some(Wa) ? M : []) : N === "directives" || N === "ref" || T === "deferLoad" ? (y ||= N === "deferLoad", f.push(
3851
+ const M = e.compiler.shouldMinifyJsx ? [" "] : Ba(xn(P, e));
3852
+ return N === "key" ? (m = typeof D[0] == "object" && !Fn(P, e) ? D[0] : void 0, M.some(Ja) ? M : []) : N === "directives" || N === "ref" || T === "deferLoad" ? (y ||= N === "deferLoad", f.push(
3853
3853
  ...M,
3854
- ...j.flatMap(
3855
- (z, K) => typeof z == "string" || K === 0 || typeof j[K - 1] == "string" ? z : [" ", z]
3854
+ ...D.flatMap(
3855
+ (U, K) => typeof U == "string" || K === 0 || typeof D[K - 1] == "string" ? U : [" ", U]
3856
3856
  )
3857
- ), []) : [...M, ...j];
3857
+ ), []) : [...M, ...D];
3858
3858
  });
3859
3859
  if (p !== void 0 && p.size > 0 && e.compiler.logLintError(
3860
3860
  "mustIncludeAllRequiredProperties",
@@ -3865,7 +3865,7 @@ Found ${I.getText(e.sourceFile)}`
3865
3865
  `JSX syntax for MathML elements is not yet supported. If you need it, please request it. Otherwise, use the \`math\` function from Lit directly. Tried to use the "${c}" element`
3866
3866
  );
3867
3867
  d && (y ? e.customElementsToImportDeferred.add(c) : e.customElementsToImport.add(c));
3868
- const g = typeof c == "string" && jr.has(c), v = Ne(i, e);
3868
+ const g = typeof c == "string" && Fr.has(c), v = Ne(i, e);
3869
3869
  if (g && v.parts.length > 0)
3870
3870
  throw Error(
3871
3871
  `Void HTML elements like <${c}> cannot have children. Found ${t.getText(e.sourceFile)}`
@@ -3889,21 +3889,21 @@ Found ${I.getText(e.sourceFile)}`
3889
3889
  ];
3890
3890
  return { key: m, parts: $, litTag: l };
3891
3891
  }
3892
- function tc(e, t) {
3893
- const i = e.attributes.properties[Mn(e)];
3894
- return i && o.isJsxAttribute(i) && !jn(i.name, t) ? Lt(i.initializer, t.sourceFile) : void 0;
3892
+ function Ya(e, t) {
3893
+ const i = e.attributes.properties[jn(e)];
3894
+ return i && o.isJsxAttribute(i) && !Fn(i.name, t) ? Lt(i.initializer, t.sourceFile) : void 0;
3895
3895
  }
3896
- const Mn = (e) => e.attributes.properties.findIndex(({ name: t }) => t && o.isIdentifier(t) && t.text === "key");
3897
- function ic(e, t, i, n) {
3896
+ const jn = (e) => e.attributes.properties.findIndex(({ name: t }) => t && o.isIdentifier(t) && t.text === "key");
3897
+ function ec(e, t, i, n) {
3898
3898
  const r = (o.isJsxElement(t) ? t.openingElement : t).attributes.properties.map((l) => {
3899
3899
  if (o.isJsxSpreadAttribute(l))
3900
- return In(kn(l, e), o.factory.createSpreadAssignment(l.expression));
3900
+ return An(xn(l, e), o.factory.createSpreadAssignment(l.expression));
3901
3901
  const { name: d, initializer: p } = l;
3902
3902
  if (o.isJsxNamespacedName(d))
3903
3903
  throw Error(`JSX namespaced attributes are not supported. Found ${d.getText(e.sourceFile)}`);
3904
3904
  if (d.text === "key")
3905
3905
  return;
3906
- const m = p === void 0 ? o.factory.createTrue() : o.isStringLiteral(p) ? p : Je(p) ? Dn(e, p) : U(e, void 0, p.expression ?? o.factory.createIdentifier("undefined")), f = Ve(d.text) ? o.factory.createStringLiteral(d.text) : d;
3906
+ const m = p === void 0 ? o.factory.createTrue() : o.isStringLiteral(p) ? p : Je(p) ? Nn(e, p) : q(e, void 0, p.expression ?? o.factory.createIdentifier("undefined")), f = Ve(d.text) ? o.factory.createStringLiteral(d.text) : d;
3907
3907
  return o.factory.createPropertyAssignment(f, m);
3908
3908
  }), { parts: a, litTag: c } = Ne(n, e);
3909
3909
  return a.length > 0 && r.push(
@@ -3912,20 +3912,20 @@ function ic(e, t, i, n) {
3912
3912
  Ge({ key: void 0, parts: a, litTag: c }, e)
3913
3913
  )
3914
3914
  ), o.factory.createCallExpression(i, void 0, [
3915
- o.factory.createObjectLiteralExpression(r.filter(D))
3915
+ o.factory.createObjectLiteralExpression(r.filter(j))
3916
3916
  ]);
3917
3917
  }
3918
3918
  function Ne(e, t) {
3919
3919
  let i;
3920
3920
  const n = e.flatMap((s) => {
3921
3921
  if (o.isJsxText(s))
3922
- return [t.compiler.shouldMinifyJsx ? Vr(s.text) : s.text];
3922
+ return [t.compiler.shouldMinifyJsx ? qr(s.text) : s.text];
3923
3923
  if (o.isJsxExpression(s))
3924
3924
  return Nt(t, s, s);
3925
3925
  {
3926
- const r = Rn(t, s);
3926
+ const r = Dn(t, s);
3927
3927
  if (r.key === void 0 && r.litTag !== ae && r.litTag !== Z) {
3928
- if (r.litTag === $n)
3928
+ if (r.litTag === En)
3929
3929
  return r.parts;
3930
3930
  if (i !== void 0 && r.litTag !== void 0 && i !== r.litTag)
3931
3931
  throw new Error(
@@ -3938,7 +3938,7 @@ function Ne(e, t) {
3938
3938
  });
3939
3939
  return { litTag: i, parts: n };
3940
3940
  }
3941
- function nc(e) {
3941
+ function tc(e) {
3942
3942
  return e.operatorToken.kind === o.SyntaxKind.AmpersandAmpersandToken ? o.factory.createBinaryExpression(
3943
3943
  e,
3944
3944
  o.factory.createToken(o.SyntaxKind.BarBarToken),
@@ -3950,9 +3950,9 @@ function Nt(e, t, i) {
3950
3950
  if (e.compiler.shouldMinifyJsx)
3951
3951
  return [];
3952
3952
  const n = t.getText(e.sourceFile).slice(1, -1);
3953
- return Ft(n).length === 0 ? [] : [In(n, o.factory.createIdentifier("undefined"))];
3953
+ return Ft(n).length === 0 ? [] : [An(n, o.factory.createIdentifier("undefined"))];
3954
3954
  }
3955
- return o.isStringLiteral(t.expression) ? [on(t.expression.text)] : (
3955
+ return o.isStringLiteral(t.expression) ? [sn(t.expression.text)] : (
3956
3956
  /**
3957
3957
  * There is a bug in Chrome DevTools, where it won't let you set a
3958
3958
  * breakpoint inside a tagged template literal. It seems like they did
@@ -3973,7 +3973,7 @@ function Nt(e, t, i) {
3973
3973
  * making this change useless.
3974
3974
  */
3975
3975
  e.compiler.viteCommand === "serve" && e.compiler.typeScriptConfig.sourceMap && !e.compiler.shouldMinifyJsx && o.isArrowFunction(t.expression) && !o.isBlock(t.expression.body) ? [
3976
- U(
3976
+ q(
3977
3977
  e,
3978
3978
  i,
3979
3979
  o.factory.updateArrowFunction(
@@ -3986,10 +3986,10 @@ function Nt(e, t, i) {
3986
3986
  o.factory.createBlock([o.factory.createReturnStatement(t.expression.body)], !0)
3987
3987
  )
3988
3988
  )
3989
- ] : [U(e, i, t.expression)]
3989
+ ] : [q(e, i, t.expression)]
3990
3990
  );
3991
3991
  }
3992
- function sc(e, t) {
3992
+ function ic(e, t) {
3993
3993
  if (t in e.localComponents)
3994
3994
  for (const n of e.compiler.privateApiJson.modules)
3995
3995
  for (const s of n.declarations) {
@@ -4001,7 +4001,7 @@ function sc(e, t) {
4001
4001
  return r;
4002
4002
  }
4003
4003
  }
4004
- const On = (e) => e.reduce((t, [i, n]) => (t[i] ??= [], t[i].push(n), t), {}), be = {
4004
+ const Rn = (e) => e.reduce((t, [i, n]) => (t[i] ??= [], t[i].push(n), t), {}), we = {
4005
4005
  [ce]: ["lit-html", "lit/html.js", "lit"],
4006
4006
  /**
4007
4007
  * Sadly, Lit called these "html" and "svg", rather than "staticHtml" and
@@ -4012,8 +4012,8 @@ const On = (e) => e.reduce((t, [i, n]) => (t[i] ??= [], t[i].push(n), t), {}), b
4012
4012
  [ae]: ["lit-html/static.js", "lit/static-html.js"],
4013
4013
  [oe]: ["lit-html", "lit/html.js", "lit"],
4014
4014
  [Z]: ["lit-html/static.js", "lit/static-html.js"],
4015
- [Pn]: ["lit-html", "lit/html.js", "lit"],
4016
- [xn]: ["@lit/reactive-element/css-tag.js", "@lit/reactive-element", "lit"],
4015
+ [$n]: ["lit-html", "lit/html.js", "lit"],
4016
+ [Cn]: ["@lit/reactive-element/css-tag.js", "@lit/reactive-element", "lit"],
4017
4017
  safeClassMap: ["@arcgis/lumina"],
4018
4018
  safeStyleMap: ["@arcgis/lumina"],
4019
4019
  deferLoad: ["@arcgis/lumina"],
@@ -4022,14 +4022,14 @@ const On = (e) => e.reduce((t, [i, n]) => (t[i] ??= [], t[i].push(n), t), {}), b
4022
4022
  repeat: ["lit-html/directives/repeat.js", "lit/directives/repeat.js"],
4023
4023
  ref: ["lit-html/directives/ref.js", "lit/directives/ref.js"],
4024
4024
  nothing: ["lit-html", "lit/html.js", "lit-element/lit-element.js", "lit", "@arcgis/lumina"]
4025
- }, Jn = On(
4026
- Object.entries(be).flatMap(([e, t]) => t.map((i) => [i, e]))
4027
- ), jt = new Set(Object.keys(Jn));
4028
- function rc(e, t) {
4025
+ }, Mn = Rn(
4026
+ Object.entries(we).flatMap(([e, t]) => t.map((i) => [i, e]))
4027
+ ), Dt = new Set(Object.keys(Mn));
4028
+ function nc(e, t) {
4029
4029
  const i = t.importClause, n = t.moduleSpecifier;
4030
4030
  if (!o.isStringLiteral(n))
4031
4031
  return t;
4032
- const s = oc(e.sourceFile.fileName, n.text, ""), r = !i?.isTypeOnly;
4032
+ const s = sc(e.sourceFile.fileName, n.text, ""), r = !i?.isTypeOnly;
4033
4033
  if (r && e.existingImportedModules.add(s), i === void 0)
4034
4034
  return t;
4035
4035
  if (e.isInLightDomComponent && n.text.startsWith(".") && Me.test(n.text) && // If id already includes ?, bypass our custom behavior
@@ -4048,12 +4048,12 @@ function rc(e, t) {
4048
4048
  const a = i.namedBindings;
4049
4049
  if (a === void 0 || !o.isNamedImports(a))
4050
4050
  return t;
4051
- const c = jt.has(n.text);
4051
+ const c = Dt.has(n.text);
4052
4052
  return a.elements.forEach((l) => {
4053
- const d = (l.propertyName ?? l.name).text, p = be[d];
4053
+ const d = (l.propertyName ?? l.name).text, p = we[d];
4054
4054
  if (c) {
4055
4055
  if (p?.some((y) => y === n.text)) {
4056
- const y = Kn(d, s);
4056
+ const y = On(d, s);
4057
4057
  e.existingLitImports.add(y), e.importRenames[y] = l.name?.text ?? y;
4058
4058
  }
4059
4059
  } else (l.name.text === "h" || l.name.text === "createElement") && (e.hasNonLuminaJsxImport = !0);
@@ -4061,22 +4061,22 @@ function rc(e, t) {
4061
4061
  r && !l.isTypeOnly && m && f && e.importedFunctionComponentsFromModules.add(s);
4062
4062
  }), t;
4063
4063
  }
4064
- const Kn = (e, t) => e === ce && be.staticHtml.includes(t) ? ae : e === oe && be.staticSvg.includes(t) ? Z : e, oc = (e, t, i) => t.startsWith(".") ? u.resolve(e, "..", `${t}${i}`) : t;
4065
- function ac(e) {
4066
- return o.isImportDeclaration(e) ? cc(this, e) : e;
4064
+ const On = (e, t) => e === ce && we.staticHtml.includes(t) ? ae : e === oe && we.staticSvg.includes(t) ? Z : e, sc = (e, t, i) => t.startsWith(".") ? u.resolve(e, "..", `${t}${i}`) : t;
4065
+ function rc(e) {
4066
+ return o.isImportDeclaration(e) ? oc(this, e) : e;
4067
4067
  }
4068
- function cc(e, t) {
4068
+ function oc(e, t) {
4069
4069
  const i = t.importClause, n = i?.namedBindings, s = t.moduleSpecifier;
4070
- if (!o.isStringLiteral(s) || !n || !o.isNamedImports(n) || !jt.has(s.text))
4070
+ if (!o.isStringLiteral(s) || !n || !o.isNamedImports(n) || !Dt.has(s.text))
4071
4071
  return t;
4072
4072
  const r = i.isTypeOnly;
4073
4073
  let a = !1;
4074
4074
  const c = n.elements.map((l) => {
4075
- const d = (l.propertyName ?? l.name).text, p = Kn(d, s.text);
4075
+ const d = (l.propertyName ?? l.name).text, p = On(d, s.text);
4076
4076
  return e.existingLitImports.delete(p), e.neededImports.has(p) ? (e.neededImports.delete(p), a = !0, o.factory.updateImportSpecifier(l, !1, l.propertyName, l.name)) : r ? o.factory.updateImportSpecifier(l, !0, l.propertyName, l.name) : l;
4077
4077
  });
4078
- return Jn[s.text]?.forEach((l) => {
4079
- !e.neededImports.has(l) || e.existingLitImports.has(l) || (e.neededImports.delete(l), a = !0, c.push(Wn(l, e)));
4078
+ return Mn[s.text]?.forEach((l) => {
4079
+ !e.neededImports.has(l) || e.existingLitImports.has(l) || (e.neededImports.delete(l), a = !0, c.push(Jn(l, e)));
4080
4080
  }), a ? o.factory.updateImportDeclaration(
4081
4081
  t,
4082
4082
  t.modifiers,
@@ -4090,8 +4090,8 @@ function cc(e, t) {
4090
4090
  t.attributes
4091
4091
  ) : t;
4092
4092
  }
4093
- function lc(e) {
4094
- const t = On(Array.from(e.neededImports, (i) => [be[i][0], i]));
4093
+ function ac(e) {
4094
+ const t = Rn(Array.from(e.neededImports, (i) => [we[i][0], i]));
4095
4095
  return Object.entries(t).map(
4096
4096
  ([i, n]) => o.factory.createImportDeclaration(
4097
4097
  void 0,
@@ -4099,14 +4099,14 @@ function lc(e) {
4099
4099
  !1,
4100
4100
  void 0,
4101
4101
  o.factory.createNamedImports(
4102
- n.map((s) => (e.neededImports.delete(s), Wn(s, e)))
4102
+ n.map((s) => (e.neededImports.delete(s), Jn(s, e)))
4103
4103
  )
4104
4104
  ),
4105
4105
  o.factory.createStringLiteral(i)
4106
4106
  )
4107
4107
  );
4108
4108
  }
4109
- function Wn(e, t) {
4109
+ function Jn(e, t) {
4110
4110
  const i = e === ae ? ce : e === Z ? oe : e, n = t.importRenames[e];
4111
4111
  return n === i ? o.factory.createImportSpecifier(!1, void 0, o.factory.createIdentifier(i)) : o.factory.createImportSpecifier(
4112
4112
  !1,
@@ -4114,12 +4114,12 @@ function Wn(e, t) {
4114
4114
  o.factory.createIdentifier(n)
4115
4115
  );
4116
4116
  }
4117
- function dc(e) {
4118
- const t = fa().map(({ packageName: i }) => i);
4117
+ function cc(e) {
4118
+ const t = ua().map(({ packageName: i }) => i);
4119
4119
  return e.existingImportedModules.forEach((i) => {
4120
4120
  if (u.isAbsolute(i))
4121
4121
  return;
4122
- const { packageName: n, moduleName: s } = un(i);
4122
+ const { packageName: n, moduleName: s } = dn(i);
4123
4123
  if (t.includes(n ?? "") && (s.startsWith("dist/components") || s.startsWith("components"))) {
4124
4124
  const r = Y(e.sourceFile.fileName);
4125
4125
  throw new Error(
@@ -4128,7 +4128,7 @@ function dc(e) {
4128
4128
  }
4129
4129
  }), [];
4130
4130
  }
4131
- function pc(e) {
4131
+ function lc(e) {
4132
4132
  if (e.compiler.viteCommand === "serve")
4133
4133
  return e.customElementsToImport.clear(), e.customElementsToImportDeferred.clear(), [];
4134
4134
  const t = e.compiler._customElementDependencies;
@@ -4143,12 +4143,12 @@ function pc(e) {
4143
4143
  t[n] ??= { referencedBy: [], referencedTagNames: [], referencedDeferredTagNames: [] }, t[n].referencedBy.push(e.sourceFile.fileName);
4144
4144
  }), [];
4145
4145
  }
4146
- function uc(e, t, i) {
4147
- const n = Tn()[t] ?? Bn(e)[t];
4146
+ function dc(e, t, i) {
4147
+ const n = wn()[t] ?? Kn(e)[t];
4148
4148
  if (n === void 0) {
4149
4149
  const s = Y(i);
4150
4150
  throw Error(
4151
- w(
4151
+ b(
4152
4152
  "@arcgis/lumina:resolveTagName",
4153
4153
  `Unable to resolve the definition of the "${t}" custom element. Used in ${s}. If this is coming from an external package, make sure that package is installed as a peerDependency or a dependency. If in development-only you wish to use a component package that is defined as a devDependency, then provide serve.extraDependencies option to useLumina()`
4154
4154
  )
@@ -4156,28 +4156,28 @@ function uc(e, t, i) {
4156
4156
  }
4157
4157
  return n;
4158
4158
  }
4159
- function mc(e, t) {
4159
+ function pc(e, t) {
4160
4160
  return e.packageName === void 0 ? ee(t, e.moduleName) : u.join(e.packageName, e.moduleName);
4161
4161
  }
4162
- function Bn(e) {
4163
- return e._localDefinedComponents ??= Cn(e.privateApiJson, {
4162
+ function Kn(e) {
4163
+ return e._localDefinedComponents ??= Tn(e.privateApiJson, {
4164
4164
  packageName: void 0,
4165
4165
  getImportPath() {
4166
4166
  throw new Error("Not supposed to be called for local components");
4167
4167
  }
4168
4168
  }), e._localDefinedComponents;
4169
4169
  }
4170
- const fc = (e, t) => {
4170
+ const uc = (e, t) => {
4171
4171
  const i = e.pragmas;
4172
4172
  if (i?.has("jsx") === !0 || i?.has("jsxImportSource") === !0)
4173
4173
  return e.statements;
4174
4174
  const n = {
4175
4175
  compiler: t.compiler,
4176
- externalComponents: Tn(),
4177
- localComponents: t.compiler.isInPuppeteerTestBackEnd ? {} : Bn(t.compiler),
4176
+ externalComponents: wn(),
4177
+ localComponents: t.compiler.isInPuppeteerTestBackEnd ? {} : Kn(t.compiler),
4178
4178
  sourceFile: e,
4179
4179
  transformationContext: t.transformation,
4180
- importRenames: yc(e),
4180
+ importRenames: mc(e),
4181
4181
  existingImportedModules: /* @__PURE__ */ new Set(),
4182
4182
  importedFunctionComponentsFromModules: /* @__PURE__ */ new Set(),
4183
4183
  existingLitImports: /* @__PURE__ */ new Set(),
@@ -4193,18 +4193,18 @@ const fc = (e, t) => {
4193
4193
  let s = [];
4194
4194
  if (e.statements.every((a) => {
4195
4195
  if (o.isImportDeclaration(a)) {
4196
- if (s.push(rc(n, a)), n.hasNonLuminaJsxImport)
4196
+ if (s.push(nc(n, a)), n.hasNonLuminaJsxImport)
4197
4197
  return !1;
4198
4198
  } else
4199
- s.push(U(n, void 0, a));
4199
+ s.push(q(n, void 0, a));
4200
4200
  return !0;
4201
4201
  }), n.hasNonLuminaJsxImport)
4202
4202
  return e.statements;
4203
- if (n.neededImports.size > 0 && (s = s.map(ac, n), n.existingLitImports.size > 0))
4203
+ if (n.neededImports.size > 0 && (s = s.map(rc, n), n.existingLitImports.size > 0))
4204
4204
  throw new Error(
4205
4205
  `Expected context.existingLitImports to be empty by now. Found: ${Array.from(n.existingLitImports).join(", ")}`
4206
4206
  );
4207
- const r = [lc, dc, pc].flatMap(
4207
+ const r = [ac, cc, lc].flatMap(
4208
4208
  (a) => a(n)
4209
4209
  );
4210
4210
  if (n.neededImports.size > 0)
@@ -4213,18 +4213,18 @@ const fc = (e, t) => {
4213
4213
  );
4214
4214
  return [...r, ...s];
4215
4215
  };
4216
- function yc(e) {
4217
- return hc(e), Object.fromEntries(
4218
- Ia.map((t) => [t, e.identifiers.has(t) ? `${t}$jsx` : t])
4216
+ function mc(e) {
4217
+ return fc(e), Object.fromEntries(
4218
+ Aa.map((t) => [t, e.identifiers.has(t) ? `${t}$jsx` : t])
4219
4219
  );
4220
4220
  }
4221
- function hc(e) {
4221
+ function fc(e) {
4222
4222
  if (!("identifiers" in e))
4223
4223
  throw new Error(
4224
4224
  "Expected sourceFile to have an undocumented identifiers property that is a Map<string,string>. If this error is thrown, it may mean Lumina Compiler needs to be updated to support the version of TypeScript being used."
4225
4225
  );
4226
4226
  }
4227
- function gc(e, t, i) {
4227
+ function yc(e, t, i) {
4228
4228
  return t.size === 0 ? e : [
4229
4229
  o.factory.createPropertyDeclaration(
4230
4230
  [
@@ -4238,7 +4238,7 @@ function gc(e, t, i) {
4238
4238
  Array.from(t.entries()).map(
4239
4239
  ([n, s]) => o.factory.createPropertyAssignment(
4240
4240
  Ve(n) ? o.factory.createStringLiteral(n) : n,
4241
- vc(s, i)
4241
+ hc(s, i)
4242
4242
  )
4243
4243
  )
4244
4244
  )
@@ -4246,7 +4246,7 @@ function gc(e, t, i) {
4246
4246
  ...e
4247
4247
  ];
4248
4248
  }
4249
- function vc(e, t) {
4249
+ function hc(e, t) {
4250
4250
  let i = 0, n = !0;
4251
4251
  const s = [], r = [];
4252
4252
  for (const l of e.properties)
@@ -4256,24 +4256,24 @@ function vc(e, t) {
4256
4256
  return !0;
4257
4257
  const d = l.name.text, p = l.initializer, m = p.kind === o.SyntaxKind.TrueKeyword, f = p.kind === o.SyntaxKind.FalseKeyword;
4258
4258
  if (d === "attribute")
4259
- return n = !1, i |= m ? zt : 0, !m && !f;
4259
+ return n = !1, i |= m ? Ut : 0, !m && !f;
4260
4260
  if (d === "reflect")
4261
- return i |= m ? Fs : 0, !1;
4261
+ return i |= m ? Is : 0, !1;
4262
4262
  if (d === "type" && o.isIdentifier(p)) {
4263
4263
  if (p.text === "Boolean")
4264
- return i |= Ns, !1;
4264
+ return i |= Ls, !1;
4265
4265
  if (p.text === "Number")
4266
- return i |= js, !1;
4266
+ return i |= Fs, !1;
4267
4267
  } else {
4268
4268
  if (d === "state")
4269
- return n = !1, i |= m ? Ds : 0, !1;
4269
+ return n = !1, i |= m ? Ns : 0, !1;
4270
4270
  if (d === "readOnly")
4271
- return i |= m ? Rs : 0, !1;
4272
- d === "noAccessor" && (i |= m ? Ms : 0);
4271
+ return i |= m ? Ds : 0, !1;
4272
+ d === "noAccessor" && (i |= m ? js : 0);
4273
4273
  }
4274
4274
  return !0;
4275
4275
  }
4276
- n && (i |= zt);
4276
+ n && (i |= Ut);
4277
4277
  const c = o.factory.createNumericLiteral(i);
4278
4278
  return s.length === 0 && (t || r.length === 0) ? c : o.factory.createArrayLiteralExpression([
4279
4279
  c,
@@ -4288,7 +4288,7 @@ function vc(e, t) {
4288
4288
  ...t ? [] : [o.factory.createObjectLiteralExpression(r)]
4289
4289
  ]);
4290
4290
  }
4291
- function Sc(e, t, i, n, s) {
4291
+ function gc(e, t, i, n, s) {
4292
4292
  let r = -1, a = -1, c = -1;
4293
4293
  t.options?.properties.forEach((f, y) => {
4294
4294
  if (o.isSpreadAssignment(f))
@@ -4300,23 +4300,23 @@ function Sc(e, t, i, n, s) {
4300
4300
  h === "type" ? r = y : h === "attribute" ? a = y : h === "readOnly" && (c = y);
4301
4301
  }
4302
4302
  });
4303
- const l = s.attribute === void 0 && a === -1, d = s.readonly === !0 && s.docsOnlyReadonly !== !0 && c === -1, p = bc(e, t, i, s, r), m = [
4303
+ const l = s.attribute === void 0 && a === -1, d = s.readonly === !0 && s.docsOnlyReadonly !== !0 && c === -1, p = vc(e, t, i, s, r), m = [
4304
4304
  ...l ? [o.factory.createPropertyAssignment("attribute", o.factory.createFalse())] : [],
4305
4305
  ...d ? [o.factory.createPropertyAssignment("readOnly", o.factory.createTrue())] : [],
4306
4306
  ...p !== void 0 ? [p] : []
4307
4307
  ];
4308
4308
  return m.length > 0 ? t.options === void 0 ? o.factory.createObjectLiteralExpression(m, !1) : o.factory.updateObjectLiteralExpression(t.options, [...t.options.properties, ...m]) : t.options;
4309
4309
  }
4310
- function bc(e, t, i, n, s) {
4310
+ function vc(e, t, i, n, s) {
4311
4311
  if (n.attribute === void 0)
4312
4312
  return;
4313
- const r = Tc(e), a = i.compiler.viteCommand === "serve" || r !== "Other" ? r : wc(n.type.values);
4313
+ const r = wc(e), a = i.compiler.viteCommand === "serve" || r !== "Other" ? r : Sc(n.type.values);
4314
4314
  return a === "Other" || n.readonly && (a !== "Boolean" || !n.reflects) || t.options?.properties[s] !== void 0 ? void 0 : o.factory.createPropertyAssignment(
4315
4315
  o.factory.createIdentifier("type"),
4316
4316
  o.factory.createIdentifier(a)
4317
4317
  );
4318
4318
  }
4319
- function wc(e) {
4319
+ function Sc(e) {
4320
4320
  let t = !1, i = !1, n = !1;
4321
4321
  if (e?.forEach((s) => {
4322
4322
  t ||= s.type === "number", i ||= s.type === "boolean", n ||= s.type === "string" || s.type === "any" || s.type === "unknown";
@@ -4328,7 +4328,7 @@ function wc(e) {
4328
4328
  }
4329
4329
  return "Other";
4330
4330
  }
4331
- function Tc(e) {
4331
+ function wc(e) {
4332
4332
  const t = e.type ?? (o.isSetAccessor(e) ? e.parameters[0].type : void 0);
4333
4333
  if (t === void 0) {
4334
4334
  if ("initializer" in e && e.initializer !== void 0) {
@@ -4345,7 +4345,7 @@ function Tc(e) {
4345
4345
  }
4346
4346
  return "Other";
4347
4347
  }
4348
- function Ec(e, t, i, n, s) {
4348
+ function bc(e, t, i, n, s) {
4349
4349
  if (t.modifiers === void 0)
4350
4350
  return t;
4351
4351
  let r = -1, a = -1;
@@ -4355,18 +4355,18 @@ function Ec(e, t, i, n, s) {
4355
4355
  d === "property" && (r = l), d === "state" && (a = l);
4356
4356
  }
4357
4357
  }), r !== -1) {
4358
- const c = Cc(e, t, i, n), l = Ci(t, r, n), d = Sc(t, l, e, n, c);
4358
+ const c = Tc(e, t, i, n), l = Ti(t, r, n), d = gc(t, l, e, n, c);
4359
4359
  let p = !1;
4360
- return s.set(c.name, d ?? o.factory.createObjectLiteralExpression()), p = !0, l.options = d, $i(t, l, r, p);
4360
+ return s.set(c.name, d ?? o.factory.createObjectLiteralExpression()), p = !0, l.options = d, Ei(t, l, r, p);
4361
4361
  } else if (a !== -1) {
4362
- const c = Ci(t, a, n), l = o.factory.createPropertyAssignment("state", o.factory.createTrue()), d = c.options === void 0 ? o.factory.createObjectLiteralExpression([l]) : o.factory.updateObjectLiteralExpression(c.options, [...c.options.properties, l]), p = X(t.name);
4362
+ const c = Ti(t, a, n), l = o.factory.createPropertyAssignment("state", o.factory.createTrue()), d = c.options === void 0 ? o.factory.createObjectLiteralExpression([l]) : o.factory.updateObjectLiteralExpression(c.options, [...c.options.properties, l]), p = X(t.name);
4363
4363
  if (p === void 0)
4364
4364
  throw new Error("Failed to statically determine the state property name");
4365
- return s.set(p, d), $i(t, c, a, !0);
4365
+ return s.set(p, d), Ei(t, c, a, !0);
4366
4366
  } else
4367
4367
  return t;
4368
4368
  }
4369
- function Cc(e, t, i, n) {
4369
+ function Tc(e, t, i, n) {
4370
4370
  const s = e.apiModule?.declarations.find(
4371
4371
  (a) => a.name === i
4372
4372
  ) ?? (e.compiler.isInTest ? {
@@ -4374,7 +4374,7 @@ function Cc(e, t, i, n) {
4374
4374
  } : void 0);
4375
4375
  if (s === void 0)
4376
4376
  throw Error(`Failed to find API component for ${i} in ${n.fileName}`);
4377
- const r = lr(s, t) ?? (e.compiler.isInTest ? { kind: "field", attribute: "", readonly: !1, name: "", type: { text: "" } } : void 0);
4377
+ const r = ar(s, t) ?? (e.compiler.isInTest ? { kind: "field", attribute: "", readonly: !1, name: "", type: { text: "" } } : void 0);
4378
4378
  if (r === void 0 || r.kind !== "field")
4379
4379
  throw Error(
4380
4380
  `Failed to find API property for ${t.getText(n)} in ${i} in ${n.fileName}`
@@ -4385,11 +4385,11 @@ function Cc(e, t, i, n) {
4385
4385
  throw Error(
4386
4386
  `Failed to statically determine the property name: ${t.getText(n)} in ${i} in ${n.fileName}`
4387
4387
  );
4388
- r.name = a, r.attribute ??= wt(a);
4388
+ r.name = a, r.attribute ??= bt(a);
4389
4389
  }
4390
4390
  return r;
4391
4391
  }
4392
- function Ci(e, t, i) {
4392
+ function Ti(e, t, i) {
4393
4393
  const n = e.modifiers[t], s = n.expression, r = s.arguments.at(0);
4394
4394
  if (r && !o.isObjectLiteralExpression(r))
4395
4395
  throw new Error(
@@ -4397,7 +4397,7 @@ function Ci(e, t, i) {
4397
4397
  );
4398
4398
  return { decorator: n, callExpression: s, options: r };
4399
4399
  }
4400
- function $i(e, t, i, n) {
4400
+ function Ei(e, t, i, n) {
4401
4401
  const s = n ? void 0 : o.factory.updateDecorator(
4402
4402
  t.decorator,
4403
4403
  o.factory.updateCallExpression(
@@ -4433,23 +4433,23 @@ function $i(e, t, i, n) {
4433
4433
  e.initializer
4434
4434
  );
4435
4435
  }
4436
- const $c = (e, t) => {
4436
+ const Ec = (e, t) => {
4437
4437
  if (t.apiModule === void 0 && !t.compiler.isInTest)
4438
4438
  return e.statements;
4439
4439
  let i;
4440
4440
  function n() {
4441
4441
  i = /* @__PURE__ */ new Map();
4442
4442
  }
4443
- const s = (c) => gc(c, i, t.compiler.shouldMinify);
4443
+ const s = (c) => yc(c, i, t.compiler.shouldMinify);
4444
4444
  function r(c, l) {
4445
- const d = Pc(t, c, l, e, i);
4445
+ const d = $c(t, c, l, e, i);
4446
4446
  return t.compiler.viteCommand === "build" && o.setEmitFlags(d, o.EmitFlags.NoComments), d;
4447
4447
  }
4448
4448
  return e.statements.map(
4449
- (c) => _n(r, c, t, n, s)
4449
+ (c) => Wn(r, c, t, n, s)
4450
4450
  );
4451
4451
  };
4452
- function _n(e, t, i, n, s = Hi) {
4452
+ function Wn(e, t, i, n, s = Bi) {
4453
4453
  if (o.isClassDeclaration(t) && // Ignore classes that don't extend anything - those are definitely not components
4454
4454
  t.heritageClauses?.some((r) => r.token === o.SyntaxKind.ExtendsKeyword)) {
4455
4455
  let r = !1;
@@ -4472,15 +4472,15 @@ function _n(e, t, i, n, s = Hi) {
4472
4472
  } else
4473
4473
  return i.compiler.isInTest ? o.visitEachChild(
4474
4474
  t,
4475
- (a) => _n(e, a, i, n, s),
4475
+ (a) => Wn(e, a, i, n, s),
4476
4476
  i.transformation
4477
4477
  ) : t;
4478
4478
  }
4479
- const xc = /* @__PURE__ */ new Set(["connectedCallback", "disconnectedCallback"]);
4480
- function Pc(e, t, i, n, s) {
4479
+ const Cc = /* @__PURE__ */ new Set(["connectedCallback", "disconnectedCallback"]);
4480
+ function $c(e, t, i, n, s) {
4481
4481
  if (o.isMethodDeclaration(t)) {
4482
4482
  const r = t.modifiers?.filter(
4483
- (a) => !o.isDecorator(a) || !Ac(a)
4483
+ (a) => !o.isDecorator(a) || !Pc(a)
4484
4484
  );
4485
4485
  if (r?.length !== t.modifiers?.length)
4486
4486
  return o.factory.updateMethodDeclaration(
@@ -4494,7 +4494,7 @@ function Pc(e, t, i, n, s) {
4494
4494
  t.type,
4495
4495
  t.body
4496
4496
  );
4497
- if ("text" in t.name && xc.has(t.name.text) && t.body) {
4497
+ if ("text" in t.name && Cc.has(t.name.text) && t.body) {
4498
4498
  const a = t.name.text;
4499
4499
  return t.body.statements.some(
4500
4500
  (l) => o.isExpressionStatement(l) && o.isCallExpression(l.expression) && o.isPropertyAccessExpression(l.expression.expression) && l.expression.expression.expression.kind === o.SyntaxKind.SuperKeyword && l.expression.expression.name.text === a
@@ -4520,16 +4520,16 @@ function Pc(e, t, i, n, s) {
4520
4520
  );
4521
4521
  }
4522
4522
  }
4523
- return o.isPropertyDeclaration(t) || o.isAccessor(t) ? Ec(e, t, i, n, s) : t;
4523
+ return o.isPropertyDeclaration(t) || o.isAccessor(t) ? bc(e, t, i, n, s) : t;
4524
4524
  }
4525
- const Ac = (e) => o.isCallExpression(e.expression) && o.isIdentifier(e.expression.expression) && e.expression.expression.text === "method", vt = "@arcgis/core", ct = R(), Qe = vt in (ct.dependencies ?? {}) || vt in (ct.peerDependencies ?? {}) || // Does not depend on `@arcgis/core` to avoid cycle, but uses core in Lumina tests
4525
+ const Pc = (e) => o.isCallExpression(e.expression) && o.isIdentifier(e.expression.expression) && e.expression.expression.text === "method", vt = "@arcgis/core", ct = R(), Qe = vt in (ct.dependencies ?? {}) || vt in (ct.peerDependencies ?? {}) || // Does not depend on `@arcgis/core` to avoid cycle, but uses core in Lumina tests
4526
4526
  ct.name === "@arcgis/lumina";
4527
- async function kc(e, t) {
4527
+ async function xc(e, t) {
4528
4528
  if (!Qe)
4529
4529
  return [];
4530
4530
  const i = await Be(vt);
4531
4531
  if (t === "cdn") {
4532
- const n = await _e(i), s = Ue({ name: "", version: n.version }, !0);
4532
+ const n = await _e(i), s = qe({ name: "", version: n.version }, !0);
4533
4533
  return [
4534
4534
  // Use the ESM CDN
4535
4535
  // <script src="https://jsdev.arcgis.com/VERSION/"><\/script>
@@ -4545,22 +4545,22 @@ async function kc(e, t) {
4545
4545
  })
4546
4546
  },
4547
4547
  // <link rel="stylesheet" id="arcgisCoreStylesheet" href="https://jsdev.arcgis.com/VERSION/esri/themes/light/main.css" />
4548
- xi(s)
4548
+ Ci(s)
4549
4549
  ];
4550
4550
  } else
4551
- return [xi(It(e, `${i}/assets/`))];
4551
+ return [Ci(It(e, `${i}/assets/`))];
4552
4552
  }
4553
- const xi = (e) => ({
4553
+ const Ci = (e) => ({
4554
4554
  // Not using join() because it would turn https:// into https:/
4555
4555
  cssHref: `${e}esri/themes/light/main.css`,
4556
4556
  // This is used be the theme switcher in `@arcgis/storybook-utils`
4557
4557
  id: "arcgisCoreStylesheet"
4558
- }), Pi = "makeRuntime(", Ic = "@arcgis/core";
4559
- function Lc(e, t) {
4560
- const i = e.indexOf(Pi);
4558
+ }), $i = "makeRuntime(", Ac = "@arcgis/core";
4559
+ function kc(e, t) {
4560
+ const i = e.indexOf($i);
4561
4561
  if (i === -1)
4562
4562
  throw new Error("Failed to find makeRuntime() function call in src/runtime.ts");
4563
- const n = i + Pi.length, s = t.options.css?.commonStylesPath;
4563
+ const n = i + $i.length, s = t.options.css?.commonStylesPath;
4564
4564
  return {
4565
4565
  code: [
4566
4566
  s === void 0 ? "" : `import commonStyles from "${ee(t.dir.src, s)}";`,
@@ -4568,25 +4568,25 @@ function Lc(e, t) {
4568
4568
  "{",
4569
4569
  "defaultAssetPath:import.meta.env.BASE_URL,",
4570
4570
  'hydratedAttribute:"',
4571
- t.options.css?.hydratedAttribute ?? hn,
4571
+ t.options.css?.hydratedAttribute ?? fn,
4572
4572
  '",',
4573
4573
  s === void 0 ? "" : "commonStyles",
4574
4574
  "}",
4575
4575
  e.slice(n),
4576
4576
  Qe ? `
4577
- import {createObservable,trackAccess} from "${Ic}/applications/Components/reactiveUtils.js";
4577
+ import {createObservable,trackAccess} from "${Ac}/applications/Components/reactiveUtils.js";
4578
4578
  runtime.t = trackAccess;
4579
4579
  runtime.o = createObservable;` : ""
4580
4580
  ].join(""),
4581
4581
  map: null
4582
4582
  };
4583
4583
  }
4584
- const Fc = [
4585
- fc,
4586
- Zs,
4587
- $c
4588
- ], Ai = "@arcgis/lumina:transformComponents", Nc = (e) => ({
4589
- name: Ai,
4584
+ const Ic = [
4585
+ uc,
4586
+ Xs,
4587
+ Ec
4588
+ ], Pi = "@arcgis/lumina:transformComponents", Lc = (e) => ({
4589
+ name: Pi,
4590
4590
  transform: {
4591
4591
  // Transform JSX to lit-html first so that vite:esbuild doesn't transform JSX to h().
4592
4592
  order: "pre",
@@ -4594,20 +4594,20 @@ const Fc = [
4594
4594
  if (!i.endsWith(".tsx")) {
4595
4595
  if (e.isInTest && i.endsWith(".ts") && Et(i) && t.includes("extends LitElement"))
4596
4596
  C.warn(
4597
- Ai,
4597
+ Pi,
4598
4598
  "It looks like you may be trying to define a component inside a test file. This is supported, but you must use the .tsx file extension for you test",
4599
4599
  i
4600
4600
  );
4601
4601
  else if (i === `${e.dir.src}runtime.ts`)
4602
- return Lc(t, e);
4602
+ return kc(t, e);
4603
4603
  return;
4604
4604
  }
4605
4605
  const n = e.getSourceFile(i, t);
4606
4606
  await ve;
4607
4607
  const r = o.transform(n, [
4608
- (f) => () => Qi(e, f, n, [
4608
+ (f) => () => Vi(e, f, n, [
4609
4609
  ...e.options.types?.sourceFileTransformers ?? [],
4610
- ...Fc
4610
+ ...Ic
4611
4611
  ])
4612
4612
  ]).transformed[0], a = e._compilerOptionsForPrinter, c = e._typeScriptPrinter, l = a.sourceMap ? me.createSourceMapGenerator(
4613
4613
  e.typeScriptHost,
@@ -4625,7 +4625,7 @@ const Fc = [
4625
4625
  }
4626
4626
  }
4627
4627
  });
4628
- function jc(e) {
4628
+ function Fc(e) {
4629
4629
  const t = e.typeScriptConfig;
4630
4630
  return {
4631
4631
  ...t,
@@ -4657,11 +4657,11 @@ function jc(e) {
4657
4657
  skipLibCheck: !0
4658
4658
  };
4659
4659
  }
4660
- function Dc(e) {
4661
- const t = e.options.types?.tsconfigPath, i = t && u.isAbsolute(t) ? t : hs(t ?? "tsconfig.json");
4660
+ function Nc(e) {
4661
+ const t = e.options.types?.tsconfigPath, i = t && u.isAbsolute(t) ? t : fs(t ?? "tsconfig.json");
4662
4662
  if (i === void 0)
4663
4663
  throw Error(
4664
- w(
4664
+ b(
4665
4665
  "@arcgis/lumina:loadTypeScriptConfig",
4666
4666
  `Unable to find ${Y(String(t))}. Please make sure the file exists, or provide types.tsconfigPath option to useLumina()`,
4667
4667
  process.cwd()
@@ -4671,7 +4671,7 @@ function Dc(e) {
4671
4671
  if (n.error !== void 0)
4672
4672
  throw Error(
4673
4673
  o.formatDiagnosticsWithColorAndContext([n.error], {
4674
- getCanonicalFileName: Hi,
4674
+ getCanonicalFileName: Bi,
4675
4675
  getCurrentDirectory: o.sys.getCurrentDirectory,
4676
4676
  getNewLine: () => o.sys.newLine
4677
4677
  })
@@ -4684,11 +4684,11 @@ function Dc(e) {
4684
4684
  }, r = o.parseJsonConfigFileContent(s, o.sys, u.dirname(i));
4685
4685
  e.typeScriptConfig = r.options, e.typeScriptConfigPath = i;
4686
4686
  }
4687
- function Hn(e) {
4687
+ function Bn(e) {
4688
4688
  const t = e.target;
4689
4689
  if (t === void 0)
4690
4690
  throw Error(
4691
- w(
4691
+ b(
4692
4692
  "@arcgis/lumina:resolveTargetVersion",
4693
4693
  'TypeScript config must have a "target" property specified (or any parent tsconfig.json file if this config is extending another tsconfig.json)'
4694
4694
  )
@@ -4696,7 +4696,7 @@ function Hn(e) {
4696
4696
  const i = o.ScriptTarget[t].toLowerCase();
4697
4697
  return i === "latest" ? "esnext" : i;
4698
4698
  }
4699
- function Rc(e, t) {
4699
+ function Dc(e, t) {
4700
4700
  if (e.isInStorybook && e.viteCommand === "serve") {
4701
4701
  const i = (a, c, l, ...d) => {
4702
4702
  const p = a.filter(
@@ -4715,17 +4715,17 @@ function Rc(e, t) {
4715
4715
  l[0] === "timerToUpdateProgram" ? s : c,
4716
4716
  ...l
4717
4717
  ), n.afterProgramCreate = (a) => {
4718
- e.typeScriptProgram = a.getProgram(), e.typeScriptTypeChecker = e.typeScriptProgram.getTypeChecker(), e._typeScriptReload?.resolve(), e._typeScriptReload = new Cs();
4718
+ e.typeScriptProgram = a.getProgram(), e.typeScriptTypeChecker = e.typeScriptProgram.getTypeChecker(), e._typeScriptReload?.resolve(), e._typeScriptReload = new Ts();
4719
4719
  }, e.typeScriptWatchProgram = o.createWatchProgram(n), e.typeScriptConfig = e.typeScriptProgram.getCompilerOptions();
4720
4720
  }
4721
- e.typeScriptConfig.sourceMap = t, e._compilerOptionsForPrinter = jc(e), e._typeScriptPrinter = cn(e._compilerOptionsForPrinter);
4721
+ e.typeScriptConfig.sourceMap = t, e._compilerOptionsForPrinter = Fc(e), e._typeScriptPrinter = on(e._compilerOptionsForPrinter);
4722
4722
  }
4723
- async function Mc(e, t, i) {
4723
+ async function jc(e, t, i) {
4724
4724
  const n = u.resolve(e.dir.root, t);
4725
- await q(n) && await Ps(n, { recursive: !0, force: !0 }), await _(n, { recursive: !0 }), await As(e.dir.distCdn, u.join(n, "build"), { recursive: !0 });
4725
+ await z(n) && await $s(n, { recursive: !0, force: !0 }), await _(n, { recursive: !0 }), await Ps(e.dir.distCdn, u.join(n, "build"), { recursive: !0 });
4726
4726
  const s = [
4727
4727
  "index.html",
4728
- ...await Js("**/*.html", {
4728
+ ...await Ms("**/*.html", {
4729
4729
  cwd: e.dir.src,
4730
4730
  nodir: !0,
4731
4731
  posix: !0
@@ -4740,7 +4740,7 @@ async function Mc(e, t, i) {
4740
4740
  if (typeof p == "string")
4741
4741
  return `<${d.tag} ${Object.entries(d.attrs ?? {}).map(([m, f]) => `${m}="${f}"`).join(" ")}>${p}</${d.tag}>`;
4742
4742
  }
4743
- throw Error(w("@arcgis/lumina:buildWebApp", `Unsupported loader type: ${JSON.stringify(d)}`));
4743
+ throw Error(b("@arcgis/lumina:buildWebApp", `Unsupported loader type: ${JSON.stringify(d)}`));
4744
4744
  }).join(`
4745
4745
  `);
4746
4746
  await Promise.all(
@@ -4751,13 +4751,13 @@ async function Mc(e, t, i) {
4751
4751
  `;
4752
4752
  let E = g.indexOf("<style>");
4753
4753
  if (E === -1 && (E = g.indexOf("</head>")), E === -1)
4754
- throw Error(w("@arcgis/lumina:buildWebApp", `Failed to find <head> or <style> tag in ${y}`));
4754
+ throw Error(b("@arcgis/lumina:buildWebApp", `Failed to find <head> or <style> tag in ${y}`));
4755
4755
  const $ = g.slice(0, E) + S + g.slice(E);
4756
4756
  await F(h, $, "utf-8");
4757
4757
  })
4758
4758
  );
4759
4759
  }
4760
- const zn = /* @__PURE__ */ new Set([
4760
+ const _n = /* @__PURE__ */ new Set([
4761
4761
  "chunks",
4762
4762
  "components",
4763
4763
  "docs",
@@ -4770,13 +4770,13 @@ const zn = /* @__PURE__ */ new Set([
4770
4770
  "collection",
4771
4771
  "extras",
4772
4772
  "support"
4773
- ]), H = "@arcgis/lumina:buildCdn", Dt = "cdn", qn = "index", we = "main";
4774
- function Oc(e) {
4773
+ ]), H = "@arcgis/lumina:buildCdn", jt = "cdn", Hn = "index", be = "main";
4774
+ function Rc(e) {
4775
4775
  const { skip: t = !1, namespace: i, esbuildOptions: n = {} } = e.options.build?.cdn ?? {}, s = e.options.build?.webApp?.destination, r = i !== void 0;
4776
4776
  if (r) {
4777
4777
  if (i.toLowerCase() !== i)
4778
4778
  throw new Error(`Expected CDN namespace to be all lowercase. Received: ${i}`);
4779
- if (zn.has(i))
4779
+ if (_n.has(i))
4780
4780
  throw new Error(
4781
4781
  `Namespace name "${i}" is restricted as it collides with a well-known Lumina dist/ folder name or Stencil dist/ folder name.`
4782
4782
  );
@@ -4784,12 +4784,12 @@ function Oc(e) {
4784
4784
  'The "namespace" option in the "build.cdn" is deprecated and will be removed in the next major version.'
4785
4785
  );
4786
4786
  }
4787
- const a = i ?? qn;
4787
+ const a = i ?? Hn;
4788
4788
  if (e.provideAssets([
4789
4789
  {
4790
4790
  type: "dynamic",
4791
- source: () => zo(e),
4792
- destination: r ? `../${a}.css` : `../../${we}.css`
4791
+ source: () => _o(e),
4792
+ destination: r ? `../${a}.css` : `../../${be}.css`
4793
4793
  }
4794
4794
  ]), !t)
4795
4795
  return {
@@ -4797,8 +4797,8 @@ function Oc(e) {
4797
4797
  async writeBundle() {
4798
4798
  if (e.isInStorybook)
4799
4799
  return;
4800
- const c = Qe && R().name !== "@arcgis/embeddable-components", l = Date.now(), d = _(e.dir.distCdn, { recursive: !0 }), p = Array.isArray(n.entryPoints) ? n.entryPoints.map((y) => typeof y == "string" ? { in: y, out: "" } : y) : typeof n.entryPoints == "object" ? Object.entries(n.entryPoints).map(([y, h]) => ({ in: h, out: y })) : [], m = await Jc(e, a, n, p, c);
4801
- await d, await Kc(
4800
+ const c = Qe && R().name !== "@arcgis/embeddable-components", l = Date.now(), d = _(e.dir.distCdn, { recursive: !0 }), p = Array.isArray(n.entryPoints) ? n.entryPoints.map((y) => typeof y == "string" ? { in: y, out: "" } : y) : typeof n.entryPoints == "object" ? Object.entries(n.entryPoints).map(([y, h]) => ({ in: h, out: y })) : [], m = await Mc(e, a, n, p, c);
4801
+ await d, await Oc(
4802
4802
  m,
4803
4803
  e.dir.distCdn,
4804
4804
  r ? `${a}.esm` : a,
@@ -4806,27 +4806,27 @@ function Oc(e) {
4806
4806
  c
4807
4807
  );
4808
4808
  const f = Date.now();
4809
- C.info(H, `CDN was built in ${f - l}ms`), s && await Mc(e, s, `${r ? `${a}.esm` : a}.js`);
4809
+ C.info(H, `CDN was built in ${f - l}ms`), s && await jc(e, s, `${r ? `${a}.esm` : a}.js`);
4810
4810
  }
4811
4811
  };
4812
4812
  }
4813
- async function Jc(e, t, i, n, s) {
4813
+ async function Mc(e, t, i, n, s) {
4814
4814
  const r = e.environment;
4815
4815
  if (i.minify && s)
4816
4816
  throw Error(
4817
- w(
4817
+ b(
4818
4818
  H,
4819
4819
  "Unminified CDN build is not yet supported - open a feature request with Lumina maintainers if it is needed"
4820
4820
  )
4821
4821
  );
4822
4822
  if (i.sourcemap && s)
4823
4823
  throw Error(
4824
- w(
4824
+ b(
4825
4825
  H,
4826
4826
  "Source maps in the CDN build are not yet supported - open a feature request with Lumina maintainers if it is needed"
4827
4827
  )
4828
4828
  );
4829
- return await Os({
4829
+ return await Rs({
4830
4830
  bundle: !0,
4831
4831
  minify: s ? !0 : r === "production",
4832
4832
  treeShaking: !0,
@@ -4852,7 +4852,7 @@ async function Jc(e, t, i, n, s) {
4852
4852
  chunkNames: "[hash]",
4853
4853
  resolveExtensions: [".js", ".json"],
4854
4854
  banner: { js: e.banner },
4855
- target: Hn(e.typeScriptConfig),
4855
+ target: Bn(e.typeScriptConfig),
4856
4856
  ...i,
4857
4857
  plugins: [
4858
4858
  // Deprecated feature will be dropped in https://devtopia.esri.com/WebGIS/arcgis-web-components/issues/2765
@@ -4897,7 +4897,7 @@ async function Jc(e, t, i, n, s) {
4897
4897
  * The script's file name will be stripped inside defineCustomElements.
4898
4898
  **/
4899
4899
  defineCustomElements({resourcesUrl: import.meta.url});
4900
- ${gn(e._globalCssString, e)}`,
4900
+ ${yn(e._globalCssString, e)}`,
4901
4901
  sourcefile: `${t}.esm.js`,
4902
4902
  resolveDir: e.dir.dist,
4903
4903
  loader: "js",
@@ -4905,7 +4905,7 @@ ${gn(e._globalCssString, e)}`,
4905
4905
  }
4906
4906
  });
4907
4907
  }
4908
- async function Kc(e, t, i, n, s) {
4908
+ async function Oc(e, t, i, n, s) {
4909
4909
  const r = `${i}.js`, a = new Map(
4910
4910
  e.outputFiles.map((c) => {
4911
4911
  const l = {
@@ -4915,12 +4915,12 @@ async function Kc(e, t, i, n, s) {
4915
4915
  }, d = c.path.slice(t.length);
4916
4916
  if (d === "stdin.js") {
4917
4917
  if (s) {
4918
- const m = c.text.match(Wc)?.[0];
4918
+ const m = c.text.match(Jc)?.[0];
4919
4919
  if (m === void 0)
4920
4920
  throw Error(
4921
4921
  "Failed to find the runtime variable name in the CDN entrypoint file. This likely indicates a bug in Lumina"
4922
4922
  );
4923
- l.code = `${l.code.trimEnd()}${Bc(m, n)}`, l.isAsync = !1;
4923
+ l.code = `${l.code.trimEnd()}${Kc(m, n)}`, l.isAsync = !1;
4924
4924
  }
4925
4925
  return [r, l];
4926
4926
  }
@@ -4931,8 +4931,8 @@ async function Kc(e, t, i, n, s) {
4931
4931
  c.isAsync === void 0 && (l.endsWith(".js") ? Un(c, a) : c.isAsync = !1);
4932
4932
  }), await Promise.all(Array.from(a.entries(), async ([c, { code: l }]) => await F(t + c, l)));
4933
4933
  }
4934
- const Wc = /(?<=;var [a-zA-Z$_]=[a-zA-Z$_]\()[a-zA-Z$_](?=,\{")/u;
4935
- function Bc(e, t) {
4934
+ const Jc = /(?<=;var [a-zA-Z$_]=[a-zA-Z$_]\()[a-zA-Z$_](?=,\{")/u;
4935
+ function Kc(e, t) {
4936
4936
  let i = [
4937
4937
  "window.$arcgis",
4938
4938
  "||",
@@ -4948,7 +4948,7 @@ function Bc(e, t) {
4948
4948
  continue;
4949
4949
  }
4950
4950
  if (r.out.startsWith(".") || r.out.startsWith("/"))
4951
- throw Error(w(H, `CDN entrypoint path must not start with '.' or '/'. Found: ${r.out}`));
4951
+ throw Error(b(H, `CDN entrypoint path must not start with '.' or '/'. Found: ${r.out}`));
4952
4952
  s.push(r.out);
4953
4953
  }
4954
4954
  i += `i=(a.importMap??={}).imports??={};"${s.join(",")}".split(",").map(e=>i[p+e+j]=i[p+e]=import.meta.resolve("./"+e+j));`;
@@ -4976,132 +4976,132 @@ function Bc(e, t) {
4976
4976
  function Un(e, t) {
4977
4977
  const i = [], n = [], s = [], r = /* @__PURE__ */ new Set(), a = [];
4978
4978
  let c = 0;
4979
- const l = e.code.matchAll(_c);
4980
- for (const b of l) {
4981
- const [T, L, N, j, M] = b, z = M.startsWith(We);
4982
- if (c !== 0 && c !== b.index) {
4983
- const K = e.code.slice(c, b.index);
4979
+ const l = e.code.matchAll(Wc);
4980
+ for (const w of l) {
4981
+ const [T, L, N, D, M] = w, U = M.startsWith(We);
4982
+ if (c !== 0 && c !== w.index) {
4983
+ const K = e.code.slice(c, w.index);
4984
4984
  s.push(K), a.push([c, K.length, 0, ""]);
4985
4985
  }
4986
- if (c = b.index + T.length, z)
4987
- a.push([b.index, T.length, 0, ""]), n.push(`"${Vn(M.slice(We.length))}"`), i.push(L?.replaceAll(" as ", ":") ?? N ?? j ?? "");
4986
+ if (c = w.index + T.length, U)
4987
+ a.push([w.index, T.length, 0, ""]), n.push(`"${qn(M.slice(We.length))}"`), i.push(L?.replaceAll(" as ", ":") ?? N ?? D ?? "");
4988
4988
  else {
4989
- const K = Gn(M, t), G = K?.isAsync === !0;
4989
+ const K = zn(M, t), G = K?.isAsync === !0;
4990
4990
  if (L !== void 0) {
4991
- const xe = [];
4991
+ const Pe = [];
4992
4992
  for (const Ye of L.slice(1, -1).split(",")) {
4993
4993
  const [Jt, Kt = Jt] = Ye.split(" as ");
4994
- G || r.add(Kt), xe.push(`${Jt}:${Kt}`);
4994
+ G || r.add(Kt), Pe.push(`${Jt}:${Kt}`);
4995
4995
  }
4996
4996
  if (G) {
4997
- const Ye = K.oldSingleExportName === void 0 ? `{${xe.join(",")}}` : xe[0].split(":")[1];
4998
- a.push([b.index + 6, 0, L.length, Ye]);
4997
+ const Ye = K.oldSingleExportName === void 0 ? `{${Pe.join(",")}}` : Pe[0].split(":")[1];
4998
+ a.push([w.index + 6, 0, L.length, Ye]);
4999
4999
  }
5000
- } else if (N === void 0 && j === void 0)
5001
- G && a.push([b.index + 6, 0, 0, ""]);
5000
+ } else if (N === void 0 && D === void 0)
5001
+ G && a.push([w.index + 6, 0, 0, ""]);
5002
5002
  else {
5003
5003
  if (G)
5004
5004
  throw Error(
5005
- w(
5005
+ b(
5006
5006
  H,
5007
5007
  `Expected local import specifiers to use only named or side-effect import syntax. Found ${T}`
5008
5008
  )
5009
5009
  );
5010
- r.add(j ?? N);
5010
+ r.add(D ?? N);
5011
5011
  }
5012
5012
  }
5013
5013
  }
5014
5014
  if (e.isAsync = a.length > 0, !e.isAsync) {
5015
- e.code = ki(e.code, t);
5015
+ e.code = xi(e.code, t);
5016
5016
  return;
5017
5017
  }
5018
- const d = qc(r);
5018
+ const d = Hc(r);
5019
5019
  let p = e.code.slice(0, c);
5020
- for (let b = a.length - 1; b >= 0; b--) {
5021
- const [T, L, N, j] = a[b];
5022
- let M = L, z = "";
5020
+ for (let w = a.length - 1; w >= 0; w--) {
5021
+ const [T, L, N, D] = a[w];
5022
+ let M = L, U = "";
5023
5023
  if (L === 0) {
5024
5024
  const G = d();
5025
- n.push(G), z = ` ${G} from`, j !== "" ? (M = N + 4, i.push(j)) : i.push("");
5025
+ n.push(G), U = ` ${G} from`, D !== "" ? (M = N + 4, i.push(D)) : i.push("");
5026
5026
  }
5027
- p = p.slice(0, T) + z + p.slice(T + M);
5027
+ p = p.slice(0, T) + U + p.slice(T + M);
5028
5028
  }
5029
- const m = Hc.exec(e.code), f = m?.index ?? e.code.length;
5029
+ const m = Bc.exec(e.code), f = m?.index ?? e.code.length;
5030
5030
  let y = "";
5031
5031
  if (m !== null) {
5032
- const b = m[1].split(",");
5033
- if (b.length > 1)
5034
- y = `return{${b.map((T) => {
5032
+ const w = m[1].split(",");
5033
+ if (w.length > 1)
5034
+ y = `return{${w.map((T) => {
5035
5035
  const [L, N = L] = T.split(" as ");
5036
5036
  return `${N}:${L}`;
5037
5037
  }).join(",")}}`;
5038
5038
  else {
5039
- const [T, L = T] = b[0].split(" as ");
5039
+ const [T, L = T] = w[0].split(" as ");
5040
5040
  e.oldSingleExportName = L, y = `return ${T}`;
5041
5041
  }
5042
5042
  }
5043
- const h = i.findLastIndex((b) => b.length > 0), g = i.slice(0, h + 1).join(","), S = `export default $arcgis.t(${i.length === 0 ? "_" : `([${g}])`}=>{`, E = n.join(","), $ = `${y}},${E})`;
5043
+ const h = i.findLastIndex((w) => w.length > 0), g = i.slice(0, h + 1).join(","), S = `export default $arcgis.t(${i.length === 0 ? "_" : `([${g}])`}=>{`, E = n.join(","), $ = `${y}},${E})`;
5044
5044
  let I = e.code.slice(c, f);
5045
- I = `${s.join("")}${I}`, I = ki(I, t);
5046
- const x = `${p}${S}${I}${$}`;
5047
- e.code = x;
5045
+ I = `${s.join("")}${I}`, I = xi(I, t);
5046
+ const P = `${p}${S}${I}${$}`;
5047
+ e.code = P;
5048
5048
  }
5049
- const _c = /import(?:(\{[^}]+\})from|\*as (\w+) from| ([\w$]+) from)?"([^"]+)";/gu, Hc = /export\{([^}]+)\};\n$/u, We = "@arcgis/core/";
5050
- function Gn(e, t) {
5049
+ const Wc = /import(?:(\{[^}]+\})from|\*as (\w+) from| ([\w$]+) from)?"([^"]+)";/gu, Bc = /export\{([^}]+)\};\n$/u, We = "@arcgis/core/";
5050
+ function zn(e, t) {
5051
5051
  if (!e.startsWith("./"))
5052
5052
  return;
5053
5053
  const i = e.slice(2), n = t.get(i);
5054
5054
  if (n === void 0)
5055
- throw Error(w(H, `Failed to find the ${e} module`));
5055
+ throw Error(b(H, `Failed to find the ${e} module`));
5056
5056
  if (n.isAsync === void 0 && Un(n, t), n.isAsync === void 0)
5057
- throw Error(w(H, `Failed to infer whether the ${e} module has top-level await`));
5057
+ throw Error(b(H, `Failed to infer whether the ${e} module has top-level await`));
5058
5058
  return n;
5059
5059
  }
5060
- function ki(e, t) {
5061
- return e.replaceAll(zc, (i, n) => {
5060
+ function xi(e, t) {
5061
+ return e.replaceAll(_c, (i, n) => {
5062
5062
  if (n.startsWith(We))
5063
- return `$arcgis.t(m=>m[0],"${Vn(n.slice(We.length))}")`;
5063
+ return `$arcgis.t(m=>m[0],"${qn(n.slice(We.length))}")`;
5064
5064
  if (n.startsWith("./")) {
5065
- const s = Gn(n, t);
5065
+ const s = zn(n, t);
5066
5066
  if (s?.isAsync === !0)
5067
5067
  return `${i}.then(m=>m.default${s.oldSingleExportName === void 0 ? "" : `.then(e=>({${s.oldSingleExportName}:e}))`})`;
5068
5068
  }
5069
5069
  return i;
5070
5070
  });
5071
5071
  }
5072
- const zc = /(?<![.\w\d])import\("([^"]+)"\)/gu, Vn = (e) => e.endsWith(".js") ? e.slice(0, -3) : e;
5073
- function qc(e) {
5074
- const t = [Xn];
5072
+ const _c = /(?<![.\w\d])import\("([^"]+)"\)/gu, qn = (e) => e.endsWith(".js") ? e.slice(0, -3) : e;
5073
+ function Hc(e) {
5074
+ const t = [Gn];
5075
5075
  return () => {
5076
5076
  for (; ; ) {
5077
- const i = Vc(t);
5078
- if (Xc(t), !e.has(i))
5077
+ const i = qc(t);
5078
+ if (Gc(t), !e.has(i))
5079
5079
  return e.add(i), i;
5080
5080
  }
5081
5081
  };
5082
5082
  }
5083
- const Xn = 0, Rt = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_", Qn = `${Rt}0123456789`, Uc = Rt.length, Gc = Qn.length;
5084
- function Vc(e) {
5083
+ const Gn = 0, Rt = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_", Vn = `${Rt}0123456789`, Uc = Rt.length, zc = Vn.length;
5084
+ function qc(e) {
5085
5085
  let t = Rt[e[0]];
5086
5086
  for (let i = 1; i < e.length; i++)
5087
- t += Qn[e[i]];
5087
+ t += Vn[e[i]];
5088
5088
  return t;
5089
5089
  }
5090
- function Xc(e) {
5090
+ function Gc(e) {
5091
5091
  let t = e.length - 1;
5092
5092
  for (; t >= 0; ) {
5093
- const i = t === 0 ? Uc : Gc;
5093
+ const i = t === 0 ? Uc : zc;
5094
5094
  if (e[t] += 1, e[t] >= i)
5095
5095
  e[t] = 0, t--;
5096
5096
  else
5097
5097
  return;
5098
5098
  }
5099
- e = new Array(e.length + 1).fill(Xn);
5099
+ e = new Array(e.length + 1).fill(Gn);
5100
5100
  }
5101
- async function Qc(e, t, i, n) {
5102
- const s = t.packageName, r = await Be(s), { hasCss: a, cdnName: c } = await Zn(u.join(r, "dist")) ?? {};
5101
+ async function Vc(e, t, i, n) {
5102
+ const s = t.packageName, r = await Be(s), { hasCss: a, cdnName: c } = await Xn(u.join(r, "dist")) ?? {};
5103
5103
  if (i === "cdn") {
5104
- const m = await _e(r), f = t.cdnUrl ?? Ue(m, !0);
5104
+ const m = await _e(r), f = t.cdnUrl ?? qe(m, !0);
5105
5105
  return [
5106
5106
  ...a ? [
5107
5107
  {
@@ -5142,34 +5142,34 @@ async function Qc(e, t, i, n) {
5142
5142
  }
5143
5143
  ];
5144
5144
  }
5145
- async function Zn(e) {
5145
+ async function Xn(e) {
5146
5146
  const i = (await He(e)).filter(
5147
- (s) => !zn.has(s) && !s.includes(".")
5147
+ (s) => !_n.has(s) && !s.includes(".")
5148
5148
  ), n = i.find((s) => s.startsWith("arcgis-"));
5149
5149
  return n === void 0 ? await Promise.all(
5150
- i.map(async (s) => await Ii(e, s))
5151
- ).then((s) => s.find(D)) : await Ii(e, n);
5150
+ i.map(async (s) => await Ai(e, s))
5151
+ ).then((s) => s.find(j)) : await Ai(e, n);
5152
5152
  }
5153
- async function Ii(e, t) {
5154
- const i = u.join(e, t, `${t}.css`), n = u.join(e, t, "assets"), [s, r] = await Promise.all([q(i), q(n)]);
5153
+ async function Ai(e, t) {
5154
+ const i = u.join(e, t, `${t}.css`), n = u.join(e, t, "assets"), [s, r] = await Promise.all([z(i), z(n)]);
5155
5155
  return s || r ? {
5156
5156
  hasCss: s,
5157
5157
  cdnName: t
5158
5158
  } : void 0;
5159
5159
  }
5160
- async function Zc(e, t, i, n) {
5161
- const s = t.packageName, r = await Be(s), a = await _e(r), c = await Zn(u.join(r, "dist"));
5160
+ async function Xc(e, t, i, n) {
5161
+ const s = t.packageName, r = await Be(s), a = await _e(r), c = await Xn(u.join(r, "dist"));
5162
5162
  if (i === "cdn") {
5163
- const y = a.exports?.[`./${we}.css`] === void 0, h = y ? c.cdnName : qn;
5163
+ const y = a.exports?.[`./${be}.css`] === void 0, h = y ? c.cdnName : Hn;
5164
5164
  return {
5165
5165
  tag: "script",
5166
5166
  attrs: {
5167
5167
  type: "module",
5168
- src: `${t.cdnUrl ?? Ue(a, !0)}${h}${y ? ".esm" : ""}.js`
5168
+ src: `${t.cdnUrl ?? qe(a, !0)}${h}${y ? ".esm" : ""}.js`
5169
5169
  }
5170
5170
  };
5171
5171
  }
5172
- const l = c?.cdnName ?? Dt, d = Yc(a), p = `${s}/${u.normalize(d)}${Q}`, m = [
5172
+ const l = c?.cdnName ?? jt, d = Qc(a), p = `${s}/${u.normalize(d)}${Q}`, m = [
5173
5173
  `import styles$${n} from "${p}";`,
5174
5174
  `document.adoptedStyleSheets = [...document.adoptedStyleSheets, styles$${n}.styleSheet];`
5175
5175
  ], f = `${s}/loader`;
@@ -5188,28 +5188,28 @@ async function Zc(e, t, i, n) {
5188
5188
  ]
5189
5189
  };
5190
5190
  }
5191
- function Yc(e) {
5191
+ function Qc(e) {
5192
5192
  const { exports: t } = e;
5193
5193
  if (t === void 0)
5194
5194
  throw new Error(
5195
5195
  `Package "${e.name}" does not have an "exports" field. All Lumina packages must include an "exports" field.`
5196
5196
  );
5197
- const i = Object.entries(t).filter(([s]) => u.extname(s) === ".css"), n = i.find(([, s]) => s === `./${we}.css`);
5198
- return n ? n[0] : i.length > 0 ? i[0][0] : `./${we}.css`;
5197
+ const i = Object.entries(t).filter(([s]) => u.extname(s) === ".css"), n = i.find(([, s]) => s === `./${be}.css`);
5198
+ return n ? n[0] : i.length > 0 ? i[0][0] : `./${be}.css`;
5199
5199
  }
5200
5200
  async function Te(e) {
5201
- return e._loadersCache ??= el(e), await e._loadersCache;
5201
+ return e._loadersCache ??= Zc(e), await e._loadersCache;
5202
5202
  }
5203
- async function el(e) {
5203
+ async function Zc(e) {
5204
5204
  const t = e.viteCommand === "build" ? "cdn" : "lazyNpm", i = e.viteConfig.base, n = async (c) => (await Promise.all(
5205
5205
  c.map(
5206
- async (l, d) => l.type === "stencil" ? await Qc(i, l, t, d) : l.type === "@arcgis/lumina" ? await Zc(i, l, t, d) : void 0
5206
+ async (l, d) => l.type === "stencil" ? await Vc(i, l, t, d) : l.type === "@arcgis/lumina" ? await Xc(i, l, t, d) : void 0
5207
5207
  )
5208
- )).filter(D).flat(), s = await Promise.all([
5208
+ )).filter(j).flat(), s = await Promise.all([
5209
5209
  // This may contain an import map so must be first
5210
- kc(i, t),
5210
+ xc(i, t),
5211
5211
  ve.then(n),
5212
- Yn(e).then(n)
5212
+ Qn(e).then(n)
5213
5213
  ]), r = u.join(e.dir.src, "loader.ts");
5214
5214
  return [
5215
5215
  ...s.flat(),
@@ -5223,19 +5223,19 @@ async function el(e) {
5223
5223
  javascriptCode: [
5224
5224
  `import { defineCustomElements } from "${r}";`,
5225
5225
  "window.devOnly$ownTagNames = new Set();",
5226
- `defineCustomElements(${t === "cdn" ? `{resourcesUrl:"./${e.options.build?.cdn?.namespace ?? Dt}/"}` : ""});`
5226
+ `defineCustomElements(${t === "cdn" ? `{resourcesUrl:"./${e.options.build?.cdn?.namespace ?? jt}/"}` : ""});`
5227
5227
  ]
5228
5228
  }
5229
5229
  ];
5230
5230
  }
5231
- async function Yn(e) {
5231
+ async function Qn(e) {
5232
5232
  const t = e.options?.serve?.extraDependencies ?? [];
5233
5233
  return t.length === 0 ? [] : (e._serveOnlyDependencies ??= Promise.all(
5234
5234
  t.map(async (i) => {
5235
- const n = typeof i == "string" ? i : i.name, s = await En(n);
5235
+ const n = typeof i == "string" ? i : i.name, s = await bn(n);
5236
5236
  if (s === void 0)
5237
5237
  throw Error(
5238
- w(
5238
+ b(
5239
5239
  "@arcgis/lumina:computeServeOnlyDependencies",
5240
5240
  `Unable to resolve extra dependency "${n}". Make sure it is a valid Stencil or Lumina package.`
5241
5241
  )
@@ -5245,12 +5245,12 @@ async function Yn(e) {
5245
5245
  cdnUrl: typeof i == "string" ? void 0 : i.getCdnUrl(e)
5246
5246
  };
5247
5247
  })
5248
- ).then((i) => i.filter(D)), await e._serveOnlyDependencies);
5248
+ ).then((i) => i.filter(j)), await e._serveOnlyDependencies);
5249
5249
  }
5250
- const es = "/@arcgis/lumina-compiler/testSetupFile", lt = [es];
5251
- async function tl(e) {
5250
+ const Zn = "/@arcgis/lumina-compiler/testSetupFile", lt = [Zn];
5251
+ async function Yc(e) {
5252
5252
  if (!e.viteConfig.test?.browser?.enabled)
5253
- return Li(e);
5253
+ return ki(e);
5254
5254
  const i = (await Te(e)).map((n, s) => {
5255
5255
  if ("javascriptCode" in n)
5256
5256
  return n.javascriptCode.join(`
@@ -5266,7 +5266,7 @@ async function tl(e) {
5266
5266
  ].join(`
5267
5267
  `);
5268
5268
  throw Error(
5269
- w(
5269
+ b(
5270
5270
  "@arcgis/lumina:buildTestSetupFile",
5271
5271
  `Unexpected loader type for the browser test environment: ${JSON.stringify(n)}`
5272
5272
  )
@@ -5274,14 +5274,14 @@ async function tl(e) {
5274
5274
  }).join(`
5275
5275
 
5276
5276
  `);
5277
- return [Li(e), i].join("");
5277
+ return [ki(e), i].join("");
5278
5278
  }
5279
- const Li = (e) => [e.isInPuppeteerTestBackEnd ? il : "", nl].join(""), il = `import { setupPuppeteerTest } from "@arcgis/lumina-compiler/puppeteerTesting";
5279
+ const ki = (e) => [e.isInPuppeteerTestBackEnd ? el : "", tl].join(""), el = `import { setupPuppeteerTest } from "@arcgis/lumina-compiler/puppeteerTesting";
5280
5280
  setupPuppeteerTest();
5281
- `, nl = `import { setupLuminaTest } from "@arcgis/lumina-compiler/testing";
5281
+ `, tl = `import { setupLuminaTest } from "@arcgis/lumina-compiler/testing";
5282
5282
  setupLuminaTest();
5283
5283
  `;
5284
- function sl(e) {
5284
+ function il(e) {
5285
5285
  let t = !0, i = !1, n, s, r, a, c;
5286
5286
  const l = "@arcgis/lumina:generateVirtualFiles", d = {
5287
5287
  name: l,
@@ -5291,16 +5291,16 @@ function sl(e) {
5291
5291
  },
5292
5292
  resolveId: (h) => h === a || h === c ? a : void 0,
5293
5293
  async load(h) {
5294
- const g = h.startsWith(es);
5294
+ const g = h.startsWith(Zn);
5295
5295
  if (!(!h.endsWith(".tsx") && h !== a && !g)) {
5296
5296
  if (s === void 0 && !e.isInPuppeteerTestBackEnd) {
5297
- r === void 0 && clearTimeout(n), r ??= na(e, t).catch((S) => {
5297
+ r === void 0 && clearTimeout(n), r ??= ta(e, t).catch((S) => {
5298
5298
  throw i = !0, S;
5299
5299
  }), t = !1;
5300
5300
  const v = await r;
5301
5301
  s ??= v;
5302
5302
  }
5303
- return h === a ? qo(e) : g ? await tl(e) : void 0;
5303
+ return h === a ? Ho(e) : g ? await Yc(e) : void 0;
5304
5304
  }
5305
5305
  },
5306
5306
  async writeBundle() {
@@ -5323,7 +5323,7 @@ function sl(e) {
5323
5323
  );
5324
5324
  }), h.watcher.on("add", g), h.watcher.on("unlink", g), h.watcher.on(
5325
5325
  "addDir",
5326
- (v) => v.startsWith(e.dir.srcComponents) ? void Pt(e, e.dir.srcComponents, v).then(
5326
+ (v) => v.startsWith(e.dir.srcComponents) ? void xt(e, e.dir.srcComponents, v).then(
5327
5327
  (S) => S.length > 0 ? m() : void 0
5328
5328
  ) : void 0
5329
5329
  ), h.watcher.on("unlinkDir", (v) => {
@@ -5369,11 +5369,11 @@ function sl(e) {
5369
5369
  if (!ge(h, e.dir.srcComponents))
5370
5370
  return;
5371
5371
  v ??= await g();
5372
- const E = sa(e, h, v);
5372
+ const E = ia(e, h, v);
5373
5373
  if (E === void 0)
5374
5374
  return !1;
5375
5375
  for (const $ of E) {
5376
- const I = vn($);
5376
+ const I = hn($);
5377
5377
  e.server.ws.send({ type: "custom", event: "component-meta-update", data: I });
5378
5378
  }
5379
5379
  return f(), !0;
@@ -5394,15 +5394,15 @@ function sl(e) {
5394
5394
  const St = "@arcgis/lumina:provideAssets";
5395
5395
  function fe(e, t, i = Mt) {
5396
5396
  if (e.viteCommand !== "serve")
5397
- throw Error(w(St, "serveAssets() is only available when Vite is running in serve mode"));
5397
+ throw Error(b(St, "serveAssets() is only available when Vite is running in serve mode"));
5398
5398
  const n = e._serverConfigured, s = e.server.middlewares.stack.length;
5399
5399
  if (t.forEach((r) => {
5400
- const a = is(r), c = ss(e.dir, ns(a)), l = ol(e.viteConfig.base, c, e.dir.distCdn);
5400
+ const a = es(r), c = is(e.dir, ts(a)), l = sl(e.viteConfig.base, c, e.dir.distCdn);
5401
5401
  e.server.middlewares.use(l, (d, p, m) => {
5402
- const f = al(d.url), y = a.type === "directory" ? u.resolve(a.source, f.slice(1)) : a.source, h = u.join(c, f), g = i.find((v) => v.match(h, e));
5402
+ const f = rl(d.url), y = a.type === "directory" ? u.resolve(a.source, f.slice(1)) : a.source, h = u.join(c, f), g = i.find((v) => v.match(h, e));
5403
5403
  return (typeof y == "function" ? Promise.resolve(y()) : J(y)).then((v) => {
5404
5404
  const S = (typeof y == "function" ? void 0 : g?.transform(v.toString("utf8"), h, e)) ?? v;
5405
- p.setHeader("Cache-Control", "max-age=31536000, immutable"), p.setHeader("Content-Type", Ks.lookup(f) || "application/octet-stream"), p.write(S), p.end();
5405
+ p.setHeader("Cache-Control", "max-age=31536000, immutable"), p.setHeader("Content-Type", Os.lookup(f) || "application/octet-stream"), p.write(S), p.end();
5406
5406
  }).catch((v) => {
5407
5407
  (a.type !== "directory" || process.env.DEBUG) && C.warn(
5408
5408
  St,
@@ -5415,22 +5415,22 @@ function fe(e, t, i = Mt) {
5415
5415
  e.server.middlewares.stack.splice(0, 0, ...r);
5416
5416
  }
5417
5417
  }
5418
- async function ts(e, t, i = Mt) {
5418
+ async function Yn(e, t, i = Mt) {
5419
5419
  await Promise.all(
5420
5420
  t.map(async (n) => {
5421
- const s = is(n), r = ss(e.dir, ns(s));
5421
+ const s = es(n), r = is(e.dir, ts(s));
5422
5422
  if (s.type === "directory") {
5423
5423
  const a = u.resolve(s.source), l = (await He(a, { recursive: !0, withFileTypes: !0 })).filter((d) => d.isFile()).map((d) => {
5424
5424
  const p = u.resolve(d.parentPath, d.name), m = u.relative(a, p), f = u.join(r, m);
5425
5425
  return [p, f];
5426
5426
  });
5427
- await os(l.map(([d, p]) => p)), await Promise.all(
5427
+ await ss(l.map(([d, p]) => p)), await Promise.all(
5428
5428
  l.map(
5429
- async ([d, p]) => await Fi(d, p, i, e)
5429
+ async ([d, p]) => await Ii(d, p, i, e)
5430
5430
  )
5431
5431
  );
5432
5432
  } else if (s.type === "file")
5433
- await _(u.dirname(r), { recursive: !0 }), await Fi(s.source, r, i, e);
5433
+ await _(u.dirname(r), { recursive: !0 }), await Ii(s.source, r, i, e);
5434
5434
  else if (s.type === "dynamic") {
5435
5435
  await _(u.dirname(r), { recursive: !0 });
5436
5436
  const a = await Promise.resolve(s.source());
@@ -5439,7 +5439,7 @@ async function ts(e, t, i = Mt) {
5439
5439
  })
5440
5440
  );
5441
5441
  }
5442
- const is = Wi ? (e) => e : (e) => e.type === "dynamic" ? {
5442
+ const es = Ji ? (e) => e : (e) => e.type === "dynamic" ? {
5443
5443
  ...e,
5444
5444
  destination: Ie(e.destination)
5445
5445
  } : {
@@ -5447,22 +5447,22 @@ const is = Wi ? (e) => e : (e) => e.type === "dynamic" ? {
5447
5447
  source: Ie(e.source),
5448
5448
  destination: Ie(e.destination)
5449
5449
  };
5450
- async function Fi(e, t, i, n) {
5450
+ async function Ii(e, t, i, n) {
5451
5451
  const s = i.find((r) => r.match(t, n));
5452
5452
  if (s === void 0)
5453
- await ks(e, t);
5453
+ await xs(e, t);
5454
5454
  else {
5455
5455
  const r = await J(e, "utf8"), a = s.transform(r, t, n);
5456
5456
  await F(t, a);
5457
5457
  }
5458
5458
  }
5459
- function ns(e) {
5459
+ function ts(e) {
5460
5460
  if (e.type === "dynamic")
5461
5461
  return e.destination;
5462
5462
  if (e.source.endsWith(u.sep)) {
5463
5463
  if (e.type === "file")
5464
5464
  throw Error(
5465
- w(
5465
+ b(
5466
5466
  St,
5467
5467
  `Unexpectedly tried to provide an asset with type "file", whose source looks like a directory: ${Y(e.source)}. If source is meant to be a directory, change to "type":"directory". If source is a file, make sure source path does not end with / or \\`
5468
5468
  )
@@ -5471,34 +5471,34 @@ function ns(e) {
5471
5471
  }
5472
5472
  return e.destination === "" ? u.basename(e.source) : e.destination.endsWith(u.sep) ? e.type === "directory" && e.destination === u.sep ? e.destination : u.join(e.destination, u.basename(e.source)) : e.destination;
5473
5473
  }
5474
- function ss({ dist: e, distCdnAssets: t }, i) {
5475
- const n = rl(i), s = u.join(
5474
+ function is({ dist: e, distCdnAssets: t }, i) {
5475
+ const n = nl(i), s = u.join(
5476
5476
  t,
5477
5477
  n ? u.relative(t, i) : i
5478
- ), r = u.relative(e, s), a = rs(r);
5478
+ ), r = u.relative(e, s), a = ns(r);
5479
5479
  return u.join(e, a);
5480
5480
  }
5481
- function rl(e) {
5481
+ function nl(e) {
5482
5482
  if (e.startsWith(u.sep)) {
5483
- const t = Bi(), i = t.startsWith(u.sep) ? t.split(u.sep)[1] ?? "" : "";
5483
+ const t = Ki(), i = t.startsWith(u.sep) ? t.split(u.sep)[1] ?? "" : "";
5484
5484
  return e.startsWith(`/${i}/`) || e.startsWith("/Users/");
5485
5485
  } else
5486
- return !!(!Wi && u.isAbsolute(e));
5486
+ return !!(!Ji && u.isAbsolute(e));
5487
5487
  }
5488
- function ol(e, t, i) {
5489
- const n = rs(u.relative(i, t)), s = n.startsWith("/") ? n.slice(1) : n;
5488
+ function sl(e, t, i) {
5489
+ const n = ns(u.relative(i, t)), s = n.startsWith("/") ? n.slice(1) : n;
5490
5490
  return `${e}${s}`;
5491
5491
  }
5492
- const rs = (e) => e.replaceAll("../", ""), al = (e = "") => e.split("?")[0].split("#")[0];
5493
- async function os(e) {
5492
+ const ns = (e) => e.replaceAll("../", ""), rl = (e = "") => e.split("?")[0].split("#")[0];
5493
+ async function ss(e) {
5494
5494
  const t = new Set(e.map(u.dirname));
5495
5495
  await Promise.all(Array.from(t, async (i) => await _(i, { recursive: !0 })));
5496
5496
  }
5497
- const cl = {
5497
+ const ol = {
5498
5498
  match: (e, t) => t.environment === "production" && e.endsWith(".json"),
5499
5499
  transform: (e) => JSON.stringify(JSON.parse(e))
5500
- }, Mt = [cl];
5501
- function ll(e) {
5500
+ }, Mt = [ol];
5501
+ function al(e) {
5502
5502
  let t;
5503
5503
  const i = () => [
5504
5504
  ...e.options.assets?.transformers ?? [],
@@ -5507,36 +5507,36 @@ function ll(e) {
5507
5507
  return {
5508
5508
  name: "@arcgis/lumina:handleStaticAssets",
5509
5509
  configResolved() {
5510
- t = dl(e);
5510
+ t = cl(e);
5511
5511
  },
5512
5512
  async configureServer(n) {
5513
5513
  e.server = n, !e.isInPuppeteerTestBackEnd && (fe(e, await t, i()), n.watcher.on("addDir", (s) => {
5514
5514
  if (s.endsWith("assets")) {
5515
5515
  const r = u.dirname(s);
5516
- u.join(r, "/") === e.dir.root ? fe(e, [cs], i()) : s.startsWith(e.dir.srcComponents) && fe(e, [as(s, r)], i());
5516
+ u.join(r, "/") === e.dir.root ? fe(e, [os], i()) : s.startsWith(e.dir.srcComponents) && fe(e, [rs(s, r)], i());
5517
5517
  }
5518
5518
  }));
5519
5519
  },
5520
5520
  async writeBundle() {
5521
- await ts(e, await t, i());
5521
+ await Yn(e, await t, i());
5522
5522
  }
5523
5523
  };
5524
5524
  }
5525
- async function dl(e) {
5526
- const t = q("assets"), i = await e.componentFilesPromise, n = await Promise.all(
5525
+ async function cl(e) {
5526
+ const t = z("assets"), i = await e.componentFilesPromise, n = await Promise.all(
5527
5527
  i.map(async (s) => {
5528
5528
  const r = u.dirname(s), a = u.join(r, "assets");
5529
- return await q(a) ? as(a, r) : void 0;
5529
+ return await z(a) ? rs(a, r) : void 0;
5530
5530
  })
5531
5531
  );
5532
- return await t && n.push(cs), n.filter(D);
5532
+ return await t && n.push(os), n.filter(j);
5533
5533
  }
5534
- const as = (e, t) => ({
5534
+ const rs = (e, t) => ({
5535
5535
  type: "directory",
5536
5536
  source: e,
5537
5537
  destination: u.basename(t)
5538
- }), cs = { type: "directory", source: "assets/", destination: "" };
5539
- function pl(e) {
5538
+ }), os = { type: "directory", source: "assets/", destination: "" };
5539
+ function ll(e) {
5540
5540
  const { stencilCompatibility: t } = e.options.build?.ssr ?? {};
5541
5541
  if (t?.enabled === !0)
5542
5542
  return {
@@ -5588,7 +5588,7 @@ export * from "@arcgis/lumina/stencilSsrCompatibility";`;
5588
5588
  }
5589
5589
  };
5590
5590
  }
5591
- const dt = "@arcgis/lumina:printTotalBuildSize", ul = (e) => ({
5591
+ const dt = "@arcgis/lumina:printTotalBuildSize", dl = (e) => ({
5592
5592
  name: dt,
5593
5593
  apply: () => e.viteCommand === "build",
5594
5594
  configResolved(t) {
@@ -5599,16 +5599,16 @@ const dt = "@arcgis/lumina:printTotalBuildSize", ul = (e) => ({
5599
5599
  }
5600
5600
  const n = i.writeBundle;
5601
5601
  if (typeof n != "function")
5602
- throw Error(w(dt, "Expected vite:reporter to declare a writeBundle() function"));
5602
+ throw Error(b(dt, "Expected vite:reporter to declare a writeBundle() function"));
5603
5603
  i.writeBundle = async function(r, a) {
5604
5604
  let c = 0, l = 0, d = 0, p = 0;
5605
5605
  const m = console.log;
5606
5606
  console.log = function(...y) {
5607
5607
  if (m.apply(console, y), y.length === 1 && typeof y[0] == "string") {
5608
- const [h, g] = y[0].match(fl) ?? [];
5608
+ const [h, g] = y[0].match(ul) ?? [];
5609
5609
  if (!h)
5610
5610
  return;
5611
- p || (p = y[0].slice(0, y[0].indexOf(h) + h.length).replaceAll(yl, "").length);
5611
+ p || (p = y[0].slice(0, y[0].indexOf(h) + h.length).replaceAll(ml, "").length);
5612
5612
  const v = Number.parseFloat(h.replace(" kB", "").replaceAll(",", ""));
5613
5613
  g ? (d += Number.parseFloat(g.replace(" kB", "").replaceAll(",", "")), l += v) : c += v;
5614
5614
  }
@@ -5619,27 +5619,27 @@ const dt = "@arcgis/lumina:printTotalBuildSize", ul = (e) => ({
5619
5619
  console.log = m;
5620
5620
  }
5621
5621
  if (l > 0) {
5622
- const y = d > 0 ? l : c, h = Di(y), g = e.dir.relativeDist;
5622
+ const y = d > 0 ? l : c, h = Ni(y), g = e.dir.relativeDist;
5623
5623
  console.log(
5624
5624
  [
5625
- ji,
5625
+ Fi,
5626
5626
  g,
5627
- ml,
5627
+ pl,
5628
5628
  "*",
5629
5629
  " ".repeat(p - `${g}*`.length - h.length),
5630
5630
  h,
5631
- Ni,
5632
- d > 0 ? ` ${ji}│ gzip: ${Di(d)}${Ni}` : ""
5631
+ Li,
5632
+ d > 0 ? ` ${Fi}│ gzip: ${Ni(d)}${Li}` : ""
5633
5633
  ].join("")
5634
5634
  );
5635
5635
  }
5636
5636
  };
5637
5637
  }
5638
- }), Ni = "\x1B[22m\x1B[1m\x1B[22m", ji = "\x1B[2m", ml = "\x1B[22m\x1B[36m", fl = /\d+(?:,\d+)?\.\d{2} kB/gu, yl = /\x1B\[\d+m/gu, hl = new Intl.NumberFormat("en", {
5638
+ }), Li = "\x1B[22m\x1B[1m\x1B[22m", Fi = "\x1B[2m", pl = "\x1B[22m\x1B[36m", ul = /\d+(?:,\d+)?\.\d{2} kB/gu, ml = /\x1B\[\d+m/gu, fl = new Intl.NumberFormat("en", {
5639
5639
  maximumFractionDigits: 2,
5640
5640
  minimumFractionDigits: 2
5641
- }), Di = (e) => `${hl.format(e)} kB`, Ri = "@arcgis/lumina:configureVite", gl = (e) => ({
5642
- name: Ri,
5641
+ }), Ni = (e) => `${fl.format(e)} kB`, Di = "@arcgis/lumina:configureVite", yl = (e) => ({
5642
+ name: Di,
5643
5643
  async config({
5644
5644
  server: t,
5645
5645
  publicDir: i,
@@ -5655,7 +5655,7 @@ const dt = "@arcgis/lumina:printTotalBuildSize", ul = (e) => ({
5655
5655
  */
5656
5656
  loader: "src/loader.ts",
5657
5657
  // Entrypoint for bundling used components only:
5658
- ...await eo(e)
5658
+ ...await Zr(e)
5659
5659
  }, { loader: h, ...g } = y, v = e.environment === "development" || e.isInTest ? {
5660
5660
  "process.env.ESRI_INTERNAL": "true"
5661
5661
  } : void 0, S = !import.meta.url.includes("node_modules"), E = {
@@ -5688,7 +5688,7 @@ const dt = "@arcgis/lumina:printTotalBuildSize", ul = (e) => ({
5688
5688
  * will be consider external and discovered by Vite based on "entries"
5689
5689
  * above, so we don't need to include it here.
5690
5690
  */
5691
- include: Array.from(jt).filter(($) => !$.startsWith("@arcgis")),
5691
+ include: Array.from(Dt).filter(($) => !$.startsWith("@arcgis")),
5692
5692
  /**
5693
5693
  * Workaround for https://github.com/vitejs/vite/issues/18947. Affects all
5694
5694
  * runtime dependencies that are defined inside the monorepo, but are also
@@ -5712,7 +5712,7 @@ const dt = "@arcgis/lumina:printTotalBuildSize", ul = (e) => ({
5712
5712
  if (typeof l.setupFiles == "string" ? l.setupFiles = [...lt, l.setupFiles] : Array.isArray(l.setupFiles) ? l.setupFiles = [...lt, ...l.setupFiles] : l.setupFiles = [...lt], e.isInPuppeteerTestBackEnd) {
5713
5713
  if (p?.enabled === !0)
5714
5714
  throw Error(
5715
- w(Ri, "Can't enable both Vitest browser mode and Puppeteer testing at the same time")
5715
+ b(Di, "Can't enable both Vitest browser mode and Puppeteer testing at the same time")
5716
5716
  );
5717
5717
  return {
5718
5718
  test: {
@@ -5746,7 +5746,7 @@ const dt = "@arcgis/lumina:printTotalBuildSize", ul = (e) => ({
5746
5746
  publicDir: i ?? !1,
5747
5747
  build: {
5748
5748
  cssMinify: n ?? (e.environment === "production" ? !0 : void 0),
5749
- target: s ?? Hn(e.typeScriptConfig),
5749
+ target: s ?? Bn(e.typeScriptConfig),
5750
5750
  sourcemap: r ?? (e.environment === "development" ? "inline" : e.options.build?.enableSourceMapsInProduction ?? !1),
5751
5751
  lib: {
5752
5752
  entry: y,
@@ -5775,27 +5775,27 @@ const dt = "@arcgis/lumina:printTotalBuildSize", ul = (e) => ({
5775
5775
  browser: {
5776
5776
  enabled: e.isInPuppeteerTestFrontEnd ? !1 : p?.enabled ?? !0,
5777
5777
  instances: p?.instances === void 0 ? [{ browser: "chromium" }] : void 0,
5778
- provider: p?.provider ?? _s
5778
+ provider: p?.provider ?? Ws
5779
5779
  }
5780
5780
  }
5781
5781
  };
5782
5782
  }
5783
- }), vl = (e) => ({
5783
+ }), hl = (e) => ({
5784
5784
  name: "@arcgis/lumina:setAssetPath",
5785
5785
  apply: () => e.viteCommand === "build",
5786
5786
  config: (t) => ({
5787
- base: t.base ?? e.options.assets?.defaultPath ?? Ue()
5787
+ base: t.base ?? e.options.assets?.defaultPath ?? qe()
5788
5788
  })
5789
5789
  });
5790
- function Sl(e = R()) {
5790
+ function gl(e = R()) {
5791
5791
  const t = e.version ?? "0.0.1";
5792
- return $s(t);
5792
+ return Es(t);
5793
5793
  }
5794
- const bl = (e) => `/*! ${e} */`, A = (e) => (t, i) => {
5794
+ const vl = (e) => `/*! ${e} */`, A = (e) => (t, i) => {
5795
5795
  Object.defineProperty(t, i, {
5796
5796
  get() {
5797
5797
  throw Error(
5798
- w(
5798
+ b(
5799
5799
  "@arcgis/lumina:context",
5800
5800
  `Tried to access '${String(i)}' before it was set. You can't access this property in global scope. However, it will be accessible by the time the following Vite plugin hook is called: ${e}`
5801
5801
  )
@@ -5816,7 +5816,7 @@ const bl = (e) => `/*! ${e} */`, A = (e) => (t, i) => {
5816
5816
  function de(e) {
5817
5817
  if (u.isAbsolute(e))
5818
5818
  throw Error(
5819
- w(
5819
+ b(
5820
5820
  "@arcgis/lumina:context",
5821
5821
  `Documentation file name was expected to be a relative path (relative to dist). Instead, received an absolute path: ${e}`
5822
5822
  )
@@ -5830,14 +5830,14 @@ const pe = {
5830
5830
  apiJson: "docs/api.json",
5831
5831
  stencilLikeDocsJson: "docs/docs.json"
5832
5832
  };
5833
- async function ls(e, t, i, n, s = R()) {
5834
- const r = wl(e, i, n, s), a = u.join(t, "lumina.ts"), l = await q(a) ? await J(a, "utf8") : "";
5833
+ async function as(e, t, i, n, s = R()) {
5834
+ const r = Sl(e, i, n, s), a = u.join(t, "lumina.ts"), l = await z(a) ? await J(a, "utf8") : "";
5835
5835
  if (l === r)
5836
5836
  return !1;
5837
5837
  if (process.env.CI) {
5838
5838
  const d = (p) => Array.from(p, (m) => m.codePointAt(0).toString(16).padStart(4, "0")).join(",");
5839
5839
  throw Error(
5840
- w(
5840
+ b(
5841
5841
  "@arcgis/lumina:updateLuminaTs",
5842
5842
  `lumina.ts is out of date. Start the vite dev server or build locally at least once to update lumina.ts and commit the updated file. Tried to write the following content:
5843
5843
 
@@ -5851,9 +5851,9 @@ Hex current content: ${d(l)}`
5851
5851
  )
5852
5852
  );
5853
5853
  }
5854
- return zi(a, r), !0;
5854
+ return _i(a, r), !0;
5855
5855
  }
5856
- function wl(e, t, i, n = R()) {
5856
+ function Sl(e, t, i, n = R()) {
5857
5857
  "@arcgis/components-controllers" in (n.dependencies ?? {}) && C.warn(
5858
5858
  "@arcgis/components-controllers",
5859
5859
  "Deprecation warning: the @arcgis/components-controllers package was merged into @arcgis/lumina. Please remove it from your package.json and rewrite code to import from @arcgis/lumina/controllers and @arcgis/lumina/controllers/accessor instead."
@@ -5868,11 +5868,11 @@ declare module "@arcgis/lumina" {
5868
5868
  interface ImportStencilElements extends ${r.map((m, f) => `JSX$${f}.IntrinsicElements`).join(", ")} {}
5869
5869
  }`, l = n.devDependencies ?? {}, d = i === "preview" ? "matchers" : i === "webdriverio" ? "webdriverio" : "playwright";
5870
5870
  return [
5871
- Tl,
5871
+ wl,
5872
5872
  // Avoid cyclic references for tests in @arcgis/lumina
5873
5873
  n.name === "@arcgis/lumina" ? "" : `
5874
5874
  /// <reference types="@arcgis/lumina/typings" />`,
5875
- t ? El : "",
5875
+ t ? bl : "",
5876
5876
  l.vitest ? `
5877
5877
  /// <reference types="vitest/config" />` : "",
5878
5878
  l["@vitest/browser"] ? `
@@ -5886,7 +5886,7 @@ declare module "@arcgis/lumina" {
5886
5886
  `
5887
5887
  ].join("");
5888
5888
  }
5889
- const Tl = `/**
5889
+ const wl = `/**
5890
5890
  * This file is autogenerated by \`@arcgis/lumina-compiler\` - do not edit it manually.
5891
5891
  * Manual edits will be overwritten.
5892
5892
  *
@@ -5894,8 +5894,8 @@ const Tl = `/**
5894
5894
  * as well as @arcgis/core typings if you use @arcgis/core.
5895
5895
  *
5896
5896
  * If you need to provide additional typings, create a separate file.
5897
- */`, El = `
5898
- /// <reference types="@arcgis/core/interfaces" />`, je = "@arcgis/lumina:dependencySupport", ds = (e, t) => e.viteCommand === "serve" && /**
5897
+ */`, bl = `
5898
+ /// <reference types="@arcgis/core/interfaces" />`, De = "@arcgis/lumina:dependencySupport", cs = (e, t) => e.viteCommand === "serve" && /**
5899
5899
  * Vitest started calling transformIndexHtml in browser mode versions ^2.1.4
5900
5900
  * However, it is a bit buggy (see
5901
5901
  * https://github.com/vitejs/vite/issues/19213). Instead, we are using test
@@ -5906,18 +5906,18 @@ const Tl = `/**
5906
5906
  * is doing:
5907
5907
  * https://github.com/storybookjs/storybook/blob/a5c2cf1712f70b4e3ecf38d3c98e7db8e8d67849/code/builders/builder-vite/src/plugins/code-generator-plugin.ts#L110
5908
5908
  */
5909
- e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand === "build" && !e.options.build?.cdn?.skip && e.options.build?.webApp?.destination !== void 0, Cl = (e) => ({
5910
- name: je,
5909
+ e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand === "build" && !e.options.build?.cdn?.skip && e.options.build?.webApp?.destination !== void 0, Tl = (e) => ({
5910
+ name: De,
5911
5911
  configResolved() {
5912
- !e.isInTest && !e.isInStorybook && (e._updateLuminaTsPromise = $l(e).catch(
5913
- (t) => C.error(je, `Failed to update package's src/lumina.ts: ${String(t)}`)
5912
+ !e.isInTest && !e.isInStorybook && (e._updateLuminaTsPromise = El(e).catch(
5913
+ (t) => C.error(De, `Failed to update package's src/lumina.ts: ${String(t)}`)
5914
5914
  ));
5915
5915
  },
5916
5916
  transformIndexHtml: {
5917
5917
  // Add imports to index.html before Vite starts resolving imports
5918
5918
  order: "pre",
5919
5919
  async handler(t, i) {
5920
- return ds(e, i) ? (await Te(e)).map(
5920
+ return cs(e, i) ? (await Te(e)).map(
5921
5921
  (s) => "javascriptCode" in s ? {
5922
5922
  tag: "script",
5923
5923
  attrs: {
@@ -5949,7 +5949,7 @@ e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand
5949
5949
  return n.optimizableImports;
5950
5950
  if ("cssHref" in n)
5951
5951
  return [];
5952
- throw Error(w(je, `Unexpected loader type: ${JSON.stringify(n)}`));
5952
+ throw Error(b(De, `Unexpected loader type: ${JSON.stringify(n)}`));
5953
5953
  });
5954
5954
  e.viteConfig.optimizeDeps.include ??= [], e.viteConfig.optimizeDeps.include.push(...i);
5955
5955
  },
@@ -5957,9 +5957,9 @@ e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand
5957
5957
  await e._updateLuminaTsPromise;
5958
5958
  }
5959
5959
  });
5960
- async function $l(e) {
5961
- const i = (await Promise.all([ve, Yn(e)])).flat();
5962
- if (!await ls(
5960
+ async function El(e) {
5961
+ const i = (await Promise.all([ve, Qn(e)])).flat();
5962
+ if (!await as(
5963
5963
  i,
5964
5964
  e.dir.src,
5965
5965
  Qe,
@@ -5968,22 +5968,22 @@ async function $l(e) {
5968
5968
  return;
5969
5969
  let s = !1;
5970
5970
  function r() {
5971
- s || C.warn(je, xl), s = !0;
5971
+ s || C.warn(De, Cl), s = !0;
5972
5972
  }
5973
5973
  process.on("exit", () => {
5974
5974
  r(), clearTimeout(c);
5975
5975
  });
5976
5976
  const c = setTimeout(r, 2e3);
5977
5977
  }
5978
- const xl = Ws.greenBright(
5978
+ const Cl = Js.greenBright(
5979
5979
  `lumina.ts has been updated (potentially because your dependencies changed). Please commit the updated file.
5980
5980
  If build failed with TypeScript errors, try running the build again to check whether new lumina.ts resolves the errors.`
5981
5981
  );
5982
- async function Pl(e, t) {
5982
+ async function $l(e, t) {
5983
5983
  const i = /* @__PURE__ */ new Map();
5984
5984
  await Promise.all(
5985
5985
  e.map(async (s) => {
5986
- const r = await J(s, "utf-8"), a = r.match(Al)?.[1];
5986
+ const r = await J(s, "utf-8"), a = r.match(Pl)?.[1];
5987
5987
  if (a === void 0) {
5988
5988
  C.warn(
5989
5989
  "@arcgis/lumina:parseStoryFiles",
@@ -5995,14 +5995,14 @@ async function Pl(e, t) {
5995
5995
  let c = i.get(a);
5996
5996
  c === void 0 && (c = [], i.set(a, c));
5997
5997
  const l = [];
5998
- for (const d of r.matchAll(kl)) {
5999
- const p = d[1], m = Nl(p), f = r.indexOf("{", d.index), y = r.indexOf("}", f), h = r.slice(0, d.index).trimEnd();
5998
+ for (const d of r.matchAll(xl)) {
5999
+ const p = d[1], m = Ll(p), f = r.indexOf("{", d.index), y = r.indexOf("}", f), h = r.slice(0, d.index).trimEnd();
6000
6000
  let g = "";
6001
6001
  if (h.endsWith("*/")) {
6002
6002
  const E = h.lastIndexOf("/**");
6003
- g = h.slice(E + 3, -2).trim().replaceAll(Ll, "");
6003
+ g = h.slice(E + 3, -2).trim().replaceAll(kl, "");
6004
6004
  }
6005
- const v = r.slice(f, y).match(Il)?.[1] || m, S = Fl(m);
6005
+ const v = r.slice(f, y).match(Al)?.[1] || m, S = Il(m);
6006
6006
  l.push({
6007
6007
  description: `${v}${g ? `
6008
6008
  ${g}` : ""}`,
@@ -6027,14 +6027,14 @@ ${g}` : ""}`,
6027
6027
  }
6028
6028
  return n;
6029
6029
  }
6030
- const Al = /component: ["']([^"']+)["']/u, kl = /export const (\w+)/gu, Il = /name: ["']([^"']+)["']/u, Ll = /^\s*\*\s?/gmu, Fl = (e) => e.toLowerCase().replace(/[ ’–—―′¿'`~!@#$%^&*()_|+\-=?;:'",.<>{}[\]\\/]/giu, "-").replace(/-+/gu, "-").replace(/^-+/u, "").replace(/-+$/u, ""), Nl = (e) => e.replace(/_/gu, " ").replace(/-/gu, " ").replace(/\./gu, " ").replace(/([^\n])([A-Z])([a-z])/gu, (t, i, n, s) => `${i} ${n}${s}`).replace(/([a-z])([A-Z])/gu, (t, i, n) => `${i} ${n}`).replace(/([a-z])([0-9])/giu, (t, i, n) => `${i} ${n}`).replace(/([0-9])([a-z])/giu, (t, i, n) => `${i} ${n}`).replace(/(\s|^)(\w)/gu, (t, i, n) => `${i}${n.toUpperCase()}`).replace(/ +/gu, " ").trim();
6031
- var jl = Object.defineProperty, k = (e, t, i, n) => {
6030
+ const Pl = /component: ["']([^"']+)["']/u, xl = /export const (\w+)/gu, Al = /name: ["']([^"']+)["']/u, kl = /^\s*\*\s?/gmu, Il = (e) => e.toLowerCase().replace(/[ ’–—―′¿'`~!@#$%^&*()_|+\-=?;:'",.<>{}[\]\\/]/giu, "-").replace(/-+/gu, "-").replace(/^-+/u, "").replace(/-+$/u, ""), Ll = (e) => e.replace(/_/gu, " ").replace(/-/gu, " ").replace(/\./gu, " ").replace(/([^\n])([A-Z])([a-z])/gu, (t, i, n, s) => `${i} ${n}${s}`).replace(/([a-z])([A-Z])/gu, (t, i, n) => `${i} ${n}`).replace(/([a-z])([0-9])/giu, (t, i, n) => `${i} ${n}`).replace(/([0-9])([a-z])/giu, (t, i, n) => `${i} ${n}`).replace(/(\s|^)(\w)/gu, (t, i, n) => `${i}${n.toUpperCase()}`).replace(/ +/gu, " ").trim();
6031
+ var Fl = Object.defineProperty, k = (e, t, i, n) => {
6032
6032
  for (var s = void 0, r = e.length - 1, a; r >= 0; r--)
6033
6033
  (a = e[r]) && (s = a(t, i, s) || s);
6034
- return s && jl(t, i, s), s;
6034
+ return s && Fl(t, i, s), s;
6035
6035
  };
6036
6036
  const ie = "@arcgis/lumina:context";
6037
- class P {
6037
+ class x {
6038
6038
  constructor(t) {
6039
6039
  this.typeScriptProgram = void 0, this.typeScriptTypeChecker = void 0, this.typeScriptWatchProgram = void 0, this._typeScriptSourceFiles = /* @__PURE__ */ new Map(), this._typeScriptReload = void 0, this._plugin = {
6040
6040
  name: ie,
@@ -6047,7 +6047,7 @@ class P {
6047
6047
  this.viteConfig = s;
6048
6048
  const r = s.build.minify !== !1;
6049
6049
  this.shouldMinify = r && this.viteCommand !== "serve", Object.hasOwn(this, "shouldMinifyJsx") || (this.shouldMinifyJsx = this.viteCommand !== "serve" || this.isInTest);
6050
- const a = u.join(s.root, u.sep), c = u.join(a, "src", u.sep), l = u.join(c, "components", u.sep), d = u.join(u.resolve(a, s.build.outDir), u.sep), p = u.join(u.relative(a, d), u.sep), m = u.join(d, "components", u.sep), f = u.join(d, this.options.build?.cdn?.namespace ?? Dt, u.sep), y = u.join(f, "assets", u.sep);
6050
+ const a = u.join(s.root, u.sep), c = u.join(a, "src", u.sep), l = u.join(c, "components", u.sep), d = u.join(u.resolve(a, s.build.outDir), u.sep), p = u.join(u.relative(a, d), u.sep), m = u.join(d, "components", u.sep), f = u.join(d, this.options.build?.cdn?.namespace ?? jt, u.sep), y = u.join(f, "assets", u.sep);
6051
6051
  if (this.dir = {
6052
6052
  root: a,
6053
6053
  src: c,
@@ -6057,9 +6057,9 @@ class P {
6057
6057
  distComponents: m,
6058
6058
  distCdn: f,
6059
6059
  distCdnAssets: y
6060
- }, C.initialize(s.logger, a), s.root !== Bi())
6060
+ }, C.initialize(s.logger, a), s.root !== Ki())
6061
6061
  throw Error(
6062
- w(
6062
+ b(
6063
6063
  ie,
6064
6064
  "Vite's config.root is not equal process.cwd(). This is not officially supported by Lumina and may lead to unexpected behavior. If you need this to be supported, comment on https://devtopia.esri.com/WebGIS/arcgis-web-components/issues/2126 or contact Lumina maintainers."
6065
6065
  )
@@ -6072,9 +6072,9 @@ class P {
6072
6072
  "Vite output directory is outside the root directory. This is not officially supported by Lumina and may lead to unexpected behavior. Contact Lumina maintainers if you need this to be supported."
6073
6073
  ), this.isInStorybook = s.resolve.conditions.includes("storybook"), this.isFullApiExtraction = this.viteCommand === "build" || this.isInStorybook, this.hmrEnabled = this.viteCommand === "serve" && !this.isInTest && !!(s.server?.hmr ?? !0);
6074
6074
  const h = this.options.documentation?.publicStoryUrlPrefix;
6075
- this.isFullApiExtraction && typeof h == "string" ? this.componentStoriesPromise = this.componentFilesPromise.then(async () => await Pl(this.componentStoryFiles, h)).then((g) => {
6075
+ this.isFullApiExtraction && typeof h == "string" ? this.componentStoriesPromise = this.componentFilesPromise.then(async () => await $l(this.componentStoryFiles, h)).then((g) => {
6076
6076
  this.componentStories = g;
6077
- }) : (this.componentStoriesPromise = void 0, this.componentStories = void 0), Rc(this, s.build.sourcemap !== !1), ds(this) && Te(this);
6077
+ }) : (this.componentStoriesPromise = void 0, this.componentStories = void 0), Dc(this, s.build.sourcemap !== !1), cs(this) && Te(this);
6078
6078
  }
6079
6079
  },
6080
6080
  configureServer: {
@@ -6083,7 +6083,7 @@ class P {
6083
6083
  this._serverConfigured = !0;
6084
6084
  }
6085
6085
  }
6086
- }, this._localDefinedComponents = void 0, this._cssImports = /* @__PURE__ */ new Map(), this._cssDocs = void 0, this.isInCi = !!process.env.CI, this._declarationTextTransformers = [], this._serverConfigured = !1, this.assetsToProvide = [], this._globalCssString = void 0, this._loadersCache = void 0, this._serveOnlyDependencies = void 0, this._customElementDependencies = {}, this._htmlElementReferencesReplacer = void 0, this._silencedRules = void 0, this._updateLuminaTsPromise = void 0, this.options = t;
6086
+ }, this._localDefinedComponents = void 0, this._cssImports = /* @__PURE__ */ new Map(), this._cssDocs = void 0, this.isInCi = !!process.env.CI, this._declarationTextTransformers = [], this._serverConfigured = !1, this.assetsToProvide = [], this._globalCssString = void 0, this._loadersCache = void 0, this._serveOnlyDependencies = void 0, this._customElementDependencies = {}, this._htmlElementReferencesReplacer = void 0, this._silencedRules = void 0, this._updateLuminaTsPromise = void 0, this.normalizedDocumentationUrl = "developers.arcgis.com", this.alternativeDocumentationUrl = "next.sites.afd.arcgis.com", this.options = t;
6087
6087
  const i = t.documentation ?? {};
6088
6088
  this._documentationFileNames = {
6089
6089
  apiJson: i.apiJsonFileName === !1 ? void 0 : i.apiJsonFileName ? de(i.apiJsonFileName) : pe.apiJson,
@@ -6091,14 +6091,17 @@ class P {
6091
6091
  webTypes: i.jetBrains === !1 ? void 0 : i.jetBrains?.webTypesFileName ? de(i.jetBrains.webTypesFileName) : pe.webTypes,
6092
6092
  vsCodeHtml: i.vsCode === !1 ? void 0 : i.vsCode?.htmlFileName ? de(i.vsCode.htmlFileName) : pe.vsCodeHtml,
6093
6093
  vsCodeCss: i.vsCode === !1 ? void 0 : i.vsCode?.cssFileName ? de(i.vsCode.cssFileName) : pe.vsCodeCss
6094
- }, wn(), this.componentFilesPromise = Pt(this, u.resolve("src/components")), Dc(this);
6095
- const n = t.build?.preamble ?? Sl();
6096
- this.banner = bl(n);
6094
+ }, Sn(), this.componentFilesPromise = xt(this, u.resolve("src/components")), Nc(this);
6095
+ const n = t.build?.preamble ?? gl();
6096
+ this.banner = vl(n);
6097
6097
  }
6098
6098
  _inferBuildSetup({ command: t, mode: i }, n) {
6099
6099
  this.isInTest = process.env.NODE_ENV === "test", i === "production" || i === "development" ? this.environment = i : i === "test" || i === "benchmark" ? (this.environment = "development", this.isInTest = !0) : (C.warn(At, `Vite is running in unknown mode "${i}". Assuming development`), this.environment = "development"), this.viteCommand = t;
6100
6100
  const s = n?.__IS_IN_PUPPETEER__ === !0, r = this.viteCommand === "serve" && this.isInTest && this.options.puppeteerTesting?.enabled === !0;
6101
- this.isInPuppeteerTestBackEnd = r && !s, this.isInPuppeteerTestFrontEnd = r && s, i === "production" && (this._silencedRules = this.options.linting?.silence);
6101
+ this.isInPuppeteerTestBackEnd = r && !s, this.isInPuppeteerTestFrontEnd = r && s, i === "production" ? this._silencedRules = this.options.linting?.silence : [this.normalizedDocumentationUrl, this.alternativeDocumentationUrl] = [
6102
+ this.alternativeDocumentationUrl,
6103
+ this.normalizedDocumentationUrl
6104
+ ];
6102
6105
  }
6103
6106
  /**
6104
6107
  * Get TypeScript ts.SourceFile based on file name and code. Reuses existing
@@ -6112,7 +6115,7 @@ class P {
6112
6115
  return n;
6113
6116
  } else {
6114
6117
  if (this.viteCommand === "build" || this.isInStorybook)
6115
- throw Error(w(ie, t, "Unable to find the TypeScript source file"));
6118
+ throw Error(b(ie, t, "Unable to find the TypeScript source file"));
6116
6119
  {
6117
6120
  const r = this._typeScriptSourceFiles.get(t);
6118
6121
  r !== void 0 && r.text === i && (n = r);
@@ -6160,7 +6163,7 @@ class P {
6160
6163
  n === "serve" && fe(this, t, i);
6161
6164
  else
6162
6165
  throw Error(
6163
- w(
6166
+ b(
6164
6167
  ie,
6165
6168
  "It is too late to call provideAssets() as Vite already wrote the bundle to disk. Please call provideAssets() before Vite's writeBundle()"
6166
6169
  )
@@ -6175,80 +6178,80 @@ class P {
6175
6178
  }
6176
6179
  k([
6177
6180
  A("buildStart() in build mode or load() serve mode")
6178
- ], P.prototype, "typeScriptHost");
6181
+ ], x.prototype, "typeScriptHost");
6179
6182
  k([
6180
6183
  A("configResolved()")
6181
- ], P.prototype, "shouldMinify");
6184
+ ], x.prototype, "shouldMinify");
6182
6185
  k([
6183
6186
  A("configResolved()")
6184
- ], P.prototype, "shouldMinifyJsx");
6187
+ ], x.prototype, "shouldMinifyJsx");
6185
6188
  k([
6186
6189
  A("configResolved()")
6187
- ], P.prototype, "dir");
6190
+ ], x.prototype, "dir");
6188
6191
  k([
6189
6192
  A("load()")
6190
- ], P.prototype, "apiJson");
6193
+ ], x.prototype, "apiJson");
6191
6194
  k([
6192
6195
  A("load()")
6193
- ], P.prototype, "apiJsonComponents");
6196
+ ], x.prototype, "apiJsonComponents");
6194
6197
  k([
6195
6198
  A("load()")
6196
- ], P.prototype, "privateApiJson");
6199
+ ], x.prototype, "privateApiJson");
6197
6200
  k([
6198
6201
  A("load() when in build mode")
6199
- ], P.prototype, "_componentPathMapping");
6202
+ ], x.prototype, "_componentPathMapping");
6200
6203
  k([
6201
6204
  A("apply()")
6202
- ], P.prototype, "environment");
6205
+ ], x.prototype, "environment");
6203
6206
  k([
6204
6207
  A("apply()")
6205
- ], P.prototype, "isInTest");
6208
+ ], x.prototype, "isInTest");
6206
6209
  k([
6207
6210
  A("apply()")
6208
- ], P.prototype, "isInPuppeteerTestBackEnd");
6211
+ ], x.prototype, "isInPuppeteerTestBackEnd");
6209
6212
  k([
6210
6213
  A("apply()")
6211
- ], P.prototype, "isInPuppeteerTestFrontEnd");
6214
+ ], x.prototype, "isInPuppeteerTestFrontEnd");
6212
6215
  k([
6213
6216
  A("configResolved()")
6214
- ], P.prototype, "isInStorybook");
6217
+ ], x.prototype, "isInStorybook");
6215
6218
  k([
6216
6219
  A("configResolved()")
6217
- ], P.prototype, "hmrEnabled");
6220
+ ], x.prototype, "hmrEnabled");
6218
6221
  k([
6219
6222
  A("apply()")
6220
- ], P.prototype, "viteCommand");
6223
+ ], x.prototype, "viteCommand");
6221
6224
  k([
6222
6225
  A("configResolved()")
6223
- ], P.prototype, "isFullApiExtraction");
6226
+ ], x.prototype, "isFullApiExtraction");
6224
6227
  k([
6225
6228
  A("configResolved()")
6226
- ], P.prototype, "viteConfig");
6229
+ ], x.prototype, "viteConfig");
6227
6230
  k([
6228
6231
  A("configResolved()")
6229
- ], P.prototype, "server");
6232
+ ], x.prototype, "server");
6230
6233
  k([
6231
6234
  A("load()")
6232
- ], P.prototype, "componentFiles");
6235
+ ], x.prototype, "componentFiles");
6233
6236
  k([
6234
6237
  A("load()")
6235
- ], P.prototype, "componentStoryFiles");
6238
+ ], x.prototype, "componentStoryFiles");
6236
6239
  k([
6237
6240
  A("configResolved()")
6238
- ], P.prototype, "componentStoriesPromise");
6241
+ ], x.prototype, "componentStoriesPromise");
6239
6242
  k([
6240
6243
  A("load()")
6241
- ], P.prototype, "componentStories");
6244
+ ], x.prototype, "componentStories");
6242
6245
  k([
6243
6246
  A("transform()")
6244
- ], P.prototype, "_globalHydratedCssString");
6247
+ ], x.prototype, "_globalHydratedCssString");
6245
6248
  k([
6246
6249
  A("configResolved()")
6247
- ], P.prototype, "_compilerOptionsForPrinter");
6250
+ ], x.prototype, "_compilerOptionsForPrinter");
6248
6251
  k([
6249
6252
  A("configResolved()")
6250
- ], P.prototype, "_typeScriptPrinter");
6251
- const pt = "@arcgis/lumina:addNonLazyImports", Dl = (e) => ({
6253
+ ], x.prototype, "_typeScriptPrinter");
6254
+ const pt = "@arcgis/lumina:addNonLazyImports", Nl = (e) => ({
6252
6255
  name: pt,
6253
6256
  apply: () => e.viteCommand === "build",
6254
6257
  generateBundle(t, i) {
@@ -6256,7 +6259,7 @@ const pt = "@arcgis/lumina:addNonLazyImports", Dl = (e) => ({
6256
6259
  const r = he(n, "components/", e);
6257
6260
  if (r !== n && (s.fileName = r), s.type === "chunk") {
6258
6261
  const a = u.dirname(u.join(e.dir.dist, n)), c = r === n ? a : u.dirname(u.join(e.dir.dist, r));
6259
- s.code = Gi(s.code, e, c, a);
6262
+ s.code = zi(s.code, e, c, a);
6260
6263
  }
6261
6264
  });
6262
6265
  },
@@ -6269,13 +6272,13 @@ const pt = "@arcgis/lumina:addNonLazyImports", Dl = (e) => ({
6269
6272
  i.forEach(([r, { referencedTagNames: a, referencedDeferredTagNames: c, referencedBy: l }]) => {
6270
6273
  if (n.has(r) || a.length === 0 && c.length === 0)
6271
6274
  return;
6272
- const d = ps(t, l, n);
6275
+ const d = ls(t, l, n);
6273
6276
  if (d.forEach((p) => {
6274
6277
  t[p].referencedTagNames.splice(0, 0, ...a), t[p].referencedDeferredTagNames.splice(0, 0, ...c);
6275
6278
  }), (a.length > 0 || c.length > 0) && d.length === 0) {
6276
6279
  const p = Y(r);
6277
6280
  throw Error(
6278
- w(
6281
+ b(
6279
6282
  pt,
6280
6283
  `Unable to determine what files imported ${p}. This is necessary because this file referenced other web components (${[...a, ...c].join(", ")}), and so the compiler needs to know what component entrypoints these imports should be added to. Please double check if you are referencing ${p} in the code dynamically in the way that Lumina cannot detect, and report this issue to the Lumina maintainers.`
6281
6284
  )
@@ -6286,72 +6289,72 @@ const pt = "@arcgis/lumina:addNonLazyImports", Dl = (e) => ({
6286
6289
  if (!n.has(r))
6287
6290
  return [];
6288
6291
  const l = u.dirname(r), d = he(l, e.dir.srcComponents, e), p = u.relative(e.dir.src, d);
6289
- function m(b) {
6290
- const T = mc(uc(e, b, r), p);
6292
+ function m(w) {
6293
+ const T = pc(dc(e, w, r), p);
6291
6294
  if (T !== `./${p}`)
6292
- return T.startsWith(".") ? `${T}/${Mi}` : T;
6295
+ return T.startsWith(".") ? `${T}/${ji}` : T;
6293
6296
  }
6294
- const f = new Set(a), y = new Set(c), h = Array.from(f, m).filter(D), g = (b) => `import "${b}";
6295
- `, v = h.map(g).join(""), S = /* @__PURE__ */ new Set(), E = Array.from(y, (b) => {
6296
- const T = m(b);
6297
+ const f = new Set(a), y = new Set(c), h = Array.from(f, m).filter(j), g = (w) => `import "${w}";
6298
+ `, v = h.map(g).join(""), S = /* @__PURE__ */ new Set(), E = Array.from(y, (w) => {
6299
+ const T = m(w);
6297
6300
  if (T !== void 0) {
6298
- if (f.has(b)) {
6301
+ if (f.has(w)) {
6299
6302
  C.warn(
6300
6303
  pt,
6301
- `"${b}" is used both with and without deferLoad in ${r} (either directly in ${r} or via a functional component). deferLoad will be ignored in this case.`
6304
+ `"${w}" is used both with and without deferLoad in ${r} (either directly in ${r} or via a functional component). deferLoad will be ignored in this case.`
6302
6305
  );
6303
6306
  return;
6304
6307
  }
6305
- return S.add(g(T)), `.set("${b}", () => import("${T}"))
6308
+ return S.add(g(T)), `.set("${w}", () => import("${T}"))
6306
6309
  `;
6307
6310
  }
6308
- }).filter(D), $ = `${v}export * from "./${Tt}";`, I = Array.from(S).join("") + $, x = E.length > 0 ? `import { deferredLoaders } from "@arcgis/lumina";
6311
+ }).filter(j), $ = `${v}export * from "./${Tt}";`, I = Array.from(S).join("") + $, P = E.length > 0 ? `import { deferredLoaders } from "@arcgis/lumina";
6309
6312
  ${$}
6310
6313
  deferredLoaders${E.join("")};` : $;
6311
6314
  return [
6312
- F(u.join(e.dir.dist, p, Mi), x),
6313
- F(u.join(e.dir.dist, p, Rl), I)
6315
+ F(u.join(e.dir.dist, p, ji), P),
6316
+ F(u.join(e.dir.dist, p, Dl), I)
6314
6317
  ];
6315
6318
  });
6316
6319
  await Promise.all(s);
6317
6320
  }
6318
- }), Mi = "index.js", Rl = "index.d.ts", ps = (e, t, i, n = /* @__PURE__ */ new Set()) => t.flatMap((s) => i.has(s) ? [s] : n.has(s) ? [] : (n.add(s), ps(e, e[s].referencedBy, i, n))), Ml = (e) => ({
6321
+ }), ji = "index.js", Dl = "index.d.ts", ls = (e, t, i, n = /* @__PURE__ */ new Set()) => t.flatMap((s) => i.has(s) ? [s] : n.has(s) ? [] : (n.add(s), ls(e, e[s].referencedBy, i, n))), jl = (e) => ({
6319
6322
  name: "@arcgis/lumina:handleDynamicAssets",
6320
6323
  configureServer(t) {
6321
- e.server = t, !e.isInPuppeteerTestBackEnd && Oi(e).forEach(({ assets: i, transformers: n }) => fe(e, i, n));
6324
+ e.server = t, !e.isInPuppeteerTestBackEnd && Ri(e).forEach(({ assets: i, transformers: n }) => fe(e, i, n));
6322
6325
  },
6323
6326
  async writeBundle() {
6324
6327
  await Promise.all(
6325
- Oi(e).map(
6326
- async ({ assets: t, transformers: i }) => await ts(e, t, i)
6328
+ Ri(e).map(
6329
+ async ({ assets: t, transformers: i }) => await Yn(e, t, i)
6327
6330
  )
6328
6331
  );
6329
6332
  }
6330
6333
  });
6331
- function Oi(e) {
6334
+ function Ri(e) {
6332
6335
  const t = [], i = e.assetsToProvide?.filter((n) => n.apply === void 0 || n.apply === e.viteCommand) ?? [];
6333
6336
  return e.options.assets?.extra?.forEach((n) => {
6334
6337
  "type" in n ? t.push(n) : "assets" in n && t.push(...n.assets);
6335
6338
  }), t.length > 0 && i.push({ assets: t }), e.assetsToProvide = void 0, i;
6336
6339
  }
6337
- const bt = "@arcgis/lumina:updatePackageJson", Ol = (e) => ({
6338
- name: bt,
6340
+ const wt = "@arcgis/lumina:updatePackageJson", Rl = (e) => ({
6341
+ name: wt,
6339
6342
  apply: () => e.viteCommand === "serve" && e.environment === "development" && !e.isInTest && !e.isInCi,
6340
6343
  configResolved() {
6341
- Jl(e).catch(
6342
- (t) => C.error(bt, `Failed to update package's package.json:${String(t)}`)
6344
+ Ml(e).catch(
6345
+ (t) => C.error(wt, `Failed to update package's package.json:${String(t)}`)
6343
6346
  );
6344
6347
  }
6345
6348
  });
6346
- async function Jl(e) {
6347
- const t = u.join(e.dir.root, "package.json"), i = JSON.parse(await J(t, "utf-8")), n = Kl(i, e);
6348
- n && zi(t, JSON.stringify(n, null, 2));
6349
+ async function Ml(e) {
6350
+ const t = u.join(e.dir.root, "package.json"), i = JSON.parse(await J(t, "utf-8")), n = Ol(i, e);
6351
+ n && _i(t, JSON.stringify(n, null, 2));
6349
6352
  }
6350
- function Kl(e, t) {
6353
+ function Ol(e, t) {
6351
6354
  const i = e?.devDependencies ?? {};
6352
6355
  Object.keys(e?.peerDependencies ?? {}).forEach((d) => {
6353
6356
  d in i || C.warn(
6354
- bt,
6357
+ wt,
6355
6358
  `Every peerDependency should also be a devDependency, or else some tools will get confused (like Turbo Build). Found "${d}" that is not a devDependency. Please edit your package.json`
6356
6359
  );
6357
6360
  });
@@ -6373,7 +6376,7 @@ function Kl(e, t) {
6373
6376
  const d = s(r.webTypes);
6374
6377
  e["web-types"] !== d && (n = !0, e["web-types"] = d);
6375
6378
  }
6376
- const a = `./${we}.css`, c = t.options.build?.cdn?.namespace !== void 0, l = ee(t.dir.root, u.join(t.dir.dist, a));
6379
+ const a = `./${be}.css`, c = t.options.build?.cdn?.namespace !== void 0, l = ee(t.dir.root, u.join(t.dir.dist, a));
6377
6380
  if (!c) {
6378
6381
  e.exports?.[a] === void 0 && (e.exports ??= {}, e.exports[a] = l, n = !0);
6379
6382
  const d = e.name.split("/").length > 1 ? e.name.split("/")[1] : e.name;
@@ -6383,20 +6386,20 @@ function Kl(e, t) {
6383
6386
  if (n)
6384
6387
  return e;
6385
6388
  }
6386
- const Wl = (e) => ({
6389
+ const Jl = (e) => ({
6387
6390
  timestamp: e.apiJson.timestamp,
6388
6391
  compiler: e.apiJson.compiler,
6389
- components: Bl(e),
6392
+ components: Kl(e),
6390
6393
  typeLibrary: {}
6391
6394
  });
6392
- function Bl(e) {
6395
+ function Kl(e) {
6393
6396
  const t = [];
6394
6397
  for (const i of e.apiJson.modules)
6395
6398
  for (const n of i.declarations)
6396
- "customElement" in n && t.push(_l(n, i.path));
6399
+ "customElement" in n && t.push(Wl(n, i.path));
6397
6400
  return t;
6398
6401
  }
6399
- function _l(e, t) {
6402
+ function Wl(e, t) {
6400
6403
  const i = e.superclass ? [{ name: "superclass", text: JSON.stringify(e.superclass) }] : [];
6401
6404
  return {
6402
6405
  filePath: t,
@@ -6411,9 +6414,9 @@ function _l(e, t) {
6411
6414
  dependencies: [],
6412
6415
  dependencyGraph: {},
6413
6416
  deprecation: typeof e.deprecated == "boolean" ? e.deprecated ? "" : void 0 : e.deprecated,
6414
- props: e.members.map(Hl).filter(D),
6415
- methods: e.members.map(zl).filter(D),
6416
- events: e.events?.map(ql) ?? [],
6417
+ props: e.members.map(Bl).filter(j),
6418
+ methods: e.members.map(_l).filter(j),
6419
+ events: e.events?.map(Hl) ?? [],
6417
6420
  styles: e.cssProperties?.map((n) => ({
6418
6421
  name: n.name,
6419
6422
  annotation: "prop",
@@ -6425,7 +6428,7 @@ function _l(e, t) {
6425
6428
  listeners: []
6426
6429
  };
6427
6430
  }
6428
- function Hl(e) {
6431
+ function Bl(e) {
6429
6432
  if (e.kind !== "field")
6430
6433
  return;
6431
6434
  const t = e, i = t.inheritedFrom ? [{ name: "inheritedFrom", text: JSON.stringify(t.inheritedFrom) }] : [], n = t.readonly ? [{ name: "readonly", text: "" }] : [], s = t.docsTags?.some((r) => r.name === "required") ?? !1;
@@ -6459,14 +6462,14 @@ const Ot = (e) => Object.fromEntries(
6459
6462
  (t) => [
6460
6463
  t.name,
6461
6464
  {
6462
- location: t.package === _i ? "global" : t.package === void 0 ? "local" : "import",
6465
+ location: t.package === Wi ? "global" : t.package === void 0 ? "local" : "import",
6463
6466
  path: typeof t.module == "string" && typeof t.package == "string" ? u.join(t.package, t.module) : t.module ?? t.package,
6464
6467
  id: "notImplemented"
6465
6468
  }
6466
6469
  ]
6467
6470
  ) ?? []
6468
6471
  );
6469
- function zl(e) {
6472
+ function _l(e) {
6470
6473
  if (e.kind !== "method")
6471
6474
  return;
6472
6475
  const t = e, i = e.inheritedFrom ? [{ name: "inheritedFrom", text: JSON.stringify(e.inheritedFrom) }] : [], n = t.parameters?.map(({ name: s, type: r, description: a }) => ({
@@ -6497,7 +6500,7 @@ function zl(e) {
6497
6500
  deprecation: typeof t.deprecated == "boolean" ? t.deprecated ? "" : void 0 : t.deprecated
6498
6501
  };
6499
6502
  }
6500
- function ql(e) {
6503
+ function Hl(e) {
6501
6504
  const t = e.inheritedFrom ? [{ name: "inheritedFrom", text: JSON.stringify(e.inheritedFrom) }] : [];
6502
6505
  return {
6503
6506
  event: e.name,
@@ -6515,12 +6518,12 @@ function ql(e) {
6515
6518
  deprecation: typeof e.deprecated == "boolean" ? e.deprecated ? "" : void 0 : e.deprecated
6516
6519
  };
6517
6520
  }
6518
- const us = (e) => e.flatMap(
6521
+ const ds = (e) => e.flatMap(
6519
6522
  (t) => t.cssProperties?.map((i) => ({
6520
6523
  name: i.name,
6521
6524
  description: i.description || void 0
6522
6525
  })) ?? []
6523
- ), ms = (e) => e.flatMap(
6526
+ ), ps = (e) => e.flatMap(
6524
6527
  (t) => t.cssParts?.map((i) => ({
6525
6528
  name: `::part(${i.name})`,
6526
6529
  description: i.description || void 0
@@ -6530,17 +6533,17 @@ const us = (e) => e.flatMap(
6530
6533
  description: Ze(t.description, t.deprecated) || void 0,
6531
6534
  default: t.default,
6532
6535
  value: {
6533
- type: Gl(t.type.values?.map(dn))
6536
+ type: zl(t.type.values?.map(cn))
6534
6537
  }
6535
- })) ?? [], Gl = (e) => e?.length === 1 ? e[0] : e, Ze = (e = "", t = !1) => t === !1 ? e : `**Deprecated**${typeof t == "string" ? `: ${t}` : ""}. ${e}`, Ce = {
6538
+ })) ?? [], zl = (e) => e?.length === 1 ? e[0] : e, Ze = (e = "", t = !1) => t === !1 ? e : `**Deprecated**${typeof t == "string" ? `: ${t}` : ""}. ${e}`, Ce = {
6536
6539
  slots: "Slots",
6537
6540
  events: "Events",
6538
6541
  cssProperties: "CSS Properties",
6539
6542
  cssParts: "CSS Parts",
6540
6543
  methods: "Methods"
6541
6544
  };
6542
- function fs(e) {
6543
- const t = Vl(e.slots), i = Xl(e.events), n = Ql(e.cssProperties), s = Zl(e.cssParts), r = Yl(e.members), a = Ze(e.description, e.deprecated).trim();
6545
+ function us(e) {
6546
+ const t = ql(e.slots), i = Gl(e.events), n = Vl(e.cssProperties), s = Xl(e.cssParts), r = Ql(e.members), a = Ze(e.description, e.deprecated).trim();
6544
6547
  return [...a ? [`${a}
6545
6548
  --`] : [], i, r, t, n, s].filter(Boolean).join(`
6546
6549
 
@@ -6548,28 +6551,28 @@ function fs(e) {
6548
6551
  }
6549
6552
  const $e = (e, t) => t === void 0 || t.length === 0 ? "" : `### ${e}
6550
6553
  ${t.join(`
6551
- `)}`, Vl = (e) => $e(
6554
+ `)}`, ql = (e) => $e(
6552
6555
  Ce.slots,
6553
6556
  e?.map((t) => `- ${t.name ? `**${t.name}**` : "_default_"} - ${t.description}`)
6554
- ), Xl = (e) => $e(
6557
+ ), Gl = (e) => $e(
6555
6558
  Ce.events,
6556
6559
  e?.filter((t) => t.name !== null && t.name !== void 0).map((t) => `- **${t.name}**${t.description ? ` - ${t.description}` : ""}`)
6557
- ), Ql = (e = []) => $e(
6560
+ ), Vl = (e = []) => $e(
6558
6561
  Ce.cssProperties,
6559
6562
  e?.map(
6560
6563
  (t) => `- **${t.name}** - ${t.description} ${t.default ? `_(default: ${t.default})_}` : ""}`
6561
6564
  )
6562
- ), Zl = (e) => $e(
6565
+ ), Xl = (e) => $e(
6563
6566
  Ce.cssParts,
6564
6567
  e?.map((t) => `- **${t.name}** - ${t.description}`)
6565
- ), Yl = (e) => $e(
6568
+ ), Ql = (e) => $e(
6566
6569
  Ce.methods,
6567
- e.filter(ws).map(
6570
+ e.filter(Ss).map(
6568
6571
  (t) => [`- \`${t.name}${t.signature}\``, Ze(t.description, t.deprecated)].filter(Boolean).join(" - ")
6569
6572
  )
6570
6573
  );
6571
- function ed(e, t) {
6572
- const i = td(e), n = us(e), s = ms(e), r = R();
6574
+ function Zl(e, t) {
6575
+ const i = Yl(e), n = ds(e), s = ps(e), r = R();
6573
6576
  return {
6574
6577
  $schema: "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
6575
6578
  name: r.name,
@@ -6587,52 +6590,52 @@ function ed(e, t) {
6587
6590
  }
6588
6591
  };
6589
6592
  }
6590
- const td = (e) => e.map((t) => ({
6593
+ const Yl = (e) => e.map((t) => ({
6591
6594
  name: t.tagName,
6592
- description: fs(t),
6595
+ description: us(t),
6593
6596
  "doc-url": t.demos?.[0]?.url,
6594
6597
  attributes: Ul(t),
6595
6598
  slots: t.slots?.map((i) => ({
6596
6599
  name: i.name,
6597
6600
  description: i.description
6598
6601
  })),
6599
- events: Ji(t),
6602
+ events: Mi(t),
6600
6603
  js: {
6601
- properties: id(t),
6602
- events: Ji(t)
6604
+ properties: ed(t),
6605
+ events: Mi(t)
6603
6606
  }
6604
- })), id = (e) => e.members.filter(Ts).map((t) => ({
6607
+ })), ed = (e) => e.members.filter(ws).map((t) => ({
6605
6608
  name: t.name,
6606
6609
  description: t.description,
6607
6610
  type: t.type?.text
6608
- })) ?? [], Ji = (e) => e.events?.map((t) => ({
6611
+ })) ?? [], Mi = (e) => e.events?.map((t) => ({
6609
6612
  name: t.name,
6610
6613
  type: t.type?.text,
6611
6614
  description: t.description
6612
- })) ?? [], nd = (e) => e.map((t) => ({
6615
+ })) ?? [], td = (e) => e.map((t) => ({
6613
6616
  name: t.tagName,
6614
- description: fs(t),
6615
- attributes: sd(t),
6617
+ description: us(t),
6618
+ attributes: id(t),
6616
6619
  references: t.demos?.map((i) => ({ name: i.description, url: i.url })) ?? []
6617
- })), sd = (e) => e.attributes?.map((t) => ({
6620
+ })), id = (e) => e.attributes?.map((t) => ({
6618
6621
  name: t.name,
6619
6622
  description: Ze(t.description, t.deprecated) || void 0,
6620
- values: rd(t)
6621
- })) ?? [], rd = (e) => e.type.values?.map((t) => t.value ?? "").filter(Boolean).map((t) => ({ name: t })) ?? [], od = (e) => ({
6623
+ values: nd(t)
6624
+ })) ?? [], nd = (e) => e.type.values?.map((t) => t.value ?? "").filter(Boolean).map((t) => ({ name: t })) ?? [], sd = (e) => ({
6622
6625
  $schema: "https://raw.githubusercontent.com/microsoft/vscode-html-languageservice/main/docs/customData.schema.json",
6623
6626
  version: 1.1,
6624
- tags: nd(e)
6625
- }), ad = (e) => ({
6627
+ tags: td(e)
6628
+ }), rd = (e) => ({
6626
6629
  $schema: "https://raw.githubusercontent.com/microsoft/vscode-css-languageservice/main/docs/customData.schema.json",
6627
6630
  version: 1.1,
6628
- properties: us(e),
6629
- pseudoElements: ms(e)
6630
- }), cd = "@arcgis/lumina:generateDocs";
6631
- function ld(e) {
6631
+ properties: ds(e),
6632
+ pseudoElements: ps(e)
6633
+ }), od = "@arcgis/lumina:generateDocs";
6634
+ function ad(e) {
6632
6635
  return e._documentationFileNames.stencilLikeDocsJson !== void 0 && e.provideAssets([
6633
6636
  {
6634
6637
  type: "dynamic",
6635
- source: () => JSON.stringify(Wl(e), null, 2),
6638
+ source: () => JSON.stringify(Jl(e), null, 2),
6636
6639
  destination: u.join("../..", e._documentationFileNames.stencilLikeDocsJson)
6637
6640
  }
6638
6641
  ]), e._documentationFileNames.apiJson !== void 0 && e.provideAssets([
@@ -6642,34 +6645,34 @@ function ld(e) {
6642
6645
  destination: u.join("../..", e._documentationFileNames.apiJson)
6643
6646
  }
6644
6647
  ]), {
6645
- name: cd,
6648
+ name: od,
6646
6649
  async writeBundle() {
6647
6650
  if (e.isInStorybook)
6648
6651
  return;
6649
- const { jetBrains: t } = e.options.documentation ?? {}, i = e._documentationFileNames, n = i.vsCodeHtml === void 0 ? void 0 : u.join(e.dir.dist, i.vsCodeHtml), s = i.vsCodeCss === void 0 ? void 0 : u.join(e.dir.dist, i.vsCodeCss), r = i.webTypes === void 0 ? void 0 : u.join(e.dir.dist, i.webTypes), a = [n, s, r].filter(D);
6652
+ const { jetBrains: t } = e.options.documentation ?? {}, i = e._documentationFileNames, n = i.vsCodeHtml === void 0 ? void 0 : u.join(e.dir.dist, i.vsCodeHtml), s = i.vsCodeCss === void 0 ? void 0 : u.join(e.dir.dist, i.vsCodeCss), r = i.webTypes === void 0 ? void 0 : u.join(e.dir.dist, i.webTypes), a = [n, s, r].filter(j);
6650
6653
  if (a.length === 0)
6651
6654
  return;
6652
- await os(a);
6655
+ await ss(a);
6653
6656
  const c = [];
6654
6657
  if (n !== void 0) {
6655
- const l = JSON.stringify(od(e.apiJsonComponents), null, 2);
6658
+ const l = JSON.stringify(sd(e.apiJsonComponents), null, 2);
6656
6659
  c.push(F(n, l));
6657
6660
  }
6658
6661
  if (s !== void 0) {
6659
- const l = JSON.stringify(ad(e.apiJsonComponents), null, 2);
6662
+ const l = JSON.stringify(rd(e.apiJsonComponents), null, 2);
6660
6663
  c.push(F(s, l));
6661
6664
  }
6662
6665
  if (r !== void 0) {
6663
- const l = ed(e.apiJsonComponents, typeof t == "object" ? t : {});
6666
+ const l = Zl(e.apiJsonComponents, typeof t == "object" ? t : {});
6664
6667
  c.push(F(r, JSON.stringify(l, null, 2)));
6665
6668
  }
6666
6669
  await Promise.all(c);
6667
6670
  }
6668
6671
  };
6669
6672
  }
6670
- const dd = (e) => `import type { h, EventHandler } from "@arcgis/lumina";
6673
+ const cd = (e) => `import type { h, EventHandler } from "@arcgis/lumina";
6671
6674
 
6672
- ${e.map(pd).join(`
6675
+ ${e.map(ld).join(`
6673
6676
 
6674
6677
  `)}
6675
6678
 
@@ -6681,7 +6684,7 @@ ${e.map(({ tagName: t, pascalCaseName: i }) => ` "${t}": Lumina${i};`).join
6681
6684
  }
6682
6685
  }
6683
6686
  }`;
6684
- function pd({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6687
+ function ld({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6685
6688
  const [s, r] = Xe(e, i);
6686
6689
  return [
6687
6690
  `interface Lumina${t} extends ${s}h.JSX.HTMLAttributes<HTML${t}Element> {
@@ -6694,7 +6697,7 @@ function pd({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6694
6697
  r
6695
6698
  ].join("");
6696
6699
  }
6697
- function ud(e) {
6700
+ function dd(e) {
6698
6701
  const t = ` interface IntrinsicElements extends PreactJsx.IntrinsicElements {
6699
6702
  ${e.map(({ pascalCaseName: i, tagName: n }) => ` "${n}": Preact${i};`).join(`
6700
6703
  `)}
@@ -6702,7 +6705,7 @@ ${e.map(({ pascalCaseName: i, tagName: n }) => ` "${n}": Preact${i};`).join
6702
6705
  return `import { JSX as PreactJsx } from "preact";
6703
6706
  import type { EventHandler } from "@arcgis/lumina";
6704
6707
 
6705
- ${e.map(md).join(`
6708
+ ${e.map(pd).join(`
6706
6709
 
6707
6710
  `)}
6708
6711
 
@@ -6715,7 +6718,7 @@ ${t}
6715
6718
  }
6716
6719
  }`;
6717
6720
  }
6718
- function md({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6721
+ function pd({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6719
6722
  const [s, r] = Xe(e, i);
6720
6723
  return [
6721
6724
  `interface Preact${t} extends ${s}PreactJsx.HTMLAttributes<HTML${t}Element> {
@@ -6728,13 +6731,13 @@ function md({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6728
6731
  r
6729
6732
  ].join("");
6730
6733
  }
6731
- function fd(e) {
6734
+ function ud(e) {
6732
6735
  const t = e.map(({ pascalCaseName: i, tagName: n }) => ` "${n}": React${i};`).join(`
6733
6736
  `);
6734
6737
  return `import type { HTMLProps } from 'react';
6735
6738
  import type { EventHandler } from "@arcgis/lumina";
6736
6739
 
6737
- ${e.map(yd).join(`
6740
+ ${e.map(md).join(`
6738
6741
 
6739
6742
  `)}
6740
6743
 
@@ -6760,7 +6763,7 @@ ${t}
6760
6763
  }
6761
6764
  }`;
6762
6765
  }
6763
- function yd({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6766
+ function md({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6764
6767
  const [s, r] = Xe(e, i);
6765
6768
  return [
6766
6769
  `interface React${t} extends ${s}HTMLProps<HTML${t}Element> {
@@ -6773,10 +6776,10 @@ function yd({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6773
6776
  r
6774
6777
  ].join("");
6775
6778
  }
6776
- const hd = (e) => `import { JSXBase as StencilJsx } from "@stencil/core/internal";
6779
+ const fd = (e) => `import { JSXBase as StencilJsx } from "@stencil/core/internal";
6777
6780
  import type { EventHandler } from "@arcgis/lumina";
6778
6781
 
6779
- ${e.map(gd).join(`
6782
+ ${e.map(yd).join(`
6780
6783
 
6781
6784
  `)}
6782
6785
 
@@ -6794,7 +6797,7 @@ declare module "@stencil/core/internal/stencil-public-runtime" {
6794
6797
  interface IntrinsicElements extends ExposedElements {}
6795
6798
  }
6796
6799
  }`;
6797
- function gd({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6800
+ function yd({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6798
6801
  const [s, r] = Xe(e, i);
6799
6802
  return [
6800
6803
  `interface Stencil${t} extends ${s}StencilJsx.HTMLAttributes<HTML${t}Element> {
@@ -6807,16 +6810,16 @@ function gd({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6807
6810
  r
6808
6811
  ].join("");
6809
6812
  }
6810
- const vd = (e, t, i) => [i, t, Sd(e), bd(e)].join(`
6813
+ const hd = (e, t, i) => [i, t, gd(e), vd(e)].join(`
6811
6814
 
6812
- `), Sd = (e) => e.filter((t) => (t.events?.length ?? 0) > 0).map(
6815
+ `), gd = (e) => e.filter((t) => (t.events?.length ?? 0) > 0).map(
6813
6816
  ({ pascalCaseName: t }) => `export interface ${t}CustomEvent<T> extends CustomEvent<T> {
6814
6817
  detail: T;
6815
6818
  target: HTML${t}Element;
6816
6819
  currentTarget: HTML${t}Element;
6817
6820
  }`
6818
6821
  ).join(`
6819
- `), bd = (e) => `export { ToEvents, TargetedEvent } from "@arcgis/lumina";
6822
+ `), vd = (e) => `export { ToEvents, TargetedEvent } from "@arcgis/lumina";
6820
6823
 
6821
6824
  declare global {
6822
6825
  interface HTMLElementTagNameMap {
@@ -6824,12 +6827,12 @@ ${e.map(({ pascalCaseName: t, tagName: i }) => ` "${i}": HTML${t}Element;`).j
6824
6827
  `)}
6825
6828
  }
6826
6829
 
6827
- ${e.map(wd).join(`
6830
+ ${e.map(Sd).join(`
6828
6831
  `).split(`
6829
6832
  `).map((t) => t.length > 0 ? ` ${t}` : t).join(`
6830
6833
  `)}
6831
6834
  }`;
6832
- function wd({ name: e, pascalCaseName: t, events: i = [] }) {
6835
+ function Sd({ name: e, pascalCaseName: t, events: i = [] }) {
6833
6836
  const n = i.length > 0, s = `${t}CustomEvent`, r = `HTML${t}Element`;
6834
6837
  return [
6835
6838
  n ? `interface ${r}EventMap {
@@ -6848,7 +6851,7 @@ ${n ? ` addEventListener<K extends keyof ${r}EventMap>(type: K, listener: (this
6848
6851
  }`
6849
6852
  ].join("");
6850
6853
  }
6851
- function Td(e) {
6854
+ function wd(e) {
6852
6855
  let t;
6853
6856
  return {
6854
6857
  name: "@arcgis/lumina:generateFrameworkTypes",
@@ -6856,11 +6859,11 @@ function Td(e) {
6856
6859
  generateBundle() {
6857
6860
  if (e.isInStorybook)
6858
6861
  return;
6859
- t = Ya(e);
6862
+ t = Qa(e);
6860
6863
  const i = u.join(e.dir.dist, "index.d.ts");
6861
6864
  e._declarationTextTransformers.push((n) => {
6862
6865
  const { filePath: s, content: r } = n;
6863
- return s === i ? { filePath: s, content: vd(e.apiJsonComponents, r, t) } : n;
6866
+ return s === i ? { filePath: s, content: hd(e.apiJsonComponents, r, t) } : n;
6864
6867
  });
6865
6868
  },
6866
6869
  async writeBundle() {
@@ -6870,10 +6873,10 @@ function Td(e) {
6870
6873
  await _(i);
6871
6874
  const n = `/// <reference types="../index.d.ts" />
6872
6875
  ${t.replaceAll("./", "../")}`, s = Object.entries({
6873
- react: fd(e.apiJsonComponents),
6874
- preact: ud(e.apiJsonComponents),
6875
- stencil: hd(e.apiJsonComponents),
6876
- lumina: dd(e.apiJsonComponents)
6876
+ react: ud(e.apiJsonComponents),
6877
+ preact: dd(e.apiJsonComponents),
6878
+ stencil: fd(e.apiJsonComponents),
6879
+ lumina: cd(e.apiJsonComponents)
6877
6880
  }).map(
6878
6881
  async ([r, a]) => await F(u.join(i, `${r}.d.ts`), `${n}
6879
6882
  ${a}`)
@@ -6882,38 +6885,38 @@ ${a}`)
6882
6885
  }
6883
6886
  };
6884
6887
  }
6885
- function Ed(e) {
6888
+ function bd(e) {
6886
6889
  return {
6887
6890
  name: "@arcgis/lumina:buildWrappers",
6888
6891
  apply: () => e.viteCommand === "build" && !!e.options.build?.wrappers?.length,
6889
6892
  async writeBundle() {
6890
6893
  e.isInStorybook || await Promise.all(
6891
6894
  e.options.build?.wrappers?.map(async (t) => {
6892
- t.type === "react18" && await xd(e, t);
6895
+ t.type === "react18" && await Cd(e, t);
6893
6896
  }) ?? []
6894
6897
  );
6895
6898
  }
6896
6899
  };
6897
6900
  }
6898
- const Cd = "react", Ki = "@lit/react", $d = `
6899
- import React from "${Cd}";
6900
- import { createComponent } from "${Ki}";
6901
- import type { EventName } from "${Ki}";
6901
+ const Td = "react", Oi = "@lit/react", Ed = `
6902
+ import React from "${Td}";
6903
+ import { createComponent } from "${Oi}";
6904
+ import type { EventName } from "${Oi}";
6902
6905
  import { makeReactWrapperFactory, getReactWrapperOptions } from "@arcgis/lumina";
6903
6906
 
6904
6907
  const createWrapper = /*@__PURE__*/ makeReactWrapperFactory(React, createComponent) as typeof createComponent;
6905
6908
  `;
6906
- async function xd(e, t) {
6909
+ async function Cd(e, t) {
6907
6910
  const { name: i } = R(), n = [];
6908
6911
  for (const a of e.apiJson.modules)
6909
6912
  for (const c of a.declarations)
6910
- "customElement" in c && n.push(Pd(c));
6911
- const s = [`/// <reference types="${i}" preserve="true" />`, $d, ...n].join(""), r = u.resolve(t.proxiesFile);
6913
+ "customElement" in c && n.push($d(c));
6914
+ const s = [`/// <reference types="${i}" preserve="true" />`, Ed, ...n].join(""), r = u.resolve(t.proxiesFile);
6912
6915
  await _(u.dirname(r), { recursive: !0 }), await F(r, s);
6913
6916
  }
6914
- function Pd(e) {
6917
+ function $d(e) {
6915
6918
  const t = e.events?.map(
6916
- (i) => ` ${Ee(`on${xs(i.name)}`)}: "${i.name}" as EventName<HTML${e.pascalCaseName}Element["${i.name}"]>,`
6919
+ (i) => ` ${Ee(`on${Cs(i.name)}`)}: "${i.name}" as EventName<HTML${e.pascalCaseName}Element["${i.name}"]>,`
6917
6920
  ).join(`
6918
6921
  `);
6919
6922
  return `
@@ -6927,48 +6930,48 @@ ${t}
6927
6930
  );
6928
6931
  `;
6929
6932
  }
6930
- function Bd(e = {}) {
6931
- const t = new P(e), i = [
6933
+ function Kd(e = {}) {
6934
+ const t = new x(e), i = [
6932
6935
  t._plugin,
6933
- gl(t),
6934
- vl(t),
6935
- Ol(t),
6936
- Fr(t),
6937
- sl(t),
6938
- Td(t),
6939
- ld(t),
6940
- Nc(t),
6941
- Fo(t),
6942
- ll(t),
6943
- Ml(t),
6944
- Dl(t),
6945
- Cl(t),
6946
- Bs(t),
6947
- Oc(t),
6936
+ yl(t),
6937
+ hl(t),
6938
+ Rl(t),
6939
+ Ir(t),
6940
+ il(t),
6941
+ wd(t),
6942
+ ad(t),
6943
+ Lc(t),
6944
+ Io(t),
6945
+ al(t),
6946
+ jl(t),
6947
+ Nl(t),
6948
+ Tl(t),
6949
+ Ks(t),
6950
+ Rc(t),
6948
6951
  // Deprecated feature will be dropped in https://devtopia.esri.com/WebGIS/arcgis-web-components/issues/2765
6949
6952
  // eslint-disable-next-line @typescript-eslint/no-deprecated
6950
- pl(t),
6951
- Ed(t),
6952
- ul(t)
6953
- ].filter(D);
6953
+ ll(t),
6954
+ bd(t),
6955
+ dl(t)
6956
+ ].filter(j);
6954
6957
  return i.context = t, i;
6955
6958
  }
6956
- const _d = {
6957
- initializeComponentDependencies: wn,
6958
- updateLuminaTs: ls,
6959
+ const Wd = {
6960
+ initializeComponentDependencies: Sn,
6961
+ updateLuminaTs: as,
6959
6962
  propertyToAttributeMappings: B,
6960
- findDeclaredComponents: Vi,
6961
- nativeEvents: sn,
6963
+ findDeclaredComponents: qi,
6964
+ nativeEvents: tn,
6962
6965
  svgElements: Ct,
6963
6966
  mathMlElements: $t,
6964
- alwaysAttributes: en,
6965
- nativeAlwaysAttributes: tn,
6967
+ alwaysAttributes: Zi,
6968
+ nativeAlwaysAttributes: Yi,
6966
6969
  htmlAlwaysAttributes: yt,
6967
6970
  isPropertyEscapeNeeded: Ve
6968
6971
  };
6969
6972
  export {
6970
6973
  Oe as LuminaApiExtractor,
6971
- _d as exportsForCodemod,
6972
- Ue as inferCdnUrl,
6973
- Bd as useLumina
6974
+ Wd as exportsForCodemod,
6975
+ qe as inferCdnUrl,
6976
+ Kd as useLumina
6974
6977
  };