@arcgis/lumina-compiler 4.34.0-next.46 → 4.34.0-next.47

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,18 +1,18 @@
1
- import { externalizeDependencies as ls, path as u, toSystemPathSeparators as ee, retrievePackageJson as J, fetchPackageLocation as _e, asyncRetrievePackageJson as He, existsAsync as U, findPath as ds, toPosixPathSeparators as Le, isPosix as ji, getCwd as Ri } from "@arcgis/components-build-utils";
2
- import ps from "vite-plugin-dts";
1
+ import { externalizeDependencies as cs, path as u, toSystemPathSeparators as ee, retrievePackageJson as J, fetchPackageLocation as _e, asyncRetrievePackageJson as He, existsAsync as U, findPath as ls, toPosixPathSeparators as Le, isPosix as ji, getCwd as Ri } from "@arcgis/components-build-utils";
2
+ import ds from "vite-plugin-dts";
3
3
  import o from "typescript";
4
4
  import { f as w, l as C } from "./logger-KpGU2b3R.js";
5
- import { getMemberName as X, apiMemberToSynthesizedComments as V, globalPackageIdentifier as Mi, setApiDocFromJsDoc as ue, ApiExtractor as us, hasIgnoredModifier as ms, symbolToDocs as Kt, setDefaultFromInitializer as Wt, multipleJsDocTags as fs, findDecorator as Bt, isApiMethod as gs, isApiProperty as ys } from "@arcgis/api-extractor";
6
- import { isNotUndefined as j, mappedFind as ge, camelToKebab as bt, kebabToPascal as hs, uncapitalize as ut, identity as Oi, Deferred as vs, getPreamble as Ss, capitalize as ws } from "@arcgis/components-utils";
7
- import { readdir as Ue, readFile as O, rm as bs, mkdir as Q, cp as Ts, writeFile as D, copyFile as Es } from "node:fs/promises";
8
- import { lazyMetaSubItemJoiner as Cs, lazyMetaItemJoiner as Ye, lazyMetaGroupJoiner as $s, propertyFlagAttribute as _t, propertyFlagReflect as Ps, propertyFlagBoolean as xs, propertyFlagNumber as ks, propertyFlagState as As, propertyFlagReadOnly as Is, propertyFlagNoAccessor as Ls } from "@arcgis/lumina/config";
9
- import { build as Fs } from "esbuild";
10
- import { glob as Ns } from "glob";
11
- import Ds from "mime-types";
5
+ import { getMemberName as X, apiMemberToSynthesizedComments as V, globalPackageIdentifier as Mi, setApiDocFromJsDoc as me, ApiExtractor as ps, hasIgnoredModifier as us, symbolToDocs as Kt, setDefaultFromInitializer as Wt, multipleJsDocTags as ms, findDecorator as Bt, isApiMethod as fs, isApiProperty as gs } from "@arcgis/api-extractor";
6
+ import { isNotUndefined as j, mappedFind as ye, camelToKebab as bt, kebabToPascal as ys, uncapitalize as ut, identity as Oi, Deferred as hs, getPreamble as vs, capitalize as Ss } from "@arcgis/components-utils";
7
+ import { readdir as Ue, readFile as O, rm as ws, mkdir as Q, cp as bs, writeFile as D, copyFile as Ts } from "node:fs/promises";
8
+ import { lazyMetaSubItemJoiner as Es, lazyMetaItemJoiner as Ye, lazyMetaGroupJoiner as Cs, propertyFlagAttribute as _t, propertyFlagReflect as $s, propertyFlagBoolean as Ps, propertyFlagNumber as xs, propertyFlagState as ks, propertyFlagReadOnly as Is, propertyFlagNoAccessor as As } from "@arcgis/lumina/config";
9
+ import { build as Ls } from "esbuild";
10
+ import { glob as Fs } from "glob";
11
+ import Ns from "mime-types";
12
12
  import { writeFileSync as Ji } from "node:fs";
13
- import js from "chalk";
14
- function Rs(e) {
15
- const t = e.options?.build?.dependencies ?? {}, i = ls({
13
+ import Ds from "chalk";
14
+ function js(e) {
15
+ const t = e.options?.build?.dependencies ?? {}, i = cs({
16
16
  bundleIn: t.bundleIn,
17
17
  externalize: [
18
18
  // TODO: remove these once Lit is declared as a peer dependency
@@ -28,21 +28,21 @@ function Rs(e) {
28
28
  e.isInStorybook && (i.resolveId = void 0);
29
29
  }, i;
30
30
  }
31
- const Tt = "customElement.js", Ki = "customElement.d.ts", Ms = "playwright";
32
- function Os(e, t, i) {
31
+ const Tt = "customElement.js", Ki = "customElement.d.ts", Rs = "playwright";
32
+ function Ms(e, t, i) {
33
33
  const s = i.split(u.sep).slice(2);
34
34
  let r = t._componentPathMapping;
35
35
  return s.forEach((a, c) => {
36
36
  c === s.length - 1 ? r[""] ??= e : (r[a] ??= {}, r = r[a]);
37
37
  }), r[""];
38
38
  }
39
- function ye(e, t, i) {
39
+ function he(e, t, i) {
40
40
  if (!e.startsWith(t))
41
41
  return e;
42
- const n = e.slice(t.length), s = Js(n, i);
42
+ const n = e.slice(t.length), s = Os(n, i);
43
43
  return `${t}${s}`;
44
44
  }
45
- function Js(e, t) {
45
+ function Os(e, t) {
46
46
  const i = e.split(u.sep);
47
47
  i.push(".");
48
48
  let n = t._componentPathMapping, s = 0;
@@ -54,8 +54,8 @@ function Js(e, t) {
54
54
  n = n[r], s += 1;
55
55
  return e;
56
56
  }
57
- const Ks = ({ filePath: e, content: t }, i) => {
58
- const n = e.startsWith(i.dir.distComponents) ? ye(
57
+ const Js = ({ filePath: e, content: t }, i) => {
58
+ const n = e.startsWith(i.dir.distComponents) ? he(
59
59
  Wi(i.dir.distComponents, e),
60
60
  i.dir.distComponents,
61
61
  i
@@ -64,7 +64,7 @@ const Ks = ({ filePath: e, content: t }, i) => {
64
64
  i,
65
65
  e === n ? s : u.dirname(n),
66
66
  s
67
- ), c = r ? Hs(a) : a;
67
+ ), c = r ? _s(a) : a;
68
68
  return {
69
69
  filePath: n,
70
70
  content: c
@@ -74,29 +74,29 @@ function Wi(e, t, i = ".d.ts") {
74
74
  if (!t.startsWith(e))
75
75
  return t;
76
76
  const s = (i === "" ? t : t.slice(0, -i.length)).split(u.sep);
77
- return s.at(Ws) !== s.at(Bs) ? t : u.join(
77
+ return s.at(Ks) !== s.at(Ws) ? t : u.join(
78
78
  s.slice(0, -1).join(u.sep),
79
79
  i === "" ? Tt : Ki
80
80
  );
81
81
  }
82
- const Ws = -1, Bs = -2, _s = /["']\.\.?\/[^'"]+/gu, Bi = (e, t, i, n) => e.replaceAll(_s, (s) => {
82
+ const Ks = -1, Ws = -2, Bs = /["']\.\.?\/[^'"]+/gu, Bi = (e, t, i, n) => e.replaceAll(Bs, (s) => {
83
83
  const r = s.slice(1);
84
84
  if (!r.startsWith("./") && !r.startsWith("../"))
85
85
  return s;
86
- const a = u.join(n, r), c = !r.endsWith(".js") && !r.split("/").at(-1).includes(".") ? Wi(t.dir.distComponents, a, "") : a, l = ye(c, t.dir.distComponents, t);
86
+ const a = u.join(n, r), c = !r.endsWith(".js") && !r.split("/").at(-1).includes(".") ? Wi(t.dir.distComponents, a, "") : a, l = he(c, t.dir.distComponents, t);
87
87
  if (i === n && a === l)
88
88
  return s;
89
- const d = oe(i, l);
89
+ const d = ae(i, l);
90
90
  return `${s[0]}${d}`;
91
- }), oe = (e, t) => {
91
+ }), ae = (e, t) => {
92
92
  const i = u.relative(e, t);
93
93
  return i.startsWith(".") ? i : `.${u.sep}${i}`;
94
94
  };
95
- function Hs(e) {
95
+ function _s(e) {
96
96
  return `/// <reference types="../../index.d.ts" />
97
97
  ${e}`;
98
98
  }
99
- const Ht = "customElement", Us = (e, t) => {
99
+ const Ht = "customElement", Hs = (e, t) => {
100
100
  const { filePath: i, content: n } = e;
101
101
  if (!i.startsWith(t.dir.distComponents))
102
102
  return e;
@@ -110,7 +110,7 @@ const Ht = "customElement", Us = (e, t) => {
110
110
  content: r
111
111
  };
112
112
  }
113
- }, zs = (e, t) => {
113
+ }, Us = (e, t) => {
114
114
  const i = [];
115
115
  if (t.apiModule?.declarations.forEach((r) => {
116
116
  "customElement" in r && i.push(
@@ -152,39 +152,39 @@ function Hi(e) {
152
152
  }`, t) + 2;
153
153
  return e.slice(t, i);
154
154
  }
155
- const qs = (e) => (t, i) => (
155
+ const zs = (e) => (t, i) => (
156
156
  /*
157
157
  * `declarationTextTransformers` arrays can be mutated between plugin
158
158
  * initialization and beforeWriteFile() call, so do not read the value
159
159
  * of declarationTextTransformers outside of beforeWriteFile
160
160
  */
161
161
  [
162
- Gs,
162
+ qs,
163
+ Vs,
163
164
  Xs,
165
+ Gs,
166
+ Js,
164
167
  Qs,
165
- Vs,
166
- Ks,
167
168
  Zs,
169
+ Hs,
168
170
  Ys,
169
- Us,
170
- er,
171
171
  ...e.options.types?.declarationTextTransformers ?? [],
172
172
  ...e._declarationTextTransformers
173
173
  ].reduce(
174
174
  (n, s) => n === !1 ? !1 : s(n, e),
175
175
  { filePath: t, content: i }
176
176
  )
177
- ), Gs = (e, t) => t.isInStorybook ? !1 : e, Vs = (e, t) => (
177
+ ), qs = (e, t) => t.isInStorybook ? !1 : e, Gs = (e, t) => (
178
178
  // Short-circuit quickly if file doesn't look like the one we want to exclude
179
179
  e.filePath.endsWith(Ut) && e.filePath === u.join(t.dir.dist, Ut) ? !1 : e
180
- ), Ut = "lumina.d.ts", Xs = (e, t) => {
180
+ ), Ut = "lumina.d.ts", Vs = (e, t) => {
181
181
  const i = t.dir.dist, n = `${i}src/`;
182
182
  return e.filePath.startsWith(n) ? { ...e, filePath: `${i}${e.filePath.slice(n.length)}` } : !1;
183
- }, Et = (e) => e.includes("__test") || e.includes(".e2e.") || e.includes(".spec.") || e.includes(".test."), Qs = (e) => Et(e.filePath) || e.filePath.includes(".stories.") || e.filePath.includes(".story.") ? !1 : e, Zs = (e) => e.content.includes("__esri.") ? {
183
+ }, Et = (e) => e.includes("__test") || e.includes(".e2e.") || e.includes(".spec.") || e.includes(".test."), Xs = (e) => Et(e.filePath) || e.filePath.includes(".stories.") || e.filePath.includes(".story.") ? !1 : e, Qs = (e) => e.content.includes("__esri.") ? {
184
184
  filePath: e.filePath,
185
185
  content: `/// <reference types="@arcgis/core/interfaces.d.ts" />
186
186
  ${e.content}`
187
- } : e, Ys = (e, t) => {
187
+ } : e, Zs = (e, t) => {
188
188
  t._htmlElementReferencesReplacer ??= {
189
189
  regex: new RegExp(
190
190
  `(${t.apiJsonComponents.map((n) => n.name).join("|")})\\[['"\`]el['"\`]\\]`,
@@ -199,8 +199,8 @@ ${e.content}`
199
199
  filePath: e.filePath,
200
200
  content: e.content.replace(i.regex, (n, s) => i.replacements[s])
201
201
  };
202
- }, er = (e) => {
203
- const t = e.content.match(tr)?.[1] ?? e.content.match(ir)?.[1];
202
+ }, Ys = (e) => {
203
+ const t = e.content.match(er)?.[1] ?? e.content.match(tr)?.[1];
204
204
  if (t !== void 0)
205
205
  throw Error(
206
206
  w(
@@ -215,19 +215,19 @@ ${e.content}
215
215
  )
216
216
  );
217
217
  return e;
218
- }, tr = /^import (?:type \* as )?[^"'\n]+["'](\.[^\n]*?\.json)["'];$/mu, ir = /(?<![.\w\d-])import\(['"]([\w@\-/\\.]+)\.json['"]\)/u;
219
- function nr(e, t) {
218
+ }, er = /^import (?:type \* as )?[^"'\n]+["'](\.[^\n]*?\.json)["'];$/mu, tr = /(?<![.\w\d-])import\(['"]([\w@\-/\\.]+)\.json['"]\)/u;
219
+ function ir(e, t) {
220
220
  const i = X(t.name);
221
221
  return e.members.find((n) => n.name === i);
222
222
  }
223
- function sr(e, t, i) {
223
+ function nr(e, t, i) {
224
224
  const n = u.relative(t, e);
225
225
  return i.modules.find((s) => s.path === n);
226
226
  }
227
227
  function Ui(e, t, i, n) {
228
228
  const s = {
229
229
  compiler: e,
230
- apiModule: e.isInPuppeteerTestBackEnd ? void 0 : sr(i.fileName, e.dir.root, e.privateApiJson),
230
+ apiModule: e.isInPuppeteerTestBackEnd ? void 0 : nr(i.fileName, e.dir.root, e.privateApiJson),
231
231
  transformation: t
232
232
  }, r = i.statements;
233
233
  let a = i.statements;
@@ -238,9 +238,9 @@ function Ui(e, t, i, n) {
238
238
  a = c(i, s);
239
239
  }), Object.defineProperty(i, "statements", {
240
240
  value: r
241
- }), rr(i, a);
241
+ }), sr(i, a);
242
242
  }
243
- const rr = (e, t) => o.factory.updateSourceFile(
243
+ const sr = (e, t) => o.factory.updateSourceFile(
244
244
  e,
245
245
  t,
246
246
  /*
@@ -254,11 +254,11 @@ const rr = (e, t) => o.factory.updateSourceFile(
254
254
  e.typeReferenceDirectives,
255
255
  e.hasNoDefaultLib,
256
256
  e.libReferenceDirectives
257
- ), or = (e) => `${zt}${" ".repeat(e.length - zt.length - qt.length)}${qt}`, zt = "/*", qt = "*/", ar = (e) => e.statements.map(pr), cr = "@arcgis/lumina", lr = "LitElement", dr = "PublicLitElement", zi = "TargetedEvent";
258
- function pr(e) {
259
- if (o.isImportDeclaration(e) && o.isStringLiteral(e.moduleSpecifier) && e.moduleSpecifier.text === cr && e.importClause?.namedBindings && o.isNamedImports(e.importClause.namedBindings)) {
257
+ ), rr = (e) => `${zt}${" ".repeat(e.length - zt.length - qt.length)}${qt}`, zt = "/*", qt = "*/", or = (e) => e.statements.map(dr), ar = "@arcgis/lumina", cr = "LitElement", lr = "PublicLitElement", zi = "TargetedEvent";
258
+ function dr(e) {
259
+ if (o.isImportDeclaration(e) && o.isStringLiteral(e.moduleSpecifier) && e.moduleSpecifier.text === ar && e.importClause?.namedBindings && o.isNamedImports(e.importClause.namedBindings)) {
260
260
  const t = e.importClause.namedBindings.elements.findIndex(
261
- (n) => (n.propertyName ?? n.name).text === lr
261
+ (n) => (n.propertyName ?? n.name).text === cr
262
262
  );
263
263
  if (t === -1)
264
264
  return e;
@@ -275,7 +275,7 @@ function pr(e) {
275
275
  o.factory.updateImportSpecifier(
276
276
  i,
277
277
  i.isTypeOnly,
278
- o.factory.createIdentifier(dr),
278
+ o.factory.createIdentifier(lr),
279
279
  i.name
280
280
  ),
281
281
  ...e.importClause.namedBindings.elements.slice(t + 1),
@@ -293,14 +293,14 @@ function pr(e) {
293
293
  return e;
294
294
  }
295
295
  const qi = "_setterTypes";
296
- function ur(e, t, i) {
296
+ function pr(e, t, i) {
297
297
  return o.factory.createPropertyDeclaration(
298
298
  [o.factory.createModifier(o.SyntaxKind.ReadonlyKeyword)],
299
299
  o.factory.createIdentifier(qi),
300
300
  void 0,
301
301
  o.factory.createTypeLiteralNode(
302
302
  e.map((n) => {
303
- const [s, r] = mr(n.name, n.type, i._typeScriptPrinter, t);
303
+ const [s, r] = ur(n.name, n.type, i._typeScriptPrinter, t);
304
304
  return o.factory.createPropertySignature(
305
305
  void 0,
306
306
  s,
@@ -312,7 +312,7 @@ function ur(e, t, i) {
312
312
  void 0
313
313
  );
314
314
  }
315
- function mr(e, t, i, n) {
315
+ function ur(e, t, i, n) {
316
316
  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(
317
317
  "a.d.ts",
318
318
  a,
@@ -322,8 +322,8 @@ function mr(e, t, i, n) {
322
322
  ).statements[0].members[0];
323
323
  return [d.name, d.type];
324
324
  }
325
- const fr = (e, t) => t.apiModule === void 0 ? e.statements : e.statements.map((i) => gr(i, e, t));
326
- function gr(e, t, i) {
325
+ const mr = (e, t) => t.apiModule === void 0 ? e.statements : e.statements.map((i) => fr(i, e, t));
326
+ function fr(e, t, i) {
327
327
  if (o.isClassDeclaration(e)) {
328
328
  const n = e, s = n.name?.text, r = i.apiModule.declarations.find(
329
329
  (g) => g.name === s && "customElement" in g
@@ -333,13 +333,13 @@ function gr(e, t, i) {
333
333
  const a = [], c = /* @__PURE__ */ new Set(), l = [], d = [];
334
334
  mt = void 0;
335
335
  for (let g = 0; g < n.members.length; g++) {
336
- const y = n.members[g], h = yr(y, r, l, c, t);
336
+ const y = n.members[g], h = gr(y, r, l, c, t);
337
337
  h === void 0 ? a.push(y) : Array.isArray(h) ? d.push(...h) : (o.setEmitFlags(h, o.EmitFlags.NoComments), d.push(h));
338
338
  }
339
339
  c.size > 0 && a.forEach((g) => {
340
340
  const y = X(g.name);
341
- y !== void 0 && c.has(y) && d.push(vr(g));
342
- }), l.length > 0 && d.push(ur(l, t, i.compiler));
341
+ y !== void 0 && c.has(y) && d.push(hr(g));
342
+ }), l.length > 0 && d.push(pr(l, t, i.compiler));
343
343
  const p = o.factory.updateClassDeclaration(
344
344
  n,
345
345
  n.modifiers,
@@ -370,7 +370,7 @@ function gr(e, t, i) {
370
370
  return e;
371
371
  }
372
372
  let mt;
373
- function yr(e, t, i, n, s) {
373
+ function gr(e, t, i, n, s) {
374
374
  const r = X(e.name);
375
375
  if (r === void 0)
376
376
  return;
@@ -388,7 +388,7 @@ function yr(e, t, i, n, s) {
388
388
  Xt(e.modifiers),
389
389
  e.name,
390
390
  void 0,
391
- Sr(e.type, s),
391
+ vr(e.type, s),
392
392
  e.initializer
393
393
  );
394
394
  return o.setSyntheticLeadingComments(d, V(l)), d;
@@ -467,13 +467,13 @@ function yr(e, t, i, n, s) {
467
467
  }
468
468
  const Gt = /^typeof this\.(?<accessor>[^.]+)\.(?<boundProperty>[^.]+)$/u;
469
469
  function Vt(e, t, i) {
470
- const s = (t?.pos !== -1 ? t?.getText(i) : void 0)?.match(hr) ?? [];
470
+ const s = (t?.pos !== -1 ? t?.getText(i) : void 0)?.match(yr) ?? [];
471
471
  for (const r of s)
472
472
  e.add(r);
473
473
  return t;
474
474
  }
475
- const hr = /(?<=this.)[\w$]+/gu;
476
- function vr(e) {
475
+ const yr = /(?<=this.)[\w$]+/gu;
476
+ function hr(e) {
477
477
  if (o.setEmitFlags(e, o.EmitFlags.NoComments), o.isPropertyDeclaration(e)) {
478
478
  const t = ke(e.modifiers);
479
479
  if (t !== e.modifiers)
@@ -528,7 +528,7 @@ function ke(e) {
528
528
  )
529
529
  ];
530
530
  }
531
- function Sr(e, t) {
531
+ function vr(e, t) {
532
532
  if (e === void 0)
533
533
  return;
534
534
  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;
@@ -541,10 +541,10 @@ function Sr(e, t) {
541
541
  t.fileName
542
542
  ), e);
543
543
  }
544
- const wr = [ar, fr], Qt = "@arcgis/lumina:componentDtsTransformer";
545
- function br(e) {
544
+ const Sr = [or, mr], Qt = "@arcgis/lumina:componentDtsTransformer";
545
+ function wr(e) {
546
546
  let t;
547
- const i = Tr(e);
547
+ const i = br(e);
548
548
  return {
549
549
  name: Qt,
550
550
  supports(n) {
@@ -572,22 +572,22 @@ function br(e) {
572
572
  }
573
573
  };
574
574
  }
575
- const Tr = (e) => (t) => (i) => Ui(e, t, i, [
576
- ...wr,
575
+ const br = (e) => (t) => (i) => Ui(e, t, i, [
576
+ ...Sr,
577
577
  ...e.options.types?.declarationAstTransformers ?? []
578
- ]), Er = (e) => new Proxy(e, {
579
- get: Cr,
580
- set: $r
578
+ ]), Tr = (e) => new Proxy(e, {
579
+ get: Er,
580
+ set: Cr
581
581
  });
582
- function Cr(e, t, i) {
582
+ function Er(e, t, i) {
583
583
  if (t in e)
584
584
  return Reflect.get(e, t, i);
585
585
  throw new Error(`Requested unexpected property ${String(t)}`);
586
586
  }
587
- function $r(e, t) {
587
+ function Cr(e, t) {
588
588
  throw new Error(`Unexpectedly tried to set the ${String(t)} property.`);
589
589
  }
590
- function Pr(e) {
590
+ function $r(e) {
591
591
  const t = e.options.types ?? {};
592
592
  let i = !1;
593
593
  const n = {
@@ -595,7 +595,7 @@ function Pr(e) {
595
595
  // For details, see comment above excludeOutsideFiles in
596
596
  // https://devtopia.esri.com/WebGIS/arcgis-web-components/blob/main/packages/support-packages/lit-compiler/src/types/textTransformers.ts
597
597
  rootDir: "."
598
- }, s = ps({
598
+ }, s = ds({
599
599
  ...t,
600
600
  compilerOptions: n,
601
601
  tsconfigPath: e.options.types?.tsconfigPath,
@@ -608,7 +608,7 @@ function Pr(e) {
608
608
  }
609
609
  return t?.afterDiagnostic?.(r);
610
610
  },
611
- beforeWriteFile: qs(e),
611
+ beforeWriteFile: zs(e),
612
612
  resolvers: [
613
613
  /**
614
614
  * The vite-plugin-dts does not provide a way to get a reference to the
@@ -632,7 +632,7 @@ function Pr(e) {
632
632
  }
633
633
  },
634
634
  ...t?.resolvers ?? [],
635
- br(e)
635
+ wr(e)
636
636
  ]
637
637
  });
638
638
  return {
@@ -653,7 +653,7 @@ function Pr(e) {
653
653
  if (typeof c != "function")
654
654
  throw new Error("Expected transform to be a function");
655
655
  if (await a.call(this, r), await c.call(
656
- Er({}),
656
+ Tr({}),
657
657
  "",
658
658
  /*
659
659
  * Have to give it a file that will be matched by the tsconfig's
@@ -665,7 +665,7 @@ function Pr(e) {
665
665
  }
666
666
  };
667
667
  }
668
- const xr = "Fragment", et = "DynamicHtmlTag", tt = "DynamicSvgTag", Re = Symbol("dynamic html tag name"), ft = Symbol("dynamic svg tag name"), Gi = /* @__PURE__ */ new Set([
668
+ const Pr = "Fragment", et = "DynamicHtmlTag", tt = "DynamicSvgTag", Re = Symbol("dynamic html tag name"), ft = Symbol("dynamic svg tag name"), Gi = /* @__PURE__ */ new Set([
669
669
  /**
670
670
  * There is a "className" property. However, in JSX typings we use "class"
671
671
  * instead to keep name shorter and to match Stencil's name. Thus, it should
@@ -1636,7 +1636,7 @@ const Zt = /* @__PURE__ */ new Set(["itemScope"]), Qi = /* @__PURE__ */ new Set(
1636
1636
  "volumeChange",
1637
1637
  "waiting",
1638
1638
  "wheel"
1639
- ]), kr = /* @__PURE__ */ new Set([
1639
+ ]), xr = /* @__PURE__ */ new Set([
1640
1640
  "area",
1641
1641
  "base",
1642
1642
  "br",
@@ -1712,7 +1712,7 @@ const Zt = /* @__PURE__ */ new Set(["itemScope"]), Qi = /* @__PURE__ */ new Set(
1712
1712
  "tspan",
1713
1713
  "use",
1714
1714
  "view"
1715
- ]), Ar = /* @__PURE__ */ new Set(["title", "svg", "a", "script", "style"]), $t = /* @__PURE__ */ new Set([
1715
+ ]), kr = /* @__PURE__ */ new Set(["title", "svg", "a", "script", "style"]), $t = /* @__PURE__ */ new Set([
1716
1716
  "annotation-xml",
1717
1717
  "annotation",
1718
1718
  "maction",
@@ -1754,7 +1754,7 @@ const Zt = /* @__PURE__ */ new Set(["itemScope"]), Qi = /* @__PURE__ */ new Set(
1754
1754
  "font-face-name",
1755
1755
  "missing-glyph"
1756
1756
  ]);
1757
- function Lr(e) {
1757
+ function Ar(e) {
1758
1758
  if (e.length === 0)
1759
1759
  return "";
1760
1760
  const t = e[0];
@@ -1767,11 +1767,11 @@ function Lr(e) {
1767
1767
  }
1768
1768
  return e.trim().length === 0 ? t : e;
1769
1769
  }
1770
- const Fr = (e) => e.replaceAll("\\", "\\\\").replace(Nr, "\\${").replaceAll("`", "\\`"), Nr = /\$\{/gu, Dr = (e) => !jr.test(e), jr = /^[^\s"'=<>`]+$/u, Rr = /[&<>]/gu, Mr = {
1770
+ const Lr = (e) => e.replaceAll("\\", "\\\\").replace(Fr, "\\${").replaceAll("`", "\\`"), Fr = /\$\{/gu, Nr = (e) => !Dr.test(e), Dr = /^[^\s"'=<>`]+$/u, jr = /[&<>]/gu, Rr = {
1771
1771
  "&": "&amp;",
1772
1772
  "<": "&lt;",
1773
1773
  ">": "&gt;"
1774
- }, Zi = (e) => e.replace(Rr, (t) => Mr[t]), Pt = (e) => typeof e == "string" && e.includes("-") && !Ir.has(e), Or = async (e) => Object.fromEntries(
1774
+ }, Zi = (e) => e.replace(jr, (t) => Rr[t]), Pt = (e) => typeof e == "string" && e.includes("-") && !Ir.has(e), Mr = async (e) => Object.fromEntries(
1775
1775
  (await e.componentFilesPromise).map((t) => [Yi(t), t])
1776
1776
  ), Yi = (e, t = u.resolve("src")) => u.relative(t, u.join(e, "..", Tt.slice(0, -3))), xt = async (e, t, i = t) => await Ue(i, { recursive: !0 }).catch((n) => {
1777
1777
  if (String(n).includes("ENOENT"))
@@ -1782,24 +1782,24 @@ const Fr = (e) => e.replaceAll("\\", "\\\\").replace(Nr, "\\${").replaceAll("`",
1782
1782
  if (!a.endsWith(".tsx"))
1783
1783
  return;
1784
1784
  const c = u.join(i, a);
1785
- if (he(c, t))
1785
+ if (ve(c, t))
1786
1786
  return c;
1787
1787
  a.endsWith(".stories.tsx") && c.startsWith(t) && s.push(c);
1788
1788
  }).filter(j);
1789
1789
  return e.componentFiles = r, e.componentStoryFiles = s, r;
1790
1790
  });
1791
- function he(e, t) {
1791
+ function ve(e, t) {
1792
1792
  if (!e.startsWith(t) || !e.endsWith(".tsx"))
1793
1793
  return !1;
1794
- const [i, n] = e.slice(0, -4).split(u.sep).slice(Jr);
1794
+ const [i, n] = e.slice(0, -4).split(u.sep).slice(Or);
1795
1795
  return i === n;
1796
1796
  }
1797
- const Jr = -2, Yt = 5, ei = 1, ti = 1, ii = 3, ni = 4, ze = o;
1798
- Kr(ze.createSourceMapGenerator);
1799
- Wr(ze.createTextWriter);
1800
- Br(ze.getNewLineCharacter);
1801
- const me = ze;
1802
- function Kr(e) {
1797
+ const Or = -2, Yt = 5, ei = 1, ti = 1, ii = 3, ni = 4, ze = o;
1798
+ Jr(ze.createSourceMapGenerator);
1799
+ Kr(ze.createTextWriter);
1800
+ Wr(ze.getNewLineCharacter);
1801
+ const fe = ze;
1802
+ function Jr(e) {
1803
1803
  if (typeof e != "function")
1804
1804
  throw new Error(
1805
1805
  "Failed to find ts.createSourceMapGenerator() function. Lumina needs to be updated to support the new TypeScript version"
@@ -1809,7 +1809,7 @@ function Kr(e) {
1809
1809
  `ts.createSourceMapGenerator() signature changed. Expected ${Yt} arguments. Lumina needs to be updated to support the new TypeScript version`
1810
1810
  );
1811
1811
  }
1812
- function Wr(e) {
1812
+ function Kr(e) {
1813
1813
  if (typeof e != "function")
1814
1814
  throw new Error(
1815
1815
  "Failed to find ts.createTextWriter() function. Lumina needs to be updated to support the new TypeScript version"
@@ -1819,7 +1819,7 @@ function Wr(e) {
1819
1819
  `ts.createTextWriter() signature changed. Expected ${ei} arguments. Lumina needs to be updated to support the new TypeScript version`
1820
1820
  );
1821
1821
  }
1822
- function Br(e) {
1822
+ function Wr(e) {
1823
1823
  if (typeof e != "function")
1824
1824
  throw new Error(
1825
1825
  "Failed to find ts.getNewLineCharacter() function. Lumina needs to be updated to support the new TypeScript version"
@@ -1829,7 +1829,7 @@ function Br(e) {
1829
1829
  `ts.getNewLineCharacter() signature changed. Expected ${ti} argument. Lumina needs to be updated to support the new TypeScript version`
1830
1830
  );
1831
1831
  }
1832
- function _r(e) {
1832
+ function Br(e) {
1833
1833
  if (typeof e != "function")
1834
1834
  throw new Error(
1835
1835
  "Failed to find ts.Printer.writeFile() function. Lumina needs to be updated to support the new TypeScript version"
@@ -1839,7 +1839,7 @@ function _r(e) {
1839
1839
  `ts.Printer.writeFile() signature changed. Expected ${ii} arguments. Lumina needs to be updated to support the new TypeScript version`
1840
1840
  );
1841
1841
  }
1842
- function Hr(e) {
1842
+ function _r(e) {
1843
1843
  if (typeof e != "function")
1844
1844
  throw new Error(
1845
1845
  "Failed to find ts.Printer.writeNode() function. Lumina needs to be updated to support the new TypeScript version"
@@ -1850,24 +1850,24 @@ function Hr(e) {
1850
1850
  );
1851
1851
  }
1852
1852
  function en(e) {
1853
- const t = me.createPrinter(e);
1854
- return _r(t.writeFile), Hr(t.writeNode), t;
1853
+ const t = fe.createPrinter(e);
1854
+ return Br(t.writeFile), _r(t.writeNode), t;
1855
1855
  }
1856
1856
  function si(e) {
1857
1857
  const t = o.isUnionTypeNode(e) ? e.types.map(ri) : [ri(e)], i = new Set(t), n = i.delete("true"), s = i.delete("false");
1858
1858
  (n || s) && i.add("boolean");
1859
1859
  let r = Array.from(i).sort();
1860
- if (r.length > 1 && (r = r.map((a) => a.includes("=>") ? `(${a})` : a)), !(r.length > Ur))
1861
- return r.map(Gr);
1860
+ if (r.length > 1 && (r = r.map((a) => a.includes("=>") ? `(${a})` : a)), !(r.length > Hr))
1861
+ return r.map(qr);
1862
1862
  }
1863
- const Ur = 40, zr = (e) => e?.some(
1863
+ const Hr = 40, Ur = (e) => e?.some(
1864
1864
  (t) => t.type === "number" || t.type === "boolean" || t.type === "string" || /**
1865
1865
  * Treat "any" as possibly literal, but not "unknown". Matches Stencil
1866
1866
  * behavior.
1867
1867
  */
1868
1868
  t.type === "any"
1869
- ) ?? !1, qr = (e) => e.length === 1 && e[0].type !== "string" && e[0].type !== "number" && e[0].type !== "boolean" && e[0].type !== "any" ? void 0 : e, tn = (e) => e.map(nn).join(" | "), nn = (e) => e.type === "string" && e.value !== void 0 ? `"${e.value}"` : e.value ?? e.type;
1870
- function Gr(e) {
1869
+ ) ?? !1, zr = (e) => e.length === 1 && e[0].type !== "string" && e[0].type !== "number" && e[0].type !== "boolean" && e[0].type !== "any" ? void 0 : e, tn = (e) => e.map(nn).join(" | "), nn = (e) => e.type === "string" && e.value !== void 0 ? `"${e.value}"` : e.value ?? e.type;
1870
+ function qr(e) {
1871
1871
  return e === "boolean" ? { type: "boolean" } : Number.isNaN(Number.parseFloat(e)) ? e.startsWith('"') || e.startsWith("'") ? {
1872
1872
  value: e.slice(1, -1),
1873
1873
  type: "string"
@@ -1878,25 +1878,25 @@ function Gr(e) {
1878
1878
  type: "number"
1879
1879
  };
1880
1880
  }
1881
- const Vr = (e, t, i, n) => {
1881
+ const Gr = (e, t, i, n) => {
1882
1882
  const s = e.typeScriptTypeChecker, r = o.isSetAccessor(t) ? t.parameters[0] : t, a = s.getTypeAtLocation(r), c = !i;
1883
1883
  return Me(s, a, n, e.dir, c);
1884
1884
  };
1885
- function Xr(e, t) {
1885
+ function Vr(e, t) {
1886
1886
  if (e.length === 0)
1887
1887
  return;
1888
- const i = t.matchAll(Qr), n = [];
1888
+ const i = t.matchAll(Xr), n = [];
1889
1889
  for (const s of i) {
1890
1890
  const r = e.find((a) => a.name === s[0]);
1891
1891
  r !== void 0 && n.push({ ...r, start: s.index, end: s.index + r.name.length });
1892
1892
  }
1893
1893
  return n.length === 0 ? void 0 : n;
1894
1894
  }
1895
- const Qr = /"[^"]+"|'[^"]+'|\w+/gu;
1895
+ const Xr = /"[^"]+"|'[^"]+'|\w+/gu;
1896
1896
  function Me(e, t, i, n, s = !1) {
1897
1897
  let { typeNode: r, references: a } = ai(e, t, i, n), c = si(r);
1898
1898
  c === void 0 && ({ typeNode: r, references: a } = ai(e, t, i, n, !1), c = si(r) ?? []);
1899
- const l = s ? c.filter((f) => f.type !== "null" && f.type !== "undefined") : c, d = tn(l), p = qr(l), m = Xr(a, d);
1899
+ const l = s ? c.filter((f) => f.type !== "null" && f.type !== "undefined") : c, d = tn(l), p = zr(l), m = Vr(a, d);
1900
1900
  return {
1901
1901
  text: d,
1902
1902
  references: m,
@@ -1904,21 +1904,21 @@ function Me(e, t, i, n, s = !1) {
1904
1904
  };
1905
1905
  }
1906
1906
  function ri(e) {
1907
- Zr.writeNode(o.EmitHint.Unspecified, e, void 0, it);
1907
+ Qr.writeNode(o.EmitHint.Unspecified, e, void 0, it);
1908
1908
  const t = it.getText();
1909
1909
  return it.clear(), t;
1910
1910
  }
1911
- const Zr = en({ removeComments: !0 }), it = me.createTextWriter(`
1912
- `), sn = o.TypeFormatFlags.NoTruncation | o.TypeFormatFlags.WriteArrayAsGenericType | o.TypeFormatFlags.SuppressAnyReturnType | o.TypeFormatFlags.MultilineObjectLiterals, Yr = sn & o.TypeFormatFlags.NodeBuilderFlagsMask, eo = Yr | o.NodeBuilderFlags.IgnoreErrors | o.NodeBuilderFlags.NoTruncation;
1913
- function to(e, t, i, n = !0) {
1911
+ const Qr = en({ removeComments: !0 }), it = fe.createTextWriter(`
1912
+ `), sn = o.TypeFormatFlags.NoTruncation | o.TypeFormatFlags.WriteArrayAsGenericType | o.TypeFormatFlags.SuppressAnyReturnType | o.TypeFormatFlags.MultilineObjectLiterals, Zr = sn & o.TypeFormatFlags.NodeBuilderFlagsMask, Yr = Zr | o.NodeBuilderFlags.IgnoreErrors | o.NodeBuilderFlags.NoTruncation;
1913
+ function eo(e, t, i, n = !0) {
1914
1914
  const s = /* @__PURE__ */ new Map();
1915
1915
  ne(t, s, i, n);
1916
1916
  const r = t.flags & o.TypeFlags.Union ? t.types.every(oi) : oi(t), a = e.typeToTypeNode(
1917
1917
  t,
1918
1918
  void 0,
1919
- eo & (r ? ~o.TypeFormatFlags.MultilineObjectLiterals : -1)
1919
+ Yr & (r ? ~o.TypeFormatFlags.MultilineObjectLiterals : -1)
1920
1920
  );
1921
- return s.forEach(io), 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;
1921
+ return s.forEach(to), 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;
1922
1922
  }
1923
1923
  const oi = (e) => e.flags & o.TypeFlags.Object ? e.getProperties().length === 1 : !!(e.flags & o.TypeFlags.PossiblyFalsy);
1924
1924
  function ai(e, t, i, n, s = !0) {
@@ -1950,10 +1950,10 @@ function ai(e, t, i, n, s = !0) {
1950
1950
  name: f,
1951
1951
  package: void 0,
1952
1952
  module: "index.js"
1953
- } : no(m, f, i, n);
1953
+ } : io(m, f, i, n);
1954
1954
  r.push(g), a.add(f);
1955
1955
  }
1956
- return { typeNode: to(e, t, c, s), references: r };
1956
+ return { typeNode: eo(e, t, c, s), references: r };
1957
1957
  }
1958
1958
  function ne(e, t, i, n = !0) {
1959
1959
  if (typeof e != "object" || e === null || !("checker" in e))
@@ -1983,10 +1983,10 @@ function ne(e, t, i, n = !0) {
1983
1983
  c !== "resolvedBaseConstructorType" && c !== "resolvedBaseTypes" && c !== "typeParameters" && c !== "typeParameter" && (Array.isArray(l) ? l.forEach((d) => ne(d, t, i, n)) : ne(l, t, i, n));
1984
1984
  });
1985
1985
  }
1986
- function io(e, t) {
1986
+ function to(e, t) {
1987
1987
  e.origin !== void 0 && (t.origin = e.origin), e.aliasSymbol !== void 0 && (t.aliasSymbol = e.aliasSymbol), e.aliasTypeArguments !== void 0 && (t.aliasTypeArguments = e.aliasTypeArguments);
1988
1988
  }
1989
- function no(e, t, i, n) {
1989
+ function io(e, t, i, n) {
1990
1990
  const s = e?.declarations?.map((c) => c.getSourceFile()) ?? [];
1991
1991
  if (s.length === 0) {
1992
1992
  if (t === "Array")
@@ -2007,7 +2007,7 @@ function no(e, t, i, n) {
2007
2007
  package: Mi,
2008
2008
  module: void 0
2009
2009
  };
2010
- const { packageName: r, moduleName: a } = so(s[0].fileName, n);
2010
+ const { packageName: r, moduleName: a } = no(s[0].fileName, n);
2011
2011
  return r ? {
2012
2012
  name: t,
2013
2013
  package: r,
@@ -2019,7 +2019,7 @@ function no(e, t, i, n) {
2019
2019
  module: a
2020
2020
  };
2021
2021
  }
2022
- function so(e, t) {
2022
+ function no(e, t) {
2023
2023
  const i = e.split("/node_modules/");
2024
2024
  if (i.length > 1) {
2025
2025
  const a = i.at(-1);
@@ -2032,18 +2032,18 @@ function so(e, t) {
2032
2032
  }
2033
2033
  return {
2034
2034
  packageName: void 0,
2035
- moduleName: u.relative(t.root, oo(ro(e, t)))
2035
+ moduleName: u.relative(t.root, ro(so(e, t)))
2036
2036
  };
2037
2037
  }
2038
- function ro(e, t) {
2039
- return he(e, t.srcComponents) ? u.join(t.dist, Yi(e, t.src)) : e.startsWith(t.src) ? u.join(t.dist, e.slice(t.src.length)) : e;
2038
+ function so(e, t) {
2039
+ return ve(e, t.srcComponents) ? u.join(t.dist, Yi(e, t.src)) : e.startsWith(t.src) ? u.join(t.dist, e.slice(t.src.length)) : e;
2040
2040
  }
2041
- const oo = (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`;
2041
+ const ro = (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`;
2042
2042
  function rn(e) {
2043
2043
  const t = e.split("/"), n = e[0].startsWith("@") ? 2 : 1, s = t.slice(0, n).join("/"), r = t.slice(n).join("/");
2044
2044
  return { packageName: s, moduleName: r };
2045
2045
  }
2046
- const ao = (e) => e.includes("/node_modules/") || e.includes("/dist/");
2046
+ const oo = (e) => e.includes("/node_modules/") || e.includes("/dist/");
2047
2047
  function ci(e, t, i) {
2048
2048
  const n = e.declarations;
2049
2049
  if (n !== void 0)
@@ -2057,14 +2057,14 @@ function ci(e, t, i) {
2057
2057
  for (const c of a) {
2058
2058
  const l = li(c, t, i);
2059
2059
  if (l !== void 0)
2060
- return co(l);
2060
+ return ao(l);
2061
2061
  }
2062
2062
  }
2063
2063
  }
2064
2064
  function li(e, t, i) {
2065
2065
  const n = e.jsDoc?.[0];
2066
2066
  if (n !== void 0)
2067
- return ge([n, ...n.tags ?? []], ({ comment: s }) => {
2067
+ return ye([n, ...n.tags ?? []], ({ comment: s }) => {
2068
2068
  if (i === "typescript" && typeof s == "string") {
2069
2069
  const r = s.indexOf("[MDN Reference](");
2070
2070
  if (r === -1)
@@ -2072,7 +2072,7 @@ function li(e, t, i) {
2072
2072
  const a = r + 16, c = s.indexOf(")", a);
2073
2073
  return c === -1 ? void 0 : s.slice(a, c);
2074
2074
  } else if (i === "core" && Array.isArray(s))
2075
- return ge(s, (r) => {
2075
+ return ye(s, (r) => {
2076
2076
  if (!o.isJSDocLinkLike(r))
2077
2077
  return;
2078
2078
  const a = r.getText(t);
@@ -2081,16 +2081,37 @@ function li(e, t, i) {
2081
2081
  });
2082
2082
  });
2083
2083
  }
2084
- const co = (e) => e.split("#")[0];
2085
- function lo(e) {
2084
+ const ao = (e) => e.split("#")[0];
2085
+ function co(e) {
2086
2086
  const t = [];
2087
- for (const i of e.matchAll(po)) {
2088
- const n = i.groups.name, s = i.groups.description.replaceAll(uo, " ").trim();
2087
+ for (const i of e.matchAll(lo)) {
2088
+ const n = i.groups.name, s = i.groups.description.replaceAll(po, " ").trim();
2089
2089
  t.push({ name: n, description: s.endsWith("*") ? s.slice(0, -1).trim() : s });
2090
2090
  }
2091
2091
  return t.length === 0 ? void 0 : t;
2092
2092
  }
2093
- const po = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, uo = /\n\s+\*? ?/gu, mo = ["css", "less", "sass", "scss", "styl", "stylus", "pcss", "postcss", "sss"], Oe = new RegExp(`\\.(${mo.join("|")})(\\?|$)`, "u"), fo = /^import ["'](?<specifier>[^"']+)["'];$/gmu, go = () => "throwError", G = "@arcgis/lumina:loadLitCss", Z = "?layered", Fe = "?global", yo = (e) => ({
2093
+ const lo = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, po = /\n\s+\*? ?/gu, uo = ["keyed", "ref", "repeat", "live"], ce = "staticHtml", Z = "staticSvg", le = "html", re = "svg", on = Symbol("maybe HTML namespace or maybe SVG"), an = "css", cn = "mathml", ln = [an, le, cn, ce, Z, re], mo = new Set(ln), fo = ["safeClassMap", "safeStyleMap", "deferLoad"], go = "nothing", yo = [...uo, ...ln, ...fo, go], Oe = (e) => o.isJsxElement(e) || o.isJsxSelfClosingElement(e) || o.isJsxFragment(e), oe = {
2094
+ [le]: ["lit", "lit/html.js", "lit-html"],
2095
+ /**
2096
+ * Sadly, Lit called these "html" and "svg", rather than "staticHtml" and
2097
+ * "staticSvg", leading to collision. We have to import them "as", as well as
2098
+ * check for existing "html" and "svg" imports from these locations to prevent
2099
+ * collisions.
2100
+ */
2101
+ [ce]: ["lit/static-html.js", "lit-html/static.js"],
2102
+ [re]: ["lit", "lit-html", "lit/html.js"],
2103
+ [Z]: ["lit/static-html.js", "lit-html/static.js"],
2104
+ [cn]: ["lit", "lit-html", "lit/html.js"],
2105
+ [an]: ["lit", "@lit/reactive-element/css-tag.js", "@lit/reactive-element"],
2106
+ safeClassMap: ["@arcgis/lumina"],
2107
+ safeStyleMap: ["@arcgis/lumina"],
2108
+ deferLoad: ["@arcgis/lumina"],
2109
+ keyed: ["lit/directives/keyed.js", "lit-html/directives/keyed.js"],
2110
+ live: ["lit/directives/live.js", "lit-html/directives/live.js"],
2111
+ repeat: ["lit/directives/repeat.js", "lit-html/directives/repeat.js"],
2112
+ ref: ["lit/directives/ref.js", "lit-html/directives/ref.js"],
2113
+ nothing: ["lit", "@arcgis/lumina", "lit/html.js", "lit-html", "lit-element/lit-element.js"]
2114
+ }, ho = ["css", "less", "sass", "scss", "styl", "stylus", "pcss", "postcss", "sss"], Je = new RegExp(`\\.(${ho.join("|")})(\\?|$)`, "u"), vo = /^import ["'](?<specifier>[^"']+)["'];$/gmu, So = () => "throwError", G = "@arcgis/lumina:loadLitCss", Y = "?layered", Fe = "?global", wo = (e) => ({
2094
2115
  name: G,
2095
2116
  enforce: "pre",
2096
2117
  configResolved(t) {
@@ -2105,13 +2126,13 @@ const po = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, uo = /\n\s+\
2105
2126
  w(G, "Expected vite:css-post's transform handler to have only a single property: handler")
2106
2127
  );
2107
2128
  i.transform = async function(r, a) {
2108
- const c = a.endsWith(Z);
2109
- c && (a = a.slice(0, -Z.length));
2129
+ const c = a.endsWith(Y);
2130
+ c && (a = a.slice(0, -Y.length));
2110
2131
  const l = a.endsWith(Fe);
2111
- if (l && (a = a.slice(0, -Fe.length)), !Oe.test(a) || a.includes("?"))
2132
+ if (l && (a = a.slice(0, -Fe.length)), !Je.test(a) || a.includes("?"))
2112
2133
  return await n.handler.call(this, r, a);
2113
2134
  const d = `${a}?inline`, p = await n.handler.call(this, r, d), { code: m, ...f } = typeof p == "string" ? { code: p } : p ?? {};
2114
- if (typeof m != "string" || !m.startsWith(on) || !m.endsWith(an))
2135
+ if (typeof m != "string" || !m.startsWith(dn) || !m.endsWith(bo))
2115
2136
  return C.warn(
2116
2137
  G,
2117
2138
  `Expected vite:css-post to return a JS module with a string literal. Received: ${JSON.stringify(
@@ -2119,9 +2140,9 @@ const po = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, uo = /\n\s+\
2119
2140
  )}`
2120
2141
  ), p;
2121
2142
  if (l)
2122
- return e._globalCssString = cn(m), { code: "", map: { mappings: "" } };
2143
+ return e._globalCssString = pn(m), { code: "", map: { mappings: "" } };
2123
2144
  {
2124
- const g = e.isFullApiExtraction ? lo(r) : void 0;
2145
+ const g = e.isFullApiExtraction ? co(r) : void 0;
2125
2146
  if (g !== void 0) {
2126
2147
  e._cssDocs ??= /* @__PURE__ */ new Map(), e._cssDocs.set(a, g);
2127
2148
  const y = e._cssImports.get(a);
@@ -2141,7 +2162,7 @@ const po = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, uo = /\n\s+\
2141
2162
  }
2142
2163
  return {
2143
2164
  ...f,
2144
- code: wo(m, e.hmrEnabled, e.shouldMinify, c),
2165
+ code: $o(m, e.hmrEnabled, e.shouldMinify, c),
2145
2166
  /**
2146
2167
  * Vite's original transform does not generate source maps for inlined
2147
2168
  * css, thus we can't either
@@ -2155,14 +2176,14 @@ const po = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, uo = /\n\s+\
2155
2176
  if (!(i.endsWith(".js") || i.endsWith(".ts") || i.endsWith(".tsx") || e.isInStorybook && i.endsWith(".mdx")))
2156
2177
  return;
2157
2178
  let s = 0;
2158
- const r = ao(i);
2179
+ const r = oo(i);
2159
2180
  let a = !1;
2160
- const c = t.replaceAll(fo, (l, d) => {
2161
- if (!Oe.test(d) || d.includes("?"))
2181
+ const c = t.replaceAll(vo, (l, d) => {
2182
+ if (!Je.test(d) || d.includes("?"))
2162
2183
  return l;
2163
2184
  if (r) {
2164
- if ((e.options.css?.sideEffectImportHandling ?? go)(d, i) === "drop")
2165
- return a = !0, or(l);
2185
+ if ((e.options.css?.sideEffectImportHandling ?? So)(d, i) === "drop")
2186
+ return a = !0, rr(l);
2166
2187
  throw Error(
2167
2188
  w(
2168
2189
  G,
@@ -2170,7 +2191,7 @@ const po = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, uo = /\n\s+\
2170
2191
  i
2171
2192
  )
2172
2193
  );
2173
- } else if (e.isInStorybook && To(i, e)) {
2194
+ } else if (e.isInStorybook && Po(i, e)) {
2174
2195
  a = !0;
2175
2196
  const p = `storybookCss$${s}`;
2176
2197
  return s += 1, [
@@ -2201,7 +2222,8 @@ const po = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, uo = /\n\s+\
2201
2222
  map: null
2202
2223
  } : void 0;
2203
2224
  }
2204
- }), on = 'export default "', an = '"', ho = "import { css } from '@lit/reactive-element/css-tag.js';\nexport const styles = css`", vo = "`;\nexport default styles;", So = `
2225
+ }), dn = 'export default "', bo = '"', To = `import { css } from '${oe.css[0]}';
2226
+ export const styles = css\``, Eo = "`;\nexport default styles;", Co = `
2205
2227
 
2206
2228
  if(import.meta.hot) {
2207
2229
  import.meta.hot.data.styles ??= styles;
@@ -2212,93 +2234,92 @@ if(import.meta.hot) {
2212
2234
  }
2213
2235
  import.meta.hot.data.styles.styleSheet.replaceSync(nextExports.styles.cssText);
2214
2236
  });
2215
- }`, cn = (e) => e.slice(on.length, -an.length);
2216
- function wo(e, t, i, n) {
2217
- const r = cn(e).replaceAll('\\"', '"'), a = Fr(bo(r)), c = n ? `@layer{${i ? "" : `
2237
+ }`, pn = (e) => e.slice(dn.length - 1);
2238
+ function $o(e, t, i, n) {
2239
+ const s = pn(e), r = JSON.parse(s), a = Lr(r), c = n ? `@layer{${i ? "" : `
2218
2240
  `}${a}${i ? "" : `
2219
2241
  `}}` : a;
2220
- return `${ho}${c}${vo}${t ? So : ""}`;
2242
+ return `${To}${c}${Eo}${t ? Co : ""}`;
2221
2243
  }
2222
- const bo = (e) => e.replaceAll("\\r", "").replaceAll("\\n", `
2223
- `), To = (e, t) => e.endsWith(".mdx") || e.includes(".stories.") || e.includes(".story.") || e.startsWith(`${t.dir.root}stories/`);
2224
- function Eo(e) {
2225
- return `import("${Co}").then(({ setCustomElementsManifest }) => {
2226
- setCustomElementsManifest(${$o(e)});
2244
+ const Po = (e, t) => e.endsWith(".mdx") || e.includes(".stories.") || e.includes(".story.") || e.startsWith(`${t.dir.root}stories/`);
2245
+ function xo(e) {
2246
+ return `import("${ko}").then(({ setCustomElementsManifest }) => {
2247
+ setCustomElementsManifest(${Io(e)});
2227
2248
  });`;
2228
2249
  }
2229
- const Co = "@storybook/web-components", $o = (e) => `JSON.parse(\`${Po(JSON.stringify(JSON.stringify(e)).slice(1, -1))}\`)`;
2230
- function Po(e) {
2250
+ const ko = "@storybook/web-components", Io = (e) => `JSON.parse(\`${Ao(JSON.stringify(JSON.stringify(e)).slice(1, -1))}\`)`;
2251
+ function Ao(e) {
2231
2252
  return e.replaceAll('\\"', '"').replaceAll("`", "\\`").replaceAll("${", "\\${");
2232
2253
  }
2233
- function xo(e) {
2234
- ko(e);
2254
+ function Lo(e) {
2255
+ Fo(e);
2235
2256
  const t = e.options.css?.globalStylesPath;
2236
2257
  if (t === void 0)
2237
2258
  return "";
2238
- const i = oe(e.dir.src, t);
2259
+ const i = ae(e.dir.src, t);
2239
2260
  return e.viteCommand === "serve" || e.isInStorybook ? [
2240
- `import globalStyles from "${i}${Z}";`,
2261
+ `import globalStyles from "${i}${Y}";`,
2241
2262
  "document.adoptedStyleSheets = [...document.adoptedStyleSheets, globalStyles.styleSheet!];",
2242
- dn("", e)
2263
+ mn("", e)
2243
2264
  ].join(`
2244
2265
  `) : `import "${i}${Fe}";`;
2245
2266
  }
2246
- const ln = "hydrated";
2247
- function ko(e) {
2267
+ const un = "hydrated";
2268
+ function Fo(e) {
2248
2269
  e._globalHydratedCssString = [
2249
2270
  ":not([",
2250
- e.options.css?.hydratedAttribute ?? ln,
2271
+ e.options.css?.hydratedAttribute ?? un,
2251
2272
  "]):is(",
2252
2273
  e.apiJsonComponents.map((t) => t.tagName).join(","),
2253
2274
  "){visibility:hidden}"
2254
2275
  ].join("");
2255
2276
  }
2256
- function dn(e, t) {
2277
+ function mn(e, t) {
2257
2278
  return [
2258
2279
  "const globalCss = new CSSStyleSheet;",
2259
- `globalCss.replaceSync("@layer{${`${t._globalHydratedCssString}${t.shouldMinify ? "" : "\\n\\n"}${e || ""}`}}");`,
2280
+ `globalCss.replaceSync("@layer{${`${t._globalHydratedCssString}${t.shouldMinify ? "" : "\\n\\n"}${e ? e.slice(1, -1) : ""}`}}");`,
2260
2281
  "document.adoptedStyleSheets = [...document.adoptedStyleSheets, globalCss];"
2261
2282
  ].join(`
2262
2283
  `);
2263
2284
  }
2264
- const Ao = (e) => `${e._globalHydratedCssString}${e.shouldMinify ? "" : `
2285
+ const No = (e) => `${e._globalHydratedCssString}${e.shouldMinify ? "" : `
2265
2286
 
2266
- `}${e._globalCssString ? JSON.parse(`"${e._globalCssString}"`) : ""}`;
2267
- function Io(e) {
2287
+ `}${e._globalCssString ? JSON.parse(e._globalCssString) : ""}`;
2288
+ function Do(e) {
2268
2289
  const t = [], i = [];
2269
2290
  for (const n of e.privateApiJson.modules) {
2270
2291
  t.push(n.path);
2271
2292
  for (const s of n.declarations)
2272
- "customElement" in s && i.push(Fo(s, e, n.path));
2293
+ "customElement" in s && i.push(Ro(s, e, n.path));
2273
2294
  }
2274
2295
  return [
2275
2296
  'import { runtime } from "./runtime";',
2276
2297
  'import { makeDefineCustomElements } from "@arcgis/lumina";',
2277
- xo(e),
2278
- e.hmrEnabled ? Do : "",
2298
+ Lo(e),
2299
+ e.hmrEnabled ? Oo : "",
2279
2300
  "",
2280
- e.isInStorybook ? Eo(e.apiJson) : "",
2301
+ e.isInStorybook ? xo(e.apiJson) : "",
2281
2302
  "",
2282
2303
  "export const defineCustomElements = makeDefineCustomElements(runtime, {",
2283
2304
  i.join(`,
2284
2305
  `),
2285
2306
  "});",
2286
- e.hmrEnabled ? jo(t) : ""
2307
+ e.hmrEnabled ? Jo(t) : ""
2287
2308
  ].join(`
2288
2309
  `);
2289
2310
  }
2290
- const Lo = `import "./index";
2291
- export declare const defineCustomElements: import("@arcgis/lumina").DefineCustomElements;`, Fo = (e, t, i) => [
2311
+ const jo = `import "./index";
2312
+ export declare const defineCustomElements: import("@arcgis/lumina").DefineCustomElements;`, Ro = (e, t, i) => [
2292
2313
  ` "${e.tagName}": [`,
2293
2314
  `()=>import("${u.join(t.dir.root, i)}"),`,
2294
- No(e),
2315
+ Mo(e),
2295
2316
  "]"
2296
2317
  ].join("");
2297
- function No(e) {
2298
- const { properties: t, asyncMethods: i, syncMethods: n } = pn(e), s = t.map((p) => p.join(Cs)).join(Ye), r = i.join(Ye), a = n.join(Ye), c = [s, r, a], l = c.findLastIndex((p) => p.length > 0), d = c.slice(0, l + 1);
2299
- return d.length > 0 ? `"${d.join($s)}"` : "";
2318
+ function Mo(e) {
2319
+ const { properties: t, asyncMethods: i, syncMethods: n } = fn(e), s = t.map((p) => p.join(Es)).join(Ye), r = i.join(Ye), a = n.join(Ye), c = [s, r, a], l = c.findLastIndex((p) => p.length > 0), d = c.slice(0, l + 1);
2320
+ return d.length > 0 ? `"${d.join(Cs)}"` : "";
2300
2321
  }
2301
- function pn(e) {
2322
+ function fn(e) {
2302
2323
  const t = e.members.filter((r) => r.kind === "field").map((r) => {
2303
2324
  const a = typeof r.attribute == "string", c = a && r.attribute !== bt(r.name);
2304
2325
  return a && !c ? [r.name] : [r.name, c ? String(r.attribute) : ""];
@@ -2311,23 +2332,23 @@ function pn(e) {
2311
2332
  ), n = i.filter((r) => r.async === !0).map((r) => r.name), s = i.filter((r) => r.async !== !0).map((r) => r.name);
2312
2333
  return { tagName: e.tagName, properties: t, asyncMethods: n, syncMethods: s };
2313
2334
  }
2314
- const Do = `import { handleHmrUpdate, handleComponentMetaUpdate } from "@arcgis/lumina/hmrSupport";
2315
- `, jo = (e) => `
2335
+ const Oo = `import { handleHmrUpdate, handleComponentMetaUpdate } from "@arcgis/lumina/hmrSupport";
2336
+ `, Jo = (e) => `
2316
2337
  if(import.meta.hot) {
2317
2338
  import.meta.hot.on("component-meta-update", handleComponentMetaUpdate);
2318
2339
  import.meta.hot.accept([
2319
2340
  ${e.map((t) => ` "/${t}",`).join(`
2320
2341
  `)}
2321
2342
  ], handleHmrUpdate);
2322
- }`, Ro = "@arcgis/lumina:addMethodMetadata";
2323
- function Mo(e, t, i, n, s) {
2343
+ }`, Ko = "@arcgis/lumina:addMethodMetadata";
2344
+ function Wo(e, t, i, n, s) {
2324
2345
  const r = i.getSignatureFromDeclaration(e);
2325
2346
  if (r === void 0)
2326
2347
  return;
2327
2348
  for (const d of e.parameters) {
2328
2349
  if (!o.isIdentifier(d.name)) {
2329
2350
  C.warn(
2330
- Ro,
2351
+ Ko,
2331
2352
  `Object binding patterns are not yet supported in the docs. Found ${d.name?.getText(n)} in ${e.name.getText(n)}`,
2332
2353
  n.fileName
2333
2354
  );
@@ -2344,12 +2365,12 @@ function Mo(e, t, i, n, s) {
2344
2365
  }
2345
2366
  t.parameters.length === 0 && (t.parameters = void 0);
2346
2367
  const a = i.getReturnTypeOfSignature(r), c = Me(i, a, n, s), l = i.signatureToString(r, e, sn, o.SignatureKind.Call);
2347
- ue(e.name, i, t), t.return = {
2368
+ me(e.name, i, t), t.return = {
2348
2369
  type: c
2349
2370
  }, t.signature = l.replace(" =>", ":");
2350
2371
  }
2351
- const Oo = (e) => e.modifiers?.some?.((t) => t.kind === o.SyntaxKind.AsyncKeyword) ?? !1;
2352
- function Jo(e, t, i, n) {
2372
+ const Bo = (e) => e.modifiers?.some?.((t) => t.kind === o.SyntaxKind.AsyncKeyword) ?? !1;
2373
+ function _o(e, t, i, n) {
2353
2374
  const s = i.typeScriptTypeChecker, a = s.getTypeAtLocation(e).getProperty("emit");
2354
2375
  if (a?.valueDeclaration === void 0)
2355
2376
  return;
@@ -2374,15 +2395,15 @@ function Jo(e, t, i, n) {
2374
2395
  composed: void 0,
2375
2396
  privacy: void 0
2376
2397
  };
2377
- return ue(e.name, s, g), Ko(e, g, n), g.privacy === void 0 ? g : void 0;
2398
+ return me(e.name, s, g), Ho(e, g, n), g.privacy === void 0 ? g : void 0;
2378
2399
  }
2379
2400
  }
2380
- const Ae = "createEvent";
2381
- function Ko(e, t, i) {
2401
+ const Ie = "createEvent";
2402
+ function Ho(e, t, i) {
2382
2403
  if (!e.initializer || !o.isCallExpression(e.initializer))
2383
2404
  return;
2384
2405
  const n = e.initializer;
2385
- if (!o.isIdentifier(n.expression) || n.expression.text !== Ae)
2406
+ if (!o.isIdentifier(n.expression) || n.expression.text !== Ie)
2386
2407
  return;
2387
2408
  const s = n.arguments[0];
2388
2409
  if (s !== void 0) {
@@ -2390,14 +2411,14 @@ function Ko(e, t, i) {
2390
2411
  throw Error(
2391
2412
  w(
2392
2413
  "@arcgis/lumina:extractEventMeta",
2393
- `Expected object literal expression as first argument of ${Ae}(). Found ${t.name} = createEvent(${s.getText(i)})`
2414
+ `Expected object literal expression as first argument of ${Ie}(). Found ${t.name} = createEvent(${s.getText(i)})`
2394
2415
  )
2395
2416
  );
2396
2417
  if (s.properties.some((r) => o.isSpreadAssignment(r)))
2397
2418
  throw Error(
2398
2419
  w(
2399
2420
  "@arcgis/lumina:extractEventMeta",
2400
- `Unexpected spread syntax in ${Ae}() argument. ${Ae}() arguments must be statically parsable at compile time`
2421
+ `Unexpected spread syntax in ${Ie}() argument. ${Ie}() arguments must be statically parsable at compile time`
2401
2422
  )
2402
2423
  );
2403
2424
  for (const r of s.properties)
@@ -2417,7 +2438,7 @@ function se(e, t) {
2417
2438
  );
2418
2439
  }
2419
2440
  const kt = "@arcgis/lumina-compiler";
2420
- class Je extends us {
2441
+ class Ke extends ps {
2421
2442
  constructor(t, i) {
2422
2443
  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;
2423
2444
  }
@@ -2429,7 +2450,7 @@ class Je extends us {
2429
2450
  const i = super.extractModules(t);
2430
2451
  for (const n of i)
2431
2452
  for (const s of n.declarations)
2432
- "customElement" in s && (this.context.isFullApiExtraction && _o(s, this.context, this.indexedComponents), this.inheritMembers(s, i), this.context.isFullApiExtraction && (s.members.sort(nt), s.attributes?.sort(nt), s.events?.sort(nt)));
2453
+ "customElement" in s && (this.context.isFullApiExtraction && qo(s, this.context, this.indexedComponents), this.inheritMembers(s, i), this.context.isFullApiExtraction && (s.members.sort(nt), s.attributes?.sort(nt), s.events?.sort(nt)));
2433
2454
  return i;
2434
2455
  }
2435
2456
  extractDeclarations(t) {
@@ -2447,7 +2468,7 @@ class Je extends us {
2447
2468
  }
2448
2469
  collectCssImports(t) {
2449
2470
  const i = t.moduleSpecifier.text;
2450
- if (!(i.startsWith(".") && Oe.test(i)))
2471
+ if (!(i.startsWith(".") && Je.test(i)))
2451
2472
  return;
2452
2473
  const s = u.join(this.file.fileName, "..", i);
2453
2474
  this.localCssImports ??= /* @__PURE__ */ new Set(), this.localCssImports.add(s);
@@ -2468,7 +2489,7 @@ class Je extends us {
2468
2489
  description: void 0,
2469
2490
  demos: void 0,
2470
2491
  docsTags: void 0,
2471
- superclass: le,
2492
+ superclass: de,
2472
2493
  encapsulation: void 0,
2473
2494
  /**
2474
2495
  * We use the tag name rather than the class name to generate the
@@ -2476,7 +2497,7 @@ class Je extends us {
2476
2497
  * prefix (Arcgis), where as tag name always does. This also matches
2477
2498
  * Stencil's behavior.
2478
2499
  */
2479
- pascalCaseName: hs(n),
2500
+ pascalCaseName: ys(n),
2480
2501
  privacy: void 0,
2481
2502
  importPath: "",
2482
2503
  members: [],
@@ -2496,13 +2517,13 @@ class Je extends us {
2496
2517
  );
2497
2518
  if (o.isIdentifier(r)) {
2498
2519
  const a = r.text;
2499
- a !== le.name && (s.superclass = {
2520
+ a !== de.name && (s.superclass = {
2500
2521
  name: a
2501
2522
  });
2502
2523
  }
2503
2524
  if (this.apiComponent = s, s.members = this.extractComponentMembers(t), this.context.isFullApiExtraction) {
2504
2525
  s.attributes = this.inferAttributes(s.members), this.indexedComponents.set(i, s);
2505
- const a = Os(n, this.context, this.apiModule.path);
2526
+ const a = Ms(n, this.context, this.apiModule.path);
2506
2527
  if (s.importPath = `components/${a}`, this.localCssImports !== void 0) {
2507
2528
  for (const f of this.localCssImports) {
2508
2529
  const g = this.context._cssImports.get(f);
@@ -2512,7 +2533,7 @@ class Je extends us {
2512
2533
  }
2513
2534
  this.localCssImports = void 0;
2514
2535
  }
2515
- ue(t.name, this.context.typeScriptTypeChecker, s);
2536
+ me(t.name, this.context.typeScriptTypeChecker, s);
2516
2537
  const c = ut(s.name);
2517
2538
  s.members.push({
2518
2539
  kind: "method",
@@ -2534,7 +2555,7 @@ class Je extends us {
2534
2555
  description: "Create a promise that resolves once component is fully loaded.",
2535
2556
  signature: "(): Promise<void>",
2536
2557
  async: !0,
2537
- inheritedFrom: le,
2558
+ inheritedFrom: de,
2538
2559
  docsTags: [
2539
2560
  {
2540
2561
  name: "example",
@@ -2575,7 +2596,7 @@ console.log("${s.tagName} is ready to go!");
2575
2596
  return i;
2576
2597
  }
2577
2598
  extractComponentMember(t, i) {
2578
- if (ms(t) || i === void 0) {
2599
+ if (us(t) || i === void 0) {
2579
2600
  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");
2580
2601
  return;
2581
2602
  }
@@ -2612,13 +2633,13 @@ console.log("${s.tagName} is ready to go!");
2612
2633
  inheritedFrom: void 0,
2613
2634
  privacy: void 0
2614
2635
  };
2615
- return this.context.isFullApiExtraction && (this.extractComponentFieldDetails(t, l), (r === void 0 && (l.type.values === void 0 || !zr(l.type.values)) || l.readonly && !l.reflects) && (l.attribute = void 0)), l;
2636
+ return this.context.isFullApiExtraction && (this.extractComponentFieldDetails(t, l), (r === void 0 && (l.type.values === void 0 || !Ur(l.type.values)) || l.readonly && !l.reflects) && (l.attribute = void 0)), l;
2616
2637
  }
2617
2638
  /**
2618
2639
  * Based on a `non-@property()` property, extract a public event if it is one.
2619
2640
  */
2620
2641
  extractComponentEvent(t, i) {
2621
- const n = Jo(t, i, this.context, this.file);
2642
+ const n = _o(t, i, this.context, this.file);
2622
2643
  return n !== void 0 && this.copyDoc(this.copyDocDefinitions?.events?.[i], n, this.apiComponent), n;
2623
2644
  }
2624
2645
  /**
@@ -2626,7 +2647,7 @@ console.log("${s.tagName} is ready to go!");
2626
2647
  */
2627
2648
  extractComponentFieldDetails(t, i) {
2628
2649
  const n = i.readonly === !0, s = this.context.typeScriptTypeChecker, r = s.getSymbolAtLocation(t.name), a = r === void 0 ? void 0 : Kt(s, r), c = new Set(a?.docsTags.map((h) => h.name) ?? []);
2629
- ue(t.name, this.context.typeScriptTypeChecker, i, a);
2650
+ me(t.name, this.context.typeScriptTypeChecker, i, a);
2630
2651
  let l = !n && i.readonly === !0;
2631
2652
  const d = this.pairedSetter ?? t, p = i.default;
2632
2653
  Wt(t, i, this.file);
@@ -2635,7 +2656,7 @@ console.log("${s.tagName} is ready to go!");
2635
2656
  // in the documentation. The full type is still present in the .d.ts files.
2636
2657
  i.name === "messageOverrides" ? {
2637
2658
  text: "Record<string, unknown>"
2638
- } : Vr(this.context, d, f, this.file);
2659
+ } : Gr(this.context, d, f, this.file);
2639
2660
  const g = 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);
2640
2661
  if ("initializer" in t && t.initializer !== void 0 && (!i.default || !i.description) || g) {
2641
2662
  const h = t.initializer, v = s.getSymbolAtLocation(h), S = v !== void 0 && ((v.flags ?? 0) & o.SymbolFlags.Alias) !== 0 ? s.getAliasedSymbol(v) : v, T = S?.getDeclarations() ?? [];
@@ -2643,10 +2664,10 @@ console.log("${s.tagName} is ready to go!");
2643
2664
  const $ = Kt(s, S);
2644
2665
  if ($.docsTags.length > 0) {
2645
2666
  $.docsTags = $.docsTags.filter(
2646
- (E) => !c.has(E.name) || fs.has(E.name)
2667
+ (E) => !c.has(E.name) || ms.has(E.name)
2647
2668
  );
2648
2669
  const b = i.description;
2649
- ue(t.name, s, i, $), $.docsTags.forEach((E) => {
2670
+ me(t.name, s, i, $), $.docsTags.forEach((E) => {
2650
2671
  c.add(E.name);
2651
2672
  }), i.description = b ?? i.description;
2652
2673
  } else
@@ -2660,9 +2681,9 @@ console.log("${s.tagName} is ready to go!");
2660
2681
  l ||= b.modifiers?.some((E) => E.kind === o.SyntaxKind.ReadonlyKeyword) ?? !1, Wt(b, i, b.getSourceFile());
2661
2682
  }), g && x !== void 0 && L !== void 0 && x.type?.getText() !== L.parameters[0]?.type?.getText() && (i.getterType = { text: `typeof ${h.getText(this.file)}` });
2662
2683
  }
2663
- if (l && (i.readonly = !0, n || (i.docsOnlyReadonly = !0)), i.type.values && i.type.values.length > 0 && i.type.values?.every((h) => h.type === "boolean") && (i.default ? m && this.context.viteCommand === "build" && i.deprecated === void 0 && (Je.loggedBooleanWarning || this.context.logLintWarning(
2684
+ if (l && (i.readonly = !0, n || (i.docsOnlyReadonly = !0)), i.type.values && i.type.values.length > 0 && i.type.values?.every((h) => h.type === "boolean") && (i.default ? m && this.context.viteCommand === "build" && i.deprecated === void 0 && (Ke.loggedBooleanWarning || this.context.logLintWarning(
2664
2685
  `Boolean properties should default to "false". Found default value "true" in ${this.apiComponent.name}.${i.name}. See https://qawebgis.esri.com/components/lumina/properties#boolean-properties`
2665
- ), Je.loggedBooleanWarning = !0) : i.default = "false"), this.pairedSetter !== void 0 && !i.readonly) {
2686
+ ), Ke.loggedBooleanWarning = !0) : i.default = "false"), this.pairedSetter !== void 0 && !i.readonly) {
2666
2687
  const h = this.pairedSetter.parameters.at(0)?.type?.getText(this.file), v = t.type?.getText(this.file);
2667
2688
  h !== v && v !== void 0 && h !== void 0 && (i.getterType = { text: v });
2668
2689
  }
@@ -2692,12 +2713,12 @@ console.log("${s.tagName} is ready to go!");
2692
2713
  inheritedFrom: void 0,
2693
2714
  docsTags: void 0,
2694
2715
  signature: "",
2695
- async: Oo(t) ? !0 : void 0,
2716
+ async: Bo(t) ? !0 : void 0,
2696
2717
  privacy: void 0
2697
2718
  };
2698
2719
  if (this.context.isFullApiExtraction) {
2699
2720
  const s = this.context.typeScriptTypeChecker;
2700
- Mo(t, n, s, this.file, this.context.dir), this.copyDoc(this.copyDocDefinitions?.methods?.[i], n, this.apiComponent);
2721
+ Wo(t, n, s, this.file, this.context.dir), this.copyDoc(this.copyDocDefinitions?.methods?.[i], n, this.apiComponent);
2701
2722
  }
2702
2723
  return n;
2703
2724
  }
@@ -2750,7 +2771,7 @@ console.log("${s.tagName} is ready to go!");
2750
2771
  */
2751
2772
  inheritMembers(t, i, n = t.superclass, s, r, a) {
2752
2773
  const c = n.name;
2753
- if (c === void 0 || c === le.name)
2774
+ if (c === void 0 || c === de.name)
2754
2775
  return;
2755
2776
  const l = this._resolvedInheritance.get(c) ?? this.resolveInheritance(c, i) ?? (this.isPathOnly ? this.resolveInheritance(c, this.context.privateApiJson.modules) : void 0);
2756
2777
  if (l !== void 0) {
@@ -2767,7 +2788,7 @@ console.log("${s.tagName} is ready to go!");
2767
2788
  for (const d of l.events)
2768
2789
  a.has(d.name) || (t.events.push({ ...d, inheritedFrom: n }), a.add(d.name));
2769
2790
  }
2770
- l.superclass.name !== le.name && this.inheritMembers(
2791
+ l.superclass.name !== de.name && this.inheritMembers(
2771
2792
  t,
2772
2793
  i,
2773
2794
  l.superclass,
@@ -2788,23 +2809,23 @@ console.log("${s.tagName} is ready to go!");
2788
2809
  this._resolvedInheritance.set(t, void 0);
2789
2810
  }
2790
2811
  }
2791
- const le = {
2812
+ const de = {
2792
2813
  name: "LitElement",
2793
2814
  package: "@arcgis/lumina"
2794
2815
  }, nt = (e, t) => e.name.localeCompare(t.name);
2795
- async function Wo(e, t) {
2816
+ async function Uo(e, t) {
2796
2817
  t || (e.componentFilesPromise = xt(e, e.dir.srcComponents));
2797
- const i = await e.componentFilesPromise, n = await Qo(e, i);
2818
+ const i = await e.componentFilesPromise, n = await ta(e, i);
2798
2819
  await e.componentStoriesPromise, e._componentPathMapping = {}, e._localDefinedComponents = void 0;
2799
- const s = un(n, e, !1);
2820
+ const s = gn(n, e, !1);
2800
2821
  e.privateApiJson = s;
2801
- const [r, a] = mn(s);
2822
+ const [r, a] = yn(s);
2802
2823
  return e.apiJsonComponents = a, e.apiJson = r, s;
2803
2824
  }
2804
- function Bo(e, t, i) {
2805
- const n = e.getSourceFile(t, i), s = un([n], e, !0), r = s.modules[0];
2825
+ function zo(e, t, i) {
2826
+ const n = e.getSourceFile(t, i), s = gn([n], e, !0), r = s.modules[0];
2806
2827
  {
2807
- const f = mn(s)[0].modules[0], g = e.apiJson.modules.findIndex((v) => v.path === f.path), y = e.apiJson.modules[g], h = Array.from(e.apiJson.modules);
2828
+ const f = yn(s)[0].modules[0], g = e.apiJson.modules.findIndex((v) => v.path === f.path), y = e.apiJson.modules[g], h = Array.from(e.apiJson.modules);
2808
2829
  h.splice(g, 1, f), e.apiJson = { ...e.apiJson, modules: h }, e.apiJsonComponents = e.apiJsonComponents.filter(
2809
2830
  (v) => !y.declarations.includes(v)
2810
2831
  );
@@ -2826,11 +2847,11 @@ function Bo(e, t, i) {
2826
2847
  }
2827
2848
  return d ||= m.length !== p.length, d ? void 0 : m;
2828
2849
  }
2829
- function un(e, t, i) {
2830
- const n = t.options.apiJson?.Extractor ?? Je, r = new n(t, i).extract(e);
2850
+ function gn(e, t, i) {
2851
+ const n = t.options.apiJson?.Extractor ?? Ke, r = new n(t, i).extract(e);
2831
2852
  return t.options.apiJson?.afterCreate?.(r, i), r;
2832
2853
  }
2833
- function mn(e) {
2854
+ function yn(e) {
2834
2855
  const t = { ...e, modules: [] }, i = [];
2835
2856
  for (const n of e.modules) {
2836
2857
  const s = { ...n, declarations: [] };
@@ -2846,23 +2867,23 @@ function mn(e) {
2846
2867
  }
2847
2868
  return [t, i];
2848
2869
  }
2849
- function _o(e, t, i) {
2850
- const n = Ho(i, e);
2870
+ function qo(e, t, i) {
2871
+ const n = Go(i, e);
2851
2872
  M(e, n, t);
2852
2873
  for (const s of e.members) {
2853
2874
  if (s.kind === "field")
2854
- Ie(s.type, i, t);
2875
+ Ae(s.type, i, t);
2855
2876
  else {
2856
- if (Ie(s.return?.type, i, t), s.parameters !== void 0)
2877
+ if (Ae(s.return?.type, i, t), s.parameters !== void 0)
2857
2878
  for (const r of s.parameters)
2858
- Ie(r.type, i, t), M(r, n, t);
2879
+ Ae(r.type, i, t), M(r, n, t);
2859
2880
  s.return !== void 0 && M(s.return, n, t);
2860
2881
  }
2861
2882
  M(s, n, t);
2862
2883
  }
2863
2884
  if (e.events !== void 0)
2864
2885
  for (const s of e.events)
2865
- Ie(s.type, i, t), M(s, n, t);
2886
+ Ae(s.type, i, t), M(s, n, t);
2866
2887
  if (e.attributes !== void 0)
2867
2888
  for (const s of e.attributes)
2868
2889
  M(s, n, t);
@@ -2882,14 +2903,14 @@ function _o(e, t, i) {
2882
2903
  for (const s of e.demos)
2883
2904
  M(s, n, t);
2884
2905
  }
2885
- function Ie(e, t, i) {
2906
+ function Ae(e, t, i) {
2886
2907
  e !== void 0 && (e.references?.reduce(
2887
- (n, s) => Uo(s, t, i, n),
2908
+ (n, s) => Vo(s, t, i, n),
2888
2909
  0
2889
2910
  ), e.text = e.text.replaceAll(
2890
- Xo,
2891
- (n, s) => At(t.get(s)) ?? n
2892
- ), e.values?.forEach(zo, t));
2911
+ ea,
2912
+ (n, s) => It(t.get(s)) ?? n
2913
+ ), e.values?.forEach(Xo, t));
2893
2914
  }
2894
2915
  function M(e, t, i) {
2895
2916
  if (e.description && (e.description = e.description.replaceAll(st, t).replaceAll(i.alternativeDocumentationUrl, i.normalizedDocumentationUrl)), e.docsTags)
@@ -2897,7 +2918,7 @@ function M(e, t, i) {
2897
2918
  n.text && (n.text = n.text.replaceAll(st, t).replaceAll(i.alternativeDocumentationUrl, i.normalizedDocumentationUrl));
2898
2919
  typeof e.deprecated == "string" && (e.deprecated = e.deprecated.replaceAll(st, t).replaceAll(i.alternativeDocumentationUrl, i.normalizedDocumentationUrl));
2899
2920
  }
2900
- const st = /\{@link ([^}]+)\}/gu, Ho = (e, t) => (i, n) => {
2921
+ const st = /\{@link ([^}]+)\}/gu, Go = (e, t) => (i, n) => {
2901
2922
  let s = n.indexOf(" ");
2902
2923
  s === -1 && (s = n.length);
2903
2924
  const r = n.slice(0, s), a = n.slice(s + 1);
@@ -2921,30 +2942,30 @@ const st = /\{@link ([^}]+)\}/gu, Ho = (e, t) => (i, n) => {
2921
2942
  );
2922
2943
  return `[${a || (d === t ? l : `${d.tagName}.${l}`)}](${p}#${l})`;
2923
2944
  };
2924
- function Uo(e, t, i, n) {
2945
+ function Vo(e, t, i, n) {
2925
2946
  if (e.viewUrl !== void 0 && (e.viewUrl = e.viewUrl.replace(
2926
2947
  i.alternativeDocumentationUrl,
2927
2948
  i.normalizedDocumentationUrl
2928
2949
  )), n > 0 && (e.start !== void 0 && (e.start += n), e.end !== void 0 && (e.end += n)), e.package !== void 0)
2929
2950
  return n;
2930
2951
  if (e.module?.startsWith("dist/components/") === !0)
2931
- e.module = ye(e.module, "dist/components/", i);
2952
+ e.module = he(e.module, "dist/components/", i);
2932
2953
  else if (e.module === "index.js" && e.name) {
2933
2954
  const s = t.get(e.name);
2934
2955
  if (s !== void 0) {
2935
2956
  const r = e.name.length;
2936
- e.name = At(s);
2957
+ e.name = It(s);
2937
2958
  const a = e.name.length - r - di;
2938
- e.viewUrl = s.demos?.at(0)?.url.replace(i.alternativeDocumentationUrl, i.normalizedDocumentationUrl), e.start = e.start - di, e.end = e.end + a, n += a - Vo;
2959
+ e.viewUrl = s.demos?.at(0)?.url.replace(i.alternativeDocumentationUrl, i.normalizedDocumentationUrl), e.start = e.start - di, e.end = e.end + a, n += a - Yo;
2939
2960
  }
2940
2961
  }
2941
2962
  return n;
2942
2963
  }
2943
- function zo(e) {
2944
- e.type.startsWith("ToElement<") && (e.type = At(this.get(e.type.slice(10, -1))) ?? e.type);
2964
+ function Xo(e) {
2965
+ e.type.startsWith("ToElement<") && (e.type = It(this.get(e.type.slice(10, -1))) ?? e.type);
2945
2966
  }
2946
- const At = (e) => e ? `HTML${e.pascalCaseName}Element` : void 0, qo = "ToElement<", di = qo.length, Go = ">", Vo = Go.length, Xo = /ToElement<(\w+)>/gu;
2947
- async function Qo(e, t) {
2967
+ const It = (e) => e ? `HTML${e.pascalCaseName}Element` : void 0, Qo = "ToElement<", di = Qo.length, Zo = ">", Yo = Zo.length, ea = /ToElement<(\w+)>/gu;
2968
+ async function ta(e, t) {
2948
2969
  if (e.viteCommand === "serve" && (Object.hasOwn(e, "typeScriptHost") || (e.typeScriptHost = o.createCompilerHost(e.typeScriptConfig, !1))), e.typeScriptProgram !== void 0) {
2949
2970
  const i = e.typeScriptProgram.getSourceFiles(), n = new Set(t);
2950
2971
  return i.filter((s) => n.has(s.fileName));
@@ -2956,10 +2977,10 @@ async function Qo(e, t) {
2956
2977
  })
2957
2978
  );
2958
2979
  }
2959
- async function fn(e) {
2960
- return ve ??= Yo(e), await ve;
2980
+ async function hn(e) {
2981
+ return Se ??= na(e), await Se;
2961
2982
  }
2962
- function Zo() {
2983
+ function ia() {
2963
2984
  if (yt === void 0)
2964
2985
  throw Error(
2965
2986
  w(
@@ -2969,7 +2990,7 @@ function Zo() {
2969
2990
  );
2970
2991
  return yt;
2971
2992
  }
2972
- function gn() {
2993
+ function vn() {
2973
2994
  if (ht === void 0)
2974
2995
  throw Error(
2975
2996
  w(
@@ -2979,13 +3000,13 @@ function gn() {
2979
3000
  );
2980
3001
  return ht;
2981
3002
  }
2982
- async function Yo(e) {
3003
+ async function na(e) {
2983
3004
  const t = J(e), i = t.dependencies ?? {}, n = t.peerDependencies ?? {}, r = (await Promise.all(
2984
- [...Object.keys(i), ...Object.keys(n)].filter((a) => !ea.has(a)).flatMap(async (a) => await yn(a, e))
3005
+ [...Object.keys(i), ...Object.keys(n)].filter((a) => !sa.has(a)).flatMap(async (a) => await Sn(a, e))
2985
3006
  )).filter(j);
2986
3007
  return yt ??= r, ht = Object.fromEntries(r.flatMap((a) => Object.entries(a.components))), r;
2987
3008
  }
2988
- const ea = /* @__PURE__ */ new Set([
3009
+ const sa = /* @__PURE__ */ new Set([
2989
3010
  "@arcgis/arcade-languageservice",
2990
3011
  "@arcgis/components-build-utils",
2991
3012
  "@arcgis/components-utils",
@@ -3021,13 +3042,13 @@ const ea = /* @__PURE__ */ new Set([
3021
3042
  "vscode-languageserver-textdocument",
3022
3043
  "vscode-languageserver-types"
3023
3044
  ]);
3024
- let yt, ht, ve;
3025
- async function yn(e, t) {
3026
- const i = await _e(e, t), n = await He(i), s = "exports" in n, r = oa.bind(void 0, s), a = "@stencil/core" in (n.dependencies ?? {}) || "@stencil/core" in (n.devDependencies ?? {}), c = u.join(i, "dist/esm/loader.js");
3045
+ let yt, ht, Se;
3046
+ async function Sn(e, t) {
3047
+ const i = await _e(e, t), n = await He(i), s = "exports" in n, r = da.bind(void 0, s), a = "@stencil/core" in (n.dependencies ?? {}) || "@stencil/core" in (n.devDependencies ?? {}), c = u.join(i, "dist/esm/loader.js");
3027
3048
  if (a ? await U(c) : !1) {
3028
- const g = await O(c, "utf8"), y = ta(g, "bootstrapLazy("), h = g.indexOf(", options", y), v = g.slice(y, h), S = v.startsWith('JSON.parse("') ? v.slice(12, -2).replaceAll('\\"', '"') : v;
3049
+ const g = await O(c, "utf8"), y = ra(g, "bootstrapLazy("), h = g.indexOf(", options", y), v = g.slice(y, h), S = v.startsWith('JSON.parse("') ? v.slice(12, -2).replaceAll('\\"', '"') : v;
3029
3050
  try {
3030
- const T = JSON.parse(S), x = sa(T, { packageName: e, getImportPath: r });
3051
+ const T = JSON.parse(S), x = ca(T, { packageName: e, getImportPath: r });
3031
3052
  return { packageName: e, type: "stencil", components: x };
3032
3053
  } catch (T) {
3033
3054
  C.warn("@arcgis/lumina", `Failed to parse dist/esm/loader.js for ${e}.
@@ -3036,7 +3057,7 @@ Error: ${String(T)}`);
3036
3057
  }
3037
3058
  const d = pi(n.customElements);
3038
3059
  if (d != null) {
3039
- const g = u.join(i, d), y = JSON.parse(await O(g, "utf-8")), h = ia(y), v = hn(y, {
3060
+ const g = u.join(i, d), y = JSON.parse(await O(g, "utf-8")), h = oa(y), v = wn(y, {
3040
3061
  packageName: e,
3041
3062
  getImportPath: r
3042
3063
  });
@@ -3044,7 +3065,7 @@ Error: ${String(T)}`);
3044
3065
  }
3045
3066
  const p = pi(n["web-types"]);
3046
3067
  if (p != null) {
3047
- const g = u.join(i, p), y = JSON.parse(await O(g, "utf-8")), h = na(y, {
3068
+ const g = u.join(i, p), y = JSON.parse(await O(g, "utf-8")), h = aa(y, {
3048
3069
  packageName: e,
3049
3070
  getImportPath: r,
3050
3071
  packageRoot: i
@@ -3053,7 +3074,7 @@ Error: ${String(T)}`);
3053
3074
  }
3054
3075
  const m = u.join(i, "dist/components");
3055
3076
  if (await U(m)) {
3056
- const g = await ra(m, {
3077
+ const g = await la(m, {
3057
3078
  packageName: e,
3058
3079
  getImportPath: r
3059
3080
  });
@@ -3061,11 +3082,11 @@ Error: ${String(T)}`);
3061
3082
  }
3062
3083
  }
3063
3084
  const pi = (e) => Array.isArray(e) ? e[0] : e;
3064
- function ta(e, t) {
3085
+ function ra(e, t) {
3065
3086
  const i = e.indexOf(t);
3066
3087
  return i === -1 ? -1 : i + t.length;
3067
3088
  }
3068
- function hn(e, t) {
3089
+ function wn(e, t) {
3069
3090
  const i = {};
3070
3091
  for (const n of e.modules ?? [])
3071
3092
  if (n.declarations !== void 0)
@@ -3083,7 +3104,7 @@ function hn(e, t) {
3083
3104
  }
3084
3105
  return i;
3085
3106
  }
3086
- const ia = (e) => e.compiler?.name === kt, na = (e, t) => Object.fromEntries(
3107
+ const oa = (e) => e.compiler?.name === kt, aa = (e, t) => Object.fromEntries(
3087
3108
  (e.contributions?.html?.elements ?? e.contributions?.html?.tags)?.map(
3088
3109
  (i) => [
3089
3110
  i.name,
@@ -3094,7 +3115,7 @@ const ia = (e) => e.compiler?.name === kt, na = (e, t) => Object.fromEntries(
3094
3115
  }
3095
3116
  ]
3096
3117
  ) ?? []
3097
- ), sa = (e, t) => Object.fromEntries(
3118
+ ), ca = (e, t) => Object.fromEntries(
3098
3119
  e.flatMap(
3099
3120
  ([i, n]) => n.map(
3100
3121
  ([s, r, a]) => [
@@ -3112,7 +3133,7 @@ const ia = (e) => e.compiler?.name === kt, na = (e, t) => Object.fromEntries(
3112
3133
  ]
3113
3134
  )
3114
3135
  )
3115
- ), ra = async (e, t) => Object.fromEntries(
3136
+ ), la = async (e, t) => Object.fromEntries(
3116
3137
  (await Ue(e)).filter((i) => i.endsWith(".d.ts")).map((i) => {
3117
3138
  const n = i.slice(0, -5);
3118
3139
  return [
@@ -3124,16 +3145,16 @@ const ia = (e) => e.compiler?.name === kt, na = (e, t) => Object.fromEntries(
3124
3145
  }
3125
3146
  ];
3126
3147
  })
3127
- ), oa = (e, t) => e ? `components/${t}` : `dist/components/${t}.js`, aa = (e) => e.startsWith("/") ? e : `/${e}`, It = (e, t) => `${e}@fs${aa(t)}`;
3148
+ ), da = (e, t) => e ? `components/${t}` : `dist/components/${t}.js`, pa = (e) => e.startsWith("/") ? e : `/${e}`, At = (e, t) => `${e}@fs${pa(t)}`;
3128
3149
  function qe(e = J(), t = !1, i = e.name === "@esri/calcite-components") {
3129
3150
  const n = e.version.includes("next"), s = e.name === "@esri/calcite-components";
3130
3151
  if (s && n)
3131
3152
  return `https://cdn.jsdelivr.net/npm/@esri/calcite-components@${e.version}/dist/calcite/`;
3132
- const r = t || n ? "jsdev.arcgis.com" : "js.arcgis.com", a = ca(e.name), c = la(e.version, i);
3153
+ const r = t || n ? "jsdev.arcgis.com" : "js.arcgis.com", a = ua(e.name), c = ma(e.version, i);
3133
3154
  return a.length === 0 ? `https://${r}/${c}/` : s ? `https://${r}/${a}/${c}/` : `https://${r}/${c}/${a}/`;
3134
3155
  }
3135
- const ca = (e) => e.split("/").pop() ?? e;
3136
- function la(e, t) {
3156
+ const ua = (e) => e.split("/").pop() ?? e;
3157
+ function ma(e, t) {
3137
3158
  if (/\d+\.\d+\.\d+-(?:.*)$/u.test(e))
3138
3159
  return "next";
3139
3160
  const n = /^(?<major>\d+)\.(?<minor>\d+)\.(?<patch>\d+)/u, s = e.match(n);
@@ -3143,7 +3164,6 @@ function la(e, t) {
3143
3164
  }
3144
3165
  return "next";
3145
3166
  }
3146
- const da = ["keyed", "ref", "repeat", "live"], ae = "staticHtml", Y = "staticSvg", ce = "html", re = "svg", vn = Symbol("maybe HTML namespace or maybe SVG"), Sn = "css", wn = "mathml", bn = [Sn, ce, wn, ae, Y, re], pa = new Set(bn), ua = ["safeClassMap", "safeStyleMap", "deferLoad"], ma = "nothing", fa = [...da, ...bn, ...ua, ma], Ke = (e) => o.isJsxElement(e) || o.isJsxSelfClosingElement(e) || o.isJsxFragment(e);
3147
3167
  function ui(e, t, i) {
3148
3168
  if (ie(e))
3149
3169
  return e;
@@ -3163,14 +3183,14 @@ function ie(e) {
3163
3183
  return (
3164
3184
  // Inlined string literal
3165
3185
  typeof e == "string" || // Syntax kinds that are never undefined
3166
- ga.has(e.kind) || // Ternary with both branches never undefined
3186
+ fa.has(e.kind) || // Ternary with both branches never undefined
3167
3187
  o.isConditionalExpression(e) && ie(e.whenTrue) && ie(e.whenFalse) || // Binary expression with operator that never results in undefined Or both sides are definitely not undefined
3168
- o.isBinaryExpression(e) && (ya.has(e.operatorToken.kind) || ie(e.left) && ie(e.right)) || // `as`, `satisfies`, `()` with definitely not undefined expression
3188
+ o.isBinaryExpression(e) && (ga.has(e.operatorToken.kind) || ie(e.left) && ie(e.right)) || // `as`, `satisfies`, `()` with definitely not undefined expression
3169
3189
  (o.isParenthesizedExpression(e) || o.isSatisfiesExpression(e) || o.isAsExpression(e)) && ie(e.expression) || // JSX that got converted to html`<p>Something</p>`
3170
- o.isTaggedTemplateExpression(e) && o.isIdentifier(e.tag) && pa.has(e.tag.text)
3190
+ o.isTaggedTemplateExpression(e) && o.isIdentifier(e.tag) && mo.has(e.tag.text)
3171
3191
  );
3172
3192
  }
3173
- const ga = /* @__PURE__ */ new Set([
3193
+ const fa = /* @__PURE__ */ new Set([
3174
3194
  o.SyntaxKind.NumericLiteral,
3175
3195
  o.SyntaxKind.BigIntLiteral,
3176
3196
  o.SyntaxKind.StringLiteral,
@@ -3189,7 +3209,7 @@ const ga = /* @__PURE__ */ new Set([
3189
3209
  o.SyntaxKind.ClassExpression,
3190
3210
  // Trust? Trust.
3191
3211
  o.SyntaxKind.NonNullExpression
3192
- ]), ya = /* @__PURE__ */ new Set([
3212
+ ]), ga = /* @__PURE__ */ new Set([
3193
3213
  o.SyntaxKind.PlusEqualsToken,
3194
3214
  o.SyntaxKind.MinusEqualsToken,
3195
3215
  o.SyntaxKind.AsteriskAsteriskEqualsToken,
@@ -3224,9 +3244,9 @@ const ga = /* @__PURE__ */ new Set([
3224
3244
  o.SyntaxKind.SlashToken,
3225
3245
  o.SyntaxKind.PercentToken,
3226
3246
  o.SyntaxKind.AsteriskAsteriskToken
3227
- ]), ha = {
3247
+ ]), ya = {
3228
3248
  property(e, t, i, n) {
3229
- const s = va(n, i, e), r = s?.type === "stringifiedReflected", a = s?.type === "reflected" || r;
3249
+ const s = ha(n, i, e), r = s?.type === "stringifiedReflected", a = s?.type === "reflected" || r;
3230
3250
  if (a) {
3231
3251
  const f = ot(t);
3232
3252
  if (f === !0)
@@ -3243,7 +3263,7 @@ const ga = /* @__PURE__ */ new Set([
3243
3263
  p,
3244
3264
  e,
3245
3265
  m ? "" : void 0
3246
- ), y = i === "value" && (n === "input" || n === "textarea" || n === Re) ? wa(f, e) : f;
3266
+ ), y = i === "value" && (n === "input" || n === "textarea" || n === Re) ? Sa(f, e) : f;
3247
3267
  if (y !== p)
3248
3268
  return [m ? `.${i}` : s.name, d, y];
3249
3269
  }
@@ -3313,7 +3333,7 @@ const ga = /* @__PURE__ */ new Set([
3313
3333
  return [o.factory.createIdentifier(s)];
3314
3334
  }
3315
3335
  };
3316
- function va(e, t, i) {
3336
+ function ha(e, t, i) {
3317
3337
  if (typeof e == "string") {
3318
3338
  const r = (i.externalComponents[e] ?? i.localComponents[e])?.propToAttribute?.[t];
3319
3339
  if (r !== void 0)
@@ -3329,7 +3349,7 @@ function va(e, t, i) {
3329
3349
  } else {
3330
3350
  const s = Object.values(B.perElement).map(
3331
3351
  (a) => rt(a, t)
3332
- ), r = ge(s, (a) => a?.type === "stringifiedNonReflected" ? a : void 0) ?? ge(s, (a) => a?.type === "stringifiedReflected" ? a : void 0);
3352
+ ), r = ye(s, (a) => a?.type === "stringifiedNonReflected" ? a : void 0) ?? ye(s, (a) => a?.type === "stringifiedReflected" ? a : void 0);
3333
3353
  if (r !== void 0)
3334
3354
  return r;
3335
3355
  }
@@ -3363,7 +3383,7 @@ function ot(e) {
3363
3383
  }
3364
3384
  }
3365
3385
  function Ne(e, t, i = !1) {
3366
- if (Ke(t))
3386
+ if (Oe(t))
3367
3387
  throw new Error(
3368
3388
  `Invalid JSX syntax detected or there is a bug in Lumina. Found ${t.getText(e.sourceFile)}. Expected JSX attribute value to be wrapped in { }`
3369
3389
  );
@@ -3388,7 +3408,7 @@ function mi(e, t) {
3388
3408
  if (i.length === 0)
3389
3409
  return [];
3390
3410
  const n = Zi(i);
3391
- if (Dr(n)) {
3411
+ if (Nr(n)) {
3392
3412
  const s = n.replaceAll('"', "&#34;");
3393
3413
  if (s.length > n.length) {
3394
3414
  const r = n.replaceAll("'", "&#39;");
@@ -3407,7 +3427,7 @@ function fi(e, t, i) {
3407
3427
  `${i} prop value must be an expression. Found ${String(t?.getText(e.sourceFile))}`
3408
3428
  );
3409
3429
  const n = t.expression;
3410
- if (Sa(n)) {
3430
+ if (va(n)) {
3411
3431
  const r = i === "class" ? "safeClassMap" : "safeStyleMap";
3412
3432
  e.neededImports.add(r);
3413
3433
  const a = e.importRenames[r], c = o.factory.createCallExpression(o.factory.createIdentifier(a), void 0, [
@@ -3417,15 +3437,15 @@ function fi(e, t, i) {
3417
3437
  } else
3418
3438
  return [i, ...Ne(e, t, !0)];
3419
3439
  }
3420
- const Sa = (e) => o.isObjectLiteralExpression(e) || o.isPropertyAccessExpression(e) || o.isIdentifier(e) || o.isCallExpression(e) || o.isBinaryExpression(e) || o.isConditionalExpression(e);
3421
- function wa(e, t) {
3440
+ const va = (e) => o.isObjectLiteralExpression(e) || o.isPropertyAccessExpression(e) || o.isIdentifier(e) || o.isCallExpression(e) || o.isBinaryExpression(e) || o.isConditionalExpression(e);
3441
+ function Sa(e, t) {
3422
3442
  t.neededImports.add("live");
3423
3443
  const i = t.importRenames.live;
3424
3444
  return o.factory.createCallExpression(o.factory.createIdentifier(i), void 0, [
3425
3445
  typeof e == "string" ? o.factory.createStringLiteral(e) : e
3426
3446
  ]);
3427
3447
  }
3428
- function ba(e) {
3448
+ function wa(e) {
3429
3449
  if (e && o.isJsxExpression(e) && e.expression && o.isCallExpression(e.expression) && o.isIdentifier(e.expression.expression) && e.expression.expression.text in gi && e.expression.arguments.length <= 1)
3430
3450
  return {
3431
3451
  propType: gi[e.expression.expression.text],
@@ -3443,15 +3463,15 @@ const gi = {
3443
3463
  bindBooleanAttribute: "booleanAttribute",
3444
3464
  bindEvent: "event"
3445
3465
  };
3446
- function Ta(e, t, i) {
3447
- return Ca.has(e) ? e : e.startsWith("on") && t !== void 0 && o.isJsxExpression(t) && t.expression !== void 0 ? "event" : (Gi.has(e) || e.includes("-")) && (e !== "itemId" || i !== "arcgis-map" && i !== "arcgis-scene") ? "attribute" : !Pt(i) && (Vi.has(e) || (i === ft ? !1 : i === Re ? (
3466
+ function ba(e, t, i) {
3467
+ return Ea.has(e) ? e : e.startsWith("on") && t !== void 0 && o.isJsxExpression(t) && t.expression !== void 0 ? "event" : (Gi.has(e) || e.includes("-")) && (e !== "itemId" || i !== "arcgis-map" && i !== "arcgis-scene") ? "attribute" : !Pt(i) && (Vi.has(e) || (i === ft ? !1 : i === Re ? (
3448
3468
  // When tag name is dynamic, we can't help but check if the prop name matches an "always attribute" in any html element
3449
3469
  Object.values(gt).some((r) => r.has(e))
3450
3470
  ) : gt[i]?.has(e) === !0)) ? Zt.has(e) ? "booleanAttribute" : "attribute" : i === "svg" || i === "math" || i === ft || i !== Re && (Ct.has(i) || $t.has(i)) ? e in B.common.reflected || e in B.common.stringifiedReflected || e in B.common.stringifiedNonReflected ? "property" : Zt.has(e) ? "booleanAttribute" : "attribute" : "property";
3451
3471
  }
3452
- const Ea = ["class", "style", "ref", "directives", "key", "deferLoad"], Ca = new Set(Ea), $a = (e) => typeof e != "string" || e.trim().length > 0;
3472
+ const Ta = ["class", "style", "ref", "directives", "key", "deferLoad"], Ea = new Set(Ta), Ca = (e) => typeof e != "string" || e.trim().length > 0;
3453
3473
  function Ge({ key: e, parts: t, litTag: i }, n) {
3454
- const s = Pa(t);
3474
+ const s = $a(t);
3455
3475
  if (s.length % 2 === 0)
3456
3476
  throw new Error("Normalized template parts array length must be odd");
3457
3477
  const [r, ...a] = s;
@@ -3467,16 +3487,16 @@ function Ge({ key: e, parts: t, litTag: i }, n) {
3467
3487
  typeof a[0] == "string" ? o.factory.createStringLiteral(r) : a[0]
3468
3488
  );
3469
3489
  }
3470
- const c = typeof i == "string" ? i : ce;
3490
+ const c = typeof i == "string" ? i : le;
3471
3491
  n.neededImports.add(c);
3472
3492
  const l = n.importRenames[c], d = o.factory.createTaggedTemplateExpression(
3473
3493
  o.factory.createIdentifier(l),
3474
3494
  void 0,
3475
- a.length === 0 ? o.factory.createNoSubstitutionTemplateLiteral(r) : o.factory.createTemplateExpression(o.factory.createTemplateHead(r), xa(a))
3495
+ a.length === 0 ? o.factory.createNoSubstitutionTemplateLiteral(r) : o.factory.createTemplateExpression(o.factory.createTemplateHead(r), Pa(a))
3476
3496
  );
3477
3497
  return at(n, e, d);
3478
3498
  }
3479
- const Pa = (e) => e.reduce(
3499
+ const $a = (e) => e.reduce(
3480
3500
  (t, i, n) => {
3481
3501
  const s = t.at(-1), r = typeof s == "string", a = typeof i == "string";
3482
3502
  if (r && a)
@@ -3486,7 +3506,7 @@ const Pa = (e) => e.reduce(
3486
3506
  },
3487
3507
  [""]
3488
3508
  );
3489
- function xa(e) {
3509
+ function Pa(e) {
3490
3510
  if (!(e.length % 2 === 0))
3491
3511
  throw new Error("templatePartsToSpans should be called with normalized parts array without the first item");
3492
3512
  const i = e.length / 2;
@@ -3511,8 +3531,8 @@ function at(e, t, i) {
3511
3531
  const n = e.importRenames.keyed;
3512
3532
  return o.factory.createCallExpression(o.factory.createIdentifier(n), void 0, [t, i]);
3513
3533
  }
3514
- const Tn = (e, t) => e.getFullText(t.sourceFile).slice(0, e.getLeadingTriviaWidth(t.sourceFile));
3515
- function En(e, t) {
3534
+ const bn = (e, t) => e.getFullText(t.sourceFile).slice(0, e.getLeadingTriviaWidth(t.sourceFile));
3535
+ function Tn(e, t) {
3516
3536
  const i = Ft(e);
3517
3537
  return i.length === 0 ? t : o.setSyntheticLeadingComments(
3518
3538
  t,
@@ -3520,18 +3540,18 @@ function En(e, t) {
3520
3540
  ...n,
3521
3541
  pos: -1,
3522
3542
  end: -1,
3523
- text: Cn(e.slice(n.pos, n.end))
3543
+ text: En(e.slice(n.pos, n.end))
3524
3544
  }))
3525
3545
  );
3526
3546
  }
3527
3547
  const Ft = (e) => e.trim().length === 0 ? [] : o.getLeadingCommentRanges(e, 0) ?? [];
3528
- function ka(e) {
3548
+ function xa(e) {
3529
3549
  const t = Ft(e);
3530
3550
  if (t.length === 0)
3531
3551
  return [e || " "];
3532
3552
  const i = t.reduceRight(
3533
3553
  ([s, ...r], a) => {
3534
- const c = Aa(s), l = Cn(c.slice(a.pos, a.end));
3554
+ const c = ka(s), l = En(c.slice(a.pos, a.end));
3535
3555
  return [
3536
3556
  c.slice(0, a.pos),
3537
3557
  /**
@@ -3549,8 +3569,8 @@ function ka(e) {
3549
3569
  const n = i.at(-1);
3550
3570
  return (typeof n != "string" || n.trim() !== "") && i.push(" "), i;
3551
3571
  }
3552
- const Cn = (e) => e.startsWith("//") ? e.slice(2) : e.slice(2, -2);
3553
- function Aa(e) {
3572
+ const En = (e) => e.startsWith("//") ? e.slice(2) : e.slice(2, -2);
3573
+ function ka(e) {
3554
3574
  if (typeof e == "string")
3555
3575
  return e;
3556
3576
  throw new Error(`Expected string, got ${typeof e}: ${String(e)}`);
@@ -3565,7 +3585,7 @@ function Ia(e, t) {
3565
3585
  if (!(typeof r == "object" && // If .map() callback has 3rd argument, it's not supported
3566
3586
  n.parameters.length <= 2))
3567
3587
  return t;
3568
- const c = Se(n.body);
3588
+ const c = we(n.body);
3569
3589
  let l = !0, d;
3570
3590
  if (yi(c))
3571
3591
  d = c;
@@ -3575,11 +3595,11 @@ function Ia(e, t) {
3575
3595
  const v = c.statements.at(-1);
3576
3596
  if (!(v && o.isReturnStatement(v) && v.expression))
3577
3597
  return t;
3578
- const T = Se(v.expression);
3598
+ const T = we(v.expression);
3579
3599
  if (!yi(T))
3580
3600
  return t;
3581
3601
  const x = c.statements.slice(0, -1);
3582
- if (x.some($n))
3602
+ if (x.some(Cn))
3583
3603
  return t;
3584
3604
  l = x.length === 0, d = T;
3585
3605
  }
@@ -3589,7 +3609,7 @@ function Ia(e, t) {
3589
3609
  const f = p.attributes.properties[m];
3590
3610
  if (f === void 0 || !o.isJsxAttribute(f))
3591
3611
  return t;
3592
- const g = Lt(f.initializer, e.sourceFile), y = La(r, n, g, l, e);
3612
+ const g = Lt(f.initializer, e.sourceFile), y = Aa(r, n, g, l, e);
3593
3613
  if (y === void 0)
3594
3614
  return t;
3595
3615
  e.liftedKeys.add(f.name), e.neededImports.add("repeat");
@@ -3612,21 +3632,21 @@ function Ia(e, t) {
3612
3632
  ]);
3613
3633
  }
3614
3634
  const yi = (e) => o.isJsxElement(e) || o.isJsxSelfClosingElement(e);
3615
- function $n(e) {
3635
+ function Cn(e) {
3616
3636
  if (o.isReturnStatement(e))
3617
3637
  return !0;
3618
3638
  let t = !1;
3619
3639
  return o.visitEachChild(
3620
3640
  e,
3621
- (i) => (t ||= $n(i), i),
3641
+ (i) => (t ||= Cn(i), i),
3622
3642
  void 0
3623
3643
  ), t;
3624
3644
  }
3625
- function La(e, t, i, n, s) {
3645
+ function Aa(e, t, i, n, s) {
3626
3646
  const r = W(i);
3627
3647
  if (r === void 0)
3628
3648
  return;
3629
- let a = Pn(e.name, r);
3649
+ let a = $n(e.name, r);
3630
3650
  const c = t.parameters.at(1);
3631
3651
  if (c !== void 0 && o.isIdentifier(c.name) && // A more basic check is also provided in lumina/no-unnecessary-key rule
3632
3652
  r.every(We, c.name)) {
@@ -3638,7 +3658,7 @@ function La(e, t, i, n, s) {
3638
3658
  return;
3639
3659
  }
3640
3660
  if (!n) {
3641
- const l = Na(r, a, t);
3661
+ const l = Fa(r, a, t);
3642
3662
  if (l === void 0)
3643
3663
  return;
3644
3664
  a = l;
@@ -3668,15 +3688,15 @@ function W(e) {
3668
3688
  const t = W(e.left), i = W(e.right);
3669
3689
  return t === void 0 || i === void 0 ? void 0 : [...t, ...i];
3670
3690
  } else {
3671
- if (Fa.has(e.kind))
3691
+ if (La.has(e.kind))
3672
3692
  return [];
3673
3693
  {
3674
- const t = Se(e);
3694
+ const t = we(e);
3675
3695
  return t !== e ? W(t) : void 0;
3676
3696
  }
3677
3697
  }
3678
3698
  }
3679
- const Fa = /* @__PURE__ */ new Set([
3699
+ const La = /* @__PURE__ */ new Set([
3680
3700
  o.SyntaxKind.NumericLiteral,
3681
3701
  o.SyntaxKind.BigIntLiteral,
3682
3702
  o.SyntaxKind.StringLiteral,
@@ -3685,20 +3705,20 @@ const Fa = /* @__PURE__ */ new Set([
3685
3705
  o.SyntaxKind.FalseKeyword,
3686
3706
  o.SyntaxKind.NullKeyword,
3687
3707
  o.SyntaxKind.TrueKeyword
3688
- ]), Se = (e) => o.isAsExpression(e) || o.isNonNullExpression(e) || o.isSatisfiesExpression(e) || o.isParenthesizedExpression(e) ? Se(e.expression) : e, Pn = (e, t) => o.isObjectBindingPattern(e) ? Ra(e, t) : e;
3689
- function Na(e, t, i) {
3708
+ ]), we = (e) => o.isAsExpression(e) || o.isNonNullExpression(e) || o.isSatisfiesExpression(e) || o.isParenthesizedExpression(e) ? we(e.expression) : e, $n = (e, t) => o.isObjectBindingPattern(e) ? ja(e, t) : e;
3709
+ function Fa(e, t, i) {
3690
3710
  if (e.every(We, t))
3691
3711
  return t;
3692
3712
  if (o.isIdentifier(t)) {
3693
- const n = o.isBlock(i.body) ? ge(i.body.statements, (r) => Da(r, t)) : void 0;
3713
+ const n = o.isBlock(i.body) ? ye(i.body.statements, (r) => Na(r, t)) : void 0;
3694
3714
  if (n === void 0)
3695
3715
  return;
3696
- const s = Pn(n, e);
3716
+ const s = $n(n, e);
3697
3717
  if (e.every(We, s))
3698
3718
  return s;
3699
3719
  }
3700
3720
  }
3701
- function Da(e, t) {
3721
+ function Na(e, t) {
3702
3722
  if (!o.isVariableStatement(e) || !(e.declarationList.flags & o.NodeFlags.Const))
3703
3723
  return;
3704
3724
  const i = e.declarationList.declarations[0];
@@ -3706,19 +3726,19 @@ function Da(e, t) {
3706
3726
  }
3707
3727
  function We(e) {
3708
3728
  const t = this;
3709
- return o.isIdentifier(t) ? t.text === e : t.elements.some(ja, e);
3729
+ return o.isIdentifier(t) ? t.text === e : t.elements.some(Da, e);
3710
3730
  }
3711
- function ja(e) {
3731
+ function Da(e) {
3712
3732
  const t = this;
3713
3733
  return o.isOmittedExpression(e) ? !1 : We.call(e.name, t);
3714
3734
  }
3715
- function Ra(e, t) {
3735
+ function ja(e, t) {
3716
3736
  let i = !1;
3717
3737
  const n = e.elements.filter((s) => o.isIdentifier(s.name) ? t.includes(s.name.text) : (i = !0, !0));
3718
3738
  return i || n.length === 0 ? e : o.factory.updateObjectBindingPattern(e, n);
3719
3739
  }
3720
- const xn = (e, t) => t.liftedKeys.has(e), Ma = (e) => e.apiJsonComponents.map(({ name: t, importPath: i }) => `import type { ${t} } from "./${i}";`).join(`
3721
- `), Oa = /^[a-zA-Z_$][a-zA-Z\d_$]*$/u, Ve = (e) => !Oa.test(e), Ee = (e) => Ve(e) ? `"${e}"` : e;
3740
+ const Pn = (e, t) => t.liftedKeys.has(e), Ra = (e) => e.apiJsonComponents.map(({ name: t, importPath: i }) => `import type { ${t} } from "./${i}";`).join(`
3741
+ `), Ma = /^[a-zA-Z_$][a-zA-Z\d_$]*$/u, Ve = (e) => !Ma.test(e), Ee = (e) => Ve(e) ? `"${e}"` : e;
3722
3742
  function Xe(e, t) {
3723
3743
  const i = [], n = [];
3724
3744
  let s = !1;
@@ -3742,21 +3762,21 @@ type ${e}SetterTypes = ${e}["${qi}"]` : "", d = c.filter(Boolean).join(", ");
3742
3762
  }
3743
3763
  const hi = (e) => e.map((t) => `'${t}'`).join(" | ");
3744
3764
  function z(e, t, i) {
3745
- if (Ke(i))
3746
- return kn(e, i);
3765
+ if (Oe(i))
3766
+ return xn(e, i);
3747
3767
  const n = o.isCallExpression(i) ? Ia(e, i) : i, s = o.visitEachChild(
3748
3768
  n,
3749
3769
  // Do not add "" if parent is binary expression to not turn {(a && <b />) || c} into {(a && <b />) || "" || c}
3750
3770
  z.bind(null, e, t !== void 0 && o.isBinaryExpression(t) ? void 0 : i),
3751
3771
  e.transformationContext
3752
3772
  );
3753
- return t !== void 0 && o.isBinaryExpression(i) && (o.isJsxExpression(t) || Ke(Se(i.right))) ? Wa(s) : s;
3773
+ return t !== void 0 && o.isBinaryExpression(i) && (o.isJsxExpression(t) || Oe(we(i.right))) ? Ka(s) : s;
3754
3774
  }
3755
- function kn(e, t) {
3756
- const i = An(e, t);
3775
+ function xn(e, t) {
3776
+ const i = kn(e, t);
3757
3777
  return Ge(i, e);
3758
3778
  }
3759
- function An(e, t) {
3779
+ function kn(e, t) {
3760
3780
  const i = "children" in t ? t.children : [];
3761
3781
  if (o.isJsxFragment(t))
3762
3782
  return { key: void 0, ...De(i, e) };
@@ -3764,19 +3784,19 @@ function An(e, t) {
3764
3784
  if (o.isJsxNamespacedName(r))
3765
3785
  throw Error(`JSX namespaced elements are not supported. Found ${r.getText(e.sourceFile)} `);
3766
3786
  if (!o.isIdentifier(r) || !r.text.startsWith(r.text[0].toLowerCase()) && r.text !== et && r.text !== tt) {
3767
- const $ = o.isIdentifier(r) && r.text === xr ? De(i, e) : {
3787
+ const $ = o.isIdentifier(r) && r.text === Pr ? De(i, e) : {
3768
3788
  // No need to wrap the function call in a lit-html tag
3769
3789
  litTag: void 0,
3770
- parts: [Ka(e, t, r, i)]
3790
+ parts: [Ja(e, t, r, i)]
3771
3791
  };
3772
3792
  return {
3773
- key: Ja(s, e),
3793
+ key: Oa(s, e),
3774
3794
  ...$
3775
3795
  };
3776
3796
  }
3777
- const c = r.text === et ? Re : r.text === tt ? ft : r.text, l = r.text === et ? ae : r.text === tt ? Y : Ar.has(c) ? vn : Ct.has(c) ? re : ce, d = Pt(c);
3797
+ const c = r.text === et ? Re : r.text === tt ? ft : r.text, l = r.text === et ? ce : r.text === tt ? Z : kr.has(c) ? on : Ct.has(c) ? re : le, d = Pt(c);
3778
3798
  let p;
3779
- d && e.compiler.viteCommand === "build" && (p = Ba(e, c));
3799
+ d && e.compiler.viteCommand === "build" && (p = Wa(e, c));
3780
3800
  let m;
3781
3801
  const f = [];
3782
3802
  let g = !1;
@@ -3789,13 +3809,13 @@ Found ${L.getText(e.sourceFile)}`
3789
3809
  const { name: $, initializer: b } = L;
3790
3810
  if (o.isJsxNamespacedName($))
3791
3811
  throw Error(`JSX namespaced attributes are not supported. Found ${$.getText(e.sourceFile)}`);
3792
- const E = $.text, I = ba(b), F = I?.propType ?? Ta(E, b, c);
3812
+ const E = $.text, A = wa(b), F = A?.propType ?? ba(E, b, c);
3793
3813
  p?.delete(E);
3794
- const N = ha[F](e, I?.initializer ?? b, E, c);
3814
+ const N = ya[F](e, A?.initializer ?? b, E, c);
3795
3815
  if (N.length === 0)
3796
3816
  return [];
3797
- const R = e.compiler.shouldMinifyJsx ? [" "] : ka(Tn($, e));
3798
- return F === "key" ? (m = typeof N[0] == "object" && !xn($, e) ? N[0] : void 0, R.some($a) ? R : []) : F === "directives" || F === "ref" || E === "deferLoad" ? (g ||= F === "deferLoad", f.push(
3817
+ const R = e.compiler.shouldMinifyJsx ? [" "] : xa(bn($, e));
3818
+ return F === "key" ? (m = typeof N[0] == "object" && !Pn($, e) ? N[0] : void 0, R.some(Ca) ? R : []) : F === "directives" || F === "ref" || E === "deferLoad" ? (g ||= F === "deferLoad", f.push(
3799
3819
  ...R,
3800
3820
  ...N.flatMap(
3801
3821
  (H, K) => typeof H == "string" || K === 0 || typeof N[K - 1] == "string" ? H : [" ", H]
@@ -3811,12 +3831,12 @@ Found ${L.getText(e.sourceFile)}`
3811
3831
  `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`
3812
3832
  );
3813
3833
  d && (g ? e.customElementsToImportDeferred.add(c) : e.customElementsToImport.add(c));
3814
- const h = typeof c == "string" && kr.has(c), v = De(i, e);
3834
+ const h = typeof c == "string" && xr.has(c), v = De(i, e);
3815
3835
  if (h && v.parts.length > 0)
3816
3836
  throw Error(
3817
3837
  `Void HTML elements like <${c}> cannot have children. Found ${t.getText(e.sourceFile)}`
3818
3838
  );
3819
- const S = (l === re || l === Y) && v.parts.length === 0, T = [
3839
+ const S = (l === re || l === Z) && v.parts.length === 0, T = [
3820
3840
  "<",
3821
3841
  typeof c == "string" ? c : r,
3822
3842
  ...y,
@@ -3835,21 +3855,21 @@ Found ${L.getText(e.sourceFile)}`
3835
3855
  ];
3836
3856
  return { key: m, parts: x, litTag: l };
3837
3857
  }
3838
- function Ja(e, t) {
3858
+ function Oa(e, t) {
3839
3859
  const i = e.attributes.properties[In(e)];
3840
- return i && o.isJsxAttribute(i) && !xn(i.name, t) ? Lt(i.initializer, t.sourceFile) : void 0;
3860
+ return i && o.isJsxAttribute(i) && !Pn(i.name, t) ? Lt(i.initializer, t.sourceFile) : void 0;
3841
3861
  }
3842
3862
  const In = (e) => e.attributes.properties.findIndex(({ name: t }) => t && o.isIdentifier(t) && t.text === "key");
3843
- function Ka(e, t, i, n) {
3863
+ function Ja(e, t, i, n) {
3844
3864
  const r = (o.isJsxElement(t) ? t.openingElement : t).attributes.properties.map((l) => {
3845
3865
  if (o.isJsxSpreadAttribute(l))
3846
- return En(Tn(l, e), o.factory.createSpreadAssignment(l.expression));
3866
+ return Tn(bn(l, e), o.factory.createSpreadAssignment(l.expression));
3847
3867
  const { name: d, initializer: p } = l;
3848
3868
  if (o.isJsxNamespacedName(d))
3849
3869
  throw Error(`JSX namespaced attributes are not supported. Found ${d.getText(e.sourceFile)}`);
3850
3870
  if (d.text === "key")
3851
3871
  return;
3852
- const m = p === void 0 ? o.factory.createTrue() : o.isStringLiteral(p) ? p : Ke(p) ? kn(e, p) : z(e, void 0, p.expression ?? o.factory.createIdentifier("undefined")), f = Ve(d.text) ? o.factory.createStringLiteral(d.text) : d;
3872
+ const m = p === void 0 ? o.factory.createTrue() : o.isStringLiteral(p) ? p : Oe(p) ? xn(e, p) : z(e, void 0, p.expression ?? o.factory.createIdentifier("undefined")), f = Ve(d.text) ? o.factory.createStringLiteral(d.text) : d;
3853
3873
  return o.factory.createPropertyAssignment(f, m);
3854
3874
  }), { parts: a, litTag: c } = De(n, e);
3855
3875
  return a.length > 0 && r.push(
@@ -3865,13 +3885,13 @@ function De(e, t) {
3865
3885
  let i;
3866
3886
  const n = e.flatMap((s) => {
3867
3887
  if (o.isJsxText(s))
3868
- return [t.compiler.shouldMinifyJsx ? Lr(s.text) : s.text];
3888
+ return [t.compiler.shouldMinifyJsx ? Ar(s.text) : s.text];
3869
3889
  if (o.isJsxExpression(s))
3870
3890
  return Nt(t, s, s);
3871
3891
  {
3872
- const r = An(t, s);
3873
- if (r.key === void 0 && r.litTag !== ae && r.litTag !== Y) {
3874
- if (r.litTag === vn)
3892
+ const r = kn(t, s);
3893
+ if (r.key === void 0 && r.litTag !== ce && r.litTag !== Z) {
3894
+ if (r.litTag === on)
3875
3895
  return r.parts;
3876
3896
  if (i !== void 0 && r.litTag !== void 0 && i !== r.litTag)
3877
3897
  throw new Error(
@@ -3884,7 +3904,7 @@ function De(e, t) {
3884
3904
  });
3885
3905
  return { litTag: i, parts: n };
3886
3906
  }
3887
- function Wa(e) {
3907
+ function Ka(e) {
3888
3908
  return e.operatorToken.kind === o.SyntaxKind.AmpersandAmpersandToken ? o.factory.createBinaryExpression(
3889
3909
  e,
3890
3910
  o.factory.createToken(o.SyntaxKind.BarBarToken),
@@ -3896,7 +3916,7 @@ function Nt(e, t, i) {
3896
3916
  if (e.compiler.shouldMinifyJsx)
3897
3917
  return [];
3898
3918
  const n = t.getText(e.sourceFile).slice(1, -1);
3899
- return Ft(n).length === 0 ? [] : [En(n, o.factory.createIdentifier("undefined"))];
3919
+ return Ft(n).length === 0 ? [] : [Tn(n, o.factory.createIdentifier("undefined"))];
3900
3920
  }
3901
3921
  return o.isStringLiteral(t.expression) ? [Zi(t.expression.text)] : (
3902
3922
  /**
@@ -3935,7 +3955,7 @@ function Nt(e, t, i) {
3935
3955
  ] : [z(e, i, t.expression)]
3936
3956
  );
3937
3957
  }
3938
- function Ba(e, t) {
3958
+ function Wa(e, t) {
3939
3959
  if (t in e.localComponents)
3940
3960
  for (const n of e.compiler.privateApiJson.modules)
3941
3961
  for (const s of n.declarations) {
@@ -3947,44 +3967,25 @@ function Ba(e, t) {
3947
3967
  return r;
3948
3968
  }
3949
3969
  }
3950
- const Ln = (e) => e.reduce((t, [i, n]) => (t[i] ??= [], t[i].push(n), t), {}), we = {
3951
- [ce]: ["lit-html", "lit/html.js", "lit"],
3952
- /**
3953
- * Sadly, Lit called these "html" and "svg", rather than "staticHtml" and
3954
- * "staticSvg", leading to collision. We have to import them "as", as well as
3955
- * check for existing "html" and "svg" imports from these locations to prevent
3956
- * collisions.
3957
- */
3958
- [ae]: ["lit-html/static.js", "lit/static-html.js"],
3959
- [re]: ["lit-html", "lit/html.js", "lit"],
3960
- [Y]: ["lit-html/static.js", "lit/static-html.js"],
3961
- [wn]: ["lit-html", "lit/html.js", "lit"],
3962
- [Sn]: ["@lit/reactive-element/css-tag.js", "@lit/reactive-element", "lit"],
3963
- safeClassMap: ["@arcgis/lumina"],
3964
- safeStyleMap: ["@arcgis/lumina"],
3965
- deferLoad: ["@arcgis/lumina"],
3966
- keyed: ["lit-html/directives/keyed.js", "lit/directives/keyed.js"],
3967
- live: ["lit-html/directives/live.js", "lit/directives/live.js"],
3968
- repeat: ["lit-html/directives/repeat.js", "lit/directives/repeat.js"],
3969
- ref: ["lit-html/directives/ref.js", "lit/directives/ref.js"],
3970
- nothing: ["lit-html", "lit/html.js", "lit-element/lit-element.js", "lit", "@arcgis/lumina"]
3971
- }, Fn = Ln(
3972
- Object.entries(we).flatMap(([e, t]) => t.map((i) => [i, e]))
3973
- ), Nn = new Set(Object.keys(Fn));
3974
- function _a(e, t) {
3970
+ const An = (e) => e.reduce((t, [i, n]) => (t[i] ??= [], t[i].push(n), t), {}), Ln = An(
3971
+ Object.entries(oe).flatMap(
3972
+ ([e, t]) => t.map((i) => [i, e])
3973
+ )
3974
+ ), Fn = new Set(Object.keys(Ln));
3975
+ function Ba(e, t) {
3975
3976
  const i = t.importClause, n = t.moduleSpecifier;
3976
3977
  if (!o.isStringLiteral(n))
3977
3978
  return t;
3978
- const s = Ha(e.sourceFile.fileName, n.text, ""), r = !i?.isTypeOnly;
3979
+ const s = _a(e.sourceFile.fileName, n.text, ""), r = !i?.isTypeOnly;
3979
3980
  if (r && e.existingImportedModules.add(s), i === void 0)
3980
3981
  return t;
3981
- if (e.isInLightDomComponent && n.text.startsWith(".") && Oe.test(n.text) && // If id already includes ?, bypass our custom behavior
3982
+ if (e.isInLightDomComponent && n.text.startsWith(".") && Je.test(n.text) && // If id already includes ?, bypass our custom behavior
3982
3983
  !n.text.includes("?"))
3983
3984
  return o.factory.updateImportDeclaration(
3984
3985
  t,
3985
3986
  t.modifiers,
3986
3987
  i,
3987
- o.factory.createStringLiteral(n.text + Z),
3988
+ o.factory.createStringLiteral(n.text + Y),
3988
3989
  t.attributes
3989
3990
  );
3990
3991
  if (i.name !== void 0) {
@@ -3994,12 +3995,12 @@ function _a(e, t) {
3994
3995
  const a = i.namedBindings;
3995
3996
  if (a === void 0 || !o.isNamedImports(a))
3996
3997
  return t;
3997
- const c = Nn.has(n.text);
3998
+ const c = Fn.has(n.text);
3998
3999
  return a.elements.forEach((l) => {
3999
- const d = (l.propertyName ?? l.name).text, p = we[d];
4000
+ const d = (l.propertyName ?? l.name).text, p = oe[d];
4000
4001
  if (c) {
4001
4002
  if (p?.some((g) => g === n.text)) {
4002
- const g = Dn(d, s);
4003
+ const g = Nn(d, s);
4003
4004
  e.existingLitImports.add(g), e.importRenames[g] = l.name?.text ?? g;
4004
4005
  }
4005
4006
  } else (l.name.text === "h" || l.name.text === "createElement") && (e.hasNonLuminaJsxImport = !0);
@@ -4007,22 +4008,22 @@ function _a(e, t) {
4007
4008
  r && !l.isTypeOnly && m && f && e.importedFunctionComponentsFromModules.add(s);
4008
4009
  }), t;
4009
4010
  }
4010
- const Dn = (e, t) => e === ce && we.staticHtml.includes(t) ? ae : e === re && we.staticSvg.includes(t) ? Y : e, Ha = (e, t, i) => t.startsWith(".") ? u.resolve(e, "..", `${t}${i}`) : t;
4011
- function Ua(e) {
4012
- return o.isImportDeclaration(e) ? za(this, e) : e;
4011
+ const Nn = (e, t) => e === le && oe.staticHtml.includes(t) ? ce : e === re && oe.staticSvg.includes(t) ? Z : e, _a = (e, t, i) => t.startsWith(".") ? u.resolve(e, "..", `${t}${i}`) : t;
4012
+ function Ha(e) {
4013
+ return o.isImportDeclaration(e) ? Ua(this, e) : e;
4013
4014
  }
4014
- function za(e, t) {
4015
+ function Ua(e, t) {
4015
4016
  const i = t.importClause, n = i?.namedBindings, s = t.moduleSpecifier;
4016
- if (!o.isStringLiteral(s) || !n || !o.isNamedImports(n) || !Nn.has(s.text))
4017
+ if (!o.isStringLiteral(s) || !n || !o.isNamedImports(n) || !Fn.has(s.text))
4017
4018
  return t;
4018
4019
  const r = i.isTypeOnly;
4019
4020
  let a = !1;
4020
4021
  const c = n.elements.map((l) => {
4021
- const d = (l.propertyName ?? l.name).text, p = Dn(d, s.text);
4022
+ const d = (l.propertyName ?? l.name).text, p = Nn(d, s.text);
4022
4023
  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;
4023
4024
  });
4024
- return Fn[s.text]?.forEach((l) => {
4025
- !e.neededImports.has(l) || e.existingLitImports.has(l) || (e.neededImports.delete(l), a = !0, c.push(jn(l, e)));
4025
+ return Ln[s.text]?.forEach((l) => {
4026
+ !e.neededImports.has(l) || e.existingLitImports.has(l) || (e.neededImports.delete(l), a = !0, c.push(Dn(l, e)));
4026
4027
  }), a ? o.factory.updateImportDeclaration(
4027
4028
  t,
4028
4029
  t.modifiers,
@@ -4036,8 +4037,10 @@ function za(e, t) {
4036
4037
  t.attributes
4037
4038
  ) : t;
4038
4039
  }
4039
- function qa(e) {
4040
- const t = Ln(Array.from(e.neededImports, (i) => [we[i][0], i]));
4040
+ function za(e) {
4041
+ const t = An(
4042
+ Array.from(e.neededImports, (i) => [oe[i][0], i])
4043
+ );
4041
4044
  return Object.entries(t).map(
4042
4045
  ([i, n]) => o.factory.createImportDeclaration(
4043
4046
  void 0,
@@ -4045,23 +4048,23 @@ function qa(e) {
4045
4048
  !1,
4046
4049
  void 0,
4047
4050
  o.factory.createNamedImports(
4048
- n.map((s) => (e.neededImports.delete(s), jn(s, e)))
4051
+ n.map((s) => (e.neededImports.delete(s), Dn(s, e)))
4049
4052
  )
4050
4053
  ),
4051
4054
  o.factory.createStringLiteral(i)
4052
4055
  )
4053
4056
  );
4054
4057
  }
4055
- function jn(e, t) {
4056
- const i = e === ae ? ce : e === Y ? re : e, n = t.importRenames[e];
4058
+ function Dn(e, t) {
4059
+ const i = e === ce ? le : e === Z ? re : e, n = t.importRenames[e];
4057
4060
  return n === i ? o.factory.createImportSpecifier(!1, void 0, o.factory.createIdentifier(i)) : o.factory.createImportSpecifier(
4058
4061
  !1,
4059
4062
  o.factory.createIdentifier(i),
4060
4063
  o.factory.createIdentifier(n)
4061
4064
  );
4062
4065
  }
4063
- function Ga(e) {
4064
- const t = Zo().map(({ packageName: i }) => i);
4066
+ function qa(e) {
4067
+ const t = ia().map(({ packageName: i }) => i);
4065
4068
  return e.existingImportedModules.forEach((i) => {
4066
4069
  if (u.isAbsolute(i))
4067
4070
  return;
@@ -4074,7 +4077,7 @@ function Ga(e) {
4074
4077
  }
4075
4078
  }), [];
4076
4079
  }
4077
- function Va(e) {
4080
+ function Ga(e) {
4078
4081
  if (e.compiler.viteCommand === "serve")
4079
4082
  return e.customElementsToImport.clear(), e.customElementsToImportDeferred.clear(), [];
4080
4083
  const t = e.compiler._customElementDependencies;
@@ -4089,8 +4092,8 @@ function Va(e) {
4089
4092
  t[n] ??= { referencedBy: [], referencedTagNames: [], referencedDeferredTagNames: [] }, t[n].referencedBy.push(e.sourceFile.fileName);
4090
4093
  }), [];
4091
4094
  }
4092
- function Xa(e, t, i) {
4093
- const n = gn()[t] ?? Rn(e)[t];
4095
+ function Va(e, t, i) {
4096
+ const n = vn()[t] ?? jn(e)[t];
4094
4097
  if (n === void 0) {
4095
4098
  if (e.options?.build?.dependencies?.silenceUnknownJsxElementUsage?.(t, i, e) === !0)
4096
4099
  return;
@@ -4104,28 +4107,28 @@ function Xa(e, t, i) {
4104
4107
  }
4105
4108
  return n;
4106
4109
  }
4107
- function Qa(e, t) {
4108
- return e.packageName === void 0 ? oe(t, e.moduleName) : u.join(e.packageName, e.moduleName);
4110
+ function Xa(e, t) {
4111
+ return e.packageName === void 0 ? ae(t, e.moduleName) : u.join(e.packageName, e.moduleName);
4109
4112
  }
4110
- function Rn(e) {
4111
- return e._localDefinedComponents ??= hn(e.privateApiJson, {
4113
+ function jn(e) {
4114
+ return e._localDefinedComponents ??= wn(e.privateApiJson, {
4112
4115
  packageName: void 0,
4113
4116
  getImportPath() {
4114
4117
  throw new Error("Not supposed to be called for local components");
4115
4118
  }
4116
4119
  }), e._localDefinedComponents;
4117
4120
  }
4118
- const Za = (e, t) => {
4121
+ const Qa = (e, t) => {
4119
4122
  const i = e.pragmas;
4120
4123
  if (i?.has("jsx") === !0 || i?.has("jsxImportSource") === !0)
4121
4124
  return e.statements;
4122
4125
  const n = {
4123
4126
  compiler: t.compiler,
4124
- externalComponents: gn(),
4125
- localComponents: t.compiler.isInPuppeteerTestBackEnd ? {} : Rn(t.compiler),
4127
+ externalComponents: vn(),
4128
+ localComponents: t.compiler.isInPuppeteerTestBackEnd ? {} : jn(t.compiler),
4126
4129
  sourceFile: e,
4127
4130
  transformationContext: t.transformation,
4128
- importRenames: Ya(e),
4131
+ importRenames: Za(e),
4129
4132
  existingImportedModules: /* @__PURE__ */ new Set(),
4130
4133
  importedFunctionComponentsFromModules: /* @__PURE__ */ new Set(),
4131
4134
  existingLitImports: /* @__PURE__ */ new Set(),
@@ -4141,18 +4144,18 @@ const Za = (e, t) => {
4141
4144
  let s = [];
4142
4145
  if (e.statements.every((a) => {
4143
4146
  if (o.isImportDeclaration(a)) {
4144
- if (s.push(_a(n, a)), n.hasNonLuminaJsxImport)
4147
+ if (s.push(Ba(n, a)), n.hasNonLuminaJsxImport)
4145
4148
  return !1;
4146
4149
  } else
4147
4150
  s.push(z(n, void 0, a));
4148
4151
  return !0;
4149
4152
  }), n.hasNonLuminaJsxImport)
4150
4153
  return e.statements;
4151
- if (n.neededImports.size > 0 && (s = s.map(Ua, n), n.existingLitImports.size > 0))
4154
+ if (n.neededImports.size > 0 && (s = s.map(Ha, n), n.existingLitImports.size > 0))
4152
4155
  throw new Error(
4153
4156
  `Expected context.existingLitImports to be empty by now. Found: ${Array.from(n.existingLitImports).join(", ")}`
4154
4157
  );
4155
- const r = [qa, Ga, Va].flatMap(
4158
+ const r = [za, qa, Ga].flatMap(
4156
4159
  (a) => a(n)
4157
4160
  );
4158
4161
  if (n.neededImports.size > 0)
@@ -4161,18 +4164,18 @@ const Za = (e, t) => {
4161
4164
  );
4162
4165
  return [...r, ...s];
4163
4166
  };
4164
- function Ya(e) {
4165
- return ec(e), Object.fromEntries(
4166
- fa.map((t) => [t, e.identifiers.has(t) ? `${t}$jsx` : t])
4167
+ function Za(e) {
4168
+ return Ya(e), Object.fromEntries(
4169
+ yo.map((t) => [t, e.identifiers.has(t) ? `${t}$jsx` : t])
4167
4170
  );
4168
4171
  }
4169
- function ec(e) {
4172
+ function Ya(e) {
4170
4173
  if (!("identifiers" in e))
4171
4174
  throw new Error(
4172
4175
  "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."
4173
4176
  );
4174
4177
  }
4175
- function tc(e, t, i) {
4178
+ function ec(e, t, i) {
4176
4179
  return t.size === 0 ? e : [
4177
4180
  o.factory.createPropertyDeclaration(
4178
4181
  [
@@ -4186,7 +4189,7 @@ function tc(e, t, i) {
4186
4189
  Array.from(t.entries()).map(
4187
4190
  ([n, s]) => o.factory.createPropertyAssignment(
4188
4191
  Ve(n) ? o.factory.createStringLiteral(n) : n,
4189
- ic(s, i)
4192
+ tc(s, i)
4190
4193
  )
4191
4194
  )
4192
4195
  )
@@ -4194,7 +4197,7 @@ function tc(e, t, i) {
4194
4197
  ...e
4195
4198
  ];
4196
4199
  }
4197
- function ic(e, t) {
4200
+ function tc(e, t) {
4198
4201
  let i = 0, n = !0;
4199
4202
  const s = [], r = [];
4200
4203
  for (const l of e.properties)
@@ -4206,18 +4209,18 @@ function ic(e, t) {
4206
4209
  if (d === "attribute")
4207
4210
  return n = !1, i |= m ? _t : 0, !m && !f;
4208
4211
  if (d === "reflect")
4209
- return i |= m ? Ps : 0, !1;
4212
+ return i |= m ? $s : 0, !1;
4210
4213
  if (d === "type" && o.isIdentifier(p)) {
4211
4214
  if (p.text === "Boolean")
4212
- return i |= xs, !1;
4215
+ return i |= Ps, !1;
4213
4216
  if (p.text === "Number")
4214
- return i |= ks, !1;
4217
+ return i |= xs, !1;
4215
4218
  } else {
4216
4219
  if (d === "state")
4217
- return n = !1, i |= m ? As : 0, !1;
4220
+ return n = !1, i |= m ? ks : 0, !1;
4218
4221
  if (d === "readOnly")
4219
4222
  return i |= m ? Is : 0, !1;
4220
- d === "noAccessor" && (i |= m ? Ls : 0);
4223
+ d === "noAccessor" && (i |= m ? As : 0);
4221
4224
  }
4222
4225
  return !0;
4223
4226
  }
@@ -4236,7 +4239,7 @@ function ic(e, t) {
4236
4239
  ...t ? [] : [o.factory.createObjectLiteralExpression(r)]
4237
4240
  ]);
4238
4241
  }
4239
- function nc(e, t, i, n, s) {
4242
+ function ic(e, t, i, n, s) {
4240
4243
  let r = -1, a = -1, c = -1;
4241
4244
  t.options?.properties.forEach((f, g) => {
4242
4245
  if (o.isSpreadAssignment(f))
@@ -4248,23 +4251,23 @@ function nc(e, t, i, n, s) {
4248
4251
  y === "type" ? r = g : y === "attribute" ? a = g : y === "readOnly" && (c = g);
4249
4252
  }
4250
4253
  });
4251
- const l = s.attribute === void 0 && a === -1, d = s.readonly === !0 && s.docsOnlyReadonly !== !0 && c === -1, p = sc(e, t, i, s, r), m = [
4254
+ const l = s.attribute === void 0 && a === -1, d = s.readonly === !0 && s.docsOnlyReadonly !== !0 && c === -1, p = nc(e, t, i, s, r), m = [
4252
4255
  ...l ? [o.factory.createPropertyAssignment("attribute", o.factory.createFalse())] : [],
4253
4256
  ...d ? [o.factory.createPropertyAssignment("readOnly", o.factory.createTrue())] : [],
4254
4257
  ...p !== void 0 ? [p] : []
4255
4258
  ];
4256
4259
  return m.length > 0 ? t.options === void 0 ? o.factory.createObjectLiteralExpression(m, !1) : o.factory.updateObjectLiteralExpression(t.options, [...t.options.properties, ...m]) : t.options;
4257
4260
  }
4258
- function sc(e, t, i, n, s) {
4261
+ function nc(e, t, i, n, s) {
4259
4262
  if (n.attribute === void 0)
4260
4263
  return;
4261
- const r = oc(e), a = i.compiler.viteCommand === "serve" || r !== "Other" ? r : rc(n.type.values);
4264
+ const r = rc(e), a = i.compiler.viteCommand === "serve" || r !== "Other" ? r : sc(n.type.values);
4262
4265
  return a === "Other" || n.readonly && (a !== "Boolean" || !n.reflects) || t.options?.properties[s] !== void 0 ? void 0 : o.factory.createPropertyAssignment(
4263
4266
  o.factory.createIdentifier("type"),
4264
4267
  o.factory.createIdentifier(a)
4265
4268
  );
4266
4269
  }
4267
- function rc(e) {
4270
+ function sc(e) {
4268
4271
  let t = !1, i = !1, n = !1;
4269
4272
  if (e?.forEach((s) => {
4270
4273
  t ||= s.type === "number", i ||= s.type === "boolean", n ||= s.type === "string" || s.type === "any" || s.type === "unknown";
@@ -4276,7 +4279,7 @@ function rc(e) {
4276
4279
  }
4277
4280
  return "Other";
4278
4281
  }
4279
- function oc(e) {
4282
+ function rc(e) {
4280
4283
  const t = e.type ?? (o.isSetAccessor(e) ? e.parameters[0].type : void 0);
4281
4284
  if (t === void 0) {
4282
4285
  if ("initializer" in e && e.initializer !== void 0) {
@@ -4293,7 +4296,7 @@ function oc(e) {
4293
4296
  }
4294
4297
  return "Other";
4295
4298
  }
4296
- function ac(e, t, i, n, s) {
4299
+ function oc(e, t, i, n, s) {
4297
4300
  if (t.modifiers === void 0)
4298
4301
  return t;
4299
4302
  let r = -1, a = -1;
@@ -4303,7 +4306,7 @@ function ac(e, t, i, n, s) {
4303
4306
  d === "property" && (r = l), d === "state" && (a = l);
4304
4307
  }
4305
4308
  }), r !== -1) {
4306
- const c = cc(e, t, i, n), l = vi(t, r, n), d = nc(t, l, e, n, c);
4309
+ const c = ac(e, t, i, n), l = vi(t, r, n), d = ic(t, l, e, n, c);
4307
4310
  let p = !1;
4308
4311
  return s.set(c.name, d ?? o.factory.createObjectLiteralExpression()), p = !0, l.options = d, Si(t, l, r, p);
4309
4312
  } else if (a !== -1) {
@@ -4314,7 +4317,7 @@ function ac(e, t, i, n, s) {
4314
4317
  } else
4315
4318
  return t;
4316
4319
  }
4317
- function cc(e, t, i, n) {
4320
+ function ac(e, t, i, n) {
4318
4321
  const s = e.apiModule?.declarations.find(
4319
4322
  (a) => a.name === i
4320
4323
  ) ?? (e.compiler.isInTest ? {
@@ -4322,7 +4325,7 @@ function cc(e, t, i, n) {
4322
4325
  } : void 0);
4323
4326
  if (s === void 0)
4324
4327
  throw Error(`Failed to find API component for ${i} in ${n.fileName}`);
4325
- const r = nr(s, t) ?? (e.compiler.isInTest ? { kind: "field", attribute: "", readonly: !1, name: "", type: { text: "" } } : void 0);
4328
+ const r = ir(s, t) ?? (e.compiler.isInTest ? { kind: "field", attribute: "", readonly: !1, name: "", type: { text: "" } } : void 0);
4326
4329
  if (r === void 0 || r.kind !== "field")
4327
4330
  throw Error(
4328
4331
  `Failed to find API property for ${t.getText(n)} in ${i} in ${n.fileName}`
@@ -4381,23 +4384,23 @@ function Si(e, t, i, n) {
4381
4384
  e.initializer
4382
4385
  );
4383
4386
  }
4384
- const lc = (e, t) => {
4387
+ const cc = (e, t) => {
4385
4388
  if (t.apiModule === void 0 && !t.compiler.isInTest)
4386
4389
  return e.statements;
4387
4390
  let i;
4388
4391
  function n() {
4389
4392
  i = /* @__PURE__ */ new Map();
4390
4393
  }
4391
- const s = (c) => tc(c, i, t.compiler.shouldMinify);
4394
+ const s = (c) => ec(c, i, t.compiler.shouldMinify);
4392
4395
  function r(c, l) {
4393
- const d = pc(t, c, l, e, i);
4396
+ const d = dc(t, c, l, e, i);
4394
4397
  return t.compiler.viteCommand === "build" && o.setEmitFlags(d, o.EmitFlags.NoComments), d;
4395
4398
  }
4396
4399
  return e.statements.map(
4397
- (c) => Mn(r, c, t, n, s)
4400
+ (c) => Rn(r, c, t, n, s)
4398
4401
  );
4399
4402
  };
4400
- function Mn(e, t, i, n, s = Oi) {
4403
+ function Rn(e, t, i, n, s = Oi) {
4401
4404
  if (o.isClassDeclaration(t) && // Ignore classes that don't extend anything - those are definitely not components
4402
4405
  t.heritageClauses?.some((r) => r.token === o.SyntaxKind.ExtendsKeyword)) {
4403
4406
  let r = !1;
@@ -4420,15 +4423,15 @@ function Mn(e, t, i, n, s = Oi) {
4420
4423
  } else
4421
4424
  return i.compiler.isInTest ? o.visitEachChild(
4422
4425
  t,
4423
- (a) => Mn(e, a, i, n, s),
4426
+ (a) => Rn(e, a, i, n, s),
4424
4427
  i.transformation
4425
4428
  ) : t;
4426
4429
  }
4427
- const dc = /* @__PURE__ */ new Set(["connectedCallback", "disconnectedCallback"]);
4428
- function pc(e, t, i, n, s) {
4430
+ const lc = /* @__PURE__ */ new Set(["connectedCallback", "disconnectedCallback"]);
4431
+ function dc(e, t, i, n, s) {
4429
4432
  if (o.isMethodDeclaration(t)) {
4430
4433
  const r = t.modifiers?.filter(
4431
- (a) => !o.isDecorator(a) || !uc(a)
4434
+ (a) => !o.isDecorator(a) || !pc(a)
4432
4435
  );
4433
4436
  if (r?.length !== t.modifiers?.length)
4434
4437
  return o.factory.updateMethodDeclaration(
@@ -4442,7 +4445,7 @@ function pc(e, t, i, n, s) {
4442
4445
  t.type,
4443
4446
  t.body
4444
4447
  );
4445
- if ("text" in t.name && dc.has(t.name.text) && t.body) {
4448
+ if ("text" in t.name && lc.has(t.name.text) && t.body) {
4446
4449
  const a = t.name.text;
4447
4450
  return t.body.statements.some(
4448
4451
  (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
@@ -4468,11 +4471,11 @@ function pc(e, t, i, n, s) {
4468
4471
  );
4469
4472
  }
4470
4473
  }
4471
- return o.isPropertyDeclaration(t) || o.isAccessor(t) ? ac(e, t, i, n, s) : t;
4474
+ return o.isPropertyDeclaration(t) || o.isAccessor(t) ? oc(e, t, i, n, s) : t;
4472
4475
  }
4473
- const uc = (e) => o.isCallExpression(e.expression) && o.isIdentifier(e.expression.expression) && e.expression.expression.text === "method", vt = "@arcgis/core", ct = J(), Ce = vt in (ct.dependencies ?? {}) || vt in (ct.peerDependencies ?? {}) || // Does not depend on `@arcgis/core` to avoid cycle, but uses core in Lumina tests
4476
+ const pc = (e) => o.isCallExpression(e.expression) && o.isIdentifier(e.expression.expression) && e.expression.expression.text === "method", vt = "@arcgis/core", ct = J(), Ce = vt in (ct.dependencies ?? {}) || vt in (ct.peerDependencies ?? {}) || // Does not depend on `@arcgis/core` to avoid cycle, but uses core in Lumina tests
4474
4477
  ct.name === "@arcgis/lumina";
4475
- async function mc(e, t) {
4478
+ async function uc(e, t) {
4476
4479
  if (!Ce)
4477
4480
  return [];
4478
4481
  const i = await _e(vt);
@@ -4496,33 +4499,33 @@ async function mc(e, t) {
4496
4499
  wi(s)
4497
4500
  ];
4498
4501
  } else
4499
- return [wi(It(e, `${i}/assets/`))];
4502
+ return [wi(At(e, `${i}/assets/`))];
4500
4503
  }
4501
4504
  const wi = (e) => ({
4502
4505
  // Not using join() because it would turn https:// into https:/
4503
4506
  cssHref: `${e}esri/themes/light/main.css`,
4504
4507
  // This is used be the theme switcher in `@arcgis/storybook-utils`
4505
4508
  id: "arcgisCoreStylesheet"
4506
- }), bi = "makeRuntime(", fc = "@arcgis/core";
4507
- function gc(e, t) {
4509
+ }), bi = "makeRuntime(", mc = "@arcgis/core";
4510
+ function fc(e, t) {
4508
4511
  const i = e.indexOf(bi);
4509
4512
  if (i === -1)
4510
4513
  throw new Error("Failed to find makeRuntime() function call in src/runtime.ts");
4511
4514
  const n = i + bi.length, s = t.options.css?.commonStylesPath;
4512
4515
  return {
4513
4516
  code: [
4514
- s === void 0 ? "" : `import commonStyles from "${oe(t.dir.src, s)}";`,
4517
+ s === void 0 ? "" : `import commonStyles from "${ae(t.dir.src, s)}";`,
4515
4518
  e.slice(0, n),
4516
4519
  "{",
4517
4520
  "defaultAssetPath:import.meta.env.BASE_URL,",
4518
4521
  'hydratedAttribute:"',
4519
- t.options.css?.hydratedAttribute ?? ln,
4522
+ t.options.css?.hydratedAttribute ?? un,
4520
4523
  '",',
4521
4524
  s === void 0 ? "" : "commonStyles",
4522
4525
  "}",
4523
4526
  e.slice(n),
4524
4527
  Ce ? `
4525
- import {createObservable,trackAccess,createTrackingTarget,runTracked} from "${fc}/applications/Components/reactiveUtils.js";
4528
+ import {createObservable,trackAccess,createTrackingTarget,runTracked} from "${mc}/applications/Components/reactiveUtils.js";
4526
4529
  createObservable,
4527
4530
  runtime.t = trackAccess;
4528
4531
  runtime.o = createObservable;
@@ -4532,11 +4535,11 @@ runtime.r = runTracked;` : ""
4532
4535
  map: null
4533
4536
  };
4534
4537
  }
4535
- const yc = [
4536
- Za,
4537
- zs,
4538
- lc
4539
- ], Ti = "@arcgis/lumina:transformComponents", hc = (e) => ({
4538
+ const gc = [
4539
+ Qa,
4540
+ Us,
4541
+ cc
4542
+ ], Ti = "@arcgis/lumina:transformComponents", yc = (e) => ({
4540
4543
  name: Ti,
4541
4544
  transform: {
4542
4545
  // Transform JSX to lit-html first so that vite:esbuild doesn't transform JSX to h().
@@ -4550,23 +4553,23 @@ const yc = [
4550
4553
  i
4551
4554
  );
4552
4555
  else if (i === `${e.dir.src}runtime.ts`)
4553
- return gc(t, e);
4556
+ return fc(t, e);
4554
4557
  return;
4555
4558
  }
4556
4559
  const n = e.getSourceFile(i, t);
4557
- await ve;
4560
+ await Se;
4558
4561
  const r = o.transform(n, [
4559
4562
  (f) => () => Ui(e, f, n, [
4560
4563
  ...e.options.types?.sourceFileTransformers ?? [],
4561
- ...yc
4564
+ ...gc
4562
4565
  ])
4563
- ]).transformed[0], a = e._compilerOptionsForPrinter, c = e._typeScriptPrinter, l = a.sourceMap ? me.createSourceMapGenerator(
4566
+ ]).transformed[0], a = e._compilerOptionsForPrinter, c = e._typeScriptPrinter, l = a.sourceMap ? fe.createSourceMapGenerator(
4564
4567
  e.typeScriptHost,
4565
4568
  u.basename(i),
4566
4569
  "",
4567
4570
  u.dirname(i),
4568
4571
  a
4569
- ) : void 0, d = me.createTextWriter(me.getNewLineCharacter(a));
4572
+ ) : void 0, d = fe.createTextWriter(fe.getNewLineCharacter(a));
4570
4573
  c.writeFile(r, d, l);
4571
4574
  const p = d.getText(), m = l?.toJSON();
4572
4575
  return {
@@ -4576,7 +4579,7 @@ const yc = [
4576
4579
  }
4577
4580
  }
4578
4581
  });
4579
- function vc(e) {
4582
+ function hc(e) {
4580
4583
  const t = e.typeScriptConfig;
4581
4584
  return {
4582
4585
  ...t,
@@ -4608,8 +4611,8 @@ function vc(e) {
4608
4611
  skipLibCheck: !0
4609
4612
  };
4610
4613
  }
4611
- function Sc(e) {
4612
- const t = e.options.types?.tsconfigPath, i = t && u.isAbsolute(t) ? t : ds(t ?? "tsconfig.json");
4614
+ function vc(e) {
4615
+ const t = e.options.types?.tsconfigPath, i = t && u.isAbsolute(t) ? t : ls(t ?? "tsconfig.json");
4613
4616
  if (i === void 0)
4614
4617
  throw Error(
4615
4618
  w(
@@ -4635,7 +4638,7 @@ function Sc(e) {
4635
4638
  }, r = o.parseJsonConfigFileContent(s, o.sys, u.dirname(i));
4636
4639
  e.typeScriptConfig = r.options, e.typeScriptConfigPath = i;
4637
4640
  }
4638
- function On(e) {
4641
+ function Mn(e) {
4639
4642
  const t = e.target;
4640
4643
  if (t === void 0)
4641
4644
  throw Error(
@@ -4647,7 +4650,7 @@ function On(e) {
4647
4650
  const i = o.ScriptTarget[t].toLowerCase();
4648
4651
  return i === "latest" ? "esnext" : i;
4649
4652
  }
4650
- function wc(e, t) {
4653
+ function Sc(e, t) {
4651
4654
  if (e.isInStorybook && e.viteCommand === "serve") {
4652
4655
  const i = (a, c, l, ...d) => {
4653
4656
  const p = a.filter(
@@ -4666,17 +4669,17 @@ function wc(e, t) {
4666
4669
  l[0] === "timerToUpdateProgram" ? s : c,
4667
4670
  ...l
4668
4671
  ), n.afterProgramCreate = (a) => {
4669
- e.typeScriptProgram = a.getProgram(), e.typeScriptTypeChecker = e.typeScriptProgram.getTypeChecker(), e._typeScriptReload?.resolve(), e._typeScriptReload = new vs();
4672
+ e.typeScriptProgram = a.getProgram(), e.typeScriptTypeChecker = e.typeScriptProgram.getTypeChecker(), e._typeScriptReload?.resolve(), e._typeScriptReload = new hs();
4670
4673
  }, e.typeScriptWatchProgram = o.createWatchProgram(n), e.typeScriptConfig = e.typeScriptProgram.getCompilerOptions();
4671
4674
  }
4672
- e.typeScriptConfig.sourceMap = t, e._compilerOptionsForPrinter = vc(e), e._typeScriptPrinter = en(e._compilerOptionsForPrinter);
4675
+ e.typeScriptConfig.sourceMap = t, e._compilerOptionsForPrinter = hc(e), e._typeScriptPrinter = en(e._compilerOptionsForPrinter);
4673
4676
  }
4674
- async function bc(e, t, i) {
4677
+ async function wc(e, t, i) {
4675
4678
  const n = u.resolve(e.dir.root, t);
4676
- await U(n) && await bs(n, { recursive: !0, force: !0 }), await Q(n, { recursive: !0 }), await Ts(e.dir.distCdn, u.join(n, "build"), { recursive: !0 });
4679
+ await U(n) && await ws(n, { recursive: !0, force: !0 }), await Q(n, { recursive: !0 }), await bs(e.dir.distCdn, u.join(n, "build"), { recursive: !0 });
4677
4680
  const s = [
4678
4681
  "index.html",
4679
- ...await Ns("**/*.html", {
4682
+ ...await Fs("**/*.html", {
4680
4683
  cwd: e.dir.src,
4681
4684
  nodir: !0,
4682
4685
  posix: !0
@@ -4698,7 +4701,7 @@ async function bc(e, t, i) {
4698
4701
  s.map(async (d, p) => {
4699
4702
  const f = p === 0 ? d : u.join(r, d), g = u.join(e.dir.root, f), y = u.join(n, f);
4700
4703
  await Q(u.dirname(y), { recursive: !0 });
4701
- const h = await O(g, "utf-8"), v = oe(u.dirname(f), `build/${i}`), S = `${l}<script type="module" src="${v}"><\/script>
4704
+ const h = await O(g, "utf-8"), v = ae(u.dirname(f), `build/${i}`), S = `${l}<script type="module" src="${v}"><\/script>
4702
4705
  `;
4703
4706
  let T = h.indexOf("<style>");
4704
4707
  if (T === -1 && (T = h.indexOf("</head>")), T === -1)
@@ -4708,7 +4711,7 @@ async function bc(e, t, i) {
4708
4711
  })
4709
4712
  );
4710
4713
  }
4711
- const Jn = /* @__PURE__ */ new Set([
4714
+ const On = /* @__PURE__ */ new Set([
4712
4715
  "chunks",
4713
4716
  "components",
4714
4717
  "docs",
@@ -4721,13 +4724,13 @@ const Jn = /* @__PURE__ */ new Set([
4721
4724
  "collection",
4722
4725
  "extras",
4723
4726
  "support"
4724
- ]), _ = "@arcgis/lumina:buildCdn", Dt = "cdn", Kn = "index", be = "main";
4725
- function Tc(e) {
4727
+ ]), _ = "@arcgis/lumina:buildCdn", Dt = "cdn", Jn = "index", be = "main";
4728
+ function bc(e) {
4726
4729
  const { skip: t = !1, namespace: i, esbuildOptions: n = {} } = e.options.build?.cdn ?? {}, s = e.options.build?.webApp?.destination, r = i !== void 0;
4727
4730
  if (r) {
4728
4731
  if (i.toLowerCase() !== i)
4729
4732
  throw new Error(`Expected CDN namespace to be all lowercase. Received: ${i}`);
4730
- if (Jn.has(i))
4733
+ if (On.has(i))
4731
4734
  throw new Error(
4732
4735
  `Namespace name "${i}" is restricted as it collides with a well-known Lumina dist/ folder name or Stencil dist/ folder name.`
4733
4736
  );
@@ -4735,11 +4738,11 @@ function Tc(e) {
4735
4738
  'The "namespace" option in the "build.cdn" is deprecated and will be removed in the next major version.'
4736
4739
  );
4737
4740
  }
4738
- const a = i ?? Kn;
4741
+ const a = i ?? Jn;
4739
4742
  if (e.provideAssets([
4740
4743
  {
4741
4744
  type: "dynamic",
4742
- source: () => Ao(e),
4745
+ source: () => No(e),
4743
4746
  destination: `../${r ? a : be}.css`
4744
4747
  }
4745
4748
  ]), !t)
@@ -4748,8 +4751,8 @@ function Tc(e) {
4748
4751
  async writeBundle() {
4749
4752
  if (e.isInStorybook)
4750
4753
  return;
4751
- const c = Ce && J().name !== "@arcgis/embeddable-components", l = Date.now(), d = Array.isArray(n.entryPoints) ? n.entryPoints.map((f) => typeof f == "string" ? { in: f, out: "" } : f) : typeof n.entryPoints == "object" ? Object.entries(n.entryPoints).map(([f, g]) => ({ in: g, out: f })) : [], p = await Ec(e, a, n, d, c);
4752
- await Cc(
4754
+ const c = Ce && J().name !== "@arcgis/embeddable-components", l = Date.now(), d = Array.isArray(n.entryPoints) ? n.entryPoints.map((f) => typeof f == "string" ? { in: f, out: "" } : f) : typeof n.entryPoints == "object" ? Object.entries(n.entryPoints).map(([f, g]) => ({ in: g, out: f })) : [], p = await Tc(e, a, n, d, c);
4755
+ await Ec(
4753
4756
  p,
4754
4757
  e,
4755
4758
  r ? `${a}.esm` : a,
@@ -4757,11 +4760,11 @@ function Tc(e) {
4757
4760
  c
4758
4761
  );
4759
4762
  const m = Date.now();
4760
- C.info(_, `CDN was built in ${m - l}ms`), s && await bc(e, s, `${r ? `${a}.esm` : a}.js`);
4763
+ C.info(_, `CDN was built in ${m - l}ms`), s && await wc(e, s, `${r ? `${a}.esm` : a}.js`);
4761
4764
  }
4762
4765
  };
4763
4766
  }
4764
- async function Ec(e, t, i, n, s) {
4767
+ async function Tc(e, t, i, n, s) {
4765
4768
  const r = e.environment;
4766
4769
  if (i.minify && s)
4767
4770
  throw Error(
@@ -4777,7 +4780,7 @@ async function Ec(e, t, i, n, s) {
4777
4780
  "Source maps in the CDN build are not yet supported - open a feature request with Lumina maintainers if it is needed"
4778
4781
  )
4779
4782
  );
4780
- return await Fs({
4783
+ return await Ls({
4781
4784
  bundle: !0,
4782
4785
  minify: s ? !0 : r === "production",
4783
4786
  treeShaking: !0,
@@ -4802,7 +4805,7 @@ async function Ec(e, t, i, n, s) {
4802
4805
  chunkNames: "[hash]",
4803
4806
  resolveExtensions: [".js", ".json"],
4804
4807
  banner: { js: e.banner },
4805
- target: On(e.typeScriptConfig),
4808
+ target: Mn(e.typeScriptConfig),
4806
4809
  ...i,
4807
4810
  write: !1,
4808
4811
  plugins: [
@@ -4832,7 +4835,7 @@ async function Ec(e, t, i, n, s) {
4832
4835
  * The script's file name will be stripped inside defineCustomElements.
4833
4836
  **/
4834
4837
  defineCustomElements({resourcesUrl: import.meta.url});
4835
- ${dn(e._globalCssString, e)}`,
4838
+ ${mn(e._globalCssString, e)}`,
4836
4839
  sourcefile: `${t}.esm.js`,
4837
4840
  resolveDir: e.dir.dist,
4838
4841
  loader: "js",
@@ -4840,7 +4843,7 @@ ${dn(e._globalCssString, e)}`,
4840
4843
  }
4841
4844
  });
4842
4845
  }
4843
- async function Cc(e, t, i, n, s) {
4846
+ async function Ec(e, t, i, n, s) {
4844
4847
  const r = t.dir.distCdn, a = `${i}.js`, c = new Map(
4845
4848
  e.outputFiles.map((l) => {
4846
4849
  const d = {
@@ -4850,12 +4853,12 @@ async function Cc(e, t, i, n, s) {
4850
4853
  }, p = l.path.slice(r.length);
4851
4854
  if (p === "stdin.js") {
4852
4855
  if (s) {
4853
- const f = l.text.match($c)?.[0];
4856
+ const f = l.text.match(Cc)?.[0];
4854
4857
  if (f === void 0)
4855
4858
  throw Error(
4856
4859
  "Failed to find the runtime variable name in the CDN entrypoint file. This likely indicates a bug in Lumina"
4857
4860
  );
4858
- d.code = `${d.code.trimEnd()}${Pc(f, n)}`, d.isAsync = !1;
4861
+ d.code = `${d.code.trimEnd()}${$c(f, n)}`, d.isAsync = !1;
4859
4862
  }
4860
4863
  return [a, d];
4861
4864
  }
@@ -4863,11 +4866,11 @@ async function Cc(e, t, i, n, s) {
4863
4866
  })
4864
4867
  );
4865
4868
  s && c.forEach((l, d) => {
4866
- l.isAsync === void 0 && (d.endsWith(".js") ? Wn(l, c) : l.isAsync = !1);
4869
+ l.isAsync === void 0 && (d.endsWith(".js") ? Kn(l, c) : l.isAsync = !1);
4867
4870
  }), t.options.build?.cdn?.transformer?.(c, t), await Promise.all(Array.from(c.entries(), async ([l, { code: d }]) => await D(r + l, d)));
4868
4871
  }
4869
- const $c = /(?<=;var [a-zA-Z$_]=[a-zA-Z$_]\()[a-zA-Z$_](?=,\{")/u;
4870
- function Pc(e, t) {
4872
+ const Cc = /(?<=;var [a-zA-Z$_]=[a-zA-Z$_]\()[a-zA-Z$_](?=,\{")/u;
4873
+ function $c(e, t) {
4871
4874
  let i = [
4872
4875
  "window.$arcgis",
4873
4876
  "||",
@@ -4908,29 +4911,29 @@ function Pc(e, t) {
4908
4911
  }
4909
4912
  return i += ")", i;
4910
4913
  }
4911
- function Wn(e, t) {
4914
+ function Kn(e, t) {
4912
4915
  const i = [], n = [], s = [], r = /* @__PURE__ */ new Set(), a = [];
4913
4916
  let c = 0;
4914
- const l = e.code.matchAll(xc);
4917
+ const l = e.code.matchAll(Pc);
4915
4918
  for (const b of l) {
4916
- const [E, I, F, N, R] = b, H = R.startsWith(Be);
4919
+ const [E, A, F, N, R] = b, H = R.startsWith(Be);
4917
4920
  if (c !== 0 && c !== b.index) {
4918
4921
  const K = e.code.slice(c, b.index);
4919
4922
  s.push(K), a.push([c, K.length, 0, ""]);
4920
4923
  }
4921
4924
  if (c = b.index + E.length, H)
4922
- a.push([b.index, E.length, 0, ""]), n.push(`"${_n(R.slice(Be.length))}"`), i.push(I?.replaceAll(" as ", ":") ?? F ?? N ?? "");
4925
+ a.push([b.index, E.length, 0, ""]), n.push(`"${Bn(R.slice(Be.length))}"`), i.push(A?.replaceAll(" as ", ":") ?? F ?? N ?? "");
4923
4926
  else {
4924
- const K = Bn(R, t), q = K?.isAsync === !0;
4925
- if (I !== void 0) {
4927
+ const K = Wn(R, t), q = K?.isAsync === !0;
4928
+ if (A !== void 0) {
4926
4929
  const xe = [];
4927
- for (const Ze of I.slice(1, -1).split(",")) {
4930
+ for (const Ze of A.slice(1, -1).split(",")) {
4928
4931
  const [Ot, Jt = Ot] = Ze.split(" as ");
4929
4932
  q || r.add(Jt), xe.push(`${Ot}:${Jt}`);
4930
4933
  }
4931
4934
  if (q) {
4932
4935
  const Ze = K.oldSingleExportName === void 0 ? `{${xe.join(",")}}` : xe[0].split(":")[1];
4933
- a.push([b.index + 6, 0, I.length, Ze]);
4936
+ a.push([b.index + 6, 0, A.length, Ze]);
4934
4937
  }
4935
4938
  } else if (F === void 0 && N === void 0)
4936
4939
  q && a.push([b.index + 6, 0, 0, ""]);
@@ -4953,26 +4956,26 @@ function Wn(e, t) {
4953
4956
  const d = Ic(r);
4954
4957
  let p = e.code.slice(0, c);
4955
4958
  for (let b = a.length - 1; b >= 0; b--) {
4956
- const [E, I, F, N] = a[b];
4957
- let R = I, H = "";
4958
- if (I === 0) {
4959
+ const [E, A, F, N] = a[b];
4960
+ let R = A, H = "";
4961
+ if (A === 0) {
4959
4962
  const q = d();
4960
4963
  n.push(q), H = ` ${q} from`, N !== "" ? (R = F + 4, i.push(N)) : i.push("");
4961
4964
  }
4962
4965
  p = p.slice(0, E) + H + p.slice(E + R);
4963
4966
  }
4964
- const m = kc.exec(e.code), f = m?.index ?? e.code.length;
4967
+ const m = xc.exec(e.code), f = m?.index ?? e.code.length;
4965
4968
  let g = "";
4966
4969
  if (m !== null) {
4967
4970
  const b = m[1].split(",");
4968
4971
  if (b.length > 1)
4969
4972
  g = `return{${b.map((E) => {
4970
- const [I, F = I] = E.split(" as ");
4971
- return `${F}:${I}`;
4973
+ const [A, F = A] = E.split(" as ");
4974
+ return `${F}:${A}`;
4972
4975
  }).join(",")}}`;
4973
4976
  else {
4974
- const [E, I = E] = b[0].split(" as ");
4975
- e.oldSingleExportName = I, g = `return ${E}`;
4977
+ const [E, A = E] = b[0].split(" as ");
4978
+ e.oldSingleExportName = A, g = `return ${E}`;
4976
4979
  }
4977
4980
  }
4978
4981
  const y = i.findLastIndex((b) => b.length > 0), h = i.slice(0, y + 1).join(","), S = `export default $arcgis.t(${i.length === 0 ? "_" : `([${h}])`}=>{`, T = n.join(","), x = `${g}},${T})`;
@@ -4981,60 +4984,60 @@ function Wn(e, t) {
4981
4984
  const $ = `${p}${S}${L}${x}`;
4982
4985
  e.code = $;
4983
4986
  }
4984
- const xc = /import(?:(\{[^}]+\})from|\*as (\w+) from| ([\w$]+) from)?"([^"]+)";/gu, kc = /export\{([^}]+)\};\n$/u, Be = "@arcgis/core/";
4985
- function Bn(e, t) {
4987
+ const Pc = /import(?:(\{[^}]+\})from|\*as (\w+) from| ([\w$]+) from)?"([^"]+)";/gu, xc = /export\{([^}]+)\};\n$/u, Be = "@arcgis/core/";
4988
+ function Wn(e, t) {
4986
4989
  if (!e.startsWith("./"))
4987
4990
  return;
4988
4991
  const i = e.slice(2), n = t.get(i);
4989
4992
  if (n === void 0)
4990
4993
  throw Error(w(_, `Failed to find the ${e} module`));
4991
- if (n.isAsync === void 0 && Wn(n, t), n.isAsync === void 0)
4994
+ if (n.isAsync === void 0 && Kn(n, t), n.isAsync === void 0)
4992
4995
  throw Error(w(_, `Failed to infer whether the ${e} module has top-level await`));
4993
4996
  return n;
4994
4997
  }
4995
4998
  function Ei(e, t) {
4996
- return e.replaceAll(Ac, (i, n) => {
4999
+ return e.replaceAll(kc, (i, n) => {
4997
5000
  if (n.startsWith(Be))
4998
- return `$arcgis.t(m=>m[0],"${_n(n.slice(Be.length))}")`;
5001
+ return `$arcgis.t(m=>m[0],"${Bn(n.slice(Be.length))}")`;
4999
5002
  if (n.startsWith("./")) {
5000
- const s = Bn(n, t);
5003
+ const s = Wn(n, t);
5001
5004
  if (s?.isAsync === !0)
5002
5005
  return `${i}.then(m=>m.default${s.oldSingleExportName === void 0 ? "" : `.then(e=>({${s.oldSingleExportName}:e}))`})`;
5003
5006
  }
5004
5007
  return i;
5005
5008
  });
5006
5009
  }
5007
- const Ac = /(?<![.\w\d])import\("([^"]+)"\)/gu, _n = (e) => e.endsWith(".js") ? e.slice(0, -3) : e;
5010
+ const kc = /(?<![.\w\d])import\("([^"]+)"\)/gu, Bn = (e) => e.endsWith(".js") ? e.slice(0, -3) : e;
5008
5011
  function Ic(e) {
5009
- const t = [Hn];
5012
+ const t = [_n];
5010
5013
  return () => {
5011
5014
  for (; ; ) {
5012
- const i = Nc(t);
5013
- if (Dc(t), !e.has(i))
5015
+ const i = Fc(t);
5016
+ if (Nc(t), !e.has(i))
5014
5017
  return e.add(i), i;
5015
5018
  }
5016
5019
  };
5017
5020
  }
5018
- const Hn = 0, jt = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_", Un = `${jt}0123456789`, Lc = jt.length, Fc = Un.length;
5019
- function Nc(e) {
5021
+ const _n = 0, jt = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_", Hn = `${jt}0123456789`, Ac = jt.length, Lc = Hn.length;
5022
+ function Fc(e) {
5020
5023
  let t = jt[e[0]];
5021
5024
  for (let i = 1; i < e.length; i++)
5022
- t += Un[e[i]];
5025
+ t += Hn[e[i]];
5023
5026
  return t;
5024
5027
  }
5025
- function Dc(e) {
5028
+ function Nc(e) {
5026
5029
  let t = e.length - 1;
5027
5030
  for (; t >= 0; ) {
5028
- const i = t === 0 ? Lc : Fc;
5031
+ const i = t === 0 ? Ac : Lc;
5029
5032
  if (e[t] += 1, e[t] >= i)
5030
5033
  e[t] = 0, t--;
5031
5034
  else
5032
5035
  return;
5033
5036
  }
5034
- e = new Array(e.length + 1).fill(Hn);
5037
+ e = new Array(e.length + 1).fill(_n);
5035
5038
  }
5036
- async function jc(e, t, i, n) {
5037
- const s = t.packageName, r = await _e(s), { hasCss: a, cdnName: c } = await zn(u.join(r, "dist")) ?? {};
5039
+ async function Dc(e, t, i, n) {
5040
+ const s = t.packageName, r = await _e(s), { hasCss: a, cdnName: c } = await Un(u.join(r, "dist")) ?? {};
5038
5041
  if (i === "cdn") {
5039
5042
  const m = await He(r), f = t.cdnUrl ?? qe(m, !0);
5040
5043
  return [
@@ -5056,7 +5059,7 @@ async function jc(e, t, i, n) {
5056
5059
  }
5057
5060
  ];
5058
5061
  }
5059
- const l = `${s}/dist/${c}/${c}.css${Z}`, d = a ? [
5062
+ const l = `${s}/dist/${c}/${c}.css${Y}`, d = a ? [
5060
5063
  `import styles$${n} from "${l}";`,
5061
5064
  `document.adoptedStyleSheets = [...document.adoptedStyleSheets, styles$${n}.styleSheet];`
5062
5065
  ] : [], p = `${s}/dist/esm/loader.js`;
@@ -5071,15 +5074,15 @@ async function jc(e, t, i, n) {
5071
5074
  ...d,
5072
5075
  `import { defineCustomElements as defineCustomElements$${n} } from "${p}";`,
5073
5076
  `defineCustomElements$${n}(globalThis.window, {`,
5074
- ` resourcesUrl: "${It(e, r)}/dist/${c}/",`,
5077
+ ` resourcesUrl: "${At(e, r)}/dist/${c}/",`,
5075
5078
  "});"
5076
5079
  ]
5077
5080
  }
5078
5081
  ];
5079
5082
  }
5080
- async function zn(e) {
5083
+ async function Un(e) {
5081
5084
  const i = (await Ue(e)).filter(
5082
- (s) => !Jn.has(s) && !s.includes(".")
5085
+ (s) => !On.has(s) && !s.includes(".")
5083
5086
  ), n = i.find((s) => s.startsWith("arcgis-"));
5084
5087
  return n === void 0 ? await Promise.all(
5085
5088
  i.map(async (s) => await Ci(e, s))
@@ -5092,10 +5095,10 @@ async function Ci(e, t) {
5092
5095
  cdnName: t
5093
5096
  } : void 0;
5094
5097
  }
5095
- async function Rc(e, t, i, n) {
5096
- const s = t.packageName, r = await _e(s), a = await He(r), c = await zn(u.join(r, "dist"));
5098
+ async function jc(e, t, i, n) {
5099
+ const s = t.packageName, r = await _e(s), a = await He(r), c = await Un(u.join(r, "dist"));
5097
5100
  if (i === "cdn") {
5098
- const g = a.exports?.[`./${be}.css`] === void 0, y = g ? c.cdnName : Kn;
5101
+ const g = a.exports?.[`./${be}.css`] === void 0, y = g ? c.cdnName : Jn;
5099
5102
  return {
5100
5103
  tag: "script",
5101
5104
  attrs: {
@@ -5104,7 +5107,7 @@ async function Rc(e, t, i, n) {
5104
5107
  }
5105
5108
  };
5106
5109
  }
5107
- const l = c?.cdnName ?? Dt, d = Mc(a), p = `${s}/${u.normalize(d)}${Z}`, m = [
5110
+ const l = c?.cdnName ?? Dt, d = Rc(a), p = `${s}/${u.normalize(d)}${Y}`, m = [
5108
5111
  `import styles$${n} from "${p}";`,
5109
5112
  `document.adoptedStyleSheets = [...document.adoptedStyleSheets, styles$${n}.styleSheet];`
5110
5113
  ], f = `${s}/loader`;
@@ -5118,12 +5121,12 @@ async function Rc(e, t, i, n) {
5118
5121
  ...m,
5119
5122
  `import { defineCustomElements as defineCustomElements$${n} } from "${f}";`,
5120
5123
  `defineCustomElements$${n}({`,
5121
- ` resourcesUrl: "${It(e, r)}/dist/${l}/",`,
5124
+ ` resourcesUrl: "${At(e, r)}/dist/${l}/",`,
5122
5125
  "});"
5123
5126
  ]
5124
5127
  };
5125
5128
  }
5126
- function Mc(e) {
5129
+ function Rc(e) {
5127
5130
  const { exports: t } = e;
5128
5131
  if (t === void 0)
5129
5132
  throw new Error(
@@ -5133,21 +5136,21 @@ function Mc(e) {
5133
5136
  return n ? n[0] : i.length > 0 ? i[0][0] : `./${be}.css`;
5134
5137
  }
5135
5138
  async function Te(e) {
5136
- return e._loadersCache ??= Oc(e), await e._loadersCache;
5139
+ return e._loadersCache ??= Mc(e), await e._loadersCache;
5137
5140
  }
5138
- async function Oc(e) {
5141
+ async function Mc(e) {
5139
5142
  const t = e.viteCommand === "build" ? "cdn" : "lazyNpm", i = e.viteConfig.base;
5140
5143
  let n = 0;
5141
5144
  const s = async (l) => (await Promise.all(
5142
5145
  l.map(async (d) => {
5143
5146
  const p = n++;
5144
- return d.type === "stencil" ? await jc(i, d, t, p) : d.type === "@arcgis/lumina" ? await Rc(i, d, t, p) : void 0;
5147
+ return d.type === "stencil" ? await Dc(i, d, t, p) : d.type === "@arcgis/lumina" ? await jc(i, d, t, p) : void 0;
5145
5148
  })
5146
5149
  )).filter(j).flat(), r = await Promise.all([
5147
5150
  // This may contain an import map so must be first
5148
- mc(i, t),
5149
- ve.then(s),
5150
- qn(e).then(s)
5151
+ uc(i, t),
5152
+ Se.then(s),
5153
+ zn(e).then(s)
5151
5154
  ]), a = u.join(e.dir.src, "loader.ts");
5152
5155
  return [
5153
5156
  ...r.flat(),
@@ -5166,11 +5169,11 @@ async function Oc(e) {
5166
5169
  }
5167
5170
  ];
5168
5171
  }
5169
- async function qn(e) {
5172
+ async function zn(e) {
5170
5173
  const t = e.options?.serve?.extraDependencies ?? [];
5171
5174
  return t.length === 0 ? [] : (e._serveOnlyDependencies ??= Promise.all(
5172
5175
  t.map(async (i) => {
5173
- const n = typeof i == "string" ? i : i.name, s = await yn(n);
5176
+ const n = typeof i == "string" ? i : i.name, s = await Sn(n);
5174
5177
  if (s === void 0)
5175
5178
  throw Error(
5176
5179
  w(
@@ -5185,8 +5188,8 @@ async function qn(e) {
5185
5188
  })
5186
5189
  ).then((i) => i.filter(j)), await e._serveOnlyDependencies);
5187
5190
  }
5188
- const Gn = "/@arcgis/lumina-compiler/testSetupFile", lt = [Gn];
5189
- async function Jc(e) {
5191
+ const qn = "/@arcgis/lumina-compiler/testSetupFile", lt = [qn];
5192
+ async function Oc(e) {
5190
5193
  if (!e.viteConfig.test?.browser?.enabled)
5191
5194
  return $i(e);
5192
5195
  const i = (await Te(e)).map((n, s) => {
@@ -5199,7 +5202,7 @@ async function Jc(e) {
5199
5202
  * The $index naming is already used by makeLoaders(), so we use the
5200
5203
  * $t prefix to avoid collisions.
5201
5204
  */
5202
- `import styles$t${s} from "${n.cssHref}${Z}";`,
5205
+ `import styles$t${s} from "${n.cssHref}${Y}";`,
5203
5206
  `document.adoptedStyleSheets = [...document.adoptedStyleSheets, styles$t${s}.styleSheet];`
5204
5207
  ].join(`
5205
5208
  `);
@@ -5214,12 +5217,12 @@ async function Jc(e) {
5214
5217
  `);
5215
5218
  return [$i(e), i].join("");
5216
5219
  }
5217
- const $i = (e) => [e.isInPuppeteerTestBackEnd ? Kc : "", Wc].join(""), Kc = `import { setupPuppeteerTest } from "@arcgis/lumina-compiler/puppeteerTesting";
5220
+ const $i = (e) => [e.isInPuppeteerTestBackEnd ? Jc : "", Kc].join(""), Jc = `import { setupPuppeteerTest } from "@arcgis/lumina-compiler/puppeteerTesting";
5218
5221
  setupPuppeteerTest();
5219
- `, Wc = `import { setupLuminaTest } from "@arcgis/lumina-compiler/testing";
5222
+ `, Kc = `import { setupLuminaTest } from "@arcgis/lumina-compiler/testing";
5220
5223
  setupLuminaTest();
5221
5224
  `;
5222
- function Bc(e) {
5225
+ function Wc(e) {
5223
5226
  let t = !0, i = !1, n, s, r, a, c;
5224
5227
  const l = "@arcgis/lumina:generateVirtualFiles", d = {
5225
5228
  name: l,
@@ -5229,20 +5232,20 @@ function Bc(e) {
5229
5232
  },
5230
5233
  resolveId: (y) => y === a || y === c ? a : void 0,
5231
5234
  async load(y) {
5232
- const h = y.startsWith(Gn);
5235
+ const h = y.startsWith(qn);
5233
5236
  if (!(!y.endsWith(".tsx") && y !== a && !h)) {
5234
5237
  if (s === void 0 && !e.isInPuppeteerTestBackEnd) {
5235
- r === void 0 && clearTimeout(n), r ??= Wo(e, t).catch((S) => {
5238
+ r === void 0 && clearTimeout(n), r ??= Uo(e, t).catch((S) => {
5236
5239
  throw i = !0, S;
5237
5240
  }), t = !1;
5238
5241
  const v = await r;
5239
5242
  s ??= v;
5240
5243
  }
5241
- return y === a ? Io(e) : h ? await Jc(e) : void 0;
5244
+ return y === a ? Do(e) : h ? await Oc(e) : void 0;
5242
5245
  }
5243
5246
  },
5244
5247
  async writeBundle() {
5245
- e.isInStorybook || await D(u.join(e.dir.dist, "loader.d.ts"), Lo);
5248
+ e.isInStorybook || await D(u.join(e.dir.dist, "loader.d.ts"), jo);
5246
5249
  },
5247
5250
  async handleHotUpdate({ file: y, modules: h, read: v }) {
5248
5251
  const S = await p(y, v);
@@ -5268,7 +5271,7 @@ function Bc(e) {
5268
5271
  e.componentFiles.some((T) => T.startsWith(v)) && m();
5269
5272
  });
5270
5273
  function h(v) {
5271
- he(v, e.dir.srcComponents) && m();
5274
+ ve(v, e.dir.srcComponents) && m();
5272
5275
  }
5273
5276
  y.watcher.on("change", () => {
5274
5277
  if (!i)
@@ -5293,25 +5296,25 @@ function Bc(e) {
5293
5296
  let E;
5294
5297
  await Promise.race([
5295
5298
  e._typeScriptReload.promise,
5296
- new Promise((I) => {
5299
+ new Promise((A) => {
5297
5300
  E = setTimeout(() => {
5298
5301
  C.info(
5299
5302
  l,
5300
5303
  "Timed out waiting for TypeScript to finish type-checking. This may be a bug"
5301
- ), I(void 0);
5304
+ ), A(void 0);
5302
5305
  }, 1e4);
5303
5306
  })
5304
5307
  ]), clearTimeout(E);
5305
5308
  }
5306
5309
  }
5307
- if (!he(y, e.dir.srcComponents))
5310
+ if (!ve(y, e.dir.srcComponents))
5308
5311
  return;
5309
5312
  v ??= await h();
5310
- const T = Bo(e, y, v);
5313
+ const T = zo(e, y, v);
5311
5314
  if (T === void 0)
5312
5315
  return !1;
5313
5316
  for (const x of T) {
5314
- const L = pn(x);
5317
+ const L = fn(x);
5315
5318
  e.server.ws.send({ type: "custom", event: "component-meta-update", data: L });
5316
5319
  }
5317
5320
  return f(), !0;
@@ -5330,17 +5333,17 @@ function Bc(e) {
5330
5333
  return d;
5331
5334
  }
5332
5335
  const St = "@arcgis/lumina:provideAssets";
5333
- function fe(e, t, i = Rt) {
5336
+ function ge(e, t, i = Rt) {
5334
5337
  if (e.viteCommand !== "serve")
5335
5338
  throw Error(w(St, "serveAssets() is only available when Vite is running in serve mode"));
5336
5339
  const n = e._serverConfigured, s = e.server.middlewares.stack.length;
5337
5340
  if (t.forEach((r) => {
5338
- const a = Xn(r), c = Zn(e.dir, Qn(a)), l = Hc(e.viteConfig.base, c, e.dir.distCdn);
5341
+ const a = Vn(r), c = Qn(e.dir, Xn(a)), l = _c(e.viteConfig.base, c, e.dir.distCdn);
5339
5342
  e.server.middlewares.use(l, (d, p, m) => {
5340
- const f = Uc(d.url), g = a.type === "directory" ? u.resolve(a.source, f.slice(1)) : a.source, y = u.join(c, f), h = i.find((v) => v.match(y, e));
5343
+ const f = Hc(d.url), g = a.type === "directory" ? u.resolve(a.source, f.slice(1)) : a.source, y = u.join(c, f), h = i.find((v) => v.match(y, e));
5341
5344
  return (typeof g == "function" ? Promise.resolve(g()) : O(g)).then((v) => {
5342
5345
  const S = (typeof g == "function" ? void 0 : h?.transform(v.toString("utf8"), y, e)) ?? v;
5343
- p.setHeader("Cache-Control", "max-age=31536000, immutable"), p.setHeader("Content-Type", Ds.lookup(f) || "application/octet-stream"), p.write(S), p.end();
5346
+ p.setHeader("Cache-Control", "max-age=31536000, immutable"), p.setHeader("Content-Type", Ns.lookup(f) || "application/octet-stream"), p.write(S), p.end();
5344
5347
  }).catch((v) => {
5345
5348
  (a.type !== "directory" || process.env.DEBUG) && C.warn(
5346
5349
  St,
@@ -5353,16 +5356,16 @@ function fe(e, t, i = Rt) {
5353
5356
  e.server.middlewares.stack.splice(0, 0, ...r);
5354
5357
  }
5355
5358
  }
5356
- async function Vn(e, t, i = Rt) {
5359
+ async function Gn(e, t, i = Rt) {
5357
5360
  await Promise.all(
5358
5361
  t.map(async (n) => {
5359
- const s = Xn(n), r = Zn(e.dir, Qn(s));
5362
+ const s = Vn(n), r = Qn(e.dir, Xn(s));
5360
5363
  if (s.type === "directory") {
5361
5364
  const a = u.resolve(s.source), l = (await Ue(a, { recursive: !0, withFileTypes: !0 })).filter((d) => d.isFile()).map((d) => {
5362
5365
  const p = u.resolve(d.parentPath, d.name), m = u.relative(a, p), f = u.join(r, m);
5363
5366
  return [p, f];
5364
5367
  });
5365
- await es(l.map(([d, p]) => p)), await Promise.all(
5368
+ await Yn(l.map(([d, p]) => p)), await Promise.all(
5366
5369
  l.map(
5367
5370
  async ([d, p]) => await Pi(d, p, i, e)
5368
5371
  )
@@ -5377,7 +5380,7 @@ async function Vn(e, t, i = Rt) {
5377
5380
  })
5378
5381
  );
5379
5382
  }
5380
- const Xn = ji ? (e) => e : (e) => e.type === "dynamic" ? {
5383
+ const Vn = ji ? (e) => e : (e) => e.type === "dynamic" ? {
5381
5384
  ...e,
5382
5385
  destination: Le(e.destination)
5383
5386
  } : {
@@ -5388,13 +5391,13 @@ const Xn = ji ? (e) => e : (e) => e.type === "dynamic" ? {
5388
5391
  async function Pi(e, t, i, n) {
5389
5392
  const s = i.find((r) => r.match(t, n));
5390
5393
  if (s === void 0)
5391
- await Es(e, t);
5394
+ await Ts(e, t);
5392
5395
  else {
5393
5396
  const r = await O(e, "utf8"), a = s.transform(r, t, n);
5394
5397
  await D(t, a);
5395
5398
  }
5396
5399
  }
5397
- function Qn(e) {
5400
+ function Xn(e) {
5398
5401
  if (e.type === "dynamic")
5399
5402
  return e.destination;
5400
5403
  if (e.source.endsWith(u.sep)) {
@@ -5409,34 +5412,34 @@ function Qn(e) {
5409
5412
  }
5410
5413
  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;
5411
5414
  }
5412
- function Zn({ dist: e, distCdnAssets: t }, i) {
5413
- const n = _c(i), s = u.join(
5415
+ function Qn({ dist: e, distCdnAssets: t }, i) {
5416
+ const n = Bc(i), s = u.join(
5414
5417
  t,
5415
5418
  n ? u.relative(t, i) : i
5416
- ), r = u.relative(e, s), a = Yn(r);
5419
+ ), r = u.relative(e, s), a = Zn(r);
5417
5420
  return u.join(e, a);
5418
5421
  }
5419
- function _c(e) {
5422
+ function Bc(e) {
5420
5423
  if (e.startsWith(u.sep)) {
5421
5424
  const t = Ri(), i = t.startsWith(u.sep) ? t.split(u.sep)[1] ?? "" : "";
5422
5425
  return e.startsWith(`/${i}/`) || e.startsWith("/Users/");
5423
5426
  } else
5424
5427
  return !!(!ji && u.isAbsolute(e));
5425
5428
  }
5426
- function Hc(e, t, i) {
5427
- const n = Yn(u.relative(i, t)), s = n.startsWith("/") ? n.slice(1) : n;
5429
+ function _c(e, t, i) {
5430
+ const n = Zn(u.relative(i, t)), s = n.startsWith("/") ? n.slice(1) : n;
5428
5431
  return `${e}${s}`;
5429
5432
  }
5430
- const Yn = (e) => e.replaceAll("../", ""), Uc = (e = "") => e.split("?")[0].split("#")[0];
5431
- async function es(e) {
5433
+ const Zn = (e) => e.replaceAll("../", ""), Hc = (e = "") => e.split("?")[0].split("#")[0];
5434
+ async function Yn(e) {
5432
5435
  const t = new Set(e.map(u.dirname));
5433
5436
  await Promise.all(Array.from(t, async (i) => await Q(i, { recursive: !0 })));
5434
5437
  }
5435
- const zc = {
5438
+ const Uc = {
5436
5439
  match: (e, t) => t.environment === "production" && e.endsWith(".json"),
5437
5440
  transform: (e) => JSON.stringify(JSON.parse(e))
5438
- }, Rt = [zc];
5439
- function qc(e) {
5441
+ }, Rt = [Uc];
5442
+ function zc(e) {
5440
5443
  let t;
5441
5444
  const i = () => [
5442
5445
  ...e.options.assets?.transformers ?? [],
@@ -5445,35 +5448,35 @@ function qc(e) {
5445
5448
  return {
5446
5449
  name: "@arcgis/lumina:handleStaticAssets",
5447
5450
  configResolved() {
5448
- t = Gc(e);
5451
+ t = qc(e);
5449
5452
  },
5450
5453
  async configureServer(n) {
5451
- e.server = n, !e.isInPuppeteerTestBackEnd && (fe(e, await t, i()), n.watcher.on("addDir", (s) => {
5454
+ e.server = n, !e.isInPuppeteerTestBackEnd && (ge(e, await t, i()), n.watcher.on("addDir", (s) => {
5452
5455
  if (s.endsWith("assets")) {
5453
5456
  const r = u.dirname(s);
5454
- u.join(r, "/") === e.dir.root ? fe(e, [is], i()) : s.startsWith(e.dir.srcComponents) && fe(e, [ts(s, r)], i());
5457
+ u.join(r, "/") === e.dir.root ? ge(e, [ts], i()) : s.startsWith(e.dir.srcComponents) && ge(e, [es(s, r)], i());
5455
5458
  }
5456
5459
  }));
5457
5460
  },
5458
5461
  async writeBundle() {
5459
- await Vn(e, await t, i());
5462
+ await Gn(e, await t, i());
5460
5463
  }
5461
5464
  };
5462
5465
  }
5463
- async function Gc(e) {
5466
+ async function qc(e) {
5464
5467
  const t = U("assets"), i = await e.componentFilesPromise, n = await Promise.all(
5465
5468
  i.map(async (s) => {
5466
5469
  const r = u.dirname(s), a = u.join(r, "assets");
5467
- return await U(a) ? ts(a, r) : void 0;
5470
+ return await U(a) ? es(a, r) : void 0;
5468
5471
  })
5469
5472
  );
5470
- return await t && n.push(is), n.filter(j);
5473
+ return await t && n.push(ts), n.filter(j);
5471
5474
  }
5472
- const ts = (e, t) => ({
5475
+ const es = (e, t) => ({
5473
5476
  type: "directory",
5474
5477
  source: e,
5475
5478
  destination: u.basename(t)
5476
- }), is = { type: "directory", source: "assets/", destination: "" }, dt = "@arcgis/lumina:printTotalBuildSize", Vc = (e) => ({
5479
+ }), ts = { type: "directory", source: "assets/", destination: "" }, dt = "@arcgis/lumina:printTotalBuildSize", Gc = (e) => ({
5477
5480
  name: dt,
5478
5481
  apply: () => e.viteCommand === "build",
5479
5482
  configResolved(t) {
@@ -5490,10 +5493,10 @@ const ts = (e, t) => ({
5490
5493
  const m = console.log;
5491
5494
  console.log = function(...g) {
5492
5495
  if (m.apply(console, g), g.length === 1 && typeof g[0] == "string") {
5493
- const [y, h] = g[0].match(Qc) ?? [];
5496
+ const [y, h] = g[0].match(Xc) ?? [];
5494
5497
  if (!y)
5495
5498
  return;
5496
- p || (p = g[0].slice(0, g[0].indexOf(y) + y.length).replaceAll(Zc, "").length);
5499
+ p || (p = g[0].slice(0, g[0].indexOf(y) + y.length).replaceAll(Qc, "").length);
5497
5500
  const v = Number.parseFloat(y.replace(" kB", "").replaceAll(",", ""));
5498
5501
  h ? (d += Number.parseFloat(h.replace(" kB", "").replaceAll(",", "")), l += v) : c += v;
5499
5502
  }
@@ -5504,27 +5507,27 @@ const ts = (e, t) => ({
5504
5507
  console.log = m;
5505
5508
  }
5506
5509
  if (l > 0) {
5507
- const g = d > 0 ? l : c, y = Ai(g), h = e.dir.relativeDist;
5510
+ const g = d > 0 ? l : c, y = Ii(g), h = e.dir.relativeDist;
5508
5511
  console.log(
5509
5512
  [
5510
5513
  ki,
5511
5514
  h,
5512
- Xc,
5515
+ Vc,
5513
5516
  "*",
5514
5517
  " ".repeat(p - `${h}*`.length - y.length),
5515
5518
  y,
5516
5519
  xi,
5517
- d > 0 ? ` ${ki}│ gzip: ${Ai(d)}${xi}` : ""
5520
+ d > 0 ? ` ${ki}│ gzip: ${Ii(d)}${xi}` : ""
5518
5521
  ].join("")
5519
5522
  );
5520
5523
  }
5521
5524
  };
5522
5525
  }
5523
- }), xi = "\x1B[22m\x1B[1m\x1B[22m", ki = "\x1B[2m", Xc = "\x1B[22m\x1B[36m", Qc = /\d+(?:,\d+)?\.\d{2} kB/gu, Zc = /\x1B\[\d+m/gu, Yc = new Intl.NumberFormat("en", {
5526
+ }), xi = "\x1B[22m\x1B[1m\x1B[22m", ki = "\x1B[2m", Vc = "\x1B[22m\x1B[36m", Xc = /\d+(?:,\d+)?\.\d{2} kB/gu, Qc = /\x1B\[\d+m/gu, Zc = new Intl.NumberFormat("en", {
5524
5527
  maximumFractionDigits: 2,
5525
5528
  minimumFractionDigits: 2
5526
- }), Ai = (e) => `${Yc.format(e)} kB`, Ii = "@arcgis/lumina:configureVite", el = (e) => ({
5527
- name: Ii,
5529
+ }), Ii = (e) => `${Zc.format(e)} kB`, Ai = "@arcgis/lumina:configureVite", Yc = (e) => ({
5530
+ name: Ai,
5528
5531
  async config({
5529
5532
  server: t,
5530
5533
  publicDir: i,
@@ -5540,7 +5543,7 @@ const ts = (e, t) => ({
5540
5543
  */
5541
5544
  loader: "src/loader.ts",
5542
5545
  // Entrypoint for bundling used components only:
5543
- ...await Or(e)
5546
+ ...await Mr(e)
5544
5547
  }, { loader: y, ...h } = g, v = e.environment === "development" || e.isInTest ? {
5545
5548
  "process.env.ESRI_INTERNAL": "true"
5546
5549
  } : void 0, S = !import.meta.url.includes("node_modules"), T = {
@@ -5630,7 +5633,7 @@ const ts = (e, t) => ({
5630
5633
  if (typeof l.setupFiles == "string" ? l.setupFiles = [...lt, l.setupFiles] : Array.isArray(l.setupFiles) ? l.setupFiles = [...lt, ...l.setupFiles] : l.setupFiles = [...lt], e.isInPuppeteerTestBackEnd) {
5631
5634
  if (p?.enabled === !0)
5632
5635
  throw Error(
5633
- w(Ii, "Can't enable both Vitest browser mode and Puppeteer testing at the same time")
5636
+ w(Ai, "Can't enable both Vitest browser mode and Puppeteer testing at the same time")
5634
5637
  );
5635
5638
  return {
5636
5639
  test: {
@@ -5664,7 +5667,7 @@ const ts = (e, t) => ({
5664
5667
  publicDir: i ?? !1,
5665
5668
  build: {
5666
5669
  cssMinify: n ?? (e.environment === "production" ? !0 : void 0),
5667
- target: s ?? On(e.typeScriptConfig),
5670
+ target: s ?? Mn(e.typeScriptConfig),
5668
5671
  sourcemap: r ?? (e.environment === "development" ? "inline" : e.options.build?.enableSourceMapsInProduction ?? !1),
5669
5672
  lib: {
5670
5673
  entry: g,
@@ -5693,23 +5696,23 @@ const ts = (e, t) => ({
5693
5696
  browser: {
5694
5697
  enabled: e.isInPuppeteerTestFrontEnd ? !1 : p?.enabled ?? !0,
5695
5698
  instances: p?.instances === void 0 ? [{ browser: "chromium" }] : void 0,
5696
- provider: p?.provider ?? Ms
5699
+ provider: p?.provider ?? Rs
5697
5700
  }
5698
5701
  }
5699
5702
  };
5700
5703
  }
5701
- }), tl = (e) => ({
5704
+ }), el = (e) => ({
5702
5705
  name: "@arcgis/lumina:setAssetPath",
5703
5706
  apply: () => e.viteCommand === "build",
5704
5707
  config: (t) => ({
5705
5708
  base: t.base ?? e.options.assets?.defaultPath ?? qe()
5706
5709
  })
5707
5710
  });
5708
- function il(e = J()) {
5711
+ function tl(e = J()) {
5709
5712
  const t = e.version ?? "0.0.1";
5710
- return Ss(t);
5713
+ return vs(t);
5711
5714
  }
5712
- const nl = (e) => `/*! ${e} */`, k = (e) => (t, i) => {
5715
+ const il = (e) => `/*! ${e} */`, k = (e) => (t, i) => {
5713
5716
  Object.defineProperty(t, i, {
5714
5717
  get() {
5715
5718
  throw Error(
@@ -5731,7 +5734,7 @@ const nl = (e) => `/*! ${e} */`, k = (e) => (t, i) => {
5731
5734
  enumerable: !0
5732
5735
  });
5733
5736
  };
5734
- function de(e) {
5737
+ function pe(e) {
5735
5738
  if (u.isAbsolute(e))
5736
5739
  throw Error(
5737
5740
  w(
@@ -5741,15 +5744,15 @@ function de(e) {
5741
5744
  );
5742
5745
  return Le(e);
5743
5746
  }
5744
- const pe = {
5747
+ const ue = {
5745
5748
  vsCodeHtml: "docs/vscode.html-custom-data.json",
5746
5749
  vsCodeCss: "docs/vscode.css-custom-data.json",
5747
5750
  webTypes: "docs/web-types.json",
5748
5751
  apiJson: "docs/api.json",
5749
5752
  stencilLikeDocsJson: "docs/docs.json"
5750
5753
  };
5751
- async function ns(e, t, i, n, s = J()) {
5752
- const r = sl(e, i, n, s), a = u.join(t, "lumina.ts"), l = await U(a) ? await O(a, "utf8") : "";
5754
+ async function is(e, t, i, n, s = J()) {
5755
+ const r = nl(e, i, n, s), a = u.join(t, "lumina.ts"), l = await U(a) ? await O(a, "utf8") : "";
5753
5756
  if (l.trim().replaceAll(`\r
5754
5757
  `, `
5755
5758
  `) === r.trim())
@@ -5769,7 +5772,7 @@ ${l}`
5769
5772
  );
5770
5773
  return Ji(a, r), !0;
5771
5774
  }
5772
- function sl(e, t, i, n = J()) {
5775
+ function nl(e, t, i, n = J()) {
5773
5776
  "@arcgis/components-controllers" in (n.dependencies ?? {}) && C.warn(
5774
5777
  "@arcgis/components-controllers",
5775
5778
  "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."
@@ -5784,11 +5787,11 @@ declare module "@arcgis/lumina" {
5784
5787
  interface ImportStencilElements extends ${r.map((m, f) => `JSX$${f}.IntrinsicElements`).join(", ")} {}
5785
5788
  }`, l = n.devDependencies ?? {}, d = i === "preview" ? "matchers" : i === "webdriverio" ? "webdriverio" : "playwright";
5786
5789
  return [
5787
- rl,
5790
+ sl,
5788
5791
  // Avoid cyclic references for tests in @arcgis/lumina
5789
5792
  n.name === "@arcgis/lumina" ? "" : `
5790
5793
  /// <reference types="@arcgis/lumina/typings" />`,
5791
- t ? ol : "",
5794
+ t ? rl : "",
5792
5795
  l.vitest ? `
5793
5796
  /// <reference types="vitest/config" />` : "",
5794
5797
  l["@vitest/browser"] ? `
@@ -5802,7 +5805,7 @@ declare module "@arcgis/lumina" {
5802
5805
  `
5803
5806
  ].join("");
5804
5807
  }
5805
- const rl = `/**
5808
+ const sl = `/**
5806
5809
  * This file is autogenerated by \`@arcgis/lumina-compiler\` - do not edit it manually.
5807
5810
  * Manual edits will be overwritten.
5808
5811
  *
@@ -5810,8 +5813,8 @@ const rl = `/**
5810
5813
  * as well as @arcgis/core typings if you use @arcgis/core.
5811
5814
  *
5812
5815
  * If you need to provide additional typings, create a separate file.
5813
- */`, ol = `
5814
- /// <reference types="@arcgis/core/interfaces" />`, je = "@arcgis/lumina:dependencySupport", ss = (e, t) => e.viteCommand === "serve" && /**
5816
+ */`, rl = `
5817
+ /// <reference types="@arcgis/core/interfaces" />`, je = "@arcgis/lumina:dependencySupport", ns = (e, t) => e.viteCommand === "serve" && /**
5815
5818
  * Vitest started calling transformIndexHtml in browser mode versions ^2.1.4
5816
5819
  * However, it is a bit buggy (see
5817
5820
  * https://github.com/vitejs/vite/issues/19213). Instead, we are using test
@@ -5822,10 +5825,10 @@ const rl = `/**
5822
5825
  * is doing:
5823
5826
  * https://github.com/storybookjs/storybook/blob/a5c2cf1712f70b4e3ecf38d3c98e7db8e8d67849/code/builders/builder-vite/src/plugins/code-generator-plugin.ts#L110
5824
5827
  */
5825
- e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand === "build" && !e.options.build?.cdn?.skip && e.options.build?.webApp?.destination !== void 0, al = (e) => ({
5828
+ e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand === "build" && !e.options.build?.cdn?.skip && e.options.build?.webApp?.destination !== void 0, ol = (e) => ({
5826
5829
  name: je,
5827
5830
  configResolved() {
5828
- !e.isInTest && !e.isInStorybook && (e._updateLuminaTsPromise = cl(e).catch(
5831
+ !e.isInTest && !e.isInStorybook && (e._updateLuminaTsPromise = al(e).catch(
5829
5832
  (t) => C.error(je, `Failed to update package's src/lumina.ts: ${String(t)}`)
5830
5833
  ));
5831
5834
  },
@@ -5833,7 +5836,7 @@ e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand
5833
5836
  // Add imports to index.html before Vite starts resolving imports
5834
5837
  order: "pre",
5835
5838
  async handler(t, i) {
5836
- return ss(e, i) ? (await Te(e)).map(
5839
+ return ns(e, i) ? (await Te(e)).map(
5837
5840
  (s) => "javascriptCode" in s ? {
5838
5841
  tag: "script",
5839
5842
  attrs: {
@@ -5873,9 +5876,9 @@ e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand
5873
5876
  await e._updateLuminaTsPromise;
5874
5877
  }
5875
5878
  });
5876
- async function cl(e) {
5877
- const i = (await Promise.all([ve, qn(e)])).flat();
5878
- if (!await ns(
5879
+ async function al(e) {
5880
+ const i = (await Promise.all([Se, zn(e)])).flat();
5881
+ if (!await is(
5879
5882
  i,
5880
5883
  e.dir.src,
5881
5884
  Ce,
@@ -5884,22 +5887,22 @@ async function cl(e) {
5884
5887
  return;
5885
5888
  let s = !1;
5886
5889
  function r() {
5887
- s || C.warn(je, ll), s = !0;
5890
+ s || C.warn(je, cl), s = !0;
5888
5891
  }
5889
5892
  process.on("exit", () => {
5890
5893
  r(), clearTimeout(c);
5891
5894
  });
5892
5895
  const c = setTimeout(r, 2e3);
5893
5896
  }
5894
- const ll = js.greenBright(
5897
+ const cl = Ds.greenBright(
5895
5898
  `lumina.ts has been updated (potentially because your dependencies changed). Please commit the updated file.
5896
5899
  If build failed with TypeScript errors, try running the build again to check whether new lumina.ts resolves the errors.`
5897
5900
  );
5898
- async function dl(e, t) {
5901
+ async function ll(e, t) {
5899
5902
  const i = /* @__PURE__ */ new Map();
5900
5903
  await Promise.all(
5901
5904
  e.map(async (s) => {
5902
- const r = await O(s, "utf-8"), a = r.match(pl)?.[1];
5905
+ const r = await O(s, "utf-8"), a = r.match(dl)?.[1];
5903
5906
  if (a === void 0) {
5904
5907
  C.warn(
5905
5908
  "@arcgis/lumina:parseStoryFiles",
@@ -5911,14 +5914,14 @@ async function dl(e, t) {
5911
5914
  let c = i.get(a);
5912
5915
  c === void 0 && (c = [], i.set(a, c));
5913
5916
  const l = [];
5914
- for (const d of r.matchAll(ul)) {
5915
- const p = d[1], m = yl(p), f = r.indexOf("{", d.index), g = r.indexOf("}", f), y = r.slice(0, d.index).trimEnd();
5917
+ for (const d of r.matchAll(pl)) {
5918
+ const p = d[1], m = gl(p), f = r.indexOf("{", d.index), g = r.indexOf("}", f), y = r.slice(0, d.index).trimEnd();
5916
5919
  let h = "";
5917
5920
  if (y.endsWith("*/")) {
5918
5921
  const T = y.lastIndexOf("/**");
5919
- h = y.slice(T + 3, -2).trim().replaceAll(fl, "");
5922
+ h = y.slice(T + 3, -2).trim().replaceAll(ml, "");
5920
5923
  }
5921
- const v = r.slice(f, g).match(ml)?.[1] || m, S = gl(m);
5924
+ const v = r.slice(f, g).match(ul)?.[1] || m, S = fl(m);
5922
5925
  l.push({
5923
5926
  description: `${v}${h ? `
5924
5927
  ${h}` : ""}`,
@@ -5943,11 +5946,11 @@ ${h}` : ""}`,
5943
5946
  }
5944
5947
  return n;
5945
5948
  }
5946
- const pl = /component: ["']([^"']+)["']/u, ul = /export const (\w+)/gu, ml = /name: ["']([^"']+)["']/u, fl = /^\s*\*\s?/gmu, gl = (e) => e.toLowerCase().replace(/[ ’–—―′¿'`~!@#$%^&*()_|+\-=?;:'",.<>{}[\]\\/]/giu, "-").replace(/-+/gu, "-").replace(/^-+/u, "").replace(/-+$/u, ""), yl = (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();
5947
- var hl = Object.defineProperty, A = (e, t, i, n) => {
5949
+ const dl = /component: ["']([^"']+)["']/u, pl = /export const (\w+)/gu, ul = /name: ["']([^"']+)["']/u, ml = /^\s*\*\s?/gmu, fl = (e) => e.toLowerCase().replace(/[ ’–—―′¿'`~!@#$%^&*()_|+\-=?;:'",.<>{}[\]\\/]/giu, "-").replace(/-+/gu, "-").replace(/^-+/u, "").replace(/-+$/u, ""), gl = (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();
5950
+ var yl = Object.defineProperty, I = (e, t, i, n) => {
5948
5951
  for (var s = void 0, r = e.length - 1, a; r >= 0; r--)
5949
5952
  (a = e[r]) && (s = a(t, i, s) || s);
5950
- return s && hl(t, i, s), s;
5953
+ return s && yl(t, i, s), s;
5951
5954
  };
5952
5955
  const te = "@arcgis/lumina:context";
5953
5956
  class P {
@@ -5988,9 +5991,9 @@ class P {
5988
5991
  "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."
5989
5992
  ), 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);
5990
5993
  const y = this.options.documentation?.publicStoryUrlPrefix;
5991
- this.isFullApiExtraction && typeof y == "string" ? this.componentStoriesPromise = this.componentFilesPromise.then(async () => await dl(this.componentStoryFiles, y)).then((h) => {
5994
+ this.isFullApiExtraction && typeof y == "string" ? this.componentStoriesPromise = this.componentFilesPromise.then(async () => await ll(this.componentStoryFiles, y)).then((h) => {
5992
5995
  this.componentStories = h;
5993
- }) : (this.componentStoriesPromise = void 0, this.componentStories = void 0), wc(this, s.build.sourcemap !== !1), ss(this) && Te(this);
5996
+ }) : (this.componentStoriesPromise = void 0, this.componentStories = void 0), Sc(this, s.build.sourcemap !== !1), ns(this) && Te(this);
5994
5997
  }
5995
5998
  },
5996
5999
  configureServer: {
@@ -6013,14 +6016,14 @@ class P {
6013
6016
  }, 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.gha.afd.arcgis.com", this.options = t;
6014
6017
  const i = t.documentation ?? {};
6015
6018
  this._documentationFileNames = {
6016
- apiJson: i.apiJsonFileName === !1 ? void 0 : i.apiJsonFileName ? de(i.apiJsonFileName) : pe.apiJson,
6017
- stencilLikeDocsJson: i.stencilLikeDocsJsonFileName === !1 ? void 0 : i.stencilLikeDocsJsonFileName ? de(i.stencilLikeDocsJsonFileName) : pe.stencilLikeDocsJson,
6018
- webTypes: i.jetBrains === !1 ? void 0 : i.jetBrains?.webTypesFileName ? de(i.jetBrains.webTypesFileName) : pe.webTypes,
6019
- vsCodeHtml: i.vsCode === !1 ? void 0 : i.vsCode?.htmlFileName ? de(i.vsCode.htmlFileName) : pe.vsCodeHtml,
6020
- vsCodeCss: i.vsCode === !1 ? void 0 : i.vsCode?.cssFileName ? de(i.vsCode.cssFileName) : pe.vsCodeCss
6021
- }, fn(), this.componentFilesPromise = xt(this, u.resolve("src/components")), Sc(this);
6022
- const n = t.build?.preamble ?? il();
6023
- this.banner = nl(n);
6019
+ apiJson: i.apiJsonFileName === !1 ? void 0 : i.apiJsonFileName ? pe(i.apiJsonFileName) : ue.apiJson,
6020
+ stencilLikeDocsJson: i.stencilLikeDocsJsonFileName === !1 ? void 0 : i.stencilLikeDocsJsonFileName ? pe(i.stencilLikeDocsJsonFileName) : ue.stencilLikeDocsJson,
6021
+ webTypes: i.jetBrains === !1 ? void 0 : i.jetBrains?.webTypesFileName ? pe(i.jetBrains.webTypesFileName) : ue.webTypes,
6022
+ vsCodeHtml: i.vsCode === !1 ? void 0 : i.vsCode?.htmlFileName ? pe(i.vsCode.htmlFileName) : ue.vsCodeHtml,
6023
+ vsCodeCss: i.vsCode === !1 ? void 0 : i.vsCode?.cssFileName ? pe(i.vsCode.cssFileName) : ue.vsCodeCss
6024
+ }, hn(), this.componentFilesPromise = xt(this, u.resolve("src/components")), vc(this);
6025
+ const n = t.build?.preamble ?? tl();
6026
+ this.banner = il(n);
6024
6027
  }
6025
6028
  _inferBuildSetup({ command: t, mode: i }, n) {
6026
6029
  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(kt, `Vite is running in unknown mode "${i}". Assuming development`), this.environment = "development"), this.viteCommand = t;
@@ -6087,7 +6090,7 @@ class P {
6087
6090
  if (Array.isArray(this.assetsToProvide))
6088
6091
  this.assetsToProvide.push({ assets: t, transformers: i, apply: n });
6089
6092
  else if (this.viteCommand === "serve")
6090
- n === "serve" && fe(this, t, i);
6093
+ n === "serve" && ge(this, t, i);
6091
6094
  else
6092
6095
  throw Error(
6093
6096
  w(
@@ -6103,87 +6106,87 @@ class P {
6103
6106
  this._silencedRules?.[t]?.includes(i.slice(this.dir.root.length)) !== !0 ? C.error("@arcgis/lumina:linting", n, i) : C.warn("@arcgis/lumina:linting", n, i);
6104
6107
  }
6105
6108
  }
6106
- A([
6109
+ I([
6107
6110
  k("buildStart() in build mode or load() serve mode")
6108
6111
  ], P.prototype, "typeScriptHost");
6109
- A([
6112
+ I([
6110
6113
  k("configResolved()")
6111
6114
  ], P.prototype, "shouldMinify");
6112
- A([
6115
+ I([
6113
6116
  k("configResolved()")
6114
6117
  ], P.prototype, "shouldMinifyJsx");
6115
- A([
6118
+ I([
6116
6119
  k("configResolved()")
6117
6120
  ], P.prototype, "dir");
6118
- A([
6121
+ I([
6119
6122
  k("load()")
6120
6123
  ], P.prototype, "apiJson");
6121
- A([
6124
+ I([
6122
6125
  k("load()")
6123
6126
  ], P.prototype, "apiJsonComponents");
6124
- A([
6127
+ I([
6125
6128
  k("load()")
6126
6129
  ], P.prototype, "privateApiJson");
6127
- A([
6130
+ I([
6128
6131
  k("load() when in build mode")
6129
6132
  ], P.prototype, "_componentPathMapping");
6130
- A([
6133
+ I([
6131
6134
  k("apply()")
6132
6135
  ], P.prototype, "environment");
6133
- A([
6136
+ I([
6134
6137
  k("apply()")
6135
6138
  ], P.prototype, "isInTest");
6136
- A([
6139
+ I([
6137
6140
  k("apply()")
6138
6141
  ], P.prototype, "isInPuppeteerTestBackEnd");
6139
- A([
6142
+ I([
6140
6143
  k("apply()")
6141
6144
  ], P.prototype, "isInPuppeteerTestFrontEnd");
6142
- A([
6145
+ I([
6143
6146
  k("configResolved()")
6144
6147
  ], P.prototype, "isInStorybook");
6145
- A([
6148
+ I([
6146
6149
  k("configResolved()")
6147
6150
  ], P.prototype, "hmrEnabled");
6148
- A([
6151
+ I([
6149
6152
  k("apply()")
6150
6153
  ], P.prototype, "viteCommand");
6151
- A([
6154
+ I([
6152
6155
  k("configResolved()")
6153
6156
  ], P.prototype, "isFullApiExtraction");
6154
- A([
6157
+ I([
6155
6158
  k("configResolved()")
6156
6159
  ], P.prototype, "viteConfig");
6157
- A([
6160
+ I([
6158
6161
  k("configResolved()")
6159
6162
  ], P.prototype, "server");
6160
- A([
6163
+ I([
6161
6164
  k("load()")
6162
6165
  ], P.prototype, "componentFiles");
6163
- A([
6166
+ I([
6164
6167
  k("load()")
6165
6168
  ], P.prototype, "componentStoryFiles");
6166
- A([
6169
+ I([
6167
6170
  k("configResolved()")
6168
6171
  ], P.prototype, "componentStoriesPromise");
6169
- A([
6172
+ I([
6170
6173
  k("load()")
6171
6174
  ], P.prototype, "componentStories");
6172
- A([
6175
+ I([
6173
6176
  k("transform()")
6174
6177
  ], P.prototype, "_globalHydratedCssString");
6175
- A([
6178
+ I([
6176
6179
  k("configResolved()")
6177
6180
  ], P.prototype, "_compilerOptionsForPrinter");
6178
- A([
6181
+ I([
6179
6182
  k("configResolved()")
6180
6183
  ], P.prototype, "_typeScriptPrinter");
6181
- const pt = "@arcgis/lumina:addNonLazyImports", vl = (e) => ({
6184
+ const pt = "@arcgis/lumina:addNonLazyImports", hl = (e) => ({
6182
6185
  name: pt,
6183
6186
  apply: () => e.viteCommand === "build",
6184
6187
  generateBundle(t, i) {
6185
6188
  Object.entries(i).forEach(([n, s]) => {
6186
- const r = ye(n, "components/", e);
6189
+ const r = he(n, "components/", e);
6187
6190
  if (r !== n && (s.fileName = r), s.type === "chunk") {
6188
6191
  const a = u.dirname(u.join(e.dir.dist, n)), c = r === n ? a : u.dirname(u.join(e.dir.dist, r));
6189
6192
  s.code = Bi(s.code, e, c, a);
@@ -6194,12 +6197,12 @@ const pt = "@arcgis/lumina:addNonLazyImports", vl = (e) => ({
6194
6197
  if (e.isInStorybook)
6195
6198
  return;
6196
6199
  const t = e._customElementDependencies, i = Object.entries(t), n = new Set(
6197
- i.map(([r]) => r).filter((r) => he(r, e.dir.srcComponents))
6200
+ i.map(([r]) => r).filter((r) => ve(r, e.dir.srcComponents))
6198
6201
  );
6199
6202
  i.forEach(([r, { referencedTagNames: a, referencedDeferredTagNames: c, referencedBy: l }]) => {
6200
6203
  if (n.has(r) || a.length === 0 && c.length === 0)
6201
6204
  return;
6202
- const d = rs(t, l, n);
6205
+ const d = ss(t, l, n);
6203
6206
  if (d.forEach((p) => {
6204
6207
  t[p].referencedTagNames.splice(0, 0, ...a), t[p].referencedDeferredTagNames.splice(0, 0, ...c);
6205
6208
  }), (a.length > 0 || c.length > 0) && d.length === 0) {
@@ -6215,14 +6218,14 @@ const pt = "@arcgis/lumina:addNonLazyImports", vl = (e) => ({
6215
6218
  const s = i.flatMap(([r, { referencedTagNames: a, referencedDeferredTagNames: c }]) => {
6216
6219
  if (!n.has(r))
6217
6220
  return [];
6218
- const l = u.dirname(r), d = ye(l, e.dir.srcComponents, e), p = u.relative(e.dir.src, d);
6221
+ const l = u.dirname(r), d = he(l, e.dir.srcComponents, e), p = u.relative(e.dir.src, d);
6219
6222
  function m(b) {
6220
- const E = Xa(e, b, r);
6223
+ const E = Va(e, b, r);
6221
6224
  if (E === void 0)
6222
6225
  return;
6223
- const I = Qa(E, p);
6224
- if (I !== `./${p}`)
6225
- return I.startsWith(".") ? `${I}/${Li}` : I;
6226
+ const A = Xa(E, p);
6227
+ if (A !== `./${p}`)
6228
+ return A.startsWith(".") ? `${A}/${Li}` : A;
6226
6229
  }
6227
6230
  const f = new Set(a), g = new Set(c), y = Array.from(f, m).filter(j), h = (b) => `import "${b}";
6228
6231
  `, v = y.map(h).join(""), S = /* @__PURE__ */ new Set(), T = Array.from(g, (b) => {
@@ -6243,20 +6246,20 @@ ${x}
6243
6246
  deferredLoaders${T.join("")};` : x;
6244
6247
  return [
6245
6248
  D(u.join(e.dir.dist, p, Li), $),
6246
- D(u.join(e.dir.dist, p, Sl), L)
6249
+ D(u.join(e.dir.dist, p, vl), L)
6247
6250
  ];
6248
6251
  });
6249
6252
  await Promise.all(s);
6250
6253
  }
6251
- }), Li = "index.js", Sl = "index.d.ts", rs = (e, t, i, n = /* @__PURE__ */ new Set()) => t.flatMap((s) => i.has(s) ? [s] : n.has(s) ? [] : (n.add(s), rs(e, e[s].referencedBy, i, n))), wl = (e) => ({
6254
+ }), Li = "index.js", vl = "index.d.ts", ss = (e, t, i, n = /* @__PURE__ */ new Set()) => t.flatMap((s) => i.has(s) ? [s] : n.has(s) ? [] : (n.add(s), ss(e, e[s].referencedBy, i, n))), Sl = (e) => ({
6252
6255
  name: "@arcgis/lumina:handleDynamicAssets",
6253
6256
  configureServer(t) {
6254
- e.server = t, !e.isInPuppeteerTestBackEnd && Fi(e).forEach(({ assets: i, transformers: n }) => fe(e, i, n));
6257
+ e.server = t, !e.isInPuppeteerTestBackEnd && Fi(e).forEach(({ assets: i, transformers: n }) => ge(e, i, n));
6255
6258
  },
6256
6259
  async writeBundle() {
6257
6260
  await Promise.all(
6258
6261
  Fi(e).map(
6259
- async ({ assets: t, transformers: i }) => await Vn(e, t, i)
6262
+ async ({ assets: t, transformers: i }) => await Gn(e, t, i)
6260
6263
  )
6261
6264
  );
6262
6265
  }
@@ -6267,20 +6270,20 @@ function Fi(e) {
6267
6270
  "type" in n ? t.push(n) : "assets" in n && t.push(...n.assets);
6268
6271
  }), t.length > 0 && i.push({ assets: t }), e.assetsToProvide = void 0, i;
6269
6272
  }
6270
- const wt = "@arcgis/lumina:updatePackageJson", bl = (e) => ({
6273
+ const wt = "@arcgis/lumina:updatePackageJson", wl = (e) => ({
6271
6274
  name: wt,
6272
6275
  apply: () => e.viteCommand === "serve" && e.environment === "development" && !e.isInTest && !e.isInCi,
6273
6276
  configResolved() {
6274
- Tl(e).catch(
6277
+ bl(e).catch(
6275
6278
  (t) => C.error(wt, `Failed to update package's package.json:${String(t)}`)
6276
6279
  );
6277
6280
  }
6278
6281
  });
6279
- async function Tl(e) {
6280
- const t = u.join(e.dir.root, "package.json"), i = JSON.parse(await O(t, "utf-8")), n = El(i, e);
6282
+ async function bl(e) {
6283
+ const t = u.join(e.dir.root, "package.json"), i = JSON.parse(await O(t, "utf-8")), n = Tl(i, e);
6281
6284
  n && Ji(t, JSON.stringify(n, null, 2));
6282
6285
  }
6283
- function El(e, t) {
6286
+ function Tl(e, t) {
6284
6287
  const i = e?.devDependencies ?? {};
6285
6288
  Object.keys(e?.peerDependencies ?? {}).forEach((d) => {
6286
6289
  d in i || C.warn(
@@ -6306,7 +6309,7 @@ function El(e, t) {
6306
6309
  const d = s(r.webTypes);
6307
6310
  e["web-types"] !== d && (n = !0, e["web-types"] = d);
6308
6311
  }
6309
- const a = `./${be}.css`, c = t.options.build?.cdn?.namespace !== void 0, l = oe(
6312
+ const a = `./${be}.css`, c = t.options.build?.cdn?.namespace !== void 0, l = ae(
6310
6313
  t.dir.root,
6311
6314
  u.join(t.dir.distCdn, a)
6312
6315
  );
@@ -6319,20 +6322,20 @@ function El(e, t) {
6319
6322
  if (n)
6320
6323
  return e;
6321
6324
  }
6322
- const Cl = (e) => ({
6325
+ const El = (e) => ({
6323
6326
  timestamp: e.apiJson.timestamp,
6324
6327
  compiler: e.apiJson.compiler,
6325
- components: $l(e),
6328
+ components: Cl(e),
6326
6329
  typeLibrary: {}
6327
6330
  });
6328
- function $l(e) {
6331
+ function Cl(e) {
6329
6332
  const t = [];
6330
6333
  for (const i of e.apiJson.modules)
6331
6334
  for (const n of i.declarations)
6332
- "customElement" in n && t.push(Pl(n, i.path));
6335
+ "customElement" in n && t.push($l(n, i.path));
6333
6336
  return t;
6334
6337
  }
6335
- function Pl(e, t) {
6338
+ function $l(e, t) {
6336
6339
  const i = e.superclass ? [{ name: "superclass", text: JSON.stringify(e.superclass) }] : [];
6337
6340
  return {
6338
6341
  filePath: t,
@@ -6347,9 +6350,9 @@ function Pl(e, t) {
6347
6350
  dependencies: [],
6348
6351
  dependencyGraph: {},
6349
6352
  deprecation: typeof e.deprecated == "boolean" ? e.deprecated ? "" : void 0 : e.deprecated,
6350
- props: e.members.map(xl).filter(j),
6351
- methods: e.members.map(kl).filter(j),
6352
- events: e.events?.map(Al) ?? [],
6353
+ props: e.members.map(Pl).filter(j),
6354
+ methods: e.members.map(xl).filter(j),
6355
+ events: e.events?.map(kl) ?? [],
6353
6356
  styles: e.cssProperties?.map((n) => ({
6354
6357
  name: n.name,
6355
6358
  annotation: "prop",
@@ -6361,7 +6364,7 @@ function Pl(e, t) {
6361
6364
  listeners: []
6362
6365
  };
6363
6366
  }
6364
- function xl(e) {
6367
+ function Pl(e) {
6365
6368
  if (e.kind !== "field")
6366
6369
  return;
6367
6370
  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;
@@ -6402,7 +6405,7 @@ const Mt = (e) => Object.fromEntries(
6402
6405
  ]
6403
6406
  ) ?? []
6404
6407
  );
6405
- function kl(e) {
6408
+ function xl(e) {
6406
6409
  if (e.kind !== "method")
6407
6410
  return;
6408
6411
  const t = e, i = e.inheritedFrom ? [{ name: "inheritedFrom", text: JSON.stringify(e.inheritedFrom) }] : [], n = t.parameters?.map(({ name: s, type: r, description: a }) => ({
@@ -6433,7 +6436,7 @@ function kl(e) {
6433
6436
  deprecation: typeof t.deprecated == "boolean" ? t.deprecated ? "" : void 0 : t.deprecated
6434
6437
  };
6435
6438
  }
6436
- function Al(e) {
6439
+ function kl(e) {
6437
6440
  const t = e.inheritedFrom ? [{ name: "inheritedFrom", text: JSON.stringify(e.inheritedFrom) }] : [];
6438
6441
  return {
6439
6442
  event: e.name,
@@ -6451,12 +6454,12 @@ function Al(e) {
6451
6454
  deprecation: typeof e.deprecated == "boolean" ? e.deprecated ? "" : void 0 : e.deprecated
6452
6455
  };
6453
6456
  }
6454
- const os = (e) => e.flatMap(
6457
+ const rs = (e) => e.flatMap(
6455
6458
  (t) => t.cssProperties?.map((i) => ({
6456
6459
  name: i.name,
6457
6460
  description: i.description || void 0
6458
6461
  })) ?? []
6459
- ), as = (e) => e.flatMap(
6462
+ ), os = (e) => e.flatMap(
6460
6463
  (t) => t.cssParts?.map((i) => ({
6461
6464
  name: `::part(${i.name})`,
6462
6465
  description: i.description || void 0
@@ -6466,17 +6469,17 @@ const os = (e) => e.flatMap(
6466
6469
  description: Qe(t.description, t.deprecated) || void 0,
6467
6470
  default: t.default,
6468
6471
  value: {
6469
- type: Ll(t.type.values?.map(nn))
6472
+ type: Al(t.type.values?.map(nn))
6470
6473
  }
6471
- })) ?? [], Ll = (e) => e?.length === 1 ? e[0] : e, Qe = (e = "", t = !1) => t === !1 ? e : `**Deprecated**${typeof t == "string" ? `: ${t}` : ""}. ${e}`, $e = {
6474
+ })) ?? [], Al = (e) => e?.length === 1 ? e[0] : e, Qe = (e = "", t = !1) => t === !1 ? e : `**Deprecated**${typeof t == "string" ? `: ${t}` : ""}. ${e}`, $e = {
6472
6475
  slots: "Slots",
6473
6476
  events: "Events",
6474
6477
  cssProperties: "CSS Properties",
6475
6478
  cssParts: "CSS Parts",
6476
6479
  methods: "Methods"
6477
6480
  };
6478
- function cs(e) {
6479
- const t = Fl(e.slots), i = Nl(e.events), n = Dl(e.cssProperties), s = jl(e.cssParts), r = Rl(e.members), a = Qe(e.description, e.deprecated).trim();
6481
+ function as(e) {
6482
+ const t = Ll(e.slots), i = Fl(e.events), n = Nl(e.cssProperties), s = Dl(e.cssParts), r = jl(e.members), a = Qe(e.description, e.deprecated).trim();
6480
6483
  return [...a ? [`${a}
6481
6484
  --`] : [], i, r, t, n, s].filter(Boolean).join(`
6482
6485
 
@@ -6484,28 +6487,28 @@ function cs(e) {
6484
6487
  }
6485
6488
  const Pe = (e, t) => t === void 0 || t.length === 0 ? "" : `### ${e}
6486
6489
  ${t.join(`
6487
- `)}`, Fl = (e) => Pe(
6490
+ `)}`, Ll = (e) => Pe(
6488
6491
  $e.slots,
6489
6492
  e?.map((t) => `- ${t.name ? `**${t.name}**` : "_default_"} - ${t.description}`)
6490
- ), Nl = (e) => Pe(
6493
+ ), Fl = (e) => Pe(
6491
6494
  $e.events,
6492
6495
  e?.filter((t) => t.name !== null && t.name !== void 0).map((t) => `- **${t.name}**${t.description ? ` - ${t.description}` : ""}`)
6493
- ), Dl = (e = []) => Pe(
6496
+ ), Nl = (e = []) => Pe(
6494
6497
  $e.cssProperties,
6495
6498
  e?.map(
6496
6499
  (t) => `- **${t.name}** - ${t.description} ${t.default ? `_(default: ${t.default})_}` : ""}`
6497
6500
  )
6498
- ), jl = (e) => Pe(
6501
+ ), Dl = (e) => Pe(
6499
6502
  $e.cssParts,
6500
6503
  e?.map((t) => `- **${t.name}** - ${t.description}`)
6501
- ), Rl = (e) => Pe(
6504
+ ), jl = (e) => Pe(
6502
6505
  $e.methods,
6503
- e.filter(gs).map(
6506
+ e.filter(fs).map(
6504
6507
  (t) => [`- \`${t.name}${t.signature}\``, Qe(t.description, t.deprecated)].filter(Boolean).join(" - ")
6505
6508
  )
6506
6509
  );
6507
- function Ml(e, t) {
6508
- const i = Ol(e), n = os(e), s = as(e), r = J();
6510
+ function Rl(e, t) {
6511
+ const i = Ml(e), n = rs(e), s = os(e), r = J();
6509
6512
  return {
6510
6513
  $schema: "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
6511
6514
  name: r.name,
@@ -6523,9 +6526,9 @@ function Ml(e, t) {
6523
6526
  }
6524
6527
  };
6525
6528
  }
6526
- const Ol = (e) => e.map((t) => ({
6529
+ const Ml = (e) => e.map((t) => ({
6527
6530
  name: t.tagName,
6528
- description: cs(t),
6531
+ description: as(t),
6529
6532
  "doc-url": t.demos?.[0]?.url,
6530
6533
  attributes: Il(t),
6531
6534
  slots: t.slots?.map((i) => ({
@@ -6534,10 +6537,10 @@ const Ol = (e) => e.map((t) => ({
6534
6537
  })),
6535
6538
  events: Ni(t),
6536
6539
  js: {
6537
- properties: Jl(t),
6540
+ properties: Ol(t),
6538
6541
  events: Ni(t)
6539
6542
  }
6540
- })), Jl = (e) => e.members.filter(ys).map((t) => ({
6543
+ })), Ol = (e) => e.members.filter(gs).map((t) => ({
6541
6544
  name: t.name,
6542
6545
  description: t.description,
6543
6546
  type: t.type?.text
@@ -6545,30 +6548,30 @@ const Ol = (e) => e.map((t) => ({
6545
6548
  name: t.name,
6546
6549
  type: t.type?.text,
6547
6550
  description: t.description
6548
- })) ?? [], Kl = (e) => e.map((t) => ({
6551
+ })) ?? [], Jl = (e) => e.map((t) => ({
6549
6552
  name: t.tagName,
6550
- description: cs(t),
6551
- attributes: Wl(t),
6553
+ description: as(t),
6554
+ attributes: Kl(t),
6552
6555
  references: t.demos?.map((i) => ({ name: i.description, url: i.url })) ?? []
6553
- })), Wl = (e) => e.attributes?.map((t) => ({
6556
+ })), Kl = (e) => e.attributes?.map((t) => ({
6554
6557
  name: t.name,
6555
6558
  description: Qe(t.description, t.deprecated) || void 0,
6556
- values: Bl(t)
6557
- })) ?? [], Bl = (e) => e.type.values?.map((t) => t.value ?? "").filter(Boolean).map((t) => ({ name: t })) ?? [], _l = (e) => ({
6559
+ values: Wl(t)
6560
+ })) ?? [], Wl = (e) => e.type.values?.map((t) => t.value ?? "").filter(Boolean).map((t) => ({ name: t })) ?? [], Bl = (e) => ({
6558
6561
  $schema: "https://raw.githubusercontent.com/microsoft/vscode-html-languageservice/main/docs/customData.schema.json",
6559
6562
  version: 1.1,
6560
- tags: Kl(e)
6561
- }), Hl = (e) => ({
6563
+ tags: Jl(e)
6564
+ }), _l = (e) => ({
6562
6565
  $schema: "https://raw.githubusercontent.com/microsoft/vscode-css-languageservice/main/docs/customData.schema.json",
6563
6566
  version: 1.1,
6564
- properties: os(e),
6565
- pseudoElements: as(e)
6566
- }), Ul = "@arcgis/lumina:generateDocs";
6567
- function zl(e) {
6567
+ properties: rs(e),
6568
+ pseudoElements: os(e)
6569
+ }), Hl = "@arcgis/lumina:generateDocs";
6570
+ function Ul(e) {
6568
6571
  return e._documentationFileNames.stencilLikeDocsJson !== void 0 && e.provideAssets([
6569
6572
  {
6570
6573
  type: "dynamic",
6571
- source: () => JSON.stringify(Cl(e), null, 2),
6574
+ source: () => JSON.stringify(El(e), null, 2),
6572
6575
  destination: u.join("../..", e._documentationFileNames.stencilLikeDocsJson)
6573
6576
  }
6574
6577
  ]), e._documentationFileNames.apiJson !== void 0 && e.provideAssets([
@@ -6578,34 +6581,34 @@ function zl(e) {
6578
6581
  destination: u.join("../..", e._documentationFileNames.apiJson)
6579
6582
  }
6580
6583
  ]), {
6581
- name: Ul,
6584
+ name: Hl,
6582
6585
  async writeBundle() {
6583
6586
  if (e.isInStorybook)
6584
6587
  return;
6585
6588
  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);
6586
6589
  if (a.length === 0)
6587
6590
  return;
6588
- await es(a);
6591
+ await Yn(a);
6589
6592
  const c = [];
6590
6593
  if (n !== void 0) {
6591
- const l = JSON.stringify(_l(e.apiJsonComponents), null, 2);
6594
+ const l = JSON.stringify(Bl(e.apiJsonComponents), null, 2);
6592
6595
  c.push(D(n, l));
6593
6596
  }
6594
6597
  if (s !== void 0) {
6595
- const l = JSON.stringify(Hl(e.apiJsonComponents), null, 2);
6598
+ const l = JSON.stringify(_l(e.apiJsonComponents), null, 2);
6596
6599
  c.push(D(s, l));
6597
6600
  }
6598
6601
  if (r !== void 0) {
6599
- const l = Ml(e.apiJsonComponents, typeof t == "object" ? t : {});
6602
+ const l = Rl(e.apiJsonComponents, typeof t == "object" ? t : {});
6600
6603
  c.push(D(r, JSON.stringify(l, null, 2)));
6601
6604
  }
6602
6605
  await Promise.all(c);
6603
6606
  }
6604
6607
  };
6605
6608
  }
6606
- const ql = (e) => `import type { h, EventHandler } from "@arcgis/lumina";
6609
+ const zl = (e) => `import type { h, EventHandler } from "@arcgis/lumina";
6607
6610
 
6608
- ${e.map(Gl).join(`
6611
+ ${e.map(ql).join(`
6609
6612
 
6610
6613
  `)}
6611
6614
 
@@ -6617,7 +6620,7 @@ ${e.map(({ tagName: t, pascalCaseName: i }) => ` "${t}": Lumina${i};`).join
6617
6620
  }
6618
6621
  }
6619
6622
  }`;
6620
- function Gl({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6623
+ function ql({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6621
6624
  const [s, r] = Xe(e, i);
6622
6625
  return [
6623
6626
  `interface Lumina${t} extends ${s}h.JSX.HTMLAttributes<HTML${t}Element> {
@@ -6630,7 +6633,7 @@ function Gl({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6630
6633
  r
6631
6634
  ].join("");
6632
6635
  }
6633
- function Vl(e) {
6636
+ function Gl(e) {
6634
6637
  const t = ` interface IntrinsicElements extends PreactJsx.IntrinsicElements {
6635
6638
  ${e.map(({ pascalCaseName: i, tagName: n }) => ` "${n}": Preact${i};`).join(`
6636
6639
  `)}
@@ -6638,7 +6641,7 @@ ${e.map(({ pascalCaseName: i, tagName: n }) => ` "${n}": Preact${i};`).join
6638
6641
  return `import { JSX as PreactJsx } from "preact";
6639
6642
  import type { EventHandler } from "@arcgis/lumina";
6640
6643
 
6641
- ${e.map(Xl).join(`
6644
+ ${e.map(Vl).join(`
6642
6645
 
6643
6646
  `)}
6644
6647
 
@@ -6651,7 +6654,7 @@ ${t}
6651
6654
  }
6652
6655
  }`;
6653
6656
  }
6654
- function Xl({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6657
+ function Vl({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6655
6658
  const [s, r] = Xe(e, i);
6656
6659
  return [
6657
6660
  `interface Preact${t} extends ${s}PreactJsx.HTMLAttributes<HTML${t}Element> {
@@ -6664,13 +6667,13 @@ function Xl({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6664
6667
  r
6665
6668
  ].join("");
6666
6669
  }
6667
- function Ql(e) {
6670
+ function Xl(e) {
6668
6671
  const t = e.map(({ pascalCaseName: i, tagName: n }) => ` "${n}": React${i};`).join(`
6669
6672
  `);
6670
6673
  return `import type { HTMLProps } from 'react';
6671
6674
  import type { EventHandler } from "@arcgis/lumina";
6672
6675
 
6673
- ${e.map(Zl).join(`
6676
+ ${e.map(Ql).join(`
6674
6677
 
6675
6678
  `)}
6676
6679
 
@@ -6696,7 +6699,7 @@ ${t}
6696
6699
  }
6697
6700
  }`;
6698
6701
  }
6699
- function Zl({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6702
+ function Ql({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6700
6703
  const [s, r] = Xe(e, i);
6701
6704
  return [
6702
6705
  `interface React${t} extends ${s}HTMLProps<HTML${t}Element> {
@@ -6709,10 +6712,10 @@ function Zl({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6709
6712
  r
6710
6713
  ].join("");
6711
6714
  }
6712
- const Yl = (e) => `import { JSXBase as StencilJsx } from "@stencil/core/internal";
6715
+ const Zl = (e) => `import { JSXBase as StencilJsx } from "@stencil/core/internal";
6713
6716
  import type { EventHandler } from "@arcgis/lumina";
6714
6717
 
6715
- ${e.map(ed).join(`
6718
+ ${e.map(Yl).join(`
6716
6719
 
6717
6720
  `)}
6718
6721
 
@@ -6730,7 +6733,7 @@ declare module "@stencil/core/internal/stencil-public-runtime" {
6730
6733
  interface IntrinsicElements extends ExposedElements {}
6731
6734
  }
6732
6735
  }`;
6733
- function ed({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6736
+ function Yl({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6734
6737
  const [s, r] = Xe(e, i);
6735
6738
  return [
6736
6739
  `interface Stencil${t} extends ${s}StencilJsx.HTMLAttributes<HTML${t}Element> {
@@ -6743,16 +6746,16 @@ function ed({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6743
6746
  r
6744
6747
  ].join("");
6745
6748
  }
6746
- const td = (e, t, i) => [i, t, id(e), nd(e)].join(`
6749
+ const ed = (e, t, i) => [i, t, td(e), id(e)].join(`
6747
6750
 
6748
- `), id = (e) => e.filter((t) => (t.events?.length ?? 0) > 0).map(
6751
+ `), td = (e) => e.filter((t) => (t.events?.length ?? 0) > 0).map(
6749
6752
  ({ pascalCaseName: t }) => `export interface ${t}CustomEvent<T> extends CustomEvent<T> {
6750
6753
  detail: T;
6751
6754
  target: HTML${t}Element;
6752
6755
  currentTarget: HTML${t}Element;
6753
6756
  }`
6754
6757
  ).join(`
6755
- `), nd = (e) => `export { ToEvents, TargetedEvent } from "@arcgis/lumina";
6758
+ `), id = (e) => `export { ToEvents, TargetedEvent } from "@arcgis/lumina";
6756
6759
 
6757
6760
  declare global {
6758
6761
  interface HTMLElementTagNameMap {
@@ -6760,12 +6763,12 @@ ${e.map(({ pascalCaseName: t, tagName: i }) => ` "${i}": HTML${t}Element;`).j
6760
6763
  `)}
6761
6764
  }
6762
6765
 
6763
- ${e.map(sd).join(`
6766
+ ${e.map(nd).join(`
6764
6767
  `).split(`
6765
6768
  `).map((t) => t.length > 0 ? ` ${t}` : t).join(`
6766
6769
  `)}
6767
6770
  }`;
6768
- function sd({ name: e, pascalCaseName: t, events: i = [] }) {
6771
+ function nd({ name: e, pascalCaseName: t, events: i = [] }) {
6769
6772
  const n = i.length > 0, s = `${t}CustomEvent`, r = `HTML${t}Element`;
6770
6773
  return [
6771
6774
  n ? `interface ${r}EventMap {
@@ -6784,7 +6787,7 @@ ${n ? ` addEventListener<K extends keyof ${r}EventMap>(type: K, listener: (this
6784
6787
  }`
6785
6788
  ].join("");
6786
6789
  }
6787
- function rd(e) {
6790
+ function sd(e) {
6788
6791
  let t;
6789
6792
  return {
6790
6793
  name: "@arcgis/lumina:generateFrameworkTypes",
@@ -6792,11 +6795,11 @@ function rd(e) {
6792
6795
  generateBundle() {
6793
6796
  if (e.isInStorybook)
6794
6797
  return;
6795
- t = Ma(e);
6798
+ t = Ra(e);
6796
6799
  const i = u.join(e.dir.dist, "index.d.ts");
6797
6800
  e._declarationTextTransformers.push((n) => {
6798
6801
  const { filePath: s, content: r } = n;
6799
- return s === i ? { filePath: s, content: td(e.apiJsonComponents, r, t) } : n;
6802
+ return s === i ? { filePath: s, content: ed(e.apiJsonComponents, r, t) } : n;
6800
6803
  });
6801
6804
  },
6802
6805
  async writeBundle() {
@@ -6806,10 +6809,10 @@ function rd(e) {
6806
6809
  await Q(i);
6807
6810
  const n = `/// <reference types="../index.d.ts" />
6808
6811
  ${t.replaceAll("./", "../")}`, s = Object.entries({
6809
- react: Ql(e.apiJsonComponents),
6810
- preact: Vl(e.apiJsonComponents),
6811
- stencil: Yl(e.apiJsonComponents),
6812
- lumina: ql(e.apiJsonComponents)
6812
+ react: Xl(e.apiJsonComponents),
6813
+ preact: Gl(e.apiJsonComponents),
6814
+ stencil: Zl(e.apiJsonComponents),
6815
+ lumina: zl(e.apiJsonComponents)
6813
6816
  }).map(
6814
6817
  async ([r, a]) => await D(u.join(i, `${r}.d.ts`), `${n}
6815
6818
  ${a}`)
@@ -6818,38 +6821,38 @@ ${a}`)
6818
6821
  }
6819
6822
  };
6820
6823
  }
6821
- function od(e) {
6824
+ function rd(e) {
6822
6825
  return {
6823
6826
  name: "@arcgis/lumina:buildWrappers",
6824
6827
  apply: () => e.viteCommand === "build" && !!e.options.build?.wrappers?.length,
6825
6828
  async writeBundle() {
6826
6829
  e.isInStorybook || await Promise.all(
6827
6830
  e.options.build?.wrappers?.map(async (t) => {
6828
- t.type === "react18" && await ld(e, t);
6831
+ t.type === "react18" && await cd(e, t);
6829
6832
  }) ?? []
6830
6833
  );
6831
6834
  }
6832
6835
  };
6833
6836
  }
6834
- const ad = "react", Di = "@lit/react", cd = `
6835
- import React from "${ad}";
6837
+ const od = "react", Di = "@lit/react", ad = `
6838
+ import React from "${od}";
6836
6839
  import { createComponent } from "${Di}";
6837
6840
  import type { EventName } from "${Di}";
6838
6841
  import { makeReactWrapperFactory, getReactWrapperOptions } from "@arcgis/lumina";
6839
6842
 
6840
6843
  const createWrapper = /*@__PURE__*/ makeReactWrapperFactory(React, createComponent) as typeof createComponent;
6841
6844
  `;
6842
- async function ld(e, t) {
6845
+ async function cd(e, t) {
6843
6846
  const { name: i } = J(), n = [];
6844
6847
  for (const a of e.apiJson.modules)
6845
6848
  for (const c of a.declarations)
6846
- "customElement" in c && n.push(dd(c));
6847
- const s = [`/// <reference types="${i}" preserve="true" />`, cd, ...n].join(""), r = u.resolve(t.proxiesFile);
6849
+ "customElement" in c && n.push(ld(c));
6850
+ const s = [`/// <reference types="${i}" preserve="true" />`, ad, ...n].join(""), r = u.resolve(t.proxiesFile);
6848
6851
  await Q(u.dirname(r), { recursive: !0 }), await D(r, s);
6849
6852
  }
6850
- function dd(e) {
6853
+ function ld(e) {
6851
6854
  const t = e.events?.map(
6852
- (i) => ` ${Ee(`on${ws(i.name)}`)}: "${i.name}" as EventName<HTML${e.pascalCaseName}Element["${i.name}"]>,`
6855
+ (i) => ` ${Ee(`on${Ss(i.name)}`)}: "${i.name}" as EventName<HTML${e.pascalCaseName}Element["${i.name}"]>,`
6853
6856
  ).join(`
6854
6857
  `);
6855
6858
  return `
@@ -6863,32 +6866,32 @@ ${t}
6863
6866
  );
6864
6867
  `;
6865
6868
  }
6866
- function Cd(e = {}) {
6869
+ function Ed(e = {}) {
6867
6870
  const t = new P(e), i = [
6868
6871
  t._plugin,
6872
+ Yc(t),
6869
6873
  el(t),
6870
- tl(t),
6871
- bl(t),
6872
- Pr(t),
6873
- Bc(t),
6874
- rd(t),
6875
- zl(t),
6876
- hc(t),
6877
- yo(t),
6878
- qc(t),
6879
6874
  wl(t),
6880
- vl(t),
6881
- al(t),
6882
- Rs(t),
6883
- Tc(t),
6884
- od(t),
6885
- Vc(t)
6875
+ $r(t),
6876
+ Wc(t),
6877
+ sd(t),
6878
+ Ul(t),
6879
+ yc(t),
6880
+ wo(t),
6881
+ zc(t),
6882
+ Sl(t),
6883
+ hl(t),
6884
+ ol(t),
6885
+ js(t),
6886
+ bc(t),
6887
+ rd(t),
6888
+ Gc(t)
6886
6889
  ].filter(j);
6887
6890
  return i.context = t, i;
6888
6891
  }
6889
- const $d = {
6890
- initializeComponentDependencies: fn,
6891
- updateLuminaTs: ns,
6892
+ const Cd = {
6893
+ initializeComponentDependencies: hn,
6894
+ updateLuminaTs: is,
6892
6895
  propertyToAttributeMappings: B,
6893
6896
  findDeclaredComponents: _i,
6894
6897
  nativeEvents: Qi,
@@ -6900,8 +6903,8 @@ const $d = {
6900
6903
  isPropertyEscapeNeeded: Ve
6901
6904
  };
6902
6905
  export {
6903
- Je as LuminaApiExtractor,
6904
- $d as exportsForCodemod,
6906
+ Ke as LuminaApiExtractor,
6907
+ Cd as exportsForCodemod,
6905
6908
  qe as inferCdnUrl,
6906
- Cd as useLumina
6909
+ Ed as useLumina
6907
6910
  };