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

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 ds, path as u, toSystemPathSeparators as ee, retrievePackageJson as j, fetchPackageLocation as _e, asyncRetrievePackageJson as He, existsAsync as U, findPath as ps, toPosixPathSeparators as Le, isPosix as Ri, getCwd as Mi } from "@arcgis/components-build-utils";
2
- import us from "vite-plugin-dts";
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";
3
3
  import o from "typescript";
4
- import { f as b, l as C } from "./logger-KpGU2b3R.js";
5
- import { getMemberName as X, apiMemberToSynthesizedComments as V, globalPackageIdentifier as Oi, setApiDocFromJsDoc as ue, ApiExtractor as ms, hasIgnoredModifier as fs, symbolToDocs as Kt, setDefaultFromInitializer as Wt, multipleJsDocTags as gs, findDecorator as Bt, isApiMethod as ys, isApiProperty as hs } from "@arcgis/api-extractor";
6
- import { isNotUndefined as R, mappedFind as ge, camelToKebab as bt, kebabToPascal as vs, uncapitalize as ut, identity as Ji, Deferred as Ss, getPreamble as ws, capitalize as bs } from "@arcgis/components-utils";
7
- import { readdir as Ue, readFile as J, rm as Ts, mkdir as Q, cp as Es, writeFile as D, copyFile as Cs } from "node:fs/promises";
8
- import { lazyMetaSubItemJoiner as $s, lazyMetaItemJoiner as Ye, lazyMetaGroupJoiner as Ps, propertyFlagAttribute as _t, propertyFlagReflect as xs, propertyFlagBoolean as ks, propertyFlagNumber as As, propertyFlagState as Is, propertyFlagReadOnly as Ls, propertyFlagNoAccessor as Fs } from "@arcgis/lumina/config";
9
- import { build as Ns } from "esbuild";
10
- import { glob as Ds } from "glob";
11
- import js from "mime-types";
12
- import { writeFileSync as Ki } from "node:fs";
13
- import Rs from "chalk";
14
- function Ms(e) {
15
- const t = e.options?.build?.dependencies ?? {}, i = ds({
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";
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({
16
16
  bundleIn: t.bundleIn,
17
17
  externalize: [
18
18
  // TODO: remove these once Lit is declared as a peer dependency
@@ -28,8 +28,8 @@ function Ms(e) {
28
28
  e.isInStorybook && (i.resolveId = void 0);
29
29
  }, i;
30
30
  }
31
- const Tt = "customElement.js", Wi = "customElement.d.ts", Os = "playwright";
32
- function Js(e, t, i) {
31
+ const Tt = "customElement.js", Ki = "customElement.d.ts", Ms = "playwright";
32
+ function Os(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) => {
@@ -39,10 +39,10 @@ function Js(e, t, i) {
39
39
  function ye(e, t, i) {
40
40
  if (!e.startsWith(t))
41
41
  return e;
42
- const n = e.slice(t.length), s = Ks(n, i);
42
+ const n = e.slice(t.length), s = Js(n, i);
43
43
  return `${t}${s}`;
44
44
  }
45
- function Ks(e, t) {
45
+ function Js(e, t) {
46
46
  const i = e.split(u.sep);
47
47
  i.push(".");
48
48
  let n = t._componentPathMapping, s = 0;
@@ -54,36 +54,36 @@ function Ks(e, t) {
54
54
  n = n[r], s += 1;
55
55
  return e;
56
56
  }
57
- const Ws = ({ filePath: e, content: t }, i) => {
57
+ const Ks = ({ filePath: e, content: t }, i) => {
58
58
  const n = e.startsWith(i.dir.distComponents) ? ye(
59
- Bi(i.dir.distComponents, e),
59
+ Wi(i.dir.distComponents, e),
60
60
  i.dir.distComponents,
61
61
  i
62
- ) : e, s = u.dirname(e), r = n.endsWith(Wi), a = _i(
62
+ ) : e, s = u.dirname(e), r = n.endsWith(Ki), a = Bi(
63
63
  t,
64
64
  i,
65
65
  e === n ? s : u.dirname(n),
66
66
  s
67
- ), c = r ? Us(a) : a;
67
+ ), c = r ? Hs(a) : a;
68
68
  return {
69
69
  filePath: n,
70
70
  content: c
71
71
  };
72
72
  };
73
- function Bi(e, t, i = ".d.ts") {
73
+ 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(Bs) !== s.at(_s) ? t : u.join(
77
+ return s.at(Ws) !== s.at(Bs) ? t : u.join(
78
78
  s.slice(0, -1).join(u.sep),
79
- i === "" ? Tt : Wi
79
+ i === "" ? Tt : Ki
80
80
  );
81
81
  }
82
- const Bs = -1, _s = -2, Hs = /["']\.\.?\/[^'"]+/gu, _i = (e, t, i, n) => e.replaceAll(Hs, (s) => {
82
+ const Ws = -1, Bs = -2, _s = /["']\.\.?\/[^'"]+/gu, Bi = (e, t, i, n) => e.replaceAll(_s, (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(".") ? Bi(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 = ye(c, t.dir.distComponents, t);
87
87
  if (i === n && a === l)
88
88
  return s;
89
89
  const d = oe(i, l);
@@ -92,15 +92,15 @@ const Bs = -1, _s = -2, Hs = /["']\.\.?\/[^'"]+/gu, _i = (e, t, i, n) => e.repla
92
92
  const i = u.relative(e, t);
93
93
  return i.startsWith(".") ? i : `.${u.sep}${i}`;
94
94
  };
95
- function Us(e) {
95
+ function Hs(e) {
96
96
  return `/// <reference types="../../index.d.ts" />
97
97
  ${e}`;
98
98
  }
99
- const Ht = "customElement", zs = (e, t) => {
99
+ const Ht = "customElement", Us = (e, t) => {
100
100
  const { filePath: i, content: n } = e;
101
101
  if (!i.startsWith(t.dir.distComponents))
102
102
  return e;
103
- const s = Ui(n);
103
+ const s = Hi(n);
104
104
  if (s === void 0)
105
105
  return e;
106
106
  {
@@ -110,7 +110,7 @@ const Ht = "customElement", zs = (e, t) => {
110
110
  content: r
111
111
  };
112
112
  }
113
- }, qs = (e, t) => {
113
+ }, zs = (e, t) => {
114
114
  const i = [];
115
115
  if (t.apiModule?.declarations.forEach((r) => {
116
116
  "customElement" in r && i.push(
@@ -139,12 +139,12 @@ const Ht = "customElement", zs = (e, t) => {
139
139
  o.factory.createStringLiteral(n)
140
140
  ), ...e.statements, ...i];
141
141
  };
142
- function Hi(e) {
143
- const t = Ui(e);
142
+ function _i(e) {
143
+ const t = Hi(e);
144
144
  return t === void 0 ? void 0 : t.split(`
145
145
  `).filter((n) => n.includes(":")).map((n) => n.replace(";", "").replaceAll('"', "").replaceAll("'", "").split(":")).map(([n, s]) => [n.trim(), s.trim()]).filter(([n]) => !n.startsWith("/") && !n.startsWith("*"));
146
146
  }
147
- function Ui(e) {
147
+ function Hi(e) {
148
148
  const t = e.indexOf("declare global {");
149
149
  if (t === -1)
150
150
  return;
@@ -152,39 +152,39 @@ function Ui(e) {
152
152
  }`, t) + 2;
153
153
  return e.slice(t, i);
154
154
  }
155
- const Gs = (e) => (t, i) => (
155
+ const qs = (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
- Vs,
162
+ Gs,
163
+ Xs,
163
164
  Qs,
165
+ Vs,
166
+ Ks,
164
167
  Zs,
165
- Xs,
166
- Ws,
167
168
  Ys,
169
+ Us,
168
170
  er,
169
- zs,
170
- tr,
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
- ), Vs = (e, t) => t.isInStorybook ? !1 : e, Xs = (e, t) => (
177
+ ), Gs = (e, t) => t.isInStorybook ? !1 : e, Vs = (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", Qs = (e, t) => {
180
+ ), Ut = "lumina.d.ts", Xs = (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."), Zs = (e) => Et(e.filePath) || e.filePath.includes(".stories.") || e.filePath.includes(".story.") ? !1 : e, Ys = (e) => e.content.includes("__esri.") ? {
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.") ? {
184
184
  filePath: e.filePath,
185
185
  content: `/// <reference types="@arcgis/core/interfaces.d.ts" />
186
186
  ${e.content}`
187
- } : e, er = (e, t) => {
187
+ } : e, Ys = (e, t) => {
188
188
  t._htmlElementReferencesReplacer ??= {
189
189
  regex: new RegExp(
190
190
  `(${t.apiJsonComponents.map((n) => n.name).join("|")})\\[['"\`]el['"\`]\\]`,
@@ -199,11 +199,11 @@ ${e.content}`
199
199
  filePath: e.filePath,
200
200
  content: e.content.replace(i.regex, (n, s) => i.replacements[s])
201
201
  };
202
- }, tr = (e) => {
203
- const t = e.content.match(ir)?.[1] ?? e.content.match(nr)?.[1];
202
+ }, er = (e) => {
203
+ const t = e.content.match(tr)?.[1] ?? e.content.match(ir)?.[1];
204
204
  if (t !== void 0)
205
205
  throw Error(
206
- b(
206
+ w(
207
207
  "@arcgis/lumina:failOnJsonImport",
208
208
  `Found a .json import (${t}). This can cause TypeScript errors for consumers of your package. See alternative options: https://devtopia.esri.com/WebGIS/arcgis-web-components/issues/2047
209
209
  File content:
@@ -215,19 +215,19 @@ ${e.content}
215
215
  )
216
216
  );
217
217
  return e;
218
- }, ir = /^import (?:type \* as )?[^"'\n]+["'](\.[^\n]*?\.json)["'];$/mu, nr = /(?<![.\w\d-])import\(['"]([\w@\-/\\.]+)\.json['"]\)/u;
219
- function sr(e, t) {
218
+ }, tr = /^import (?:type \* as )?[^"'\n]+["'](\.[^\n]*?\.json)["'];$/mu, ir = /(?<![.\w\d-])import\(['"]([\w@\-/\\.]+)\.json['"]\)/u;
219
+ function nr(e, t) {
220
220
  const i = X(t.name);
221
221
  return e.members.find((n) => n.name === i);
222
222
  }
223
- function rr(e, t, i) {
223
+ function sr(e, t, i) {
224
224
  const n = u.relative(t, e);
225
225
  return i.modules.find((s) => s.path === n);
226
226
  }
227
- function zi(e, t, i, n) {
227
+ function Ui(e, t, i, n) {
228
228
  const s = {
229
229
  compiler: e,
230
- apiModule: e.isInPuppeteerTestBackEnd ? void 0 : rr(i.fileName, e.dir.root, e.privateApiJson),
230
+ apiModule: e.isInPuppeteerTestBackEnd ? void 0 : sr(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 zi(e, t, i, n) {
238
238
  a = c(i, s);
239
239
  }), Object.defineProperty(i, "statements", {
240
240
  value: r
241
- }), or(i, a);
241
+ }), rr(i, a);
242
242
  }
243
- const or = (e, t) => o.factory.updateSourceFile(
243
+ const rr = (e, t) => o.factory.updateSourceFile(
244
244
  e,
245
245
  t,
246
246
  /*
@@ -254,11 +254,11 @@ const or = (e, t) => o.factory.updateSourceFile(
254
254
  e.typeReferenceDirectives,
255
255
  e.hasNoDefaultLib,
256
256
  e.libReferenceDirectives
257
- ), ar = (e) => `${zt}${" ".repeat(e.length - zt.length - qt.length)}${qt}`, zt = "/*", qt = "*/", cr = (e) => e.statements.map(ur), lr = "@arcgis/lumina", dr = "LitElement", pr = "PublicLitElement", qi = "TargetedEvent";
258
- function ur(e) {
259
- if (o.isImportDeclaration(e) && o.isStringLiteral(e.moduleSpecifier) && e.moduleSpecifier.text === lr && e.importClause?.namedBindings && o.isNamedImports(e.importClause.namedBindings)) {
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)) {
260
260
  const t = e.importClause.namedBindings.elements.findIndex(
261
- (n) => (n.propertyName ?? n.name).text === dr
261
+ (n) => (n.propertyName ?? n.name).text === lr
262
262
  );
263
263
  if (t === -1)
264
264
  return e;
@@ -275,14 +275,14 @@ function ur(e) {
275
275
  o.factory.updateImportSpecifier(
276
276
  i,
277
277
  i.isTypeOnly,
278
- o.factory.createIdentifier(pr),
278
+ o.factory.createIdentifier(dr),
279
279
  i.name
280
280
  ),
281
281
  ...e.importClause.namedBindings.elements.slice(t + 1),
282
282
  o.factory.createImportSpecifier(
283
283
  !e.importClause.isTypeOnly,
284
284
  void 0,
285
- o.factory.createIdentifier(qi)
285
+ o.factory.createIdentifier(zi)
286
286
  )
287
287
  ])
288
288
  ),
@@ -292,15 +292,15 @@ function ur(e) {
292
292
  } else
293
293
  return e;
294
294
  }
295
- const Gi = "_setterTypes";
296
- function mr(e, t, i) {
295
+ const qi = "_setterTypes";
296
+ function ur(e, t, i) {
297
297
  return o.factory.createPropertyDeclaration(
298
298
  [o.factory.createModifier(o.SyntaxKind.ReadonlyKeyword)],
299
- o.factory.createIdentifier(Gi),
299
+ o.factory.createIdentifier(qi),
300
300
  void 0,
301
301
  o.factory.createTypeLiteralNode(
302
302
  e.map((n) => {
303
- const [s, r] = fr(n.name, n.type, i._typeScriptPrinter, t);
303
+ const [s, r] = mr(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 mr(e, t, i) {
312
312
  void 0
313
313
  );
314
314
  }
315
- function fr(e, t, i, n) {
315
+ function mr(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 fr(e, t, i, n) {
322
322
  ).statements[0].members[0];
323
323
  return [d.name, d.type];
324
324
  }
325
- const gr = (e, t) => t.apiModule === void 0 ? e.statements : e.statements.map((i) => yr(i, e, t));
326
- function yr(e, t, i) {
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) {
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 yr(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 = hr(y, r, l, c, t);
336
+ const y = n.members[g], h = yr(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(Sr(g));
342
- }), l.length > 0 && d.push(mr(l, t, i.compiler));
341
+ y !== void 0 && c.has(y) && d.push(vr(g));
342
+ }), l.length > 0 && d.push(ur(l, t, i.compiler));
343
343
  const p = o.factory.updateClassDeclaration(
344
344
  n,
345
345
  n.modifiers,
@@ -370,7 +370,7 @@ function yr(e, t, i) {
370
370
  return e;
371
371
  }
372
372
  let mt;
373
- function hr(e, t, i, n, s) {
373
+ function yr(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 hr(e, t, i, n, s) {
388
388
  Xt(e.modifiers),
389
389
  e.name,
390
390
  void 0,
391
- wr(e.type, s),
391
+ Sr(e.type, s),
392
392
  e.initializer
393
393
  );
394
394
  return o.setSyntheticLeadingComments(d, V(l)), d;
@@ -467,13 +467,13 @@ function hr(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(vr) ?? [];
470
+ const s = (t?.pos !== -1 ? t?.getText(i) : void 0)?.match(hr) ?? [];
471
471
  for (const r of s)
472
472
  e.add(r);
473
473
  return t;
474
474
  }
475
- const vr = /(?<=this.)[\w$]+/gu;
476
- function Sr(e) {
475
+ const hr = /(?<=this.)[\w$]+/gu;
476
+ function vr(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,11 +528,11 @@ function ke(e) {
528
528
  )
529
529
  ];
530
530
  }
531
- function wr(e, t) {
531
+ function Sr(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;
535
- return typeof i == "object" ? o.factory.createTypeReferenceNode(qi, [
535
+ return typeof i == "object" ? o.factory.createTypeReferenceNode(zi, [
536
536
  o.factory.createThisTypeNode(),
537
537
  ...i
538
538
  ]) : (C.warn(
@@ -541,10 +541,10 @@ function wr(e, t) {
541
541
  t.fileName
542
542
  ), e);
543
543
  }
544
- const br = [cr, gr], Qt = "@arcgis/lumina:componentDtsTransformer";
545
- function Tr(e) {
544
+ const wr = [ar, fr], Qt = "@arcgis/lumina:componentDtsTransformer";
545
+ function br(e) {
546
546
  let t;
547
- const i = Er(e);
547
+ const i = Tr(e);
548
548
  return {
549
549
  name: Qt,
550
550
  supports(n) {
@@ -555,7 +555,7 @@ function Tr(e) {
555
555
  return [];
556
556
  const s = e.typeScriptProgram.getSourceFile(n);
557
557
  if (s === void 0)
558
- throw Error(b(Qt, `Could not find source file: ${ee(n)}`));
558
+ throw Error(w(Qt, `Could not find source file: ${ee(n)}`));
559
559
  const r = [];
560
560
  return e.typeScriptProgram.emit(
561
561
  s,
@@ -572,22 +572,22 @@ function Tr(e) {
572
572
  }
573
573
  };
574
574
  }
575
- const Er = (e) => (t) => (i) => zi(e, t, i, [
576
- ...br,
575
+ const Tr = (e) => (t) => (i) => Ui(e, t, i, [
576
+ ...wr,
577
577
  ...e.options.types?.declarationAstTransformers ?? []
578
- ]), Cr = (e) => new Proxy(e, {
579
- get: $r,
580
- set: Pr
578
+ ]), Er = (e) => new Proxy(e, {
579
+ get: Cr,
580
+ set: $r
581
581
  });
582
- function $r(e, t, i) {
582
+ function Cr(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 Pr(e, t) {
587
+ function $r(e, t) {
588
588
  throw new Error(`Unexpectedly tried to set the ${String(t)} property.`);
589
589
  }
590
- function xr(e) {
590
+ function Pr(e) {
591
591
  const t = e.options.types ?? {};
592
592
  let i = !1;
593
593
  const n = {
@@ -595,7 +595,7 @@ function xr(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 = us({
598
+ }, s = ps({
599
599
  ...t,
600
600
  compilerOptions: n,
601
601
  tsconfigPath: e.options.types?.tsconfigPath,
@@ -608,7 +608,7 @@ function xr(e) {
608
608
  }
609
609
  return t?.afterDiagnostic?.(r);
610
610
  },
611
- beforeWriteFile: Gs(e),
611
+ beforeWriteFile: qs(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 xr(e) {
632
632
  }
633
633
  },
634
634
  ...t?.resolvers ?? [],
635
- Tr(e)
635
+ br(e)
636
636
  ]
637
637
  });
638
638
  return {
@@ -653,7 +653,7 @@ function xr(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
- Cr({}),
656
+ Er({}),
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 xr(e) {
665
665
  }
666
666
  };
667
667
  }
668
- const kr = "Fragment", et = "DynamicHtmlTag", tt = "DynamicSvgTag", Re = Symbol("dynamic html tag name"), ft = Symbol("dynamic svg tag name"), Vi = /* @__PURE__ */ new Set([
668
+ const xr = "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
@@ -686,7 +686,7 @@ const kr = "Fragment", et = "DynamicHtmlTag", tt = "DynamicSvgTag", Re = Symbol(
686
686
  "resource",
687
687
  "typeof",
688
688
  "vocab"
689
- ]), Xi = /* @__PURE__ */ new Set([
689
+ ]), Vi = /* @__PURE__ */ new Set([
690
690
  /*
691
691
  * From https://github.com/preactjs/preact/blob/f3edc902447dae7393de7fccaff3b722dee79467/src/diff/props.js#L107-L118
692
692
  * See also https://github.com/facebook/react/blob/8fd963a1e5ec89459cac27fb1d9ad193a0604110/packages/react-dom-bindings/src/client/ReactDOMComponent.js#L389
@@ -1526,9 +1526,9 @@ const kr = "Fragment", et = "DynamicHtmlTag", tt = "DynamicSvgTag", Re = Symbol(
1526
1526
  }
1527
1527
  }
1528
1528
  };
1529
- Qi(B.common);
1530
- Object.values(B.perElement).forEach(Qi);
1531
- function Qi(e) {
1529
+ Xi(B.common);
1530
+ Object.values(B.perElement).forEach(Xi);
1531
+ function Xi(e) {
1532
1532
  e?.reflected !== void 0 && (e.reflected = Object.assign(/* @__PURE__ */ Object.create(null), e.reflected)), e?.stringifiedReflected !== void 0 && (e.stringifiedReflected = Object.assign(
1533
1533
  /* @__PURE__ */ Object.create(null),
1534
1534
  e.stringifiedReflected
@@ -1537,7 +1537,7 @@ function Qi(e) {
1537
1537
  e.stringifiedNonReflected
1538
1538
  ));
1539
1539
  }
1540
- const Zt = /* @__PURE__ */ new Set(["itemScope"]), Zi = /* @__PURE__ */ new Set([
1540
+ const Zt = /* @__PURE__ */ new Set(["itemScope"]), Qi = /* @__PURE__ */ new Set([
1541
1541
  "abort",
1542
1542
  "animationCancel",
1543
1543
  "animationEnd",
@@ -1636,7 +1636,7 @@ const Zt = /* @__PURE__ */ new Set(["itemScope"]), Zi = /* @__PURE__ */ new Set(
1636
1636
  "volumeChange",
1637
1637
  "waiting",
1638
1638
  "wheel"
1639
- ]), Ar = /* @__PURE__ */ new Set([
1639
+ ]), kr = /* @__PURE__ */ new Set([
1640
1640
  "area",
1641
1641
  "base",
1642
1642
  "br",
@@ -1712,7 +1712,7 @@ const Zt = /* @__PURE__ */ new Set(["itemScope"]), Zi = /* @__PURE__ */ new Set(
1712
1712
  "tspan",
1713
1713
  "use",
1714
1714
  "view"
1715
- ]), Ir = /* @__PURE__ */ new Set(["title", "svg", "a", "script", "style"]), $t = /* @__PURE__ */ new Set([
1715
+ ]), Ar = /* @__PURE__ */ new Set(["title", "svg", "a", "script", "style"]), $t = /* @__PURE__ */ new Set([
1716
1716
  "annotation-xml",
1717
1717
  "annotation",
1718
1718
  "maction",
@@ -1744,7 +1744,7 @@ const Zt = /* @__PURE__ */ new Set(["itemScope"]), Zi = /* @__PURE__ */ new Set(
1744
1744
  "munder",
1745
1745
  "munderover",
1746
1746
  "semantics"
1747
- ]), Lr = /* @__PURE__ */ new Set([
1747
+ ]), Ir = /* @__PURE__ */ new Set([
1748
1748
  "annotation-xml",
1749
1749
  "color-profile",
1750
1750
  "font-face",
@@ -1754,7 +1754,7 @@ const Zt = /* @__PURE__ */ new Set(["itemScope"]), Zi = /* @__PURE__ */ new Set(
1754
1754
  "font-face-name",
1755
1755
  "missing-glyph"
1756
1756
  ]);
1757
- function Fr(e) {
1757
+ function Lr(e) {
1758
1758
  if (e.length === 0)
1759
1759
  return "";
1760
1760
  const t = e[0];
@@ -1767,13 +1767,13 @@ function Fr(e) {
1767
1767
  }
1768
1768
  return e.trim().length === 0 ? t : e;
1769
1769
  }
1770
- const Nr = (e) => e.replaceAll("\\", "\\\\").replace(Dr, "\\${").replaceAll("`", "\\`"), Dr = /\$\{/gu, jr = (e) => !Rr.test(e), Rr = /^[^\s"'=<>`]+$/u, Mr = /[&<>]/gu, Or = {
1770
+ const Fr = (e) => e.replaceAll("\\", "\\\\").replace(Nr, "\\${").replaceAll("`", "\\`"), Nr = /\$\{/gu, Dr = (e) => !jr.test(e), jr = /^[^\s"'=<>`]+$/u, Rr = /[&<>]/gu, Mr = {
1771
1771
  "&": "&amp;",
1772
1772
  "<": "&lt;",
1773
1773
  ">": "&gt;"
1774
- }, Yi = (e) => e.replace(Mr, (t) => Or[t]), Pt = (e) => typeof e == "string" && e.includes("-") && !Lr.has(e), Jr = async (e) => Object.fromEntries(
1775
- (await e.componentFilesPromise).map((t) => [en(t), t])
1776
- ), en = (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) => {
1774
+ }, Zi = (e) => e.replace(Rr, (t) => Mr[t]), Pt = (e) => typeof e == "string" && e.includes("-") && !Ir.has(e), Or = async (e) => Object.fromEntries(
1775
+ (await e.componentFilesPromise).map((t) => [Yi(t), t])
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"))
1778
1778
  return C.error("@arcgis/lumina", `Unable to find the ${i} directory (cwd: ${process.cwd()})`), [];
1779
1779
  throw n;
@@ -1785,21 +1785,21 @@ const Nr = (e) => e.replaceAll("\\", "\\\\").replace(Dr, "\\${").replaceAll("`",
1785
1785
  if (he(c, t))
1786
1786
  return c;
1787
1787
  a.endsWith(".stories.tsx") && c.startsWith(t) && s.push(c);
1788
- }).filter(R);
1788
+ }).filter(j);
1789
1789
  return e.componentFiles = r, e.componentStoryFiles = s, r;
1790
1790
  });
1791
1791
  function he(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(Kr);
1794
+ const [i, n] = e.slice(0, -4).split(u.sep).slice(Jr);
1795
1795
  return i === n;
1796
1796
  }
1797
- const Kr = -2, Yt = 5, ei = 1, ti = 1, ii = 3, ni = 4, ze = o;
1798
- Wr(ze.createSourceMapGenerator);
1799
- Br(ze.createTextWriter);
1800
- _r(ze.getNewLineCharacter);
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
1801
  const me = ze;
1802
- function Wr(e) {
1802
+ function Kr(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 Wr(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 Br(e) {
1812
+ function Wr(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 Br(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 _r(e) {
1822
+ function Br(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 _r(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 Hr(e) {
1832
+ function _r(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 Hr(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 Ur(e) {
1842
+ function Hr(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"
@@ -1849,25 +1849,25 @@ function Ur(e) {
1849
1849
  `ts.Printer.writeNode() signature changed. Expected ${ni} arguments. Lumina needs to be updated to support the new TypeScript version`
1850
1850
  );
1851
1851
  }
1852
- function tn(e) {
1852
+ function en(e) {
1853
1853
  const t = me.createPrinter(e);
1854
- return Hr(t.writeFile), Ur(t.writeNode), t;
1854
+ return _r(t.writeFile), Hr(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 > zr))
1861
- return r.map(Vr);
1860
+ if (r.length > 1 && (r = r.map((a) => a.includes("=>") ? `(${a})` : a)), !(r.length > Ur))
1861
+ return r.map(Gr);
1862
1862
  }
1863
- const zr = 40, qr = (e) => e?.some(
1863
+ const Ur = 40, zr = (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, Gr = (e) => e.length === 1 && e[0].type !== "string" && e[0].type !== "number" && e[0].type !== "boolean" && e[0].type !== "any" ? void 0 : e, nn = (e) => e.map(sn).join(" | "), sn = (e) => e.type === "string" && e.value !== void 0 ? `"${e.value}"` : e.value ?? e.type;
1870
- function Vr(e) {
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) {
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 Vr(e) {
1878
1878
  type: "number"
1879
1879
  };
1880
1880
  }
1881
- const Xr = (e, t, i, n) => {
1881
+ const Vr = (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 Qr(e, t) {
1885
+ function Xr(e, t) {
1886
1886
  if (e.length === 0)
1887
1887
  return;
1888
- const i = t.matchAll(Zr), n = [];
1888
+ const i = t.matchAll(Qr), 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 Zr = /"[^"]+"|'[^"]+'|\w+/gu;
1895
+ const Qr = /"[^"]+"|'[^"]+'|\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 = nn(l), p = Gr(l), m = Qr(a, d);
1899
+ const l = s ? c.filter((f) => f.type !== "null" && f.type !== "undefined") : c, d = tn(l), p = qr(l), m = Xr(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
- Yr.writeNode(o.EmitHint.Unspecified, e, void 0, it);
1907
+ Zr.writeNode(o.EmitHint.Unspecified, e, void 0, it);
1908
1908
  const t = it.getText();
1909
1909
  return it.clear(), t;
1910
1910
  }
1911
- const Yr = tn({ removeComments: !0 }), it = me.createTextWriter(`
1912
- `), rn = o.TypeFormatFlags.NoTruncation | o.TypeFormatFlags.WriteArrayAsGenericType | o.TypeFormatFlags.SuppressAnyReturnType | o.TypeFormatFlags.MultilineObjectLiterals, eo = rn & o.TypeFormatFlags.NodeBuilderFlagsMask, to = eo | o.NodeBuilderFlags.IgnoreErrors | o.NodeBuilderFlags.NoTruncation;
1913
- function io(e, t, i, n = !0) {
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) {
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
- to & (r ? ~o.TypeFormatFlags.MultilineObjectLiterals : -1)
1919
+ eo & (r ? ~o.TypeFormatFlags.MultilineObjectLiterals : -1)
1920
1920
  );
1921
- return s.forEach(no), 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(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;
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
- } : so(m, f, i, n);
1953
+ } : no(m, f, i, n);
1954
1954
  r.push(g), a.add(f);
1955
1955
  }
1956
- return { typeNode: io(e, t, c, s), references: r };
1956
+ return { typeNode: to(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 no(e, t) {
1986
+ function io(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 so(e, t, i, n) {
1989
+ function no(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")
@@ -2004,10 +2004,10 @@ function so(e, t, i, n) {
2004
2004
  if (s.length === 0)
2005
2005
  return {
2006
2006
  name: t,
2007
- package: Oi,
2007
+ package: Mi,
2008
2008
  module: void 0
2009
2009
  };
2010
- const { packageName: r, moduleName: a } = ro(s[0].fileName, n);
2010
+ const { packageName: r, moduleName: a } = so(s[0].fileName, n);
2011
2011
  return r ? {
2012
2012
  name: t,
2013
2013
  package: r,
@@ -2019,31 +2019,31 @@ function so(e, t, i, n) {
2019
2019
  module: a
2020
2020
  };
2021
2021
  }
2022
- function ro(e, t) {
2022
+ function so(e, t) {
2023
2023
  const i = e.split("/node_modules/");
2024
2024
  if (i.length > 1) {
2025
2025
  const a = i.at(-1);
2026
- return on(a);
2026
+ return rn(a);
2027
2027
  }
2028
2028
  const s = e.split("/dist/");
2029
2029
  if (s.length > 1) {
2030
- const a = s.slice(0, -1).join("/"), l = j(a).name, d = s.at(-1);
2030
+ const a = s.slice(0, -1).join("/"), l = J(a).name, d = s.at(-1);
2031
2031
  return { packageName: l, moduleName: d };
2032
2032
  }
2033
2033
  return {
2034
2034
  packageName: void 0,
2035
- moduleName: u.relative(t.root, ao(oo(e, t)))
2035
+ moduleName: u.relative(t.root, oo(ro(e, t)))
2036
2036
  };
2037
2037
  }
2038
- function oo(e, t) {
2039
- return he(e, t.srcComponents) ? u.join(t.dist, en(e, t.src)) : e.startsWith(t.src) ? u.join(t.dist, e.slice(t.src.length)) : e;
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;
2040
2040
  }
2041
- const ao = (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
- function on(e) {
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`;
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 co = (e) => e.includes("/node_modules/") || e.includes("/dist/");
2046
+ const ao = (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,7 +2057,7 @@ 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 lo(l);
2060
+ return co(l);
2061
2061
  }
2062
2062
  }
2063
2063
  }
@@ -2081,38 +2081,37 @@ function li(e, t, i) {
2081
2081
  });
2082
2082
  });
2083
2083
  }
2084
- const lo = (e) => e.split("#")[0];
2085
- function po(e) {
2084
+ const co = (e) => e.split("#")[0];
2085
+ function lo(e) {
2086
2086
  const t = [];
2087
- for (const i of e.matchAll(uo)) {
2088
- const n = i.groups.name, s = i.groups.description.replaceAll(mo, " ").trim();
2087
+ for (const i of e.matchAll(po)) {
2088
+ const n = i.groups.name, s = i.groups.description.replaceAll(uo, " ").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 uo = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, mo = /\n\s+\*? ?/gu, fo = ["css", "less", "sass", "scss", "styl", "stylus", "pcss", "postcss", "sss"], Oe = new RegExp(`\\.(${fo.join("|")})(\\?|$)`, "u"), go = /^import ["'](?<specifier>[^"']+)["'];$/gmu, yo = () => "throwError", G = "@arcgis/lumina:loadLitCss", Z = "?layered", Fe = "?global";
2094
- let di = !1;
2095
- const ho = (e) => ({
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) => ({
2096
2094
  name: G,
2097
2095
  enforce: "pre",
2098
2096
  configResolved(t) {
2099
2097
  const i = t.plugins.find(({ name: s }) => s === "vite:css-post");
2100
2098
  if (i === void 0)
2101
- throw Error(b(G, "Unable to find the vite's built-in vite:css-post plugin"));
2099
+ throw Error(w(G, "Unable to find the vite's built-in vite:css-post plugin"));
2102
2100
  const n = i.transform;
2103
- if (typeof n != "function")
2104
- throw Error(b(G, "Expected vite:css-post to declare a transform() function"));
2101
+ if (typeof n != "object" || typeof n.handler != "function")
2102
+ throw Error(w(G, "Expected vite:css-post to declare a transform:{handler()} property"));
2103
+ if (Object.keys(n).length !== 1)
2104
+ throw Error(
2105
+ w(G, "Expected vite:css-post's transform handler to have only a single property: handler")
2106
+ );
2105
2107
  i.transform = async function(r, a) {
2106
2108
  const c = a.endsWith(Z);
2107
2109
  c && (a = a.slice(0, -Z.length));
2108
2110
  const l = a.endsWith(Fe);
2109
2111
  if (l && (a = a.slice(0, -Fe.length)), !Oe.test(a) || a.includes("?"))
2110
- return await n.call(this, r, a);
2111
- const d = `${a}?inline`, p = await n.call(this, r, d), { code: m, ...f } = typeof p == "string" ? { code: p } : p ?? {};
2112
- if (!di && (a.endsWith(".sass") || a.endsWith(".scss")) && !("sass-embedded" in (j().devDependencies ?? {})) && !("sass" in (j().devDependencies ?? {})) && (di = !0, C.warn(
2113
- G,
2114
- "Going forward, using .sass and .scss syntax requires having `sass-embedded` dependency installed. Alternatively, consider migrating from .scss to modern .css syntax. See https://qawebgis.esri.com/components/lumina/styling#introduction"
2115
- )), typeof m != "string" || !m.startsWith(an) || !m.endsWith(cn))
2112
+ return await n.handler.call(this, r, a);
2113
+ 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))
2116
2115
  return C.warn(
2117
2116
  G,
2118
2117
  `Expected vite:css-post to return a JS module with a string literal. Received: ${JSON.stringify(
@@ -2120,9 +2119,9 @@ const ho = (e) => ({
2120
2119
  )}`
2121
2120
  ), p;
2122
2121
  if (l)
2123
- return e._globalCssString = ln(m), { code: "", map: { mappings: "" } };
2122
+ return e._globalCssString = cn(m), { code: "", map: { mappings: "" } };
2124
2123
  {
2125
- const g = e.isFullApiExtraction ? po(r) : void 0;
2124
+ const g = e.isFullApiExtraction ? lo(r) : void 0;
2126
2125
  if (g !== void 0) {
2127
2126
  e._cssDocs ??= /* @__PURE__ */ new Map(), e._cssDocs.set(a, g);
2128
2127
  const y = e._cssImports.get(a);
@@ -2142,7 +2141,7 @@ const ho = (e) => ({
2142
2141
  }
2143
2142
  return {
2144
2143
  ...f,
2145
- code: bo(m, e.hmrEnabled, e.shouldMinify, c),
2144
+ code: wo(m, e.hmrEnabled, e.shouldMinify, c),
2146
2145
  /**
2147
2146
  * Vite's original transform does not generate source maps for inlined
2148
2147
  * css, thus we can't either
@@ -2156,22 +2155,22 @@ const ho = (e) => ({
2156
2155
  if (!(i.endsWith(".js") || i.endsWith(".ts") || i.endsWith(".tsx") || e.isInStorybook && i.endsWith(".mdx")))
2157
2156
  return;
2158
2157
  let s = 0;
2159
- const r = co(i);
2158
+ const r = ao(i);
2160
2159
  let a = !1;
2161
- const c = t.replaceAll(go, (l, d) => {
2160
+ const c = t.replaceAll(fo, (l, d) => {
2162
2161
  if (!Oe.test(d) || d.includes("?"))
2163
2162
  return l;
2164
2163
  if (r) {
2165
- if ((e.options.css?.sideEffectImportHandling ?? yo)(d, i) === "drop")
2166
- return a = !0, ar(l);
2164
+ if ((e.options.css?.sideEffectImportHandling ?? go)(d, i) === "drop")
2165
+ return a = !0, or(l);
2167
2166
  throw Error(
2168
- b(
2167
+ w(
2169
2168
  G,
2170
2169
  `Found a side-effect CSS import \`${l}\`. Such import is not allowed as it won't work with shadow DOM. This file appears to be external so such import may not be under your control. To ignore this import, please set the css.sideEffectImportHandling property in useLumina() plugin to a function that will return "drop" for this import to indicate that you wish to have this style import dropped. Then, you would have to import the dropped manually in your component like so: \`import { styles } from "example.css";\` and then add \`static override styles = styles;\` to your component`,
2171
2170
  i
2172
2171
  )
2173
2172
  );
2174
- } else if (e.isInStorybook && Eo(i, e)) {
2173
+ } else if (e.isInStorybook && To(i, e)) {
2175
2174
  a = !0;
2176
2175
  const p = `storybookCss$${s}`;
2177
2176
  return s += 1, [
@@ -2189,7 +2188,7 @@ const ho = (e) => ({
2189
2188
  if (d.endsWith(Fe))
2190
2189
  return l;
2191
2190
  throw Error(
2192
- b(
2191
+ w(
2193
2192
  G,
2194
2193
  `Found a side-effect CSS import \`${l}\`. Such import is not allowed as it won't work with shadow DOM. Please use \`import { styles } from "example.css";\` instead and then add \`static override styles = styles;\` to your component`,
2195
2194
  i
@@ -2202,7 +2201,7 @@ const ho = (e) => ({
2202
2201
  map: null
2203
2202
  } : void 0;
2204
2203
  }
2205
- }), an = 'export default "', cn = '"', vo = "import { css } from '@lit/reactive-element/css-tag.js';\nexport const styles = css`", So = "`;\nexport default styles;", wo = `
2204
+ }), on = 'export default "', an = '"', ho = "import { css } from '@lit/reactive-element/css-tag.js';\nexport const styles = css`", vo = "`;\nexport default styles;", So = `
2206
2205
 
2207
2206
  if(import.meta.hot) {
2208
2207
  import.meta.hot.data.styles ??= styles;
@@ -2213,26 +2212,26 @@ if(import.meta.hot) {
2213
2212
  }
2214
2213
  import.meta.hot.data.styles.styleSheet.replaceSync(nextExports.styles.cssText);
2215
2214
  });
2216
- }`, ln = (e) => e.slice(an.length, -cn.length);
2217
- function bo(e, t, i, n) {
2218
- const r = ln(e).replaceAll('\\"', '"'), a = Nr(To(r)), c = n ? `@layer{${i ? "" : `
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 ? "" : `
2219
2218
  `}${a}${i ? "" : `
2220
2219
  `}}` : a;
2221
- return `${vo}${c}${So}${t ? wo : ""}`;
2220
+ return `${ho}${c}${vo}${t ? So : ""}`;
2222
2221
  }
2223
- const To = (e) => e.replaceAll("\\r", "").replaceAll("\\n", `
2224
- `), Eo = (e, t) => e.endsWith(".mdx") || e.includes(".stories.") || e.includes(".story.") || e.startsWith(`${t.dir.root}stories/`);
2225
- function Co(e) {
2226
- return `import("${$o}").then(({ setCustomElementsManifest }) => {
2227
- setCustomElementsManifest(${Po(e)});
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)});
2228
2227
  });`;
2229
2228
  }
2230
- const $o = "@storybook/web-components", Po = (e) => `JSON.parse(\`${xo(JSON.stringify(JSON.stringify(e)).slice(1, -1))}\`)`;
2231
- function xo(e) {
2229
+ const Co = "@storybook/web-components", $o = (e) => `JSON.parse(\`${Po(JSON.stringify(JSON.stringify(e)).slice(1, -1))}\`)`;
2230
+ function Po(e) {
2232
2231
  return e.replaceAll('\\"', '"').replaceAll("`", "\\`").replaceAll("${", "\\${");
2233
2232
  }
2234
- function ko(e) {
2235
- Ao(e);
2233
+ function xo(e) {
2234
+ ko(e);
2236
2235
  const t = e.options.css?.globalStylesPath;
2237
2236
  if (t === void 0)
2238
2237
  return "";
@@ -2240,21 +2239,21 @@ function ko(e) {
2240
2239
  return e.viteCommand === "serve" || e.isInStorybook ? [
2241
2240
  `import globalStyles from "${i}${Z}";`,
2242
2241
  "document.adoptedStyleSheets = [...document.adoptedStyleSheets, globalStyles.styleSheet!];",
2243
- pn("", e)
2242
+ dn("", e)
2244
2243
  ].join(`
2245
2244
  `) : `import "${i}${Fe}";`;
2246
2245
  }
2247
- const dn = "hydrated";
2248
- function Ao(e) {
2246
+ const ln = "hydrated";
2247
+ function ko(e) {
2249
2248
  e._globalHydratedCssString = [
2250
2249
  ":not([",
2251
- e.options.css?.hydratedAttribute ?? dn,
2250
+ e.options.css?.hydratedAttribute ?? ln,
2252
2251
  "]):is(",
2253
2252
  e.apiJsonComponents.map((t) => t.tagName).join(","),
2254
2253
  "){visibility:hidden}"
2255
2254
  ].join("");
2256
2255
  }
2257
- function pn(e, t) {
2256
+ function dn(e, t) {
2258
2257
  return [
2259
2258
  "const globalCss = new CSSStyleSheet;",
2260
2259
  `globalCss.replaceSync("@layer{${`${t._globalHydratedCssString}${t.shouldMinify ? "" : "\\n\\n"}${e || ""}`}}");`,
@@ -2262,44 +2261,44 @@ function pn(e, t) {
2262
2261
  ].join(`
2263
2262
  `);
2264
2263
  }
2265
- const Io = (e) => `${e._globalHydratedCssString}${e.shouldMinify ? "" : `
2264
+ const Ao = (e) => `${e._globalHydratedCssString}${e.shouldMinify ? "" : `
2266
2265
 
2267
2266
  `}${e._globalCssString ? JSON.parse(`"${e._globalCssString}"`) : ""}`;
2268
- function Lo(e) {
2267
+ function Io(e) {
2269
2268
  const t = [], i = [];
2270
2269
  for (const n of e.privateApiJson.modules) {
2271
2270
  t.push(n.path);
2272
2271
  for (const s of n.declarations)
2273
- "customElement" in s && i.push(No(s, e, n.path));
2272
+ "customElement" in s && i.push(Fo(s, e, n.path));
2274
2273
  }
2275
2274
  return [
2276
2275
  'import { runtime } from "./runtime";',
2277
2276
  'import { makeDefineCustomElements } from "@arcgis/lumina";',
2278
- ko(e),
2279
- e.hmrEnabled ? jo : "",
2277
+ xo(e),
2278
+ e.hmrEnabled ? Do : "",
2280
2279
  "",
2281
- e.isInStorybook ? Co(e.apiJson) : "",
2280
+ e.isInStorybook ? Eo(e.apiJson) : "",
2282
2281
  "",
2283
2282
  "export const defineCustomElements = makeDefineCustomElements(runtime, {",
2284
2283
  i.join(`,
2285
2284
  `),
2286
2285
  "});",
2287
- e.hmrEnabled ? Ro(t) : ""
2286
+ e.hmrEnabled ? jo(t) : ""
2288
2287
  ].join(`
2289
2288
  `);
2290
2289
  }
2291
- const Fo = `import "./index";
2292
- export declare const defineCustomElements: import("@arcgis/lumina").DefineCustomElements;`, No = (e, t, i) => [
2290
+ const Lo = `import "./index";
2291
+ export declare const defineCustomElements: import("@arcgis/lumina").DefineCustomElements;`, Fo = (e, t, i) => [
2293
2292
  ` "${e.tagName}": [`,
2294
2293
  `()=>import("${u.join(t.dir.root, i)}"),`,
2295
- Do(e),
2294
+ No(e),
2296
2295
  "]"
2297
2296
  ].join("");
2298
- function Do(e) {
2299
- const { properties: t, asyncMethods: i, syncMethods: n } = un(e), s = t.map((p) => p.join($s)).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);
2300
- return d.length > 0 ? `"${d.join(Ps)}"` : "";
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)}"` : "";
2301
2300
  }
2302
- function un(e) {
2301
+ function pn(e) {
2303
2302
  const t = e.members.filter((r) => r.kind === "field").map((r) => {
2304
2303
  const a = typeof r.attribute == "string", c = a && r.attribute !== bt(r.name);
2305
2304
  return a && !c ? [r.name] : [r.name, c ? String(r.attribute) : ""];
@@ -2312,23 +2311,23 @@ function un(e) {
2312
2311
  ), n = i.filter((r) => r.async === !0).map((r) => r.name), s = i.filter((r) => r.async !== !0).map((r) => r.name);
2313
2312
  return { tagName: e.tagName, properties: t, asyncMethods: n, syncMethods: s };
2314
2313
  }
2315
- const jo = `import { handleHmrUpdate, handleComponentMetaUpdate } from "@arcgis/lumina/hmrSupport";
2316
- `, Ro = (e) => `
2314
+ const Do = `import { handleHmrUpdate, handleComponentMetaUpdate } from "@arcgis/lumina/hmrSupport";
2315
+ `, jo = (e) => `
2317
2316
  if(import.meta.hot) {
2318
2317
  import.meta.hot.on("component-meta-update", handleComponentMetaUpdate);
2319
2318
  import.meta.hot.accept([
2320
2319
  ${e.map((t) => ` "/${t}",`).join(`
2321
2320
  `)}
2322
2321
  ], handleHmrUpdate);
2323
- }`, Mo = "@arcgis/lumina:addMethodMetadata";
2324
- function Oo(e, t, i, n, s) {
2322
+ }`, Ro = "@arcgis/lumina:addMethodMetadata";
2323
+ function Mo(e, t, i, n, s) {
2325
2324
  const r = i.getSignatureFromDeclaration(e);
2326
2325
  if (r === void 0)
2327
2326
  return;
2328
2327
  for (const d of e.parameters) {
2329
2328
  if (!o.isIdentifier(d.name)) {
2330
2329
  C.warn(
2331
- Mo,
2330
+ Ro,
2332
2331
  `Object binding patterns are not yet supported in the docs. Found ${d.name?.getText(n)} in ${e.name.getText(n)}`,
2333
2332
  n.fileName
2334
2333
  );
@@ -2344,13 +2343,13 @@ function Oo(e, t, i, n, s) {
2344
2343
  });
2345
2344
  }
2346
2345
  t.parameters.length === 0 && (t.parameters = void 0);
2347
- const a = i.getReturnTypeOfSignature(r), c = Me(i, a, n, s), l = i.signatureToString(r, e, rn, o.SignatureKind.Call);
2346
+ const a = i.getReturnTypeOfSignature(r), c = Me(i, a, n, s), l = i.signatureToString(r, e, sn, o.SignatureKind.Call);
2348
2347
  ue(e.name, i, t), t.return = {
2349
2348
  type: c
2350
2349
  }, t.signature = l.replace(" =>", ":");
2351
2350
  }
2352
- const Jo = (e) => e.modifiers?.some?.((t) => t.kind === o.SyntaxKind.AsyncKeyword) ?? !1;
2353
- function Ko(e, t, i, n) {
2351
+ const Oo = (e) => e.modifiers?.some?.((t) => t.kind === o.SyntaxKind.AsyncKeyword) ?? !1;
2352
+ function Jo(e, t, i, n) {
2354
2353
  const s = i.typeScriptTypeChecker, a = s.getTypeAtLocation(e).getProperty("emit");
2355
2354
  if (a?.valueDeclaration === void 0)
2356
2355
  return;
@@ -2375,11 +2374,11 @@ function Ko(e, t, i, n) {
2375
2374
  composed: void 0,
2376
2375
  privacy: void 0
2377
2376
  };
2378
- return ue(e.name, s, g), Wo(e, g, n), g.privacy === void 0 ? g : void 0;
2377
+ return ue(e.name, s, g), Ko(e, g, n), g.privacy === void 0 ? g : void 0;
2379
2378
  }
2380
2379
  }
2381
2380
  const Ae = "createEvent";
2382
- function Wo(e, t, i) {
2381
+ function Ko(e, t, i) {
2383
2382
  if (!e.initializer || !o.isCallExpression(e.initializer))
2384
2383
  return;
2385
2384
  const n = e.initializer;
@@ -2389,14 +2388,14 @@ function Wo(e, t, i) {
2389
2388
  if (s !== void 0) {
2390
2389
  if (!o.isObjectLiteralExpression(s))
2391
2390
  throw Error(
2392
- b(
2391
+ w(
2393
2392
  "@arcgis/lumina:extractEventMeta",
2394
2393
  `Expected object literal expression as first argument of ${Ae}(). Found ${t.name} = createEvent(${s.getText(i)})`
2395
2394
  )
2396
2395
  );
2397
2396
  if (s.properties.some((r) => o.isSpreadAssignment(r)))
2398
2397
  throw Error(
2399
- b(
2398
+ w(
2400
2399
  "@arcgis/lumina:extractEventMeta",
2401
2400
  `Unexpected spread syntax in ${Ae}() argument. ${Ae}() arguments must be statically parsable at compile time`
2402
2401
  )
@@ -2411,14 +2410,14 @@ function se(e, t) {
2411
2410
  if (e.kind === o.SyntaxKind.FalseKeyword)
2412
2411
  return !1;
2413
2412
  throw Error(
2414
- b(
2413
+ w(
2415
2414
  "@arcgis/lumina:extractBooleanInitializer",
2416
2415
  `Expected boolean literal. Instead found ${e?.getText(t)}`
2417
2416
  )
2418
2417
  );
2419
2418
  }
2420
2419
  const kt = "@arcgis/lumina-compiler";
2421
- class Je extends ms {
2420
+ class Je extends us {
2422
2421
  constructor(t, i) {
2423
2422
  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;
2424
2423
  }
@@ -2430,12 +2429,12 @@ class Je extends ms {
2430
2429
  const i = super.extractModules(t);
2431
2430
  for (const n of i)
2432
2431
  for (const s of n.declarations)
2433
- "customElement" in s && (this.context.isFullApiExtraction && Ho(s, this.context, this.indexedComponents), this.inheritMembers(s, i), this.context.isFullApiExtraction && (s.members.sort(nt), s.attributes?.sort(nt), s.events?.sort(nt)));
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)));
2434
2433
  return i;
2435
2434
  }
2436
2435
  extractDeclarations(t) {
2437
2436
  return this.localDeclaredComponents = new Map(
2438
- Hi(t.text)?.map(([i, n]) => [n, i]) ?? []
2437
+ _i(t.text)?.map(([i, n]) => [n, i]) ?? []
2439
2438
  ), this.localDeclaredComponents.size === 0 ? [] : super.extractDeclarations(t);
2440
2439
  }
2441
2440
  extractDeclaration(t) {
@@ -2477,7 +2476,7 @@ class Je extends ms {
2477
2476
  * prefix (Arcgis), where as tag name always does. This also matches
2478
2477
  * Stencil's behavior.
2479
2478
  */
2480
- pascalCaseName: vs(n),
2479
+ pascalCaseName: hs(n),
2481
2480
  privacy: void 0,
2482
2481
  importPath: "",
2483
2482
  members: [],
@@ -2490,7 +2489,7 @@ class Je extends ms {
2490
2489
  }, r = t.heritageClauses?.find((a) => a.token === o.SyntaxKind.ExtendsKeyword)?.types[0]?.expression;
2491
2490
  if (r === void 0)
2492
2491
  throw Error(
2493
- b(
2492
+ w(
2494
2493
  "@arcgis/lumina:extractComponentDeclaration",
2495
2494
  `Lumina component must extend LitElement class. Found ${i} in ${this.apiModule.path} that does not extend any class.`
2496
2495
  )
@@ -2503,7 +2502,7 @@ class Je extends ms {
2503
2502
  }
2504
2503
  if (this.apiComponent = s, s.members = this.extractComponentMembers(t), this.context.isFullApiExtraction) {
2505
2504
  s.attributes = this.inferAttributes(s.members), this.indexedComponents.set(i, s);
2506
- const a = Js(n, this.context, this.apiModule.path);
2505
+ const a = Os(n, this.context, this.apiModule.path);
2507
2506
  if (s.importPath = `components/${a}`, this.localCssImports !== void 0) {
2508
2507
  for (const f of this.localCssImports) {
2509
2508
  const g = this.context._cssImports.get(f);
@@ -2576,7 +2575,7 @@ console.log("${s.tagName} is ready to go!");
2576
2575
  return i;
2577
2576
  }
2578
2577
  extractComponentMember(t, i) {
2579
- if (fs(t) || i === void 0) {
2578
+ if (ms(t) || i === void 0) {
2580
2579
  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");
2581
2580
  return;
2582
2581
  }
@@ -2613,13 +2612,13 @@ console.log("${s.tagName} is ready to go!");
2613
2612
  inheritedFrom: void 0,
2614
2613
  privacy: void 0
2615
2614
  };
2616
- return this.context.isFullApiExtraction && (this.extractComponentFieldDetails(t, l), (r === void 0 && (l.type.values === void 0 || !qr(l.type.values)) || l.readonly && !l.reflects) && (l.attribute = void 0)), l;
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;
2617
2616
  }
2618
2617
  /**
2619
2618
  * Based on a `non-@property()` property, extract a public event if it is one.
2620
2619
  */
2621
2620
  extractComponentEvent(t, i) {
2622
- const n = Ko(t, i, this.context, this.file);
2621
+ const n = Jo(t, i, this.context, this.file);
2623
2622
  return n !== void 0 && this.copyDoc(this.copyDocDefinitions?.events?.[i], n, this.apiComponent), n;
2624
2623
  }
2625
2624
  /**
@@ -2636,7 +2635,7 @@ console.log("${s.tagName} is ready to go!");
2636
2635
  // in the documentation. The full type is still present in the .d.ts files.
2637
2636
  i.name === "messageOverrides" ? {
2638
2637
  text: "Record<string, unknown>"
2639
- } : Xr(this.context, d, f, this.file);
2638
+ } : Vr(this.context, d, f, this.file);
2640
2639
  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);
2641
2640
  if ("initializer" in t && t.initializer !== void 0 && (!i.default || !i.description) || g) {
2642
2641
  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() ?? [];
@@ -2644,12 +2643,12 @@ console.log("${s.tagName} is ready to go!");
2644
2643
  const $ = Kt(s, S);
2645
2644
  if ($.docsTags.length > 0) {
2646
2645
  $.docsTags = $.docsTags.filter(
2647
- (E) => !c.has(E.name) || gs.has(E.name)
2646
+ (E) => !c.has(E.name) || fs.has(E.name)
2648
2647
  );
2649
- const w = i.description;
2648
+ const b = i.description;
2650
2649
  ue(t.name, s, i, $), $.docsTags.forEach((E) => {
2651
2650
  c.add(E.name);
2652
- }), i.description = w ?? i.description;
2651
+ }), i.description = b ?? i.description;
2653
2652
  } else
2654
2653
  i.description ||= $.description;
2655
2654
  }
@@ -2657,8 +2656,8 @@ console.log("${s.tagName} is ready to go!");
2657
2656
  T.forEach(($) => {
2658
2657
  if (x ??= o.isGetAccessor($) ? $ : void 0, L ??= o.isSetAccessor($) ? $ : void 0, !("initializer" in $))
2659
2658
  return;
2660
- const w = $;
2661
- l ||= w.modifiers?.some((E) => E.kind === o.SyntaxKind.ReadonlyKeyword) ?? !1, Wt(w, i, w.getSourceFile());
2659
+ const b = $;
2660
+ l ||= b.modifiers?.some((E) => E.kind === o.SyntaxKind.ReadonlyKeyword) ?? !1, Wt(b, i, b.getSourceFile());
2662
2661
  }), g && x !== void 0 && L !== void 0 && x.type?.getText() !== L.parameters[0]?.type?.getText() && (i.getterType = { text: `typeof ${h.getText(this.file)}` });
2663
2662
  }
2664
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(
@@ -2693,12 +2692,12 @@ console.log("${s.tagName} is ready to go!");
2693
2692
  inheritedFrom: void 0,
2694
2693
  docsTags: void 0,
2695
2694
  signature: "",
2696
- async: Jo(t) ? !0 : void 0,
2695
+ async: Oo(t) ? !0 : void 0,
2697
2696
  privacy: void 0
2698
2697
  };
2699
2698
  if (this.context.isFullApiExtraction) {
2700
2699
  const s = this.context.typeScriptTypeChecker;
2701
- Oo(t, n, s, this.file, this.context.dir), this.copyDoc(this.copyDocDefinitions?.methods?.[i], n, this.apiComponent);
2700
+ Mo(t, n, s, this.file, this.context.dir), this.copyDoc(this.copyDocDefinitions?.methods?.[i], n, this.apiComponent);
2702
2701
  }
2703
2702
  return n;
2704
2703
  }
@@ -2719,7 +2718,7 @@ console.log("${s.tagName} is ready to go!");
2719
2718
  description: n.description,
2720
2719
  inheritedFrom: n.inheritedFrom,
2721
2720
  type: s === void 0 || s.length === 0 ? n.type : {
2722
- text: nn(s),
2721
+ text: tn(s),
2723
2722
  references: void 0,
2724
2723
  values: s
2725
2724
  },
@@ -2793,19 +2792,19 @@ const le = {
2793
2792
  name: "LitElement",
2794
2793
  package: "@arcgis/lumina"
2795
2794
  }, nt = (e, t) => e.name.localeCompare(t.name);
2796
- async function Bo(e, t) {
2795
+ async function Wo(e, t) {
2797
2796
  t || (e.componentFilesPromise = xt(e, e.dir.srcComponents));
2798
- const i = await e.componentFilesPromise, n = await Zo(e, i);
2797
+ const i = await e.componentFilesPromise, n = await Qo(e, i);
2799
2798
  await e.componentStoriesPromise, e._componentPathMapping = {}, e._localDefinedComponents = void 0;
2800
- const s = mn(n, e, !1);
2799
+ const s = un(n, e, !1);
2801
2800
  e.privateApiJson = s;
2802
- const [r, a] = fn(s);
2801
+ const [r, a] = mn(s);
2803
2802
  return e.apiJsonComponents = a, e.apiJson = r, s;
2804
2803
  }
2805
- function _o(e, t, i) {
2806
- const n = e.getSourceFile(t, i), s = mn([n], e, !0), r = s.modules[0];
2804
+ function Bo(e, t, i) {
2805
+ const n = e.getSourceFile(t, i), s = un([n], e, !0), r = s.modules[0];
2807
2806
  {
2808
- const f = fn(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);
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);
2809
2808
  h.splice(g, 1, f), e.apiJson = { ...e.apiJson, modules: h }, e.apiJsonComponents = e.apiJsonComponents.filter(
2810
2809
  (v) => !y.declarations.includes(v)
2811
2810
  );
@@ -2827,11 +2826,11 @@ function _o(e, t, i) {
2827
2826
  }
2828
2827
  return d ||= m.length !== p.length, d ? void 0 : m;
2829
2828
  }
2830
- function mn(e, t, i) {
2829
+ function un(e, t, i) {
2831
2830
  const n = t.options.apiJson?.Extractor ?? Je, r = new n(t, i).extract(e);
2832
2831
  return t.options.apiJson?.afterCreate?.(r, i), r;
2833
2832
  }
2834
- function fn(e) {
2833
+ function mn(e) {
2835
2834
  const t = { ...e, modules: [] }, i = [];
2836
2835
  for (const n of e.modules) {
2837
2836
  const s = { ...n, declarations: [] };
@@ -2847,58 +2846,58 @@ function fn(e) {
2847
2846
  }
2848
2847
  return [t, i];
2849
2848
  }
2850
- function Ho(e, t, i) {
2851
- const n = Uo(i, e);
2852
- O(e, n, t);
2849
+ function _o(e, t, i) {
2850
+ const n = Ho(i, e);
2851
+ M(e, n, t);
2853
2852
  for (const s of e.members) {
2854
2853
  if (s.kind === "field")
2855
2854
  Ie(s.type, i, t);
2856
2855
  else {
2857
2856
  if (Ie(s.return?.type, i, t), s.parameters !== void 0)
2858
2857
  for (const r of s.parameters)
2859
- Ie(r.type, i, t), O(r, n, t);
2860
- s.return !== void 0 && O(s.return, n, t);
2858
+ Ie(r.type, i, t), M(r, n, t);
2859
+ s.return !== void 0 && M(s.return, n, t);
2861
2860
  }
2862
- O(s, n, t);
2861
+ M(s, n, t);
2863
2862
  }
2864
2863
  if (e.events !== void 0)
2865
2864
  for (const s of e.events)
2866
- Ie(s.type, i, t), O(s, n, t);
2865
+ Ie(s.type, i, t), M(s, n, t);
2867
2866
  if (e.attributes !== void 0)
2868
2867
  for (const s of e.attributes)
2869
- O(s, n, t);
2868
+ M(s, n, t);
2870
2869
  if (e.slots !== void 0)
2871
2870
  for (const s of e.slots)
2872
- O(s, n, t);
2871
+ M(s, n, t);
2873
2872
  if (e.cssProperties !== void 0)
2874
2873
  for (const s of e.cssProperties)
2875
- O(s, n, t);
2874
+ M(s, n, t);
2876
2875
  if (e.cssParts !== void 0)
2877
2876
  for (const s of e.cssParts)
2878
- O(s, n, t);
2877
+ M(s, n, t);
2879
2878
  if (e.cssStates !== void 0)
2880
2879
  for (const s of e.cssStates)
2881
- O(s, n, t);
2880
+ M(s, n, t);
2882
2881
  if (e.demos !== void 0)
2883
2882
  for (const s of e.demos)
2884
- O(s, n, t);
2883
+ M(s, n, t);
2885
2884
  }
2886
2885
  function Ie(e, t, i) {
2887
2886
  e !== void 0 && (e.references?.reduce(
2888
- (n, s) => zo(s, t, i, n),
2887
+ (n, s) => Uo(s, t, i, n),
2889
2888
  0
2890
2889
  ), e.text = e.text.replaceAll(
2891
- Qo,
2890
+ Xo,
2892
2891
  (n, s) => At(t.get(s)) ?? n
2893
- ), e.values?.forEach(qo, t));
2892
+ ), e.values?.forEach(zo, t));
2894
2893
  }
2895
- function O(e, t, i) {
2894
+ function M(e, t, i) {
2896
2895
  if (e.description && (e.description = e.description.replaceAll(st, t).replaceAll(i.alternativeDocumentationUrl, i.normalizedDocumentationUrl)), e.docsTags)
2897
2896
  for (const n of e.docsTags)
2898
2897
  n.text && (n.text = n.text.replaceAll(st, t).replaceAll(i.alternativeDocumentationUrl, i.normalizedDocumentationUrl));
2899
2898
  typeof e.deprecated == "string" && (e.deprecated = e.deprecated.replaceAll(st, t).replaceAll(i.alternativeDocumentationUrl, i.normalizedDocumentationUrl));
2900
2899
  }
2901
- const st = /\{@link ([^}]+)\}/gu, Uo = (e, t) => (i, n) => {
2900
+ const st = /\{@link ([^}]+)\}/gu, Ho = (e, t) => (i, n) => {
2902
2901
  let s = n.indexOf(" ");
2903
2902
  s === -1 && (s = n.length);
2904
2903
  const r = n.slice(0, s), a = n.slice(s + 1);
@@ -2922,7 +2921,7 @@ const st = /\{@link ([^}]+)\}/gu, Uo = (e, t) => (i, n) => {
2922
2921
  );
2923
2922
  return `[${a || (d === t ? l : `${d.tagName}.${l}`)}](${p}#${l})`;
2924
2923
  };
2925
- function zo(e, t, i, n) {
2924
+ function Uo(e, t, i, n) {
2926
2925
  if (e.viewUrl !== void 0 && (e.viewUrl = e.viewUrl.replace(
2927
2926
  i.alternativeDocumentationUrl,
2928
2927
  i.normalizedDocumentationUrl
@@ -2935,58 +2934,58 @@ function zo(e, t, i, n) {
2935
2934
  if (s !== void 0) {
2936
2935
  const r = e.name.length;
2937
2936
  e.name = At(s);
2938
- const a = e.name.length - r - pi;
2939
- e.viewUrl = s.demos?.at(0)?.url.replace(i.alternativeDocumentationUrl, i.normalizedDocumentationUrl), e.start = e.start - pi, e.end = e.end + a, n += a - Xo;
2937
+ 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;
2940
2939
  }
2941
2940
  }
2942
2941
  return n;
2943
2942
  }
2944
- function qo(e) {
2943
+ function zo(e) {
2945
2944
  e.type.startsWith("ToElement<") && (e.type = At(this.get(e.type.slice(10, -1))) ?? e.type);
2946
2945
  }
2947
- const At = (e) => e ? `HTML${e.pascalCaseName}Element` : void 0, Go = "ToElement<", pi = Go.length, Vo = ">", Xo = Vo.length, Qo = /ToElement<(\w+)>/gu;
2948
- async function Zo(e, t) {
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) {
2949
2948
  if (e.viteCommand === "serve" && (Object.hasOwn(e, "typeScriptHost") || (e.typeScriptHost = o.createCompilerHost(e.typeScriptConfig, !1))), e.typeScriptProgram !== void 0) {
2950
2949
  const i = e.typeScriptProgram.getSourceFiles(), n = new Set(t);
2951
2950
  return i.filter((s) => n.has(s.fileName));
2952
2951
  } else
2953
2952
  return await Promise.all(
2954
2953
  t.map(async (i) => {
2955
- const n = await J(i, "utf8");
2954
+ const n = await O(i, "utf8");
2956
2955
  return e.getSourceFile(i, n);
2957
2956
  })
2958
2957
  );
2959
2958
  }
2960
- async function gn(e) {
2961
- return ve ??= ea(e), await ve;
2959
+ async function fn(e) {
2960
+ return ve ??= Yo(e), await ve;
2962
2961
  }
2963
- function Yo() {
2962
+ function Zo() {
2964
2963
  if (yt === void 0)
2965
2964
  throw Error(
2966
- b(
2965
+ w(
2967
2966
  "@arcgis/lumina:retrieveComponentDependencies",
2968
2967
  "Component dependencies have not yet been initialized. Await componentDependenciesPromise promise first."
2969
2968
  )
2970
2969
  );
2971
2970
  return yt;
2972
2971
  }
2973
- function yn() {
2972
+ function gn() {
2974
2973
  if (ht === void 0)
2975
2974
  throw Error(
2976
- b(
2975
+ w(
2977
2976
  "@arcgis/lumina:retrieveFlatComponentDependencies",
2978
2977
  "Component dependencies have not yet been initialized. Await componentDependenciesPromise promise first."
2979
2978
  )
2980
2979
  );
2981
2980
  return ht;
2982
2981
  }
2983
- async function ea(e) {
2984
- const t = j(e), i = t.dependencies ?? {}, n = t.peerDependencies ?? {}, r = (await Promise.all(
2985
- [...Object.keys(i), ...Object.keys(n)].filter((a) => !ta.has(a)).flatMap(async (a) => await hn(a, e))
2986
- )).filter(R);
2982
+ async function Yo(e) {
2983
+ 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))
2985
+ )).filter(j);
2987
2986
  return yt ??= r, ht = Object.fromEntries(r.flatMap((a) => Object.entries(a.components))), r;
2988
2987
  }
2989
- const ta = /* @__PURE__ */ new Set([
2988
+ const ea = /* @__PURE__ */ new Set([
2990
2989
  "@arcgis/arcade-languageservice",
2991
2990
  "@arcgis/components-build-utils",
2992
2991
  "@arcgis/components-utils",
@@ -3023,29 +3022,29 @@ const ta = /* @__PURE__ */ new Set([
3023
3022
  "vscode-languageserver-types"
3024
3023
  ]);
3025
3024
  let yt, ht, ve;
3026
- async function hn(e, t) {
3027
- const i = await _e(e, t), n = await He(i), s = "exports" in n, r = aa.bind(void 0, s), a = "@stencil/core" in (n.dependencies ?? {}) || "@stencil/core" in (n.devDependencies ?? {}), c = u.join(i, "dist/esm/loader.js");
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");
3028
3027
  if (a ? await U(c) : !1) {
3029
- const g = await J(c, "utf8"), y = ia(g, "bootstrapLazy("), h = g.indexOf(", options", y), v = g.slice(y, h), S = v.startsWith('JSON.parse("') ? v.slice(12, -2).replaceAll('\\"', '"') : v;
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;
3030
3029
  try {
3031
- const T = JSON.parse(S), x = ra(T, { packageName: e, getImportPath: r });
3030
+ const T = JSON.parse(S), x = sa(T, { packageName: e, getImportPath: r });
3032
3031
  return { packageName: e, type: "stencil", components: x };
3033
3032
  } catch (T) {
3034
3033
  C.warn("@arcgis/lumina", `Failed to parse dist/esm/loader.js for ${e}.
3035
3034
  Error: ${String(T)}`);
3036
3035
  }
3037
3036
  }
3038
- const d = ui(n.customElements);
3037
+ const d = pi(n.customElements);
3039
3038
  if (d != null) {
3040
- const g = u.join(i, d), y = JSON.parse(await J(g, "utf-8")), h = na(y), v = vn(y, {
3039
+ const g = u.join(i, d), y = JSON.parse(await O(g, "utf-8")), h = ia(y), v = hn(y, {
3041
3040
  packageName: e,
3042
3041
  getImportPath: r
3043
3042
  });
3044
3043
  return { type: h ? "@arcgis/lumina" : "unknown", packageName: e, components: v };
3045
3044
  }
3046
- const p = ui(n["web-types"]);
3045
+ const p = pi(n["web-types"]);
3047
3046
  if (p != null) {
3048
- const g = u.join(i, p), y = JSON.parse(await J(g, "utf-8")), h = sa(y, {
3047
+ const g = u.join(i, p), y = JSON.parse(await O(g, "utf-8")), h = na(y, {
3049
3048
  packageName: e,
3050
3049
  getImportPath: r,
3051
3050
  packageRoot: i
@@ -3054,19 +3053,19 @@ Error: ${String(T)}`);
3054
3053
  }
3055
3054
  const m = u.join(i, "dist/components");
3056
3055
  if (await U(m)) {
3057
- const g = await oa(m, {
3056
+ const g = await ra(m, {
3058
3057
  packageName: e,
3059
3058
  getImportPath: r
3060
3059
  });
3061
3060
  return { type: "unknown", packageName: e, components: g };
3062
3061
  }
3063
3062
  }
3064
- const ui = (e) => Array.isArray(e) ? e[0] : e;
3065
- function ia(e, t) {
3063
+ const pi = (e) => Array.isArray(e) ? e[0] : e;
3064
+ function ta(e, t) {
3066
3065
  const i = e.indexOf(t);
3067
3066
  return i === -1 ? -1 : i + t.length;
3068
3067
  }
3069
- function vn(e, t) {
3068
+ function hn(e, t) {
3070
3069
  const i = {};
3071
3070
  for (const n of e.modules ?? [])
3072
3071
  if (n.declarations !== void 0)
@@ -3084,7 +3083,7 @@ function vn(e, t) {
3084
3083
  }
3085
3084
  return i;
3086
3085
  }
3087
- const na = (e) => e.compiler?.name === kt, sa = (e, t) => Object.fromEntries(
3086
+ const ia = (e) => e.compiler?.name === kt, na = (e, t) => Object.fromEntries(
3088
3087
  (e.contributions?.html?.elements ?? e.contributions?.html?.tags)?.map(
3089
3088
  (i) => [
3090
3089
  i.name,
@@ -3095,7 +3094,7 @@ const na = (e) => e.compiler?.name === kt, sa = (e, t) => Object.fromEntries(
3095
3094
  }
3096
3095
  ]
3097
3096
  ) ?? []
3098
- ), ra = (e, t) => Object.fromEntries(
3097
+ ), sa = (e, t) => Object.fromEntries(
3099
3098
  e.flatMap(
3100
3099
  ([i, n]) => n.map(
3101
3100
  ([s, r, a]) => [
@@ -3113,7 +3112,7 @@ const na = (e) => e.compiler?.name === kt, sa = (e, t) => Object.fromEntries(
3113
3112
  ]
3114
3113
  )
3115
3114
  )
3116
- ), oa = async (e, t) => Object.fromEntries(
3115
+ ), ra = async (e, t) => Object.fromEntries(
3117
3116
  (await Ue(e)).filter((i) => i.endsWith(".d.ts")).map((i) => {
3118
3117
  const n = i.slice(0, -5);
3119
3118
  return [
@@ -3125,16 +3124,16 @@ const na = (e) => e.compiler?.name === kt, sa = (e, t) => Object.fromEntries(
3125
3124
  }
3126
3125
  ];
3127
3126
  })
3128
- ), aa = (e, t) => e ? `components/${t}` : `dist/components/${t}.js`, ca = (e) => e.startsWith("/") ? e : `/${e}`, It = (e, t) => `${e}@fs${ca(t)}`;
3129
- function qe(e = j(), t = !1, i = e.name === "@esri/calcite-components") {
3127
+ ), oa = (e, t) => e ? `components/${t}` : `dist/components/${t}.js`, aa = (e) => e.startsWith("/") ? e : `/${e}`, It = (e, t) => `${e}@fs${aa(t)}`;
3128
+ function qe(e = J(), t = !1, i = e.name === "@esri/calcite-components") {
3130
3129
  const n = e.version.includes("next"), s = e.name === "@esri/calcite-components";
3131
3130
  if (s && n)
3132
3131
  return `https://cdn.jsdelivr.net/npm/@esri/calcite-components@${e.version}/dist/calcite/`;
3133
- const r = t || n ? "jsdev.arcgis.com" : "js.arcgis.com", a = la(e.name), c = da(e.version, i);
3132
+ const r = t || n ? "jsdev.arcgis.com" : "js.arcgis.com", a = ca(e.name), c = la(e.version, i);
3134
3133
  return a.length === 0 ? `https://${r}/${c}/` : s ? `https://${r}/${a}/${c}/` : `https://${r}/${c}/${a}/`;
3135
3134
  }
3136
- const la = (e) => e.split("/").pop() ?? e;
3137
- function da(e, t) {
3135
+ const ca = (e) => e.split("/").pop() ?? e;
3136
+ function la(e, t) {
3138
3137
  if (/\d+\.\d+\.\d+-(?:.*)$/u.test(e))
3139
3138
  return "next";
3140
3139
  const n = /^(?<major>\d+)\.(?<minor>\d+)\.(?<patch>\d+)/u, s = e.match(n);
@@ -3144,8 +3143,8 @@ function da(e, t) {
3144
3143
  }
3145
3144
  return "next";
3146
3145
  }
3147
- const pa = ["keyed", "ref", "repeat", "live"], ae = "staticHtml", Y = "staticSvg", ce = "html", re = "svg", Sn = Symbol("maybe HTML namespace or maybe SVG"), wn = "css", bn = "mathml", Tn = [wn, ce, bn, ae, Y, re], ua = new Set(Tn), ma = ["safeClassMap", "safeStyleMap", "deferLoad"], fa = "nothing", ga = [...pa, ...Tn, ...ma, fa], Ke = (e) => o.isJsxElement(e) || o.isJsxSelfClosingElement(e) || o.isJsxFragment(e);
3148
- function mi(e, t, i) {
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
+ function ui(e, t, i) {
3149
3148
  if (ie(e))
3150
3149
  return e;
3151
3150
  {
@@ -3164,14 +3163,14 @@ function ie(e) {
3164
3163
  return (
3165
3164
  // Inlined string literal
3166
3165
  typeof e == "string" || // Syntax kinds that are never undefined
3167
- ya.has(e.kind) || // Ternary with both branches never undefined
3166
+ ga.has(e.kind) || // Ternary with both branches never undefined
3168
3167
  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
3169
- o.isBinaryExpression(e) && (ha.has(e.operatorToken.kind) || ie(e.left) && ie(e.right)) || // `as`, `satisfies`, `()` with definitely not undefined expression
3168
+ o.isBinaryExpression(e) && (ya.has(e.operatorToken.kind) || ie(e.left) && ie(e.right)) || // `as`, `satisfies`, `()` with definitely not undefined expression
3170
3169
  (o.isParenthesizedExpression(e) || o.isSatisfiesExpression(e) || o.isAsExpression(e)) && ie(e.expression) || // JSX that got converted to html`<p>Something</p>`
3171
- o.isTaggedTemplateExpression(e) && o.isIdentifier(e.tag) && ua.has(e.tag.text)
3170
+ o.isTaggedTemplateExpression(e) && o.isIdentifier(e.tag) && pa.has(e.tag.text)
3172
3171
  );
3173
3172
  }
3174
- const ya = /* @__PURE__ */ new Set([
3173
+ const ga = /* @__PURE__ */ new Set([
3175
3174
  o.SyntaxKind.NumericLiteral,
3176
3175
  o.SyntaxKind.BigIntLiteral,
3177
3176
  o.SyntaxKind.StringLiteral,
@@ -3190,7 +3189,7 @@ const ya = /* @__PURE__ */ new Set([
3190
3189
  o.SyntaxKind.ClassExpression,
3191
3190
  // Trust? Trust.
3192
3191
  o.SyntaxKind.NonNullExpression
3193
- ]), ha = /* @__PURE__ */ new Set([
3192
+ ]), ya = /* @__PURE__ */ new Set([
3194
3193
  o.SyntaxKind.PlusEqualsToken,
3195
3194
  o.SyntaxKind.MinusEqualsToken,
3196
3195
  o.SyntaxKind.AsteriskAsteriskEqualsToken,
@@ -3225,9 +3224,9 @@ const ya = /* @__PURE__ */ new Set([
3225
3224
  o.SyntaxKind.SlashToken,
3226
3225
  o.SyntaxKind.PercentToken,
3227
3226
  o.SyntaxKind.AsteriskAsteriskToken
3228
- ]), va = {
3227
+ ]), ha = {
3229
3228
  property(e, t, i, n) {
3230
- const s = Sa(n, i, e), r = s?.type === "stringifiedReflected", a = s?.type === "reflected" || r;
3229
+ const s = va(n, i, e), r = s?.type === "stringifiedReflected", a = s?.type === "reflected" || r;
3231
3230
  if (a) {
3232
3231
  const f = ot(t);
3233
3232
  if (f === !0)
@@ -3240,11 +3239,11 @@ const ya = /* @__PURE__ */ new Set([
3240
3239
  return [s.name, ...c];
3241
3240
  const [d, p] = c, m = s?.type === "stringifiedNonReflected";
3242
3241
  if (r || m) {
3243
- const f = mi(
3242
+ const f = ui(
3244
3243
  p,
3245
3244
  e,
3246
3245
  m ? "" : void 0
3247
- ), y = i === "value" && (n === "input" || n === "textarea" || n === Re) ? ba(f, e) : f;
3246
+ ), y = i === "value" && (n === "input" || n === "textarea" || n === Re) ? wa(f, e) : f;
3248
3247
  if (y !== p)
3249
3248
  return [m ? `.${i}` : s.name, d, y];
3250
3249
  }
@@ -3256,7 +3255,7 @@ const ya = /* @__PURE__ */ new Set([
3256
3255
  return [i];
3257
3256
  if (n === !1)
3258
3257
  return [];
3259
- const s = Ne(e, t, !0), a = s[0] !== "=" ? s : [s[0], mi(s[1], e)];
3258
+ const s = Ne(e, t, !0), a = s[0] !== "=" ? s : [s[0], ui(s[1], e)];
3260
3259
  return [i, ...a];
3261
3260
  },
3262
3261
  booleanAttribute(e, t, i) {
@@ -3269,7 +3268,7 @@ const ya = /* @__PURE__ */ new Set([
3269
3268
  `Event prop value must be an expression. Found ${String(t?.getText(e.sourceFile))}`
3270
3269
  );
3271
3270
  const n = i.slice(2), s = ut(n);
3272
- return [`@${Zi.has(s) ? n.toLowerCase() : ut(n)}=`, ...Nt(e, t, void 0)];
3271
+ return [`@${Qi.has(s) ? n.toLowerCase() : ut(n)}=`, ...Nt(e, t, void 0)];
3273
3272
  },
3274
3273
  directives(e, t) {
3275
3274
  if (t === void 0 || !o.isJsxExpression(t))
@@ -3301,8 +3300,8 @@ const ya = /* @__PURE__ */ new Set([
3301
3300
  ])
3302
3301
  ];
3303
3302
  },
3304
- class: gi,
3305
- style: gi,
3303
+ class: fi,
3304
+ style: fi,
3306
3305
  key: (e, t) => [Lt(t, e.sourceFile)],
3307
3306
  deferLoad(e, t, i, n) {
3308
3307
  if (typeof n != "string")
@@ -3314,7 +3313,7 @@ const ya = /* @__PURE__ */ new Set([
3314
3313
  return [o.factory.createIdentifier(s)];
3315
3314
  }
3316
3315
  };
3317
- function Sa(e, t, i) {
3316
+ function va(e, t, i) {
3318
3317
  if (typeof e == "string") {
3319
3318
  const r = (i.externalComponents[e] ?? i.localComponents[e])?.propToAttribute?.[t];
3320
3319
  if (r !== void 0)
@@ -3369,10 +3368,10 @@ function Ne(e, t, i = !1) {
3369
3368
  `Invalid JSX syntax detected or there is a bug in Lumina. Found ${t.getText(e.sourceFile)}. Expected JSX attribute value to be wrapped in { }`
3370
3369
  );
3371
3370
  if (o.isStringLiteral(t))
3372
- return fi(t, i);
3371
+ return mi(t, i);
3373
3372
  if (o.isJsxExpression(t) && t.expression) {
3374
3373
  if (o.isStringLiteral(t.expression))
3375
- return fi(t.expression, i);
3374
+ return mi(t.expression, i);
3376
3375
  if (i) {
3377
3376
  if (o.isNumericLiteral(t.expression))
3378
3377
  return [`=${t.expression.text}`];
@@ -3382,14 +3381,14 @@ function Ne(e, t, i = !1) {
3382
3381
  }
3383
3382
  return ["=", ...Nt(e, t, void 0)];
3384
3383
  }
3385
- function fi(e, t) {
3384
+ function mi(e, t) {
3386
3385
  if (!t)
3387
3386
  return ["=", e];
3388
3387
  const i = e.text;
3389
3388
  if (i.length === 0)
3390
3389
  return [];
3391
- const n = Yi(i);
3392
- if (jr(n)) {
3390
+ const n = Zi(i);
3391
+ if (Dr(n)) {
3393
3392
  const s = n.replaceAll('"', "&#34;");
3394
3393
  if (s.length > n.length) {
3395
3394
  const r = n.replaceAll("'", "&#39;");
@@ -3400,7 +3399,7 @@ function fi(e, t) {
3400
3399
  } else
3401
3400
  return [`=${n}`];
3402
3401
  }
3403
- function gi(e, t, i) {
3402
+ function fi(e, t, i) {
3404
3403
  if (t !== void 0 && o.isStringLiteral(t))
3405
3404
  return [`${i}="${t.text}"`];
3406
3405
  if (t === void 0 || !o.isJsxExpression(t) || t.expression === void 0)
@@ -3408,7 +3407,7 @@ function gi(e, t, i) {
3408
3407
  `${i} prop value must be an expression. Found ${String(t?.getText(e.sourceFile))}`
3409
3408
  );
3410
3409
  const n = t.expression;
3411
- if (wa(n)) {
3410
+ if (Sa(n)) {
3412
3411
  const r = i === "class" ? "safeClassMap" : "safeStyleMap";
3413
3412
  e.neededImports.add(r);
3414
3413
  const a = e.importRenames[r], c = o.factory.createCallExpression(o.factory.createIdentifier(a), void 0, [
@@ -3418,18 +3417,18 @@ function gi(e, t, i) {
3418
3417
  } else
3419
3418
  return [i, ...Ne(e, t, !0)];
3420
3419
  }
3421
- const wa = (e) => o.isObjectLiteralExpression(e) || o.isPropertyAccessExpression(e) || o.isIdentifier(e) || o.isCallExpression(e) || o.isBinaryExpression(e) || o.isConditionalExpression(e);
3422
- function ba(e, t) {
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) {
3423
3422
  t.neededImports.add("live");
3424
3423
  const i = t.importRenames.live;
3425
3424
  return o.factory.createCallExpression(o.factory.createIdentifier(i), void 0, [
3426
3425
  typeof e == "string" ? o.factory.createStringLiteral(e) : e
3427
3426
  ]);
3428
3427
  }
3429
- function Ta(e) {
3430
- if (e && o.isJsxExpression(e) && e.expression && o.isCallExpression(e.expression) && o.isIdentifier(e.expression.expression) && e.expression.expression.text in yi && e.expression.arguments.length <= 1)
3428
+ function ba(e) {
3429
+ 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)
3431
3430
  return {
3432
- propType: yi[e.expression.expression.text],
3431
+ propType: gi[e.expression.expression.text],
3433
3432
  // To simplify checking logic in convertProps, wrap expression in JSX expression
3434
3433
  initializer: o.factory.createJsxExpression(
3435
3434
  void 0,
@@ -3438,21 +3437,21 @@ function Ta(e) {
3438
3437
  )
3439
3438
  };
3440
3439
  }
3441
- const yi = {
3440
+ const gi = {
3442
3441
  bindProperty: "property",
3443
3442
  bindAttribute: "attribute",
3444
3443
  bindBooleanAttribute: "booleanAttribute",
3445
3444
  bindEvent: "event"
3446
3445
  };
3447
- function Ea(e, t, i) {
3448
- return $a.has(e) ? e : e.startsWith("on") && t !== void 0 && o.isJsxExpression(t) && t.expression !== void 0 ? "event" : (Vi.has(e) || e.includes("-")) && (e !== "itemId" || i !== "arcgis-map" && i !== "arcgis-scene") ? "attribute" : !Pt(i) && (Xi.has(e) || (i === ft ? !1 : i === Re ? (
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 ? (
3449
3448
  // When tag name is dynamic, we can't help but check if the prop name matches an "always attribute" in any html element
3450
3449
  Object.values(gt).some((r) => r.has(e))
3451
3450
  ) : 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";
3452
3451
  }
3453
- const Ca = ["class", "style", "ref", "directives", "key", "deferLoad"], $a = new Set(Ca), Pa = (e) => typeof e != "string" || e.trim().length > 0;
3452
+ const Ea = ["class", "style", "ref", "directives", "key", "deferLoad"], Ca = new Set(Ea), $a = (e) => typeof e != "string" || e.trim().length > 0;
3454
3453
  function Ge({ key: e, parts: t, litTag: i }, n) {
3455
- const s = xa(t);
3454
+ const s = Pa(t);
3456
3455
  if (s.length % 2 === 0)
3457
3456
  throw new Error("Normalized template parts array length must be odd");
3458
3457
  const [r, ...a] = s;
@@ -3473,11 +3472,11 @@ function Ge({ key: e, parts: t, litTag: i }, n) {
3473
3472
  const l = n.importRenames[c], d = o.factory.createTaggedTemplateExpression(
3474
3473
  o.factory.createIdentifier(l),
3475
3474
  void 0,
3476
- a.length === 0 ? o.factory.createNoSubstitutionTemplateLiteral(r) : o.factory.createTemplateExpression(o.factory.createTemplateHead(r), ka(a))
3475
+ a.length === 0 ? o.factory.createNoSubstitutionTemplateLiteral(r) : o.factory.createTemplateExpression(o.factory.createTemplateHead(r), xa(a))
3477
3476
  );
3478
3477
  return at(n, e, d);
3479
3478
  }
3480
- const xa = (e) => e.reduce(
3479
+ const Pa = (e) => e.reduce(
3481
3480
  (t, i, n) => {
3482
3481
  const s = t.at(-1), r = typeof s == "string", a = typeof i == "string";
3483
3482
  if (r && a)
@@ -3487,7 +3486,7 @@ const xa = (e) => e.reduce(
3487
3486
  },
3488
3487
  [""]
3489
3488
  );
3490
- function ka(e) {
3489
+ function xa(e) {
3491
3490
  if (!(e.length % 2 === 0))
3492
3491
  throw new Error("templatePartsToSpans should be called with normalized parts array without the first item");
3493
3492
  const i = e.length / 2;
@@ -3512,8 +3511,8 @@ function at(e, t, i) {
3512
3511
  const n = e.importRenames.keyed;
3513
3512
  return o.factory.createCallExpression(o.factory.createIdentifier(n), void 0, [t, i]);
3514
3513
  }
3515
- const En = (e, t) => e.getFullText(t.sourceFile).slice(0, e.getLeadingTriviaWidth(t.sourceFile));
3516
- function Cn(e, t) {
3514
+ const Tn = (e, t) => e.getFullText(t.sourceFile).slice(0, e.getLeadingTriviaWidth(t.sourceFile));
3515
+ function En(e, t) {
3517
3516
  const i = Ft(e);
3518
3517
  return i.length === 0 ? t : o.setSyntheticLeadingComments(
3519
3518
  t,
@@ -3521,18 +3520,18 @@ function Cn(e, t) {
3521
3520
  ...n,
3522
3521
  pos: -1,
3523
3522
  end: -1,
3524
- text: $n(e.slice(n.pos, n.end))
3523
+ text: Cn(e.slice(n.pos, n.end))
3525
3524
  }))
3526
3525
  );
3527
3526
  }
3528
3527
  const Ft = (e) => e.trim().length === 0 ? [] : o.getLeadingCommentRanges(e, 0) ?? [];
3529
- function Aa(e) {
3528
+ function ka(e) {
3530
3529
  const t = Ft(e);
3531
3530
  if (t.length === 0)
3532
3531
  return [e || " "];
3533
3532
  const i = t.reduceRight(
3534
3533
  ([s, ...r], a) => {
3535
- const c = Ia(s), l = $n(c.slice(a.pos, a.end));
3534
+ const c = Aa(s), l = Cn(c.slice(a.pos, a.end));
3536
3535
  return [
3537
3536
  c.slice(0, a.pos),
3538
3537
  /**
@@ -3550,13 +3549,13 @@ function Aa(e) {
3550
3549
  const n = i.at(-1);
3551
3550
  return (typeof n != "string" || n.trim() !== "") && i.push(" "), i;
3552
3551
  }
3553
- const $n = (e) => e.startsWith("//") ? e.slice(2) : e.slice(2, -2);
3554
- function Ia(e) {
3552
+ const Cn = (e) => e.startsWith("//") ? e.slice(2) : e.slice(2, -2);
3553
+ function Aa(e) {
3555
3554
  if (typeof e == "string")
3556
3555
  return e;
3557
3556
  throw new Error(`Expected string, got ${typeof e}: ${String(e)}`);
3558
3557
  }
3559
- function La(e, t) {
3558
+ function Ia(e, t) {
3560
3559
  if (!(o.isPropertyAccessExpression(t.expression) && t.expression.name.text === "map"))
3561
3560
  return t;
3562
3561
  const n = t.arguments[0];
@@ -3568,7 +3567,7 @@ function La(e, t) {
3568
3567
  return t;
3569
3568
  const c = Se(n.body);
3570
3569
  let l = !0, d;
3571
- if (hi(c))
3570
+ if (yi(c))
3572
3571
  d = c;
3573
3572
  else {
3574
3573
  if (!o.isBlock(c))
@@ -3577,20 +3576,20 @@ function La(e, t) {
3577
3576
  if (!(v && o.isReturnStatement(v) && v.expression))
3578
3577
  return t;
3579
3578
  const T = Se(v.expression);
3580
- if (!hi(T))
3579
+ if (!yi(T))
3581
3580
  return t;
3582
3581
  const x = c.statements.slice(0, -1);
3583
- if (x.some(Pn))
3582
+ if (x.some($n))
3584
3583
  return t;
3585
3584
  l = x.length === 0, d = T;
3586
3585
  }
3587
- const p = o.isJsxElement(d) ? d.openingElement : d, m = Ln(p);
3586
+ const p = o.isJsxElement(d) ? d.openingElement : d, m = In(p);
3588
3587
  if (m === -1)
3589
3588
  return t;
3590
3589
  const f = p.attributes.properties[m];
3591
3590
  if (f === void 0 || !o.isJsxAttribute(f))
3592
3591
  return t;
3593
- const g = Lt(f.initializer, e.sourceFile), y = Fa(r, n, g, l, e);
3592
+ const g = Lt(f.initializer, e.sourceFile), y = La(r, n, g, l, e);
3594
3593
  if (y === void 0)
3595
3594
  return t;
3596
3595
  e.liftedKeys.add(f.name), e.neededImports.add("repeat");
@@ -3612,22 +3611,22 @@ function La(e, t) {
3612
3611
  )
3613
3612
  ]);
3614
3613
  }
3615
- const hi = (e) => o.isJsxElement(e) || o.isJsxSelfClosingElement(e);
3616
- function Pn(e) {
3614
+ const yi = (e) => o.isJsxElement(e) || o.isJsxSelfClosingElement(e);
3615
+ function $n(e) {
3617
3616
  if (o.isReturnStatement(e))
3618
3617
  return !0;
3619
3618
  let t = !1;
3620
3619
  return o.visitEachChild(
3621
3620
  e,
3622
- (i) => (t ||= Pn(i), i),
3621
+ (i) => (t ||= $n(i), i),
3623
3622
  void 0
3624
3623
  ), t;
3625
3624
  }
3626
- function Fa(e, t, i, n, s) {
3625
+ function La(e, t, i, n, s) {
3627
3626
  const r = W(i);
3628
3627
  if (r === void 0)
3629
3628
  return;
3630
- let a = xn(e.name, r);
3629
+ let a = Pn(e.name, r);
3631
3630
  const c = t.parameters.at(1);
3632
3631
  if (c !== void 0 && o.isIdentifier(c.name) && // A more basic check is also provided in lumina/no-unnecessary-key rule
3633
3632
  r.every(We, c.name)) {
@@ -3639,7 +3638,7 @@ function Fa(e, t, i, n, s) {
3639
3638
  return;
3640
3639
  }
3641
3640
  if (!n) {
3642
- const l = Da(r, a, t);
3641
+ const l = Na(r, a, t);
3643
3642
  if (l === void 0)
3644
3643
  return;
3645
3644
  a = l;
@@ -3669,7 +3668,7 @@ function W(e) {
3669
3668
  const t = W(e.left), i = W(e.right);
3670
3669
  return t === void 0 || i === void 0 ? void 0 : [...t, ...i];
3671
3670
  } else {
3672
- if (Na.has(e.kind))
3671
+ if (Fa.has(e.kind))
3673
3672
  return [];
3674
3673
  {
3675
3674
  const t = Se(e);
@@ -3677,7 +3676,7 @@ function W(e) {
3677
3676
  }
3678
3677
  }
3679
3678
  }
3680
- const Na = /* @__PURE__ */ new Set([
3679
+ const Fa = /* @__PURE__ */ new Set([
3681
3680
  o.SyntaxKind.NumericLiteral,
3682
3681
  o.SyntaxKind.BigIntLiteral,
3683
3682
  o.SyntaxKind.StringLiteral,
@@ -3686,20 +3685,20 @@ const Na = /* @__PURE__ */ new Set([
3686
3685
  o.SyntaxKind.FalseKeyword,
3687
3686
  o.SyntaxKind.NullKeyword,
3688
3687
  o.SyntaxKind.TrueKeyword
3689
- ]), Se = (e) => o.isAsExpression(e) || o.isNonNullExpression(e) || o.isSatisfiesExpression(e) || o.isParenthesizedExpression(e) ? Se(e.expression) : e, xn = (e, t) => o.isObjectBindingPattern(e) ? Ma(e, t) : e;
3690
- function Da(e, t, i) {
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) {
3691
3690
  if (e.every(We, t))
3692
3691
  return t;
3693
3692
  if (o.isIdentifier(t)) {
3694
- const n = o.isBlock(i.body) ? ge(i.body.statements, (r) => ja(r, t)) : void 0;
3693
+ const n = o.isBlock(i.body) ? ge(i.body.statements, (r) => Da(r, t)) : void 0;
3695
3694
  if (n === void 0)
3696
3695
  return;
3697
- const s = xn(n, e);
3696
+ const s = Pn(n, e);
3698
3697
  if (e.every(We, s))
3699
3698
  return s;
3700
3699
  }
3701
3700
  }
3702
- function ja(e, t) {
3701
+ function Da(e, t) {
3703
3702
  if (!o.isVariableStatement(e) || !(e.declarationList.flags & o.NodeFlags.Const))
3704
3703
  return;
3705
3704
  const i = e.declarationList.declarations[0];
@@ -3707,19 +3706,19 @@ function ja(e, t) {
3707
3706
  }
3708
3707
  function We(e) {
3709
3708
  const t = this;
3710
- return o.isIdentifier(t) ? t.text === e : t.elements.some(Ra, e);
3709
+ return o.isIdentifier(t) ? t.text === e : t.elements.some(ja, e);
3711
3710
  }
3712
- function Ra(e) {
3711
+ function ja(e) {
3713
3712
  const t = this;
3714
3713
  return o.isOmittedExpression(e) ? !1 : We.call(e.name, t);
3715
3714
  }
3716
- function Ma(e, t) {
3715
+ function Ra(e, t) {
3717
3716
  let i = !1;
3718
3717
  const n = e.elements.filter((s) => o.isIdentifier(s.name) ? t.includes(s.name.text) : (i = !0, !0));
3719
3718
  return i || n.length === 0 ? e : o.factory.updateObjectBindingPattern(e, n);
3720
3719
  }
3721
- const kn = (e, t) => t.liftedKeys.has(e), Oa = (e) => e.apiJsonComponents.map(({ name: t, importPath: i }) => `import type { ${t} } from "./${i}";`).join(`
3722
- `), Ja = /^[a-zA-Z_$][a-zA-Z\d_$]*$/u, Ve = (e) => !Ja.test(e), Ee = (e) => Ve(e) ? `"${e}"` : e;
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;
3723
3722
  function Xe(e, t) {
3724
3723
  const i = [], n = [];
3725
3724
  let s = !1;
@@ -3733,31 +3732,31 @@ function Xe(e, t) {
3733
3732
  }
3734
3733
  m.docsTags?.some((g) => g.name === "required") ? i.push(p.name) : n.push(p.name);
3735
3734
  });
3736
- const r = vi(i), a = vi(n), c = [
3735
+ const r = hi(i), a = hi(n), c = [
3737
3736
  r ? `Required<Pick<${e}, ${r}>>` : "",
3738
3737
  a ? `Partial<Pick<${e}, ${a}>>` : "",
3739
3738
  s ? `${e}SetterTypes` : ""
3740
3739
  ], l = s ? `
3741
- type ${e}SetterTypes = ${e}["${Gi}"]` : "", d = c.filter(Boolean).join(", ");
3740
+ type ${e}SetterTypes = ${e}["${qi}"]` : "", d = c.filter(Boolean).join(", ");
3742
3741
  return [d.length === 0 ? "" : `${d}, `, l];
3743
3742
  }
3744
- const vi = (e) => e.map((t) => `'${t}'`).join(" | ");
3743
+ const hi = (e) => e.map((t) => `'${t}'`).join(" | ");
3745
3744
  function z(e, t, i) {
3746
3745
  if (Ke(i))
3747
- return An(e, i);
3748
- const n = o.isCallExpression(i) ? La(e, i) : i, s = o.visitEachChild(
3746
+ return kn(e, i);
3747
+ const n = o.isCallExpression(i) ? Ia(e, i) : i, s = o.visitEachChild(
3749
3748
  n,
3750
3749
  // Do not add "" if parent is binary expression to not turn {(a && <b />) || c} into {(a && <b />) || "" || c}
3751
3750
  z.bind(null, e, t !== void 0 && o.isBinaryExpression(t) ? void 0 : i),
3752
3751
  e.transformationContext
3753
3752
  );
3754
- return t !== void 0 && o.isBinaryExpression(i) && (o.isJsxExpression(t) || Ke(Se(i.right))) ? Ba(s) : s;
3753
+ return t !== void 0 && o.isBinaryExpression(i) && (o.isJsxExpression(t) || Ke(Se(i.right))) ? Wa(s) : s;
3755
3754
  }
3756
- function An(e, t) {
3757
- const i = In(e, t);
3755
+ function kn(e, t) {
3756
+ const i = An(e, t);
3758
3757
  return Ge(i, e);
3759
3758
  }
3760
- function In(e, t) {
3759
+ function An(e, t) {
3761
3760
  const i = "children" in t ? t.children : [];
3762
3761
  if (o.isJsxFragment(t))
3763
3762
  return { key: void 0, ...De(i, e) };
@@ -3765,19 +3764,19 @@ function In(e, t) {
3765
3764
  if (o.isJsxNamespacedName(r))
3766
3765
  throw Error(`JSX namespaced elements are not supported. Found ${r.getText(e.sourceFile)} `);
3767
3766
  if (!o.isIdentifier(r) || !r.text.startsWith(r.text[0].toLowerCase()) && r.text !== et && r.text !== tt) {
3768
- const $ = o.isIdentifier(r) && r.text === kr ? De(i, e) : {
3767
+ const $ = o.isIdentifier(r) && r.text === xr ? De(i, e) : {
3769
3768
  // No need to wrap the function call in a lit-html tag
3770
3769
  litTag: void 0,
3771
- parts: [Wa(e, t, r, i)]
3770
+ parts: [Ka(e, t, r, i)]
3772
3771
  };
3773
3772
  return {
3774
- key: Ka(s, e),
3773
+ key: Ja(s, e),
3775
3774
  ...$
3776
3775
  };
3777
3776
  }
3778
- const c = r.text === et ? Re : r.text === tt ? ft : r.text, l = r.text === et ? ae : r.text === tt ? Y : Ir.has(c) ? Sn : Ct.has(c) ? re : ce, d = Pt(c);
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);
3779
3778
  let p;
3780
- d && e.compiler.viteCommand === "build" && (p = _a(e, c));
3779
+ d && e.compiler.viteCommand === "build" && (p = Ba(e, c));
3781
3780
  let m;
3782
3781
  const f = [];
3783
3782
  let g = !1;
@@ -3787,21 +3786,21 @@ function In(e, t) {
3787
3786
  `JSX spread attribute syntax is not supported. See alternatives: https://qawebgis.esri.com/components/lumina/jsx#spread-attributes
3788
3787
  Found ${L.getText(e.sourceFile)}`
3789
3788
  );
3790
- const { name: $, initializer: w } = L;
3789
+ const { name: $, initializer: b } = L;
3791
3790
  if (o.isJsxNamespacedName($))
3792
3791
  throw Error(`JSX namespaced attributes are not supported. Found ${$.getText(e.sourceFile)}`);
3793
- const E = $.text, I = Ta(w), F = I?.propType ?? Ea(E, w, c);
3792
+ const E = $.text, I = ba(b), F = I?.propType ?? Ta(E, b, c);
3794
3793
  p?.delete(E);
3795
- const N = va[F](e, I?.initializer ?? w, E, c);
3794
+ const N = ha[F](e, I?.initializer ?? b, E, c);
3796
3795
  if (N.length === 0)
3797
3796
  return [];
3798
- const M = e.compiler.shouldMinifyJsx ? [" "] : Aa(En($, e));
3799
- return F === "key" ? (m = typeof N[0] == "object" && !kn($, e) ? N[0] : void 0, M.some(Pa) ? M : []) : F === "directives" || F === "ref" || E === "deferLoad" ? (g ||= F === "deferLoad", f.push(
3800
- ...M,
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(
3799
+ ...R,
3801
3800
  ...N.flatMap(
3802
3801
  (H, K) => typeof H == "string" || K === 0 || typeof N[K - 1] == "string" ? H : [" ", H]
3803
3802
  )
3804
- ), []) : [...M, ...N];
3803
+ ), []) : [...R, ...N];
3805
3804
  });
3806
3805
  if (p !== void 0 && p.size > 0 && e.compiler.logLintError(
3807
3806
  "mustIncludeAllRequiredProperties",
@@ -3812,7 +3811,7 @@ Found ${L.getText(e.sourceFile)}`
3812
3811
  `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`
3813
3812
  );
3814
3813
  d && (g ? e.customElementsToImportDeferred.add(c) : e.customElementsToImport.add(c));
3815
- const h = typeof c == "string" && Ar.has(c), v = De(i, e);
3814
+ const h = typeof c == "string" && kr.has(c), v = De(i, e);
3816
3815
  if (h && v.parts.length > 0)
3817
3816
  throw Error(
3818
3817
  `Void HTML elements like <${c}> cannot have children. Found ${t.getText(e.sourceFile)}`
@@ -3836,21 +3835,21 @@ Found ${L.getText(e.sourceFile)}`
3836
3835
  ];
3837
3836
  return { key: m, parts: x, litTag: l };
3838
3837
  }
3839
- function Ka(e, t) {
3840
- const i = e.attributes.properties[Ln(e)];
3841
- return i && o.isJsxAttribute(i) && !kn(i.name, t) ? Lt(i.initializer, t.sourceFile) : void 0;
3838
+ function Ja(e, t) {
3839
+ const i = e.attributes.properties[In(e)];
3840
+ return i && o.isJsxAttribute(i) && !xn(i.name, t) ? Lt(i.initializer, t.sourceFile) : void 0;
3842
3841
  }
3843
- const Ln = (e) => e.attributes.properties.findIndex(({ name: t }) => t && o.isIdentifier(t) && t.text === "key");
3844
- function Wa(e, t, i, n) {
3842
+ const In = (e) => e.attributes.properties.findIndex(({ name: t }) => t && o.isIdentifier(t) && t.text === "key");
3843
+ function Ka(e, t, i, n) {
3845
3844
  const r = (o.isJsxElement(t) ? t.openingElement : t).attributes.properties.map((l) => {
3846
3845
  if (o.isJsxSpreadAttribute(l))
3847
- return Cn(En(l, e), o.factory.createSpreadAssignment(l.expression));
3846
+ return En(Tn(l, e), o.factory.createSpreadAssignment(l.expression));
3848
3847
  const { name: d, initializer: p } = l;
3849
3848
  if (o.isJsxNamespacedName(d))
3850
3849
  throw Error(`JSX namespaced attributes are not supported. Found ${d.getText(e.sourceFile)}`);
3851
3850
  if (d.text === "key")
3852
3851
  return;
3853
- const m = p === void 0 ? o.factory.createTrue() : o.isStringLiteral(p) ? p : Ke(p) ? An(e, p) : z(e, void 0, p.expression ?? o.factory.createIdentifier("undefined")), f = Ve(d.text) ? o.factory.createStringLiteral(d.text) : d;
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;
3854
3853
  return o.factory.createPropertyAssignment(f, m);
3855
3854
  }), { parts: a, litTag: c } = De(n, e);
3856
3855
  return a.length > 0 && r.push(
@@ -3859,20 +3858,20 @@ function Wa(e, t, i, n) {
3859
3858
  Ge({ key: void 0, parts: a, litTag: c }, e)
3860
3859
  )
3861
3860
  ), o.factory.createCallExpression(i, void 0, [
3862
- o.factory.createObjectLiteralExpression(r.filter(R))
3861
+ o.factory.createObjectLiteralExpression(r.filter(j))
3863
3862
  ]);
3864
3863
  }
3865
3864
  function De(e, t) {
3866
3865
  let i;
3867
3866
  const n = e.flatMap((s) => {
3868
3867
  if (o.isJsxText(s))
3869
- return [t.compiler.shouldMinifyJsx ? Fr(s.text) : s.text];
3868
+ return [t.compiler.shouldMinifyJsx ? Lr(s.text) : s.text];
3870
3869
  if (o.isJsxExpression(s))
3871
3870
  return Nt(t, s, s);
3872
3871
  {
3873
- const r = In(t, s);
3872
+ const r = An(t, s);
3874
3873
  if (r.key === void 0 && r.litTag !== ae && r.litTag !== Y) {
3875
- if (r.litTag === Sn)
3874
+ if (r.litTag === vn)
3876
3875
  return r.parts;
3877
3876
  if (i !== void 0 && r.litTag !== void 0 && i !== r.litTag)
3878
3877
  throw new Error(
@@ -3885,7 +3884,7 @@ function De(e, t) {
3885
3884
  });
3886
3885
  return { litTag: i, parts: n };
3887
3886
  }
3888
- function Ba(e) {
3887
+ function Wa(e) {
3889
3888
  return e.operatorToken.kind === o.SyntaxKind.AmpersandAmpersandToken ? o.factory.createBinaryExpression(
3890
3889
  e,
3891
3890
  o.factory.createToken(o.SyntaxKind.BarBarToken),
@@ -3897,9 +3896,9 @@ function Nt(e, t, i) {
3897
3896
  if (e.compiler.shouldMinifyJsx)
3898
3897
  return [];
3899
3898
  const n = t.getText(e.sourceFile).slice(1, -1);
3900
- return Ft(n).length === 0 ? [] : [Cn(n, o.factory.createIdentifier("undefined"))];
3899
+ return Ft(n).length === 0 ? [] : [En(n, o.factory.createIdentifier("undefined"))];
3901
3900
  }
3902
- return o.isStringLiteral(t.expression) ? [Yi(t.expression.text)] : (
3901
+ return o.isStringLiteral(t.expression) ? [Zi(t.expression.text)] : (
3903
3902
  /**
3904
3903
  * There is a bug in Chrome DevTools, where it won't let you set a
3905
3904
  * breakpoint inside a tagged template literal. It seems like they did
@@ -3936,7 +3935,7 @@ function Nt(e, t, i) {
3936
3935
  ] : [z(e, i, t.expression)]
3937
3936
  );
3938
3937
  }
3939
- function _a(e, t) {
3938
+ function Ba(e, t) {
3940
3939
  if (t in e.localComponents)
3941
3940
  for (const n of e.compiler.privateApiJson.modules)
3942
3941
  for (const s of n.declarations) {
@@ -3948,7 +3947,7 @@ function _a(e, t) {
3948
3947
  return r;
3949
3948
  }
3950
3949
  }
3951
- const Fn = (e) => e.reduce((t, [i, n]) => (t[i] ??= [], t[i].push(n), t), {}), we = {
3950
+ const Ln = (e) => e.reduce((t, [i, n]) => (t[i] ??= [], t[i].push(n), t), {}), we = {
3952
3951
  [ce]: ["lit-html", "lit/html.js", "lit"],
3953
3952
  /**
3954
3953
  * Sadly, Lit called these "html" and "svg", rather than "staticHtml" and
@@ -3959,8 +3958,8 @@ const Fn = (e) => e.reduce((t, [i, n]) => (t[i] ??= [], t[i].push(n), t), {}), w
3959
3958
  [ae]: ["lit-html/static.js", "lit/static-html.js"],
3960
3959
  [re]: ["lit-html", "lit/html.js", "lit"],
3961
3960
  [Y]: ["lit-html/static.js", "lit/static-html.js"],
3962
- [bn]: ["lit-html", "lit/html.js", "lit"],
3963
- [wn]: ["@lit/reactive-element/css-tag.js", "@lit/reactive-element", "lit"],
3961
+ [wn]: ["lit-html", "lit/html.js", "lit"],
3962
+ [Sn]: ["@lit/reactive-element/css-tag.js", "@lit/reactive-element", "lit"],
3964
3963
  safeClassMap: ["@arcgis/lumina"],
3965
3964
  safeStyleMap: ["@arcgis/lumina"],
3966
3965
  deferLoad: ["@arcgis/lumina"],
@@ -3969,14 +3968,14 @@ const Fn = (e) => e.reduce((t, [i, n]) => (t[i] ??= [], t[i].push(n), t), {}), w
3969
3968
  repeat: ["lit-html/directives/repeat.js", "lit/directives/repeat.js"],
3970
3969
  ref: ["lit-html/directives/ref.js", "lit/directives/ref.js"],
3971
3970
  nothing: ["lit-html", "lit/html.js", "lit-element/lit-element.js", "lit", "@arcgis/lumina"]
3972
- }, Nn = Fn(
3971
+ }, Fn = Ln(
3973
3972
  Object.entries(we).flatMap(([e, t]) => t.map((i) => [i, e]))
3974
- ), Dn = new Set(Object.keys(Nn));
3975
- function Ha(e, t) {
3973
+ ), Nn = new Set(Object.keys(Fn));
3974
+ function _a(e, t) {
3976
3975
  const i = t.importClause, n = t.moduleSpecifier;
3977
3976
  if (!o.isStringLiteral(n))
3978
3977
  return t;
3979
- const s = Ua(e.sourceFile.fileName, n.text, ""), r = !i?.isTypeOnly;
3978
+ const s = Ha(e.sourceFile.fileName, n.text, ""), r = !i?.isTypeOnly;
3980
3979
  if (r && e.existingImportedModules.add(s), i === void 0)
3981
3980
  return t;
3982
3981
  if (e.isInLightDomComponent && n.text.startsWith(".") && Oe.test(n.text) && // If id already includes ?, bypass our custom behavior
@@ -3995,12 +3994,12 @@ function Ha(e, t) {
3995
3994
  const a = i.namedBindings;
3996
3995
  if (a === void 0 || !o.isNamedImports(a))
3997
3996
  return t;
3998
- const c = Dn.has(n.text);
3997
+ const c = Nn.has(n.text);
3999
3998
  return a.elements.forEach((l) => {
4000
3999
  const d = (l.propertyName ?? l.name).text, p = we[d];
4001
4000
  if (c) {
4002
4001
  if (p?.some((g) => g === n.text)) {
4003
- const g = jn(d, s);
4002
+ const g = Dn(d, s);
4004
4003
  e.existingLitImports.add(g), e.importRenames[g] = l.name?.text ?? g;
4005
4004
  }
4006
4005
  } else (l.name.text === "h" || l.name.text === "createElement") && (e.hasNonLuminaJsxImport = !0);
@@ -4008,22 +4007,22 @@ function Ha(e, t) {
4008
4007
  r && !l.isTypeOnly && m && f && e.importedFunctionComponentsFromModules.add(s);
4009
4008
  }), t;
4010
4009
  }
4011
- const jn = (e, t) => e === ce && we.staticHtml.includes(t) ? ae : e === re && we.staticSvg.includes(t) ? Y : e, Ua = (e, t, i) => t.startsWith(".") ? u.resolve(e, "..", `${t}${i}`) : t;
4012
- function za(e) {
4013
- return o.isImportDeclaration(e) ? qa(this, e) : e;
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;
4014
4013
  }
4015
- function qa(e, t) {
4014
+ function za(e, t) {
4016
4015
  const i = t.importClause, n = i?.namedBindings, s = t.moduleSpecifier;
4017
- if (!o.isStringLiteral(s) || !n || !o.isNamedImports(n) || !Dn.has(s.text))
4016
+ if (!o.isStringLiteral(s) || !n || !o.isNamedImports(n) || !Nn.has(s.text))
4018
4017
  return t;
4019
4018
  const r = i.isTypeOnly;
4020
4019
  let a = !1;
4021
4020
  const c = n.elements.map((l) => {
4022
- const d = (l.propertyName ?? l.name).text, p = jn(d, s.text);
4021
+ const d = (l.propertyName ?? l.name).text, p = Dn(d, s.text);
4023
4022
  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;
4024
4023
  });
4025
- return Nn[s.text]?.forEach((l) => {
4026
- !e.neededImports.has(l) || e.existingLitImports.has(l) || (e.neededImports.delete(l), a = !0, c.push(Rn(l, e)));
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)));
4027
4026
  }), a ? o.factory.updateImportDeclaration(
4028
4027
  t,
4029
4028
  t.modifiers,
@@ -4037,8 +4036,8 @@ function qa(e, t) {
4037
4036
  t.attributes
4038
4037
  ) : t;
4039
4038
  }
4040
- function Ga(e) {
4041
- const t = Fn(Array.from(e.neededImports, (i) => [we[i][0], i]));
4039
+ function qa(e) {
4040
+ const t = Ln(Array.from(e.neededImports, (i) => [we[i][0], i]));
4042
4041
  return Object.entries(t).map(
4043
4042
  ([i, n]) => o.factory.createImportDeclaration(
4044
4043
  void 0,
@@ -4046,14 +4045,14 @@ function Ga(e) {
4046
4045
  !1,
4047
4046
  void 0,
4048
4047
  o.factory.createNamedImports(
4049
- n.map((s) => (e.neededImports.delete(s), Rn(s, e)))
4048
+ n.map((s) => (e.neededImports.delete(s), jn(s, e)))
4050
4049
  )
4051
4050
  ),
4052
4051
  o.factory.createStringLiteral(i)
4053
4052
  )
4054
4053
  );
4055
4054
  }
4056
- function Rn(e, t) {
4055
+ function jn(e, t) {
4057
4056
  const i = e === ae ? ce : e === Y ? re : e, n = t.importRenames[e];
4058
4057
  return n === i ? o.factory.createImportSpecifier(!1, void 0, o.factory.createIdentifier(i)) : o.factory.createImportSpecifier(
4059
4058
  !1,
@@ -4061,12 +4060,12 @@ function Rn(e, t) {
4061
4060
  o.factory.createIdentifier(n)
4062
4061
  );
4063
4062
  }
4064
- function Va(e) {
4065
- const t = Yo().map(({ packageName: i }) => i);
4063
+ function Ga(e) {
4064
+ const t = Zo().map(({ packageName: i }) => i);
4066
4065
  return e.existingImportedModules.forEach((i) => {
4067
4066
  if (u.isAbsolute(i))
4068
4067
  return;
4069
- const { packageName: n, moduleName: s } = on(i);
4068
+ const { packageName: n, moduleName: s } = rn(i);
4070
4069
  if (t.includes(n ?? "") && (s.startsWith("dist/components") || s.startsWith("components"))) {
4071
4070
  const r = ee(e.sourceFile.fileName);
4072
4071
  throw new Error(
@@ -4075,7 +4074,7 @@ function Va(e) {
4075
4074
  }
4076
4075
  }), [];
4077
4076
  }
4078
- function Xa(e) {
4077
+ function Va(e) {
4079
4078
  if (e.compiler.viteCommand === "serve")
4080
4079
  return e.customElementsToImport.clear(), e.customElementsToImportDeferred.clear(), [];
4081
4080
  const t = e.compiler._customElementDependencies;
@@ -4090,14 +4089,14 @@ function Xa(e) {
4090
4089
  t[n] ??= { referencedBy: [], referencedTagNames: [], referencedDeferredTagNames: [] }, t[n].referencedBy.push(e.sourceFile.fileName);
4091
4090
  }), [];
4092
4091
  }
4093
- function Qa(e, t, i) {
4094
- const n = yn()[t] ?? Mn(e)[t];
4092
+ function Xa(e, t, i) {
4093
+ const n = gn()[t] ?? Rn(e)[t];
4095
4094
  if (n === void 0) {
4096
4095
  if (e.options?.build?.dependencies?.silenceUnknownJsxElementUsage?.(t, i, e) === !0)
4097
4096
  return;
4098
4097
  const s = ee(i);
4099
4098
  throw Error(
4100
- b(
4099
+ w(
4101
4100
  "@arcgis/lumina:resolveTagName",
4102
4101
  `Unable to resolve the definition of the "${t}" custom element. Used in ${s}. If this is coming from an external package, make sure that package is installed as a peerDependency or a dependency. If in development-only you wish to use a component package that is defined as a devDependency, then provide serve.extraDependencies option to useLumina()`
4103
4102
  )
@@ -4105,28 +4104,28 @@ function Qa(e, t, i) {
4105
4104
  }
4106
4105
  return n;
4107
4106
  }
4108
- function Za(e, t) {
4107
+ function Qa(e, t) {
4109
4108
  return e.packageName === void 0 ? oe(t, e.moduleName) : u.join(e.packageName, e.moduleName);
4110
4109
  }
4111
- function Mn(e) {
4112
- return e._localDefinedComponents ??= vn(e.privateApiJson, {
4110
+ function Rn(e) {
4111
+ return e._localDefinedComponents ??= hn(e.privateApiJson, {
4113
4112
  packageName: void 0,
4114
4113
  getImportPath() {
4115
4114
  throw new Error("Not supposed to be called for local components");
4116
4115
  }
4117
4116
  }), e._localDefinedComponents;
4118
4117
  }
4119
- const Ya = (e, t) => {
4118
+ const Za = (e, t) => {
4120
4119
  const i = e.pragmas;
4121
4120
  if (i?.has("jsx") === !0 || i?.has("jsxImportSource") === !0)
4122
4121
  return e.statements;
4123
4122
  const n = {
4124
4123
  compiler: t.compiler,
4125
- externalComponents: yn(),
4126
- localComponents: t.compiler.isInPuppeteerTestBackEnd ? {} : Mn(t.compiler),
4124
+ externalComponents: gn(),
4125
+ localComponents: t.compiler.isInPuppeteerTestBackEnd ? {} : Rn(t.compiler),
4127
4126
  sourceFile: e,
4128
4127
  transformationContext: t.transformation,
4129
- importRenames: ec(e),
4128
+ importRenames: Ya(e),
4130
4129
  existingImportedModules: /* @__PURE__ */ new Set(),
4131
4130
  importedFunctionComponentsFromModules: /* @__PURE__ */ new Set(),
4132
4131
  existingLitImports: /* @__PURE__ */ new Set(),
@@ -4142,18 +4141,18 @@ const Ya = (e, t) => {
4142
4141
  let s = [];
4143
4142
  if (e.statements.every((a) => {
4144
4143
  if (o.isImportDeclaration(a)) {
4145
- if (s.push(Ha(n, a)), n.hasNonLuminaJsxImport)
4144
+ if (s.push(_a(n, a)), n.hasNonLuminaJsxImport)
4146
4145
  return !1;
4147
4146
  } else
4148
4147
  s.push(z(n, void 0, a));
4149
4148
  return !0;
4150
4149
  }), n.hasNonLuminaJsxImport)
4151
4150
  return e.statements;
4152
- if (n.neededImports.size > 0 && (s = s.map(za, n), n.existingLitImports.size > 0))
4151
+ if (n.neededImports.size > 0 && (s = s.map(Ua, n), n.existingLitImports.size > 0))
4153
4152
  throw new Error(
4154
4153
  `Expected context.existingLitImports to be empty by now. Found: ${Array.from(n.existingLitImports).join(", ")}`
4155
4154
  );
4156
- const r = [Ga, Va, Xa].flatMap(
4155
+ const r = [qa, Ga, Va].flatMap(
4157
4156
  (a) => a(n)
4158
4157
  );
4159
4158
  if (n.neededImports.size > 0)
@@ -4162,18 +4161,18 @@ const Ya = (e, t) => {
4162
4161
  );
4163
4162
  return [...r, ...s];
4164
4163
  };
4165
- function ec(e) {
4166
- return tc(e), Object.fromEntries(
4167
- ga.map((t) => [t, e.identifiers.has(t) ? `${t}$jsx` : t])
4164
+ function Ya(e) {
4165
+ return ec(e), Object.fromEntries(
4166
+ fa.map((t) => [t, e.identifiers.has(t) ? `${t}$jsx` : t])
4168
4167
  );
4169
4168
  }
4170
- function tc(e) {
4169
+ function ec(e) {
4171
4170
  if (!("identifiers" in e))
4172
4171
  throw new Error(
4173
4172
  "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."
4174
4173
  );
4175
4174
  }
4176
- function ic(e, t, i) {
4175
+ function tc(e, t, i) {
4177
4176
  return t.size === 0 ? e : [
4178
4177
  o.factory.createPropertyDeclaration(
4179
4178
  [
@@ -4187,7 +4186,7 @@ function ic(e, t, i) {
4187
4186
  Array.from(t.entries()).map(
4188
4187
  ([n, s]) => o.factory.createPropertyAssignment(
4189
4188
  Ve(n) ? o.factory.createStringLiteral(n) : n,
4190
- nc(s, i)
4189
+ ic(s, i)
4191
4190
  )
4192
4191
  )
4193
4192
  )
@@ -4195,7 +4194,7 @@ function ic(e, t, i) {
4195
4194
  ...e
4196
4195
  ];
4197
4196
  }
4198
- function nc(e, t) {
4197
+ function ic(e, t) {
4199
4198
  let i = 0, n = !0;
4200
4199
  const s = [], r = [];
4201
4200
  for (const l of e.properties)
@@ -4207,18 +4206,18 @@ function nc(e, t) {
4207
4206
  if (d === "attribute")
4208
4207
  return n = !1, i |= m ? _t : 0, !m && !f;
4209
4208
  if (d === "reflect")
4210
- return i |= m ? xs : 0, !1;
4209
+ return i |= m ? Ps : 0, !1;
4211
4210
  if (d === "type" && o.isIdentifier(p)) {
4212
4211
  if (p.text === "Boolean")
4213
- return i |= ks, !1;
4212
+ return i |= xs, !1;
4214
4213
  if (p.text === "Number")
4215
- return i |= As, !1;
4214
+ return i |= ks, !1;
4216
4215
  } else {
4217
4216
  if (d === "state")
4218
- return n = !1, i |= m ? Is : 0, !1;
4217
+ return n = !1, i |= m ? As : 0, !1;
4219
4218
  if (d === "readOnly")
4220
- return i |= m ? Ls : 0, !1;
4221
- d === "noAccessor" && (i |= m ? Fs : 0);
4219
+ return i |= m ? Is : 0, !1;
4220
+ d === "noAccessor" && (i |= m ? Ls : 0);
4222
4221
  }
4223
4222
  return !0;
4224
4223
  }
@@ -4237,7 +4236,7 @@ function nc(e, t) {
4237
4236
  ...t ? [] : [o.factory.createObjectLiteralExpression(r)]
4238
4237
  ]);
4239
4238
  }
4240
- function sc(e, t, i, n, s) {
4239
+ function nc(e, t, i, n, s) {
4241
4240
  let r = -1, a = -1, c = -1;
4242
4241
  t.options?.properties.forEach((f, g) => {
4243
4242
  if (o.isSpreadAssignment(f))
@@ -4249,23 +4248,23 @@ function sc(e, t, i, n, s) {
4249
4248
  y === "type" ? r = g : y === "attribute" ? a = g : y === "readOnly" && (c = g);
4250
4249
  }
4251
4250
  });
4252
- const l = s.attribute === void 0 && a === -1, d = s.readonly === !0 && s.docsOnlyReadonly !== !0 && c === -1, p = rc(e, t, i, s, r), m = [
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 = [
4253
4252
  ...l ? [o.factory.createPropertyAssignment("attribute", o.factory.createFalse())] : [],
4254
4253
  ...d ? [o.factory.createPropertyAssignment("readOnly", o.factory.createTrue())] : [],
4255
4254
  ...p !== void 0 ? [p] : []
4256
4255
  ];
4257
4256
  return m.length > 0 ? t.options === void 0 ? o.factory.createObjectLiteralExpression(m, !1) : o.factory.updateObjectLiteralExpression(t.options, [...t.options.properties, ...m]) : t.options;
4258
4257
  }
4259
- function rc(e, t, i, n, s) {
4258
+ function sc(e, t, i, n, s) {
4260
4259
  if (n.attribute === void 0)
4261
4260
  return;
4262
- const r = ac(e), a = i.compiler.viteCommand === "serve" || r !== "Other" ? r : oc(n.type.values);
4261
+ const r = oc(e), a = i.compiler.viteCommand === "serve" || r !== "Other" ? r : rc(n.type.values);
4263
4262
  return a === "Other" || n.readonly && (a !== "Boolean" || !n.reflects) || t.options?.properties[s] !== void 0 ? void 0 : o.factory.createPropertyAssignment(
4264
4263
  o.factory.createIdentifier("type"),
4265
4264
  o.factory.createIdentifier(a)
4266
4265
  );
4267
4266
  }
4268
- function oc(e) {
4267
+ function rc(e) {
4269
4268
  let t = !1, i = !1, n = !1;
4270
4269
  if (e?.forEach((s) => {
4271
4270
  t ||= s.type === "number", i ||= s.type === "boolean", n ||= s.type === "string" || s.type === "any" || s.type === "unknown";
@@ -4277,7 +4276,7 @@ function oc(e) {
4277
4276
  }
4278
4277
  return "Other";
4279
4278
  }
4280
- function ac(e) {
4279
+ function oc(e) {
4281
4280
  const t = e.type ?? (o.isSetAccessor(e) ? e.parameters[0].type : void 0);
4282
4281
  if (t === void 0) {
4283
4282
  if ("initializer" in e && e.initializer !== void 0) {
@@ -4294,7 +4293,7 @@ function ac(e) {
4294
4293
  }
4295
4294
  return "Other";
4296
4295
  }
4297
- function cc(e, t, i, n, s) {
4296
+ function ac(e, t, i, n, s) {
4298
4297
  if (t.modifiers === void 0)
4299
4298
  return t;
4300
4299
  let r = -1, a = -1;
@@ -4304,18 +4303,18 @@ function cc(e, t, i, n, s) {
4304
4303
  d === "property" && (r = l), d === "state" && (a = l);
4305
4304
  }
4306
4305
  }), r !== -1) {
4307
- const c = lc(e, t, i, n), l = Si(t, r, n), d = sc(t, l, e, n, c);
4306
+ const c = cc(e, t, i, n), l = vi(t, r, n), d = nc(t, l, e, n, c);
4308
4307
  let p = !1;
4309
- return s.set(c.name, d ?? o.factory.createObjectLiteralExpression()), p = !0, l.options = d, wi(t, l, r, p);
4308
+ return s.set(c.name, d ?? o.factory.createObjectLiteralExpression()), p = !0, l.options = d, Si(t, l, r, p);
4310
4309
  } else if (a !== -1) {
4311
- const c = Si(t, a, n), l = o.factory.createPropertyAssignment("state", o.factory.createTrue()), d = c.options === void 0 ? o.factory.createObjectLiteralExpression([l]) : o.factory.updateObjectLiteralExpression(c.options, [...c.options.properties, l]), p = X(t.name);
4310
+ const c = vi(t, a, n), l = o.factory.createPropertyAssignment("state", o.factory.createTrue()), d = c.options === void 0 ? o.factory.createObjectLiteralExpression([l]) : o.factory.updateObjectLiteralExpression(c.options, [...c.options.properties, l]), p = X(t.name);
4312
4311
  if (p === void 0)
4313
4312
  throw new Error("Failed to statically determine the state property name");
4314
- return s.set(p, d), wi(t, c, a, !0);
4313
+ return s.set(p, d), Si(t, c, a, !0);
4315
4314
  } else
4316
4315
  return t;
4317
4316
  }
4318
- function lc(e, t, i, n) {
4317
+ function cc(e, t, i, n) {
4319
4318
  const s = e.apiModule?.declarations.find(
4320
4319
  (a) => a.name === i
4321
4320
  ) ?? (e.compiler.isInTest ? {
@@ -4323,7 +4322,7 @@ function lc(e, t, i, n) {
4323
4322
  } : void 0);
4324
4323
  if (s === void 0)
4325
4324
  throw Error(`Failed to find API component for ${i} in ${n.fileName}`);
4326
- const r = sr(s, t) ?? (e.compiler.isInTest ? { kind: "field", attribute: "", readonly: !1, name: "", type: { text: "" } } : void 0);
4325
+ const r = nr(s, t) ?? (e.compiler.isInTest ? { kind: "field", attribute: "", readonly: !1, name: "", type: { text: "" } } : void 0);
4327
4326
  if (r === void 0 || r.kind !== "field")
4328
4327
  throw Error(
4329
4328
  `Failed to find API property for ${t.getText(n)} in ${i} in ${n.fileName}`
@@ -4338,7 +4337,7 @@ function lc(e, t, i, n) {
4338
4337
  }
4339
4338
  return r;
4340
4339
  }
4341
- function Si(e, t, i) {
4340
+ function vi(e, t, i) {
4342
4341
  const n = e.modifiers[t], s = n.expression, r = s.arguments.at(0);
4343
4342
  if (r && !o.isObjectLiteralExpression(r))
4344
4343
  throw new Error(
@@ -4346,7 +4345,7 @@ function Si(e, t, i) {
4346
4345
  );
4347
4346
  return { decorator: n, callExpression: s, options: r };
4348
4347
  }
4349
- function wi(e, t, i, n) {
4348
+ function Si(e, t, i, n) {
4350
4349
  const s = n ? void 0 : o.factory.updateDecorator(
4351
4350
  t.decorator,
4352
4351
  o.factory.updateCallExpression(
@@ -4382,23 +4381,23 @@ function wi(e, t, i, n) {
4382
4381
  e.initializer
4383
4382
  );
4384
4383
  }
4385
- const dc = (e, t) => {
4384
+ const lc = (e, t) => {
4386
4385
  if (t.apiModule === void 0 && !t.compiler.isInTest)
4387
4386
  return e.statements;
4388
4387
  let i;
4389
4388
  function n() {
4390
4389
  i = /* @__PURE__ */ new Map();
4391
4390
  }
4392
- const s = (c) => ic(c, i, t.compiler.shouldMinify);
4391
+ const s = (c) => tc(c, i, t.compiler.shouldMinify);
4393
4392
  function r(c, l) {
4394
- const d = uc(t, c, l, e, i);
4393
+ const d = pc(t, c, l, e, i);
4395
4394
  return t.compiler.viteCommand === "build" && o.setEmitFlags(d, o.EmitFlags.NoComments), d;
4396
4395
  }
4397
4396
  return e.statements.map(
4398
- (c) => On(r, c, t, n, s)
4397
+ (c) => Mn(r, c, t, n, s)
4399
4398
  );
4400
4399
  };
4401
- function On(e, t, i, n, s = Ji) {
4400
+ function Mn(e, t, i, n, s = Oi) {
4402
4401
  if (o.isClassDeclaration(t) && // Ignore classes that don't extend anything - those are definitely not components
4403
4402
  t.heritageClauses?.some((r) => r.token === o.SyntaxKind.ExtendsKeyword)) {
4404
4403
  let r = !1;
@@ -4421,15 +4420,15 @@ function On(e, t, i, n, s = Ji) {
4421
4420
  } else
4422
4421
  return i.compiler.isInTest ? o.visitEachChild(
4423
4422
  t,
4424
- (a) => On(e, a, i, n, s),
4423
+ (a) => Mn(e, a, i, n, s),
4425
4424
  i.transformation
4426
4425
  ) : t;
4427
4426
  }
4428
- const pc = /* @__PURE__ */ new Set(["connectedCallback", "disconnectedCallback"]);
4429
- function uc(e, t, i, n, s) {
4427
+ const dc = /* @__PURE__ */ new Set(["connectedCallback", "disconnectedCallback"]);
4428
+ function pc(e, t, i, n, s) {
4430
4429
  if (o.isMethodDeclaration(t)) {
4431
4430
  const r = t.modifiers?.filter(
4432
- (a) => !o.isDecorator(a) || !mc(a)
4431
+ (a) => !o.isDecorator(a) || !uc(a)
4433
4432
  );
4434
4433
  if (r?.length !== t.modifiers?.length)
4435
4434
  return o.factory.updateMethodDeclaration(
@@ -4443,7 +4442,7 @@ function uc(e, t, i, n, s) {
4443
4442
  t.type,
4444
4443
  t.body
4445
4444
  );
4446
- if ("text" in t.name && pc.has(t.name.text) && t.body) {
4445
+ if ("text" in t.name && dc.has(t.name.text) && t.body) {
4447
4446
  const a = t.name.text;
4448
4447
  return t.body.statements.some(
4449
4448
  (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
@@ -4469,11 +4468,11 @@ function uc(e, t, i, n, s) {
4469
4468
  );
4470
4469
  }
4471
4470
  }
4472
- return o.isPropertyDeclaration(t) || o.isAccessor(t) ? cc(e, t, i, n, s) : t;
4471
+ return o.isPropertyDeclaration(t) || o.isAccessor(t) ? ac(e, t, i, n, s) : t;
4473
4472
  }
4474
- const mc = (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
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
4475
4474
  ct.name === "@arcgis/lumina";
4476
- async function fc(e, t) {
4475
+ async function mc(e, t) {
4477
4476
  if (!Ce)
4478
4477
  return [];
4479
4478
  const i = await _e(vt);
@@ -4494,22 +4493,22 @@ async function fc(e, t) {
4494
4493
  })
4495
4494
  },
4496
4495
  // <link rel="stylesheet" id="arcgisCoreStylesheet" href="https://jsdev.arcgis.com/VERSION/esri/themes/light/main.css" />
4497
- bi(s)
4496
+ wi(s)
4498
4497
  ];
4499
4498
  } else
4500
- return [bi(It(e, `${i}/assets/`))];
4499
+ return [wi(It(e, `${i}/assets/`))];
4501
4500
  }
4502
- const bi = (e) => ({
4501
+ const wi = (e) => ({
4503
4502
  // Not using join() because it would turn https:// into https:/
4504
4503
  cssHref: `${e}esri/themes/light/main.css`,
4505
4504
  // This is used be the theme switcher in `@arcgis/storybook-utils`
4506
4505
  id: "arcgisCoreStylesheet"
4507
- }), Ti = "makeRuntime(", gc = "@arcgis/core";
4508
- function yc(e, t) {
4509
- const i = e.indexOf(Ti);
4506
+ }), bi = "makeRuntime(", fc = "@arcgis/core";
4507
+ function gc(e, t) {
4508
+ const i = e.indexOf(bi);
4510
4509
  if (i === -1)
4511
4510
  throw new Error("Failed to find makeRuntime() function call in src/runtime.ts");
4512
- const n = i + Ti.length, s = t.options.css?.commonStylesPath;
4511
+ const n = i + bi.length, s = t.options.css?.commonStylesPath;
4513
4512
  return {
4514
4513
  code: [
4515
4514
  s === void 0 ? "" : `import commonStyles from "${oe(t.dir.src, s)}";`,
@@ -4517,13 +4516,13 @@ function yc(e, t) {
4517
4516
  "{",
4518
4517
  "defaultAssetPath:import.meta.env.BASE_URL,",
4519
4518
  'hydratedAttribute:"',
4520
- t.options.css?.hydratedAttribute ?? dn,
4519
+ t.options.css?.hydratedAttribute ?? ln,
4521
4520
  '",',
4522
4521
  s === void 0 ? "" : "commonStyles",
4523
4522
  "}",
4524
4523
  e.slice(n),
4525
4524
  Ce ? `
4526
- import {createObservable,trackAccess,createTrackingTarget,runTracked} from "${gc}/applications/Components/reactiveUtils.js";
4525
+ import {createObservable,trackAccess,createTrackingTarget,runTracked} from "${fc}/applications/Components/reactiveUtils.js";
4527
4526
  createObservable,
4528
4527
  runtime.t = trackAccess;
4529
4528
  runtime.o = createObservable;
@@ -4533,12 +4532,12 @@ runtime.r = runTracked;` : ""
4533
4532
  map: null
4534
4533
  };
4535
4534
  }
4536
- const hc = [
4537
- Ya,
4538
- qs,
4539
- dc
4540
- ], Ei = "@arcgis/lumina:transformComponents", vc = (e) => ({
4541
- name: Ei,
4535
+ const yc = [
4536
+ Za,
4537
+ zs,
4538
+ lc
4539
+ ], Ti = "@arcgis/lumina:transformComponents", hc = (e) => ({
4540
+ name: Ti,
4542
4541
  transform: {
4543
4542
  // Transform JSX to lit-html first so that vite:esbuild doesn't transform JSX to h().
4544
4543
  order: "pre",
@@ -4546,20 +4545,20 @@ const hc = [
4546
4545
  if (!i.endsWith(".tsx")) {
4547
4546
  if (e.isInTest && i.endsWith(".ts") && Et(i) && t.includes("extends LitElement"))
4548
4547
  C.warn(
4549
- Ei,
4548
+ Ti,
4550
4549
  "It looks like you may be trying to define a component inside a test file. This is supported, but you must use the .tsx file extension for you test",
4551
4550
  i
4552
4551
  );
4553
4552
  else if (i === `${e.dir.src}runtime.ts`)
4554
- return yc(t, e);
4553
+ return gc(t, e);
4555
4554
  return;
4556
4555
  }
4557
4556
  const n = e.getSourceFile(i, t);
4558
4557
  await ve;
4559
4558
  const r = o.transform(n, [
4560
- (f) => () => zi(e, f, n, [
4559
+ (f) => () => Ui(e, f, n, [
4561
4560
  ...e.options.types?.sourceFileTransformers ?? [],
4562
- ...hc
4561
+ ...yc
4563
4562
  ])
4564
4563
  ]).transformed[0], a = e._compilerOptionsForPrinter, c = e._typeScriptPrinter, l = a.sourceMap ? me.createSourceMapGenerator(
4565
4564
  e.typeScriptHost,
@@ -4577,7 +4576,7 @@ const hc = [
4577
4576
  }
4578
4577
  }
4579
4578
  });
4580
- function Sc(e) {
4579
+ function vc(e) {
4581
4580
  const t = e.typeScriptConfig;
4582
4581
  return {
4583
4582
  ...t,
@@ -4609,11 +4608,11 @@ function Sc(e) {
4609
4608
  skipLibCheck: !0
4610
4609
  };
4611
4610
  }
4612
- function wc(e) {
4613
- const t = e.options.types?.tsconfigPath, i = t && u.isAbsolute(t) ? t : ps(t ?? "tsconfig.json");
4611
+ function Sc(e) {
4612
+ const t = e.options.types?.tsconfigPath, i = t && u.isAbsolute(t) ? t : ds(t ?? "tsconfig.json");
4614
4613
  if (i === void 0)
4615
4614
  throw Error(
4616
- b(
4615
+ w(
4617
4616
  "@arcgis/lumina:loadTypeScriptConfig",
4618
4617
  `Unable to find ${ee(String(t))}. Please make sure the file exists, or provide types.tsconfigPath option to useLumina()`,
4619
4618
  process.cwd()
@@ -4623,7 +4622,7 @@ function wc(e) {
4623
4622
  if (n.error !== void 0)
4624
4623
  throw Error(
4625
4624
  o.formatDiagnosticsWithColorAndContext([n.error], {
4626
- getCanonicalFileName: Ji,
4625
+ getCanonicalFileName: Oi,
4627
4626
  getCurrentDirectory: o.sys.getCurrentDirectory,
4628
4627
  getNewLine: () => o.sys.newLine
4629
4628
  })
@@ -4636,11 +4635,11 @@ function wc(e) {
4636
4635
  }, r = o.parseJsonConfigFileContent(s, o.sys, u.dirname(i));
4637
4636
  e.typeScriptConfig = r.options, e.typeScriptConfigPath = i;
4638
4637
  }
4639
- function Jn(e) {
4638
+ function On(e) {
4640
4639
  const t = e.target;
4641
4640
  if (t === void 0)
4642
4641
  throw Error(
4643
- b(
4642
+ w(
4644
4643
  "@arcgis/lumina:resolveTargetVersion",
4645
4644
  'TypeScript config must have a "target" property specified (or any parent tsconfig.json file if this config is extending another tsconfig.json)'
4646
4645
  )
@@ -4648,7 +4647,7 @@ function Jn(e) {
4648
4647
  const i = o.ScriptTarget[t].toLowerCase();
4649
4648
  return i === "latest" ? "esnext" : i;
4650
4649
  }
4651
- function bc(e, t) {
4650
+ function wc(e, t) {
4652
4651
  if (e.isInStorybook && e.viteCommand === "serve") {
4653
4652
  const i = (a, c, l, ...d) => {
4654
4653
  const p = a.filter(
@@ -4667,17 +4666,17 @@ function bc(e, t) {
4667
4666
  l[0] === "timerToUpdateProgram" ? s : c,
4668
4667
  ...l
4669
4668
  ), n.afterProgramCreate = (a) => {
4670
- e.typeScriptProgram = a.getProgram(), e.typeScriptTypeChecker = e.typeScriptProgram.getTypeChecker(), e._typeScriptReload?.resolve(), e._typeScriptReload = new Ss();
4669
+ e.typeScriptProgram = a.getProgram(), e.typeScriptTypeChecker = e.typeScriptProgram.getTypeChecker(), e._typeScriptReload?.resolve(), e._typeScriptReload = new vs();
4671
4670
  }, e.typeScriptWatchProgram = o.createWatchProgram(n), e.typeScriptConfig = e.typeScriptProgram.getCompilerOptions();
4672
4671
  }
4673
- e.typeScriptConfig.sourceMap = t, e._compilerOptionsForPrinter = Sc(e), e._typeScriptPrinter = tn(e._compilerOptionsForPrinter);
4672
+ e.typeScriptConfig.sourceMap = t, e._compilerOptionsForPrinter = vc(e), e._typeScriptPrinter = en(e._compilerOptionsForPrinter);
4674
4673
  }
4675
- async function Tc(e, t, i) {
4674
+ async function bc(e, t, i) {
4676
4675
  const n = u.resolve(e.dir.root, t);
4677
- await U(n) && await Ts(n, { recursive: !0, force: !0 }), await Q(n, { recursive: !0 }), await Es(e.dir.distCdn, u.join(n, "build"), { recursive: !0 });
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 });
4678
4677
  const s = [
4679
4678
  "index.html",
4680
- ...await Ds("**/*.html", {
4679
+ ...await Ns("**/*.html", {
4681
4680
  cwd: e.dir.src,
4682
4681
  nodir: !0,
4683
4682
  posix: !0
@@ -4692,24 +4691,24 @@ async function Tc(e, t, i) {
4692
4691
  if (typeof p == "string")
4693
4692
  return `<${d.tag} ${Object.entries(d.attrs ?? {}).map(([m, f]) => `${m}="${f}"`).join(" ")}>${p}</${d.tag}>`;
4694
4693
  }
4695
- throw Error(b("@arcgis/lumina:buildWebApp", `Unsupported loader type: ${JSON.stringify(d)}`));
4694
+ throw Error(w("@arcgis/lumina:buildWebApp", `Unsupported loader type: ${JSON.stringify(d)}`));
4696
4695
  }).join(`
4697
4696
  `);
4698
4697
  await Promise.all(
4699
4698
  s.map(async (d, p) => {
4700
4699
  const f = p === 0 ? d : u.join(r, d), g = u.join(e.dir.root, f), y = u.join(n, f);
4701
4700
  await Q(u.dirname(y), { recursive: !0 });
4702
- const h = await J(g, "utf-8"), v = oe(u.dirname(f), `build/${i}`), S = `${l}<script type="module" src="${v}"><\/script>
4701
+ const h = await O(g, "utf-8"), v = oe(u.dirname(f), `build/${i}`), S = `${l}<script type="module" src="${v}"><\/script>
4703
4702
  `;
4704
4703
  let T = h.indexOf("<style>");
4705
4704
  if (T === -1 && (T = h.indexOf("</head>")), T === -1)
4706
- throw Error(b("@arcgis/lumina:buildWebApp", `Failed to find <head> or <style> tag in ${g}`));
4705
+ throw Error(w("@arcgis/lumina:buildWebApp", `Failed to find <head> or <style> tag in ${g}`));
4707
4706
  const x = h.slice(0, T) + S + h.slice(T);
4708
4707
  await D(y, x, "utf-8");
4709
4708
  })
4710
4709
  );
4711
4710
  }
4712
- const Kn = /* @__PURE__ */ new Set([
4711
+ const Jn = /* @__PURE__ */ new Set([
4713
4712
  "chunks",
4714
4713
  "components",
4715
4714
  "docs",
@@ -4722,13 +4721,13 @@ const Kn = /* @__PURE__ */ new Set([
4722
4721
  "collection",
4723
4722
  "extras",
4724
4723
  "support"
4725
- ]), _ = "@arcgis/lumina:buildCdn", Dt = "cdn", Wn = "index", be = "main";
4726
- function Ec(e) {
4724
+ ]), _ = "@arcgis/lumina:buildCdn", Dt = "cdn", Kn = "index", be = "main";
4725
+ function Tc(e) {
4727
4726
  const { skip: t = !1, namespace: i, esbuildOptions: n = {} } = e.options.build?.cdn ?? {}, s = e.options.build?.webApp?.destination, r = i !== void 0;
4728
4727
  if (r) {
4729
4728
  if (i.toLowerCase() !== i)
4730
4729
  throw new Error(`Expected CDN namespace to be all lowercase. Received: ${i}`);
4731
- if (Kn.has(i))
4730
+ if (Jn.has(i))
4732
4731
  throw new Error(
4733
4732
  `Namespace name "${i}" is restricted as it collides with a well-known Lumina dist/ folder name or Stencil dist/ folder name.`
4734
4733
  );
@@ -4736,11 +4735,11 @@ function Ec(e) {
4736
4735
  'The "namespace" option in the "build.cdn" is deprecated and will be removed in the next major version.'
4737
4736
  );
4738
4737
  }
4739
- const a = i ?? Wn;
4738
+ const a = i ?? Kn;
4740
4739
  if (e.provideAssets([
4741
4740
  {
4742
4741
  type: "dynamic",
4743
- source: () => Io(e),
4742
+ source: () => Ao(e),
4744
4743
  destination: `../${r ? a : be}.css`
4745
4744
  }
4746
4745
  ]), !t)
@@ -4749,8 +4748,8 @@ function Ec(e) {
4749
4748
  async writeBundle() {
4750
4749
  if (e.isInStorybook)
4751
4750
  return;
4752
- 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 Cc(e, a, n, d, c);
4753
- await $c(
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
4753
  p,
4755
4754
  e,
4756
4755
  r ? `${a}.esm` : a,
@@ -4758,27 +4757,27 @@ function Ec(e) {
4758
4757
  c
4759
4758
  );
4760
4759
  const m = Date.now();
4761
- C.info(_, `CDN was built in ${m - l}ms`), s && await Tc(e, s, `${r ? `${a}.esm` : a}.js`);
4760
+ C.info(_, `CDN was built in ${m - l}ms`), s && await bc(e, s, `${r ? `${a}.esm` : a}.js`);
4762
4761
  }
4763
4762
  };
4764
4763
  }
4765
- async function Cc(e, t, i, n, s) {
4764
+ async function Ec(e, t, i, n, s) {
4766
4765
  const r = e.environment;
4767
4766
  if (i.minify && s)
4768
4767
  throw Error(
4769
- b(
4768
+ w(
4770
4769
  _,
4771
4770
  "Unminified CDN build is not yet supported - open a feature request with Lumina maintainers if it is needed"
4772
4771
  )
4773
4772
  );
4774
4773
  if (i.sourcemap && s)
4775
4774
  throw Error(
4776
- b(
4775
+ w(
4777
4776
  _,
4778
4777
  "Source maps in the CDN build are not yet supported - open a feature request with Lumina maintainers if it is needed"
4779
4778
  )
4780
4779
  );
4781
- return await Ns({
4780
+ return await Fs({
4782
4781
  bundle: !0,
4783
4782
  minify: s ? !0 : r === "production",
4784
4783
  treeShaking: !0,
@@ -4803,7 +4802,7 @@ async function Cc(e, t, i, n, s) {
4803
4802
  chunkNames: "[hash]",
4804
4803
  resolveExtensions: [".js", ".json"],
4805
4804
  banner: { js: e.banner },
4806
- target: Jn(e.typeScriptConfig),
4805
+ target: On(e.typeScriptConfig),
4807
4806
  ...i,
4808
4807
  write: !1,
4809
4808
  plugins: [
@@ -4833,7 +4832,7 @@ async function Cc(e, t, i, n, s) {
4833
4832
  * The script's file name will be stripped inside defineCustomElements.
4834
4833
  **/
4835
4834
  defineCustomElements({resourcesUrl: import.meta.url});
4836
- ${pn(e._globalCssString, e)}`,
4835
+ ${dn(e._globalCssString, e)}`,
4837
4836
  sourcefile: `${t}.esm.js`,
4838
4837
  resolveDir: e.dir.dist,
4839
4838
  loader: "js",
@@ -4841,7 +4840,7 @@ ${pn(e._globalCssString, e)}`,
4841
4840
  }
4842
4841
  });
4843
4842
  }
4844
- async function $c(e, t, i, n, s) {
4843
+ async function Cc(e, t, i, n, s) {
4845
4844
  const r = t.dir.distCdn, a = `${i}.js`, c = new Map(
4846
4845
  e.outputFiles.map((l) => {
4847
4846
  const d = {
@@ -4851,12 +4850,12 @@ async function $c(e, t, i, n, s) {
4851
4850
  }, p = l.path.slice(r.length);
4852
4851
  if (p === "stdin.js") {
4853
4852
  if (s) {
4854
- const f = l.text.match(Pc)?.[0];
4853
+ const f = l.text.match($c)?.[0];
4855
4854
  if (f === void 0)
4856
4855
  throw Error(
4857
4856
  "Failed to find the runtime variable name in the CDN entrypoint file. This likely indicates a bug in Lumina"
4858
4857
  );
4859
- d.code = `${d.code.trimEnd()}${xc(f, n)}`, d.isAsync = !1;
4858
+ d.code = `${d.code.trimEnd()}${Pc(f, n)}`, d.isAsync = !1;
4860
4859
  }
4861
4860
  return [a, d];
4862
4861
  }
@@ -4864,11 +4863,11 @@ async function $c(e, t, i, n, s) {
4864
4863
  })
4865
4864
  );
4866
4865
  s && c.forEach((l, d) => {
4867
- l.isAsync === void 0 && (d.endsWith(".js") ? Bn(l, c) : l.isAsync = !1);
4866
+ l.isAsync === void 0 && (d.endsWith(".js") ? Wn(l, c) : l.isAsync = !1);
4868
4867
  }), t.options.build?.cdn?.transformer?.(c, t), await Promise.all(Array.from(c.entries(), async ([l, { code: d }]) => await D(r + l, d)));
4869
4868
  }
4870
- const Pc = /(?<=;var [a-zA-Z$_]=[a-zA-Z$_]\()[a-zA-Z$_](?=,\{")/u;
4871
- function xc(e, t) {
4869
+ const $c = /(?<=;var [a-zA-Z$_]=[a-zA-Z$_]\()[a-zA-Z$_](?=,\{")/u;
4870
+ function Pc(e, t) {
4872
4871
  let i = [
4873
4872
  "window.$arcgis",
4874
4873
  "||",
@@ -4884,7 +4883,7 @@ function xc(e, t) {
4884
4883
  continue;
4885
4884
  }
4886
4885
  if (r.out.startsWith(".") || r.out.startsWith("/"))
4887
- throw Error(b(_, `CDN entrypoint path must not start with '.' or '/'. Found: ${r.out}`));
4886
+ throw Error(w(_, `CDN entrypoint path must not start with '.' or '/'. Found: ${r.out}`));
4888
4887
  s.push(r.out);
4889
4888
  }
4890
4889
  i += `"${s.join(",")}".split(",").map(e=>i[p+e+j]=i[p+e]=import.meta.resolve("./"+e+j));`;
@@ -4904,25 +4903,25 @@ function xc(e, t) {
4904
4903
  // minified to a variable name that is already used inside the closure).
4905
4904
  `)($arcgis,${e}`
4906
4905
  ].join(""), n) {
4907
- const r = j().name;
4906
+ const r = J().name;
4908
4907
  i += `,"${r}/",".js"`;
4909
4908
  }
4910
4909
  return i += ")", i;
4911
4910
  }
4912
- function Bn(e, t) {
4911
+ function Wn(e, t) {
4913
4912
  const i = [], n = [], s = [], r = /* @__PURE__ */ new Set(), a = [];
4914
4913
  let c = 0;
4915
- const l = e.code.matchAll(kc);
4916
- for (const w of l) {
4917
- const [E, I, F, N, M] = w, H = M.startsWith(Be);
4918
- if (c !== 0 && c !== w.index) {
4919
- const K = e.code.slice(c, w.index);
4914
+ const l = e.code.matchAll(xc);
4915
+ for (const b of l) {
4916
+ const [E, I, F, N, R] = b, H = R.startsWith(Be);
4917
+ if (c !== 0 && c !== b.index) {
4918
+ const K = e.code.slice(c, b.index);
4920
4919
  s.push(K), a.push([c, K.length, 0, ""]);
4921
4920
  }
4922
- if (c = w.index + E.length, H)
4923
- a.push([w.index, E.length, 0, ""]), n.push(`"${Hn(M.slice(Be.length))}"`), i.push(I?.replaceAll(" as ", ":") ?? F ?? N ?? "");
4921
+ 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 ?? "");
4924
4923
  else {
4925
- const K = _n(M, t), q = K?.isAsync === !0;
4924
+ const K = Bn(R, t), q = K?.isAsync === !0;
4926
4925
  if (I !== void 0) {
4927
4926
  const xe = [];
4928
4927
  for (const Ze of I.slice(1, -1).split(",")) {
@@ -4931,14 +4930,14 @@ function Bn(e, t) {
4931
4930
  }
4932
4931
  if (q) {
4933
4932
  const Ze = K.oldSingleExportName === void 0 ? `{${xe.join(",")}}` : xe[0].split(":")[1];
4934
- a.push([w.index + 6, 0, I.length, Ze]);
4933
+ a.push([b.index + 6, 0, I.length, Ze]);
4935
4934
  }
4936
4935
  } else if (F === void 0 && N === void 0)
4937
- q && a.push([w.index + 6, 0, 0, ""]);
4936
+ q && a.push([b.index + 6, 0, 0, ""]);
4938
4937
  else {
4939
4938
  if (q)
4940
4939
  throw Error(
4941
- b(
4940
+ w(
4942
4941
  _,
4943
4942
  `Expected local import specifiers to use only named or side-effect import syntax. Found ${E}`
4944
4943
  )
@@ -4948,94 +4947,94 @@ function Bn(e, t) {
4948
4947
  }
4949
4948
  }
4950
4949
  if (e.isAsync = a.length > 0, !e.isAsync) {
4951
- e.code = Ci(e.code, t);
4950
+ e.code = Ei(e.code, t);
4952
4951
  return;
4953
4952
  }
4954
- const d = Lc(r);
4953
+ const d = Ic(r);
4955
4954
  let p = e.code.slice(0, c);
4956
- for (let w = a.length - 1; w >= 0; w--) {
4957
- const [E, I, F, N] = a[w];
4958
- let M = I, H = "";
4955
+ for (let b = a.length - 1; b >= 0; b--) {
4956
+ const [E, I, F, N] = a[b];
4957
+ let R = I, H = "";
4959
4958
  if (I === 0) {
4960
4959
  const q = d();
4961
- n.push(q), H = ` ${q} from`, N !== "" ? (M = F + 4, i.push(N)) : i.push("");
4960
+ n.push(q), H = ` ${q} from`, N !== "" ? (R = F + 4, i.push(N)) : i.push("");
4962
4961
  }
4963
- p = p.slice(0, E) + H + p.slice(E + M);
4962
+ p = p.slice(0, E) + H + p.slice(E + R);
4964
4963
  }
4965
- const m = Ac.exec(e.code), f = m?.index ?? e.code.length;
4964
+ const m = kc.exec(e.code), f = m?.index ?? e.code.length;
4966
4965
  let g = "";
4967
4966
  if (m !== null) {
4968
- const w = m[1].split(",");
4969
- if (w.length > 1)
4970
- g = `return{${w.map((E) => {
4967
+ const b = m[1].split(",");
4968
+ if (b.length > 1)
4969
+ g = `return{${b.map((E) => {
4971
4970
  const [I, F = I] = E.split(" as ");
4972
4971
  return `${F}:${I}`;
4973
4972
  }).join(",")}}`;
4974
4973
  else {
4975
- const [E, I = E] = w[0].split(" as ");
4974
+ const [E, I = E] = b[0].split(" as ");
4976
4975
  e.oldSingleExportName = I, g = `return ${E}`;
4977
4976
  }
4978
4977
  }
4979
- const y = i.findLastIndex((w) => w.length > 0), h = i.slice(0, y + 1).join(","), S = `export default $arcgis.t(${i.length === 0 ? "_" : `([${h}])`}=>{`, T = n.join(","), x = `${g}},${T})`;
4978
+ 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})`;
4980
4979
  let L = e.code.slice(c, f);
4981
- L = `${s.join("")}${L}`, L = Ci(L, t);
4980
+ L = `${s.join("")}${L}`, L = Ei(L, t);
4982
4981
  const $ = `${p}${S}${L}${x}`;
4983
4982
  e.code = $;
4984
4983
  }
4985
- const kc = /import(?:(\{[^}]+\})from|\*as (\w+) from| ([\w$]+) from)?"([^"]+)";/gu, Ac = /export\{([^}]+)\};\n$/u, Be = "@arcgis/core/";
4986
- function _n(e, t) {
4984
+ const xc = /import(?:(\{[^}]+\})from|\*as (\w+) from| ([\w$]+) from)?"([^"]+)";/gu, kc = /export\{([^}]+)\};\n$/u, Be = "@arcgis/core/";
4985
+ function Bn(e, t) {
4987
4986
  if (!e.startsWith("./"))
4988
4987
  return;
4989
4988
  const i = e.slice(2), n = t.get(i);
4990
4989
  if (n === void 0)
4991
- throw Error(b(_, `Failed to find the ${e} module`));
4992
- if (n.isAsync === void 0 && Bn(n, t), n.isAsync === void 0)
4993
- throw Error(b(_, `Failed to infer whether the ${e} module has top-level await`));
4990
+ throw Error(w(_, `Failed to find the ${e} module`));
4991
+ if (n.isAsync === void 0 && Wn(n, t), n.isAsync === void 0)
4992
+ throw Error(w(_, `Failed to infer whether the ${e} module has top-level await`));
4994
4993
  return n;
4995
4994
  }
4996
- function Ci(e, t) {
4997
- return e.replaceAll(Ic, (i, n) => {
4995
+ function Ei(e, t) {
4996
+ return e.replaceAll(Ac, (i, n) => {
4998
4997
  if (n.startsWith(Be))
4999
- return `$arcgis.t(m=>m[0],"${Hn(n.slice(Be.length))}")`;
4998
+ return `$arcgis.t(m=>m[0],"${_n(n.slice(Be.length))}")`;
5000
4999
  if (n.startsWith("./")) {
5001
- const s = _n(n, t);
5000
+ const s = Bn(n, t);
5002
5001
  if (s?.isAsync === !0)
5003
5002
  return `${i}.then(m=>m.default${s.oldSingleExportName === void 0 ? "" : `.then(e=>({${s.oldSingleExportName}:e}))`})`;
5004
5003
  }
5005
5004
  return i;
5006
5005
  });
5007
5006
  }
5008
- const Ic = /(?<![.\w\d])import\("([^"]+)"\)/gu, Hn = (e) => e.endsWith(".js") ? e.slice(0, -3) : e;
5009
- function Lc(e) {
5010
- const t = [Un];
5007
+ const Ac = /(?<![.\w\d])import\("([^"]+)"\)/gu, _n = (e) => e.endsWith(".js") ? e.slice(0, -3) : e;
5008
+ function Ic(e) {
5009
+ const t = [Hn];
5011
5010
  return () => {
5012
5011
  for (; ; ) {
5013
- const i = Dc(t);
5014
- if (jc(t), !e.has(i))
5012
+ const i = Nc(t);
5013
+ if (Dc(t), !e.has(i))
5015
5014
  return e.add(i), i;
5016
5015
  }
5017
5016
  };
5018
5017
  }
5019
- const Un = 0, jt = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_", zn = `${jt}0123456789`, Fc = jt.length, Nc = zn.length;
5020
- function Dc(e) {
5018
+ const Hn = 0, jt = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_", Un = `${jt}0123456789`, Lc = jt.length, Fc = Un.length;
5019
+ function Nc(e) {
5021
5020
  let t = jt[e[0]];
5022
5021
  for (let i = 1; i < e.length; i++)
5023
- t += zn[e[i]];
5022
+ t += Un[e[i]];
5024
5023
  return t;
5025
5024
  }
5026
- function jc(e) {
5025
+ function Dc(e) {
5027
5026
  let t = e.length - 1;
5028
5027
  for (; t >= 0; ) {
5029
- const i = t === 0 ? Fc : Nc;
5028
+ const i = t === 0 ? Lc : Fc;
5030
5029
  if (e[t] += 1, e[t] >= i)
5031
5030
  e[t] = 0, t--;
5032
5031
  else
5033
5032
  return;
5034
5033
  }
5035
- e = new Array(e.length + 1).fill(Un);
5034
+ e = new Array(e.length + 1).fill(Hn);
5036
5035
  }
5037
- async function Rc(e, t, i, n) {
5038
- const s = t.packageName, r = await _e(s), { hasCss: a, cdnName: c } = await qn(u.join(r, "dist")) ?? {};
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
5038
  if (i === "cdn") {
5040
5039
  const m = await He(r), f = t.cdnUrl ?? qe(m, !0);
5041
5040
  return [
@@ -5078,25 +5077,25 @@ async function Rc(e, t, i, n) {
5078
5077
  }
5079
5078
  ];
5080
5079
  }
5081
- async function qn(e) {
5080
+ async function zn(e) {
5082
5081
  const i = (await Ue(e)).filter(
5083
- (s) => !Kn.has(s) && !s.includes(".")
5082
+ (s) => !Jn.has(s) && !s.includes(".")
5084
5083
  ), n = i.find((s) => s.startsWith("arcgis-"));
5085
5084
  return n === void 0 ? await Promise.all(
5086
- i.map(async (s) => await $i(e, s))
5087
- ).then((s) => s.find(R)) : await $i(e, n);
5085
+ i.map(async (s) => await Ci(e, s))
5086
+ ).then((s) => s.find(j)) : await Ci(e, n);
5088
5087
  }
5089
- async function $i(e, t) {
5088
+ async function Ci(e, t) {
5090
5089
  const i = u.join(e, t, `${t}.css`), n = u.join(e, t, "assets"), [s, r] = await Promise.all([U(i), U(n)]);
5091
5090
  return s || r ? {
5092
5091
  hasCss: s,
5093
5092
  cdnName: t
5094
5093
  } : void 0;
5095
5094
  }
5096
- async function Mc(e, t, i, n) {
5097
- const s = t.packageName, r = await _e(s), a = await He(r), c = await qn(u.join(r, "dist"));
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
5097
  if (i === "cdn") {
5099
- const g = a.exports?.[`./${be}.css`] === void 0, y = g ? c.cdnName : Wn;
5098
+ const g = a.exports?.[`./${be}.css`] === void 0, y = g ? c.cdnName : Kn;
5100
5099
  return {
5101
5100
  tag: "script",
5102
5101
  attrs: {
@@ -5105,7 +5104,7 @@ async function Mc(e, t, i, n) {
5105
5104
  }
5106
5105
  };
5107
5106
  }
5108
- const l = c?.cdnName ?? Dt, d = Oc(a), p = `${s}/${u.normalize(d)}${Z}`, m = [
5107
+ const l = c?.cdnName ?? Dt, d = Mc(a), p = `${s}/${u.normalize(d)}${Z}`, m = [
5109
5108
  `import styles$${n} from "${p}";`,
5110
5109
  `document.adoptedStyleSheets = [...document.adoptedStyleSheets, styles$${n}.styleSheet];`
5111
5110
  ], f = `${s}/loader`;
@@ -5124,7 +5123,7 @@ async function Mc(e, t, i, n) {
5124
5123
  ]
5125
5124
  };
5126
5125
  }
5127
- function Oc(e) {
5126
+ function Mc(e) {
5128
5127
  const { exports: t } = e;
5129
5128
  if (t === void 0)
5130
5129
  throw new Error(
@@ -5134,21 +5133,21 @@ function Oc(e) {
5134
5133
  return n ? n[0] : i.length > 0 ? i[0][0] : `./${be}.css`;
5135
5134
  }
5136
5135
  async function Te(e) {
5137
- return e._loadersCache ??= Jc(e), await e._loadersCache;
5136
+ return e._loadersCache ??= Oc(e), await e._loadersCache;
5138
5137
  }
5139
- async function Jc(e) {
5138
+ async function Oc(e) {
5140
5139
  const t = e.viteCommand === "build" ? "cdn" : "lazyNpm", i = e.viteConfig.base;
5141
5140
  let n = 0;
5142
5141
  const s = async (l) => (await Promise.all(
5143
5142
  l.map(async (d) => {
5144
5143
  const p = n++;
5145
- return d.type === "stencil" ? await Rc(i, d, t, p) : d.type === "@arcgis/lumina" ? await Mc(i, d, t, p) : void 0;
5144
+ return d.type === "stencil" ? await jc(i, d, t, p) : d.type === "@arcgis/lumina" ? await Rc(i, d, t, p) : void 0;
5146
5145
  })
5147
- )).filter(R).flat(), r = await Promise.all([
5146
+ )).filter(j).flat(), r = await Promise.all([
5148
5147
  // This may contain an import map so must be first
5149
- fc(i, t),
5148
+ mc(i, t),
5150
5149
  ve.then(s),
5151
- Gn(e).then(s)
5150
+ qn(e).then(s)
5152
5151
  ]), a = u.join(e.dir.src, "loader.ts");
5153
5152
  return [
5154
5153
  ...r.flat(),
@@ -5167,14 +5166,14 @@ async function Jc(e) {
5167
5166
  }
5168
5167
  ];
5169
5168
  }
5170
- async function Gn(e) {
5169
+ async function qn(e) {
5171
5170
  const t = e.options?.serve?.extraDependencies ?? [];
5172
5171
  return t.length === 0 ? [] : (e._serveOnlyDependencies ??= Promise.all(
5173
5172
  t.map(async (i) => {
5174
- const n = typeof i == "string" ? i : i.name, s = await hn(n);
5173
+ const n = typeof i == "string" ? i : i.name, s = await yn(n);
5175
5174
  if (s === void 0)
5176
5175
  throw Error(
5177
- b(
5176
+ w(
5178
5177
  "@arcgis/lumina:computeServeOnlyDependencies",
5179
5178
  `Unable to resolve extra dependency "${n}". Make sure it is a valid Stencil or Lumina package.`
5180
5179
  )
@@ -5184,12 +5183,12 @@ async function Gn(e) {
5184
5183
  cdnUrl: typeof i == "string" ? void 0 : i.getCdnUrl(e)
5185
5184
  };
5186
5185
  })
5187
- ).then((i) => i.filter(R)), await e._serveOnlyDependencies);
5186
+ ).then((i) => i.filter(j)), await e._serveOnlyDependencies);
5188
5187
  }
5189
- const Vn = "/@arcgis/lumina-compiler/testSetupFile", lt = [Vn];
5190
- async function Kc(e) {
5188
+ const Gn = "/@arcgis/lumina-compiler/testSetupFile", lt = [Gn];
5189
+ async function Jc(e) {
5191
5190
  if (!e.viteConfig.test?.browser?.enabled)
5192
- return Pi(e);
5191
+ return $i(e);
5193
5192
  const i = (await Te(e)).map((n, s) => {
5194
5193
  if ("javascriptCode" in n)
5195
5194
  return n.javascriptCode.join(`
@@ -5205,7 +5204,7 @@ async function Kc(e) {
5205
5204
  ].join(`
5206
5205
  `);
5207
5206
  throw Error(
5208
- b(
5207
+ w(
5209
5208
  "@arcgis/lumina:buildTestSetupFile",
5210
5209
  `Unexpected loader type for the browser test environment: ${JSON.stringify(n)}`
5211
5210
  )
@@ -5213,14 +5212,14 @@ async function Kc(e) {
5213
5212
  }).join(`
5214
5213
 
5215
5214
  `);
5216
- return [Pi(e), i].join("");
5215
+ return [$i(e), i].join("");
5217
5216
  }
5218
- const Pi = (e) => [e.isInPuppeteerTestBackEnd ? Wc : "", Bc].join(""), Wc = `import { setupPuppeteerTest } from "@arcgis/lumina-compiler/puppeteerTesting";
5217
+ const $i = (e) => [e.isInPuppeteerTestBackEnd ? Kc : "", Wc].join(""), Kc = `import { setupPuppeteerTest } from "@arcgis/lumina-compiler/puppeteerTesting";
5219
5218
  setupPuppeteerTest();
5220
- `, Bc = `import { setupLuminaTest } from "@arcgis/lumina-compiler/testing";
5219
+ `, Wc = `import { setupLuminaTest } from "@arcgis/lumina-compiler/testing";
5221
5220
  setupLuminaTest();
5222
5221
  `;
5223
- function _c(e) {
5222
+ function Bc(e) {
5224
5223
  let t = !0, i = !1, n, s, r, a, c;
5225
5224
  const l = "@arcgis/lumina:generateVirtualFiles", d = {
5226
5225
  name: l,
@@ -5230,20 +5229,20 @@ function _c(e) {
5230
5229
  },
5231
5230
  resolveId: (y) => y === a || y === c ? a : void 0,
5232
5231
  async load(y) {
5233
- const h = y.startsWith(Vn);
5232
+ const h = y.startsWith(Gn);
5234
5233
  if (!(!y.endsWith(".tsx") && y !== a && !h)) {
5235
5234
  if (s === void 0 && !e.isInPuppeteerTestBackEnd) {
5236
- r === void 0 && clearTimeout(n), r ??= Bo(e, t).catch((S) => {
5235
+ r === void 0 && clearTimeout(n), r ??= Wo(e, t).catch((S) => {
5237
5236
  throw i = !0, S;
5238
5237
  }), t = !1;
5239
5238
  const v = await r;
5240
5239
  s ??= v;
5241
5240
  }
5242
- return y === a ? Lo(e) : h ? await Kc(e) : void 0;
5241
+ return y === a ? Io(e) : h ? await Jc(e) : void 0;
5243
5242
  }
5244
5243
  },
5245
5244
  async writeBundle() {
5246
- e.isInStorybook || await D(u.join(e.dir.dist, "loader.d.ts"), Fo);
5245
+ e.isInStorybook || await D(u.join(e.dir.dist, "loader.d.ts"), Lo);
5247
5246
  },
5248
5247
  async handleHotUpdate({ file: y, modules: h, read: v }) {
5249
5248
  const S = await p(y, v);
@@ -5257,7 +5256,7 @@ function _c(e) {
5257
5256
  if (e.isInPuppeteerTestBackEnd)
5258
5257
  return;
5259
5258
  e.isInTest && y.watcher.on("change", (v) => {
5260
- p(v, async () => await J(v, "utf8")).catch(
5259
+ p(v, async () => await O(v, "utf8")).catch(
5261
5260
  (S) => C.warn(l, v, String(S))
5262
5261
  );
5263
5262
  }), y.watcher.on("add", h), y.watcher.on("unlink", h), y.watcher.on(
@@ -5308,11 +5307,11 @@ function _c(e) {
5308
5307
  if (!he(y, e.dir.srcComponents))
5309
5308
  return;
5310
5309
  v ??= await h();
5311
- const T = _o(e, y, v);
5310
+ const T = Bo(e, y, v);
5312
5311
  if (T === void 0)
5313
5312
  return !1;
5314
5313
  for (const x of T) {
5315
- const L = un(x);
5314
+ const L = pn(x);
5316
5315
  e.server.ws.send({ type: "custom", event: "component-meta-update", data: L });
5317
5316
  }
5318
5317
  return f(), !0;
@@ -5333,15 +5332,15 @@ function _c(e) {
5333
5332
  const St = "@arcgis/lumina:provideAssets";
5334
5333
  function fe(e, t, i = Rt) {
5335
5334
  if (e.viteCommand !== "serve")
5336
- throw Error(b(St, "serveAssets() is only available when Vite is running in serve mode"));
5335
+ throw Error(w(St, "serveAssets() is only available when Vite is running in serve mode"));
5337
5336
  const n = e._serverConfigured, s = e.server.middlewares.stack.length;
5338
5337
  if (t.forEach((r) => {
5339
- const a = Qn(r), c = Yn(e.dir, Zn(a)), l = Uc(e.viteConfig.base, c, e.dir.distCdn);
5338
+ const a = Xn(r), c = Zn(e.dir, Qn(a)), l = Hc(e.viteConfig.base, c, e.dir.distCdn);
5340
5339
  e.server.middlewares.use(l, (d, p, m) => {
5341
- const f = zc(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));
5342
- return (typeof g == "function" ? Promise.resolve(g()) : J(g)).then((v) => {
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));
5341
+ return (typeof g == "function" ? Promise.resolve(g()) : O(g)).then((v) => {
5343
5342
  const S = (typeof g == "function" ? void 0 : h?.transform(v.toString("utf8"), y, e)) ?? v;
5344
- p.setHeader("Cache-Control", "max-age=31536000, immutable"), p.setHeader("Content-Type", js.lookup(f) || "application/octet-stream"), p.write(S), p.end();
5343
+ p.setHeader("Cache-Control", "max-age=31536000, immutable"), p.setHeader("Content-Type", Ds.lookup(f) || "application/octet-stream"), p.write(S), p.end();
5345
5344
  }).catch((v) => {
5346
5345
  (a.type !== "directory" || process.env.DEBUG) && C.warn(
5347
5346
  St,
@@ -5354,22 +5353,22 @@ function fe(e, t, i = Rt) {
5354
5353
  e.server.middlewares.stack.splice(0, 0, ...r);
5355
5354
  }
5356
5355
  }
5357
- async function Xn(e, t, i = Rt) {
5356
+ async function Vn(e, t, i = Rt) {
5358
5357
  await Promise.all(
5359
5358
  t.map(async (n) => {
5360
- const s = Qn(n), r = Yn(e.dir, Zn(s));
5359
+ const s = Xn(n), r = Zn(e.dir, Qn(s));
5361
5360
  if (s.type === "directory") {
5362
5361
  const a = u.resolve(s.source), l = (await Ue(a, { recursive: !0, withFileTypes: !0 })).filter((d) => d.isFile()).map((d) => {
5363
5362
  const p = u.resolve(d.parentPath, d.name), m = u.relative(a, p), f = u.join(r, m);
5364
5363
  return [p, f];
5365
5364
  });
5366
- await ts(l.map(([d, p]) => p)), await Promise.all(
5365
+ await es(l.map(([d, p]) => p)), await Promise.all(
5367
5366
  l.map(
5368
- async ([d, p]) => await xi(d, p, i, e)
5367
+ async ([d, p]) => await Pi(d, p, i, e)
5369
5368
  )
5370
5369
  );
5371
5370
  } else if (s.type === "file")
5372
- await Q(u.dirname(r), { recursive: !0 }), await xi(s.source, r, i, e);
5371
+ await Q(u.dirname(r), { recursive: !0 }), await Pi(s.source, r, i, e);
5373
5372
  else if (s.type === "dynamic") {
5374
5373
  await Q(u.dirname(r), { recursive: !0 });
5375
5374
  const a = await Promise.resolve(s.source());
@@ -5378,7 +5377,7 @@ async function Xn(e, t, i = Rt) {
5378
5377
  })
5379
5378
  );
5380
5379
  }
5381
- const Qn = Ri ? (e) => e : (e) => e.type === "dynamic" ? {
5380
+ const Xn = ji ? (e) => e : (e) => e.type === "dynamic" ? {
5382
5381
  ...e,
5383
5382
  destination: Le(e.destination)
5384
5383
  } : {
@@ -5386,22 +5385,22 @@ const Qn = Ri ? (e) => e : (e) => e.type === "dynamic" ? {
5386
5385
  source: Le(e.source),
5387
5386
  destination: Le(e.destination)
5388
5387
  };
5389
- async function xi(e, t, i, n) {
5388
+ async function Pi(e, t, i, n) {
5390
5389
  const s = i.find((r) => r.match(t, n));
5391
5390
  if (s === void 0)
5392
- await Cs(e, t);
5391
+ await Es(e, t);
5393
5392
  else {
5394
- const r = await J(e, "utf8"), a = s.transform(r, t, n);
5393
+ const r = await O(e, "utf8"), a = s.transform(r, t, n);
5395
5394
  await D(t, a);
5396
5395
  }
5397
5396
  }
5398
- function Zn(e) {
5397
+ function Qn(e) {
5399
5398
  if (e.type === "dynamic")
5400
5399
  return e.destination;
5401
5400
  if (e.source.endsWith(u.sep)) {
5402
5401
  if (e.type === "file")
5403
5402
  throw Error(
5404
- b(
5403
+ w(
5405
5404
  St,
5406
5405
  `Unexpectedly tried to provide an asset with type "file", whose source looks like a directory: ${ee(e.source)}. If source is meant to be a directory, change to "type":"directory". If source is a file, make sure source path does not end with / or \\`
5407
5406
  )
@@ -5410,34 +5409,34 @@ function Zn(e) {
5410
5409
  }
5411
5410
  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;
5412
5411
  }
5413
- function Yn({ dist: e, distCdnAssets: t }, i) {
5414
- const n = Hc(i), s = u.join(
5412
+ function Zn({ dist: e, distCdnAssets: t }, i) {
5413
+ const n = _c(i), s = u.join(
5415
5414
  t,
5416
5415
  n ? u.relative(t, i) : i
5417
- ), r = u.relative(e, s), a = es(r);
5416
+ ), r = u.relative(e, s), a = Yn(r);
5418
5417
  return u.join(e, a);
5419
5418
  }
5420
- function Hc(e) {
5419
+ function _c(e) {
5421
5420
  if (e.startsWith(u.sep)) {
5422
- const t = Mi(), i = t.startsWith(u.sep) ? t.split(u.sep)[1] ?? "" : "";
5421
+ const t = Ri(), i = t.startsWith(u.sep) ? t.split(u.sep)[1] ?? "" : "";
5423
5422
  return e.startsWith(`/${i}/`) || e.startsWith("/Users/");
5424
5423
  } else
5425
- return !!(!Ri && u.isAbsolute(e));
5424
+ return !!(!ji && u.isAbsolute(e));
5426
5425
  }
5427
- function Uc(e, t, i) {
5428
- const n = es(u.relative(i, t)), s = n.startsWith("/") ? n.slice(1) : n;
5426
+ function Hc(e, t, i) {
5427
+ const n = Yn(u.relative(i, t)), s = n.startsWith("/") ? n.slice(1) : n;
5429
5428
  return `${e}${s}`;
5430
5429
  }
5431
- const es = (e) => e.replaceAll("../", ""), zc = (e = "") => e.split("?")[0].split("#")[0];
5432
- async function ts(e) {
5430
+ const Yn = (e) => e.replaceAll("../", ""), Uc = (e = "") => e.split("?")[0].split("#")[0];
5431
+ async function es(e) {
5433
5432
  const t = new Set(e.map(u.dirname));
5434
5433
  await Promise.all(Array.from(t, async (i) => await Q(i, { recursive: !0 })));
5435
5434
  }
5436
- const qc = {
5435
+ const zc = {
5437
5436
  match: (e, t) => t.environment === "production" && e.endsWith(".json"),
5438
5437
  transform: (e) => JSON.stringify(JSON.parse(e))
5439
- }, Rt = [qc];
5440
- function Gc(e) {
5438
+ }, Rt = [zc];
5439
+ function qc(e) {
5441
5440
  let t;
5442
5441
  const i = () => [
5443
5442
  ...e.options.assets?.transformers ?? [],
@@ -5446,35 +5445,35 @@ function Gc(e) {
5446
5445
  return {
5447
5446
  name: "@arcgis/lumina:handleStaticAssets",
5448
5447
  configResolved() {
5449
- t = Vc(e);
5448
+ t = Gc(e);
5450
5449
  },
5451
5450
  async configureServer(n) {
5452
5451
  e.server = n, !e.isInPuppeteerTestBackEnd && (fe(e, await t, i()), n.watcher.on("addDir", (s) => {
5453
5452
  if (s.endsWith("assets")) {
5454
5453
  const r = u.dirname(s);
5455
- u.join(r, "/") === e.dir.root ? fe(e, [ns], i()) : s.startsWith(e.dir.srcComponents) && fe(e, [is(s, r)], i());
5454
+ u.join(r, "/") === e.dir.root ? fe(e, [is], i()) : s.startsWith(e.dir.srcComponents) && fe(e, [ts(s, r)], i());
5456
5455
  }
5457
5456
  }));
5458
5457
  },
5459
5458
  async writeBundle() {
5460
- await Xn(e, await t, i());
5459
+ await Vn(e, await t, i());
5461
5460
  }
5462
5461
  };
5463
5462
  }
5464
- async function Vc(e) {
5463
+ async function Gc(e) {
5465
5464
  const t = U("assets"), i = await e.componentFilesPromise, n = await Promise.all(
5466
5465
  i.map(async (s) => {
5467
5466
  const r = u.dirname(s), a = u.join(r, "assets");
5468
- return await U(a) ? is(a, r) : void 0;
5467
+ return await U(a) ? ts(a, r) : void 0;
5469
5468
  })
5470
5469
  );
5471
- return await t && n.push(ns), n.filter(R);
5470
+ return await t && n.push(is), n.filter(j);
5472
5471
  }
5473
- const is = (e, t) => ({
5472
+ const ts = (e, t) => ({
5474
5473
  type: "directory",
5475
5474
  source: e,
5476
5475
  destination: u.basename(t)
5477
- }), ns = { type: "directory", source: "assets/", destination: "" }, dt = "@arcgis/lumina:printTotalBuildSize", Xc = (e) => ({
5476
+ }), is = { type: "directory", source: "assets/", destination: "" }, dt = "@arcgis/lumina:printTotalBuildSize", Vc = (e) => ({
5478
5477
  name: dt,
5479
5478
  apply: () => e.viteCommand === "build",
5480
5479
  configResolved(t) {
@@ -5485,16 +5484,16 @@ const is = (e, t) => ({
5485
5484
  }
5486
5485
  const n = i.writeBundle;
5487
5486
  if (typeof n != "function")
5488
- throw Error(b(dt, "Expected vite:reporter to declare a writeBundle() function"));
5487
+ throw Error(w(dt, "Expected vite:reporter to declare a writeBundle() function"));
5489
5488
  i.writeBundle = async function(r, a) {
5490
5489
  let c = 0, l = 0, d = 0, p = 0;
5491
5490
  const m = console.log;
5492
5491
  console.log = function(...g) {
5493
5492
  if (m.apply(console, g), g.length === 1 && typeof g[0] == "string") {
5494
- const [y, h] = g[0].match(Zc) ?? [];
5493
+ const [y, h] = g[0].match(Qc) ?? [];
5495
5494
  if (!y)
5496
5495
  return;
5497
- p || (p = g[0].slice(0, g[0].indexOf(y) + y.length).replaceAll(Yc, "").length);
5496
+ p || (p = g[0].slice(0, g[0].indexOf(y) + y.length).replaceAll(Zc, "").length);
5498
5497
  const v = Number.parseFloat(y.replace(" kB", "").replaceAll(",", ""));
5499
5498
  h ? (d += Number.parseFloat(h.replace(" kB", "").replaceAll(",", "")), l += v) : c += v;
5500
5499
  }
@@ -5505,27 +5504,27 @@ const is = (e, t) => ({
5505
5504
  console.log = m;
5506
5505
  }
5507
5506
  if (l > 0) {
5508
- const g = d > 0 ? l : c, y = Ii(g), h = e.dir.relativeDist;
5507
+ const g = d > 0 ? l : c, y = Ai(g), h = e.dir.relativeDist;
5509
5508
  console.log(
5510
5509
  [
5511
- Ai,
5510
+ ki,
5512
5511
  h,
5513
- Qc,
5512
+ Xc,
5514
5513
  "*",
5515
5514
  " ".repeat(p - `${h}*`.length - y.length),
5516
5515
  y,
5517
- ki,
5518
- d > 0 ? ` ${Ai}│ gzip: ${Ii(d)}${ki}` : ""
5516
+ xi,
5517
+ d > 0 ? ` ${ki}│ gzip: ${Ai(d)}${xi}` : ""
5519
5518
  ].join("")
5520
5519
  );
5521
5520
  }
5522
5521
  };
5523
5522
  }
5524
- }), ki = "\x1B[22m\x1B[1m\x1B[22m", Ai = "\x1B[2m", Qc = "\x1B[22m\x1B[36m", Zc = /\d+(?:,\d+)?\.\d{2} kB/gu, Yc = /\x1B\[\d+m/gu, el = new Intl.NumberFormat("en", {
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", {
5525
5524
  maximumFractionDigits: 2,
5526
5525
  minimumFractionDigits: 2
5527
- }), Ii = (e) => `${el.format(e)} kB`, Li = "@arcgis/lumina:configureVite", tl = (e) => ({
5528
- name: Li,
5526
+ }), Ai = (e) => `${Yc.format(e)} kB`, Ii = "@arcgis/lumina:configureVite", el = (e) => ({
5527
+ name: Ii,
5529
5528
  async config({
5530
5529
  server: t,
5531
5530
  publicDir: i,
@@ -5541,7 +5540,7 @@ const is = (e, t) => ({
5541
5540
  */
5542
5541
  loader: "src/loader.ts",
5543
5542
  // Entrypoint for bundling used components only:
5544
- ...await Jr(e)
5543
+ ...await Or(e)
5545
5544
  }, { loader: y, ...h } = g, v = e.environment === "development" || e.isInTest ? {
5546
5545
  "process.env.ESRI_INTERNAL": "true"
5547
5546
  } : void 0, S = !import.meta.url.includes("node_modules"), T = {
@@ -5631,7 +5630,7 @@ const is = (e, t) => ({
5631
5630
  if (typeof l.setupFiles == "string" ? l.setupFiles = [...lt, l.setupFiles] : Array.isArray(l.setupFiles) ? l.setupFiles = [...lt, ...l.setupFiles] : l.setupFiles = [...lt], e.isInPuppeteerTestBackEnd) {
5632
5631
  if (p?.enabled === !0)
5633
5632
  throw Error(
5634
- b(Li, "Can't enable both Vitest browser mode and Puppeteer testing at the same time")
5633
+ w(Ii, "Can't enable both Vitest browser mode and Puppeteer testing at the same time")
5635
5634
  );
5636
5635
  return {
5637
5636
  test: {
@@ -5665,7 +5664,7 @@ const is = (e, t) => ({
5665
5664
  publicDir: i ?? !1,
5666
5665
  build: {
5667
5666
  cssMinify: n ?? (e.environment === "production" ? !0 : void 0),
5668
- target: s ?? Jn(e.typeScriptConfig),
5667
+ target: s ?? On(e.typeScriptConfig),
5669
5668
  sourcemap: r ?? (e.environment === "development" ? "inline" : e.options.build?.enableSourceMapsInProduction ?? !1),
5670
5669
  lib: {
5671
5670
  entry: g,
@@ -5694,27 +5693,27 @@ const is = (e, t) => ({
5694
5693
  browser: {
5695
5694
  enabled: e.isInPuppeteerTestFrontEnd ? !1 : p?.enabled ?? !0,
5696
5695
  instances: p?.instances === void 0 ? [{ browser: "chromium" }] : void 0,
5697
- provider: p?.provider ?? Os
5696
+ provider: p?.provider ?? Ms
5698
5697
  }
5699
5698
  }
5700
5699
  };
5701
5700
  }
5702
- }), il = (e) => ({
5701
+ }), tl = (e) => ({
5703
5702
  name: "@arcgis/lumina:setAssetPath",
5704
5703
  apply: () => e.viteCommand === "build",
5705
5704
  config: (t) => ({
5706
5705
  base: t.base ?? e.options.assets?.defaultPath ?? qe()
5707
5706
  })
5708
5707
  });
5709
- function nl(e = j()) {
5708
+ function il(e = J()) {
5710
5709
  const t = e.version ?? "0.0.1";
5711
- return ws(t);
5710
+ return Ss(t);
5712
5711
  }
5713
- const sl = (e) => `/*! ${e} */`, k = (e) => (t, i) => {
5712
+ const nl = (e) => `/*! ${e} */`, k = (e) => (t, i) => {
5714
5713
  Object.defineProperty(t, i, {
5715
5714
  get() {
5716
5715
  throw Error(
5717
- b(
5716
+ w(
5718
5717
  "@arcgis/lumina:context",
5719
5718
  `Tried to access '${String(i)}' before it was set. You can't access this property in global scope. However, it will be accessible by the time the following Vite plugin hook is called: ${e}`
5720
5719
  )
@@ -5735,7 +5734,7 @@ const sl = (e) => `/*! ${e} */`, k = (e) => (t, i) => {
5735
5734
  function de(e) {
5736
5735
  if (u.isAbsolute(e))
5737
5736
  throw Error(
5738
- b(
5737
+ w(
5739
5738
  "@arcgis/lumina:context",
5740
5739
  `Documentation file name was expected to be a relative path (relative to dist). Instead, received an absolute path: ${e}`
5741
5740
  )
@@ -5749,15 +5748,15 @@ const pe = {
5749
5748
  apiJson: "docs/api.json",
5750
5749
  stencilLikeDocsJson: "docs/docs.json"
5751
5750
  };
5752
- async function ss(e, t, i, n, s = j()) {
5753
- const r = rl(e, i, n, s), a = u.join(t, "lumina.ts"), l = await U(a) ? await J(a, "utf8") : "";
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
5753
  if (l.trim().replaceAll(`\r
5755
5754
  `, `
5756
5755
  `) === r.trim())
5757
5756
  return !1;
5758
5757
  if (process.env.CI)
5759
5758
  throw Error(
5760
- b(
5759
+ w(
5761
5760
  "@arcgis/lumina:updateLuminaTs",
5762
5761
  `lumina.ts is out of date. Start the vite dev server or build locally at least once to update lumina.ts and commit the updated file. Tried to write the following content:
5763
5762
 
@@ -5768,9 +5767,9 @@ Current content:
5768
5767
  ${l}`
5769
5768
  )
5770
5769
  );
5771
- return Ki(a, r), !0;
5770
+ return Ji(a, r), !0;
5772
5771
  }
5773
- function rl(e, t, i, n = j()) {
5772
+ function sl(e, t, i, n = J()) {
5774
5773
  "@arcgis/components-controllers" in (n.dependencies ?? {}) && C.warn(
5775
5774
  "@arcgis/components-controllers",
5776
5775
  "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."
@@ -5785,11 +5784,11 @@ declare module "@arcgis/lumina" {
5785
5784
  interface ImportStencilElements extends ${r.map((m, f) => `JSX$${f}.IntrinsicElements`).join(", ")} {}
5786
5785
  }`, l = n.devDependencies ?? {}, d = i === "preview" ? "matchers" : i === "webdriverio" ? "webdriverio" : "playwright";
5787
5786
  return [
5788
- ol,
5787
+ rl,
5789
5788
  // Avoid cyclic references for tests in @arcgis/lumina
5790
5789
  n.name === "@arcgis/lumina" ? "" : `
5791
5790
  /// <reference types="@arcgis/lumina/typings" />`,
5792
- t ? al : "",
5791
+ t ? ol : "",
5793
5792
  l.vitest ? `
5794
5793
  /// <reference types="vitest/config" />` : "",
5795
5794
  l["@vitest/browser"] ? `
@@ -5803,7 +5802,7 @@ declare module "@arcgis/lumina" {
5803
5802
  `
5804
5803
  ].join("");
5805
5804
  }
5806
- const ol = `/**
5805
+ const rl = `/**
5807
5806
  * This file is autogenerated by \`@arcgis/lumina-compiler\` - do not edit it manually.
5808
5807
  * Manual edits will be overwritten.
5809
5808
  *
@@ -5811,8 +5810,8 @@ const ol = `/**
5811
5810
  * as well as @arcgis/core typings if you use @arcgis/core.
5812
5811
  *
5813
5812
  * If you need to provide additional typings, create a separate file.
5814
- */`, al = `
5815
- /// <reference types="@arcgis/core/interfaces" />`, je = "@arcgis/lumina:dependencySupport", rs = (e, t) => e.viteCommand === "serve" && /**
5813
+ */`, ol = `
5814
+ /// <reference types="@arcgis/core/interfaces" />`, je = "@arcgis/lumina:dependencySupport", ss = (e, t) => e.viteCommand === "serve" && /**
5816
5815
  * Vitest started calling transformIndexHtml in browser mode versions ^2.1.4
5817
5816
  * However, it is a bit buggy (see
5818
5817
  * https://github.com/vitejs/vite/issues/19213). Instead, we are using test
@@ -5823,10 +5822,10 @@ const ol = `/**
5823
5822
  * is doing:
5824
5823
  * https://github.com/storybookjs/storybook/blob/a5c2cf1712f70b4e3ecf38d3c98e7db8e8d67849/code/builders/builder-vite/src/plugins/code-generator-plugin.ts#L110
5825
5824
  */
5826
- e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand === "build" && !e.options.build?.cdn?.skip && e.options.build?.webApp?.destination !== void 0, cl = (e) => ({
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) => ({
5827
5826
  name: je,
5828
5827
  configResolved() {
5829
- !e.isInTest && !e.isInStorybook && (e._updateLuminaTsPromise = ll(e).catch(
5828
+ !e.isInTest && !e.isInStorybook && (e._updateLuminaTsPromise = cl(e).catch(
5830
5829
  (t) => C.error(je, `Failed to update package's src/lumina.ts: ${String(t)}`)
5831
5830
  ));
5832
5831
  },
@@ -5834,7 +5833,7 @@ e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand
5834
5833
  // Add imports to index.html before Vite starts resolving imports
5835
5834
  order: "pre",
5836
5835
  async handler(t, i) {
5837
- return rs(e, i) ? (await Te(e)).map(
5836
+ return ss(e, i) ? (await Te(e)).map(
5838
5837
  (s) => "javascriptCode" in s ? {
5839
5838
  tag: "script",
5840
5839
  attrs: {
@@ -5866,7 +5865,7 @@ e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand
5866
5865
  return n.optimizableImports;
5867
5866
  if ("cssHref" in n)
5868
5867
  return [];
5869
- throw Error(b(je, `Unexpected loader type: ${JSON.stringify(n)}`));
5868
+ throw Error(w(je, `Unexpected loader type: ${JSON.stringify(n)}`));
5870
5869
  });
5871
5870
  e.viteConfig.optimizeDeps.include ??= [], e.viteConfig.optimizeDeps.include.push(...i);
5872
5871
  },
@@ -5874,9 +5873,9 @@ e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand
5874
5873
  await e._updateLuminaTsPromise;
5875
5874
  }
5876
5875
  });
5877
- async function ll(e) {
5878
- const i = (await Promise.all([ve, Gn(e)])).flat();
5879
- if (!await ss(
5876
+ async function cl(e) {
5877
+ const i = (await Promise.all([ve, qn(e)])).flat();
5878
+ if (!await ns(
5880
5879
  i,
5881
5880
  e.dir.src,
5882
5881
  Ce,
@@ -5885,22 +5884,22 @@ async function ll(e) {
5885
5884
  return;
5886
5885
  let s = !1;
5887
5886
  function r() {
5888
- s || C.warn(je, dl), s = !0;
5887
+ s || C.warn(je, ll), s = !0;
5889
5888
  }
5890
5889
  process.on("exit", () => {
5891
5890
  r(), clearTimeout(c);
5892
5891
  });
5893
5892
  const c = setTimeout(r, 2e3);
5894
5893
  }
5895
- const dl = Rs.greenBright(
5894
+ const ll = js.greenBright(
5896
5895
  `lumina.ts has been updated (potentially because your dependencies changed). Please commit the updated file.
5897
5896
  If build failed with TypeScript errors, try running the build again to check whether new lumina.ts resolves the errors.`
5898
5897
  );
5899
- async function pl(e, t) {
5898
+ async function dl(e, t) {
5900
5899
  const i = /* @__PURE__ */ new Map();
5901
5900
  await Promise.all(
5902
5901
  e.map(async (s) => {
5903
- const r = await J(s, "utf-8"), a = r.match(ul)?.[1];
5902
+ const r = await O(s, "utf-8"), a = r.match(pl)?.[1];
5904
5903
  if (a === void 0) {
5905
5904
  C.warn(
5906
5905
  "@arcgis/lumina:parseStoryFiles",
@@ -5912,14 +5911,14 @@ async function pl(e, t) {
5912
5911
  let c = i.get(a);
5913
5912
  c === void 0 && (c = [], i.set(a, c));
5914
5913
  const l = [];
5915
- for (const d of r.matchAll(ml)) {
5916
- const p = d[1], m = hl(p), f = r.indexOf("{", d.index), g = r.indexOf("}", f), y = r.slice(0, d.index).trimEnd();
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
5916
  let h = "";
5918
5917
  if (y.endsWith("*/")) {
5919
5918
  const T = y.lastIndexOf("/**");
5920
- h = y.slice(T + 3, -2).trim().replaceAll(gl, "");
5919
+ h = y.slice(T + 3, -2).trim().replaceAll(fl, "");
5921
5920
  }
5922
- const v = r.slice(f, g).match(fl)?.[1] || m, S = yl(m);
5921
+ const v = r.slice(f, g).match(ml)?.[1] || m, S = gl(m);
5923
5922
  l.push({
5924
5923
  description: `${v}${h ? `
5925
5924
  ${h}` : ""}`,
@@ -5944,11 +5943,11 @@ ${h}` : ""}`,
5944
5943
  }
5945
5944
  return n;
5946
5945
  }
5947
- const ul = /component: ["']([^"']+)["']/u, ml = /export const (\w+)/gu, fl = /name: ["']([^"']+)["']/u, gl = /^\s*\*\s?/gmu, yl = (e) => e.toLowerCase().replace(/[ ’–—―′¿'`~!@#$%^&*()_|+\-=?;:'",.<>{}[\]\\/]/giu, "-").replace(/-+/gu, "-").replace(/^-+/u, "").replace(/-+$/u, ""), hl = (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();
5948
- var vl = Object.defineProperty, A = (e, t, i, n) => {
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
5948
  for (var s = void 0, r = e.length - 1, a; r >= 0; r--)
5950
5949
  (a = e[r]) && (s = a(t, i, s) || s);
5951
- return s && vl(t, i, s), s;
5950
+ return s && hl(t, i, s), s;
5952
5951
  };
5953
5952
  const te = "@arcgis/lumina:context";
5954
5953
  class P {
@@ -5974,9 +5973,9 @@ class P {
5974
5973
  distComponents: m,
5975
5974
  distCdn: f,
5976
5975
  distCdnAssets: g
5977
- }, C.initialize(s.logger, a), s.root !== Mi())
5976
+ }, C.initialize(s.logger, a), s.root !== Ri())
5978
5977
  throw Error(
5979
- b(
5978
+ w(
5980
5979
  te,
5981
5980
  "Vite's config.root is not equal process.cwd(). This is not officially supported by Lumina and may lead to unexpected behavior. If you need this to be supported, comment on https://devtopia.esri.com/WebGIS/arcgis-web-components/issues/2126 or contact Lumina maintainers."
5982
5981
  )
@@ -5989,9 +5988,9 @@ class P {
5989
5988
  "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."
5990
5989
  ), 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);
5991
5990
  const y = this.options.documentation?.publicStoryUrlPrefix;
5992
- this.isFullApiExtraction && typeof y == "string" ? this.componentStoriesPromise = this.componentFilesPromise.then(async () => await pl(this.componentStoryFiles, y)).then((h) => {
5991
+ this.isFullApiExtraction && typeof y == "string" ? this.componentStoriesPromise = this.componentFilesPromise.then(async () => await dl(this.componentStoryFiles, y)).then((h) => {
5993
5992
  this.componentStories = h;
5994
- }) : (this.componentStoriesPromise = void 0, this.componentStories = void 0), bc(this, s.build.sourcemap !== !1), rs(this) && Te(this);
5993
+ }) : (this.componentStoriesPromise = void 0, this.componentStories = void 0), wc(this, s.build.sourcemap !== !1), ss(this) && Te(this);
5995
5994
  }
5996
5995
  },
5997
5996
  configureServer: {
@@ -6019,9 +6018,9 @@ class P {
6019
6018
  webTypes: i.jetBrains === !1 ? void 0 : i.jetBrains?.webTypesFileName ? de(i.jetBrains.webTypesFileName) : pe.webTypes,
6020
6019
  vsCodeHtml: i.vsCode === !1 ? void 0 : i.vsCode?.htmlFileName ? de(i.vsCode.htmlFileName) : pe.vsCodeHtml,
6021
6020
  vsCodeCss: i.vsCode === !1 ? void 0 : i.vsCode?.cssFileName ? de(i.vsCode.cssFileName) : pe.vsCodeCss
6022
- }, gn(), this.componentFilesPromise = xt(this, u.resolve("src/components")), wc(this);
6023
- const n = t.build?.preamble ?? nl();
6024
- this.banner = sl(n);
6021
+ }, fn(), this.componentFilesPromise = xt(this, u.resolve("src/components")), Sc(this);
6022
+ const n = t.build?.preamble ?? il();
6023
+ this.banner = nl(n);
6025
6024
  }
6026
6025
  _inferBuildSetup({ command: t, mode: i }, n) {
6027
6026
  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;
@@ -6043,7 +6042,7 @@ class P {
6043
6042
  return n;
6044
6043
  } else {
6045
6044
  if (this.viteCommand === "build" || this.isInStorybook)
6046
- throw Error(b(te, t, "Unable to find the TypeScript source file"));
6045
+ throw Error(w(te, t, "Unable to find the TypeScript source file"));
6047
6046
  {
6048
6047
  const r = this._typeScriptSourceFiles.get(t);
6049
6048
  r !== void 0 && r.text === i && (n = r);
@@ -6091,7 +6090,7 @@ class P {
6091
6090
  n === "serve" && fe(this, t, i);
6092
6091
  else
6093
6092
  throw Error(
6094
- b(
6093
+ w(
6095
6094
  te,
6096
6095
  "It is too late to call provideAssets() as Vite already wrote the bundle to disk. Please call provideAssets() before Vite's writeBundle()"
6097
6096
  )
@@ -6179,7 +6178,7 @@ A([
6179
6178
  A([
6180
6179
  k("configResolved()")
6181
6180
  ], P.prototype, "_typeScriptPrinter");
6182
- const pt = "@arcgis/lumina:addNonLazyImports", Sl = (e) => ({
6181
+ const pt = "@arcgis/lumina:addNonLazyImports", vl = (e) => ({
6183
6182
  name: pt,
6184
6183
  apply: () => e.viteCommand === "build",
6185
6184
  generateBundle(t, i) {
@@ -6187,7 +6186,7 @@ const pt = "@arcgis/lumina:addNonLazyImports", Sl = (e) => ({
6187
6186
  const r = ye(n, "components/", e);
6188
6187
  if (r !== n && (s.fileName = r), s.type === "chunk") {
6189
6188
  const a = u.dirname(u.join(e.dir.dist, n)), c = r === n ? a : u.dirname(u.join(e.dir.dist, r));
6190
- s.code = _i(s.code, e, c, a);
6189
+ s.code = Bi(s.code, e, c, a);
6191
6190
  }
6192
6191
  });
6193
6192
  },
@@ -6200,13 +6199,13 @@ const pt = "@arcgis/lumina:addNonLazyImports", Sl = (e) => ({
6200
6199
  i.forEach(([r, { referencedTagNames: a, referencedDeferredTagNames: c, referencedBy: l }]) => {
6201
6200
  if (n.has(r) || a.length === 0 && c.length === 0)
6202
6201
  return;
6203
- const d = os(t, l, n);
6202
+ const d = rs(t, l, n);
6204
6203
  if (d.forEach((p) => {
6205
6204
  t[p].referencedTagNames.splice(0, 0, ...a), t[p].referencedDeferredTagNames.splice(0, 0, ...c);
6206
6205
  }), (a.length > 0 || c.length > 0) && d.length === 0) {
6207
6206
  const p = ee(r);
6208
6207
  throw Error(
6209
- b(
6208
+ w(
6210
6209
  pt,
6211
6210
  `Unable to determine what files imported ${p}. This is necessary because this file referenced other web components (${[...a, ...c].join(", ")}), and so the compiler needs to know what component entrypoints these imports should be added to. Please double check if you are referencing ${p} in the code dynamically in the way that Lumina cannot detect, and report this issue to the Lumina maintainers.`
6212
6211
  )
@@ -6217,71 +6216,71 @@ const pt = "@arcgis/lumina:addNonLazyImports", Sl = (e) => ({
6217
6216
  if (!n.has(r))
6218
6217
  return [];
6219
6218
  const l = u.dirname(r), d = ye(l, e.dir.srcComponents, e), p = u.relative(e.dir.src, d);
6220
- function m(w) {
6221
- const E = Qa(e, w, r);
6219
+ function m(b) {
6220
+ const E = Xa(e, b, r);
6222
6221
  if (E === void 0)
6223
6222
  return;
6224
- const I = Za(E, p);
6223
+ const I = Qa(E, p);
6225
6224
  if (I !== `./${p}`)
6226
- return I.startsWith(".") ? `${I}/${Fi}` : I;
6225
+ return I.startsWith(".") ? `${I}/${Li}` : I;
6227
6226
  }
6228
- const f = new Set(a), g = new Set(c), y = Array.from(f, m).filter(R), h = (w) => `import "${w}";
6229
- `, v = y.map(h).join(""), S = /* @__PURE__ */ new Set(), T = Array.from(g, (w) => {
6230
- const E = m(w);
6227
+ const f = new Set(a), g = new Set(c), y = Array.from(f, m).filter(j), h = (b) => `import "${b}";
6228
+ `, v = y.map(h).join(""), S = /* @__PURE__ */ new Set(), T = Array.from(g, (b) => {
6229
+ const E = m(b);
6231
6230
  if (E !== void 0) {
6232
- if (f.has(w)) {
6231
+ if (f.has(b)) {
6233
6232
  C.warn(
6234
6233
  pt,
6235
- `"${w}" is used both with and without deferLoad in ${r} (either directly in ${r} or via a functional component). deferLoad will be ignored in this case.`
6234
+ `"${b}" is used both with and without deferLoad in ${r} (either directly in ${r} or via a functional component). deferLoad will be ignored in this case.`
6236
6235
  );
6237
6236
  return;
6238
6237
  }
6239
- return S.add(h(E)), `.set("${w}", () => import("${E}"))
6238
+ return S.add(h(E)), `.set("${b}", () => import("${E}"))
6240
6239
  `;
6241
6240
  }
6242
- }).filter(R), x = `${v}export * from "./${Tt}";`, L = Array.from(S).join("") + x, $ = T.length > 0 ? `import { deferredLoaders } from "@arcgis/lumina";
6241
+ }).filter(j), x = `${v}export * from "./${Tt}";`, L = Array.from(S).join("") + x, $ = T.length > 0 ? `import { deferredLoaders } from "@arcgis/lumina";
6243
6242
  ${x}
6244
6243
  deferredLoaders${T.join("")};` : x;
6245
6244
  return [
6246
- D(u.join(e.dir.dist, p, Fi), $),
6247
- D(u.join(e.dir.dist, p, wl), L)
6245
+ D(u.join(e.dir.dist, p, Li), $),
6246
+ D(u.join(e.dir.dist, p, Sl), L)
6248
6247
  ];
6249
6248
  });
6250
6249
  await Promise.all(s);
6251
6250
  }
6252
- }), Fi = "index.js", wl = "index.d.ts", os = (e, t, i, n = /* @__PURE__ */ new Set()) => t.flatMap((s) => i.has(s) ? [s] : n.has(s) ? [] : (n.add(s), os(e, e[s].referencedBy, i, n))), bl = (e) => ({
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) => ({
6253
6252
  name: "@arcgis/lumina:handleDynamicAssets",
6254
6253
  configureServer(t) {
6255
- e.server = t, !e.isInPuppeteerTestBackEnd && Ni(e).forEach(({ assets: i, transformers: n }) => fe(e, i, n));
6254
+ e.server = t, !e.isInPuppeteerTestBackEnd && Fi(e).forEach(({ assets: i, transformers: n }) => fe(e, i, n));
6256
6255
  },
6257
6256
  async writeBundle() {
6258
6257
  await Promise.all(
6259
- Ni(e).map(
6260
- async ({ assets: t, transformers: i }) => await Xn(e, t, i)
6258
+ Fi(e).map(
6259
+ async ({ assets: t, transformers: i }) => await Vn(e, t, i)
6261
6260
  )
6262
6261
  );
6263
6262
  }
6264
6263
  });
6265
- function Ni(e) {
6264
+ function Fi(e) {
6266
6265
  const t = [], i = e.assetsToProvide?.filter((n) => n.apply === void 0 || n.apply === e.viteCommand) ?? [];
6267
6266
  return e.options.assets?.extra?.forEach((n) => {
6268
6267
  "type" in n ? t.push(n) : "assets" in n && t.push(...n.assets);
6269
6268
  }), t.length > 0 && i.push({ assets: t }), e.assetsToProvide = void 0, i;
6270
6269
  }
6271
- const wt = "@arcgis/lumina:updatePackageJson", Tl = (e) => ({
6270
+ const wt = "@arcgis/lumina:updatePackageJson", bl = (e) => ({
6272
6271
  name: wt,
6273
6272
  apply: () => e.viteCommand === "serve" && e.environment === "development" && !e.isInTest && !e.isInCi,
6274
6273
  configResolved() {
6275
- El(e).catch(
6274
+ Tl(e).catch(
6276
6275
  (t) => C.error(wt, `Failed to update package's package.json:${String(t)}`)
6277
6276
  );
6278
6277
  }
6279
6278
  });
6280
- async function El(e) {
6281
- const t = u.join(e.dir.root, "package.json"), i = JSON.parse(await J(t, "utf-8")), n = Cl(i, e);
6282
- n && Ki(t, JSON.stringify(n, null, 2));
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);
6281
+ n && Ji(t, JSON.stringify(n, null, 2));
6283
6282
  }
6284
- function Cl(e, t) {
6283
+ function El(e, t) {
6285
6284
  const i = e?.devDependencies ?? {};
6286
6285
  Object.keys(e?.peerDependencies ?? {}).forEach((d) => {
6287
6286
  d in i || C.warn(
@@ -6320,20 +6319,20 @@ function Cl(e, t) {
6320
6319
  if (n)
6321
6320
  return e;
6322
6321
  }
6323
- const $l = (e) => ({
6322
+ const Cl = (e) => ({
6324
6323
  timestamp: e.apiJson.timestamp,
6325
6324
  compiler: e.apiJson.compiler,
6326
- components: Pl(e),
6325
+ components: $l(e),
6327
6326
  typeLibrary: {}
6328
6327
  });
6329
- function Pl(e) {
6328
+ function $l(e) {
6330
6329
  const t = [];
6331
6330
  for (const i of e.apiJson.modules)
6332
6331
  for (const n of i.declarations)
6333
- "customElement" in n && t.push(xl(n, i.path));
6332
+ "customElement" in n && t.push(Pl(n, i.path));
6334
6333
  return t;
6335
6334
  }
6336
- function xl(e, t) {
6335
+ function Pl(e, t) {
6337
6336
  const i = e.superclass ? [{ name: "superclass", text: JSON.stringify(e.superclass) }] : [];
6338
6337
  return {
6339
6338
  filePath: t,
@@ -6348,9 +6347,9 @@ function xl(e, t) {
6348
6347
  dependencies: [],
6349
6348
  dependencyGraph: {},
6350
6349
  deprecation: typeof e.deprecated == "boolean" ? e.deprecated ? "" : void 0 : e.deprecated,
6351
- props: e.members.map(kl).filter(R),
6352
- methods: e.members.map(Al).filter(R),
6353
- events: e.events?.map(Il) ?? [],
6350
+ props: e.members.map(xl).filter(j),
6351
+ methods: e.members.map(kl).filter(j),
6352
+ events: e.events?.map(Al) ?? [],
6354
6353
  styles: e.cssProperties?.map((n) => ({
6355
6354
  name: n.name,
6356
6355
  annotation: "prop",
@@ -6362,7 +6361,7 @@ function xl(e, t) {
6362
6361
  listeners: []
6363
6362
  };
6364
6363
  }
6365
- function kl(e) {
6364
+ function xl(e) {
6366
6365
  if (e.kind !== "field")
6367
6366
  return;
6368
6367
  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;
@@ -6396,14 +6395,14 @@ const Mt = (e) => Object.fromEntries(
6396
6395
  (t) => [
6397
6396
  t.name,
6398
6397
  {
6399
- location: t.package === Oi ? "global" : t.package === void 0 ? "local" : "import",
6398
+ location: t.package === Mi ? "global" : t.package === void 0 ? "local" : "import",
6400
6399
  path: typeof t.module == "string" && typeof t.package == "string" ? u.join(t.package, t.module) : t.module ?? t.package,
6401
6400
  id: "notImplemented"
6402
6401
  }
6403
6402
  ]
6404
6403
  ) ?? []
6405
6404
  );
6406
- function Al(e) {
6405
+ function kl(e) {
6407
6406
  if (e.kind !== "method")
6408
6407
  return;
6409
6408
  const t = e, i = e.inheritedFrom ? [{ name: "inheritedFrom", text: JSON.stringify(e.inheritedFrom) }] : [], n = t.parameters?.map(({ name: s, type: r, description: a }) => ({
@@ -6434,7 +6433,7 @@ function Al(e) {
6434
6433
  deprecation: typeof t.deprecated == "boolean" ? t.deprecated ? "" : void 0 : t.deprecated
6435
6434
  };
6436
6435
  }
6437
- function Il(e) {
6436
+ function Al(e) {
6438
6437
  const t = e.inheritedFrom ? [{ name: "inheritedFrom", text: JSON.stringify(e.inheritedFrom) }] : [];
6439
6438
  return {
6440
6439
  event: e.name,
@@ -6452,32 +6451,32 @@ function Il(e) {
6452
6451
  deprecation: typeof e.deprecated == "boolean" ? e.deprecated ? "" : void 0 : e.deprecated
6453
6452
  };
6454
6453
  }
6455
- const as = (e) => e.flatMap(
6454
+ const os = (e) => e.flatMap(
6456
6455
  (t) => t.cssProperties?.map((i) => ({
6457
6456
  name: i.name,
6458
6457
  description: i.description || void 0
6459
6458
  })) ?? []
6460
- ), cs = (e) => e.flatMap(
6459
+ ), as = (e) => e.flatMap(
6461
6460
  (t) => t.cssParts?.map((i) => ({
6462
6461
  name: `::part(${i.name})`,
6463
6462
  description: i.description || void 0
6464
6463
  })) ?? []
6465
- ), Ll = (e) => e.attributes?.map((t) => ({
6464
+ ), Il = (e) => e.attributes?.map((t) => ({
6466
6465
  name: t.name ?? "",
6467
6466
  description: Qe(t.description, t.deprecated) || void 0,
6468
6467
  default: t.default,
6469
6468
  value: {
6470
- type: Fl(t.type.values?.map(sn))
6469
+ type: Ll(t.type.values?.map(nn))
6471
6470
  }
6472
- })) ?? [], Fl = (e) => e?.length === 1 ? e[0] : e, Qe = (e = "", t = !1) => t === !1 ? e : `**Deprecated**${typeof t == "string" ? `: ${t}` : ""}. ${e}`, $e = {
6471
+ })) ?? [], Ll = (e) => e?.length === 1 ? e[0] : e, Qe = (e = "", t = !1) => t === !1 ? e : `**Deprecated**${typeof t == "string" ? `: ${t}` : ""}. ${e}`, $e = {
6473
6472
  slots: "Slots",
6474
6473
  events: "Events",
6475
6474
  cssProperties: "CSS Properties",
6476
6475
  cssParts: "CSS Parts",
6477
6476
  methods: "Methods"
6478
6477
  };
6479
- function ls(e) {
6480
- const t = Nl(e.slots), i = Dl(e.events), n = jl(e.cssProperties), s = Rl(e.cssParts), r = Ml(e.members), a = Qe(e.description, e.deprecated).trim();
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
6480
  return [...a ? [`${a}
6482
6481
  --`] : [], i, r, t, n, s].filter(Boolean).join(`
6483
6482
 
@@ -6485,28 +6484,28 @@ function ls(e) {
6485
6484
  }
6486
6485
  const Pe = (e, t) => t === void 0 || t.length === 0 ? "" : `### ${e}
6487
6486
  ${t.join(`
6488
- `)}`, Nl = (e) => Pe(
6487
+ `)}`, Fl = (e) => Pe(
6489
6488
  $e.slots,
6490
6489
  e?.map((t) => `- ${t.name ? `**${t.name}**` : "_default_"} - ${t.description}`)
6491
- ), Dl = (e) => Pe(
6490
+ ), Nl = (e) => Pe(
6492
6491
  $e.events,
6493
6492
  e?.filter((t) => t.name !== null && t.name !== void 0).map((t) => `- **${t.name}**${t.description ? ` - ${t.description}` : ""}`)
6494
- ), jl = (e = []) => Pe(
6493
+ ), Dl = (e = []) => Pe(
6495
6494
  $e.cssProperties,
6496
6495
  e?.map(
6497
6496
  (t) => `- **${t.name}** - ${t.description} ${t.default ? `_(default: ${t.default})_}` : ""}`
6498
6497
  )
6499
- ), Rl = (e) => Pe(
6498
+ ), jl = (e) => Pe(
6500
6499
  $e.cssParts,
6501
6500
  e?.map((t) => `- **${t.name}** - ${t.description}`)
6502
- ), Ml = (e) => Pe(
6501
+ ), Rl = (e) => Pe(
6503
6502
  $e.methods,
6504
- e.filter(ys).map(
6503
+ e.filter(gs).map(
6505
6504
  (t) => [`- \`${t.name}${t.signature}\``, Qe(t.description, t.deprecated)].filter(Boolean).join(" - ")
6506
6505
  )
6507
6506
  );
6508
- function Ol(e, t) {
6509
- const i = Jl(e), n = as(e), s = cs(e), r = j();
6507
+ function Ml(e, t) {
6508
+ const i = Ol(e), n = os(e), s = as(e), r = J();
6510
6509
  return {
6511
6510
  $schema: "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
6512
6511
  name: r.name,
@@ -6524,52 +6523,52 @@ function Ol(e, t) {
6524
6523
  }
6525
6524
  };
6526
6525
  }
6527
- const Jl = (e) => e.map((t) => ({
6526
+ const Ol = (e) => e.map((t) => ({
6528
6527
  name: t.tagName,
6529
- description: ls(t),
6528
+ description: cs(t),
6530
6529
  "doc-url": t.demos?.[0]?.url,
6531
- attributes: Ll(t),
6530
+ attributes: Il(t),
6532
6531
  slots: t.slots?.map((i) => ({
6533
6532
  name: i.name,
6534
6533
  description: i.description
6535
6534
  })),
6536
- events: Di(t),
6535
+ events: Ni(t),
6537
6536
  js: {
6538
- properties: Kl(t),
6539
- events: Di(t)
6537
+ properties: Jl(t),
6538
+ events: Ni(t)
6540
6539
  }
6541
- })), Kl = (e) => e.members.filter(hs).map((t) => ({
6540
+ })), Jl = (e) => e.members.filter(ys).map((t) => ({
6542
6541
  name: t.name,
6543
6542
  description: t.description,
6544
6543
  type: t.type?.text
6545
- })) ?? [], Di = (e) => e.events?.map((t) => ({
6544
+ })) ?? [], Ni = (e) => e.events?.map((t) => ({
6546
6545
  name: t.name,
6547
6546
  type: t.type?.text,
6548
6547
  description: t.description
6549
- })) ?? [], Wl = (e) => e.map((t) => ({
6548
+ })) ?? [], Kl = (e) => e.map((t) => ({
6550
6549
  name: t.tagName,
6551
- description: ls(t),
6552
- attributes: Bl(t),
6550
+ description: cs(t),
6551
+ attributes: Wl(t),
6553
6552
  references: t.demos?.map((i) => ({ name: i.description, url: i.url })) ?? []
6554
- })), Bl = (e) => e.attributes?.map((t) => ({
6553
+ })), Wl = (e) => e.attributes?.map((t) => ({
6555
6554
  name: t.name,
6556
6555
  description: Qe(t.description, t.deprecated) || void 0,
6557
- values: _l(t)
6558
- })) ?? [], _l = (e) => e.type.values?.map((t) => t.value ?? "").filter(Boolean).map((t) => ({ name: t })) ?? [], Hl = (e) => ({
6556
+ values: Bl(t)
6557
+ })) ?? [], Bl = (e) => e.type.values?.map((t) => t.value ?? "").filter(Boolean).map((t) => ({ name: t })) ?? [], _l = (e) => ({
6559
6558
  $schema: "https://raw.githubusercontent.com/microsoft/vscode-html-languageservice/main/docs/customData.schema.json",
6560
6559
  version: 1.1,
6561
- tags: Wl(e)
6562
- }), Ul = (e) => ({
6560
+ tags: Kl(e)
6561
+ }), Hl = (e) => ({
6563
6562
  $schema: "https://raw.githubusercontent.com/microsoft/vscode-css-languageservice/main/docs/customData.schema.json",
6564
6563
  version: 1.1,
6565
- properties: as(e),
6566
- pseudoElements: cs(e)
6567
- }), zl = "@arcgis/lumina:generateDocs";
6568
- function ql(e) {
6564
+ properties: os(e),
6565
+ pseudoElements: as(e)
6566
+ }), Ul = "@arcgis/lumina:generateDocs";
6567
+ function zl(e) {
6569
6568
  return e._documentationFileNames.stencilLikeDocsJson !== void 0 && e.provideAssets([
6570
6569
  {
6571
6570
  type: "dynamic",
6572
- source: () => JSON.stringify($l(e), null, 2),
6571
+ source: () => JSON.stringify(Cl(e), null, 2),
6573
6572
  destination: u.join("../..", e._documentationFileNames.stencilLikeDocsJson)
6574
6573
  }
6575
6574
  ]), e._documentationFileNames.apiJson !== void 0 && e.provideAssets([
@@ -6579,34 +6578,34 @@ function ql(e) {
6579
6578
  destination: u.join("../..", e._documentationFileNames.apiJson)
6580
6579
  }
6581
6580
  ]), {
6582
- name: zl,
6581
+ name: Ul,
6583
6582
  async writeBundle() {
6584
6583
  if (e.isInStorybook)
6585
6584
  return;
6586
- 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(R);
6585
+ 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);
6587
6586
  if (a.length === 0)
6588
6587
  return;
6589
- await ts(a);
6588
+ await es(a);
6590
6589
  const c = [];
6591
6590
  if (n !== void 0) {
6592
- const l = JSON.stringify(Hl(e.apiJsonComponents), null, 2);
6591
+ const l = JSON.stringify(_l(e.apiJsonComponents), null, 2);
6593
6592
  c.push(D(n, l));
6594
6593
  }
6595
6594
  if (s !== void 0) {
6596
- const l = JSON.stringify(Ul(e.apiJsonComponents), null, 2);
6595
+ const l = JSON.stringify(Hl(e.apiJsonComponents), null, 2);
6597
6596
  c.push(D(s, l));
6598
6597
  }
6599
6598
  if (r !== void 0) {
6600
- const l = Ol(e.apiJsonComponents, typeof t == "object" ? t : {});
6599
+ const l = Ml(e.apiJsonComponents, typeof t == "object" ? t : {});
6601
6600
  c.push(D(r, JSON.stringify(l, null, 2)));
6602
6601
  }
6603
6602
  await Promise.all(c);
6604
6603
  }
6605
6604
  };
6606
6605
  }
6607
- const Gl = (e) => `import type { h, EventHandler } from "@arcgis/lumina";
6606
+ const ql = (e) => `import type { h, EventHandler } from "@arcgis/lumina";
6608
6607
 
6609
- ${e.map(Vl).join(`
6608
+ ${e.map(Gl).join(`
6610
6609
 
6611
6610
  `)}
6612
6611
 
@@ -6618,7 +6617,7 @@ ${e.map(({ tagName: t, pascalCaseName: i }) => ` "${t}": Lumina${i};`).join
6618
6617
  }
6619
6618
  }
6620
6619
  }`;
6621
- function Vl({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6620
+ function Gl({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6622
6621
  const [s, r] = Xe(e, i);
6623
6622
  return [
6624
6623
  `interface Lumina${t} extends ${s}h.JSX.HTMLAttributes<HTML${t}Element> {
@@ -6631,7 +6630,7 @@ function Vl({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6631
6630
  r
6632
6631
  ].join("");
6633
6632
  }
6634
- function Xl(e) {
6633
+ function Vl(e) {
6635
6634
  const t = ` interface IntrinsicElements extends PreactJsx.IntrinsicElements {
6636
6635
  ${e.map(({ pascalCaseName: i, tagName: n }) => ` "${n}": Preact${i};`).join(`
6637
6636
  `)}
@@ -6639,7 +6638,7 @@ ${e.map(({ pascalCaseName: i, tagName: n }) => ` "${n}": Preact${i};`).join
6639
6638
  return `import { JSX as PreactJsx } from "preact";
6640
6639
  import type { EventHandler } from "@arcgis/lumina";
6641
6640
 
6642
- ${e.map(Ql).join(`
6641
+ ${e.map(Xl).join(`
6643
6642
 
6644
6643
  `)}
6645
6644
 
@@ -6652,7 +6651,7 @@ ${t}
6652
6651
  }
6653
6652
  }`;
6654
6653
  }
6655
- function Ql({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6654
+ function Xl({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6656
6655
  const [s, r] = Xe(e, i);
6657
6656
  return [
6658
6657
  `interface Preact${t} extends ${s}PreactJsx.HTMLAttributes<HTML${t}Element> {
@@ -6665,13 +6664,13 @@ function Ql({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6665
6664
  r
6666
6665
  ].join("");
6667
6666
  }
6668
- function Zl(e) {
6667
+ function Ql(e) {
6669
6668
  const t = e.map(({ pascalCaseName: i, tagName: n }) => ` "${n}": React${i};`).join(`
6670
6669
  `);
6671
6670
  return `import type { HTMLProps } from 'react';
6672
6671
  import type { EventHandler } from "@arcgis/lumina";
6673
6672
 
6674
- ${e.map(Yl).join(`
6673
+ ${e.map(Zl).join(`
6675
6674
 
6676
6675
  `)}
6677
6676
 
@@ -6697,7 +6696,7 @@ ${t}
6697
6696
  }
6698
6697
  }`;
6699
6698
  }
6700
- function Yl({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6699
+ function Zl({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6701
6700
  const [s, r] = Xe(e, i);
6702
6701
  return [
6703
6702
  `interface React${t} extends ${s}HTMLProps<HTML${t}Element> {
@@ -6710,10 +6709,10 @@ function Yl({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6710
6709
  r
6711
6710
  ].join("");
6712
6711
  }
6713
- const ed = (e) => `import { JSXBase as StencilJsx } from "@stencil/core/internal";
6712
+ const Yl = (e) => `import { JSXBase as StencilJsx } from "@stencil/core/internal";
6714
6713
  import type { EventHandler } from "@arcgis/lumina";
6715
6714
 
6716
- ${e.map(td).join(`
6715
+ ${e.map(ed).join(`
6717
6716
 
6718
6717
  `)}
6719
6718
 
@@ -6731,7 +6730,7 @@ declare module "@stencil/core/internal/stencil-public-runtime" {
6731
6730
  interface IntrinsicElements extends ExposedElements {}
6732
6731
  }
6733
6732
  }`;
6734
- function td({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6733
+ function ed({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6735
6734
  const [s, r] = Xe(e, i);
6736
6735
  return [
6737
6736
  `interface Stencil${t} extends ${s}StencilJsx.HTMLAttributes<HTML${t}Element> {
@@ -6744,16 +6743,16 @@ function td({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6744
6743
  r
6745
6744
  ].join("");
6746
6745
  }
6747
- const id = (e, t, i) => [i, t, nd(e), sd(e)].join(`
6746
+ const td = (e, t, i) => [i, t, id(e), nd(e)].join(`
6748
6747
 
6749
- `), nd = (e) => e.filter((t) => (t.events?.length ?? 0) > 0).map(
6748
+ `), id = (e) => e.filter((t) => (t.events?.length ?? 0) > 0).map(
6750
6749
  ({ pascalCaseName: t }) => `export interface ${t}CustomEvent<T> extends CustomEvent<T> {
6751
6750
  detail: T;
6752
6751
  target: HTML${t}Element;
6753
6752
  currentTarget: HTML${t}Element;
6754
6753
  }`
6755
6754
  ).join(`
6756
- `), sd = (e) => `export { ToEvents, TargetedEvent } from "@arcgis/lumina";
6755
+ `), nd = (e) => `export { ToEvents, TargetedEvent } from "@arcgis/lumina";
6757
6756
 
6758
6757
  declare global {
6759
6758
  interface HTMLElementTagNameMap {
@@ -6761,12 +6760,12 @@ ${e.map(({ pascalCaseName: t, tagName: i }) => ` "${i}": HTML${t}Element;`).j
6761
6760
  `)}
6762
6761
  }
6763
6762
 
6764
- ${e.map(rd).join(`
6763
+ ${e.map(sd).join(`
6765
6764
  `).split(`
6766
6765
  `).map((t) => t.length > 0 ? ` ${t}` : t).join(`
6767
6766
  `)}
6768
6767
  }`;
6769
- function rd({ name: e, pascalCaseName: t, events: i = [] }) {
6768
+ function sd({ name: e, pascalCaseName: t, events: i = [] }) {
6770
6769
  const n = i.length > 0, s = `${t}CustomEvent`, r = `HTML${t}Element`;
6771
6770
  return [
6772
6771
  n ? `interface ${r}EventMap {
@@ -6785,7 +6784,7 @@ ${n ? ` addEventListener<K extends keyof ${r}EventMap>(type: K, listener: (this
6785
6784
  }`
6786
6785
  ].join("");
6787
6786
  }
6788
- function od(e) {
6787
+ function rd(e) {
6789
6788
  let t;
6790
6789
  return {
6791
6790
  name: "@arcgis/lumina:generateFrameworkTypes",
@@ -6793,11 +6792,11 @@ function od(e) {
6793
6792
  generateBundle() {
6794
6793
  if (e.isInStorybook)
6795
6794
  return;
6796
- t = Oa(e);
6795
+ t = Ma(e);
6797
6796
  const i = u.join(e.dir.dist, "index.d.ts");
6798
6797
  e._declarationTextTransformers.push((n) => {
6799
6798
  const { filePath: s, content: r } = n;
6800
- return s === i ? { filePath: s, content: id(e.apiJsonComponents, r, t) } : n;
6799
+ return s === i ? { filePath: s, content: td(e.apiJsonComponents, r, t) } : n;
6801
6800
  });
6802
6801
  },
6803
6802
  async writeBundle() {
@@ -6807,10 +6806,10 @@ function od(e) {
6807
6806
  await Q(i);
6808
6807
  const n = `/// <reference types="../index.d.ts" />
6809
6808
  ${t.replaceAll("./", "../")}`, s = Object.entries({
6810
- react: Zl(e.apiJsonComponents),
6811
- preact: Xl(e.apiJsonComponents),
6812
- stencil: ed(e.apiJsonComponents),
6813
- lumina: Gl(e.apiJsonComponents)
6809
+ react: Ql(e.apiJsonComponents),
6810
+ preact: Vl(e.apiJsonComponents),
6811
+ stencil: Yl(e.apiJsonComponents),
6812
+ lumina: ql(e.apiJsonComponents)
6814
6813
  }).map(
6815
6814
  async ([r, a]) => await D(u.join(i, `${r}.d.ts`), `${n}
6816
6815
  ${a}`)
@@ -6819,38 +6818,38 @@ ${a}`)
6819
6818
  }
6820
6819
  };
6821
6820
  }
6822
- function ad(e) {
6821
+ function od(e) {
6823
6822
  return {
6824
6823
  name: "@arcgis/lumina:buildWrappers",
6825
6824
  apply: () => e.viteCommand === "build" && !!e.options.build?.wrappers?.length,
6826
6825
  async writeBundle() {
6827
6826
  e.isInStorybook || await Promise.all(
6828
6827
  e.options.build?.wrappers?.map(async (t) => {
6829
- t.type === "react18" && await dd(e, t);
6828
+ t.type === "react18" && await ld(e, t);
6830
6829
  }) ?? []
6831
6830
  );
6832
6831
  }
6833
6832
  };
6834
6833
  }
6835
- const cd = "react", ji = "@lit/react", ld = `
6836
- import React from "${cd}";
6837
- import { createComponent } from "${ji}";
6838
- import type { EventName } from "${ji}";
6834
+ const ad = "react", Di = "@lit/react", cd = `
6835
+ import React from "${ad}";
6836
+ import { createComponent } from "${Di}";
6837
+ import type { EventName } from "${Di}";
6839
6838
  import { makeReactWrapperFactory, getReactWrapperOptions } from "@arcgis/lumina";
6840
6839
 
6841
6840
  const createWrapper = /*@__PURE__*/ makeReactWrapperFactory(React, createComponent) as typeof createComponent;
6842
6841
  `;
6843
- async function dd(e, t) {
6844
- const { name: i } = j(), n = [];
6842
+ async function ld(e, t) {
6843
+ const { name: i } = J(), n = [];
6845
6844
  for (const a of e.apiJson.modules)
6846
6845
  for (const c of a.declarations)
6847
- "customElement" in c && n.push(pd(c));
6848
- const s = [`/// <reference types="${i}" preserve="true" />`, ld, ...n].join(""), r = u.resolve(t.proxiesFile);
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
6848
  await Q(u.dirname(r), { recursive: !0 }), await D(r, s);
6850
6849
  }
6851
- function pd(e) {
6850
+ function dd(e) {
6852
6851
  const t = e.events?.map(
6853
- (i) => ` ${Ee(`on${bs(i.name)}`)}: "${i.name}" as EventName<HTML${e.pascalCaseName}Element["${i.name}"]>,`
6852
+ (i) => ` ${Ee(`on${ws(i.name)}`)}: "${i.name}" as EventName<HTML${e.pascalCaseName}Element["${i.name}"]>,`
6854
6853
  ).join(`
6855
6854
  `);
6856
6855
  return `
@@ -6864,45 +6863,45 @@ ${t}
6864
6863
  );
6865
6864
  `;
6866
6865
  }
6867
- function $d(e = {}) {
6866
+ function Cd(e = {}) {
6868
6867
  const t = new P(e), i = [
6869
6868
  t._plugin,
6869
+ el(t),
6870
6870
  tl(t),
6871
- il(t),
6872
- Tl(t),
6873
- xr(t),
6874
- _c(t),
6875
- od(t),
6876
- ql(t),
6877
- vc(t),
6878
- ho(t),
6879
- Gc(t),
6880
6871
  bl(t),
6881
- Sl(t),
6882
- cl(t),
6883
- Ms(t),
6884
- Ec(t),
6885
- ad(t),
6886
- Xc(t)
6887
- ].filter(R);
6872
+ Pr(t),
6873
+ Bc(t),
6874
+ rd(t),
6875
+ zl(t),
6876
+ hc(t),
6877
+ yo(t),
6878
+ qc(t),
6879
+ wl(t),
6880
+ vl(t),
6881
+ al(t),
6882
+ Rs(t),
6883
+ Tc(t),
6884
+ od(t),
6885
+ Vc(t)
6886
+ ].filter(j);
6888
6887
  return i.context = t, i;
6889
6888
  }
6890
- const Pd = {
6891
- initializeComponentDependencies: gn,
6892
- updateLuminaTs: ss,
6889
+ const $d = {
6890
+ initializeComponentDependencies: fn,
6891
+ updateLuminaTs: ns,
6893
6892
  propertyToAttributeMappings: B,
6894
- findDeclaredComponents: Hi,
6895
- nativeEvents: Zi,
6893
+ findDeclaredComponents: _i,
6894
+ nativeEvents: Qi,
6896
6895
  svgElements: Ct,
6897
6896
  mathMlElements: $t,
6898
- alwaysAttributes: Vi,
6899
- nativeAlwaysAttributes: Xi,
6897
+ alwaysAttributes: Gi,
6898
+ nativeAlwaysAttributes: Vi,
6900
6899
  htmlAlwaysAttributes: gt,
6901
6900
  isPropertyEscapeNeeded: Ve
6902
6901
  };
6903
6902
  export {
6904
6903
  Je as LuminaApiExtractor,
6905
- Pd as exportsForCodemod,
6904
+ $d as exportsForCodemod,
6906
6905
  qe as inferCdnUrl,
6907
- $d as useLumina
6906
+ Cd as useLumina
6908
6907
  };