@arcgis/lumina-compiler 6.0.0-next.2 → 6.0.0-next.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,31 +1,31 @@
1
1
  import { externalizeDependencies as Cs } from "@arcgis/node-toolkit/vite/externalizeDependenciesPlugin";
2
- import { isNotUndefined as R } from "@arcgis/toolkit/predicate";
3
- import { f as b, l as T } from "./chunks/logger.js";
2
+ import { isNotUndefined as F } from "@arcgis/toolkit/predicate";
3
+ import { f as b, l as $ } from "./chunks/logger.js";
4
4
  import o from "typescript";
5
- import { camelToKebab as si, getPreamble as Es, uncapitalize as Ct, capitalize as Ts } from "@arcgis/toolkit/string";
6
- import { lazyMetaSubItemJoiner as $s, lazyMetaItemJoiner as Je, lazyMetaGroupJoiner as Ps, propertyFlagAttribute as Et, propertyFlagReflect as ks, propertyFlagBoolean as Is, propertyFlagNumber as xs, propertyFlagState as As, propertyFlagReadOnly as Ls, propertyFlagNoAccessor as Ns, propertyFlagUseDefault as js } from "@arcgis/lumina/config";
7
- import { path as u, isPosix as ri, toPosixPathSeparators as G, toSystemPathSeparators as Re, getCwd as ni } from "@arcgis/node-toolkit/path";
8
- import { isApiMethodAsync as Fs, globalPackageIdentifier as Rs, isApiMethod as Ds, isApiProperty as Os } from "@arcgis/api-extractor/utils/apiHelpers";
9
- import { existsAsync as K, findPath as oi } from "@arcgis/node-toolkit/file";
10
- import { readFile as z, readdir as at, mkdir as X, writeFile as _, copyFile as Ms, rm as Js, cp as Bs } from "node:fs/promises";
11
- import { retrievePackageJson as j, fetchPackageLocation as $e, asyncRetrievePackageJson as ai } from "@arcgis/node-toolkit/packageJson";
12
- import { build as Ks } from "esbuild";
13
- import _s from "mime-types";
14
- import { forEachWithConcurrency as Ws } from "@arcgis/toolkit/promise";
5
+ import { camelToKebab as ri, getPreamble as Es, uncapitalize as Et } from "@arcgis/toolkit/string";
6
+ import { lazyMetaSubItemJoiner as Ts, lazyMetaItemJoiner as Je, lazyMetaGroupJoiner as $s, propertyFlagAttribute as Tt, propertyFlagReflect as Ps, propertyFlagBoolean as ks, propertyFlagNumber as Is, propertyFlagState as xs, propertyFlagReadOnly as As, propertyFlagNoAccessor as Ls, propertyFlagUseDefault as Ns } from "@arcgis/lumina/config";
7
+ import { path as u, isPosix as ni, toPosixPathSeparators as G, toSystemPathSeparators as De, getCwd as oi } from "@arcgis/node-toolkit/path";
8
+ import { isApiMethodAsync as js, globalPackageIdentifier as Fs, isApiMethod as Ds, isApiProperty as Rs } from "@arcgis/api-extractor/utils/apiHelpers";
9
+ import { existsAsync as _, findPath as at } from "@arcgis/node-toolkit/file";
10
+ import { readFile as W, readdir as ct, mkdir as ie, writeFile as z, copyFile as Os, rm as Ms, cp as Js } from "node:fs/promises";
11
+ import { retrievePackageJson as D, fetchPackageLocation as $e, asyncRetrievePackageJson as ai } from "@arcgis/node-toolkit/packageJson";
12
+ import { build as Bs } from "esbuild";
13
+ import Ks from "mime-types";
14
+ import { forEachWithConcurrency as _s } from "@arcgis/toolkit/promise";
15
15
  import { glob as Us } from "tinyglobby";
16
16
  import { renameComponentFolder as Ge } from "@arcgis/api-extractor/extractor/webComponent/pathMapping";
17
+ import { readFileSync as Ws, writeFileSync as ci } from "node:fs";
17
18
  import { useApiExtractor as zs } from "@arcgis/api-extractor/vite/plugin";
18
- import { writeFileSync as ci } from "node:fs";
19
- import { styleText as Hs } from "node:util";
20
- import { unsafeGetUndocumentedPrinter as qs, unsafeUndocumentedTs as Tt } from "@arcgis/api-extractor/utils/internalTypeScriptApis";
19
+ import { styleText as qs } from "node:util";
20
+ import { unsafeGetUndocumentedPrinter as Hs, unsafeUndocumentedTs as $t } from "@arcgis/api-extractor/utils/internalTypeScriptApis";
21
21
  import { pathIsComponentEntrypoint as Pe } from "@arcgis/api-extractor/extractor/webComponent/findComponents";
22
- import { loadApiExtractorConfig as Vs, mergeApiExtractorConfigs as $t } from "@arcgis/api-extractor/extractor/config";
22
+ import { loadApiExtractorConfig as Vs, mergeApiExtractorConfigs as Pt } from "@arcgis/api-extractor/extractor/config";
23
23
  import { loadTypeScriptConfig as Gs } from "@arcgis/node-toolkit/vite/typeScript";
24
24
  import { mappedFind as Xe } from "@arcgis/toolkit/array";
25
- import { isPropertyEscapeNeeded as li, maybeEscapePropertyName as Xs } from "@arcgis/api-extractor/utils/partPrinter";
26
- import { getPackageNameFromExternalSpecifier as Ys, getMemberName as di } from "@arcgis/api-extractor/utils/astHelpers";
25
+ import { isPropertyEscapeNeeded as li } from "@arcgis/api-extractor/utils/partPrinter";
26
+ import { getPackageNameFromExternalSpecifier as Xs, getMemberName as di } from "@arcgis/api-extractor/utils/astHelpers";
27
27
  import { identity as pi } from "@arcgis/toolkit/function";
28
- function Qs(e) {
28
+ function Ys(e) {
29
29
  const t = e.options?.build?.dependencies ?? {}, i = Cs({
30
30
  bundleIn: t.bundleIn,
31
31
  externalize: [
@@ -42,7 +42,7 @@ function Qs(e) {
42
42
  e.isInStorybook && (i.resolveId = void 0);
43
43
  }, i;
44
44
  }
45
- const Zs = "Fragment", Be = "DynamicHtmlTag", Ke = "DynamicSvgTag", ke = /* @__PURE__ */ Symbol("dynamic html tag name"), Ye = /* @__PURE__ */ Symbol("dynamic svg tag name"), ui = /* @__PURE__ */ new Set([
45
+ const Qs = "Fragment", Be = "DynamicHtmlTag", Ke = "DynamicSvgTag", ke = /* @__PURE__ */ Symbol("dynamic html tag name"), Ye = /* @__PURE__ */ Symbol("dynamic svg tag name"), ui = /* @__PURE__ */ new Set([
46
46
  /**
47
47
  * There is a "className" property. However, in JSX typings we use "class"
48
48
  * instead to keep name shorter and to match Stencil's name. Thus, it should
@@ -100,7 +100,7 @@ const Zs = "Fragment", Be = "DynamicHtmlTag", Ke = "DynamicSvgTag", ke = /* @__P
100
100
  meta: /* @__PURE__ */ new Set(["charset"]),
101
101
  math: /* @__PURE__ */ new Set(["dir", "displaystyle", "scriptlevel"]),
102
102
  menu: /* @__PURE__ */ new Set(["label", "type"])
103
- }, W = {
103
+ }, U = {
104
104
  common: {
105
105
  reflected: {
106
106
  hidden: "hidden",
@@ -913,8 +913,8 @@ const Zs = "Fragment", Be = "DynamicHtmlTag", Ke = "DynamicSvgTag", ke = /* @__P
913
913
  }
914
914
  }
915
915
  };
916
- fi(W.common);
917
- Object.values(W.perElement).forEach(fi);
916
+ fi(U.common);
917
+ Object.values(U.perElement).forEach(fi);
918
918
  function fi(e) {
919
919
  e?.reflected !== void 0 && (e.reflected = Object.assign(/* @__PURE__ */ Object.create(null), e.reflected)), e?.stringifiedReflected !== void 0 && (e.stringifiedReflected = Object.assign(
920
920
  /* @__PURE__ */ Object.create(null),
@@ -924,7 +924,7 @@ function fi(e) {
924
924
  e.stringifiedNonReflected
925
925
  ));
926
926
  }
927
- const Pt = /* @__PURE__ */ new Set(["itemScope"]), gi = /* @__PURE__ */ new Set([
927
+ const kt = /* @__PURE__ */ new Set(["itemScope"]), gi = /* @__PURE__ */ new Set([
928
928
  "abort",
929
929
  "animationCancel",
930
930
  "animationEnd",
@@ -1023,7 +1023,7 @@ const Pt = /* @__PURE__ */ new Set(["itemScope"]), gi = /* @__PURE__ */ new Set(
1023
1023
  "volumeChange",
1024
1024
  "waiting",
1025
1025
  "wheel"
1026
- ]), er = /* @__PURE__ */ new Set([
1026
+ ]), Zs = /* @__PURE__ */ new Set([
1027
1027
  "area",
1028
1028
  "base",
1029
1029
  "br",
@@ -1040,7 +1040,7 @@ const Pt = /* @__PURE__ */ new Set(["itemScope"]), gi = /* @__PURE__ */ new Set(
1040
1040
  "source",
1041
1041
  "track",
1042
1042
  "wbr"
1043
- ]), ct = /* @__PURE__ */ new Set([
1043
+ ]), lt = /* @__PURE__ */ new Set([
1044
1044
  "animate",
1045
1045
  "animateMotion",
1046
1046
  "animateTransform",
@@ -1099,7 +1099,7 @@ const Pt = /* @__PURE__ */ new Set(["itemScope"]), gi = /* @__PURE__ */ new Set(
1099
1099
  "tspan",
1100
1100
  "use",
1101
1101
  "view"
1102
- ]), tr = /* @__PURE__ */ new Set(["title", "svg", "a", "script", "style"]), lt = /* @__PURE__ */ new Set([
1102
+ ]), er = /* @__PURE__ */ new Set(["title", "svg", "a", "script", "style"]), dt = /* @__PURE__ */ new Set([
1103
1103
  "annotation-xml",
1104
1104
  "annotation",
1105
1105
  "maction",
@@ -1131,7 +1131,7 @@ const Pt = /* @__PURE__ */ new Set(["itemScope"]), gi = /* @__PURE__ */ new Set(
1131
1131
  "munder",
1132
1132
  "munderover",
1133
1133
  "semantics"
1134
- ]), ir = /* @__PURE__ */ new Set([
1134
+ ]), tr = /* @__PURE__ */ new Set([
1135
1135
  "annotation-xml",
1136
1136
  "color-profile",
1137
1137
  "font-face",
@@ -1141,7 +1141,7 @@ const Pt = /* @__PURE__ */ new Set(["itemScope"]), gi = /* @__PURE__ */ new Set(
1141
1141
  "font-face-name",
1142
1142
  "missing-glyph"
1143
1143
  ]);
1144
- function sr(e) {
1144
+ function ir(e) {
1145
1145
  if (e.length === 0)
1146
1146
  return "";
1147
1147
  const t = e[0];
@@ -1149,16 +1149,16 @@ function sr(e) {
1149
1149
  `)) {
1150
1150
  const n = t === `
1151
1151
  `, r = e.lastIndexOf(`
1152
- `), c = e.slice(r + 1).trim().length === 0, d = n ? e.trimStart() : e;
1153
- return c ? d.trimEnd() : d;
1152
+ `), l = e.slice(r + 1).trim().length === 0, d = n ? e.trimStart() : e;
1153
+ return l ? d.trimEnd() : d;
1154
1154
  }
1155
1155
  return e.trim().length === 0 ? t : e;
1156
1156
  }
1157
- const rr = (e) => e.replaceAll("\\", "\\\\").replace(nr, "\\${").replaceAll("`", "\\`"), nr = /\$\{/gu, or = (e) => !ar.test(e), ar = /^[^\s"'=<>`]+$/u, cr = /[&<>]/gu, lr = {
1157
+ const sr = (e) => e.replaceAll("\\", "\\\\").replace(rr, "\\${").replaceAll("`", "\\`"), rr = /\$\{/gu, nr = (e) => !or.test(e), or = /^[^\s"'=<>`]+$/u, ar = /[&<>]/gu, cr = {
1158
1158
  "&": "&amp;",
1159
1159
  "<": "&lt;",
1160
1160
  ">": "&gt;"
1161
- }, hi = (e) => e.replace(cr, (t) => lr[t]), dt = (e) => typeof e == "string" && e.includes("-") && !ir.has(e), dr = ["keyed", "ref", "repeat", "live"], ae = "staticHtml", Y = "staticSvg", ce = "html", se = "svg", yi = /* @__PURE__ */ Symbol("maybe HTML namespace or maybe SVG"), vi = "css", bi = "mathml", wi = [vi, ce, bi, ae, Y, se], pr = new Set(wi), ur = ["safeClassMap", "safeStyleMap", "deferLoad", "stabilizedRef"], mr = "nothing", fr = [...dr, ...wi, ...ur, mr], gr = (e) => o.isArrayLiteralExpression(e) && e.elements.every((t) => fe(t)), fe = (e) => o.isJsxElement(e) || o.isJsxSelfClosingElement(e) || o.isJsxFragment(e), re = {
1161
+ }, hi = (e) => e.replace(ar, (t) => cr[t]), pt = (e) => typeof e == "string" && e.includes("-") && !tr.has(e), lr = ["keyed", "ref", "repeat", "live"], ae = "staticHtml", X = "staticSvg", ce = "html", se = "svg", yi = /* @__PURE__ */ Symbol("maybe HTML namespace or maybe SVG"), vi = "css", bi = "mathml", wi = [vi, ce, bi, ae, X, se], dr = new Set(wi), pr = ["safeClassMap", "safeStyleMap", "deferLoad", "stabilizedRef"], ur = "nothing", mr = [...lr, ...wi, ...pr, ur], fr = (e) => o.isArrayLiteralExpression(e) && e.elements.every((t) => fe(t)), fe = (e) => o.isJsxElement(e) || o.isJsxSelfClosingElement(e) || o.isJsxFragment(e), re = {
1162
1162
  [ce]: ["lit", "lit/html.js", "lit-html"],
1163
1163
  /**
1164
1164
  * Sadly, Lit called these "html" and "svg", rather than "staticHtml" and
@@ -1168,7 +1168,7 @@ const rr = (e) => e.replaceAll("\\", "\\\\").replace(nr, "\\${").replaceAll("`",
1168
1168
  */
1169
1169
  [ae]: ["lit/static-html.js", "lit-html/static.js"],
1170
1170
  [se]: ["lit", "lit-html", "lit/html.js"],
1171
- [Y]: ["lit/static-html.js", "lit-html/static.js"],
1171
+ [X]: ["lit/static-html.js", "lit-html/static.js"],
1172
1172
  [bi]: ["lit", "lit-html", "lit/html.js"],
1173
1173
  [vi]: ["lit", "@lit/reactive-element/css-tag.js", "@lit/reactive-element"],
1174
1174
  safeClassMap: ["@arcgis/lumina"],
@@ -1180,7 +1180,7 @@ const rr = (e) => e.replaceAll("\\", "\\\\").replace(nr, "\\${").replaceAll("`",
1180
1180
  repeat: ["lit/directives/repeat.js", "lit-html/directives/repeat.js"],
1181
1181
  ref: ["lit/directives/ref.js", "lit-html/directives/ref.js"],
1182
1182
  nothing: ["lit", "@arcgis/lumina", "lit/html.js", "lit-html", "lit-element/lit-element.js"]
1183
- }, hr = /* @__PURE__ */ new Set([
1183
+ }, gr = /* @__PURE__ */ new Set([
1184
1184
  "h",
1185
1185
  "Fragment",
1186
1186
  "state",
@@ -1190,7 +1190,7 @@ const rr = (e) => e.replaceAll("\\", "\\\\").replace(nr, "\\${").replaceAll("`",
1190
1190
  "bindProperty",
1191
1191
  "bindEvent",
1192
1192
  "bindAttribute"
1193
- ]), yr = /\.(?:css|s[ac]ss|less|styl(?:us)?|postcss|pcss|sss)(\\?|$)/u, de = "@arcgis/lumina:loadLitCss", Ie = "?litCss", Q = "?layeredLitCss", Ze = "?globalFileLitCss", vr = (e) => ({
1193
+ ]), hr = /\.(?:css|s[ac]ss|less|styl(?:us)?|postcss|pcss|sss)(\\?|$)/u, de = "@arcgis/lumina:loadLitCss", Ie = "?litCss", Y = "?layeredLitCss", Ze = "?globalFileLitCss", yr = (e) => ({
1194
1194
  name: de,
1195
1195
  enforce: "pre",
1196
1196
  configResolved(t) {
@@ -1222,22 +1222,22 @@ const rr = (e) => e.replaceAll("\\", "\\\\").replace(nr, "\\${").replaceAll("`",
1222
1222
  ...s,
1223
1223
  // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
1224
1224
  async handler(r, a) {
1225
- const c = a.endsWith(Ie);
1226
- c && (a = a.slice(0, -Ie.length));
1227
- const d = a.endsWith(Q);
1228
- d && (a = a.slice(0, -Q.length));
1229
- const l = a.endsWith(Ze);
1230
- if (l && (a = a.slice(0, -Ze.length)), !c && !d && !l)
1225
+ const l = a.endsWith(Ie);
1226
+ l && (a = a.slice(0, -Ie.length));
1227
+ const d = a.endsWith(Y);
1228
+ d && (a = a.slice(0, -Y.length));
1229
+ const c = a.endsWith(Ze);
1230
+ if (c && (a = a.slice(0, -Ze.length)), !l && !d && !c)
1231
1231
  return await s.handler.call(this, r, a);
1232
1232
  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(Si) || !f.endsWith(br) ? (T.warn(
1233
+ return typeof f != "string" || !f.startsWith(Si) || !f.endsWith(vr) ? ($.warn(
1234
1234
  de,
1235
1235
  `Expected vite:css-post to return a JS module with a string literal. Received: ${JSON.stringify(
1236
1236
  f
1237
1237
  )}`
1238
- ), m) : l ? (e._globalCssString = Ci(f), { code: "", map: { mappings: "" } }) : {
1238
+ ), m) : c ? (e._globalCssString = Ci(f), { code: "", map: { mappings: "" } }) : {
1239
1239
  ...g,
1240
- code: Er(f, e.hmrEnabled, e.shouldMinify, d),
1240
+ code: Cr(f, e.hmrEnabled, e.shouldMinify, d),
1241
1241
  /**
1242
1242
  * Vite's original transform does not generate source maps for inlined
1243
1243
  * css, thus we can't either
@@ -1247,8 +1247,8 @@ const rr = (e) => e.replaceAll("\\", "\\\\").replace(nr, "\\${").replaceAll("`",
1247
1247
  }
1248
1248
  };
1249
1249
  }
1250
- }), Si = 'export default "', br = '"', wr = `import { css } from '${re.css[0]}';
1251
- export const styles = css\``, Sr = "`;\nexport default styles;", Cr = `
1250
+ }), Si = 'export default "', vr = '"', br = `import { css } from '${re.css[0]}';
1251
+ export const styles = css\``, wr = "`;\nexport default styles;", Sr = `
1252
1252
 
1253
1253
  if(import.meta.hot) {
1254
1254
  import.meta.hot.data.styles ??= styles;
@@ -1260,36 +1260,36 @@ if(import.meta.hot) {
1260
1260
  import.meta.hot.data.styles.styleSheet.replaceSync(nextExports.styles.cssText);
1261
1261
  });
1262
1262
  }`, Ci = (e) => e.slice(Si.length - 1);
1263
- function Er(e, t, i, s) {
1264
- const n = Ci(e), r = JSON.parse(n), a = rr(r), c = s ? `@layer{${i ? "" : `
1263
+ function Cr(e, t, i, s) {
1264
+ const n = Ci(e), r = JSON.parse(n), a = sr(r), l = s ? `@layer{${i ? "" : `
1265
1265
  `}${a}${i ? "" : `
1266
1266
  `}}` : a;
1267
- return `${wr}${c}${Sr}${t ? Cr : ""}`;
1267
+ return `${br}${l}${wr}${t ? Sr : ""}`;
1268
1268
  }
1269
- function Tr(e) {
1270
- return `import("${$r}").then(({ setCustomElementsManifest }) => {
1271
- setCustomElementsManifest(${Pr(e)});
1269
+ function Er(e) {
1270
+ return `import("${Tr}").then(({ setCustomElementsManifest }) => {
1271
+ setCustomElementsManifest(${$r(e)});
1272
1272
  });`;
1273
1273
  }
1274
- const $r = "@storybook/web-components-vite", Pr = (e) => `JSON.parse(\`${kr(JSON.stringify(JSON.stringify(e)).slice(1, -1))}\`)`;
1275
- function kr(e) {
1274
+ const Tr = "@storybook/web-components-vite", $r = (e) => `JSON.parse(\`${Pr(JSON.stringify(JSON.stringify(e)).slice(1, -1))}\`)`;
1275
+ function Pr(e) {
1276
1276
  return e.replaceAll('\\"', '"').replaceAll("`", "\\`").replaceAll("${", "\\${");
1277
1277
  }
1278
- function Ir(e) {
1279
- xr(e);
1278
+ function kr(e) {
1279
+ Ir(e);
1280
1280
  const t = e.options.css?.globalStylesPath;
1281
1281
  if (t === void 0)
1282
1282
  return "";
1283
1283
  const i = u.join(e.dir.root, t);
1284
1284
  return e.viteCommand === "serve" || e.isInStorybook ? [
1285
- `import globalStyles from "${i}${Q}";`,
1285
+ `import globalStyles from "${i}${Y}";`,
1286
1286
  "document.adoptedStyleSheets = [...document.adoptedStyleSheets, globalStyles.styleSheet!];",
1287
1287
  Ti("", e)
1288
1288
  ].join(`
1289
1289
  `) : `import "${i}${Ze}";`;
1290
1290
  }
1291
1291
  const Ei = "hydrated";
1292
- function xr(e) {
1292
+ function Ir(e) {
1293
1293
  e._globalHydratedCssString = [
1294
1294
  ":not([",
1295
1295
  e.options.css?.hydratedAttribute ?? Ei,
@@ -1306,58 +1306,58 @@ function Ti(e, t) {
1306
1306
  ].join(`
1307
1307
  `);
1308
1308
  }
1309
- const Ar = (e) => `@layer{${e.shouldMinify ? "" : `
1309
+ const xr = (e) => `@layer{${e.shouldMinify ? "" : `
1310
1310
  `}${e._globalHydratedCssString}${e.shouldMinify ? "" : `
1311
1311
 
1312
1312
  `}${e._globalCssString ? JSON.parse(e._globalCssString) : ""}${e.shouldMinify ? "" : `
1313
1313
  `}}`;
1314
- function Lr(e) {
1314
+ function Ar(e) {
1315
1315
  const t = [], i = [];
1316
1316
  for (const s of e.privateApiJson.modules)
1317
1317
  for (const n of s.declarations)
1318
- n.customElement === !0 && (i.push(Nr(n, e, s.sourcePath)), t.push(s.sourcePath));
1318
+ n.customElement === !0 && (i.push(Lr(n, e, s.sourcePath)), t.push(s.sourcePath));
1319
1319
  return [
1320
1320
  'import { runtime } from "./runtime.ts";',
1321
1321
  'import { makeDefineCustomElements } from "@arcgis/lumina";',
1322
- Ir(e),
1323
- e.hmrEnabled ? Fr : "",
1322
+ kr(e),
1323
+ e.hmrEnabled ? jr : "",
1324
1324
  "",
1325
- e.isInStorybook ? Tr(e.apiJson) : "",
1325
+ e.isInStorybook ? Er(e.apiJson) : "",
1326
1326
  "",
1327
1327
  "export const defineCustomElements = makeDefineCustomElements(runtime, {",
1328
1328
  i.join(`,
1329
1329
  `),
1330
1330
  "});",
1331
- e.hmrEnabled ? Rr(t) : ""
1331
+ e.hmrEnabled ? Fr(t) : ""
1332
1332
  ].join(`
1333
1333
  `);
1334
1334
  }
1335
- const Nr = (e, t, i) => [
1335
+ const Lr = (e, t, i) => [
1336
1336
  ` "${e.tagName}": [`,
1337
1337
  `()=>import("${u.join(t.dir.root, i)}"),`,
1338
- jr(e),
1338
+ Nr(e),
1339
1339
  "]"
1340
1340
  ].join("");
1341
- function jr(e) {
1342
- const { properties: t, asyncMethods: i, syncMethods: s, formAssociated: n } = $i(e), r = t.map((g) => g.join($s)).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
- return `${p.length > 0 || n ? `"${p.join(Ps)}"` : ""}${n ? ",1" : ""}`;
1341
+ function Nr(e) {
1342
+ const { properties: t, asyncMethods: i, syncMethods: s, formAssociated: n } = $i(e), r = t.map((g) => g.join(Ts)).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);
1343
+ return `${p.length > 0 || n ? `"${p.join($s)}"` : ""}${n ? ",1" : ""}`;
1344
1344
  }
1345
1345
  function $i(e) {
1346
1346
  const t = [], i = [], s = [];
1347
1347
  for (let r = 0; r < e.members.length; ++r) {
1348
1348
  const a = e.members[r];
1349
1349
  if (a.kind === "field") {
1350
- const c = typeof a.attribute == "string", d = c && a.attribute !== si(a.name);
1350
+ const l = typeof a.attribute == "string", d = l && a.attribute !== ri(a.name);
1351
1351
  t.push(
1352
- c && !d ? [a.name] : [a.name, d ? String(a.attribute) : ""]
1352
+ l && !d ? [a.name] : [a.name, d ? String(a.attribute) : ""]
1353
1353
  );
1354
- } else a.kind === "method" && a.name !== "componentOnReady" && (Fs(a) ? i.push(a.name) : s.push(a.name));
1354
+ } else a.kind === "method" && a.name !== "componentOnReady" && (js(a) ? i.push(a.name) : s.push(a.name));
1355
1355
  }
1356
1356
  const n = e.formAssociated === !0;
1357
1357
  return { tagName: e.tagName, properties: t, asyncMethods: i, syncMethods: s, formAssociated: n };
1358
1358
  }
1359
- const Fr = `import { handleHmrUpdate, handleComponentMetaUpdate } from "@arcgis/lumina/hmrSupport";
1360
- `, Rr = (e) => `
1359
+ const jr = `import { handleHmrUpdate, handleComponentMetaUpdate } from "@arcgis/lumina/hmrSupport";
1360
+ `, Fr = (e) => `
1361
1361
  if(import.meta.hot) {
1362
1362
  import.meta.hot.on("component-meta-update", handleComponentMetaUpdate);
1363
1363
  import.meta.hot.accept([
@@ -1367,11 +1367,11 @@ ${e.map((t) => ` "/${t}",`).join(`
1367
1367
  }`, Dr = "@arcgis/lumina-compiler", Pi = {
1368
1368
  name: Dr
1369
1369
  };
1370
- var Or = ["@arcgis/api-extractor", "@arcgis/arcade-languageservice", "@arcgis/arcade-parser", "@arcgis/core", "@arcgis/languages-api-utils", "@arcgis/languages-sdk-spec", "@arcgis/lumina", "@arcgis/lumina-compiler", "@arcgis/lumina-toolkit", "@arcgis/node-toolkit", "@arcgis/stencil-to-lumina", "@arcgis/toolkit", "@arcgis/typescript-config"];
1370
+ var Rr = ["@arcgis/api-extractor", "@arcgis/arcade-languageservice", "@arcgis/arcade-parser", "@arcgis/core", "@arcgis/languages-api-utils", "@arcgis/languages-sdk-spec", "@arcgis/lumina", "@arcgis/lumina-compiler", "@arcgis/lumina-toolkit", "@arcgis/node-toolkit", "@arcgis/stencil-to-lumina", "@arcgis/toolkit", "@arcgis/typescript-config"];
1371
1371
  async function ki(e, t) {
1372
- return ne ??= Jr(e, t), await ne;
1372
+ return ne ??= Mr(e, t), await ne;
1373
1373
  }
1374
- function Mr() {
1374
+ function Or() {
1375
1375
  if (xe === void 0)
1376
1376
  throw Error(
1377
1377
  b(
@@ -1391,18 +1391,18 @@ function Ii() {
1391
1391
  );
1392
1392
  return et;
1393
1393
  }
1394
- async function Jr(e, t) {
1395
- const i = j(e), s = i.dependencies ?? {}, n = i.peerDependencies ?? {}, a = (await Promise.all(
1396
- [...Object.keys(s), ...Object.keys(n)].filter((l) => !Br.has(l)).flatMap(async (l) => await xi(l, e))
1397
- )).filter(R);
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));
1394
+ async function Mr(e, t) {
1395
+ const i = D(e), s = i.dependencies ?? {}, n = i.peerDependencies ?? {}, a = (await Promise.all(
1396
+ [...Object.keys(s), ...Object.keys(n)].filter((c) => !Jr.has(c)).flatMap(async (c) => await xi(c, e))
1397
+ )).filter(F);
1398
+ xe ??= a, et = Object.fromEntries(a.flatMap((c) => Object.entries(c.components)));
1399
+ const l = t?.serve?.extraDependencies?.map(
1400
+ (c) => typeof c == "string" ? c : c.name
1401
+ ), d = l === void 0 ? a : a.filter((c) => !l.includes(c.packageName));
1402
1402
  return xe ??= d, d;
1403
1403
  }
1404
- const Br = /* @__PURE__ */ new Set([
1405
- ...Or,
1404
+ const Jr = /* @__PURE__ */ new Set([
1405
+ ...Rr,
1406
1406
  "@arcgis/languages-sdk-specs",
1407
1407
  "@commander-js/extra-typings",
1408
1408
  "@custom-elements-manifest/analyzer",
@@ -1412,7 +1412,6 @@ const Br = /* @__PURE__ */ new Set([
1412
1412
  "@lit-labs/ssr",
1413
1413
  "@lit/context",
1414
1414
  "@lit-labs/ssr-client",
1415
- "@lit/react",
1416
1415
  "@types/color",
1417
1416
  "@types/sortablejs",
1418
1417
  "color",
@@ -1437,44 +1436,44 @@ const Br = /* @__PURE__ */ new Set([
1437
1436
  ]);
1438
1437
  let xe, et, ne;
1439
1438
  async function xi(e, t) {
1440
- const i = await $e(e, t), s = await ai(i), n = "exports" in s, r = Yr.bind(void 0, n), a = "@stencil/core" in (s.dependencies ?? {}) || "@stencil/core" in (s.devDependencies ?? {}), c = u.join(i, "dist/esm/loader.js");
1441
- if (a ? await K(c) : !1) {
1442
- const g = await z(c, "utf8"), h = Kr(g, "bootstrapLazy("), y = g.indexOf(", options", h), v = g.slice(h, y), w = v.startsWith('JSON.parse("') ? v.slice(12, -2).replaceAll('\\"', '"') : v;
1439
+ const i = await $e(e, t), s = await ai(i), n = "exports" in s, r = Xr.bind(void 0, n), a = "@stencil/core" in (s.dependencies ?? {}) || "@stencil/core" in (s.devDependencies ?? {}), l = u.join(i, "dist/esm/loader.js");
1440
+ if (a ? await _(l) : !1) {
1441
+ const g = await W(l, "utf8"), h = Br(g, "bootstrapLazy("), y = g.indexOf(", options", h), v = g.slice(h, y), w = v.startsWith('JSON.parse("') ? v.slice(12, -2).replaceAll('\\"', '"') : v;
1443
1442
  try {
1444
- const C = JSON.parse(w), E = Gr(C, { packageName: e, getImportPath: r });
1445
- return { packageName: e, type: "stencil", components: E, packageLocation: i, packageJson: s };
1446
- } catch (C) {
1447
- T.warn("@arcgis/lumina", `Failed to parse dist/esm/loader.js for ${e}.
1448
- Error: ${String(C)}`);
1443
+ const S = JSON.parse(w), T = Vr(S, { packageName: e, getImportPath: r });
1444
+ return { packageName: e, type: "stencil", components: T, packageLocation: i, packageJson: s };
1445
+ } catch (S) {
1446
+ $.warn("@arcgis/lumina", `Failed to parse dist/esm/loader.js for ${e}.
1447
+ Error: ${String(S)}`);
1449
1448
  }
1450
1449
  }
1451
- const l = kt(s.customElements);
1452
- if (l != null) {
1453
- const g = u.join(i, l), h = JSON.parse(await z(g, "utf-8")), y = _r(h), v = Ai(h, {
1450
+ const c = It(s.customElements);
1451
+ if (c != null) {
1452
+ const g = u.join(i, c), h = JSON.parse(await W(g, "utf-8")), y = Kr(h), v = Ai(h, {
1454
1453
  packageName: e,
1455
1454
  getImportPath: r
1456
1455
  });
1457
1456
  return { type: y ? "@arcgis/lumina" : "unknown", packageName: e, components: v, packageLocation: i, packageJson: s };
1458
1457
  }
1459
- const p = kt(s["web-types"]);
1458
+ const p = It(s["web-types"]);
1460
1459
  if (p != null) {
1461
- const g = u.join(i, p), h = JSON.parse(await z(g, "utf-8")), y = Wr(h, {
1460
+ const g = u.join(i, p), h = JSON.parse(await W(g, "utf-8")), y = _r(h, {
1462
1461
  packageName: e,
1463
1462
  getImportPath: r
1464
1463
  });
1465
1464
  return { type: "unknown", packageName: e, components: y, packageLocation: i, packageJson: s };
1466
1465
  }
1467
1466
  const m = u.join(i, "dist/components");
1468
- if (await K(m)) {
1469
- const g = await Xr(m, {
1467
+ if (await _(m)) {
1468
+ const g = await Gr(m, {
1470
1469
  packageName: e,
1471
1470
  getImportPath: r
1472
1471
  });
1473
1472
  return { type: "unknown", packageName: e, components: g, packageLocation: i, packageJson: s };
1474
1473
  }
1475
1474
  }
1476
- const kt = (e) => Array.isArray(e) ? e[0] : e;
1477
- function Kr(e, t) {
1475
+ const It = (e) => Array.isArray(e) ? e[0] : e;
1476
+ function Br(e, t) {
1478
1477
  const i = e.indexOf(t);
1479
1478
  return i === -1 ? -1 : i + t.length;
1480
1479
  }
@@ -1489,7 +1488,7 @@ function Ai(e, t, i = !1) {
1489
1488
  const d = r.declarations[a];
1490
1489
  if (d.customElement !== !0)
1491
1490
  continue;
1492
- const l = (
1491
+ const c = (
1493
1492
  // New api.json
1494
1493
  "sourcePath" in r ? r.path : (
1495
1494
  // Older api.json
@@ -1497,7 +1496,7 @@ function Ai(e, t, i = !1) {
1497
1496
  )
1498
1497
  ), p = d.tagName, m = {
1499
1498
  packageName: t.packageName,
1500
- modulePath: l ?? t.getImportPath(p),
1499
+ modulePath: c ?? t.getImportPath(p),
1501
1500
  propToAttribute: Object.fromEntries(
1502
1501
  (d.attributes ?? []).map((f) => [f.fieldName ?? f.name, f.name])
1503
1502
  ),
@@ -1515,11 +1514,11 @@ function Ai(e, t, i = !1) {
1515
1514
  }
1516
1515
  return s;
1517
1516
  }
1518
- const _r = (e) => (
1517
+ const Kr = (e) => (
1519
1518
  // Since 5.0
1520
1519
  e.compiler?.name === "@arcgis/api-extractor" || // Before 5.0
1521
1520
  e.compiler?.name === Pi.name
1522
- ), Wr = (e, t) => Object.fromEntries(
1521
+ ), _r = (e, t) => Object.fromEntries(
1523
1522
  (e.contributions?.html?.elements ?? e.contributions?.html?.tags)?.map(
1524
1523
  (i) => [
1525
1524
  i.name,
@@ -1530,7 +1529,7 @@ const _r = (e) => (
1530
1529
  }
1531
1530
  ]
1532
1531
  ) ?? []
1533
- ), Ur = 1, zr = 2, Hr = 4, qr = 8, Vr = Ur | zr | Hr | qr, Gr = (e, t) => Object.fromEntries(
1532
+ ), Ur = 1, Wr = 2, zr = 4, qr = 8, Hr = Ur | Wr | zr | qr, Vr = (e, t) => Object.fromEntries(
1534
1533
  e.flatMap(
1535
1534
  ([i, s]) => s.map(
1536
1535
  ([n, r, a]) => [
@@ -1539,14 +1538,14 @@ const _r = (e) => (
1539
1538
  packageName: t.packageName,
1540
1539
  modulePath: t.getImportPath(r),
1541
1540
  propToAttribute: Object.fromEntries(
1542
- Object.entries(a ?? {}).filter(([c, [d]]) => d & Vr).map(([c, [d, l = c]]) => [c, l])
1541
+ Object.entries(a ?? {}).filter(([l, [d]]) => d & Hr).map(([l, [d, c = l]]) => [l, c])
1543
1542
  )
1544
1543
  }
1545
1544
  ]
1546
1545
  )
1547
1546
  )
1548
- ), Xr = async (e, t) => Object.fromEntries(
1549
- (await at(e)).filter((i) => i.endsWith(".d.ts")).map((i) => {
1547
+ ), Gr = async (e, t) => Object.fromEntries(
1548
+ (await ct(e)).filter((i) => i.endsWith(".d.ts")).map((i) => {
1550
1549
  const s = i.slice(0, -5);
1551
1550
  return [
1552
1551
  s,
@@ -1557,14 +1556,14 @@ const _r = (e) => (
1557
1556
  }
1558
1557
  ];
1559
1558
  })
1560
- ), Yr = (e, t) => e ? `components/${t}` : `dist/components/${t}.js`, Qr = (e) => e.startsWith("/") ? e : `/${e}`, pt = (e, t) => `${e}@fs${Qr(t)}`;
1561
- function Zr(e, t) {
1559
+ ), Xr = (e, t) => e ? `components/${t}` : `dist/components/${t}.js`, Yr = (e) => e.startsWith("/") ? e : `/${e}`, ut = (e, t) => `${e}@fs${Yr(t)}`;
1560
+ function Qr(e, t) {
1562
1561
  const i = u.resolve(e), s = u.resolve(i, t.split(/[?#]/u)[0].replace(/^[/\\]+/u, "")), n = u.relative(i, s);
1563
1562
  return n === ".." || n.startsWith(`..${u.sep}`) || u.isAbsolute(n) ? void 0 : s;
1564
1563
  }
1565
- const Li = "packages/core-packages/core/src", en = "packages/core-packages/core/output/npm/esm", te = !import.meta.url.includes("node_modules");
1566
- function ut(e) {
1567
- return te && e.name !== "@esri/calcite-components" ? "6.0.0-next.0" : e.version;
1564
+ const Li = "packages/core-packages/core/src", Zr = "packages/core-packages/core/output/npm/esm", ee = !import.meta.url.includes("node_modules");
1565
+ function mt(e) {
1566
+ return ee && e.name !== "@esri/calcite-components" ? "6.0.0-next.21" : e.version;
1568
1567
  }
1569
1568
  function Ni({ command: e }) {
1570
1569
  return e === "serve" && process.argv.includes("--local-core");
@@ -1574,19 +1573,19 @@ function ji(e) {
1574
1573
  return i === "latest" ? "esnext" : i;
1575
1574
  }
1576
1575
  const tt = "@arcgis/lumina:provideAssets";
1577
- function ie(e, t, i = mt, s = "max-age=31536000, immutable") {
1576
+ function te(e, t, i = ft, s = "max-age=31536000, immutable") {
1578
1577
  if (e.viteCommand !== "serve")
1579
1578
  throw Error(b(tt, "serveAssets() is only available when Vite is running in serve mode"));
1580
1579
  const n = e._serverConfigured, r = e.server.middlewares.stack.length;
1581
1580
  if (t.forEach((a) => {
1582
- const c = Ri(a), d = Oi(e.dir, Di(c)), l = sn(e.viteConfig.base, d, e.dir.distCdn);
1583
- e.server.middlewares.use(l, (p, m, f) => {
1584
- const g = rn(p.url), h = c.type === "directory" ? Zr(c.source, g) : c.source, y = u.join(d, g), v = i.find((w) => w.match(y, e));
1585
- return h === void 0 ? (m.statusCode = 403, m.end(), !0) : ((typeof h == "function" ? Promise.resolve(h()) : z(h)).then((w) => {
1586
- const C = (typeof h == "function" ? void 0 : v?.transform(w.toString("utf8"), y, e)) ?? w;
1587
- m.setHeader("Cache-Control", s), m.setHeader("Content-Type", _s.lookup(g) || "application/octet-stream"), m.write(C), m.end();
1581
+ const l = Di(a), d = Oi(e.dir, Ri(l)), c = tn(e.viteConfig.base, d, e.dir.distCdn);
1582
+ e.server.middlewares.use(c, (p, m, f) => {
1583
+ const g = sn(p.url), h = l.type === "directory" ? Qr(l.source, g) : l.source, y = u.join(d, g), v = i.find((w) => w.match(y, e));
1584
+ return h === void 0 ? (m.statusCode = 403, m.end(), !0) : ((typeof h == "function" ? Promise.resolve(h()) : W(h)).then((w) => {
1585
+ const S = (typeof h == "function" ? void 0 : v?.transform(w.toString("utf8"), y, e)) ?? w;
1586
+ m.setHeader("Cache-Control", s), m.setHeader("Content-Type", Ks.lookup(g) || "application/octet-stream"), m.write(S), m.end();
1588
1587
  }).catch((w) => {
1589
- (c.type !== "directory" || process.env.DEBUG) && T.warn(
1588
+ (l.type !== "directory" || process.env.DEBUG) && $.warn(
1590
1589
  tt,
1591
1590
  `Error occurred when trying to serve a file in response to request for "${p.originalUrl ?? g}":${String(w)}`
1592
1591
  ), f();
@@ -1597,31 +1596,31 @@ function ie(e, t, i = mt, s = "max-age=31536000, immutable") {
1597
1596
  e.server.middlewares.stack.splice(0, 0, ...a);
1598
1597
  }
1599
1598
  }
1600
- async function Fi(e, t, i = mt) {
1599
+ async function Fi(e, t, i = ft) {
1601
1600
  await Promise.all(
1602
1601
  t.map(async (s) => {
1603
- const n = Ri(s), r = Oi(e.dir, Di(n));
1602
+ const n = Di(s), r = Oi(e.dir, Ri(n));
1604
1603
  if (n.type === "directory") {
1605
- const a = u.resolve(n.source), d = (await at(a, { recursive: !0, withFileTypes: !0 })).filter((l) => l.isFile()).map((l) => {
1606
- const p = u.resolve(l.parentPath, l.name), m = u.relative(a, p), f = u.join(r, m);
1604
+ const a = u.resolve(n.source), d = (await ct(a, { recursive: !0, withFileTypes: !0 })).filter((c) => c.isFile()).map((c) => {
1605
+ const p = u.resolve(c.parentPath, c.name), m = u.relative(a, p), f = u.join(r, m);
1607
1606
  return [p, f];
1608
1607
  });
1609
- await Ji(d.map(([l, p]) => p)), await Ws(
1608
+ await Ji(d.map(([c, p]) => p)), await _s(
1610
1609
  d,
1611
1610
  16,
1612
- async ([l, p]) => await It(l, p, i, e)
1611
+ async ([c, p]) => await xt(c, p, i, e)
1613
1612
  );
1614
1613
  } else if (n.type === "file")
1615
- await X(u.dirname(r), { recursive: !0 }), await It(n.source, r, i, e);
1614
+ await ie(u.dirname(r), { recursive: !0 }), await xt(n.source, r, i, e);
1616
1615
  else if (n.type === "dynamic") {
1617
- await X(u.dirname(r), { recursive: !0 });
1616
+ await ie(u.dirname(r), { recursive: !0 });
1618
1617
  const a = await Promise.resolve(n.source());
1619
- await _(r, a);
1618
+ await z(r, a);
1620
1619
  }
1621
1620
  })
1622
1621
  );
1623
1622
  }
1624
- const Ri = ri ? (e) => e : (e) => e.type === "dynamic" ? {
1623
+ const Di = ni ? (e) => e : (e) => e.type === "dynamic" ? {
1625
1624
  ...e,
1626
1625
  destination: G(e.destination)
1627
1626
  } : {
@@ -1629,16 +1628,16 @@ const Ri = ri ? (e) => e : (e) => e.type === "dynamic" ? {
1629
1628
  source: G(e.source),
1630
1629
  destination: G(e.destination)
1631
1630
  };
1632
- async function It(e, t, i, s) {
1631
+ async function xt(e, t, i, s) {
1633
1632
  const n = i.find((r) => r.match(t, s));
1634
1633
  if (n === void 0)
1635
- await Ms(e, t);
1634
+ await Os(e, t);
1636
1635
  else {
1637
- const r = await z(e, "utf8"), a = n.transform(r, t, s);
1638
- await _(t, a);
1636
+ const r = await W(e, "utf8"), a = n.transform(r, t, s);
1637
+ await z(t, a);
1639
1638
  }
1640
1639
  }
1641
- function Di(e) {
1640
+ function Ri(e) {
1642
1641
  if (e.type === "dynamic")
1643
1642
  return e.destination;
1644
1643
  if (e.source.endsWith(u.sep)) {
@@ -1646,7 +1645,7 @@ function Di(e) {
1646
1645
  throw Error(
1647
1646
  b(
1648
1647
  tt,
1649
- `Unexpectedly tried to provide an asset with type "file", whose source looks like a directory: ${Re(e.source)}. If source is meant to be a directory, change to "type":"directory". If source is a file, make sure source path does not end with / or \\`
1648
+ `Unexpectedly tried to provide an asset with type "file", whose source looks like a directory: ${De(e.source)}. If source is meant to be a directory, change to "type":"directory". If source is a file, make sure source path does not end with / or \\`
1650
1649
  )
1651
1650
  );
1652
1651
  return e.destination;
@@ -1654,39 +1653,39 @@ function Di(e) {
1654
1653
  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;
1655
1654
  }
1656
1655
  function Oi({ dist: e, distCdnAssets: t }, i) {
1657
- const s = tn(i), n = u.join(
1656
+ const s = en(i), n = u.join(
1658
1657
  t,
1659
1658
  s ? u.relative(t, i) : i
1660
1659
  ), r = u.relative(e, n), a = Mi(r);
1661
1660
  return u.join(e, a);
1662
1661
  }
1663
- function tn(e) {
1662
+ function en(e) {
1664
1663
  if (e.startsWith(u.sep)) {
1665
- const t = ni(), i = t.startsWith(u.sep) ? t.split(u.sep)[1] ?? "" : "";
1664
+ const t = oi(), i = t.startsWith(u.sep) ? t.split(u.sep)[1] ?? "" : "";
1666
1665
  return e.startsWith(`/${i}/`) || e.startsWith("/Users/");
1667
1666
  } else
1668
- return !!(!ri && u.isAbsolute(e));
1667
+ return !!(!ni && u.isAbsolute(e));
1669
1668
  }
1670
- function sn(e, t, i) {
1669
+ function tn(e, t, i) {
1671
1670
  const s = Mi(u.relative(i, t)), n = s.startsWith("/") ? s.slice(1) : s;
1672
1671
  return `${e}${n}`;
1673
1672
  }
1674
- const Mi = (e) => e.replaceAll("../", ""), rn = (e = "") => e.split("?")[0].split("#")[0];
1673
+ const Mi = (e) => e.replaceAll("../", ""), sn = (e = "") => e.split("?")[0].split("#")[0];
1675
1674
  async function Ji(e) {
1676
1675
  const t = new Set(e.map(u.dirname));
1677
- await Promise.all(Array.from(t, async (i) => await X(i, { recursive: !0 })));
1676
+ await Promise.all(Array.from(t, async (i) => await ie(i, { recursive: !0 })));
1678
1677
  }
1679
- const nn = {
1678
+ const rn = {
1680
1679
  match: (e, t) => t.environment === "production" && e.endsWith(".json"),
1681
1680
  transform: (e) => JSON.stringify(JSON.parse(e))
1682
- }, mt = [nn], Ae = "@arcgis/core", me = "@arcgis/core/assets", _e = j(), H = Ae in (_e.dependencies ?? {}) || Ae in (_e.peerDependencies ?? {}) || // Does not depend on `@arcgis/core` to avoid cycle, but uses core in Lumina tests
1681
+ }, ft = [rn], Ae = "@arcgis/core", me = "@arcgis/core/assets", _e = D(), q = Ae in (_e.dependencies ?? {}) || Ae in (_e.peerDependencies ?? {}) || // Does not depend on `@arcgis/core` to avoid cycle, but uses core in Lumina tests
1683
1682
  _e.name === "@arcgis/lumina";
1684
- async function on(e, t, i, s) {
1685
- if (!H)
1683
+ async function nn(e, t, i, s) {
1684
+ if (!q)
1686
1685
  return [];
1687
1686
  const n = e._localCdnCore, r = n?.packageLocation ?? await $e(Ae);
1688
1687
  if (i === "cdn") {
1689
- const a = await ai(r), c = De(a, s);
1688
+ const a = await ai(r), l = Re(a, s);
1690
1689
  return [
1691
1690
  // Use the ESM CDN
1692
1691
  // <script src="https://jsdev.arcgis.com/VERSION/"><\/script>
@@ -1697,23 +1696,23 @@ async function on(e, t, i, s) {
1697
1696
  },
1698
1697
  children: JSON.stringify({
1699
1698
  imports: {
1700
- "@arcgis/core/": `${c}@arcgis/core/`
1699
+ "@arcgis/core/": `${l}@arcgis/core/`
1701
1700
  }
1702
1701
  })
1703
1702
  },
1704
1703
  // <link rel="stylesheet" id="arcgisCoreStylesheet" href="https://jsdev.arcgis.com/VERSION/esri/themes/light/main.css" />
1705
- Bi(c)
1704
+ Bi(l)
1706
1705
  ];
1707
1706
  } else
1708
- return an(t, r, n?.sourceLocation !== void 0);
1707
+ return on(t, r, n?.sourceLocation !== void 0);
1709
1708
  }
1710
- function an(e, t, i) {
1709
+ function on(e, t, i) {
1711
1710
  const s = `${e}${me}`;
1712
1711
  return [
1713
1712
  // Browser tests import this as a Vite CSS module and adopt its stylesheet, so CSS must remain on the /@fs route.
1714
1713
  // Core's prebuilt JavaScript assets use the untransformed route configured below.
1715
1714
  Bi(
1716
- i ? `${e}${me}/` : pt(e, `${t}/assets/`)
1715
+ i ? `${e}${me}/` : ut(e, `${t}/assets/`)
1717
1716
  ),
1718
1717
  {
1719
1718
  // This import is injected dynamically, so external consumers must tell Vite to optimize it. Within the monorepo,
@@ -1726,7 +1725,7 @@ function an(e, t, i) {
1726
1725
  }
1727
1726
  ];
1728
1727
  }
1729
- async function cn(e) {
1728
+ async function an(e) {
1730
1729
  const t = e._localCdnCore, i = t?.packageLocation ?? await $e(Ae), s = t?.sourceLocation !== void 0 ? [
1731
1730
  {
1732
1731
  type: "directory",
@@ -1768,38 +1767,38 @@ async function cn(e) {
1768
1767
  ];
1769
1768
  e.server.middlewares.use("/builddate.txt", (n, r) => {
1770
1769
  r.setHeader("Cache-Control", "no-cache"), r.setHeader("Content-Type", "text/plain");
1771
- const a = t?.sourceLocation ? "6.0.0-next.0" : j(i).version;
1770
+ const a = t?.sourceLocation ? "6.0.0-next.21" : D(i).version;
1772
1771
  r.end(JSON.stringify({ version: a }));
1773
- }), ie(e, s, [], "no-cache");
1772
+ }), te(e, s, [], "no-cache");
1774
1773
  }
1775
1774
  const Bi = (e) => ({
1776
1775
  // Not using join() because it would turn https:// into https:/
1777
1776
  cssHref: `${e}esri/themes/light/main.css`,
1778
1777
  // This is used be the theme switcher in `@arcgis/storybook-utils`
1779
1778
  id: "arcgisCoreStylesheet"
1780
- }), ft = "customElement.js";
1781
- function ln(e, t) {
1779
+ }), gt = "customElement.js";
1780
+ function cn(e, t) {
1782
1781
  if (!t.startsWith(e))
1783
1782
  return t;
1784
1783
  const s = t.split(u.sep);
1785
- return s.at(dn) !== s.at(pn) ? t : u.join(s.slice(0, -1).join(u.sep), ft);
1784
+ return s.at(ln) !== s.at(dn) ? t : u.join(s.slice(0, -1).join(u.sep), gt);
1786
1785
  }
1787
- const dn = -1, pn = -2, un = /["']\.\.?\/[^'"]+/gu, mn = (e, t, i, s) => e.replaceAll(un, (n) => {
1786
+ const ln = -1, dn = -2, pn = /["']\.\.?\/[^'"]+/gu, un = (e, t, i, s) => e.replaceAll(pn, (n) => {
1788
1787
  const r = n.slice(1);
1789
1788
  if (!r.startsWith("./") && !r.startsWith("../"))
1790
1789
  return n;
1791
- const a = u.join(s, r), c = !r.endsWith(".js") && !r.split("/").at(-1).includes(".") ? ln(t.dir.distComponents, a) : a, d = c.startsWith(t.dir.distComponents) ? t.dir.dist + Ge(c.slice(t.dir.dist.length), t.apiExtractor) : c;
1790
+ const a = u.join(s, r), l = !r.endsWith(".js") && !r.split("/").at(-1).includes(".") ? cn(t.dir.distComponents, a) : a, d = l.startsWith(t.dir.distComponents) ? t.dir.dist + Ge(l.slice(t.dir.dist.length), t.apiExtractor) : l;
1792
1791
  if (i === s && a === d)
1793
1792
  return n;
1794
- const l = he(i, d), p = n.endsWith("/") ? `${l}/` : l;
1793
+ const c = he(i, d), p = n.endsWith("/") ? `${c}/` : c;
1795
1794
  return `${n[0]}${p}`;
1796
1795
  }), he = (e, t) => {
1797
1796
  const i = u.relative(e, t);
1798
1797
  return i.startsWith(".") ? i : `.${u.sep}${i}`;
1799
1798
  };
1800
- async function fn(e, t, i) {
1799
+ async function mn(e, t, i) {
1801
1800
  const s = u.resolve(e.dir.root, t);
1802
- e.viteConfig.build.emptyOutDir !== !1 && await K(s) && await Js(s, { recursive: !0, force: !0 }), await X(s, { recursive: !0 }), await Bs(e.dir.distCdn, u.join(s, "build"), { recursive: !0 });
1801
+ e.viteConfig.build.emptyOutDir !== !1 && await _(s) && await Ms(s, { recursive: !0, force: !0 }), await ie(s, { recursive: !0 }), await Js(e.dir.distCdn, u.join(s, "build"), { recursive: !0 });
1803
1802
  const n = [
1804
1803
  "index.html",
1805
1804
  ...await Us("**/*.html", {
@@ -1810,36 +1809,50 @@ async function fn(e, t, i) {
1810
1809
  // Not applicable for our glob pattern
1811
1810
  expandDirectories: !1
1812
1811
  })
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
+ ], r = u.relative(e.dir.root, e.dir.src), a = await oe(e), l = u.join(e.dir.src, "loader.ts"), d = a.map((c) => {
1813
+ if ("cssHref" in c)
1814
+ return `<link rel="stylesheet" href="${c.cssHref}">`;
1815
+ if ("javascriptCode" in c && c.javascriptCode.at(0)?.includes(l) === !0)
1817
1816
  return "";
1818
- if ("tag" in l) {
1819
- const p = l.children ?? "";
1817
+ if ("tag" in c) {
1818
+ const p = c.children ?? "";
1820
1819
  if (typeof p == "string")
1821
- return `<${l.tag} ${Object.entries(l.attrs ?? {}).map(([m, f]) => `${m}="${f}"`).join(" ")}>${p}</${l.tag}>`;
1820
+ return `<${c.tag} ${Object.entries(c.attrs ?? {}).map(([m, f]) => `${m}="${f}"`).join(" ")}>${p}</${c.tag}>`;
1822
1821
  }
1823
- throw Error(b("@arcgis/lumina:buildWebApp", `Unsupported loader type: ${JSON.stringify(l)}`));
1822
+ throw Error(b("@arcgis/lumina:buildWebApp", `Unsupported loader type: ${JSON.stringify(c)}`));
1824
1823
  }).join(`
1825
1824
  `);
1826
1825
  await Promise.all(
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);
1829
- await X(u.dirname(h), { recursive: !0 });
1830
- const y = await z(g, "utf-8"), v = he(u.dirname(f), `build/${i}`), w = `${d}<script type="module" src="${v}"><\/script>
1831
- `, C = Math.min(
1826
+ n.map(async (c, p) => {
1827
+ const f = p === 0 ? c : u.join(r, c), g = u.join(e.dir.root, f), h = u.join(s, f);
1828
+ await ie(u.dirname(h), { recursive: !0 });
1829
+ const y = await W(g, "utf-8"), v = he(u.dirname(f), `build/${i}`), w = `${d}<script type="module" src="${v}"><\/script>
1830
+ `, S = Math.min(
1832
1831
  ...[y.indexOf("<style>"), y.indexOf("<script"), y.indexOf("</head>")].filter(
1833
1832
  (x) => x !== -1
1834
1833
  )
1835
1834
  );
1836
- if (C === Number.POSITIVE_INFINITY)
1835
+ if (S === Number.POSITIVE_INFINITY)
1837
1836
  throw Error(b("@arcgis/lumina:buildWebApp", `Failed to find <head> or <style> tag in ${g}`));
1838
- const E = y.slice(0, C) + w + y.slice(C), P = e.options?.build?.webApp?.transformFile?.(E, h, e) ?? E;
1839
- await _(h, P, "utf-8");
1837
+ const T = y.slice(0, S) + w + y.slice(S), E = e.options?.build?.webApp?.transformFile?.(T, h, e) ?? T;
1838
+ await z(h, E, "utf-8");
1840
1839
  })
1841
1840
  ), await e.options.build?.webApp?.afterBuildEnd?.(e);
1842
1841
  }
1842
+ const At = /* @__PURE__ */ new Map();
1843
+ function fn(e) {
1844
+ const t = e.endsWith(".js") ? `${e.slice(0, -3)}.d.ts` : `${e}.d.ts`, i = at(`node_modules/${t}`);
1845
+ if (i === void 0)
1846
+ throw Error(`Could not find declarations for ${e} while transforming a dynamic CDN import.`);
1847
+ const s = At.get(i);
1848
+ if (s !== void 0)
1849
+ return s;
1850
+ const r = o.createSourceFile(i, Ws(i, "utf8"), o.ScriptTarget.Latest).statements.some(gn);
1851
+ return At.set(i, r), r;
1852
+ }
1853
+ function gn(e) {
1854
+ return o.isExportAssignment(e) ? !e.isExportEquals : o.isClassDeclaration(e) || o.isFunctionDeclaration(e) ? e.modifiers?.some((t) => t.kind === o.SyntaxKind.DefaultKeyword) === !0 : o.isExportDeclaration(e) && !e.isTypeOnly && e.exportClause !== void 0 ? o.isNamedExports(e.exportClause) && e.exportClause.elements.some((t) => !t.isTypeOnly && t.name.text === "default") : !1;
1855
+ }
1843
1856
  const Ki = /* @__PURE__ */ new Set([
1844
1857
  "chunks",
1845
1858
  "components",
@@ -1853,8 +1866,8 @@ const Ki = /* @__PURE__ */ new Set([
1853
1866
  "collection",
1854
1867
  "extras",
1855
1868
  "support"
1856
- ]), O = "@arcgis/lumina:buildCdn", le = "cdn", _i = "index", Z = "main";
1857
- function gn(e) {
1869
+ ]), O = "@arcgis/lumina:buildCdn", le = "cdn", _i = "index", Q = "main";
1870
+ function hn(e) {
1858
1871
  const { skip: t = !1, namespace: i, esbuildOptions: s = {}, entrypointTransformer: n } = e.options.build?.cdn ?? {}, r = e.options.build?.webApp?.destination, a = i !== void 0;
1859
1872
  if (a) {
1860
1873
  if (i.toLowerCase() !== i)
@@ -1867,12 +1880,12 @@ function gn(e) {
1867
1880
  'The "namespace" option in the "build.cdn" is deprecated and will be removed in the next major version.'
1868
1881
  );
1869
1882
  }
1870
- const c = i ?? _i;
1883
+ const l = i ?? _i;
1871
1884
  if (e.provideAssets([
1872
1885
  {
1873
1886
  type: "dynamic",
1874
- source: () => Ar(e),
1875
- destination: `../${a ? c : Z}.css`
1887
+ source: () => xr(e),
1888
+ destination: `../${a ? l : Q}.css`
1876
1889
  }
1877
1890
  ]), !t)
1878
1891
  return {
@@ -1881,33 +1894,33 @@ function gn(e) {
1881
1894
  if (e.isInStorybook)
1882
1895
  return;
1883
1896
  if ((e.apiJsonComponents ?? []).length === 0) {
1884
- T.warn(
1897
+ $.warn(
1885
1898
  O,
1886
1899
  "Skipping CDN build as no public custom elements were found in this package. Double check that your component files follow the required naming convention: https://webgis.esri.com/references/lumina/component."
1887
1900
  );
1888
1901
  return;
1889
1902
  }
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 hn(
1903
+ const d = q && D().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 yn(
1891
1904
  e,
1892
- c,
1905
+ l,
1893
1906
  s,
1894
1907
  p,
1895
1908
  n,
1896
1909
  d
1897
1910
  );
1898
- await yn(
1911
+ await vn(
1899
1912
  m,
1900
1913
  e,
1901
- a ? `${c}.esm` : c,
1914
+ a ? `${l}.esm` : l,
1902
1915
  p,
1903
1916
  d
1904
1917
  );
1905
1918
  const f = Date.now();
1906
- T.info(O, `CDN was built in ${f - l}ms`), r && await fn(e, r, `${a ? `${c}.esm` : c}.js`);
1919
+ $.info(O, `CDN was built in ${f - c}ms`), r && await mn(e, r, `${a ? `${l}.esm` : l}.js`);
1907
1920
  }
1908
1921
  };
1909
1922
  }
1910
- async function hn(e, t, i, s, n, r) {
1923
+ async function yn(e, t, i, s, n, r) {
1911
1924
  const a = e.environment;
1912
1925
  if (i.minify && r)
1913
1926
  throw Error(
@@ -1923,15 +1936,15 @@ async function hn(e, t, i, s, n, r) {
1923
1936
  "Source maps in the CDN build are not yet supported - open a feature request with Lumina maintainers if it is needed"
1924
1937
  )
1925
1938
  );
1926
- const c = `import { defineCustomElements } from "./loader";
1939
+ const l = `import { defineCustomElements } from "./loader";
1927
1940
  /**
1928
1941
  * We use import.meta.url to get the path to the current file
1929
1942
  * and pass it to defineCustomElements to set the resources url.
1930
1943
  * The script's file name will be stripped inside defineCustomElements.
1931
1944
  **/
1932
1945
  defineCustomElements({resourcesUrl: import.meta.url});
1933
- ${Ti(e._globalCssString, e)}`, d = n?.(c, e) ?? c;
1934
- return await Ks({
1946
+ ${Ti(e._globalCssString, e)}`, d = n?.(l, e) ?? l;
1947
+ return await Bs({
1935
1948
  bundle: !0,
1936
1949
  minify: r ? !0 : a === "production",
1937
1950
  treeShaking: !0,
@@ -1962,14 +1975,14 @@ ${Ti(e._globalCssString, e)}`, d = n?.(c, e) ?? c;
1962
1975
  plugins: [
1963
1976
  {
1964
1977
  name: "@arcgis/lumina:accessorSupport",
1965
- setup(l) {
1966
- l.onResolve(
1978
+ setup(c) {
1979
+ c.onResolve(
1967
1980
  { filter: /^@arcgis\/core\/applications\/Components\/reactiveUtils.js$/ },
1968
1981
  (p) => p.importer.endsWith("runtime.js") ? {
1969
1982
  path: p.path,
1970
1983
  namespace: "@arcgis/lumina:accessorSupport"
1971
1984
  } : void 0
1972
- ), l.onLoad({ filter: /^/, namespace: "@arcgis/lumina:accessorSupport" }, () => ({
1985
+ ), c.onLoad({ filter: /^/, namespace: "@arcgis/lumina:accessorSupport" }, () => ({
1973
1986
  contents: "export const createObservable=undefined, trackAccess=undefined, createTrackingTarget=undefined, runTracked = undefined;",
1974
1987
  loader: "js"
1975
1988
  }));
@@ -1980,18 +1993,18 @@ ${Ti(e._globalCssString, e)}`, d = n?.(c, e) ?? c;
1980
1993
  // manual injection further below. Thus drop the CSS import from the
1981
1994
  // chunks/runtime.js file.
1982
1995
  name: "@arcgis/lumina:customGlobalCssInjection",
1983
- setup(l) {
1996
+ setup(c) {
1984
1997
  const p = e.options.build?.cdn?.namespace === void 0 ? (
1985
1998
  // eslint-disable-next-line require-unicode-regexp
1986
- new RegExp(`\\/${le}\\/${Z}\\.css$`)
1999
+ new RegExp(`\\/${le}\\/${Q}\\.css$`)
1987
2000
  ) : (
1988
2001
  // eslint-disable-next-line require-unicode-regexp
1989
2002
  new RegExp(`\\/${e.options.build.cdn.namespace}\\/${e.options.build.cdn.namespace}\\.css$`)
1990
2003
  );
1991
- l.onResolve({ filter: p }, ({ path: m }) => ({
2004
+ c.onResolve({ filter: p }, ({ path: m }) => ({
1992
2005
  path: m,
1993
2006
  namespace: "build-cdn:global-css"
1994
- })), l.onLoad({ filter: /.*/, namespace: "build-cdn:global-css" }, () => ({
2007
+ })), c.onLoad({ filter: /.*/, namespace: "build-cdn:global-css" }, () => ({
1995
2008
  contents: "",
1996
2009
  loader: "js"
1997
2010
  }));
@@ -2015,11 +2028,11 @@ ${Ti(e._globalCssString, e)}`, d = n?.(c, e) ?? c;
2015
2028
  }
2016
2029
  });
2017
2030
  }
2018
- const xt = "stdin.js";
2019
- async function yn(e, t, i, s, n) {
2031
+ const Lt = "stdin.js";
2032
+ async function vn(e, t, i, s, n) {
2020
2033
  const r = t.dir.distCdn, a = `${i}.js`;
2021
- let c;
2022
- n && (c = new Set(s.map((p) => `${p.out}.js`)), c.add(a));
2034
+ let l;
2035
+ n && (l = new Set(s.map((p) => `${p.out}.js`)), l.add(a));
2023
2036
  const d = new Map(
2024
2037
  e.outputFiles.map((p) => {
2025
2038
  const m = {
@@ -2028,15 +2041,15 @@ async function yn(e, t, i, s, n) {
2028
2041
  isAsync: void 0,
2029
2042
  oldSingleExportName: void 0
2030
2043
  }, f = G(p.path.slice(r.length));
2031
- if (f === xt) {
2044
+ if (f === Lt) {
2032
2045
  if (n) {
2033
- const h = p.text.match(vn)?.[0];
2046
+ const h = p.text.match(bn)?.[0];
2034
2047
  if (h === void 0)
2035
2048
  throw Error(
2036
- `Failed to find the runtime variable name in the CDN entrypoint file. This likely indicates a bug in Lumina. ${xt} contents:
2049
+ `Failed to find the runtime variable name in the CDN entrypoint file. This likely indicates a bug in Lumina. ${Lt} contents:
2037
2050
  ${p.text}`
2038
2051
  );
2039
- m.code = `${m.code.trimEnd()}${bn(h, s)}`, m.isAsync = !1;
2052
+ m.code = `${m.code.trimEnd()}${wn(h, s)}`, m.isAsync = !1;
2040
2053
  }
2041
2054
  return [a, m];
2042
2055
  }
@@ -2046,7 +2059,7 @@ ${p.text}`
2046
2059
  n && d.forEach((p, m) => {
2047
2060
  if (p.isAsync === void 0)
2048
2061
  if (m.endsWith(".js")) {
2049
- if (Wi(p, d), c?.has(m) === !0 && p.code.includes(Ui))
2062
+ if (Ui(p, d), l?.has(m) === !0 && p.code.includes(Wi))
2050
2063
  throw Error(
2051
2064
  b(
2052
2065
  O,
@@ -2056,18 +2069,18 @@ ${p.text}`
2056
2069
  } else
2057
2070
  p.isAsync = !1;
2058
2071
  }), t.options.build?.cdn?.transformer?.(d, t);
2059
- const l = /* @__PURE__ */ new Map();
2072
+ const c = /* @__PURE__ */ new Map();
2060
2073
  for (const p of d.keys()) {
2061
2074
  const m = p.lastIndexOf("/");
2062
2075
  if (m !== -1) {
2063
2076
  const f = p.slice(0, m);
2064
- l.set(f, X(r + f, { recursive: !0 }));
2077
+ c.set(f, ie(r + f, { recursive: !0 }));
2065
2078
  }
2066
2079
  }
2067
- await Promise.all(l.values()), await Promise.all(Array.from(d.entries(), async ([p, { code: m }]) => await _(r + p, m)));
2080
+ await Promise.all(c.values()), await Promise.all(Array.from(d.entries(), async ([p, { code: m }]) => await z(r + p, m)));
2068
2081
  }
2069
- const vn = /(?<=;var [a-zA-Z$_]=[a-zA-Z$_]\()[a-zA-Z$_](?=,\{")/u;
2070
- function bn(e, t) {
2082
+ const bn = /(?<=;var [a-zA-Z$_]=[a-zA-Z$_]\()[a-zA-Z$_](?=,\{")/u;
2083
+ function wn(e, t) {
2071
2084
  let i = [
2072
2085
  "window.$arcgis",
2073
2086
  "||",
@@ -2079,7 +2092,7 @@ function bn(e, t) {
2079
2092
  const n = [];
2080
2093
  for (const r of t) {
2081
2094
  if (r.in.includes("*")) {
2082
- T.warn(O, `$arcgis.import does not support wildcard imports, so ${r.in} will be ignored.`);
2095
+ $.warn(O, `$arcgis.import does not support wildcard imports, so ${r.in} will be ignored.`);
2083
2096
  continue;
2084
2097
  }
2085
2098
  if (r.out.startsWith(".") || r.out.startsWith("/"))
@@ -2091,6 +2104,9 @@ function bn(e, t) {
2091
2104
  if (i += [
2092
2105
  "a.t=(c,...x)=>",
2093
2106
  "Promise.all(",
2107
+ // Unwrap .default exports to match the more common non-dynamic ESM imports
2108
+ // semantics. This reduces the bundle size in the final output by avoiding
2109
+ // .default unwrapping at each import site.
2094
2110
  'x.map(x=>x.then?x:(!a?.forceESM&&a?.import||(x=>import(x+".js").then(m=>m.default??m)))("@arcgis/core/"+x))',
2095
2111
  ").then(c);",
2096
2112
  // Start loading from reactiveUtils the modules we need to enable integration.
@@ -2103,88 +2119,88 @@ function bn(e, t) {
2103
2119
  // minified to a variable name that is already used inside the closure).
2104
2120
  `)($arcgis,${e}`
2105
2121
  ].join(""), s) {
2106
- const r = j().name;
2122
+ const r = D().name;
2107
2123
  i += `,"${r}/",".js"`;
2108
2124
  }
2109
2125
  return i += ")", i;
2110
2126
  }
2111
- function Wi(e, t) {
2127
+ function Ui(e, t) {
2112
2128
  if (e.isProcessing) {
2113
- e.isAsync = !0, At(e);
2129
+ e.isAsync = !0, Nt(e);
2114
2130
  return;
2115
2131
  }
2116
2132
  e.isProcessing = !0;
2117
2133
  const i = [], s = [], n = [], r = /* @__PURE__ */ new Set(), a = [];
2118
- let c = 0;
2119
- const d = e.code.matchAll(wn);
2120
- for (const S of d) {
2121
- const [A, L, U, F, N] = S, B = N.startsWith(Le);
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, ""]);
2134
+ let l = 0;
2135
+ const d = e.code.matchAll(Sn);
2136
+ for (const C of d) {
2137
+ const [L, A, M, j, N] = C, K = N.startsWith(Le);
2138
+ if (l !== 0 && l !== C.index) {
2139
+ const R = e.code.slice(l, C.index);
2140
+ n.push(R), a.push([l, R.length, 0, ""]);
2125
2141
  }
2126
- if (c = S.index + A.length, B)
2127
- a.push([S.index, A.length, 0, ""]), s.push(`"${Hi(N.slice(Le.length))}"`), i.push(L?.replaceAll(" as ", ":") ?? U ?? F ?? "");
2142
+ if (l = C.index + L.length, K)
2143
+ a.push([C.index, L.length, 0, ""]), s.push(`"${qi(N.slice(Le.length))}"`), i.push(A?.replaceAll(" as ", ":") ?? M ?? j ?? "");
2128
2144
  else {
2129
- const D = zi(N, t), M = D?.isAsync === !0;
2130
- if (L !== void 0) {
2145
+ const R = zi(N, t), J = R?.isAsync === !0;
2146
+ if (A !== void 0) {
2131
2147
  const be = [];
2132
- for (const Me of L.slice(1, -1).split(",")) {
2133
- const [wt, St = wt] = Me.split(" as ");
2134
- M || r.add(St), be.push(`${wt}:${St}`);
2148
+ for (const Me of A.slice(1, -1).split(",")) {
2149
+ const [St, Ct = St] = Me.split(" as ");
2150
+ J || r.add(Ct), be.push(`${St}:${Ct}`);
2135
2151
  }
2136
- if (M) {
2137
- const Me = D.oldSingleExportName === void 0 ? `{${be.join(",")}}` : be[0].split(":")[1];
2138
- a.push([S.index + 6, 0, L.length, Me]);
2152
+ if (J) {
2153
+ const Me = R.oldSingleExportName === void 0 ? `{${be.join(",")}}` : be[0].split(":")[1];
2154
+ a.push([C.index + 6, 0, A.length, Me]);
2139
2155
  }
2140
- } else if (U === void 0 && F === void 0)
2141
- M && a.push([S.index + 6, 0, 0, ""]);
2156
+ } else if (M === void 0 && j === void 0)
2157
+ J && a.push([C.index + 6, 0, 0, ""]);
2142
2158
  else {
2143
- if (M)
2159
+ if (J)
2144
2160
  throw Error(
2145
2161
  b(
2146
2162
  O,
2147
- `Expected local import specifiers to use only named or side-effect import syntax. Found ${A} in a chunk:
2148
- ${D.code}`
2163
+ `Expected local import specifiers to use only named or side-effect import syntax. Found ${L} in a chunk:
2164
+ ${R.code}`
2149
2165
  )
2150
2166
  );
2151
- r.add(F ?? U);
2167
+ r.add(j ?? M);
2152
2168
  }
2153
2169
  }
2154
2170
  }
2155
2171
  e.isProcessing = !1;
2156
- const l = e.isAsync === !0;
2157
- if (e.isAsync = l || a.length > 0, !e.isAsync) {
2158
- e.code = Lt(e.code, t);
2172
+ const c = e.isAsync === !0;
2173
+ if (e.isAsync = c || a.length > 0, !e.isAsync) {
2174
+ e.code = jt(e.code, t);
2159
2175
  return;
2160
2176
  }
2161
- const p = En(r);
2162
- let m = e.code.slice(0, c);
2163
- for (let S = a.length - 1; S >= 0; S--) {
2164
- const [A, L, U, F] = a[S];
2165
- let N = L, B = "";
2166
- if (L === 0) {
2167
- const M = p();
2168
- s.push(M), B = ` ${M} from`, F !== "" ? (N = U + 4, i.push(F)) : i.push("");
2177
+ const p = Tn(r);
2178
+ let m = e.code.slice(0, l);
2179
+ for (let C = a.length - 1; C >= 0; C--) {
2180
+ const [L, A, M, j] = a[C];
2181
+ let N = A, K = "";
2182
+ if (A === 0) {
2183
+ const J = p();
2184
+ s.push(J), K = ` ${J} from`, j !== "" ? (N = M + 4, i.push(j)) : i.push("");
2169
2185
  }
2170
- m = m.slice(0, A) + B + m.slice(A + N);
2186
+ m = m.slice(0, L) + K + m.slice(L + N);
2171
2187
  }
2172
- const [f, g] = At(e), h = i.findLastIndex((S) => S.length > 0), y = i.slice(0, h + 1).join(","), v = i.length === 0 ? "_" : `([${y}])`, w = `${Ui}${v}=>{`, C = s.join(","), E = `${g}},${C})`;
2173
- let P = e.code.slice(c, f);
2174
- P = `${n.join("")}${P}`, P = Lt(P, t);
2175
- const x = `${m}${w}${P}${E}`;
2188
+ const [f, g] = Nt(e), h = i.findLastIndex((C) => C.length > 0), y = i.slice(0, h + 1).join(","), v = i.length === 0 ? "_" : `([${y}])`, w = `${Wi}${v}=>{`, S = s.join(","), T = `${g}},${S})`;
2189
+ let E = e.code.slice(l, f);
2190
+ E = `${n.join("")}${E}`, E = jt(E, t);
2191
+ const x = `${m}${w}${E}${T}`;
2176
2192
  e.code = x;
2177
2193
  }
2178
- const Ui = "export default $arcgis.t(";
2179
- function At(e) {
2180
- const t = Sn.exec(e.code), i = t?.index ?? e.code.length;
2194
+ const Wi = "export default $arcgis.t(";
2195
+ function Nt(e) {
2196
+ const t = Cn.exec(e.code), i = t?.index ?? e.code.length;
2181
2197
  let s = "";
2182
2198
  if (t !== null) {
2183
2199
  const n = t[1].split(",");
2184
2200
  if (n.length > 1)
2185
2201
  s = `return{${n.map((r) => {
2186
- const [a, c = a] = r.split(" as ");
2187
- return `${c}:${a}`;
2202
+ const [a, l = a] = r.split(" as ");
2203
+ return `${l}:${a}`;
2188
2204
  }).join(",")}}`;
2189
2205
  else {
2190
2206
  const [r, a = r] = n[0].split(" as ");
@@ -2193,22 +2209,23 @@ function At(e) {
2193
2209
  }
2194
2210
  return [i, s];
2195
2211
  }
2196
- const wn = /import(?:(\{[^}]+\})from|\*as ([\w$]+) from| ([\w$]+) from)?"([^"]+)";/gu, Sn = /export\{([^}]+)\};\n$/u, Le = "@arcgis/core/";
2212
+ const Sn = /import(?:(\{[^}]+\})from|\*as ([\w$]+) from| ([\w$]+) from)?"([^"]+)";/gu, Cn = /export\{([^}]+)\};\n$/u, Le = "@arcgis/core/";
2197
2213
  function zi(e, t) {
2198
2214
  if (!e.startsWith("./"))
2199
2215
  return;
2200
2216
  const i = e.slice(2), s = t.get(i);
2201
2217
  if (s === void 0)
2202
2218
  throw Error(b(O, `Failed to find the ${e} module`));
2203
- if (s.isAsync === void 0 && Wi(s, t), s.isAsync === void 0)
2219
+ if (s.isAsync === void 0 && Ui(s, t), s.isAsync === void 0)
2204
2220
  throw Error(b(O, `Failed to infer whether the ${e} module has top-level await`));
2205
2221
  return s;
2206
2222
  }
2207
- function Lt(e, t) {
2208
- return e.replaceAll(Cn, (i, s) => {
2209
- if (s.startsWith(Le))
2210
- return `$arcgis.t(m=>m[0],"${Hi(s.slice(Le.length))}")`;
2211
- if (s.startsWith("./")) {
2223
+ function jt(e, t) {
2224
+ return e.replaceAll(En, (i, s) => {
2225
+ if (s.startsWith(Le)) {
2226
+ const n = qi(s.slice(Le.length));
2227
+ return `$arcgis.t(m=>${fn(s) ? "({default:m[0]})" : "m[0]"},"${n}")`;
2228
+ } else if (s.startsWith("./")) {
2212
2229
  const n = zi(s, t);
2213
2230
  if (n?.isAsync === !0)
2214
2231
  return `${i}.then(m=>m.default${n.oldSingleExportName === void 0 ? "" : `.then(e=>({${n.oldSingleExportName}:e}))`})`;
@@ -2216,28 +2233,28 @@ function Lt(e, t) {
2216
2233
  return i;
2217
2234
  });
2218
2235
  }
2219
- const Cn = /(?<![.\w\d])import\("([^"]+)"\)/gu, Hi = (e) => e.endsWith(".js") ? e.slice(0, -3) : e;
2220
- function En(e) {
2236
+ const En = /(?<![.\w\d])import\("([^"]+)"\)/gu, qi = (e) => e.endsWith(".js") ? e.slice(0, -3) : e;
2237
+ function Tn(e) {
2221
2238
  const t = [it];
2222
2239
  return () => {
2223
2240
  for (; ; ) {
2224
- const i = Pn(t);
2225
- if (kn(t), !e.has(i))
2241
+ const i = kn(t);
2242
+ if (In(t), !e.has(i))
2226
2243
  return e.add(i), i;
2227
2244
  }
2228
2245
  };
2229
2246
  }
2230
- const it = 0, gt = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_", qi = `${gt}0123456789`, Tn = gt.length, $n = qi.length;
2231
- function Pn(e) {
2232
- let t = gt[e[0]];
2247
+ const it = 0, ht = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_", Hi = `${ht}0123456789`, $n = ht.length, Pn = Hi.length;
2248
+ function kn(e) {
2249
+ let t = ht[e[0]];
2233
2250
  for (let i = 1; i < e.length; ++i)
2234
- t += qi[e[i]];
2251
+ t += Hi[e[i]];
2235
2252
  return t;
2236
2253
  }
2237
- function kn(e) {
2254
+ function In(e) {
2238
2255
  let t = e.length - 1;
2239
2256
  for (; t >= 0; ) {
2240
- const i = t === 0 ? Tn : $n;
2257
+ const i = t === 0 ? $n : Pn;
2241
2258
  if (e[t] += 1, e[t] >= i)
2242
2259
  e[t] = it, t--;
2243
2260
  else
@@ -2245,39 +2262,39 @@ function kn(e) {
2245
2262
  }
2246
2263
  e.push(it);
2247
2264
  }
2248
- function De(e = j(), t = !1) {
2249
- const i = e.name === "@esri/calcite-components", s = ut(e) ?? e.version, n = s.includes("next");
2265
+ function Re(e = D(), t = !1) {
2266
+ const i = e.name === "@esri/calcite-components", s = mt(e) ?? e.version, n = s.includes("next");
2250
2267
  if (i && n)
2251
2268
  return `https://cdn.jsdelivr.net/npm/@esri/calcite-components@${s}/dist/${le}/`;
2252
- const r = t || n ? "jsdev.arcgis.com" : "js.arcgis.com", a = In(e.name), c = xn(s);
2253
- if (c === void 0)
2269
+ const r = t || n ? "jsdev.arcgis.com" : "js.arcgis.com", a = xn(e.name), l = An(s);
2270
+ if (l === void 0)
2254
2271
  throw Error(
2255
2272
  b(
2256
2273
  "@arcgis/lumina:dependencies",
2257
2274
  `Failed to parse a semver version: ${e.name}. Ensure the version follows D.D.D format. Package version: ${e.version}`
2258
2275
  )
2259
2276
  );
2260
- return a === "core" ? `https://${r}/${c}/` : i ? `https://${r}/${a}/${c}/` : `https://${r}/${c}/${a}/`;
2277
+ return a === "core" ? `https://${r}/${l}/` : i ? `https://${r}/${a}/${l}/` : `https://${r}/${l}/${a}/`;
2261
2278
  }
2262
- const In = (e) => e.split("/").pop() ?? e;
2263
- function xn(e) {
2279
+ const xn = (e) => e.split("/").pop() ?? e;
2280
+ function An(e) {
2264
2281
  const t = /^(?<major>\d+)\.(?<minor>\d+)\.(?<patch>\d+)(?<prerelease>-.*)?$/u, i = e.match(t);
2265
2282
  if (i?.groups === void 0)
2266
2283
  return;
2267
- const { major: s, minor: n, patch: r, prerelease: a } = i.groups, c = `${s}.${n}.${r}`;
2268
- return a?.startsWith("-next") ? `${c}-next` : c;
2284
+ const { major: s, minor: n, patch: r, prerelease: a } = i.groups, l = `${s}.${n}.${r}`;
2285
+ return a?.startsWith("-next") ? `${l}-next` : l;
2269
2286
  }
2270
- async function An(e, t, i, s, n) {
2271
- const r = t.packageName, { hasCss: a, cdnName: c } = await Vi(t.packageLocation) ?? {};
2287
+ async function Ln(e, t, i, s, n) {
2288
+ const r = t.packageName, { hasCss: a, cdnName: l } = await Vi(t.packageLocation) ?? {};
2272
2289
  if (i === "cdn") {
2273
- const m = t.cdnUrl ?? De(t.packageJson, n);
2290
+ const m = t.cdnUrl ?? Re(t.packageJson, n);
2274
2291
  return [
2275
2292
  ...a ? [
2276
2293
  {
2277
2294
  tag: "link",
2278
2295
  attrs: {
2279
2296
  rel: "stylesheet",
2280
- src: `${m}${c}.css`
2297
+ src: `${m}${l}.css`
2281
2298
  }
2282
2299
  }
2283
2300
  ] : [],
@@ -2285,12 +2302,12 @@ async function An(e, t, i, s, n) {
2285
2302
  tag: "script",
2286
2303
  attrs: {
2287
2304
  type: "module",
2288
- src: `${m}${c}.esm.js`
2305
+ src: `${m}${l}.esm.js`
2289
2306
  }
2290
2307
  }
2291
2308
  ];
2292
2309
  }
2293
- const d = `${r}/dist/${c}/${c}.css${Q}`, l = a ? [
2310
+ const d = `${r}/dist/${l}/${l}.css${Y}`, c = a ? [
2294
2311
  `import styles$${s} from "${d}";`,
2295
2312
  `document.adoptedStyleSheets = [...document.adoptedStyleSheets, styles$${s}.styleSheet];`
2296
2313
  ] : [], p = `${r}/dist/esm/loader.js`;
@@ -2302,48 +2319,48 @@ async function An(e, t, i, s, n) {
2302
2319
  */
2303
2320
  optimizableImports: [p],
2304
2321
  javascriptCode: [
2305
- ...l,
2322
+ ...c,
2306
2323
  `import { defineCustomElements as defineCustomElements$${s} } from "${p}";`,
2307
2324
  `defineCustomElements$${s}(globalThis.window, {`,
2308
- ` resourcesUrl: "${pt(e, t.packageLocation)}/dist/${c}/",`,
2325
+ ` resourcesUrl: "${ut(e, t.packageLocation)}/dist/${l}/",`,
2309
2326
  "});"
2310
2327
  ]
2311
2328
  }
2312
2329
  ];
2313
2330
  }
2314
2331
  async function Vi(e) {
2315
- const t = u.join(e, "dist"), i = u.basename(e), n = (await at(t)).filter(
2332
+ const t = u.join(e, "dist"), i = u.basename(e), n = (await ct(t)).filter(
2316
2333
  (a) => !Ki.has(a) && !a.includes(".")
2317
2334
  ), r = n.find(
2318
2335
  (a) => a.startsWith("arcgis-") || // This is the case for template-components and field-apps-custom-elements
2319
2336
  a === i
2320
2337
  );
2321
2338
  return r === void 0 ? await Promise.all(
2322
- n.map(async (a) => await Nt(t, a))
2323
- ).then((a) => a.find(R)) : await Nt(t, r);
2324
- }
2325
- async function Nt(e, t) {
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([
2327
- K(i),
2328
- K(s),
2329
- K(n)
2339
+ n.map(async (a) => await Ft(t, a))
2340
+ ).then((a) => a.find(F)) : await Ft(t, r);
2341
+ }
2342
+ async function Ft(e, t) {
2343
+ 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([
2344
+ _(i),
2345
+ _(s),
2346
+ _(n)
2330
2347
  ]);
2331
- return r || a || c ? {
2348
+ return r || a || l ? {
2332
2349
  hasCss: r,
2333
2350
  cdnName: t
2334
2351
  } : void 0;
2335
2352
  }
2336
- async function Ln(e, t, i, s, n) {
2337
- const a = t.packageJson.exports?.[`./${Z}.css`] === void 0 ? await Vi(t.packageLocation) : void 0, c = a?.cdnName ?? le, d = a === void 0 ? `${_i}.js` : `${a.cdnName}.esm.js`;
2353
+ async function Nn(e, t, i, s, n) {
2354
+ const a = t.packageJson.exports?.[`./${Q}.css`] === void 0 ? await Vi(t.packageLocation) : void 0, l = a?.cdnName ?? le, d = a === void 0 ? `${_i}.js` : `${a.cdnName}.esm.js`;
2338
2355
  if (i === "cdn")
2339
2356
  return {
2340
2357
  tag: "script",
2341
2358
  attrs: {
2342
2359
  type: "module",
2343
- src: `${t.cdnUrl ?? De(t.packageJson, n)}${d}`
2360
+ src: `${t.cdnUrl ?? Re(t.packageJson, n)}${d}`
2344
2361
  }
2345
2362
  };
2346
- const l = Nn(t.packageJson), p = `${t.packageName}/${u.normalize(l)}${Q}`, m = [
2363
+ const c = jn(t.packageJson), p = `${t.packageName}/${u.normalize(c)}${Y}`, m = [
2347
2364
  `import styles$${s} from "${p}";`,
2348
2365
  `document.adoptedStyleSheets = [...document.adoptedStyleSheets, styles$${s}.styleSheet];`
2349
2366
  ], f = `${t.packageName}/loader`;
@@ -2357,39 +2374,39 @@ async function Ln(e, t, i, s, n) {
2357
2374
  ...m,
2358
2375
  `import { defineCustomElements as defineCustomElements$${s} } from "${f}";`,
2359
2376
  `defineCustomElements$${s}({`,
2360
- ` resourcesUrl: "${pt(e, t.packageLocation)}/dist/${c}/",`,
2377
+ ` resourcesUrl: "${ut(e, t.packageLocation)}/dist/${l}/",`,
2361
2378
  "});"
2362
2379
  ]
2363
2380
  };
2364
2381
  }
2365
- function Nn(e) {
2382
+ function jn(e) {
2366
2383
  const { exports: t } = e;
2367
2384
  if (t === void 0)
2368
2385
  throw new Error(
2369
2386
  `Package "${e.name}" does not have an "exports" field. All Lumina packages must include an "exports" field.`
2370
2387
  );
2371
- const i = Object.entries(t).filter(([n]) => u.extname(n) === ".css"), s = i.find(([, n]) => n === `./${Z}.css`);
2372
- return s ? s[0] : i.length > 0 ? i[0][0] : `./${Z}.css`;
2388
+ const i = Object.entries(t).filter(([n]) => u.extname(n) === ".css"), s = i.find(([, n]) => n === `./${Q}.css`);
2389
+ return s ? s[0] : i.length > 0 ? i[0][0] : `./${Q}.css`;
2373
2390
  }
2374
2391
  async function oe(e, t) {
2375
- return t !== void 0 ? await jt(e, t) : (e._loadersCache ??= jt(e), await e._loadersCache);
2392
+ return t !== void 0 ? await Dt(e, t) : (e._loadersCache ??= Dt(e), await e._loadersCache);
2376
2393
  }
2377
- async function jt(e, t) {
2394
+ async function Dt(e, t) {
2378
2395
  const i = e.viteCommand === "build" ? "cdn" : "lazyNpm", s = e.environment === "development", n = t ?? e.viteConfig.base;
2379
2396
  let r = 0;
2380
2397
  const a = async (m) => (await Promise.all(
2381
2398
  m.map(async (f) => {
2382
2399
  const g = r++;
2383
- return f.type === "stencil" ? await An(n, f, i, g, s) : f.type === "@arcgis/lumina" ? await Ln(n, f, i, g, s) : void 0;
2400
+ return f.type === "stencil" ? await Ln(n, f, i, g, s) : f.type === "@arcgis/lumina" ? await Nn(n, f, i, g, s) : void 0;
2384
2401
  })
2385
- )).filter(R).flat(), c = await Promise.all([
2402
+ )).filter(F).flat(), l = await Promise.all([
2386
2403
  // This may contain an import map so must be first
2387
- on(e, n, i, s),
2404
+ nn(e, n, i, s),
2388
2405
  ne.then(a),
2389
2406
  Gi(e).then(a)
2390
- ]), d = u.join(e.dir.src, "loader.ts"), l = t ?? (i === "cdn" ? `./${e.options.build?.cdn?.namespace ?? le}/` : void 0);
2407
+ ]), d = u.join(e.dir.src, "loader.ts"), c = t ?? (i === "cdn" ? `./${e.options.build?.cdn?.namespace ?? le}/` : void 0);
2391
2408
  return [
2392
- ...c.flat(),
2409
+ ...l.flat(),
2393
2410
  {
2394
2411
  optimizableImports: [
2395
2412
  /**
@@ -2400,7 +2417,7 @@ async function jt(e, t) {
2400
2417
  javascriptCode: [
2401
2418
  `import { defineCustomElements } from "${d}";`,
2402
2419
  "globalThis.devOnly$ownTagNames = new Set();",
2403
- `defineCustomElements(${l === void 0 ? "" : `{resourcesUrl:${JSON.stringify(l)}}`});`
2420
+ `defineCustomElements(${c === void 0 ? "" : `{resourcesUrl:${JSON.stringify(c)}}`});`
2404
2421
  ]
2405
2422
  }
2406
2423
  ];
@@ -2422,14 +2439,14 @@ async function Gi(e) {
2422
2439
  cdnUrl: s?.getCdnUrl(e)
2423
2440
  };
2424
2441
  })
2425
- ).then((i) => i.filter(R)), await e._serveOnlyDependencies);
2442
+ ).then((i) => i.filter(F)), await e._serveOnlyDependencies);
2426
2443
  }
2427
- const Xi = "/C:@arcgis/lumina-compiler/testSetupFile", st = `${Xi}/dependencies`, Ft = /^\/C:@arcgis\/lumina-compiler\/testSetupFile/u, We = [Xi];
2428
- function jn(e) {
2429
- return e.apiJsonEnabled ? `${Rt(e)}
2430
- import "${st}";` : Rt(e);
2444
+ const Xi = "/C:@arcgis/lumina-compiler/testSetupFile", st = `${Xi}/dependencies`, Rt = /^\/C:@arcgis\/lumina-compiler\/testSetupFile/u, Ue = [Xi];
2445
+ function Fn(e) {
2446
+ return e.apiJsonEnabled ? `${Ot(e)}
2447
+ import "${st}";` : Ot(e);
2431
2448
  }
2432
- async function Fn(e) {
2449
+ async function Dn(e) {
2433
2450
  return (await oe(e)).map((i, s) => {
2434
2451
  if ("javascriptCode" in i)
2435
2452
  return i.javascriptCode.join(`
@@ -2440,7 +2457,7 @@ async function Fn(e) {
2440
2457
  * The $index naming is already used by makeLoaders(), so we use the
2441
2458
  * $t prefix to avoid collisions.
2442
2459
  */
2443
- `import styles$t${s} from "${i.cssHref}${Q}";`,
2460
+ `import styles$t${s} from "${i.cssHref}${Y}";`,
2444
2461
  `document.adoptedStyleSheets = [...document.adoptedStyleSheets, styles$t${s}.styleSheet];`
2445
2462
  ].join(`
2446
2463
  `);
@@ -2454,16 +2471,16 @@ async function Fn(e) {
2454
2471
 
2455
2472
  `);
2456
2473
  }
2457
- const Rt = (e) => [e.isInPuppeteerTestBackEnd ? Rn : "", Dn].join(""), Rn = `import { setupPuppeteerTest } from "@arcgis/lumina-compiler/puppeteerTesting";
2474
+ const Ot = (e) => [e.isInPuppeteerTestBackEnd ? Rn : "", On].join(""), Rn = `import { setupPuppeteerTest } from "@arcgis/lumina-compiler/puppeteerTesting";
2458
2475
  setupPuppeteerTest();
2459
- `, Dn = `import { setupLuminaTest } from "@arcgis/lumina-compiler/testing";
2476
+ `, On = `import { setupLuminaTest } from "@arcgis/lumina-compiler/testing";
2460
2477
  setupLuminaTest();
2461
- `, On = "@arcgis/lumina:generateLoaderTs";
2478
+ `, Mn = "@arcgis/lumina:generateLoaderTs";
2462
2479
  let Ne;
2463
- function Mn(e) {
2480
+ function Jn(e) {
2464
2481
  const t = /[\\\/]src[\\\/]loader\.ts$/u;
2465
2482
  return [zs(e.apiExtractorPluginConfig), {
2466
- name: On,
2483
+ name: Mn,
2467
2484
  configResolved() {
2468
2485
  Ne = `${e.dir.root}src/loader.ts`;
2469
2486
  },
@@ -2478,7 +2495,7 @@ function Mn(e) {
2478
2495
  id: t
2479
2496
  },
2480
2497
  async handler() {
2481
- return e.apiJsonDeferred !== void 0 && await e.apiJsonDeferred.promise, Lr(e);
2498
+ return e.apiJsonDeferred !== void 0 && await e.apiJsonDeferred.promise, Ar(e);
2482
2499
  }
2483
2500
  },
2484
2501
  async handleHotUpdate() {
@@ -2488,7 +2505,7 @@ function Mn(e) {
2488
2505
  name: "@arcgis/lumina:generateTestSetupVirtualFile",
2489
2506
  resolveId: {
2490
2507
  filter: {
2491
- id: Ft
2508
+ id: Rt
2492
2509
  },
2493
2510
  // Vitest treats the configured setup-file ID as a filesystem path and
2494
2511
  // loads it without resolving it through Vite. The dependency module is
@@ -2498,27 +2515,27 @@ function Mn(e) {
2498
2515
  },
2499
2516
  load: {
2500
2517
  filter: {
2501
- id: Ft
2518
+ id: Rt
2502
2519
  },
2503
- handler: async (r) => r.startsWith(st) ? await Fn(e) : jn(e)
2520
+ handler: async (r) => r.startsWith(st) ? await Dn(e) : Fn(e)
2504
2521
  }
2505
2522
  }];
2506
2523
  }
2507
- function Dt(e) {
2524
+ function Mt(e) {
2508
2525
  const t = e.server.moduleGraph.getModuleById(Ne);
2509
2526
  t !== void 0 && e.server.moduleGraph.invalidateModule(t);
2510
2527
  }
2511
- const Ot = (e) => {
2528
+ const Jt = (e) => {
2512
2529
  e.server.ws.send({
2513
2530
  type: "full-reload",
2514
2531
  path: u.join("/", u.relative(e.dir.root, Ne))
2515
2532
  });
2516
2533
  };
2517
- function Jn(e) {
2534
+ function Bn(e) {
2518
2535
  let t;
2519
2536
  const i = () => [
2520
2537
  ...e.options.assets?.transformers ?? [],
2521
- ...mt
2538
+ ...ft
2522
2539
  ];
2523
2540
  return {
2524
2541
  name: "@arcgis/lumina:handleStaticAssets",
@@ -2537,16 +2554,16 @@ function Jn(e) {
2537
2554
  * `configureServer`.
2538
2555
  */
2539
2556
  configResolved() {
2540
- e.viteCommand === "serve" && (t = Mt(e));
2557
+ e.viteCommand === "serve" && (t = Bt(e));
2541
2558
  },
2542
2559
  options() {
2543
- e.viteCommand === "build" && (t = Mt(e));
2560
+ e.viteCommand === "build" && (t = Bt(e));
2544
2561
  },
2545
2562
  async configureServer(s) {
2546
- e.server = s, ie(e, await t, i()), s.watcher.on("addDir", (n) => {
2563
+ e.server = s, te(e, await t, i()), s.watcher.on("addDir", (n) => {
2547
2564
  if (n.endsWith("assets")) {
2548
2565
  const r = u.dirname(n);
2549
- u.join(r, "/") === e.dir.root ? ie(e, [Qi], i()) : n.startsWith(e.dir.srcComponents) && ie(e, [Yi(n, r)], i());
2566
+ u.join(r, "/") === e.dir.root ? te(e, [Qi], i()) : n.startsWith(e.dir.srcComponents) && te(e, [Yi(n, r)], i());
2550
2567
  }
2551
2568
  });
2552
2569
  },
@@ -2555,44 +2572,44 @@ function Jn(e) {
2555
2572
  }
2556
2573
  };
2557
2574
  }
2558
- async function Mt(e) {
2559
- const t = K("assets"), i = await e.componentFilesPromise, s = await Promise.all(
2575
+ async function Bt(e) {
2576
+ const t = _("assets"), i = await e.componentFilesPromise, s = await Promise.all(
2560
2577
  i.map(async (n) => {
2561
2578
  const r = u.dirname(n), a = u.join(r, "assets");
2562
- return await K(a) ? Yi(a, r) : void 0;
2579
+ return await _(a) ? Yi(a, r) : void 0;
2563
2580
  })
2564
2581
  );
2565
- return await t && s.push(Qi), s.filter(R);
2582
+ return await t && s.push(Qi), s.filter(F);
2566
2583
  }
2567
2584
  const Yi = (e, t) => ({
2568
2585
  type: "directory",
2569
2586
  source: e,
2570
2587
  destination: u.basename(t)
2571
- }), Qi = { type: "directory", source: "assets/", destination: "" }, Ue = "@arcgis/lumina:printTotalBuildSize", Bn = (e) => ({
2572
- name: Ue,
2588
+ }), Qi = { type: "directory", source: "assets/", destination: "" }, We = "@arcgis/lumina:printTotalBuildSize", Kn = (e) => ({
2589
+ name: We,
2573
2590
  apply: () => e.viteCommand === "build",
2574
2591
  configResolved(t) {
2575
2592
  const i = t.plugins.find(({ name: n }) => n === "vite:reporter");
2576
2593
  if (i === void 0) {
2577
2594
  if ("rolldownVersion" in this.meta)
2578
2595
  return;
2579
- T.warn(Ue, "Unable to find the vite's built-in vite:reporter plugin");
2596
+ $.warn(We, "Unable to find the vite's built-in vite:reporter plugin");
2580
2597
  return;
2581
2598
  }
2582
2599
  const s = i.writeBundle;
2583
2600
  if (typeof s != "function")
2584
- throw Error(b(Ue, "Expected vite:reporter to declare a writeBundle() function"));
2601
+ throw Error(b(We, "Expected vite:reporter to declare a writeBundle() function"));
2585
2602
  i.writeBundle = async function(r, a) {
2586
- let c = 0, d = 0, l = 0, p = 0;
2603
+ let l = 0, d = 0, c = 0, p = 0;
2587
2604
  const m = console.log;
2588
2605
  console.log = function(...g) {
2589
2606
  if (m.apply(console, g), g.length === 1 && typeof g[0] == "string") {
2590
- const [h, y] = g[0].match(_n) ?? [];
2607
+ const [h, y] = g[0].match(Un) ?? [];
2591
2608
  if (!h)
2592
2609
  return;
2593
2610
  p || (p = g[0].slice(0, g[0].indexOf(h) + h.length).replaceAll(Wn, "").length);
2594
2611
  const v = Number.parseFloat(h.replace(" kB", "").replaceAll(",", ""));
2595
- y ? (l += Number.parseFloat(y.replace(" kB", "").replaceAll(",", "")), d += v) : c += v;
2612
+ y ? (c += Number.parseFloat(y.replace(" kB", "").replaceAll(",", "")), d += v) : l += v;
2596
2613
  }
2597
2614
  };
2598
2615
  try {
@@ -2601,38 +2618,39 @@ const Yi = (e, t) => ({
2601
2618
  console.log = m;
2602
2619
  }
2603
2620
  if (d > 0) {
2604
- const g = l > 0 ? d : c, h = Kt(g), y = e.dir.relativeDist;
2621
+ const g = c > 0 ? d : l, h = Ut(g), y = e.dir.relativeDist;
2605
2622
  console.log(
2606
2623
  [
2607
- Bt,
2624
+ _t,
2608
2625
  y,
2609
- Kn,
2626
+ _n,
2610
2627
  "*",
2611
2628
  " ".repeat(p - `${y}*`.length - h.length),
2612
2629
  h,
2613
- Jt,
2614
- l > 0 ? ` ${Bt}│ gzip: ${Kt(l)}${Jt}` : ""
2630
+ Kt,
2631
+ c > 0 ? ` ${_t}│ gzip: ${Ut(c)}${Kt}` : ""
2615
2632
  ].join("")
2616
2633
  );
2617
2634
  }
2618
2635
  };
2619
2636
  }
2620
- }), Jt = "\x1B[22m\x1B[1m\x1B[22m", Bt = "\x1B[2m", Kn = "\x1B[22m\x1B[36m", _n = /\d+(?:,\d+)?\.\d{2} kB/gu, Wn = /\x1B\[\d+m/gu, Un = new Intl.NumberFormat("en", {
2637
+ }), Kt = "\x1B[22m\x1B[1m\x1B[22m", _t = "\x1B[2m", _n = "\x1B[22m\x1B[36m", Un = /\d+(?:,\d+)?\.\d{2} kB/gu, Wn = /\x1B\[\d+m/gu, zn = new Intl.NumberFormat("en", {
2621
2638
  maximumFractionDigits: 2,
2622
2639
  minimumFractionDigits: 2
2623
- }), Kt = (e) => `${Un.format(e)} kB`, zn = (e, t = u.resolve("src")) => u.relative(t, u.join(e, "..", ft.slice(0, -3)));
2624
- var Hn = ["@arcgis-test/lit-components/loader", "@arcgis/ai-components/loader", "@arcgis/api-extractor", "@arcgis/arcade-languageservice", "@arcgis/arcade-parser", "@arcgis/charts-components/loader", "@arcgis/coding-components/loader", "@arcgis/common-components/loader", "@arcgis/core", "@arcgis/embeddable-components/loader", "@arcgis/languages-api-utils", "@arcgis/languages-sdk-spec", "@arcgis/lumina", "@arcgis/lumina-toolkit", "@arcgis/map-components/loader", "@arcgis/node-toolkit", "@arcgis/portal-components/loader", "@arcgis/stencil-to-lumina", "@arcgis/toolkit", "@arcgis/typescript-config"];
2625
- const _t = "@arcgis/lumina:configureVite", qn = (e) => ({
2626
- name: _t,
2640
+ }), Ut = (e) => `${zn.format(e)} kB`, qn = (e, t = u.resolve("src")) => u.relative(t, u.join(e, "..", gt.slice(0, -3)));
2641
+ var Hn = ["@arcgis-test/lit-components/loader", "@arcgis/ai-components/loader", "@arcgis/api-extractor", "@arcgis/arcade-languageservice", "@arcgis/arcade-parser", "@arcgis/coding-components/loader", "@arcgis/common-components/loader", "@arcgis/core", "@arcgis/embeddable-components/loader", "@arcgis/languages-api-utils", "@arcgis/languages-sdk-spec", "@arcgis/lumina", "@arcgis/lumina-toolkit", "@arcgis/map-components/loader", "@arcgis/node-toolkit", "@arcgis/portal-components/loader", "@arcgis/stencil-to-lumina", "@arcgis/toolkit", "@arcgis/typescript-config"];
2642
+ const Wt = "@arcgis/lumina:configureVite", Vn = /\.[cm]?[jt]sx?$/u, Gn = (e) => ({
2643
+ name: Wt,
2627
2644
  async config({
2628
- server: t,
2629
- publicDir: i,
2630
- build: { cssMinify: s, target: n, sourcemap: r, lib: a, rollupOptions: { output: c = [] } = {}, watch: d, emptyOutDir: l } = {},
2631
- test: p = {}
2632
- }, m) {
2633
- const f = d != null, { include: g, browser: h, environment: y, forceRerunTriggers: v } = p, w = H && te && Ni(m) ? oi(Li, import.meta.dirname) : void 0, C = w === void 0 ? [] : [
2634
- G(u.join(w, "**/*.{ts,tsx,mjs}")),
2635
- `!${G(u.join(w, "**/*.d.ts"))}`
2645
+ appType: t,
2646
+ server: i,
2647
+ publicDir: s,
2648
+ build: { cssMinify: n, target: r, sourcemap: a, lib: l, rollupOptions: { output: d = [] } = {}, watch: c, emptyOutDir: p } = {},
2649
+ test: m = {}
2650
+ }, f) {
2651
+ const g = c != null, { include: h, browser: y, environment: v, forceRerunTriggers: w } = m, S = q && ee && Ni(f) ? at(Li, import.meta.dirname) : void 0, T = S === void 0 ? [] : [
2652
+ G(u.join(S, "**/*.{ts,tsx,mjs}")),
2653
+ `!${G(u.join(S, "**/*.d.ts"))}`
2636
2654
  ], E = {
2637
2655
  // Public utilities exposed by the package
2638
2656
  index: "src/index.ts",
@@ -2641,7 +2659,7 @@ const _t = "@arcgis/lumina:configureVite", qn = (e) => ({
2641
2659
  * the CDN build
2642
2660
  */
2643
2661
  loader: "src/loader.ts"
2644
- }, { loader: P, ...x } = E, S = e.environment === "development" || e.isInTest ? {
2662
+ }, { loader: x, ...C } = E, L = e.environment === "development" || e.isInTest ? {
2645
2663
  "process.env.ESRI_INTERNAL": "true"
2646
2664
  } : void 0, A = {
2647
2665
  /**
@@ -2656,9 +2674,9 @@ const _t = "@arcgis/lumina:configureVite", qn = (e) => ({
2656
2674
  * is not visible to dep-optimizer's ESBuild instance.
2657
2675
  */
2658
2676
  entries: [
2659
- ...Object.values(x),
2677
+ ...Object.values(C),
2660
2678
  ...await e.componentFilesPromise,
2661
- ...C,
2679
+ ...T,
2662
2680
  // Vitest scans setup files, but misses Lumina's because we add it
2663
2681
  // dynamically. Include it because it imports js-beautify. Can't
2664
2682
  // explicitly declare js-beautify in the "include" because dependencies
@@ -2688,9 +2706,9 @@ const _t = "@arcgis/lumina:configureVite", qn = (e) => ({
2688
2706
  include: [
2689
2707
  // Used by controllers. Need to add manually because @arcgis/lumina is
2690
2708
  // excluded per comment below, so Vite will discover these usages too late.
2691
- ...H && !te ? ["@arcgis/core/applications/Components/reactiveUtils.js", "@arcgis/core/core/reactiveUtils.js"] : [],
2709
+ ...q && !ee ? ["@arcgis/core/applications/Components/reactiveUtils.js", "@arcgis/core/core/reactiveUtils.js"] : [],
2692
2710
  // Used by core. Because we exclude core from scanning, these are discovered late, causing errors
2693
- ...H && te ? [
2711
+ ...q && ee ? [
2694
2712
  "tslib",
2695
2713
  "@arcgis/core > luxon",
2696
2714
  "@arcgis/core > @esri/arcgis-html-sanitizer",
@@ -2712,7 +2730,7 @@ const _t = "@arcgis/lumina:configureVite", qn = (e) => ({
2712
2730
  * inside the package, and by Calcite outside the package).
2713
2731
  */
2714
2732
  exclude: [
2715
- ...te ? [
2733
+ ...ee ? [
2716
2734
  ...Hn,
2717
2735
  // This exact import is also supplied through optimizableImports in `dependencies/arcgisCore.ts`
2718
2736
  // Optimizing it in the monorepo creates a separate core config instance, so the app does not receive the
@@ -2740,55 +2758,62 @@ const _t = "@arcgis/lumina:configureVite", qn = (e) => ({
2740
2758
  "lit-html",
2741
2759
  "lit-element",
2742
2760
  "@lit/reactive-element",
2743
- "@lit/context"
2761
+ "@lit/context",
2762
+ // Workaround for Vite bug in pnpm repos
2763
+ // https://github.com/vitejs/vite/issues/21088
2764
+ "@lit/task"
2744
2765
  ]
2745
2766
  };
2746
- if (typeof p.setupFiles == "string" ? p.setupFiles = [...We, p.setupFiles] : Array.isArray(p.setupFiles) ? p.setupFiles = [...We, ...p.setupFiles] : p.setupFiles = [...We], e.isInPuppeteerTestBackEnd) {
2747
- if (h?.enabled === !0)
2767
+ if (typeof m.setupFiles == "string" ? m.setupFiles = [...Ue, m.setupFiles] : Array.isArray(m.setupFiles) ? m.setupFiles = [...Ue, ...m.setupFiles] : m.setupFiles = [...Ue], e.isInPuppeteerTestBackEnd) {
2768
+ if (y?.enabled === !0)
2748
2769
  throw Error(
2749
- b(_t, "Can't enable both Vitest browser mode and Puppeteer testing at the same time")
2770
+ b(Wt, "Can't enable both Vitest browser mode and Puppeteer testing at the same time")
2750
2771
  );
2772
+ const M = {
2773
+ puppeteerLaunchOptions: e.options.puppeteerTesting?.launchOptions,
2774
+ puppeteerWaitForChangesDelay: e.options.puppeteerTesting?.waitForChangesDelay,
2775
+ globalSetup: ["@arcgis/lumina-compiler/puppeteerTesting/globalSetup"],
2776
+ runner: "@arcgis/lumina-compiler/puppeteerTesting/runner",
2777
+ // Run all test files that include *.e2e.* or *.spec.* in the name.
2778
+ include: h ? void 0 : ["**/*.{e2e,spec}.?(c|m)[jt]s?(x)"],
2779
+ /**
2780
+ * Using happy-dom because:
2781
+ * - faster than js-dom
2782
+ * - supports shadow dom
2783
+ * - is preferred by the Vitest team
2784
+ */
2785
+ environment: v ?? "happy-dom",
2786
+ /**
2787
+ * Re-run all tests on any file change.
2788
+ */
2789
+ forceRerunTriggers: w === void 0 ? ["**/*.{ts,tsx}"] : void 0
2790
+ };
2751
2791
  return {
2752
- test: {
2753
- puppeteerLaunchOptions: e.options.puppeteerTesting?.launchOptions,
2754
- puppeteerWaitForChangesDelay: e.options.puppeteerTesting?.waitForChangesDelay,
2755
- globalSetup: ["@arcgis/lumina-compiler/puppeteerTesting/globalSetup"],
2756
- runner: "@arcgis/lumina-compiler/puppeteerTesting/runner",
2757
- // Run all test files that include *.e2e.* or *.spec.* in the name.
2758
- include: g ? void 0 : ["**/*.{e2e,spec}.?(c|m)[jt]s?(x)"],
2759
- /**
2760
- * Using happy-dom because:
2761
- * - faster than js-dom
2762
- * - supports shadow dom
2763
- * - is preferred by the Vitest team
2764
- */
2765
- environment: y ?? "happy-dom",
2766
- /**
2767
- * Re-run all tests on any file change.
2768
- */
2769
- forceRerunTriggers: v === void 0 ? ["**/*.{ts,tsx}"] : void 0
2770
- },
2792
+ appType: t ?? "mpa",
2793
+ test: M,
2771
2794
  optimizeDeps: A,
2772
- define: S
2795
+ define: L
2773
2796
  };
2774
2797
  }
2775
2798
  return {
2799
+ // Missing assets should return 404 instead of falling back to the test app.
2800
+ appType: t ?? "mpa",
2776
2801
  server: {
2777
- open: t?.open ?? !0
2802
+ open: i?.open ?? !0
2778
2803
  },
2779
2804
  // We have handleStaticAssets() instead (which uses /assets/ folders)
2780
- publicDir: i ?? !1,
2805
+ publicDir: s ?? !1,
2781
2806
  build: {
2782
- cssMinify: s ?? (e.environment === "production" ? !0 : void 0),
2783
- target: n ?? ji(e),
2784
- sourcemap: r ?? (e.environment === "development" ? "inline" : e.options.build?.enableSourceMapsInProduction ?? !1),
2807
+ cssMinify: n ?? (e.environment === "production" ? !0 : void 0),
2808
+ target: r ?? ji(e),
2809
+ sourcemap: a ?? (e.environment === "development" ? "inline" : e.options.build?.enableSourceMapsInProduction ?? !1),
2785
2810
  lib: {
2786
2811
  entry: E,
2787
- formats: (a ? a.formats : void 0) ?? ["es"]
2812
+ formats: (l ? l.formats : void 0) ?? ["es"]
2788
2813
  },
2789
2814
  rollupOptions: {
2790
2815
  output: {
2791
- chunkFileNames: (Array.isArray(c) ? void 0 : c.chunkFileNames) || "chunks/[name].js",
2816
+ chunkFileNames: (Array.isArray(d) ? void 0 : d.chunkFileNames) || "chunks/[name].js",
2792
2817
  ...// Does not exist in Rolldown, and probably not needed
2793
2818
  // https://github.com/rolldown/rolldown/issues/206
2794
2819
  "rolldownVersion" in this.meta ? void 0 : {
@@ -2796,7 +2821,7 @@ const _t = "@arcgis/lumina:configureVite", qn = (e) => ({
2796
2821
  * 2015 is the newest option. Rollup's generated code does not use
2797
2822
  * newer features at the moment.
2798
2823
  */
2799
- generatedCode: (Array.isArray(c) ? void 0 : c.generatedCode) ?? "es2015"
2824
+ generatedCode: (Array.isArray(d) ? void 0 : d.generatedCode) ?? "es2015"
2800
2825
  }
2801
2826
  }
2802
2827
  },
@@ -2810,23 +2835,29 @@ const _t = "@arcgis/lumina:configureVite", qn = (e) => ({
2810
2835
  * - in API Extractor we can avoid writing unchanged files to disk if
2811
2836
  * the out dir is not emptied between watch rebuilds.
2812
2837
  */
2813
- emptyOutDir: l ?? !f
2838
+ emptyOutDir: p ?? !g
2814
2839
  },
2815
2840
  optimizeDeps: A,
2816
- define: S,
2841
+ define: L,
2817
2842
  test: {
2818
2843
  /*
2819
2844
  * If in browser, run all test files that include *.e2e.* in the name.
2820
2845
  * Otherwise, run all files including *.test.* or *.spec.* in the name.
2821
2846
  */
2822
- include: g ? void 0 : [h?.enabled ?? !0 ? "**/*.e2e.?(c|m)[jt]s?(x)" : "**/*.{test,spec}.?(c|m)[jt]s?(x)"],
2847
+ include: h ? void 0 : [y?.enabled ?? !0 ? "**/*.e2e.?(c|m)[jt]s?(x)" : "**/*.{test,spec}.?(c|m)[jt]s?(x)"],
2823
2848
  browser: {
2824
- enabled: e.isInPuppeteerTestFrontEnd ? !1 : h?.enabled ?? !0,
2825
- instances: h?.instances === void 0 ? [{ browser: "chromium" }] : void 0
2849
+ enabled: e.isInPuppeteerTestFrontEnd ? !1 : y?.enabled ?? !0,
2850
+ instances: y?.instances === void 0 ? [{ browser: "chromium" }] : void 0
2826
2851
  }
2827
2852
  }
2828
2853
  };
2829
2854
  },
2855
+ configureServer(t) {
2856
+ t.middlewares.use((i, s, n) => {
2857
+ const r = i.url?.split("?", 1)[0];
2858
+ r !== void 0 && Vn.test(r) && delete i.headers["sec-fetch-dest"], n();
2859
+ });
2860
+ },
2830
2861
  /**
2831
2862
  * Instead of using build.lib.entry for defining component entrypoints, we do
2832
2863
  * so in options() hook because it is called on each build --watch re-build,
@@ -2845,65 +2876,65 @@ const _t = "@arcgis/lumina:configureVite", qn = (e) => ({
2845
2876
  e._originalRollupInputOptions ??= t.input;
2846
2877
  const s = { ...e._originalRollupInputOptions };
2847
2878
  i.forEach((n) => {
2848
- const r = zn(n);
2879
+ const r = qn(n);
2849
2880
  s[r] = n;
2850
2881
  }), t.input = s;
2851
2882
  }
2852
- }), Se = "@arcgis/lumina:serveLocalCdn", Vn = /^\/?@arcgis\/core(?=\/|$)/u, Zi = "/index.js", Gn = je(Zi), rt = `\0${Se}:index`, Xn = je(rt), Yn = 3e3, Qn = [
2883
+ }), Se = "@arcgis/lumina:serveLocalCdn", Xn = /^\/?@arcgis\/core(?=\/|$)/u, Zi = "/index.js", Yn = je(Zi), rt = `\0${Se}:index`, Qn = je(rt), Zn = 3e3, eo = [
2853
2884
  /^https?:\/\/localhost(?::[0-9]+)?$/u,
2854
2885
  /^https?:\/\/(?:[a-z0-9-]+\.)*(?:arcgis|esri)\.com(?::[0-9]+)?$/iu
2855
2886
  ];
2856
- function Zn(e) {
2857
- if (!H)
2887
+ function to(e) {
2888
+ if (!q)
2858
2889
  return;
2859
- const t = j().name, i = t.split("/").pop() ?? t, s = `/${i}/index.js`, n = je(s), r = `\0${Se}:${i}`, a = je(r);
2890
+ const t = D().name, i = t.split("/").pop() ?? t, s = `/${i}/index.js`, n = je(s), r = `\0${Se}:${i}`, a = je(r);
2860
2891
  return {
2861
2892
  name: Se,
2862
2893
  enforce: "pre",
2863
- apply(c) {
2864
- const d = io(e, c);
2894
+ apply(l) {
2895
+ const d = ro(e, l);
2865
2896
  return d || (e._localCdnCore = void 0), d;
2866
2897
  },
2867
2898
  config: {
2868
2899
  order: "post",
2869
- handler(c, d) {
2870
- const l = c.server, p = Ni(d), m = p ? Li : en, f = oi(m, import.meta.dirname);
2900
+ handler(l, d) {
2901
+ const c = l.server, p = Ni(d), m = p ? Li : Zr, f = at(m, import.meta.dirname);
2871
2902
  if (f === void 0)
2872
2903
  throw Error(b(Se, `Unable to find ${m}.`));
2873
2904
  return e._localCdnCore = p ? { packageLocation: u.dirname(f), sourceLocation: f } : { packageLocation: f }, {
2874
2905
  server: {
2875
- port: l?.port ?? Yn,
2876
- cors: l?.cors ?? { origin: Qn }
2906
+ port: c?.port ?? Zn,
2907
+ cors: c?.cors ?? { origin: eo }
2877
2908
  },
2878
2909
  resolve: {
2879
2910
  // The alias also matches CDN-rooted requests such as /@arcgis/core/WebMap.js. Vite resolves .js requests
2880
2911
  // to TypeScript in source mode and handles relative and bare imports from the resulting filesystem path.
2881
- alias: [{ find: Vn, replacement: f }]
2912
+ alias: [{ find: Xn, replacement: f }]
2882
2913
  }
2883
2914
  };
2884
2915
  }
2885
2916
  },
2886
2917
  resolveId: {
2887
- filter: { id: [Gn, n] },
2888
- handler(c) {
2889
- if (c === Zi)
2918
+ filter: { id: [Yn, n] },
2919
+ handler(l) {
2920
+ if (l === Zi)
2890
2921
  return rt;
2891
- if (c === s)
2922
+ if (l === s)
2892
2923
  return r;
2893
2924
  }
2894
2925
  },
2895
2926
  load: {
2896
- filter: { id: [Xn, a] },
2897
- async handler(c) {
2898
- if (c === rt)
2927
+ filter: { id: [Qn, a] },
2928
+ async handler(l) {
2929
+ if (l === rt)
2899
2930
  return `import ${JSON.stringify(s)};
2900
2931
  `;
2901
- if (c === r)
2902
- return await to(e);
2932
+ if (l === r)
2933
+ return await so(e);
2903
2934
  }
2904
2935
  },
2905
- handleHotUpdate({ file: c, server: d }) {
2906
- if (eo(c, e._localCdnCore?.sourceLocation))
2936
+ handleHotUpdate({ file: l, server: d }) {
2937
+ if (io(l, e._localCdnCore?.sourceLocation))
2907
2938
  return d.ws.send({ type: "full-reload" }), [];
2908
2939
  }
2909
2940
  };
@@ -2911,30 +2942,30 @@ function Zn(e) {
2911
2942
  function je(e) {
2912
2943
  return new RegExp(`^${RegExp.escape(e)}$`, "u");
2913
2944
  }
2914
- function eo(e, t) {
2945
+ function io(e, t) {
2915
2946
  return t !== void 0 && e.startsWith(u.join(t, u.sep));
2916
2947
  }
2917
- async function to(e) {
2948
+ async function so(e) {
2918
2949
  const t = e.viteConfig.server, i = t.origin?.replace(/\/$/u, "") ?? `${t.https ? "https" : "http"}://localhost:${String(t.port)}`;
2919
2950
  return `${(await oe(e, `${i}/`)).flatMap((n) => "javascriptCode" in n ? n.javascriptCode : []).join(`
2920
2951
  `)}
2921
2952
  `;
2922
2953
  }
2923
- function io(e, t) {
2924
- return te && e.viteCommand === "serve" && !e.isInTest && t.resolve?.conditions?.includes("storybook") !== !0 && t.server?.middlewareMode !== !0;
2954
+ function ro(e, t) {
2955
+ return ee && e.viteCommand === "serve" && !e.isInTest && t.resolve?.conditions?.includes("storybook") !== !0 && t.server?.middlewareMode !== !0;
2925
2956
  }
2926
- const so = (e) => ({
2957
+ const no = (e) => ({
2927
2958
  name: "@arcgis/lumina:setAssetPath",
2928
2959
  apply: () => e.viteCommand === "build",
2929
2960
  config: (t) => ({
2930
- base: t.base ?? e.options.assets?.defaultPath ?? De()
2961
+ base: t.base ?? e.options.assets?.defaultPath ?? Re()
2931
2962
  })
2932
2963
  });
2933
- function ro(e = j()) {
2934
- const t = ut(e) ?? "0.0.1";
2964
+ function oo(e = D()) {
2965
+ const t = mt(e) ?? "0.0.1";
2935
2966
  return Es(t);
2936
2967
  }
2937
- const no = (e) => `/* ${e} */`, k = (e) => (t, i) => {
2968
+ const ao = (e) => `/* ${e} */`, k = (e) => (t, i) => {
2938
2969
  Object.defineProperty(t, i, {
2939
2970
  get() {
2940
2971
  throw Error(
@@ -2973,8 +3004,8 @@ const ue = {
2973
3004
  apiJson: "docs/api.json",
2974
3005
  stencilLikeDocsJson: "docs/docs.json"
2975
3006
  }, nt = (e) => e.viteConfig.root.includes("/test-packages/") ? 2 : void 0;
2976
- async function es(e, t, i = j()) {
2977
- const s = oo(e, i), n = u.join(t, "lumina.ts"), a = await K(n) ? await z(n, "utf8") : "";
3007
+ async function es(e, t, i = D()) {
3008
+ const s = co(e, i), n = u.join(t, "lumina.ts"), a = await _(n) ? await W(n, "utf8") : "";
2978
3009
  if (a.trim().replaceAll(`\r
2979
3010
  `, `
2980
3011
  `) === s.trim())
@@ -2994,18 +3025,18 @@ ${a}`
2994
3025
  );
2995
3026
  return ci(n, s), !0;
2996
3027
  }
2997
- function oo(e, t = j()) {
3028
+ function co(e, t = D()) {
2998
3029
  const i = e.filter((d) => d.type === "@arcgis/lumina").map((d) => `
2999
3030
  /// <reference types="${d.packageName}/types/lumina" />`), s = e.filter((d) => d.type === "stencil"), n = s.map(
3000
- (d, l) => `
3001
- import type { JSX as JSX$${l} } from "${d.packageName}/dist/types/components";`
3031
+ (d, c) => `
3032
+ import type { JSX as JSX$${c} } from "${d.packageName}/dist/types/components";`
3002
3033
  ), r = s.length === 0 ? "" : `
3003
3034
 
3004
3035
  declare module "@arcgis/lumina" {
3005
- interface ImportStencilElements extends ${s.map((d, l) => `JSX$${l}.IntrinsicElements`).join(", ")} {}
3036
+ interface ImportStencilElements extends ${s.map((d, c) => `JSX$${c}.IntrinsicElements`).join(", ")} {}
3006
3037
  }`, a = t.devDependencies ?? {};
3007
3038
  return [
3008
- ao,
3039
+ lo,
3009
3040
  a.vitest ? `
3010
3041
  /// <reference types="vitest/config" />
3011
3042
  /// <reference types="vitest/browser" />` : "",
@@ -3016,7 +3047,7 @@ declare module "@arcgis/lumina" {
3016
3047
  `
3017
3048
  ].join("");
3018
3049
  }
3019
- const ao = `/**
3050
+ const lo = `/**
3020
3051
  * This file is autogenerated by \`@arcgis/lumina-compiler\` - do not edit it manually.
3021
3052
  * Manual edits will be overwritten.
3022
3053
  *
@@ -3035,14 +3066,14 @@ const ao = `/**
3035
3066
  * is doing:
3036
3067
  * https://github.com/storybookjs/storybook/blob/a5c2cf1712f70b4e3ecf38d3c98e7db8e8d67849/code/builders/builder-vite/src/plugins/code-generator-plugin.ts#L110
3037
3068
  */
3038
- e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand === "build" && !e.options.build?.cdn?.skip && e.options.build?.webApp?.destination !== void 0, co = (e) => ({
3069
+ e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand === "build" && !e.options.build?.cdn?.skip && e.options.build?.webApp?.destination !== void 0, po = (e) => ({
3039
3070
  name: Ce,
3040
3071
  async configureServer(t) {
3041
- H && (e.server = t, await cn(e));
3072
+ q && (e.server = t, await an(e));
3042
3073
  },
3043
3074
  configResolved() {
3044
- !e.isInTest && !e.isInStorybook && (e._updateLuminaTsPromise = lo(e).catch(
3045
- (t) => T.error(Ce, `Failed to update package's src/lumina.ts: ${String(t)}`)
3075
+ !e.isInTest && !e.isInStorybook && (e._updateLuminaTsPromise = uo(e).catch(
3076
+ (t) => $.error(Ce, `Failed to update package's src/lumina.ts: ${String(t)}`)
3046
3077
  ));
3047
3078
  },
3048
3079
  transformIndexHtml: {
@@ -3091,26 +3122,26 @@ e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand
3091
3122
  await e._updateLuminaTsPromise;
3092
3123
  }
3093
3124
  });
3094
- async function lo(e) {
3125
+ async function uo(e) {
3095
3126
  const i = (await Promise.all([ne, Gi(e)])).flat();
3096
3127
  if (!await es(i, e.dir.src))
3097
3128
  return;
3098
3129
  let n = !1;
3099
3130
  function r() {
3100
- n || T.warn(Ce, po), n = !0;
3131
+ n || $.warn(Ce, mo), n = !0;
3101
3132
  }
3102
3133
  process.on("exit", () => {
3103
- r(), clearTimeout(c);
3134
+ r(), clearTimeout(l);
3104
3135
  });
3105
- const c = setTimeout(r, 2e3);
3136
+ const l = setTimeout(r, 2e3);
3106
3137
  }
3107
- const po = Hs(
3138
+ const mo = qs(
3108
3139
  "greenBright",
3109
3140
  `lumina.ts has been updated (potentially because your dependencies changed). Please commit the updated file.
3110
3141
  If build failed with TypeScript errors, try running the build again to check whether new lumina.ts resolves the errors.`
3111
3142
  );
3112
- async function uo(e) {
3113
- const t = e.options.apiExtractor?.configFilePath === "" ? void 0 : await Vs(process.cwd()), i = e.apiExtractorPluginConfig.unsafeConfigOverride === void 0 || t === void 0 ? t ?? e.apiExtractorPluginConfig.unsafeConfigOverride : $t(t, e.apiExtractorPluginConfig.unsafeConfigOverride);
3143
+ async function fo(e) {
3144
+ const t = e.options.apiExtractor?.configFilePath === "" ? void 0 : await Vs(process.cwd()), i = e.apiExtractorPluginConfig.unsafeConfigOverride === void 0 || t === void 0 ? t ?? e.apiExtractorPluginConfig.unsafeConfigOverride : Pt(t, e.apiExtractorPluginConfig.unsafeConfigOverride);
3114
3145
  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([
3115
3146
  {
3116
3147
  type: "dynamic",
@@ -3143,7 +3174,7 @@ async function uo(e) {
3143
3174
  afterDiagnostic: e.options.types?.afterDiagnostic,
3144
3175
  typeScriptInstanceCreated: e.options.types?.typeScriptInstanceCreated,
3145
3176
  declarationTextTransformers: e.options.types?.declarationTextTransformers?.map(
3146
- (l) => (p) => l(p, e)
3177
+ (c) => (p) => c(p, e)
3147
3178
  ),
3148
3179
  typeScriptConfig: n,
3149
3180
  // Already merged, so pass empty object to avoid merging again
@@ -3156,15 +3187,15 @@ async function uo(e) {
3156
3187
  getComponentDemoUrl: e.options.documentation?.getComponentDemoUrl
3157
3188
  },
3158
3189
  watch: {
3159
- onUpdate: async (l) => {
3190
+ onUpdate: async (c) => {
3160
3191
  e.apiJsonDeferred = Promise.withResolvers();
3161
- const p = await l;
3192
+ const p = await c;
3162
3193
  if (e.apiJsonDeferred.resolve(), e.apiJsonDeferred = void 0, p !== void 0) {
3163
3194
  if (e.viteCommand === "serve")
3164
3195
  if ([...p.addedModules, ...p.removedModules].some(
3165
3196
  (f) => Pe(f.sourcePath, "src/components/")
3166
3197
  ))
3167
- Dt(e), Ot(e);
3198
+ Mt(e), Jt(e);
3168
3199
  else {
3169
3200
  for (const f of p.changedModules) {
3170
3201
  if (!Pe(f.new.sourcePath, "src/components/"))
@@ -3177,60 +3208,60 @@ async function uo(e) {
3177
3208
  if (g === void 0 && h === void 0)
3178
3209
  continue;
3179
3210
  if (g !== void 0 && h === void 0 || g === void 0 && h !== void 0 || g.tagName !== h.tagName || g.formAssociated !== h.formAssociated) {
3180
- Ot(e);
3211
+ Jt(e);
3181
3212
  break;
3182
3213
  }
3183
3214
  const y = $i(h);
3184
3215
  e.server.ws.send({ type: "custom", event: "component-meta-update", data: y });
3185
3216
  }
3186
- Dt(e);
3217
+ Mt(e);
3187
3218
  }
3188
- Wt(e, p.apiJson);
3219
+ zt(e, p.apiJson);
3189
3220
  }
3190
3221
  }
3191
3222
  },
3192
- afterApiJsonCreate: (l) => {
3193
- e.options.apiJson?.afterCreate?.(l.apiJson, !r), r = !0, (e.viteCommand === "build" ? e.viteConfig.build.watch : e.viteConfig.server.watch) === null && (e.apiJsonDeferred.resolve(), Wt(e, l.apiJson));
3223
+ afterApiJsonCreate: (c) => {
3224
+ e.options.apiJson?.afterCreate?.(c.apiJson, !r), r = !0, (e.viteCommand === "build" ? e.viteConfig.build.watch : e.viteConfig.server.watch) === null && (e.apiJsonDeferred.resolve(), zt(e, c.apiJson));
3194
3225
  }
3195
- }, c = i === void 0 ? a : $t(i, a);
3196
- e.apiExtractorPluginConfig.configFilePath = "", e.apiExtractorPluginConfig.unsafeConfigOverride = c;
3226
+ }, l = i === void 0 ? a : Pt(i, a);
3227
+ e.apiExtractorPluginConfig.configFilePath = "", e.apiExtractorPluginConfig.unsafeConfigOverride = l;
3197
3228
  const d = e.apiExtractorPluginConfig.afterExtractorCreated;
3198
- e.apiExtractorPluginConfig.afterExtractorCreated = (l) => {
3199
- e.apiExtractor = l, d?.(l);
3229
+ e.apiExtractorPluginConfig.afterExtractorCreated = (c) => {
3230
+ e.apiExtractor = c, d?.(c);
3200
3231
  };
3201
3232
  }
3202
- function Wt(e, t) {
3233
+ function zt(e, t) {
3203
3234
  const i = { ...t, modules: [] }, s = [], n = e.viteCommand === "build" ? [] : void 0;
3204
3235
  for (const r of t.modules) {
3205
3236
  const a = { ...r, declarations: [] };
3206
- let c = !1;
3237
+ let l = !1;
3207
3238
  for (const d of r.declarations) {
3208
3239
  if (d.customElement !== !0) {
3209
3240
  a.declarations.push(d);
3210
3241
  continue;
3211
3242
  }
3212
- const l = d;
3213
- if (n?.push(r.sourcePath), l.privacy !== void 0) {
3214
- c = !0;
3243
+ const c = d;
3244
+ if (n?.push(r.sourcePath), c.privacy !== void 0) {
3245
+ l = !0;
3215
3246
  continue;
3216
3247
  }
3217
3248
  const p = {
3218
- ...l,
3219
- members: l.members.filter((m) => m.privacy === void 0)
3249
+ ...c,
3250
+ members: c.members.filter((m) => m.privacy === void 0)
3220
3251
  };
3221
3252
  a.declarations.push(p), s.push(p);
3222
3253
  }
3223
- c || i.modules.push(a);
3254
+ l || i.modules.push(a);
3224
3255
  }
3225
3256
  e._localDefinedComponents = void 0, e.privateApiJson = t, e.apiJsonComponents = s, e.apiJson = i, n !== void 0 && (e.componentFilesPromise = Promise.resolve(n));
3226
3257
  }
3227
- var mo = Object.defineProperty, I = (e, t, i, s) => {
3258
+ var go = Object.defineProperty, I = (e, t, i, s) => {
3228
3259
  for (var n = void 0, r = e.length - 1, a; r >= 0; r--)
3229
3260
  (a = e[r]) && (n = a(t, i, n) || n);
3230
- return n && mo(t, i, n), n;
3261
+ return n && go(t, i, n), n;
3231
3262
  };
3232
3263
  const V = "@arcgis/lumina:context";
3233
- class $ {
3264
+ class P {
3234
3265
  constructor(t) {
3235
3266
  this._typeScriptSourceFiles = /* @__PURE__ */ new Map(), this._plugin = {
3236
3267
  name: V,
@@ -3243,27 +3274,27 @@ class $ {
3243
3274
  this.viteConfig = r;
3244
3275
  const a = r.build.minify !== !1;
3245
3276
  this.shouldMinify = a && this.viteCommand !== "serve", Object.hasOwn(this, "shouldMinifyJsx") || (this.shouldMinifyJsx = this.viteCommand !== "serve" || this.isInTest);
3246
- 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);
3277
+ 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 ?? le, u.sep), h = u.join(g, "assets", u.sep);
3247
3278
  if (this.dir = {
3248
- root: c,
3279
+ root: l,
3249
3280
  src: d,
3250
- srcComponents: l,
3281
+ srcComponents: c,
3251
3282
  relativeDist: m,
3252
3283
  dist: p,
3253
3284
  distComponents: f,
3254
3285
  distCdn: g,
3255
3286
  distCdnAssets: h
3256
- }, T.initialize(r.logger, c), r.root !== ni())
3287
+ }, $.initialize(r.logger, l), r.root !== oi())
3257
3288
  throw Error(
3258
3289
  b(
3259
3290
  V,
3260
3291
  "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."
3261
3292
  )
3262
3293
  );
3263
- p === c ? T.warn(
3294
+ p === l ? $.warn(
3264
3295
  V,
3265
3296
  "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/)"
3266
- ) : m.startsWith("..") && T.warn(
3297
+ ) : m.startsWith("..") && $.warn(
3267
3298
  V,
3268
3299
  "Vite output directory is outside the root directory. This is not officially supported by Lumina and may lead to unexpected behavior. Contact Lumina maintainers if you need this to be supported."
3269
3300
  ), this.isInStorybook = r.resolve.conditions.includes("storybook"), this.isFullApiExtraction = this.viteCommand === "build" || this.isInStorybook, this.hmrEnabled = this.viteCommand === "serve" && !this.isInTest && !!(r.server?.hmr ?? !0), this.isInBuildWatch = r.command === "build" && r.build.watch != null;
@@ -3271,8 +3302,8 @@ class $ {
3271
3302
  this.apiJsonEnabled = !y && !this.isInPuppeteerTestBackEnd && !v && !w, this.apiJsonEnabled ? (this.apiExtractorPluginConfig.serve = {
3272
3303
  extract: !0
3273
3304
  }, (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);
3274
- const C = this.viteCommand === "serve" && !this.isInStorybook, E = this.apiExtractorPluginConfig.unsafeConfigOverride;
3275
- C && (E.context.isLuminaMinimalExtraction = !0, E.types.typeCheckedExtraction = !1, E.types.fullTypeCheck = !1), this.isInStorybook && (E.context.dtsEmitPath = ""), this._typeScriptPrinter = qs({
3305
+ const S = this.viteCommand === "serve" && !this.isInStorybook, T = this.apiExtractorPluginConfig.unsafeConfigOverride;
3306
+ S && (T.context.isLuminaMinimalExtraction = !0, T.types.typeCheckedExtraction = !1, T.types.fullTypeCheck = !1), this.isInStorybook && (T.context.dtsEmitPath = ""), this._typeScriptPrinter = Hs({
3276
3307
  // Do not downlevel. ESBuild will do that if needed.
3277
3308
  target: o.ScriptTarget.ESNext,
3278
3309
  sourceMap: r.build.sourcemap !== !1
@@ -3304,21 +3335,21 @@ class $ {
3304
3335
  webTypes: i.jetBrains === !1 ? void 0 : i.jetBrains?.webTypesFileName ? pe(i.jetBrains.webTypesFileName) : ue.webTypes,
3305
3336
  vsCodeHtml: i.vsCode === !1 ? void 0 : i.vsCode?.htmlFileName ? pe(i.vsCode.htmlFileName) : ue.vsCodeHtml,
3306
3337
  vsCodeCss: i.vsCode === !1 ? void 0 : i.vsCode?.cssFileName ? pe(i.vsCode.cssFileName) : ue.vsCodeCss
3307
- }, this.apiExtractorPluginConfig = this.options.apiExtractor ?? {}, this.configsPromise = uo(this);
3338
+ }, this.apiExtractorPluginConfig = this.options.apiExtractor ?? {}, this.configsPromise = fo(this);
3308
3339
  const s = process.cwd().length + 1;
3309
3340
  this.componentFilesPromise = this.configsPromise.then(() => {
3310
3341
  const r = this.apiExtractorPluginConfig.unsafeConfigOverride.types.typeScriptConfig.config.fileNames, a = [];
3311
- for (let c = 0; c < r.length; ++c) {
3312
- const l = r[c].slice(s);
3313
- Pe(l, "src/components") && a.push(l);
3342
+ for (let l = 0; l < r.length; ++l) {
3343
+ const c = r[l].slice(s);
3344
+ Pe(c, "src/components") && a.push(c);
3314
3345
  }
3315
3346
  return a;
3316
3347
  }), ki(void 0, t);
3317
- const n = t.build?.preamble ?? ro();
3318
- this.banner = no(n);
3348
+ const n = t.build?.preamble ?? oo();
3349
+ this.banner = ao(n);
3319
3350
  }
3320
3351
  _inferBuildSetup({ command: t, mode: i }, s) {
3321
- 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(Pi.name, `Vite is running in unknown mode "${i}". Assuming development`), this.environment = "development"), this.viteCommand = t;
3352
+ this.isInTest = process.env.NODE_ENV === "test", i === "production" || i === "development" ? this.environment = i : i === "test" || i === "benchmark" ? (this.environment = "development", this.isInTest = !0) : ($.warn(Pi.name, `Vite is running in unknown mode "${i}". Assuming development`), this.environment = "development"), this.viteCommand = t;
3322
3353
  const n = s?.__IS_IN_PUPPETEER__ === !0, r = this.viteCommand === "serve" && this.isInTest && this.options.puppeteerTesting?.enabled === !0;
3323
3354
  this.isInPuppeteerTestBackEnd = r && !n, this.isInPuppeteerTestFrontEnd = r && n;
3324
3355
  }
@@ -3339,11 +3370,11 @@ class $ {
3339
3370
  )
3340
3371
  );
3341
3372
  if (r === void 0 && !n) {
3342
- const c = this._typeScriptSourceFiles.get(t);
3343
- if (c?.text === i)
3344
- return c;
3373
+ const l = this._typeScriptSourceFiles.get(t);
3374
+ if (l?.text === i)
3375
+ return l;
3345
3376
  }
3346
- return i !== r?.text && ((this.viteCommand !== "serve" || this.isInStorybook) && T.warn(
3377
+ return i !== r?.text && ((this.viteCommand !== "serve" || this.isInStorybook) && $.warn(
3347
3378
  V,
3348
3379
  "The Vite's transform() content didn't match TypeScript's content. This may happen if some plugin transformed a file before Lumina or Vite got out of sync with TypeScript. This may lead to false errors. Debug your build configuration or report it as a bug",
3349
3380
  t
@@ -3390,7 +3421,7 @@ class $ {
3390
3421
  if (Array.isArray(this.assetsToProvide))
3391
3422
  this.assetsToProvide.push({ assets: t, transformers: i, apply: s });
3392
3423
  else if (this.viteCommand === "serve")
3393
- s === "serve" && ie(this, t, i);
3424
+ s === "serve" && te(this, t, i);
3394
3425
  else
3395
3426
  throw Error(
3396
3427
  b(
@@ -3400,78 +3431,78 @@ class $ {
3400
3431
  );
3401
3432
  }
3402
3433
  logLintWarning(t) {
3403
- T.warn("@arcgis/lumina:linting", t);
3434
+ $.warn("@arcgis/lumina:linting", t);
3404
3435
  }
3405
3436
  logLintError(t, i, s) {
3406
- this._silencedRules?.[t]?.includes(i.slice(this.dir.root.length)) !== !0 ? T.error("@arcgis/lumina:linting", s, i) : T.warn("@arcgis/lumina:linting", s, i);
3437
+ this._silencedRules?.[t]?.includes(i.slice(this.dir.root.length)) !== !0 ? $.error("@arcgis/lumina:linting", s, i) : $.warn("@arcgis/lumina:linting", s, i);
3407
3438
  }
3408
3439
  }
3409
3440
  I([
3410
3441
  k("configResolved()")
3411
- ], $.prototype, "shouldMinify");
3442
+ ], P.prototype, "shouldMinify");
3412
3443
  I([
3413
3444
  k("configResolved()")
3414
- ], $.prototype, "shouldMinifyJsx");
3445
+ ], P.prototype, "shouldMinifyJsx");
3415
3446
  I([
3416
3447
  k("configResolved()")
3417
- ], $.prototype, "dir");
3448
+ ], P.prototype, "dir");
3418
3449
  I([
3419
3450
  k("load()")
3420
- ], $.prototype, "apiJson");
3451
+ ], P.prototype, "apiJson");
3421
3452
  I([
3422
3453
  k("load()")
3423
- ], $.prototype, "apiJsonComponents");
3454
+ ], P.prototype, "apiJsonComponents");
3424
3455
  I([
3425
3456
  k("load()")
3426
- ], $.prototype, "privateApiJson");
3457
+ ], P.prototype, "privateApiJson");
3427
3458
  I([
3428
3459
  k("configResolved()")
3429
- ], $.prototype, "apiJsonEnabled");
3460
+ ], P.prototype, "apiJsonEnabled");
3430
3461
  I([
3431
3462
  k("apply()")
3432
- ], $.prototype, "environment");
3463
+ ], P.prototype, "environment");
3433
3464
  I([
3434
3465
  k("apply()")
3435
- ], $.prototype, "isInTest");
3466
+ ], P.prototype, "isInTest");
3436
3467
  I([
3437
3468
  k("apply()")
3438
- ], $.prototype, "isInPuppeteerTestBackEnd");
3469
+ ], P.prototype, "isInPuppeteerTestBackEnd");
3439
3470
  I([
3440
3471
  k("apply()")
3441
- ], $.prototype, "isInPuppeteerTestFrontEnd");
3472
+ ], P.prototype, "isInPuppeteerTestFrontEnd");
3442
3473
  I([
3443
3474
  k("configResolved()")
3444
- ], $.prototype, "isInBuildWatch");
3475
+ ], P.prototype, "isInBuildWatch");
3445
3476
  I([
3446
3477
  k("configResolved()")
3447
- ], $.prototype, "isInStorybook");
3478
+ ], P.prototype, "isInStorybook");
3448
3479
  I([
3449
3480
  k("configResolved()")
3450
- ], $.prototype, "hmrEnabled");
3481
+ ], P.prototype, "hmrEnabled");
3451
3482
  I([
3452
3483
  k("apply()")
3453
- ], $.prototype, "viteCommand");
3484
+ ], P.prototype, "viteCommand");
3454
3485
  I([
3455
3486
  k("configResolved()")
3456
- ], $.prototype, "isFullApiExtraction");
3487
+ ], P.prototype, "isFullApiExtraction");
3457
3488
  I([
3458
3489
  k("configResolved()")
3459
- ], $.prototype, "viteConfig");
3490
+ ], P.prototype, "viteConfig");
3460
3491
  I([
3461
3492
  k("configureServer()")
3462
- ], $.prototype, "server");
3493
+ ], P.prototype, "server");
3463
3494
  I([
3464
3495
  k("transform()")
3465
- ], $.prototype, "_globalHydratedCssString");
3496
+ ], P.prototype, "_globalHydratedCssString");
3466
3497
  I([
3467
3498
  k("configResolved()")
3468
- ], $.prototype, "_typeScriptPrinter");
3469
- function fo(e, t, i) {
3499
+ ], P.prototype, "_typeScriptPrinter");
3500
+ function ho(e, t, i) {
3470
3501
  const s = Ii()[t] ?? is(e)[t];
3471
3502
  if (s === void 0) {
3472
3503
  if (e.options?.build?.dependencies?.silenceUnknownJsxElementUsage?.(t, i, e) === !0)
3473
3504
  return;
3474
- const n = Re(i);
3505
+ const n = De(i);
3475
3506
  throw Error(
3476
3507
  b(
3477
3508
  "@arcgis/lumina:resolveTagName",
@@ -3481,7 +3512,7 @@ function fo(e, t, i) {
3481
3512
  }
3482
3513
  return s;
3483
3514
  }
3484
- function go(e, t) {
3515
+ function yo(e, t) {
3485
3516
  return e.packageName === void 0 ? he(t, e.modulePath) : u.join(e.packageName, e.modulePath);
3486
3517
  }
3487
3518
  function is(e) {
@@ -3496,19 +3527,19 @@ function is(e) {
3496
3527
  e.viteCommand === "build"
3497
3528
  ), e._localDefinedComponents;
3498
3529
  }
3499
- const Ut = "makeRuntime(", ho = "@arcgis/core", yo = "@arcgis/lumina:injectRuntimeOptions", vo = (e) => ({
3500
- name: yo,
3530
+ const qt = "makeRuntime(", vo = "@arcgis/core", bo = "@arcgis/lumina:injectRuntimeOptions", wo = (e) => ({
3531
+ name: bo,
3501
3532
  transform: {
3502
3533
  filter: {
3503
3534
  id: /\/src\/runtime\.ts$/u
3504
3535
  },
3505
3536
  handler(t, i) {
3506
- const s = t.indexOf(Ut);
3537
+ const s = t.indexOf(qt);
3507
3538
  if (s === -1)
3508
3539
  throw new Error(
3509
3540
  `Failed to find makeRuntime() function call in src/runtime.ts. Id: ${i}. Code: ${t}`
3510
3541
  );
3511
- const n = s + Ut.length, r = e.options.css?.commonStylesPath;
3542
+ const n = s + qt.length, r = e.options.css?.commonStylesPath;
3512
3543
  return {
3513
3544
  code: [
3514
3545
  r === void 0 ? "" : `import commonStyles from "${he(e.dir.src, r)}${Ie}";`,
@@ -3523,8 +3554,8 @@ const Ut = "makeRuntime(", ho = "@arcgis/core", yo = "@arcgis/lumina:injectRunti
3523
3554
  t.slice(n),
3524
3555
  // Dependency injection. Lumina cannot directly import these to avoid
3525
3556
  // a cyclical dependency.
3526
- H ? `
3527
- import {createObservable,trackAccess,createTrackingTarget,runTracked} from "${ho}/applications/Components/reactiveUtils.js";
3557
+ q ? `
3558
+ import {createObservable,trackAccess,createTrackingTarget,runTracked} from "${vo}/applications/Components/reactiveUtils.js";
3528
3559
  createObservable,
3529
3560
  runtime.t = trackAccess;
3530
3561
  runtime.o = createObservable;
@@ -3536,23 +3567,23 @@ runtime.r = runTracked;` : ""
3536
3567
  }
3537
3568
  }
3538
3569
  });
3539
- function bo(e) {
3540
- return `import "../${e.options.build?.cdn?.namespace === void 0 ? `${le}/${Z}.css` : `${e.options.build.cdn.namespace}/${e.options.build.cdn.namespace}.css`}";
3570
+ function So(e) {
3571
+ return `import "../${e.options.build?.cdn?.namespace === void 0 ? `${le}/${Q}.css` : `${e.options.build.cdn.namespace}/${e.options.build.cdn.namespace}.css`}";
3541
3572
  `;
3542
3573
  }
3543
- const we = "@arcgis/lumina:addNonLazyImports", wo = (e) => ({
3574
+ const we = "@arcgis/lumina:addNonLazyImports", Co = (e) => ({
3544
3575
  name: we,
3545
3576
  apply: () => e.viteCommand === "build",
3546
3577
  generateBundle(t, i) {
3547
3578
  const n = e.viteConfig.build.sourcemap !== !1 ? " " : `
3548
3579
  `;
3549
3580
  let r = !1;
3550
- if (Object.entries(i).forEach(([a, c]) => {
3581
+ if (Object.entries(i).forEach(([a, l]) => {
3551
3582
  const d = Ge(a, e.apiExtractor);
3552
- if (d !== a && (c.fileName = d), c.type === "chunk") {
3553
- const l = u.dirname(u.join(e.dir.dist, a)), p = d === a ? l : u.dirname(u.join(e.dir.dist, d));
3554
- let m = c.code;
3555
- m = mn(m, e, p, l), !e.isInStorybook && d === "chunks/runtime.js" && (r = !0, m = bo(e) + m), m = `${e.banner}${n}${m}`, c.code = m;
3583
+ if (d !== a && (l.fileName = d), l.type === "chunk") {
3584
+ const c = u.dirname(u.join(e.dir.dist, a)), p = d === a ? c : u.dirname(u.join(e.dir.dist, d));
3585
+ let m = l.code;
3586
+ m = un(m, e, p, c), !e.isInStorybook && d === "chunks/runtime.js" && (r = !0, m = So(e) + m), m = `${e.banner}${n}${m}`, l.code = m;
3556
3587
  }
3557
3588
  }), !r && !e.isInStorybook)
3558
3589
  throw Error(b(we, "Expected to find a chunks/runtime.js file in the Vite's build output."));
@@ -3563,18 +3594,18 @@ const we = "@arcgis/lumina:addNonLazyImports", wo = (e) => ({
3563
3594
  const t = e._customElementDependencies, i = Object.entries(t), s = new Set(
3564
3595
  i.map(([r]) => r).filter((r) => Pe(r, e.dir.srcComponents))
3565
3596
  );
3566
- i.forEach(([r, { referencedTagNames: a, referencedDeferredTagNames: c, referencedBy: d }]) => {
3567
- if (s.has(r) || a.length === 0 && c.length === 0)
3597
+ i.forEach(([r, { referencedTagNames: a, referencedDeferredTagNames: l, referencedBy: d }]) => {
3598
+ if (s.has(r) || a.length === 0 && l.length === 0)
3568
3599
  return;
3569
- const l = ss(t, d, s);
3570
- if (l.forEach((p) => {
3571
- t[p].referencedTagNames.splice(0, 0, ...a), t[p].referencedDeferredTagNames.splice(0, 0, ...c);
3572
- }), (a.length > 0 || c.length > 0) && l.length === 0) {
3573
- const p = Re(r);
3600
+ const c = ss(t, d, s);
3601
+ if (c.forEach((p) => {
3602
+ t[p].referencedTagNames.splice(0, 0, ...a), t[p].referencedDeferredTagNames.splice(0, 0, ...l);
3603
+ }), (a.length > 0 || l.length > 0) && c.length === 0) {
3604
+ const p = De(r);
3574
3605
  throw Error(
3575
3606
  b(
3576
3607
  we,
3577
- `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.
3608
+ `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.
3578
3609
 
3579
3610
  Possible causes:
3580
3611
  - 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.
@@ -3584,42 +3615,42 @@ Possible causes:
3584
3615
  );
3585
3616
  }
3586
3617
  });
3587
- const n = i.flatMap(async ([r, { referencedTagNames: a, referencedDeferredTagNames: c }]) => {
3618
+ const n = i.flatMap(async ([r, { referencedTagNames: a, referencedDeferredTagNames: l }]) => {
3588
3619
  if (!s.has(r))
3589
3620
  return [];
3590
- 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);
3591
- function m(P) {
3592
- const x = fo(e, P, r);
3621
+ 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);
3622
+ function m(E) {
3623
+ const x = ho(e, E, r);
3593
3624
  if (x === void 0)
3594
3625
  return;
3595
- const S = go(x, p);
3596
- if (S !== `./${p}`)
3597
- return S.startsWith(".") ? `${S}/${zt}` : S;
3626
+ const C = yo(x, p);
3627
+ if (C !== `./${p}`)
3628
+ return C.startsWith(".") ? `${C}/${Ht}` : C;
3598
3629
  }
3599
- const f = new Set(a), g = new Set(c), h = Array.from(f, m).filter(R), y = (P) => `import "${P}";
3600
- `, v = h.map(y).join(""), w = Array.from(g, (P) => {
3601
- const x = m(P);
3630
+ const f = new Set(a), g = new Set(l), h = Array.from(f, m).filter(F), y = (E) => `import "${E}";
3631
+ `, v = h.map(y).join(""), w = Array.from(g, (E) => {
3632
+ const x = m(E);
3602
3633
  if (x !== void 0) {
3603
- if (f.has(P)) {
3604
- T.warn(
3634
+ if (f.has(E)) {
3635
+ $.warn(
3605
3636
  we,
3606
- `"${P}" is used both with and without deferLoad in ${r} (either directly in ${r} or via a functional component). deferLoad will be ignored in this case.`
3637
+ `"${E}" is used both with and without deferLoad in ${r} (either directly in ${r} or via a functional component). deferLoad will be ignored in this case.`
3607
3638
  );
3608
3639
  return;
3609
3640
  }
3610
- return `.set("${P}", () => import("${x}"))
3641
+ return `.set("${E}", () => import("${x}"))
3611
3642
  `;
3612
3643
  }
3613
- }).filter(R), C = `${v}export * from "./${ft}";`, E = w.length > 0 ? `import { deferredLoaders } from "@arcgis/lumina";
3614
- ${C}
3615
- deferredLoaders${w.join("")};` : C;
3616
- return await _(u.join(e.dir.dist, p, zt), E);
3644
+ }).filter(F), S = `${v}export * from "./${gt}";`, T = w.length > 0 ? `import { deferredLoaders } from "@arcgis/lumina";
3645
+ ${S}
3646
+ deferredLoaders${w.join("")};` : S;
3647
+ return await z(u.join(e.dir.dist, p, Ht), T);
3617
3648
  });
3618
3649
  await Promise.all(n);
3619
3650
  }
3620
- }), zt = "index.js", ss = (e, t, i, s = /* @__PURE__ */ new Set()) => t.flatMap((n) => i.has(n) ? [n] : s.has(n) ? [] : (s.add(n), ss(e, e[n].referencedBy, i, s)));
3621
- function Ht(e, t, i) {
3622
- if (ee(e))
3651
+ }), Ht = "index.js", ss = (e, t, i, s = /* @__PURE__ */ new Set()) => t.flatMap((n) => i.has(n) ? [n] : s.has(n) ? [] : (s.add(n), ss(e, e[n].referencedBy, i, s)));
3652
+ function Vt(e, t, i) {
3653
+ if (Z(e))
3623
3654
  return e;
3624
3655
  {
3625
3656
  i === void 0 && t.neededImports.add("nothing");
@@ -3633,18 +3664,18 @@ function Ht(e, t, i) {
3633
3664
  );
3634
3665
  }
3635
3666
  }
3636
- function ee(e) {
3667
+ function Z(e) {
3637
3668
  return (
3638
3669
  // Inlined string literal
3639
3670
  typeof e == "string" || // Syntax kinds that are never undefined
3640
- So.has(e.kind) || // Ternary with both branches never undefined
3641
- 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
3642
- o.isBinaryExpression(e) && (Co.has(e.operatorToken.kind) || ee(e.left) && ee(e.right)) || // `as`, `satisfies`, `()` with definitely not undefined expression
3643
- (o.isParenthesizedExpression(e) || o.isSatisfiesExpression(e) || o.isAsExpression(e)) && ee(e.expression) || // JSX that got converted to html`<p>Something</p>`
3644
- o.isTaggedTemplateExpression(e) && o.isIdentifier(e.tag) && pr.has(e.tag.text)
3671
+ Eo.has(e.kind) || // Ternary with both branches never undefined
3672
+ o.isConditionalExpression(e) && Z(e.whenTrue) && Z(e.whenFalse) || // Binary expression with operator that never results in undefined Or both sides are definitely not undefined
3673
+ o.isBinaryExpression(e) && (To.has(e.operatorToken.kind) || Z(e.left) && Z(e.right)) || // `as`, `satisfies`, `()` with definitely not undefined expression
3674
+ (o.isParenthesizedExpression(e) || o.isSatisfiesExpression(e) || o.isAsExpression(e)) && Z(e.expression) || // JSX that got converted to html`<p>Something</p>`
3675
+ o.isTaggedTemplateExpression(e) && o.isIdentifier(e.tag) && dr.has(e.tag.text)
3645
3676
  );
3646
3677
  }
3647
- const So = /* @__PURE__ */ new Set([
3678
+ const Eo = /* @__PURE__ */ new Set([
3648
3679
  o.SyntaxKind.NumericLiteral,
3649
3680
  o.SyntaxKind.BigIntLiteral,
3650
3681
  o.SyntaxKind.StringLiteral,
@@ -3663,7 +3694,7 @@ const So = /* @__PURE__ */ new Set([
3663
3694
  o.SyntaxKind.ClassExpression,
3664
3695
  // Trust? Trust.
3665
3696
  o.SyntaxKind.NonNullExpression
3666
- ]), Co = /* @__PURE__ */ new Set([
3697
+ ]), To = /* @__PURE__ */ new Set([
3667
3698
  o.SyntaxKind.PlusEqualsToken,
3668
3699
  o.SyntaxKind.MinusEqualsToken,
3669
3700
  o.SyntaxKind.AsteriskAsteriskEqualsToken,
@@ -3698,42 +3729,42 @@ const So = /* @__PURE__ */ new Set([
3698
3729
  o.SyntaxKind.SlashToken,
3699
3730
  o.SyntaxKind.PercentToken,
3700
3731
  o.SyntaxKind.AsteriskAsteriskToken
3701
- ]), Eo = {
3732
+ ]), $o = {
3702
3733
  property(e, t, i, s) {
3703
- const n = To(s, i, e), r = n?.type === "stringifiedReflected", a = n?.type === "reflected" || r;
3734
+ const n = Po(s, i, e), r = n?.type === "stringifiedReflected", a = n?.type === "reflected" || r;
3704
3735
  if (a) {
3705
- const f = He(t);
3736
+ const f = qe(t);
3706
3737
  if (f === !0)
3707
3738
  return [n.name];
3708
3739
  if (f === !1)
3709
3740
  return [];
3710
3741
  }
3711
- const c = t === void 0 ? ["=", o.factory.createToken(o.SyntaxKind.TrueKeyword)] : Ee(e, t, a), d = c[0] !== "=";
3742
+ const l = t === void 0 ? ["=", o.factory.createToken(o.SyntaxKind.TrueKeyword)] : Ee(e, t, a), d = l[0] !== "=";
3712
3743
  if (a && d)
3713
- return [n.name, ...c];
3714
- const [l, p] = c, m = n?.type === "stringifiedNonReflected";
3744
+ return [n.name, ...l];
3745
+ const [c, p] = l, m = n?.type === "stringifiedNonReflected";
3715
3746
  if (r || m) {
3716
- const f = Ht(
3747
+ const f = Vt(
3717
3748
  p,
3718
3749
  e,
3719
3750
  m ? "" : void 0
3720
- ), h = i === "value" && (s === "input" || s === "textarea" || s === ke) ? Po(f, e) : f;
3751
+ ), h = i === "value" && (s === "input" || s === "textarea" || s === ke) ? Io(f, e) : f;
3721
3752
  if (h !== p)
3722
- return [m ? `.${i}` : n.name, l, h];
3753
+ return [m ? `.${i}` : n.name, c, h];
3723
3754
  }
3724
- return [`.${i}`, ...c];
3755
+ return [`.${i}`, ...l];
3725
3756
  },
3726
3757
  attribute(e, t, i) {
3727
- const s = t === void 0 || He(t);
3758
+ const s = t === void 0 || qe(t);
3728
3759
  if (s === !0)
3729
3760
  return [i];
3730
3761
  if (s === !1)
3731
3762
  return [];
3732
- const n = Ee(e, t, !0), a = n[0] !== "=" ? n : [n[0], Ht(n[1], e)];
3763
+ const n = Ee(e, t, !0), a = n[0] !== "=" ? n : [n[0], Vt(n[1], e)];
3733
3764
  return [i, ...a];
3734
3765
  },
3735
3766
  booleanAttribute(e, t, i) {
3736
- const s = t === void 0 || He(t);
3767
+ const s = t === void 0 || qe(t);
3737
3768
  return s === !0 ? [i] : s === !1 ? [] : [`?${i}`, ...Ee(e, t, !1)];
3738
3769
  },
3739
3770
  event(e, t, i) {
@@ -3741,8 +3772,8 @@ const So = /* @__PURE__ */ new Set([
3741
3772
  throw new Error(
3742
3773
  `Event prop value must be an expression. Found ${String(t?.getText(e.sourceFile))}`
3743
3774
  );
3744
- const s = i.slice(2), n = Ct(s);
3745
- return [`@${gi.has(n) ? s.toLowerCase() : Ct(s)}=`, ...vt(e, t, void 0)];
3775
+ const s = i.slice(2), n = Et(s);
3776
+ return [`@${gi.has(n) ? s.toLowerCase() : Et(s)}=`, ...bt(e, t, void 0)];
3746
3777
  },
3747
3778
  directives(e, t) {
3748
3779
  if (t === void 0 || !o.isJsxExpression(t))
@@ -3758,7 +3789,7 @@ const So = /* @__PURE__ */ new Set([
3758
3789
  throw new Error(
3759
3790
  `Directives prop cannot contain a spread argument - it needs to be statically analyzable. Still, the following are allowed: directives={[directiveA, condition ? a : b, c()]}. Found ${String(t.expression?.getText(e.sourceFile))}`
3760
3791
  );
3761
- return q(e, void 0, n);
3792
+ return H(e, void 0, n);
3762
3793
  });
3763
3794
  },
3764
3795
  ref(e, t) {
@@ -3773,38 +3804,38 @@ const So = /* @__PURE__ */ new Set([
3773
3804
  const n = s ? e.importRenames.stabilizedRef : e.importRenames.ref;
3774
3805
  return [
3775
3806
  o.factory.createCallExpression(o.factory.createIdentifier(n), void 0, [
3776
- q(e, void 0, t.expression)
3807
+ H(e, void 0, t.expression)
3777
3808
  ])
3778
3809
  ];
3779
3810
  },
3780
- class: Vt,
3781
- style: Vt,
3782
- key: (e, t) => [ht(t, e.sourceFile)],
3811
+ class: Xt,
3812
+ style: Xt,
3813
+ key: (e, t) => [yt(t, e.sourceFile)],
3783
3814
  deferLoad(e, t, i, s) {
3784
3815
  if (typeof s != "string")
3785
3816
  throw Error("deferLoad prop is not currently supported on dynamic tag names.");
3786
- if (!dt(s))
3817
+ if (!pt(s))
3787
3818
  throw Error(`deferLoad prop is only supported on custom elements. Found ${String(s)}`);
3788
3819
  e.neededImports.add("deferLoad");
3789
3820
  const n = e.importRenames.deferLoad;
3790
3821
  return [o.factory.createIdentifier(n)];
3791
3822
  }
3792
3823
  };
3793
- function To(e, t, i) {
3824
+ function Po(e, t, i) {
3794
3825
  if (typeof e == "string") {
3795
3826
  const r = (i.externalComponents[e] ?? i.localComponents[e])?.propToAttribute?.[t];
3796
3827
  if (r !== void 0)
3797
3828
  return { name: r, type: "reflected" };
3798
3829
  }
3799
- const s = ze(W.common, t);
3830
+ const s = ze(U.common, t);
3800
3831
  if (s !== void 0)
3801
3832
  return s;
3802
3833
  if (typeof e == "string") {
3803
- const n = ze(W.perElement[e], t);
3834
+ const n = ze(U.perElement[e], t);
3804
3835
  if (n !== void 0)
3805
3836
  return n;
3806
3837
  } else {
3807
- const n = Object.values(W.perElement).map(
3838
+ const n = Object.values(U.perElement).map(
3808
3839
  (a) => ze(a, t)
3809
3840
  ), r = Xe(n, (a) => a?.type === "stringifiedNonReflected" ? a : void 0) ?? Xe(n, (a) => a?.type === "stringifiedReflected" ? a : void 0);
3810
3841
  if (r !== void 0)
@@ -3822,14 +3853,14 @@ function ze(e, t) {
3822
3853
  if (n !== void 0)
3823
3854
  return { name: n, type: "stringifiedNonReflected" };
3824
3855
  }
3825
- function ht(e, t) {
3856
+ function yt(e, t) {
3826
3857
  if (e !== void 0 && o.isJsxExpression(e) && e.expression !== void 0)
3827
3858
  return e.expression;
3828
3859
  if (e !== void 0 && o.isStringLiteral(e))
3829
3860
  return e;
3830
3861
  throw new Error(`key prop value must be an expression. Found ${String(e?.getText(t))}`);
3831
3862
  }
3832
- function He(e) {
3863
+ function qe(e) {
3833
3864
  if (e === void 0)
3834
3865
  return !0;
3835
3866
  if (o.isJsxExpression(e)) {
@@ -3845,10 +3876,10 @@ function Ee(e, t, i = !1) {
3845
3876
  `Invalid JSX syntax detected or there is a bug in Lumina. Found ${t.getText(e.sourceFile)}. Expected JSX attribute value to be wrapped in { }`
3846
3877
  );
3847
3878
  if (o.isStringLiteral(t))
3848
- return qt(t, i);
3879
+ return Gt(t, i);
3849
3880
  if (o.isJsxExpression(t) && t.expression) {
3850
3881
  if (o.isStringLiteral(t.expression))
3851
- return qt(t.expression, i);
3882
+ return Gt(t.expression, i);
3852
3883
  if (i) {
3853
3884
  if (o.isNumericLiteral(t.expression))
3854
3885
  return [`=${t.expression.text}`];
@@ -3856,16 +3887,16 @@ function Ee(e, t, i = !1) {
3856
3887
  return [`=${t.expression.getText(e.sourceFile)}`];
3857
3888
  }
3858
3889
  }
3859
- return ["=", ...vt(e, t, void 0)];
3890
+ return ["=", ...bt(e, t, void 0)];
3860
3891
  }
3861
- function qt(e, t) {
3892
+ function Gt(e, t) {
3862
3893
  if (!t)
3863
3894
  return ["=", e];
3864
3895
  const i = e.text;
3865
3896
  if (i.length === 0)
3866
3897
  return [];
3867
3898
  const s = hi(i);
3868
- if (or(s)) {
3899
+ if (nr(s)) {
3869
3900
  const n = s.replaceAll('"', "&#34;");
3870
3901
  if (n.length > s.length) {
3871
3902
  const r = s.replaceAll("'", "&#39;");
@@ -3876,7 +3907,7 @@ function qt(e, t) {
3876
3907
  } else
3877
3908
  return [`=${s}`];
3878
3909
  }
3879
- function Vt(e, t, i) {
3910
+ function Xt(e, t, i) {
3880
3911
  if (t !== void 0 && o.isStringLiteral(t))
3881
3912
  return [`${i}="${t.text}"`];
3882
3913
  if (t === void 0 || !o.isJsxExpression(t) || t.expression === void 0)
@@ -3884,28 +3915,28 @@ function Vt(e, t, i) {
3884
3915
  `${i} prop value must be an expression. Found ${String(t?.getText(e.sourceFile))}`
3885
3916
  );
3886
3917
  const s = t.expression;
3887
- if ($o(s)) {
3918
+ if (ko(s)) {
3888
3919
  const r = i === "class" ? "safeClassMap" : "safeStyleMap";
3889
3920
  e.neededImports.add(r);
3890
- const a = e.importRenames[r], c = o.factory.createCallExpression(o.factory.createIdentifier(a), void 0, [
3891
- q(e, void 0, s)
3921
+ const a = e.importRenames[r], l = o.factory.createCallExpression(o.factory.createIdentifier(a), void 0, [
3922
+ H(e, void 0, s)
3892
3923
  ]);
3893
- return [`${i}=`, c];
3924
+ return [`${i}=`, l];
3894
3925
  } else
3895
3926
  return [i, ...Ee(e, t, !0)];
3896
3927
  }
3897
- const $o = (e) => o.isObjectLiteralExpression(e) || o.isPropertyAccessExpression(e) || o.isIdentifier(e) || o.isCallExpression(e) || o.isBinaryExpression(e) || o.isConditionalExpression(e);
3898
- function Po(e, t) {
3928
+ const ko = (e) => o.isObjectLiteralExpression(e) || o.isPropertyAccessExpression(e) || o.isIdentifier(e) || o.isCallExpression(e) || o.isBinaryExpression(e) || o.isConditionalExpression(e);
3929
+ function Io(e, t) {
3899
3930
  t.neededImports.add("live");
3900
3931
  const i = t.importRenames.live;
3901
3932
  return o.factory.createCallExpression(o.factory.createIdentifier(i), void 0, [
3902
3933
  typeof e == "string" ? o.factory.createStringLiteral(e) : e
3903
3934
  ]);
3904
3935
  }
3905
- function ko(e) {
3906
- if (e && o.isJsxExpression(e) && e.expression && o.isCallExpression(e.expression) && o.isIdentifier(e.expression.expression) && e.expression.expression.text in Gt && e.expression.arguments.length <= 1)
3936
+ function xo(e) {
3937
+ if (e && o.isJsxExpression(e) && e.expression && o.isCallExpression(e.expression) && o.isIdentifier(e.expression.expression) && e.expression.expression.text in Yt && e.expression.arguments.length <= 1)
3907
3938
  return {
3908
- propType: Gt[e.expression.expression.text],
3939
+ propType: Yt[e.expression.expression.text],
3909
3940
  // To simplify checking logic in convertProps, wrap expression in JSX expression
3910
3941
  initializer: o.factory.createJsxExpression(
3911
3942
  void 0,
@@ -3914,21 +3945,21 @@ function ko(e) {
3914
3945
  )
3915
3946
  };
3916
3947
  }
3917
- const Gt = {
3948
+ const Yt = {
3918
3949
  bindProperty: "property",
3919
3950
  bindAttribute: "attribute",
3920
3951
  bindBooleanAttribute: "booleanAttribute",
3921
3952
  bindEvent: "event"
3922
3953
  };
3923
- function Io(e, t, i) {
3924
- return Ao.has(e) ? e : e.startsWith("on") && t !== void 0 && o.isJsxExpression(t) && t.expression !== void 0 ? "event" : ui.has(e) || e.includes("-") ? "attribute" : !dt(i) && (mi.has(e) || (i === Ye ? !1 : i === ke ? (
3954
+ function Ao(e, t, i) {
3955
+ return No.has(e) ? e : e.startsWith("on") && t !== void 0 && o.isJsxExpression(t) && t.expression !== void 0 ? "event" : ui.has(e) || e.includes("-") ? "attribute" : !pt(i) && (mi.has(e) || (i === Ye ? !1 : i === ke ? (
3925
3956
  // When tag name is dynamic, we can't help but check if the prop name matches an "always attribute" in any html element
3926
3957
  Object.values(Qe).some((r) => r.has(e))
3927
- ) : Qe[i]?.has(e) === !0)) ? Pt.has(e) ? "booleanAttribute" : "attribute" : i === "svg" || i === "math" || i === Ye || i !== ke && (ct.has(i) || lt.has(i)) ? e in W.common.reflected || e in W.common.stringifiedReflected || e in W.common.stringifiedNonReflected ? "property" : Pt.has(e) ? "booleanAttribute" : "attribute" : "property";
3958
+ ) : Qe[i]?.has(e) === !0)) ? kt.has(e) ? "booleanAttribute" : "attribute" : i === "svg" || i === "math" || i === Ye || i !== ke && (lt.has(i) || dt.has(i)) ? e in U.common.reflected || e in U.common.stringifiedReflected || e in U.common.stringifiedNonReflected ? "property" : kt.has(e) ? "booleanAttribute" : "attribute" : "property";
3928
3959
  }
3929
- const xo = ["class", "style", "ref", "directives", "key", "deferLoad"], Ao = new Set(xo), Lo = (e) => typeof e != "string" || e.trim().length > 0;
3960
+ const Lo = ["class", "style", "ref", "directives", "key", "deferLoad"], No = new Set(Lo), jo = (e) => typeof e != "string" || e.trim().length > 0;
3930
3961
  function Oe({ key: e, parts: t, litTag: i }, s) {
3931
- const n = No(t);
3962
+ const n = Fo(t);
3932
3963
  if (n.length % 2 === 0)
3933
3964
  throw new Error("Normalized template parts array length must be odd");
3934
3965
  const [r, ...a] = n;
@@ -3936,24 +3967,24 @@ function Oe({ key: e, parts: t, litTag: i }, s) {
3936
3967
  throw new Error("First normalized template part must be a string");
3937
3968
  if (i === void 0) {
3938
3969
  if (a.length === 0)
3939
- return qe(s, e, o.factory.createStringLiteral(r));
3970
+ return He(s, e, o.factory.createStringLiteral(r));
3940
3971
  if (r === "" && a.length === 2 && a[1] === "")
3941
- return qe(
3972
+ return He(
3942
3973
  s,
3943
3974
  e,
3944
3975
  typeof a[0] == "string" ? o.factory.createStringLiteral(r) : a[0]
3945
3976
  );
3946
3977
  }
3947
- const c = typeof i == "string" ? i : ce;
3948
- s.neededImports.add(c);
3949
- const d = s.importRenames[c], l = o.factory.createTaggedTemplateExpression(
3978
+ const l = typeof i == "string" ? i : ce;
3979
+ s.neededImports.add(l);
3980
+ const d = s.importRenames[l], c = o.factory.createTaggedTemplateExpression(
3950
3981
  o.factory.createIdentifier(d),
3951
3982
  void 0,
3952
- a.length === 0 ? o.factory.createNoSubstitutionTemplateLiteral(r) : o.factory.createTemplateExpression(o.factory.createTemplateHead(r), jo(a))
3983
+ a.length === 0 ? o.factory.createNoSubstitutionTemplateLiteral(r) : o.factory.createTemplateExpression(o.factory.createTemplateHead(r), Do(a))
3953
3984
  );
3954
- return qe(s, e, l);
3985
+ return He(s, e, c);
3955
3986
  }
3956
- const No = (e) => e.reduce(
3987
+ const Fo = (e) => e.reduce(
3957
3988
  (t, i, s) => {
3958
3989
  const n = t.at(-1), r = typeof n == "string", a = typeof i == "string";
3959
3990
  if (r && a)
@@ -3963,7 +3994,7 @@ const No = (e) => e.reduce(
3963
3994
  },
3964
3995
  [""]
3965
3996
  );
3966
- function jo(e) {
3997
+ function Do(e) {
3967
3998
  if (!(e.length % 2 === 0))
3968
3999
  throw new Error("templatePartsToSpans should be called with normalized parts array without the first item");
3969
4000
  const i = e.length / 2;
@@ -3971,17 +4002,17 @@ function jo(e) {
3971
4002
  const r = n * 2, a = e[r];
3972
4003
  if (typeof a == "string")
3973
4004
  throw new Error("Expected to receive a normalized array of parts");
3974
- const c = r + 1, d = e[c];
4005
+ const l = r + 1, d = e[l];
3975
4006
  if (typeof d != "string")
3976
4007
  throw new Error("Expected to receive a normalized array of parts");
3977
- const l = n === i - 1;
4008
+ const c = n === i - 1;
3978
4009
  return o.factory.createTemplateSpan(
3979
4010
  a,
3980
- l ? o.factory.createTemplateTail(d) : o.factory.createTemplateMiddle(d)
4011
+ c ? o.factory.createTemplateTail(d) : o.factory.createTemplateMiddle(d)
3981
4012
  );
3982
4013
  });
3983
4014
  }
3984
- function qe(e, t, i) {
4015
+ function He(e, t, i) {
3985
4016
  if (t === void 0)
3986
4017
  return i;
3987
4018
  e.neededImports.add("keyed");
@@ -3990,7 +4021,7 @@ function qe(e, t, i) {
3990
4021
  }
3991
4022
  const rs = (e, t) => e.getFullText(t.sourceFile).slice(0, e.getLeadingTriviaWidth(t.sourceFile));
3992
4023
  function ns(e, t) {
3993
- const i = yt(e);
4024
+ const i = vt(e);
3994
4025
  return i.length === 0 ? t : o.setSyntheticLeadingComments(
3995
4026
  t,
3996
4027
  i.map((s) => ({
@@ -4001,22 +4032,22 @@ function ns(e, t) {
4001
4032
  }))
4002
4033
  );
4003
4034
  }
4004
- const yt = (e) => e.trim().length === 0 ? [] : o.getLeadingCommentRanges(e, 0) ?? [];
4005
- function Fo(e) {
4006
- const t = yt(e);
4035
+ const vt = (e) => e.trim().length === 0 ? [] : o.getLeadingCommentRanges(e, 0) ?? [];
4036
+ function Ro(e) {
4037
+ const t = vt(e);
4007
4038
  if (t.length === 0)
4008
4039
  return [e || " "];
4009
4040
  const i = t.reduceRight(
4010
4041
  ([n, ...r], a) => {
4011
- const c = Ro(n), d = os(c.slice(a.pos, a.end));
4042
+ const l = Oo(n), d = os(l.slice(a.pos, a.end));
4012
4043
  return [
4013
- c.slice(0, a.pos),
4044
+ l.slice(0, a.pos),
4014
4045
  /**
4015
4046
  * Literal values (like this) in place of directives are ignored by Lit:
4016
4047
  * https://github.com/lit/lit/blob/56cb2ca4a86f2c7f6af757c612f05e50d1966615/packages/lit-html/src/lit-html.ts#L1111
4017
4048
  */
4018
4049
  o.factory.createNoSubstitutionTemplateLiteral(d),
4019
- c.slice(a.end),
4050
+ l.slice(a.end),
4020
4051
  ...r
4021
4052
  ];
4022
4053
  },
@@ -4027,12 +4058,12 @@ function Fo(e) {
4027
4058
  return (typeof s != "string" || s.trim() !== "") && i.push(" "), i;
4028
4059
  }
4029
4060
  const os = (e) => e.startsWith("//") ? e.slice(2) : e.slice(2, -2);
4030
- function Ro(e) {
4061
+ function Oo(e) {
4031
4062
  if (typeof e == "string")
4032
4063
  return e;
4033
4064
  throw new Error(`Expected string, got ${typeof e}: ${String(e)}`);
4034
4065
  }
4035
- function Do(e, t) {
4066
+ function Mo(e, t) {
4036
4067
  if (!(o.isPropertyAccessExpression(t.expression) && t.expression.name.text === "map"))
4037
4068
  return t;
4038
4069
  const s = t.arguments[0];
@@ -4042,31 +4073,31 @@ function Do(e, t) {
4042
4073
  if (!(typeof r == "object" && // If .map() callback has 3rd argument, it's not supported
4043
4074
  s.parameters.length <= 2))
4044
4075
  return t;
4045
- const c = ge(s.body);
4046
- let d = !0, l;
4047
- if (Xt(c))
4048
- l = c;
4076
+ const l = ge(s.body);
4077
+ let d = !0, c;
4078
+ if (Qt(l))
4079
+ c = l;
4049
4080
  else {
4050
- if (!o.isBlock(c))
4081
+ if (!o.isBlock(l))
4051
4082
  return t;
4052
- const v = c.statements.at(-1);
4083
+ const v = l.statements.at(-1);
4053
4084
  if (!(v && o.isReturnStatement(v) && v.expression))
4054
4085
  return t;
4055
- const C = ge(v.expression);
4056
- if (!Xt(C))
4086
+ const S = ge(v.expression);
4087
+ if (!Qt(S))
4057
4088
  return t;
4058
- const E = c.statements.slice(0, -1);
4059
- if (E.some(as))
4089
+ const T = l.statements.slice(0, -1);
4090
+ if (T.some(as))
4060
4091
  return t;
4061
- d = E.length === 0, l = C;
4092
+ d = T.length === 0, c = S;
4062
4093
  }
4063
- const p = o.isJsxElement(l) ? l.openingElement : l, m = us(p);
4094
+ const p = o.isJsxElement(c) ? c.openingElement : c, m = us(p);
4064
4095
  if (m === -1)
4065
4096
  return t;
4066
4097
  const f = p.attributes.properties[m];
4067
4098
  if (f === void 0 || !o.isJsxAttribute(f))
4068
4099
  return t;
4069
- const g = ht(f.initializer, e.sourceFile), h = Oo(r, s, g, d, e);
4100
+ const g = yt(f.initializer, e.sourceFile), h = Jo(r, s, g, d, e);
4070
4101
  if (h === void 0)
4071
4102
  return t;
4072
4103
  e.liftedKeys.add(f.name), e.neededImports.add("repeat");
@@ -4084,11 +4115,11 @@ function Do(e, t) {
4084
4115
  s.parameters,
4085
4116
  s.type,
4086
4117
  s.equalsGreaterThanToken,
4087
- c
4118
+ l
4088
4119
  )
4089
4120
  ]);
4090
4121
  }
4091
- const Xt = (e) => o.isJsxElement(e) || o.isJsxSelfClosingElement(e);
4122
+ const Qt = (e) => o.isJsxElement(e) || o.isJsxSelfClosingElement(e);
4092
4123
  function as(e) {
4093
4124
  if (o.isReturnStatement(e))
4094
4125
  return !0;
@@ -4099,15 +4130,15 @@ function as(e) {
4099
4130
  void 0
4100
4131
  ), t;
4101
4132
  }
4102
- function Oo(e, t, i, s, n) {
4103
- const r = J(i);
4133
+ function Jo(e, t, i, s, n) {
4134
+ const r = B(i);
4104
4135
  if (r === void 0)
4105
4136
  return;
4106
4137
  let a = cs(e.name, r);
4107
- const c = t.parameters.at(1);
4108
- if (c !== void 0 && o.isIdentifier(c.name) && // A more basic check is also provided in lumina/no-unnecessary-key rule
4109
- r.every(Fe, c.name)) {
4110
- T.warn(
4138
+ const l = t.parameters.at(1);
4139
+ if (l !== void 0 && o.isIdentifier(l.name) && // A more basic check is also provided in lumina/no-unnecessary-key rule
4140
+ r.every(Fe, l.name)) {
4141
+ $.warn(
4111
4142
  "@arcgis/lumina:jsxToLitHtml",
4112
4143
  "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.",
4113
4144
  n.sourceFile.fileName
@@ -4115,7 +4146,7 @@ function Oo(e, t, i, s, n) {
4115
4146
  return;
4116
4147
  }
4117
4148
  if (!s) {
4118
- const d = Jo(r, a, t);
4149
+ const d = Ko(r, a, t);
4119
4150
  if (d === void 0)
4120
4151
  return;
4121
4152
  a = d;
@@ -4131,38 +4162,38 @@ function Oo(e, t, i, s, n) {
4131
4162
  e.initializer
4132
4163
  );
4133
4164
  }
4134
- function J(e) {
4165
+ function B(e) {
4135
4166
  if (o.isIdentifier(e))
4136
4167
  return [e.text];
4137
4168
  if (o.isPropertyAccessExpression(e))
4138
- return J(e.expression);
4169
+ return B(e.expression);
4139
4170
  if (o.isElementAccessExpression(e))
4140
- return J(e.argumentExpression);
4171
+ return B(e.argumentExpression);
4141
4172
  if (o.isConditionalExpression(e)) {
4142
- const t = J(e.condition), i = J(e.whenTrue), s = J(e.whenFalse);
4173
+ const t = B(e.condition), i = B(e.whenTrue), s = B(e.whenFalse);
4143
4174
  return t === void 0 || i === void 0 || s === void 0 ? void 0 : [...t, ...i, ...s];
4144
4175
  } else if (o.isBinaryExpression(e)) {
4145
- const t = J(e.left), i = J(e.right);
4176
+ const t = B(e.left), i = B(e.right);
4146
4177
  return t === void 0 || i === void 0 ? void 0 : [...t, ...i];
4147
4178
  } else if (o.isTemplateExpression(e)) {
4148
4179
  const t = [];
4149
4180
  for (const i of e.templateSpans) {
4150
- const s = J(i.expression);
4181
+ const s = B(i.expression);
4151
4182
  if (s === void 0)
4152
4183
  return;
4153
4184
  t.push(...s);
4154
4185
  }
4155
4186
  return t;
4156
4187
  } else {
4157
- if (Mo.has(e.kind))
4188
+ if (Bo.has(e.kind))
4158
4189
  return [];
4159
4190
  {
4160
4191
  const t = ge(e);
4161
- return t !== e ? J(t) : void 0;
4192
+ return t !== e ? B(t) : void 0;
4162
4193
  }
4163
4194
  }
4164
4195
  }
4165
- const Mo = /* @__PURE__ */ new Set([
4196
+ const Bo = /* @__PURE__ */ new Set([
4166
4197
  o.SyntaxKind.NumericLiteral,
4167
4198
  o.SyntaxKind.BigIntLiteral,
4168
4199
  o.SyntaxKind.StringLiteral,
@@ -4171,12 +4202,12 @@ const Mo = /* @__PURE__ */ new Set([
4171
4202
  o.SyntaxKind.FalseKeyword,
4172
4203
  o.SyntaxKind.NullKeyword,
4173
4204
  o.SyntaxKind.TrueKeyword
4174
- ]), ge = (e) => o.isAsExpression(e) || o.isNonNullExpression(e) || o.isSatisfiesExpression(e) || o.isParenthesizedExpression(e) ? ge(e.expression) : e, cs = (e, t) => o.isObjectBindingPattern(e) ? _o(e, t) : e;
4175
- function Jo(e, t, i) {
4205
+ ]), ge = (e) => o.isAsExpression(e) || o.isNonNullExpression(e) || o.isSatisfiesExpression(e) || o.isParenthesizedExpression(e) ? ge(e.expression) : e, cs = (e, t) => o.isObjectBindingPattern(e) ? Wo(e, t) : e;
4206
+ function Ko(e, t, i) {
4176
4207
  if (e.every(Fe, t))
4177
4208
  return t;
4178
4209
  if (o.isIdentifier(t)) {
4179
- const s = o.isBlock(i.body) ? Xe(i.body.statements, (r) => Bo(r, t)) : void 0;
4210
+ const s = o.isBlock(i.body) ? Xe(i.body.statements, (r) => _o(r, t)) : void 0;
4180
4211
  if (s === void 0)
4181
4212
  return;
4182
4213
  const n = cs(s, e);
@@ -4184,7 +4215,7 @@ function Jo(e, t, i) {
4184
4215
  return n;
4185
4216
  }
4186
4217
  }
4187
- function Bo(e, t) {
4218
+ function _o(e, t) {
4188
4219
  if (!o.isVariableStatement(e) || !(e.declarationList.flags & o.NodeFlags.Const))
4189
4220
  return;
4190
4221
  const i = e.declarationList.declarations[0];
@@ -4192,28 +4223,28 @@ function Bo(e, t) {
4192
4223
  }
4193
4224
  function Fe(e) {
4194
4225
  const t = this;
4195
- return o.isIdentifier(t) ? t.text === e : t.elements.some(Ko, e);
4226
+ return o.isIdentifier(t) ? t.text === e : t.elements.some(Uo, e);
4196
4227
  }
4197
- function Ko(e) {
4228
+ function Uo(e) {
4198
4229
  const t = this;
4199
4230
  return o.isOmittedExpression(e) ? !1 : Fe.call(e.name, t);
4200
4231
  }
4201
- function _o(e, t) {
4232
+ function Wo(e, t) {
4202
4233
  let i = !1;
4203
4234
  const s = e.elements.filter((n) => o.isIdentifier(n.name) ? t.includes(n.name.text) : (i = !0, !0));
4204
4235
  return i || s.length === 0 ? e : o.factory.updateObjectBindingPattern(e, s);
4205
4236
  }
4206
4237
  const ls = (e, t) => t.liftedKeys.has(e);
4207
- function q(e, t, i) {
4238
+ function H(e, t, i) {
4208
4239
  if (fe(i))
4209
4240
  return ds(e, i);
4210
- const s = o.isCallExpression(i) ? Do(e, i) : i, n = o.visitEachChild(
4241
+ const s = o.isCallExpression(i) ? Mo(e, i) : i, n = o.visitEachChild(
4211
4242
  s,
4212
4243
  // Do not add "" if parent is binary expression to not turn {(a && <b />) || c} into {(a && <b />) || "" || c}
4213
- q.bind(null, e, t !== void 0 && o.isBinaryExpression(t) ? void 0 : i),
4244
+ H.bind(null, e, t !== void 0 && o.isBinaryExpression(t) ? void 0 : i),
4214
4245
  e.transformationContext
4215
4246
  );
4216
- return t !== void 0 && o.isBinaryExpression(i) && (o.isJsxExpression(t) || fe(ge(i.right)) || gr(i.right)) ? zo(n) : n;
4247
+ return t !== void 0 && o.isBinaryExpression(i) && (o.isJsxExpression(t) || fe(ge(i.right)) || fr(i.right)) ? Ho(n) : n;
4217
4248
  }
4218
4249
  function ds(e, t) {
4219
4250
  const i = ps(e, t);
@@ -4227,17 +4258,17 @@ function ps(e, t) {
4227
4258
  if (o.isJsxNamespacedName(r))
4228
4259
  throw Error(`JSX namespaced elements are not supported. Found ${r.getText(e.sourceFile)} `);
4229
4260
  if (!o.isIdentifier(r) || !r.text.startsWith(r.text[0].toLowerCase()) && r.text !== Be && r.text !== Ke) {
4230
- const S = o.isIdentifier(r) && r.text === Zs ? Te(i, e) : {
4261
+ const C = o.isIdentifier(r) && r.text === Qs ? Te(i, e) : {
4231
4262
  // No need to wrap the function call in a lit-html tag
4232
4263
  litTag: void 0,
4233
- parts: [Uo(e, t, r, i)]
4264
+ parts: [qo(e, t, r, i)]
4234
4265
  };
4235
4266
  return {
4236
- key: Wo(n, e),
4237
- ...S
4267
+ key: zo(n, e),
4268
+ ...C
4238
4269
  };
4239
4270
  }
4240
- const c = r.text === Be ? ke : r.text === Ke ? Ye : r.text, d = r.text === Be ? ae : r.text === Ke ? Y : tr.has(c) ? yi : ct.has(c) ? se : ce, l = dt(c), p = l ? e.localComponents[c]?.requiredProperties : void 0, m = p === void 0 ? void 0 : new Set(p);
4271
+ const l = r.text === Be ? ke : r.text === Ke ? Ye : r.text, d = r.text === Be ? ae : r.text === Ke ? X : er.has(l) ? yi : lt.has(l) ? se : ce, c = pt(l), p = c ? e.localComponents[l]?.requiredProperties : void 0, m = p === void 0 ? void 0 : new Set(p);
4241
4272
  let f;
4242
4273
  const g = [];
4243
4274
  let h = !1;
@@ -4247,43 +4278,43 @@ function ps(e, t) {
4247
4278
  `JSX spread attribute syntax is not supported. See alternatives: https://webgis.esri.com/references/lumina/jsx#spread-attributes
4248
4279
  Found ${x.getText(e.sourceFile)}`
4249
4280
  );
4250
- const { name: S, initializer: A } = x;
4251
- if (o.isJsxNamespacedName(S))
4252
- throw Error(`JSX namespaced attributes are not supported. Found ${S.getText(e.sourceFile)}`);
4253
- const L = S.text, U = ko(A), F = U?.propType ?? Io(L, A, c);
4254
- m?.delete(L);
4255
- const N = Eo[F](e, U?.initializer ?? A, L, c);
4281
+ const { name: C, initializer: L } = x;
4282
+ if (o.isJsxNamespacedName(C))
4283
+ throw Error(`JSX namespaced attributes are not supported. Found ${C.getText(e.sourceFile)}`);
4284
+ const A = C.text, M = xo(L), j = M?.propType ?? Ao(A, L, l);
4285
+ m?.delete(A);
4286
+ const N = $o[j](e, M?.initializer ?? L, A, l);
4256
4287
  if (N.length === 0)
4257
4288
  return [];
4258
- const B = e.compiler.shouldMinifyJsx ? [" "] : Fo(rs(S, e));
4259
- return F === "key" ? (f = typeof N[0] == "object" && !ls(S, e) ? N[0] : void 0, B.some(Lo) ? B : []) : F === "directives" || F === "ref" || L === "deferLoad" ? (h ||= F === "deferLoad", g.push(
4260
- ...B,
4289
+ const K = e.compiler.shouldMinifyJsx ? [" "] : Ro(rs(C, e));
4290
+ return j === "key" ? (f = typeof N[0] == "object" && !ls(C, e) ? N[0] : void 0, K.some(jo) ? K : []) : j === "directives" || j === "ref" || A === "deferLoad" ? (h ||= j === "deferLoad", g.push(
4291
+ ...K,
4261
4292
  ...N.flatMap(
4262
- (D, M) => typeof D == "string" || M === 0 || typeof N[M - 1] == "string" ? D : [" ", D]
4293
+ (R, J) => typeof R == "string" || J === 0 || typeof N[J - 1] == "string" ? R : [" ", R]
4263
4294
  )
4264
- ), []) : [...B, ...N];
4295
+ ), []) : [...K, ...N];
4265
4296
  });
4266
4297
  if (m !== void 0 && m.size > 0 && e.compiler.logLintError(
4267
4298
  "mustIncludeAllRequiredProperties",
4268
4299
  e.sourceFile.fileName,
4269
- `Missing required properties for <${c}> }: ${Array.from(m).join(", ")}`
4270
- ), g.length > 0 && y.push(...g), typeof c == "string" && lt.has(c))
4300
+ `Missing required properties for <${l}> }: ${Array.from(m).join(", ")}`
4301
+ ), g.length > 0 && y.push(...g), typeof l == "string" && dt.has(l))
4271
4302
  throw Error(
4272
- `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`
4303
+ `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`
4273
4304
  );
4274
- l && (h ? e.customElementsToImportDeferred.add(c) : e.customElementsToImport.add(c));
4275
- const v = typeof c == "string" && er.has(c), w = Te(i, e);
4305
+ c && (h ? e.customElementsToImportDeferred.add(l) : e.customElementsToImport.add(l));
4306
+ const v = typeof l == "string" && Zs.has(l), w = Te(i, e);
4276
4307
  if (v && w.parts.length > 0)
4277
4308
  throw Error(
4278
- `Void HTML elements like <${c}> cannot have children. Found ${t.getText(e.sourceFile)}`
4309
+ `Void HTML elements like <${l}> cannot have children. Found ${t.getText(e.sourceFile)}`
4279
4310
  );
4280
- const C = (d === se || d === Y) && w.parts.length === 0, E = [
4311
+ const S = (d === se || d === X) && w.parts.length === 0, T = [
4281
4312
  "<",
4282
- typeof c == "string" ? c : r,
4313
+ typeof l == "string" ? l : r,
4283
4314
  ...y,
4284
- C ? `${y.length === 0 ? "" : " "}/>` : ">"
4285
- ], P = v || C ? E : [
4286
- ...E,
4315
+ S ? `${y.length === 0 ? "" : " "}/>` : ">"
4316
+ ], E = v || S ? T : [
4317
+ ...T,
4287
4318
  /**
4288
4319
  * If parent was an HTML element (e.g. `<svg>`), but children are SVG
4289
4320
  * fragments (e.g. `<circle />`, then wrap the children in their own
@@ -4291,47 +4322,47 @@ Found ${x.getText(e.sourceFile)}`
4291
4322
  */
4292
4323
  ...w.litTag !== void 0 && w.litTag !== d ? [Oe({ key: void 0, ...w }, e)] : w.parts,
4293
4324
  "</",
4294
- typeof c == "string" ? c : r,
4325
+ typeof l == "string" ? l : r,
4295
4326
  ">"
4296
4327
  ];
4297
- return { key: f, parts: P, litTag: d };
4328
+ return { key: f, parts: E, litTag: d };
4298
4329
  }
4299
- function Wo(e, t) {
4330
+ function zo(e, t) {
4300
4331
  const i = e.attributes.properties[us(e)];
4301
- return i && o.isJsxAttribute(i) && !ls(i.name, t) ? ht(i.initializer, t.sourceFile) : void 0;
4332
+ return i && o.isJsxAttribute(i) && !ls(i.name, t) ? yt(i.initializer, t.sourceFile) : void 0;
4302
4333
  }
4303
4334
  const us = (e) => e.attributes.properties.findIndex(({ name: t }) => t && o.isIdentifier(t) && t.text === "key");
4304
- function Uo(e, t, i, s) {
4335
+ function qo(e, t, i, s) {
4305
4336
  const r = (o.isJsxElement(t) ? t.openingElement : t).attributes.properties.map((d) => {
4306
4337
  if (o.isJsxSpreadAttribute(d))
4307
4338
  return ns(rs(d, e), o.factory.createSpreadAssignment(d.expression));
4308
- const { name: l, initializer: p } = d;
4309
- if (o.isJsxNamespacedName(l))
4310
- throw Error(`JSX namespaced attributes are not supported. Found ${l.getText(e.sourceFile)}`);
4311
- if (l.text === "key")
4339
+ const { name: c, initializer: p } = d;
4340
+ if (o.isJsxNamespacedName(c))
4341
+ throw Error(`JSX namespaced attributes are not supported. Found ${c.getText(e.sourceFile)}`);
4342
+ if (c.text === "key")
4312
4343
  return;
4313
- const m = p === void 0 ? o.factory.createTrue() : o.isStringLiteral(p) ? p : fe(p) ? ds(e, p) : q(e, void 0, p.expression ?? o.factory.createIdentifier("undefined")), f = li(l.text) ? o.factory.createStringLiteral(l.text) : l;
4344
+ const m = p === void 0 ? o.factory.createTrue() : o.isStringLiteral(p) ? p : fe(p) ? ds(e, p) : H(e, void 0, p.expression ?? o.factory.createIdentifier("undefined")), f = li(c.text) ? o.factory.createStringLiteral(c.text) : c;
4314
4345
  return o.factory.createPropertyAssignment(f, m);
4315
- }), { parts: a, litTag: c } = Te(s, e);
4346
+ }), { parts: a, litTag: l } = Te(s, e);
4316
4347
  return a.length > 0 && r.push(
4317
4348
  o.factory.createPropertyAssignment(
4318
4349
  o.factory.createIdentifier("children"),
4319
- Oe({ key: void 0, parts: a, litTag: c }, e)
4350
+ Oe({ key: void 0, parts: a, litTag: l }, e)
4320
4351
  )
4321
4352
  ), o.factory.createCallExpression(i, void 0, [
4322
- o.factory.createObjectLiteralExpression(r.filter(R))
4353
+ o.factory.createObjectLiteralExpression(r.filter(F))
4323
4354
  ]);
4324
4355
  }
4325
4356
  function Te(e, t) {
4326
4357
  let i;
4327
4358
  const s = e.flatMap((n) => {
4328
4359
  if (o.isJsxText(n))
4329
- return [t.compiler.shouldMinifyJsx ? sr(n.text) : n.text];
4360
+ return [t.compiler.shouldMinifyJsx ? ir(n.text) : n.text];
4330
4361
  if (o.isJsxExpression(n))
4331
- return vt(t, n, n);
4362
+ return bt(t, n, n);
4332
4363
  {
4333
4364
  const r = ps(t, n);
4334
- if (r.key === void 0 && r.litTag !== ae && r.litTag !== Y) {
4365
+ if (r.key === void 0 && r.litTag !== ae && r.litTag !== X) {
4335
4366
  if (r.litTag === yi)
4336
4367
  return r.parts;
4337
4368
  if (i !== void 0 && r.litTag !== void 0 && i !== r.litTag)
@@ -4345,19 +4376,19 @@ function Te(e, t) {
4345
4376
  });
4346
4377
  return { litTag: i, parts: s };
4347
4378
  }
4348
- function zo(e) {
4379
+ function Ho(e) {
4349
4380
  return e.operatorToken.kind === o.SyntaxKind.AmpersandAmpersandToken ? o.factory.createBinaryExpression(
4350
4381
  e,
4351
4382
  o.factory.createToken(o.SyntaxKind.BarBarToken),
4352
4383
  o.factory.createStringLiteral("")
4353
4384
  ) : e;
4354
4385
  }
4355
- function vt(e, t, i) {
4386
+ function bt(e, t, i) {
4356
4387
  if (t.expression === void 0) {
4357
4388
  if (e.compiler.shouldMinifyJsx)
4358
4389
  return [];
4359
4390
  const s = t.getText(e.sourceFile).slice(1, -1);
4360
- return yt(s).length === 0 ? [] : [ns(s, o.factory.createIdentifier("undefined"))];
4391
+ return vt(s).length === 0 ? [] : [ns(s, o.factory.createIdentifier("undefined"))];
4361
4392
  }
4362
4393
  return o.isStringLiteral(t.expression) ? [hi(t.expression.text)] : (
4363
4394
  /**
@@ -4380,7 +4411,7 @@ function vt(e, t, i) {
4380
4411
  * making this change useless.
4381
4412
  */
4382
4413
  e.compiler.viteCommand === "serve" && e.compiler.viteConfig.build.sourcemap !== !1 && !e.compiler.shouldMinifyJsx && o.isArrowFunction(t.expression) && !o.isBlock(t.expression.body) ? [
4383
- q(
4414
+ H(
4384
4415
  e,
4385
4416
  i,
4386
4417
  o.factory.updateArrowFunction(
@@ -4393,7 +4424,7 @@ function vt(e, t, i) {
4393
4424
  o.factory.createBlock([o.factory.createReturnStatement(t.expression.body)], !0)
4394
4425
  )
4395
4426
  )
4396
- ] : [q(e, i, t.expression)]
4427
+ ] : [H(e, i, t.expression)]
4397
4428
  );
4398
4429
  }
4399
4430
  const ms = (e) => e.reduce((t, [i, s]) => (t[i] ??= [], t[i].push(s), t), {}), fs = ms(
@@ -4401,21 +4432,21 @@ const ms = (e) => e.reduce((t, [i, s]) => (t[i] ??= [], t[i].push(s), t), {}), f
4401
4432
  ([e, t]) => t.map((i) => [i, e])
4402
4433
  )
4403
4434
  ), gs = new Set(Object.keys(fs));
4404
- function Ho(e, t) {
4435
+ function Vo(e, t) {
4405
4436
  const i = t.importClause, s = i === void 0, n = t.moduleSpecifier;
4406
4437
  if (!o.isStringLiteral(n))
4407
4438
  return t;
4408
- const r = qo(e.sourceFile.fileName, n.text, ""), a = i?.phaseModifier !== o.SyntaxKind.TypeKeyword;
4409
- if (a && e.existingImportedModules.add(r), yr.test(n.text) && // If id already includes ?, bypass our custom behavior
4439
+ const r = Go(e.sourceFile.fileName, n.text, ""), a = i?.phaseModifier !== o.SyntaxKind.TypeKeyword;
4440
+ if (a && e.existingImportedModules.add(r), hr.test(n.text) && // If id already includes ?, bypass our custom behavior
4410
4441
  !n.text.includes("?")) {
4411
4442
  if (s) {
4412
4443
  if (e.compiler.viteCommand !== "build" || e.compiler.isInStorybook || e.compiler.isInTest)
4413
4444
  return t;
4414
- const l = e.sourceFile.fileName, p = l.includes("/node_modules/") || l.includes("/dist/"), m = `import "${n.text}"`;
4445
+ const c = e.sourceFile.fileName, p = c.includes("/node_modules/") || c.includes("/dist/"), m = `import "${n.text}"`;
4415
4446
  throw Error(
4416
- 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:
4417
- 1. (suggested) Externalize ${l}, which will make end-user's bundler treat this CSS import as global CSS.
4418
- 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`
4447
+ 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:
4448
+ 1. (suggested) Externalize ${c}, which will make end-user's bundler treat this CSS import as global CSS.
4449
+ 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`
4419
4450
  );
4420
4451
  }
4421
4452
  return o.factory.updateImportDeclaration(
@@ -4426,40 +4457,40 @@ function Ho(e, t) {
4426
4457
  // runs for .tsx files, so .css imports in .ts files won't work. However,
4427
4458
  // that is unlikely for web component libraries. A workaround is to
4428
4459
  // rename the file or explicitly add (undocumented) ?litCss flag
4429
- o.factory.createStringLiteral(n.text + (e.isInLightDomComponent ? Q : Ie)),
4460
+ o.factory.createStringLiteral(n.text + (e.isInLightDomComponent ? Y : Ie)),
4430
4461
  t.attributes
4431
4462
  );
4432
4463
  }
4433
4464
  if (s)
4434
4465
  return t;
4435
4466
  if (i.name !== void 0) {
4436
- const l = i.name.text, p = i.name.text.startsWith(l[0].toUpperCase()), m = u.isAbsolute(r);
4467
+ const c = i.name.text, p = i.name.text.startsWith(c[0].toUpperCase()), m = u.isAbsolute(r);
4437
4468
  a && p && m && e.importedFunctionComponentsFromModules.add(r);
4438
4469
  }
4439
- const c = i.namedBindings;
4440
- if (c === void 0 || !o.isNamedImports(c))
4470
+ const l = i.namedBindings;
4471
+ if (l === void 0 || !o.isNamedImports(l))
4441
4472
  return t;
4442
4473
  const d = gs.has(n.text);
4443
- if (c.elements.forEach((l) => {
4444
- const p = (l.propertyName ?? l.name).text, m = re[p];
4474
+ if (l.elements.forEach((c) => {
4475
+ const p = (c.propertyName ?? c.name).text, m = re[p];
4445
4476
  if (d) {
4446
4477
  if (m?.some((h) => h === n.text)) {
4447
4478
  const h = hs(p, r);
4448
- e.existingLitImports.add(h), e.importRenames[h] = l.name?.text ?? h;
4479
+ e.existingLitImports.add(h), e.importRenames[h] = c.name?.text ?? h;
4449
4480
  }
4450
- } else (l.name.text === "h" || l.name.text === "createElement") && j().name !== "@arcgis/lumina" && (e.hasNonLuminaJsxImport = !0);
4481
+ } else (c.name.text === "h" || c.name.text === "createElement") && D().name !== "@arcgis/lumina" && (e.hasNonLuminaJsxImport = !0);
4451
4482
  const f = p.startsWith(p[0].toUpperCase()), g = u.isAbsolute(r);
4452
- a && !l.isTypeOnly && f && g && e.importedFunctionComponentsFromModules.add(r);
4483
+ a && !c.isTypeOnly && f && g && e.importedFunctionComponentsFromModules.add(r);
4453
4484
  }), n.text === "@arcgis/lumina") {
4454
- let l = !1;
4455
- const p = c.elements.filter((f) => {
4485
+ let c = !1;
4486
+ const p = l.elements.filter((f) => {
4456
4487
  const g = (f.propertyName ?? f.name).text;
4457
- return hr.has(g) ? !1 : (l ||= !f.isTypeOnly, !0);
4488
+ return gr.has(g) ? !1 : (c ||= !f.isTypeOnly, !0);
4458
4489
  });
4459
4490
  if (p.length === 0)
4460
4491
  return;
4461
- if (p.length !== c.elements.length) {
4462
- const f = i.phaseModifier === o.SyntaxKind.TypeKeyword || !l, g = l ? p : p.map(
4492
+ if (p.length !== l.elements.length) {
4493
+ const f = i.phaseModifier === o.SyntaxKind.TypeKeyword || !c, g = c ? p : p.map(
4463
4494
  (h) => o.factory.updateImportSpecifier(
4464
4495
  h,
4465
4496
  !1,
@@ -4474,7 +4505,7 @@ function Ho(e, t) {
4474
4505
  i,
4475
4506
  f ? o.SyntaxKind.TypeKeyword : void 0,
4476
4507
  i.name,
4477
- o.factory.updateNamedImports(c, g)
4508
+ o.factory.updateNamedImports(l, g)
4478
4509
  ),
4479
4510
  t.moduleSpecifier,
4480
4511
  t.attributes
@@ -4483,22 +4514,22 @@ function Ho(e, t) {
4483
4514
  }
4484
4515
  return t;
4485
4516
  }
4486
- const hs = (e, t) => e === ce && re.staticHtml.includes(t) ? ae : e === se && re.staticSvg.includes(t) ? Y : e, qo = (e, t, i) => t.startsWith(".") ? u.resolve(e, "..", `${t}${i}`) : t;
4487
- function Vo(e) {
4488
- return o.isImportDeclaration(e) ? Go(this, e) : e;
4517
+ const hs = (e, t) => e === ce && re.staticHtml.includes(t) ? ae : e === se && re.staticSvg.includes(t) ? X : e, Go = (e, t, i) => t.startsWith(".") ? u.resolve(e, "..", `${t}${i}`) : t;
4518
+ function Xo(e) {
4519
+ return o.isImportDeclaration(e) ? Yo(this, e) : e;
4489
4520
  }
4490
- function Go(e, t) {
4521
+ function Yo(e, t) {
4491
4522
  const i = t.importClause, s = i?.namedBindings, n = t.moduleSpecifier;
4492
4523
  if (!o.isStringLiteral(n) || !s || !o.isNamedImports(s) || !gs.has(n.text))
4493
4524
  return t;
4494
4525
  const r = i.phaseModifier === o.SyntaxKind.TypeKeyword;
4495
4526
  let a = !1;
4496
- const c = s.elements.map((d) => {
4497
- const l = (d.propertyName ?? d.name).text, p = hs(l, n.text);
4527
+ const l = s.elements.map((d) => {
4528
+ const c = (d.propertyName ?? d.name).text, p = hs(c, n.text);
4498
4529
  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;
4499
4530
  });
4500
4531
  return fs[n.text]?.forEach((d) => {
4501
- !e.neededImports.has(d) || e.existingLitImports.has(d) || (e.neededImports.delete(d), a = !0, c.push(ys(d, e)));
4532
+ !e.neededImports.has(d) || e.existingLitImports.has(d) || (e.neededImports.delete(d), a = !0, l.push(ys(d, e)));
4502
4533
  }), a ? o.factory.updateImportDeclaration(
4503
4534
  t,
4504
4535
  t.modifiers,
@@ -4506,13 +4537,13 @@ function Go(e, t) {
4506
4537
  i,
4507
4538
  void 0,
4508
4539
  i.name,
4509
- o.factory.updateNamedImports(s, c)
4540
+ o.factory.updateNamedImports(s, l)
4510
4541
  ),
4511
4542
  t.moduleSpecifier,
4512
4543
  t.attributes
4513
4544
  ) : t;
4514
4545
  }
4515
- function Xo(e) {
4546
+ function Qo(e) {
4516
4547
  const t = ms(
4517
4548
  Array.from(e.neededImports, (i) => [re[i][0], i])
4518
4549
  );
@@ -4531,28 +4562,28 @@ function Xo(e) {
4531
4562
  );
4532
4563
  }
4533
4564
  function ys(e, t) {
4534
- const i = e === ae ? ce : e === Y ? se : e, s = t.importRenames[e];
4565
+ const i = e === ae ? ce : e === X ? se : e, s = t.importRenames[e];
4535
4566
  return s === i ? o.factory.createImportSpecifier(!1, void 0, o.factory.createIdentifier(i)) : o.factory.createImportSpecifier(
4536
4567
  !1,
4537
4568
  o.factory.createIdentifier(i),
4538
4569
  o.factory.createIdentifier(s)
4539
4570
  );
4540
4571
  }
4541
- function Yo(e) {
4542
- const t = Mr().map(({ packageName: i }) => i);
4572
+ function Zo(e) {
4573
+ const t = Or().map(({ packageName: i }) => i);
4543
4574
  return e.existingImportedModules.forEach((i) => {
4544
4575
  if (u.isAbsolute(i))
4545
4576
  return;
4546
- const s = Ys(i), n = i.slice(s.length + 1);
4577
+ const s = Xs(i), n = i.slice(s.length + 1);
4547
4578
  if (t.includes(s ?? "") && (n.startsWith("dist/components") || n.startsWith("components"))) {
4548
- const r = Re(e.sourceFile.fileName);
4579
+ const r = De(e.sourceFile.fileName);
4549
4580
  throw new Error(
4550
4581
  `Did not expect to find any explicit imports for "${i}". Found import in ${r}. Imports for web components that your component consumes will be added automatically at build-time as appropriate for a given output target. Type-only imports are still allowed. If you believe this is an error, please notify Lumina maintainers.`
4551
4582
  );
4552
4583
  }
4553
4584
  }), [];
4554
4585
  }
4555
- function Qo(e) {
4586
+ function ea(e) {
4556
4587
  if (e.compiler.viteCommand === "serve")
4557
4588
  return e.customElementsToImport.clear(), e.customElementsToImportDeferred.clear(), [];
4558
4589
  const t = e.compiler._customElementDependencies;
@@ -4567,15 +4598,15 @@ function Qo(e) {
4567
4598
  t[s] ??= { referencedBy: [], referencedTagNames: [], referencedDeferredTagNames: [] }, t[s].referencedBy.push(e.sourceFile.fileName);
4568
4599
  }), [];
4569
4600
  }
4570
- const Zo = (e, t) => {
4601
+ const ta = (e, t) => {
4571
4602
  const i = e.pragmas;
4572
4603
  if (i?.has("jsx") === !0 || i?.has("jsxImportSource") === !0)
4573
4604
  return e.statements;
4574
4605
  let s = !1, n;
4575
4606
  if (t.apiModule !== void 0) {
4576
4607
  const d = t.apiModule.declarations;
4577
- for (let l = 0; l < d.length; ++l) {
4578
- const p = d[l];
4608
+ for (let c = 0; c < d.length; ++c) {
4609
+ const p = d[c];
4579
4610
  if (p.customElement === !0) {
4580
4611
  const m = p;
4581
4612
  s = m.encapsulation !== void 0;
@@ -4591,7 +4622,7 @@ const Zo = (e, t) => {
4591
4622
  localComponents: is(t.compiler),
4592
4623
  sourceFile: e,
4593
4624
  transformationContext: t.transformation,
4594
- importRenames: ea(e),
4625
+ importRenames: ia(e),
4595
4626
  existingImportedModules: /* @__PURE__ */ new Set(),
4596
4627
  importedFunctionComponentsFromModules: /* @__PURE__ */ new Set(),
4597
4628
  existingLitImports: /* @__PURE__ */ new Set(),
@@ -4605,47 +4636,47 @@ const Zo = (e, t) => {
4605
4636
  let a = [];
4606
4637
  if (e.statements.every((d) => {
4607
4638
  if (o.isImportDeclaration(d)) {
4608
- const l = Ho(r, d);
4609
- if (l === void 0)
4639
+ const c = Vo(r, d);
4640
+ if (c === void 0)
4610
4641
  return !0;
4611
- if (a.push(l), r.hasNonLuminaJsxImport)
4642
+ if (a.push(c), r.hasNonLuminaJsxImport)
4612
4643
  return !1;
4613
4644
  } else
4614
- a.push(q(r, void 0, d));
4645
+ a.push(H(r, void 0, d));
4615
4646
  return !0;
4616
4647
  }), r.hasNonLuminaJsxImport)
4617
4648
  return e.statements;
4618
- if (r.neededImports.size > 0 && (a = a.map(Vo, r), r.existingLitImports.size > 0))
4649
+ if (r.neededImports.size > 0 && (a = a.map(Xo, r), r.existingLitImports.size > 0))
4619
4650
  throw new Error(
4620
4651
  `Expected context.existingLitImports to be empty by now. Found: ${Array.from(r.existingLitImports).join(", ")}`
4621
4652
  );
4622
- const c = [Xo, Yo, Qo].flatMap(
4653
+ const l = [Qo, Zo, ea].flatMap(
4623
4654
  (d) => d(r)
4624
4655
  );
4625
4656
  if (r.neededImports.size > 0)
4626
4657
  throw new Error(
4627
4658
  `Expected context.neededLitImports to be empty by now. Found: ${Array.from(r.neededImports).join(", ")}`
4628
4659
  );
4629
- return [...c, ...a];
4660
+ return [...l, ...a];
4630
4661
  };
4631
- function ea(e) {
4632
- return ta(e), Object.fromEntries(
4633
- fr.map((t) => [t, e.identifiers.has(t) ? `${t}$jsx` : t])
4662
+ function ia(e) {
4663
+ return sa(e), Object.fromEntries(
4664
+ mr.map((t) => [t, e.identifiers.has(t) ? `${t}$jsx` : t])
4634
4665
  );
4635
4666
  }
4636
- function ta(e) {
4667
+ function sa(e) {
4637
4668
  if (!("identifiers" in e))
4638
4669
  throw new Error(
4639
4670
  "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."
4640
4671
  );
4641
4672
  }
4642
- const Yt = "customElement", ia = (e, t) => {
4673
+ const Zt = "customElement", ra = (e, t) => {
4643
4674
  const i = [];
4644
4675
  if (t.apiModule?.declarations.forEach((r) => {
4645
4676
  const a = r;
4646
4677
  a.customElement !== void 0 && i.push(
4647
4678
  o.factory.createExpressionStatement(
4648
- o.factory.createCallExpression(o.factory.createIdentifier(Yt), void 0, [
4679
+ o.factory.createCallExpression(o.factory.createIdentifier(Zt), void 0, [
4649
4680
  o.factory.createStringLiteral(a.tagName ?? ""),
4650
4681
  o.factory.createIdentifier(a.name)
4651
4682
  ])
@@ -4663,13 +4694,13 @@ const Yt = "customElement", ia = (e, t) => {
4663
4694
  void 0,
4664
4695
  void 0,
4665
4696
  o.factory.createNamedImports([
4666
- o.factory.createImportSpecifier(!1, void 0, o.factory.createIdentifier(Yt))
4697
+ o.factory.createImportSpecifier(!1, void 0, o.factory.createIdentifier(Zt))
4667
4698
  ])
4668
4699
  ),
4669
4700
  o.factory.createStringLiteral(s)
4670
4701
  ), ...e.statements, ...i];
4671
4702
  };
4672
- function sa(e, t, i) {
4703
+ function na(e, t, i) {
4673
4704
  return t.size === 0 ? e : [
4674
4705
  o.factory.createPropertyDeclaration(
4675
4706
  [
@@ -4684,7 +4715,7 @@ function sa(e, t, i) {
4684
4715
  t.entries(),
4685
4716
  ([s, n]) => o.factory.createPropertyAssignment(
4686
4717
  li(s) ? o.factory.createStringLiteral(s) : s,
4687
- ra(n, i)
4718
+ oa(n, i)
4688
4719
  )
4689
4720
  )
4690
4721
  )
@@ -4692,7 +4723,7 @@ function sa(e, t, i) {
4692
4723
  ...e
4693
4724
  ];
4694
4725
  }
4695
- function ra(e, t) {
4726
+ function oa(e, t) {
4696
4727
  let i = 0, s = !0;
4697
4728
  const n = [], r = [];
4698
4729
  for (const d of e.properties)
@@ -4700,32 +4731,32 @@ function ra(e, t) {
4700
4731
  function a(d) {
4701
4732
  if (!o.isPropertyAssignment(d) || !o.isIdentifier(d.name))
4702
4733
  return !0;
4703
- const l = d.name.text, p = d.initializer, m = p.kind === o.SyntaxKind.TrueKeyword, f = p.kind === o.SyntaxKind.FalseKeyword;
4704
- if (l === "attribute")
4705
- return s = !1, i |= m ? Et : 0, !m && !f;
4706
- if (l === "reflect")
4707
- return i |= m ? ks : 0, !1;
4708
- if (l === "type" && o.isIdentifier(p)) {
4734
+ const c = d.name.text, p = d.initializer, m = p.kind === o.SyntaxKind.TrueKeyword, f = p.kind === o.SyntaxKind.FalseKeyword;
4735
+ if (c === "attribute")
4736
+ return s = !1, i |= m ? Tt : 0, !m && !f;
4737
+ if (c === "reflect")
4738
+ return i |= m ? Ps : 0, !1;
4739
+ if (c === "type" && o.isIdentifier(p)) {
4709
4740
  if (p.text === "Boolean")
4710
- return i |= Is, !1;
4741
+ return i |= ks, !1;
4711
4742
  if (p.text === "Number")
4712
- return i |= xs, !1;
4743
+ return i |= Is, !1;
4713
4744
  } else {
4714
- if (l === "state")
4715
- return s = !1, i |= m ? As : 0, !1;
4716
- if (l === "readOnly")
4745
+ if (c === "state")
4746
+ return s = !1, i |= m ? xs : 0, !1;
4747
+ if (c === "readOnly")
4748
+ return i |= m ? As : 0, !1;
4749
+ if (c === "noAccessor")
4717
4750
  return i |= m ? Ls : 0, !1;
4718
- if (l === "noAccessor")
4751
+ if (c === "useDefault")
4719
4752
  return i |= m ? Ns : 0, !1;
4720
- if (l === "useDefault")
4721
- return i |= m ? js : 0, !1;
4722
4753
  }
4723
4754
  return !0;
4724
4755
  }
4725
- s && (i |= Et);
4726
- const c = o.factory.createNumericLiteral(i);
4727
- return n.length === 0 && (t || r.length === 0) ? c : o.factory.createArrayLiteralExpression([
4728
- c,
4756
+ s && (i |= Tt);
4757
+ const l = o.factory.createNumericLiteral(i);
4758
+ return n.length === 0 && (t || r.length === 0) ? l : o.factory.createArrayLiteralExpression([
4759
+ l,
4729
4760
  o.factory.createObjectLiteralExpression(n),
4730
4761
  /**
4731
4762
  * In dev mode, to improve readability for non-source-map developers,
@@ -4737,7 +4768,7 @@ function ra(e, t) {
4737
4768
  ...t ? [] : [o.factory.createObjectLiteralExpression(r)]
4738
4769
  ]);
4739
4770
  }
4740
- function na(e, t, i) {
4771
+ function aa(e, t, i) {
4741
4772
  let s = -1, n = -1, r = -1;
4742
4773
  e.options?.properties.forEach((p, m) => {
4743
4774
  if (o.isSpreadAssignment(p))
@@ -4749,23 +4780,23 @@ function na(e, t, i) {
4749
4780
  f === "type" ? s = m : f === "attribute" ? n = m : f === "readOnly" && (r = m);
4750
4781
  }
4751
4782
  });
4752
- const a = i.attribute === void 0 && n === -1, c = i.readonly === !0 && i.docsOnlyReadonly !== !0 && r === -1, d = oa(e, i, s), l = [
4783
+ const a = i.attribute === void 0 && n === -1, l = i.readonly === !0 && i.docsOnlyReadonly !== !0 && r === -1, d = ca(e, i, s), c = [
4753
4784
  ...a ? [o.factory.createPropertyAssignment("attribute", o.factory.createFalse())] : [],
4754
- ...c ? [o.factory.createPropertyAssignment("readOnly", o.factory.createTrue())] : [],
4785
+ ...l ? [o.factory.createPropertyAssignment("readOnly", o.factory.createTrue())] : [],
4755
4786
  ...d !== void 0 ? [d] : []
4756
4787
  ];
4757
- return l.length > 0 ? e.options === void 0 ? o.factory.createObjectLiteralExpression(l, !1) : o.factory.updateObjectLiteralExpression(e.options, [...e.options.properties, ...l]) : e.options;
4788
+ return c.length > 0 ? e.options === void 0 ? o.factory.createObjectLiteralExpression(c, !1) : o.factory.updateObjectLiteralExpression(e.options, [...e.options.properties, ...c]) : e.options;
4758
4789
  }
4759
- function oa(e, t, i) {
4790
+ function ca(e, t, i) {
4760
4791
  if (t.attribute === void 0)
4761
4792
  return;
4762
- const s = aa(t.type.values);
4793
+ const s = la(t.type.values);
4763
4794
  return s === "Other" || t.readonly === !0 && (s !== "Boolean" || t.reflects === void 0) || e.options?.properties[i] !== void 0 ? void 0 : o.factory.createPropertyAssignment(
4764
4795
  o.factory.createIdentifier("type"),
4765
4796
  o.factory.createIdentifier(s)
4766
4797
  );
4767
4798
  }
4768
- function aa(e) {
4799
+ function la(e) {
4769
4800
  let t = !1, i = !1, s = !1;
4770
4801
  if (e?.forEach((n) => {
4771
4802
  t ||= n.type === "number", i ||= n.type === "boolean", s ||= n.type === "string" || n.type === "any" || n.type === "unknown";
@@ -4777,52 +4808,52 @@ function aa(e) {
4777
4808
  }
4778
4809
  return "Other";
4779
4810
  }
4780
- function ca(e, t, i, s, n, r) {
4811
+ function da(e, t, i, s, n, r) {
4781
4812
  if (i.modifiers === void 0)
4782
4813
  return i;
4783
- let a = -1, c = -1;
4784
- if (i.modifiers.forEach((d, l) => {
4814
+ let a = -1, l = -1;
4815
+ if (i.modifiers.forEach((d, c) => {
4785
4816
  if (o.isDecorator(d) && o.isCallExpression(d.expression) && o.isIdentifier(d.expression.expression)) {
4786
4817
  const p = d.expression.expression.text;
4787
- p === "property" && (a = l), p === "state" && (c = l);
4818
+ p === "property" && (a = c), p === "state" && (l = c);
4788
4819
  }
4789
4820
  }), a !== -1) {
4790
- const d = la(e, t, i, s, n), l = Qt(i, a, n), p = na(l, n, d);
4791
- return r.set(d.name, p ?? o.factory.createObjectLiteralExpression()), l.options = p, Zt(i, a);
4792
- } else if (c !== -1) {
4793
- const d = Qt(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 = di(i.name);
4821
+ const d = pa(e, t, i, s, n), c = ei(i, a, n), p = aa(c, n, d);
4822
+ return r.set(d.name, p ?? o.factory.createObjectLiteralExpression()), c.options = p, ti(i, a);
4823
+ } else if (l !== -1) {
4824
+ const d = ei(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 = di(i.name);
4794
4825
  if (m === void 0)
4795
4826
  throw new Error("Failed to statically determine the state property name");
4796
- return r.set(m, p), Zt(i, c);
4827
+ return r.set(m, p), ti(i, l);
4797
4828
  } else
4798
4829
  return i;
4799
4830
  }
4800
- function la(e, t, i, s, n) {
4831
+ function pa(e, t, i, s, n) {
4801
4832
  const r = t ?? (e.compiler.isInTest ? {
4802
4833
  members: []
4803
4834
  } : void 0);
4804
4835
  if (r === void 0)
4805
4836
  throw Error(`Failed to find API component for ${s} in ${n.fileName}`);
4806
4837
  const a = di(i.name);
4807
- let c;
4838
+ let l;
4808
4839
  for (let d = 0; d < r.members.length; ++d) {
4809
- const l = r.members[d];
4810
- l.name === a && l.kind === "field" && (c = l);
4840
+ const c = r.members[d];
4841
+ c.name === a && c.kind === "field" && (l = c);
4811
4842
  }
4812
- if (c ??= e.compiler.isInTest ? { kind: "field", attribute: "", name: "", type: { text: "" } } : void 0, c === void 0)
4843
+ if (l ??= e.compiler.isInTest ? { kind: "field", attribute: "", name: "", type: { text: "" } } : void 0, l === void 0)
4813
4844
  throw Error(
4814
4845
  `Failed to find API property for ${i.getText(n)} in ${s} in ${n.fileName}`
4815
4846
  );
4816
- if (c.name === "") {
4847
+ if (l.name === "") {
4817
4848
  if (a === void 0)
4818
4849
  throw Error(
4819
4850
  `Failed to statically determine the property name: ${i.getText(n)} in ${s} in ${n.fileName}`
4820
4851
  );
4821
- c.name = a, c.attribute ??= si(a);
4852
+ l.name = a, l.attribute ??= ri(a);
4822
4853
  }
4823
- return c;
4854
+ return l;
4824
4855
  }
4825
- function Qt(e, t, i) {
4856
+ function ei(e, t, i) {
4826
4857
  const s = e.modifiers[t], n = s.expression, r = n.arguments.at(0);
4827
4858
  if (r && !o.isObjectLiteralExpression(r))
4828
4859
  throw new Error(
@@ -4830,7 +4861,7 @@ function Qt(e, t, i) {
4830
4861
  );
4831
4862
  return { decorator: s, callExpression: n, options: r };
4832
4863
  }
4833
- function Zt(e, t) {
4864
+ function ti(e, t) {
4834
4865
  const i = [
4835
4866
  ...e.modifiers.slice(0, t),
4836
4867
  ...e.modifiers.slice(t + 1)
@@ -4857,13 +4888,13 @@ function Zt(e, t) {
4857
4888
  e.initializer
4858
4889
  );
4859
4890
  }
4860
- function da(e, t, i, s) {
4891
+ function ua(e, t, i, s) {
4861
4892
  let n;
4862
4893
  if (e.apiJsonEnabled)
4863
4894
  for (let d = 0; d < e.privateApiJson.modules.length; ++d) {
4864
- const l = e.privateApiJson.modules[d];
4865
- if (l.sourcePath === i.fileName.slice(e.dir.root.length)) {
4866
- n = l;
4895
+ const c = e.privateApiJson.modules[d];
4896
+ if (c.sourcePath === i.fileName.slice(e.dir.root.length)) {
4897
+ n = c;
4867
4898
  break;
4868
4899
  }
4869
4900
  }
@@ -4872,17 +4903,17 @@ function da(e, t, i, s) {
4872
4903
  apiModule: n,
4873
4904
  transformation: t
4874
4905
  }, a = i.statements;
4875
- let c = a;
4906
+ let l = a;
4876
4907
  try {
4877
4908
  s.forEach((d) => {
4878
4909
  i.statements = d(i, r);
4879
4910
  });
4880
4911
  } finally {
4881
- c = i.statements, i.statements = a;
4912
+ l = i.statements, i.statements = a;
4882
4913
  }
4883
- return pa(i, c);
4914
+ return ma(i, l);
4884
4915
  }
4885
- const pa = (e, t) => o.factory.updateSourceFile(
4916
+ const ma = (e, t) => o.factory.updateSourceFile(
4886
4917
  e,
4887
4918
  t,
4888
4919
  /*
@@ -4897,16 +4928,16 @@ const pa = (e, t) => o.factory.updateSourceFile(
4897
4928
  !1,
4898
4929
  e.libReferenceDirectives
4899
4930
  );
4900
- function ua(e, t) {
4931
+ function fa(e, t) {
4901
4932
  t.compiler.viteCommand === "build" && ("emitNode" in e && (e.emitNode ??= {}), o.setEmitFlags(e, o.EmitFlags.NoComments));
4902
4933
  }
4903
- const ma = (e, t) => {
4934
+ const ga = (e, t) => {
4904
4935
  let i;
4905
4936
  if (t.apiModule !== void 0)
4906
4937
  for (let d = 0; d < t.apiModule.declarations.length; ++d) {
4907
- const l = t.apiModule.declarations[d];
4908
- if (l.customElement === !0) {
4909
- i = l;
4938
+ const c = t.apiModule.declarations[d];
4939
+ if (c.customElement === !0) {
4940
+ i = c;
4910
4941
  break;
4911
4942
  }
4912
4943
  }
@@ -4916,10 +4947,10 @@ const ma = (e, t) => {
4916
4947
  function n() {
4917
4948
  s = /* @__PURE__ */ new Map();
4918
4949
  }
4919
- const r = (d) => sa(d, s, t.compiler.shouldMinify);
4920
- function a(d, l) {
4921
- const p = ga(t, i, d, l, e, s);
4922
- return ua(p, t), p;
4950
+ const r = (d) => na(d, s, t.compiler.shouldMinify);
4951
+ function a(d, c) {
4952
+ const p = ya(t, i, d, c, e, s);
4953
+ return fa(p, t), p;
4923
4954
  }
4924
4955
  return e.statements.map(
4925
4956
  (d) => vs(a, d, t, n, r)
@@ -4931,10 +4962,10 @@ function vs(e, t, i, s, n = pi) {
4931
4962
  let r = !1;
4932
4963
  const a = t.name?.text;
4933
4964
  s?.();
4934
- const c = n(
4935
- t.members.map((l) => {
4936
- const p = e(l, a);
4937
- return r ||= p !== l, p;
4965
+ const l = n(
4966
+ t.members.map((c) => {
4967
+ const p = e(c, a);
4968
+ return r ||= p !== c, p;
4938
4969
  })
4939
4970
  );
4940
4971
  return r ? o.factory.updateClassDeclaration(
@@ -4943,7 +4974,7 @@ function vs(e, t, i, s, n = pi) {
4943
4974
  t.name,
4944
4975
  t.typeParameters,
4945
4976
  t.heritageClauses,
4946
- c
4977
+ l
4947
4978
  ) : t;
4948
4979
  } else
4949
4980
  return i.compiler.isInTest ? o.visitEachChild(
@@ -4952,11 +4983,11 @@ function vs(e, t, i, s, n = pi) {
4952
4983
  i.transformation
4953
4984
  ) : t;
4954
4985
  }
4955
- const fa = /* @__PURE__ */ new Set(["connectedCallback", "disconnectedCallback"]);
4956
- function ga(e, t, i, s, n, r) {
4986
+ const ha = /* @__PURE__ */ new Set(["connectedCallback", "disconnectedCallback"]);
4987
+ function ya(e, t, i, s, n, r) {
4957
4988
  if (o.isMethodDeclaration(i)) {
4958
4989
  const a = i.modifiers?.filter(
4959
- (c) => !o.isDecorator(c) || !ha(c)
4990
+ (l) => !o.isDecorator(l) || !va(l)
4960
4991
  );
4961
4992
  if (a?.length !== i.modifiers?.length)
4962
4993
  return o.factory.updateMethodDeclaration(
@@ -4970,10 +5001,10 @@ function ga(e, t, i, s, n, r) {
4970
5001
  i.type,
4971
5002
  i.body
4972
5003
  );
4973
- if ("text" in i.name && fa.has(i.name.text) && i.body) {
4974
- const c = i.name.text;
5004
+ if ("text" in i.name && ha.has(i.name.text) && i.body) {
5005
+ const l = i.name.text;
4975
5006
  return i.body.statements.some(
4976
- (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
5007
+ (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
4977
5008
  ) ? i : o.factory.updateMethodDeclaration(
4978
5009
  i,
4979
5010
  i.modifiers,
@@ -4986,7 +5017,7 @@ function ga(e, t, i, s, n, r) {
4986
5017
  o.factory.updateBlock(i.body, [
4987
5018
  o.factory.createExpressionStatement(
4988
5019
  o.factory.createCallExpression(
4989
- o.factory.createPropertyAccessExpression(o.factory.createSuper(), c),
5020
+ o.factory.createPropertyAccessExpression(o.factory.createSuper(), l),
4990
5021
  void 0,
4991
5022
  []
4992
5023
  )
@@ -4996,14 +5027,14 @@ function ga(e, t, i, s, n, r) {
4996
5027
  );
4997
5028
  }
4998
5029
  }
4999
- return o.isPropertyDeclaration(i) || o.isAccessor(i) ? ca(e, t, i, s, n, r) : i;
5000
- }
5001
- const ha = (e) => o.isCallExpression(e.expression) && o.isIdentifier(e.expression.expression) && e.expression.expression.text === "method", ya = [
5002
- Zo,
5003
- ia,
5004
- ma
5005
- ], va = "@arcgis/lumina:transformComponents", ba = (e) => ({
5006
- name: va,
5030
+ return o.isPropertyDeclaration(i) || o.isAccessor(i) ? da(e, t, i, s, n, r) : i;
5031
+ }
5032
+ const va = (e) => o.isCallExpression(e.expression) && o.isIdentifier(e.expression.expression) && e.expression.expression.text === "method", ba = [
5033
+ ta,
5034
+ ra,
5035
+ ga
5036
+ ], wa = "@arcgis/lumina:transformComponents", Sa = (e) => ({
5037
+ name: wa,
5007
5038
  transform: {
5008
5039
  // Transform JSX to lit-html first so that vite:esbuild doesn't transform JSX to h().
5009
5040
  // Also, we need to run on the original fs file, before other transforms so
@@ -5023,109 +5054,109 @@ const ha = (e) => o.isCallExpression(e.expression) && o.isIdentifier(e.expressio
5023
5054
  e.apiJsonDeferred === void 0 ? [ne] : [ne, e.apiJsonDeferred.promise]
5024
5055
  );
5025
5056
  const n = e.getSourceFile(i, t), a = o.transform(n, [
5026
- (f) => () => da(e, f, n, [
5057
+ (f) => () => ua(e, f, n, [
5027
5058
  ...e.options.types?.sourceFileTransformers ?? [],
5028
- ...ya
5059
+ ...ba
5029
5060
  ])
5030
- ]).transformed[0], c = e._typeScriptPrinter, d = e.viteConfig.build.sourcemap === !1 ? void 0 : Tt.createSourceMapGenerator(wa, u.basename(i), "", u.dirname(i), {}), l = Tt.createTextWriter(`
5061
+ ]).transformed[0], l = e._typeScriptPrinter, d = e.viteConfig.build.sourcemap === !1 ? void 0 : $t.createSourceMapGenerator(Ca, u.basename(i), "", u.dirname(i), {}), c = $t.createTextWriter(`
5031
5062
  `);
5032
- c.writeFile(a, l, d);
5033
- const p = l.getText(), m = d?.toJSON();
5063
+ l.writeFile(a, c, d);
5064
+ const p = c.getText(), m = d?.toJSON();
5034
5065
  return {
5035
5066
  code: p,
5036
5067
  map: m ?? null
5037
5068
  };
5038
5069
  }
5039
5070
  }
5040
- }), wa = {
5071
+ }), Ca = {
5041
5072
  getCurrentDirectory: o.sys.getCurrentDirectory,
5042
5073
  getCanonicalFileName: o.sys.useCaseSensitiveFileNames ? pi : (e) => e.toLowerCase()
5043
- }, Sa = (e) => ({
5074
+ }, Ea = (e) => ({
5044
5075
  name: "@arcgis/lumina:handleDynamicAssets",
5045
5076
  configureServer(t) {
5046
- e.server = t, ei(e).forEach(({ assets: i, transformers: s }) => ie(e, i, s));
5077
+ e.server = t, ii(e).forEach(({ assets: i, transformers: s }) => te(e, i, s));
5047
5078
  },
5048
5079
  async writeBundle() {
5049
5080
  await Promise.all(
5050
- ei(e).map(
5081
+ ii(e).map(
5051
5082
  async ({ assets: t, transformers: i }) => await Fi(e, t, i)
5052
5083
  )
5053
5084
  );
5054
5085
  }
5055
5086
  });
5056
- function ei(e) {
5087
+ function ii(e) {
5057
5088
  const t = [], i = e.assetsToProvide?.filter((s) => s.apply === void 0 || s.apply === e.viteCommand) ?? [];
5058
5089
  return e.options.assets?.extra?.forEach((s) => {
5059
5090
  "type" in s ? t.push(s) : "assets" in s && t.push(...s.assets);
5060
5091
  }), t.length > 0 && i.push({ assets: t }), e.isInBuildWatch || (e.assetsToProvide = void 0), i;
5061
5092
  }
5062
- const ot = "@arcgis/lumina:updatePackageJson", Ca = (e) => ({
5093
+ const ot = "@arcgis/lumina:updatePackageJson", Ta = (e) => ({
5063
5094
  name: ot,
5064
5095
  apply: () => e.viteCommand === "serve" && e.environment === "development" && !e.isInTest && !e.isInCi,
5065
5096
  configResolved() {
5066
- Ea(e).catch(
5067
- (t) => T.error(ot, `Failed to update package's package.json:${String(t)}`)
5097
+ $a(e).catch(
5098
+ (t) => $.error(ot, `Failed to update package's package.json:${String(t)}`)
5068
5099
  );
5069
5100
  }
5070
5101
  });
5071
- async function Ea(e) {
5072
- const t = u.join(e.dir.root, "package.json"), i = JSON.parse(await z(t, "utf-8")), s = Ta(i, e);
5102
+ async function $a(e) {
5103
+ const t = u.join(e.dir.root, "package.json"), i = JSON.parse(await W(t, "utf-8")), s = Pa(i, e);
5073
5104
  s && ci(t, JSON.stringify(s, null, 2));
5074
5105
  }
5075
- function Ta(e, t) {
5106
+ function Pa(e, t) {
5076
5107
  const i = e?.devDependencies ?? {};
5077
- Object.keys(e?.peerDependencies ?? {}).forEach((l) => {
5078
- l in i || T.warn(
5108
+ Object.keys(e?.peerDependencies ?? {}).forEach((c) => {
5109
+ c in i || $.warn(
5079
5110
  ot,
5080
- `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`
5111
+ `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`
5081
5112
  );
5082
5113
  });
5083
5114
  let s = !1;
5084
- const n = (l) => u.relative(t.dir.root, u.join(t.dir.dist, l)), r = t._documentationFileNames;
5115
+ const n = (c) => u.relative(t.dir.root, u.join(t.dir.dist, c)), r = t._documentationFileNames;
5085
5116
  if (r.vsCodeCss !== void 0) {
5086
- const l = e["css.customData"] ?? [], p = n(r.vsCodeCss);
5087
- l.includes(p) || (e["css.customData"] = [...l, p], s = !0);
5117
+ const c = e["css.customData"] ?? [], p = n(r.vsCodeCss);
5118
+ c.includes(p) || (e["css.customData"] = [...c, p], s = !0);
5088
5119
  }
5089
5120
  if (r.apiJson !== void 0) {
5090
- const l = n(r.apiJson);
5091
- e.customElements !== l && (e.customElements = l, s = !0);
5121
+ const c = n(r.apiJson);
5122
+ e.customElements !== c && (e.customElements = c, s = !0);
5092
5123
  }
5093
5124
  if (r.vsCodeHtml !== void 0) {
5094
- const l = e["html.customData"] ?? [], p = n(r.vsCodeHtml);
5095
- l.includes(p) || (e["html.customData"] = [...l, p], s = !0);
5125
+ const c = e["html.customData"] ?? [], p = n(r.vsCodeHtml);
5126
+ c.includes(p) || (e["html.customData"] = [...c, p], s = !0);
5096
5127
  }
5097
5128
  if (r.webTypes !== void 0) {
5098
- const l = n(r.webTypes);
5099
- e["web-types"] !== l && (s = !0, e["web-types"] = l);
5129
+ const c = n(r.webTypes);
5130
+ e["web-types"] !== c && (s = !0, e["web-types"] = c);
5100
5131
  }
5101
- const a = `./${Z}.css`, c = t.options.build?.cdn?.namespace !== void 0, d = he(
5132
+ const a = `./${Q}.css`, l = t.options.build?.cdn?.namespace !== void 0, d = he(
5102
5133
  t.dir.root,
5103
5134
  u.join(t.dir.distCdn, a)
5104
5135
  );
5105
- if (!c) {
5136
+ if (!l) {
5106
5137
  e.exports?.[a] !== d && (e.exports ??= {}, e.exports[a] = d, s = !0);
5107
- const l = e.name.split("/").length > 1 ? e.name.split("/")[1] : e.name;
5138
+ const c = e.name.split("/").length > 1 ? e.name.split("/")[1] : e.name;
5108
5139
  for (const p of Object.keys(e.exports))
5109
- p.endsWith(`${l}.css`) && e.exports[p] !== d && (e.exports[p] = d, s = !0);
5140
+ p.endsWith(`${c}.css`) && e.exports[p] !== d && (e.exports[p] = d, s = !0);
5110
5141
  }
5111
5142
  if (s)
5112
5143
  return e;
5113
5144
  }
5114
- const $a = (e) => ({
5145
+ const ka = (e) => ({
5115
5146
  deprecation: "docs.json is deprecated and will be removed in a future release. Use api.json instead",
5116
5147
  timestamp: e.apiJson.timestamp,
5117
5148
  compiler: e.apiJson.compiler,
5118
- components: Pa(e),
5149
+ components: Ia(e),
5119
5150
  typeLibrary: {}
5120
5151
  });
5121
- function Pa(e) {
5152
+ function Ia(e) {
5122
5153
  const t = [];
5123
5154
  for (const i of e.apiJson.modules)
5124
5155
  for (const s of i.declarations)
5125
- s.customElement === !0 && t.push(ka(s, i.sourcePath));
5156
+ s.customElement === !0 && t.push(xa(s, i.sourcePath));
5126
5157
  return t;
5127
5158
  }
5128
- function ka(e, t) {
5159
+ function xa(e, t) {
5129
5160
  const i = e.superclass ? [{ name: "superclass", text: JSON.stringify(e.superclass) }] : [];
5130
5161
  return {
5131
5162
  filePath: t,
@@ -5140,9 +5171,9 @@ function ka(e, t) {
5140
5171
  dependencies: [],
5141
5172
  dependencyGraph: {},
5142
5173
  deprecation: typeof e.deprecated == "boolean" ? e.deprecated ? "" : void 0 : e.deprecated,
5143
- props: e.members.map(Ia).filter(R),
5144
- methods: e.members.map(xa).filter(R),
5145
- events: e.events?.map(Aa) ?? [],
5174
+ props: e.members.map(Aa).filter(F),
5175
+ methods: e.members.map(La).filter(F),
5176
+ events: e.events?.map(Na) ?? [],
5146
5177
  styles: e.cssProperties?.map(({ name: s, description: n, deprecated: r }) => ({
5147
5178
  name: s,
5148
5179
  annotation: "prop",
@@ -5167,7 +5198,7 @@ function Ve(e, t = "") {
5167
5198
  }
5168
5199
  return t;
5169
5200
  }
5170
- function Ia(e) {
5201
+ function Aa(e) {
5171
5202
  if (e.kind !== "field")
5172
5203
  return;
5173
5204
  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;
@@ -5177,7 +5208,7 @@ function Ia(e) {
5177
5208
  complexType: t.type === void 0 ? void 0 : {
5178
5209
  original: t.type.text,
5179
5210
  resolved: t.type.text,
5180
- references: bt(t.type.references)
5211
+ references: wt(t.type.references)
5181
5212
  },
5182
5213
  mutable: !0,
5183
5214
  attr: "attribute" in t && typeof t.attribute == "string" ? t.attribute : void 0,
@@ -5196,19 +5227,19 @@ function Ia(e) {
5196
5227
  required: n
5197
5228
  };
5198
5229
  }
5199
- const bt = (e) => Object.fromEntries(
5230
+ const wt = (e) => Object.fromEntries(
5200
5231
  e?.map(
5201
5232
  (t) => [
5202
5233
  t.name,
5203
5234
  {
5204
- location: t.package === Rs ? "global" : t.package === void 0 ? "local" : "import",
5235
+ location: t.package === Fs ? "global" : t.package === void 0 ? "local" : "import",
5205
5236
  path: typeof t.module == "string" && typeof t.package == "string" ? u.join(t.package, t.module) : t.module ?? t.package,
5206
5237
  id: "notImplemented"
5207
5238
  }
5208
5239
  ]
5209
5240
  ) ?? []
5210
5241
  );
5211
- function xa(e) {
5242
+ function La(e) {
5212
5243
  if (e.kind !== "method")
5213
5244
  return;
5214
5245
  const t = e, i = e.inheritedFrom ? [{ name: "inheritedFrom", text: JSON.stringify(e.inheritedFrom) }] : [], s = t.parameters?.map(({ name: n, type: r, description: a }) => ({
@@ -5227,7 +5258,7 @@ function xa(e) {
5227
5258
  signature: t.signature ?? "()=>unknown",
5228
5259
  parameters: s,
5229
5260
  return: t.return?.type?.text ?? "void",
5230
- references: bt([
5261
+ references: wt([
5231
5262
  ...t.return?.type?.references ?? [],
5232
5263
  ...t.parameters?.flatMap((n) => n.type.references ?? []) ?? []
5233
5264
  ])
@@ -5239,7 +5270,7 @@ function xa(e) {
5239
5270
  deprecation: typeof t.deprecated == "boolean" ? t.deprecated ? "" : void 0 : t.deprecated
5240
5271
  };
5241
5272
  }
5242
- function Aa(e) {
5273
+ function Na(e) {
5243
5274
  const t = e.inheritedFrom ? [{ name: "inheritedFrom", text: JSON.stringify(e.inheritedFrom) }] : [];
5244
5275
  return {
5245
5276
  event: e.name,
@@ -5248,7 +5279,7 @@ function Aa(e) {
5248
5279
  complexType: {
5249
5280
  original: e.type.text,
5250
5281
  resolved: e.type.text,
5251
- references: bt(e.type.references)
5282
+ references: wt(e.type.references)
5252
5283
  },
5253
5284
  cancelable: e.cancelable ?? !0,
5254
5285
  composed: e.composed ?? !0,
@@ -5265,7 +5296,7 @@ const ye = {
5265
5296
  methods: "Methods"
5266
5297
  };
5267
5298
  function bs(e) {
5268
- const t = La(e.slots), i = Na(e.events), s = ja(e.cssProperties), n = Fa(e.cssParts), r = Ra(e.members), a = e.description?.trim();
5299
+ const t = ja(e.slots), i = Fa(e.events), s = Da(e.cssProperties), n = Ra(e.cssParts), r = Oa(e.members), a = e.description?.trim();
5269
5300
  return [...a ? [`${a}
5270
5301
  --`] : [], i, r, t, s, n].filter(Boolean).join(`
5271
5302
 
@@ -5273,23 +5304,23 @@ function bs(e) {
5273
5304
  }
5274
5305
  const ve = (e, t) => t === void 0 || t.length === 0 ? "" : `### ${e}
5275
5306
  ${t.join(`
5276
- `)}`, La = (e) => ve(
5307
+ `)}`, ja = (e) => ve(
5277
5308
  ye.slots,
5278
5309
  e?.filter((t) => t.deprecated === void 0).map(
5279
5310
  (t) => `- ${t.name ? `**${t.name}**` : "_default_"}${t.description === void 0 ? "" : ` - ${t.description}`}`
5280
5311
  )
5281
- ), Na = (e) => ve(
5312
+ ), Fa = (e) => ve(
5282
5313
  ye.events,
5283
5314
  e?.filter((t) => t.deprecated === void 0).map((t) => `- **${t.name}**${t.description === void 0 ? "" : ` - ${t.description}`}`)
5284
- ), ja = (e = []) => ve(
5315
+ ), Da = (e = []) => ve(
5285
5316
  ye.cssProperties,
5286
5317
  e?.filter((t) => t.deprecated === void 0).map(
5287
5318
  (t) => `- **${t.name}**${t.description === void 0 ? "" : ` - ${t.description}`} ${t.default ? `_(default: ${t.default})_}` : ""}`
5288
5319
  )
5289
- ), Fa = (e) => ve(
5320
+ ), Ra = (e) => ve(
5290
5321
  ye.cssParts,
5291
5322
  e?.filter((t) => t.deprecated === void 0).map((t) => `- **${t.name}**${t.description === void 0 ? "" : ` - ${t.description}`}`)
5292
- ), Ra = (e) => ve(
5323
+ ), Oa = (e) => ve(
5293
5324
  ye.methods,
5294
5325
  e.filter(Ds).filter((t) => t.deprecated === void 0).map(
5295
5326
  (t) => `- \`${t.name}${t.signature}\`${t.description ? ` - ${t.description}` : ""}`
@@ -5314,7 +5345,7 @@ ${t.join(`
5314
5345
  description: t.tagName + (i.description === void 0 ? "" : `: ${i.description}`)
5315
5346
  })) ?? []
5316
5347
  );
5317
- function Da(e) {
5348
+ function Ma(e) {
5318
5349
  if (e.attributes === void 0)
5319
5350
  return [];
5320
5351
  const t = [];
@@ -5325,7 +5356,7 @@ function Da(e) {
5325
5356
  description: s.description || void 0,
5326
5357
  default: s.default,
5327
5358
  value: {
5328
- type: Oa(
5359
+ type: Ja(
5329
5360
  s.type.values?.map(
5330
5361
  (n) => n.type === "string" && n.value !== void 0 ? `"${n.value}"` : n.value ?? n.type
5331
5362
  )
@@ -5335,13 +5366,13 @@ function Da(e) {
5335
5366
  }
5336
5367
  return t;
5337
5368
  }
5338
- const Oa = (e) => e?.length === 1 ? e[0] : e;
5339
- function Ma(e, t) {
5340
- const i = Ja(e), s = ws(e), n = Ss(e), r = j();
5369
+ const Ja = (e) => e?.length === 1 ? e[0] : e;
5370
+ function Ba(e, t) {
5371
+ const i = Ka(e), s = ws(e), n = Ss(e), r = D();
5341
5372
  return {
5342
5373
  $schema: "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
5343
5374
  name: r.name,
5344
- version: ut(r) ?? r.version,
5375
+ version: mt(r) ?? r.version,
5345
5376
  "description-markup": "markdown",
5346
5377
  "default-icon": t.defaultIcon,
5347
5378
  contributions: {
@@ -5355,166 +5386,116 @@ function Ma(e, t) {
5355
5386
  }
5356
5387
  };
5357
5388
  }
5358
- const Ja = (e) => e.filter((t) => t.deprecated === void 0).map((t) => ({
5389
+ const Ka = (e) => e.filter((t) => t.deprecated === void 0).map((t) => ({
5359
5390
  name: t.tagName,
5360
5391
  description: bs(t),
5361
5392
  "doc-url": t.demos?.[0]?.url,
5362
- attributes: Da(t),
5393
+ attributes: Ma(t),
5363
5394
  slots: t.slots?.map((i) => ({
5364
5395
  name: i.name,
5365
5396
  description: i.description
5366
5397
  })),
5367
5398
  // REFACTOR: this was deprecated in the spec: https://github.com/JetBrains/web-types/blob/11e46e47cb65edc1930dc1fae854005ad45ac08f/schema/web-types.json#L866
5368
- events: ti(t),
5399
+ events: si(t),
5369
5400
  js: {
5370
- properties: Ba(t),
5371
- events: ti(t)
5401
+ properties: _a(t),
5402
+ events: si(t)
5372
5403
  }
5373
- })), Ba = (e) => e.members.filter(Os).filter((t) => t.deprecated === void 0).map((t) => ({
5404
+ })), _a = (e) => e.members.filter(Rs).filter((t) => t.deprecated === void 0).map((t) => ({
5374
5405
  name: t.name,
5375
5406
  description: t.description,
5376
5407
  type: t.type?.text
5377
- })) ?? [], ti = (e) => e.events?.filter((t) => t.deprecated === void 0).map((t) => ({
5408
+ })) ?? [], si = (e) => e.events?.filter((t) => t.deprecated === void 0).map((t) => ({
5378
5409
  name: t.name,
5379
5410
  type: t.type?.text,
5380
5411
  description: t.description
5381
- })) ?? [], Ka = (e) => e.filter((t) => t.deprecated === void 0).map((t) => ({
5412
+ })) ?? [], Ua = (e) => e.filter((t) => t.deprecated === void 0).map((t) => ({
5382
5413
  name: t.tagName,
5383
5414
  description: bs(t),
5384
- attributes: _a(t),
5415
+ attributes: Wa(t),
5385
5416
  references: t.demos?.map((i) => ({ name: i.description, url: i.url })) ?? []
5386
- })), _a = (e) => e.attributes?.filter((t) => t.deprecated === void 0).map((t) => ({
5417
+ })), Wa = (e) => e.attributes?.filter((t) => t.deprecated === void 0).map((t) => ({
5387
5418
  name: t.name,
5388
5419
  description: t.description || void 0,
5389
- values: Wa(t)
5390
- })) ?? [], Wa = (e) => e.type.values?.map((t) => t.value ?? "").filter(Boolean).map((t) => ({ name: t })) ?? [], Ua = (e) => ({
5420
+ values: za(t)
5421
+ })) ?? [], za = (e) => e.type.values?.map((t) => t.value ?? "").filter(Boolean).map((t) => ({ name: t })) ?? [], qa = (e) => ({
5391
5422
  $schema: "https://raw.githubusercontent.com/microsoft/vscode-html-languageservice/main/docs/customData.schema.json",
5392
5423
  version: 1.1,
5393
- tags: Ka(e)
5394
- }), za = (e) => ({
5424
+ tags: Ua(e)
5425
+ }), Ha = (e) => ({
5395
5426
  $schema: "https://raw.githubusercontent.com/microsoft/vscode-css-languageservice/main/docs/customData.schema.json",
5396
5427
  version: 1.1,
5397
5428
  properties: ws(e),
5398
5429
  pseudoElements: Ss(e)
5399
- }), Ha = "@arcgis/lumina:generateDocs";
5400
- function qa(e) {
5430
+ }), Va = "@arcgis/lumina:generateDocs";
5431
+ function Ga(e) {
5401
5432
  return e._documentationFileNames.stencilLikeDocsJson !== void 0 && e.provideAssets([
5402
5433
  {
5403
5434
  type: "dynamic",
5404
- source: () => JSON.stringify($a(e), null, nt(e)),
5435
+ source: () => JSON.stringify(ka(e), null, nt(e)),
5405
5436
  destination: u.join("../..", e._documentationFileNames.stencilLikeDocsJson)
5406
5437
  }
5407
5438
  ]), {
5408
- name: Ha,
5439
+ name: Va,
5409
5440
  async writeBundle() {
5410
5441
  if (e.isInStorybook)
5411
5442
  return;
5412
- const t = nt(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);
5413
- if (c.length === 0)
5443
+ const t = nt(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(F);
5444
+ if (l.length === 0)
5414
5445
  return;
5415
- await Ji(c);
5446
+ await Ji(l);
5416
5447
  const d = [];
5417
5448
  if (n !== void 0) {
5418
- const l = JSON.stringify(Ua(e.apiJsonComponents), null, t);
5419
- d.push(_(n, l));
5449
+ const c = JSON.stringify(qa(e.apiJsonComponents), null, t);
5450
+ d.push(z(n, c));
5420
5451
  }
5421
5452
  if (r !== void 0) {
5422
- const l = JSON.stringify(za(e.apiJsonComponents), null, t);
5423
- d.push(_(r, l));
5453
+ const c = JSON.stringify(Ha(e.apiJsonComponents), null, t);
5454
+ d.push(z(r, c));
5424
5455
  }
5425
5456
  if (a !== void 0) {
5426
- const l = Ma(e.apiJsonComponents, typeof i == "object" ? i : {});
5427
- d.push(_(a, JSON.stringify(l, null, t)));
5457
+ const c = Ba(e.apiJsonComponents, typeof i == "object" ? i : {});
5458
+ d.push(z(a, JSON.stringify(c, null, t)));
5428
5459
  }
5429
5460
  await Promise.all(d);
5430
5461
  }
5431
5462
  };
5432
5463
  }
5433
- function Va(e) {
5434
- return {
5435
- name: "@arcgis/lumina:buildWrappers",
5436
- apply: () => e.viteCommand === "build" && !!e.options.build?.wrappers?.length,
5437
- async writeBundle() {
5438
- e.isInStorybook || await Promise.all(
5439
- e.options.build?.wrappers?.map(async (t) => {
5440
- t.type === "react18" && await Ya(e, t);
5441
- }) ?? []
5442
- );
5443
- }
5444
- };
5445
- }
5446
- const Ga = "react", ii = "@lit/react", Xa = `
5447
- import React from "${Ga}";
5448
- import { createComponent } from "${ii}";
5449
- import type { EventName } from "${ii}";
5450
- import { makeReactWrapperFactory, getReactWrapperOptions } from "@arcgis/lumina";
5451
-
5452
- const createWrapper = /*@__PURE__*/ makeReactWrapperFactory(React, createComponent) as typeof createComponent;
5453
- `;
5454
- async function Ya(e, t) {
5455
- const { name: i } = j(), s = [];
5456
- for (const a of e.apiJson.modules)
5457
- for (const c of a.declarations)
5458
- Qa(c) && s.push(Za(c));
5459
- const n = [`/// <reference types="${i}" preserve="true" />`, Xa, ...s].join(""), r = u.resolve(t.proxiesFile);
5460
- await X(u.dirname(r), { recursive: !0 }), await _(r, n);
5461
- }
5462
- function Qa(e) {
5463
- return e.customElement === !0 && e.abstract !== !0;
5464
- }
5465
- function Za(e) {
5466
- const t = e.events?.map(
5467
- (i) => ` ${Xs(`on${Ts(i.name)}`)}: "${i.name}" as EventName<HTML${e.pascalCaseName}Element["${i.name}"]>,`
5468
- ).join(`
5469
- `);
5470
- return `
5471
- /** @deprecated since 5.0. React wrappers are not needed in React 19 or above. Use \`<${e.tagName} />\` directly. */
5472
- export const ${e.pascalCaseName} = /*@__PURE__*/ createWrapper(
5473
- getReactWrapperOptions(
5474
- "${e.tagName}" as unknown as HTML${e.pascalCaseName}Element,
5475
- {${t ? `
5476
- ${t}
5477
- ` : ""}}
5478
- )
5479
- );
5480
- `;
5481
- }
5482
- function kc(e = {}) {
5483
- const t = new $(e), s = [
5464
+ function Ec(e = {}) {
5465
+ const t = new P(e), s = [
5484
5466
  t._plugin,
5485
- qn(t),
5486
- Zn(t),
5487
- so(t),
5488
- Ca(t),
5489
- Mn(t),
5490
- qa(t),
5491
- ba(t),
5492
- vo(t),
5493
- vr(t),
5467
+ Gn(t),
5468
+ to(t),
5469
+ no(t),
5470
+ Ta(t),
5494
5471
  Jn(t),
5472
+ Ga(t),
5495
5473
  Sa(t),
5496
5474
  wo(t),
5497
- co(t),
5498
- Qs(t),
5499
- gn(t),
5500
- Va(t),
5501
- Bn(t)
5502
- ].filter(R);
5475
+ yr(t),
5476
+ Bn(t),
5477
+ Ea(t),
5478
+ Co(t),
5479
+ po(t),
5480
+ Ys(t),
5481
+ hn(t),
5482
+ Kn(t)
5483
+ ].filter(F);
5503
5484
  return s.context = t, s;
5504
5485
  }
5505
- const Ic = {
5486
+ const Tc = {
5506
5487
  initializeComponentDependencies: ki,
5507
5488
  updateLuminaTs: es,
5508
- propertyToAttributeMappings: W,
5489
+ propertyToAttributeMappings: U,
5509
5490
  nativeEvents: gi,
5510
- svgElements: ct,
5511
- mathMlElements: lt,
5491
+ svgElements: lt,
5492
+ mathMlElements: dt,
5512
5493
  alwaysAttributes: ui,
5513
5494
  nativeAlwaysAttributes: mi,
5514
5495
  htmlAlwaysAttributes: Qe
5515
5496
  };
5516
5497
  export {
5517
- Ic as exportsForCodemod,
5518
- De as inferCdnUrl,
5519
- kc as useLumina
5498
+ Tc as exportsForCodemod,
5499
+ Re as inferCdnUrl,
5500
+ Ec as useLumina
5520
5501
  };