@arcgis/lumina-compiler 4.34.0-next.44 → 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 N, 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
4
  import { f as w, l as C } from "./logger-KpGU2b3R.js";
5
- import { getMemberName as Q, apiMemberToSynthesizedComments as X, globalPackageIdentifier as Oi, setApiDocFromJsDoc as ue, ApiExtractor as ms, hasIgnoredModifier as fs, symbolToDocs as Kt, setDefaultFromInitializer as Wt, multipleJsDocTags as ys, findDecorator as Bt, isApiMethod as gs, isApiProperty as hs } from "@arcgis/api-extractor";
6
- import { isNotUndefined as R, mappedFind as ye, camelToKebab as wt, kebabToPascal as vs, uncapitalize as ut, identity as Ji, Deferred as Ss, getPreamble as bs, capitalize as ws } from "@arcgis/components-utils";
7
- import { readdir as Ue, readFile as J, rm as Ts, mkdir as z, cp as Es, writeFile as F, 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({
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,21 +28,21 @@ 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) => {
36
36
  c === s.length - 1 ? r[""] ??= e : (r[a] ??= {}, r = r[a]);
37
37
  }), r[""];
38
38
  }
39
- function ge(e, t, i) {
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,53 +54,53 @@ 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) => {
58
- const n = e.startsWith(i.dir.distComponents) ? ge(
59
- Bi(i.dir.distComponents, e),
57
+ const Ks = ({ filePath: e, content: t }, i) => {
58
+ const n = e.startsWith(i.dir.distComponents) ? ye(
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 = ge(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
- const d = te(i, l);
89
+ const d = oe(i, l);
90
90
  return `${s[0]}${d}`;
91
- }), te = (e, t) => {
91
+ }), oe = (e, t) => {
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,8 +199,8 @@ ${e.content}`
199
199
  filePath: e.filePath,
200
200
  content: e.content.replace(i.regex, (n, s) => i.replacements[s])
201
201
  };
202
- }, 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
206
  w(
@@ -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) {
220
- const i = Q(t.name);
218
+ }, tr = /^import (?:type \* as )?[^"'\n]+["'](\.[^\n]*?\.json)["'];$/mu, ir = /(?<![.\w\d-])import\(['"]([\w@\-/\\.]+)\.json['"]\)/u;
219
+ function nr(e, t) {
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,24 +322,24 @@ function fr(e, t, i, n) {
322
322
  ).statements[0].members[0];
323
323
  return [d.name, d.type];
324
324
  }
325
- const yr = (e, t) => t.apiModule === void 0 ? e.statements : e.statements.map((i) => gr(i, e, t));
325
+ const fr = (e, t) => t.apiModule === void 0 ? e.statements : e.statements.map((i) => gr(i, e, t));
326
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
- (y) => y.name === s && "customElement" in y
329
+ (g) => g.name === s && "customElement" in g
330
330
  );
331
331
  if (r === void 0)
332
332
  return e;
333
333
  const a = [], c = /* @__PURE__ */ new Set(), l = [], d = [];
334
334
  mt = void 0;
335
- for (let y = 0; y < n.members.length; y++) {
336
- const g = n.members[y], h = hr(g, r, l, c, t);
337
- h === void 0 ? a.push(g) : Array.isArray(h) ? d.push(...h) : (o.setEmitFlags(h, o.EmitFlags.NoComments), d.push(h));
335
+ for (let g = 0; g < n.members.length; g++) {
336
+ const y = n.members[g], h = yr(y, r, l, c, t);
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
- c.size > 0 && a.forEach((y) => {
340
- const g = Q(y.name);
341
- g !== void 0 && c.has(g) && d.push(Sr(y));
342
- }), l.length > 0 && d.push(mr(l, t, i.compiler));
339
+ c.size > 0 && a.forEach((g) => {
340
+ const y = X(g.name);
341
+ y !== void 0 && c.has(y) && d.push(vr(g));
342
+ }), l.length > 0 && d.push(ur(l, t, i.compiler));
343
343
  const p = o.factory.updateClassDeclaration(
344
344
  n,
345
345
  n.modifiers,
@@ -349,13 +349,13 @@ function gr(e, t, i) {
349
349
  * Drop interfaces from public typings
350
350
  * See https://devtopia.esri.com/WebGIS/arcgis-web-components/issues/2016#issuecomment-5144903
351
351
  */
352
- n.heritageClauses?.filter((y) => y.token !== o.SyntaxKind.ImplementsKeyword),
352
+ n.heritageClauses?.filter((g) => g.token !== o.SyntaxKind.ImplementsKeyword),
353
353
  d
354
354
  ), m = [];
355
355
  if (r.description && m.push(r.description), r.privacy === void 0) {
356
- for (const y of r.demos ?? [])
357
- if (y.description === "Docs") {
358
- m.push(`[Read more...](${y.url})`);
356
+ for (const g of r.demos ?? [])
357
+ if (g.description === "Docs") {
358
+ m.push(`[Read more...](${g.url})`);
359
359
  break;
360
360
  }
361
361
  }
@@ -364,14 +364,14 @@ function gr(e, t, i) {
364
364
  `);
365
365
  return o.setEmitFlags(p, o.EmitFlags.NoComments), o.setSyntheticLeadingComments(
366
366
  p,
367
- X({ ...r, description: f })
367
+ V({ ...r, description: f })
368
368
  ), p;
369
369
  } else
370
370
  return e;
371
371
  }
372
372
  let mt;
373
- function hr(e, t, i, n, s) {
374
- const r = Q(e.name);
373
+ function yr(e, t, i, n, s) {
374
+ const r = X(e.name);
375
375
  if (r === void 0)
376
376
  return;
377
377
  const a = t.members.find((l) => l.name === r);
@@ -388,10 +388,10 @@ function hr(e, t, i, n, s) {
388
388
  Xt(e.modifiers),
389
389
  e.name,
390
390
  void 0,
391
- br(e.type, s),
391
+ Sr(e.type, s),
392
392
  e.initializer
393
393
  );
394
- return o.setSyntheticLeadingComments(d, X(l)), d;
394
+ return o.setSyntheticLeadingComments(d, V(l)), d;
395
395
  }
396
396
  return;
397
397
  }
@@ -405,7 +405,7 @@ function hr(e, t, i, n, s) {
405
405
  Vt(n, e.type, s),
406
406
  e.initializer
407
407
  );
408
- return o.setSyntheticLeadingComments(l, X(a)), l;
408
+ return o.setSyntheticLeadingComments(l, V(a)), l;
409
409
  } else if (a.getterType !== void 0) {
410
410
  const l = Gt.exec(a.getterType.text)?.groups;
411
411
  if (l === void 0)
@@ -439,7 +439,7 @@ function hr(e, t, i, n, s) {
439
439
  ),
440
440
  void 0
441
441
  );
442
- return o.setSyntheticLeadingComments(m, X(a)), [
442
+ return o.setSyntheticLeadingComments(m, V(a)), [
443
443
  m,
444
444
  o.factory.createSetAccessorDeclaration(
445
445
  d,
@@ -449,7 +449,7 @@ function hr(e, t, i, n, s) {
449
449
  )
450
450
  ];
451
451
  } else
452
- return Vt(n, e.type, s), o.setSyntheticLeadingComments(e, X(a)), e;
452
+ return Vt(n, e.type, s), o.setSyntheticLeadingComments(e, V(a)), e;
453
453
  else if (o.isGetAccessor(e) || o.isSetAccessor(e)) {
454
454
  if (o.isSetAccessor(e)) {
455
455
  if (a.readonly === !0)
@@ -461,19 +461,19 @@ function hr(e, t, i, n, s) {
461
461
  isRequired: a.docsTags?.some((f) => f.name === "required") ?? !1
462
462
  });
463
463
  }
464
- return c !== r && o.setSyntheticLeadingComments(e, X(a)), e;
464
+ return c !== r && o.setSyntheticLeadingComments(e, V(a)), e;
465
465
  } else if (o.isMethodDeclaration(e))
466
- return o.setSyntheticLeadingComments(e, X(a)), e;
466
+ return o.setSyntheticLeadingComments(e, V(a)), e;
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 br(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 br(e, t) {
541
541
  t.fileName
542
542
  ), e);
543
543
  }
544
- const wr = [cr, yr], 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) {
@@ -572,22 +572,22 @@ function Tr(e) {
572
572
  }
573
573
  };
574
574
  }
575
- const Er = (e) => (t) => (i) => zi(e, t, i, [
575
+ const Tr = (e) => (t) => (i) => Ui(e, t, i, [
576
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
@@ -705,7 +705,7 @@ const kr = "Fragment", et = "DynamicHtmlTag", tt = "DynamicSvgTag", Re = Symbol(
705
705
  "exportParts",
706
706
  "hreflang",
707
707
  "media"
708
- ]), yt = {
708
+ ]), gt = {
709
709
  button: /* @__PURE__ */ new Set(["popoverTarget"]),
710
710
  input: /* @__PURE__ */ new Set(["list", "capture"]),
711
711
  iframe: /* @__PURE__ */ new Set(["sandbox"]),
@@ -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
- se(t, s, i, n);
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) {
@@ -1929,33 +1929,33 @@ function ai(e, t, i, n, s = !0) {
1929
1929
  return;
1930
1930
  const f = p ? d.aliasTypeArguments?.[0]?.symbol?.escapedName ?? "" : m.name;
1931
1931
  if (f.startsWith("_")) {
1932
- const g = m.declarations?.[0];
1933
- if (g?.kind === o.SyntaxKind.FunctionType) {
1934
- const h = g;
1932
+ const y = m.declarations?.[0];
1933
+ if (y?.kind === o.SyntaxKind.FunctionType) {
1934
+ const h = y;
1935
1935
  if (h.parameters.forEach((v) => {
1936
1936
  if (v.type === void 0)
1937
1937
  return;
1938
1938
  const S = e.getTypeFromTypeNode(v.type);
1939
- se(S, /* @__PURE__ */ new Map(), c, !1);
1939
+ ne(S, /* @__PURE__ */ new Map(), c, !1);
1940
1940
  }), h.type !== void 0) {
1941
1941
  const v = e.getTypeFromTypeNode(h.type);
1942
- se(v, /* @__PURE__ */ new Map(), c, !1);
1942
+ ne(v, /* @__PURE__ */ new Map(), c, !1);
1943
1943
  }
1944
1944
  }
1945
1945
  return;
1946
1946
  }
1947
1947
  if (a.has(f))
1948
1948
  return;
1949
- const y = p ? {
1949
+ const g = p ? {
1950
1950
  name: f,
1951
1951
  package: void 0,
1952
1952
  module: "index.js"
1953
- } : so(m, f, i, n);
1954
- r.push(y), a.add(f);
1953
+ } : no(m, f, i, n);
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
- function se(e, t, i, n = !0) {
1958
+ function ne(e, t, i, n = !0) {
1959
1959
  if (typeof e != "object" || e === null || !("checker" in e))
1960
1960
  return;
1961
1961
  const s = e;
@@ -1966,7 +1966,7 @@ function se(e, t, i, n = !0) {
1966
1966
  i?.(s, r);
1967
1967
  const a = s.origin;
1968
1968
  if (r || !n)
1969
- t.set(s, { origin: void 0, aliasSymbol: void 0, aliasTypeArguments: void 0 }), se(a, t, i, n);
1969
+ t.set(s, { origin: void 0, aliasSymbol: void 0, aliasTypeArguments: void 0 }), ne(a, t, i, n);
1970
1970
  else {
1971
1971
  const c = s.aliasSymbol, l = s.aliasTypeArguments;
1972
1972
  a !== void 0 && (s.origin = void 0), c !== void 0 && (s.aliasSymbol = void 0), l !== void 0 && (s.aliasTypeArguments = void 0), t.set(s, {
@@ -1980,13 +1980,13 @@ function se(e, t, i, n = !0) {
1980
1980
  * These properties are pointing at types that don't appear in the
1981
1981
  * formatted string, so we are not interested
1982
1982
  */
1983
- c !== "resolvedBaseConstructorType" && c !== "resolvedBaseTypes" && c !== "typeParameters" && c !== "typeParameter" && (Array.isArray(l) ? l.forEach((d) => se(d, t, i, n)) : se(l, t, i, n));
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 = N(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,14 +2057,14 @@ function ci(e, t, i) {
2057
2057
  for (const c of a) {
2058
2058
  const l = li(c, t, i);
2059
2059
  if (l !== void 0)
2060
- return lo(l);
2060
+ return co(l);
2061
2061
  }
2062
2062
  }
2063
2063
  }
2064
2064
  function li(e, t, i) {
2065
2065
  const n = e.jsDoc?.[0];
2066
2066
  if (n !== void 0)
2067
- return ye([n, ...n.tags ?? []], ({ comment: s }) => {
2067
+ return ge([n, ...n.tags ?? []], ({ comment: s }) => {
2068
2068
  if (i === "typescript" && typeof s == "string") {
2069
2069
  const r = s.indexOf("[MDN Reference](");
2070
2070
  if (r === -1)
@@ -2072,7 +2072,7 @@ function li(e, t, i) {
2072
2072
  const a = r + 16, c = s.indexOf(")", a);
2073
2073
  return c === -1 ? void 0 : s.slice(a, c);
2074
2074
  } else if (i === "core" && Array.isArray(s))
2075
- return ye(s, (r) => {
2075
+ return ge(s, (r) => {
2076
2076
  if (!o.isJSDocLinkLike(r))
2077
2077
  return;
2078
2078
  const a = r.getText(t);
@@ -2081,61 +2081,60 @@ 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"), yo = /^import ["'](?<specifier>[^"']+)["'];$/gmu, go = () => "throwError", V = "@arcgis/lumina:loadLitCss", Z = "?layered", Fe = "?global";
2094
- let di = !1;
2095
- const ho = (e) => ({
2096
- name: V,
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) => ({
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(w(V, "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(w(V, "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 (N().devDependencies ?? {})) && !("sass" in (N().devDependencies ?? {})) && (di = !0, C.warn(
2113
- V,
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
- V,
2116
+ G,
2118
2117
  `Expected vite:css-post to return a JS module with a string literal. Received: ${JSON.stringify(
2119
2118
  m
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 y = e.isFullApiExtraction ? po(r) : void 0;
2126
- if (y !== void 0) {
2127
- e._cssDocs ??= /* @__PURE__ */ new Map(), e._cssDocs.set(a, y);
2128
- const g = e._cssImports.get(a);
2129
- if (g !== void 0) {
2124
+ const g = e.isFullApiExtraction ? lo(r) : void 0;
2125
+ if (g !== void 0) {
2126
+ e._cssDocs ??= /* @__PURE__ */ new Map(), e._cssDocs.set(a, g);
2127
+ const y = e._cssImports.get(a);
2128
+ if (y !== void 0) {
2130
2129
  for (const h of e.apiJsonComponents)
2131
- if (g.has(h.tagName))
2130
+ if (y.has(h.tagName))
2132
2131
  if (h.cssProperties === void 0)
2133
- h.cssProperties = Array.from(y);
2132
+ h.cssProperties = Array.from(g);
2134
2133
  else {
2135
2134
  const v = new Set(h.cssProperties.map((S) => S.name));
2136
2135
  h.cssProperties = [
2137
2136
  ...h.cssProperties,
2138
- ...y.filter((S) => !v.has(S.name))
2137
+ ...g.filter((S) => !v.has(S.name))
2139
2138
  ];
2140
2139
  }
2141
2140
  }
@@ -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(yo, (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
2164
  if ((e.options.css?.sideEffectImportHandling ?? go)(d, i) === "drop")
2166
- return a = !0, ar(l);
2165
+ return a = !0, or(l);
2167
2166
  throw Error(
2168
2167
  w(
2169
- V,
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, [
@@ -2190,7 +2189,7 @@ const ho = (e) => ({
2190
2189
  return l;
2191
2190
  throw Error(
2192
2191
  w(
2193
- V,
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
2196
2195
  )
@@ -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;", bo = `
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,48 +2212,48 @@ 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);
2215
+ }`, cn = (e) => e.slice(on.length, -an.length);
2217
2216
  function wo(e, t, i, n) {
2218
- const r = ln(e).replaceAll('\\"', '"'), a = Nr(To(r)), c = n ? `@layer{${i ? "" : `
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 ? bo : ""}`;
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 "";
2239
- const i = te(e.dir.src, t);
2238
+ const i = oe(e.dir.src, t);
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,49 +2261,46 @@ 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
- for (const s of e.privateApiJson.modules) {
2271
- t.push(s.path);
2272
- for (const r of s.declarations)
2273
- "customElement" in r && i.push(No(r, e, s.path));
2269
+ for (const n of e.privateApiJson.modules) {
2270
+ t.push(n.path);
2271
+ for (const s of n.declarations)
2272
+ "customElement" in s && i.push(Fo(s, e, n.path));
2274
2273
  }
2275
2274
  return [
2276
- // Deprecated feature will be dropped in https://devtopia.esri.com/WebGIS/arcgis-web-components/issues/2765
2277
- // eslint-disable-next-line @typescript-eslint/no-deprecated
2278
- e.viteCommand === "build" && e.options.build?.ssr?.stencilCompatibility?.enabled === !0 ? 'import "@lit-labs/ssr-client/lit-element-hydrate-support.js";' : "",
2279
2275
  'import { runtime } from "./runtime";',
2280
2276
  'import { makeDefineCustomElements } from "@arcgis/lumina";',
2281
- ko(e),
2282
- e.hmrEnabled ? jo : "",
2277
+ xo(e),
2278
+ e.hmrEnabled ? Do : "",
2283
2279
  "",
2284
- e.isInStorybook ? Co(e.apiJson) : "",
2280
+ e.isInStorybook ? Eo(e.apiJson) : "",
2285
2281
  "",
2286
2282
  "export const defineCustomElements = makeDefineCustomElements(runtime, {",
2287
2283
  i.join(`,
2288
2284
  `),
2289
2285
  "});",
2290
- e.hmrEnabled ? Ro(t) : ""
2286
+ e.hmrEnabled ? jo(t) : ""
2291
2287
  ].join(`
2292
2288
  `);
2293
2289
  }
2294
- const Fo = `import "./index";
2295
- 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) => [
2296
2292
  ` "${e.tagName}": [`,
2297
2293
  `()=>import("${u.join(t.dir.root, i)}"),`,
2298
- Do(e),
2294
+ No(e),
2299
2295
  "]"
2300
2296
  ].join("");
2301
- function Do(e) {
2302
- 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);
2303
- 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)}"` : "";
2304
2300
  }
2305
- function un(e) {
2301
+ function pn(e) {
2306
2302
  const t = e.members.filter((r) => r.kind === "field").map((r) => {
2307
- const a = typeof r.attribute == "string", c = a && r.attribute !== wt(r.name);
2303
+ const a = typeof r.attribute == "string", c = a && r.attribute !== bt(r.name);
2308
2304
  return a && !c ? [r.name] : [r.name, c ? String(r.attribute) : ""];
2309
2305
  }), i = e.members.filter(
2310
2306
  (r) => r.kind === "method" && /**
@@ -2315,23 +2311,23 @@ function un(e) {
2315
2311
  ), n = i.filter((r) => r.async === !0).map((r) => r.name), s = i.filter((r) => r.async !== !0).map((r) => r.name);
2316
2312
  return { tagName: e.tagName, properties: t, asyncMethods: n, syncMethods: s };
2317
2313
  }
2318
- const jo = `import { handleHmrUpdate, handleComponentMetaUpdate } from "@arcgis/lumina/hmrSupport";
2319
- `, Ro = (e) => `
2314
+ const Do = `import { handleHmrUpdate, handleComponentMetaUpdate } from "@arcgis/lumina/hmrSupport";
2315
+ `, jo = (e) => `
2320
2316
  if(import.meta.hot) {
2321
2317
  import.meta.hot.on("component-meta-update", handleComponentMetaUpdate);
2322
2318
  import.meta.hot.accept([
2323
2319
  ${e.map((t) => ` "/${t}",`).join(`
2324
2320
  `)}
2325
2321
  ], handleHmrUpdate);
2326
- }`, Mo = "@arcgis/lumina:addMethodMetadata";
2327
- function Oo(e, t, i, n, s) {
2322
+ }`, Ro = "@arcgis/lumina:addMethodMetadata";
2323
+ function Mo(e, t, i, n, s) {
2328
2324
  const r = i.getSignatureFromDeclaration(e);
2329
2325
  if (r === void 0)
2330
2326
  return;
2331
2327
  for (const d of e.parameters) {
2332
2328
  if (!o.isIdentifier(d.name)) {
2333
2329
  C.warn(
2334
- Mo,
2330
+ Ro,
2335
2331
  `Object binding patterns are not yet supported in the docs. Found ${d.name?.getText(n)} in ${e.name.getText(n)}`,
2336
2332
  n.fileName
2337
2333
  );
@@ -2347,13 +2343,13 @@ function Oo(e, t, i, n, s) {
2347
2343
  });
2348
2344
  }
2349
2345
  t.parameters.length === 0 && (t.parameters = void 0);
2350
- 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);
2351
2347
  ue(e.name, i, t), t.return = {
2352
2348
  type: c
2353
2349
  }, t.signature = l.replace(" =>", ":");
2354
2350
  }
2355
- const Jo = (e) => e.modifiers?.some?.((t) => t.kind === o.SyntaxKind.AsyncKeyword) ?? !1;
2356
- 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) {
2357
2353
  const s = i.typeScriptTypeChecker, a = s.getTypeAtLocation(e).getProperty("emit");
2358
2354
  if (a?.valueDeclaration === void 0)
2359
2355
  return;
@@ -2365,7 +2361,7 @@ function Ko(e, t, i, n) {
2365
2361
  const m = s.getTypeArguments(p)?.at(0);
2366
2362
  if (m === void 0)
2367
2363
  continue;
2368
- const f = Me(s, m, n, i.dir), y = {
2364
+ const f = Me(s, m, n, i.dir), g = {
2369
2365
  name: t,
2370
2366
  summary: void 0,
2371
2367
  description: void 0,
@@ -2378,11 +2374,11 @@ function Ko(e, t, i, n) {
2378
2374
  composed: void 0,
2379
2375
  privacy: void 0
2380
2376
  };
2381
- return ue(e.name, s, y), Wo(e, y, n), y.privacy === void 0 ? y : void 0;
2377
+ return ue(e.name, s, g), Ko(e, g, n), g.privacy === void 0 ? g : void 0;
2382
2378
  }
2383
2379
  }
2384
2380
  const Ae = "createEvent";
2385
- function Wo(e, t, i) {
2381
+ function Ko(e, t, i) {
2386
2382
  if (!e.initializer || !o.isCallExpression(e.initializer))
2387
2383
  return;
2388
2384
  const n = e.initializer;
@@ -2405,10 +2401,10 @@ function Wo(e, t, i) {
2405
2401
  )
2406
2402
  );
2407
2403
  for (const r of s.properties)
2408
- !o.isPropertyAssignment(r) || !o.isIdentifier(r.name) || (r.name.text === "cancelable" && !re(r.initializer, i) && (t.cancelable = !1), r.name.text === "bubbles" && !re(r.initializer, i) && (t.bubbles = !1), r.name.text === "composed" && !re(r.initializer, i) && (t.composed = !1));
2404
+ !o.isPropertyAssignment(r) || !o.isIdentifier(r.name) || (r.name.text === "cancelable" && !se(r.initializer, i) && (t.cancelable = !1), r.name.text === "bubbles" && !se(r.initializer, i) && (t.bubbles = !1), r.name.text === "composed" && !se(r.initializer, i) && (t.composed = !1));
2409
2405
  }
2410
2406
  }
2411
- function re(e, t) {
2407
+ function se(e, t) {
2412
2408
  if (e.kind === o.SyntaxKind.TrueKeyword)
2413
2409
  return !0;
2414
2410
  if (e.kind === o.SyntaxKind.FalseKeyword)
@@ -2421,7 +2417,7 @@ function re(e, t) {
2421
2417
  );
2422
2418
  }
2423
2419
  const kt = "@arcgis/lumina-compiler";
2424
- class Je extends ms {
2420
+ class Je extends us {
2425
2421
  constructor(t, i) {
2426
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;
2427
2423
  }
@@ -2433,12 +2429,12 @@ class Je extends ms {
2433
2429
  const i = super.extractModules(t);
2434
2430
  for (const n of i)
2435
2431
  for (const s of n.declarations)
2436
- "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)));
2437
2433
  return i;
2438
2434
  }
2439
2435
  extractDeclarations(t) {
2440
2436
  return this.localDeclaredComponents = new Map(
2441
- Hi(t.text)?.map(([i, n]) => [n, i]) ?? []
2437
+ _i(t.text)?.map(([i, n]) => [n, i]) ?? []
2442
2438
  ), this.localDeclaredComponents.size === 0 ? [] : super.extractDeclarations(t);
2443
2439
  }
2444
2440
  extractDeclaration(t) {
@@ -2480,7 +2476,7 @@ class Je extends ms {
2480
2476
  * prefix (Arcgis), where as tag name always does. This also matches
2481
2477
  * Stencil's behavior.
2482
2478
  */
2483
- pascalCaseName: vs(n),
2479
+ pascalCaseName: hs(n),
2484
2480
  privacy: void 0,
2485
2481
  importPath: "",
2486
2482
  members: [],
@@ -2506,13 +2502,13 @@ class Je extends ms {
2506
2502
  }
2507
2503
  if (this.apiComponent = s, s.members = this.extractComponentMembers(t), this.context.isFullApiExtraction) {
2508
2504
  s.attributes = this.inferAttributes(s.members), this.indexedComponents.set(i, s);
2509
- const a = Js(n, this.context, this.apiModule.path);
2505
+ const a = Os(n, this.context, this.apiModule.path);
2510
2506
  if (s.importPath = `components/${a}`, this.localCssImports !== void 0) {
2511
2507
  for (const f of this.localCssImports) {
2512
- const y = this.context._cssImports.get(f);
2513
- y === void 0 ? this.context._cssImports.set(f, /* @__PURE__ */ new Set([s.tagName])) : y.add(s.tagName);
2514
- const g = this.context._cssDocs?.get(f);
2515
- g !== void 0 && (s.cssProperties = g);
2508
+ const g = this.context._cssImports.get(f);
2509
+ g === void 0 ? this.context._cssImports.set(f, /* @__PURE__ */ new Set([s.tagName])) : g.add(s.tagName);
2510
+ const y = this.context._cssDocs?.get(f);
2511
+ y !== void 0 && (s.cssProperties = y);
2516
2512
  }
2517
2513
  this.localCssImports = void 0;
2518
2514
  }
@@ -2566,9 +2562,9 @@ console.log("${s.tagName} is ready to go!");
2566
2562
  }
2567
2563
  extractComponentMembers(t) {
2568
2564
  const i = [], n = t.members.length;
2569
- let s, r = t.members[0], a, c = Q(r?.name);
2565
+ let s, r = t.members[0], a, c = X(r?.name);
2570
2566
  for (let l = 0; l < n; l++) {
2571
- if (s = r, r = t.members[l + 1], a = c, c = Q(r?.name), this.pairedSetter !== void 0) {
2567
+ if (s = r, r = t.members[l + 1], a = c, c = X(r?.name), this.pairedSetter !== void 0) {
2572
2568
  this.pairedSetter = void 0;
2573
2569
  continue;
2574
2570
  }
@@ -2579,7 +2575,7 @@ console.log("${s.tagName} is ready to go!");
2579
2575
  return i;
2580
2576
  }
2581
2577
  extractComponentMember(t, i) {
2582
- if (fs(t) || i === void 0) {
2578
+ if (ms(t) || i === void 0) {
2583
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");
2584
2580
  return;
2585
2581
  }
@@ -2598,7 +2594,7 @@ console.log("${s.tagName} is ready to go!");
2598
2594
  }
2599
2595
  let r, a = !1, c = !1;
2600
2596
  for (const d of n)
2601
- !o.isPropertyAssignment(d) || !o.isIdentifier(d.name) || (d.name.text === "attribute" && (o.isStringLiteral(d.initializer) ? r = d.initializer.text : r = re(d.initializer, this.file)), d.name.text === "reflect" && re(d.initializer, this.file) && (a = !0), d.name.text === "readOnly" && re(d.initializer, this.file) && (c = !0), (d.name.text === "type" || d.name.text === "converter") && (r ??= !0));
2597
+ !o.isPropertyAssignment(d) || !o.isIdentifier(d.name) || (d.name.text === "attribute" && (o.isStringLiteral(d.initializer) ? r = d.initializer.text : r = se(d.initializer, this.file)), d.name.text === "reflect" && se(d.initializer, this.file) && (a = !0), d.name.text === "readOnly" && se(d.initializer, this.file) && (c = !0), (d.name.text === "type" || d.name.text === "converter") && (r ??= !0));
2602
2598
  const l = {
2603
2599
  kind: "field",
2604
2600
  name: i,
@@ -2608,7 +2604,7 @@ console.log("${s.tagName} is ready to go!");
2608
2604
  default: void 0,
2609
2605
  deprecated: void 0,
2610
2606
  readonly: c || (s ? t.modifiers?.some((d) => d.kind === o.SyntaxKind.ReadonlyKeyword) : o.isGetAccessor(t) && this.pairedSetter === void 0) ? !0 : void 0,
2611
- attribute: r === !1 ? void 0 : typeof r == "string" ? r : wt(i),
2607
+ attribute: r === !1 ? void 0 : typeof r == "string" ? r : bt(i),
2612
2608
  reflects: a || void 0,
2613
2609
  docsTags: void 0,
2614
2610
  getterType: void 0,
@@ -2616,13 +2612,13 @@ console.log("${s.tagName} is ready to go!");
2616
2612
  inheritedFrom: void 0,
2617
2613
  privacy: void 0
2618
2614
  };
2619
- 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;
2620
2616
  }
2621
2617
  /**
2622
2618
  * Based on a `non-@property()` property, extract a public event if it is one.
2623
2619
  */
2624
2620
  extractComponentEvent(t, i) {
2625
- const n = Ko(t, i, this.context, this.file);
2621
+ const n = Jo(t, i, this.context, this.file);
2626
2622
  return n !== void 0 && this.copyDoc(this.copyDocDefinitions?.events?.[i], n, this.apiComponent), n;
2627
2623
  }
2628
2624
  /**
@@ -2639,15 +2635,15 @@ console.log("${s.tagName} is ready to go!");
2639
2635
  // in the documentation. The full type is still present in the .d.ts files.
2640
2636
  i.name === "messageOverrides" ? {
2641
2637
  text: "Record<string, unknown>"
2642
- } : Xr(this.context, d, f, this.file);
2643
- const y = o.isPropertyDeclaration(t) && t.type !== void 0 && t.initializer !== void 0 && o.isPropertyAccessExpression(t.initializer) && o.isPropertyAccessExpression(t.initializer.expression) && t.initializer.expression.expression.kind === o.SyntaxKind.ThisKeyword && o.isIdentifier(t.initializer.expression.name) && o.isIdentifier(t.initializer.name);
2644
- if ("initializer" in t && t.initializer !== void 0 && (!i.default || !i.description) || y) {
2638
+ } : Vr(this.context, d, f, this.file);
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);
2640
+ if ("initializer" in t && t.initializer !== void 0 && (!i.default || !i.description) || g) {
2645
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() ?? [];
2646
2642
  if (S !== void 0) {
2647
2643
  const $ = Kt(s, S);
2648
2644
  if ($.docsTags.length > 0) {
2649
2645
  $.docsTags = $.docsTags.filter(
2650
- (E) => !c.has(E.name) || ys.has(E.name)
2646
+ (E) => !c.has(E.name) || fs.has(E.name)
2651
2647
  );
2652
2648
  const b = i.description;
2653
2649
  ue(t.name, s, i, $), $.docsTags.forEach((E) => {
@@ -2662,7 +2658,7 @@ console.log("${s.tagName} is ready to go!");
2662
2658
  return;
2663
2659
  const b = $;
2664
2660
  l ||= b.modifiers?.some((E) => E.kind === o.SyntaxKind.ReadonlyKeyword) ?? !1, Wt(b, i, b.getSourceFile());
2665
- }), y && x !== void 0 && L !== void 0 && x.type?.getText() !== L.parameters[0]?.type?.getText() && (i.getterType = { text: `typeof ${h.getText(this.file)}` });
2661
+ }), g && x !== void 0 && L !== void 0 && x.type?.getText() !== L.parameters[0]?.type?.getText() && (i.getterType = { text: `typeof ${h.getText(this.file)}` });
2666
2662
  }
2667
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(
2668
2664
  `Boolean properties should default to "false". Found default value "true" in ${this.apiComponent.name}.${i.name}. See https://qawebgis.esri.com/components/lumina/properties#boolean-properties`
@@ -2696,12 +2692,12 @@ console.log("${s.tagName} is ready to go!");
2696
2692
  inheritedFrom: void 0,
2697
2693
  docsTags: void 0,
2698
2694
  signature: "",
2699
- async: Jo(t) ? !0 : void 0,
2695
+ async: Oo(t) ? !0 : void 0,
2700
2696
  privacy: void 0
2701
2697
  };
2702
2698
  if (this.context.isFullApiExtraction) {
2703
2699
  const s = this.context.typeScriptTypeChecker;
2704
- 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);
2705
2701
  }
2706
2702
  return n;
2707
2703
  }
@@ -2722,7 +2718,7 @@ console.log("${s.tagName} is ready to go!");
2722
2718
  description: n.description,
2723
2719
  inheritedFrom: n.inheritedFrom,
2724
2720
  type: s === void 0 || s.length === 0 ? n.type : {
2725
- text: nn(s),
2721
+ text: tn(s),
2726
2722
  references: void 0,
2727
2723
  values: s
2728
2724
  },
@@ -2796,21 +2792,21 @@ const le = {
2796
2792
  name: "LitElement",
2797
2793
  package: "@arcgis/lumina"
2798
2794
  }, nt = (e, t) => e.name.localeCompare(t.name);
2799
- async function Bo(e, t) {
2795
+ async function Wo(e, t) {
2800
2796
  t || (e.componentFilesPromise = xt(e, e.dir.srcComponents));
2801
- const i = await e.componentFilesPromise, n = await Zo(e, i);
2797
+ const i = await e.componentFilesPromise, n = await Qo(e, i);
2802
2798
  await e.componentStoriesPromise, e._componentPathMapping = {}, e._localDefinedComponents = void 0;
2803
- const s = mn(n, e, !1);
2799
+ const s = un(n, e, !1);
2804
2800
  e.privateApiJson = s;
2805
- const [r, a] = fn(s);
2801
+ const [r, a] = mn(s);
2806
2802
  return e.apiJsonComponents = a, e.apiJson = r, s;
2807
2803
  }
2808
- function _o(e, t, i) {
2809
- 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];
2810
2806
  {
2811
- const f = fn(s)[0].modules[0], y = e.apiJson.modules.findIndex((v) => v.path === f.path), g = e.apiJson.modules[y], h = Array.from(e.apiJson.modules);
2812
- h.splice(y, 1, f), e.apiJson = { ...e.apiJson, modules: h }, e.apiJsonComponents = e.apiJsonComponents.filter(
2813
- (v) => !g.declarations.includes(v)
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);
2808
+ h.splice(g, 1, f), e.apiJson = { ...e.apiJson, modules: h }, e.apiJsonComponents = e.apiJsonComponents.filter(
2809
+ (v) => !y.declarations.includes(v)
2814
2810
  );
2815
2811
  for (const v of f.declarations)
2816
2812
  "customElement" in v && e.apiJsonComponents.push(v);
@@ -2825,16 +2821,16 @@ function _o(e, t, i) {
2825
2821
  ), m = [];
2826
2822
  for (const f of r.declarations)
2827
2823
  if ("customElement" in f) {
2828
- const g = p.find((h) => h.tagName === f.tagName) === void 0;
2829
- d ||= g, m.push(f);
2824
+ const y = p.find((h) => h.tagName === f.tagName) === void 0;
2825
+ d ||= y, m.push(f);
2830
2826
  }
2831
2827
  return d ||= m.length !== p.length, d ? void 0 : m;
2832
2828
  }
2833
- function mn(e, t, i) {
2829
+ function un(e, t, i) {
2834
2830
  const n = t.options.apiJson?.Extractor ?? Je, r = new n(t, i).extract(e);
2835
2831
  return t.options.apiJson?.afterCreate?.(r, i), r;
2836
2832
  }
2837
- function fn(e) {
2833
+ function mn(e) {
2838
2834
  const t = { ...e, modules: [] }, i = [];
2839
2835
  for (const n of e.modules) {
2840
2836
  const s = { ...n, declarations: [] };
@@ -2850,58 +2846,58 @@ function fn(e) {
2850
2846
  }
2851
2847
  return [t, i];
2852
2848
  }
2853
- function Ho(e, t, i) {
2854
- const n = Uo(i, e);
2855
- O(e, n, t);
2849
+ function _o(e, t, i) {
2850
+ const n = Ho(i, e);
2851
+ M(e, n, t);
2856
2852
  for (const s of e.members) {
2857
2853
  if (s.kind === "field")
2858
2854
  Ie(s.type, i, t);
2859
2855
  else {
2860
2856
  if (Ie(s.return?.type, i, t), s.parameters !== void 0)
2861
2857
  for (const r of s.parameters)
2862
- Ie(r.type, i, t), O(r, n, t);
2863
- 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);
2864
2860
  }
2865
- O(s, n, t);
2861
+ M(s, n, t);
2866
2862
  }
2867
2863
  if (e.events !== void 0)
2868
2864
  for (const s of e.events)
2869
- Ie(s.type, i, t), O(s, n, t);
2865
+ Ie(s.type, i, t), M(s, n, t);
2870
2866
  if (e.attributes !== void 0)
2871
2867
  for (const s of e.attributes)
2872
- O(s, n, t);
2868
+ M(s, n, t);
2873
2869
  if (e.slots !== void 0)
2874
2870
  for (const s of e.slots)
2875
- O(s, n, t);
2871
+ M(s, n, t);
2876
2872
  if (e.cssProperties !== void 0)
2877
2873
  for (const s of e.cssProperties)
2878
- O(s, n, t);
2874
+ M(s, n, t);
2879
2875
  if (e.cssParts !== void 0)
2880
2876
  for (const s of e.cssParts)
2881
- O(s, n, t);
2877
+ M(s, n, t);
2882
2878
  if (e.cssStates !== void 0)
2883
2879
  for (const s of e.cssStates)
2884
- O(s, n, t);
2880
+ M(s, n, t);
2885
2881
  if (e.demos !== void 0)
2886
2882
  for (const s of e.demos)
2887
- O(s, n, t);
2883
+ M(s, n, t);
2888
2884
  }
2889
2885
  function Ie(e, t, i) {
2890
2886
  e !== void 0 && (e.references?.reduce(
2891
- (n, s) => zo(s, t, i, n),
2887
+ (n, s) => Uo(s, t, i, n),
2892
2888
  0
2893
2889
  ), e.text = e.text.replaceAll(
2894
- Qo,
2890
+ Xo,
2895
2891
  (n, s) => At(t.get(s)) ?? n
2896
- ), e.values?.forEach(qo, t));
2892
+ ), e.values?.forEach(zo, t));
2897
2893
  }
2898
- function O(e, t, i) {
2894
+ function M(e, t, i) {
2899
2895
  if (e.description && (e.description = e.description.replaceAll(st, t).replaceAll(i.alternativeDocumentationUrl, i.normalizedDocumentationUrl)), e.docsTags)
2900
2896
  for (const n of e.docsTags)
2901
2897
  n.text && (n.text = n.text.replaceAll(st, t).replaceAll(i.alternativeDocumentationUrl, i.normalizedDocumentationUrl));
2902
2898
  typeof e.deprecated == "string" && (e.deprecated = e.deprecated.replaceAll(st, t).replaceAll(i.alternativeDocumentationUrl, i.normalizedDocumentationUrl));
2903
2899
  }
2904
- const st = /\{@link ([^}]+)\}/gu, Uo = (e, t) => (i, n) => {
2900
+ const st = /\{@link ([^}]+)\}/gu, Ho = (e, t) => (i, n) => {
2905
2901
  let s = n.indexOf(" ");
2906
2902
  s === -1 && (s = n.length);
2907
2903
  const r = n.slice(0, s), a = n.slice(s + 1);
@@ -2912,66 +2908,66 @@ const st = /\{@link ([^}]+)\}/gu, Uo = (e, t) => (i, n) => {
2912
2908
  throw Error(
2913
2909
  `Failed to find which component is referenced by the following link in ${t.name}: ${i}. Make sure the link follows the pattern {@link ComponentClassName} or {@link ComponentClassName#propertyOrMethodOrEventName}.`
2914
2910
  );
2915
- const p = d.demos?.find((g) => g.description === "Docs")?.url;
2911
+ const p = d.demos?.find((y) => y.description === "Docs")?.url;
2916
2912
  if (p === void 0)
2917
2913
  throw Error(
2918
2914
  `Failed to find documentation URL for ${c} in ${t.name}. Make sure the following Lumina configuration option is set: documentation.getComponentDocsUrl`
2919
2915
  );
2920
2916
  if (l === void 0)
2921
2917
  return `[${a || d.name}](${p})`;
2922
- if ((d.members.find((g) => g.name === l) ?? d.events?.find((g) => g.name === l)) === void 0)
2918
+ if ((d.members.find((y) => y.name === l) ?? d.events?.find((y) => y.name === l)) === void 0)
2923
2919
  throw Error(
2924
2920
  `Failed to find ${l} member in ${c}. Found it referenced by the following link in ${t.name}: ${i}. Make sure the link follows the pattern {@link ComponentClassName#propertyOrMethodOrEventName}.`
2925
2921
  );
2926
2922
  return `[${a || (d === t ? l : `${d.tagName}.${l}`)}](${p}#${l})`;
2927
2923
  };
2928
- function zo(e, t, i, n) {
2924
+ function Uo(e, t, i, n) {
2929
2925
  if (e.viewUrl !== void 0 && (e.viewUrl = e.viewUrl.replace(
2930
2926
  i.alternativeDocumentationUrl,
2931
2927
  i.normalizedDocumentationUrl
2932
2928
  )), n > 0 && (e.start !== void 0 && (e.start += n), e.end !== void 0 && (e.end += n)), e.package !== void 0)
2933
2929
  return n;
2934
2930
  if (e.module?.startsWith("dist/components/") === !0)
2935
- e.module = ge(e.module, "dist/components/", i);
2931
+ e.module = ye(e.module, "dist/components/", i);
2936
2932
  else if (e.module === "index.js" && e.name) {
2937
2933
  const s = t.get(e.name);
2938
2934
  if (s !== void 0) {
2939
2935
  const r = e.name.length;
2940
2936
  e.name = At(s);
2941
- const a = e.name.length - r - pi;
2942
- 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;
2943
2939
  }
2944
2940
  }
2945
2941
  return n;
2946
2942
  }
2947
- function qo(e) {
2943
+ function zo(e) {
2948
2944
  e.type.startsWith("ToElement<") && (e.type = At(this.get(e.type.slice(10, -1))) ?? e.type);
2949
2945
  }
2950
- const At = (e) => e ? `HTML${e.pascalCaseName}Element` : void 0, Go = "ToElement<", pi = Go.length, Vo = ">", Xo = Vo.length, Qo = /ToElement<(\w+)>/gu;
2951
- 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) {
2952
2948
  if (e.viteCommand === "serve" && (Object.hasOwn(e, "typeScriptHost") || (e.typeScriptHost = o.createCompilerHost(e.typeScriptConfig, !1))), e.typeScriptProgram !== void 0) {
2953
2949
  const i = e.typeScriptProgram.getSourceFiles(), n = new Set(t);
2954
2950
  return i.filter((s) => n.has(s.fileName));
2955
2951
  } else
2956
2952
  return await Promise.all(
2957
2953
  t.map(async (i) => {
2958
- const n = await J(i, "utf8");
2954
+ const n = await O(i, "utf8");
2959
2955
  return e.getSourceFile(i, n);
2960
2956
  })
2961
2957
  );
2962
2958
  }
2963
- async function yn(e) {
2964
- return ve ??= ea(e), await ve;
2959
+ async function fn(e) {
2960
+ return ve ??= Yo(e), await ve;
2965
2961
  }
2966
- function Yo() {
2967
- if (gt === void 0)
2962
+ function Zo() {
2963
+ if (yt === void 0)
2968
2964
  throw Error(
2969
2965
  w(
2970
2966
  "@arcgis/lumina:retrieveComponentDependencies",
2971
2967
  "Component dependencies have not yet been initialized. Await componentDependenciesPromise promise first."
2972
2968
  )
2973
2969
  );
2974
- return gt;
2970
+ return yt;
2975
2971
  }
2976
2972
  function gn() {
2977
2973
  if (ht === void 0)
@@ -2983,13 +2979,13 @@ function gn() {
2983
2979
  );
2984
2980
  return ht;
2985
2981
  }
2986
- async function ea(e) {
2987
- const t = N(e), i = t.dependencies ?? {}, n = t.peerDependencies ?? {}, r = (await Promise.all(
2988
- [...Object.keys(i), ...Object.keys(n)].filter((a) => !ta.has(a)).flatMap(async (a) => await hn(a, e))
2989
- )).filter(R);
2990
- return gt ??= r, ht = Object.fromEntries(r.flatMap((a) => Object.entries(a.components))), 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);
2986
+ return yt ??= r, ht = Object.fromEntries(r.flatMap((a) => Object.entries(a.components))), r;
2991
2987
  }
2992
- const ta = /* @__PURE__ */ new Set([
2988
+ const ea = /* @__PURE__ */ new Set([
2993
2989
  "@arcgis/arcade-languageservice",
2994
2990
  "@arcgis/components-build-utils",
2995
2991
  "@arcgis/components-utils",
@@ -3025,30 +3021,30 @@ const ta = /* @__PURE__ */ new Set([
3025
3021
  "vscode-languageserver-textdocument",
3026
3022
  "vscode-languageserver-types"
3027
3023
  ]);
3028
- let gt, ht, ve;
3029
- async function hn(e, t) {
3030
- 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");
3024
+ let yt, ht, ve;
3025
+ async function yn(e, t) {
3026
+ const i = await _e(e, t), n = await He(i), s = "exports" in n, r = oa.bind(void 0, s), a = "@stencil/core" in (n.dependencies ?? {}) || "@stencil/core" in (n.devDependencies ?? {}), c = u.join(i, "dist/esm/loader.js");
3031
3027
  if (a ? await U(c) : !1) {
3032
- const y = await J(c, "utf8"), g = ia(y, "bootstrapLazy("), h = y.indexOf(", options", g), v = y.slice(g, 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;
3033
3029
  try {
3034
- 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 });
3035
3031
  return { packageName: e, type: "stencil", components: x };
3036
3032
  } catch (T) {
3037
3033
  C.warn("@arcgis/lumina", `Failed to parse dist/esm/loader.js for ${e}.
3038
3034
  Error: ${String(T)}`);
3039
3035
  }
3040
3036
  }
3041
- const d = ui(n.customElements);
3037
+ const d = pi(n.customElements);
3042
3038
  if (d != null) {
3043
- const y = u.join(i, d), g = JSON.parse(await J(y, "utf-8")), h = na(g), v = vn(g, {
3039
+ const g = u.join(i, d), y = JSON.parse(await O(g, "utf-8")), h = ia(y), v = hn(y, {
3044
3040
  packageName: e,
3045
3041
  getImportPath: r
3046
3042
  });
3047
3043
  return { type: h ? "@arcgis/lumina" : "unknown", packageName: e, components: v };
3048
3044
  }
3049
- const p = ui(n["web-types"]);
3045
+ const p = pi(n["web-types"]);
3050
3046
  if (p != null) {
3051
- const y = u.join(i, p), g = JSON.parse(await J(y, "utf-8")), h = sa(g, {
3047
+ const g = u.join(i, p), y = JSON.parse(await O(g, "utf-8")), h = na(y, {
3052
3048
  packageName: e,
3053
3049
  getImportPath: r,
3054
3050
  packageRoot: i
@@ -3057,19 +3053,19 @@ Error: ${String(T)}`);
3057
3053
  }
3058
3054
  const m = u.join(i, "dist/components");
3059
3055
  if (await U(m)) {
3060
- const y = await oa(m, {
3056
+ const g = await ra(m, {
3061
3057
  packageName: e,
3062
3058
  getImportPath: r
3063
3059
  });
3064
- return { type: "unknown", packageName: e, components: y };
3060
+ return { type: "unknown", packageName: e, components: g };
3065
3061
  }
3066
3062
  }
3067
- const ui = (e) => Array.isArray(e) ? e[0] : e;
3068
- function ia(e, t) {
3063
+ const pi = (e) => Array.isArray(e) ? e[0] : e;
3064
+ function ta(e, t) {
3069
3065
  const i = e.indexOf(t);
3070
3066
  return i === -1 ? -1 : i + t.length;
3071
3067
  }
3072
- function vn(e, t) {
3068
+ function hn(e, t) {
3073
3069
  const i = {};
3074
3070
  for (const n of e.modules ?? [])
3075
3071
  if (n.declarations !== void 0)
@@ -3087,7 +3083,7 @@ function vn(e, t) {
3087
3083
  }
3088
3084
  return i;
3089
3085
  }
3090
- 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(
3091
3087
  (e.contributions?.html?.elements ?? e.contributions?.html?.tags)?.map(
3092
3088
  (i) => [
3093
3089
  i.name,
@@ -3098,7 +3094,7 @@ const na = (e) => e.compiler?.name === kt, sa = (e, t) => Object.fromEntries(
3098
3094
  }
3099
3095
  ]
3100
3096
  ) ?? []
3101
- ), ra = (e, t) => Object.fromEntries(
3097
+ ), sa = (e, t) => Object.fromEntries(
3102
3098
  e.flatMap(
3103
3099
  ([i, n]) => n.map(
3104
3100
  ([s, r, a]) => [
@@ -3116,7 +3112,7 @@ const na = (e) => e.compiler?.name === kt, sa = (e, t) => Object.fromEntries(
3116
3112
  ]
3117
3113
  )
3118
3114
  )
3119
- ), oa = async (e, t) => Object.fromEntries(
3115
+ ), ra = async (e, t) => Object.fromEntries(
3120
3116
  (await Ue(e)).filter((i) => i.endsWith(".d.ts")).map((i) => {
3121
3117
  const n = i.slice(0, -5);
3122
3118
  return [
@@ -3128,16 +3124,16 @@ const na = (e) => e.compiler?.name === kt, sa = (e, t) => Object.fromEntries(
3128
3124
  }
3129
3125
  ];
3130
3126
  })
3131
- ), aa = (e, t) => e ? `components/${t}` : `dist/components/${t}.js`, ca = (e) => e.startsWith("/") ? e : `/${e}`, It = (e, t) => `${e}@fs${ca(t)}`;
3132
- function qe(e = N(), 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") {
3133
3129
  const n = e.version.includes("next"), s = e.name === "@esri/calcite-components";
3134
3130
  if (s && n)
3135
3131
  return `https://cdn.jsdelivr.net/npm/@esri/calcite-components@${e.version}/dist/calcite/`;
3136
- 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);
3137
3133
  return a.length === 0 ? `https://${r}/${c}/` : s ? `https://${r}/${a}/${c}/` : `https://${r}/${c}/${a}/`;
3138
3134
  }
3139
- const la = (e) => e.split("/").pop() ?? e;
3140
- function da(e, t) {
3135
+ const ca = (e) => e.split("/").pop() ?? e;
3136
+ function la(e, t) {
3141
3137
  if (/\d+\.\d+\.\d+-(?:.*)$/u.test(e))
3142
3138
  return "next";
3143
3139
  const n = /^(?<major>\d+)\.(?<minor>\d+)\.(?<patch>\d+)/u, s = e.match(n);
@@ -3147,9 +3143,9 @@ function da(e, t) {
3147
3143
  }
3148
3144
  return "next";
3149
3145
  }
3150
- const pa = ["keyed", "ref", "repeat", "live"], ae = "staticHtml", Y = "staticSvg", ce = "html", oe = "svg", Sn = Symbol("maybe HTML namespace or maybe SVG"), bn = "css", wn = "mathml", Tn = [bn, ce, wn, ae, Y, oe], ua = new Set(Tn), ma = ["safeClassMap", "safeStyleMap", "deferLoad"], fa = "nothing", ya = [...pa, ...Tn, ...ma, fa], Ke = (e) => o.isJsxElement(e) || o.isJsxSelfClosingElement(e) || o.isJsxFragment(e);
3151
- function mi(e, t, i) {
3152
- if (ne(e))
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) {
3148
+ if (ie(e))
3153
3149
  return e;
3154
3150
  {
3155
3151
  i === void 0 && t.neededImports.add("nothing");
@@ -3163,15 +3159,15 @@ function mi(e, t, i) {
3163
3159
  );
3164
3160
  }
3165
3161
  }
3166
- function ne(e) {
3162
+ function ie(e) {
3167
3163
  return (
3168
3164
  // Inlined string literal
3169
3165
  typeof e == "string" || // Syntax kinds that are never undefined
3170
3166
  ga.has(e.kind) || // Ternary with both branches never undefined
3171
- o.isConditionalExpression(e) && ne(e.whenTrue) && ne(e.whenFalse) || // Binary expression with operator that never results in undefined Or both sides are definitely not undefined
3172
- o.isBinaryExpression(e) && (ha.has(e.operatorToken.kind) || ne(e.left) && ne(e.right)) || // `as`, `satisfies`, `()` with definitely not undefined expression
3173
- (o.isParenthesizedExpression(e) || o.isSatisfiesExpression(e) || o.isAsExpression(e)) && ne(e.expression) || // JSX that got converted to html`<p>Something</p>`
3174
- o.isTaggedTemplateExpression(e) && o.isIdentifier(e.tag) && ua.has(e.tag.text)
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
3168
+ o.isBinaryExpression(e) && (ya.has(e.operatorToken.kind) || ie(e.left) && ie(e.right)) || // `as`, `satisfies`, `()` with definitely not undefined expression
3169
+ (o.isParenthesizedExpression(e) || o.isSatisfiesExpression(e) || o.isAsExpression(e)) && ie(e.expression) || // JSX that got converted to html`<p>Something</p>`
3170
+ o.isTaggedTemplateExpression(e) && o.isIdentifier(e.tag) && pa.has(e.tag.text)
3175
3171
  );
3176
3172
  }
3177
3173
  const ga = /* @__PURE__ */ new Set([
@@ -3193,7 +3189,7 @@ const ga = /* @__PURE__ */ new Set([
3193
3189
  o.SyntaxKind.ClassExpression,
3194
3190
  // Trust? Trust.
3195
3191
  o.SyntaxKind.NonNullExpression
3196
- ]), ha = /* @__PURE__ */ new Set([
3192
+ ]), ya = /* @__PURE__ */ new Set([
3197
3193
  o.SyntaxKind.PlusEqualsToken,
3198
3194
  o.SyntaxKind.MinusEqualsToken,
3199
3195
  o.SyntaxKind.AsteriskAsteriskEqualsToken,
@@ -3228,9 +3224,9 @@ const ga = /* @__PURE__ */ new Set([
3228
3224
  o.SyntaxKind.SlashToken,
3229
3225
  o.SyntaxKind.PercentToken,
3230
3226
  o.SyntaxKind.AsteriskAsteriskToken
3231
- ]), va = {
3227
+ ]), ha = {
3232
3228
  property(e, t, i, n) {
3233
- 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;
3234
3230
  if (a) {
3235
3231
  const f = ot(t);
3236
3232
  if (f === !0)
@@ -3243,13 +3239,13 @@ const ga = /* @__PURE__ */ new Set([
3243
3239
  return [s.name, ...c];
3244
3240
  const [d, p] = c, m = s?.type === "stringifiedNonReflected";
3245
3241
  if (r || m) {
3246
- const f = mi(
3242
+ const f = ui(
3247
3243
  p,
3248
3244
  e,
3249
3245
  m ? "" : void 0
3250
- ), g = i === "value" && (n === "input" || n === "textarea" || n === Re) ? wa(f, e) : f;
3251
- if (g !== p)
3252
- return [m ? `.${i}` : s.name, d, g];
3246
+ ), y = i === "value" && (n === "input" || n === "textarea" || n === Re) ? wa(f, e) : f;
3247
+ if (y !== p)
3248
+ return [m ? `.${i}` : s.name, d, y];
3253
3249
  }
3254
3250
  return [`.${i}`, ...c];
3255
3251
  },
@@ -3259,7 +3255,7 @@ const ga = /* @__PURE__ */ new Set([
3259
3255
  return [i];
3260
3256
  if (n === !1)
3261
3257
  return [];
3262
- 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)];
3263
3259
  return [i, ...a];
3264
3260
  },
3265
3261
  booleanAttribute(e, t, i) {
@@ -3272,7 +3268,7 @@ const ga = /* @__PURE__ */ new Set([
3272
3268
  `Event prop value must be an expression. Found ${String(t?.getText(e.sourceFile))}`
3273
3269
  );
3274
3270
  const n = i.slice(2), s = ut(n);
3275
- 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)];
3276
3272
  },
3277
3273
  directives(e, t) {
3278
3274
  if (t === void 0 || !o.isJsxExpression(t))
@@ -3288,7 +3284,7 @@ const ga = /* @__PURE__ */ new Set([
3288
3284
  throw new Error(
3289
3285
  `Directives prop cannot contain a spread argument - it needs to be statically analyzable. Still, the following are allowed: directives={[directiveA, condition ? a : b, c()]}. Found ${String(t.expression?.getText(e.sourceFile))}`
3290
3286
  );
3291
- return q(e, void 0, s);
3287
+ return z(e, void 0, s);
3292
3288
  });
3293
3289
  },
3294
3290
  ref(e, t) {
@@ -3300,12 +3296,12 @@ const ga = /* @__PURE__ */ new Set([
3300
3296
  );
3301
3297
  return [
3302
3298
  o.factory.createCallExpression(o.factory.createIdentifier(i), void 0, [
3303
- q(e, void 0, t.expression)
3299
+ z(e, void 0, t.expression)
3304
3300
  ])
3305
3301
  ];
3306
3302
  },
3307
- class: yi,
3308
- style: yi,
3303
+ class: fi,
3304
+ style: fi,
3309
3305
  key: (e, t) => [Lt(t, e.sourceFile)],
3310
3306
  deferLoad(e, t, i, n) {
3311
3307
  if (typeof n != "string")
@@ -3317,7 +3313,7 @@ const ga = /* @__PURE__ */ new Set([
3317
3313
  return [o.factory.createIdentifier(s)];
3318
3314
  }
3319
3315
  };
3320
- function Sa(e, t, i) {
3316
+ function va(e, t, i) {
3321
3317
  if (typeof e == "string") {
3322
3318
  const r = (i.externalComponents[e] ?? i.localComponents[e])?.propToAttribute?.[t];
3323
3319
  if (r !== void 0)
@@ -3333,7 +3329,7 @@ function Sa(e, t, i) {
3333
3329
  } else {
3334
3330
  const s = Object.values(B.perElement).map(
3335
3331
  (a) => rt(a, t)
3336
- ), r = ye(s, (a) => a?.type === "stringifiedNonReflected" ? a : void 0) ?? ye(s, (a) => a?.type === "stringifiedReflected" ? a : void 0);
3332
+ ), r = ge(s, (a) => a?.type === "stringifiedNonReflected" ? a : void 0) ?? ge(s, (a) => a?.type === "stringifiedReflected" ? a : void 0);
3337
3333
  if (r !== void 0)
3338
3334
  return r;
3339
3335
  }
@@ -3372,10 +3368,10 @@ function Ne(e, t, i = !1) {
3372
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 { }`
3373
3369
  );
3374
3370
  if (o.isStringLiteral(t))
3375
- return fi(t, i);
3371
+ return mi(t, i);
3376
3372
  if (o.isJsxExpression(t) && t.expression) {
3377
3373
  if (o.isStringLiteral(t.expression))
3378
- return fi(t.expression, i);
3374
+ return mi(t.expression, i);
3379
3375
  if (i) {
3380
3376
  if (o.isNumericLiteral(t.expression))
3381
3377
  return [`=${t.expression.text}`];
@@ -3385,14 +3381,14 @@ function Ne(e, t, i = !1) {
3385
3381
  }
3386
3382
  return ["=", ...Nt(e, t, void 0)];
3387
3383
  }
3388
- function fi(e, t) {
3384
+ function mi(e, t) {
3389
3385
  if (!t)
3390
3386
  return ["=", e];
3391
3387
  const i = e.text;
3392
3388
  if (i.length === 0)
3393
3389
  return [];
3394
- const n = Yi(i);
3395
- if (jr(n)) {
3390
+ const n = Zi(i);
3391
+ if (Dr(n)) {
3396
3392
  const s = n.replaceAll('"', "&#34;");
3397
3393
  if (s.length > n.length) {
3398
3394
  const r = n.replaceAll("'", "&#39;");
@@ -3403,7 +3399,7 @@ function fi(e, t) {
3403
3399
  } else
3404
3400
  return [`=${n}`];
3405
3401
  }
3406
- function yi(e, t, i) {
3402
+ function fi(e, t, i) {
3407
3403
  if (t !== void 0 && o.isStringLiteral(t))
3408
3404
  return [`${i}="${t.text}"`];
3409
3405
  if (t === void 0 || !o.isJsxExpression(t) || t.expression === void 0)
@@ -3411,17 +3407,17 @@ function yi(e, t, i) {
3411
3407
  `${i} prop value must be an expression. Found ${String(t?.getText(e.sourceFile))}`
3412
3408
  );
3413
3409
  const n = t.expression;
3414
- if (ba(n)) {
3410
+ if (Sa(n)) {
3415
3411
  const r = i === "class" ? "safeClassMap" : "safeStyleMap";
3416
3412
  e.neededImports.add(r);
3417
3413
  const a = e.importRenames[r], c = o.factory.createCallExpression(o.factory.createIdentifier(a), void 0, [
3418
- q(e, void 0, n)
3414
+ z(e, void 0, n)
3419
3415
  ]);
3420
3416
  return [`${i}=`, c];
3421
3417
  } else
3422
3418
  return [i, ...Ne(e, t, !0)];
3423
3419
  }
3424
- const ba = (e) => o.isObjectLiteralExpression(e) || o.isPropertyAccessExpression(e) || o.isIdentifier(e) || o.isCallExpression(e) || o.isBinaryExpression(e) || o.isConditionalExpression(e);
3420
+ const Sa = (e) => o.isObjectLiteralExpression(e) || o.isPropertyAccessExpression(e) || o.isIdentifier(e) || o.isCallExpression(e) || o.isBinaryExpression(e) || o.isConditionalExpression(e);
3425
3421
  function wa(e, t) {
3426
3422
  t.neededImports.add("live");
3427
3423
  const i = t.importRenames.live;
@@ -3429,7 +3425,7 @@ function wa(e, t) {
3429
3425
  typeof e == "string" ? o.factory.createStringLiteral(e) : e
3430
3426
  ]);
3431
3427
  }
3432
- function Ta(e) {
3428
+ function ba(e) {
3433
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)
3434
3430
  return {
3435
3431
  propType: gi[e.expression.expression.text],
@@ -3447,15 +3443,15 @@ const gi = {
3447
3443
  bindBooleanAttribute: "booleanAttribute",
3448
3444
  bindEvent: "event"
3449
3445
  };
3450
- function Ea(e, t, i) {
3451
- 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 ? (
3452
3448
  // When tag name is dynamic, we can't help but check if the prop name matches an "always attribute" in any html element
3453
- Object.values(yt).some((r) => r.has(e))
3454
- ) : yt[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";
3449
+ Object.values(gt).some((r) => r.has(e))
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";
3455
3451
  }
3456
- 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;
3457
3453
  function Ge({ key: e, parts: t, litTag: i }, n) {
3458
- const s = xa(t);
3454
+ const s = Pa(t);
3459
3455
  if (s.length % 2 === 0)
3460
3456
  throw new Error("Normalized template parts array length must be odd");
3461
3457
  const [r, ...a] = s;
@@ -3476,11 +3472,11 @@ function Ge({ key: e, parts: t, litTag: i }, n) {
3476
3472
  const l = n.importRenames[c], d = o.factory.createTaggedTemplateExpression(
3477
3473
  o.factory.createIdentifier(l),
3478
3474
  void 0,
3479
- 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))
3480
3476
  );
3481
3477
  return at(n, e, d);
3482
3478
  }
3483
- const xa = (e) => e.reduce(
3479
+ const Pa = (e) => e.reduce(
3484
3480
  (t, i, n) => {
3485
3481
  const s = t.at(-1), r = typeof s == "string", a = typeof i == "string";
3486
3482
  if (r && a)
@@ -3490,7 +3486,7 @@ const xa = (e) => e.reduce(
3490
3486
  },
3491
3487
  [""]
3492
3488
  );
3493
- function ka(e) {
3489
+ function xa(e) {
3494
3490
  if (!(e.length % 2 === 0))
3495
3491
  throw new Error("templatePartsToSpans should be called with normalized parts array without the first item");
3496
3492
  const i = e.length / 2;
@@ -3515,8 +3511,8 @@ function at(e, t, i) {
3515
3511
  const n = e.importRenames.keyed;
3516
3512
  return o.factory.createCallExpression(o.factory.createIdentifier(n), void 0, [t, i]);
3517
3513
  }
3518
- const En = (e, t) => e.getFullText(t.sourceFile).slice(0, e.getLeadingTriviaWidth(t.sourceFile));
3519
- function Cn(e, t) {
3514
+ const Tn = (e, t) => e.getFullText(t.sourceFile).slice(0, e.getLeadingTriviaWidth(t.sourceFile));
3515
+ function En(e, t) {
3520
3516
  const i = Ft(e);
3521
3517
  return i.length === 0 ? t : o.setSyntheticLeadingComments(
3522
3518
  t,
@@ -3524,18 +3520,18 @@ function Cn(e, t) {
3524
3520
  ...n,
3525
3521
  pos: -1,
3526
3522
  end: -1,
3527
- text: $n(e.slice(n.pos, n.end))
3523
+ text: Cn(e.slice(n.pos, n.end))
3528
3524
  }))
3529
3525
  );
3530
3526
  }
3531
3527
  const Ft = (e) => e.trim().length === 0 ? [] : o.getLeadingCommentRanges(e, 0) ?? [];
3532
- function Aa(e) {
3528
+ function ka(e) {
3533
3529
  const t = Ft(e);
3534
3530
  if (t.length === 0)
3535
3531
  return [e || " "];
3536
3532
  const i = t.reduceRight(
3537
3533
  ([s, ...r], a) => {
3538
- 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));
3539
3535
  return [
3540
3536
  c.slice(0, a.pos),
3541
3537
  /**
@@ -3553,13 +3549,13 @@ function Aa(e) {
3553
3549
  const n = i.at(-1);
3554
3550
  return (typeof n != "string" || n.trim() !== "") && i.push(" "), i;
3555
3551
  }
3556
- const $n = (e) => e.startsWith("//") ? e.slice(2) : e.slice(2, -2);
3557
- function Ia(e) {
3552
+ const Cn = (e) => e.startsWith("//") ? e.slice(2) : e.slice(2, -2);
3553
+ function Aa(e) {
3558
3554
  if (typeof e == "string")
3559
3555
  return e;
3560
3556
  throw new Error(`Expected string, got ${typeof e}: ${String(e)}`);
3561
3557
  }
3562
- function La(e, t) {
3558
+ function Ia(e, t) {
3563
3559
  if (!(o.isPropertyAccessExpression(t.expression) && t.expression.name.text === "map"))
3564
3560
  return t;
3565
3561
  const n = t.arguments[0];
@@ -3571,7 +3567,7 @@ function La(e, t) {
3571
3567
  return t;
3572
3568
  const c = Se(n.body);
3573
3569
  let l = !0, d;
3574
- if (hi(c))
3570
+ if (yi(c))
3575
3571
  d = c;
3576
3572
  else {
3577
3573
  if (!o.isBlock(c))
@@ -3580,21 +3576,21 @@ function La(e, t) {
3580
3576
  if (!(v && o.isReturnStatement(v) && v.expression))
3581
3577
  return t;
3582
3578
  const T = Se(v.expression);
3583
- if (!hi(T))
3579
+ if (!yi(T))
3584
3580
  return t;
3585
3581
  const x = c.statements.slice(0, -1);
3586
- if (x.some(Pn))
3582
+ if (x.some($n))
3587
3583
  return t;
3588
3584
  l = x.length === 0, d = T;
3589
3585
  }
3590
- const p = o.isJsxElement(d) ? d.openingElement : d, m = Ln(p);
3586
+ const p = o.isJsxElement(d) ? d.openingElement : d, m = In(p);
3591
3587
  if (m === -1)
3592
3588
  return t;
3593
3589
  const f = p.attributes.properties[m];
3594
3590
  if (f === void 0 || !o.isJsxAttribute(f))
3595
3591
  return t;
3596
- const y = Lt(f.initializer, e.sourceFile), g = Fa(r, n, y, l, e);
3597
- if (g === void 0)
3592
+ const g = Lt(f.initializer, e.sourceFile), y = La(r, n, g, l, e);
3593
+ if (y === void 0)
3598
3594
  return t;
3599
3595
  e.liftedKeys.add(f.name), e.neededImports.add("repeat");
3600
3596
  const h = e.importRenames.repeat;
@@ -3602,7 +3598,7 @@ function La(e, t) {
3602
3598
  // From `items.map()` get `items`
3603
3599
  t.expression.expression,
3604
3600
  // (item)=>item.key
3605
- o.factory.createArrowFunction(void 0, void 0, [g], void 0, void 0, y),
3601
+ o.factory.createArrowFunction(void 0, void 0, [y], void 0, void 0, g),
3606
3602
  // Keep arrow as is, but remove the key prop from the JSX element
3607
3603
  o.factory.updateArrowFunction(
3608
3604
  n,
@@ -3615,22 +3611,22 @@ function La(e, t) {
3615
3611
  )
3616
3612
  ]);
3617
3613
  }
3618
- const hi = (e) => o.isJsxElement(e) || o.isJsxSelfClosingElement(e);
3619
- function Pn(e) {
3614
+ const yi = (e) => o.isJsxElement(e) || o.isJsxSelfClosingElement(e);
3615
+ function $n(e) {
3620
3616
  if (o.isReturnStatement(e))
3621
3617
  return !0;
3622
3618
  let t = !1;
3623
3619
  return o.visitEachChild(
3624
3620
  e,
3625
- (i) => (t ||= Pn(i), i),
3621
+ (i) => (t ||= $n(i), i),
3626
3622
  void 0
3627
3623
  ), t;
3628
3624
  }
3629
- function Fa(e, t, i, n, s) {
3625
+ function La(e, t, i, n, s) {
3630
3626
  const r = W(i);
3631
3627
  if (r === void 0)
3632
3628
  return;
3633
- let a = xn(e.name, r);
3629
+ let a = Pn(e.name, r);
3634
3630
  const c = t.parameters.at(1);
3635
3631
  if (c !== void 0 && o.isIdentifier(c.name) && // A more basic check is also provided in lumina/no-unnecessary-key rule
3636
3632
  r.every(We, c.name)) {
@@ -3642,7 +3638,7 @@ function Fa(e, t, i, n, s) {
3642
3638
  return;
3643
3639
  }
3644
3640
  if (!n) {
3645
- const l = Da(r, a, t);
3641
+ const l = Na(r, a, t);
3646
3642
  if (l === void 0)
3647
3643
  return;
3648
3644
  a = l;
@@ -3672,7 +3668,7 @@ function W(e) {
3672
3668
  const t = W(e.left), i = W(e.right);
3673
3669
  return t === void 0 || i === void 0 ? void 0 : [...t, ...i];
3674
3670
  } else {
3675
- if (Na.has(e.kind))
3671
+ if (Fa.has(e.kind))
3676
3672
  return [];
3677
3673
  {
3678
3674
  const t = Se(e);
@@ -3680,7 +3676,7 @@ function W(e) {
3680
3676
  }
3681
3677
  }
3682
3678
  }
3683
- const Na = /* @__PURE__ */ new Set([
3679
+ const Fa = /* @__PURE__ */ new Set([
3684
3680
  o.SyntaxKind.NumericLiteral,
3685
3681
  o.SyntaxKind.BigIntLiteral,
3686
3682
  o.SyntaxKind.StringLiteral,
@@ -3689,20 +3685,20 @@ const Na = /* @__PURE__ */ new Set([
3689
3685
  o.SyntaxKind.FalseKeyword,
3690
3686
  o.SyntaxKind.NullKeyword,
3691
3687
  o.SyntaxKind.TrueKeyword
3692
- ]), 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;
3693
- 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) {
3694
3690
  if (e.every(We, t))
3695
3691
  return t;
3696
3692
  if (o.isIdentifier(t)) {
3697
- const n = o.isBlock(i.body) ? ye(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;
3698
3694
  if (n === void 0)
3699
3695
  return;
3700
- const s = xn(n, e);
3696
+ const s = Pn(n, e);
3701
3697
  if (e.every(We, s))
3702
3698
  return s;
3703
3699
  }
3704
3700
  }
3705
- function ja(e, t) {
3701
+ function Da(e, t) {
3706
3702
  if (!o.isVariableStatement(e) || !(e.declarationList.flags & o.NodeFlags.Const))
3707
3703
  return;
3708
3704
  const i = e.declarationList.declarations[0];
@@ -3710,19 +3706,19 @@ function ja(e, t) {
3710
3706
  }
3711
3707
  function We(e) {
3712
3708
  const t = this;
3713
- 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);
3714
3710
  }
3715
- function Ra(e) {
3711
+ function ja(e) {
3716
3712
  const t = this;
3717
3713
  return o.isOmittedExpression(e) ? !1 : We.call(e.name, t);
3718
3714
  }
3719
- function Ma(e, t) {
3715
+ function Ra(e, t) {
3720
3716
  let i = !1;
3721
3717
  const n = e.elements.filter((s) => o.isIdentifier(s.name) ? t.includes(s.name.text) : (i = !0, !0));
3722
3718
  return i || n.length === 0 ? e : o.factory.updateObjectBindingPattern(e, n);
3723
3719
  }
3724
- const kn = (e, t) => t.liftedKeys.has(e), Oa = (e) => e.apiJsonComponents.map(({ name: t, importPath: i }) => `import type { ${t} } from "./${i}";`).join(`
3725
- `), 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;
3726
3722
  function Xe(e, t) {
3727
3723
  const i = [], n = [];
3728
3724
  let s = !1;
@@ -3734,33 +3730,33 @@ function Xe(e, t) {
3734
3730
  s = !0;
3735
3731
  return;
3736
3732
  }
3737
- m.docsTags?.some((y) => y.name === "required") ? i.push(p.name) : n.push(p.name);
3733
+ m.docsTags?.some((g) => g.name === "required") ? i.push(p.name) : n.push(p.name);
3738
3734
  });
3739
- const r = vi(i), a = vi(n), c = [
3735
+ const r = hi(i), a = hi(n), c = [
3740
3736
  r ? `Required<Pick<${e}, ${r}>>` : "",
3741
3737
  a ? `Partial<Pick<${e}, ${a}>>` : "",
3742
3738
  s ? `${e}SetterTypes` : ""
3743
3739
  ], l = s ? `
3744
- type ${e}SetterTypes = ${e}["${Gi}"]` : "", d = c.filter(Boolean).join(", ");
3740
+ type ${e}SetterTypes = ${e}["${qi}"]` : "", d = c.filter(Boolean).join(", ");
3745
3741
  return [d.length === 0 ? "" : `${d}, `, l];
3746
3742
  }
3747
- const vi = (e) => e.map((t) => `'${t}'`).join(" | ");
3748
- function q(e, t, i) {
3743
+ const hi = (e) => e.map((t) => `'${t}'`).join(" | ");
3744
+ function z(e, t, i) {
3749
3745
  if (Ke(i))
3750
- return An(e, i);
3751
- 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(
3752
3748
  n,
3753
3749
  // Do not add "" if parent is binary expression to not turn {(a && <b />) || c} into {(a && <b />) || "" || c}
3754
- q.bind(null, e, t !== void 0 && o.isBinaryExpression(t) ? void 0 : i),
3750
+ z.bind(null, e, t !== void 0 && o.isBinaryExpression(t) ? void 0 : i),
3755
3751
  e.transformationContext
3756
3752
  );
3757
- 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;
3758
3754
  }
3759
- function An(e, t) {
3760
- const i = In(e, t);
3755
+ function kn(e, t) {
3756
+ const i = An(e, t);
3761
3757
  return Ge(i, e);
3762
3758
  }
3763
- function In(e, t) {
3759
+ function An(e, t) {
3764
3760
  const i = "children" in t ? t.children : [];
3765
3761
  if (o.isJsxFragment(t))
3766
3762
  return { key: void 0, ...De(i, e) };
@@ -3768,23 +3764,23 @@ function In(e, t) {
3768
3764
  if (o.isJsxNamespacedName(r))
3769
3765
  throw Error(`JSX namespaced elements are not supported. Found ${r.getText(e.sourceFile)} `);
3770
3766
  if (!o.isIdentifier(r) || !r.text.startsWith(r.text[0].toLowerCase()) && r.text !== et && r.text !== tt) {
3771
- const $ = o.isIdentifier(r) && r.text === kr ? De(i, e) : {
3767
+ const $ = o.isIdentifier(r) && r.text === xr ? De(i, e) : {
3772
3768
  // No need to wrap the function call in a lit-html tag
3773
3769
  litTag: void 0,
3774
- parts: [Wa(e, t, r, i)]
3770
+ parts: [Ka(e, t, r, i)]
3775
3771
  };
3776
3772
  return {
3777
- key: Ka(s, e),
3773
+ key: Ja(s, e),
3778
3774
  ...$
3779
3775
  };
3780
3776
  }
3781
- 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) ? oe : 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);
3782
3778
  let p;
3783
- d && e.compiler.viteCommand === "build" && (p = _a(e, c));
3779
+ d && e.compiler.viteCommand === "build" && (p = Ba(e, c));
3784
3780
  let m;
3785
3781
  const f = [];
3786
- let y = !1;
3787
- const g = s.attributes.properties.flatMap((L) => {
3782
+ let g = !1;
3783
+ const y = s.attributes.properties.flatMap((L) => {
3788
3784
  if (o.isJsxSpreadAttribute(L))
3789
3785
  throw Error(
3790
3786
  `JSX spread attribute syntax is not supported. See alternatives: https://qawebgis.esri.com/components/lumina/jsx#spread-attributes
@@ -3793,38 +3789,38 @@ Found ${L.getText(e.sourceFile)}`
3793
3789
  const { name: $, initializer: b } = L;
3794
3790
  if (o.isJsxNamespacedName($))
3795
3791
  throw Error(`JSX namespaced attributes are not supported. Found ${$.getText(e.sourceFile)}`);
3796
- const E = $.text, I = Ta(b), D = I?.propType ?? Ea(E, b, c);
3792
+ const E = $.text, I = ba(b), F = I?.propType ?? Ta(E, b, c);
3797
3793
  p?.delete(E);
3798
- const j = va[D](e, I?.initializer ?? b, E, c);
3799
- if (j.length === 0)
3794
+ const N = ha[F](e, I?.initializer ?? b, E, c);
3795
+ if (N.length === 0)
3800
3796
  return [];
3801
- const M = e.compiler.shouldMinifyJsx ? [" "] : Aa(En($, e));
3802
- return D === "key" ? (m = typeof j[0] == "object" && !kn($, e) ? j[0] : void 0, M.some(Pa) ? M : []) : D === "directives" || D === "ref" || E === "deferLoad" ? (y ||= D === "deferLoad", f.push(
3803
- ...M,
3804
- ...j.flatMap(
3805
- (H, K) => typeof H == "string" || K === 0 || typeof j[K - 1] == "string" ? H : [" ", H]
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,
3800
+ ...N.flatMap(
3801
+ (H, K) => typeof H == "string" || K === 0 || typeof N[K - 1] == "string" ? H : [" ", H]
3806
3802
  )
3807
- ), []) : [...M, ...j];
3803
+ ), []) : [...R, ...N];
3808
3804
  });
3809
3805
  if (p !== void 0 && p.size > 0 && e.compiler.logLintError(
3810
3806
  "mustIncludeAllRequiredProperties",
3811
3807
  e.sourceFile.fileName,
3812
3808
  `Missing required properties for <${c}> }: ${Array.from(p).join(", ")}`
3813
- ), f.length > 0 && g.push(...f), typeof c == "string" && $t.has(c))
3809
+ ), f.length > 0 && y.push(...f), typeof c == "string" && $t.has(c))
3814
3810
  throw Error(
3815
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`
3816
3812
  );
3817
- d && (y ? e.customElementsToImportDeferred.add(c) : e.customElementsToImport.add(c));
3818
- const h = typeof c == "string" && Ar.has(c), v = De(i, e);
3813
+ d && (g ? e.customElementsToImportDeferred.add(c) : e.customElementsToImport.add(c));
3814
+ const h = typeof c == "string" && kr.has(c), v = De(i, e);
3819
3815
  if (h && v.parts.length > 0)
3820
3816
  throw Error(
3821
3817
  `Void HTML elements like <${c}> cannot have children. Found ${t.getText(e.sourceFile)}`
3822
3818
  );
3823
- const S = (l === oe || l === Y) && v.parts.length === 0, T = [
3819
+ const S = (l === re || l === Y) && v.parts.length === 0, T = [
3824
3820
  "<",
3825
3821
  typeof c == "string" ? c : r,
3826
- ...g,
3827
- S ? `${g.length === 0 ? "" : " "}/>` : ">"
3822
+ ...y,
3823
+ S ? `${y.length === 0 ? "" : " "}/>` : ">"
3828
3824
  ], x = h || S ? T : [
3829
3825
  ...T,
3830
3826
  /**
@@ -3839,21 +3835,21 @@ Found ${L.getText(e.sourceFile)}`
3839
3835
  ];
3840
3836
  return { key: m, parts: x, litTag: l };
3841
3837
  }
3842
- function Ka(e, t) {
3843
- const i = e.attributes.properties[Ln(e)];
3844
- 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;
3845
3841
  }
3846
- const Ln = (e) => e.attributes.properties.findIndex(({ name: t }) => t && o.isIdentifier(t) && t.text === "key");
3847
- 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) {
3848
3844
  const r = (o.isJsxElement(t) ? t.openingElement : t).attributes.properties.map((l) => {
3849
3845
  if (o.isJsxSpreadAttribute(l))
3850
- return Cn(En(l, e), o.factory.createSpreadAssignment(l.expression));
3846
+ return En(Tn(l, e), o.factory.createSpreadAssignment(l.expression));
3851
3847
  const { name: d, initializer: p } = l;
3852
3848
  if (o.isJsxNamespacedName(d))
3853
3849
  throw Error(`JSX namespaced attributes are not supported. Found ${d.getText(e.sourceFile)}`);
3854
3850
  if (d.text === "key")
3855
3851
  return;
3856
- const m = p === void 0 ? o.factory.createTrue() : o.isStringLiteral(p) ? p : Ke(p) ? An(e, p) : q(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;
3857
3853
  return o.factory.createPropertyAssignment(f, m);
3858
3854
  }), { parts: a, litTag: c } = De(n, e);
3859
3855
  return a.length > 0 && r.push(
@@ -3862,20 +3858,20 @@ function Wa(e, t, i, n) {
3862
3858
  Ge({ key: void 0, parts: a, litTag: c }, e)
3863
3859
  )
3864
3860
  ), o.factory.createCallExpression(i, void 0, [
3865
- o.factory.createObjectLiteralExpression(r.filter(R))
3861
+ o.factory.createObjectLiteralExpression(r.filter(j))
3866
3862
  ]);
3867
3863
  }
3868
3864
  function De(e, t) {
3869
3865
  let i;
3870
3866
  const n = e.flatMap((s) => {
3871
3867
  if (o.isJsxText(s))
3872
- return [t.compiler.shouldMinifyJsx ? Fr(s.text) : s.text];
3868
+ return [t.compiler.shouldMinifyJsx ? Lr(s.text) : s.text];
3873
3869
  if (o.isJsxExpression(s))
3874
3870
  return Nt(t, s, s);
3875
3871
  {
3876
- const r = In(t, s);
3872
+ const r = An(t, s);
3877
3873
  if (r.key === void 0 && r.litTag !== ae && r.litTag !== Y) {
3878
- if (r.litTag === Sn)
3874
+ if (r.litTag === vn)
3879
3875
  return r.parts;
3880
3876
  if (i !== void 0 && r.litTag !== void 0 && i !== r.litTag)
3881
3877
  throw new Error(
@@ -3888,7 +3884,7 @@ function De(e, t) {
3888
3884
  });
3889
3885
  return { litTag: i, parts: n };
3890
3886
  }
3891
- function Ba(e) {
3887
+ function Wa(e) {
3892
3888
  return e.operatorToken.kind === o.SyntaxKind.AmpersandAmpersandToken ? o.factory.createBinaryExpression(
3893
3889
  e,
3894
3890
  o.factory.createToken(o.SyntaxKind.BarBarToken),
@@ -3900,9 +3896,9 @@ function Nt(e, t, i) {
3900
3896
  if (e.compiler.shouldMinifyJsx)
3901
3897
  return [];
3902
3898
  const n = t.getText(e.sourceFile).slice(1, -1);
3903
- return Ft(n).length === 0 ? [] : [Cn(n, o.factory.createIdentifier("undefined"))];
3899
+ return Ft(n).length === 0 ? [] : [En(n, o.factory.createIdentifier("undefined"))];
3904
3900
  }
3905
- return o.isStringLiteral(t.expression) ? [Yi(t.expression.text)] : (
3901
+ return o.isStringLiteral(t.expression) ? [Zi(t.expression.text)] : (
3906
3902
  /**
3907
3903
  * There is a bug in Chrome DevTools, where it won't let you set a
3908
3904
  * breakpoint inside a tagged template literal. It seems like they did
@@ -3923,7 +3919,7 @@ function Nt(e, t, i) {
3923
3919
  * making this change useless.
3924
3920
  */
3925
3921
  e.compiler.viteCommand === "serve" && e.compiler.typeScriptConfig.sourceMap && !e.compiler.shouldMinifyJsx && o.isArrowFunction(t.expression) && !o.isBlock(t.expression.body) ? [
3926
- q(
3922
+ z(
3927
3923
  e,
3928
3924
  i,
3929
3925
  o.factory.updateArrowFunction(
@@ -3936,10 +3932,10 @@ function Nt(e, t, i) {
3936
3932
  o.factory.createBlock([o.factory.createReturnStatement(t.expression.body)], !0)
3937
3933
  )
3938
3934
  )
3939
- ] : [q(e, i, t.expression)]
3935
+ ] : [z(e, i, t.expression)]
3940
3936
  );
3941
3937
  }
3942
- function _a(e, t) {
3938
+ function Ba(e, t) {
3943
3939
  if (t in e.localComponents)
3944
3940
  for (const n of e.compiler.privateApiJson.modules)
3945
3941
  for (const s of n.declarations) {
@@ -3951,7 +3947,7 @@ function _a(e, t) {
3951
3947
  return r;
3952
3948
  }
3953
3949
  }
3954
- const Fn = (e) => e.reduce((t, [i, n]) => (t[i] ??= [], t[i].push(n), t), {}), be = {
3950
+ const Ln = (e) => e.reduce((t, [i, n]) => (t[i] ??= [], t[i].push(n), t), {}), we = {
3955
3951
  [ce]: ["lit-html", "lit/html.js", "lit"],
3956
3952
  /**
3957
3953
  * Sadly, Lit called these "html" and "svg", rather than "staticHtml" and
@@ -3960,10 +3956,10 @@ const Fn = (e) => e.reduce((t, [i, n]) => (t[i] ??= [], t[i].push(n), t), {}), b
3960
3956
  * collisions.
3961
3957
  */
3962
3958
  [ae]: ["lit-html/static.js", "lit/static-html.js"],
3963
- [oe]: ["lit-html", "lit/html.js", "lit"],
3959
+ [re]: ["lit-html", "lit/html.js", "lit"],
3964
3960
  [Y]: ["lit-html/static.js", "lit/static-html.js"],
3965
3961
  [wn]: ["lit-html", "lit/html.js", "lit"],
3966
- [bn]: ["@lit/reactive-element/css-tag.js", "@lit/reactive-element", "lit"],
3962
+ [Sn]: ["@lit/reactive-element/css-tag.js", "@lit/reactive-element", "lit"],
3967
3963
  safeClassMap: ["@arcgis/lumina"],
3968
3964
  safeStyleMap: ["@arcgis/lumina"],
3969
3965
  deferLoad: ["@arcgis/lumina"],
@@ -3972,14 +3968,14 @@ const Fn = (e) => e.reduce((t, [i, n]) => (t[i] ??= [], t[i].push(n), t), {}), b
3972
3968
  repeat: ["lit-html/directives/repeat.js", "lit/directives/repeat.js"],
3973
3969
  ref: ["lit-html/directives/ref.js", "lit/directives/ref.js"],
3974
3970
  nothing: ["lit-html", "lit/html.js", "lit-element/lit-element.js", "lit", "@arcgis/lumina"]
3975
- }, Nn = Fn(
3976
- Object.entries(be).flatMap(([e, t]) => t.map((i) => [i, e]))
3977
- ), Dn = new Set(Object.keys(Nn));
3978
- function Ha(e, t) {
3971
+ }, Fn = Ln(
3972
+ Object.entries(we).flatMap(([e, t]) => t.map((i) => [i, e]))
3973
+ ), Nn = new Set(Object.keys(Fn));
3974
+ function _a(e, t) {
3979
3975
  const i = t.importClause, n = t.moduleSpecifier;
3980
3976
  if (!o.isStringLiteral(n))
3981
3977
  return t;
3982
- const s = Ua(e.sourceFile.fileName, n.text, ""), r = !i?.isTypeOnly;
3978
+ const s = Ha(e.sourceFile.fileName, n.text, ""), r = !i?.isTypeOnly;
3983
3979
  if (r && e.existingImportedModules.add(s), i === void 0)
3984
3980
  return t;
3985
3981
  if (e.isInLightDomComponent && n.text.startsWith(".") && Oe.test(n.text) && // If id already includes ?, bypass our custom behavior
@@ -3998,35 +3994,35 @@ function Ha(e, t) {
3998
3994
  const a = i.namedBindings;
3999
3995
  if (a === void 0 || !o.isNamedImports(a))
4000
3996
  return t;
4001
- const c = Dn.has(n.text);
3997
+ const c = Nn.has(n.text);
4002
3998
  return a.elements.forEach((l) => {
4003
- const d = (l.propertyName ?? l.name).text, p = be[d];
3999
+ const d = (l.propertyName ?? l.name).text, p = we[d];
4004
4000
  if (c) {
4005
- if (p?.some((y) => y === n.text)) {
4006
- const y = jn(d, s);
4007
- e.existingLitImports.add(y), e.importRenames[y] = l.name?.text ?? y;
4001
+ if (p?.some((g) => g === n.text)) {
4002
+ const g = Dn(d, s);
4003
+ e.existingLitImports.add(g), e.importRenames[g] = l.name?.text ?? g;
4008
4004
  }
4009
4005
  } else (l.name.text === "h" || l.name.text === "createElement") && (e.hasNonLuminaJsxImport = !0);
4010
4006
  const m = d.startsWith(d[0].toUpperCase()), f = u.isAbsolute(s);
4011
4007
  r && !l.isTypeOnly && m && f && e.importedFunctionComponentsFromModules.add(s);
4012
4008
  }), t;
4013
4009
  }
4014
- const jn = (e, t) => e === ce && be.staticHtml.includes(t) ? ae : e === oe && be.staticSvg.includes(t) ? Y : e, Ua = (e, t, i) => t.startsWith(".") ? u.resolve(e, "..", `${t}${i}`) : t;
4015
- function za(e) {
4016
- 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;
4017
4013
  }
4018
- function qa(e, t) {
4014
+ function za(e, t) {
4019
4015
  const i = t.importClause, n = i?.namedBindings, s = t.moduleSpecifier;
4020
- 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))
4021
4017
  return t;
4022
4018
  const r = i.isTypeOnly;
4023
4019
  let a = !1;
4024
4020
  const c = n.elements.map((l) => {
4025
- 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);
4026
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;
4027
4023
  });
4028
- return Nn[s.text]?.forEach((l) => {
4029
- !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)));
4030
4026
  }), a ? o.factory.updateImportDeclaration(
4031
4027
  t,
4032
4028
  t.modifiers,
@@ -4040,8 +4036,8 @@ function qa(e, t) {
4040
4036
  t.attributes
4041
4037
  ) : t;
4042
4038
  }
4043
- function Ga(e) {
4044
- const t = Fn(Array.from(e.neededImports, (i) => [be[i][0], i]));
4039
+ function qa(e) {
4040
+ const t = Ln(Array.from(e.neededImports, (i) => [we[i][0], i]));
4045
4041
  return Object.entries(t).map(
4046
4042
  ([i, n]) => o.factory.createImportDeclaration(
4047
4043
  void 0,
@@ -4049,27 +4045,27 @@ function Ga(e) {
4049
4045
  !1,
4050
4046
  void 0,
4051
4047
  o.factory.createNamedImports(
4052
- n.map((s) => (e.neededImports.delete(s), Rn(s, e)))
4048
+ n.map((s) => (e.neededImports.delete(s), jn(s, e)))
4053
4049
  )
4054
4050
  ),
4055
4051
  o.factory.createStringLiteral(i)
4056
4052
  )
4057
4053
  );
4058
4054
  }
4059
- function Rn(e, t) {
4060
- const i = e === ae ? ce : e === Y ? oe : e, n = t.importRenames[e];
4055
+ function jn(e, t) {
4056
+ const i = e === ae ? ce : e === Y ? re : e, n = t.importRenames[e];
4061
4057
  return n === i ? o.factory.createImportSpecifier(!1, void 0, o.factory.createIdentifier(i)) : o.factory.createImportSpecifier(
4062
4058
  !1,
4063
4059
  o.factory.createIdentifier(i),
4064
4060
  o.factory.createIdentifier(n)
4065
4061
  );
4066
4062
  }
4067
- function Va(e) {
4068
- const t = Yo().map(({ packageName: i }) => i);
4063
+ function Ga(e) {
4064
+ const t = Zo().map(({ packageName: i }) => i);
4069
4065
  return e.existingImportedModules.forEach((i) => {
4070
4066
  if (u.isAbsolute(i))
4071
4067
  return;
4072
- const { packageName: n, moduleName: s } = on(i);
4068
+ const { packageName: n, moduleName: s } = rn(i);
4073
4069
  if (t.includes(n ?? "") && (s.startsWith("dist/components") || s.startsWith("components"))) {
4074
4070
  const r = ee(e.sourceFile.fileName);
4075
4071
  throw new Error(
@@ -4078,7 +4074,7 @@ function Va(e) {
4078
4074
  }
4079
4075
  }), [];
4080
4076
  }
4081
- function Xa(e) {
4077
+ function Va(e) {
4082
4078
  if (e.compiler.viteCommand === "serve")
4083
4079
  return e.customElementsToImport.clear(), e.customElementsToImportDeferred.clear(), [];
4084
4080
  const t = e.compiler._customElementDependencies;
@@ -4093,8 +4089,8 @@ function Xa(e) {
4093
4089
  t[n] ??= { referencedBy: [], referencedTagNames: [], referencedDeferredTagNames: [] }, t[n].referencedBy.push(e.sourceFile.fileName);
4094
4090
  }), [];
4095
4091
  }
4096
- function Qa(e, t, i) {
4097
- const n = gn()[t] ?? Mn(e)[t];
4092
+ function Xa(e, t, i) {
4093
+ const n = gn()[t] ?? Rn(e)[t];
4098
4094
  if (n === void 0) {
4099
4095
  if (e.options?.build?.dependencies?.silenceUnknownJsxElementUsage?.(t, i, e) === !0)
4100
4096
  return;
@@ -4108,28 +4104,28 @@ function Qa(e, t, i) {
4108
4104
  }
4109
4105
  return n;
4110
4106
  }
4111
- function Za(e, t) {
4112
- return e.packageName === void 0 ? te(t, e.moduleName) : u.join(e.packageName, e.moduleName);
4107
+ function Qa(e, t) {
4108
+ return e.packageName === void 0 ? oe(t, e.moduleName) : u.join(e.packageName, e.moduleName);
4113
4109
  }
4114
- function Mn(e) {
4115
- return e._localDefinedComponents ??= vn(e.privateApiJson, {
4110
+ function Rn(e) {
4111
+ return e._localDefinedComponents ??= hn(e.privateApiJson, {
4116
4112
  packageName: void 0,
4117
4113
  getImportPath() {
4118
4114
  throw new Error("Not supposed to be called for local components");
4119
4115
  }
4120
4116
  }), e._localDefinedComponents;
4121
4117
  }
4122
- const Ya = (e, t) => {
4118
+ const Za = (e, t) => {
4123
4119
  const i = e.pragmas;
4124
4120
  if (i?.has("jsx") === !0 || i?.has("jsxImportSource") === !0)
4125
4121
  return e.statements;
4126
4122
  const n = {
4127
4123
  compiler: t.compiler,
4128
4124
  externalComponents: gn(),
4129
- localComponents: t.compiler.isInPuppeteerTestBackEnd ? {} : Mn(t.compiler),
4125
+ localComponents: t.compiler.isInPuppeteerTestBackEnd ? {} : Rn(t.compiler),
4130
4126
  sourceFile: e,
4131
4127
  transformationContext: t.transformation,
4132
- importRenames: ec(e),
4128
+ importRenames: Ya(e),
4133
4129
  existingImportedModules: /* @__PURE__ */ new Set(),
4134
4130
  importedFunctionComponentsFromModules: /* @__PURE__ */ new Set(),
4135
4131
  existingLitImports: /* @__PURE__ */ new Set(),
@@ -4145,18 +4141,18 @@ const Ya = (e, t) => {
4145
4141
  let s = [];
4146
4142
  if (e.statements.every((a) => {
4147
4143
  if (o.isImportDeclaration(a)) {
4148
- if (s.push(Ha(n, a)), n.hasNonLuminaJsxImport)
4144
+ if (s.push(_a(n, a)), n.hasNonLuminaJsxImport)
4149
4145
  return !1;
4150
4146
  } else
4151
- s.push(q(n, void 0, a));
4147
+ s.push(z(n, void 0, a));
4152
4148
  return !0;
4153
4149
  }), n.hasNonLuminaJsxImport)
4154
4150
  return e.statements;
4155
- 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))
4156
4152
  throw new Error(
4157
4153
  `Expected context.existingLitImports to be empty by now. Found: ${Array.from(n.existingLitImports).join(", ")}`
4158
4154
  );
4159
- const r = [Ga, Va, Xa].flatMap(
4155
+ const r = [qa, Ga, Va].flatMap(
4160
4156
  (a) => a(n)
4161
4157
  );
4162
4158
  if (n.neededImports.size > 0)
@@ -4165,18 +4161,18 @@ const Ya = (e, t) => {
4165
4161
  );
4166
4162
  return [...r, ...s];
4167
4163
  };
4168
- function ec(e) {
4169
- return tc(e), Object.fromEntries(
4170
- ya.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])
4171
4167
  );
4172
4168
  }
4173
- function tc(e) {
4169
+ function ec(e) {
4174
4170
  if (!("identifiers" in e))
4175
4171
  throw new Error(
4176
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."
4177
4173
  );
4178
4174
  }
4179
- function ic(e, t, i) {
4175
+ function tc(e, t, i) {
4180
4176
  return t.size === 0 ? e : [
4181
4177
  o.factory.createPropertyDeclaration(
4182
4178
  [
@@ -4190,7 +4186,7 @@ function ic(e, t, i) {
4190
4186
  Array.from(t.entries()).map(
4191
4187
  ([n, s]) => o.factory.createPropertyAssignment(
4192
4188
  Ve(n) ? o.factory.createStringLiteral(n) : n,
4193
- nc(s, i)
4189
+ ic(s, i)
4194
4190
  )
4195
4191
  )
4196
4192
  )
@@ -4198,7 +4194,7 @@ function ic(e, t, i) {
4198
4194
  ...e
4199
4195
  ];
4200
4196
  }
4201
- function nc(e, t) {
4197
+ function ic(e, t) {
4202
4198
  let i = 0, n = !0;
4203
4199
  const s = [], r = [];
4204
4200
  for (const l of e.properties)
@@ -4210,18 +4206,18 @@ function nc(e, t) {
4210
4206
  if (d === "attribute")
4211
4207
  return n = !1, i |= m ? _t : 0, !m && !f;
4212
4208
  if (d === "reflect")
4213
- return i |= m ? xs : 0, !1;
4209
+ return i |= m ? Ps : 0, !1;
4214
4210
  if (d === "type" && o.isIdentifier(p)) {
4215
4211
  if (p.text === "Boolean")
4216
- return i |= ks, !1;
4212
+ return i |= xs, !1;
4217
4213
  if (p.text === "Number")
4218
- return i |= As, !1;
4214
+ return i |= ks, !1;
4219
4215
  } else {
4220
4216
  if (d === "state")
4221
- return n = !1, i |= m ? Is : 0, !1;
4217
+ return n = !1, i |= m ? As : 0, !1;
4222
4218
  if (d === "readOnly")
4223
- return i |= m ? Ls : 0, !1;
4224
- d === "noAccessor" && (i |= m ? Fs : 0);
4219
+ return i |= m ? Is : 0, !1;
4220
+ d === "noAccessor" && (i |= m ? Ls : 0);
4225
4221
  }
4226
4222
  return !0;
4227
4223
  }
@@ -4240,35 +4236,35 @@ function nc(e, t) {
4240
4236
  ...t ? [] : [o.factory.createObjectLiteralExpression(r)]
4241
4237
  ]);
4242
4238
  }
4243
- function sc(e, t, i, n, s) {
4239
+ function nc(e, t, i, n, s) {
4244
4240
  let r = -1, a = -1, c = -1;
4245
- t.options?.properties.forEach((f, y) => {
4241
+ t.options?.properties.forEach((f, g) => {
4246
4242
  if (o.isSpreadAssignment(f))
4247
4243
  throw new Error(
4248
4244
  `Spread property assignment is not allowed in @property() as that is not statically analyzable. Found ${f.getText(n)}`
4249
4245
  );
4250
4246
  if (o.isIdentifier(f.name)) {
4251
- const g = f.name.text;
4252
- g === "type" ? r = y : g === "attribute" ? a = y : g === "readOnly" && (c = y);
4247
+ const y = f.name.text;
4248
+ y === "type" ? r = g : y === "attribute" ? a = g : y === "readOnly" && (c = g);
4253
4249
  }
4254
4250
  });
4255
- 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 = [
4256
4252
  ...l ? [o.factory.createPropertyAssignment("attribute", o.factory.createFalse())] : [],
4257
4253
  ...d ? [o.factory.createPropertyAssignment("readOnly", o.factory.createTrue())] : [],
4258
4254
  ...p !== void 0 ? [p] : []
4259
4255
  ];
4260
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;
4261
4257
  }
4262
- function rc(e, t, i, n, s) {
4258
+ function sc(e, t, i, n, s) {
4263
4259
  if (n.attribute === void 0)
4264
4260
  return;
4265
- 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);
4266
4262
  return a === "Other" || n.readonly && (a !== "Boolean" || !n.reflects) || t.options?.properties[s] !== void 0 ? void 0 : o.factory.createPropertyAssignment(
4267
4263
  o.factory.createIdentifier("type"),
4268
4264
  o.factory.createIdentifier(a)
4269
4265
  );
4270
4266
  }
4271
- function oc(e) {
4267
+ function rc(e) {
4272
4268
  let t = !1, i = !1, n = !1;
4273
4269
  if (e?.forEach((s) => {
4274
4270
  t ||= s.type === "number", i ||= s.type === "boolean", n ||= s.type === "string" || s.type === "any" || s.type === "unknown";
@@ -4280,7 +4276,7 @@ function oc(e) {
4280
4276
  }
4281
4277
  return "Other";
4282
4278
  }
4283
- function ac(e) {
4279
+ function oc(e) {
4284
4280
  const t = e.type ?? (o.isSetAccessor(e) ? e.parameters[0].type : void 0);
4285
4281
  if (t === void 0) {
4286
4282
  if ("initializer" in e && e.initializer !== void 0) {
@@ -4297,7 +4293,7 @@ function ac(e) {
4297
4293
  }
4298
4294
  return "Other";
4299
4295
  }
4300
- function cc(e, t, i, n, s) {
4296
+ function ac(e, t, i, n, s) {
4301
4297
  if (t.modifiers === void 0)
4302
4298
  return t;
4303
4299
  let r = -1, a = -1;
@@ -4307,18 +4303,18 @@ function cc(e, t, i, n, s) {
4307
4303
  d === "property" && (r = l), d === "state" && (a = l);
4308
4304
  }
4309
4305
  }), r !== -1) {
4310
- 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);
4311
4307
  let p = !1;
4312
- return s.set(c.name, d ?? o.factory.createObjectLiteralExpression()), p = !0, l.options = d, bi(t, l, r, p);
4308
+ return s.set(c.name, d ?? o.factory.createObjectLiteralExpression()), p = !0, l.options = d, Si(t, l, r, p);
4313
4309
  } else if (a !== -1) {
4314
- 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 = Q(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);
4315
4311
  if (p === void 0)
4316
4312
  throw new Error("Failed to statically determine the state property name");
4317
- return s.set(p, d), bi(t, c, a, !0);
4313
+ return s.set(p, d), Si(t, c, a, !0);
4318
4314
  } else
4319
4315
  return t;
4320
4316
  }
4321
- function lc(e, t, i, n) {
4317
+ function cc(e, t, i, n) {
4322
4318
  const s = e.apiModule?.declarations.find(
4323
4319
  (a) => a.name === i
4324
4320
  ) ?? (e.compiler.isInTest ? {
@@ -4326,22 +4322,22 @@ function lc(e, t, i, n) {
4326
4322
  } : void 0);
4327
4323
  if (s === void 0)
4328
4324
  throw Error(`Failed to find API component for ${i} in ${n.fileName}`);
4329
- 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);
4330
4326
  if (r === void 0 || r.kind !== "field")
4331
4327
  throw Error(
4332
4328
  `Failed to find API property for ${t.getText(n)} in ${i} in ${n.fileName}`
4333
4329
  );
4334
4330
  if (r.name === "") {
4335
- const a = Q(t.name);
4331
+ const a = X(t.name);
4336
4332
  if (a === void 0)
4337
4333
  throw Error(
4338
4334
  `Failed to statically determine the property name: ${t.getText(n)} in ${i} in ${n.fileName}`
4339
4335
  );
4340
- r.name = a, r.attribute ??= wt(a);
4336
+ r.name = a, r.attribute ??= bt(a);
4341
4337
  }
4342
4338
  return r;
4343
4339
  }
4344
- function Si(e, t, i) {
4340
+ function vi(e, t, i) {
4345
4341
  const n = e.modifiers[t], s = n.expression, r = s.arguments.at(0);
4346
4342
  if (r && !o.isObjectLiteralExpression(r))
4347
4343
  throw new Error(
@@ -4349,7 +4345,7 @@ function Si(e, t, i) {
4349
4345
  );
4350
4346
  return { decorator: n, callExpression: s, options: r };
4351
4347
  }
4352
- function bi(e, t, i, n) {
4348
+ function Si(e, t, i, n) {
4353
4349
  const s = n ? void 0 : o.factory.updateDecorator(
4354
4350
  t.decorator,
4355
4351
  o.factory.updateCallExpression(
@@ -4385,23 +4381,23 @@ function bi(e, t, i, n) {
4385
4381
  e.initializer
4386
4382
  );
4387
4383
  }
4388
- const dc = (e, t) => {
4384
+ const lc = (e, t) => {
4389
4385
  if (t.apiModule === void 0 && !t.compiler.isInTest)
4390
4386
  return e.statements;
4391
4387
  let i;
4392
4388
  function n() {
4393
4389
  i = /* @__PURE__ */ new Map();
4394
4390
  }
4395
- const s = (c) => ic(c, i, t.compiler.shouldMinify);
4391
+ const s = (c) => tc(c, i, t.compiler.shouldMinify);
4396
4392
  function r(c, l) {
4397
- const d = uc(t, c, l, e, i);
4393
+ const d = pc(t, c, l, e, i);
4398
4394
  return t.compiler.viteCommand === "build" && o.setEmitFlags(d, o.EmitFlags.NoComments), d;
4399
4395
  }
4400
4396
  return e.statements.map(
4401
- (c) => On(r, c, t, n, s)
4397
+ (c) => Mn(r, c, t, n, s)
4402
4398
  );
4403
4399
  };
4404
- function On(e, t, i, n, s = Ji) {
4400
+ function Mn(e, t, i, n, s = Oi) {
4405
4401
  if (o.isClassDeclaration(t) && // Ignore classes that don't extend anything - those are definitely not components
4406
4402
  t.heritageClauses?.some((r) => r.token === o.SyntaxKind.ExtendsKeyword)) {
4407
4403
  let r = !1;
@@ -4424,15 +4420,15 @@ function On(e, t, i, n, s = Ji) {
4424
4420
  } else
4425
4421
  return i.compiler.isInTest ? o.visitEachChild(
4426
4422
  t,
4427
- (a) => On(e, a, i, n, s),
4423
+ (a) => Mn(e, a, i, n, s),
4428
4424
  i.transformation
4429
4425
  ) : t;
4430
4426
  }
4431
- const pc = /* @__PURE__ */ new Set(["connectedCallback", "disconnectedCallback"]);
4432
- function uc(e, t, i, n, s) {
4427
+ const dc = /* @__PURE__ */ new Set(["connectedCallback", "disconnectedCallback"]);
4428
+ function pc(e, t, i, n, s) {
4433
4429
  if (o.isMethodDeclaration(t)) {
4434
4430
  const r = t.modifiers?.filter(
4435
- (a) => !o.isDecorator(a) || !mc(a)
4431
+ (a) => !o.isDecorator(a) || !uc(a)
4436
4432
  );
4437
4433
  if (r?.length !== t.modifiers?.length)
4438
4434
  return o.factory.updateMethodDeclaration(
@@ -4446,7 +4442,7 @@ function uc(e, t, i, n, s) {
4446
4442
  t.type,
4447
4443
  t.body
4448
4444
  );
4449
- 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) {
4450
4446
  const a = t.name.text;
4451
4447
  return t.body.statements.some(
4452
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
@@ -4472,11 +4468,11 @@ function uc(e, t, i, n, s) {
4472
4468
  );
4473
4469
  }
4474
4470
  }
4475
- 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;
4476
4472
  }
4477
- const mc = (e) => o.isCallExpression(e.expression) && o.isIdentifier(e.expression.expression) && e.expression.expression.text === "method", vt = "@arcgis/core", ct = N(), 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
4478
4474
  ct.name === "@arcgis/lumina";
4479
- async function fc(e, t) {
4475
+ async function mc(e, t) {
4480
4476
  if (!Ce)
4481
4477
  return [];
4482
4478
  const i = await _e(vt);
@@ -4507,26 +4503,26 @@ const wi = (e) => ({
4507
4503
  cssHref: `${e}esri/themes/light/main.css`,
4508
4504
  // This is used be the theme switcher in `@arcgis/storybook-utils`
4509
4505
  id: "arcgisCoreStylesheet"
4510
- }), Ti = "makeRuntime(", yc = "@arcgis/core";
4506
+ }), bi = "makeRuntime(", fc = "@arcgis/core";
4511
4507
  function gc(e, t) {
4512
- const i = e.indexOf(Ti);
4508
+ const i = e.indexOf(bi);
4513
4509
  if (i === -1)
4514
4510
  throw new Error("Failed to find makeRuntime() function call in src/runtime.ts");
4515
- const n = i + Ti.length, s = t.options.css?.commonStylesPath;
4511
+ const n = i + bi.length, s = t.options.css?.commonStylesPath;
4516
4512
  return {
4517
4513
  code: [
4518
- s === void 0 ? "" : `import commonStyles from "${te(t.dir.src, s)}";`,
4514
+ s === void 0 ? "" : `import commonStyles from "${oe(t.dir.src, s)}";`,
4519
4515
  e.slice(0, n),
4520
4516
  "{",
4521
4517
  "defaultAssetPath:import.meta.env.BASE_URL,",
4522
4518
  'hydratedAttribute:"',
4523
- t.options.css?.hydratedAttribute ?? dn,
4519
+ t.options.css?.hydratedAttribute ?? ln,
4524
4520
  '",',
4525
4521
  s === void 0 ? "" : "commonStyles",
4526
4522
  "}",
4527
4523
  e.slice(n),
4528
4524
  Ce ? `
4529
- import {createObservable,trackAccess,createTrackingTarget,runTracked} from "${yc}/applications/Components/reactiveUtils.js";
4525
+ import {createObservable,trackAccess,createTrackingTarget,runTracked} from "${fc}/applications/Components/reactiveUtils.js";
4530
4526
  createObservable,
4531
4527
  runtime.t = trackAccess;
4532
4528
  runtime.o = createObservable;
@@ -4536,12 +4532,12 @@ runtime.r = runTracked;` : ""
4536
4532
  map: null
4537
4533
  };
4538
4534
  }
4539
- const hc = [
4540
- Ya,
4541
- qs,
4542
- dc
4543
- ], Ei = "@arcgis/lumina:transformComponents", vc = (e) => ({
4544
- name: Ei,
4535
+ const yc = [
4536
+ Za,
4537
+ zs,
4538
+ lc
4539
+ ], Ti = "@arcgis/lumina:transformComponents", hc = (e) => ({
4540
+ name: Ti,
4545
4541
  transform: {
4546
4542
  // Transform JSX to lit-html first so that vite:esbuild doesn't transform JSX to h().
4547
4543
  order: "pre",
@@ -4549,7 +4545,7 @@ const hc = [
4549
4545
  if (!i.endsWith(".tsx")) {
4550
4546
  if (e.isInTest && i.endsWith(".ts") && Et(i) && t.includes("extends LitElement"))
4551
4547
  C.warn(
4552
- Ei,
4548
+ Ti,
4553
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",
4554
4550
  i
4555
4551
  );
@@ -4560,9 +4556,9 @@ const hc = [
4560
4556
  const n = e.getSourceFile(i, t);
4561
4557
  await ve;
4562
4558
  const r = o.transform(n, [
4563
- (f) => () => zi(e, f, n, [
4559
+ (f) => () => Ui(e, f, n, [
4564
4560
  ...e.options.types?.sourceFileTransformers ?? [],
4565
- ...hc
4561
+ ...yc
4566
4562
  ])
4567
4563
  ]).transformed[0], a = e._compilerOptionsForPrinter, c = e._typeScriptPrinter, l = a.sourceMap ? me.createSourceMapGenerator(
4568
4564
  e.typeScriptHost,
@@ -4580,7 +4576,7 @@ const hc = [
4580
4576
  }
4581
4577
  }
4582
4578
  });
4583
- function Sc(e) {
4579
+ function vc(e) {
4584
4580
  const t = e.typeScriptConfig;
4585
4581
  return {
4586
4582
  ...t,
@@ -4612,8 +4608,8 @@ function Sc(e) {
4612
4608
  skipLibCheck: !0
4613
4609
  };
4614
4610
  }
4615
- function bc(e) {
4616
- 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");
4617
4613
  if (i === void 0)
4618
4614
  throw Error(
4619
4615
  w(
@@ -4626,7 +4622,7 @@ function bc(e) {
4626
4622
  if (n.error !== void 0)
4627
4623
  throw Error(
4628
4624
  o.formatDiagnosticsWithColorAndContext([n.error], {
4629
- getCanonicalFileName: Ji,
4625
+ getCanonicalFileName: Oi,
4630
4626
  getCurrentDirectory: o.sys.getCurrentDirectory,
4631
4627
  getNewLine: () => o.sys.newLine
4632
4628
  })
@@ -4639,7 +4635,7 @@ function bc(e) {
4639
4635
  }, r = o.parseJsonConfigFileContent(s, o.sys, u.dirname(i));
4640
4636
  e.typeScriptConfig = r.options, e.typeScriptConfigPath = i;
4641
4637
  }
4642
- function Jn(e) {
4638
+ function On(e) {
4643
4639
  const t = e.target;
4644
4640
  if (t === void 0)
4645
4641
  throw Error(
@@ -4670,17 +4666,17 @@ function wc(e, t) {
4670
4666
  l[0] === "timerToUpdateProgram" ? s : c,
4671
4667
  ...l
4672
4668
  ), n.afterProgramCreate = (a) => {
4673
- 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();
4674
4670
  }, e.typeScriptWatchProgram = o.createWatchProgram(n), e.typeScriptConfig = e.typeScriptProgram.getCompilerOptions();
4675
4671
  }
4676
- 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);
4677
4673
  }
4678
- async function Tc(e, t, i) {
4674
+ async function bc(e, t, i) {
4679
4675
  const n = u.resolve(e.dir.root, t);
4680
- await U(n) && await Ts(n, { recursive: !0, force: !0 }), await z(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 });
4681
4677
  const s = [
4682
4678
  "index.html",
4683
- ...await Ds("**/*.html", {
4679
+ ...await Ns("**/*.html", {
4684
4680
  cwd: e.dir.src,
4685
4681
  nodir: !0,
4686
4682
  posix: !0
@@ -4700,19 +4696,19 @@ async function Tc(e, t, i) {
4700
4696
  `);
4701
4697
  await Promise.all(
4702
4698
  s.map(async (d, p) => {
4703
- const f = p === 0 ? d : u.join(r, d), y = u.join(e.dir.root, f), g = u.join(n, f);
4704
- await z(u.dirname(g), { recursive: !0 });
4705
- const h = await J(y, "utf-8"), v = te(u.dirname(f), `build/${i}`), S = `${l}<script type="module" src="${v}"><\/script>
4699
+ const f = p === 0 ? d : u.join(r, d), g = u.join(e.dir.root, f), y = u.join(n, f);
4700
+ await Q(u.dirname(y), { recursive: !0 });
4701
+ const h = await O(g, "utf-8"), v = oe(u.dirname(f), `build/${i}`), S = `${l}<script type="module" src="${v}"><\/script>
4706
4702
  `;
4707
4703
  let T = h.indexOf("<style>");
4708
4704
  if (T === -1 && (T = h.indexOf("</head>")), T === -1)
4709
- throw Error(w("@arcgis/lumina:buildWebApp", `Failed to find <head> or <style> tag in ${y}`));
4705
+ throw Error(w("@arcgis/lumina:buildWebApp", `Failed to find <head> or <style> tag in ${g}`));
4710
4706
  const x = h.slice(0, T) + S + h.slice(T);
4711
- await F(g, x, "utf-8");
4707
+ await D(y, x, "utf-8");
4712
4708
  })
4713
4709
  );
4714
4710
  }
4715
- const Kn = /* @__PURE__ */ new Set([
4711
+ const Jn = /* @__PURE__ */ new Set([
4716
4712
  "chunks",
4717
4713
  "components",
4718
4714
  "docs",
@@ -4725,13 +4721,13 @@ const Kn = /* @__PURE__ */ new Set([
4725
4721
  "collection",
4726
4722
  "extras",
4727
4723
  "support"
4728
- ]), _ = "@arcgis/lumina:buildCdn", Dt = "cdn", Wn = "index", we = "main";
4729
- function Ec(e) {
4724
+ ]), _ = "@arcgis/lumina:buildCdn", Dt = "cdn", Kn = "index", be = "main";
4725
+ function Tc(e) {
4730
4726
  const { skip: t = !1, namespace: i, esbuildOptions: n = {} } = e.options.build?.cdn ?? {}, s = e.options.build?.webApp?.destination, r = i !== void 0;
4731
4727
  if (r) {
4732
4728
  if (i.toLowerCase() !== i)
4733
4729
  throw new Error(`Expected CDN namespace to be all lowercase. Received: ${i}`);
4734
- if (Kn.has(i))
4730
+ if (Jn.has(i))
4735
4731
  throw new Error(
4736
4732
  `Namespace name "${i}" is restricted as it collides with a well-known Lumina dist/ folder name or Stencil dist/ folder name.`
4737
4733
  );
@@ -4739,12 +4735,12 @@ function Ec(e) {
4739
4735
  'The "namespace" option in the "build.cdn" is deprecated and will be removed in the next major version.'
4740
4736
  );
4741
4737
  }
4742
- const a = i ?? Wn;
4738
+ const a = i ?? Kn;
4743
4739
  if (e.provideAssets([
4744
4740
  {
4745
4741
  type: "dynamic",
4746
- source: () => Io(e),
4747
- destination: `../${r ? a : we}.css`
4742
+ source: () => Ao(e),
4743
+ destination: `../${r ? a : be}.css`
4748
4744
  }
4749
4745
  ]), !t)
4750
4746
  return {
@@ -4752,8 +4748,8 @@ function Ec(e) {
4752
4748
  async writeBundle() {
4753
4749
  if (e.isInStorybook)
4754
4750
  return;
4755
- const c = Ce && N().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, y]) => ({ in: y, out: f })) : [], p = await Cc(e, a, n, d, c);
4756
- 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(
4757
4753
  p,
4758
4754
  e,
4759
4755
  r ? `${a}.esm` : a,
@@ -4761,11 +4757,11 @@ function Ec(e) {
4761
4757
  c
4762
4758
  );
4763
4759
  const m = Date.now();
4764
- 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`);
4765
4761
  }
4766
4762
  };
4767
4763
  }
4768
- async function Cc(e, t, i, n, s) {
4764
+ async function Ec(e, t, i, n, s) {
4769
4765
  const r = e.environment;
4770
4766
  if (i.minify && s)
4771
4767
  throw Error(
@@ -4781,14 +4777,13 @@ async function Cc(e, t, i, n, s) {
4781
4777
  "Source maps in the CDN build are not yet supported - open a feature request with Lumina maintainers if it is needed"
4782
4778
  )
4783
4779
  );
4784
- return await Ns({
4780
+ return await Fs({
4785
4781
  bundle: !0,
4786
4782
  minify: s ? !0 : r === "production",
4787
4783
  treeShaking: !0,
4788
4784
  sourcemap: s ? !1 : r === "development" ? "inline" : e.options.build?.enableSourceMapsInProduction ? "linked" : !1,
4789
4785
  format: "esm",
4790
4786
  splitting: !0,
4791
- write: !1,
4792
4787
  absWorkingDir: e.dir.dist,
4793
4788
  outdir: e.dir.distCdn,
4794
4789
  legalComments: "none",
@@ -4807,25 +4802,10 @@ async function Cc(e, t, i, n, s) {
4807
4802
  chunkNames: "[hash]",
4808
4803
  resolveExtensions: [".js", ".json"],
4809
4804
  banner: { js: e.banner },
4810
- target: Jn(e.typeScriptConfig),
4805
+ target: On(e.typeScriptConfig),
4811
4806
  ...i,
4807
+ write: !1,
4812
4808
  plugins: [
4813
- // Deprecated feature will be dropped in https://devtopia.esri.com/WebGIS/arcgis-web-components/issues/2765
4814
- // eslint-disable-next-line @typescript-eslint/no-deprecated
4815
- ...e.options.build?.ssr?.stencilCompatibility?.enabled === !0 ? [
4816
- {
4817
- name: "@arcgis/lumina:drop-lit-ssr-import",
4818
- setup(a) {
4819
- a.onResolve({ filter: /^@lit-labs\/ssr-client\// }, (c) => ({
4820
- path: c.path,
4821
- namespace: "@arcgis/lumina:drop-lit-ssr-import"
4822
- })), a.onLoad({ filter: /^/, namespace: "@arcgis/lumina:drop-lit-ssr-import" }, () => ({
4823
- contents: '""',
4824
- loader: "json"
4825
- }));
4826
- }
4827
- }
4828
- ] : [],
4829
4809
  {
4830
4810
  name: "@arcgis/lumina:accessorSupport",
4831
4811
  setup(a) {
@@ -4852,7 +4832,7 @@ async function Cc(e, t, i, n, s) {
4852
4832
  * The script's file name will be stripped inside defineCustomElements.
4853
4833
  **/
4854
4834
  defineCustomElements({resourcesUrl: import.meta.url});
4855
- ${pn(e._globalCssString, e)}`,
4835
+ ${dn(e._globalCssString, e)}`,
4856
4836
  sourcefile: `${t}.esm.js`,
4857
4837
  resolveDir: e.dir.dist,
4858
4838
  loader: "js",
@@ -4860,7 +4840,7 @@ ${pn(e._globalCssString, e)}`,
4860
4840
  }
4861
4841
  });
4862
4842
  }
4863
- async function $c(e, t, i, n, s) {
4843
+ async function Cc(e, t, i, n, s) {
4864
4844
  const r = t.dir.distCdn, a = `${i}.js`, c = new Map(
4865
4845
  e.outputFiles.map((l) => {
4866
4846
  const d = {
@@ -4870,12 +4850,12 @@ async function $c(e, t, i, n, s) {
4870
4850
  }, p = l.path.slice(r.length);
4871
4851
  if (p === "stdin.js") {
4872
4852
  if (s) {
4873
- const f = l.text.match(Pc)?.[0];
4853
+ const f = l.text.match($c)?.[0];
4874
4854
  if (f === void 0)
4875
4855
  throw Error(
4876
4856
  "Failed to find the runtime variable name in the CDN entrypoint file. This likely indicates a bug in Lumina"
4877
4857
  );
4878
- d.code = `${d.code.trimEnd()}${xc(f, n)}`, d.isAsync = !1;
4858
+ d.code = `${d.code.trimEnd()}${Pc(f, n)}`, d.isAsync = !1;
4879
4859
  }
4880
4860
  return [a, d];
4881
4861
  }
@@ -4883,11 +4863,11 @@ async function $c(e, t, i, n, s) {
4883
4863
  })
4884
4864
  );
4885
4865
  s && c.forEach((l, d) => {
4886
- l.isAsync === void 0 && (d.endsWith(".js") ? Bn(l, c) : l.isAsync = !1);
4887
- }), t.options.build?.cdn?.transformer?.(c, t), await Promise.all(Array.from(c.entries(), async ([l, { code: d }]) => await F(r + l, d)));
4866
+ l.isAsync === void 0 && (d.endsWith(".js") ? Wn(l, c) : l.isAsync = !1);
4867
+ }), t.options.build?.cdn?.transformer?.(c, t), await Promise.all(Array.from(c.entries(), async ([l, { code: d }]) => await D(r + l, d)));
4888
4868
  }
4889
- const Pc = /(?<=;var [a-zA-Z$_]=[a-zA-Z$_]\()[a-zA-Z$_](?=,\{")/u;
4890
- function xc(e, t) {
4869
+ const $c = /(?<=;var [a-zA-Z$_]=[a-zA-Z$_]\()[a-zA-Z$_](?=,\{")/u;
4870
+ function Pc(e, t) {
4891
4871
  let i = [
4892
4872
  "window.$arcgis",
4893
4873
  "||",
@@ -4923,138 +4903,138 @@ function xc(e, t) {
4923
4903
  // minified to a variable name that is already used inside the closure).
4924
4904
  `)($arcgis,${e}`
4925
4905
  ].join(""), n) {
4926
- const r = N().name;
4906
+ const r = J().name;
4927
4907
  i += `,"${r}/",".js"`;
4928
4908
  }
4929
4909
  return i += ")", i;
4930
4910
  }
4931
- function Bn(e, t) {
4911
+ function Wn(e, t) {
4932
4912
  const i = [], n = [], s = [], r = /* @__PURE__ */ new Set(), a = [];
4933
4913
  let c = 0;
4934
- const l = e.code.matchAll(kc);
4914
+ const l = e.code.matchAll(xc);
4935
4915
  for (const b of l) {
4936
- const [E, I, D, j, M] = b, H = M.startsWith(Be);
4916
+ const [E, I, F, N, R] = b, H = R.startsWith(Be);
4937
4917
  if (c !== 0 && c !== b.index) {
4938
4918
  const K = e.code.slice(c, b.index);
4939
4919
  s.push(K), a.push([c, K.length, 0, ""]);
4940
4920
  }
4941
4921
  if (c = b.index + E.length, H)
4942
- a.push([b.index, E.length, 0, ""]), n.push(`"${Hn(M.slice(Be.length))}"`), i.push(I?.replaceAll(" as ", ":") ?? D ?? j ?? "");
4922
+ a.push([b.index, E.length, 0, ""]), n.push(`"${_n(R.slice(Be.length))}"`), i.push(I?.replaceAll(" as ", ":") ?? F ?? N ?? "");
4943
4923
  else {
4944
- const K = _n(M, t), G = K?.isAsync === !0;
4924
+ const K = Bn(R, t), q = K?.isAsync === !0;
4945
4925
  if (I !== void 0) {
4946
4926
  const xe = [];
4947
4927
  for (const Ze of I.slice(1, -1).split(",")) {
4948
4928
  const [Ot, Jt = Ot] = Ze.split(" as ");
4949
- G || r.add(Jt), xe.push(`${Ot}:${Jt}`);
4929
+ q || r.add(Jt), xe.push(`${Ot}:${Jt}`);
4950
4930
  }
4951
- if (G) {
4931
+ if (q) {
4952
4932
  const Ze = K.oldSingleExportName === void 0 ? `{${xe.join(",")}}` : xe[0].split(":")[1];
4953
4933
  a.push([b.index + 6, 0, I.length, Ze]);
4954
4934
  }
4955
- } else if (D === void 0 && j === void 0)
4956
- G && a.push([b.index + 6, 0, 0, ""]);
4935
+ } else if (F === void 0 && N === void 0)
4936
+ q && a.push([b.index + 6, 0, 0, ""]);
4957
4937
  else {
4958
- if (G)
4938
+ if (q)
4959
4939
  throw Error(
4960
4940
  w(
4961
4941
  _,
4962
4942
  `Expected local import specifiers to use only named or side-effect import syntax. Found ${E}`
4963
4943
  )
4964
4944
  );
4965
- r.add(j ?? D);
4945
+ r.add(N ?? F);
4966
4946
  }
4967
4947
  }
4968
4948
  }
4969
4949
  if (e.isAsync = a.length > 0, !e.isAsync) {
4970
- e.code = Ci(e.code, t);
4950
+ e.code = Ei(e.code, t);
4971
4951
  return;
4972
4952
  }
4973
- const d = Lc(r);
4953
+ const d = Ic(r);
4974
4954
  let p = e.code.slice(0, c);
4975
4955
  for (let b = a.length - 1; b >= 0; b--) {
4976
- const [E, I, D, j] = a[b];
4977
- let M = I, H = "";
4956
+ const [E, I, F, N] = a[b];
4957
+ let R = I, H = "";
4978
4958
  if (I === 0) {
4979
- const G = d();
4980
- n.push(G), H = ` ${G} from`, j !== "" ? (M = D + 4, i.push(j)) : i.push("");
4959
+ const q = d();
4960
+ n.push(q), H = ` ${q} from`, N !== "" ? (R = F + 4, i.push(N)) : i.push("");
4981
4961
  }
4982
- p = p.slice(0, E) + H + p.slice(E + M);
4962
+ p = p.slice(0, E) + H + p.slice(E + R);
4983
4963
  }
4984
- const m = Ac.exec(e.code), f = m?.index ?? e.code.length;
4985
- let y = "";
4964
+ const m = kc.exec(e.code), f = m?.index ?? e.code.length;
4965
+ let g = "";
4986
4966
  if (m !== null) {
4987
4967
  const b = m[1].split(",");
4988
4968
  if (b.length > 1)
4989
- y = `return{${b.map((E) => {
4990
- const [I, D = I] = E.split(" as ");
4991
- return `${D}:${I}`;
4969
+ g = `return{${b.map((E) => {
4970
+ const [I, F = I] = E.split(" as ");
4971
+ return `${F}:${I}`;
4992
4972
  }).join(",")}}`;
4993
4973
  else {
4994
4974
  const [E, I = E] = b[0].split(" as ");
4995
- e.oldSingleExportName = I, y = `return ${E}`;
4975
+ e.oldSingleExportName = I, g = `return ${E}`;
4996
4976
  }
4997
4977
  }
4998
- const g = i.findLastIndex((b) => b.length > 0), h = i.slice(0, g + 1).join(","), S = `export default $arcgis.t(${i.length === 0 ? "_" : `([${h}])`}=>{`, T = n.join(","), x = `${y}},${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})`;
4999
4979
  let L = e.code.slice(c, f);
5000
- L = `${s.join("")}${L}`, L = Ci(L, t);
4980
+ L = `${s.join("")}${L}`, L = Ei(L, t);
5001
4981
  const $ = `${p}${S}${L}${x}`;
5002
4982
  e.code = $;
5003
4983
  }
5004
- const kc = /import(?:(\{[^}]+\})from|\*as (\w+) from| ([\w$]+) from)?"([^"]+)";/gu, Ac = /export\{([^}]+)\};\n$/u, Be = "@arcgis/core/";
5005
- 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) {
5006
4986
  if (!e.startsWith("./"))
5007
4987
  return;
5008
4988
  const i = e.slice(2), n = t.get(i);
5009
4989
  if (n === void 0)
5010
4990
  throw Error(w(_, `Failed to find the ${e} module`));
5011
- if (n.isAsync === void 0 && Bn(n, t), n.isAsync === void 0)
4991
+ if (n.isAsync === void 0 && Wn(n, t), n.isAsync === void 0)
5012
4992
  throw Error(w(_, `Failed to infer whether the ${e} module has top-level await`));
5013
4993
  return n;
5014
4994
  }
5015
- function Ci(e, t) {
5016
- return e.replaceAll(Ic, (i, n) => {
4995
+ function Ei(e, t) {
4996
+ return e.replaceAll(Ac, (i, n) => {
5017
4997
  if (n.startsWith(Be))
5018
- return `$arcgis.t(m=>m[0],"${Hn(n.slice(Be.length))}")`;
4998
+ return `$arcgis.t(m=>m[0],"${_n(n.slice(Be.length))}")`;
5019
4999
  if (n.startsWith("./")) {
5020
- const s = _n(n, t);
5000
+ const s = Bn(n, t);
5021
5001
  if (s?.isAsync === !0)
5022
5002
  return `${i}.then(m=>m.default${s.oldSingleExportName === void 0 ? "" : `.then(e=>({${s.oldSingleExportName}:e}))`})`;
5023
5003
  }
5024
5004
  return i;
5025
5005
  });
5026
5006
  }
5027
- const Ic = /(?<![.\w\d])import\("([^"]+)"\)/gu, Hn = (e) => e.endsWith(".js") ? e.slice(0, -3) : e;
5028
- function Lc(e) {
5029
- 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];
5030
5010
  return () => {
5031
5011
  for (; ; ) {
5032
- const i = Dc(t);
5033
- if (jc(t), !e.has(i))
5012
+ const i = Nc(t);
5013
+ if (Dc(t), !e.has(i))
5034
5014
  return e.add(i), i;
5035
5015
  }
5036
5016
  };
5037
5017
  }
5038
- const Un = 0, jt = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_", zn = `${jt}0123456789`, Fc = jt.length, Nc = zn.length;
5039
- function Dc(e) {
5018
+ const Hn = 0, jt = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_", Un = `${jt}0123456789`, Lc = jt.length, Fc = Un.length;
5019
+ function Nc(e) {
5040
5020
  let t = jt[e[0]];
5041
5021
  for (let i = 1; i < e.length; i++)
5042
- t += zn[e[i]];
5022
+ t += Un[e[i]];
5043
5023
  return t;
5044
5024
  }
5045
- function jc(e) {
5025
+ function Dc(e) {
5046
5026
  let t = e.length - 1;
5047
5027
  for (; t >= 0; ) {
5048
- const i = t === 0 ? Fc : Nc;
5028
+ const i = t === 0 ? Lc : Fc;
5049
5029
  if (e[t] += 1, e[t] >= i)
5050
5030
  e[t] = 0, t--;
5051
5031
  else
5052
5032
  return;
5053
5033
  }
5054
- e = new Array(e.length + 1).fill(Un);
5034
+ e = new Array(e.length + 1).fill(Hn);
5055
5035
  }
5056
- async function Rc(e, t, i, n) {
5057
- 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")) ?? {};
5058
5038
  if (i === "cdn") {
5059
5039
  const m = await He(r), f = t.cdnUrl ?? qe(m, !0);
5060
5040
  return [
@@ -5097,34 +5077,34 @@ async function Rc(e, t, i, n) {
5097
5077
  }
5098
5078
  ];
5099
5079
  }
5100
- async function qn(e) {
5080
+ async function zn(e) {
5101
5081
  const i = (await Ue(e)).filter(
5102
- (s) => !Kn.has(s) && !s.includes(".")
5082
+ (s) => !Jn.has(s) && !s.includes(".")
5103
5083
  ), n = i.find((s) => s.startsWith("arcgis-"));
5104
5084
  return n === void 0 ? await Promise.all(
5105
- i.map(async (s) => await $i(e, s))
5106
- ).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);
5107
5087
  }
5108
- async function $i(e, t) {
5088
+ async function Ci(e, t) {
5109
5089
  const i = u.join(e, t, `${t}.css`), n = u.join(e, t, "assets"), [s, r] = await Promise.all([U(i), U(n)]);
5110
5090
  return s || r ? {
5111
5091
  hasCss: s,
5112
5092
  cdnName: t
5113
5093
  } : void 0;
5114
5094
  }
5115
- async function Mc(e, t, i, n) {
5116
- 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"));
5117
5097
  if (i === "cdn") {
5118
- const y = a.exports?.[`./${we}.css`] === void 0, g = y ? c.cdnName : Wn;
5098
+ const g = a.exports?.[`./${be}.css`] === void 0, y = g ? c.cdnName : Kn;
5119
5099
  return {
5120
5100
  tag: "script",
5121
5101
  attrs: {
5122
5102
  type: "module",
5123
- src: `${t.cdnUrl ?? qe(a, !0)}${g}${y ? ".esm" : ""}.js`
5103
+ src: `${t.cdnUrl ?? qe(a, !0)}${y}${g ? ".esm" : ""}.js`
5124
5104
  }
5125
5105
  };
5126
5106
  }
5127
- 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 = [
5128
5108
  `import styles$${n} from "${p}";`,
5129
5109
  `document.adoptedStyleSheets = [...document.adoptedStyleSheets, styles$${n}.styleSheet];`
5130
5110
  ], f = `${s}/loader`;
@@ -5143,31 +5123,31 @@ async function Mc(e, t, i, n) {
5143
5123
  ]
5144
5124
  };
5145
5125
  }
5146
- function Oc(e) {
5126
+ function Mc(e) {
5147
5127
  const { exports: t } = e;
5148
5128
  if (t === void 0)
5149
5129
  throw new Error(
5150
5130
  `Package "${e.name}" does not have an "exports" field. All Lumina packages must include an "exports" field.`
5151
5131
  );
5152
- const i = Object.entries(t).filter(([s]) => u.extname(s) === ".css"), n = i.find(([, s]) => s === `./${we}.css`);
5153
- return n ? n[0] : i.length > 0 ? i[0][0] : `./${we}.css`;
5132
+ const i = Object.entries(t).filter(([s]) => u.extname(s) === ".css"), n = i.find(([, s]) => s === `./${be}.css`);
5133
+ return n ? n[0] : i.length > 0 ? i[0][0] : `./${be}.css`;
5154
5134
  }
5155
5135
  async function Te(e) {
5156
- return e._loadersCache ??= Jc(e), await e._loadersCache;
5136
+ return e._loadersCache ??= Oc(e), await e._loadersCache;
5157
5137
  }
5158
- async function Jc(e) {
5138
+ async function Oc(e) {
5159
5139
  const t = e.viteCommand === "build" ? "cdn" : "lazyNpm", i = e.viteConfig.base;
5160
5140
  let n = 0;
5161
5141
  const s = async (l) => (await Promise.all(
5162
5142
  l.map(async (d) => {
5163
5143
  const p = n++;
5164
- 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;
5165
5145
  })
5166
- )).filter(R).flat(), r = await Promise.all([
5146
+ )).filter(j).flat(), r = await Promise.all([
5167
5147
  // This may contain an import map so must be first
5168
- fc(i, t),
5148
+ mc(i, t),
5169
5149
  ve.then(s),
5170
- Gn(e).then(s)
5150
+ qn(e).then(s)
5171
5151
  ]), a = u.join(e.dir.src, "loader.ts");
5172
5152
  return [
5173
5153
  ...r.flat(),
@@ -5186,11 +5166,11 @@ async function Jc(e) {
5186
5166
  }
5187
5167
  ];
5188
5168
  }
5189
- async function Gn(e) {
5169
+ async function qn(e) {
5190
5170
  const t = e.options?.serve?.extraDependencies ?? [];
5191
5171
  return t.length === 0 ? [] : (e._serveOnlyDependencies ??= Promise.all(
5192
5172
  t.map(async (i) => {
5193
- 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);
5194
5174
  if (s === void 0)
5195
5175
  throw Error(
5196
5176
  w(
@@ -5203,12 +5183,12 @@ async function Gn(e) {
5203
5183
  cdnUrl: typeof i == "string" ? void 0 : i.getCdnUrl(e)
5204
5184
  };
5205
5185
  })
5206
- ).then((i) => i.filter(R)), await e._serveOnlyDependencies);
5186
+ ).then((i) => i.filter(j)), await e._serveOnlyDependencies);
5207
5187
  }
5208
- const Vn = "/@arcgis/lumina-compiler/testSetupFile", lt = [Vn];
5209
- async function Kc(e) {
5188
+ const Gn = "/@arcgis/lumina-compiler/testSetupFile", lt = [Gn];
5189
+ async function Jc(e) {
5210
5190
  if (!e.viteConfig.test?.browser?.enabled)
5211
- return Pi(e);
5191
+ return $i(e);
5212
5192
  const i = (await Te(e)).map((n, s) => {
5213
5193
  if ("javascriptCode" in n)
5214
5194
  return n.javascriptCode.join(`
@@ -5232,14 +5212,14 @@ async function Kc(e) {
5232
5212
  }).join(`
5233
5213
 
5234
5214
  `);
5235
- return [Pi(e), i].join("");
5215
+ return [$i(e), i].join("");
5236
5216
  }
5237
- 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";
5238
5218
  setupPuppeteerTest();
5239
- `, Bc = `import { setupLuminaTest } from "@arcgis/lumina-compiler/testing";
5219
+ `, Wc = `import { setupLuminaTest } from "@arcgis/lumina-compiler/testing";
5240
5220
  setupLuminaTest();
5241
5221
  `;
5242
- function _c(e) {
5222
+ function Bc(e) {
5243
5223
  let t = !0, i = !1, n, s, r, a, c;
5244
5224
  const l = "@arcgis/lumina:generateVirtualFiles", d = {
5245
5225
  name: l,
@@ -5247,50 +5227,50 @@ function _c(e) {
5247
5227
  configResolved() {
5248
5228
  a = u.join(e.dir.root, "src", "loader.ts"), c = ee(a);
5249
5229
  },
5250
- resolveId: (g) => g === a || g === c ? a : void 0,
5251
- async load(g) {
5252
- const h = g.startsWith(Vn);
5253
- if (!(!g.endsWith(".tsx") && g !== a && !h)) {
5230
+ resolveId: (y) => y === a || y === c ? a : void 0,
5231
+ async load(y) {
5232
+ const h = y.startsWith(Gn);
5233
+ if (!(!y.endsWith(".tsx") && y !== a && !h)) {
5254
5234
  if (s === void 0 && !e.isInPuppeteerTestBackEnd) {
5255
- r === void 0 && clearTimeout(n), r ??= Bo(e, t).catch((S) => {
5235
+ r === void 0 && clearTimeout(n), r ??= Wo(e, t).catch((S) => {
5256
5236
  throw i = !0, S;
5257
5237
  }), t = !1;
5258
5238
  const v = await r;
5259
5239
  s ??= v;
5260
5240
  }
5261
- return g === a ? Lo(e) : h ? await Kc(e) : void 0;
5241
+ return y === a ? Io(e) : h ? await Jc(e) : void 0;
5262
5242
  }
5263
5243
  },
5264
5244
  async writeBundle() {
5265
- e.isInStorybook || await F(u.join(e.dir.dist, "loader.d.ts"), Fo);
5245
+ e.isInStorybook || await D(u.join(e.dir.dist, "loader.d.ts"), Lo);
5266
5246
  },
5267
- async handleHotUpdate({ file: g, modules: h, read: v }) {
5268
- const S = await p(g, v);
5247
+ async handleHotUpdate({ file: y, modules: h, read: v }) {
5248
+ const S = await p(y, v);
5269
5249
  return S === void 0 ? void 0 : S ? h : (m(), []);
5270
5250
  },
5271
5251
  /**
5272
5252
  * If a component was added, removed or renamed, regenerate the api.json and
5273
5253
  * invalidate loader.js, forcing a page reload
5274
5254
  */
5275
- configureServer(g) {
5255
+ configureServer(y) {
5276
5256
  if (e.isInPuppeteerTestBackEnd)
5277
5257
  return;
5278
- e.isInTest && g.watcher.on("change", (v) => {
5279
- p(v, async () => await J(v, "utf8")).catch(
5258
+ e.isInTest && y.watcher.on("change", (v) => {
5259
+ p(v, async () => await O(v, "utf8")).catch(
5280
5260
  (S) => C.warn(l, v, String(S))
5281
5261
  );
5282
- }), g.watcher.on("add", h), g.watcher.on("unlink", h), g.watcher.on(
5262
+ }), y.watcher.on("add", h), y.watcher.on("unlink", h), y.watcher.on(
5283
5263
  "addDir",
5284
5264
  (v) => v.startsWith(e.dir.srcComponents) ? void xt(e, e.dir.srcComponents, v).then(
5285
5265
  (S) => S.length > 0 ? m() : void 0
5286
5266
  ) : void 0
5287
- ), g.watcher.on("unlinkDir", (v) => {
5267
+ ), y.watcher.on("unlinkDir", (v) => {
5288
5268
  e.componentFiles.some((T) => T.startsWith(v)) && m();
5289
5269
  });
5290
5270
  function h(v) {
5291
5271
  he(v, e.dir.srcComponents) && m();
5292
5272
  }
5293
- g.watcher.on("change", () => {
5273
+ y.watcher.on("change", () => {
5294
5274
  if (!i)
5295
5275
  return;
5296
5276
  i = !1, n = setTimeout(() => m(!0), 1e3);
@@ -5300,13 +5280,13 @@ function _c(e) {
5300
5280
  e.typeScriptWatchProgram?.close();
5301
5281
  }
5302
5282
  };
5303
- async function p(g, h) {
5283
+ async function p(y, h) {
5304
5284
  if (s === void 0)
5305
5285
  return !1;
5306
5286
  let v;
5307
5287
  if (e.isInStorybook) {
5308
5288
  v = await h();
5309
- const x = e.typeScriptProgram.getSourceFile(g);
5289
+ const x = e.typeScriptProgram.getSourceFile(y);
5310
5290
  if (x === void 0)
5311
5291
  return;
5312
5292
  if (!(x.text === v)) {
@@ -5324,26 +5304,26 @@ function _c(e) {
5324
5304
  ]), clearTimeout(E);
5325
5305
  }
5326
5306
  }
5327
- if (!he(g, e.dir.srcComponents))
5307
+ if (!he(y, e.dir.srcComponents))
5328
5308
  return;
5329
5309
  v ??= await h();
5330
- const T = _o(e, g, v);
5310
+ const T = Bo(e, y, v);
5331
5311
  if (T === void 0)
5332
5312
  return !1;
5333
5313
  for (const x of T) {
5334
- const L = un(x);
5314
+ const L = pn(x);
5335
5315
  e.server.ws.send({ type: "custom", event: "component-meta-update", data: L });
5336
5316
  }
5337
5317
  return f(), !0;
5338
5318
  }
5339
- function m(g = !1) {
5340
- !g && s === void 0 || (s = void 0, r = void 0, f(), y());
5319
+ function m(y = !1) {
5320
+ !y && s === void 0 || (s = void 0, r = void 0, f(), g());
5341
5321
  }
5342
5322
  function f() {
5343
- const g = e.server.moduleGraph.getModuleById(a);
5344
- g === void 0 ? (C.warn(l, "Failed to find HMR module for src/loader.ts"), e.server.moduleGraph.invalidateAll()) : e.server.moduleGraph.invalidateModule(g);
5323
+ const y = e.server.moduleGraph.getModuleById(a);
5324
+ y === void 0 ? (C.warn(l, "Failed to find HMR module for src/loader.ts"), e.server.moduleGraph.invalidateAll()) : e.server.moduleGraph.invalidateModule(y);
5345
5325
  }
5346
- const y = () => e.server.ws.send({
5326
+ const g = () => e.server.ws.send({
5347
5327
  type: "full-reload",
5348
5328
  path: u.join("/", u.relative(e.dir.root, a))
5349
5329
  });
@@ -5355,12 +5335,12 @@ function fe(e, t, i = Rt) {
5355
5335
  throw Error(w(St, "serveAssets() is only available when Vite is running in serve mode"));
5356
5336
  const n = e._serverConfigured, s = e.server.middlewares.stack.length;
5357
5337
  if (t.forEach((r) => {
5358
- 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);
5359
5339
  e.server.middlewares.use(l, (d, p, m) => {
5360
- const f = zc(d.url), y = a.type === "directory" ? u.resolve(a.source, f.slice(1)) : a.source, g = u.join(c, f), h = i.find((v) => v.match(g, e));
5361
- return (typeof y == "function" ? Promise.resolve(y()) : J(y)).then((v) => {
5362
- const S = (typeof y == "function" ? void 0 : h?.transform(v.toString("utf8"), g, e)) ?? v;
5363
- p.setHeader("Cache-Control", "max-age=31536000, immutable"), p.setHeader("Content-Type", js.lookup(f) || "application/octet-stream"), p.write(S), p.end();
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) => {
5342
+ const S = (typeof g == "function" ? void 0 : h?.transform(v.toString("utf8"), y, e)) ?? v;
5343
+ p.setHeader("Cache-Control", "max-age=31536000, immutable"), p.setHeader("Content-Type", Ds.lookup(f) || "application/octet-stream"), p.write(S), p.end();
5364
5344
  }).catch((v) => {
5365
5345
  (a.type !== "directory" || process.env.DEBUG) && C.warn(
5366
5346
  St,
@@ -5373,31 +5353,31 @@ function fe(e, t, i = Rt) {
5373
5353
  e.server.middlewares.stack.splice(0, 0, ...r);
5374
5354
  }
5375
5355
  }
5376
- async function Xn(e, t, i = Rt) {
5356
+ async function Vn(e, t, i = Rt) {
5377
5357
  await Promise.all(
5378
5358
  t.map(async (n) => {
5379
- const s = Qn(n), r = Yn(e.dir, Zn(s));
5359
+ const s = Xn(n), r = Zn(e.dir, Qn(s));
5380
5360
  if (s.type === "directory") {
5381
5361
  const a = u.resolve(s.source), l = (await Ue(a, { recursive: !0, withFileTypes: !0 })).filter((d) => d.isFile()).map((d) => {
5382
5362
  const p = u.resolve(d.parentPath, d.name), m = u.relative(a, p), f = u.join(r, m);
5383
5363
  return [p, f];
5384
5364
  });
5385
- await ts(l.map(([d, p]) => p)), await Promise.all(
5365
+ await es(l.map(([d, p]) => p)), await Promise.all(
5386
5366
  l.map(
5387
- async ([d, p]) => await xi(d, p, i, e)
5367
+ async ([d, p]) => await Pi(d, p, i, e)
5388
5368
  )
5389
5369
  );
5390
5370
  } else if (s.type === "file")
5391
- await z(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);
5392
5372
  else if (s.type === "dynamic") {
5393
- await z(u.dirname(r), { recursive: !0 });
5373
+ await Q(u.dirname(r), { recursive: !0 });
5394
5374
  const a = await Promise.resolve(s.source());
5395
- await F(r, a);
5375
+ await D(r, a);
5396
5376
  }
5397
5377
  })
5398
5378
  );
5399
5379
  }
5400
- const Qn = Ri ? (e) => e : (e) => e.type === "dynamic" ? {
5380
+ const Xn = ji ? (e) => e : (e) => e.type === "dynamic" ? {
5401
5381
  ...e,
5402
5382
  destination: Le(e.destination)
5403
5383
  } : {
@@ -5405,16 +5385,16 @@ const Qn = Ri ? (e) => e : (e) => e.type === "dynamic" ? {
5405
5385
  source: Le(e.source),
5406
5386
  destination: Le(e.destination)
5407
5387
  };
5408
- async function xi(e, t, i, n) {
5388
+ async function Pi(e, t, i, n) {
5409
5389
  const s = i.find((r) => r.match(t, n));
5410
5390
  if (s === void 0)
5411
- await Cs(e, t);
5391
+ await Es(e, t);
5412
5392
  else {
5413
- const r = await J(e, "utf8"), a = s.transform(r, t, n);
5414
- await F(t, a);
5393
+ const r = await O(e, "utf8"), a = s.transform(r, t, n);
5394
+ await D(t, a);
5415
5395
  }
5416
5396
  }
5417
- function Zn(e) {
5397
+ function Qn(e) {
5418
5398
  if (e.type === "dynamic")
5419
5399
  return e.destination;
5420
5400
  if (e.source.endsWith(u.sep)) {
@@ -5429,34 +5409,34 @@ function Zn(e) {
5429
5409
  }
5430
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;
5431
5411
  }
5432
- function Yn({ dist: e, distCdnAssets: t }, i) {
5433
- const n = Hc(i), s = u.join(
5412
+ function Zn({ dist: e, distCdnAssets: t }, i) {
5413
+ const n = _c(i), s = u.join(
5434
5414
  t,
5435
5415
  n ? u.relative(t, i) : i
5436
- ), r = u.relative(e, s), a = es(r);
5416
+ ), r = u.relative(e, s), a = Yn(r);
5437
5417
  return u.join(e, a);
5438
5418
  }
5439
- function Hc(e) {
5419
+ function _c(e) {
5440
5420
  if (e.startsWith(u.sep)) {
5441
- 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] ?? "" : "";
5442
5422
  return e.startsWith(`/${i}/`) || e.startsWith("/Users/");
5443
5423
  } else
5444
- return !!(!Ri && u.isAbsolute(e));
5424
+ return !!(!ji && u.isAbsolute(e));
5445
5425
  }
5446
- function Uc(e, t, i) {
5447
- 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;
5448
5428
  return `${e}${s}`;
5449
5429
  }
5450
- const es = (e) => e.replaceAll("../", ""), zc = (e = "") => e.split("?")[0].split("#")[0];
5451
- async function ts(e) {
5430
+ const Yn = (e) => e.replaceAll("../", ""), Uc = (e = "") => e.split("?")[0].split("#")[0];
5431
+ async function es(e) {
5452
5432
  const t = new Set(e.map(u.dirname));
5453
- await Promise.all(Array.from(t, async (i) => await z(i, { recursive: !0 })));
5433
+ await Promise.all(Array.from(t, async (i) => await Q(i, { recursive: !0 })));
5454
5434
  }
5455
- const qc = {
5435
+ const zc = {
5456
5436
  match: (e, t) => t.environment === "production" && e.endsWith(".json"),
5457
5437
  transform: (e) => JSON.stringify(JSON.parse(e))
5458
- }, Rt = [qc];
5459
- function Gc(e) {
5438
+ }, Rt = [zc];
5439
+ function qc(e) {
5460
5440
  let t;
5461
5441
  const i = () => [
5462
5442
  ...e.options.assets?.transformers ?? [],
@@ -5465,88 +5445,35 @@ function Gc(e) {
5465
5445
  return {
5466
5446
  name: "@arcgis/lumina:handleStaticAssets",
5467
5447
  configResolved() {
5468
- t = Vc(e);
5448
+ t = Gc(e);
5469
5449
  },
5470
5450
  async configureServer(n) {
5471
5451
  e.server = n, !e.isInPuppeteerTestBackEnd && (fe(e, await t, i()), n.watcher.on("addDir", (s) => {
5472
5452
  if (s.endsWith("assets")) {
5473
5453
  const r = u.dirname(s);
5474
- 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());
5475
5455
  }
5476
5456
  }));
5477
5457
  },
5478
5458
  async writeBundle() {
5479
- await Xn(e, await t, i());
5459
+ await Vn(e, await t, i());
5480
5460
  }
5481
5461
  };
5482
5462
  }
5483
- async function Vc(e) {
5463
+ async function Gc(e) {
5484
5464
  const t = U("assets"), i = await e.componentFilesPromise, n = await Promise.all(
5485
5465
  i.map(async (s) => {
5486
5466
  const r = u.dirname(s), a = u.join(r, "assets");
5487
- return await U(a) ? is(a, r) : void 0;
5467
+ return await U(a) ? ts(a, r) : void 0;
5488
5468
  })
5489
5469
  );
5490
- return await t && n.push(ns), n.filter(R);
5470
+ return await t && n.push(is), n.filter(j);
5491
5471
  }
5492
- const is = (e, t) => ({
5472
+ const ts = (e, t) => ({
5493
5473
  type: "directory",
5494
5474
  source: e,
5495
5475
  destination: u.basename(t)
5496
- }), ns = { type: "directory", source: "assets/", destination: "" };
5497
- function Xc(e) {
5498
- const { stencilCompatibility: t } = e.options.build?.ssr ?? {};
5499
- if (t?.enabled === !0)
5500
- return {
5501
- name: "@arcgis/lumina:buildStencilHydrate",
5502
- async writeBundle() {
5503
- if (e.isInStorybook)
5504
- return;
5505
- const i = N()?.name ?? e.options.build?.cdn?.namespace ?? u.basename(e.dir.root), n = `${i}/hydrate`, s = u.resolve(e.dir.root, t.path ?? "hydrate"), r = "index.d.ts", a = "index.js", c = "index.mjs", l = u.join(s, "index.d.ts"), d = u.join(s, "index.js"), p = u.join(s, "index.mjs"), m = te(s, e.dir.dist), y = `${Array.from(
5506
- new Set(e.apiJsonComponents.map((g) => `import "${m}/${g.importPath}";`))
5507
- ).join(`
5508
- `)}
5509
- export * from "@arcgis/lumina/stencilSsrCompatibility";`;
5510
- await z(s, { recursive: !0 }), await Promise.all([
5511
- F(
5512
- u.join(s, "package.json"),
5513
- `${JSON.stringify(
5514
- {
5515
- name: n,
5516
- description: `${i} component hydration app.`,
5517
- type: "module",
5518
- main: a,
5519
- module: c,
5520
- types: r,
5521
- exports: {
5522
- ".": {
5523
- types: `./${r}`,
5524
- import: `./${c}`,
5525
- require: `./${a}`
5526
- }
5527
- },
5528
- dependencies: {
5529
- "@arcgis/lumina": "*"
5530
- }
5531
- },
5532
- null,
5533
- 2
5534
- )}
5535
- `
5536
- ),
5537
- F(l, y),
5538
- /**
5539
- * We are outputting ESM into a CJS file. Making an assumption here that
5540
- * the CJS output is no longer used by anyone. Otherwise, we would have
5541
- * to build `@arcgis/lumina` as CJS too.
5542
- */
5543
- F(d, y),
5544
- F(p, y)
5545
- ]);
5546
- }
5547
- };
5548
- }
5549
- const dt = "@arcgis/lumina:printTotalBuildSize", Qc = (e) => ({
5476
+ }), is = { type: "directory", source: "assets/", destination: "" }, dt = "@arcgis/lumina:printTotalBuildSize", Vc = (e) => ({
5550
5477
  name: dt,
5551
5478
  apply: () => e.viteCommand === "build",
5552
5479
  configResolved(t) {
@@ -5561,13 +5488,13 @@ const dt = "@arcgis/lumina:printTotalBuildSize", Qc = (e) => ({
5561
5488
  i.writeBundle = async function(r, a) {
5562
5489
  let c = 0, l = 0, d = 0, p = 0;
5563
5490
  const m = console.log;
5564
- console.log = function(...y) {
5565
- if (m.apply(console, y), y.length === 1 && typeof y[0] == "string") {
5566
- const [g, h] = y[0].match(Yc) ?? [];
5567
- if (!g)
5491
+ console.log = function(...g) {
5492
+ if (m.apply(console, g), g.length === 1 && typeof g[0] == "string") {
5493
+ const [y, h] = g[0].match(Qc) ?? [];
5494
+ if (!y)
5568
5495
  return;
5569
- p || (p = y[0].slice(0, y[0].indexOf(g) + g.length).replaceAll(el, "").length);
5570
- const v = Number.parseFloat(g.replace(" kB", "").replaceAll(",", ""));
5496
+ p || (p = g[0].slice(0, g[0].indexOf(y) + y.length).replaceAll(Zc, "").length);
5497
+ const v = Number.parseFloat(y.replace(" kB", "").replaceAll(",", ""));
5571
5498
  h ? (d += Number.parseFloat(h.replace(" kB", "").replaceAll(",", "")), l += v) : c += v;
5572
5499
  }
5573
5500
  };
@@ -5577,34 +5504,34 @@ const dt = "@arcgis/lumina:printTotalBuildSize", Qc = (e) => ({
5577
5504
  console.log = m;
5578
5505
  }
5579
5506
  if (l > 0) {
5580
- const y = d > 0 ? l : c, g = Ii(y), h = e.dir.relativeDist;
5507
+ const g = d > 0 ? l : c, y = Ai(g), h = e.dir.relativeDist;
5581
5508
  console.log(
5582
5509
  [
5583
- Ai,
5510
+ ki,
5584
5511
  h,
5585
- Zc,
5512
+ Xc,
5586
5513
  "*",
5587
- " ".repeat(p - `${h}*`.length - g.length),
5588
- g,
5589
- ki,
5590
- d > 0 ? ` ${Ai}│ gzip: ${Ii(d)}${ki}` : ""
5514
+ " ".repeat(p - `${h}*`.length - y.length),
5515
+ y,
5516
+ xi,
5517
+ d > 0 ? ` ${ki}│ gzip: ${Ai(d)}${xi}` : ""
5591
5518
  ].join("")
5592
5519
  );
5593
5520
  }
5594
5521
  };
5595
5522
  }
5596
- }), ki = "\x1B[22m\x1B[1m\x1B[22m", Ai = "\x1B[2m", Zc = "\x1B[22m\x1B[36m", Yc = /\d+(?:,\d+)?\.\d{2} kB/gu, el = /\x1B\[\d+m/gu, tl = 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", {
5597
5524
  maximumFractionDigits: 2,
5598
5525
  minimumFractionDigits: 2
5599
- }), Ii = (e) => `${tl.format(e)} kB`, Li = "@arcgis/lumina:configureVite", il = (e) => ({
5600
- name: Li,
5526
+ }), Ai = (e) => `${Yc.format(e)} kB`, Ii = "@arcgis/lumina:configureVite", el = (e) => ({
5527
+ name: Ii,
5601
5528
  async config({
5602
5529
  server: t,
5603
5530
  publicDir: i,
5604
5531
  build: { cssMinify: n, target: s, sourcemap: r, lib: a, rollupOptions: { output: c = [] } = {} } = {},
5605
5532
  test: l = {}
5606
5533
  }) {
5607
- const { include: d, browser: p, environment: m, forceRerunTriggers: f } = l, y = {
5534
+ const { include: d, browser: p, environment: m, forceRerunTriggers: f } = l, g = {
5608
5535
  // Public utilities exposed by the package
5609
5536
  index: "src/index.ts",
5610
5537
  /**
@@ -5613,8 +5540,8 @@ const dt = "@arcgis/lumina:printTotalBuildSize", Qc = (e) => ({
5613
5540
  */
5614
5541
  loader: "src/loader.ts",
5615
5542
  // Entrypoint for bundling used components only:
5616
- ...await Jr(e)
5617
- }, { loader: g, ...h } = y, v = e.environment === "development" || e.isInTest ? {
5543
+ ...await Or(e)
5544
+ }, { loader: y, ...h } = g, v = e.environment === "development" || e.isInTest ? {
5618
5545
  "process.env.ESRI_INTERNAL": "true"
5619
5546
  } : void 0, S = !import.meta.url.includes("node_modules"), T = {
5620
5547
  /**
@@ -5703,7 +5630,7 @@ const dt = "@arcgis/lumina:printTotalBuildSize", Qc = (e) => ({
5703
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) {
5704
5631
  if (p?.enabled === !0)
5705
5632
  throw Error(
5706
- w(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")
5707
5634
  );
5708
5635
  return {
5709
5636
  test: {
@@ -5737,10 +5664,10 @@ const dt = "@arcgis/lumina:printTotalBuildSize", Qc = (e) => ({
5737
5664
  publicDir: i ?? !1,
5738
5665
  build: {
5739
5666
  cssMinify: n ?? (e.environment === "production" ? !0 : void 0),
5740
- target: s ?? Jn(e.typeScriptConfig),
5667
+ target: s ?? On(e.typeScriptConfig),
5741
5668
  sourcemap: r ?? (e.environment === "development" ? "inline" : e.options.build?.enableSourceMapsInProduction ?? !1),
5742
5669
  lib: {
5743
- entry: y,
5670
+ entry: g,
5744
5671
  formats: (a ? a.formats : void 0) ?? ["es"]
5745
5672
  },
5746
5673
  rollupOptions: {
@@ -5766,23 +5693,23 @@ const dt = "@arcgis/lumina:printTotalBuildSize", Qc = (e) => ({
5766
5693
  browser: {
5767
5694
  enabled: e.isInPuppeteerTestFrontEnd ? !1 : p?.enabled ?? !0,
5768
5695
  instances: p?.instances === void 0 ? [{ browser: "chromium" }] : void 0,
5769
- provider: p?.provider ?? Os
5696
+ provider: p?.provider ?? Ms
5770
5697
  }
5771
5698
  }
5772
5699
  };
5773
5700
  }
5774
- }), nl = (e) => ({
5701
+ }), tl = (e) => ({
5775
5702
  name: "@arcgis/lumina:setAssetPath",
5776
5703
  apply: () => e.viteCommand === "build",
5777
5704
  config: (t) => ({
5778
5705
  base: t.base ?? e.options.assets?.defaultPath ?? qe()
5779
5706
  })
5780
5707
  });
5781
- function sl(e = N()) {
5708
+ function il(e = J()) {
5782
5709
  const t = e.version ?? "0.0.1";
5783
- return bs(t);
5710
+ return Ss(t);
5784
5711
  }
5785
- const rl = (e) => `/*! ${e} */`, k = (e) => (t, i) => {
5712
+ const nl = (e) => `/*! ${e} */`, k = (e) => (t, i) => {
5786
5713
  Object.defineProperty(t, i, {
5787
5714
  get() {
5788
5715
  throw Error(
@@ -5821,8 +5748,8 @@ const pe = {
5821
5748
  apiJson: "docs/api.json",
5822
5749
  stencilLikeDocsJson: "docs/docs.json"
5823
5750
  };
5824
- async function ss(e, t, i, n, s = N()) {
5825
- const r = ol(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") : "";
5826
5753
  if (l.trim().replaceAll(`\r
5827
5754
  `, `
5828
5755
  `) === r.trim())
@@ -5840,9 +5767,9 @@ Current content:
5840
5767
  ${l}`
5841
5768
  )
5842
5769
  );
5843
- return Ki(a, r), !0;
5770
+ return Ji(a, r), !0;
5844
5771
  }
5845
- function ol(e, t, i, n = N()) {
5772
+ function sl(e, t, i, n = J()) {
5846
5773
  "@arcgis/components-controllers" in (n.dependencies ?? {}) && C.warn(
5847
5774
  "@arcgis/components-controllers",
5848
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."
@@ -5857,11 +5784,11 @@ declare module "@arcgis/lumina" {
5857
5784
  interface ImportStencilElements extends ${r.map((m, f) => `JSX$${f}.IntrinsicElements`).join(", ")} {}
5858
5785
  }`, l = n.devDependencies ?? {}, d = i === "preview" ? "matchers" : i === "webdriverio" ? "webdriverio" : "playwright";
5859
5786
  return [
5860
- al,
5787
+ rl,
5861
5788
  // Avoid cyclic references for tests in @arcgis/lumina
5862
5789
  n.name === "@arcgis/lumina" ? "" : `
5863
5790
  /// <reference types="@arcgis/lumina/typings" />`,
5864
- t ? cl : "",
5791
+ t ? ol : "",
5865
5792
  l.vitest ? `
5866
5793
  /// <reference types="vitest/config" />` : "",
5867
5794
  l["@vitest/browser"] ? `
@@ -5875,7 +5802,7 @@ declare module "@arcgis/lumina" {
5875
5802
  `
5876
5803
  ].join("");
5877
5804
  }
5878
- const al = `/**
5805
+ const rl = `/**
5879
5806
  * This file is autogenerated by \`@arcgis/lumina-compiler\` - do not edit it manually.
5880
5807
  * Manual edits will be overwritten.
5881
5808
  *
@@ -5883,8 +5810,8 @@ const al = `/**
5883
5810
  * as well as @arcgis/core typings if you use @arcgis/core.
5884
5811
  *
5885
5812
  * If you need to provide additional typings, create a separate file.
5886
- */`, cl = `
5887
- /// <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" && /**
5888
5815
  * Vitest started calling transformIndexHtml in browser mode versions ^2.1.4
5889
5816
  * However, it is a bit buggy (see
5890
5817
  * https://github.com/vitejs/vite/issues/19213). Instead, we are using test
@@ -5895,10 +5822,10 @@ const al = `/**
5895
5822
  * is doing:
5896
5823
  * https://github.com/storybookjs/storybook/blob/a5c2cf1712f70b4e3ecf38d3c98e7db8e8d67849/code/builders/builder-vite/src/plugins/code-generator-plugin.ts#L110
5897
5824
  */
5898
- e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand === "build" && !e.options.build?.cdn?.skip && e.options.build?.webApp?.destination !== void 0, ll = (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) => ({
5899
5826
  name: je,
5900
5827
  configResolved() {
5901
- !e.isInTest && !e.isInStorybook && (e._updateLuminaTsPromise = dl(e).catch(
5828
+ !e.isInTest && !e.isInStorybook && (e._updateLuminaTsPromise = cl(e).catch(
5902
5829
  (t) => C.error(je, `Failed to update package's src/lumina.ts: ${String(t)}`)
5903
5830
  ));
5904
5831
  },
@@ -5906,7 +5833,7 @@ e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand
5906
5833
  // Add imports to index.html before Vite starts resolving imports
5907
5834
  order: "pre",
5908
5835
  async handler(t, i) {
5909
- return rs(e, i) ? (await Te(e)).map(
5836
+ return ss(e, i) ? (await Te(e)).map(
5910
5837
  (s) => "javascriptCode" in s ? {
5911
5838
  tag: "script",
5912
5839
  attrs: {
@@ -5946,9 +5873,9 @@ e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand
5946
5873
  await e._updateLuminaTsPromise;
5947
5874
  }
5948
5875
  });
5949
- async function dl(e) {
5950
- const i = (await Promise.all([ve, Gn(e)])).flat();
5951
- if (!await ss(
5876
+ async function cl(e) {
5877
+ const i = (await Promise.all([ve, qn(e)])).flat();
5878
+ if (!await ns(
5952
5879
  i,
5953
5880
  e.dir.src,
5954
5881
  Ce,
@@ -5957,22 +5884,22 @@ async function dl(e) {
5957
5884
  return;
5958
5885
  let s = !1;
5959
5886
  function r() {
5960
- s || C.warn(je, pl), s = !0;
5887
+ s || C.warn(je, ll), s = !0;
5961
5888
  }
5962
5889
  process.on("exit", () => {
5963
5890
  r(), clearTimeout(c);
5964
5891
  });
5965
5892
  const c = setTimeout(r, 2e3);
5966
5893
  }
5967
- const pl = Rs.greenBright(
5894
+ const ll = js.greenBright(
5968
5895
  `lumina.ts has been updated (potentially because your dependencies changed). Please commit the updated file.
5969
5896
  If build failed with TypeScript errors, try running the build again to check whether new lumina.ts resolves the errors.`
5970
5897
  );
5971
- async function ul(e, t) {
5898
+ async function dl(e, t) {
5972
5899
  const i = /* @__PURE__ */ new Map();
5973
5900
  await Promise.all(
5974
5901
  e.map(async (s) => {
5975
- const r = await J(s, "utf-8"), a = r.match(ml)?.[1];
5902
+ const r = await O(s, "utf-8"), a = r.match(pl)?.[1];
5976
5903
  if (a === void 0) {
5977
5904
  C.warn(
5978
5905
  "@arcgis/lumina:parseStoryFiles",
@@ -5984,14 +5911,14 @@ async function ul(e, t) {
5984
5911
  let c = i.get(a);
5985
5912
  c === void 0 && (c = [], i.set(a, c));
5986
5913
  const l = [];
5987
- for (const d of r.matchAll(fl)) {
5988
- const p = d[1], m = vl(p), f = r.indexOf("{", d.index), y = r.indexOf("}", f), g = 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();
5989
5916
  let h = "";
5990
- if (g.endsWith("*/")) {
5991
- const T = g.lastIndexOf("/**");
5992
- h = g.slice(T + 3, -2).trim().replaceAll(gl, "");
5917
+ if (y.endsWith("*/")) {
5918
+ const T = y.lastIndexOf("/**");
5919
+ h = y.slice(T + 3, -2).trim().replaceAll(fl, "");
5993
5920
  }
5994
- const v = r.slice(f, y).match(yl)?.[1] || m, S = hl(m);
5921
+ const v = r.slice(f, g).match(ml)?.[1] || m, S = gl(m);
5995
5922
  l.push({
5996
5923
  description: `${v}${h ? `
5997
5924
  ${h}` : ""}`,
@@ -6016,17 +5943,17 @@ ${h}` : ""}`,
6016
5943
  }
6017
5944
  return n;
6018
5945
  }
6019
- const ml = /component: ["']([^"']+)["']/u, fl = /export const (\w+)/gu, yl = /name: ["']([^"']+)["']/u, gl = /^\s*\*\s?/gmu, hl = (e) => e.toLowerCase().replace(/[ ’–—―′¿'`~!@#$%^&*()_|+\-=?;:'",.<>{}[\]\\/]/giu, "-").replace(/-+/gu, "-").replace(/^-+/u, "").replace(/-+$/u, ""), vl = (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();
6020
- var Sl = 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) => {
6021
5948
  for (var s = void 0, r = e.length - 1, a; r >= 0; r--)
6022
5949
  (a = e[r]) && (s = a(t, i, s) || s);
6023
- return s && Sl(t, i, s), s;
5950
+ return s && hl(t, i, s), s;
6024
5951
  };
6025
- const ie = "@arcgis/lumina:context";
5952
+ const te = "@arcgis/lumina:context";
6026
5953
  class P {
6027
5954
  constructor(t) {
6028
5955
  this.typeScriptProgram = void 0, this.typeScriptTypeChecker = void 0, this.typeScriptWatchProgram = void 0, this._typeScriptSourceFiles = /* @__PURE__ */ new Map(), this._typeScriptReload = void 0, this._plugin = {
6029
- name: ie,
5956
+ name: te,
6030
5957
  // Make sure these globals are available to all plugins as soon as possible
6031
5958
  enforce: "pre",
6032
5959
  apply: (s, r) => (this._inferBuildSetup(r, s.define), !0),
@@ -6036,7 +5963,7 @@ class P {
6036
5963
  this.viteConfig = s;
6037
5964
  const r = s.build.minify !== !1;
6038
5965
  this.shouldMinify = r && this.viteCommand !== "serve", Object.hasOwn(this, "shouldMinifyJsx") || (this.shouldMinifyJsx = this.viteCommand !== "serve" || this.isInTest);
6039
- const a = u.join(s.root, u.sep), c = u.join(a, "src", u.sep), l = u.join(c, "components", u.sep), d = u.join(u.resolve(a, s.build.outDir), u.sep), p = u.join(u.relative(a, d), u.sep), m = u.join(d, "components", u.sep), f = u.join(d, this.options.build?.cdn?.namespace ?? Dt, u.sep), y = u.join(f, "assets", u.sep);
5966
+ const a = u.join(s.root, u.sep), c = u.join(a, "src", u.sep), l = u.join(c, "components", u.sep), d = u.join(u.resolve(a, s.build.outDir), u.sep), p = u.join(u.relative(a, d), u.sep), m = u.join(d, "components", u.sep), f = u.join(d, this.options.build?.cdn?.namespace ?? Dt, u.sep), g = u.join(f, "assets", u.sep);
6040
5967
  if (this.dir = {
6041
5968
  root: a,
6042
5969
  src: c,
@@ -6045,25 +5972,25 @@ class P {
6045
5972
  dist: d,
6046
5973
  distComponents: m,
6047
5974
  distCdn: f,
6048
- distCdnAssets: y
6049
- }, C.initialize(s.logger, a), s.root !== Mi())
5975
+ distCdnAssets: g
5976
+ }, C.initialize(s.logger, a), s.root !== Ri())
6050
5977
  throw Error(
6051
5978
  w(
6052
- ie,
5979
+ te,
6053
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."
6054
5981
  )
6055
5982
  );
6056
5983
  d === a ? C.warn(
6057
- ie,
5984
+ te,
6058
5985
  "Vite output directory is set to the root directory. This can produce unexpected behavior. Please set the output directory to a subdirectory of the root directory (i.e dist/)"
6059
5986
  ) : p.startsWith("..") && C.warn(
6060
- ie,
5987
+ te,
6061
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."
6062
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);
6063
- const g = this.options.documentation?.publicStoryUrlPrefix;
6064
- this.isFullApiExtraction && typeof g == "string" ? this.componentStoriesPromise = this.componentFilesPromise.then(async () => await ul(this.componentStoryFiles, g)).then((h) => {
5990
+ const y = this.options.documentation?.publicStoryUrlPrefix;
5991
+ this.isFullApiExtraction && typeof y == "string" ? this.componentStoriesPromise = this.componentFilesPromise.then(async () => await dl(this.componentStoryFiles, y)).then((h) => {
6065
5992
  this.componentStories = h;
6066
- }) : (this.componentStoriesPromise = void 0, this.componentStories = void 0), wc(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);
6067
5994
  }
6068
5995
  },
6069
5996
  configureServer: {
@@ -6091,9 +6018,9 @@ class P {
6091
6018
  webTypes: i.jetBrains === !1 ? void 0 : i.jetBrains?.webTypesFileName ? de(i.jetBrains.webTypesFileName) : pe.webTypes,
6092
6019
  vsCodeHtml: i.vsCode === !1 ? void 0 : i.vsCode?.htmlFileName ? de(i.vsCode.htmlFileName) : pe.vsCodeHtml,
6093
6020
  vsCodeCss: i.vsCode === !1 ? void 0 : i.vsCode?.cssFileName ? de(i.vsCode.cssFileName) : pe.vsCodeCss
6094
- }, yn(), this.componentFilesPromise = xt(this, u.resolve("src/components")), bc(this);
6095
- const n = t.build?.preamble ?? sl();
6096
- this.banner = rl(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);
6097
6024
  }
6098
6025
  _inferBuildSetup({ command: t, mode: i }, n) {
6099
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;
@@ -6115,7 +6042,7 @@ class P {
6115
6042
  return n;
6116
6043
  } else {
6117
6044
  if (this.viteCommand === "build" || this.isInStorybook)
6118
- throw Error(w(ie, t, "Unable to find the TypeScript source file"));
6045
+ throw Error(w(te, t, "Unable to find the TypeScript source file"));
6119
6046
  {
6120
6047
  const r = this._typeScriptSourceFiles.get(t);
6121
6048
  r !== void 0 && r.text === i && (n = r);
@@ -6164,7 +6091,7 @@ class P {
6164
6091
  else
6165
6092
  throw Error(
6166
6093
  w(
6167
- ie,
6094
+ te,
6168
6095
  "It is too late to call provideAssets() as Vite already wrote the bundle to disk. Please call provideAssets() before Vite's writeBundle()"
6169
6096
  )
6170
6097
  );
@@ -6251,15 +6178,15 @@ A([
6251
6178
  A([
6252
6179
  k("configResolved()")
6253
6180
  ], P.prototype, "_typeScriptPrinter");
6254
- const pt = "@arcgis/lumina:addNonLazyImports", bl = (e) => ({
6181
+ const pt = "@arcgis/lumina:addNonLazyImports", vl = (e) => ({
6255
6182
  name: pt,
6256
6183
  apply: () => e.viteCommand === "build",
6257
6184
  generateBundle(t, i) {
6258
6185
  Object.entries(i).forEach(([n, s]) => {
6259
- const r = ge(n, "components/", e);
6186
+ const r = ye(n, "components/", e);
6260
6187
  if (r !== n && (s.fileName = r), s.type === "chunk") {
6261
6188
  const a = u.dirname(u.join(e.dir.dist, n)), c = r === n ? a : u.dirname(u.join(e.dir.dist, r));
6262
- s.code = _i(s.code, e, c, a);
6189
+ s.code = Bi(s.code, e, c, a);
6263
6190
  }
6264
6191
  });
6265
6192
  },
@@ -6272,7 +6199,7 @@ const pt = "@arcgis/lumina:addNonLazyImports", bl = (e) => ({
6272
6199
  i.forEach(([r, { referencedTagNames: a, referencedDeferredTagNames: c, referencedBy: l }]) => {
6273
6200
  if (n.has(r) || a.length === 0 && c.length === 0)
6274
6201
  return;
6275
- const d = os(t, l, n);
6202
+ const d = rs(t, l, n);
6276
6203
  if (d.forEach((p) => {
6277
6204
  t[p].referencedTagNames.splice(0, 0, ...a), t[p].referencedDeferredTagNames.splice(0, 0, ...c);
6278
6205
  }), (a.length > 0 || c.length > 0) && d.length === 0) {
@@ -6288,17 +6215,17 @@ const pt = "@arcgis/lumina:addNonLazyImports", bl = (e) => ({
6288
6215
  const s = i.flatMap(([r, { referencedTagNames: a, referencedDeferredTagNames: c }]) => {
6289
6216
  if (!n.has(r))
6290
6217
  return [];
6291
- const l = u.dirname(r), d = ge(l, e.dir.srcComponents, e), p = u.relative(e.dir.src, d);
6218
+ const l = u.dirname(r), d = ye(l, e.dir.srcComponents, e), p = u.relative(e.dir.src, d);
6292
6219
  function m(b) {
6293
- const E = Qa(e, b, r);
6220
+ const E = Xa(e, b, r);
6294
6221
  if (E === void 0)
6295
6222
  return;
6296
- const I = Za(E, p);
6223
+ const I = Qa(E, p);
6297
6224
  if (I !== `./${p}`)
6298
- return I.startsWith(".") ? `${I}/${Fi}` : I;
6225
+ return I.startsWith(".") ? `${I}/${Li}` : I;
6299
6226
  }
6300
- const f = new Set(a), y = new Set(c), g = Array.from(f, m).filter(R), h = (b) => `import "${b}";
6301
- `, v = g.map(h).join(""), S = /* @__PURE__ */ new Set(), T = Array.from(y, (b) => {
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) => {
6302
6229
  const E = m(b);
6303
6230
  if (E !== void 0) {
6304
6231
  if (f.has(b)) {
@@ -6311,53 +6238,53 @@ const pt = "@arcgis/lumina:addNonLazyImports", bl = (e) => ({
6311
6238
  return S.add(h(E)), `.set("${b}", () => import("${E}"))
6312
6239
  `;
6313
6240
  }
6314
- }).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";
6315
6242
  ${x}
6316
6243
  deferredLoaders${T.join("")};` : x;
6317
6244
  return [
6318
- F(u.join(e.dir.dist, p, Fi), $),
6319
- F(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)
6320
6247
  ];
6321
6248
  });
6322
6249
  await Promise.all(s);
6323
6250
  }
6324
- }), 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))), Tl = (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) => ({
6325
6252
  name: "@arcgis/lumina:handleDynamicAssets",
6326
6253
  configureServer(t) {
6327
- 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));
6328
6255
  },
6329
6256
  async writeBundle() {
6330
6257
  await Promise.all(
6331
- Ni(e).map(
6332
- 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)
6333
6260
  )
6334
6261
  );
6335
6262
  }
6336
6263
  });
6337
- function Ni(e) {
6264
+ function Fi(e) {
6338
6265
  const t = [], i = e.assetsToProvide?.filter((n) => n.apply === void 0 || n.apply === e.viteCommand) ?? [];
6339
6266
  return e.options.assets?.extra?.forEach((n) => {
6340
6267
  "type" in n ? t.push(n) : "assets" in n && t.push(...n.assets);
6341
6268
  }), t.length > 0 && i.push({ assets: t }), e.assetsToProvide = void 0, i;
6342
6269
  }
6343
- const bt = "@arcgis/lumina:updatePackageJson", El = (e) => ({
6344
- name: bt,
6270
+ const wt = "@arcgis/lumina:updatePackageJson", bl = (e) => ({
6271
+ name: wt,
6345
6272
  apply: () => e.viteCommand === "serve" && e.environment === "development" && !e.isInTest && !e.isInCi,
6346
6273
  configResolved() {
6347
- Cl(e).catch(
6348
- (t) => C.error(bt, `Failed to update package's package.json:${String(t)}`)
6274
+ Tl(e).catch(
6275
+ (t) => C.error(wt, `Failed to update package's package.json:${String(t)}`)
6349
6276
  );
6350
6277
  }
6351
6278
  });
6352
- async function Cl(e) {
6353
- const t = u.join(e.dir.root, "package.json"), i = JSON.parse(await J(t, "utf-8")), n = $l(i, e);
6354
- 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));
6355
6282
  }
6356
- function $l(e, t) {
6283
+ function El(e, t) {
6357
6284
  const i = e?.devDependencies ?? {};
6358
6285
  Object.keys(e?.peerDependencies ?? {}).forEach((d) => {
6359
6286
  d in i || C.warn(
6360
- bt,
6287
+ wt,
6361
6288
  `Every peerDependency should also be a devDependency, or else some tools will get confused (like Turbo Build). Found "${d}" that is not a devDependency. Please edit your package.json`
6362
6289
  );
6363
6290
  });
@@ -6379,7 +6306,7 @@ function $l(e, t) {
6379
6306
  const d = s(r.webTypes);
6380
6307
  e["web-types"] !== d && (n = !0, e["web-types"] = d);
6381
6308
  }
6382
- const a = `./${we}.css`, c = t.options.build?.cdn?.namespace !== void 0, l = te(
6309
+ const a = `./${be}.css`, c = t.options.build?.cdn?.namespace !== void 0, l = oe(
6383
6310
  t.dir.root,
6384
6311
  u.join(t.dir.distCdn, a)
6385
6312
  );
@@ -6392,20 +6319,20 @@ function $l(e, t) {
6392
6319
  if (n)
6393
6320
  return e;
6394
6321
  }
6395
- const Pl = (e) => ({
6322
+ const Cl = (e) => ({
6396
6323
  timestamp: e.apiJson.timestamp,
6397
6324
  compiler: e.apiJson.compiler,
6398
- components: xl(e),
6325
+ components: $l(e),
6399
6326
  typeLibrary: {}
6400
6327
  });
6401
- function xl(e) {
6328
+ function $l(e) {
6402
6329
  const t = [];
6403
6330
  for (const i of e.apiJson.modules)
6404
6331
  for (const n of i.declarations)
6405
- "customElement" in n && t.push(kl(n, i.path));
6332
+ "customElement" in n && t.push(Pl(n, i.path));
6406
6333
  return t;
6407
6334
  }
6408
- function kl(e, t) {
6335
+ function Pl(e, t) {
6409
6336
  const i = e.superclass ? [{ name: "superclass", text: JSON.stringify(e.superclass) }] : [];
6410
6337
  return {
6411
6338
  filePath: t,
@@ -6420,9 +6347,9 @@ function kl(e, t) {
6420
6347
  dependencies: [],
6421
6348
  dependencyGraph: {},
6422
6349
  deprecation: typeof e.deprecated == "boolean" ? e.deprecated ? "" : void 0 : e.deprecated,
6423
- props: e.members.map(Al).filter(R),
6424
- methods: e.members.map(Il).filter(R),
6425
- events: e.events?.map(Ll) ?? [],
6350
+ props: e.members.map(xl).filter(j),
6351
+ methods: e.members.map(kl).filter(j),
6352
+ events: e.events?.map(Al) ?? [],
6426
6353
  styles: e.cssProperties?.map((n) => ({
6427
6354
  name: n.name,
6428
6355
  annotation: "prop",
@@ -6434,7 +6361,7 @@ function kl(e, t) {
6434
6361
  listeners: []
6435
6362
  };
6436
6363
  }
6437
- function Al(e) {
6364
+ function xl(e) {
6438
6365
  if (e.kind !== "field")
6439
6366
  return;
6440
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;
@@ -6468,14 +6395,14 @@ const Mt = (e) => Object.fromEntries(
6468
6395
  (t) => [
6469
6396
  t.name,
6470
6397
  {
6471
- location: t.package === Oi ? "global" : t.package === void 0 ? "local" : "import",
6398
+ location: t.package === Mi ? "global" : t.package === void 0 ? "local" : "import",
6472
6399
  path: typeof t.module == "string" && typeof t.package == "string" ? u.join(t.package, t.module) : t.module ?? t.package,
6473
6400
  id: "notImplemented"
6474
6401
  }
6475
6402
  ]
6476
6403
  ) ?? []
6477
6404
  );
6478
- function Il(e) {
6405
+ function kl(e) {
6479
6406
  if (e.kind !== "method")
6480
6407
  return;
6481
6408
  const t = e, i = e.inheritedFrom ? [{ name: "inheritedFrom", text: JSON.stringify(e.inheritedFrom) }] : [], n = t.parameters?.map(({ name: s, type: r, description: a }) => ({
@@ -6506,7 +6433,7 @@ function Il(e) {
6506
6433
  deprecation: typeof t.deprecated == "boolean" ? t.deprecated ? "" : void 0 : t.deprecated
6507
6434
  };
6508
6435
  }
6509
- function Ll(e) {
6436
+ function Al(e) {
6510
6437
  const t = e.inheritedFrom ? [{ name: "inheritedFrom", text: JSON.stringify(e.inheritedFrom) }] : [];
6511
6438
  return {
6512
6439
  event: e.name,
@@ -6524,32 +6451,32 @@ function Ll(e) {
6524
6451
  deprecation: typeof e.deprecated == "boolean" ? e.deprecated ? "" : void 0 : e.deprecated
6525
6452
  };
6526
6453
  }
6527
- const as = (e) => e.flatMap(
6454
+ const os = (e) => e.flatMap(
6528
6455
  (t) => t.cssProperties?.map((i) => ({
6529
6456
  name: i.name,
6530
6457
  description: i.description || void 0
6531
6458
  })) ?? []
6532
- ), cs = (e) => e.flatMap(
6459
+ ), as = (e) => e.flatMap(
6533
6460
  (t) => t.cssParts?.map((i) => ({
6534
6461
  name: `::part(${i.name})`,
6535
6462
  description: i.description || void 0
6536
6463
  })) ?? []
6537
- ), Fl = (e) => e.attributes?.map((t) => ({
6464
+ ), Il = (e) => e.attributes?.map((t) => ({
6538
6465
  name: t.name ?? "",
6539
6466
  description: Qe(t.description, t.deprecated) || void 0,
6540
6467
  default: t.default,
6541
6468
  value: {
6542
- type: Nl(t.type.values?.map(sn))
6469
+ type: Ll(t.type.values?.map(nn))
6543
6470
  }
6544
- })) ?? [], Nl = (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 = {
6545
6472
  slots: "Slots",
6546
6473
  events: "Events",
6547
6474
  cssProperties: "CSS Properties",
6548
6475
  cssParts: "CSS Parts",
6549
6476
  methods: "Methods"
6550
6477
  };
6551
- function ls(e) {
6552
- const t = Dl(e.slots), i = jl(e.events), n = Rl(e.cssProperties), s = Ml(e.cssParts), r = Ol(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();
6553
6480
  return [...a ? [`${a}
6554
6481
  --`] : [], i, r, t, n, s].filter(Boolean).join(`
6555
6482
 
@@ -6557,28 +6484,28 @@ function ls(e) {
6557
6484
  }
6558
6485
  const Pe = (e, t) => t === void 0 || t.length === 0 ? "" : `### ${e}
6559
6486
  ${t.join(`
6560
- `)}`, Dl = (e) => Pe(
6487
+ `)}`, Fl = (e) => Pe(
6561
6488
  $e.slots,
6562
6489
  e?.map((t) => `- ${t.name ? `**${t.name}**` : "_default_"} - ${t.description}`)
6563
- ), jl = (e) => Pe(
6490
+ ), Nl = (e) => Pe(
6564
6491
  $e.events,
6565
6492
  e?.filter((t) => t.name !== null && t.name !== void 0).map((t) => `- **${t.name}**${t.description ? ` - ${t.description}` : ""}`)
6566
- ), Rl = (e = []) => Pe(
6493
+ ), Dl = (e = []) => Pe(
6567
6494
  $e.cssProperties,
6568
6495
  e?.map(
6569
6496
  (t) => `- **${t.name}** - ${t.description} ${t.default ? `_(default: ${t.default})_}` : ""}`
6570
6497
  )
6571
- ), Ml = (e) => Pe(
6498
+ ), jl = (e) => Pe(
6572
6499
  $e.cssParts,
6573
6500
  e?.map((t) => `- **${t.name}** - ${t.description}`)
6574
- ), Ol = (e) => Pe(
6501
+ ), Rl = (e) => Pe(
6575
6502
  $e.methods,
6576
6503
  e.filter(gs).map(
6577
6504
  (t) => [`- \`${t.name}${t.signature}\``, Qe(t.description, t.deprecated)].filter(Boolean).join(" - ")
6578
6505
  )
6579
6506
  );
6580
- function Jl(e, t) {
6581
- const i = Kl(e), n = as(e), s = cs(e), r = N();
6507
+ function Ml(e, t) {
6508
+ const i = Ol(e), n = os(e), s = as(e), r = J();
6582
6509
  return {
6583
6510
  $schema: "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
6584
6511
  name: r.name,
@@ -6596,52 +6523,52 @@ function Jl(e, t) {
6596
6523
  }
6597
6524
  };
6598
6525
  }
6599
- const Kl = (e) => e.map((t) => ({
6526
+ const Ol = (e) => e.map((t) => ({
6600
6527
  name: t.tagName,
6601
- description: ls(t),
6528
+ description: cs(t),
6602
6529
  "doc-url": t.demos?.[0]?.url,
6603
- attributes: Fl(t),
6530
+ attributes: Il(t),
6604
6531
  slots: t.slots?.map((i) => ({
6605
6532
  name: i.name,
6606
6533
  description: i.description
6607
6534
  })),
6608
- events: Di(t),
6535
+ events: Ni(t),
6609
6536
  js: {
6610
- properties: Wl(t),
6611
- events: Di(t)
6537
+ properties: Jl(t),
6538
+ events: Ni(t)
6612
6539
  }
6613
- })), Wl = (e) => e.members.filter(hs).map((t) => ({
6540
+ })), Jl = (e) => e.members.filter(ys).map((t) => ({
6614
6541
  name: t.name,
6615
6542
  description: t.description,
6616
6543
  type: t.type?.text
6617
- })) ?? [], Di = (e) => e.events?.map((t) => ({
6544
+ })) ?? [], Ni = (e) => e.events?.map((t) => ({
6618
6545
  name: t.name,
6619
6546
  type: t.type?.text,
6620
6547
  description: t.description
6621
- })) ?? [], Bl = (e) => e.map((t) => ({
6548
+ })) ?? [], Kl = (e) => e.map((t) => ({
6622
6549
  name: t.tagName,
6623
- description: ls(t),
6624
- attributes: _l(t),
6550
+ description: cs(t),
6551
+ attributes: Wl(t),
6625
6552
  references: t.demos?.map((i) => ({ name: i.description, url: i.url })) ?? []
6626
- })), _l = (e) => e.attributes?.map((t) => ({
6553
+ })), Wl = (e) => e.attributes?.map((t) => ({
6627
6554
  name: t.name,
6628
6555
  description: Qe(t.description, t.deprecated) || void 0,
6629
- values: Hl(t)
6630
- })) ?? [], Hl = (e) => e.type.values?.map((t) => t.value ?? "").filter(Boolean).map((t) => ({ name: t })) ?? [], Ul = (e) => ({
6556
+ values: Bl(t)
6557
+ })) ?? [], Bl = (e) => e.type.values?.map((t) => t.value ?? "").filter(Boolean).map((t) => ({ name: t })) ?? [], _l = (e) => ({
6631
6558
  $schema: "https://raw.githubusercontent.com/microsoft/vscode-html-languageservice/main/docs/customData.schema.json",
6632
6559
  version: 1.1,
6633
- tags: Bl(e)
6634
- }), zl = (e) => ({
6560
+ tags: Kl(e)
6561
+ }), Hl = (e) => ({
6635
6562
  $schema: "https://raw.githubusercontent.com/microsoft/vscode-css-languageservice/main/docs/customData.schema.json",
6636
6563
  version: 1.1,
6637
- properties: as(e),
6638
- pseudoElements: cs(e)
6639
- }), ql = "@arcgis/lumina:generateDocs";
6640
- function Gl(e) {
6564
+ properties: os(e),
6565
+ pseudoElements: as(e)
6566
+ }), Ul = "@arcgis/lumina:generateDocs";
6567
+ function zl(e) {
6641
6568
  return e._documentationFileNames.stencilLikeDocsJson !== void 0 && e.provideAssets([
6642
6569
  {
6643
6570
  type: "dynamic",
6644
- source: () => JSON.stringify(Pl(e), null, 2),
6571
+ source: () => JSON.stringify(Cl(e), null, 2),
6645
6572
  destination: u.join("../..", e._documentationFileNames.stencilLikeDocsJson)
6646
6573
  }
6647
6574
  ]), e._documentationFileNames.apiJson !== void 0 && e.provideAssets([
@@ -6651,34 +6578,34 @@ function Gl(e) {
6651
6578
  destination: u.join("../..", e._documentationFileNames.apiJson)
6652
6579
  }
6653
6580
  ]), {
6654
- name: ql,
6581
+ name: Ul,
6655
6582
  async writeBundle() {
6656
6583
  if (e.isInStorybook)
6657
6584
  return;
6658
- 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);
6659
6586
  if (a.length === 0)
6660
6587
  return;
6661
- await ts(a);
6588
+ await es(a);
6662
6589
  const c = [];
6663
6590
  if (n !== void 0) {
6664
- const l = JSON.stringify(Ul(e.apiJsonComponents), null, 2);
6665
- c.push(F(n, l));
6591
+ const l = JSON.stringify(_l(e.apiJsonComponents), null, 2);
6592
+ c.push(D(n, l));
6666
6593
  }
6667
6594
  if (s !== void 0) {
6668
- const l = JSON.stringify(zl(e.apiJsonComponents), null, 2);
6669
- c.push(F(s, l));
6595
+ const l = JSON.stringify(Hl(e.apiJsonComponents), null, 2);
6596
+ c.push(D(s, l));
6670
6597
  }
6671
6598
  if (r !== void 0) {
6672
- const l = Jl(e.apiJsonComponents, typeof t == "object" ? t : {});
6673
- c.push(F(r, JSON.stringify(l, null, 2)));
6599
+ const l = Ml(e.apiJsonComponents, typeof t == "object" ? t : {});
6600
+ c.push(D(r, JSON.stringify(l, null, 2)));
6674
6601
  }
6675
6602
  await Promise.all(c);
6676
6603
  }
6677
6604
  };
6678
6605
  }
6679
- const Vl = (e) => `import type { h, EventHandler } from "@arcgis/lumina";
6606
+ const ql = (e) => `import type { h, EventHandler } from "@arcgis/lumina";
6680
6607
 
6681
- ${e.map(Xl).join(`
6608
+ ${e.map(Gl).join(`
6682
6609
 
6683
6610
  `)}
6684
6611
 
@@ -6690,7 +6617,7 @@ ${e.map(({ tagName: t, pascalCaseName: i }) => ` "${t}": Lumina${i};`).join
6690
6617
  }
6691
6618
  }
6692
6619
  }`;
6693
- function Xl({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6620
+ function Gl({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6694
6621
  const [s, r] = Xe(e, i);
6695
6622
  return [
6696
6623
  `interface Lumina${t} extends ${s}h.JSX.HTMLAttributes<HTML${t}Element> {
@@ -6703,7 +6630,7 @@ function Xl({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6703
6630
  r
6704
6631
  ].join("");
6705
6632
  }
6706
- function Ql(e) {
6633
+ function Vl(e) {
6707
6634
  const t = ` interface IntrinsicElements extends PreactJsx.IntrinsicElements {
6708
6635
  ${e.map(({ pascalCaseName: i, tagName: n }) => ` "${n}": Preact${i};`).join(`
6709
6636
  `)}
@@ -6711,7 +6638,7 @@ ${e.map(({ pascalCaseName: i, tagName: n }) => ` "${n}": Preact${i};`).join
6711
6638
  return `import { JSX as PreactJsx } from "preact";
6712
6639
  import type { EventHandler } from "@arcgis/lumina";
6713
6640
 
6714
- ${e.map(Zl).join(`
6641
+ ${e.map(Xl).join(`
6715
6642
 
6716
6643
  `)}
6717
6644
 
@@ -6724,7 +6651,7 @@ ${t}
6724
6651
  }
6725
6652
  }`;
6726
6653
  }
6727
- function Zl({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6654
+ function Xl({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6728
6655
  const [s, r] = Xe(e, i);
6729
6656
  return [
6730
6657
  `interface Preact${t} extends ${s}PreactJsx.HTMLAttributes<HTML${t}Element> {
@@ -6737,13 +6664,13 @@ function Zl({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6737
6664
  r
6738
6665
  ].join("");
6739
6666
  }
6740
- function Yl(e) {
6667
+ function Ql(e) {
6741
6668
  const t = e.map(({ pascalCaseName: i, tagName: n }) => ` "${n}": React${i};`).join(`
6742
6669
  `);
6743
6670
  return `import type { HTMLProps } from 'react';
6744
6671
  import type { EventHandler } from "@arcgis/lumina";
6745
6672
 
6746
- ${e.map(ed).join(`
6673
+ ${e.map(Zl).join(`
6747
6674
 
6748
6675
  `)}
6749
6676
 
@@ -6769,7 +6696,7 @@ ${t}
6769
6696
  }
6770
6697
  }`;
6771
6698
  }
6772
- function ed({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6699
+ function Zl({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6773
6700
  const [s, r] = Xe(e, i);
6774
6701
  return [
6775
6702
  `interface React${t} extends ${s}HTMLProps<HTML${t}Element> {
@@ -6782,10 +6709,10 @@ function ed({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6782
6709
  r
6783
6710
  ].join("");
6784
6711
  }
6785
- const td = (e) => `import { JSXBase as StencilJsx } from "@stencil/core/internal";
6712
+ const Yl = (e) => `import { JSXBase as StencilJsx } from "@stencil/core/internal";
6786
6713
  import type { EventHandler } from "@arcgis/lumina";
6787
6714
 
6788
- ${e.map(id).join(`
6715
+ ${e.map(ed).join(`
6789
6716
 
6790
6717
  `)}
6791
6718
 
@@ -6803,7 +6730,7 @@ declare module "@stencil/core/internal/stencil-public-runtime" {
6803
6730
  interface IntrinsicElements extends ExposedElements {}
6804
6731
  }
6805
6732
  }`;
6806
- function id({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6733
+ function ed({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6807
6734
  const [s, r] = Xe(e, i);
6808
6735
  return [
6809
6736
  `interface Stencil${t} extends ${s}StencilJsx.HTMLAttributes<HTML${t}Element> {
@@ -6816,16 +6743,16 @@ function id({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6816
6743
  r
6817
6744
  ].join("");
6818
6745
  }
6819
- const nd = (e, t, i) => [i, t, sd(e), rd(e)].join(`
6746
+ const td = (e, t, i) => [i, t, id(e), nd(e)].join(`
6820
6747
 
6821
- `), sd = (e) => e.filter((t) => (t.events?.length ?? 0) > 0).map(
6748
+ `), id = (e) => e.filter((t) => (t.events?.length ?? 0) > 0).map(
6822
6749
  ({ pascalCaseName: t }) => `export interface ${t}CustomEvent<T> extends CustomEvent<T> {
6823
6750
  detail: T;
6824
6751
  target: HTML${t}Element;
6825
6752
  currentTarget: HTML${t}Element;
6826
6753
  }`
6827
6754
  ).join(`
6828
- `), rd = (e) => `export { ToEvents, TargetedEvent } from "@arcgis/lumina";
6755
+ `), nd = (e) => `export { ToEvents, TargetedEvent } from "@arcgis/lumina";
6829
6756
 
6830
6757
  declare global {
6831
6758
  interface HTMLElementTagNameMap {
@@ -6833,12 +6760,12 @@ ${e.map(({ pascalCaseName: t, tagName: i }) => ` "${i}": HTML${t}Element;`).j
6833
6760
  `)}
6834
6761
  }
6835
6762
 
6836
- ${e.map(od).join(`
6763
+ ${e.map(sd).join(`
6837
6764
  `).split(`
6838
6765
  `).map((t) => t.length > 0 ? ` ${t}` : t).join(`
6839
6766
  `)}
6840
6767
  }`;
6841
- function od({ name: e, pascalCaseName: t, events: i = [] }) {
6768
+ function sd({ name: e, pascalCaseName: t, events: i = [] }) {
6842
6769
  const n = i.length > 0, s = `${t}CustomEvent`, r = `HTML${t}Element`;
6843
6770
  return [
6844
6771
  n ? `interface ${r}EventMap {
@@ -6857,7 +6784,7 @@ ${n ? ` addEventListener<K extends keyof ${r}EventMap>(type: K, listener: (this
6857
6784
  }`
6858
6785
  ].join("");
6859
6786
  }
6860
- function ad(e) {
6787
+ function rd(e) {
6861
6788
  let t;
6862
6789
  return {
6863
6790
  name: "@arcgis/lumina:generateFrameworkTypes",
@@ -6865,62 +6792,62 @@ function ad(e) {
6865
6792
  generateBundle() {
6866
6793
  if (e.isInStorybook)
6867
6794
  return;
6868
- t = Oa(e);
6795
+ t = Ma(e);
6869
6796
  const i = u.join(e.dir.dist, "index.d.ts");
6870
6797
  e._declarationTextTransformers.push((n) => {
6871
6798
  const { filePath: s, content: r } = n;
6872
- return s === i ? { filePath: s, content: nd(e.apiJsonComponents, r, t) } : n;
6799
+ return s === i ? { filePath: s, content: td(e.apiJsonComponents, r, t) } : n;
6873
6800
  });
6874
6801
  },
6875
6802
  async writeBundle() {
6876
6803
  if (e.isInStorybook)
6877
6804
  return;
6878
6805
  const i = u.join(e.dir.dist, "types");
6879
- await z(i);
6806
+ await Q(i);
6880
6807
  const n = `/// <reference types="../index.d.ts" />
6881
6808
  ${t.replaceAll("./", "../")}`, s = Object.entries({
6882
- react: Yl(e.apiJsonComponents),
6883
- preact: Ql(e.apiJsonComponents),
6884
- stencil: td(e.apiJsonComponents),
6885
- lumina: Vl(e.apiJsonComponents)
6809
+ react: Ql(e.apiJsonComponents),
6810
+ preact: Vl(e.apiJsonComponents),
6811
+ stencil: Yl(e.apiJsonComponents),
6812
+ lumina: ql(e.apiJsonComponents)
6886
6813
  }).map(
6887
- async ([r, a]) => await F(u.join(i, `${r}.d.ts`), `${n}
6814
+ async ([r, a]) => await D(u.join(i, `${r}.d.ts`), `${n}
6888
6815
  ${a}`)
6889
6816
  );
6890
- s.push(F(u.join(i, "components.d.ts"), 'export * from "./stencil";')), await Promise.all(s);
6817
+ s.push(D(u.join(i, "components.d.ts"), 'export * from "./stencil";')), await Promise.all(s);
6891
6818
  }
6892
6819
  };
6893
6820
  }
6894
- function cd(e) {
6821
+ function od(e) {
6895
6822
  return {
6896
6823
  name: "@arcgis/lumina:buildWrappers",
6897
6824
  apply: () => e.viteCommand === "build" && !!e.options.build?.wrappers?.length,
6898
6825
  async writeBundle() {
6899
6826
  e.isInStorybook || await Promise.all(
6900
6827
  e.options.build?.wrappers?.map(async (t) => {
6901
- t.type === "react18" && await pd(e, t);
6828
+ t.type === "react18" && await ld(e, t);
6902
6829
  }) ?? []
6903
6830
  );
6904
6831
  }
6905
6832
  };
6906
6833
  }
6907
- const ld = "react", ji = "@lit/react", dd = `
6908
- import React from "${ld}";
6909
- import { createComponent } from "${ji}";
6910
- 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}";
6911
6838
  import { makeReactWrapperFactory, getReactWrapperOptions } from "@arcgis/lumina";
6912
6839
 
6913
6840
  const createWrapper = /*@__PURE__*/ makeReactWrapperFactory(React, createComponent) as typeof createComponent;
6914
6841
  `;
6915
- async function pd(e, t) {
6916
- const { name: i } = N(), n = [];
6842
+ async function ld(e, t) {
6843
+ const { name: i } = J(), n = [];
6917
6844
  for (const a of e.apiJson.modules)
6918
6845
  for (const c of a.declarations)
6919
- "customElement" in c && n.push(ud(c));
6920
- const s = [`/// <reference types="${i}" preserve="true" />`, dd, ...n].join(""), r = u.resolve(t.proxiesFile);
6921
- await z(u.dirname(r), { recursive: !0 }), await F(r, s);
6846
+ "customElement" in c && n.push(dd(c));
6847
+ const s = [`/// <reference types="${i}" preserve="true" />`, cd, ...n].join(""), r = u.resolve(t.proxiesFile);
6848
+ await Q(u.dirname(r), { recursive: !0 }), await D(r, s);
6922
6849
  }
6923
- function ud(e) {
6850
+ function dd(e) {
6924
6851
  const t = e.events?.map(
6925
6852
  (i) => ` ${Ee(`on${ws(i.name)}`)}: "${i.name}" as EventName<HTML${e.pascalCaseName}Element["${i.name}"]>,`
6926
6853
  ).join(`
@@ -6936,48 +6863,45 @@ ${t}
6936
6863
  );
6937
6864
  `;
6938
6865
  }
6939
- function Pd(e = {}) {
6866
+ function Cd(e = {}) {
6940
6867
  const t = new P(e), i = [
6941
6868
  t._plugin,
6942
- il(t),
6943
- nl(t),
6944
- El(t),
6945
- xr(t),
6946
- _c(t),
6947
- ad(t),
6948
- Gl(t),
6949
- vc(t),
6950
- ho(t),
6951
- Gc(t),
6952
- Tl(t),
6869
+ el(t),
6870
+ tl(t),
6953
6871
  bl(t),
6954
- ll(t),
6955
- Ms(t),
6956
- Ec(t),
6957
- // Deprecated feature will be dropped in https://devtopia.esri.com/WebGIS/arcgis-web-components/issues/2765
6958
- // eslint-disable-next-line @typescript-eslint/no-deprecated
6959
- Xc(t),
6960
- cd(t),
6961
- Qc(t)
6962
- ].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);
6963
6887
  return i.context = t, i;
6964
6888
  }
6965
- const xd = {
6966
- initializeComponentDependencies: yn,
6967
- updateLuminaTs: ss,
6889
+ const $d = {
6890
+ initializeComponentDependencies: fn,
6891
+ updateLuminaTs: ns,
6968
6892
  propertyToAttributeMappings: B,
6969
- findDeclaredComponents: Hi,
6970
- nativeEvents: Zi,
6893
+ findDeclaredComponents: _i,
6894
+ nativeEvents: Qi,
6971
6895
  svgElements: Ct,
6972
6896
  mathMlElements: $t,
6973
- alwaysAttributes: Vi,
6974
- nativeAlwaysAttributes: Xi,
6975
- htmlAlwaysAttributes: yt,
6897
+ alwaysAttributes: Gi,
6898
+ nativeAlwaysAttributes: Vi,
6899
+ htmlAlwaysAttributes: gt,
6976
6900
  isPropertyEscapeNeeded: Ve
6977
6901
  };
6978
6902
  export {
6979
6903
  Je as LuminaApiExtractor,
6980
- xd as exportsForCodemod,
6904
+ $d as exportsForCodemod,
6981
6905
  qe as inferCdnUrl,
6982
- Pd as useLumina
6906
+ Cd as useLumina
6983
6907
  };