@arcgis/lumina-compiler 5.2.0-next.109 → 5.2.0-next.110

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +731 -730
  2. package/package.json +5 -5
package/dist/index.js CHANGED
@@ -14,18 +14,19 @@ import Ms from "mime-types";
14
14
  import { forEachWithConcurrency as Js } from "@arcgis/toolkit/promise";
15
15
  import { glob as Bs } from "tinyglobby";
16
16
  import { renameComponentFolder as Ge } from "@arcgis/api-extractor/extractor/webComponent/pathMapping";
17
- import { useApiExtractor as _s } from "@arcgis/api-extractor/vite/plugin";
17
+ import { getSystemVersion as _s } from "@arcgis/node-toolkit/workspace";
18
+ import { useApiExtractor as Ks } from "@arcgis/api-extractor/vite/plugin";
18
19
  import { writeFileSync as ni } from "node:fs";
19
- import { styleText as Ks } from "node:util";
20
- import { unsafeGetUndocumentedPrinter as Ws, unsafeUndocumentedTs as Ct } from "@arcgis/api-extractor/utils/internalTypeScriptApis";
20
+ import { styleText as Ws } from "node:util";
21
+ import { unsafeGetUndocumentedPrinter as Us, unsafeUndocumentedTs as Ct } from "@arcgis/api-extractor/utils/internalTypeScriptApis";
21
22
  import { pathIsComponentEntrypoint as Pe } from "@arcgis/api-extractor/extractor/webComponent/findComponents";
22
- import { loadApiExtractorConfig as Us, mergeApiExtractorConfigs as Et } from "@arcgis/api-extractor/extractor/config";
23
- import { loadTypeScriptConfig as zs } from "@arcgis/node-toolkit/vite/typeScript";
23
+ import { loadApiExtractorConfig as zs, mergeApiExtractorConfigs as Et } from "@arcgis/api-extractor/extractor/config";
24
+ import { loadTypeScriptConfig as Hs } from "@arcgis/node-toolkit/vite/typeScript";
24
25
  import { mappedFind as Xe } from "@arcgis/toolkit/array";
25
- import { isPropertyEscapeNeeded as oi, maybeEscapePropertyName as Hs } from "@arcgis/api-extractor/utils/partPrinter";
26
- import { getPackageNameFromExternalSpecifier as qs, getMemberName as ai } from "@arcgis/api-extractor/utils/astHelpers";
26
+ import { isPropertyEscapeNeeded as oi, maybeEscapePropertyName as qs } from "@arcgis/api-extractor/utils/partPrinter";
27
+ import { getPackageNameFromExternalSpecifier as Vs, getMemberName as ai } from "@arcgis/api-extractor/utils/astHelpers";
27
28
  import { identity as ci } from "@arcgis/toolkit/function";
28
- function Vs(e) {
29
+ function Gs(e) {
29
30
  const t = e.options?.build?.dependencies ?? {}, i = vs({
30
31
  bundleIn: t.bundleIn,
31
32
  externalize: [
@@ -42,7 +43,7 @@ function Vs(e) {
42
43
  e.isInStorybook && (i.resolveId = void 0);
43
44
  }, i;
44
45
  }
45
- const Gs = "Fragment", Be = "DynamicHtmlTag", _e = "DynamicSvgTag", ke = /* @__PURE__ */ Symbol("dynamic html tag name"), Ye = /* @__PURE__ */ Symbol("dynamic svg tag name"), li = /* @__PURE__ */ new Set([
46
+ const Xs = "Fragment", Be = "DynamicHtmlTag", _e = "DynamicSvgTag", ke = /* @__PURE__ */ Symbol("dynamic html tag name"), Ye = /* @__PURE__ */ Symbol("dynamic svg tag name"), li = /* @__PURE__ */ new Set([
46
47
  /**
47
48
  * There is a "className" property. However, in JSX typings we use "class"
48
49
  * instead to keep name shorter and to match Stencil's name. Thus, it should
@@ -1023,7 +1024,7 @@ const Tt = /* @__PURE__ */ new Set(["itemScope"]), ui = /* @__PURE__ */ new Set(
1023
1024
  "volumeChange",
1024
1025
  "waiting",
1025
1026
  "wheel"
1026
- ]), Xs = /* @__PURE__ */ new Set([
1027
+ ]), Ys = /* @__PURE__ */ new Set([
1027
1028
  "area",
1028
1029
  "base",
1029
1030
  "br",
@@ -1099,7 +1100,7 @@ const Tt = /* @__PURE__ */ new Set(["itemScope"]), ui = /* @__PURE__ */ new Set(
1099
1100
  "tspan",
1100
1101
  "use",
1101
1102
  "view"
1102
- ]), Ys = /* @__PURE__ */ new Set(["title", "svg", "a", "script", "style"]), ct = /* @__PURE__ */ new Set([
1103
+ ]), Qs = /* @__PURE__ */ new Set(["title", "svg", "a", "script", "style"]), ct = /* @__PURE__ */ new Set([
1103
1104
  "annotation-xml",
1104
1105
  "annotation",
1105
1106
  "maction",
@@ -1131,7 +1132,7 @@ const Tt = /* @__PURE__ */ new Set(["itemScope"]), ui = /* @__PURE__ */ new Set(
1131
1132
  "munder",
1132
1133
  "munderover",
1133
1134
  "semantics"
1134
- ]), Qs = /* @__PURE__ */ new Set([
1135
+ ]), Zs = /* @__PURE__ */ new Set([
1135
1136
  "annotation-xml",
1136
1137
  "color-profile",
1137
1138
  "font-face",
@@ -1141,7 +1142,7 @@ const Tt = /* @__PURE__ */ new Set(["itemScope"]), ui = /* @__PURE__ */ new Set(
1141
1142
  "font-face-name",
1142
1143
  "missing-glyph"
1143
1144
  ]);
1144
- function Zs(e) {
1145
+ function er(e) {
1145
1146
  if (e.length === 0)
1146
1147
  return "";
1147
1148
  const t = e[0];
@@ -1149,25 +1150,25 @@ function Zs(e) {
1149
1150
  `)) {
1150
1151
  const n = t === `
1151
1152
  `, r = e.lastIndexOf(`
1152
- `), l = e.slice(r + 1).trim().length === 0, d = n ? e.trimStart() : e;
1153
- return l ? d.trimEnd() : d;
1153
+ `), c = e.slice(r + 1).trim().length === 0, d = n ? e.trimStart() : e;
1154
+ return c ? d.trimEnd() : d;
1154
1155
  }
1155
1156
  return e.trim().length === 0 ? t : e;
1156
1157
  }
1157
- const er = (e) => e.replaceAll("\\", "\\\\").replace(tr, "\\${").replaceAll("`", "\\`"), tr = /\$\{/gu, ir = (e) => !sr.test(e), sr = /^[^\s"'=<>`]+$/u, rr = /[&<>]/gu, nr = {
1158
+ const tr = (e) => e.replaceAll("\\", "\\\\").replace(ir, "\\${").replaceAll("`", "\\`"), ir = /\$\{/gu, sr = (e) => !rr.test(e), rr = /^[^\s"'=<>`]+$/u, nr = /[&<>]/gu, or = {
1158
1159
  "&": "&amp;",
1159
1160
  "<": "&lt;",
1160
1161
  ">": "&gt;"
1161
- }, mi = (e) => e.replace(rr, (t) => nr[t]), lt = (e) => typeof e == "string" && e.includes("-") && !Qs.has(e), or = ["keyed", "ref", "repeat", "live"], oe = "staticHtml", Y = "staticSvg", ae = "html", ie = "svg", fi = /* @__PURE__ */ Symbol("maybe HTML namespace or maybe SVG"), gi = "css", hi = "mathml", yi = [gi, ae, hi, oe, Y, ie], ar = new Set(yi), cr = ["safeClassMap", "safeStyleMap", "deferLoad", "stabilizedRef"], lr = "nothing", dr = [...or, ...yi, ...cr, lr], pr = (e) => o.isArrayLiteralExpression(e) && e.elements.every((t) => fe(t)), fe = (e) => o.isJsxElement(e) || o.isJsxSelfClosingElement(e) || o.isJsxFragment(e), se = {
1162
- [ae]: ["lit", "lit/html.js", "lit-html"],
1162
+ }, mi = (e) => e.replace(nr, (t) => or[t]), lt = (e) => typeof e == "string" && e.includes("-") && !Zs.has(e), ar = ["keyed", "ref", "repeat", "live"], ae = "staticHtml", Y = "staticSvg", ce = "html", se = "svg", fi = /* @__PURE__ */ Symbol("maybe HTML namespace or maybe SVG"), gi = "css", hi = "mathml", yi = [gi, ce, hi, ae, Y, se], cr = new Set(yi), lr = ["safeClassMap", "safeStyleMap", "deferLoad", "stabilizedRef"], dr = "nothing", pr = [...ar, ...yi, ...lr, dr], ur = (e) => o.isArrayLiteralExpression(e) && e.elements.every((t) => fe(t)), fe = (e) => o.isJsxElement(e) || o.isJsxSelfClosingElement(e) || o.isJsxFragment(e), re = {
1163
+ [ce]: ["lit", "lit/html.js", "lit-html"],
1163
1164
  /**
1164
1165
  * Sadly, Lit called these "html" and "svg", rather than "staticHtml" and
1165
1166
  * "staticSvg", leading to collision. We have to import them "as", as well as
1166
1167
  * check for existing "html" and "svg" imports from these locations to prevent
1167
1168
  * collisions.
1168
1169
  */
1169
- [oe]: ["lit/static-html.js", "lit-html/static.js"],
1170
- [ie]: ["lit", "lit-html", "lit/html.js"],
1170
+ [ae]: ["lit/static-html.js", "lit-html/static.js"],
1171
+ [se]: ["lit", "lit-html", "lit/html.js"],
1171
1172
  [Y]: ["lit/static-html.js", "lit-html/static.js"],
1172
1173
  [hi]: ["lit", "lit-html", "lit/html.js"],
1173
1174
  [gi]: ["lit", "@lit/reactive-element/css-tag.js", "@lit/reactive-element"],
@@ -1180,7 +1181,7 @@ const er = (e) => e.replaceAll("\\", "\\\\").replace(tr, "\\${").replaceAll("`",
1180
1181
  repeat: ["lit/directives/repeat.js", "lit-html/directives/repeat.js"],
1181
1182
  ref: ["lit/directives/ref.js", "lit-html/directives/ref.js"],
1182
1183
  nothing: ["lit", "@arcgis/lumina", "lit/html.js", "lit-html", "lit-element/lit-element.js"]
1183
- }, ur = /* @__PURE__ */ new Set([
1184
+ }, mr = /* @__PURE__ */ new Set([
1184
1185
  "h",
1185
1186
  "Fragment",
1186
1187
  "state",
@@ -1190,15 +1191,15 @@ const er = (e) => e.replaceAll("\\", "\\\\").replace(tr, "\\${").replaceAll("`",
1190
1191
  "bindProperty",
1191
1192
  "bindEvent",
1192
1193
  "bindAttribute"
1193
- ]), mr = /\.(?:css|s[ac]ss|less|styl(?:us)?|postcss|pcss|sss)(\\?|$)/u, le = "@arcgis/lumina:loadLitCss", Ie = "?litCss", Q = "?layeredLitCss", Ze = "?globalFileLitCss", fr = (e) => ({
1194
- name: le,
1194
+ ]), fr = /\.(?:css|s[ac]ss|less|styl(?:us)?|postcss|pcss|sss)(\\?|$)/u, de = "@arcgis/lumina:loadLitCss", Ie = "?litCss", Q = "?layeredLitCss", Ze = "?globalFileLitCss", gr = (e) => ({
1195
+ name: de,
1195
1196
  enforce: "pre",
1196
1197
  configResolved(t) {
1197
1198
  const i = t.plugins.find(({ name: r }) => r === "vite:css-post");
1198
1199
  if (i === void 0)
1199
1200
  throw Error(
1200
1201
  b(
1201
- le,
1202
+ de,
1202
1203
  "Unable to find the vite's built-in vite:css-post plugin. This may indicate you are trying to use Lumina with a different Vite version than it was designed for. Use `[p]npm list vite`/`yarn why vite` to check the Vite version you are using."
1203
1204
  )
1204
1205
  );
@@ -1206,7 +1207,7 @@ const er = (e) => e.replaceAll("\\", "\\\\").replace(tr, "\\${").replaceAll("`",
1206
1207
  if (typeof s != "object" || typeof s.handler != "function")
1207
1208
  throw Error(
1208
1209
  b(
1209
- le,
1210
+ de,
1210
1211
  "Expected vite:css-post to declare a transform:{handler()} property. This may indicate you are trying to use Vite 6 with Lumina version that is designed for Vite 7. Use `[p]npm list vite`/`yarn why vite` to check the Vite version you are using."
1211
1212
  )
1212
1213
  );
@@ -1214,7 +1215,7 @@ const er = (e) => e.replaceAll("\\", "\\\\").replace(tr, "\\${").replaceAll("`",
1214
1215
  if (n.length !== 1)
1215
1216
  throw Error(
1216
1217
  b(
1217
- le,
1218
+ de,
1218
1219
  `Expected vite:css-post's transform handler to have only a single property: handler. Found: ${n.join(",")}. This may indicate you are trying to use Lumina with a different Vite version than it was designed for. Use \`[p]npm list vite\`/\`yarn why vite\` to check the Vite version you are using.`
1219
1220
  )
1220
1221
  );
@@ -1222,22 +1223,22 @@ const er = (e) => e.replaceAll("\\", "\\\\").replace(tr, "\\${").replaceAll("`",
1222
1223
  ...s,
1223
1224
  // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
1224
1225
  async handler(r, a) {
1225
- const l = a.endsWith(Ie);
1226
- l && (a = a.slice(0, -Ie.length));
1226
+ const c = a.endsWith(Ie);
1227
+ c && (a = a.slice(0, -Ie.length));
1227
1228
  const d = a.endsWith(Q);
1228
1229
  d && (a = a.slice(0, -Q.length));
1229
- const c = a.endsWith(Ze);
1230
- if (c && (a = a.slice(0, -Ze.length)), !l && !d && !c)
1230
+ const l = a.endsWith(Ze);
1231
+ if (l && (a = a.slice(0, -Ze.length)), !c && !d && !l)
1231
1232
  return await s.handler.call(this, r, a);
1232
1233
  const p = `${a}?inline`, m = await s.handler.call(this, r, p), { code: f, ...g } = typeof m == "string" ? { code: m } : m ?? {};
1233
- return typeof f != "string" || !f.startsWith(vi) || !f.endsWith(gr) ? (T.warn(
1234
- le,
1234
+ return typeof f != "string" || !f.startsWith(vi) || !f.endsWith(hr) ? (T.warn(
1235
+ de,
1235
1236
  `Expected vite:css-post to return a JS module with a string literal. Received: ${JSON.stringify(
1236
1237
  f
1237
1238
  )}`
1238
- ), m) : c ? (e._globalCssString = bi(f), { code: "", map: { mappings: "" } }) : {
1239
+ ), m) : l ? (e._globalCssString = bi(f), { code: "", map: { mappings: "" } }) : {
1239
1240
  ...g,
1240
- code: br(f, e.hmrEnabled, e.shouldMinify, d),
1241
+ code: wr(f, e.hmrEnabled, e.shouldMinify, d),
1241
1242
  /**
1242
1243
  * Vite's original transform does not generate source maps for inlined
1243
1244
  * css, thus we can't either
@@ -1247,8 +1248,8 @@ const er = (e) => e.replaceAll("\\", "\\\\").replace(tr, "\\${").replaceAll("`",
1247
1248
  }
1248
1249
  };
1249
1250
  }
1250
- }), vi = 'export default "', gr = '"', hr = `import { css } from '${se.css[0]}';
1251
- export const styles = css\``, yr = "`;\nexport default styles;", vr = `
1251
+ }), vi = 'export default "', hr = '"', yr = `import { css } from '${re.css[0]}';
1252
+ export const styles = css\``, vr = "`;\nexport default styles;", br = `
1252
1253
 
1253
1254
  if(import.meta.hot) {
1254
1255
  import.meta.hot.data.styles ??= styles;
@@ -1260,23 +1261,23 @@ if(import.meta.hot) {
1260
1261
  import.meta.hot.data.styles.styleSheet.replaceSync(nextExports.styles.cssText);
1261
1262
  });
1262
1263
  }`, bi = (e) => e.slice(vi.length - 1);
1263
- function br(e, t, i, s) {
1264
- const n = bi(e), r = JSON.parse(n), a = er(r), l = s ? `@layer{${i ? "" : `
1264
+ function wr(e, t, i, s) {
1265
+ const n = bi(e), r = JSON.parse(n), a = tr(r), c = s ? `@layer{${i ? "" : `
1265
1266
  `}${a}${i ? "" : `
1266
1267
  `}}` : a;
1267
- return `${hr}${l}${yr}${t ? vr : ""}`;
1268
+ return `${yr}${c}${vr}${t ? br : ""}`;
1268
1269
  }
1269
- function wr(e) {
1270
- return `import("${Sr}").then(({ setCustomElementsManifest }) => {
1271
- setCustomElementsManifest(${Cr(e)});
1270
+ function Sr(e) {
1271
+ return `import("${Cr}").then(({ setCustomElementsManifest }) => {
1272
+ setCustomElementsManifest(${Er(e)});
1272
1273
  });`;
1273
1274
  }
1274
- const Sr = "@storybook/web-components-vite", Cr = (e) => `JSON.parse(\`${Er(JSON.stringify(JSON.stringify(e)).slice(1, -1))}\`)`;
1275
- function Er(e) {
1275
+ const Cr = "@storybook/web-components-vite", Er = (e) => `JSON.parse(\`${Tr(JSON.stringify(JSON.stringify(e)).slice(1, -1))}\`)`;
1276
+ function Tr(e) {
1276
1277
  return e.replaceAll('\\"', '"').replaceAll("`", "\\`").replaceAll("${", "\\${");
1277
1278
  }
1278
- function Tr(e) {
1279
- $r(e);
1279
+ function $r(e) {
1280
+ Pr(e);
1280
1281
  const t = e.options.css?.globalStylesPath;
1281
1282
  if (t === void 0)
1282
1283
  return "";
@@ -1289,7 +1290,7 @@ function Tr(e) {
1289
1290
  `) : `import "${i}${Ze}";`;
1290
1291
  }
1291
1292
  const wi = "hydrated";
1292
- function $r(e) {
1293
+ function Pr(e) {
1293
1294
  e._globalHydratedCssString = [
1294
1295
  ":not([",
1295
1296
  e.options.css?.hydratedAttribute ?? wi,
@@ -1306,40 +1307,40 @@ function Si(e, t) {
1306
1307
  ].join(`
1307
1308
  `);
1308
1309
  }
1309
- const Pr = (e) => `@layer{${e.shouldMinify ? "" : `
1310
+ const kr = (e) => `@layer{${e.shouldMinify ? "" : `
1310
1311
  `}${e._globalHydratedCssString}${e.shouldMinify ? "" : `
1311
1312
 
1312
1313
  `}${e._globalCssString ? JSON.parse(e._globalCssString) : ""}${e.shouldMinify ? "" : `
1313
1314
  `}}`;
1314
- function kr(e) {
1315
+ function Ir(e) {
1315
1316
  const t = [], i = [];
1316
1317
  for (const s of e.privateApiJson.modules)
1317
1318
  for (const n of s.declarations)
1318
- n.customElement === !0 && (i.push(Ir(n, e, s.sourcePath)), t.push(s.sourcePath));
1319
+ n.customElement === !0 && (i.push(xr(n, e, s.sourcePath)), t.push(s.sourcePath));
1319
1320
  return [
1320
1321
  'import { runtime } from "./runtime.ts";',
1321
1322
  'import { makeDefineCustomElements } from "@arcgis/lumina";',
1322
- Tr(e),
1323
- e.hmrEnabled ? Ar : "",
1323
+ $r(e),
1324
+ e.hmrEnabled ? Lr : "",
1324
1325
  "",
1325
- e.isInStorybook ? wr(e.apiJson) : "",
1326
+ e.isInStorybook ? Sr(e.apiJson) : "",
1326
1327
  "",
1327
1328
  "export const defineCustomElements = makeDefineCustomElements(runtime, {",
1328
1329
  i.join(`,
1329
1330
  `),
1330
1331
  "});",
1331
- e.hmrEnabled ? Lr(t) : ""
1332
+ e.hmrEnabled ? Nr(t) : ""
1332
1333
  ].join(`
1333
1334
  `);
1334
1335
  }
1335
- const Ir = (e, t, i) => [
1336
+ const xr = (e, t, i) => [
1336
1337
  ` "${e.tagName}": [`,
1337
1338
  `()=>import("${u.join(t.dir.root, i)}"),`,
1338
- xr(e),
1339
+ Ar(e),
1339
1340
  "]"
1340
1341
  ].join("");
1341
- function xr(e) {
1342
- const { properties: t, asyncMethods: i, syncMethods: s, formAssociated: n } = Ci(e), r = t.map((g) => g.join(Ss)).join(Je), a = i.join(Je), l = s.join(Je), d = [r, a, l], c = d.findLastIndex((g) => g.length > 0), p = d.slice(0, c + 1);
1342
+ function Ar(e) {
1343
+ const { properties: t, asyncMethods: i, syncMethods: s, formAssociated: n } = Ci(e), r = t.map((g) => g.join(Ss)).join(Je), a = i.join(Je), c = s.join(Je), d = [r, a, c], l = d.findLastIndex((g) => g.length > 0), p = d.slice(0, l + 1);
1343
1344
  return `${p.length > 0 || n ? `"${p.join(Cs)}"` : ""}${n ? ",1" : ""}`;
1344
1345
  }
1345
1346
  function Ci(e) {
@@ -1347,30 +1348,30 @@ function Ci(e) {
1347
1348
  for (let r = 0; r < e.members.length; ++r) {
1348
1349
  const a = e.members[r];
1349
1350
  if (a.kind === "field") {
1350
- const l = typeof a.attribute == "string", d = l && a.attribute !== ei(a.name);
1351
+ const c = typeof a.attribute == "string", d = c && a.attribute !== ei(a.name);
1351
1352
  t.push(
1352
- l && !d ? [a.name] : [a.name, d ? String(a.attribute) : ""]
1353
+ c && !d ? [a.name] : [a.name, d ? String(a.attribute) : ""]
1353
1354
  );
1354
1355
  } else a.kind === "method" && a.name !== "componentOnReady" && (As(a) ? i.push(a.name) : s.push(a.name));
1355
1356
  }
1356
1357
  const n = e.formAssociated === !0;
1357
1358
  return { tagName: e.tagName, properties: t, asyncMethods: i, syncMethods: s, formAssociated: n };
1358
1359
  }
1359
- const Ar = `import { handleHmrUpdate, handleComponentMetaUpdate } from "@arcgis/lumina/hmrSupport";
1360
- `, Lr = (e) => `
1360
+ const Lr = `import { handleHmrUpdate, handleComponentMetaUpdate } from "@arcgis/lumina/hmrSupport";
1361
+ `, Nr = (e) => `
1361
1362
  if(import.meta.hot) {
1362
1363
  import.meta.hot.on("component-meta-update", handleComponentMetaUpdate);
1363
1364
  import.meta.hot.accept([
1364
1365
  ${e.map((t) => ` "/${t}",`).join(`
1365
1366
  `)}
1366
1367
  ], handleHmrUpdate);
1367
- }`, Nr = "@arcgis/lumina-compiler", Ei = {
1368
- name: Nr
1368
+ }`, jr = "@arcgis/lumina-compiler", Ei = {
1369
+ name: jr
1369
1370
  };
1370
1371
  async function Ti(e, t) {
1371
- return re ??= Fr(e, t), await re;
1372
+ return ne ??= Rr(e, t), await ne;
1372
1373
  }
1373
- function jr() {
1374
+ function Fr() {
1374
1375
  if (xe === void 0)
1375
1376
  throw Error(
1376
1377
  b(
@@ -1390,17 +1391,17 @@ function $i() {
1390
1391
  );
1391
1392
  return et;
1392
1393
  }
1393
- async function Fr(e, t) {
1394
+ async function Rr(e, t) {
1394
1395
  const i = j(e), s = i.dependencies ?? {}, n = i.peerDependencies ?? {}, a = (await Promise.all(
1395
- [...Object.keys(s), ...Object.keys(n)].filter((c) => !Rr.has(c)).flatMap(async (c) => await Pi(c, e))
1396
+ [...Object.keys(s), ...Object.keys(n)].filter((l) => !Dr.has(l)).flatMap(async (l) => await Pi(l, e))
1396
1397
  )).filter(R);
1397
- xe ??= a, et = Object.fromEntries(a.flatMap((c) => Object.entries(c.components)));
1398
- const l = t?.serve?.extraDependencies?.map(
1399
- (c) => typeof c == "string" ? c : c.name
1400
- ), d = l === void 0 ? a : a.filter((c) => !l.includes(c.packageName));
1398
+ xe ??= a, et = Object.fromEntries(a.flatMap((l) => Object.entries(l.components)));
1399
+ const c = t?.serve?.extraDependencies?.map(
1400
+ (l) => typeof l == "string" ? l : l.name
1401
+ ), d = c === void 0 ? a : a.filter((l) => !c.includes(l.packageName));
1401
1402
  return xe ??= d, d;
1402
1403
  }
1403
- const Rr = /* @__PURE__ */ new Set([
1404
+ const Dr = /* @__PURE__ */ new Set([
1404
1405
  "@arcgis/arcade-languageservice",
1405
1406
  "@arcgis/node-toolkit",
1406
1407
  "@arcgis/toolkit",
@@ -1439,22 +1440,22 @@ const Rr = /* @__PURE__ */ new Set([
1439
1440
  "vscode-languageserver-textdocument",
1440
1441
  "vscode-languageserver-types"
1441
1442
  ]);
1442
- let xe, et, re;
1443
+ let xe, et, ne;
1443
1444
  async function Pi(e, t) {
1444
- const i = await $e(e, t), s = await ri(i), n = "exports" in s, r = Hr.bind(void 0, n), a = "@stencil/core" in (s.dependencies ?? {}) || "@stencil/core" in (s.devDependencies ?? {}), l = u.join(i, "dist/esm/loader.js");
1445
- if (a ? await _(l) : !1) {
1446
- const g = await z(l, "utf8"), h = Dr(g, "bootstrapLazy("), y = g.indexOf(", options", h), v = g.slice(h, y), w = v.startsWith('JSON.parse("') ? v.slice(12, -2).replaceAll('\\"', '"') : v;
1445
+ const i = await $e(e, t), s = await ri(i), n = "exports" in s, r = qr.bind(void 0, n), a = "@stencil/core" in (s.dependencies ?? {}) || "@stencil/core" in (s.devDependencies ?? {}), c = u.join(i, "dist/esm/loader.js");
1446
+ if (a ? await _(c) : !1) {
1447
+ const g = await z(c, "utf8"), h = Or(g, "bootstrapLazy("), y = g.indexOf(", options", h), v = g.slice(h, y), w = v.startsWith('JSON.parse("') ? v.slice(12, -2).replaceAll('\\"', '"') : v;
1447
1448
  try {
1448
- const C = JSON.parse(w), E = Ur(C, { packageName: e, getImportPath: r });
1449
+ const C = JSON.parse(w), E = zr(C, { packageName: e, getImportPath: r });
1449
1450
  return { packageName: e, type: "stencil", components: E, packageLocation: i, packageJson: s };
1450
1451
  } catch (C) {
1451
1452
  T.warn("@arcgis/lumina", `Failed to parse dist/esm/loader.js for ${e}.
1452
1453
  Error: ${String(C)}`);
1453
1454
  }
1454
1455
  }
1455
- const c = $t(s.customElements);
1456
- if (c != null) {
1457
- const g = u.join(i, c), h = JSON.parse(await z(g, "utf-8")), y = Or(h), v = ki(h, {
1456
+ const l = $t(s.customElements);
1457
+ if (l != null) {
1458
+ const g = u.join(i, l), h = JSON.parse(await z(g, "utf-8")), y = Mr(h), v = ki(h, {
1458
1459
  packageName: e,
1459
1460
  getImportPath: r
1460
1461
  });
@@ -1462,7 +1463,7 @@ Error: ${String(C)}`);
1462
1463
  }
1463
1464
  const p = $t(s["web-types"]);
1464
1465
  if (p != null) {
1465
- const g = u.join(i, p), h = JSON.parse(await z(g, "utf-8")), y = Mr(h, {
1466
+ const g = u.join(i, p), h = JSON.parse(await z(g, "utf-8")), y = Jr(h, {
1466
1467
  packageName: e,
1467
1468
  getImportPath: r
1468
1469
  });
@@ -1470,7 +1471,7 @@ Error: ${String(C)}`);
1470
1471
  }
1471
1472
  const m = u.join(i, "dist/components");
1472
1473
  if (await _(m)) {
1473
- const g = await zr(m, {
1474
+ const g = await Hr(m, {
1474
1475
  packageName: e,
1475
1476
  getImportPath: r
1476
1477
  });
@@ -1478,7 +1479,7 @@ Error: ${String(C)}`);
1478
1479
  }
1479
1480
  }
1480
1481
  const $t = (e) => Array.isArray(e) ? e[0] : e;
1481
- function Dr(e, t) {
1482
+ function Or(e, t) {
1482
1483
  const i = e.indexOf(t);
1483
1484
  return i === -1 ? -1 : i + t.length;
1484
1485
  }
@@ -1493,7 +1494,7 @@ function ki(e, t, i = !1) {
1493
1494
  const d = r.declarations[a];
1494
1495
  if (d.customElement !== !0)
1495
1496
  continue;
1496
- const c = (
1497
+ const l = (
1497
1498
  // New api.json
1498
1499
  "sourcePath" in r ? r.path : (
1499
1500
  // Older api.json
@@ -1501,7 +1502,7 @@ function ki(e, t, i = !1) {
1501
1502
  )
1502
1503
  ), p = d.tagName, m = {
1503
1504
  packageName: t.packageName,
1504
- modulePath: c ?? t.getImportPath(p),
1505
+ modulePath: l ?? t.getImportPath(p),
1505
1506
  propToAttribute: Object.fromEntries(
1506
1507
  (d.attributes ?? []).map((f) => [f.fieldName ?? f.name, f.name])
1507
1508
  ),
@@ -1519,11 +1520,11 @@ function ki(e, t, i = !1) {
1519
1520
  }
1520
1521
  return s;
1521
1522
  }
1522
- const Or = (e) => (
1523
+ const Mr = (e) => (
1523
1524
  // Since 5.0
1524
1525
  e.compiler?.name === "@arcgis/api-extractor" || // Before 5.0
1525
1526
  e.compiler?.name === Ei.name
1526
- ), Mr = (e, t) => Object.fromEntries(
1527
+ ), Jr = (e, t) => Object.fromEntries(
1527
1528
  (e.contributions?.html?.elements ?? e.contributions?.html?.tags)?.map(
1528
1529
  (i) => [
1529
1530
  i.name,
@@ -1534,7 +1535,7 @@ const Or = (e) => (
1534
1535
  }
1535
1536
  ]
1536
1537
  ) ?? []
1537
- ), Jr = 1, Br = 2, _r = 4, Kr = 8, Wr = Jr | Br | _r | Kr, Ur = (e, t) => Object.fromEntries(
1538
+ ), Br = 1, _r = 2, Kr = 4, Wr = 8, Ur = Br | _r | Kr | Wr, zr = (e, t) => Object.fromEntries(
1538
1539
  e.flatMap(
1539
1540
  ([i, s]) => s.map(
1540
1541
  ([n, r, a]) => [
@@ -1543,13 +1544,13 @@ const Or = (e) => (
1543
1544
  packageName: t.packageName,
1544
1545
  modulePath: t.getImportPath(r),
1545
1546
  propToAttribute: Object.fromEntries(
1546
- Object.entries(a ?? {}).filter(([l, [d]]) => d & Wr).map(([l, [d, c = l]]) => [l, c])
1547
+ Object.entries(a ?? {}).filter(([c, [d]]) => d & Ur).map(([c, [d, l = c]]) => [c, l])
1547
1548
  )
1548
1549
  }
1549
1550
  ]
1550
1551
  )
1551
1552
  )
1552
- ), zr = async (e, t) => Object.fromEntries(
1553
+ ), Hr = async (e, t) => Object.fromEntries(
1553
1554
  (await ot(e)).filter((i) => i.endsWith(".d.ts")).map((i) => {
1554
1555
  const s = i.slice(0, -5);
1555
1556
  return [
@@ -1561,29 +1562,33 @@ const Or = (e) => (
1561
1562
  }
1562
1563
  ];
1563
1564
  })
1564
- ), Hr = (e, t) => e ? `components/${t}` : `dist/components/${t}.js`, qr = (e) => e.startsWith("/") ? e : `/${e}`, dt = (e, t) => `${e}@fs${qr(t)}`;
1565
- function Vr(e, t) {
1565
+ ), qr = (e, t) => e ? `components/${t}` : `dist/components/${t}.js`, Vr = (e) => e.startsWith("/") ? e : `/${e}`, dt = (e, t) => `${e}@fs${Vr(t)}`;
1566
+ function Gr(e, t) {
1566
1567
  const i = u.resolve(e), s = u.resolve(i, t.split(/[?#]/u)[0].replace(/^[/\\]+/u, "")), n = u.relative(i, s);
1567
1568
  return n === ".." || n.startsWith(`..${u.sep}`) || u.isAbsolute(n) ? void 0 : s;
1568
1569
  }
1569
- function Ii(e) {
1570
+ const Ii = "packages/core-packages/core/src", Xr = "packages/core-packages/core/output/npm/esm", te = !import.meta.url.includes("node_modules");
1571
+ function xi({ command: e }) {
1572
+ return e === "serve" && process.argv.includes("--local-core");
1573
+ }
1574
+ function Ai(e) {
1570
1575
  const t = e?.apiExtractorPluginConfig.unsafeConfigOverride?.types?.typeScriptConfig?.config.options.target ?? o.ScriptTarget.ESNext, i = o.ScriptTarget[t].toLowerCase();
1571
1576
  return i === "latest" ? "esnext" : i;
1572
1577
  }
1573
1578
  const tt = "@arcgis/lumina:provideAssets";
1574
- function te(e, t, i = pt, s = "max-age=31536000, immutable") {
1579
+ function ie(e, t, i = pt, s = "max-age=31536000, immutable") {
1575
1580
  if (e.viteCommand !== "serve")
1576
1581
  throw Error(b(tt, "serveAssets() is only available when Vite is running in serve mode"));
1577
1582
  const n = e._serverConfigured, r = e.server.middlewares.stack.length;
1578
1583
  if (t.forEach((a) => {
1579
- const l = Ai(a), d = Ni(e.dir, Li(l)), c = Xr(e.viteConfig.base, d, e.dir.distCdn);
1580
- e.server.middlewares.use(c, (p, m, f) => {
1581
- const g = Yr(p.url), h = l.type === "directory" ? Vr(l.source, g) : l.source, y = u.join(d, g), v = i.find((w) => w.match(y, e));
1584
+ const c = Ni(a), d = Fi(e.dir, ji(c)), l = Qr(e.viteConfig.base, d, e.dir.distCdn);
1585
+ e.server.middlewares.use(l, (p, m, f) => {
1586
+ const g = Zr(p.url), h = c.type === "directory" ? Gr(c.source, g) : c.source, y = u.join(d, g), v = i.find((w) => w.match(y, e));
1582
1587
  return h === void 0 ? (m.statusCode = 403, m.end(), !0) : ((typeof h == "function" ? Promise.resolve(h()) : z(h)).then((w) => {
1583
1588
  const C = (typeof h == "function" ? void 0 : v?.transform(w.toString("utf8"), y, e)) ?? w;
1584
1589
  m.setHeader("Cache-Control", s), m.setHeader("Content-Type", Ms.lookup(g) || "application/octet-stream"), m.write(C), m.end();
1585
1590
  }).catch((w) => {
1586
- (l.type !== "directory" || process.env.DEBUG) && T.warn(
1591
+ (c.type !== "directory" || process.env.DEBUG) && T.warn(
1587
1592
  tt,
1588
1593
  `Error occurred when trying to serve a file in response to request for "${p.originalUrl ?? g}":${String(w)}`
1589
1594
  ), f();
@@ -1594,19 +1599,19 @@ function te(e, t, i = pt, s = "max-age=31536000, immutable") {
1594
1599
  e.server.middlewares.stack.splice(0, 0, ...a);
1595
1600
  }
1596
1601
  }
1597
- async function xi(e, t, i = pt) {
1602
+ async function Li(e, t, i = pt) {
1598
1603
  await Promise.all(
1599
1604
  t.map(async (s) => {
1600
- const n = Ai(s), r = Ni(e.dir, Li(n));
1605
+ const n = Ni(s), r = Fi(e.dir, ji(n));
1601
1606
  if (n.type === "directory") {
1602
- const a = u.resolve(n.source), d = (await ot(a, { recursive: !0, withFileTypes: !0 })).filter((c) => c.isFile()).map((c) => {
1603
- const p = u.resolve(c.parentPath, c.name), m = u.relative(a, p), f = u.join(r, m);
1607
+ const a = u.resolve(n.source), d = (await ot(a, { recursive: !0, withFileTypes: !0 })).filter((l) => l.isFile()).map((l) => {
1608
+ const p = u.resolve(l.parentPath, l.name), m = u.relative(a, p), f = u.join(r, m);
1604
1609
  return [p, f];
1605
1610
  });
1606
- await Fi(d.map(([c, p]) => p)), await Js(
1611
+ await Di(d.map(([l, p]) => p)), await Js(
1607
1612
  d,
1608
1613
  16,
1609
- async ([c, p]) => await Pt(c, p, i, e)
1614
+ async ([l, p]) => await Pt(l, p, i, e)
1610
1615
  );
1611
1616
  } else if (n.type === "file")
1612
1617
  await X(u.dirname(r), { recursive: !0 }), await Pt(n.source, r, i, e);
@@ -1618,7 +1623,7 @@ async function xi(e, t, i = pt) {
1618
1623
  })
1619
1624
  );
1620
1625
  }
1621
- const Ai = ti ? (e) => e : (e) => e.type === "dynamic" ? {
1626
+ const Ni = ti ? (e) => e : (e) => e.type === "dynamic" ? {
1622
1627
  ...e,
1623
1628
  destination: G(e.destination)
1624
1629
  } : {
@@ -1635,7 +1640,7 @@ async function Pt(e, t, i, s) {
1635
1640
  await K(t, a);
1636
1641
  }
1637
1642
  }
1638
- function Li(e) {
1643
+ function ji(e) {
1639
1644
  if (e.type === "dynamic")
1640
1645
  return e.destination;
1641
1646
  if (e.source.endsWith(u.sep)) {
@@ -1650,40 +1655,40 @@ function Li(e) {
1650
1655
  }
1651
1656
  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;
1652
1657
  }
1653
- function Ni({ dist: e, distCdnAssets: t }, i) {
1654
- const s = Gr(i), n = u.join(
1658
+ function Fi({ dist: e, distCdnAssets: t }, i) {
1659
+ const s = Yr(i), n = u.join(
1655
1660
  t,
1656
1661
  s ? u.relative(t, i) : i
1657
- ), r = u.relative(e, n), a = ji(r);
1662
+ ), r = u.relative(e, n), a = Ri(r);
1658
1663
  return u.join(e, a);
1659
1664
  }
1660
- function Gr(e) {
1665
+ function Yr(e) {
1661
1666
  if (e.startsWith(u.sep)) {
1662
1667
  const t = ii(), i = t.startsWith(u.sep) ? t.split(u.sep)[1] ?? "" : "";
1663
1668
  return e.startsWith(`/${i}/`) || e.startsWith("/Users/");
1664
1669
  } else
1665
1670
  return !!(!ti && u.isAbsolute(e));
1666
1671
  }
1667
- function Xr(e, t, i) {
1668
- const s = ji(u.relative(i, t)), n = s.startsWith("/") ? s.slice(1) : s;
1672
+ function Qr(e, t, i) {
1673
+ const s = Ri(u.relative(i, t)), n = s.startsWith("/") ? s.slice(1) : s;
1669
1674
  return `${e}${n}`;
1670
1675
  }
1671
- const ji = (e) => e.replaceAll("../", ""), Yr = (e = "") => e.split("?")[0].split("#")[0];
1672
- async function Fi(e) {
1676
+ const Ri = (e) => e.replaceAll("../", ""), Zr = (e = "") => e.split("?")[0].split("#")[0];
1677
+ async function Di(e) {
1673
1678
  const t = new Set(e.map(u.dirname));
1674
1679
  await Promise.all(Array.from(t, async (i) => await X(i, { recursive: !0 })));
1675
1680
  }
1676
- const Qr = {
1681
+ const en = {
1677
1682
  match: (e, t) => t.environment === "production" && e.endsWith(".json"),
1678
1683
  transform: (e) => JSON.stringify(JSON.parse(e))
1679
- }, pt = [Qr], Ae = "@arcgis/core", me = "@arcgis/core/assets", Ke = j(), H = Ae in (Ke.dependencies ?? {}) || Ae in (Ke.peerDependencies ?? {}) || // Does not depend on `@arcgis/core` to avoid cycle, but uses core in Lumina tests
1684
+ }, pt = [en], Ae = "@arcgis/core", me = "@arcgis/core/assets", Ke = j(), H = Ae in (Ke.dependencies ?? {}) || Ae in (Ke.peerDependencies ?? {}) || // Does not depend on `@arcgis/core` to avoid cycle, but uses core in Lumina tests
1680
1685
  Ke.name === "@arcgis/lumina";
1681
- async function Zr(e, t, i, s) {
1686
+ async function tn(e, t, i, s) {
1682
1687
  if (!H)
1683
1688
  return [];
1684
1689
  const n = e._localCdnCore, r = n?.packageLocation ?? await $e(Ae);
1685
1690
  if (i === "cdn") {
1686
- const a = await ri(r), l = De({ name: "", version: a.version }, s);
1691
+ const a = await ri(r), c = De(a, s);
1687
1692
  return [
1688
1693
  // Use the ESM CDN
1689
1694
  // <script src="https://jsdev.arcgis.com/VERSION/"><\/script>
@@ -1694,22 +1699,22 @@ async function Zr(e, t, i, s) {
1694
1699
  },
1695
1700
  children: JSON.stringify({
1696
1701
  imports: {
1697
- "@arcgis/core/": `${l}@arcgis/core/`
1702
+ "@arcgis/core/": `${c}@arcgis/core/`
1698
1703
  }
1699
1704
  })
1700
1705
  },
1701
1706
  // <link rel="stylesheet" id="arcgisCoreStylesheet" href="https://jsdev.arcgis.com/VERSION/esri/themes/light/main.css" />
1702
- Ri(l)
1707
+ Oi(c)
1703
1708
  ];
1704
1709
  } else
1705
- return en(t, r, n?.sourceLocation !== void 0);
1710
+ return sn(t, r, n?.sourceLocation !== void 0);
1706
1711
  }
1707
- function en(e, t, i) {
1712
+ function sn(e, t, i) {
1708
1713
  const s = `${e}${me}`;
1709
1714
  return [
1710
1715
  // Browser tests import this as a Vite CSS module and adopt its stylesheet, so CSS must remain on the /@fs route.
1711
1716
  // Core's prebuilt JavaScript assets use the untransformed route configured below.
1712
- Ri(
1717
+ Oi(
1713
1718
  i ? `${e}${me}/` : dt(e, `${t}/assets/`)
1714
1719
  ),
1715
1720
  {
@@ -1723,7 +1728,7 @@ function en(e, t, i) {
1723
1728
  }
1724
1729
  ];
1725
1730
  }
1726
- async function tn(e) {
1731
+ async function rn(e) {
1727
1732
  const t = e._localCdnCore, i = t?.packageLocation ?? await $e(Ae), s = t?.sourceLocation !== void 0 ? [
1728
1733
  {
1729
1734
  type: "directory",
@@ -1765,34 +1770,34 @@ async function tn(e) {
1765
1770
  ];
1766
1771
  e.server.middlewares.use("/builddate.txt", (n, r) => {
1767
1772
  r.setHeader("Cache-Control", "no-cache"), r.setHeader("Content-Type", "text/plain"), r.end(JSON.stringify({ version: j(i).version }));
1768
- }), te(e, s, [], "no-cache");
1773
+ }), ie(e, s, [], "no-cache");
1769
1774
  }
1770
- const Ri = (e) => ({
1775
+ const Oi = (e) => ({
1771
1776
  // Not using join() because it would turn https:// into https:/
1772
1777
  cssHref: `${e}esri/themes/light/main.css`,
1773
1778
  // This is used be the theme switcher in `@arcgis/storybook-utils`
1774
1779
  id: "arcgisCoreStylesheet"
1775
1780
  }), ut = "customElement.js";
1776
- function sn(e, t) {
1781
+ function nn(e, t) {
1777
1782
  if (!t.startsWith(e))
1778
1783
  return t;
1779
1784
  const s = t.split(u.sep);
1780
- return s.at(rn) !== s.at(nn) ? t : u.join(s.slice(0, -1).join(u.sep), ut);
1785
+ return s.at(on) !== s.at(an) ? t : u.join(s.slice(0, -1).join(u.sep), ut);
1781
1786
  }
1782
- const rn = -1, nn = -2, on = /["']\.\.?\/[^'"]+/gu, an = (e, t, i, s) => e.replaceAll(on, (n) => {
1787
+ const on = -1, an = -2, cn = /["']\.\.?\/[^'"]+/gu, ln = (e, t, i, s) => e.replaceAll(cn, (n) => {
1783
1788
  const r = n.slice(1);
1784
1789
  if (!r.startsWith("./") && !r.startsWith("../"))
1785
1790
  return n;
1786
- const a = u.join(s, r), l = !r.endsWith(".js") && !r.split("/").at(-1).includes(".") ? sn(t.dir.distComponents, a) : a, d = l.startsWith(t.dir.distComponents) ? t.dir.dist + Ge(l.slice(t.dir.dist.length), t.apiExtractor) : l;
1791
+ const a = u.join(s, r), c = !r.endsWith(".js") && !r.split("/").at(-1).includes(".") ? nn(t.dir.distComponents, a) : a, d = c.startsWith(t.dir.distComponents) ? t.dir.dist + Ge(c.slice(t.dir.dist.length), t.apiExtractor) : c;
1787
1792
  if (i === s && a === d)
1788
1793
  return n;
1789
- const c = he(i, d), p = n.endsWith("/") ? `${c}/` : c;
1794
+ const l = he(i, d), p = n.endsWith("/") ? `${l}/` : l;
1790
1795
  return `${n[0]}${p}`;
1791
1796
  }), he = (e, t) => {
1792
1797
  const i = u.relative(e, t);
1793
1798
  return i.startsWith(".") ? i : `.${u.sep}${i}`;
1794
1799
  };
1795
- async function cn(e, t, i) {
1800
+ async function dn(e, t, i) {
1796
1801
  const s = u.resolve(e.dir.root, t);
1797
1802
  e.viteConfig.build.emptyOutDir !== !1 && await _(s) && await Rs(s, { recursive: !0, force: !0 }), await X(s, { recursive: !0 }), await Ds(e.dir.distCdn, u.join(s, "build"), { recursive: !0 });
1798
1803
  const n = [
@@ -1805,22 +1810,22 @@ async function cn(e, t, i) {
1805
1810
  // Not applicable for our glob pattern
1806
1811
  expandDirectories: !1
1807
1812
  })
1808
- ], r = u.relative(e.dir.root, e.dir.src), a = await ne(e), l = u.join(e.dir.src, "loader.ts"), d = a.map((c) => {
1809
- if ("cssHref" in c)
1810
- return `<link rel="stylesheet" href="${c.cssHref}">`;
1811
- if ("javascriptCode" in c && c.javascriptCode.at(0)?.includes(l) === !0)
1813
+ ], r = u.relative(e.dir.root, e.dir.src), a = await oe(e), c = u.join(e.dir.src, "loader.ts"), d = a.map((l) => {
1814
+ if ("cssHref" in l)
1815
+ return `<link rel="stylesheet" href="${l.cssHref}">`;
1816
+ if ("javascriptCode" in l && l.javascriptCode.at(0)?.includes(c) === !0)
1812
1817
  return "";
1813
- if ("tag" in c) {
1814
- const p = c.children ?? "";
1818
+ if ("tag" in l) {
1819
+ const p = l.children ?? "";
1815
1820
  if (typeof p == "string")
1816
- return `<${c.tag} ${Object.entries(c.attrs ?? {}).map(([m, f]) => `${m}="${f}"`).join(" ")}>${p}</${c.tag}>`;
1821
+ return `<${l.tag} ${Object.entries(l.attrs ?? {}).map(([m, f]) => `${m}="${f}"`).join(" ")}>${p}</${l.tag}>`;
1817
1822
  }
1818
- throw Error(b("@arcgis/lumina:buildWebApp", `Unsupported loader type: ${JSON.stringify(c)}`));
1823
+ throw Error(b("@arcgis/lumina:buildWebApp", `Unsupported loader type: ${JSON.stringify(l)}`));
1819
1824
  }).join(`
1820
1825
  `);
1821
1826
  await Promise.all(
1822
- n.map(async (c, p) => {
1823
- const f = p === 0 ? c : u.join(r, c), g = u.join(e.dir.root, f), h = u.join(s, f);
1827
+ n.map(async (l, p) => {
1828
+ const f = p === 0 ? l : u.join(r, l), g = u.join(e.dir.root, f), h = u.join(s, f);
1824
1829
  await X(u.dirname(h), { recursive: !0 });
1825
1830
  const y = await z(g, "utf-8"), v = he(u.dirname(f), `build/${i}`), w = `${d}<script type="module" src="${v}"><\/script>
1826
1831
  `, C = Math.min(
@@ -1835,7 +1840,7 @@ async function cn(e, t, i) {
1835
1840
  })
1836
1841
  ), await e.options.build?.webApp?.afterBuildEnd?.(e);
1837
1842
  }
1838
- const Di = /* @__PURE__ */ new Set([
1843
+ const Mi = /* @__PURE__ */ new Set([
1839
1844
  "chunks",
1840
1845
  "components",
1841
1846
  "docs",
@@ -1848,13 +1853,13 @@ const Di = /* @__PURE__ */ new Set([
1848
1853
  "collection",
1849
1854
  "extras",
1850
1855
  "support"
1851
- ]), O = "@arcgis/lumina:buildCdn", ce = "cdn", Oi = "index", Z = "main";
1852
- function ln(e) {
1856
+ ]), O = "@arcgis/lumina:buildCdn", le = "cdn", Ji = "index", Z = "main";
1857
+ function pn(e) {
1853
1858
  const { skip: t = !1, namespace: i, esbuildOptions: s = {}, entrypointTransformer: n } = e.options.build?.cdn ?? {}, r = e.options.build?.webApp?.destination, a = i !== void 0;
1854
1859
  if (a) {
1855
1860
  if (i.toLowerCase() !== i)
1856
1861
  throw new Error(`Expected CDN namespace to be all lowercase. Received: ${i}`);
1857
- if (Di.has(i))
1862
+ if (Mi.has(i))
1858
1863
  throw new Error(
1859
1864
  `Namespace name "${i}" is restricted as it collides with a well-known Lumina dist/ folder name or Stencil dist/ folder name.`
1860
1865
  );
@@ -1862,12 +1867,12 @@ function ln(e) {
1862
1867
  'The "namespace" option in the "build.cdn" is deprecated and will be removed in the next major version.'
1863
1868
  );
1864
1869
  }
1865
- const l = i ?? Oi;
1870
+ const c = i ?? Ji;
1866
1871
  if (e.provideAssets([
1867
1872
  {
1868
1873
  type: "dynamic",
1869
- source: () => Pr(e),
1870
- destination: `../${a ? l : Z}.css`
1874
+ source: () => kr(e),
1875
+ destination: `../${a ? c : Z}.css`
1871
1876
  }
1872
1877
  ]), !t)
1873
1878
  return {
@@ -1882,27 +1887,27 @@ function ln(e) {
1882
1887
  );
1883
1888
  return;
1884
1889
  }
1885
- const d = H && j().name !== "@arcgis/embeddable-components", c = Date.now(), p = Array.isArray(s.entryPoints) ? s.entryPoints.map((g) => typeof g == "string" ? { in: g, out: "" } : g) : typeof s.entryPoints == "object" ? Object.entries(s.entryPoints).map(([g, h]) => ({ in: h, out: g })) : [], m = await dn(
1890
+ const d = H && j().name !== "@arcgis/embeddable-components", l = Date.now(), p = Array.isArray(s.entryPoints) ? s.entryPoints.map((g) => typeof g == "string" ? { in: g, out: "" } : g) : typeof s.entryPoints == "object" ? Object.entries(s.entryPoints).map(([g, h]) => ({ in: h, out: g })) : [], m = await un(
1886
1891
  e,
1887
- l,
1892
+ c,
1888
1893
  s,
1889
1894
  p,
1890
1895
  n,
1891
1896
  d
1892
1897
  );
1893
- await pn(
1898
+ await mn(
1894
1899
  m,
1895
1900
  e,
1896
- a ? `${l}.esm` : l,
1901
+ a ? `${c}.esm` : c,
1897
1902
  p,
1898
1903
  d
1899
1904
  );
1900
1905
  const f = Date.now();
1901
- T.info(O, `CDN was built in ${f - c}ms`), r && await cn(e, r, `${a ? `${l}.esm` : l}.js`);
1906
+ T.info(O, `CDN was built in ${f - l}ms`), r && await dn(e, r, `${a ? `${c}.esm` : c}.js`);
1902
1907
  }
1903
1908
  };
1904
1909
  }
1905
- async function dn(e, t, i, s, n, r) {
1910
+ async function un(e, t, i, s, n, r) {
1906
1911
  const a = e.environment;
1907
1912
  if (i.minify && r)
1908
1913
  throw Error(
@@ -1918,14 +1923,14 @@ async function dn(e, t, i, s, n, r) {
1918
1923
  "Source maps in the CDN build are not yet supported - open a feature request with Lumina maintainers if it is needed"
1919
1924
  )
1920
1925
  );
1921
- const l = `import { defineCustomElements } from "./loader";
1926
+ const c = `import { defineCustomElements } from "./loader";
1922
1927
  /**
1923
1928
  * We use import.meta.url to get the path to the current file
1924
1929
  * and pass it to defineCustomElements to set the resources url.
1925
1930
  * The script's file name will be stripped inside defineCustomElements.
1926
1931
  **/
1927
1932
  defineCustomElements({resourcesUrl: import.meta.url});
1928
- ${Si(e._globalCssString, e)}`, d = n?.(l, e) ?? l;
1933
+ ${Si(e._globalCssString, e)}`, d = n?.(c, e) ?? c;
1929
1934
  return await Os({
1930
1935
  bundle: !0,
1931
1936
  minify: r ? !0 : a === "production",
@@ -1951,20 +1956,20 @@ ${Si(e._globalCssString, e)}`, d = n?.(l, e) ?? l;
1951
1956
  chunkNames: "[hash]",
1952
1957
  resolveExtensions: [".js", ".json"],
1953
1958
  banner: { js: e.banner },
1954
- target: Ii(e),
1959
+ target: Ai(e),
1955
1960
  ...i,
1956
1961
  write: !1,
1957
1962
  plugins: [
1958
1963
  {
1959
1964
  name: "@arcgis/lumina:accessorSupport",
1960
- setup(c) {
1961
- c.onResolve(
1965
+ setup(l) {
1966
+ l.onResolve(
1962
1967
  { filter: /^@arcgis\/core\/applications\/Components\/reactiveUtils.js$/ },
1963
1968
  (p) => p.importer.endsWith("runtime.js") ? {
1964
1969
  path: p.path,
1965
1970
  namespace: "@arcgis/lumina:accessorSupport"
1966
1971
  } : void 0
1967
- ), c.onLoad({ filter: /^/, namespace: "@arcgis/lumina:accessorSupport" }, () => ({
1972
+ ), l.onLoad({ filter: /^/, namespace: "@arcgis/lumina:accessorSupport" }, () => ({
1968
1973
  contents: "export const createObservable=undefined, trackAccess=undefined, createTrackingTarget=undefined, runTracked = undefined;",
1969
1974
  loader: "js"
1970
1975
  }));
@@ -1975,18 +1980,18 @@ ${Si(e._globalCssString, e)}`, d = n?.(l, e) ?? l;
1975
1980
  // manual injection further below. Thus drop the CSS import from the
1976
1981
  // chunks/runtime.js file.
1977
1982
  name: "@arcgis/lumina:customGlobalCssInjection",
1978
- setup(c) {
1983
+ setup(l) {
1979
1984
  const p = e.options.build?.cdn?.namespace === void 0 ? (
1980
1985
  // eslint-disable-next-line require-unicode-regexp
1981
- new RegExp(`\\/${ce}\\/${Z}\\.css$`)
1986
+ new RegExp(`\\/${le}\\/${Z}\\.css$`)
1982
1987
  ) : (
1983
1988
  // eslint-disable-next-line require-unicode-regexp
1984
1989
  new RegExp(`\\/${e.options.build.cdn.namespace}\\/${e.options.build.cdn.namespace}\\.css$`)
1985
1990
  );
1986
- c.onResolve({ filter: p }, ({ path: m }) => ({
1991
+ l.onResolve({ filter: p }, ({ path: m }) => ({
1987
1992
  path: m,
1988
1993
  namespace: "build-cdn:global-css"
1989
- })), c.onLoad({ filter: /.*/, namespace: "build-cdn:global-css" }, () => ({
1994
+ })), l.onLoad({ filter: /.*/, namespace: "build-cdn:global-css" }, () => ({
1990
1995
  contents: "",
1991
1996
  loader: "js"
1992
1997
  }));
@@ -2011,10 +2016,10 @@ ${Si(e._globalCssString, e)}`, d = n?.(l, e) ?? l;
2011
2016
  });
2012
2017
  }
2013
2018
  const kt = "stdin.js";
2014
- async function pn(e, t, i, s, n) {
2019
+ async function mn(e, t, i, s, n) {
2015
2020
  const r = t.dir.distCdn, a = `${i}.js`;
2016
- let l;
2017
- n && (l = new Set(s.map((p) => `${p.out}.js`)), l.add(a));
2021
+ let c;
2022
+ n && (c = new Set(s.map((p) => `${p.out}.js`)), c.add(a));
2018
2023
  const d = new Map(
2019
2024
  e.outputFiles.map((p) => {
2020
2025
  const m = {
@@ -2025,13 +2030,13 @@ async function pn(e, t, i, s, n) {
2025
2030
  }, f = G(p.path.slice(r.length));
2026
2031
  if (f === kt) {
2027
2032
  if (n) {
2028
- const h = p.text.match(un)?.[0];
2033
+ const h = p.text.match(fn)?.[0];
2029
2034
  if (h === void 0)
2030
2035
  throw Error(
2031
2036
  `Failed to find the runtime variable name in the CDN entrypoint file. This likely indicates a bug in Lumina. ${kt} contents:
2032
2037
  ${p.text}`
2033
2038
  );
2034
- m.code = `${m.code.trimEnd()}${mn(h, s)}`, m.isAsync = !1;
2039
+ m.code = `${m.code.trimEnd()}${gn(h, s)}`, m.isAsync = !1;
2035
2040
  }
2036
2041
  return [a, m];
2037
2042
  }
@@ -2041,7 +2046,7 @@ ${p.text}`
2041
2046
  n && d.forEach((p, m) => {
2042
2047
  if (p.isAsync === void 0)
2043
2048
  if (m.endsWith(".js")) {
2044
- if (Mi(p, d), l?.has(m) === !0 && p.code.includes(Ji))
2049
+ if (Bi(p, d), c?.has(m) === !0 && p.code.includes(_i))
2045
2050
  throw Error(
2046
2051
  b(
2047
2052
  O,
@@ -2051,18 +2056,18 @@ ${p.text}`
2051
2056
  } else
2052
2057
  p.isAsync = !1;
2053
2058
  }), t.options.build?.cdn?.transformer?.(d, t);
2054
- const c = /* @__PURE__ */ new Map();
2059
+ const l = /* @__PURE__ */ new Map();
2055
2060
  for (const p of d.keys()) {
2056
2061
  const m = p.lastIndexOf("/");
2057
2062
  if (m !== -1) {
2058
2063
  const f = p.slice(0, m);
2059
- c.set(f, X(r + f, { recursive: !0 }));
2064
+ l.set(f, X(r + f, { recursive: !0 }));
2060
2065
  }
2061
2066
  }
2062
- await Promise.all(c.values()), await Promise.all(Array.from(d.entries(), async ([p, { code: m }]) => await K(r + p, m)));
2067
+ await Promise.all(l.values()), await Promise.all(Array.from(d.entries(), async ([p, { code: m }]) => await K(r + p, m)));
2063
2068
  }
2064
- const un = /(?<=;var [a-zA-Z$_]=[a-zA-Z$_]\()[a-zA-Z$_](?=,\{")/u;
2065
- function mn(e, t) {
2069
+ const fn = /(?<=;var [a-zA-Z$_]=[a-zA-Z$_]\()[a-zA-Z$_](?=,\{")/u;
2070
+ function gn(e, t) {
2066
2071
  let i = [
2067
2072
  "window.$arcgis",
2068
2073
  "||",
@@ -2103,25 +2108,25 @@ function mn(e, t) {
2103
2108
  }
2104
2109
  return i += ")", i;
2105
2110
  }
2106
- function Mi(e, t) {
2111
+ function Bi(e, t) {
2107
2112
  if (e.isProcessing) {
2108
2113
  e.isAsync = !0, It(e);
2109
2114
  return;
2110
2115
  }
2111
2116
  e.isProcessing = !0;
2112
2117
  const i = [], s = [], n = [], r = /* @__PURE__ */ new Set(), a = [];
2113
- let l = 0;
2114
- const d = e.code.matchAll(fn);
2118
+ let c = 0;
2119
+ const d = e.code.matchAll(hn);
2115
2120
  for (const S of d) {
2116
2121
  const [A, L, U, F, N] = S, B = N.startsWith(Le);
2117
- if (l !== 0 && l !== S.index) {
2118
- const D = e.code.slice(l, S.index);
2119
- n.push(D), a.push([l, D.length, 0, ""]);
2122
+ if (c !== 0 && c !== S.index) {
2123
+ const D = e.code.slice(c, S.index);
2124
+ n.push(D), a.push([c, D.length, 0, ""]);
2120
2125
  }
2121
- if (l = S.index + A.length, B)
2122
- a.push([S.index, A.length, 0, ""]), s.push(`"${_i(N.slice(Le.length))}"`), i.push(L?.replaceAll(" as ", ":") ?? U ?? F ?? "");
2126
+ if (c = S.index + A.length, B)
2127
+ a.push([S.index, A.length, 0, ""]), s.push(`"${Wi(N.slice(Le.length))}"`), i.push(L?.replaceAll(" as ", ":") ?? U ?? F ?? "");
2123
2128
  else {
2124
- const D = Bi(N, t), M = D?.isAsync === !0;
2129
+ const D = Ki(N, t), M = D?.isAsync === !0;
2125
2130
  if (L !== void 0) {
2126
2131
  const be = [];
2127
2132
  for (const Me of L.slice(1, -1).split(",")) {
@@ -2148,13 +2153,13 @@ ${D.code}`
2148
2153
  }
2149
2154
  }
2150
2155
  e.isProcessing = !1;
2151
- const c = e.isAsync === !0;
2152
- if (e.isAsync = c || a.length > 0, !e.isAsync) {
2156
+ const l = e.isAsync === !0;
2157
+ if (e.isAsync = l || a.length > 0, !e.isAsync) {
2153
2158
  e.code = xt(e.code, t);
2154
2159
  return;
2155
2160
  }
2156
- const p = yn(r);
2157
- let m = e.code.slice(0, l);
2161
+ const p = bn(r);
2162
+ let m = e.code.slice(0, c);
2158
2163
  for (let S = a.length - 1; S >= 0; S--) {
2159
2164
  const [A, L, U, F] = a[S];
2160
2165
  let N = L, B = "";
@@ -2164,22 +2169,22 @@ ${D.code}`
2164
2169
  }
2165
2170
  m = m.slice(0, A) + B + m.slice(A + N);
2166
2171
  }
2167
- const [f, g] = It(e), h = i.findLastIndex((S) => S.length > 0), y = i.slice(0, h + 1).join(","), v = i.length === 0 ? "_" : `([${y}])`, w = `${Ji}${v}=>{`, C = s.join(","), E = `${g}},${C})`;
2168
- let P = e.code.slice(l, f);
2172
+ const [f, g] = It(e), h = i.findLastIndex((S) => S.length > 0), y = i.slice(0, h + 1).join(","), v = i.length === 0 ? "_" : `([${y}])`, w = `${_i}${v}=>{`, C = s.join(","), E = `${g}},${C})`;
2173
+ let P = e.code.slice(c, f);
2169
2174
  P = `${n.join("")}${P}`, P = xt(P, t);
2170
2175
  const x = `${m}${w}${P}${E}`;
2171
2176
  e.code = x;
2172
2177
  }
2173
- const Ji = "export default $arcgis.t(";
2178
+ const _i = "export default $arcgis.t(";
2174
2179
  function It(e) {
2175
- const t = gn.exec(e.code), i = t?.index ?? e.code.length;
2180
+ const t = yn.exec(e.code), i = t?.index ?? e.code.length;
2176
2181
  let s = "";
2177
2182
  if (t !== null) {
2178
2183
  const n = t[1].split(",");
2179
2184
  if (n.length > 1)
2180
2185
  s = `return{${n.map((r) => {
2181
- const [a, l = a] = r.split(" as ");
2182
- return `${l}:${a}`;
2186
+ const [a, c = a] = r.split(" as ");
2187
+ return `${c}:${a}`;
2183
2188
  }).join(",")}}`;
2184
2189
  else {
2185
2190
  const [r, a = r] = n[0].split(" as ");
@@ -2188,51 +2193,51 @@ function It(e) {
2188
2193
  }
2189
2194
  return [i, s];
2190
2195
  }
2191
- const fn = /import(?:(\{[^}]+\})from|\*as ([\w$]+) from| ([\w$]+) from)?"([^"]+)";/gu, gn = /export\{([^}]+)\};\n$/u, Le = "@arcgis/core/";
2192
- function Bi(e, t) {
2196
+ const hn = /import(?:(\{[^}]+\})from|\*as ([\w$]+) from| ([\w$]+) from)?"([^"]+)";/gu, yn = /export\{([^}]+)\};\n$/u, Le = "@arcgis/core/";
2197
+ function Ki(e, t) {
2193
2198
  if (!e.startsWith("./"))
2194
2199
  return;
2195
2200
  const i = e.slice(2), s = t.get(i);
2196
2201
  if (s === void 0)
2197
2202
  throw Error(b(O, `Failed to find the ${e} module`));
2198
- if (s.isAsync === void 0 && Mi(s, t), s.isAsync === void 0)
2203
+ if (s.isAsync === void 0 && Bi(s, t), s.isAsync === void 0)
2199
2204
  throw Error(b(O, `Failed to infer whether the ${e} module has top-level await`));
2200
2205
  return s;
2201
2206
  }
2202
2207
  function xt(e, t) {
2203
- return e.replaceAll(hn, (i, s) => {
2208
+ return e.replaceAll(vn, (i, s) => {
2204
2209
  if (s.startsWith(Le))
2205
- return `$arcgis.t(m=>m[0],"${_i(s.slice(Le.length))}")`;
2210
+ return `$arcgis.t(m=>m[0],"${Wi(s.slice(Le.length))}")`;
2206
2211
  if (s.startsWith("./")) {
2207
- const n = Bi(s, t);
2212
+ const n = Ki(s, t);
2208
2213
  if (n?.isAsync === !0)
2209
2214
  return `${i}.then(m=>m.default${n.oldSingleExportName === void 0 ? "" : `.then(e=>({${n.oldSingleExportName}:e}))`})`;
2210
2215
  }
2211
2216
  return i;
2212
2217
  });
2213
2218
  }
2214
- const hn = /(?<![.\w\d])import\("([^"]+)"\)/gu, _i = (e) => e.endsWith(".js") ? e.slice(0, -3) : e;
2215
- function yn(e) {
2219
+ const vn = /(?<![.\w\d])import\("([^"]+)"\)/gu, Wi = (e) => e.endsWith(".js") ? e.slice(0, -3) : e;
2220
+ function bn(e) {
2216
2221
  const t = [it];
2217
2222
  return () => {
2218
2223
  for (; ; ) {
2219
- const i = wn(t);
2220
- if (Sn(t), !e.has(i))
2224
+ const i = Cn(t);
2225
+ if (En(t), !e.has(i))
2221
2226
  return e.add(i), i;
2222
2227
  }
2223
2228
  };
2224
2229
  }
2225
- const it = 0, mt = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_", Ki = `${mt}0123456789`, vn = mt.length, bn = Ki.length;
2226
- function wn(e) {
2230
+ const it = 0, mt = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_", Ui = `${mt}0123456789`, wn = mt.length, Sn = Ui.length;
2231
+ function Cn(e) {
2227
2232
  let t = mt[e[0]];
2228
2233
  for (let i = 1; i < e.length; ++i)
2229
- t += Ki[e[i]];
2234
+ t += Ui[e[i]];
2230
2235
  return t;
2231
2236
  }
2232
- function Sn(e) {
2237
+ function En(e) {
2233
2238
  let t = e.length - 1;
2234
2239
  for (; t >= 0; ) {
2235
- const i = t === 0 ? vn : bn;
2240
+ const i = t === 0 ? wn : Sn;
2236
2241
  if (e[t] += 1, e[t] >= i)
2237
2242
  e[t] = it, t--;
2238
2243
  else
@@ -2241,29 +2246,29 @@ function Sn(e) {
2241
2246
  e.push(it);
2242
2247
  }
2243
2248
  function De(e = j(), t = !1) {
2244
- const i = e.version.includes("next"), s = e.name === "@esri/calcite-components";
2245
- if (s && i)
2246
- return `https://cdn.jsdelivr.net/npm/@esri/calcite-components@${e.version}/dist/${ce}/`;
2247
- const n = t || i ? "jsdev.arcgis.com" : "js.arcgis.com", r = Cn(e.name), a = En(e.version);
2248
- if (a === void 0)
2249
+ const i = e.name === "@esri/calcite-components", s = te && !i ? _s().version : e.version, n = s.includes("next");
2250
+ if (i && n)
2251
+ return `https://cdn.jsdelivr.net/npm/@esri/calcite-components@${s}/dist/${le}/`;
2252
+ const r = t || n ? "jsdev.arcgis.com" : "js.arcgis.com", a = Tn(e.name), c = $n(s);
2253
+ if (c === void 0)
2249
2254
  throw Error(
2250
2255
  b(
2251
2256
  "@arcgis/lumina:dependencies",
2252
2257
  `Failed to parse a semver version: ${e.name}. Ensure the version follows D.D.D format. Package version: ${e.version}`
2253
2258
  )
2254
2259
  );
2255
- return r.length === 0 ? `https://${n}/${a}/` : s ? `https://${n}/${r}/${a}/` : `https://${n}/${a}/${r}/`;
2260
+ return a === "core" ? `https://${r}/${c}/` : i ? `https://${r}/${a}/${c}/` : `https://${r}/${c}/${a}/`;
2256
2261
  }
2257
- const Cn = (e) => e.split("/").pop() ?? e;
2258
- function En(e) {
2262
+ const Tn = (e) => e.split("/").pop() ?? e;
2263
+ function $n(e) {
2259
2264
  const t = /^(?<major>\d+)\.(?<minor>\d+)\.(?<patch>\d+)(?<prerelease>-.*)?$/u, i = e.match(t);
2260
2265
  if (i?.groups === void 0)
2261
2266
  return;
2262
- const { major: s, minor: n, patch: r, prerelease: a } = i.groups, l = `${s}.${n}.${r}`;
2263
- return a?.startsWith("-next") ? `${l}-next` : l;
2267
+ const { major: s, minor: n, patch: r, prerelease: a } = i.groups, c = `${s}.${n}.${r}`;
2268
+ return a?.startsWith("-next") ? `${c}-next` : c;
2264
2269
  }
2265
- async function Tn(e, t, i, s, n) {
2266
- const r = t.packageName, { hasCss: a, cdnName: l } = await Wi(t.packageLocation) ?? {};
2270
+ async function Pn(e, t, i, s, n) {
2271
+ const r = t.packageName, { hasCss: a, cdnName: c } = await zi(t.packageLocation) ?? {};
2267
2272
  if (i === "cdn") {
2268
2273
  const m = t.cdnUrl ?? De(t.packageJson, n);
2269
2274
  return [
@@ -2272,7 +2277,7 @@ async function Tn(e, t, i, s, n) {
2272
2277
  tag: "link",
2273
2278
  attrs: {
2274
2279
  rel: "stylesheet",
2275
- src: `${m}${l}.css`
2280
+ src: `${m}${c}.css`
2276
2281
  }
2277
2282
  }
2278
2283
  ] : [],
@@ -2280,12 +2285,12 @@ async function Tn(e, t, i, s, n) {
2280
2285
  tag: "script",
2281
2286
  attrs: {
2282
2287
  type: "module",
2283
- src: `${m}${l}.esm.js`
2288
+ src: `${m}${c}.esm.js`
2284
2289
  }
2285
2290
  }
2286
2291
  ];
2287
2292
  }
2288
- const d = `${r}/dist/${l}/${l}.css${Q}`, c = a ? [
2293
+ const d = `${r}/dist/${c}/${c}.css${Q}`, l = a ? [
2289
2294
  `import styles$${s} from "${d}";`,
2290
2295
  `document.adoptedStyleSheets = [...document.adoptedStyleSheets, styles$${s}.styleSheet];`
2291
2296
  ] : [], p = `${r}/dist/esm/loader.js`;
@@ -2297,18 +2302,18 @@ async function Tn(e, t, i, s, n) {
2297
2302
  */
2298
2303
  optimizableImports: [p],
2299
2304
  javascriptCode: [
2300
- ...c,
2305
+ ...l,
2301
2306
  `import { defineCustomElements as defineCustomElements$${s} } from "${p}";`,
2302
2307
  `defineCustomElements$${s}(globalThis.window, {`,
2303
- ` resourcesUrl: "${dt(e, t.packageLocation)}/dist/${l}/",`,
2308
+ ` resourcesUrl: "${dt(e, t.packageLocation)}/dist/${c}/",`,
2304
2309
  "});"
2305
2310
  ]
2306
2311
  }
2307
2312
  ];
2308
2313
  }
2309
- async function Wi(e) {
2314
+ async function zi(e) {
2310
2315
  const t = u.join(e, "dist"), i = u.basename(e), n = (await ot(t)).filter(
2311
- (a) => !Di.has(a) && !a.includes(".")
2316
+ (a) => !Mi.has(a) && !a.includes(".")
2312
2317
  ), r = n.find(
2313
2318
  (a) => a.startsWith("arcgis-") || // This is the case for template-components and field-apps-custom-elements
2314
2319
  a === i
@@ -2318,18 +2323,18 @@ async function Wi(e) {
2318
2323
  ).then((a) => a.find(R)) : await At(t, r);
2319
2324
  }
2320
2325
  async function At(e, t) {
2321
- const i = u.join(e, t, `${t}.css`), s = u.join(e, t, "assets"), n = u.join(e, t, `${t}.esm.js`), [r, a, l] = await Promise.all([
2326
+ const i = u.join(e, t, `${t}.css`), s = u.join(e, t, "assets"), n = u.join(e, t, `${t}.esm.js`), [r, a, c] = await Promise.all([
2322
2327
  _(i),
2323
2328
  _(s),
2324
2329
  _(n)
2325
2330
  ]);
2326
- return r || a || l ? {
2331
+ return r || a || c ? {
2327
2332
  hasCss: r,
2328
2333
  cdnName: t
2329
2334
  } : void 0;
2330
2335
  }
2331
- async function $n(e, t, i, s, n) {
2332
- const a = t.packageJson.exports?.[`./${Z}.css`] === void 0 ? await Wi(t.packageLocation) : void 0, l = a?.cdnName ?? ce, d = a === void 0 ? `${Oi}.js` : `${a.cdnName}.esm.js`;
2336
+ async function kn(e, t, i, s, n) {
2337
+ const a = t.packageJson.exports?.[`./${Z}.css`] === void 0 ? await zi(t.packageLocation) : void 0, c = a?.cdnName ?? le, d = a === void 0 ? `${Ji}.js` : `${a.cdnName}.esm.js`;
2333
2338
  if (i === "cdn")
2334
2339
  return {
2335
2340
  tag: "script",
@@ -2338,7 +2343,7 @@ async function $n(e, t, i, s, n) {
2338
2343
  src: `${t.cdnUrl ?? De(t.packageJson, n)}${d}`
2339
2344
  }
2340
2345
  };
2341
- const c = Pn(t.packageJson), p = `${t.packageName}/${u.normalize(c)}${Q}`, m = [
2346
+ const l = In(t.packageJson), p = `${t.packageName}/${u.normalize(l)}${Q}`, m = [
2342
2347
  `import styles$${s} from "${p}";`,
2343
2348
  `document.adoptedStyleSheets = [...document.adoptedStyleSheets, styles$${s}.styleSheet];`
2344
2349
  ], f = `${t.packageName}/loader`;
@@ -2352,12 +2357,12 @@ async function $n(e, t, i, s, n) {
2352
2357
  ...m,
2353
2358
  `import { defineCustomElements as defineCustomElements$${s} } from "${f}";`,
2354
2359
  `defineCustomElements$${s}({`,
2355
- ` resourcesUrl: "${dt(e, t.packageLocation)}/dist/${l}/",`,
2360
+ ` resourcesUrl: "${dt(e, t.packageLocation)}/dist/${c}/",`,
2356
2361
  "});"
2357
2362
  ]
2358
2363
  };
2359
2364
  }
2360
- function Pn(e) {
2365
+ function In(e) {
2361
2366
  const { exports: t } = e;
2362
2367
  if (t === void 0)
2363
2368
  throw new Error(
@@ -2366,7 +2371,7 @@ function Pn(e) {
2366
2371
  const i = Object.entries(t).filter(([n]) => u.extname(n) === ".css"), s = i.find(([, n]) => n === `./${Z}.css`);
2367
2372
  return s ? s[0] : i.length > 0 ? i[0][0] : `./${Z}.css`;
2368
2373
  }
2369
- async function ne(e, t) {
2374
+ async function oe(e, t) {
2370
2375
  return t !== void 0 ? await Lt(e, t) : (e._loadersCache ??= Lt(e), await e._loadersCache);
2371
2376
  }
2372
2377
  async function Lt(e, t) {
@@ -2375,16 +2380,16 @@ async function Lt(e, t) {
2375
2380
  const a = async (m) => (await Promise.all(
2376
2381
  m.map(async (f) => {
2377
2382
  const g = r++;
2378
- return f.type === "stencil" ? await Tn(n, f, i, g, s) : f.type === "@arcgis/lumina" ? await $n(n, f, i, g, s) : void 0;
2383
+ return f.type === "stencil" ? await Pn(n, f, i, g, s) : f.type === "@arcgis/lumina" ? await kn(n, f, i, g, s) : void 0;
2379
2384
  })
2380
- )).filter(R).flat(), l = await Promise.all([
2385
+ )).filter(R).flat(), c = await Promise.all([
2381
2386
  // This may contain an import map so must be first
2382
- Zr(e, n, i, s),
2383
- re.then(a),
2384
- Ui(e).then(a)
2385
- ]), d = u.join(e.dir.src, "loader.ts"), c = t ?? (i === "cdn" ? `./${e.options.build?.cdn?.namespace ?? ce}/` : void 0);
2387
+ tn(e, n, i, s),
2388
+ ne.then(a),
2389
+ Hi(e).then(a)
2390
+ ]), d = u.join(e.dir.src, "loader.ts"), l = t ?? (i === "cdn" ? `./${e.options.build?.cdn?.namespace ?? le}/` : void 0);
2386
2391
  return [
2387
- ...l.flat(),
2392
+ ...c.flat(),
2388
2393
  {
2389
2394
  optimizableImports: [
2390
2395
  /**
@@ -2395,12 +2400,12 @@ async function Lt(e, t) {
2395
2400
  javascriptCode: [
2396
2401
  `import { defineCustomElements } from "${d}";`,
2397
2402
  "globalThis.devOnly$ownTagNames = new Set();",
2398
- `defineCustomElements(${c === void 0 ? "" : `{resourcesUrl:${JSON.stringify(c)}}`});`
2403
+ `defineCustomElements(${l === void 0 ? "" : `{resourcesUrl:${JSON.stringify(l)}}`});`
2399
2404
  ]
2400
2405
  }
2401
2406
  ];
2402
2407
  }
2403
- async function Ui(e) {
2408
+ async function Hi(e) {
2404
2409
  const t = e.options?.serve?.extraDependencies ?? [];
2405
2410
  return t.length === 0 ? [] : (e._serveOnlyDependencies ??= Promise.all(
2406
2411
  t.map(async (i) => {
@@ -2419,8 +2424,8 @@ async function Ui(e) {
2419
2424
  })
2420
2425
  ).then((i) => i.filter(R)), await e._serveOnlyDependencies);
2421
2426
  }
2422
- const kn = "/C:@arcgis/lumina-compiler/testSetupFile", In = /^\/C:@arcgis\/lumina-compiler\/testSetupFile/u, We = [kn];
2423
- async function xn(e) {
2427
+ const xn = "/C:@arcgis/lumina-compiler/testSetupFile", An = /^\/C:@arcgis\/lumina-compiler\/testSetupFile/u, We = [xn];
2428
+ async function Ln(e) {
2424
2429
  if (
2425
2430
  /**
2426
2431
  * Only import custom element dependencies if we are running in Vitest browser mode.
@@ -2433,7 +2438,7 @@ async function xn(e) {
2433
2438
  !e.apiJsonEnabled
2434
2439
  )
2435
2440
  return Nt(e);
2436
- const i = (await ne(e)).map((s, n) => {
2441
+ const i = (await oe(e)).map((s, n) => {
2437
2442
  if ("javascriptCode" in s)
2438
2443
  return s.javascriptCode.join(`
2439
2444
  `);
@@ -2458,16 +2463,16 @@ async function xn(e) {
2458
2463
  `);
2459
2464
  return [Nt(e), i].join("");
2460
2465
  }
2461
- const Nt = (e) => [e.isInPuppeteerTestBackEnd ? An : "", Ln].join(""), An = `import { setupPuppeteerTest } from "@arcgis/lumina-compiler/puppeteerTesting";
2466
+ const Nt = (e) => [e.isInPuppeteerTestBackEnd ? Nn : "", jn].join(""), Nn = `import { setupPuppeteerTest } from "@arcgis/lumina-compiler/puppeteerTesting";
2462
2467
  setupPuppeteerTest();
2463
- `, Ln = `import { setupLuminaTest } from "@arcgis/lumina-compiler/testing";
2468
+ `, jn = `import { setupLuminaTest } from "@arcgis/lumina-compiler/testing";
2464
2469
  setupLuminaTest();
2465
- `, Nn = "@arcgis/lumina:generateLoaderTs";
2470
+ `, Fn = "@arcgis/lumina:generateLoaderTs";
2466
2471
  let Ne;
2467
- function jn(e) {
2472
+ function Rn(e) {
2468
2473
  const t = /[\\\/]src[\\\/]loader\.ts$/u;
2469
- return [_s(e.apiExtractorPluginConfig), {
2470
- name: Nn,
2474
+ return [Ks(e.apiExtractorPluginConfig), {
2475
+ name: Fn,
2471
2476
  configResolved() {
2472
2477
  Ne = `${e.dir.root}src/loader.ts`;
2473
2478
  },
@@ -2482,7 +2487,7 @@ function jn(e) {
2482
2487
  id: t
2483
2488
  },
2484
2489
  async handler() {
2485
- return e.apiJsonDeferred !== void 0 && await e.apiJsonDeferred.promise, kr(e);
2490
+ return e.apiJsonDeferred !== void 0 && await e.apiJsonDeferred.promise, Ir(e);
2486
2491
  }
2487
2492
  },
2488
2493
  async handleHotUpdate() {
@@ -2492,9 +2497,9 @@ function jn(e) {
2492
2497
  name: "@arcgis/lumina:generateTestSetupVirtualFile",
2493
2498
  load: {
2494
2499
  filter: {
2495
- id: In
2500
+ id: An
2496
2501
  },
2497
- handler: async () => await xn(e)
2502
+ handler: async () => await Ln(e)
2498
2503
  }
2499
2504
  }];
2500
2505
  }
@@ -2508,7 +2513,7 @@ const Ft = (e) => {
2508
2513
  path: u.join("/", u.relative(e.dir.root, Ne))
2509
2514
  });
2510
2515
  };
2511
- function Fn(e) {
2516
+ function Dn(e) {
2512
2517
  let t;
2513
2518
  const i = () => [
2514
2519
  ...e.options.assets?.transformers ?? [],
@@ -2537,15 +2542,15 @@ function Fn(e) {
2537
2542
  e.viteCommand === "build" && (t = Rt(e));
2538
2543
  },
2539
2544
  async configureServer(s) {
2540
- e.server = s, te(e, await t, i()), s.watcher.on("addDir", (n) => {
2545
+ e.server = s, ie(e, await t, i()), s.watcher.on("addDir", (n) => {
2541
2546
  if (n.endsWith("assets")) {
2542
2547
  const r = u.dirname(n);
2543
- u.join(r, "/") === e.dir.root ? te(e, [Hi], i()) : n.startsWith(e.dir.srcComponents) && te(e, [zi(n, r)], i());
2548
+ u.join(r, "/") === e.dir.root ? ie(e, [Vi], i()) : n.startsWith(e.dir.srcComponents) && ie(e, [qi(n, r)], i());
2544
2549
  }
2545
2550
  });
2546
2551
  },
2547
2552
  async writeBundle() {
2548
- await xi(e, await t, i());
2553
+ await Li(e, await t, i());
2549
2554
  }
2550
2555
  };
2551
2556
  }
@@ -2553,16 +2558,16 @@ async function Rt(e) {
2553
2558
  const t = _("assets"), i = await e.componentFilesPromise, s = await Promise.all(
2554
2559
  i.map(async (n) => {
2555
2560
  const r = u.dirname(n), a = u.join(r, "assets");
2556
- return await _(a) ? zi(a, r) : void 0;
2561
+ return await _(a) ? qi(a, r) : void 0;
2557
2562
  })
2558
2563
  );
2559
- return await t && s.push(Hi), s.filter(R);
2564
+ return await t && s.push(Vi), s.filter(R);
2560
2565
  }
2561
- const zi = (e, t) => ({
2566
+ const qi = (e, t) => ({
2562
2567
  type: "directory",
2563
2568
  source: e,
2564
2569
  destination: u.basename(t)
2565
- }), Hi = { type: "directory", source: "assets/", destination: "" }, Ue = "@arcgis/lumina:printTotalBuildSize", Rn = (e) => ({
2570
+ }), Vi = { type: "directory", source: "assets/", destination: "" }, Ue = "@arcgis/lumina:printTotalBuildSize", On = (e) => ({
2566
2571
  name: Ue,
2567
2572
  apply: () => e.viteCommand === "build",
2568
2573
  configResolved(t) {
@@ -2577,16 +2582,16 @@ const zi = (e, t) => ({
2577
2582
  if (typeof s != "function")
2578
2583
  throw Error(b(Ue, "Expected vite:reporter to declare a writeBundle() function"));
2579
2584
  i.writeBundle = async function(r, a) {
2580
- let l = 0, d = 0, c = 0, p = 0;
2585
+ let c = 0, d = 0, l = 0, p = 0;
2581
2586
  const m = console.log;
2582
2587
  console.log = function(...g) {
2583
2588
  if (m.apply(console, g), g.length === 1 && typeof g[0] == "string") {
2584
- const [h, y] = g[0].match(On) ?? [];
2589
+ const [h, y] = g[0].match(Jn) ?? [];
2585
2590
  if (!h)
2586
2591
  return;
2587
- p || (p = g[0].slice(0, g[0].indexOf(h) + h.length).replaceAll(Mn, "").length);
2592
+ p || (p = g[0].slice(0, g[0].indexOf(h) + h.length).replaceAll(Bn, "").length);
2588
2593
  const v = Number.parseFloat(h.replace(" kB", "").replaceAll(",", ""));
2589
- y ? (c += Number.parseFloat(y.replace(" kB", "").replaceAll(",", "")), d += v) : l += v;
2594
+ y ? (l += Number.parseFloat(y.replace(" kB", "").replaceAll(",", "")), d += v) : c += v;
2590
2595
  }
2591
2596
  };
2592
2597
  try {
@@ -2595,38 +2600,34 @@ const zi = (e, t) => ({
2595
2600
  console.log = m;
2596
2601
  }
2597
2602
  if (d > 0) {
2598
- const g = c > 0 ? d : l, h = Mt(g), y = e.dir.relativeDist;
2603
+ const g = l > 0 ? d : c, h = Mt(g), y = e.dir.relativeDist;
2599
2604
  console.log(
2600
2605
  [
2601
2606
  Ot,
2602
2607
  y,
2603
- Dn,
2608
+ Mn,
2604
2609
  "*",
2605
2610
  " ".repeat(p - `${y}*`.length - h.length),
2606
2611
  h,
2607
2612
  Dt,
2608
- c > 0 ? ` ${Ot}│ gzip: ${Mt(c)}${Dt}` : ""
2613
+ l > 0 ? ` ${Ot}│ gzip: ${Mt(l)}${Dt}` : ""
2609
2614
  ].join("")
2610
2615
  );
2611
2616
  }
2612
2617
  };
2613
2618
  }
2614
- }), Dt = "\x1B[22m\x1B[1m\x1B[22m", Ot = "\x1B[2m", Dn = "\x1B[22m\x1B[36m", On = /\d+(?:,\d+)?\.\d{2} kB/gu, Mn = /\x1B\[\d+m/gu, Jn = new Intl.NumberFormat("en", {
2619
+ }), Dt = "\x1B[22m\x1B[1m\x1B[22m", Ot = "\x1B[2m", Mn = "\x1B[22m\x1B[36m", Jn = /\d+(?:,\d+)?\.\d{2} kB/gu, Bn = /\x1B\[\d+m/gu, _n = new Intl.NumberFormat("en", {
2615
2620
  maximumFractionDigits: 2,
2616
2621
  minimumFractionDigits: 2
2617
- }), Mt = (e) => `${Jn.format(e)} kB`, Bn = (e, t = u.resolve("src")) => u.relative(t, u.join(e, "..", ut.slice(0, -3))), qi = "packages/core-packages/core/src", _n = "packages/core-packages/core/output/npm/esm", de = !import.meta.url.includes("node_modules");
2618
- function Vi({ command: e }) {
2619
- return e === "serve" && process.argv.includes("--local-core");
2620
- }
2621
- const Jt = "@arcgis/lumina:configureVite", Kn = (e) => ({
2622
+ }), Mt = (e) => `${_n.format(e)} kB`, Kn = (e, t = u.resolve("src")) => u.relative(t, u.join(e, "..", ut.slice(0, -3))), Jt = "@arcgis/lumina:configureVite", Wn = (e) => ({
2622
2623
  name: Jt,
2623
2624
  async config({
2624
2625
  server: t,
2625
2626
  publicDir: i,
2626
- build: { cssMinify: s, target: n, sourcemap: r, lib: a, rollupOptions: { output: l = [] } = {}, watch: d, emptyOutDir: c } = {},
2627
+ build: { cssMinify: s, target: n, sourcemap: r, lib: a, rollupOptions: { output: c = [] } = {}, watch: d, emptyOutDir: l } = {},
2627
2628
  test: p = {}
2628
2629
  }, m) {
2629
- const f = d != null, { include: g, browser: h, environment: y, forceRerunTriggers: v } = p, w = H && de && Vi(m) ? si(qi, import.meta.dirname) : void 0, C = w === void 0 ? [] : [
2630
+ const f = d != null, { include: g, browser: h, environment: y, forceRerunTriggers: v } = p, w = H && te && xi(m) ? si(Ii, import.meta.dirname) : void 0, C = w === void 0 ? [] : [
2630
2631
  G(u.join(w, "**/*.{ts,tsx,mjs}")),
2631
2632
  `!${G(u.join(w, "**/*.d.ts"))}`
2632
2633
  ], E = {
@@ -2684,9 +2685,9 @@ const Jt = "@arcgis/lumina:configureVite", Kn = (e) => ({
2684
2685
  include: [
2685
2686
  // Used by controllers. Need to add manually because @arcgis/lumina is
2686
2687
  // excluded per comment below, so Vite will discover these usages too late.
2687
- ...H && !de ? ["@arcgis/core/applications/Components/reactiveUtils.js", "@arcgis/core/core/reactiveUtils.js"] : [],
2688
+ ...H && !te ? ["@arcgis/core/applications/Components/reactiveUtils.js", "@arcgis/core/core/reactiveUtils.js"] : [],
2688
2689
  // Used by core. Because we exclude core from scanning, these are discovered late, causing errors
2689
- ...H && de ? [
2690
+ ...H && te ? [
2690
2691
  "tslib",
2691
2692
  "@arcgis/core > luxon",
2692
2693
  "@arcgis/core > @esri/arcgis-html-sanitizer",
@@ -2708,7 +2709,7 @@ const Jt = "@arcgis/lumina:configureVite", Kn = (e) => ({
2708
2709
  * inside the package, and by Calcite outside the package).
2709
2710
  */
2710
2711
  exclude: [
2711
- ...de ? [
2712
+ ...te ? [
2712
2713
  "@arcgis/lumina",
2713
2714
  "@arcgis/core",
2714
2715
  "@arcgis/toolkit",
@@ -2790,7 +2791,7 @@ const Jt = "@arcgis/lumina:configureVite", Kn = (e) => ({
2790
2791
  publicDir: i ?? !1,
2791
2792
  build: {
2792
2793
  cssMinify: s ?? (e.environment === "production" ? !0 : void 0),
2793
- target: n ?? Ii(e),
2794
+ target: n ?? Ai(e),
2794
2795
  sourcemap: r ?? (e.environment === "development" ? "inline" : e.options.build?.enableSourceMapsInProduction ?? !1),
2795
2796
  lib: {
2796
2797
  entry: E,
@@ -2798,7 +2799,7 @@ const Jt = "@arcgis/lumina:configureVite", Kn = (e) => ({
2798
2799
  },
2799
2800
  rollupOptions: {
2800
2801
  output: {
2801
- chunkFileNames: (Array.isArray(l) ? void 0 : l.chunkFileNames) || "chunks/[name].js",
2802
+ chunkFileNames: (Array.isArray(c) ? void 0 : c.chunkFileNames) || "chunks/[name].js",
2802
2803
  ...// Does not exist in Rolldown, and probably not needed
2803
2804
  // https://github.com/rolldown/rolldown/issues/206
2804
2805
  "rolldownVersion" in this.meta ? void 0 : {
@@ -2806,7 +2807,7 @@ const Jt = "@arcgis/lumina:configureVite", Kn = (e) => ({
2806
2807
  * 2015 is the newest option. Rollup's generated code does not use
2807
2808
  * newer features at the moment.
2808
2809
  */
2809
- generatedCode: (Array.isArray(l) ? void 0 : l.generatedCode) ?? "es2015"
2810
+ generatedCode: (Array.isArray(c) ? void 0 : c.generatedCode) ?? "es2015"
2810
2811
  }
2811
2812
  }
2812
2813
  },
@@ -2820,7 +2821,7 @@ const Jt = "@arcgis/lumina:configureVite", Kn = (e) => ({
2820
2821
  * - in API Extractor we can avoid writing unchanged files to disk if
2821
2822
  * the out dir is not emptied between watch rebuilds.
2822
2823
  */
2823
- emptyOutDir: c ?? !f
2824
+ emptyOutDir: l ?? !f
2824
2825
  },
2825
2826
  optimizeDeps: A,
2826
2827
  define: S,
@@ -2855,65 +2856,65 @@ const Jt = "@arcgis/lumina:configureVite", Kn = (e) => ({
2855
2856
  e._originalRollupInputOptions ??= t.input;
2856
2857
  const s = { ...e._originalRollupInputOptions };
2857
2858
  i.forEach((n) => {
2858
- const r = Bn(n);
2859
+ const r = Kn(n);
2859
2860
  s[r] = n;
2860
2861
  }), t.input = s;
2861
2862
  }
2862
- }), Se = "@arcgis/lumina:serveLocalCdn", Wn = /^\/?@arcgis\/core(?=\/|$)/u, Gi = "/index.js", Un = je(Gi), st = `\0${Se}:index`, zn = je(st), Hn = 3e3, qn = [
2863
+ }), Se = "@arcgis/lumina:serveLocalCdn", Un = /^\/?@arcgis\/core(?=\/|$)/u, Gi = "/index.js", zn = je(Gi), st = `\0${Se}:index`, Hn = je(st), qn = 3e3, Vn = [
2863
2864
  /^https?:\/\/localhost(?::[0-9]+)?$/u,
2864
2865
  /^https?:\/\/(?:[a-z0-9-]+\.)*(?:arcgis|esri)\.com(?::[0-9]+)?$/iu
2865
2866
  ];
2866
- function Vn(e) {
2867
+ function Gn(e) {
2867
2868
  if (!H)
2868
2869
  return;
2869
2870
  const t = j().name, i = t.split("/").pop() ?? t, s = `/${i}/index.js`, n = je(s), r = `\0${Se}:${i}`, a = je(r);
2870
2871
  return {
2871
2872
  name: Se,
2872
2873
  enforce: "pre",
2873
- apply(l) {
2874
- const d = Yn(e, l);
2874
+ apply(c) {
2875
+ const d = Qn(e, c);
2875
2876
  return d || (e._localCdnCore = void 0), d;
2876
2877
  },
2877
2878
  config: {
2878
2879
  order: "post",
2879
- handler(l, d) {
2880
- const c = l.server, p = Vi(d), m = p ? qi : _n, f = si(m, import.meta.dirname);
2880
+ handler(c, d) {
2881
+ const l = c.server, p = xi(d), m = p ? Ii : Xr, f = si(m, import.meta.dirname);
2881
2882
  if (f === void 0)
2882
2883
  throw Error(b(Se, `Unable to find ${m}.`));
2883
2884
  return e._localCdnCore = p ? { packageLocation: u.dirname(f), sourceLocation: f } : { packageLocation: f }, {
2884
2885
  server: {
2885
- port: c?.port ?? Hn,
2886
- cors: c?.cors ?? { origin: qn }
2886
+ port: l?.port ?? qn,
2887
+ cors: l?.cors ?? { origin: Vn }
2887
2888
  },
2888
2889
  resolve: {
2889
2890
  // The alias also matches CDN-rooted requests such as /@arcgis/core/WebMap.js. Vite resolves .js requests
2890
2891
  // to TypeScript in source mode and handles relative and bare imports from the resulting filesystem path.
2891
- alias: [{ find: Wn, replacement: f }]
2892
+ alias: [{ find: Un, replacement: f }]
2892
2893
  }
2893
2894
  };
2894
2895
  }
2895
2896
  },
2896
2897
  resolveId: {
2897
- filter: { id: [Un, n] },
2898
- handler(l) {
2899
- if (l === Gi)
2898
+ filter: { id: [zn, n] },
2899
+ handler(c) {
2900
+ if (c === Gi)
2900
2901
  return st;
2901
- if (l === s)
2902
+ if (c === s)
2902
2903
  return r;
2903
2904
  }
2904
2905
  },
2905
2906
  load: {
2906
- filter: { id: [zn, a] },
2907
- async handler(l) {
2908
- if (l === st)
2907
+ filter: { id: [Hn, a] },
2908
+ async handler(c) {
2909
+ if (c === st)
2909
2910
  return `import ${JSON.stringify(s)};
2910
2911
  `;
2911
- if (l === r)
2912
- return await Xn(e);
2912
+ if (c === r)
2913
+ return await Yn(e);
2913
2914
  }
2914
2915
  },
2915
- handleHotUpdate({ file: l, server: d }) {
2916
- if (Gn(l, e._localCdnCore?.sourceLocation))
2916
+ handleHotUpdate({ file: c, server: d }) {
2917
+ if (Xn(c, e._localCdnCore?.sourceLocation))
2917
2918
  return d.ws.send({ type: "full-reload" }), [];
2918
2919
  }
2919
2920
  };
@@ -2921,30 +2922,30 @@ function Vn(e) {
2921
2922
  function je(e) {
2922
2923
  return new RegExp(`^${RegExp.escape(e)}$`, "u");
2923
2924
  }
2924
- function Gn(e, t) {
2925
+ function Xn(e, t) {
2925
2926
  return t !== void 0 && e.startsWith(u.join(t, u.sep));
2926
2927
  }
2927
- async function Xn(e) {
2928
+ async function Yn(e) {
2928
2929
  const t = e.viteConfig.server, i = t.origin?.replace(/\/$/u, "") ?? `${t.https ? "https" : "http"}://localhost:${String(t.port)}`;
2929
- return `${(await ne(e, `${i}/`)).flatMap((n) => "javascriptCode" in n ? n.javascriptCode : []).join(`
2930
+ return `${(await oe(e, `${i}/`)).flatMap((n) => "javascriptCode" in n ? n.javascriptCode : []).join(`
2930
2931
  `)}
2931
2932
  `;
2932
2933
  }
2933
- function Yn(e, t) {
2934
- return de && e.viteCommand === "serve" && !e.isInTest && t.resolve?.conditions?.includes("storybook") !== !0 && t.server?.middlewareMode !== !0;
2934
+ function Qn(e, t) {
2935
+ return te && e.viteCommand === "serve" && !e.isInTest && t.resolve?.conditions?.includes("storybook") !== !0 && t.server?.middlewareMode !== !0;
2935
2936
  }
2936
- const Qn = (e) => ({
2937
+ const Zn = (e) => ({
2937
2938
  name: "@arcgis/lumina:setAssetPath",
2938
2939
  apply: () => e.viteCommand === "build",
2939
2940
  config: (t) => ({
2940
2941
  base: t.base ?? e.options.assets?.defaultPath ?? De()
2941
2942
  })
2942
2943
  });
2943
- function Zn(e = j()) {
2944
+ function eo(e = j()) {
2944
2945
  const t = e.version ?? "0.0.1";
2945
2946
  return bs(t);
2946
2947
  }
2947
- const eo = (e) => `/* ${e} */`, k = (e) => (t, i) => {
2948
+ const to = (e) => `/* ${e} */`, k = (e) => (t, i) => {
2948
2949
  Object.defineProperty(t, i, {
2949
2950
  get() {
2950
2951
  throw Error(
@@ -2984,7 +2985,7 @@ const ue = {
2984
2985
  stencilLikeDocsJson: "docs/docs.json"
2985
2986
  }, rt = (e) => e.viteConfig.root.includes("/test-packages/") ? 2 : void 0;
2986
2987
  async function Xi(e, t, i = j()) {
2987
- const s = to(e, i), n = u.join(t, "lumina.ts"), a = await _(n) ? await z(n, "utf8") : "";
2988
+ const s = io(e, i), n = u.join(t, "lumina.ts"), a = await _(n) ? await z(n, "utf8") : "";
2988
2989
  if (a.trim().replaceAll(`\r
2989
2990
  `, `
2990
2991
  `) === s.trim())
@@ -3004,18 +3005,18 @@ ${a}`
3004
3005
  );
3005
3006
  return ni(n, s), !0;
3006
3007
  }
3007
- function to(e, t = j()) {
3008
+ function io(e, t = j()) {
3008
3009
  const i = e.filter((d) => d.type === "@arcgis/lumina").map((d) => `
3009
3010
  /// <reference types="${d.packageName}/types/lumina" />`), s = e.filter((d) => d.type === "stencil"), n = s.map(
3010
- (d, c) => `
3011
- import type { JSX as JSX$${c} } from "${d.packageName}/dist/types/components";`
3011
+ (d, l) => `
3012
+ import type { JSX as JSX$${l} } from "${d.packageName}/dist/types/components";`
3012
3013
  ), r = s.length === 0 ? "" : `
3013
3014
 
3014
3015
  declare module "@arcgis/lumina" {
3015
- interface ImportStencilElements extends ${s.map((d, c) => `JSX$${c}.IntrinsicElements`).join(", ")} {}
3016
+ interface ImportStencilElements extends ${s.map((d, l) => `JSX$${l}.IntrinsicElements`).join(", ")} {}
3016
3017
  }`, a = t.devDependencies ?? {};
3017
3018
  return [
3018
- io,
3019
+ so,
3019
3020
  a.vitest ? `
3020
3021
  /// <reference types="vitest/config" />
3021
3022
  /// <reference types="vitest/browser" />` : "",
@@ -3026,7 +3027,7 @@ declare module "@arcgis/lumina" {
3026
3027
  `
3027
3028
  ].join("");
3028
3029
  }
3029
- const io = `/**
3030
+ const so = `/**
3030
3031
  * This file is autogenerated by \`@arcgis/lumina-compiler\` - do not edit it manually.
3031
3032
  * Manual edits will be overwritten.
3032
3033
  *
@@ -3045,13 +3046,13 @@ const io = `/**
3045
3046
  * is doing:
3046
3047
  * https://github.com/storybookjs/storybook/blob/a5c2cf1712f70b4e3ecf38d3c98e7db8e8d67849/code/builders/builder-vite/src/plugins/code-generator-plugin.ts#L110
3047
3048
  */
3048
- e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand === "build" && !e.options.build?.cdn?.skip && e.options.build?.webApp?.destination !== void 0, so = (e) => ({
3049
+ e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand === "build" && !e.options.build?.cdn?.skip && e.options.build?.webApp?.destination !== void 0, ro = (e) => ({
3049
3050
  name: Ce,
3050
3051
  async configureServer(t) {
3051
- H && (e.server = t, await tn(e));
3052
+ H && (e.server = t, await rn(e));
3052
3053
  },
3053
3054
  configResolved() {
3054
- !e.isInTest && !e.isInStorybook && (e._updateLuminaTsPromise = ro(e).catch(
3055
+ !e.isInTest && !e.isInStorybook && (e._updateLuminaTsPromise = no(e).catch(
3055
3056
  (t) => T.error(Ce, `Failed to update package's src/lumina.ts: ${String(t)}`)
3056
3057
  ));
3057
3058
  },
@@ -3059,7 +3060,7 @@ e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand
3059
3060
  // Add imports to index.html before Vite starts resolving imports
3060
3061
  order: "pre",
3061
3062
  async handler(t, i) {
3062
- return Yi(e, i) ? (await ne(e)).map(
3063
+ return Yi(e, i) ? (await oe(e)).map(
3063
3064
  (n) => "javascriptCode" in n ? {
3064
3065
  tag: "script",
3065
3066
  attrs: {
@@ -3086,7 +3087,7 @@ e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand
3086
3087
  async buildStart() {
3087
3088
  if (e.viteCommand !== "serve")
3088
3089
  return;
3089
- const i = (await ne(e)).flatMap((s) => {
3090
+ const i = (await oe(e)).flatMap((s) => {
3090
3091
  if ("javascriptCode" in s)
3091
3092
  return s.optimizableImports;
3092
3093
  if ("cssHref" in s)
@@ -3101,26 +3102,26 @@ e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand
3101
3102
  await e._updateLuminaTsPromise;
3102
3103
  }
3103
3104
  });
3104
- async function ro(e) {
3105
- const i = (await Promise.all([re, Ui(e)])).flat();
3105
+ async function no(e) {
3106
+ const i = (await Promise.all([ne, Hi(e)])).flat();
3106
3107
  if (!await Xi(i, e.dir.src))
3107
3108
  return;
3108
3109
  let n = !1;
3109
3110
  function r() {
3110
- n || T.warn(Ce, no), n = !0;
3111
+ n || T.warn(Ce, oo), n = !0;
3111
3112
  }
3112
3113
  process.on("exit", () => {
3113
- r(), clearTimeout(l);
3114
+ r(), clearTimeout(c);
3114
3115
  });
3115
- const l = setTimeout(r, 2e3);
3116
+ const c = setTimeout(r, 2e3);
3116
3117
  }
3117
- const no = Ks(
3118
+ const oo = Ws(
3118
3119
  "greenBright",
3119
3120
  `lumina.ts has been updated (potentially because your dependencies changed). Please commit the updated file.
3120
3121
  If build failed with TypeScript errors, try running the build again to check whether new lumina.ts resolves the errors.`
3121
3122
  );
3122
- async function oo(e) {
3123
- const t = e.options.apiExtractor?.configFilePath === "" ? void 0 : await Us(process.cwd()), i = e.apiExtractorPluginConfig.unsafeConfigOverride === void 0 || t === void 0 ? t ?? e.apiExtractorPluginConfig.unsafeConfigOverride : Et(t, e.apiExtractorPluginConfig.unsafeConfigOverride);
3123
+ async function ao(e) {
3124
+ const t = e.options.apiExtractor?.configFilePath === "" ? void 0 : await zs(process.cwd()), i = e.apiExtractorPluginConfig.unsafeConfigOverride === void 0 || t === void 0 ? t ?? e.apiExtractorPluginConfig.unsafeConfigOverride : Et(t, e.apiExtractorPluginConfig.unsafeConfigOverride);
3124
3125
  e._documentationFileNames.apiJson = i?.context?.apiJsonEmitPath === void 0 ? e.options.documentation?.apiJsonFileName === !1 ? void 0 : e.options.documentation?.apiJsonFileName ? pe(e.options.documentation.apiJsonFileName) : ue.apiJson : i.context.apiJsonEmitPath || void 0, e._documentationFileNames.apiJson !== void 0 && e.provideAssets([
3125
3126
  {
3126
3127
  type: "dynamic",
@@ -3128,7 +3129,7 @@ async function oo(e) {
3128
3129
  destination: u.join("../..", e._documentationFileNames.apiJson)
3129
3130
  }
3130
3131
  ]);
3131
- const s = i?.types?.typeScriptConfig ?? zs(
3132
+ const s = i?.types?.typeScriptConfig ?? Hs(
3132
3133
  process.cwd(),
3133
3134
  e.options.types?.tsconfigPath ?? i?.types?.typeScriptConfigPath,
3134
3135
  !0
@@ -3153,7 +3154,7 @@ async function oo(e) {
3153
3154
  afterDiagnostic: e.options.types?.afterDiagnostic,
3154
3155
  typeScriptInstanceCreated: e.options.types?.typeScriptInstanceCreated,
3155
3156
  declarationTextTransformers: e.options.types?.declarationTextTransformers?.map(
3156
- (c) => (p) => c(p, e)
3157
+ (l) => (p) => l(p, e)
3157
3158
  ),
3158
3159
  typeScriptConfig: n,
3159
3160
  // Already merged, so pass empty object to avoid merging again
@@ -3166,9 +3167,9 @@ async function oo(e) {
3166
3167
  getComponentDemoUrl: e.options.documentation?.getComponentDemoUrl
3167
3168
  },
3168
3169
  watch: {
3169
- onUpdate: async (c) => {
3170
+ onUpdate: async (l) => {
3170
3171
  e.apiJsonDeferred = Promise.withResolvers();
3171
- const p = await c;
3172
+ const p = await l;
3172
3173
  if (e.apiJsonDeferred.resolve(), e.apiJsonDeferred = void 0, p !== void 0) {
3173
3174
  if (e.viteCommand === "serve")
3174
3175
  if ([...p.addedModules, ...p.removedModules].some(
@@ -3199,45 +3200,45 @@ async function oo(e) {
3199
3200
  }
3200
3201
  }
3201
3202
  },
3202
- afterApiJsonCreate: (c) => {
3203
- e.options.apiJson?.afterCreate?.(c.apiJson, !r), r = !0, (e.viteCommand === "build" ? e.viteConfig.build.watch : e.viteConfig.server.watch) === null && (e.apiJsonDeferred.resolve(), Bt(e, c.apiJson));
3203
+ afterApiJsonCreate: (l) => {
3204
+ e.options.apiJson?.afterCreate?.(l.apiJson, !r), r = !0, (e.viteCommand === "build" ? e.viteConfig.build.watch : e.viteConfig.server.watch) === null && (e.apiJsonDeferred.resolve(), Bt(e, l.apiJson));
3204
3205
  }
3205
- }, l = i === void 0 ? a : Et(i, a);
3206
- e.apiExtractorPluginConfig.configFilePath = "", e.apiExtractorPluginConfig.unsafeConfigOverride = l;
3206
+ }, c = i === void 0 ? a : Et(i, a);
3207
+ e.apiExtractorPluginConfig.configFilePath = "", e.apiExtractorPluginConfig.unsafeConfigOverride = c;
3207
3208
  const d = e.apiExtractorPluginConfig.afterExtractorCreated;
3208
- e.apiExtractorPluginConfig.afterExtractorCreated = (c) => {
3209
- e.apiExtractor = c, d?.(c);
3209
+ e.apiExtractorPluginConfig.afterExtractorCreated = (l) => {
3210
+ e.apiExtractor = l, d?.(l);
3210
3211
  };
3211
3212
  }
3212
3213
  function Bt(e, t) {
3213
3214
  const i = { ...t, modules: [] }, s = [], n = e.viteCommand === "build" ? [] : void 0;
3214
3215
  for (const r of t.modules) {
3215
3216
  const a = { ...r, declarations: [] };
3216
- let l = !1;
3217
+ let c = !1;
3217
3218
  for (const d of r.declarations) {
3218
3219
  if (d.customElement !== !0) {
3219
3220
  a.declarations.push(d);
3220
3221
  continue;
3221
3222
  }
3222
- const c = d;
3223
- if (n?.push(r.sourcePath), c.privacy !== void 0) {
3224
- l = !0;
3223
+ const l = d;
3224
+ if (n?.push(r.sourcePath), l.privacy !== void 0) {
3225
+ c = !0;
3225
3226
  continue;
3226
3227
  }
3227
3228
  const p = {
3228
- ...c,
3229
- members: c.members.filter((m) => m.privacy === void 0)
3229
+ ...l,
3230
+ members: l.members.filter((m) => m.privacy === void 0)
3230
3231
  };
3231
3232
  a.declarations.push(p), s.push(p);
3232
3233
  }
3233
- l || i.modules.push(a);
3234
+ c || i.modules.push(a);
3234
3235
  }
3235
3236
  e._localDefinedComponents = void 0, e.privateApiJson = t, e.apiJsonComponents = s, e.apiJson = i, n !== void 0 && (e.componentFilesPromise = Promise.resolve(n));
3236
3237
  }
3237
- var ao = Object.defineProperty, I = (e, t, i, s) => {
3238
+ var co = Object.defineProperty, I = (e, t, i, s) => {
3238
3239
  for (var n = void 0, r = e.length - 1, a; r >= 0; r--)
3239
3240
  (a = e[r]) && (n = a(t, i, n) || n);
3240
- return n && ao(t, i, n), n;
3241
+ return n && co(t, i, n), n;
3241
3242
  };
3242
3243
  const V = "@arcgis/lumina:context";
3243
3244
  class $ {
@@ -3253,24 +3254,24 @@ class $ {
3253
3254
  this.viteConfig = r;
3254
3255
  const a = r.build.minify !== !1;
3255
3256
  this.shouldMinify = a && this.viteCommand !== "serve", Object.hasOwn(this, "shouldMinifyJsx") || (this.shouldMinifyJsx = this.viteCommand !== "serve" || this.isInTest);
3256
- const l = u.join(r.root, u.sep), d = u.join(l, "src", u.sep), c = u.join(d, "components", u.sep), p = u.join(u.resolve(l, r.build.outDir), u.sep), m = u.join(u.relative(l, p), u.sep), f = u.join(p, "components", u.sep), g = u.join(p, this.options.build?.cdn?.namespace ?? ce, u.sep), h = u.join(g, "assets", u.sep);
3257
+ const c = u.join(r.root, u.sep), d = u.join(c, "src", u.sep), l = u.join(d, "components", u.sep), p = u.join(u.resolve(c, r.build.outDir), u.sep), m = u.join(u.relative(c, p), u.sep), f = u.join(p, "components", u.sep), g = u.join(p, this.options.build?.cdn?.namespace ?? le, u.sep), h = u.join(g, "assets", u.sep);
3257
3258
  if (this.dir = {
3258
- root: l,
3259
+ root: c,
3259
3260
  src: d,
3260
- srcComponents: c,
3261
+ srcComponents: l,
3261
3262
  relativeDist: m,
3262
3263
  dist: p,
3263
3264
  distComponents: f,
3264
3265
  distCdn: g,
3265
3266
  distCdnAssets: h
3266
- }, T.initialize(r.logger, l), r.root !== ii())
3267
+ }, T.initialize(r.logger, c), r.root !== ii())
3267
3268
  throw Error(
3268
3269
  b(
3269
3270
  V,
3270
3271
  "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/webgis-sdk/issues/2126 or contact Lumina maintainers."
3271
3272
  )
3272
3273
  );
3273
- p === l ? T.warn(
3274
+ p === c ? T.warn(
3274
3275
  V,
3275
3276
  "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/)"
3276
3277
  ) : m.startsWith("..") && T.warn(
@@ -3282,11 +3283,11 @@ class $ {
3282
3283
  extract: !0
3283
3284
  }, (this.viteCommand === "build" ? r.build.watch : r.server.watch) === null && (this.apiJsonDeferred = Promise.withResolvers())) : (this._localDefinedComponents = {}, this.options.build ??= {}, this.options.build.dependencies ??= {}, this.apiExtractorPluginConfig.serve = void 0, this.options.build.dependencies.silenceUnknownJsxElementUsage = () => !0);
3284
3285
  const C = this.viteCommand === "serve" && !this.isInStorybook, E = this.apiExtractorPluginConfig.unsafeConfigOverride;
3285
- C && (E.context.isLuminaMinimalExtraction = !0, E.types.typeCheckedExtraction = !1, E.types.fullTypeCheck = !1), this.isInStorybook && (E.context.dtsEmitPath = ""), this._typeScriptPrinter = Ws({
3286
+ C && (E.context.isLuminaMinimalExtraction = !0, E.types.typeCheckedExtraction = !1, E.types.fullTypeCheck = !1), this.isInStorybook && (E.context.dtsEmitPath = ""), this._typeScriptPrinter = Us({
3286
3287
  // Do not downlevel. ESBuild will do that if needed.
3287
3288
  target: o.ScriptTarget.ESNext,
3288
3289
  sourceMap: r.build.sourcemap !== !1
3289
- }), Yi(this) && ne(this);
3290
+ }), Yi(this) && oe(this);
3290
3291
  }
3291
3292
  },
3292
3293
  configureServer: {
@@ -3314,18 +3315,18 @@ class $ {
3314
3315
  webTypes: i.jetBrains === !1 ? void 0 : i.jetBrains?.webTypesFileName ? pe(i.jetBrains.webTypesFileName) : ue.webTypes,
3315
3316
  vsCodeHtml: i.vsCode === !1 ? void 0 : i.vsCode?.htmlFileName ? pe(i.vsCode.htmlFileName) : ue.vsCodeHtml,
3316
3317
  vsCodeCss: i.vsCode === !1 ? void 0 : i.vsCode?.cssFileName ? pe(i.vsCode.cssFileName) : ue.vsCodeCss
3317
- }, this.apiExtractorPluginConfig = this.options.apiExtractor ?? {}, this.configsPromise = oo(this);
3318
+ }, this.apiExtractorPluginConfig = this.options.apiExtractor ?? {}, this.configsPromise = ao(this);
3318
3319
  const s = process.cwd().length + 1;
3319
3320
  this.componentFilesPromise = this.configsPromise.then(() => {
3320
3321
  const r = this.apiExtractorPluginConfig.unsafeConfigOverride.types.typeScriptConfig.config.fileNames, a = [];
3321
- for (let l = 0; l < r.length; ++l) {
3322
- const c = r[l].slice(s);
3323
- Pe(c, "src/components") && a.push(c);
3322
+ for (let c = 0; c < r.length; ++c) {
3323
+ const l = r[c].slice(s);
3324
+ Pe(l, "src/components") && a.push(l);
3324
3325
  }
3325
3326
  return a;
3326
3327
  }), Ti(void 0, t);
3327
- const n = t.build?.preamble ?? Zn();
3328
- this.banner = eo(n);
3328
+ const n = t.build?.preamble ?? eo();
3329
+ this.banner = to(n);
3329
3330
  }
3330
3331
  _inferBuildSetup({ command: t, mode: i }, s) {
3331
3332
  this.isInTest = process.env.NODE_ENV === "test", i === "production" || i === "development" ? this.environment = i : i === "test" || i === "benchmark" ? (this.environment = "development", this.isInTest = !0) : (T.warn(Ei.name, `Vite is running in unknown mode "${i}". Assuming development`), this.environment = "development"), this.viteCommand = t;
@@ -3349,9 +3350,9 @@ class $ {
3349
3350
  )
3350
3351
  );
3351
3352
  if (r === void 0 && !n) {
3352
- const l = this._typeScriptSourceFiles.get(t);
3353
- if (l?.text === i)
3354
- return l;
3353
+ const c = this._typeScriptSourceFiles.get(t);
3354
+ if (c?.text === i)
3355
+ return c;
3355
3356
  }
3356
3357
  return i !== r?.text && ((this.viteCommand !== "serve" || this.isInStorybook) && T.warn(
3357
3358
  V,
@@ -3400,7 +3401,7 @@ class $ {
3400
3401
  if (Array.isArray(this.assetsToProvide))
3401
3402
  this.assetsToProvide.push({ assets: t, transformers: i, apply: s });
3402
3403
  else if (this.viteCommand === "serve")
3403
- s === "serve" && te(this, t, i);
3404
+ s === "serve" && ie(this, t, i);
3404
3405
  else
3405
3406
  throw Error(
3406
3407
  b(
@@ -3476,7 +3477,7 @@ I([
3476
3477
  I([
3477
3478
  k("configResolved()")
3478
3479
  ], $.prototype, "_typeScriptPrinter");
3479
- function co(e, t, i) {
3480
+ function lo(e, t, i) {
3480
3481
  const s = $i()[t] ?? Qi(e)[t];
3481
3482
  if (s === void 0) {
3482
3483
  if (e.options?.build?.dependencies?.silenceUnknownJsxElementUsage?.(t, i, e) === !0)
@@ -3491,7 +3492,7 @@ function co(e, t, i) {
3491
3492
  }
3492
3493
  return s;
3493
3494
  }
3494
- function lo(e, t) {
3495
+ function po(e, t) {
3495
3496
  return e.packageName === void 0 ? he(t, e.modulePath) : u.join(e.packageName, e.modulePath);
3496
3497
  }
3497
3498
  function Qi(e) {
@@ -3506,8 +3507,8 @@ function Qi(e) {
3506
3507
  e.viteCommand === "build"
3507
3508
  ), e._localDefinedComponents;
3508
3509
  }
3509
- const _t = "makeRuntime(", po = "@arcgis/core", uo = "@arcgis/lumina:injectRuntimeOptions", mo = (e) => ({
3510
- name: uo,
3510
+ const _t = "makeRuntime(", uo = "@arcgis/core", mo = "@arcgis/lumina:injectRuntimeOptions", fo = (e) => ({
3511
+ name: mo,
3511
3512
  transform: {
3512
3513
  filter: {
3513
3514
  id: /\/src\/runtime\.ts$/u
@@ -3534,7 +3535,7 @@ const _t = "makeRuntime(", po = "@arcgis/core", uo = "@arcgis/lumina:injectRunti
3534
3535
  // Dependency injection. Lumina cannot directly import these to avoid
3535
3536
  // a cyclical dependency.
3536
3537
  H ? `
3537
- import {createObservable,trackAccess,createTrackingTarget,runTracked} from "${po}/applications/Components/reactiveUtils.js";
3538
+ import {createObservable,trackAccess,createTrackingTarget,runTracked} from "${uo}/applications/Components/reactiveUtils.js";
3538
3539
  createObservable,
3539
3540
  runtime.t = trackAccess;
3540
3541
  runtime.o = createObservable;
@@ -3546,23 +3547,23 @@ runtime.r = runTracked;` : ""
3546
3547
  }
3547
3548
  }
3548
3549
  });
3549
- function fo(e) {
3550
- return `import "../${e.options.build?.cdn?.namespace === void 0 ? `${ce}/${Z}.css` : `${e.options.build.cdn.namespace}/${e.options.build.cdn.namespace}.css`}";
3550
+ function go(e) {
3551
+ return `import "../${e.options.build?.cdn?.namespace === void 0 ? `${le}/${Z}.css` : `${e.options.build.cdn.namespace}/${e.options.build.cdn.namespace}.css`}";
3551
3552
  `;
3552
3553
  }
3553
- const we = "@arcgis/lumina:addNonLazyImports", go = (e) => ({
3554
+ const we = "@arcgis/lumina:addNonLazyImports", ho = (e) => ({
3554
3555
  name: we,
3555
3556
  apply: () => e.viteCommand === "build",
3556
3557
  generateBundle(t, i) {
3557
3558
  const n = e.viteConfig.build.sourcemap !== !1 ? " " : `
3558
3559
  `;
3559
3560
  let r = !1;
3560
- if (Object.entries(i).forEach(([a, l]) => {
3561
+ if (Object.entries(i).forEach(([a, c]) => {
3561
3562
  const d = Ge(a, e.apiExtractor);
3562
- if (d !== a && (l.fileName = d), l.type === "chunk") {
3563
- const c = u.dirname(u.join(e.dir.dist, a)), p = d === a ? c : u.dirname(u.join(e.dir.dist, d));
3564
- let m = l.code;
3565
- m = an(m, e, p, c), !e.isInStorybook && d === "chunks/runtime.js" && (r = !0, m = fo(e) + m), m = `${e.banner}${n}${m}`, l.code = m;
3563
+ if (d !== a && (c.fileName = d), c.type === "chunk") {
3564
+ const l = u.dirname(u.join(e.dir.dist, a)), p = d === a ? l : u.dirname(u.join(e.dir.dist, d));
3565
+ let m = c.code;
3566
+ m = ln(m, e, p, l), !e.isInStorybook && d === "chunks/runtime.js" && (r = !0, m = go(e) + m), m = `${e.banner}${n}${m}`, c.code = m;
3566
3567
  }
3567
3568
  }), !r && !e.isInStorybook)
3568
3569
  throw Error(b(we, "Expected to find a chunks/runtime.js file in the Vite's build output."));
@@ -3573,18 +3574,18 @@ const we = "@arcgis/lumina:addNonLazyImports", go = (e) => ({
3573
3574
  const t = e._customElementDependencies, i = Object.entries(t), s = new Set(
3574
3575
  i.map(([r]) => r).filter((r) => Pe(r, e.dir.srcComponents))
3575
3576
  );
3576
- i.forEach(([r, { referencedTagNames: a, referencedDeferredTagNames: l, referencedBy: d }]) => {
3577
- if (s.has(r) || a.length === 0 && l.length === 0)
3577
+ i.forEach(([r, { referencedTagNames: a, referencedDeferredTagNames: c, referencedBy: d }]) => {
3578
+ if (s.has(r) || a.length === 0 && c.length === 0)
3578
3579
  return;
3579
- const c = Zi(t, d, s);
3580
- if (c.forEach((p) => {
3581
- t[p].referencedTagNames.splice(0, 0, ...a), t[p].referencedDeferredTagNames.splice(0, 0, ...l);
3582
- }), (a.length > 0 || l.length > 0) && c.length === 0) {
3580
+ const l = Zi(t, d, s);
3581
+ if (l.forEach((p) => {
3582
+ t[p].referencedTagNames.splice(0, 0, ...a), t[p].referencedDeferredTagNames.splice(0, 0, ...c);
3583
+ }), (a.length > 0 || c.length > 0) && l.length === 0) {
3583
3584
  const p = Re(r);
3584
3585
  throw Error(
3585
3586
  b(
3586
3587
  we,
3587
- `Unable to determine what files imported ${p}. This is necessary because this file referenced other web components (${[...a, ...l].join(", ")}), and so the compiler needs to know what component entrypoints these imports should be added to. Please double check if you are referencing ${p} in the code dynamically in the way that Lumina cannot detect, and report this issue to the Lumina maintainers.
3588
+ `Unable to determine what files imported ${p}. This is necessary because this file referenced other web components (${[...a, ...c].join(", ")}), and so the compiler needs to know what component entrypoints these imports should be added to. Please double check if you are referencing ${p} in the code dynamically in the way that Lumina cannot detect, and report this issue to the Lumina maintainers.
3588
3589
 
3589
3590
  Possible causes:
3590
3591
  - You are re-exporting a functional component from a barrel file. Refactor such cases to import the functional component directly from the file that declares it.
@@ -3594,19 +3595,19 @@ Possible causes:
3594
3595
  );
3595
3596
  }
3596
3597
  });
3597
- const n = i.flatMap(async ([r, { referencedTagNames: a, referencedDeferredTagNames: l }]) => {
3598
+ const n = i.flatMap(async ([r, { referencedTagNames: a, referencedDeferredTagNames: c }]) => {
3598
3599
  if (!s.has(r))
3599
3600
  return [];
3600
- const d = u.dirname(r), c = e.dir.src + Ge(d.slice(e.dir.src.length), e.apiExtractor), p = u.relative(e.dir.src, c);
3601
+ const d = u.dirname(r), l = e.dir.src + Ge(d.slice(e.dir.src.length), e.apiExtractor), p = u.relative(e.dir.src, l);
3601
3602
  function m(P) {
3602
- const x = co(e, P, r);
3603
+ const x = lo(e, P, r);
3603
3604
  if (x === void 0)
3604
3605
  return;
3605
- const S = lo(x, p);
3606
+ const S = po(x, p);
3606
3607
  if (S !== `./${p}`)
3607
3608
  return S.startsWith(".") ? `${S}/${Kt}` : S;
3608
3609
  }
3609
- const f = new Set(a), g = new Set(l), h = Array.from(f, m).filter(R), y = (P) => `import "${P}";
3610
+ const f = new Set(a), g = new Set(c), h = Array.from(f, m).filter(R), y = (P) => `import "${P}";
3610
3611
  `, v = h.map(y).join(""), w = Array.from(g, (P) => {
3611
3612
  const x = m(P);
3612
3613
  if (x !== void 0) {
@@ -3647,14 +3648,14 @@ function ee(e) {
3647
3648
  return (
3648
3649
  // Inlined string literal
3649
3650
  typeof e == "string" || // Syntax kinds that are never undefined
3650
- ho.has(e.kind) || // Ternary with both branches never undefined
3651
+ yo.has(e.kind) || // Ternary with both branches never undefined
3651
3652
  o.isConditionalExpression(e) && ee(e.whenTrue) && ee(e.whenFalse) || // Binary expression with operator that never results in undefined Or both sides are definitely not undefined
3652
- o.isBinaryExpression(e) && (yo.has(e.operatorToken.kind) || ee(e.left) && ee(e.right)) || // `as`, `satisfies`, `()` with definitely not undefined expression
3653
+ o.isBinaryExpression(e) && (vo.has(e.operatorToken.kind) || ee(e.left) && ee(e.right)) || // `as`, `satisfies`, `()` with definitely not undefined expression
3653
3654
  (o.isParenthesizedExpression(e) || o.isSatisfiesExpression(e) || o.isAsExpression(e)) && ee(e.expression) || // JSX that got converted to html`<p>Something</p>`
3654
- o.isTaggedTemplateExpression(e) && o.isIdentifier(e.tag) && ar.has(e.tag.text)
3655
+ o.isTaggedTemplateExpression(e) && o.isIdentifier(e.tag) && cr.has(e.tag.text)
3655
3656
  );
3656
3657
  }
3657
- const ho = /* @__PURE__ */ new Set([
3658
+ const yo = /* @__PURE__ */ new Set([
3658
3659
  o.SyntaxKind.NumericLiteral,
3659
3660
  o.SyntaxKind.BigIntLiteral,
3660
3661
  o.SyntaxKind.StringLiteral,
@@ -3673,7 +3674,7 @@ const ho = /* @__PURE__ */ new Set([
3673
3674
  o.SyntaxKind.ClassExpression,
3674
3675
  // Trust? Trust.
3675
3676
  o.SyntaxKind.NonNullExpression
3676
- ]), yo = /* @__PURE__ */ new Set([
3677
+ ]), vo = /* @__PURE__ */ new Set([
3677
3678
  o.SyntaxKind.PlusEqualsToken,
3678
3679
  o.SyntaxKind.MinusEqualsToken,
3679
3680
  o.SyntaxKind.AsteriskAsteriskEqualsToken,
@@ -3708,9 +3709,9 @@ const ho = /* @__PURE__ */ new Set([
3708
3709
  o.SyntaxKind.SlashToken,
3709
3710
  o.SyntaxKind.PercentToken,
3710
3711
  o.SyntaxKind.AsteriskAsteriskToken
3711
- ]), vo = {
3712
+ ]), bo = {
3712
3713
  property(e, t, i, s) {
3713
- const n = bo(s, i, e), r = n?.type === "stringifiedReflected", a = n?.type === "reflected" || r;
3714
+ const n = wo(s, i, e), r = n?.type === "stringifiedReflected", a = n?.type === "reflected" || r;
3714
3715
  if (a) {
3715
3716
  const f = He(t);
3716
3717
  if (f === !0)
@@ -3718,20 +3719,20 @@ const ho = /* @__PURE__ */ new Set([
3718
3719
  if (f === !1)
3719
3720
  return [];
3720
3721
  }
3721
- const l = t === void 0 ? ["=", o.factory.createToken(o.SyntaxKind.TrueKeyword)] : Ee(e, t, a), d = l[0] !== "=";
3722
+ const c = t === void 0 ? ["=", o.factory.createToken(o.SyntaxKind.TrueKeyword)] : Ee(e, t, a), d = c[0] !== "=";
3722
3723
  if (a && d)
3723
- return [n.name, ...l];
3724
- const [c, p] = l, m = n?.type === "stringifiedNonReflected";
3724
+ return [n.name, ...c];
3725
+ const [l, p] = c, m = n?.type === "stringifiedNonReflected";
3725
3726
  if (r || m) {
3726
3727
  const f = Wt(
3727
3728
  p,
3728
3729
  e,
3729
3730
  m ? "" : void 0
3730
- ), h = i === "value" && (s === "input" || s === "textarea" || s === ke) ? So(f, e) : f;
3731
+ ), h = i === "value" && (s === "input" || s === "textarea" || s === ke) ? Co(f, e) : f;
3731
3732
  if (h !== p)
3732
- return [m ? `.${i}` : n.name, c, h];
3733
+ return [m ? `.${i}` : n.name, l, h];
3733
3734
  }
3734
- return [`.${i}`, ...l];
3735
+ return [`.${i}`, ...c];
3735
3736
  },
3736
3737
  attribute(e, t, i) {
3737
3738
  const s = t === void 0 || He(t);
@@ -3800,7 +3801,7 @@ const ho = /* @__PURE__ */ new Set([
3800
3801
  return [o.factory.createIdentifier(n)];
3801
3802
  }
3802
3803
  };
3803
- function bo(e, t, i) {
3804
+ function wo(e, t, i) {
3804
3805
  if (typeof e == "string") {
3805
3806
  const r = (i.externalComponents[e] ?? i.localComponents[e])?.propToAttribute?.[t];
3806
3807
  if (r !== void 0)
@@ -3875,7 +3876,7 @@ function Ut(e, t) {
3875
3876
  if (i.length === 0)
3876
3877
  return [];
3877
3878
  const s = mi(i);
3878
- if (ir(s)) {
3879
+ if (sr(s)) {
3879
3880
  const n = s.replaceAll('"', "&#34;");
3880
3881
  if (n.length > s.length) {
3881
3882
  const r = s.replaceAll("'", "&#39;");
@@ -3894,25 +3895,25 @@ function zt(e, t, i) {
3894
3895
  `${i} prop value must be an expression. Found ${String(t?.getText(e.sourceFile))}`
3895
3896
  );
3896
3897
  const s = t.expression;
3897
- if (wo(s)) {
3898
+ if (So(s)) {
3898
3899
  const r = i === "class" ? "safeClassMap" : "safeStyleMap";
3899
3900
  e.neededImports.add(r);
3900
- const a = e.importRenames[r], l = o.factory.createCallExpression(o.factory.createIdentifier(a), void 0, [
3901
+ const a = e.importRenames[r], c = o.factory.createCallExpression(o.factory.createIdentifier(a), void 0, [
3901
3902
  q(e, void 0, s)
3902
3903
  ]);
3903
- return [`${i}=`, l];
3904
+ return [`${i}=`, c];
3904
3905
  } else
3905
3906
  return [i, ...Ee(e, t, !0)];
3906
3907
  }
3907
- const wo = (e) => o.isObjectLiteralExpression(e) || o.isPropertyAccessExpression(e) || o.isIdentifier(e) || o.isCallExpression(e) || o.isBinaryExpression(e) || o.isConditionalExpression(e);
3908
- function So(e, t) {
3908
+ const So = (e) => o.isObjectLiteralExpression(e) || o.isPropertyAccessExpression(e) || o.isIdentifier(e) || o.isCallExpression(e) || o.isBinaryExpression(e) || o.isConditionalExpression(e);
3909
+ function Co(e, t) {
3909
3910
  t.neededImports.add("live");
3910
3911
  const i = t.importRenames.live;
3911
3912
  return o.factory.createCallExpression(o.factory.createIdentifier(i), void 0, [
3912
3913
  typeof e == "string" ? o.factory.createStringLiteral(e) : e
3913
3914
  ]);
3914
3915
  }
3915
- function Co(e) {
3916
+ function Eo(e) {
3916
3917
  if (e && o.isJsxExpression(e) && e.expression && o.isCallExpression(e.expression) && o.isIdentifier(e.expression.expression) && e.expression.expression.text in Ht && e.expression.arguments.length <= 1)
3917
3918
  return {
3918
3919
  propType: Ht[e.expression.expression.text],
@@ -3930,15 +3931,15 @@ const Ht = {
3930
3931
  bindBooleanAttribute: "booleanAttribute",
3931
3932
  bindEvent: "event"
3932
3933
  };
3933
- function Eo(e, t, i) {
3934
- return $o.has(e) ? e : e.startsWith("on") && t !== void 0 && o.isJsxExpression(t) && t.expression !== void 0 ? "event" : li.has(e) || e.includes("-") ? "attribute" : !lt(i) && (di.has(e) || (i === Ye ? !1 : i === ke ? (
3934
+ function To(e, t, i) {
3935
+ return Po.has(e) ? e : e.startsWith("on") && t !== void 0 && o.isJsxExpression(t) && t.expression !== void 0 ? "event" : li.has(e) || e.includes("-") ? "attribute" : !lt(i) && (di.has(e) || (i === Ye ? !1 : i === ke ? (
3935
3936
  // When tag name is dynamic, we can't help but check if the prop name matches an "always attribute" in any html element
3936
3937
  Object.values(Qe).some((r) => r.has(e))
3937
3938
  ) : Qe[i]?.has(e) === !0)) ? Tt.has(e) ? "booleanAttribute" : "attribute" : i === "svg" || i === "math" || i === Ye || i !== ke && (at.has(i) || ct.has(i)) ? e in W.common.reflected || e in W.common.stringifiedReflected || e in W.common.stringifiedNonReflected ? "property" : Tt.has(e) ? "booleanAttribute" : "attribute" : "property";
3938
3939
  }
3939
- const To = ["class", "style", "ref", "directives", "key", "deferLoad"], $o = new Set(To), Po = (e) => typeof e != "string" || e.trim().length > 0;
3940
+ const $o = ["class", "style", "ref", "directives", "key", "deferLoad"], Po = new Set($o), ko = (e) => typeof e != "string" || e.trim().length > 0;
3940
3941
  function Oe({ key: e, parts: t, litTag: i }, s) {
3941
- const n = ko(t);
3942
+ const n = Io(t);
3942
3943
  if (n.length % 2 === 0)
3943
3944
  throw new Error("Normalized template parts array length must be odd");
3944
3945
  const [r, ...a] = n;
@@ -3954,16 +3955,16 @@ function Oe({ key: e, parts: t, litTag: i }, s) {
3954
3955
  typeof a[0] == "string" ? o.factory.createStringLiteral(r) : a[0]
3955
3956
  );
3956
3957
  }
3957
- const l = typeof i == "string" ? i : ae;
3958
- s.neededImports.add(l);
3959
- const d = s.importRenames[l], c = o.factory.createTaggedTemplateExpression(
3958
+ const c = typeof i == "string" ? i : ce;
3959
+ s.neededImports.add(c);
3960
+ const d = s.importRenames[c], l = o.factory.createTaggedTemplateExpression(
3960
3961
  o.factory.createIdentifier(d),
3961
3962
  void 0,
3962
- a.length === 0 ? o.factory.createNoSubstitutionTemplateLiteral(r) : o.factory.createTemplateExpression(o.factory.createTemplateHead(r), Io(a))
3963
+ a.length === 0 ? o.factory.createNoSubstitutionTemplateLiteral(r) : o.factory.createTemplateExpression(o.factory.createTemplateHead(r), xo(a))
3963
3964
  );
3964
- return qe(s, e, c);
3965
+ return qe(s, e, l);
3965
3966
  }
3966
- const ko = (e) => e.reduce(
3967
+ const Io = (e) => e.reduce(
3967
3968
  (t, i, s) => {
3968
3969
  const n = t.at(-1), r = typeof n == "string", a = typeof i == "string";
3969
3970
  if (r && a)
@@ -3973,7 +3974,7 @@ const ko = (e) => e.reduce(
3973
3974
  },
3974
3975
  [""]
3975
3976
  );
3976
- function Io(e) {
3977
+ function xo(e) {
3977
3978
  if (!(e.length % 2 === 0))
3978
3979
  throw new Error("templatePartsToSpans should be called with normalized parts array without the first item");
3979
3980
  const i = e.length / 2;
@@ -3981,13 +3982,13 @@ function Io(e) {
3981
3982
  const r = n * 2, a = e[r];
3982
3983
  if (typeof a == "string")
3983
3984
  throw new Error("Expected to receive a normalized array of parts");
3984
- const l = r + 1, d = e[l];
3985
+ const c = r + 1, d = e[c];
3985
3986
  if (typeof d != "string")
3986
3987
  throw new Error("Expected to receive a normalized array of parts");
3987
- const c = n === i - 1;
3988
+ const l = n === i - 1;
3988
3989
  return o.factory.createTemplateSpan(
3989
3990
  a,
3990
- c ? o.factory.createTemplateTail(d) : o.factory.createTemplateMiddle(d)
3991
+ l ? o.factory.createTemplateTail(d) : o.factory.createTemplateMiddle(d)
3991
3992
  );
3992
3993
  });
3993
3994
  }
@@ -4012,21 +4013,21 @@ function ts(e, t) {
4012
4013
  );
4013
4014
  }
4014
4015
  const gt = (e) => e.trim().length === 0 ? [] : o.getLeadingCommentRanges(e, 0) ?? [];
4015
- function xo(e) {
4016
+ function Ao(e) {
4016
4017
  const t = gt(e);
4017
4018
  if (t.length === 0)
4018
4019
  return [e || " "];
4019
4020
  const i = t.reduceRight(
4020
4021
  ([n, ...r], a) => {
4021
- const l = Ao(n), d = is(l.slice(a.pos, a.end));
4022
+ const c = Lo(n), d = is(c.slice(a.pos, a.end));
4022
4023
  return [
4023
- l.slice(0, a.pos),
4024
+ c.slice(0, a.pos),
4024
4025
  /**
4025
4026
  * Literal values (like this) in place of directives are ignored by Lit:
4026
4027
  * https://github.com/lit/lit/blob/56cb2ca4a86f2c7f6af757c612f05e50d1966615/packages/lit-html/src/lit-html.ts#L1111
4027
4028
  */
4028
4029
  o.factory.createNoSubstitutionTemplateLiteral(d),
4029
- l.slice(a.end),
4030
+ c.slice(a.end),
4030
4031
  ...r
4031
4032
  ];
4032
4033
  },
@@ -4037,12 +4038,12 @@ function xo(e) {
4037
4038
  return (typeof s != "string" || s.trim() !== "") && i.push(" "), i;
4038
4039
  }
4039
4040
  const is = (e) => e.startsWith("//") ? e.slice(2) : e.slice(2, -2);
4040
- function Ao(e) {
4041
+ function Lo(e) {
4041
4042
  if (typeof e == "string")
4042
4043
  return e;
4043
4044
  throw new Error(`Expected string, got ${typeof e}: ${String(e)}`);
4044
4045
  }
4045
- function Lo(e, t) {
4046
+ function No(e, t) {
4046
4047
  if (!(o.isPropertyAccessExpression(t.expression) && t.expression.name.text === "map"))
4047
4048
  return t;
4048
4049
  const s = t.arguments[0];
@@ -4052,31 +4053,31 @@ function Lo(e, t) {
4052
4053
  if (!(typeof r == "object" && // If .map() callback has 3rd argument, it's not supported
4053
4054
  s.parameters.length <= 2))
4054
4055
  return t;
4055
- const l = ge(s.body);
4056
- let d = !0, c;
4057
- if (qt(l))
4058
- c = l;
4056
+ const c = ge(s.body);
4057
+ let d = !0, l;
4058
+ if (qt(c))
4059
+ l = c;
4059
4060
  else {
4060
- if (!o.isBlock(l))
4061
+ if (!o.isBlock(c))
4061
4062
  return t;
4062
- const v = l.statements.at(-1);
4063
+ const v = c.statements.at(-1);
4063
4064
  if (!(v && o.isReturnStatement(v) && v.expression))
4064
4065
  return t;
4065
4066
  const C = ge(v.expression);
4066
4067
  if (!qt(C))
4067
4068
  return t;
4068
- const E = l.statements.slice(0, -1);
4069
+ const E = c.statements.slice(0, -1);
4069
4070
  if (E.some(ss))
4070
4071
  return t;
4071
- d = E.length === 0, c = C;
4072
+ d = E.length === 0, l = C;
4072
4073
  }
4073
- const p = o.isJsxElement(c) ? c.openingElement : c, m = cs(p);
4074
+ const p = o.isJsxElement(l) ? l.openingElement : l, m = cs(p);
4074
4075
  if (m === -1)
4075
4076
  return t;
4076
4077
  const f = p.attributes.properties[m];
4077
4078
  if (f === void 0 || !o.isJsxAttribute(f))
4078
4079
  return t;
4079
- const g = ft(f.initializer, e.sourceFile), h = No(r, s, g, d, e);
4080
+ const g = ft(f.initializer, e.sourceFile), h = jo(r, s, g, d, e);
4080
4081
  if (h === void 0)
4081
4082
  return t;
4082
4083
  e.liftedKeys.add(f.name), e.neededImports.add("repeat");
@@ -4094,7 +4095,7 @@ function Lo(e, t) {
4094
4095
  s.parameters,
4095
4096
  s.type,
4096
4097
  s.equalsGreaterThanToken,
4097
- l
4098
+ c
4098
4099
  )
4099
4100
  ]);
4100
4101
  }
@@ -4109,14 +4110,14 @@ function ss(e) {
4109
4110
  void 0
4110
4111
  ), t;
4111
4112
  }
4112
- function No(e, t, i, s, n) {
4113
+ function jo(e, t, i, s, n) {
4113
4114
  const r = J(i);
4114
4115
  if (r === void 0)
4115
4116
  return;
4116
4117
  let a = rs(e.name, r);
4117
- const l = t.parameters.at(1);
4118
- if (l !== void 0 && o.isIdentifier(l.name) && // A more basic check is also provided in lumina/no-unnecessary-key rule
4119
- r.every(Fe, l.name)) {
4118
+ const c = t.parameters.at(1);
4119
+ if (c !== void 0 && o.isIdentifier(c.name) && // A more basic check is also provided in lumina/no-unnecessary-key rule
4120
+ r.every(Fe, c.name)) {
4120
4121
  T.warn(
4121
4122
  "@arcgis/lumina:jsxToLitHtml",
4122
4123
  "It looks like you are trying to use .map() index as a key={} prop value. Doing so is potentially pointless and may cause performance degradation. In Lit it is safe to omit the key={} prop. If you really mean to use index as the key, then use the keyed() Lit directive directly, rather than the JSX key={} prop.",
@@ -4125,7 +4126,7 @@ function No(e, t, i, s, n) {
4125
4126
  return;
4126
4127
  }
4127
4128
  if (!s) {
4128
- const d = Fo(r, a, t);
4129
+ const d = Ro(r, a, t);
4129
4130
  if (d === void 0)
4130
4131
  return;
4131
4132
  a = d;
@@ -4164,7 +4165,7 @@ function J(e) {
4164
4165
  }
4165
4166
  return t;
4166
4167
  } else {
4167
- if (jo.has(e.kind))
4168
+ if (Fo.has(e.kind))
4168
4169
  return [];
4169
4170
  {
4170
4171
  const t = ge(e);
@@ -4172,7 +4173,7 @@ function J(e) {
4172
4173
  }
4173
4174
  }
4174
4175
  }
4175
- const jo = /* @__PURE__ */ new Set([
4176
+ const Fo = /* @__PURE__ */ new Set([
4176
4177
  o.SyntaxKind.NumericLiteral,
4177
4178
  o.SyntaxKind.BigIntLiteral,
4178
4179
  o.SyntaxKind.StringLiteral,
@@ -4181,12 +4182,12 @@ const jo = /* @__PURE__ */ new Set([
4181
4182
  o.SyntaxKind.FalseKeyword,
4182
4183
  o.SyntaxKind.NullKeyword,
4183
4184
  o.SyntaxKind.TrueKeyword
4184
- ]), ge = (e) => o.isAsExpression(e) || o.isNonNullExpression(e) || o.isSatisfiesExpression(e) || o.isParenthesizedExpression(e) ? ge(e.expression) : e, rs = (e, t) => o.isObjectBindingPattern(e) ? Oo(e, t) : e;
4185
- function Fo(e, t, i) {
4185
+ ]), ge = (e) => o.isAsExpression(e) || o.isNonNullExpression(e) || o.isSatisfiesExpression(e) || o.isParenthesizedExpression(e) ? ge(e.expression) : e, rs = (e, t) => o.isObjectBindingPattern(e) ? Mo(e, t) : e;
4186
+ function Ro(e, t, i) {
4186
4187
  if (e.every(Fe, t))
4187
4188
  return t;
4188
4189
  if (o.isIdentifier(t)) {
4189
- const s = o.isBlock(i.body) ? Xe(i.body.statements, (r) => Ro(r, t)) : void 0;
4190
+ const s = o.isBlock(i.body) ? Xe(i.body.statements, (r) => Do(r, t)) : void 0;
4190
4191
  if (s === void 0)
4191
4192
  return;
4192
4193
  const n = rs(s, e);
@@ -4194,7 +4195,7 @@ function Fo(e, t, i) {
4194
4195
  return n;
4195
4196
  }
4196
4197
  }
4197
- function Ro(e, t) {
4198
+ function Do(e, t) {
4198
4199
  if (!o.isVariableStatement(e) || !(e.declarationList.flags & o.NodeFlags.Const))
4199
4200
  return;
4200
4201
  const i = e.declarationList.declarations[0];
@@ -4202,13 +4203,13 @@ function Ro(e, t) {
4202
4203
  }
4203
4204
  function Fe(e) {
4204
4205
  const t = this;
4205
- return o.isIdentifier(t) ? t.text === e : t.elements.some(Do, e);
4206
+ return o.isIdentifier(t) ? t.text === e : t.elements.some(Oo, e);
4206
4207
  }
4207
- function Do(e) {
4208
+ function Oo(e) {
4208
4209
  const t = this;
4209
4210
  return o.isOmittedExpression(e) ? !1 : Fe.call(e.name, t);
4210
4211
  }
4211
- function Oo(e, t) {
4212
+ function Mo(e, t) {
4212
4213
  let i = !1;
4213
4214
  const s = e.elements.filter((n) => o.isIdentifier(n.name) ? t.includes(n.name.text) : (i = !0, !0));
4214
4215
  return i || s.length === 0 ? e : o.factory.updateObjectBindingPattern(e, s);
@@ -4217,13 +4218,13 @@ const ns = (e, t) => t.liftedKeys.has(e);
4217
4218
  function q(e, t, i) {
4218
4219
  if (fe(i))
4219
4220
  return os(e, i);
4220
- const s = o.isCallExpression(i) ? Lo(e, i) : i, n = o.visitEachChild(
4221
+ const s = o.isCallExpression(i) ? No(e, i) : i, n = o.visitEachChild(
4221
4222
  s,
4222
4223
  // Do not add "" if parent is binary expression to not turn {(a && <b />) || c} into {(a && <b />) || "" || c}
4223
4224
  q.bind(null, e, t !== void 0 && o.isBinaryExpression(t) ? void 0 : i),
4224
4225
  e.transformationContext
4225
4226
  );
4226
- return t !== void 0 && o.isBinaryExpression(i) && (o.isJsxExpression(t) || fe(ge(i.right)) || pr(i.right)) ? Bo(n) : n;
4227
+ return t !== void 0 && o.isBinaryExpression(i) && (o.isJsxExpression(t) || fe(ge(i.right)) || ur(i.right)) ? _o(n) : n;
4227
4228
  }
4228
4229
  function os(e, t) {
4229
4230
  const i = as(e, t);
@@ -4237,17 +4238,17 @@ function as(e, t) {
4237
4238
  if (o.isJsxNamespacedName(r))
4238
4239
  throw Error(`JSX namespaced elements are not supported. Found ${r.getText(e.sourceFile)} `);
4239
4240
  if (!o.isIdentifier(r) || !r.text.startsWith(r.text[0].toLowerCase()) && r.text !== Be && r.text !== _e) {
4240
- const S = o.isIdentifier(r) && r.text === Gs ? Te(i, e) : {
4241
+ const S = o.isIdentifier(r) && r.text === Xs ? Te(i, e) : {
4241
4242
  // No need to wrap the function call in a lit-html tag
4242
4243
  litTag: void 0,
4243
- parts: [Jo(e, t, r, i)]
4244
+ parts: [Bo(e, t, r, i)]
4244
4245
  };
4245
4246
  return {
4246
- key: Mo(n, e),
4247
+ key: Jo(n, e),
4247
4248
  ...S
4248
4249
  };
4249
4250
  }
4250
- const l = r.text === Be ? ke : r.text === _e ? Ye : r.text, d = r.text === Be ? oe : r.text === _e ? Y : Ys.has(l) ? fi : at.has(l) ? ie : ae, c = lt(l), p = c ? e.localComponents[l]?.requiredProperties : void 0, m = p === void 0 ? void 0 : new Set(p);
4251
+ const c = r.text === Be ? ke : r.text === _e ? Ye : r.text, d = r.text === Be ? ae : r.text === _e ? Y : Qs.has(c) ? fi : at.has(c) ? se : ce, l = lt(c), p = l ? e.localComponents[c]?.requiredProperties : void 0, m = p === void 0 ? void 0 : new Set(p);
4251
4252
  let f;
4252
4253
  const g = [];
4253
4254
  let h = !1;
@@ -4260,13 +4261,13 @@ Found ${x.getText(e.sourceFile)}`
4260
4261
  const { name: S, initializer: A } = x;
4261
4262
  if (o.isJsxNamespacedName(S))
4262
4263
  throw Error(`JSX namespaced attributes are not supported. Found ${S.getText(e.sourceFile)}`);
4263
- const L = S.text, U = Co(A), F = U?.propType ?? Eo(L, A, l);
4264
+ const L = S.text, U = Eo(A), F = U?.propType ?? To(L, A, c);
4264
4265
  m?.delete(L);
4265
- const N = vo[F](e, U?.initializer ?? A, L, l);
4266
+ const N = bo[F](e, U?.initializer ?? A, L, c);
4266
4267
  if (N.length === 0)
4267
4268
  return [];
4268
- const B = e.compiler.shouldMinifyJsx ? [" "] : xo(es(S, e));
4269
- return F === "key" ? (f = typeof N[0] == "object" && !ns(S, e) ? N[0] : void 0, B.some(Po) ? B : []) : F === "directives" || F === "ref" || L === "deferLoad" ? (h ||= F === "deferLoad", g.push(
4269
+ const B = e.compiler.shouldMinifyJsx ? [" "] : Ao(es(S, e));
4270
+ return F === "key" ? (f = typeof N[0] == "object" && !ns(S, e) ? N[0] : void 0, B.some(ko) ? B : []) : F === "directives" || F === "ref" || L === "deferLoad" ? (h ||= F === "deferLoad", g.push(
4270
4271
  ...B,
4271
4272
  ...N.flatMap(
4272
4273
  (D, M) => typeof D == "string" || M === 0 || typeof N[M - 1] == "string" ? D : [" ", D]
@@ -4276,20 +4277,20 @@ Found ${x.getText(e.sourceFile)}`
4276
4277
  if (m !== void 0 && m.size > 0 && e.compiler.logLintError(
4277
4278
  "mustIncludeAllRequiredProperties",
4278
4279
  e.sourceFile.fileName,
4279
- `Missing required properties for <${l}> }: ${Array.from(m).join(", ")}`
4280
- ), g.length > 0 && y.push(...g), typeof l == "string" && ct.has(l))
4280
+ `Missing required properties for <${c}> }: ${Array.from(m).join(", ")}`
4281
+ ), g.length > 0 && y.push(...g), typeof c == "string" && ct.has(c))
4281
4282
  throw Error(
4282
- `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 "${l}" element`
4283
+ `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`
4283
4284
  );
4284
- c && (h ? e.customElementsToImportDeferred.add(l) : e.customElementsToImport.add(l));
4285
- const v = typeof l == "string" && Xs.has(l), w = Te(i, e);
4285
+ l && (h ? e.customElementsToImportDeferred.add(c) : e.customElementsToImport.add(c));
4286
+ const v = typeof c == "string" && Ys.has(c), w = Te(i, e);
4286
4287
  if (v && w.parts.length > 0)
4287
4288
  throw Error(
4288
- `Void HTML elements like <${l}> cannot have children. Found ${t.getText(e.sourceFile)}`
4289
+ `Void HTML elements like <${c}> cannot have children. Found ${t.getText(e.sourceFile)}`
4289
4290
  );
4290
- const C = (d === ie || d === Y) && w.parts.length === 0, E = [
4291
+ const C = (d === se || d === Y) && w.parts.length === 0, E = [
4291
4292
  "<",
4292
- typeof l == "string" ? l : r,
4293
+ typeof c == "string" ? c : r,
4293
4294
  ...y,
4294
4295
  C ? `${y.length === 0 ? "" : " "}/>` : ">"
4295
4296
  ], P = v || C ? E : [
@@ -4301,32 +4302,32 @@ Found ${x.getText(e.sourceFile)}`
4301
4302
  */
4302
4303
  ...w.litTag !== void 0 && w.litTag !== d ? [Oe({ key: void 0, ...w }, e)] : w.parts,
4303
4304
  "</",
4304
- typeof l == "string" ? l : r,
4305
+ typeof c == "string" ? c : r,
4305
4306
  ">"
4306
4307
  ];
4307
4308
  return { key: f, parts: P, litTag: d };
4308
4309
  }
4309
- function Mo(e, t) {
4310
+ function Jo(e, t) {
4310
4311
  const i = e.attributes.properties[cs(e)];
4311
4312
  return i && o.isJsxAttribute(i) && !ns(i.name, t) ? ft(i.initializer, t.sourceFile) : void 0;
4312
4313
  }
4313
4314
  const cs = (e) => e.attributes.properties.findIndex(({ name: t }) => t && o.isIdentifier(t) && t.text === "key");
4314
- function Jo(e, t, i, s) {
4315
+ function Bo(e, t, i, s) {
4315
4316
  const r = (o.isJsxElement(t) ? t.openingElement : t).attributes.properties.map((d) => {
4316
4317
  if (o.isJsxSpreadAttribute(d))
4317
4318
  return ts(es(d, e), o.factory.createSpreadAssignment(d.expression));
4318
- const { name: c, initializer: p } = d;
4319
- if (o.isJsxNamespacedName(c))
4320
- throw Error(`JSX namespaced attributes are not supported. Found ${c.getText(e.sourceFile)}`);
4321
- if (c.text === "key")
4319
+ const { name: l, initializer: p } = d;
4320
+ if (o.isJsxNamespacedName(l))
4321
+ throw Error(`JSX namespaced attributes are not supported. Found ${l.getText(e.sourceFile)}`);
4322
+ if (l.text === "key")
4322
4323
  return;
4323
- const m = p === void 0 ? o.factory.createTrue() : o.isStringLiteral(p) ? p : fe(p) ? os(e, p) : q(e, void 0, p.expression ?? o.factory.createIdentifier("undefined")), f = oi(c.text) ? o.factory.createStringLiteral(c.text) : c;
4324
+ const m = p === void 0 ? o.factory.createTrue() : o.isStringLiteral(p) ? p : fe(p) ? os(e, p) : q(e, void 0, p.expression ?? o.factory.createIdentifier("undefined")), f = oi(l.text) ? o.factory.createStringLiteral(l.text) : l;
4324
4325
  return o.factory.createPropertyAssignment(f, m);
4325
- }), { parts: a, litTag: l } = Te(s, e);
4326
+ }), { parts: a, litTag: c } = Te(s, e);
4326
4327
  return a.length > 0 && r.push(
4327
4328
  o.factory.createPropertyAssignment(
4328
4329
  o.factory.createIdentifier("children"),
4329
- Oe({ key: void 0, parts: a, litTag: l }, e)
4330
+ Oe({ key: void 0, parts: a, litTag: c }, e)
4330
4331
  )
4331
4332
  ), o.factory.createCallExpression(i, void 0, [
4332
4333
  o.factory.createObjectLiteralExpression(r.filter(R))
@@ -4336,12 +4337,12 @@ function Te(e, t) {
4336
4337
  let i;
4337
4338
  const s = e.flatMap((n) => {
4338
4339
  if (o.isJsxText(n))
4339
- return [t.compiler.shouldMinifyJsx ? Zs(n.text) : n.text];
4340
+ return [t.compiler.shouldMinifyJsx ? er(n.text) : n.text];
4340
4341
  if (o.isJsxExpression(n))
4341
4342
  return ht(t, n, n);
4342
4343
  {
4343
4344
  const r = as(t, n);
4344
- if (r.key === void 0 && r.litTag !== oe && r.litTag !== Y) {
4345
+ if (r.key === void 0 && r.litTag !== ae && r.litTag !== Y) {
4345
4346
  if (r.litTag === fi)
4346
4347
  return r.parts;
4347
4348
  if (i !== void 0 && r.litTag !== void 0 && i !== r.litTag)
@@ -4355,7 +4356,7 @@ function Te(e, t) {
4355
4356
  });
4356
4357
  return { litTag: i, parts: s };
4357
4358
  }
4358
- function Bo(e) {
4359
+ function _o(e) {
4359
4360
  return e.operatorToken.kind === o.SyntaxKind.AmpersandAmpersandToken ? o.factory.createBinaryExpression(
4360
4361
  e,
4361
4362
  o.factory.createToken(o.SyntaxKind.BarBarToken),
@@ -4407,25 +4408,25 @@ function ht(e, t, i) {
4407
4408
  );
4408
4409
  }
4409
4410
  const ls = (e) => e.reduce((t, [i, s]) => (t[i] ??= [], t[i].push(s), t), {}), ds = ls(
4410
- Object.entries(se).flatMap(
4411
+ Object.entries(re).flatMap(
4411
4412
  ([e, t]) => t.map((i) => [i, e])
4412
4413
  )
4413
4414
  ), ps = new Set(Object.keys(ds));
4414
- function _o(e, t) {
4415
+ function Ko(e, t) {
4415
4416
  const i = t.importClause, s = i === void 0, n = t.moduleSpecifier;
4416
4417
  if (!o.isStringLiteral(n))
4417
4418
  return t;
4418
- const r = Ko(e.sourceFile.fileName, n.text, ""), a = !i?.isTypeOnly;
4419
- if (a && e.existingImportedModules.add(r), mr.test(n.text) && // If id already includes ?, bypass our custom behavior
4419
+ const r = Wo(e.sourceFile.fileName, n.text, ""), a = !i?.isTypeOnly;
4420
+ if (a && e.existingImportedModules.add(r), fr.test(n.text) && // If id already includes ?, bypass our custom behavior
4420
4421
  !n.text.includes("?")) {
4421
4422
  if (s) {
4422
4423
  if (e.compiler.viteCommand !== "build" || e.compiler.isInStorybook || e.compiler.isInTest)
4423
4424
  return t;
4424
- const c = e.sourceFile.fileName, p = c.includes("/node_modules/") || c.includes("/dist/"), m = `import "${n.text}"`;
4425
+ const l = e.sourceFile.fileName, p = l.includes("/node_modules/") || l.includes("/dist/"), m = `import "${n.text}"`;
4425
4426
  throw Error(
4426
- p ? `Unexpected case: during build, all node_modules runtime dependencies should be externalized (unless explicitly configured otherwise). ${c} is not externalized, and it contains a side-effect CSS import \`${m}\`. How should such CSS import be handled? Options:
4427
- 1. (suggested) Externalize ${c}, which will make end-user's bundler treat this CSS import as global CSS.
4428
- 2. Write a transform() plugin to drop the CSS import from ${c}, and then manually import the CSS as needed inside your shadow root or your library's global CSS file.` : `${c}: Found a side-effect CSS import \`${m}\`. Such import is not allowed as it won't work with shadow DOM. Please use \`import { styles } from "${n.text}";\` instead and then add \`static override styles = styles;\` to your component. If this needs to be global CSS, @import it inside your global CSS file`
4427
+ p ? `Unexpected case: during build, all node_modules runtime dependencies should be externalized (unless explicitly configured otherwise). ${l} is not externalized, and it contains a side-effect CSS import \`${m}\`. How should such CSS import be handled? Options:
4428
+ 1. (suggested) Externalize ${l}, which will make end-user's bundler treat this CSS import as global CSS.
4429
+ 2. Write a transform() plugin to drop the CSS import from ${l}, and then manually import the CSS as needed inside your shadow root or your library's global CSS file.` : `${l}: Found a side-effect CSS import \`${m}\`. Such import is not allowed as it won't work with shadow DOM. Please use \`import { styles } from "${n.text}";\` instead and then add \`static override styles = styles;\` to your component. If this needs to be global CSS, @import it inside your global CSS file`
4429
4430
  );
4430
4431
  }
4431
4432
  return o.factory.updateImportDeclaration(
@@ -4443,33 +4444,33 @@ function _o(e, t) {
4443
4444
  if (s)
4444
4445
  return t;
4445
4446
  if (i.name !== void 0) {
4446
- const c = i.name.text, p = i.name.text.startsWith(c[0].toUpperCase()), m = u.isAbsolute(r);
4447
+ const l = i.name.text, p = i.name.text.startsWith(l[0].toUpperCase()), m = u.isAbsolute(r);
4447
4448
  a && !i.isTypeOnly && p && m && e.importedFunctionComponentsFromModules.add(r);
4448
4449
  }
4449
- const l = i.namedBindings;
4450
- if (l === void 0 || !o.isNamedImports(l))
4450
+ const c = i.namedBindings;
4451
+ if (c === void 0 || !o.isNamedImports(c))
4451
4452
  return t;
4452
4453
  const d = ps.has(n.text);
4453
- if (l.elements.forEach((c) => {
4454
- const p = (c.propertyName ?? c.name).text, m = se[p];
4454
+ if (c.elements.forEach((l) => {
4455
+ const p = (l.propertyName ?? l.name).text, m = re[p];
4455
4456
  if (d) {
4456
4457
  if (m?.some((h) => h === n.text)) {
4457
4458
  const h = us(p, r);
4458
- e.existingLitImports.add(h), e.importRenames[h] = c.name?.text ?? h;
4459
+ e.existingLitImports.add(h), e.importRenames[h] = l.name?.text ?? h;
4459
4460
  }
4460
- } else (c.name.text === "h" || c.name.text === "createElement") && j().name !== "@arcgis/lumina" && (e.hasNonLuminaJsxImport = !0);
4461
+ } else (l.name.text === "h" || l.name.text === "createElement") && j().name !== "@arcgis/lumina" && (e.hasNonLuminaJsxImport = !0);
4461
4462
  const f = p.startsWith(p[0].toUpperCase()), g = u.isAbsolute(r);
4462
- a && !c.isTypeOnly && f && g && e.importedFunctionComponentsFromModules.add(r);
4463
+ a && !l.isTypeOnly && f && g && e.importedFunctionComponentsFromModules.add(r);
4463
4464
  }), n.text === "@arcgis/lumina") {
4464
- let c = !1;
4465
- const p = l.elements.filter((f) => {
4465
+ let l = !1;
4466
+ const p = c.elements.filter((f) => {
4466
4467
  const g = (f.propertyName ?? f.name).text;
4467
- return ur.has(g) ? !1 : (c ||= !f.isTypeOnly, !0);
4468
+ return mr.has(g) ? !1 : (l ||= !f.isTypeOnly, !0);
4468
4469
  });
4469
4470
  if (p.length === 0)
4470
4471
  return;
4471
- if (p.length !== l.elements.length) {
4472
- const f = i.isTypeOnly || !c, g = c ? p : p.map(
4472
+ if (p.length !== c.elements.length) {
4473
+ const f = i.isTypeOnly || !l, g = l ? p : p.map(
4473
4474
  (h) => o.factory.updateImportSpecifier(
4474
4475
  h,
4475
4476
  !1,
@@ -4484,7 +4485,7 @@ function _o(e, t) {
4484
4485
  i,
4485
4486
  f,
4486
4487
  i.name,
4487
- o.factory.updateNamedImports(l, g)
4488
+ o.factory.updateNamedImports(c, g)
4488
4489
  ),
4489
4490
  t.moduleSpecifier,
4490
4491
  t.attributes
@@ -4493,22 +4494,22 @@ function _o(e, t) {
4493
4494
  }
4494
4495
  return t;
4495
4496
  }
4496
- const us = (e, t) => e === ae && se.staticHtml.includes(t) ? oe : e === ie && se.staticSvg.includes(t) ? Y : e, Ko = (e, t, i) => t.startsWith(".") ? u.resolve(e, "..", `${t}${i}`) : t;
4497
- function Wo(e) {
4498
- return o.isImportDeclaration(e) ? Uo(this, e) : e;
4497
+ const us = (e, t) => e === ce && re.staticHtml.includes(t) ? ae : e === se && re.staticSvg.includes(t) ? Y : e, Wo = (e, t, i) => t.startsWith(".") ? u.resolve(e, "..", `${t}${i}`) : t;
4498
+ function Uo(e) {
4499
+ return o.isImportDeclaration(e) ? zo(this, e) : e;
4499
4500
  }
4500
- function Uo(e, t) {
4501
+ function zo(e, t) {
4501
4502
  const i = t.importClause, s = i?.namedBindings, n = t.moduleSpecifier;
4502
4503
  if (!o.isStringLiteral(n) || !s || !o.isNamedImports(s) || !ps.has(n.text))
4503
4504
  return t;
4504
4505
  const r = i.isTypeOnly;
4505
4506
  let a = !1;
4506
- const l = s.elements.map((d) => {
4507
- const c = (d.propertyName ?? d.name).text, p = us(c, n.text);
4507
+ const c = s.elements.map((d) => {
4508
+ const l = (d.propertyName ?? d.name).text, p = us(l, n.text);
4508
4509
  return e.existingLitImports.delete(p), e.neededImports.has(p) ? (e.neededImports.delete(p), a = !0, o.factory.updateImportSpecifier(d, !1, d.propertyName, d.name)) : r ? o.factory.updateImportSpecifier(d, !0, d.propertyName, d.name) : d;
4509
4510
  });
4510
4511
  return ds[n.text]?.forEach((d) => {
4511
- !e.neededImports.has(d) || e.existingLitImports.has(d) || (e.neededImports.delete(d), a = !0, l.push(ms(d, e)));
4512
+ !e.neededImports.has(d) || e.existingLitImports.has(d) || (e.neededImports.delete(d), a = !0, c.push(ms(d, e)));
4512
4513
  }), a ? o.factory.updateImportDeclaration(
4513
4514
  t,
4514
4515
  t.modifiers,
@@ -4516,15 +4517,15 @@ function Uo(e, t) {
4516
4517
  i,
4517
4518
  !1,
4518
4519
  i.name,
4519
- o.factory.updateNamedImports(s, l)
4520
+ o.factory.updateNamedImports(s, c)
4520
4521
  ),
4521
4522
  t.moduleSpecifier,
4522
4523
  t.attributes
4523
4524
  ) : t;
4524
4525
  }
4525
- function zo(e) {
4526
+ function Ho(e) {
4526
4527
  const t = ls(
4527
- Array.from(e.neededImports, (i) => [se[i][0], i])
4528
+ Array.from(e.neededImports, (i) => [re[i][0], i])
4528
4529
  );
4529
4530
  return Object.entries(t).map(
4530
4531
  ([i, s]) => o.factory.createImportDeclaration(
@@ -4541,19 +4542,19 @@ function zo(e) {
4541
4542
  );
4542
4543
  }
4543
4544
  function ms(e, t) {
4544
- const i = e === oe ? ae : e === Y ? ie : e, s = t.importRenames[e];
4545
+ const i = e === ae ? ce : e === Y ? se : e, s = t.importRenames[e];
4545
4546
  return s === i ? o.factory.createImportSpecifier(!1, void 0, o.factory.createIdentifier(i)) : o.factory.createImportSpecifier(
4546
4547
  !1,
4547
4548
  o.factory.createIdentifier(i),
4548
4549
  o.factory.createIdentifier(s)
4549
4550
  );
4550
4551
  }
4551
- function Ho(e) {
4552
- const t = jr().map(({ packageName: i }) => i);
4552
+ function qo(e) {
4553
+ const t = Fr().map(({ packageName: i }) => i);
4553
4554
  return e.existingImportedModules.forEach((i) => {
4554
4555
  if (u.isAbsolute(i))
4555
4556
  return;
4556
- const s = qs(i), n = i.slice(s.length + 1);
4557
+ const s = Vs(i), n = i.slice(s.length + 1);
4557
4558
  if (t.includes(s ?? "") && (n.startsWith("dist/components") || n.startsWith("components"))) {
4558
4559
  const r = Re(e.sourceFile.fileName);
4559
4560
  throw new Error(
@@ -4562,7 +4563,7 @@ function Ho(e) {
4562
4563
  }
4563
4564
  }), [];
4564
4565
  }
4565
- function qo(e) {
4566
+ function Vo(e) {
4566
4567
  if (e.compiler.viteCommand === "serve")
4567
4568
  return e.customElementsToImport.clear(), e.customElementsToImportDeferred.clear(), [];
4568
4569
  const t = e.compiler._customElementDependencies;
@@ -4577,15 +4578,15 @@ function qo(e) {
4577
4578
  t[s] ??= { referencedBy: [], referencedTagNames: [], referencedDeferredTagNames: [] }, t[s].referencedBy.push(e.sourceFile.fileName);
4578
4579
  }), [];
4579
4580
  }
4580
- const Vo = (e, t) => {
4581
+ const Go = (e, t) => {
4581
4582
  const i = e.pragmas;
4582
4583
  if (i?.has("jsx") === !0 || i?.has("jsxImportSource") === !0)
4583
4584
  return e.statements;
4584
4585
  let s = !1, n;
4585
4586
  if (t.apiModule !== void 0) {
4586
4587
  const d = t.apiModule.declarations;
4587
- for (let c = 0; c < d.length; ++c) {
4588
- const p = d[c];
4588
+ for (let l = 0; l < d.length; ++l) {
4589
+ const p = d[l];
4589
4590
  if (p.customElement === !0) {
4590
4591
  const m = p;
4591
4592
  s = m.encapsulation !== void 0;
@@ -4601,7 +4602,7 @@ const Vo = (e, t) => {
4601
4602
  localComponents: Qi(t.compiler),
4602
4603
  sourceFile: e,
4603
4604
  transformationContext: t.transformation,
4604
- importRenames: Go(e),
4605
+ importRenames: Xo(e),
4605
4606
  existingImportedModules: /* @__PURE__ */ new Set(),
4606
4607
  importedFunctionComponentsFromModules: /* @__PURE__ */ new Set(),
4607
4608
  existingLitImports: /* @__PURE__ */ new Set(),
@@ -4615,41 +4616,41 @@ const Vo = (e, t) => {
4615
4616
  let a = [];
4616
4617
  if (e.statements.every((d) => {
4617
4618
  if (o.isImportDeclaration(d)) {
4618
- const c = _o(r, d);
4619
- if (c === void 0)
4619
+ const l = Ko(r, d);
4620
+ if (l === void 0)
4620
4621
  return !0;
4621
- if (a.push(c), r.hasNonLuminaJsxImport)
4622
+ if (a.push(l), r.hasNonLuminaJsxImport)
4622
4623
  return !1;
4623
4624
  } else
4624
4625
  a.push(q(r, void 0, d));
4625
4626
  return !0;
4626
4627
  }), r.hasNonLuminaJsxImport)
4627
4628
  return e.statements;
4628
- if (r.neededImports.size > 0 && (a = a.map(Wo, r), r.existingLitImports.size > 0))
4629
+ if (r.neededImports.size > 0 && (a = a.map(Uo, r), r.existingLitImports.size > 0))
4629
4630
  throw new Error(
4630
4631
  `Expected context.existingLitImports to be empty by now. Found: ${Array.from(r.existingLitImports).join(", ")}`
4631
4632
  );
4632
- const l = [zo, Ho, qo].flatMap(
4633
+ const c = [Ho, qo, Vo].flatMap(
4633
4634
  (d) => d(r)
4634
4635
  );
4635
4636
  if (r.neededImports.size > 0)
4636
4637
  throw new Error(
4637
4638
  `Expected context.neededLitImports to be empty by now. Found: ${Array.from(r.neededImports).join(", ")}`
4638
4639
  );
4639
- return [...l, ...a];
4640
+ return [...c, ...a];
4640
4641
  };
4641
- function Go(e) {
4642
- return Xo(e), Object.fromEntries(
4643
- dr.map((t) => [t, e.identifiers.has(t) ? `${t}$jsx` : t])
4642
+ function Xo(e) {
4643
+ return Yo(e), Object.fromEntries(
4644
+ pr.map((t) => [t, e.identifiers.has(t) ? `${t}$jsx` : t])
4644
4645
  );
4645
4646
  }
4646
- function Xo(e) {
4647
+ function Yo(e) {
4647
4648
  if (!("identifiers" in e))
4648
4649
  throw new Error(
4649
4650
  "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."
4650
4651
  );
4651
4652
  }
4652
- const Vt = "customElement", Yo = (e, t) => {
4653
+ const Vt = "customElement", Qo = (e, t) => {
4653
4654
  const i = [];
4654
4655
  if (t.apiModule?.declarations.forEach((r) => {
4655
4656
  const a = r;
@@ -4679,7 +4680,7 @@ const Vt = "customElement", Yo = (e, t) => {
4679
4680
  o.factory.createStringLiteral(s)
4680
4681
  ), ...e.statements, ...i];
4681
4682
  };
4682
- function Qo(e, t, i) {
4683
+ function Zo(e, t, i) {
4683
4684
  return t.size === 0 ? e : [
4684
4685
  o.factory.createPropertyDeclaration(
4685
4686
  [
@@ -4694,7 +4695,7 @@ function Qo(e, t, i) {
4694
4695
  t.entries(),
4695
4696
  ([s, n]) => o.factory.createPropertyAssignment(
4696
4697
  oi(s) ? o.factory.createStringLiteral(s) : s,
4697
- Zo(n, i)
4698
+ ea(n, i)
4698
4699
  )
4699
4700
  )
4700
4701
  )
@@ -4702,7 +4703,7 @@ function Qo(e, t, i) {
4702
4703
  ...e
4703
4704
  ];
4704
4705
  }
4705
- function Zo(e, t) {
4706
+ function ea(e, t) {
4706
4707
  let i = 0, s = !0;
4707
4708
  const n = [], r = [];
4708
4709
  for (const d of e.properties)
@@ -4710,32 +4711,32 @@ function Zo(e, t) {
4710
4711
  function a(d) {
4711
4712
  if (!o.isPropertyAssignment(d) || !o.isIdentifier(d.name))
4712
4713
  return !0;
4713
- const c = d.name.text, p = d.initializer, m = p.kind === o.SyntaxKind.TrueKeyword, f = p.kind === o.SyntaxKind.FalseKeyword;
4714
- if (c === "attribute")
4714
+ const l = d.name.text, p = d.initializer, m = p.kind === o.SyntaxKind.TrueKeyword, f = p.kind === o.SyntaxKind.FalseKeyword;
4715
+ if (l === "attribute")
4715
4716
  return s = !1, i |= m ? St : 0, !m && !f;
4716
- if (c === "reflect")
4717
+ if (l === "reflect")
4717
4718
  return i |= m ? Es : 0, !1;
4718
- if (c === "type" && o.isIdentifier(p)) {
4719
+ if (l === "type" && o.isIdentifier(p)) {
4719
4720
  if (p.text === "Boolean")
4720
4721
  return i |= Ts, !1;
4721
4722
  if (p.text === "Number")
4722
4723
  return i |= $s, !1;
4723
4724
  } else {
4724
- if (c === "state")
4725
+ if (l === "state")
4725
4726
  return s = !1, i |= m ? Ps : 0, !1;
4726
- if (c === "readOnly")
4727
+ if (l === "readOnly")
4727
4728
  return i |= m ? ks : 0, !1;
4728
- if (c === "noAccessor")
4729
+ if (l === "noAccessor")
4729
4730
  return i |= m ? Is : 0, !1;
4730
- if (c === "useDefault")
4731
+ if (l === "useDefault")
4731
4732
  return i |= m ? xs : 0, !1;
4732
4733
  }
4733
4734
  return !0;
4734
4735
  }
4735
4736
  s && (i |= St);
4736
- const l = o.factory.createNumericLiteral(i);
4737
- return n.length === 0 && (t || r.length === 0) ? l : o.factory.createArrayLiteralExpression([
4738
- l,
4737
+ const c = o.factory.createNumericLiteral(i);
4738
+ return n.length === 0 && (t || r.length === 0) ? c : o.factory.createArrayLiteralExpression([
4739
+ c,
4739
4740
  o.factory.createObjectLiteralExpression(n),
4740
4741
  /**
4741
4742
  * In dev mode, to improve readability for non-source-map developers,
@@ -4747,7 +4748,7 @@ function Zo(e, t) {
4747
4748
  ...t ? [] : [o.factory.createObjectLiteralExpression(r)]
4748
4749
  ]);
4749
4750
  }
4750
- function ea(e, t, i) {
4751
+ function ta(e, t, i) {
4751
4752
  let s = -1, n = -1, r = -1;
4752
4753
  e.options?.properties.forEach((p, m) => {
4753
4754
  if (o.isSpreadAssignment(p))
@@ -4759,23 +4760,23 @@ function ea(e, t, i) {
4759
4760
  f === "type" ? s = m : f === "attribute" ? n = m : f === "readOnly" && (r = m);
4760
4761
  }
4761
4762
  });
4762
- const a = i.attribute === void 0 && n === -1, l = i.readonly === !0 && i.docsOnlyReadonly !== !0 && r === -1, d = ta(e, i, s), c = [
4763
+ const a = i.attribute === void 0 && n === -1, c = i.readonly === !0 && i.docsOnlyReadonly !== !0 && r === -1, d = ia(e, i, s), l = [
4763
4764
  ...a ? [o.factory.createPropertyAssignment("attribute", o.factory.createFalse())] : [],
4764
- ...l ? [o.factory.createPropertyAssignment("readOnly", o.factory.createTrue())] : [],
4765
+ ...c ? [o.factory.createPropertyAssignment("readOnly", o.factory.createTrue())] : [],
4765
4766
  ...d !== void 0 ? [d] : []
4766
4767
  ];
4767
- return c.length > 0 ? e.options === void 0 ? o.factory.createObjectLiteralExpression(c, !1) : o.factory.updateObjectLiteralExpression(e.options, [...e.options.properties, ...c]) : e.options;
4768
+ return l.length > 0 ? e.options === void 0 ? o.factory.createObjectLiteralExpression(l, !1) : o.factory.updateObjectLiteralExpression(e.options, [...e.options.properties, ...l]) : e.options;
4768
4769
  }
4769
- function ta(e, t, i) {
4770
+ function ia(e, t, i) {
4770
4771
  if (t.attribute === void 0)
4771
4772
  return;
4772
- const s = ia(t.type.values);
4773
+ const s = sa(t.type.values);
4773
4774
  return s === "Other" || t.readonly === !0 && (s !== "Boolean" || t.reflects === void 0) || e.options?.properties[i] !== void 0 ? void 0 : o.factory.createPropertyAssignment(
4774
4775
  o.factory.createIdentifier("type"),
4775
4776
  o.factory.createIdentifier(s)
4776
4777
  );
4777
4778
  }
4778
- function ia(e) {
4779
+ function sa(e) {
4779
4780
  let t = !1, i = !1, s = !1;
4780
4781
  if (e?.forEach((n) => {
4781
4782
  t ||= n.type === "number", i ||= n.type === "boolean", s ||= n.type === "string" || n.type === "any" || n.type === "unknown";
@@ -4787,50 +4788,50 @@ function ia(e) {
4787
4788
  }
4788
4789
  return "Other";
4789
4790
  }
4790
- function sa(e, t, i, s, n, r) {
4791
+ function ra(e, t, i, s, n, r) {
4791
4792
  if (i.modifiers === void 0)
4792
4793
  return i;
4793
- let a = -1, l = -1;
4794
- if (i.modifiers.forEach((d, c) => {
4794
+ let a = -1, c = -1;
4795
+ if (i.modifiers.forEach((d, l) => {
4795
4796
  if (o.isDecorator(d) && o.isCallExpression(d.expression) && o.isIdentifier(d.expression.expression)) {
4796
4797
  const p = d.expression.expression.text;
4797
- p === "property" && (a = c), p === "state" && (l = c);
4798
+ p === "property" && (a = l), p === "state" && (c = l);
4798
4799
  }
4799
4800
  }), a !== -1) {
4800
- const d = ra(e, t, i, s, n), c = Gt(i, a, n), p = ea(c, n, d);
4801
- return r.set(d.name, p ?? o.factory.createObjectLiteralExpression()), c.options = p, Xt(i, a);
4802
- } else if (l !== -1) {
4803
- const d = Gt(i, l, n), c = o.factory.createPropertyAssignment("state", o.factory.createTrue()), p = d.options === void 0 ? o.factory.createObjectLiteralExpression([c]) : o.factory.updateObjectLiteralExpression(d.options, [...d.options.properties, c]), m = ai(i.name);
4801
+ const d = na(e, t, i, s, n), l = Gt(i, a, n), p = ta(l, n, d);
4802
+ return r.set(d.name, p ?? o.factory.createObjectLiteralExpression()), l.options = p, Xt(i, a);
4803
+ } else if (c !== -1) {
4804
+ const d = Gt(i, c, n), l = o.factory.createPropertyAssignment("state", o.factory.createTrue()), p = d.options === void 0 ? o.factory.createObjectLiteralExpression([l]) : o.factory.updateObjectLiteralExpression(d.options, [...d.options.properties, l]), m = ai(i.name);
4804
4805
  if (m === void 0)
4805
4806
  throw new Error("Failed to statically determine the state property name");
4806
- return r.set(m, p), Xt(i, l);
4807
+ return r.set(m, p), Xt(i, c);
4807
4808
  } else
4808
4809
  return i;
4809
4810
  }
4810
- function ra(e, t, i, s, n) {
4811
+ function na(e, t, i, s, n) {
4811
4812
  const r = t ?? (e.compiler.isInTest ? {
4812
4813
  members: []
4813
4814
  } : void 0);
4814
4815
  if (r === void 0)
4815
4816
  throw Error(`Failed to find API component for ${s} in ${n.fileName}`);
4816
4817
  const a = ai(i.name);
4817
- let l;
4818
+ let c;
4818
4819
  for (let d = 0; d < r.members.length; ++d) {
4819
- const c = r.members[d];
4820
- c.name === a && c.kind === "field" && (l = c);
4820
+ const l = r.members[d];
4821
+ l.name === a && l.kind === "field" && (c = l);
4821
4822
  }
4822
- if (l ??= e.compiler.isInTest ? { kind: "field", attribute: "", name: "", type: { text: "" } } : void 0, l === void 0)
4823
+ if (c ??= e.compiler.isInTest ? { kind: "field", attribute: "", name: "", type: { text: "" } } : void 0, c === void 0)
4823
4824
  throw Error(
4824
4825
  `Failed to find API property for ${i.getText(n)} in ${s} in ${n.fileName}`
4825
4826
  );
4826
- if (l.name === "") {
4827
+ if (c.name === "") {
4827
4828
  if (a === void 0)
4828
4829
  throw Error(
4829
4830
  `Failed to statically determine the property name: ${i.getText(n)} in ${s} in ${n.fileName}`
4830
4831
  );
4831
- l.name = a, l.attribute ??= ei(a);
4832
+ c.name = a, c.attribute ??= ei(a);
4832
4833
  }
4833
- return l;
4834
+ return c;
4834
4835
  }
4835
4836
  function Gt(e, t, i) {
4836
4837
  const s = e.modifiers[t], n = s.expression, r = n.arguments.at(0);
@@ -4867,13 +4868,13 @@ function Xt(e, t) {
4867
4868
  e.initializer
4868
4869
  );
4869
4870
  }
4870
- function na(e, t, i, s) {
4871
+ function oa(e, t, i, s) {
4871
4872
  let n;
4872
4873
  if (e.apiJsonEnabled)
4873
4874
  for (let d = 0; d < e.privateApiJson.modules.length; ++d) {
4874
- const c = e.privateApiJson.modules[d];
4875
- if (c.sourcePath === i.fileName.slice(e.dir.root.length)) {
4876
- n = c;
4875
+ const l = e.privateApiJson.modules[d];
4876
+ if (l.sourcePath === i.fileName.slice(e.dir.root.length)) {
4877
+ n = l;
4877
4878
  break;
4878
4879
  }
4879
4880
  }
@@ -4882,17 +4883,17 @@ function na(e, t, i, s) {
4882
4883
  apiModule: n,
4883
4884
  transformation: t
4884
4885
  }, a = i.statements;
4885
- let l = a;
4886
+ let c = a;
4886
4887
  try {
4887
4888
  s.forEach((d) => {
4888
4889
  i.statements = d(i, r);
4889
4890
  });
4890
4891
  } finally {
4891
- l = i.statements, i.statements = a;
4892
+ c = i.statements, i.statements = a;
4892
4893
  }
4893
- return oa(i, l);
4894
+ return aa(i, c);
4894
4895
  }
4895
- const oa = (e, t) => o.factory.updateSourceFile(
4896
+ const aa = (e, t) => o.factory.updateSourceFile(
4896
4897
  e,
4897
4898
  t,
4898
4899
  /*
@@ -4907,16 +4908,16 @@ const oa = (e, t) => o.factory.updateSourceFile(
4907
4908
  e.hasNoDefaultLib,
4908
4909
  e.libReferenceDirectives
4909
4910
  );
4910
- function aa(e, t) {
4911
+ function ca(e, t) {
4911
4912
  t.compiler.viteCommand === "build" && ("emitNode" in e && (e.emitNode ??= {}), o.setEmitFlags(e, o.EmitFlags.NoComments));
4912
4913
  }
4913
- const ca = (e, t) => {
4914
+ const la = (e, t) => {
4914
4915
  let i;
4915
4916
  if (t.apiModule !== void 0)
4916
4917
  for (let d = 0; d < t.apiModule.declarations.length; ++d) {
4917
- const c = t.apiModule.declarations[d];
4918
- if (c.customElement === !0) {
4919
- i = c;
4918
+ const l = t.apiModule.declarations[d];
4919
+ if (l.customElement === !0) {
4920
+ i = l;
4920
4921
  break;
4921
4922
  }
4922
4923
  }
@@ -4926,10 +4927,10 @@ const ca = (e, t) => {
4926
4927
  function n() {
4927
4928
  s = /* @__PURE__ */ new Map();
4928
4929
  }
4929
- const r = (d) => Qo(d, s, t.compiler.shouldMinify);
4930
- function a(d, c) {
4931
- const p = da(t, i, d, c, e, s);
4932
- return aa(p, t), p;
4930
+ const r = (d) => Zo(d, s, t.compiler.shouldMinify);
4931
+ function a(d, l) {
4932
+ const p = pa(t, i, d, l, e, s);
4933
+ return ca(p, t), p;
4933
4934
  }
4934
4935
  return e.statements.map(
4935
4936
  (d) => fs(a, d, t, n, r)
@@ -4941,10 +4942,10 @@ function fs(e, t, i, s, n = ci) {
4941
4942
  let r = !1;
4942
4943
  const a = t.name?.text;
4943
4944
  s?.();
4944
- const l = n(
4945
- t.members.map((c) => {
4946
- const p = e(c, a);
4947
- return r ||= p !== c, p;
4945
+ const c = n(
4946
+ t.members.map((l) => {
4947
+ const p = e(l, a);
4948
+ return r ||= p !== l, p;
4948
4949
  })
4949
4950
  );
4950
4951
  return r ? o.factory.updateClassDeclaration(
@@ -4953,7 +4954,7 @@ function fs(e, t, i, s, n = ci) {
4953
4954
  t.name,
4954
4955
  t.typeParameters,
4955
4956
  t.heritageClauses,
4956
- l
4957
+ c
4957
4958
  ) : t;
4958
4959
  } else
4959
4960
  return i.compiler.isInTest ? o.visitEachChild(
@@ -4962,11 +4963,11 @@ function fs(e, t, i, s, n = ci) {
4962
4963
  i.transformation
4963
4964
  ) : t;
4964
4965
  }
4965
- const la = /* @__PURE__ */ new Set(["connectedCallback", "disconnectedCallback"]);
4966
- function da(e, t, i, s, n, r) {
4966
+ const da = /* @__PURE__ */ new Set(["connectedCallback", "disconnectedCallback"]);
4967
+ function pa(e, t, i, s, n, r) {
4967
4968
  if (o.isMethodDeclaration(i)) {
4968
4969
  const a = i.modifiers?.filter(
4969
- (l) => !o.isDecorator(l) || !pa(l)
4970
+ (c) => !o.isDecorator(c) || !ua(c)
4970
4971
  );
4971
4972
  if (a?.length !== i.modifiers?.length)
4972
4973
  return o.factory.updateMethodDeclaration(
@@ -4980,10 +4981,10 @@ function da(e, t, i, s, n, r) {
4980
4981
  i.type,
4981
4982
  i.body
4982
4983
  );
4983
- if ("text" in i.name && la.has(i.name.text) && i.body) {
4984
- const l = i.name.text;
4984
+ if ("text" in i.name && da.has(i.name.text) && i.body) {
4985
+ const c = i.name.text;
4985
4986
  return i.body.statements.some(
4986
- (c) => o.isExpressionStatement(c) && o.isCallExpression(c.expression) && o.isPropertyAccessExpression(c.expression.expression) && c.expression.expression.expression.kind === o.SyntaxKind.SuperKeyword && c.expression.expression.name.text === l
4987
+ (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 === c
4987
4988
  ) ? i : o.factory.updateMethodDeclaration(
4988
4989
  i,
4989
4990
  i.modifiers,
@@ -4996,7 +4997,7 @@ function da(e, t, i, s, n, r) {
4996
4997
  o.factory.updateBlock(i.body, [
4997
4998
  o.factory.createExpressionStatement(
4998
4999
  o.factory.createCallExpression(
4999
- o.factory.createPropertyAccessExpression(o.factory.createSuper(), l),
5000
+ o.factory.createPropertyAccessExpression(o.factory.createSuper(), c),
5000
5001
  void 0,
5001
5002
  []
5002
5003
  )
@@ -5006,14 +5007,14 @@ function da(e, t, i, s, n, r) {
5006
5007
  );
5007
5008
  }
5008
5009
  }
5009
- return o.isPropertyDeclaration(i) || o.isAccessor(i) ? sa(e, t, i, s, n, r) : i;
5010
- }
5011
- const pa = (e) => o.isCallExpression(e.expression) && o.isIdentifier(e.expression.expression) && e.expression.expression.text === "method", ua = [
5012
- Vo,
5013
- Yo,
5014
- ca
5015
- ], ma = "@arcgis/lumina:transformComponents", fa = (e) => ({
5016
- name: ma,
5010
+ return o.isPropertyDeclaration(i) || o.isAccessor(i) ? ra(e, t, i, s, n, r) : i;
5011
+ }
5012
+ const ua = (e) => o.isCallExpression(e.expression) && o.isIdentifier(e.expression.expression) && e.expression.expression.text === "method", ma = [
5013
+ Go,
5014
+ Qo,
5015
+ la
5016
+ ], fa = "@arcgis/lumina:transformComponents", ga = (e) => ({
5017
+ name: fa,
5017
5018
  transform: {
5018
5019
  // Transform JSX to lit-html first so that vite:esbuild doesn't transform JSX to h().
5019
5020
  // Also, we need to run on the original fs file, before other transforms so
@@ -5030,35 +5031,35 @@ const pa = (e) => o.isCallExpression(e.expression) && o.isIdentifier(e.expressio
5030
5031
  await Promise.all(
5031
5032
  // False alarm because of |undefined.
5032
5033
  // eslint-disable-next-line @typescript-eslint/await-thenable
5033
- e.apiJsonDeferred === void 0 ? [re] : [re, e.apiJsonDeferred.promise]
5034
+ e.apiJsonDeferred === void 0 ? [ne] : [ne, e.apiJsonDeferred.promise]
5034
5035
  );
5035
5036
  const n = e.getSourceFile(i, t), a = o.transform(n, [
5036
- (f) => () => na(e, f, n, [
5037
+ (f) => () => oa(e, f, n, [
5037
5038
  ...e.options.types?.sourceFileTransformers ?? [],
5038
- ...ua
5039
+ ...ma
5039
5040
  ])
5040
- ]).transformed[0], l = e._typeScriptPrinter, d = e.viteConfig.build.sourcemap === !1 ? void 0 : Ct.createSourceMapGenerator(ga, u.basename(i), "", u.dirname(i), {}), c = Ct.createTextWriter(`
5041
+ ]).transformed[0], c = e._typeScriptPrinter, d = e.viteConfig.build.sourcemap === !1 ? void 0 : Ct.createSourceMapGenerator(ha, u.basename(i), "", u.dirname(i), {}), l = Ct.createTextWriter(`
5041
5042
  `);
5042
- l.writeFile(a, c, d);
5043
- const p = c.getText(), m = d?.toJSON();
5043
+ c.writeFile(a, l, d);
5044
+ const p = l.getText(), m = d?.toJSON();
5044
5045
  return {
5045
5046
  code: p,
5046
5047
  map: m ?? null
5047
5048
  };
5048
5049
  }
5049
5050
  }
5050
- }), ga = {
5051
+ }), ha = {
5051
5052
  getCurrentDirectory: o.sys.getCurrentDirectory,
5052
5053
  getCanonicalFileName: o.sys.useCaseSensitiveFileNames ? ci : (e) => e.toLowerCase()
5053
- }, ha = (e) => ({
5054
+ }, ya = (e) => ({
5054
5055
  name: "@arcgis/lumina:handleDynamicAssets",
5055
5056
  configureServer(t) {
5056
- e.server = t, Yt(e).forEach(({ assets: i, transformers: s }) => te(e, i, s));
5057
+ e.server = t, Yt(e).forEach(({ assets: i, transformers: s }) => ie(e, i, s));
5057
5058
  },
5058
5059
  async writeBundle() {
5059
5060
  await Promise.all(
5060
5061
  Yt(e).map(
5061
- async ({ assets: t, transformers: i }) => await xi(e, t, i)
5062
+ async ({ assets: t, transformers: i }) => await Li(e, t, i)
5062
5063
  )
5063
5064
  );
5064
5065
  }
@@ -5069,73 +5070,73 @@ function Yt(e) {
5069
5070
  "type" in s ? t.push(s) : "assets" in s && t.push(...s.assets);
5070
5071
  }), t.length > 0 && i.push({ assets: t }), e.isInBuildWatch || (e.assetsToProvide = void 0), i;
5071
5072
  }
5072
- const nt = "@arcgis/lumina:updatePackageJson", ya = (e) => ({
5073
+ const nt = "@arcgis/lumina:updatePackageJson", va = (e) => ({
5073
5074
  name: nt,
5074
5075
  apply: () => e.viteCommand === "serve" && e.environment === "development" && !e.isInTest && !e.isInCi,
5075
5076
  configResolved() {
5076
- va(e).catch(
5077
+ ba(e).catch(
5077
5078
  (t) => T.error(nt, `Failed to update package's package.json:${String(t)}`)
5078
5079
  );
5079
5080
  }
5080
5081
  });
5081
- async function va(e) {
5082
- const t = u.join(e.dir.root, "package.json"), i = JSON.parse(await z(t, "utf-8")), s = ba(i, e);
5082
+ async function ba(e) {
5083
+ const t = u.join(e.dir.root, "package.json"), i = JSON.parse(await z(t, "utf-8")), s = wa(i, e);
5083
5084
  s && ni(t, JSON.stringify(s, null, 2));
5084
5085
  }
5085
- function ba(e, t) {
5086
+ function wa(e, t) {
5086
5087
  const i = e?.devDependencies ?? {};
5087
- Object.keys(e?.peerDependencies ?? {}).forEach((c) => {
5088
- c in i || T.warn(
5088
+ Object.keys(e?.peerDependencies ?? {}).forEach((l) => {
5089
+ l in i || T.warn(
5089
5090
  nt,
5090
- `Every peerDependency should also be a devDependency, or else some tools will get confused (like Turbo Build). Found "${c}" that is not a devDependency. Please edit your package.json`
5091
+ `Every peerDependency should also be a devDependency, or else some tools will get confused (like Turbo Build). Found "${l}" that is not a devDependency. Please edit your package.json`
5091
5092
  );
5092
5093
  });
5093
5094
  let s = !1;
5094
- const n = (c) => u.relative(t.dir.root, u.join(t.dir.dist, c)), r = t._documentationFileNames;
5095
+ const n = (l) => u.relative(t.dir.root, u.join(t.dir.dist, l)), r = t._documentationFileNames;
5095
5096
  if (r.vsCodeCss !== void 0) {
5096
- const c = e["css.customData"] ?? [], p = n(r.vsCodeCss);
5097
- c.includes(p) || (e["css.customData"] = [...c, p], s = !0);
5097
+ const l = e["css.customData"] ?? [], p = n(r.vsCodeCss);
5098
+ l.includes(p) || (e["css.customData"] = [...l, p], s = !0);
5098
5099
  }
5099
5100
  if (r.apiJson !== void 0) {
5100
- const c = n(r.apiJson);
5101
- e.customElements !== c && (e.customElements = c, s = !0);
5101
+ const l = n(r.apiJson);
5102
+ e.customElements !== l && (e.customElements = l, s = !0);
5102
5103
  }
5103
5104
  if (r.vsCodeHtml !== void 0) {
5104
- const c = e["html.customData"] ?? [], p = n(r.vsCodeHtml);
5105
- c.includes(p) || (e["html.customData"] = [...c, p], s = !0);
5105
+ const l = e["html.customData"] ?? [], p = n(r.vsCodeHtml);
5106
+ l.includes(p) || (e["html.customData"] = [...l, p], s = !0);
5106
5107
  }
5107
5108
  if (r.webTypes !== void 0) {
5108
- const c = n(r.webTypes);
5109
- e["web-types"] !== c && (s = !0, e["web-types"] = c);
5109
+ const l = n(r.webTypes);
5110
+ e["web-types"] !== l && (s = !0, e["web-types"] = l);
5110
5111
  }
5111
- const a = `./${Z}.css`, l = t.options.build?.cdn?.namespace !== void 0, d = he(
5112
+ const a = `./${Z}.css`, c = t.options.build?.cdn?.namespace !== void 0, d = he(
5112
5113
  t.dir.root,
5113
5114
  u.join(t.dir.distCdn, a)
5114
5115
  );
5115
- if (!l) {
5116
+ if (!c) {
5116
5117
  e.exports?.[a] !== d && (e.exports ??= {}, e.exports[a] = d, s = !0);
5117
- const c = e.name.split("/").length > 1 ? e.name.split("/")[1] : e.name;
5118
+ const l = e.name.split("/").length > 1 ? e.name.split("/")[1] : e.name;
5118
5119
  for (const p of Object.keys(e.exports))
5119
- p.endsWith(`${c}.css`) && e.exports[p] !== d && (e.exports[p] = d, s = !0);
5120
+ p.endsWith(`${l}.css`) && e.exports[p] !== d && (e.exports[p] = d, s = !0);
5120
5121
  }
5121
5122
  if (s)
5122
5123
  return e;
5123
5124
  }
5124
- const wa = (e) => ({
5125
+ const Sa = (e) => ({
5125
5126
  deprecation: "docs.json is deprecated and will be removed in a future release. Use api.json instead",
5126
5127
  timestamp: e.apiJson.timestamp,
5127
5128
  compiler: e.apiJson.compiler,
5128
- components: Sa(e),
5129
+ components: Ca(e),
5129
5130
  typeLibrary: {}
5130
5131
  });
5131
- function Sa(e) {
5132
+ function Ca(e) {
5132
5133
  const t = [];
5133
5134
  for (const i of e.apiJson.modules)
5134
5135
  for (const s of i.declarations)
5135
- s.customElement === !0 && t.push(Ca(s, i.sourcePath));
5136
+ s.customElement === !0 && t.push(Ea(s, i.sourcePath));
5136
5137
  return t;
5137
5138
  }
5138
- function Ca(e, t) {
5139
+ function Ea(e, t) {
5139
5140
  const i = e.superclass ? [{ name: "superclass", text: JSON.stringify(e.superclass) }] : [];
5140
5141
  return {
5141
5142
  filePath: t,
@@ -5150,9 +5151,9 @@ function Ca(e, t) {
5150
5151
  dependencies: [],
5151
5152
  dependencyGraph: {},
5152
5153
  deprecation: typeof e.deprecated == "boolean" ? e.deprecated ? "" : void 0 : e.deprecated,
5153
- props: e.members.map(Ea).filter(R),
5154
- methods: e.members.map(Ta).filter(R),
5155
- events: e.events?.map($a) ?? [],
5154
+ props: e.members.map(Ta).filter(R),
5155
+ methods: e.members.map($a).filter(R),
5156
+ events: e.events?.map(Pa) ?? [],
5156
5157
  styles: e.cssProperties?.map(({ name: s, description: n, deprecated: r }) => ({
5157
5158
  name: s,
5158
5159
  annotation: "prop",
@@ -5177,7 +5178,7 @@ function Ve(e, t = "") {
5177
5178
  }
5178
5179
  return t;
5179
5180
  }
5180
- function Ea(e) {
5181
+ function Ta(e) {
5181
5182
  if (e.kind !== "field")
5182
5183
  return;
5183
5184
  const t = e, i = t.inheritedFrom ? [{ name: "inheritedFrom", text: JSON.stringify(t.inheritedFrom) }] : [], s = t.readonly ? [{ name: "readonly", text: "" }] : [], n = t.docsTags?.some((r) => r.name === "required") ?? !1;
@@ -5218,7 +5219,7 @@ const yt = (e) => Object.fromEntries(
5218
5219
  ]
5219
5220
  ) ?? []
5220
5221
  );
5221
- function Ta(e) {
5222
+ function $a(e) {
5222
5223
  if (e.kind !== "method")
5223
5224
  return;
5224
5225
  const t = e, i = e.inheritedFrom ? [{ name: "inheritedFrom", text: JSON.stringify(e.inheritedFrom) }] : [], s = t.parameters?.map(({ name: n, type: r, description: a }) => ({
@@ -5249,7 +5250,7 @@ function Ta(e) {
5249
5250
  deprecation: typeof t.deprecated == "boolean" ? t.deprecated ? "" : void 0 : t.deprecated
5250
5251
  };
5251
5252
  }
5252
- function $a(e) {
5253
+ function Pa(e) {
5253
5254
  const t = e.inheritedFrom ? [{ name: "inheritedFrom", text: JSON.stringify(e.inheritedFrom) }] : [];
5254
5255
  return {
5255
5256
  event: e.name,
@@ -5275,7 +5276,7 @@ const ye = {
5275
5276
  methods: "Methods"
5276
5277
  };
5277
5278
  function gs(e) {
5278
- const t = Pa(e.slots), i = ka(e.events), s = Ia(e.cssProperties), n = xa(e.cssParts), r = Aa(e.members), a = e.description?.trim();
5279
+ const t = ka(e.slots), i = Ia(e.events), s = xa(e.cssProperties), n = Aa(e.cssParts), r = La(e.members), a = e.description?.trim();
5279
5280
  return [...a ? [`${a}
5280
5281
  --`] : [], i, r, t, s, n].filter(Boolean).join(`
5281
5282
 
@@ -5283,23 +5284,23 @@ function gs(e) {
5283
5284
  }
5284
5285
  const ve = (e, t) => t === void 0 || t.length === 0 ? "" : `### ${e}
5285
5286
  ${t.join(`
5286
- `)}`, Pa = (e) => ve(
5287
+ `)}`, ka = (e) => ve(
5287
5288
  ye.slots,
5288
5289
  e?.filter((t) => t.deprecated === void 0).map(
5289
5290
  (t) => `- ${t.name ? `**${t.name}**` : "_default_"}${t.description === void 0 ? "" : ` - ${t.description}`}`
5290
5291
  )
5291
- ), ka = (e) => ve(
5292
+ ), Ia = (e) => ve(
5292
5293
  ye.events,
5293
5294
  e?.filter((t) => t.deprecated === void 0).map((t) => `- **${t.name}**${t.description === void 0 ? "" : ` - ${t.description}`}`)
5294
- ), Ia = (e = []) => ve(
5295
+ ), xa = (e = []) => ve(
5295
5296
  ye.cssProperties,
5296
5297
  e?.filter((t) => t.deprecated === void 0).map(
5297
5298
  (t) => `- **${t.name}**${t.description === void 0 ? "" : ` - ${t.description}`} ${t.default ? `_(default: ${t.default})_}` : ""}`
5298
5299
  )
5299
- ), xa = (e) => ve(
5300
+ ), Aa = (e) => ve(
5300
5301
  ye.cssParts,
5301
5302
  e?.filter((t) => t.deprecated === void 0).map((t) => `- **${t.name}**${t.description === void 0 ? "" : ` - ${t.description}`}`)
5302
- ), Aa = (e) => ve(
5303
+ ), La = (e) => ve(
5303
5304
  ye.methods,
5304
5305
  e.filter(Ns).filter((t) => t.deprecated === void 0).map(
5305
5306
  (t) => `- \`${t.name}${t.signature}\`${t.description ? ` - ${t.description}` : ""}`
@@ -5324,7 +5325,7 @@ ${t.join(`
5324
5325
  description: t.tagName + (i.description === void 0 ? "" : `: ${i.description}`)
5325
5326
  })) ?? []
5326
5327
  );
5327
- function La(e) {
5328
+ function Na(e) {
5328
5329
  if (e.attributes === void 0)
5329
5330
  return [];
5330
5331
  const t = [];
@@ -5335,7 +5336,7 @@ function La(e) {
5335
5336
  description: s.description || void 0,
5336
5337
  default: s.default,
5337
5338
  value: {
5338
- type: Na(
5339
+ type: ja(
5339
5340
  s.type.values?.map(
5340
5341
  (n) => n.type === "string" && n.value !== void 0 ? `"${n.value}"` : n.value ?? n.type
5341
5342
  )
@@ -5345,9 +5346,9 @@ function La(e) {
5345
5346
  }
5346
5347
  return t;
5347
5348
  }
5348
- const Na = (e) => e?.length === 1 ? e[0] : e;
5349
- function ja(e, t) {
5350
- const i = Fa(e), s = hs(e), n = ys(e), r = j();
5349
+ const ja = (e) => e?.length === 1 ? e[0] : e;
5350
+ function Fa(e, t) {
5351
+ const i = Ra(e), s = hs(e), n = ys(e), r = j();
5351
5352
  return {
5352
5353
  $schema: "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
5353
5354
  name: r.name,
@@ -5365,11 +5366,11 @@ function ja(e, t) {
5365
5366
  }
5366
5367
  };
5367
5368
  }
5368
- const Fa = (e) => e.filter((t) => t.deprecated === void 0).map((t) => ({
5369
+ const Ra = (e) => e.filter((t) => t.deprecated === void 0).map((t) => ({
5369
5370
  name: t.tagName,
5370
5371
  description: gs(t),
5371
5372
  "doc-url": t.demos?.[0]?.url,
5372
- attributes: La(t),
5373
+ attributes: Na(t),
5373
5374
  slots: t.slots?.map((i) => ({
5374
5375
  name: i.name,
5375
5376
  description: i.description
@@ -5377,10 +5378,10 @@ const Fa = (e) => e.filter((t) => t.deprecated === void 0).map((t) => ({
5377
5378
  // REFACTOR: this was deprecated in the spec: https://github.com/JetBrains/web-types/blob/11e46e47cb65edc1930dc1fae854005ad45ac08f/schema/web-types.json#L866
5378
5379
  events: Qt(t),
5379
5380
  js: {
5380
- properties: Ra(t),
5381
+ properties: Da(t),
5381
5382
  events: Qt(t)
5382
5383
  }
5383
- })), Ra = (e) => e.members.filter(js).filter((t) => t.deprecated === void 0).map((t) => ({
5384
+ })), Da = (e) => e.members.filter(js).filter((t) => t.deprecated === void 0).map((t) => ({
5384
5385
  name: t.name,
5385
5386
  description: t.description,
5386
5387
  type: t.type?.text
@@ -5388,90 +5389,90 @@ const Fa = (e) => e.filter((t) => t.deprecated === void 0).map((t) => ({
5388
5389
  name: t.name,
5389
5390
  type: t.type?.text,
5390
5391
  description: t.description
5391
- })) ?? [], Da = (e) => e.filter((t) => t.deprecated === void 0).map((t) => ({
5392
+ })) ?? [], Oa = (e) => e.filter((t) => t.deprecated === void 0).map((t) => ({
5392
5393
  name: t.tagName,
5393
5394
  description: gs(t),
5394
- attributes: Oa(t),
5395
+ attributes: Ma(t),
5395
5396
  references: t.demos?.map((i) => ({ name: i.description, url: i.url })) ?? []
5396
- })), Oa = (e) => e.attributes?.filter((t) => t.deprecated === void 0).map((t) => ({
5397
+ })), Ma = (e) => e.attributes?.filter((t) => t.deprecated === void 0).map((t) => ({
5397
5398
  name: t.name,
5398
5399
  description: t.description || void 0,
5399
- values: Ma(t)
5400
- })) ?? [], Ma = (e) => e.type.values?.map((t) => t.value ?? "").filter(Boolean).map((t) => ({ name: t })) ?? [], Ja = (e) => ({
5400
+ values: Ja(t)
5401
+ })) ?? [], Ja = (e) => e.type.values?.map((t) => t.value ?? "").filter(Boolean).map((t) => ({ name: t })) ?? [], Ba = (e) => ({
5401
5402
  $schema: "https://raw.githubusercontent.com/microsoft/vscode-html-languageservice/main/docs/customData.schema.json",
5402
5403
  version: 1.1,
5403
- tags: Da(e)
5404
- }), Ba = (e) => ({
5404
+ tags: Oa(e)
5405
+ }), _a = (e) => ({
5405
5406
  $schema: "https://raw.githubusercontent.com/microsoft/vscode-css-languageservice/main/docs/customData.schema.json",
5406
5407
  version: 1.1,
5407
5408
  properties: hs(e),
5408
5409
  pseudoElements: ys(e)
5409
- }), _a = "@arcgis/lumina:generateDocs";
5410
- function Ka(e) {
5410
+ }), Ka = "@arcgis/lumina:generateDocs";
5411
+ function Wa(e) {
5411
5412
  return e._documentationFileNames.stencilLikeDocsJson !== void 0 && e.provideAssets([
5412
5413
  {
5413
5414
  type: "dynamic",
5414
- source: () => JSON.stringify(wa(e), null, rt(e)),
5415
+ source: () => JSON.stringify(Sa(e), null, rt(e)),
5415
5416
  destination: u.join("../..", e._documentationFileNames.stencilLikeDocsJson)
5416
5417
  }
5417
5418
  ]), {
5418
- name: _a,
5419
+ name: Ka,
5419
5420
  async writeBundle() {
5420
5421
  if (e.isInStorybook)
5421
5422
  return;
5422
- const t = rt(e), { jetBrains: i } = e.options.documentation ?? {}, s = e._documentationFileNames, n = s.vsCodeHtml === void 0 ? void 0 : u.join(e.dir.dist, s.vsCodeHtml), r = s.vsCodeCss === void 0 ? void 0 : u.join(e.dir.dist, s.vsCodeCss), a = s.webTypes === void 0 ? void 0 : u.join(e.dir.dist, s.webTypes), l = [n, r, a].filter(R);
5423
- if (l.length === 0)
5423
+ const t = rt(e), { jetBrains: i } = e.options.documentation ?? {}, s = e._documentationFileNames, n = s.vsCodeHtml === void 0 ? void 0 : u.join(e.dir.dist, s.vsCodeHtml), r = s.vsCodeCss === void 0 ? void 0 : u.join(e.dir.dist, s.vsCodeCss), a = s.webTypes === void 0 ? void 0 : u.join(e.dir.dist, s.webTypes), c = [n, r, a].filter(R);
5424
+ if (c.length === 0)
5424
5425
  return;
5425
- await Fi(l);
5426
+ await Di(c);
5426
5427
  const d = [];
5427
5428
  if (n !== void 0) {
5428
- const c = JSON.stringify(Ja(e.apiJsonComponents), null, t);
5429
- d.push(K(n, c));
5429
+ const l = JSON.stringify(Ba(e.apiJsonComponents), null, t);
5430
+ d.push(K(n, l));
5430
5431
  }
5431
5432
  if (r !== void 0) {
5432
- const c = JSON.stringify(Ba(e.apiJsonComponents), null, t);
5433
- d.push(K(r, c));
5433
+ const l = JSON.stringify(_a(e.apiJsonComponents), null, t);
5434
+ d.push(K(r, l));
5434
5435
  }
5435
5436
  if (a !== void 0) {
5436
- const c = ja(e.apiJsonComponents, typeof i == "object" ? i : {});
5437
- d.push(K(a, JSON.stringify(c, null, t)));
5437
+ const l = Fa(e.apiJsonComponents, typeof i == "object" ? i : {});
5438
+ d.push(K(a, JSON.stringify(l, null, t)));
5438
5439
  }
5439
5440
  await Promise.all(d);
5440
5441
  }
5441
5442
  };
5442
5443
  }
5443
- function Wa(e) {
5444
+ function Ua(e) {
5444
5445
  return {
5445
5446
  name: "@arcgis/lumina:buildWrappers",
5446
5447
  apply: () => e.viteCommand === "build" && !!e.options.build?.wrappers?.length,
5447
5448
  async writeBundle() {
5448
5449
  e.isInStorybook || await Promise.all(
5449
5450
  e.options.build?.wrappers?.map(async (t) => {
5450
- t.type === "react18" && await Ha(e, t);
5451
+ t.type === "react18" && await qa(e, t);
5451
5452
  }) ?? []
5452
5453
  );
5453
5454
  }
5454
5455
  };
5455
5456
  }
5456
- const Ua = "react", Zt = "@lit/react", za = `
5457
- import React from "${Ua}";
5457
+ const za = "react", Zt = "@lit/react", Ha = `
5458
+ import React from "${za}";
5458
5459
  import { createComponent } from "${Zt}";
5459
5460
  import type { EventName } from "${Zt}";
5460
5461
  import { makeReactWrapperFactory, getReactWrapperOptions } from "@arcgis/lumina";
5461
5462
 
5462
5463
  const createWrapper = /*@__PURE__*/ makeReactWrapperFactory(React, createComponent) as typeof createComponent;
5463
5464
  `;
5464
- async function Ha(e, t) {
5465
+ async function qa(e, t) {
5465
5466
  const { name: i } = j(), s = [];
5466
5467
  for (const a of e.apiJson.modules)
5467
- for (const l of a.declarations)
5468
- l.customElement === !0 && s.push(qa(l));
5469
- const n = [`/// <reference types="${i}" preserve="true" />`, za, ...s].join(""), r = u.resolve(t.proxiesFile);
5468
+ for (const c of a.declarations)
5469
+ c.customElement === !0 && s.push(Va(c));
5470
+ const n = [`/// <reference types="${i}" preserve="true" />`, Ha, ...s].join(""), r = u.resolve(t.proxiesFile);
5470
5471
  await X(u.dirname(r), { recursive: !0 }), await K(r, n);
5471
5472
  }
5472
- function qa(e) {
5473
+ function Va(e) {
5473
5474
  const t = e.events?.map(
5474
- (i) => ` ${Hs(`on${ws(i.name)}`)}: "${i.name}" as EventName<HTML${e.pascalCaseName}Element["${i.name}"]>,`
5475
+ (i) => ` ${qs(`on${ws(i.name)}`)}: "${i.name}" as EventName<HTML${e.pascalCaseName}Element["${i.name}"]>,`
5475
5476
  ).join(`
5476
5477
  `);
5477
5478
  return `
@@ -5486,30 +5487,30 @@ ${t}
5486
5487
  );
5487
5488
  `;
5488
5489
  }
5489
- function Sc(e = {}) {
5490
+ function Ec(e = {}) {
5490
5491
  const t = new $(e), s = [
5491
5492
  t._plugin,
5492
- Kn(t),
5493
- Vn(t),
5494
- Qn(t),
5495
- ya(t),
5496
- jn(t),
5497
- Ka(t),
5498
- fa(t),
5499
- mo(t),
5500
- fr(t),
5501
- Fn(t),
5502
- ha(t),
5503
- go(t),
5504
- so(t),
5505
- Vs(t),
5506
- ln(t),
5493
+ Wn(t),
5494
+ Gn(t),
5495
+ Zn(t),
5496
+ va(t),
5497
+ Rn(t),
5507
5498
  Wa(t),
5508
- Rn(t)
5499
+ ga(t),
5500
+ fo(t),
5501
+ gr(t),
5502
+ Dn(t),
5503
+ ya(t),
5504
+ ho(t),
5505
+ ro(t),
5506
+ Gs(t),
5507
+ pn(t),
5508
+ Ua(t),
5509
+ On(t)
5509
5510
  ].filter(R);
5510
5511
  return s.context = t, s;
5511
5512
  }
5512
- const Cc = {
5513
+ const Tc = {
5513
5514
  initializeComponentDependencies: Ti,
5514
5515
  updateLuminaTs: Xi,
5515
5516
  propertyToAttributeMappings: W,
@@ -5521,7 +5522,7 @@ const Cc = {
5521
5522
  htmlAlwaysAttributes: Qe
5522
5523
  };
5523
5524
  export {
5524
- Cc as exportsForCodemod,
5525
+ Tc as exportsForCodemod,
5525
5526
  De as inferCdnUrl,
5526
- Sc as useLumina
5527
+ Ec as useLumina
5527
5528
  };