@arcgis/lumina-compiler 5.2.0-next.94 → 5.2.0-next.95

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +716 -707
  2. package/package.json +5 -5
package/dist/index.js CHANGED
@@ -1,32 +1,32 @@
1
- import { externalizeDependencies as ys } from "@arcgis/node-toolkit/vite/externalizeDependenciesPlugin";
1
+ import { externalizeDependencies as vs } from "@arcgis/node-toolkit/vite/externalizeDependenciesPlugin";
2
2
  import { isNotUndefined as R } from "@arcgis/toolkit/predicate";
3
3
  import { f as b, l as T } from "./logger-edpIalAo.js";
4
4
  import o from "typescript";
5
- import { camelToKebab as Zt, getPreamble as vs, uncapitalize as bt, capitalize as bs } from "@arcgis/toolkit/string";
6
- import { lazyMetaSubItemJoiner as ws, lazyMetaItemJoiner as Je, lazyMetaGroupJoiner as Ss, propertyFlagAttribute as wt, propertyFlagReflect as Cs, propertyFlagBoolean as Es, propertyFlagNumber as Ts, propertyFlagState as $s, propertyFlagReadOnly as Ps, propertyFlagNoAccessor as ks, propertyFlagUseDefault as Is } from "@arcgis/lumina/config";
7
- import { path as u, isPosix as ei, toPosixPathSeparators as G, toSystemPathSeparators as Re, getCwd as ti } from "@arcgis/node-toolkit/path";
8
- import { isApiMethodAsync as As, globalPackageIdentifier as xs, isApiMethod as Ls, isApiProperty as Ns } from "@arcgis/api-extractor/utils/apiHelpers";
9
- import { existsAsync as _, findPath as ii } from "@arcgis/node-toolkit/file";
10
- import { readFile as z, readdir as nt, mkdir as X, writeFile as K, copyFile as js, rm as Fs, cp as Rs } from "node:fs/promises";
11
- import { retrievePackageJson as j, fetchPackageLocation as $e, asyncRetrievePackageJson as si } from "@arcgis/node-toolkit/packageJson";
12
- import { build as Ds } from "esbuild";
13
- import Os from "mime-types";
14
- import { forEachWithConcurrency as Ms } from "@arcgis/toolkit/promise";
15
- import { glob as Js } from "tinyglobby";
16
- import { renameComponentFolder as Ve } from "@arcgis/api-extractor/extractor/webComponent/pathMapping";
17
- import { useApiExtractor as Bs } from "@arcgis/api-extractor/vite/plugin";
18
- import { writeFileSync as ri } from "node:fs";
19
- import { styleText as _s } from "node:util";
20
- import { unsafeGetUndocumentedPrinter as Ks, unsafeUndocumentedTs as St } from "@arcgis/api-extractor/utils/internalTypeScriptApis";
5
+ import { camelToKebab as ei, getPreamble as bs, uncapitalize as wt, capitalize as ws } from "@arcgis/toolkit/string";
6
+ import { lazyMetaSubItemJoiner as Ss, lazyMetaItemJoiner as Je, lazyMetaGroupJoiner as Cs, propertyFlagAttribute as St, propertyFlagReflect as Es, propertyFlagBoolean as Ts, propertyFlagNumber as $s, propertyFlagState as Ps, propertyFlagReadOnly as ks, propertyFlagNoAccessor as Is, propertyFlagUseDefault as xs } from "@arcgis/lumina/config";
7
+ import { path as u, isPosix as ti, toPosixPathSeparators as G, toSystemPathSeparators as Re, getCwd as ii } from "@arcgis/node-toolkit/path";
8
+ import { isApiMethodAsync as As, globalPackageIdentifier as Ls, isApiMethod as Ns, isApiProperty as js } from "@arcgis/api-extractor/utils/apiHelpers";
9
+ import { existsAsync as _, findPath as si } from "@arcgis/node-toolkit/file";
10
+ import { readFile as z, readdir as ot, mkdir as X, writeFile as K, copyFile as Fs, rm as Rs, cp as Ds } from "node:fs/promises";
11
+ import { retrievePackageJson as j, fetchPackageLocation as $e, asyncRetrievePackageJson as ri } from "@arcgis/node-toolkit/packageJson";
12
+ import { build as Os } from "esbuild";
13
+ import Ms from "mime-types";
14
+ import { forEachWithConcurrency as Js } from "@arcgis/toolkit/promise";
15
+ import { glob as Bs } from "tinyglobby";
16
+ import { renameComponentFolder as Ge } from "@arcgis/api-extractor/extractor/webComponent/pathMapping";
17
+ import { useApiExtractor as _s } from "@arcgis/api-extractor/vite/plugin";
18
+ import { writeFileSync as ni } from "node:fs";
19
+ import { styleText as Ks } from "node:util";
20
+ import { unsafeGetUndocumentedPrinter as Ws, unsafeUndocumentedTs as Ct } from "@arcgis/api-extractor/utils/internalTypeScriptApis";
21
21
  import { pathIsComponentEntrypoint as Pe } from "@arcgis/api-extractor/extractor/webComponent/findComponents";
22
- import { loadApiExtractorConfig as Ws, mergeApiExtractorConfigs as Ct } from "@arcgis/api-extractor/extractor/config";
23
- import { loadTypeScriptConfig as Us } from "@arcgis/node-toolkit/vite/typeScript";
24
- import { mappedFind as Ge } from "@arcgis/toolkit/array";
25
- import { isPropertyEscapeNeeded as ni, maybeEscapePropertyName as zs } from "@arcgis/api-extractor/utils/partPrinter";
26
- import { getPackageNameFromExternalSpecifier as Hs, getMemberName as oi } from "@arcgis/api-extractor/utils/astHelpers";
27
- import { identity as ai } from "@arcgis/toolkit/function";
28
- function qs(e) {
29
- const t = e.options?.build?.dependencies ?? {}, i = ys({
22
+ import { loadApiExtractorConfig as Us, mergeApiExtractorConfigs as Et } from "@arcgis/api-extractor/extractor/config";
23
+ import { loadTypeScriptConfig as zs } from "@arcgis/node-toolkit/vite/typeScript";
24
+ import { mappedFind as Xe } from "@arcgis/toolkit/array";
25
+ import { isPropertyEscapeNeeded as oi, maybeEscapePropertyName as Hs } from "@arcgis/api-extractor/utils/partPrinter";
26
+ import { getPackageNameFromExternalSpecifier as qs, getMemberName as ai } from "@arcgis/api-extractor/utils/astHelpers";
27
+ import { identity as ci } from "@arcgis/toolkit/function";
28
+ function Vs(e) {
29
+ const t = e.options?.build?.dependencies ?? {}, i = vs({
30
30
  bundleIn: t.bundleIn,
31
31
  externalize: [
32
32
  // TODO: remove these once Lit is declared as a peer dependency
@@ -42,7 +42,7 @@ function qs(e) {
42
42
  e.isInStorybook && (i.resolveId = void 0);
43
43
  }, i;
44
44
  }
45
- const Vs = "Fragment", Be = "DynamicHtmlTag", _e = "DynamicSvgTag", ke = /* @__PURE__ */ Symbol("dynamic html tag name"), Xe = /* @__PURE__ */ Symbol("dynamic svg tag name"), ci = /* @__PURE__ */ new Set([
45
+ const Gs = "Fragment", Be = "DynamicHtmlTag", _e = "DynamicSvgTag", ke = /* @__PURE__ */ Symbol("dynamic html tag name"), Ye = /* @__PURE__ */ Symbol("dynamic svg tag name"), li = /* @__PURE__ */ new Set([
46
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
@@ -74,7 +74,7 @@ const Vs = "Fragment", Be = "DynamicHtmlTag", _e = "DynamicSvgTag", ke = /* @__P
74
74
  "vocab",
75
75
  // These don't exist as a property, only as an attribute
76
76
  "exportParts"
77
- ]), li = /* @__PURE__ */ new Set([
77
+ ]), di = /* @__PURE__ */ new Set([
78
78
  /*
79
79
  * From https://github.com/preactjs/preact/blob/f3edc902447dae7393de7fccaff3b722dee79467/src/diff/props.js#L107-L118
80
80
  * See also https://github.com/facebook/react/blob/8fd963a1e5ec89459cac27fb1d9ad193a0604110/packages/react-dom-bindings/src/client/ReactDOMComponent.js#L389
@@ -92,7 +92,7 @@ const Vs = "Fragment", Be = "DynamicHtmlTag", _e = "DynamicSvgTag", ke = /* @__P
92
92
  // These don't exist as a property, only as an attribute
93
93
  "hreflang",
94
94
  "media"
95
- ]), Ye = {
95
+ ]), Qe = {
96
96
  button: /* @__PURE__ */ new Set(["popoverTarget"]),
97
97
  input: /* @__PURE__ */ new Set(["list", "capture"]),
98
98
  iframe: /* @__PURE__ */ new Set(["sandbox"]),
@@ -913,9 +913,9 @@ const Vs = "Fragment", Be = "DynamicHtmlTag", _e = "DynamicSvgTag", ke = /* @__P
913
913
  }
914
914
  }
915
915
  };
916
- di(W.common);
917
- Object.values(W.perElement).forEach(di);
918
- function di(e) {
916
+ pi(W.common);
917
+ Object.values(W.perElement).forEach(pi);
918
+ function pi(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),
921
921
  e.stringifiedReflected
@@ -924,7 +924,7 @@ function di(e) {
924
924
  e.stringifiedNonReflected
925
925
  ));
926
926
  }
927
- const Et = /* @__PURE__ */ new Set(["itemScope"]), pi = /* @__PURE__ */ new Set([
927
+ const Tt = /* @__PURE__ */ new Set(["itemScope"]), ui = /* @__PURE__ */ new Set([
928
928
  "abort",
929
929
  "animationCancel",
930
930
  "animationEnd",
@@ -1023,7 +1023,7 @@ const Et = /* @__PURE__ */ new Set(["itemScope"]), pi = /* @__PURE__ */ new Set(
1023
1023
  "volumeChange",
1024
1024
  "waiting",
1025
1025
  "wheel"
1026
- ]), Gs = /* @__PURE__ */ new Set([
1026
+ ]), Xs = /* @__PURE__ */ new Set([
1027
1027
  "area",
1028
1028
  "base",
1029
1029
  "br",
@@ -1040,7 +1040,7 @@ const Et = /* @__PURE__ */ new Set(["itemScope"]), pi = /* @__PURE__ */ new Set(
1040
1040
  "source",
1041
1041
  "track",
1042
1042
  "wbr"
1043
- ]), ot = /* @__PURE__ */ new Set([
1043
+ ]), at = /* @__PURE__ */ new Set([
1044
1044
  "animate",
1045
1045
  "animateMotion",
1046
1046
  "animateTransform",
@@ -1099,7 +1099,7 @@ const Et = /* @__PURE__ */ new Set(["itemScope"]), pi = /* @__PURE__ */ new Set(
1099
1099
  "tspan",
1100
1100
  "use",
1101
1101
  "view"
1102
- ]), Xs = /* @__PURE__ */ new Set(["title", "svg", "a", "script", "style"]), at = /* @__PURE__ */ new Set([
1102
+ ]), Ys = /* @__PURE__ */ new Set(["title", "svg", "a", "script", "style"]), ct = /* @__PURE__ */ new Set([
1103
1103
  "annotation-xml",
1104
1104
  "annotation",
1105
1105
  "maction",
@@ -1131,7 +1131,7 @@ const Et = /* @__PURE__ */ new Set(["itemScope"]), pi = /* @__PURE__ */ new Set(
1131
1131
  "munder",
1132
1132
  "munderover",
1133
1133
  "semantics"
1134
- ]), Ys = /* @__PURE__ */ new Set([
1134
+ ]), Qs = /* @__PURE__ */ new Set([
1135
1135
  "annotation-xml",
1136
1136
  "color-profile",
1137
1137
  "font-face",
@@ -1141,7 +1141,7 @@ const Et = /* @__PURE__ */ new Set(["itemScope"]), pi = /* @__PURE__ */ new Set(
1141
1141
  "font-face-name",
1142
1142
  "missing-glyph"
1143
1143
  ]);
1144
- function Qs(e) {
1144
+ function Zs(e) {
1145
1145
  if (e.length === 0)
1146
1146
  return "";
1147
1147
  const t = e[0];
@@ -1154,11 +1154,11 @@ function Qs(e) {
1154
1154
  }
1155
1155
  return e.trim().length === 0 ? t : e;
1156
1156
  }
1157
- const Zs = (e) => e.replaceAll("\\", "\\\\").replace(er, "\\${").replaceAll("`", "\\`"), er = /\$\{/gu, tr = (e) => !ir.test(e), ir = /^[^\s"'=<>`]+$/u, sr = /[&<>]/gu, rr = {
1157
+ const er = (e) => e.replaceAll("\\", "\\\\").replace(tr, "\\${").replaceAll("`", "\\`"), tr = /\$\{/gu, ir = (e) => !sr.test(e), sr = /^[^\s"'=<>`]+$/u, rr = /[&<>]/gu, nr = {
1158
1158
  "&": "&amp;",
1159
1159
  "<": "&lt;",
1160
1160
  ">": "&gt;"
1161
- }, ui = (e) => e.replace(sr, (t) => rr[t]), ct = (e) => typeof e == "string" && e.includes("-") && !Ys.has(e), nr = ["keyed", "ref", "repeat", "live"], oe = "staticHtml", Y = "staticSvg", ae = "html", ie = "svg", mi = /* @__PURE__ */ Symbol("maybe HTML namespace or maybe SVG"), fi = "css", gi = "mathml", hi = [fi, ae, gi, oe, Y, ie], or = new Set(hi), ar = ["safeClassMap", "safeStyleMap", "deferLoad", "stabilizedRef"], cr = "nothing", lr = [...nr, ...hi, ...ar, cr], dr = (e) => o.isArrayLiteralExpression(e) && e.elements.every((t) => fe(t)), fe = (e) => o.isJsxElement(e) || o.isJsxSelfClosingElement(e) || o.isJsxFragment(e), se = {
1161
+ }, mi = (e) => e.replace(rr, (t) => nr[t]), lt = (e) => typeof e == "string" && e.includes("-") && !Qs.has(e), or = ["keyed", "ref", "repeat", "live"], oe = "staticHtml", Y = "staticSvg", ae = "html", ie = "svg", fi = /* @__PURE__ */ Symbol("maybe HTML namespace or maybe SVG"), gi = "css", hi = "mathml", yi = [gi, ae, hi, oe, Y, ie], ar = new Set(yi), cr = ["safeClassMap", "safeStyleMap", "deferLoad", "stabilizedRef"], lr = "nothing", dr = [...or, ...yi, ...cr, lr], pr = (e) => o.isArrayLiteralExpression(e) && e.elements.every((t) => fe(t)), fe = (e) => o.isJsxElement(e) || o.isJsxSelfClosingElement(e) || o.isJsxFragment(e), se = {
1162
1162
  [ae]: ["lit", "lit/html.js", "lit-html"],
1163
1163
  /**
1164
1164
  * Sadly, Lit called these "html" and "svg", rather than "staticHtml" and
@@ -1169,8 +1169,8 @@ const Zs = (e) => e.replaceAll("\\", "\\\\").replace(er, "\\${").replaceAll("`",
1169
1169
  [oe]: ["lit/static-html.js", "lit-html/static.js"],
1170
1170
  [ie]: ["lit", "lit-html", "lit/html.js"],
1171
1171
  [Y]: ["lit/static-html.js", "lit-html/static.js"],
1172
- [gi]: ["lit", "lit-html", "lit/html.js"],
1173
- [fi]: ["lit", "@lit/reactive-element/css-tag.js", "@lit/reactive-element"],
1172
+ [hi]: ["lit", "lit-html", "lit/html.js"],
1173
+ [gi]: ["lit", "@lit/reactive-element/css-tag.js", "@lit/reactive-element"],
1174
1174
  safeClassMap: ["@arcgis/lumina"],
1175
1175
  safeStyleMap: ["@arcgis/lumina"],
1176
1176
  deferLoad: ["@arcgis/lumina"],
@@ -1180,7 +1180,7 @@ const Zs = (e) => e.replaceAll("\\", "\\\\").replace(er, "\\${").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
- }, pr = /* @__PURE__ */ new Set([
1183
+ }, ur = /* @__PURE__ */ new Set([
1184
1184
  "h",
1185
1185
  "Fragment",
1186
1186
  "state",
@@ -1190,7 +1190,7 @@ const Zs = (e) => e.replaceAll("\\", "\\\\").replace(er, "\\${").replaceAll("`",
1190
1190
  "bindProperty",
1191
1191
  "bindEvent",
1192
1192
  "bindAttribute"
1193
- ]), ur = /\.(?:css|s[ac]ss|less|styl(?:us)?|postcss|pcss|sss)(\\?|$)/u, le = "@arcgis/lumina:loadLitCss", Ie = "?litCss", Q = "?layeredLitCss", Qe = "?globalFileLitCss", mr = (e) => ({
1193
+ ]), mr = /\.(?:css|s[ac]ss|less|styl(?:us)?|postcss|pcss|sss)(\\?|$)/u, le = "@arcgis/lumina:loadLitCss", Ie = "?litCss", Q = "?layeredLitCss", Ze = "?globalFileLitCss", fr = (e) => ({
1194
1194
  name: le,
1195
1195
  enforce: "pre",
1196
1196
  configResolved(t) {
@@ -1226,18 +1226,18 @@ const Zs = (e) => e.replaceAll("\\", "\\\\").replace(er, "\\${").replaceAll("`",
1226
1226
  l && (a = a.slice(0, -Ie.length));
1227
1227
  const d = a.endsWith(Q);
1228
1228
  d && (a = a.slice(0, -Q.length));
1229
- const c = a.endsWith(Qe);
1230
- if (c && (a = a.slice(0, -Qe.length)), !l && !d && !c)
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(yi) || !f.endsWith(fr) ? (T.warn(
1233
+ return typeof f != "string" || !f.startsWith(vi) || !f.endsWith(gr) ? (T.warn(
1234
1234
  le,
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) : c ? (e._globalCssString = vi(f), { code: "", map: { mappings: "" } }) : {
1238
+ ), m) : c ? (e._globalCssString = bi(f), { code: "", map: { mappings: "" } }) : {
1239
1239
  ...g,
1240
- code: vr(f, e.hmrEnabled, e.shouldMinify, d),
1240
+ code: br(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 Zs = (e) => e.replaceAll("\\", "\\\\").replace(er, "\\${").replaceAll("`",
1247
1247
  }
1248
1248
  };
1249
1249
  }
1250
- }), yi = 'export default "', fr = '"', gr = `import { css } from '${se.css[0]}';
1251
- export const styles = css\``, hr = "`;\nexport default styles;", yr = `
1250
+ }), vi = 'export default "', gr = '"', hr = `import { css } from '${se.css[0]}';
1251
+ export const styles = css\``, yr = "`;\nexport default styles;", vr = `
1252
1252
 
1253
1253
  if(import.meta.hot) {
1254
1254
  import.meta.hot.data.styles ??= styles;
@@ -1259,24 +1259,24 @@ if(import.meta.hot) {
1259
1259
  }
1260
1260
  import.meta.hot.data.styles.styleSheet.replaceSync(nextExports.styles.cssText);
1261
1261
  });
1262
- }`, vi = (e) => e.slice(yi.length - 1);
1263
- function vr(e, t, i, s) {
1264
- const n = vi(e), r = JSON.parse(n), a = Zs(r), l = s ? `@layer{${i ? "" : `
1262
+ }`, bi = (e) => e.slice(vi.length - 1);
1263
+ function br(e, t, i, s) {
1264
+ const n = bi(e), r = JSON.parse(n), a = er(r), l = s ? `@layer{${i ? "" : `
1265
1265
  `}${a}${i ? "" : `
1266
1266
  `}}` : a;
1267
- return `${gr}${l}${hr}${t ? yr : ""}`;
1267
+ return `${hr}${l}${yr}${t ? vr : ""}`;
1268
1268
  }
1269
- function br(e) {
1270
- return `import("${wr}").then(({ setCustomElementsManifest }) => {
1271
- setCustomElementsManifest(${Sr(e)});
1269
+ function wr(e) {
1270
+ return `import("${Sr}").then(({ setCustomElementsManifest }) => {
1271
+ setCustomElementsManifest(${Cr(e)});
1272
1272
  });`;
1273
1273
  }
1274
- const wr = "@storybook/web-components-vite", Sr = (e) => `JSON.parse(\`${Cr(JSON.stringify(JSON.stringify(e)).slice(1, -1))}\`)`;
1275
- function Cr(e) {
1274
+ const Sr = "@storybook/web-components-vite", Cr = (e) => `JSON.parse(\`${Er(JSON.stringify(JSON.stringify(e)).slice(1, -1))}\`)`;
1275
+ function Er(e) {
1276
1276
  return e.replaceAll('\\"', '"').replaceAll("`", "\\`").replaceAll("${", "\\${");
1277
1277
  }
1278
- function Er(e) {
1279
- Tr(e);
1278
+ function Tr(e) {
1279
+ $r(e);
1280
1280
  const t = e.options.css?.globalStylesPath;
1281
1281
  if (t === void 0)
1282
1282
  return "";
@@ -1284,21 +1284,21 @@ function Er(e) {
1284
1284
  return e.viteCommand === "serve" || e.isInStorybook ? [
1285
1285
  `import globalStyles from "${i}${Q}";`,
1286
1286
  "document.adoptedStyleSheets = [...document.adoptedStyleSheets, globalStyles.styleSheet!];",
1287
- wi("", e)
1287
+ Si("", e)
1288
1288
  ].join(`
1289
- `) : `import "${i}${Qe}";`;
1289
+ `) : `import "${i}${Ze}";`;
1290
1290
  }
1291
- const bi = "hydrated";
1292
- function Tr(e) {
1291
+ const wi = "hydrated";
1292
+ function $r(e) {
1293
1293
  e._globalHydratedCssString = [
1294
1294
  ":not([",
1295
- e.options.css?.hydratedAttribute ?? bi,
1295
+ e.options.css?.hydratedAttribute ?? wi,
1296
1296
  "]):is(",
1297
1297
  e.apiJsonComponents.map((t) => t.tagName).join(","),
1298
1298
  "){visibility:hidden}"
1299
1299
  ].join("");
1300
1300
  }
1301
- function wi(e, t) {
1301
+ function Si(e, t) {
1302
1302
  return [
1303
1303
  "const globalCss = new CSSStyleSheet;",
1304
1304
  `globalCss.replaceSync("@layer{${`${t._globalHydratedCssString}${t.shouldMinify ? "" : "\\n\\n"}${e ? e.slice(1, -1) : ""}`}}");`,
@@ -1306,48 +1306,48 @@ function wi(e, t) {
1306
1306
  ].join(`
1307
1307
  `);
1308
1308
  }
1309
- const $r = (e) => `@layer{${e.shouldMinify ? "" : `
1309
+ const Pr = (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 Pr(e) {
1314
+ function kr(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(kr(n, e, s.sourcePath)), t.push(s.sourcePath));
1318
+ n.customElement === !0 && (i.push(Ir(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
- Er(e),
1322
+ Tr(e),
1323
1323
  e.hmrEnabled ? Ar : "",
1324
1324
  "",
1325
- e.isInStorybook ? br(e.apiJson) : "",
1325
+ e.isInStorybook ? wr(e.apiJson) : "",
1326
1326
  "",
1327
1327
  "export const defineCustomElements = makeDefineCustomElements(runtime, {",
1328
1328
  i.join(`,
1329
1329
  `),
1330
1330
  "});",
1331
- e.hmrEnabled ? xr(t) : ""
1331
+ e.hmrEnabled ? Lr(t) : ""
1332
1332
  ].join(`
1333
1333
  `);
1334
1334
  }
1335
- const kr = (e, t, i) => [
1335
+ const Ir = (e, t, i) => [
1336
1336
  ` "${e.tagName}": [`,
1337
1337
  `()=>import("${u.join(t.dir.root, i)}"),`,
1338
- Ir(e),
1338
+ xr(e),
1339
1339
  "]"
1340
1340
  ].join("");
1341
- function Ir(e) {
1342
- const { properties: t, asyncMethods: i, syncMethods: s, formAssociated: n } = Si(e), r = t.map((g) => g.join(ws)).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(Ss)}"` : ""}${n ? ",1" : ""}`;
1341
+ function xr(e) {
1342
+ const { properties: t, asyncMethods: i, syncMethods: s, formAssociated: n } = Ci(e), r = t.map((g) => g.join(Ss)).join(Je), a = i.join(Je), l = s.join(Je), d = [r, a, l], c = d.findLastIndex((g) => g.length > 0), p = d.slice(0, c + 1);
1343
+ return `${p.length > 0 || n ? `"${p.join(Cs)}"` : ""}${n ? ",1" : ""}`;
1344
1344
  }
1345
- function Si(e) {
1345
+ function Ci(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 l = typeof a.attribute == "string", d = l && a.attribute !== Zt(a.name);
1350
+ const l = typeof a.attribute == "string", d = l && a.attribute !== ei(a.name);
1351
1351
  t.push(
1352
1352
  l && !d ? [a.name] : [a.name, d ? String(a.attribute) : ""]
1353
1353
  );
@@ -1357,50 +1357,50 @@ function Si(e) {
1357
1357
  return { tagName: e.tagName, properties: t, asyncMethods: i, syncMethods: s, formAssociated: n };
1358
1358
  }
1359
1359
  const Ar = `import { handleHmrUpdate, handleComponentMetaUpdate } from "@arcgis/lumina/hmrSupport";
1360
- `, xr = (e) => `
1360
+ `, Lr = (e) => `
1361
1361
  if(import.meta.hot) {
1362
1362
  import.meta.hot.on("component-meta-update", handleComponentMetaUpdate);
1363
1363
  import.meta.hot.accept([
1364
1364
  ${e.map((t) => ` "/${t}",`).join(`
1365
1365
  `)}
1366
1366
  ], handleHmrUpdate);
1367
- }`, Lr = "@arcgis/lumina-compiler", Ci = {
1368
- name: Lr
1367
+ }`, Nr = "@arcgis/lumina-compiler", Ei = {
1368
+ name: Nr
1369
1369
  };
1370
- async function Ei(e, t) {
1371
- return re ??= jr(e, t), await re;
1370
+ async function Ti(e, t) {
1371
+ return re ??= Fr(e, t), await re;
1372
1372
  }
1373
- function Nr() {
1374
- if (Ae === void 0)
1373
+ function jr() {
1374
+ if (xe === void 0)
1375
1375
  throw Error(
1376
1376
  b(
1377
1377
  "@arcgis/lumina:retrieveComponentDependencies",
1378
1378
  "Component dependencies have not yet been initialized. Await componentDependenciesPromise promise first."
1379
1379
  )
1380
1380
  );
1381
- return Ae;
1381
+ return xe;
1382
1382
  }
1383
- function Ti() {
1384
- if (Ze === void 0)
1383
+ function $i() {
1384
+ if (et === void 0)
1385
1385
  throw Error(
1386
1386
  b(
1387
1387
  "@arcgis/lumina:retrieveFlatComponentDependencies",
1388
1388
  "Component dependencies have not yet been initialized. Await componentDependenciesPromise promise first."
1389
1389
  )
1390
1390
  );
1391
- return Ze;
1391
+ return et;
1392
1392
  }
1393
- async function jr(e, t) {
1393
+ async function Fr(e, t) {
1394
1394
  const i = j(e), s = i.dependencies ?? {}, n = i.peerDependencies ?? {}, a = (await Promise.all(
1395
- [...Object.keys(s), ...Object.keys(n)].filter((c) => !Fr.has(c)).flatMap(async (c) => await $i(c, e))
1395
+ [...Object.keys(s), ...Object.keys(n)].filter((c) => !Rr.has(c)).flatMap(async (c) => await Pi(c, e))
1396
1396
  )).filter(R);
1397
- Ae ??= a, Ze = Object.fromEntries(a.flatMap((c) => Object.entries(c.components)));
1397
+ xe ??= a, et = Object.fromEntries(a.flatMap((c) => Object.entries(c.components)));
1398
1398
  const l = t?.serve?.extraDependencies?.map(
1399
1399
  (c) => typeof c == "string" ? c : c.name
1400
1400
  ), d = l === void 0 ? a : a.filter((c) => !l.includes(c.packageName));
1401
- return Ae ??= d, d;
1401
+ return xe ??= d, d;
1402
1402
  }
1403
- const Fr = /* @__PURE__ */ new Set([
1403
+ const Rr = /* @__PURE__ */ new Set([
1404
1404
  "@arcgis/arcade-languageservice",
1405
1405
  "@arcgis/node-toolkit",
1406
1406
  "@arcgis/toolkit",
@@ -1439,30 +1439,30 @@ const Fr = /* @__PURE__ */ new Set([
1439
1439
  "vscode-languageserver-textdocument",
1440
1440
  "vscode-languageserver-types"
1441
1441
  ]);
1442
- let Ae, Ze, re;
1443
- async function $i(e, t) {
1444
- const i = await $e(e, t), s = await si(i), n = "exports" in s, r = zr.bind(void 0, n), a = "@stencil/core" in (s.dependencies ?? {}) || "@stencil/core" in (s.devDependencies ?? {}), l = u.join(i, "dist/esm/loader.js");
1442
+ let xe, et, re;
1443
+ async function Pi(e, t) {
1444
+ const i = await $e(e, t), s = await ri(i), n = "exports" in s, r = Hr.bind(void 0, n), a = "@stencil/core" in (s.dependencies ?? {}) || "@stencil/core" in (s.devDependencies ?? {}), l = u.join(i, "dist/esm/loader.js");
1445
1445
  if (a ? await _(l) : !1) {
1446
- const g = await z(l, "utf8"), h = Rr(g, "bootstrapLazy("), y = g.indexOf(", options", h), v = g.slice(h, y), w = v.startsWith('JSON.parse("') ? v.slice(12, -2).replaceAll('\\"', '"') : v;
1446
+ const g = await z(l, "utf8"), h = Dr(g, "bootstrapLazy("), y = g.indexOf(", options", h), v = g.slice(h, y), w = v.startsWith('JSON.parse("') ? v.slice(12, -2).replaceAll('\\"', '"') : v;
1447
1447
  try {
1448
- const C = JSON.parse(w), E = Wr(C, { packageName: e, getImportPath: r });
1448
+ const C = JSON.parse(w), E = Ur(C, { packageName: e, getImportPath: r });
1449
1449
  return { packageName: e, type: "stencil", components: E, packageLocation: i, packageJson: s };
1450
1450
  } catch (C) {
1451
1451
  T.warn("@arcgis/lumina", `Failed to parse dist/esm/loader.js for ${e}.
1452
1452
  Error: ${String(C)}`);
1453
1453
  }
1454
1454
  }
1455
- const c = Tt(s.customElements);
1455
+ const c = $t(s.customElements);
1456
1456
  if (c != null) {
1457
- const g = u.join(i, c), h = JSON.parse(await z(g, "utf-8")), y = Dr(h), v = Pi(h, {
1457
+ const g = u.join(i, c), h = JSON.parse(await z(g, "utf-8")), y = Or(h), v = ki(h, {
1458
1458
  packageName: e,
1459
1459
  getImportPath: r
1460
1460
  });
1461
1461
  return { type: y ? "@arcgis/lumina" : "unknown", packageName: e, components: v, packageLocation: i, packageJson: s };
1462
1462
  }
1463
- const p = Tt(s["web-types"]);
1463
+ const p = $t(s["web-types"]);
1464
1464
  if (p != null) {
1465
- const g = u.join(i, p), h = JSON.parse(await z(g, "utf-8")), y = Or(h, {
1465
+ const g = u.join(i, p), h = JSON.parse(await z(g, "utf-8")), y = Mr(h, {
1466
1466
  packageName: e,
1467
1467
  getImportPath: r
1468
1468
  });
@@ -1470,19 +1470,19 @@ Error: ${String(C)}`);
1470
1470
  }
1471
1471
  const m = u.join(i, "dist/components");
1472
1472
  if (await _(m)) {
1473
- const g = await Ur(m, {
1473
+ const g = await zr(m, {
1474
1474
  packageName: e,
1475
1475
  getImportPath: r
1476
1476
  });
1477
1477
  return { type: "unknown", packageName: e, components: g, packageLocation: i, packageJson: s };
1478
1478
  }
1479
1479
  }
1480
- const Tt = (e) => Array.isArray(e) ? e[0] : e;
1481
- function Rr(e, t) {
1480
+ const $t = (e) => Array.isArray(e) ? e[0] : e;
1481
+ function Dr(e, t) {
1482
1482
  const i = e.indexOf(t);
1483
1483
  return i === -1 ? -1 : i + t.length;
1484
1484
  }
1485
- function Pi(e, t, i = !1) {
1485
+ function ki(e, t, i = !1) {
1486
1486
  const s = /* @__PURE__ */ Object.create(null);
1487
1487
  if (e.modules === void 0)
1488
1488
  return s;
@@ -1519,11 +1519,11 @@ function Pi(e, t, i = !1) {
1519
1519
  }
1520
1520
  return s;
1521
1521
  }
1522
- const Dr = (e) => (
1522
+ const Or = (e) => (
1523
1523
  // Since 5.0
1524
1524
  e.compiler?.name === "@arcgis/api-extractor" || // Before 5.0
1525
- e.compiler?.name === Ci.name
1526
- ), Or = (e, t) => Object.fromEntries(
1525
+ e.compiler?.name === Ei.name
1526
+ ), Mr = (e, t) => Object.fromEntries(
1527
1527
  (e.contributions?.html?.elements ?? e.contributions?.html?.tags)?.map(
1528
1528
  (i) => [
1529
1529
  i.name,
@@ -1534,7 +1534,7 @@ const Dr = (e) => (
1534
1534
  }
1535
1535
  ]
1536
1536
  ) ?? []
1537
- ), Mr = 1, Jr = 2, Br = 4, _r = 8, Kr = Mr | Jr | Br | _r, Wr = (e, t) => Object.fromEntries(
1537
+ ), Jr = 1, Br = 2, _r = 4, Kr = 8, Wr = Jr | Br | _r | Kr, Ur = (e, t) => Object.fromEntries(
1538
1538
  e.flatMap(
1539
1539
  ([i, s]) => s.map(
1540
1540
  ([n, r, a]) => [
@@ -1543,14 +1543,14 @@ const Dr = (e) => (
1543
1543
  packageName: t.packageName,
1544
1544
  modulePath: t.getImportPath(r),
1545
1545
  propToAttribute: Object.fromEntries(
1546
- Object.entries(a ?? {}).filter(([l, [d]]) => d & Kr).map(([l, [d, c = l]]) => [l, c])
1546
+ Object.entries(a ?? {}).filter(([l, [d]]) => d & Wr).map(([l, [d, c = l]]) => [l, c])
1547
1547
  )
1548
1548
  }
1549
1549
  ]
1550
1550
  )
1551
1551
  )
1552
- ), Ur = async (e, t) => Object.fromEntries(
1553
- (await nt(e)).filter((i) => i.endsWith(".d.ts")).map((i) => {
1552
+ ), zr = async (e, t) => Object.fromEntries(
1553
+ (await ot(e)).filter((i) => i.endsWith(".d.ts")).map((i) => {
1554
1554
  const s = i.slice(0, -5);
1555
1555
  return [
1556
1556
  s,
@@ -1561,30 +1561,30 @@ const Dr = (e) => (
1561
1561
  }
1562
1562
  ];
1563
1563
  })
1564
- ), zr = (e, t) => e ? `components/${t}` : `dist/components/${t}.js`, Hr = (e) => e.startsWith("/") ? e : `/${e}`, lt = (e, t) => `${e}@fs${Hr(t)}`;
1565
- function qr(e, t) {
1564
+ ), Hr = (e, t) => e ? `components/${t}` : `dist/components/${t}.js`, qr = (e) => e.startsWith("/") ? e : `/${e}`, dt = (e, t) => `${e}@fs${qr(t)}`;
1565
+ function Vr(e, t) {
1566
1566
  const i = u.resolve(e), s = u.resolve(i, t.split(/[?#]/u)[0].replace(/^[/\\]+/u, "")), n = u.relative(i, s);
1567
1567
  return n === ".." || n.startsWith(`..${u.sep}`) || u.isAbsolute(n) ? void 0 : s;
1568
1568
  }
1569
- function ki(e) {
1569
+ function Ii(e) {
1570
1570
  const t = e?.apiExtractorPluginConfig.unsafeConfigOverride?.types?.typeScriptConfig?.config.options.target ?? o.ScriptTarget.ESNext, i = o.ScriptTarget[t].toLowerCase();
1571
1571
  return i === "latest" ? "esnext" : i;
1572
1572
  }
1573
- const et = "@arcgis/lumina:provideAssets";
1574
- function te(e, t, i = dt, s = "max-age=31536000, immutable") {
1573
+ const tt = "@arcgis/lumina:provideAssets";
1574
+ function te(e, t, i = pt, s = "max-age=31536000, immutable") {
1575
1575
  if (e.viteCommand !== "serve")
1576
- throw Error(b(et, "serveAssets() is only available when Vite is running in serve mode"));
1576
+ throw Error(b(tt, "serveAssets() is only available when Vite is running in serve mode"));
1577
1577
  const n = e._serverConfigured, r = e.server.middlewares.stack.length;
1578
1578
  if (t.forEach((a) => {
1579
- const l = Ai(a), d = Li(e.dir, xi(l)), c = Gr(e.viteConfig.base, d, e.dir.distCdn);
1579
+ const l = Ai(a), d = Ni(e.dir, Li(l)), c = Xr(e.viteConfig.base, d, e.dir.distCdn);
1580
1580
  e.server.middlewares.use(c, (p, m, f) => {
1581
- const g = Xr(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));
1581
+ const g = Yr(p.url), h = l.type === "directory" ? Vr(l.source, g) : l.source, y = u.join(d, g), v = i.find((w) => w.match(y, e));
1582
1582
  return h === void 0 ? (m.statusCode = 403, m.end(), !0) : ((typeof h == "function" ? Promise.resolve(h()) : z(h)).then((w) => {
1583
1583
  const C = (typeof h == "function" ? void 0 : v?.transform(w.toString("utf8"), y, e)) ?? w;
1584
- m.setHeader("Cache-Control", s), m.setHeader("Content-Type", Os.lookup(g) || "application/octet-stream"), m.write(C), m.end();
1584
+ m.setHeader("Cache-Control", s), m.setHeader("Content-Type", Ms.lookup(g) || "application/octet-stream"), m.write(C), m.end();
1585
1585
  }).catch((w) => {
1586
1586
  (l.type !== "directory" || process.env.DEBUG) && T.warn(
1587
- et,
1587
+ tt,
1588
1588
  `Error occurred when trying to serve a file in response to request for "${p.originalUrl ?? g}":${String(w)}`
1589
1589
  ), f();
1590
1590
  }), !0);
@@ -1594,22 +1594,22 @@ function te(e, t, i = dt, s = "max-age=31536000, immutable") {
1594
1594
  e.server.middlewares.stack.splice(0, 0, ...a);
1595
1595
  }
1596
1596
  }
1597
- async function Ii(e, t, i = dt) {
1597
+ async function xi(e, t, i = pt) {
1598
1598
  await Promise.all(
1599
1599
  t.map(async (s) => {
1600
- const n = Ai(s), r = Li(e.dir, xi(n));
1600
+ const n = Ai(s), r = Ni(e.dir, Li(n));
1601
1601
  if (n.type === "directory") {
1602
- const a = u.resolve(n.source), d = (await nt(a, { recursive: !0, withFileTypes: !0 })).filter((c) => c.isFile()).map((c) => {
1602
+ const a = u.resolve(n.source), d = (await ot(a, { recursive: !0, withFileTypes: !0 })).filter((c) => c.isFile()).map((c) => {
1603
1603
  const p = u.resolve(c.parentPath, c.name), m = u.relative(a, p), f = u.join(r, m);
1604
1604
  return [p, f];
1605
1605
  });
1606
- await ji(d.map(([c, p]) => p)), await Ms(
1606
+ await Fi(d.map(([c, p]) => p)), await Js(
1607
1607
  d,
1608
1608
  16,
1609
- async ([c, p]) => await $t(c, p, i, e)
1609
+ async ([c, p]) => await Pt(c, p, i, e)
1610
1610
  );
1611
1611
  } else if (n.type === "file")
1612
- await X(u.dirname(r), { recursive: !0 }), await $t(n.source, r, i, e);
1612
+ await X(u.dirname(r), { recursive: !0 }), await Pt(n.source, r, i, e);
1613
1613
  else if (n.type === "dynamic") {
1614
1614
  await X(u.dirname(r), { recursive: !0 });
1615
1615
  const a = await Promise.resolve(n.source());
@@ -1618,7 +1618,7 @@ async function Ii(e, t, i = dt) {
1618
1618
  })
1619
1619
  );
1620
1620
  }
1621
- const Ai = ei ? (e) => e : (e) => e.type === "dynamic" ? {
1621
+ const Ai = ti ? (e) => e : (e) => e.type === "dynamic" ? {
1622
1622
  ...e,
1623
1623
  destination: G(e.destination)
1624
1624
  } : {
@@ -1626,23 +1626,23 @@ const Ai = ei ? (e) => e : (e) => e.type === "dynamic" ? {
1626
1626
  source: G(e.source),
1627
1627
  destination: G(e.destination)
1628
1628
  };
1629
- async function $t(e, t, i, s) {
1629
+ async function Pt(e, t, i, s) {
1630
1630
  const n = i.find((r) => r.match(t, s));
1631
1631
  if (n === void 0)
1632
- await js(e, t);
1632
+ await Fs(e, t);
1633
1633
  else {
1634
1634
  const r = await z(e, "utf8"), a = n.transform(r, t, s);
1635
1635
  await K(t, a);
1636
1636
  }
1637
1637
  }
1638
- function xi(e) {
1638
+ function Li(e) {
1639
1639
  if (e.type === "dynamic")
1640
1640
  return e.destination;
1641
1641
  if (e.source.endsWith(u.sep)) {
1642
1642
  if (e.type === "file")
1643
1643
  throw Error(
1644
1644
  b(
1645
- et,
1645
+ tt,
1646
1646
  `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 \\`
1647
1647
  )
1648
1648
  );
@@ -1650,40 +1650,40 @@ function xi(e) {
1650
1650
  }
1651
1651
  return e.destination === "" ? u.basename(e.source) : e.destination.endsWith(u.sep) ? e.type === "directory" && e.destination === u.sep ? e.destination : u.join(e.destination, u.basename(e.source)) : e.destination;
1652
1652
  }
1653
- function Li({ dist: e, distCdnAssets: t }, i) {
1654
- const s = Vr(i), n = u.join(
1653
+ function Ni({ dist: e, distCdnAssets: t }, i) {
1654
+ const s = Gr(i), n = u.join(
1655
1655
  t,
1656
1656
  s ? u.relative(t, i) : i
1657
- ), r = u.relative(e, n), a = Ni(r);
1657
+ ), r = u.relative(e, n), a = ji(r);
1658
1658
  return u.join(e, a);
1659
1659
  }
1660
- function Vr(e) {
1660
+ function Gr(e) {
1661
1661
  if (e.startsWith(u.sep)) {
1662
- const t = ti(), i = t.startsWith(u.sep) ? t.split(u.sep)[1] ?? "" : "";
1662
+ const t = ii(), i = t.startsWith(u.sep) ? t.split(u.sep)[1] ?? "" : "";
1663
1663
  return e.startsWith(`/${i}/`) || e.startsWith("/Users/");
1664
1664
  } else
1665
- return !!(!ei && u.isAbsolute(e));
1665
+ return !!(!ti && u.isAbsolute(e));
1666
1666
  }
1667
- function Gr(e, t, i) {
1668
- const s = Ni(u.relative(i, t)), n = s.startsWith("/") ? s.slice(1) : s;
1667
+ function Xr(e, t, i) {
1668
+ const s = ji(u.relative(i, t)), n = s.startsWith("/") ? s.slice(1) : s;
1669
1669
  return `${e}${n}`;
1670
1670
  }
1671
- const Ni = (e) => e.replaceAll("../", ""), Xr = (e = "") => e.split("?")[0].split("#")[0];
1672
- async function ji(e) {
1671
+ const ji = (e) => e.replaceAll("../", ""), Yr = (e = "") => e.split("?")[0].split("#")[0];
1672
+ async function Fi(e) {
1673
1673
  const t = new Set(e.map(u.dirname));
1674
1674
  await Promise.all(Array.from(t, async (i) => await X(i, { recursive: !0 })));
1675
1675
  }
1676
- const Yr = {
1676
+ const Qr = {
1677
1677
  match: (e, t) => t.environment === "production" && e.endsWith(".json"),
1678
1678
  transform: (e) => JSON.stringify(JSON.parse(e))
1679
- }, dt = [Yr], xe = "@arcgis/core", me = "@arcgis/core/assets", Ke = j(), H = xe in (Ke.dependencies ?? {}) || xe in (Ke.peerDependencies ?? {}) || // Does not depend on `@arcgis/core` to avoid cycle, but uses core in Lumina tests
1679
+ }, pt = [Qr], Ae = "@arcgis/core", me = "@arcgis/core/assets", Ke = j(), H = Ae in (Ke.dependencies ?? {}) || Ae in (Ke.peerDependencies ?? {}) || // Does not depend on `@arcgis/core` to avoid cycle, but uses core in Lumina tests
1680
1680
  Ke.name === "@arcgis/lumina";
1681
- async function Qr(e, t, i, s) {
1681
+ async function Zr(e, t, i, s) {
1682
1682
  if (!H)
1683
1683
  return [];
1684
- const n = e._localCdnCore, r = n?.packageLocation ?? await $e(xe);
1684
+ const n = e._localCdnCore, r = n?.packageLocation ?? await $e(Ae);
1685
1685
  if (i === "cdn") {
1686
- const a = await si(r), l = De({ name: "", version: a.version }, s);
1686
+ const a = await ri(r), l = De({ name: "", version: a.version }, s);
1687
1687
  return [
1688
1688
  // Use the ESM CDN
1689
1689
  // <script src="https://jsdev.arcgis.com/VERSION/"><\/script>
@@ -1699,18 +1699,18 @@ async function Qr(e, t, i, s) {
1699
1699
  })
1700
1700
  },
1701
1701
  // <link rel="stylesheet" id="arcgisCoreStylesheet" href="https://jsdev.arcgis.com/VERSION/esri/themes/light/main.css" />
1702
- Fi(l)
1702
+ Ri(l)
1703
1703
  ];
1704
1704
  } else
1705
- return Zr(t, r, n?.sourceLocation !== void 0);
1705
+ return en(t, r, n?.sourceLocation !== void 0);
1706
1706
  }
1707
- function Zr(e, t, i) {
1707
+ function en(e, t, i) {
1708
1708
  const s = `${e}${me}`;
1709
1709
  return [
1710
1710
  // Browser tests import this as a Vite CSS module and adopt its stylesheet, so CSS must remain on the /@fs route.
1711
1711
  // Core's prebuilt JavaScript assets use the untransformed route configured below.
1712
- Fi(
1713
- i ? `${e}${me}/` : lt(e, `${t}/assets/`)
1712
+ Ri(
1713
+ i ? `${e}${me}/` : dt(e, `${t}/assets/`)
1714
1714
  ),
1715
1715
  {
1716
1716
  // This import is injected dynamically, so external consumers must tell Vite to optimize it. Within the monorepo,
@@ -1723,8 +1723,8 @@ function Zr(e, t, i) {
1723
1723
  }
1724
1724
  ];
1725
1725
  }
1726
- async function en(e) {
1727
- const t = e._localCdnCore, i = t?.packageLocation ?? await $e(xe), s = t?.sourceLocation !== void 0 ? [
1726
+ async function tn(e) {
1727
+ const t = e._localCdnCore, i = t?.packageLocation ?? await $e(Ae), s = t?.sourceLocation !== void 0 ? [
1728
1728
  {
1729
1729
  type: "directory",
1730
1730
  source: u.join(t.sourceLocation, u.sep),
@@ -1767,23 +1767,23 @@ async function en(e) {
1767
1767
  r.setHeader("Cache-Control", "no-cache"), r.setHeader("Content-Type", "text/plain"), r.end(JSON.stringify({ version: j(i).version }));
1768
1768
  }), te(e, s, [], "no-cache");
1769
1769
  }
1770
- const Fi = (e) => ({
1770
+ const Ri = (e) => ({
1771
1771
  // Not using join() because it would turn https:// into https:/
1772
1772
  cssHref: `${e}esri/themes/light/main.css`,
1773
1773
  // This is used be the theme switcher in `@arcgis/storybook-utils`
1774
1774
  id: "arcgisCoreStylesheet"
1775
- }), pt = "customElement.js";
1776
- function tn(e, t) {
1775
+ }), ut = "customElement.js";
1776
+ function sn(e, t) {
1777
1777
  if (!t.startsWith(e))
1778
1778
  return t;
1779
1779
  const s = t.split(u.sep);
1780
- return s.at(sn) !== s.at(rn) ? t : u.join(s.slice(0, -1).join(u.sep), pt);
1780
+ return s.at(rn) !== s.at(nn) ? t : u.join(s.slice(0, -1).join(u.sep), ut);
1781
1781
  }
1782
- const sn = -1, rn = -2, nn = /["']\.\.?\/[^'"]+/gu, on = (e, t, i, s) => e.replaceAll(nn, (n) => {
1782
+ const rn = -1, nn = -2, on = /["']\.\.?\/[^'"]+/gu, an = (e, t, i, s) => e.replaceAll(on, (n) => {
1783
1783
  const r = n.slice(1);
1784
1784
  if (!r.startsWith("./") && !r.startsWith("../"))
1785
1785
  return n;
1786
- const a = u.join(s, r), l = !r.endsWith(".js") && !r.split("/").at(-1).includes(".") ? tn(t.dir.distComponents, a) : a, d = l.startsWith(t.dir.distComponents) ? t.dir.dist + Ve(l.slice(t.dir.dist.length), t.apiExtractor) : l;
1786
+ const a = u.join(s, r), l = !r.endsWith(".js") && !r.split("/").at(-1).includes(".") ? sn(t.dir.distComponents, a) : a, d = l.startsWith(t.dir.distComponents) ? t.dir.dist + Ge(l.slice(t.dir.dist.length), t.apiExtractor) : l;
1787
1787
  if (i === s && a === d)
1788
1788
  return n;
1789
1789
  const c = he(i, d), p = n.endsWith("/") ? `${c}/` : c;
@@ -1792,12 +1792,12 @@ const sn = -1, rn = -2, nn = /["']\.\.?\/[^'"]+/gu, on = (e, t, i, s) => e.repla
1792
1792
  const i = u.relative(e, t);
1793
1793
  return i.startsWith(".") ? i : `.${u.sep}${i}`;
1794
1794
  };
1795
- async function an(e, t, i) {
1795
+ async function cn(e, t, i) {
1796
1796
  const s = u.resolve(e.dir.root, t);
1797
- e.viteConfig.build.emptyOutDir !== !1 && await _(s) && await Fs(s, { recursive: !0, force: !0 }), await X(s, { recursive: !0 }), await Rs(e.dir.distCdn, u.join(s, "build"), { recursive: !0 });
1797
+ e.viteConfig.build.emptyOutDir !== !1 && await _(s) && await Rs(s, { recursive: !0, force: !0 }), await X(s, { recursive: !0 }), await Ds(e.dir.distCdn, u.join(s, "build"), { recursive: !0 });
1798
1798
  const n = [
1799
1799
  "index.html",
1800
- ...await Js("**/*.html", {
1800
+ ...await Bs("**/*.html", {
1801
1801
  cwd: e.dir.src,
1802
1802
  onlyFiles: !0,
1803
1803
  // The files we are looking for are unlikely to be symbolic links
@@ -1825,7 +1825,7 @@ async function an(e, t, i) {
1825
1825
  const y = await z(g, "utf-8"), v = he(u.dirname(f), `build/${i}`), w = `${d}<script type="module" src="${v}"><\/script>
1826
1826
  `, C = Math.min(
1827
1827
  ...[y.indexOf("<style>"), y.indexOf("<script"), y.indexOf("</head>")].filter(
1828
- (A) => A !== -1
1828
+ (x) => x !== -1
1829
1829
  )
1830
1830
  );
1831
1831
  if (C === Number.POSITIVE_INFINITY)
@@ -1835,7 +1835,7 @@ async function an(e, t, i) {
1835
1835
  })
1836
1836
  ), await e.options.build?.webApp?.afterBuildEnd?.(e);
1837
1837
  }
1838
- const Ri = /* @__PURE__ */ new Set([
1838
+ const Di = /* @__PURE__ */ new Set([
1839
1839
  "chunks",
1840
1840
  "components",
1841
1841
  "docs",
@@ -1848,13 +1848,13 @@ const Ri = /* @__PURE__ */ new Set([
1848
1848
  "collection",
1849
1849
  "extras",
1850
1850
  "support"
1851
- ]), O = "@arcgis/lumina:buildCdn", ce = "cdn", Di = "index", Z = "main";
1852
- function cn(e) {
1851
+ ]), O = "@arcgis/lumina:buildCdn", ce = "cdn", Oi = "index", Z = "main";
1852
+ function ln(e) {
1853
1853
  const { skip: t = !1, namespace: i, esbuildOptions: s = {}, entrypointTransformer: n } = e.options.build?.cdn ?? {}, r = e.options.build?.webApp?.destination, a = i !== void 0;
1854
1854
  if (a) {
1855
1855
  if (i.toLowerCase() !== i)
1856
1856
  throw new Error(`Expected CDN namespace to be all lowercase. Received: ${i}`);
1857
- if (Ri.has(i))
1857
+ if (Di.has(i))
1858
1858
  throw new Error(
1859
1859
  `Namespace name "${i}" is restricted as it collides with a well-known Lumina dist/ folder name or Stencil dist/ folder name.`
1860
1860
  );
@@ -1862,11 +1862,11 @@ function cn(e) {
1862
1862
  'The "namespace" option in the "build.cdn" is deprecated and will be removed in the next major version.'
1863
1863
  );
1864
1864
  }
1865
- const l = i ?? Di;
1865
+ const l = i ?? Oi;
1866
1866
  if (e.provideAssets([
1867
1867
  {
1868
1868
  type: "dynamic",
1869
- source: () => $r(e),
1869
+ source: () => Pr(e),
1870
1870
  destination: `../${a ? l : Z}.css`
1871
1871
  }
1872
1872
  ]), !t)
@@ -1882,7 +1882,7 @@ function cn(e) {
1882
1882
  );
1883
1883
  return;
1884
1884
  }
1885
- const d = H && j().name !== "@arcgis/embeddable-components", c = Date.now(), p = Array.isArray(s.entryPoints) ? s.entryPoints.map((g) => typeof g == "string" ? { in: g, out: "" } : g) : typeof s.entryPoints == "object" ? Object.entries(s.entryPoints).map(([g, h]) => ({ in: h, out: g })) : [], m = await ln(
1885
+ const d = H && j().name !== "@arcgis/embeddable-components", c = Date.now(), p = Array.isArray(s.entryPoints) ? s.entryPoints.map((g) => typeof g == "string" ? { in: g, out: "" } : g) : typeof s.entryPoints == "object" ? Object.entries(s.entryPoints).map(([g, h]) => ({ in: h, out: g })) : [], m = await dn(
1886
1886
  e,
1887
1887
  l,
1888
1888
  s,
@@ -1890,7 +1890,7 @@ function cn(e) {
1890
1890
  n,
1891
1891
  d
1892
1892
  );
1893
- await dn(
1893
+ await pn(
1894
1894
  m,
1895
1895
  e,
1896
1896
  a ? `${l}.esm` : l,
@@ -1898,11 +1898,11 @@ function cn(e) {
1898
1898
  d
1899
1899
  );
1900
1900
  const f = Date.now();
1901
- T.info(O, `CDN was built in ${f - c}ms`), r && await an(e, r, `${a ? `${l}.esm` : l}.js`);
1901
+ T.info(O, `CDN was built in ${f - c}ms`), r && await cn(e, r, `${a ? `${l}.esm` : l}.js`);
1902
1902
  }
1903
1903
  };
1904
1904
  }
1905
- async function ln(e, t, i, s, n, r) {
1905
+ async function dn(e, t, i, s, n, r) {
1906
1906
  const a = e.environment;
1907
1907
  if (i.minify && r)
1908
1908
  throw Error(
@@ -1925,8 +1925,8 @@ async function ln(e, t, i, s, n, r) {
1925
1925
  * The script's file name will be stripped inside defineCustomElements.
1926
1926
  **/
1927
1927
  defineCustomElements({resourcesUrl: import.meta.url});
1928
- ${wi(e._globalCssString, e)}`, d = n?.(l, e) ?? l;
1929
- return await Ds({
1928
+ ${Si(e._globalCssString, e)}`, d = n?.(l, e) ?? l;
1929
+ return await Os({
1930
1930
  bundle: !0,
1931
1931
  minify: r ? !0 : a === "production",
1932
1932
  treeShaking: !0,
@@ -1951,7 +1951,7 @@ ${wi(e._globalCssString, e)}`, d = n?.(l, e) ?? l;
1951
1951
  chunkNames: "[hash]",
1952
1952
  resolveExtensions: [".js", ".json"],
1953
1953
  banner: { js: e.banner },
1954
- target: ki(e),
1954
+ target: Ii(e),
1955
1955
  ...i,
1956
1956
  write: !1,
1957
1957
  plugins: [
@@ -2010,8 +2010,8 @@ ${wi(e._globalCssString, e)}`, d = n?.(l, e) ?? l;
2010
2010
  }
2011
2011
  });
2012
2012
  }
2013
- const Pt = "stdin.js";
2014
- async function dn(e, t, i, s, n) {
2013
+ const kt = "stdin.js";
2014
+ async function pn(e, t, i, s, n) {
2015
2015
  const r = t.dir.distCdn, a = `${i}.js`;
2016
2016
  let l;
2017
2017
  n && (l = new Set(s.map((p) => `${p.out}.js`)), l.add(a));
@@ -2023,15 +2023,15 @@ async function dn(e, t, i, s, n) {
2023
2023
  isAsync: void 0,
2024
2024
  oldSingleExportName: void 0
2025
2025
  }, f = G(p.path.slice(r.length));
2026
- if (f === Pt) {
2026
+ if (f === kt) {
2027
2027
  if (n) {
2028
- const h = p.text.match(pn)?.[0];
2028
+ const h = p.text.match(un)?.[0];
2029
2029
  if (h === void 0)
2030
2030
  throw Error(
2031
- `Failed to find the runtime variable name in the CDN entrypoint file. This likely indicates a bug in Lumina. ${Pt} contents:
2031
+ `Failed to find the runtime variable name in the CDN entrypoint file. This likely indicates a bug in Lumina. ${kt} contents:
2032
2032
  ${p.text}`
2033
2033
  );
2034
- m.code = `${m.code.trimEnd()}${un(h, s)}`, m.isAsync = !1;
2034
+ m.code = `${m.code.trimEnd()}${mn(h, s)}`, m.isAsync = !1;
2035
2035
  }
2036
2036
  return [a, m];
2037
2037
  }
@@ -2041,7 +2041,7 @@ ${p.text}`
2041
2041
  n && d.forEach((p, m) => {
2042
2042
  if (p.isAsync === void 0)
2043
2043
  if (m.endsWith(".js")) {
2044
- if (Oi(p, d), l?.has(m) === !0 && p.code.includes(Mi))
2044
+ if (Mi(p, d), l?.has(m) === !0 && p.code.includes(Ji))
2045
2045
  throw Error(
2046
2046
  b(
2047
2047
  O,
@@ -2061,8 +2061,8 @@ ${p.text}`
2061
2061
  }
2062
2062
  await Promise.all(c.values()), await Promise.all(Array.from(d.entries(), async ([p, { code: m }]) => await K(r + p, m)));
2063
2063
  }
2064
- const pn = /(?<=;var [a-zA-Z$_]=[a-zA-Z$_]\()[a-zA-Z$_](?=,\{")/u;
2065
- function un(e, t) {
2064
+ const un = /(?<=;var [a-zA-Z$_]=[a-zA-Z$_]\()[a-zA-Z$_](?=,\{")/u;
2065
+ function mn(e, t) {
2066
2066
  let i = [
2067
2067
  "window.$arcgis",
2068
2068
  "||",
@@ -2103,30 +2103,30 @@ function un(e, t) {
2103
2103
  }
2104
2104
  return i += ")", i;
2105
2105
  }
2106
- function Oi(e, t) {
2106
+ function Mi(e, t) {
2107
2107
  if (e.isProcessing) {
2108
- e.isAsync = !0, kt(e);
2108
+ e.isAsync = !0, It(e);
2109
2109
  return;
2110
2110
  }
2111
2111
  e.isProcessing = !0;
2112
2112
  const i = [], s = [], n = [], r = /* @__PURE__ */ new Set(), a = [];
2113
2113
  let l = 0;
2114
- const d = e.code.matchAll(mn);
2114
+ const d = e.code.matchAll(fn);
2115
2115
  for (const S of d) {
2116
- const [x, L, U, F, N] = S, B = N.startsWith(Le);
2116
+ const [A, L, U, F, N] = S, B = N.startsWith(Le);
2117
2117
  if (l !== 0 && l !== S.index) {
2118
2118
  const D = e.code.slice(l, S.index);
2119
2119
  n.push(D), a.push([l, D.length, 0, ""]);
2120
2120
  }
2121
- if (l = S.index + x.length, B)
2122
- a.push([S.index, x.length, 0, ""]), s.push(`"${Bi(N.slice(Le.length))}"`), i.push(L?.replaceAll(" as ", ":") ?? U ?? F ?? "");
2121
+ if (l = S.index + A.length, B)
2122
+ a.push([S.index, A.length, 0, ""]), s.push(`"${_i(N.slice(Le.length))}"`), i.push(L?.replaceAll(" as ", ":") ?? U ?? F ?? "");
2123
2123
  else {
2124
- const D = Ji(N, t), M = D?.isAsync === !0;
2124
+ const D = Bi(N, t), M = D?.isAsync === !0;
2125
2125
  if (L !== void 0) {
2126
2126
  const be = [];
2127
2127
  for (const Me of L.slice(1, -1).split(",")) {
2128
- const [yt, vt = yt] = Me.split(" as ");
2129
- M || r.add(vt), be.push(`${yt}:${vt}`);
2128
+ const [vt, bt = vt] = Me.split(" as ");
2129
+ M || r.add(bt), be.push(`${vt}:${bt}`);
2130
2130
  }
2131
2131
  if (M) {
2132
2132
  const Me = D.oldSingleExportName === void 0 ? `{${be.join(",")}}` : be[0].split(":")[1];
@@ -2139,7 +2139,7 @@ function Oi(e, t) {
2139
2139
  throw Error(
2140
2140
  b(
2141
2141
  O,
2142
- `Expected local import specifiers to use only named or side-effect import syntax. Found ${x} in a chunk:
2142
+ `Expected local import specifiers to use only named or side-effect import syntax. Found ${A} in a chunk:
2143
2143
  ${D.code}`
2144
2144
  )
2145
2145
  );
@@ -2150,29 +2150,29 @@ ${D.code}`
2150
2150
  e.isProcessing = !1;
2151
2151
  const c = e.isAsync === !0;
2152
2152
  if (e.isAsync = c || a.length > 0, !e.isAsync) {
2153
- e.code = It(e.code, t);
2153
+ e.code = xt(e.code, t);
2154
2154
  return;
2155
2155
  }
2156
- const p = hn(r);
2156
+ const p = yn(r);
2157
2157
  let m = e.code.slice(0, l);
2158
2158
  for (let S = a.length - 1; S >= 0; S--) {
2159
- const [x, L, U, F] = a[S];
2159
+ const [A, L, U, F] = a[S];
2160
2160
  let N = L, B = "";
2161
2161
  if (L === 0) {
2162
2162
  const M = p();
2163
2163
  s.push(M), B = ` ${M} from`, F !== "" ? (N = U + 4, i.push(F)) : i.push("");
2164
2164
  }
2165
- m = m.slice(0, x) + B + m.slice(x + N);
2165
+ m = m.slice(0, A) + B + m.slice(A + N);
2166
2166
  }
2167
- const [f, g] = kt(e), h = i.findLastIndex((S) => S.length > 0), y = i.slice(0, h + 1).join(","), v = i.length === 0 ? "_" : `([${y}])`, w = `${Mi}${v}=>{`, C = s.join(","), E = `${g}},${C})`;
2167
+ const [f, g] = It(e), h = i.findLastIndex((S) => S.length > 0), y = i.slice(0, h + 1).join(","), v = i.length === 0 ? "_" : `([${y}])`, w = `${Ji}${v}=>{`, C = s.join(","), E = `${g}},${C})`;
2168
2168
  let P = e.code.slice(l, f);
2169
- P = `${n.join("")}${P}`, P = It(P, t);
2170
- const A = `${m}${w}${P}${E}`;
2171
- e.code = A;
2169
+ P = `${n.join("")}${P}`, P = xt(P, t);
2170
+ const x = `${m}${w}${P}${E}`;
2171
+ e.code = x;
2172
2172
  }
2173
- const Mi = "export default $arcgis.t(";
2174
- function kt(e) {
2175
- const t = fn.exec(e.code), i = t?.index ?? e.code.length;
2173
+ const Ji = "export default $arcgis.t(";
2174
+ function It(e) {
2175
+ const t = gn.exec(e.code), i = t?.index ?? e.code.length;
2176
2176
  let s = "";
2177
2177
  if (t !== null) {
2178
2178
  const n = t[1].split(",");
@@ -2188,63 +2188,63 @@ function kt(e) {
2188
2188
  }
2189
2189
  return [i, s];
2190
2190
  }
2191
- const mn = /import(?:(\{[^}]+\})from|\*as ([\w$]+) from| ([\w$]+) from)?"([^"]+)";/gu, fn = /export\{([^}]+)\};\n$/u, Le = "@arcgis/core/";
2192
- function Ji(e, t) {
2191
+ const fn = /import(?:(\{[^}]+\})from|\*as ([\w$]+) from| ([\w$]+) from)?"([^"]+)";/gu, gn = /export\{([^}]+)\};\n$/u, Le = "@arcgis/core/";
2192
+ function Bi(e, t) {
2193
2193
  if (!e.startsWith("./"))
2194
2194
  return;
2195
2195
  const i = e.slice(2), s = t.get(i);
2196
2196
  if (s === void 0)
2197
2197
  throw Error(b(O, `Failed to find the ${e} module`));
2198
- if (s.isAsync === void 0 && Oi(s, t), s.isAsync === void 0)
2198
+ if (s.isAsync === void 0 && Mi(s, t), s.isAsync === void 0)
2199
2199
  throw Error(b(O, `Failed to infer whether the ${e} module has top-level await`));
2200
2200
  return s;
2201
2201
  }
2202
- function It(e, t) {
2203
- return e.replaceAll(gn, (i, s) => {
2202
+ function xt(e, t) {
2203
+ return e.replaceAll(hn, (i, s) => {
2204
2204
  if (s.startsWith(Le))
2205
- return `$arcgis.t(m=>m[0],"${Bi(s.slice(Le.length))}")`;
2205
+ return `$arcgis.t(m=>m[0],"${_i(s.slice(Le.length))}")`;
2206
2206
  if (s.startsWith("./")) {
2207
- const n = Ji(s, t);
2207
+ const n = Bi(s, t);
2208
2208
  if (n?.isAsync === !0)
2209
2209
  return `${i}.then(m=>m.default${n.oldSingleExportName === void 0 ? "" : `.then(e=>({${n.oldSingleExportName}:e}))`})`;
2210
2210
  }
2211
2211
  return i;
2212
2212
  });
2213
2213
  }
2214
- const gn = /(?<![.\w\d])import\("([^"]+)"\)/gu, Bi = (e) => e.endsWith(".js") ? e.slice(0, -3) : e;
2215
- function hn(e) {
2216
- const t = [tt];
2214
+ const hn = /(?<![.\w\d])import\("([^"]+)"\)/gu, _i = (e) => e.endsWith(".js") ? e.slice(0, -3) : e;
2215
+ function yn(e) {
2216
+ const t = [it];
2217
2217
  return () => {
2218
2218
  for (; ; ) {
2219
- const i = bn(t);
2220
- if (wn(t), !e.has(i))
2219
+ const i = wn(t);
2220
+ if (Sn(t), !e.has(i))
2221
2221
  return e.add(i), i;
2222
2222
  }
2223
2223
  };
2224
2224
  }
2225
- const tt = 0, ut = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_", _i = `${ut}0123456789`, yn = ut.length, vn = _i.length;
2226
- function bn(e) {
2227
- let t = ut[e[0]];
2225
+ const it = 0, mt = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_", Ki = `${mt}0123456789`, vn = mt.length, bn = Ki.length;
2226
+ function wn(e) {
2227
+ let t = mt[e[0]];
2228
2228
  for (let i = 1; i < e.length; ++i)
2229
- t += _i[e[i]];
2229
+ t += Ki[e[i]];
2230
2230
  return t;
2231
2231
  }
2232
- function wn(e) {
2232
+ function Sn(e) {
2233
2233
  let t = e.length - 1;
2234
2234
  for (; t >= 0; ) {
2235
- const i = t === 0 ? yn : vn;
2235
+ const i = t === 0 ? vn : bn;
2236
2236
  if (e[t] += 1, e[t] >= i)
2237
- e[t] = tt, t--;
2237
+ e[t] = it, t--;
2238
2238
  else
2239
2239
  return;
2240
2240
  }
2241
- e.push(tt);
2241
+ e.push(it);
2242
2242
  }
2243
2243
  function De(e = j(), t = !1) {
2244
2244
  const i = e.version.includes("next"), s = e.name === "@esri/calcite-components";
2245
2245
  if (s && i)
2246
2246
  return `https://cdn.jsdelivr.net/npm/@esri/calcite-components@${e.version}/dist/${ce}/`;
2247
- const n = t || i ? "jsdev.arcgis.com" : "js.arcgis.com", r = Sn(e.name), a = Cn(e.version);
2247
+ const n = t || i ? "jsdev.arcgis.com" : "js.arcgis.com", r = Cn(e.name), a = En(e.version);
2248
2248
  if (a === void 0)
2249
2249
  throw Error(
2250
2250
  b(
@@ -2254,16 +2254,16 @@ function De(e = j(), t = !1) {
2254
2254
  );
2255
2255
  return r.length === 0 ? `https://${n}/${a}/` : s ? `https://${n}/${r}/${a}/` : `https://${n}/${a}/${r}/`;
2256
2256
  }
2257
- const Sn = (e) => e.split("/").pop() ?? e;
2258
- function Cn(e) {
2257
+ const Cn = (e) => e.split("/").pop() ?? e;
2258
+ function En(e) {
2259
2259
  const t = /^(?<major>\d+)\.(?<minor>\d+)\.(?<patch>\d+)(?<prerelease>-.*)?$/u, i = e.match(t);
2260
2260
  if (i?.groups === void 0)
2261
2261
  return;
2262
2262
  const { major: s, minor: n, patch: r, prerelease: a } = i.groups, l = `${s}.${n}.${r}`;
2263
2263
  return a?.startsWith("-next") ? `${l}-next` : l;
2264
2264
  }
2265
- async function En(e, t, i, s, n) {
2266
- const r = t.packageName, { hasCss: a, cdnName: l } = await Ki(t.packageLocation) ?? {};
2265
+ async function Tn(e, t, i, s, n) {
2266
+ const r = t.packageName, { hasCss: a, cdnName: l } = await Wi(t.packageLocation) ?? {};
2267
2267
  if (i === "cdn") {
2268
2268
  const m = t.cdnUrl ?? De(t.packageJson, n);
2269
2269
  return [
@@ -2300,15 +2300,15 @@ async function En(e, t, i, s, n) {
2300
2300
  ...c,
2301
2301
  `import { defineCustomElements as defineCustomElements$${s} } from "${p}";`,
2302
2302
  `defineCustomElements$${s}(globalThis.window, {`,
2303
- ` resourcesUrl: "${lt(e, t.packageLocation)}/dist/${l}/",`,
2303
+ ` resourcesUrl: "${dt(e, t.packageLocation)}/dist/${l}/",`,
2304
2304
  "});"
2305
2305
  ]
2306
2306
  }
2307
2307
  ];
2308
2308
  }
2309
- async function Ki(e) {
2310
- const t = u.join(e, "dist"), i = u.basename(e), n = (await nt(t)).filter(
2311
- (a) => !Ri.has(a) && !a.includes(".")
2309
+ async function Wi(e) {
2310
+ const t = u.join(e, "dist"), i = u.basename(e), n = (await ot(t)).filter(
2311
+ (a) => !Di.has(a) && !a.includes(".")
2312
2312
  ), r = n.find(
2313
2313
  (a) => a.startsWith("arcgis-") || // This is the case for template-components and field-apps-custom-elements
2314
2314
  a === i
@@ -2328,8 +2328,8 @@ async function At(e, t) {
2328
2328
  cdnName: t
2329
2329
  } : void 0;
2330
2330
  }
2331
- async function Tn(e, t, i, s, n) {
2332
- const a = t.packageJson.exports?.[`./${Z}.css`] === void 0 ? await Ki(t.packageLocation) : void 0, l = a?.cdnName ?? ce, d = a === void 0 ? `${Di}.js` : `${a.cdnName}.esm.js`;
2331
+ async function $n(e, t, i, s, n) {
2332
+ const a = t.packageJson.exports?.[`./${Z}.css`] === void 0 ? await Wi(t.packageLocation) : void 0, l = a?.cdnName ?? ce, d = a === void 0 ? `${Oi}.js` : `${a.cdnName}.esm.js`;
2333
2333
  if (i === "cdn")
2334
2334
  return {
2335
2335
  tag: "script",
@@ -2338,7 +2338,7 @@ async function Tn(e, t, i, s, n) {
2338
2338
  src: `${t.cdnUrl ?? De(t.packageJson, n)}${d}`
2339
2339
  }
2340
2340
  };
2341
- const c = $n(t.packageJson), p = `${t.packageName}/${u.normalize(c)}${Q}`, m = [
2341
+ const c = Pn(t.packageJson), p = `${t.packageName}/${u.normalize(c)}${Q}`, m = [
2342
2342
  `import styles$${s} from "${p}";`,
2343
2343
  `document.adoptedStyleSheets = [...document.adoptedStyleSheets, styles$${s}.styleSheet];`
2344
2344
  ], f = `${t.packageName}/loader`;
@@ -2352,12 +2352,12 @@ async function Tn(e, t, i, s, n) {
2352
2352
  ...m,
2353
2353
  `import { defineCustomElements as defineCustomElements$${s} } from "${f}";`,
2354
2354
  `defineCustomElements$${s}({`,
2355
- ` resourcesUrl: "${lt(e, t.packageLocation)}/dist/${l}/",`,
2355
+ ` resourcesUrl: "${dt(e, t.packageLocation)}/dist/${l}/",`,
2356
2356
  "});"
2357
2357
  ]
2358
2358
  };
2359
2359
  }
2360
- function $n(e) {
2360
+ function Pn(e) {
2361
2361
  const { exports: t } = e;
2362
2362
  if (t === void 0)
2363
2363
  throw new Error(
@@ -2367,21 +2367,21 @@ function $n(e) {
2367
2367
  return s ? s[0] : i.length > 0 ? i[0][0] : `./${Z}.css`;
2368
2368
  }
2369
2369
  async function ne(e, t) {
2370
- return t !== void 0 ? await xt(e, t) : (e._loadersCache ??= xt(e), await e._loadersCache);
2370
+ return t !== void 0 ? await Lt(e, t) : (e._loadersCache ??= Lt(e), await e._loadersCache);
2371
2371
  }
2372
- async function xt(e, t) {
2372
+ async function Lt(e, t) {
2373
2373
  const i = e.viteCommand === "build" ? "cdn" : "lazyNpm", s = e.environment === "development", n = t ?? e.viteConfig.base;
2374
2374
  let r = 0;
2375
2375
  const a = async (m) => (await Promise.all(
2376
2376
  m.map(async (f) => {
2377
2377
  const g = r++;
2378
- return f.type === "stencil" ? await En(n, f, i, g, s) : f.type === "@arcgis/lumina" ? await Tn(n, f, i, g, s) : void 0;
2378
+ return f.type === "stencil" ? await Tn(n, f, i, g, s) : f.type === "@arcgis/lumina" ? await $n(n, f, i, g, s) : void 0;
2379
2379
  })
2380
2380
  )).filter(R).flat(), l = await Promise.all([
2381
2381
  // This may contain an import map so must be first
2382
- Qr(e, n, i, s),
2382
+ Zr(e, n, i, s),
2383
2383
  re.then(a),
2384
- Wi(e).then(a)
2384
+ Ui(e).then(a)
2385
2385
  ]), d = u.join(e.dir.src, "loader.ts"), c = t ?? (i === "cdn" ? `./${e.options.build?.cdn?.namespace ?? ce}/` : void 0);
2386
2386
  return [
2387
2387
  ...l.flat(),
@@ -2400,11 +2400,11 @@ async function xt(e, t) {
2400
2400
  }
2401
2401
  ];
2402
2402
  }
2403
- async function Wi(e) {
2403
+ async function Ui(e) {
2404
2404
  const t = e.options?.serve?.extraDependencies ?? [];
2405
2405
  return t.length === 0 ? [] : (e._serveOnlyDependencies ??= Promise.all(
2406
2406
  t.map(async (i) => {
2407
- const s = typeof i == "string" ? void 0 : i, n = typeof i == "string" ? i : i.name, r = await $i(n);
2407
+ const s = typeof i == "string" ? void 0 : i, n = typeof i == "string" ? i : i.name, r = await Pi(n);
2408
2408
  if (r === void 0)
2409
2409
  throw Error(
2410
2410
  b(
@@ -2419,8 +2419,8 @@ async function Wi(e) {
2419
2419
  })
2420
2420
  ).then((i) => i.filter(R)), await e._serveOnlyDependencies);
2421
2421
  }
2422
- const Pn = "/C:@arcgis/lumina-compiler/testSetupFile", kn = /^\/C:@arcgis\/lumina-compiler\/testSetupFile/u, We = [Pn];
2423
- async function In(e) {
2422
+ const kn = "/C:@arcgis/lumina-compiler/testSetupFile", In = /^\/C:@arcgis\/lumina-compiler\/testSetupFile/u, We = [kn];
2423
+ async function xn(e) {
2424
2424
  if (
2425
2425
  /**
2426
2426
  * Only import custom element dependencies if we are running in Vitest browser mode.
@@ -2432,7 +2432,7 @@ async function In(e) {
2432
2432
  */
2433
2433
  !e.apiJsonEnabled
2434
2434
  )
2435
- return Lt(e);
2435
+ return Nt(e);
2436
2436
  const i = (await ne(e)).map((s, n) => {
2437
2437
  if ("javascriptCode" in s)
2438
2438
  return s.javascriptCode.join(`
@@ -2456,18 +2456,18 @@ async function In(e) {
2456
2456
  }).join(`
2457
2457
 
2458
2458
  `);
2459
- return [Lt(e), i].join("");
2459
+ return [Nt(e), i].join("");
2460
2460
  }
2461
- const Lt = (e) => [e.isInPuppeteerTestBackEnd ? An : "", xn].join(""), An = `import { setupPuppeteerTest } from "@arcgis/lumina-compiler/puppeteerTesting";
2461
+ const Nt = (e) => [e.isInPuppeteerTestBackEnd ? An : "", Ln].join(""), An = `import { setupPuppeteerTest } from "@arcgis/lumina-compiler/puppeteerTesting";
2462
2462
  setupPuppeteerTest();
2463
- `, xn = `import { setupLuminaTest } from "@arcgis/lumina-compiler/testing";
2463
+ `, Ln = `import { setupLuminaTest } from "@arcgis/lumina-compiler/testing";
2464
2464
  setupLuminaTest();
2465
- `, Ln = "@arcgis/lumina:generateLoaderTs";
2465
+ `, Nn = "@arcgis/lumina:generateLoaderTs";
2466
2466
  let Ne;
2467
- function Nn(e) {
2467
+ function jn(e) {
2468
2468
  const t = /[\\\/]src[\\\/]loader\.ts$/u;
2469
- return [Bs(e.apiExtractorPluginConfig), {
2470
- name: Ln,
2469
+ return [_s(e.apiExtractorPluginConfig), {
2470
+ name: Nn,
2471
2471
  configResolved() {
2472
2472
  Ne = `${e.dir.root}src/loader.ts`;
2473
2473
  },
@@ -2482,7 +2482,7 @@ function Nn(e) {
2482
2482
  id: t
2483
2483
  },
2484
2484
  async handler() {
2485
- return e.apiJsonDeferred !== void 0 && await e.apiJsonDeferred.promise, Pr(e);
2485
+ return e.apiJsonDeferred !== void 0 && await e.apiJsonDeferred.promise, kr(e);
2486
2486
  }
2487
2487
  },
2488
2488
  async handleHotUpdate() {
@@ -2492,27 +2492,27 @@ function Nn(e) {
2492
2492
  name: "@arcgis/lumina:generateTestSetupVirtualFile",
2493
2493
  load: {
2494
2494
  filter: {
2495
- id: kn
2495
+ id: In
2496
2496
  },
2497
- handler: async () => await In(e)
2497
+ handler: async () => await xn(e)
2498
2498
  }
2499
2499
  }];
2500
2500
  }
2501
- function Nt(e) {
2501
+ function jt(e) {
2502
2502
  const t = e.server.moduleGraph.getModuleById(Ne);
2503
2503
  t !== void 0 && e.server.moduleGraph.invalidateModule(t);
2504
2504
  }
2505
- const jt = (e) => {
2505
+ const Ft = (e) => {
2506
2506
  e.server.ws.send({
2507
2507
  type: "full-reload",
2508
2508
  path: u.join("/", u.relative(e.dir.root, Ne))
2509
2509
  });
2510
2510
  };
2511
- function jn(e) {
2511
+ function Fn(e) {
2512
2512
  let t;
2513
2513
  const i = () => [
2514
2514
  ...e.options.assets?.transformers ?? [],
2515
- ...dt
2515
+ ...pt
2516
2516
  ];
2517
2517
  return {
2518
2518
  name: "@arcgis/lumina:handleStaticAssets",
@@ -2531,38 +2531,38 @@ function jn(e) {
2531
2531
  * `configureServer`.
2532
2532
  */
2533
2533
  configResolved() {
2534
- e.viteCommand === "serve" && (t = Ft(e));
2534
+ e.viteCommand === "serve" && (t = Rt(e));
2535
2535
  },
2536
2536
  options() {
2537
- e.viteCommand === "build" && (t = Ft(e));
2537
+ e.viteCommand === "build" && (t = Rt(e));
2538
2538
  },
2539
2539
  async configureServer(s) {
2540
2540
  e.server = s, te(e, await t, i()), s.watcher.on("addDir", (n) => {
2541
2541
  if (n.endsWith("assets")) {
2542
2542
  const r = u.dirname(n);
2543
- u.join(r, "/") === e.dir.root ? te(e, [zi], i()) : n.startsWith(e.dir.srcComponents) && te(e, [Ui(n, r)], i());
2543
+ u.join(r, "/") === e.dir.root ? te(e, [Hi], i()) : n.startsWith(e.dir.srcComponents) && te(e, [zi(n, r)], i());
2544
2544
  }
2545
2545
  });
2546
2546
  },
2547
2547
  async writeBundle() {
2548
- await Ii(e, await t, i());
2548
+ await xi(e, await t, i());
2549
2549
  }
2550
2550
  };
2551
2551
  }
2552
- async function Ft(e) {
2552
+ async function Rt(e) {
2553
2553
  const t = _("assets"), i = await e.componentFilesPromise, s = await Promise.all(
2554
2554
  i.map(async (n) => {
2555
2555
  const r = u.dirname(n), a = u.join(r, "assets");
2556
- return await _(a) ? Ui(a, r) : void 0;
2556
+ return await _(a) ? zi(a, r) : void 0;
2557
2557
  })
2558
2558
  );
2559
- return await t && s.push(zi), s.filter(R);
2559
+ return await t && s.push(Hi), s.filter(R);
2560
2560
  }
2561
- const Ui = (e, t) => ({
2561
+ const zi = (e, t) => ({
2562
2562
  type: "directory",
2563
2563
  source: e,
2564
2564
  destination: u.basename(t)
2565
- }), zi = { type: "directory", source: "assets/", destination: "" }, Ue = "@arcgis/lumina:printTotalBuildSize", Fn = (e) => ({
2565
+ }), Hi = { type: "directory", source: "assets/", destination: "" }, Ue = "@arcgis/lumina:printTotalBuildSize", Rn = (e) => ({
2566
2566
  name: Ue,
2567
2567
  apply: () => e.viteCommand === "build",
2568
2568
  configResolved(t) {
@@ -2581,10 +2581,10 @@ const Ui = (e, t) => ({
2581
2581
  const m = console.log;
2582
2582
  console.log = function(...g) {
2583
2583
  if (m.apply(console, g), g.length === 1 && typeof g[0] == "string") {
2584
- const [h, y] = g[0].match(Dn) ?? [];
2584
+ const [h, y] = g[0].match(On) ?? [];
2585
2585
  if (!h)
2586
2586
  return;
2587
- p || (p = g[0].slice(0, g[0].indexOf(h) + h.length).replaceAll(On, "").length);
2587
+ p || (p = g[0].slice(0, g[0].indexOf(h) + h.length).replaceAll(Mn, "").length);
2588
2588
  const v = Number.parseFloat(h.replace(" kB", "").replaceAll(",", ""));
2589
2589
  y ? (c += Number.parseFloat(y.replace(" kB", "").replaceAll(",", "")), d += v) : l += v;
2590
2590
  }
@@ -2595,38 +2595,38 @@ const Ui = (e, t) => ({
2595
2595
  console.log = m;
2596
2596
  }
2597
2597
  if (d > 0) {
2598
- const g = c > 0 ? d : l, h = Ot(g), y = e.dir.relativeDist;
2598
+ const g = c > 0 ? d : l, h = Mt(g), y = e.dir.relativeDist;
2599
2599
  console.log(
2600
2600
  [
2601
- Dt,
2601
+ Ot,
2602
2602
  y,
2603
- Rn,
2603
+ Dn,
2604
2604
  "*",
2605
2605
  " ".repeat(p - `${y}*`.length - h.length),
2606
2606
  h,
2607
- Rt,
2608
- c > 0 ? ` ${Dt}│ gzip: ${Ot(c)}${Rt}` : ""
2607
+ Dt,
2608
+ c > 0 ? ` ${Ot}│ gzip: ${Mt(c)}${Dt}` : ""
2609
2609
  ].join("")
2610
2610
  );
2611
2611
  }
2612
2612
  };
2613
2613
  }
2614
- }), Rt = "\x1B[22m\x1B[1m\x1B[22m", Dt = "\x1B[2m", Rn = "\x1B[22m\x1B[36m", Dn = /\d+(?:,\d+)?\.\d{2} kB/gu, On = /\x1B\[\d+m/gu, Mn = new Intl.NumberFormat("en", {
2614
+ }), Dt = "\x1B[22m\x1B[1m\x1B[22m", Ot = "\x1B[2m", Dn = "\x1B[22m\x1B[36m", On = /\d+(?:,\d+)?\.\d{2} kB/gu, Mn = /\x1B\[\d+m/gu, Jn = new Intl.NumberFormat("en", {
2615
2615
  maximumFractionDigits: 2,
2616
2616
  minimumFractionDigits: 2
2617
- }), Ot = (e) => `${Mn.format(e)} kB`, Jn = (e, t = u.resolve("src")) => u.relative(t, u.join(e, "..", pt.slice(0, -3))), Hi = "packages/core-packages/core/src", Bn = "packages/core-packages/core/output/npm/esm", de = !import.meta.url.includes("node_modules");
2618
- function qi({ command: e }) {
2617
+ }), Mt = (e) => `${Jn.format(e)} kB`, Bn = (e, t = u.resolve("src")) => u.relative(t, u.join(e, "..", ut.slice(0, -3))), qi = "packages/core-packages/core/src", _n = "packages/core-packages/core/output/npm/esm", de = !import.meta.url.includes("node_modules");
2618
+ function Vi({ command: e }) {
2619
2619
  return e === "serve" && process.argv.includes("--local-core");
2620
2620
  }
2621
- const Mt = "@arcgis/lumina:configureVite", _n = (e) => ({
2622
- name: Mt,
2621
+ const Jt = "@arcgis/lumina:configureVite", Kn = (e) => ({
2622
+ name: Jt,
2623
2623
  async config({
2624
2624
  server: t,
2625
2625
  publicDir: i,
2626
2626
  build: { cssMinify: s, target: n, sourcemap: r, lib: a, rollupOptions: { output: l = [] } = {}, watch: d, emptyOutDir: c } = {},
2627
2627
  test: p = {}
2628
2628
  }, m) {
2629
- const f = d != null, { include: g, browser: h, environment: y, forceRerunTriggers: v } = p, w = H && de && qi(m) ? ii(Hi, import.meta.dirname) : void 0, C = w === void 0 ? [] : [
2629
+ const f = d != null, { include: g, browser: h, environment: y, forceRerunTriggers: v } = p, w = H && de && Vi(m) ? si(qi, import.meta.dirname) : void 0, C = w === void 0 ? [] : [
2630
2630
  G(u.join(w, "**/*.{ts,tsx,mjs}")),
2631
2631
  `!${G(u.join(w, "**/*.d.ts"))}`
2632
2632
  ], E = {
@@ -2637,9 +2637,9 @@ const Mt = "@arcgis/lumina:configureVite", _n = (e) => ({
2637
2637
  * the CDN build
2638
2638
  */
2639
2639
  loader: "src/loader.ts"
2640
- }, { loader: P, ...A } = E, S = e.environment === "development" || e.isInTest ? {
2640
+ }, { loader: P, ...x } = E, S = e.environment === "development" || e.isInTest ? {
2641
2641
  "process.env.ESRI_INTERNAL": "true"
2642
- } : void 0, x = {
2642
+ } : void 0, A = {
2643
2643
  /**
2644
2644
  * Dependency pre-bundling by default scouts all index.html files to find
2645
2645
  * what dependencies are used. Since Lumina adds imports to index.html
@@ -2652,7 +2652,7 @@ const Mt = "@arcgis/lumina:configureVite", _n = (e) => ({
2652
2652
  * is not visible to dep-optimizer's ESBuild instance.
2653
2653
  */
2654
2654
  entries: [
2655
- ...Object.values(A),
2655
+ ...Object.values(x),
2656
2656
  ...await e.componentFilesPromise,
2657
2657
  ...C,
2658
2658
  // Vitest scans setup files, but misses Lumina's because we add it
@@ -2712,6 +2712,8 @@ const Mt = "@arcgis/lumina:configureVite", _n = (e) => ({
2712
2712
  "@arcgis/lumina",
2713
2713
  "@arcgis/core",
2714
2714
  "@arcgis/toolkit",
2715
+ "@arcgis-ba/data-browser/loader",
2716
+ "@arcgis-ba/report-player/loader",
2715
2717
  "@arcgis/ai-components/loader",
2716
2718
  "@arcgis/ai-playground/loader",
2717
2719
  "@arcgis/charts-components/loader",
@@ -2754,7 +2756,7 @@ const Mt = "@arcgis/lumina:configureVite", _n = (e) => ({
2754
2756
  if (typeof p.setupFiles == "string" ? p.setupFiles = [...We, p.setupFiles] : Array.isArray(p.setupFiles) ? p.setupFiles = [...We, ...p.setupFiles] : p.setupFiles = [...We], e.isInPuppeteerTestBackEnd) {
2755
2757
  if (h?.enabled === !0)
2756
2758
  throw Error(
2757
- b(Mt, "Can't enable both Vitest browser mode and Puppeteer testing at the same time")
2759
+ b(Jt, "Can't enable both Vitest browser mode and Puppeteer testing at the same time")
2758
2760
  );
2759
2761
  return {
2760
2762
  test: {
@@ -2776,7 +2778,7 @@ const Mt = "@arcgis/lumina:configureVite", _n = (e) => ({
2776
2778
  */
2777
2779
  forceRerunTriggers: v === void 0 ? ["**/*.{ts,tsx}"] : void 0
2778
2780
  },
2779
- optimizeDeps: x,
2781
+ optimizeDeps: A,
2780
2782
  define: S
2781
2783
  };
2782
2784
  }
@@ -2788,7 +2790,7 @@ const Mt = "@arcgis/lumina:configureVite", _n = (e) => ({
2788
2790
  publicDir: i ?? !1,
2789
2791
  build: {
2790
2792
  cssMinify: s ?? (e.environment === "production" ? !0 : void 0),
2791
- target: n ?? ki(e),
2793
+ target: n ?? Ii(e),
2792
2794
  sourcemap: r ?? (e.environment === "development" ? "inline" : e.options.build?.enableSourceMapsInProduction ?? !1),
2793
2795
  lib: {
2794
2796
  entry: E,
@@ -2820,7 +2822,7 @@ const Mt = "@arcgis/lumina:configureVite", _n = (e) => ({
2820
2822
  */
2821
2823
  emptyOutDir: c ?? !f
2822
2824
  },
2823
- optimizeDeps: x,
2825
+ optimizeDeps: A,
2824
2826
  define: S,
2825
2827
  test: {
2826
2828
  /*
@@ -2853,15 +2855,15 @@ const Mt = "@arcgis/lumina:configureVite", _n = (e) => ({
2853
2855
  e._originalRollupInputOptions ??= t.input;
2854
2856
  const s = { ...e._originalRollupInputOptions };
2855
2857
  i.forEach((n) => {
2856
- const r = Jn(n);
2858
+ const r = Bn(n);
2857
2859
  s[r] = n;
2858
2860
  }), t.input = s;
2859
2861
  }
2860
- }), Se = "@arcgis/lumina:serveLocalCdn", Kn = /^\/?@arcgis\/core(?=\/|$)/u, Vi = "/index.js", Wn = je(Vi), it = `\0${Se}:index`, Un = je(it), zn = 3e3, Hn = [
2862
+ }), Se = "@arcgis/lumina:serveLocalCdn", Wn = /^\/?@arcgis\/core(?=\/|$)/u, Gi = "/index.js", Un = je(Gi), st = `\0${Se}:index`, zn = je(st), Hn = 3e3, qn = [
2861
2863
  /^https?:\/\/localhost(?::[0-9]+)?$/u,
2862
2864
  /^https?:\/\/(?:[a-z0-9-]+\.)*(?:arcgis|esri)\.com(?::[0-9]+)?$/iu
2863
2865
  ];
2864
- function qn(e) {
2866
+ function Vn(e) {
2865
2867
  if (!H)
2866
2868
  return;
2867
2869
  const t = j().name, i = t.split("/").pop() ?? t, s = `/${i}/index.js`, n = je(s), r = `\0${Se}:${i}`, a = je(r);
@@ -2869,49 +2871,49 @@ function qn(e) {
2869
2871
  name: Se,
2870
2872
  enforce: "pre",
2871
2873
  apply(l) {
2872
- const d = Xn(e, l);
2874
+ const d = Yn(e, l);
2873
2875
  return d || (e._localCdnCore = void 0), d;
2874
2876
  },
2875
2877
  config: {
2876
2878
  order: "post",
2877
2879
  handler(l, d) {
2878
- const c = l.server, p = qi(d), m = p ? Hi : Bn, f = ii(m, import.meta.dirname);
2880
+ const c = l.server, p = Vi(d), m = p ? qi : _n, f = si(m, import.meta.dirname);
2879
2881
  if (f === void 0)
2880
2882
  throw Error(b(Se, `Unable to find ${m}.`));
2881
2883
  return e._localCdnCore = p ? { packageLocation: u.dirname(f), sourceLocation: f } : { packageLocation: f }, {
2882
2884
  server: {
2883
- port: c?.port ?? zn,
2884
- cors: c?.cors ?? { origin: Hn }
2885
+ port: c?.port ?? Hn,
2886
+ cors: c?.cors ?? { origin: qn }
2885
2887
  },
2886
2888
  resolve: {
2887
2889
  // The alias also matches CDN-rooted requests such as /@arcgis/core/WebMap.js. Vite resolves .js requests
2888
2890
  // to TypeScript in source mode and handles relative and bare imports from the resulting filesystem path.
2889
- alias: [{ find: Kn, replacement: f }]
2891
+ alias: [{ find: Wn, replacement: f }]
2890
2892
  }
2891
2893
  };
2892
2894
  }
2893
2895
  },
2894
2896
  resolveId: {
2895
- filter: { id: [Wn, n] },
2897
+ filter: { id: [Un, n] },
2896
2898
  handler(l) {
2897
- if (l === Vi)
2898
- return it;
2899
+ if (l === Gi)
2900
+ return st;
2899
2901
  if (l === s)
2900
2902
  return r;
2901
2903
  }
2902
2904
  },
2903
2905
  load: {
2904
- filter: { id: [Un, a] },
2906
+ filter: { id: [zn, a] },
2905
2907
  async handler(l) {
2906
- if (l === it)
2908
+ if (l === st)
2907
2909
  return `import ${JSON.stringify(s)};
2908
2910
  `;
2909
2911
  if (l === r)
2910
- return await Gn(e);
2912
+ return await Xn(e);
2911
2913
  }
2912
2914
  },
2913
2915
  handleHotUpdate({ file: l, server: d }) {
2914
- if (Vn(l, e._localCdnCore?.sourceLocation))
2916
+ if (Gn(l, e._localCdnCore?.sourceLocation))
2915
2917
  return d.ws.send({ type: "full-reload" }), [];
2916
2918
  }
2917
2919
  };
@@ -2919,30 +2921,30 @@ function qn(e) {
2919
2921
  function je(e) {
2920
2922
  return new RegExp(`^${RegExp.escape(e)}$`, "u");
2921
2923
  }
2922
- function Vn(e, t) {
2924
+ function Gn(e, t) {
2923
2925
  return t !== void 0 && e.startsWith(u.join(t, u.sep));
2924
2926
  }
2925
- async function Gn(e) {
2927
+ async function Xn(e) {
2926
2928
  const t = e.viteConfig.server, i = t.origin?.replace(/\/$/u, "") ?? `${t.https ? "https" : "http"}://localhost:${String(t.port)}`;
2927
2929
  return `${(await ne(e, `${i}/`)).flatMap((n) => "javascriptCode" in n ? n.javascriptCode : []).join(`
2928
2930
  `)}
2929
2931
  `;
2930
2932
  }
2931
- function Xn(e, t) {
2933
+ function Yn(e, t) {
2932
2934
  return de && e.viteCommand === "serve" && !e.isInTest && t.resolve?.conditions?.includes("storybook") !== !0 && t.server?.middlewareMode !== !0;
2933
2935
  }
2934
- const Yn = (e) => ({
2936
+ const Qn = (e) => ({
2935
2937
  name: "@arcgis/lumina:setAssetPath",
2936
2938
  apply: () => e.viteCommand === "build",
2937
2939
  config: (t) => ({
2938
2940
  base: t.base ?? e.options.assets?.defaultPath ?? De()
2939
2941
  })
2940
2942
  });
2941
- function Qn(e = j()) {
2943
+ function Zn(e = j()) {
2942
2944
  const t = e.version ?? "0.0.1";
2943
- return vs(t);
2945
+ return bs(t);
2944
2946
  }
2945
- const Zn = (e) => `/* ${e} */`, k = (e) => (t, i) => {
2947
+ const eo = (e) => `/* ${e} */`, k = (e) => (t, i) => {
2946
2948
  Object.defineProperty(t, i, {
2947
2949
  get() {
2948
2950
  throw Error(
@@ -2980,9 +2982,9 @@ const ue = {
2980
2982
  webTypes: "docs/web-types.json",
2981
2983
  apiJson: "docs/api.json",
2982
2984
  stencilLikeDocsJson: "docs/docs.json"
2983
- }, st = (e) => e.viteConfig.root.includes("/test-packages/") ? 2 : void 0;
2984
- async function Gi(e, t, i = j()) {
2985
- const s = eo(e, i), n = u.join(t, "lumina.ts"), a = await _(n) ? await z(n, "utf8") : "";
2985
+ }, rt = (e) => e.viteConfig.root.includes("/test-packages/") ? 2 : void 0;
2986
+ async function Xi(e, t, i = j()) {
2987
+ const s = to(e, i), n = u.join(t, "lumina.ts"), a = await _(n) ? await z(n, "utf8") : "";
2986
2988
  if (a.trim().replaceAll(`\r
2987
2989
  `, `
2988
2990
  `) === s.trim())
@@ -3000,9 +3002,9 @@ Current content:
3000
3002
  ${a}`
3001
3003
  )
3002
3004
  );
3003
- return ri(n, s), !0;
3005
+ return ni(n, s), !0;
3004
3006
  }
3005
- function eo(e, t = j()) {
3007
+ function to(e, t = j()) {
3006
3008
  const i = e.filter((d) => d.type === "@arcgis/lumina").map((d) => `
3007
3009
  /// <reference types="${d.packageName}/types/lumina" />`), s = e.filter((d) => d.type === "stencil"), n = s.map(
3008
3010
  (d, c) => `
@@ -3013,7 +3015,7 @@ declare module "@arcgis/lumina" {
3013
3015
  interface ImportStencilElements extends ${s.map((d, c) => `JSX$${c}.IntrinsicElements`).join(", ")} {}
3014
3016
  }`, a = t.devDependencies ?? {};
3015
3017
  return [
3016
- to,
3018
+ io,
3017
3019
  a.vitest ? `
3018
3020
  /// <reference types="vitest/config" />
3019
3021
  /// <reference types="vitest/browser" />` : "",
@@ -3024,7 +3026,7 @@ declare module "@arcgis/lumina" {
3024
3026
  `
3025
3027
  ].join("");
3026
3028
  }
3027
- const to = `/**
3029
+ const io = `/**
3028
3030
  * This file is autogenerated by \`@arcgis/lumina-compiler\` - do not edit it manually.
3029
3031
  * Manual edits will be overwritten.
3030
3032
  *
@@ -3032,7 +3034,7 @@ const to = `/**
3032
3034
  *
3033
3035
  * If you need to provide additional types, create a separate file.
3034
3036
  */
3035
- /// <reference types="@arcgis/lumina/globalTypes" />`, Ce = "@arcgis/lumina:dependencySupport", Xi = (e, t) => e.viteCommand === "serve" && /**
3037
+ /// <reference types="@arcgis/lumina/globalTypes" />`, Ce = "@arcgis/lumina:dependencySupport", Yi = (e, t) => e.viteCommand === "serve" && /**
3036
3038
  * Vitest started calling transformIndexHtml in browser mode versions ^2.1.4
3037
3039
  * However, it is a bit buggy (see
3038
3040
  * https://github.com/vitejs/vite/issues/19213). Instead, we are using test
@@ -3043,13 +3045,13 @@ const to = `/**
3043
3045
  * is doing:
3044
3046
  * https://github.com/storybookjs/storybook/blob/a5c2cf1712f70b4e3ecf38d3c98e7db8e8d67849/code/builders/builder-vite/src/plugins/code-generator-plugin.ts#L110
3045
3047
  */
3046
- e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand === "build" && !e.options.build?.cdn?.skip && e.options.build?.webApp?.destination !== void 0, io = (e) => ({
3048
+ e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand === "build" && !e.options.build?.cdn?.skip && e.options.build?.webApp?.destination !== void 0, so = (e) => ({
3047
3049
  name: Ce,
3048
3050
  async configureServer(t) {
3049
- H && (e.server = t, await en(e));
3051
+ H && (e.server = t, await tn(e));
3050
3052
  },
3051
3053
  configResolved() {
3052
- !e.isInTest && !e.isInStorybook && (e._updateLuminaTsPromise = so(e).catch(
3054
+ !e.isInTest && !e.isInStorybook && (e._updateLuminaTsPromise = ro(e).catch(
3053
3055
  (t) => T.error(Ce, `Failed to update package's src/lumina.ts: ${String(t)}`)
3054
3056
  ));
3055
3057
  },
@@ -3057,7 +3059,7 @@ e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand
3057
3059
  // Add imports to index.html before Vite starts resolving imports
3058
3060
  order: "pre",
3059
3061
  async handler(t, i) {
3060
- return Xi(e, i) ? (await ne(e)).map(
3062
+ return Yi(e, i) ? (await ne(e)).map(
3061
3063
  (n) => "javascriptCode" in n ? {
3062
3064
  tag: "script",
3063
3065
  attrs: {
@@ -3099,34 +3101,34 @@ e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand
3099
3101
  await e._updateLuminaTsPromise;
3100
3102
  }
3101
3103
  });
3102
- async function so(e) {
3103
- const i = (await Promise.all([re, Wi(e)])).flat();
3104
- if (!await Gi(i, e.dir.src))
3104
+ async function ro(e) {
3105
+ const i = (await Promise.all([re, Ui(e)])).flat();
3106
+ if (!await Xi(i, e.dir.src))
3105
3107
  return;
3106
3108
  let n = !1;
3107
3109
  function r() {
3108
- n || T.warn(Ce, ro), n = !0;
3110
+ n || T.warn(Ce, no), n = !0;
3109
3111
  }
3110
3112
  process.on("exit", () => {
3111
3113
  r(), clearTimeout(l);
3112
3114
  });
3113
3115
  const l = setTimeout(r, 2e3);
3114
3116
  }
3115
- const ro = _s(
3117
+ const no = Ks(
3116
3118
  "greenBright",
3117
3119
  `lumina.ts has been updated (potentially because your dependencies changed). Please commit the updated file.
3118
3120
  If build failed with TypeScript errors, try running the build again to check whether new lumina.ts resolves the errors.`
3119
3121
  );
3120
- async function no(e) {
3121
- const t = e.options.apiExtractor?.configFilePath === "" ? void 0 : await Ws(process.cwd()), i = e.apiExtractorPluginConfig.unsafeConfigOverride === void 0 || t === void 0 ? t ?? e.apiExtractorPluginConfig.unsafeConfigOverride : Ct(t, e.apiExtractorPluginConfig.unsafeConfigOverride);
3122
+ async function oo(e) {
3123
+ const t = e.options.apiExtractor?.configFilePath === "" ? void 0 : await Us(process.cwd()), i = e.apiExtractorPluginConfig.unsafeConfigOverride === void 0 || t === void 0 ? t ?? e.apiExtractorPluginConfig.unsafeConfigOverride : Et(t, e.apiExtractorPluginConfig.unsafeConfigOverride);
3122
3124
  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([
3123
3125
  {
3124
3126
  type: "dynamic",
3125
- source: () => JSON.stringify(e.apiJson, null, st(e)),
3127
+ source: () => JSON.stringify(e.apiJson, null, rt(e)),
3126
3128
  destination: u.join("../..", e._documentationFileNames.apiJson)
3127
3129
  }
3128
3130
  ]);
3129
- const s = i?.types?.typeScriptConfig ?? Us(
3131
+ const s = i?.types?.typeScriptConfig ?? zs(
3130
3132
  process.cwd(),
3131
3133
  e.options.types?.tsconfigPath ?? i?.types?.typeScriptConfigPath,
3132
3134
  !0
@@ -3172,7 +3174,7 @@ async function no(e) {
3172
3174
  if ([...p.addedModules, ...p.removedModules].some(
3173
3175
  (f) => Pe(f.sourcePath, "src/components/")
3174
3176
  ))
3175
- Nt(e), jt(e);
3177
+ jt(e), Ft(e);
3176
3178
  else {
3177
3179
  for (const f of p.changedModules) {
3178
3180
  if (!Pe(f.new.sourcePath, "src/components/"))
@@ -3185,29 +3187,29 @@ async function no(e) {
3185
3187
  if (g === void 0 && h === void 0)
3186
3188
  continue;
3187
3189
  if (g !== void 0 && h === void 0 || g === void 0 && h !== void 0 || g.tagName !== h.tagName || g.formAssociated !== h.formAssociated) {
3188
- jt(e);
3190
+ Ft(e);
3189
3191
  break;
3190
3192
  }
3191
- const y = Si(h);
3193
+ const y = Ci(h);
3192
3194
  e.server.ws.send({ type: "custom", event: "component-meta-update", data: y });
3193
3195
  }
3194
- Nt(e);
3196
+ jt(e);
3195
3197
  }
3196
- Jt(e, p.apiJson);
3198
+ Bt(e, p.apiJson);
3197
3199
  }
3198
3200
  }
3199
3201
  },
3200
3202
  afterApiJsonCreate: (c) => {
3201
- e.options.apiJson?.afterCreate?.(c.apiJson, !r), r = !0, (e.viteCommand === "build" ? e.viteConfig.build.watch : e.viteConfig.server.watch) === null && (e.apiJsonDeferred.resolve(), Jt(e, c.apiJson));
3203
+ e.options.apiJson?.afterCreate?.(c.apiJson, !r), r = !0, (e.viteCommand === "build" ? e.viteConfig.build.watch : e.viteConfig.server.watch) === null && (e.apiJsonDeferred.resolve(), Bt(e, c.apiJson));
3202
3204
  }
3203
- }, l = i === void 0 ? a : Ct(i, a);
3205
+ }, l = i === void 0 ? a : Et(i, a);
3204
3206
  e.apiExtractorPluginConfig.configFilePath = "", e.apiExtractorPluginConfig.unsafeConfigOverride = l;
3205
3207
  const d = e.apiExtractorPluginConfig.afterExtractorCreated;
3206
3208
  e.apiExtractorPluginConfig.afterExtractorCreated = (c) => {
3207
3209
  e.apiExtractor = c, d?.(c);
3208
3210
  };
3209
3211
  }
3210
- function Jt(e, t) {
3212
+ function Bt(e, t) {
3211
3213
  const i = { ...t, modules: [] }, s = [], n = e.viteCommand === "build" ? [] : void 0;
3212
3214
  for (const r of t.modules) {
3213
3215
  const a = { ...r, declarations: [] };
@@ -3232,10 +3234,10 @@ function Jt(e, t) {
3232
3234
  }
3233
3235
  e._localDefinedComponents = void 0, e.privateApiJson = t, e.apiJsonComponents = s, e.apiJson = i, n !== void 0 && (e.componentFilesPromise = Promise.resolve(n));
3234
3236
  }
3235
- var oo = Object.defineProperty, I = (e, t, i, s) => {
3237
+ var ao = Object.defineProperty, I = (e, t, i, s) => {
3236
3238
  for (var n = void 0, r = e.length - 1, a; r >= 0; r--)
3237
3239
  (a = e[r]) && (n = a(t, i, n) || n);
3238
- return n && oo(t, i, n), n;
3240
+ return n && ao(t, i, n), n;
3239
3241
  };
3240
3242
  const V = "@arcgis/lumina:context";
3241
3243
  class $ {
@@ -3261,7 +3263,7 @@ class $ {
3261
3263
  distComponents: f,
3262
3264
  distCdn: g,
3263
3265
  distCdnAssets: h
3264
- }, T.initialize(r.logger, l), r.root !== ti())
3266
+ }, T.initialize(r.logger, l), r.root !== ii())
3265
3267
  throw Error(
3266
3268
  b(
3267
3269
  V,
@@ -3280,11 +3282,11 @@ class $ {
3280
3282
  extract: !0
3281
3283
  }, (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);
3282
3284
  const C = this.viteCommand === "serve" && !this.isInStorybook, E = this.apiExtractorPluginConfig.unsafeConfigOverride;
3283
- C && (E.context.isLuminaMinimalExtraction = !0, E.types.typeCheckedExtraction = !1, E.types.fullTypeCheck = !1), this.isInStorybook && (E.context.dtsEmitPath = ""), this._typeScriptPrinter = Ks({
3285
+ C && (E.context.isLuminaMinimalExtraction = !0, E.types.typeCheckedExtraction = !1, E.types.fullTypeCheck = !1), this.isInStorybook && (E.context.dtsEmitPath = ""), this._typeScriptPrinter = Ws({
3284
3286
  // Do not downlevel. ESBuild will do that if needed.
3285
3287
  target: o.ScriptTarget.ESNext,
3286
3288
  sourceMap: r.build.sourcemap !== !1
3287
- }), Xi(this) && ne(this);
3289
+ }), Yi(this) && ne(this);
3288
3290
  }
3289
3291
  },
3290
3292
  configureServer: {
@@ -3312,7 +3314,7 @@ class $ {
3312
3314
  webTypes: i.jetBrains === !1 ? void 0 : i.jetBrains?.webTypesFileName ? pe(i.jetBrains.webTypesFileName) : ue.webTypes,
3313
3315
  vsCodeHtml: i.vsCode === !1 ? void 0 : i.vsCode?.htmlFileName ? pe(i.vsCode.htmlFileName) : ue.vsCodeHtml,
3314
3316
  vsCodeCss: i.vsCode === !1 ? void 0 : i.vsCode?.cssFileName ? pe(i.vsCode.cssFileName) : ue.vsCodeCss
3315
- }, this.apiExtractorPluginConfig = this.options.apiExtractor ?? {}, this.configsPromise = no(this);
3317
+ }, this.apiExtractorPluginConfig = this.options.apiExtractor ?? {}, this.configsPromise = oo(this);
3316
3318
  const s = process.cwd().length + 1;
3317
3319
  this.componentFilesPromise = this.configsPromise.then(() => {
3318
3320
  const r = this.apiExtractorPluginConfig.unsafeConfigOverride.types.typeScriptConfig.config.fileNames, a = [];
@@ -3321,12 +3323,12 @@ class $ {
3321
3323
  Pe(c, "src/components") && a.push(c);
3322
3324
  }
3323
3325
  return a;
3324
- }), Ei(void 0, t);
3325
- const n = t.build?.preamble ?? Qn();
3326
- this.banner = Zn(n);
3326
+ }), Ti(void 0, t);
3327
+ const n = t.build?.preamble ?? Zn();
3328
+ this.banner = eo(n);
3327
3329
  }
3328
3330
  _inferBuildSetup({ command: t, mode: i }, s) {
3329
- 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(Ci.name, `Vite is running in unknown mode "${i}". Assuming development`), this.environment = "development"), this.viteCommand = t;
3331
+ this.isInTest = process.env.NODE_ENV === "test", i === "production" || i === "development" ? this.environment = i : i === "test" || i === "benchmark" ? (this.environment = "development", this.isInTest = !0) : (T.warn(Ei.name, `Vite is running in unknown mode "${i}". Assuming development`), this.environment = "development"), this.viteCommand = t;
3330
3332
  const n = s?.__IS_IN_PUPPETEER__ === !0, r = this.viteCommand === "serve" && this.isInTest && this.options.puppeteerTesting?.enabled === !0;
3331
3333
  this.isInPuppeteerTestBackEnd = r && !n, this.isInPuppeteerTestFrontEnd = r && n;
3332
3334
  }
@@ -3474,8 +3476,8 @@ I([
3474
3476
  I([
3475
3477
  k("configResolved()")
3476
3478
  ], $.prototype, "_typeScriptPrinter");
3477
- function ao(e, t, i) {
3478
- const s = Ti()[t] ?? Yi(e)[t];
3479
+ function co(e, t, i) {
3480
+ const s = $i()[t] ?? Qi(e)[t];
3479
3481
  if (s === void 0) {
3480
3482
  if (e.options?.build?.dependencies?.silenceUnknownJsxElementUsage?.(t, i, e) === !0)
3481
3483
  return;
@@ -3489,11 +3491,11 @@ function ao(e, t, i) {
3489
3491
  }
3490
3492
  return s;
3491
3493
  }
3492
- function co(e, t) {
3494
+ function lo(e, t) {
3493
3495
  return e.packageName === void 0 ? he(t, e.modulePath) : u.join(e.packageName, e.modulePath);
3494
3496
  }
3495
- function Yi(e) {
3496
- return e._localDefinedComponents ??= Pi(
3497
+ function Qi(e) {
3498
+ return e._localDefinedComponents ??= ki(
3497
3499
  e.privateApiJson,
3498
3500
  {
3499
3501
  packageName: void 0,
@@ -3504,19 +3506,19 @@ function Yi(e) {
3504
3506
  e.viteCommand === "build"
3505
3507
  ), e._localDefinedComponents;
3506
3508
  }
3507
- const Bt = "makeRuntime(", lo = "@arcgis/core", po = "@arcgis/lumina:injectRuntimeOptions", uo = (e) => ({
3508
- name: po,
3509
+ const _t = "makeRuntime(", po = "@arcgis/core", uo = "@arcgis/lumina:injectRuntimeOptions", mo = (e) => ({
3510
+ name: uo,
3509
3511
  transform: {
3510
3512
  filter: {
3511
3513
  id: /\/src\/runtime\.ts$/u
3512
3514
  },
3513
3515
  handler(t, i) {
3514
- const s = t.indexOf(Bt);
3516
+ const s = t.indexOf(_t);
3515
3517
  if (s === -1)
3516
3518
  throw new Error(
3517
3519
  `Failed to find makeRuntime() function call in src/runtime.ts. Id: ${i}. Code: ${t}`
3518
3520
  );
3519
- const n = s + Bt.length, r = e.options.css?.commonStylesPath;
3521
+ const n = s + _t.length, r = e.options.css?.commonStylesPath;
3520
3522
  return {
3521
3523
  code: [
3522
3524
  r === void 0 ? "" : `import commonStyles from "${he(e.dir.src, r)}${Ie}";`,
@@ -3524,7 +3526,7 @@ const Bt = "makeRuntime(", lo = "@arcgis/core", po = "@arcgis/lumina:injectRunti
3524
3526
  "{",
3525
3527
  "defaultAssetPath:import.meta.env.BASE_URL,",
3526
3528
  'hydratedAttribute:"',
3527
- e.options.css?.hydratedAttribute ?? bi,
3529
+ e.options.css?.hydratedAttribute ?? wi,
3528
3530
  '",',
3529
3531
  r === void 0 ? "" : "commonStyles",
3530
3532
  "}",
@@ -3532,7 +3534,7 @@ const Bt = "makeRuntime(", lo = "@arcgis/core", po = "@arcgis/lumina:injectRunti
3532
3534
  // Dependency injection. Lumina cannot directly import these to avoid
3533
3535
  // a cyclical dependency.
3534
3536
  H ? `
3535
- import {createObservable,trackAccess,createTrackingTarget,runTracked} from "${lo}/applications/Components/reactiveUtils.js";
3537
+ import {createObservable,trackAccess,createTrackingTarget,runTracked} from "${po}/applications/Components/reactiveUtils.js";
3536
3538
  createObservable,
3537
3539
  runtime.t = trackAccess;
3538
3540
  runtime.o = createObservable;
@@ -3544,11 +3546,11 @@ runtime.r = runTracked;` : ""
3544
3546
  }
3545
3547
  }
3546
3548
  });
3547
- function mo(e) {
3549
+ function fo(e) {
3548
3550
  return `import "../${e.options.build?.cdn?.namespace === void 0 ? `${ce}/${Z}.css` : `${e.options.build.cdn.namespace}/${e.options.build.cdn.namespace}.css`}";
3549
3551
  `;
3550
3552
  }
3551
- const we = "@arcgis/lumina:addNonLazyImports", fo = (e) => ({
3553
+ const we = "@arcgis/lumina:addNonLazyImports", go = (e) => ({
3552
3554
  name: we,
3553
3555
  apply: () => e.viteCommand === "build",
3554
3556
  generateBundle(t, i) {
@@ -3556,11 +3558,11 @@ const we = "@arcgis/lumina:addNonLazyImports", fo = (e) => ({
3556
3558
  `;
3557
3559
  let r = !1;
3558
3560
  if (Object.entries(i).forEach(([a, l]) => {
3559
- const d = Ve(a, e.apiExtractor);
3561
+ const d = Ge(a, e.apiExtractor);
3560
3562
  if (d !== a && (l.fileName = d), l.type === "chunk") {
3561
3563
  const c = u.dirname(u.join(e.dir.dist, a)), p = d === a ? c : u.dirname(u.join(e.dir.dist, d));
3562
3564
  let m = l.code;
3563
- m = on(m, e, p, c), !e.isInStorybook && d === "chunks/runtime.js" && (r = !0, m = mo(e) + m), m = `${e.banner}${n}${m}`, l.code = m;
3565
+ m = an(m, e, p, c), !e.isInStorybook && d === "chunks/runtime.js" && (r = !0, m = fo(e) + m), m = `${e.banner}${n}${m}`, l.code = m;
3564
3566
  }
3565
3567
  }), !r && !e.isInStorybook)
3566
3568
  throw Error(b(we, "Expected to find a chunks/runtime.js file in the Vite's build output."));
@@ -3574,7 +3576,7 @@ const we = "@arcgis/lumina:addNonLazyImports", fo = (e) => ({
3574
3576
  i.forEach(([r, { referencedTagNames: a, referencedDeferredTagNames: l, referencedBy: d }]) => {
3575
3577
  if (s.has(r) || a.length === 0 && l.length === 0)
3576
3578
  return;
3577
- const c = Qi(t, d, s);
3579
+ const c = Zi(t, d, s);
3578
3580
  if (c.forEach((p) => {
3579
3581
  t[p].referencedTagNames.splice(0, 0, ...a), t[p].referencedDeferredTagNames.splice(0, 0, ...l);
3580
3582
  }), (a.length > 0 || l.length > 0) && c.length === 0) {
@@ -3595,19 +3597,19 @@ Possible causes:
3595
3597
  const n = i.flatMap(async ([r, { referencedTagNames: a, referencedDeferredTagNames: l }]) => {
3596
3598
  if (!s.has(r))
3597
3599
  return [];
3598
- const d = u.dirname(r), c = e.dir.src + Ve(d.slice(e.dir.src.length), e.apiExtractor), p = u.relative(e.dir.src, c);
3600
+ const d = u.dirname(r), c = e.dir.src + Ge(d.slice(e.dir.src.length), e.apiExtractor), p = u.relative(e.dir.src, c);
3599
3601
  function m(P) {
3600
- const A = ao(e, P, r);
3601
- if (A === void 0)
3602
+ const x = co(e, P, r);
3603
+ if (x === void 0)
3602
3604
  return;
3603
- const S = co(A, p);
3605
+ const S = lo(x, p);
3604
3606
  if (S !== `./${p}`)
3605
- return S.startsWith(".") ? `${S}/${_t}` : S;
3607
+ return S.startsWith(".") ? `${S}/${Kt}` : S;
3606
3608
  }
3607
3609
  const f = new Set(a), g = new Set(l), h = Array.from(f, m).filter(R), y = (P) => `import "${P}";
3608
3610
  `, v = h.map(y).join(""), w = Array.from(g, (P) => {
3609
- const A = m(P);
3610
- if (A !== void 0) {
3611
+ const x = m(P);
3612
+ if (x !== void 0) {
3611
3613
  if (f.has(P)) {
3612
3614
  T.warn(
3613
3615
  we,
@@ -3615,18 +3617,18 @@ Possible causes:
3615
3617
  );
3616
3618
  return;
3617
3619
  }
3618
- return `.set("${P}", () => import("${A}"))
3620
+ return `.set("${P}", () => import("${x}"))
3619
3621
  `;
3620
3622
  }
3621
- }).filter(R), C = `${v}export * from "./${pt}";`, E = w.length > 0 ? `import { deferredLoaders } from "@arcgis/lumina";
3623
+ }).filter(R), C = `${v}export * from "./${ut}";`, E = w.length > 0 ? `import { deferredLoaders } from "@arcgis/lumina";
3622
3624
  ${C}
3623
3625
  deferredLoaders${w.join("")};` : C;
3624
- return await K(u.join(e.dir.dist, p, _t), E);
3626
+ return await K(u.join(e.dir.dist, p, Kt), E);
3625
3627
  });
3626
3628
  await Promise.all(n);
3627
3629
  }
3628
- }), _t = "index.js", Qi = (e, t, i, s = /* @__PURE__ */ new Set()) => t.flatMap((n) => i.has(n) ? [n] : s.has(n) ? [] : (s.add(n), Qi(e, e[n].referencedBy, i, s)));
3629
- function Kt(e, t, i) {
3630
+ }), Kt = "index.js", Zi = (e, t, i, s = /* @__PURE__ */ new Set()) => t.flatMap((n) => i.has(n) ? [n] : s.has(n) ? [] : (s.add(n), Zi(e, e[n].referencedBy, i, s)));
3631
+ function Wt(e, t, i) {
3630
3632
  if (ee(e))
3631
3633
  return e;
3632
3634
  {
@@ -3645,14 +3647,14 @@ function ee(e) {
3645
3647
  return (
3646
3648
  // Inlined string literal
3647
3649
  typeof e == "string" || // Syntax kinds that are never undefined
3648
- go.has(e.kind) || // Ternary with both branches never undefined
3650
+ ho.has(e.kind) || // Ternary with both branches never undefined
3649
3651
  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
3650
- o.isBinaryExpression(e) && (ho.has(e.operatorToken.kind) || ee(e.left) && ee(e.right)) || // `as`, `satisfies`, `()` with definitely not undefined expression
3652
+ o.isBinaryExpression(e) && (yo.has(e.operatorToken.kind) || ee(e.left) && ee(e.right)) || // `as`, `satisfies`, `()` with definitely not undefined expression
3651
3653
  (o.isParenthesizedExpression(e) || o.isSatisfiesExpression(e) || o.isAsExpression(e)) && ee(e.expression) || // JSX that got converted to html`<p>Something</p>`
3652
- o.isTaggedTemplateExpression(e) && o.isIdentifier(e.tag) && or.has(e.tag.text)
3654
+ o.isTaggedTemplateExpression(e) && o.isIdentifier(e.tag) && ar.has(e.tag.text)
3653
3655
  );
3654
3656
  }
3655
- const go = /* @__PURE__ */ new Set([
3657
+ const ho = /* @__PURE__ */ new Set([
3656
3658
  o.SyntaxKind.NumericLiteral,
3657
3659
  o.SyntaxKind.BigIntLiteral,
3658
3660
  o.SyntaxKind.StringLiteral,
@@ -3671,7 +3673,7 @@ const go = /* @__PURE__ */ new Set([
3671
3673
  o.SyntaxKind.ClassExpression,
3672
3674
  // Trust? Trust.
3673
3675
  o.SyntaxKind.NonNullExpression
3674
- ]), ho = /* @__PURE__ */ new Set([
3676
+ ]), yo = /* @__PURE__ */ new Set([
3675
3677
  o.SyntaxKind.PlusEqualsToken,
3676
3678
  o.SyntaxKind.MinusEqualsToken,
3677
3679
  o.SyntaxKind.AsteriskAsteriskEqualsToken,
@@ -3706,9 +3708,9 @@ const go = /* @__PURE__ */ new Set([
3706
3708
  o.SyntaxKind.SlashToken,
3707
3709
  o.SyntaxKind.PercentToken,
3708
3710
  o.SyntaxKind.AsteriskAsteriskToken
3709
- ]), yo = {
3711
+ ]), vo = {
3710
3712
  property(e, t, i, s) {
3711
- const n = vo(s, i, e), r = n?.type === "stringifiedReflected", a = n?.type === "reflected" || r;
3713
+ const n = bo(s, i, e), r = n?.type === "stringifiedReflected", a = n?.type === "reflected" || r;
3712
3714
  if (a) {
3713
3715
  const f = He(t);
3714
3716
  if (f === !0)
@@ -3721,11 +3723,11 @@ const go = /* @__PURE__ */ new Set([
3721
3723
  return [n.name, ...l];
3722
3724
  const [c, p] = l, m = n?.type === "stringifiedNonReflected";
3723
3725
  if (r || m) {
3724
- const f = Kt(
3726
+ const f = Wt(
3725
3727
  p,
3726
3728
  e,
3727
3729
  m ? "" : void 0
3728
- ), h = i === "value" && (s === "input" || s === "textarea" || s === ke) ? wo(f, e) : f;
3730
+ ), h = i === "value" && (s === "input" || s === "textarea" || s === ke) ? So(f, e) : f;
3729
3731
  if (h !== p)
3730
3732
  return [m ? `.${i}` : n.name, c, h];
3731
3733
  }
@@ -3737,7 +3739,7 @@ const go = /* @__PURE__ */ new Set([
3737
3739
  return [i];
3738
3740
  if (s === !1)
3739
3741
  return [];
3740
- const n = Ee(e, t, !0), a = n[0] !== "=" ? n : [n[0], Kt(n[1], e)];
3742
+ const n = Ee(e, t, !0), a = n[0] !== "=" ? n : [n[0], Wt(n[1], e)];
3741
3743
  return [i, ...a];
3742
3744
  },
3743
3745
  booleanAttribute(e, t, i) {
@@ -3749,8 +3751,8 @@ const go = /* @__PURE__ */ new Set([
3749
3751
  throw new Error(
3750
3752
  `Event prop value must be an expression. Found ${String(t?.getText(e.sourceFile))}`
3751
3753
  );
3752
- const s = i.slice(2), n = bt(s);
3753
- return [`@${pi.has(n) ? s.toLowerCase() : bt(s)}=`, ...gt(e, t, void 0)];
3754
+ const s = i.slice(2), n = wt(s);
3755
+ return [`@${ui.has(n) ? s.toLowerCase() : wt(s)}=`, ...ht(e, t, void 0)];
3754
3756
  },
3755
3757
  directives(e, t) {
3756
3758
  if (t === void 0 || !o.isJsxExpression(t))
@@ -3785,20 +3787,20 @@ const go = /* @__PURE__ */ new Set([
3785
3787
  ])
3786
3788
  ];
3787
3789
  },
3788
- class: Ut,
3789
- style: Ut,
3790
- key: (e, t) => [mt(t, e.sourceFile)],
3790
+ class: zt,
3791
+ style: zt,
3792
+ key: (e, t) => [ft(t, e.sourceFile)],
3791
3793
  deferLoad(e, t, i, s) {
3792
3794
  if (typeof s != "string")
3793
3795
  throw Error("deferLoad prop is not currently supported on dynamic tag names.");
3794
- if (!ct(s))
3796
+ if (!lt(s))
3795
3797
  throw Error(`deferLoad prop is only supported on custom elements. Found ${String(s)}`);
3796
3798
  e.neededImports.add("deferLoad");
3797
3799
  const n = e.importRenames.deferLoad;
3798
3800
  return [o.factory.createIdentifier(n)];
3799
3801
  }
3800
3802
  };
3801
- function vo(e, t, i) {
3803
+ function bo(e, t, i) {
3802
3804
  if (typeof e == "string") {
3803
3805
  const r = (i.externalComponents[e] ?? i.localComponents[e])?.propToAttribute?.[t];
3804
3806
  if (r !== void 0)
@@ -3814,7 +3816,7 @@ function vo(e, t, i) {
3814
3816
  } else {
3815
3817
  const n = Object.values(W.perElement).map(
3816
3818
  (a) => ze(a, t)
3817
- ), r = Ge(n, (a) => a?.type === "stringifiedNonReflected" ? a : void 0) ?? Ge(n, (a) => a?.type === "stringifiedReflected" ? a : void 0);
3819
+ ), r = Xe(n, (a) => a?.type === "stringifiedNonReflected" ? a : void 0) ?? Xe(n, (a) => a?.type === "stringifiedReflected" ? a : void 0);
3818
3820
  if (r !== void 0)
3819
3821
  return r;
3820
3822
  }
@@ -3830,7 +3832,7 @@ function ze(e, t) {
3830
3832
  if (n !== void 0)
3831
3833
  return { name: n, type: "stringifiedNonReflected" };
3832
3834
  }
3833
- function mt(e, t) {
3835
+ function ft(e, t) {
3834
3836
  if (e !== void 0 && o.isJsxExpression(e) && e.expression !== void 0)
3835
3837
  return e.expression;
3836
3838
  if (e !== void 0 && o.isStringLiteral(e))
@@ -3853,10 +3855,10 @@ function Ee(e, t, i = !1) {
3853
3855
  `Invalid JSX syntax detected or there is a bug in Lumina. Found ${t.getText(e.sourceFile)}. Expected JSX attribute value to be wrapped in { }`
3854
3856
  );
3855
3857
  if (o.isStringLiteral(t))
3856
- return Wt(t, i);
3858
+ return Ut(t, i);
3857
3859
  if (o.isJsxExpression(t) && t.expression) {
3858
3860
  if (o.isStringLiteral(t.expression))
3859
- return Wt(t.expression, i);
3861
+ return Ut(t.expression, i);
3860
3862
  if (i) {
3861
3863
  if (o.isNumericLiteral(t.expression))
3862
3864
  return [`=${t.expression.text}`];
@@ -3864,16 +3866,16 @@ function Ee(e, t, i = !1) {
3864
3866
  return [`=${t.expression.getText(e.sourceFile)}`];
3865
3867
  }
3866
3868
  }
3867
- return ["=", ...gt(e, t, void 0)];
3869
+ return ["=", ...ht(e, t, void 0)];
3868
3870
  }
3869
- function Wt(e, t) {
3871
+ function Ut(e, t) {
3870
3872
  if (!t)
3871
3873
  return ["=", e];
3872
3874
  const i = e.text;
3873
3875
  if (i.length === 0)
3874
3876
  return [];
3875
- const s = ui(i);
3876
- if (tr(s)) {
3877
+ const s = mi(i);
3878
+ if (ir(s)) {
3877
3879
  const n = s.replaceAll('"', "&#34;");
3878
3880
  if (n.length > s.length) {
3879
3881
  const r = s.replaceAll("'", "&#39;");
@@ -3884,7 +3886,7 @@ function Wt(e, t) {
3884
3886
  } else
3885
3887
  return [`=${s}`];
3886
3888
  }
3887
- function Ut(e, t, i) {
3889
+ function zt(e, t, i) {
3888
3890
  if (t !== void 0 && o.isStringLiteral(t))
3889
3891
  return [`${i}="${t.text}"`];
3890
3892
  if (t === void 0 || !o.isJsxExpression(t) || t.expression === void 0)
@@ -3892,7 +3894,7 @@ function Ut(e, t, i) {
3892
3894
  `${i} prop value must be an expression. Found ${String(t?.getText(e.sourceFile))}`
3893
3895
  );
3894
3896
  const s = t.expression;
3895
- if (bo(s)) {
3897
+ if (wo(s)) {
3896
3898
  const r = i === "class" ? "safeClassMap" : "safeStyleMap";
3897
3899
  e.neededImports.add(r);
3898
3900
  const a = e.importRenames[r], l = o.factory.createCallExpression(o.factory.createIdentifier(a), void 0, [
@@ -3902,18 +3904,18 @@ function Ut(e, t, i) {
3902
3904
  } else
3903
3905
  return [i, ...Ee(e, t, !0)];
3904
3906
  }
3905
- const bo = (e) => o.isObjectLiteralExpression(e) || o.isPropertyAccessExpression(e) || o.isIdentifier(e) || o.isCallExpression(e) || o.isBinaryExpression(e) || o.isConditionalExpression(e);
3906
- function wo(e, t) {
3907
+ const wo = (e) => o.isObjectLiteralExpression(e) || o.isPropertyAccessExpression(e) || o.isIdentifier(e) || o.isCallExpression(e) || o.isBinaryExpression(e) || o.isConditionalExpression(e);
3908
+ function So(e, t) {
3907
3909
  t.neededImports.add("live");
3908
3910
  const i = t.importRenames.live;
3909
3911
  return o.factory.createCallExpression(o.factory.createIdentifier(i), void 0, [
3910
3912
  typeof e == "string" ? o.factory.createStringLiteral(e) : e
3911
3913
  ]);
3912
3914
  }
3913
- function So(e) {
3914
- if (e && o.isJsxExpression(e) && e.expression && o.isCallExpression(e.expression) && o.isIdentifier(e.expression.expression) && e.expression.expression.text in zt && e.expression.arguments.length <= 1)
3915
+ function Co(e) {
3916
+ if (e && o.isJsxExpression(e) && e.expression && o.isCallExpression(e.expression) && o.isIdentifier(e.expression.expression) && e.expression.expression.text in Ht && e.expression.arguments.length <= 1)
3915
3917
  return {
3916
- propType: zt[e.expression.expression.text],
3918
+ propType: Ht[e.expression.expression.text],
3917
3919
  // To simplify checking logic in convertProps, wrap expression in JSX expression
3918
3920
  initializer: o.factory.createJsxExpression(
3919
3921
  void 0,
@@ -3922,21 +3924,21 @@ function So(e) {
3922
3924
  )
3923
3925
  };
3924
3926
  }
3925
- const zt = {
3927
+ const Ht = {
3926
3928
  bindProperty: "property",
3927
3929
  bindAttribute: "attribute",
3928
3930
  bindBooleanAttribute: "booleanAttribute",
3929
3931
  bindEvent: "event"
3930
3932
  };
3931
- function Co(e, t, i) {
3932
- return To.has(e) ? e : e.startsWith("on") && t !== void 0 && o.isJsxExpression(t) && t.expression !== void 0 ? "event" : ci.has(e) || e.includes("-") ? "attribute" : !ct(i) && (li.has(e) || (i === Xe ? !1 : i === ke ? (
3933
+ function Eo(e, t, i) {
3934
+ return $o.has(e) ? e : e.startsWith("on") && t !== void 0 && o.isJsxExpression(t) && t.expression !== void 0 ? "event" : li.has(e) || e.includes("-") ? "attribute" : !lt(i) && (di.has(e) || (i === Ye ? !1 : i === ke ? (
3933
3935
  // When tag name is dynamic, we can't help but check if the prop name matches an "always attribute" in any html element
3934
- Object.values(Ye).some((r) => r.has(e))
3935
- ) : Ye[i]?.has(e) === !0)) ? Et.has(e) ? "booleanAttribute" : "attribute" : i === "svg" || i === "math" || i === Xe || i !== ke && (ot.has(i) || at.has(i)) ? e in W.common.reflected || e in W.common.stringifiedReflected || e in W.common.stringifiedNonReflected ? "property" : Et.has(e) ? "booleanAttribute" : "attribute" : "property";
3936
+ Object.values(Qe).some((r) => r.has(e))
3937
+ ) : Qe[i]?.has(e) === !0)) ? Tt.has(e) ? "booleanAttribute" : "attribute" : i === "svg" || i === "math" || i === Ye || i !== ke && (at.has(i) || ct.has(i)) ? e in W.common.reflected || e in W.common.stringifiedReflected || e in W.common.stringifiedNonReflected ? "property" : Tt.has(e) ? "booleanAttribute" : "attribute" : "property";
3936
3938
  }
3937
- const Eo = ["class", "style", "ref", "directives", "key", "deferLoad"], To = new Set(Eo), $o = (e) => typeof e != "string" || e.trim().length > 0;
3939
+ const To = ["class", "style", "ref", "directives", "key", "deferLoad"], $o = new Set(To), Po = (e) => typeof e != "string" || e.trim().length > 0;
3938
3940
  function Oe({ key: e, parts: t, litTag: i }, s) {
3939
- const n = Po(t);
3941
+ const n = ko(t);
3940
3942
  if (n.length % 2 === 0)
3941
3943
  throw new Error("Normalized template parts array length must be odd");
3942
3944
  const [r, ...a] = n;
@@ -3957,11 +3959,11 @@ function Oe({ key: e, parts: t, litTag: i }, s) {
3957
3959
  const d = s.importRenames[l], c = o.factory.createTaggedTemplateExpression(
3958
3960
  o.factory.createIdentifier(d),
3959
3961
  void 0,
3960
- a.length === 0 ? o.factory.createNoSubstitutionTemplateLiteral(r) : o.factory.createTemplateExpression(o.factory.createTemplateHead(r), ko(a))
3962
+ a.length === 0 ? o.factory.createNoSubstitutionTemplateLiteral(r) : o.factory.createTemplateExpression(o.factory.createTemplateHead(r), Io(a))
3961
3963
  );
3962
3964
  return qe(s, e, c);
3963
3965
  }
3964
- const Po = (e) => e.reduce(
3966
+ const ko = (e) => e.reduce(
3965
3967
  (t, i, s) => {
3966
3968
  const n = t.at(-1), r = typeof n == "string", a = typeof i == "string";
3967
3969
  if (r && a)
@@ -3971,7 +3973,7 @@ const Po = (e) => e.reduce(
3971
3973
  },
3972
3974
  [""]
3973
3975
  );
3974
- function ko(e) {
3976
+ function Io(e) {
3975
3977
  if (!(e.length % 2 === 0))
3976
3978
  throw new Error("templatePartsToSpans should be called with normalized parts array without the first item");
3977
3979
  const i = e.length / 2;
@@ -3996,27 +3998,27 @@ function qe(e, t, i) {
3996
3998
  const s = e.importRenames.keyed;
3997
3999
  return o.factory.createCallExpression(o.factory.createIdentifier(s), void 0, [t, i]);
3998
4000
  }
3999
- const Zi = (e, t) => e.getFullText(t.sourceFile).slice(0, e.getLeadingTriviaWidth(t.sourceFile));
4000
- function es(e, t) {
4001
- const i = ft(e);
4001
+ const es = (e, t) => e.getFullText(t.sourceFile).slice(0, e.getLeadingTriviaWidth(t.sourceFile));
4002
+ function ts(e, t) {
4003
+ const i = gt(e);
4002
4004
  return i.length === 0 ? t : o.setSyntheticLeadingComments(
4003
4005
  t,
4004
4006
  i.map((s) => ({
4005
4007
  ...s,
4006
4008
  pos: -1,
4007
4009
  end: -1,
4008
- text: ts(e.slice(s.pos, s.end))
4010
+ text: is(e.slice(s.pos, s.end))
4009
4011
  }))
4010
4012
  );
4011
4013
  }
4012
- const ft = (e) => e.trim().length === 0 ? [] : o.getLeadingCommentRanges(e, 0) ?? [];
4013
- function Io(e) {
4014
- const t = ft(e);
4014
+ const gt = (e) => e.trim().length === 0 ? [] : o.getLeadingCommentRanges(e, 0) ?? [];
4015
+ function xo(e) {
4016
+ const t = gt(e);
4015
4017
  if (t.length === 0)
4016
4018
  return [e || " "];
4017
4019
  const i = t.reduceRight(
4018
4020
  ([n, ...r], a) => {
4019
- const l = Ao(n), d = ts(l.slice(a.pos, a.end));
4021
+ const l = Ao(n), d = is(l.slice(a.pos, a.end));
4020
4022
  return [
4021
4023
  l.slice(0, a.pos),
4022
4024
  /**
@@ -4034,13 +4036,13 @@ function Io(e) {
4034
4036
  const s = i.at(-1);
4035
4037
  return (typeof s != "string" || s.trim() !== "") && i.push(" "), i;
4036
4038
  }
4037
- const ts = (e) => e.startsWith("//") ? e.slice(2) : e.slice(2, -2);
4039
+ const is = (e) => e.startsWith("//") ? e.slice(2) : e.slice(2, -2);
4038
4040
  function Ao(e) {
4039
4041
  if (typeof e == "string")
4040
4042
  return e;
4041
4043
  throw new Error(`Expected string, got ${typeof e}: ${String(e)}`);
4042
4044
  }
4043
- function xo(e, t) {
4045
+ function Lo(e, t) {
4044
4046
  if (!(o.isPropertyAccessExpression(t.expression) && t.expression.name.text === "map"))
4045
4047
  return t;
4046
4048
  const s = t.arguments[0];
@@ -4052,7 +4054,7 @@ function xo(e, t) {
4052
4054
  return t;
4053
4055
  const l = ge(s.body);
4054
4056
  let d = !0, c;
4055
- if (Ht(l))
4057
+ if (qt(l))
4056
4058
  c = l;
4057
4059
  else {
4058
4060
  if (!o.isBlock(l))
@@ -4061,20 +4063,20 @@ function xo(e, t) {
4061
4063
  if (!(v && o.isReturnStatement(v) && v.expression))
4062
4064
  return t;
4063
4065
  const C = ge(v.expression);
4064
- if (!Ht(C))
4066
+ if (!qt(C))
4065
4067
  return t;
4066
4068
  const E = l.statements.slice(0, -1);
4067
- if (E.some(is))
4069
+ if (E.some(ss))
4068
4070
  return t;
4069
4071
  d = E.length === 0, c = C;
4070
4072
  }
4071
- const p = o.isJsxElement(c) ? c.openingElement : c, m = as(p);
4073
+ const p = o.isJsxElement(c) ? c.openingElement : c, m = cs(p);
4072
4074
  if (m === -1)
4073
4075
  return t;
4074
4076
  const f = p.attributes.properties[m];
4075
4077
  if (f === void 0 || !o.isJsxAttribute(f))
4076
4078
  return t;
4077
- const g = mt(f.initializer, e.sourceFile), h = Lo(r, s, g, d, e);
4079
+ const g = ft(f.initializer, e.sourceFile), h = No(r, s, g, d, e);
4078
4080
  if (h === void 0)
4079
4081
  return t;
4080
4082
  e.liftedKeys.add(f.name), e.neededImports.add("repeat");
@@ -4096,22 +4098,22 @@ function xo(e, t) {
4096
4098
  )
4097
4099
  ]);
4098
4100
  }
4099
- const Ht = (e) => o.isJsxElement(e) || o.isJsxSelfClosingElement(e);
4100
- function is(e) {
4101
+ const qt = (e) => o.isJsxElement(e) || o.isJsxSelfClosingElement(e);
4102
+ function ss(e) {
4101
4103
  if (o.isReturnStatement(e))
4102
4104
  return !0;
4103
4105
  let t = !1;
4104
4106
  return o.visitEachChild(
4105
4107
  e,
4106
- (i) => (t ||= is(i), i),
4108
+ (i) => (t ||= ss(i), i),
4107
4109
  void 0
4108
4110
  ), t;
4109
4111
  }
4110
- function Lo(e, t, i, s, n) {
4112
+ function No(e, t, i, s, n) {
4111
4113
  const r = J(i);
4112
4114
  if (r === void 0)
4113
4115
  return;
4114
- let a = ss(e.name, r);
4116
+ let a = rs(e.name, r);
4115
4117
  const l = t.parameters.at(1);
4116
4118
  if (l !== void 0 && o.isIdentifier(l.name) && // A more basic check is also provided in lumina/no-unnecessary-key rule
4117
4119
  r.every(Fe, l.name)) {
@@ -4123,7 +4125,7 @@ function Lo(e, t, i, s, n) {
4123
4125
  return;
4124
4126
  }
4125
4127
  if (!s) {
4126
- const d = jo(r, a, t);
4128
+ const d = Fo(r, a, t);
4127
4129
  if (d === void 0)
4128
4130
  return;
4129
4131
  a = d;
@@ -4162,7 +4164,7 @@ function J(e) {
4162
4164
  }
4163
4165
  return t;
4164
4166
  } else {
4165
- if (No.has(e.kind))
4167
+ if (jo.has(e.kind))
4166
4168
  return [];
4167
4169
  {
4168
4170
  const t = ge(e);
@@ -4170,7 +4172,7 @@ function J(e) {
4170
4172
  }
4171
4173
  }
4172
4174
  }
4173
- const No = /* @__PURE__ */ new Set([
4175
+ const jo = /* @__PURE__ */ new Set([
4174
4176
  o.SyntaxKind.NumericLiteral,
4175
4177
  o.SyntaxKind.BigIntLiteral,
4176
4178
  o.SyntaxKind.StringLiteral,
@@ -4179,20 +4181,20 @@ const No = /* @__PURE__ */ new Set([
4179
4181
  o.SyntaxKind.FalseKeyword,
4180
4182
  o.SyntaxKind.NullKeyword,
4181
4183
  o.SyntaxKind.TrueKeyword
4182
- ]), ge = (e) => o.isAsExpression(e) || o.isNonNullExpression(e) || o.isSatisfiesExpression(e) || o.isParenthesizedExpression(e) ? ge(e.expression) : e, ss = (e, t) => o.isObjectBindingPattern(e) ? Do(e, t) : e;
4183
- function jo(e, t, i) {
4184
+ ]), ge = (e) => o.isAsExpression(e) || o.isNonNullExpression(e) || o.isSatisfiesExpression(e) || o.isParenthesizedExpression(e) ? ge(e.expression) : e, rs = (e, t) => o.isObjectBindingPattern(e) ? Oo(e, t) : e;
4185
+ function Fo(e, t, i) {
4184
4186
  if (e.every(Fe, t))
4185
4187
  return t;
4186
4188
  if (o.isIdentifier(t)) {
4187
- const s = o.isBlock(i.body) ? Ge(i.body.statements, (r) => Fo(r, t)) : void 0;
4189
+ const s = o.isBlock(i.body) ? Xe(i.body.statements, (r) => Ro(r, t)) : void 0;
4188
4190
  if (s === void 0)
4189
4191
  return;
4190
- const n = ss(s, e);
4192
+ const n = rs(s, e);
4191
4193
  if (e.every(Fe, n))
4192
4194
  return n;
4193
4195
  }
4194
4196
  }
4195
- function Fo(e, t) {
4197
+ function Ro(e, t) {
4196
4198
  if (!o.isVariableStatement(e) || !(e.declarationList.flags & o.NodeFlags.Const))
4197
4199
  return;
4198
4200
  const i = e.declarationList.declarations[0];
@@ -4200,34 +4202,34 @@ function Fo(e, t) {
4200
4202
  }
4201
4203
  function Fe(e) {
4202
4204
  const t = this;
4203
- return o.isIdentifier(t) ? t.text === e : t.elements.some(Ro, e);
4205
+ return o.isIdentifier(t) ? t.text === e : t.elements.some(Do, e);
4204
4206
  }
4205
- function Ro(e) {
4207
+ function Do(e) {
4206
4208
  const t = this;
4207
4209
  return o.isOmittedExpression(e) ? !1 : Fe.call(e.name, t);
4208
4210
  }
4209
- function Do(e, t) {
4211
+ function Oo(e, t) {
4210
4212
  let i = !1;
4211
4213
  const s = e.elements.filter((n) => o.isIdentifier(n.name) ? t.includes(n.name.text) : (i = !0, !0));
4212
4214
  return i || s.length === 0 ? e : o.factory.updateObjectBindingPattern(e, s);
4213
4215
  }
4214
- const rs = (e, t) => t.liftedKeys.has(e);
4216
+ const ns = (e, t) => t.liftedKeys.has(e);
4215
4217
  function q(e, t, i) {
4216
4218
  if (fe(i))
4217
- return ns(e, i);
4218
- const s = o.isCallExpression(i) ? xo(e, i) : i, n = o.visitEachChild(
4219
+ return os(e, i);
4220
+ const s = o.isCallExpression(i) ? Lo(e, i) : i, n = o.visitEachChild(
4219
4221
  s,
4220
4222
  // Do not add "" if parent is binary expression to not turn {(a && <b />) || c} into {(a && <b />) || "" || c}
4221
4223
  q.bind(null, e, t !== void 0 && o.isBinaryExpression(t) ? void 0 : i),
4222
4224
  e.transformationContext
4223
4225
  );
4224
- return t !== void 0 && o.isBinaryExpression(i) && (o.isJsxExpression(t) || fe(ge(i.right)) || dr(i.right)) ? Jo(n) : n;
4226
+ return t !== void 0 && o.isBinaryExpression(i) && (o.isJsxExpression(t) || fe(ge(i.right)) || pr(i.right)) ? Bo(n) : n;
4225
4227
  }
4226
- function ns(e, t) {
4227
- const i = os(e, t);
4228
+ function os(e, t) {
4229
+ const i = as(e, t);
4228
4230
  return Oe(i, e);
4229
4231
  }
4230
- function os(e, t) {
4232
+ function as(e, t) {
4231
4233
  const i = "children" in t ? t.children : [];
4232
4234
  if (o.isJsxFragment(t))
4233
4235
  return { key: void 0, ...Te(i, e) };
@@ -4235,36 +4237,36 @@ function os(e, t) {
4235
4237
  if (o.isJsxNamespacedName(r))
4236
4238
  throw Error(`JSX namespaced elements are not supported. Found ${r.getText(e.sourceFile)} `);
4237
4239
  if (!o.isIdentifier(r) || !r.text.startsWith(r.text[0].toLowerCase()) && r.text !== Be && r.text !== _e) {
4238
- const S = o.isIdentifier(r) && r.text === Vs ? Te(i, e) : {
4240
+ const S = o.isIdentifier(r) && r.text === Gs ? Te(i, e) : {
4239
4241
  // No need to wrap the function call in a lit-html tag
4240
4242
  litTag: void 0,
4241
- parts: [Mo(e, t, r, i)]
4243
+ parts: [Jo(e, t, r, i)]
4242
4244
  };
4243
4245
  return {
4244
- key: Oo(n, e),
4246
+ key: Mo(n, e),
4245
4247
  ...S
4246
4248
  };
4247
4249
  }
4248
- const l = r.text === Be ? ke : r.text === _e ? Xe : r.text, d = r.text === Be ? oe : r.text === _e ? Y : Xs.has(l) ? mi : ot.has(l) ? ie : ae, c = ct(l), p = c ? e.localComponents[l]?.requiredProperties : void 0, m = p === void 0 ? void 0 : new Set(p);
4250
+ const l = r.text === Be ? ke : r.text === _e ? Ye : r.text, d = r.text === Be ? oe : r.text === _e ? Y : Ys.has(l) ? fi : at.has(l) ? ie : ae, c = lt(l), p = c ? e.localComponents[l]?.requiredProperties : void 0, m = p === void 0 ? void 0 : new Set(p);
4249
4251
  let f;
4250
4252
  const g = [];
4251
4253
  let h = !1;
4252
- const y = n.attributes.properties.flatMap((A) => {
4253
- if (o.isJsxSpreadAttribute(A))
4254
+ const y = n.attributes.properties.flatMap((x) => {
4255
+ if (o.isJsxSpreadAttribute(x))
4254
4256
  throw Error(
4255
4257
  `JSX spread attribute syntax is not supported. See alternatives: https://webgis.esri.com/references/lumina/jsx#spread-attributes
4256
- Found ${A.getText(e.sourceFile)}`
4258
+ Found ${x.getText(e.sourceFile)}`
4257
4259
  );
4258
- const { name: S, initializer: x } = A;
4260
+ const { name: S, initializer: A } = x;
4259
4261
  if (o.isJsxNamespacedName(S))
4260
4262
  throw Error(`JSX namespaced attributes are not supported. Found ${S.getText(e.sourceFile)}`);
4261
- const L = S.text, U = So(x), F = U?.propType ?? Co(L, x, l);
4263
+ const L = S.text, U = Co(A), F = U?.propType ?? Eo(L, A, l);
4262
4264
  m?.delete(L);
4263
- const N = yo[F](e, U?.initializer ?? x, L, l);
4265
+ const N = vo[F](e, U?.initializer ?? A, L, l);
4264
4266
  if (N.length === 0)
4265
4267
  return [];
4266
- const B = e.compiler.shouldMinifyJsx ? [" "] : Io(Zi(S, e));
4267
- return F === "key" ? (f = typeof N[0] == "object" && !rs(S, e) ? N[0] : void 0, B.some($o) ? B : []) : F === "directives" || F === "ref" || L === "deferLoad" ? (h ||= F === "deferLoad", g.push(
4268
+ const B = e.compiler.shouldMinifyJsx ? [" "] : xo(es(S, e));
4269
+ return F === "key" ? (f = typeof N[0] == "object" && !ns(S, e) ? N[0] : void 0, B.some(Po) ? B : []) : F === "directives" || F === "ref" || L === "deferLoad" ? (h ||= F === "deferLoad", g.push(
4268
4270
  ...B,
4269
4271
  ...N.flatMap(
4270
4272
  (D, M) => typeof D == "string" || M === 0 || typeof N[M - 1] == "string" ? D : [" ", D]
@@ -4275,12 +4277,12 @@ Found ${A.getText(e.sourceFile)}`
4275
4277
  "mustIncludeAllRequiredProperties",
4276
4278
  e.sourceFile.fileName,
4277
4279
  `Missing required properties for <${l}> }: ${Array.from(m).join(", ")}`
4278
- ), g.length > 0 && y.push(...g), typeof l == "string" && at.has(l))
4280
+ ), g.length > 0 && y.push(...g), typeof l == "string" && ct.has(l))
4279
4281
  throw Error(
4280
4282
  `JSX syntax for MathML elements is not yet supported. If you need it, please request it. Otherwise, use the \`math\` function from Lit directly. Tried to use the "${l}" element`
4281
4283
  );
4282
4284
  c && (h ? e.customElementsToImportDeferred.add(l) : e.customElementsToImport.add(l));
4283
- const v = typeof l == "string" && Gs.has(l), w = Te(i, e);
4285
+ const v = typeof l == "string" && Xs.has(l), w = Te(i, e);
4284
4286
  if (v && w.parts.length > 0)
4285
4287
  throw Error(
4286
4288
  `Void HTML elements like <${l}> cannot have children. Found ${t.getText(e.sourceFile)}`
@@ -4304,21 +4306,21 @@ Found ${A.getText(e.sourceFile)}`
4304
4306
  ];
4305
4307
  return { key: f, parts: P, litTag: d };
4306
4308
  }
4307
- function Oo(e, t) {
4308
- const i = e.attributes.properties[as(e)];
4309
- return i && o.isJsxAttribute(i) && !rs(i.name, t) ? mt(i.initializer, t.sourceFile) : void 0;
4309
+ function Mo(e, t) {
4310
+ const i = e.attributes.properties[cs(e)];
4311
+ return i && o.isJsxAttribute(i) && !ns(i.name, t) ? ft(i.initializer, t.sourceFile) : void 0;
4310
4312
  }
4311
- const as = (e) => e.attributes.properties.findIndex(({ name: t }) => t && o.isIdentifier(t) && t.text === "key");
4312
- function Mo(e, t, i, s) {
4313
+ const cs = (e) => e.attributes.properties.findIndex(({ name: t }) => t && o.isIdentifier(t) && t.text === "key");
4314
+ function Jo(e, t, i, s) {
4313
4315
  const r = (o.isJsxElement(t) ? t.openingElement : t).attributes.properties.map((d) => {
4314
4316
  if (o.isJsxSpreadAttribute(d))
4315
- return es(Zi(d, e), o.factory.createSpreadAssignment(d.expression));
4317
+ return ts(es(d, e), o.factory.createSpreadAssignment(d.expression));
4316
4318
  const { name: c, initializer: p } = d;
4317
4319
  if (o.isJsxNamespacedName(c))
4318
4320
  throw Error(`JSX namespaced attributes are not supported. Found ${c.getText(e.sourceFile)}`);
4319
4321
  if (c.text === "key")
4320
4322
  return;
4321
- const m = p === void 0 ? o.factory.createTrue() : o.isStringLiteral(p) ? p : fe(p) ? ns(e, p) : q(e, void 0, p.expression ?? o.factory.createIdentifier("undefined")), f = ni(c.text) ? o.factory.createStringLiteral(c.text) : c;
4323
+ const m = p === void 0 ? o.factory.createTrue() : o.isStringLiteral(p) ? p : fe(p) ? os(e, p) : q(e, void 0, p.expression ?? o.factory.createIdentifier("undefined")), f = oi(c.text) ? o.factory.createStringLiteral(c.text) : c;
4322
4324
  return o.factory.createPropertyAssignment(f, m);
4323
4325
  }), { parts: a, litTag: l } = Te(s, e);
4324
4326
  return a.length > 0 && r.push(
@@ -4334,13 +4336,13 @@ function Te(e, t) {
4334
4336
  let i;
4335
4337
  const s = e.flatMap((n) => {
4336
4338
  if (o.isJsxText(n))
4337
- return [t.compiler.shouldMinifyJsx ? Qs(n.text) : n.text];
4339
+ return [t.compiler.shouldMinifyJsx ? Zs(n.text) : n.text];
4338
4340
  if (o.isJsxExpression(n))
4339
- return gt(t, n, n);
4341
+ return ht(t, n, n);
4340
4342
  {
4341
- const r = os(t, n);
4343
+ const r = as(t, n);
4342
4344
  if (r.key === void 0 && r.litTag !== oe && r.litTag !== Y) {
4343
- if (r.litTag === mi)
4345
+ if (r.litTag === fi)
4344
4346
  return r.parts;
4345
4347
  if (i !== void 0 && r.litTag !== void 0 && i !== r.litTag)
4346
4348
  throw new Error(
@@ -4353,21 +4355,21 @@ function Te(e, t) {
4353
4355
  });
4354
4356
  return { litTag: i, parts: s };
4355
4357
  }
4356
- function Jo(e) {
4358
+ function Bo(e) {
4357
4359
  return e.operatorToken.kind === o.SyntaxKind.AmpersandAmpersandToken ? o.factory.createBinaryExpression(
4358
4360
  e,
4359
4361
  o.factory.createToken(o.SyntaxKind.BarBarToken),
4360
4362
  o.factory.createStringLiteral("")
4361
4363
  ) : e;
4362
4364
  }
4363
- function gt(e, t, i) {
4365
+ function ht(e, t, i) {
4364
4366
  if (t.expression === void 0) {
4365
4367
  if (e.compiler.shouldMinifyJsx)
4366
4368
  return [];
4367
4369
  const s = t.getText(e.sourceFile).slice(1, -1);
4368
- return ft(s).length === 0 ? [] : [es(s, o.factory.createIdentifier("undefined"))];
4370
+ return gt(s).length === 0 ? [] : [ts(s, o.factory.createIdentifier("undefined"))];
4369
4371
  }
4370
- return o.isStringLiteral(t.expression) ? [ui(t.expression.text)] : (
4372
+ return o.isStringLiteral(t.expression) ? [mi(t.expression.text)] : (
4371
4373
  /**
4372
4374
  * There is a bug in Chrome DevTools, where it won't let you set a
4373
4375
  * breakpoint inside a tagged template literal. It seems like they did
@@ -4404,17 +4406,17 @@ function gt(e, t, i) {
4404
4406
  ] : [q(e, i, t.expression)]
4405
4407
  );
4406
4408
  }
4407
- const cs = (e) => e.reduce((t, [i, s]) => (t[i] ??= [], t[i].push(s), t), {}), ls = cs(
4409
+ const ls = (e) => e.reduce((t, [i, s]) => (t[i] ??= [], t[i].push(s), t), {}), ds = ls(
4408
4410
  Object.entries(se).flatMap(
4409
4411
  ([e, t]) => t.map((i) => [i, e])
4410
4412
  )
4411
- ), ds = new Set(Object.keys(ls));
4412
- function Bo(e, t) {
4413
+ ), ps = new Set(Object.keys(ds));
4414
+ function _o(e, t) {
4413
4415
  const i = t.importClause, s = i === void 0, n = t.moduleSpecifier;
4414
4416
  if (!o.isStringLiteral(n))
4415
4417
  return t;
4416
- const r = _o(e.sourceFile.fileName, n.text, ""), a = !i?.isTypeOnly;
4417
- if (a && e.existingImportedModules.add(r), ur.test(n.text) && // If id already includes ?, bypass our custom behavior
4418
+ const r = Ko(e.sourceFile.fileName, n.text, ""), a = !i?.isTypeOnly;
4419
+ if (a && e.existingImportedModules.add(r), mr.test(n.text) && // If id already includes ?, bypass our custom behavior
4418
4420
  !n.text.includes("?")) {
4419
4421
  if (s) {
4420
4422
  if (e.compiler.viteCommand !== "build" || e.compiler.isInStorybook || e.compiler.isInTest)
@@ -4447,12 +4449,12 @@ function Bo(e, t) {
4447
4449
  const l = i.namedBindings;
4448
4450
  if (l === void 0 || !o.isNamedImports(l))
4449
4451
  return t;
4450
- const d = ds.has(n.text);
4452
+ const d = ps.has(n.text);
4451
4453
  if (l.elements.forEach((c) => {
4452
4454
  const p = (c.propertyName ?? c.name).text, m = se[p];
4453
4455
  if (d) {
4454
4456
  if (m?.some((h) => h === n.text)) {
4455
- const h = ps(p, r);
4457
+ const h = us(p, r);
4456
4458
  e.existingLitImports.add(h), e.importRenames[h] = c.name?.text ?? h;
4457
4459
  }
4458
4460
  } else (c.name.text === "h" || c.name.text === "createElement") && j().name !== "@arcgis/lumina" && (e.hasNonLuminaJsxImport = !0);
@@ -4462,7 +4464,7 @@ function Bo(e, t) {
4462
4464
  let c = !1;
4463
4465
  const p = l.elements.filter((f) => {
4464
4466
  const g = (f.propertyName ?? f.name).text;
4465
- return pr.has(g) ? !1 : (c ||= !f.isTypeOnly, !0);
4467
+ return ur.has(g) ? !1 : (c ||= !f.isTypeOnly, !0);
4466
4468
  });
4467
4469
  if (p.length === 0)
4468
4470
  return;
@@ -4491,22 +4493,22 @@ function Bo(e, t) {
4491
4493
  }
4492
4494
  return t;
4493
4495
  }
4494
- const ps = (e, t) => e === ae && se.staticHtml.includes(t) ? oe : e === ie && se.staticSvg.includes(t) ? Y : e, _o = (e, t, i) => t.startsWith(".") ? u.resolve(e, "..", `${t}${i}`) : t;
4495
- function Ko(e) {
4496
- return o.isImportDeclaration(e) ? Wo(this, e) : e;
4496
+ const us = (e, t) => e === ae && se.staticHtml.includes(t) ? oe : e === ie && se.staticSvg.includes(t) ? Y : e, Ko = (e, t, i) => t.startsWith(".") ? u.resolve(e, "..", `${t}${i}`) : t;
4497
+ function Wo(e) {
4498
+ return o.isImportDeclaration(e) ? Uo(this, e) : e;
4497
4499
  }
4498
- function Wo(e, t) {
4500
+ function Uo(e, t) {
4499
4501
  const i = t.importClause, s = i?.namedBindings, n = t.moduleSpecifier;
4500
- if (!o.isStringLiteral(n) || !s || !o.isNamedImports(s) || !ds.has(n.text))
4502
+ if (!o.isStringLiteral(n) || !s || !o.isNamedImports(s) || !ps.has(n.text))
4501
4503
  return t;
4502
4504
  const r = i.isTypeOnly;
4503
4505
  let a = !1;
4504
4506
  const l = s.elements.map((d) => {
4505
- const c = (d.propertyName ?? d.name).text, p = ps(c, n.text);
4507
+ const c = (d.propertyName ?? d.name).text, p = us(c, n.text);
4506
4508
  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;
4507
4509
  });
4508
- return ls[n.text]?.forEach((d) => {
4509
- !e.neededImports.has(d) || e.existingLitImports.has(d) || (e.neededImports.delete(d), a = !0, l.push(us(d, e)));
4510
+ return ds[n.text]?.forEach((d) => {
4511
+ !e.neededImports.has(d) || e.existingLitImports.has(d) || (e.neededImports.delete(d), a = !0, l.push(ms(d, e)));
4510
4512
  }), a ? o.factory.updateImportDeclaration(
4511
4513
  t,
4512
4514
  t.modifiers,
@@ -4520,8 +4522,8 @@ function Wo(e, t) {
4520
4522
  t.attributes
4521
4523
  ) : t;
4522
4524
  }
4523
- function Uo(e) {
4524
- const t = cs(
4525
+ function zo(e) {
4526
+ const t = ls(
4525
4527
  Array.from(e.neededImports, (i) => [se[i][0], i])
4526
4528
  );
4527
4529
  return Object.entries(t).map(
@@ -4531,14 +4533,14 @@ function Uo(e) {
4531
4533
  !1,
4532
4534
  void 0,
4533
4535
  o.factory.createNamedImports(
4534
- s.map((n) => (e.neededImports.delete(n), us(n, e)))
4536
+ s.map((n) => (e.neededImports.delete(n), ms(n, e)))
4535
4537
  )
4536
4538
  ),
4537
4539
  o.factory.createStringLiteral(i)
4538
4540
  )
4539
4541
  );
4540
4542
  }
4541
- function us(e, t) {
4543
+ function ms(e, t) {
4542
4544
  const i = e === oe ? ae : e === Y ? ie : e, s = t.importRenames[e];
4543
4545
  return s === i ? o.factory.createImportSpecifier(!1, void 0, o.factory.createIdentifier(i)) : o.factory.createImportSpecifier(
4544
4546
  !1,
@@ -4546,12 +4548,12 @@ function us(e, t) {
4546
4548
  o.factory.createIdentifier(s)
4547
4549
  );
4548
4550
  }
4549
- function zo(e) {
4550
- const t = Nr().map(({ packageName: i }) => i);
4551
+ function Ho(e) {
4552
+ const t = jr().map(({ packageName: i }) => i);
4551
4553
  return e.existingImportedModules.forEach((i) => {
4552
4554
  if (u.isAbsolute(i))
4553
4555
  return;
4554
- const s = Hs(i), n = i.slice(s.length + 1);
4556
+ const s = qs(i), n = i.slice(s.length + 1);
4555
4557
  if (t.includes(s ?? "") && (n.startsWith("dist/components") || n.startsWith("components"))) {
4556
4558
  const r = Re(e.sourceFile.fileName);
4557
4559
  throw new Error(
@@ -4560,7 +4562,7 @@ function zo(e) {
4560
4562
  }
4561
4563
  }), [];
4562
4564
  }
4563
- function Ho(e) {
4565
+ function qo(e) {
4564
4566
  if (e.compiler.viteCommand === "serve")
4565
4567
  return e.customElementsToImport.clear(), e.customElementsToImportDeferred.clear(), [];
4566
4568
  const t = e.compiler._customElementDependencies;
@@ -4575,7 +4577,7 @@ function Ho(e) {
4575
4577
  t[s] ??= { referencedBy: [], referencedTagNames: [], referencedDeferredTagNames: [] }, t[s].referencedBy.push(e.sourceFile.fileName);
4576
4578
  }), [];
4577
4579
  }
4578
- const qo = (e, t) => {
4580
+ const Vo = (e, t) => {
4579
4581
  const i = e.pragmas;
4580
4582
  if (i?.has("jsx") === !0 || i?.has("jsxImportSource") === !0)
4581
4583
  return e.statements;
@@ -4595,11 +4597,11 @@ const qo = (e, t) => {
4595
4597
  }
4596
4598
  const r = {
4597
4599
  compiler: t.compiler,
4598
- externalComponents: Ti(),
4599
- localComponents: Yi(t.compiler),
4600
+ externalComponents: $i(),
4601
+ localComponents: Qi(t.compiler),
4600
4602
  sourceFile: e,
4601
4603
  transformationContext: t.transformation,
4602
- importRenames: Vo(e),
4604
+ importRenames: Go(e),
4603
4605
  existingImportedModules: /* @__PURE__ */ new Set(),
4604
4606
  importedFunctionComponentsFromModules: /* @__PURE__ */ new Set(),
4605
4607
  existingLitImports: /* @__PURE__ */ new Set(),
@@ -4613,7 +4615,7 @@ const qo = (e, t) => {
4613
4615
  let a = [];
4614
4616
  if (e.statements.every((d) => {
4615
4617
  if (o.isImportDeclaration(d)) {
4616
- const c = Bo(r, d);
4618
+ const c = _o(r, d);
4617
4619
  if (c === void 0)
4618
4620
  return !0;
4619
4621
  if (a.push(c), r.hasNonLuminaJsxImport)
@@ -4623,11 +4625,11 @@ const qo = (e, t) => {
4623
4625
  return !0;
4624
4626
  }), r.hasNonLuminaJsxImport)
4625
4627
  return e.statements;
4626
- if (r.neededImports.size > 0 && (a = a.map(Ko, r), r.existingLitImports.size > 0))
4628
+ if (r.neededImports.size > 0 && (a = a.map(Wo, r), r.existingLitImports.size > 0))
4627
4629
  throw new Error(
4628
4630
  `Expected context.existingLitImports to be empty by now. Found: ${Array.from(r.existingLitImports).join(", ")}`
4629
4631
  );
4630
- const l = [Uo, zo, Ho].flatMap(
4632
+ const l = [zo, Ho, qo].flatMap(
4631
4633
  (d) => d(r)
4632
4634
  );
4633
4635
  if (r.neededImports.size > 0)
@@ -4636,24 +4638,24 @@ const qo = (e, t) => {
4636
4638
  );
4637
4639
  return [...l, ...a];
4638
4640
  };
4639
- function Vo(e) {
4640
- return Go(e), Object.fromEntries(
4641
- lr.map((t) => [t, e.identifiers.has(t) ? `${t}$jsx` : t])
4641
+ function Go(e) {
4642
+ return Xo(e), Object.fromEntries(
4643
+ dr.map((t) => [t, e.identifiers.has(t) ? `${t}$jsx` : t])
4642
4644
  );
4643
4645
  }
4644
- function Go(e) {
4646
+ function Xo(e) {
4645
4647
  if (!("identifiers" in e))
4646
4648
  throw new Error(
4647
4649
  "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."
4648
4650
  );
4649
4651
  }
4650
- const qt = "customElement", Xo = (e, t) => {
4652
+ const Vt = "customElement", Yo = (e, t) => {
4651
4653
  const i = [];
4652
4654
  if (t.apiModule?.declarations.forEach((r) => {
4653
4655
  const a = r;
4654
4656
  a.customElement !== void 0 && i.push(
4655
4657
  o.factory.createExpressionStatement(
4656
- o.factory.createCallExpression(o.factory.createIdentifier(qt), void 0, [
4658
+ o.factory.createCallExpression(o.factory.createIdentifier(Vt), void 0, [
4657
4659
  o.factory.createStringLiteral(a.tagName ?? ""),
4658
4660
  o.factory.createIdentifier(a.name)
4659
4661
  ])
@@ -4671,13 +4673,13 @@ const qt = "customElement", Xo = (e, t) => {
4671
4673
  !1,
4672
4674
  void 0,
4673
4675
  o.factory.createNamedImports([
4674
- o.factory.createImportSpecifier(!1, void 0, o.factory.createIdentifier(qt))
4676
+ o.factory.createImportSpecifier(!1, void 0, o.factory.createIdentifier(Vt))
4675
4677
  ])
4676
4678
  ),
4677
4679
  o.factory.createStringLiteral(s)
4678
4680
  ), ...e.statements, ...i];
4679
4681
  };
4680
- function Yo(e, t, i) {
4682
+ function Qo(e, t, i) {
4681
4683
  return t.size === 0 ? e : [
4682
4684
  o.factory.createPropertyDeclaration(
4683
4685
  [
@@ -4691,8 +4693,8 @@ function Yo(e, t, i) {
4691
4693
  Array.from(
4692
4694
  t.entries(),
4693
4695
  ([s, n]) => o.factory.createPropertyAssignment(
4694
- ni(s) ? o.factory.createStringLiteral(s) : s,
4695
- Qo(n, i)
4696
+ oi(s) ? o.factory.createStringLiteral(s) : s,
4697
+ Zo(n, i)
4696
4698
  )
4697
4699
  )
4698
4700
  )
@@ -4700,7 +4702,7 @@ function Yo(e, t, i) {
4700
4702
  ...e
4701
4703
  ];
4702
4704
  }
4703
- function Qo(e, t) {
4705
+ function Zo(e, t) {
4704
4706
  let i = 0, s = !0;
4705
4707
  const n = [], r = [];
4706
4708
  for (const d of e.properties)
@@ -4710,27 +4712,27 @@ function Qo(e, t) {
4710
4712
  return !0;
4711
4713
  const c = d.name.text, p = d.initializer, m = p.kind === o.SyntaxKind.TrueKeyword, f = p.kind === o.SyntaxKind.FalseKeyword;
4712
4714
  if (c === "attribute")
4713
- return s = !1, i |= m ? wt : 0, !m && !f;
4715
+ return s = !1, i |= m ? St : 0, !m && !f;
4714
4716
  if (c === "reflect")
4715
- return i |= m ? Cs : 0, !1;
4717
+ return i |= m ? Es : 0, !1;
4716
4718
  if (c === "type" && o.isIdentifier(p)) {
4717
4719
  if (p.text === "Boolean")
4718
- return i |= Es, !1;
4719
- if (p.text === "Number")
4720
4720
  return i |= Ts, !1;
4721
+ if (p.text === "Number")
4722
+ return i |= $s, !1;
4721
4723
  } else {
4722
4724
  if (c === "state")
4723
- return s = !1, i |= m ? $s : 0, !1;
4725
+ return s = !1, i |= m ? Ps : 0, !1;
4724
4726
  if (c === "readOnly")
4725
- return i |= m ? Ps : 0, !1;
4726
- if (c === "noAccessor")
4727
4727
  return i |= m ? ks : 0, !1;
4728
- if (c === "useDefault")
4728
+ if (c === "noAccessor")
4729
4729
  return i |= m ? Is : 0, !1;
4730
+ if (c === "useDefault")
4731
+ return i |= m ? xs : 0, !1;
4730
4732
  }
4731
4733
  return !0;
4732
4734
  }
4733
- s && (i |= wt);
4735
+ s && (i |= St);
4734
4736
  const l = o.factory.createNumericLiteral(i);
4735
4737
  return n.length === 0 && (t || r.length === 0) ? l : o.factory.createArrayLiteralExpression([
4736
4738
  l,
@@ -4745,7 +4747,7 @@ function Qo(e, t) {
4745
4747
  ...t ? [] : [o.factory.createObjectLiteralExpression(r)]
4746
4748
  ]);
4747
4749
  }
4748
- function Zo(e, t, i) {
4750
+ function ea(e, t, i) {
4749
4751
  let s = -1, n = -1, r = -1;
4750
4752
  e.options?.properties.forEach((p, m) => {
4751
4753
  if (o.isSpreadAssignment(p))
@@ -4757,23 +4759,23 @@ function Zo(e, t, i) {
4757
4759
  f === "type" ? s = m : f === "attribute" ? n = m : f === "readOnly" && (r = m);
4758
4760
  }
4759
4761
  });
4760
- const a = i.attribute === void 0 && n === -1, l = i.readonly === !0 && i.docsOnlyReadonly !== !0 && r === -1, d = ea(e, i, s), c = [
4762
+ const a = i.attribute === void 0 && n === -1, l = i.readonly === !0 && i.docsOnlyReadonly !== !0 && r === -1, d = ta(e, i, s), c = [
4761
4763
  ...a ? [o.factory.createPropertyAssignment("attribute", o.factory.createFalse())] : [],
4762
4764
  ...l ? [o.factory.createPropertyAssignment("readOnly", o.factory.createTrue())] : [],
4763
4765
  ...d !== void 0 ? [d] : []
4764
4766
  ];
4765
4767
  return c.length > 0 ? e.options === void 0 ? o.factory.createObjectLiteralExpression(c, !1) : o.factory.updateObjectLiteralExpression(e.options, [...e.options.properties, ...c]) : e.options;
4766
4768
  }
4767
- function ea(e, t, i) {
4769
+ function ta(e, t, i) {
4768
4770
  if (t.attribute === void 0)
4769
4771
  return;
4770
- const s = ta(t.type.values);
4772
+ const s = ia(t.type.values);
4771
4773
  return s === "Other" || t.readonly === !0 && (s !== "Boolean" || t.reflects === void 0) || e.options?.properties[i] !== void 0 ? void 0 : o.factory.createPropertyAssignment(
4772
4774
  o.factory.createIdentifier("type"),
4773
4775
  o.factory.createIdentifier(s)
4774
4776
  );
4775
4777
  }
4776
- function ta(e) {
4778
+ function ia(e) {
4777
4779
  let t = !1, i = !1, s = !1;
4778
4780
  if (e?.forEach((n) => {
4779
4781
  t ||= n.type === "number", i ||= n.type === "boolean", s ||= n.type === "string" || n.type === "any" || n.type === "unknown";
@@ -4785,7 +4787,7 @@ function ta(e) {
4785
4787
  }
4786
4788
  return "Other";
4787
4789
  }
4788
- function ia(e, t, i, s, n, r) {
4790
+ function sa(e, t, i, s, n, r) {
4789
4791
  if (i.modifiers === void 0)
4790
4792
  return i;
4791
4793
  let a = -1, l = -1;
@@ -4795,23 +4797,23 @@ function ia(e, t, i, s, n, r) {
4795
4797
  p === "property" && (a = c), p === "state" && (l = c);
4796
4798
  }
4797
4799
  }), a !== -1) {
4798
- const d = sa(e, t, i, s, n), c = Vt(i, a, n), p = Zo(c, n, d);
4799
- return r.set(d.name, p ?? o.factory.createObjectLiteralExpression()), c.options = p, Gt(i, a);
4800
+ const d = ra(e, t, i, s, n), c = Gt(i, a, n), p = ea(c, n, d);
4801
+ return r.set(d.name, p ?? o.factory.createObjectLiteralExpression()), c.options = p, Xt(i, a);
4800
4802
  } else if (l !== -1) {
4801
- const d = Vt(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 = oi(i.name);
4803
+ const d = Gt(i, l, n), c = o.factory.createPropertyAssignment("state", o.factory.createTrue()), p = d.options === void 0 ? o.factory.createObjectLiteralExpression([c]) : o.factory.updateObjectLiteralExpression(d.options, [...d.options.properties, c]), m = ai(i.name);
4802
4804
  if (m === void 0)
4803
4805
  throw new Error("Failed to statically determine the state property name");
4804
- return r.set(m, p), Gt(i, l);
4806
+ return r.set(m, p), Xt(i, l);
4805
4807
  } else
4806
4808
  return i;
4807
4809
  }
4808
- function sa(e, t, i, s, n) {
4810
+ function ra(e, t, i, s, n) {
4809
4811
  const r = t ?? (e.compiler.isInTest ? {
4810
4812
  members: []
4811
4813
  } : void 0);
4812
4814
  if (r === void 0)
4813
4815
  throw Error(`Failed to find API component for ${s} in ${n.fileName}`);
4814
- const a = oi(i.name);
4816
+ const a = ai(i.name);
4815
4817
  let l;
4816
4818
  for (let d = 0; d < r.members.length; ++d) {
4817
4819
  const c = r.members[d];
@@ -4826,11 +4828,11 @@ function sa(e, t, i, s, n) {
4826
4828
  throw Error(
4827
4829
  `Failed to statically determine the property name: ${i.getText(n)} in ${s} in ${n.fileName}`
4828
4830
  );
4829
- l.name = a, l.attribute ??= Zt(a);
4831
+ l.name = a, l.attribute ??= ei(a);
4830
4832
  }
4831
4833
  return l;
4832
4834
  }
4833
- function Vt(e, t, i) {
4835
+ function Gt(e, t, i) {
4834
4836
  const s = e.modifiers[t], n = s.expression, r = n.arguments.at(0);
4835
4837
  if (r && !o.isObjectLiteralExpression(r))
4836
4838
  throw new Error(
@@ -4838,7 +4840,7 @@ function Vt(e, t, i) {
4838
4840
  );
4839
4841
  return { decorator: s, callExpression: n, options: r };
4840
4842
  }
4841
- function Gt(e, t) {
4843
+ function Xt(e, t) {
4842
4844
  const i = [
4843
4845
  ...e.modifiers.slice(0, t),
4844
4846
  ...e.modifiers.slice(t + 1)
@@ -4865,7 +4867,7 @@ function Gt(e, t) {
4865
4867
  e.initializer
4866
4868
  );
4867
4869
  }
4868
- function ra(e, t, i, s) {
4870
+ function na(e, t, i, s) {
4869
4871
  let n;
4870
4872
  if (e.apiJsonEnabled)
4871
4873
  for (let d = 0; d < e.privateApiJson.modules.length; ++d) {
@@ -4888,9 +4890,9 @@ function ra(e, t, i, s) {
4888
4890
  } finally {
4889
4891
  l = i.statements, i.statements = a;
4890
4892
  }
4891
- return na(i, l);
4893
+ return oa(i, l);
4892
4894
  }
4893
- const na = (e, t) => o.factory.updateSourceFile(
4895
+ const oa = (e, t) => o.factory.updateSourceFile(
4894
4896
  e,
4895
4897
  t,
4896
4898
  /*
@@ -4905,10 +4907,10 @@ const na = (e, t) => o.factory.updateSourceFile(
4905
4907
  e.hasNoDefaultLib,
4906
4908
  e.libReferenceDirectives
4907
4909
  );
4908
- function oa(e, t) {
4910
+ function aa(e, t) {
4909
4911
  t.compiler.viteCommand === "build" && ("emitNode" in e && (e.emitNode ??= {}), o.setEmitFlags(e, o.EmitFlags.NoComments));
4910
4912
  }
4911
- const aa = (e, t) => {
4913
+ const ca = (e, t) => {
4912
4914
  let i;
4913
4915
  if (t.apiModule !== void 0)
4914
4916
  for (let d = 0; d < t.apiModule.declarations.length; ++d) {
@@ -4924,16 +4926,16 @@ const aa = (e, t) => {
4924
4926
  function n() {
4925
4927
  s = /* @__PURE__ */ new Map();
4926
4928
  }
4927
- const r = (d) => Yo(d, s, t.compiler.shouldMinify);
4929
+ const r = (d) => Qo(d, s, t.compiler.shouldMinify);
4928
4930
  function a(d, c) {
4929
- const p = la(t, i, d, c, e, s);
4930
- return oa(p, t), p;
4931
+ const p = da(t, i, d, c, e, s);
4932
+ return aa(p, t), p;
4931
4933
  }
4932
4934
  return e.statements.map(
4933
- (d) => ms(a, d, t, n, r)
4935
+ (d) => fs(a, d, t, n, r)
4934
4936
  );
4935
4937
  };
4936
- function ms(e, t, i, s, n = ai) {
4938
+ function fs(e, t, i, s, n = ci) {
4937
4939
  if (o.isClassDeclaration(t) && // Ignore classes that don't extend anything - those are definitely not components
4938
4940
  t.heritageClauses?.some((r) => r.token === o.SyntaxKind.ExtendsKeyword)) {
4939
4941
  let r = !1;
@@ -4956,15 +4958,15 @@ function ms(e, t, i, s, n = ai) {
4956
4958
  } else
4957
4959
  return i.compiler.isInTest ? o.visitEachChild(
4958
4960
  t,
4959
- (a) => ms(e, a, i, s, n),
4961
+ (a) => fs(e, a, i, s, n),
4960
4962
  i.transformation
4961
4963
  ) : t;
4962
4964
  }
4963
- const ca = /* @__PURE__ */ new Set(["connectedCallback", "disconnectedCallback"]);
4964
- function la(e, t, i, s, n, r) {
4965
+ const la = /* @__PURE__ */ new Set(["connectedCallback", "disconnectedCallback"]);
4966
+ function da(e, t, i, s, n, r) {
4965
4967
  if (o.isMethodDeclaration(i)) {
4966
4968
  const a = i.modifiers?.filter(
4967
- (l) => !o.isDecorator(l) || !da(l)
4969
+ (l) => !o.isDecorator(l) || !pa(l)
4968
4970
  );
4969
4971
  if (a?.length !== i.modifiers?.length)
4970
4972
  return o.factory.updateMethodDeclaration(
@@ -4978,7 +4980,7 @@ function la(e, t, i, s, n, r) {
4978
4980
  i.type,
4979
4981
  i.body
4980
4982
  );
4981
- if ("text" in i.name && ca.has(i.name.text) && i.body) {
4983
+ if ("text" in i.name && la.has(i.name.text) && i.body) {
4982
4984
  const l = i.name.text;
4983
4985
  return i.body.statements.some(
4984
4986
  (c) => o.isExpressionStatement(c) && o.isCallExpression(c.expression) && o.isPropertyAccessExpression(c.expression.expression) && c.expression.expression.expression.kind === o.SyntaxKind.SuperKeyword && c.expression.expression.name.text === l
@@ -5004,14 +5006,14 @@ function la(e, t, i, s, n, r) {
5004
5006
  );
5005
5007
  }
5006
5008
  }
5007
- return o.isPropertyDeclaration(i) || o.isAccessor(i) ? ia(e, t, i, s, n, r) : i;
5008
- }
5009
- const da = (e) => o.isCallExpression(e.expression) && o.isIdentifier(e.expression.expression) && e.expression.expression.text === "method", pa = [
5010
- qo,
5011
- Xo,
5012
- aa
5013
- ], ua = "@arcgis/lumina:transformComponents", ma = (e) => ({
5014
- name: ua,
5009
+ return o.isPropertyDeclaration(i) || o.isAccessor(i) ? sa(e, t, i, s, n, r) : i;
5010
+ }
5011
+ const pa = (e) => o.isCallExpression(e.expression) && o.isIdentifier(e.expression.expression) && e.expression.expression.text === "method", ua = [
5012
+ Vo,
5013
+ Yo,
5014
+ ca
5015
+ ], ma = "@arcgis/lumina:transformComponents", fa = (e) => ({
5016
+ name: ma,
5015
5017
  transform: {
5016
5018
  // Transform JSX to lit-html first so that vite:esbuild doesn't transform JSX to h().
5017
5019
  // Also, we need to run on the original fs file, before other transforms so
@@ -5031,11 +5033,11 @@ const da = (e) => o.isCallExpression(e.expression) && o.isIdentifier(e.expressio
5031
5033
  e.apiJsonDeferred === void 0 ? [re] : [re, e.apiJsonDeferred.promise]
5032
5034
  );
5033
5035
  const n = e.getSourceFile(i, t), a = o.transform(n, [
5034
- (f) => () => ra(e, f, n, [
5036
+ (f) => () => na(e, f, n, [
5035
5037
  ...e.options.types?.sourceFileTransformers ?? [],
5036
- ...pa
5038
+ ...ua
5037
5039
  ])
5038
- ]).transformed[0], l = e._typeScriptPrinter, d = e.viteConfig.build.sourcemap === !1 ? void 0 : St.createSourceMapGenerator(fa, u.basename(i), "", u.dirname(i), {}), c = St.createTextWriter(`
5040
+ ]).transformed[0], l = e._typeScriptPrinter, d = e.viteConfig.build.sourcemap === !1 ? void 0 : Ct.createSourceMapGenerator(ga, u.basename(i), "", u.dirname(i), {}), c = Ct.createTextWriter(`
5039
5041
  `);
5040
5042
  l.writeFile(a, c, d);
5041
5043
  const p = c.getText(), m = d?.toJSON();
@@ -5045,46 +5047,46 @@ const da = (e) => o.isCallExpression(e.expression) && o.isIdentifier(e.expressio
5045
5047
  };
5046
5048
  }
5047
5049
  }
5048
- }), fa = {
5050
+ }), ga = {
5049
5051
  getCurrentDirectory: o.sys.getCurrentDirectory,
5050
- getCanonicalFileName: o.sys.useCaseSensitiveFileNames ? ai : (e) => e.toLowerCase()
5051
- }, ga = (e) => ({
5052
+ getCanonicalFileName: o.sys.useCaseSensitiveFileNames ? ci : (e) => e.toLowerCase()
5053
+ }, ha = (e) => ({
5052
5054
  name: "@arcgis/lumina:handleDynamicAssets",
5053
5055
  configureServer(t) {
5054
- e.server = t, Xt(e).forEach(({ assets: i, transformers: s }) => te(e, i, s));
5056
+ e.server = t, Yt(e).forEach(({ assets: i, transformers: s }) => te(e, i, s));
5055
5057
  },
5056
5058
  async writeBundle() {
5057
5059
  await Promise.all(
5058
- Xt(e).map(
5059
- async ({ assets: t, transformers: i }) => await Ii(e, t, i)
5060
+ Yt(e).map(
5061
+ async ({ assets: t, transformers: i }) => await xi(e, t, i)
5060
5062
  )
5061
5063
  );
5062
5064
  }
5063
5065
  });
5064
- function Xt(e) {
5066
+ function Yt(e) {
5065
5067
  const t = [], i = e.assetsToProvide?.filter((s) => s.apply === void 0 || s.apply === e.viteCommand) ?? [];
5066
5068
  return e.options.assets?.extra?.forEach((s) => {
5067
5069
  "type" in s ? t.push(s) : "assets" in s && t.push(...s.assets);
5068
5070
  }), t.length > 0 && i.push({ assets: t }), e.isInBuildWatch || (e.assetsToProvide = void 0), i;
5069
5071
  }
5070
- const rt = "@arcgis/lumina:updatePackageJson", ha = (e) => ({
5071
- name: rt,
5072
+ const nt = "@arcgis/lumina:updatePackageJson", ya = (e) => ({
5073
+ name: nt,
5072
5074
  apply: () => e.viteCommand === "serve" && e.environment === "development" && !e.isInTest && !e.isInCi,
5073
5075
  configResolved() {
5074
- ya(e).catch(
5075
- (t) => T.error(rt, `Failed to update package's package.json:${String(t)}`)
5076
+ va(e).catch(
5077
+ (t) => T.error(nt, `Failed to update package's package.json:${String(t)}`)
5076
5078
  );
5077
5079
  }
5078
5080
  });
5079
- async function ya(e) {
5080
- const t = u.join(e.dir.root, "package.json"), i = JSON.parse(await z(t, "utf-8")), s = va(i, e);
5081
- s && ri(t, JSON.stringify(s, null, 2));
5081
+ async function va(e) {
5082
+ const t = u.join(e.dir.root, "package.json"), i = JSON.parse(await z(t, "utf-8")), s = ba(i, e);
5083
+ s && ni(t, JSON.stringify(s, null, 2));
5082
5084
  }
5083
- function va(e, t) {
5085
+ function ba(e, t) {
5084
5086
  const i = e?.devDependencies ?? {};
5085
5087
  Object.keys(e?.peerDependencies ?? {}).forEach((c) => {
5086
5088
  c in i || T.warn(
5087
- rt,
5089
+ nt,
5088
5090
  `Every peerDependency should also be a devDependency, or else some tools will get confused (like Turbo Build). Found "${c}" that is not a devDependency. Please edit your package.json`
5089
5091
  );
5090
5092
  });
@@ -5119,21 +5121,21 @@ function va(e, t) {
5119
5121
  if (s)
5120
5122
  return e;
5121
5123
  }
5122
- const ba = (e) => ({
5124
+ const wa = (e) => ({
5123
5125
  deprecation: "docs.json is deprecated and will be removed in a future release. Use api.json instead",
5124
5126
  timestamp: e.apiJson.timestamp,
5125
5127
  compiler: e.apiJson.compiler,
5126
- components: wa(e),
5128
+ components: Sa(e),
5127
5129
  typeLibrary: {}
5128
5130
  });
5129
- function wa(e) {
5131
+ function Sa(e) {
5130
5132
  const t = [];
5131
5133
  for (const i of e.apiJson.modules)
5132
5134
  for (const s of i.declarations)
5133
- s.customElement === !0 && t.push(Sa(s, i.sourcePath));
5135
+ s.customElement === !0 && t.push(Ca(s, i.sourcePath));
5134
5136
  return t;
5135
5137
  }
5136
- function Sa(e, t) {
5138
+ function Ca(e, t) {
5137
5139
  const i = e.superclass ? [{ name: "superclass", text: JSON.stringify(e.superclass) }] : [];
5138
5140
  return {
5139
5141
  filePath: t,
@@ -5148,27 +5150,34 @@ function Sa(e, t) {
5148
5150
  dependencies: [],
5149
5151
  dependencyGraph: {},
5150
5152
  deprecation: typeof e.deprecated == "boolean" ? e.deprecated ? "" : void 0 : e.deprecated,
5151
- props: e.members.map(Ca).filter(R),
5152
- methods: e.members.map(Ea).filter(R),
5153
- events: e.events?.map(Ta) ?? [],
5154
- styles: e.cssProperties?.map((s) => ({
5155
- name: s.name,
5153
+ props: e.members.map(Ea).filter(R),
5154
+ methods: e.members.map(Ta).filter(R),
5155
+ events: e.events?.map($a) ?? [],
5156
+ styles: e.cssProperties?.map(({ name: s, description: n, deprecated: r }) => ({
5157
+ name: s,
5156
5158
  annotation: "prop",
5157
- docs: typeof s.deprecated == "string" ? `DEPRECATED ${s.deprecated}` : s.description ?? "",
5159
+ docs: Ve(r, n),
5158
5160
  mode: void 0
5159
5161
  })) ?? [],
5160
- slots: e.slots?.map(({ name: s, description: n = "", deprecated: r }) => ({
5162
+ slots: e.slots?.map(({ name: s, description: n, deprecated: r }) => ({
5161
5163
  name: s,
5162
- docs: typeof r == "string" ? `DEPRECATED ${r}` : n
5164
+ docs: Ve(r, n)
5163
5165
  })) ?? [],
5164
- parts: e.cssParts?.map(({ name: s, description: n = "", deprecated: r }) => ({
5166
+ parts: e.cssParts?.map(({ name: s, description: n, deprecated: r }) => ({
5165
5167
  name: s,
5166
- docs: typeof r == "string" ? `DEPRECATED ${r}` : n
5168
+ docs: Ve(r, n)
5167
5169
  })) ?? [],
5168
5170
  listeners: []
5169
5171
  };
5170
5172
  }
5171
- function Ca(e) {
5173
+ function Ve(e, t = "") {
5174
+ if (typeof e == "string") {
5175
+ const i = t === "" ? "" : `${e.endsWith(".") ? "" : "."} ${t}`;
5176
+ return `[Deprecated] ${e}${i}`;
5177
+ }
5178
+ return t;
5179
+ }
5180
+ function Ea(e) {
5172
5181
  if (e.kind !== "field")
5173
5182
  return;
5174
5183
  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;
@@ -5178,7 +5187,7 @@ function Ca(e) {
5178
5187
  complexType: t.type === void 0 ? void 0 : {
5179
5188
  original: t.type.text,
5180
5189
  resolved: t.type.text,
5181
- references: ht(t.type.references)
5190
+ references: yt(t.type.references)
5182
5191
  },
5183
5192
  mutable: !0,
5184
5193
  attr: "attribute" in t && typeof t.attribute == "string" ? t.attribute : void 0,
@@ -5197,19 +5206,19 @@ function Ca(e) {
5197
5206
  required: n
5198
5207
  };
5199
5208
  }
5200
- const ht = (e) => Object.fromEntries(
5209
+ const yt = (e) => Object.fromEntries(
5201
5210
  e?.map(
5202
5211
  (t) => [
5203
5212
  t.name,
5204
5213
  {
5205
- location: t.package === xs ? "global" : t.package === void 0 ? "local" : "import",
5214
+ location: t.package === Ls ? "global" : t.package === void 0 ? "local" : "import",
5206
5215
  path: typeof t.module == "string" && typeof t.package == "string" ? u.join(t.package, t.module) : t.module ?? t.package,
5207
5216
  id: "notImplemented"
5208
5217
  }
5209
5218
  ]
5210
5219
  ) ?? []
5211
5220
  );
5212
- function Ea(e) {
5221
+ function Ta(e) {
5213
5222
  if (e.kind !== "method")
5214
5223
  return;
5215
5224
  const t = e, i = e.inheritedFrom ? [{ name: "inheritedFrom", text: JSON.stringify(e.inheritedFrom) }] : [], s = t.parameters?.map(({ name: n, type: r, description: a }) => ({
@@ -5228,7 +5237,7 @@ function Ea(e) {
5228
5237
  signature: t.signature ?? "()=>unknown",
5229
5238
  parameters: s,
5230
5239
  return: t.return?.type?.text ?? "void",
5231
- references: ht([
5240
+ references: yt([
5232
5241
  ...t.return?.type?.references ?? [],
5233
5242
  ...t.parameters?.flatMap((n) => n.type.references ?? []) ?? []
5234
5243
  ])
@@ -5240,7 +5249,7 @@ function Ea(e) {
5240
5249
  deprecation: typeof t.deprecated == "boolean" ? t.deprecated ? "" : void 0 : t.deprecated
5241
5250
  };
5242
5251
  }
5243
- function Ta(e) {
5252
+ function $a(e) {
5244
5253
  const t = e.inheritedFrom ? [{ name: "inheritedFrom", text: JSON.stringify(e.inheritedFrom) }] : [];
5245
5254
  return {
5246
5255
  event: e.name,
@@ -5249,7 +5258,7 @@ function Ta(e) {
5249
5258
  complexType: {
5250
5259
  original: e.type.text,
5251
5260
  resolved: e.type.text,
5252
- references: ht(e.type.references)
5261
+ references: yt(e.type.references)
5253
5262
  },
5254
5263
  cancelable: e.cancelable ?? !0,
5255
5264
  composed: e.composed ?? !0,
@@ -5265,8 +5274,8 @@ const ye = {
5265
5274
  cssParts: "CSS Parts",
5266
5275
  methods: "Methods"
5267
5276
  };
5268
- function fs(e) {
5269
- const t = $a(e.slots), i = Pa(e.events), s = ka(e.cssProperties), n = Ia(e.cssParts), r = Aa(e.members), a = e.description?.trim();
5277
+ function gs(e) {
5278
+ const t = Pa(e.slots), i = ka(e.events), s = Ia(e.cssProperties), n = xa(e.cssParts), r = Aa(e.members), a = e.description?.trim();
5270
5279
  return [...a ? [`${a}
5271
5280
  --`] : [], i, r, t, s, n].filter(Boolean).join(`
5272
5281
 
@@ -5274,28 +5283,28 @@ function fs(e) {
5274
5283
  }
5275
5284
  const ve = (e, t) => t === void 0 || t.length === 0 ? "" : `### ${e}
5276
5285
  ${t.join(`
5277
- `)}`, $a = (e) => ve(
5286
+ `)}`, Pa = (e) => ve(
5278
5287
  ye.slots,
5279
5288
  e?.filter((t) => t.deprecated === void 0).map(
5280
5289
  (t) => `- ${t.name ? `**${t.name}**` : "_default_"}${t.description === void 0 ? "" : ` - ${t.description}`}`
5281
5290
  )
5282
- ), Pa = (e) => ve(
5291
+ ), ka = (e) => ve(
5283
5292
  ye.events,
5284
5293
  e?.filter((t) => t.deprecated === void 0).map((t) => `- **${t.name}**${t.description === void 0 ? "" : ` - ${t.description}`}`)
5285
- ), ka = (e = []) => ve(
5294
+ ), Ia = (e = []) => ve(
5286
5295
  ye.cssProperties,
5287
5296
  e?.filter((t) => t.deprecated === void 0).map(
5288
5297
  (t) => `- **${t.name}**${t.description === void 0 ? "" : ` - ${t.description}`} ${t.default ? `_(default: ${t.default})_}` : ""}`
5289
5298
  )
5290
- ), Ia = (e) => ve(
5299
+ ), xa = (e) => ve(
5291
5300
  ye.cssParts,
5292
5301
  e?.filter((t) => t.deprecated === void 0).map((t) => `- **${t.name}**${t.description === void 0 ? "" : ` - ${t.description}`}`)
5293
5302
  ), Aa = (e) => ve(
5294
5303
  ye.methods,
5295
- e.filter(Ls).filter((t) => t.deprecated === void 0).map(
5304
+ e.filter(Ns).filter((t) => t.deprecated === void 0).map(
5296
5305
  (t) => `- \`${t.name}${t.signature}\`${t.description ? ` - ${t.description}` : ""}`
5297
5306
  )
5298
- ), gs = (e) => {
5307
+ ), hs = (e) => {
5299
5308
  const t = [], i = /* @__PURE__ */ new Set();
5300
5309
  for (let s = 0; s < e.length; ++s) {
5301
5310
  const n = e[s].cssProperties;
@@ -5309,13 +5318,13 @@ ${t.join(`
5309
5318
  }
5310
5319
  }
5311
5320
  return t;
5312
- }, hs = (e) => e.flatMap(
5321
+ }, ys = (e) => e.flatMap(
5313
5322
  (t) => t.cssParts?.filter((i) => i.deprecated === void 0).map((i) => ({
5314
5323
  name: `::part(${i.name})`,
5315
5324
  description: t.tagName + (i.description === void 0 ? "" : `: ${i.description}`)
5316
5325
  })) ?? []
5317
5326
  );
5318
- function xa(e) {
5327
+ function La(e) {
5319
5328
  if (e.attributes === void 0)
5320
5329
  return [];
5321
5330
  const t = [];
@@ -5326,7 +5335,7 @@ function xa(e) {
5326
5335
  description: s.description || void 0,
5327
5336
  default: s.default,
5328
5337
  value: {
5329
- type: La(
5338
+ type: Na(
5330
5339
  s.type.values?.map(
5331
5340
  (n) => n.type === "string" && n.value !== void 0 ? `"${n.value}"` : n.value ?? n.type
5332
5341
  )
@@ -5336,9 +5345,9 @@ function xa(e) {
5336
5345
  }
5337
5346
  return t;
5338
5347
  }
5339
- const La = (e) => e?.length === 1 ? e[0] : e;
5340
- function Na(e, t) {
5341
- const i = ja(e), s = gs(e), n = hs(e), r = j();
5348
+ const Na = (e) => e?.length === 1 ? e[0] : e;
5349
+ function ja(e, t) {
5350
+ const i = Fa(e), s = hs(e), n = ys(e), r = j();
5342
5351
  return {
5343
5352
  $schema: "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
5344
5353
  name: r.name,
@@ -5356,113 +5365,113 @@ function Na(e, t) {
5356
5365
  }
5357
5366
  };
5358
5367
  }
5359
- const ja = (e) => e.filter((t) => t.deprecated === void 0).map((t) => ({
5368
+ const Fa = (e) => e.filter((t) => t.deprecated === void 0).map((t) => ({
5360
5369
  name: t.tagName,
5361
- description: fs(t),
5370
+ description: gs(t),
5362
5371
  "doc-url": t.demos?.[0]?.url,
5363
- attributes: xa(t),
5372
+ attributes: La(t),
5364
5373
  slots: t.slots?.map((i) => ({
5365
5374
  name: i.name,
5366
5375
  description: i.description
5367
5376
  })),
5368
5377
  // REFACTOR: this was deprecated in the spec: https://github.com/JetBrains/web-types/blob/11e46e47cb65edc1930dc1fae854005ad45ac08f/schema/web-types.json#L866
5369
- events: Yt(t),
5378
+ events: Qt(t),
5370
5379
  js: {
5371
- properties: Fa(t),
5372
- events: Yt(t)
5380
+ properties: Ra(t),
5381
+ events: Qt(t)
5373
5382
  }
5374
- })), Fa = (e) => e.members.filter(Ns).filter((t) => t.deprecated === void 0).map((t) => ({
5383
+ })), Ra = (e) => e.members.filter(js).filter((t) => t.deprecated === void 0).map((t) => ({
5375
5384
  name: t.name,
5376
5385
  description: t.description,
5377
5386
  type: t.type?.text
5378
- })) ?? [], Yt = (e) => e.events?.filter((t) => t.deprecated === void 0).map((t) => ({
5387
+ })) ?? [], Qt = (e) => e.events?.filter((t) => t.deprecated === void 0).map((t) => ({
5379
5388
  name: t.name,
5380
5389
  type: t.type?.text,
5381
5390
  description: t.description
5382
- })) ?? [], Ra = (e) => e.filter((t) => t.deprecated === void 0).map((t) => ({
5391
+ })) ?? [], Da = (e) => e.filter((t) => t.deprecated === void 0).map((t) => ({
5383
5392
  name: t.tagName,
5384
- description: fs(t),
5385
- attributes: Da(t),
5393
+ description: gs(t),
5394
+ attributes: Oa(t),
5386
5395
  references: t.demos?.map((i) => ({ name: i.description, url: i.url })) ?? []
5387
- })), Da = (e) => e.attributes?.filter((t) => t.deprecated === void 0).map((t) => ({
5396
+ })), Oa = (e) => e.attributes?.filter((t) => t.deprecated === void 0).map((t) => ({
5388
5397
  name: t.name,
5389
5398
  description: t.description || void 0,
5390
- values: Oa(t)
5391
- })) ?? [], Oa = (e) => e.type.values?.map((t) => t.value ?? "").filter(Boolean).map((t) => ({ name: t })) ?? [], Ma = (e) => ({
5399
+ values: Ma(t)
5400
+ })) ?? [], Ma = (e) => e.type.values?.map((t) => t.value ?? "").filter(Boolean).map((t) => ({ name: t })) ?? [], Ja = (e) => ({
5392
5401
  $schema: "https://raw.githubusercontent.com/microsoft/vscode-html-languageservice/main/docs/customData.schema.json",
5393
5402
  version: 1.1,
5394
- tags: Ra(e)
5395
- }), Ja = (e) => ({
5403
+ tags: Da(e)
5404
+ }), Ba = (e) => ({
5396
5405
  $schema: "https://raw.githubusercontent.com/microsoft/vscode-css-languageservice/main/docs/customData.schema.json",
5397
5406
  version: 1.1,
5398
- properties: gs(e),
5399
- pseudoElements: hs(e)
5400
- }), Ba = "@arcgis/lumina:generateDocs";
5401
- function _a(e) {
5407
+ properties: hs(e),
5408
+ pseudoElements: ys(e)
5409
+ }), _a = "@arcgis/lumina:generateDocs";
5410
+ function Ka(e) {
5402
5411
  return e._documentationFileNames.stencilLikeDocsJson !== void 0 && e.provideAssets([
5403
5412
  {
5404
5413
  type: "dynamic",
5405
- source: () => JSON.stringify(ba(e), null, st(e)),
5414
+ source: () => JSON.stringify(wa(e), null, rt(e)),
5406
5415
  destination: u.join("../..", e._documentationFileNames.stencilLikeDocsJson)
5407
5416
  }
5408
5417
  ]), {
5409
- name: Ba,
5418
+ name: _a,
5410
5419
  async writeBundle() {
5411
5420
  if (e.isInStorybook)
5412
5421
  return;
5413
- const t = st(e), { jetBrains: i } = e.options.documentation ?? {}, s = e._documentationFileNames, n = s.vsCodeHtml === void 0 ? void 0 : u.join(e.dir.dist, s.vsCodeHtml), r = s.vsCodeCss === void 0 ? void 0 : u.join(e.dir.dist, s.vsCodeCss), a = s.webTypes === void 0 ? void 0 : u.join(e.dir.dist, s.webTypes), l = [n, r, a].filter(R);
5422
+ const t = rt(e), { jetBrains: i } = e.options.documentation ?? {}, s = e._documentationFileNames, n = s.vsCodeHtml === void 0 ? void 0 : u.join(e.dir.dist, s.vsCodeHtml), r = s.vsCodeCss === void 0 ? void 0 : u.join(e.dir.dist, s.vsCodeCss), a = s.webTypes === void 0 ? void 0 : u.join(e.dir.dist, s.webTypes), l = [n, r, a].filter(R);
5414
5423
  if (l.length === 0)
5415
5424
  return;
5416
- await ji(l);
5425
+ await Fi(l);
5417
5426
  const d = [];
5418
5427
  if (n !== void 0) {
5419
- const c = JSON.stringify(Ma(e.apiJsonComponents), null, t);
5428
+ const c = JSON.stringify(Ja(e.apiJsonComponents), null, t);
5420
5429
  d.push(K(n, c));
5421
5430
  }
5422
5431
  if (r !== void 0) {
5423
- const c = JSON.stringify(Ja(e.apiJsonComponents), null, t);
5432
+ const c = JSON.stringify(Ba(e.apiJsonComponents), null, t);
5424
5433
  d.push(K(r, c));
5425
5434
  }
5426
5435
  if (a !== void 0) {
5427
- const c = Na(e.apiJsonComponents, typeof i == "object" ? i : {});
5436
+ const c = ja(e.apiJsonComponents, typeof i == "object" ? i : {});
5428
5437
  d.push(K(a, JSON.stringify(c, null, t)));
5429
5438
  }
5430
5439
  await Promise.all(d);
5431
5440
  }
5432
5441
  };
5433
5442
  }
5434
- function Ka(e) {
5443
+ function Wa(e) {
5435
5444
  return {
5436
5445
  name: "@arcgis/lumina:buildWrappers",
5437
5446
  apply: () => e.viteCommand === "build" && !!e.options.build?.wrappers?.length,
5438
5447
  async writeBundle() {
5439
5448
  e.isInStorybook || await Promise.all(
5440
5449
  e.options.build?.wrappers?.map(async (t) => {
5441
- t.type === "react18" && await za(e, t);
5450
+ t.type === "react18" && await Ha(e, t);
5442
5451
  }) ?? []
5443
5452
  );
5444
5453
  }
5445
5454
  };
5446
5455
  }
5447
- const Wa = "react", Qt = "@lit/react", Ua = `
5448
- import React from "${Wa}";
5449
- import { createComponent } from "${Qt}";
5450
- import type { EventName } from "${Qt}";
5456
+ const Ua = "react", Zt = "@lit/react", za = `
5457
+ import React from "${Ua}";
5458
+ import { createComponent } from "${Zt}";
5459
+ import type { EventName } from "${Zt}";
5451
5460
  import { makeReactWrapperFactory, getReactWrapperOptions } from "@arcgis/lumina";
5452
5461
 
5453
5462
  const createWrapper = /*@__PURE__*/ makeReactWrapperFactory(React, createComponent) as typeof createComponent;
5454
5463
  `;
5455
- async function za(e, t) {
5464
+ async function Ha(e, t) {
5456
5465
  const { name: i } = j(), s = [];
5457
5466
  for (const a of e.apiJson.modules)
5458
5467
  for (const l of a.declarations)
5459
- l.customElement === !0 && s.push(Ha(l));
5460
- const n = [`/// <reference types="${i}" preserve="true" />`, Ua, ...s].join(""), r = u.resolve(t.proxiesFile);
5468
+ l.customElement === !0 && s.push(qa(l));
5469
+ const n = [`/// <reference types="${i}" preserve="true" />`, za, ...s].join(""), r = u.resolve(t.proxiesFile);
5461
5470
  await X(u.dirname(r), { recursive: !0 }), await K(r, n);
5462
5471
  }
5463
- function Ha(e) {
5472
+ function qa(e) {
5464
5473
  const t = e.events?.map(
5465
- (i) => ` ${zs(`on${bs(i.name)}`)}: "${i.name}" as EventName<HTML${e.pascalCaseName}Element["${i.name}"]>,`
5474
+ (i) => ` ${Hs(`on${ws(i.name)}`)}: "${i.name}" as EventName<HTML${e.pascalCaseName}Element["${i.name}"]>,`
5466
5475
  ).join(`
5467
5476
  `);
5468
5477
  return `
@@ -5477,42 +5486,42 @@ ${t}
5477
5486
  );
5478
5487
  `;
5479
5488
  }
5480
- function wc(e = {}) {
5489
+ function Sc(e = {}) {
5481
5490
  const t = new $(e), s = [
5482
5491
  t._plugin,
5483
- _n(t),
5484
- qn(t),
5485
- Yn(t),
5486
- ha(t),
5487
- Nn(t),
5488
- _a(t),
5489
- ma(t),
5490
- uo(t),
5491
- mr(t),
5492
+ Kn(t),
5493
+ Vn(t),
5494
+ Qn(t),
5495
+ ya(t),
5492
5496
  jn(t),
5493
- ga(t),
5494
- fo(t),
5495
- io(t),
5496
- qs(t),
5497
- cn(t),
5498
5497
  Ka(t),
5499
- Fn(t)
5498
+ fa(t),
5499
+ mo(t),
5500
+ fr(t),
5501
+ Fn(t),
5502
+ ha(t),
5503
+ go(t),
5504
+ so(t),
5505
+ Vs(t),
5506
+ ln(t),
5507
+ Wa(t),
5508
+ Rn(t)
5500
5509
  ].filter(R);
5501
5510
  return s.context = t, s;
5502
5511
  }
5503
- const Sc = {
5504
- initializeComponentDependencies: Ei,
5505
- updateLuminaTs: Gi,
5512
+ const Cc = {
5513
+ initializeComponentDependencies: Ti,
5514
+ updateLuminaTs: Xi,
5506
5515
  propertyToAttributeMappings: W,
5507
- nativeEvents: pi,
5508
- svgElements: ot,
5509
- mathMlElements: at,
5510
- alwaysAttributes: ci,
5511
- nativeAlwaysAttributes: li,
5512
- htmlAlwaysAttributes: Ye
5516
+ nativeEvents: ui,
5517
+ svgElements: at,
5518
+ mathMlElements: ct,
5519
+ alwaysAttributes: li,
5520
+ nativeAlwaysAttributes: di,
5521
+ htmlAlwaysAttributes: Qe
5513
5522
  };
5514
5523
  export {
5515
- Sc as exportsForCodemod,
5524
+ Cc as exportsForCodemod,
5516
5525
  De as inferCdnUrl,
5517
- wc as useLumina
5526
+ Sc as useLumina
5518
5527
  };