@arcgis/lumina-compiler 5.1.0-next.69 → 5.1.0-next.70

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,27 +1,27 @@
1
- import { externalizeDependencies as cs, path as u, retrievePackageJson as O, fetchPackageLocation as Gt, asyncRetrievePackageJson as Xt, existsAsync as _, isPosix as Yt, toPosixPathSeparators as ve, toSystemPathSeparators as xe, getCwd as Qt } from "@arcgis/components-build-utils";
1
+ import { externalizeDependencies as cs, path as m, retrievePackageJson as O, fetchPackageLocation as Gt, asyncRetrievePackageJson as Xt, existsAsync as _, isPosix as Yt, toPosixPathSeparators as ve, toSystemPathSeparators as xe, getCwd as Qt } from "@arcgis/components-build-utils";
2
2
  import { isNotUndefined as F } from "@arcgis/toolkit/predicate";
3
3
  import { f as b, l as E } from "./logger-63CXuX6h.js";
4
4
  import o from "typescript";
5
5
  import { camelToKebab as Zt, getPreamble as ds, uncapitalize as gt, capitalize as ps } from "@arcgis/toolkit/string";
6
- import { lazyMetaSubItemJoiner as ms, lazyMetaItemJoiner as De, lazyMetaGroupJoiner as us, propertyFlagAttribute as ht, propertyFlagReflect as fs, propertyFlagBoolean as gs, propertyFlagNumber as hs, propertyFlagState as ys, propertyFlagReadOnly as vs, propertyFlagNoAccessor as bs } from "@arcgis/lumina/config";
7
- import { isApiMethodAsync as ws, globalPackageIdentifier as Ss, isApiMethod as Es, isApiProperty as Cs } from "@arcgis/api-extractor/utils/apiHelpers";
8
- import { readFile as H, readdir as tt, rm as Ts, mkdir as G, cp as $s, writeFile as U, copyFile as Ps } from "node:fs/promises";
9
- import { build as Is } from "esbuild";
10
- import { glob as ks } from "tinyglobby";
6
+ import { lazyMetaSubItemJoiner as us, lazyMetaItemJoiner as De, lazyMetaGroupJoiner as ms, propertyFlagAttribute as ht, propertyFlagReflect as fs, propertyFlagBoolean as gs, propertyFlagNumber as hs, propertyFlagState as ys, propertyFlagReadOnly as vs, propertyFlagNoAccessor as bs, propertyFlagUseDefault as ws } from "@arcgis/lumina/config";
7
+ import { isApiMethodAsync as Ss, globalPackageIdentifier as Es, isApiMethod as Cs, isApiProperty as Ts } from "@arcgis/api-extractor/utils/apiHelpers";
8
+ import { readFile as H, readdir as tt, rm as $s, mkdir as G, cp as Ps, writeFile as U, copyFile as Is } from "node:fs/promises";
9
+ import { build as ks } from "esbuild";
10
+ import { glob as xs } from "tinyglobby";
11
11
  import { renameComponentFolder as We } from "@arcgis/api-extractor/extractor/webComponent/pathMapping";
12
- import { useApiExtractor as xs } from "@arcgis/api-extractor/vite/plugin";
13
- import As from "mime-types";
12
+ import { useApiExtractor as As } from "@arcgis/api-extractor/vite/plugin";
13
+ import Ns from "mime-types";
14
14
  import { writeFileSync as ei } from "node:fs";
15
- import Ns from "chalk";
16
- import { unsafeGetUndocumentedPrinter as Ls, unsafeUndocumentedTs as yt } from "@arcgis/api-extractor/utils/internalTypeScriptApis";
15
+ import Ls from "chalk";
16
+ import { unsafeGetUndocumentedPrinter as js, unsafeUndocumentedTs as yt } from "@arcgis/api-extractor/utils/internalTypeScriptApis";
17
17
  import { pathIsComponentEntrypoint as Ee } from "@arcgis/api-extractor/extractor/webComponent/findComponents";
18
- import { loadApiExtractorConfig as js, mergeApiExtractorConfigs as vt } from "@arcgis/api-extractor/extractor/config";
19
- import { loadTypeScriptConfig as Fs } from "@arcgis/api-extractor/vite/typeScript";
18
+ import { loadApiExtractorConfig as Fs, mergeApiExtractorConfigs as vt } from "@arcgis/api-extractor/extractor/config";
19
+ import { loadTypeScriptConfig as Ds } from "@arcgis/api-extractor/vite/typeScript";
20
20
  import { mappedFind as ze } from "@arcgis/toolkit/array";
21
- import { isPropertyEscapeNeeded as ti, maybeEscapePropertyName as Ds } from "@arcgis/api-extractor/utils/partPrinter";
22
- import { getPackageNameFromExternalSpecifier as Rs, getMemberName as ii } from "@arcgis/api-extractor/utils/astHelpers";
21
+ import { isPropertyEscapeNeeded as ti, maybeEscapePropertyName as Rs } from "@arcgis/api-extractor/utils/partPrinter";
22
+ import { getPackageNameFromExternalSpecifier as Os, getMemberName as ii } from "@arcgis/api-extractor/utils/astHelpers";
23
23
  import { identity as si } from "@arcgis/toolkit/function";
24
- function Os(e) {
24
+ function Ms(e) {
25
25
  const t = e.options?.build?.dependencies ?? {}, i = cs({
26
26
  bundleIn: t.bundleIn,
27
27
  externalize: [
@@ -38,7 +38,7 @@ function Os(e) {
38
38
  e.isInStorybook && (i.resolveId = void 0);
39
39
  }, i;
40
40
  }
41
- const Ms = "Fragment", Re = "DynamicHtmlTag", Oe = "DynamicSvgTag", Ce = /* @__PURE__ */ Symbol("dynamic html tag name"), He = /* @__PURE__ */ Symbol("dynamic svg tag name"), ri = /* @__PURE__ */ new Set([
41
+ const Js = "Fragment", Re = "DynamicHtmlTag", Oe = "DynamicSvgTag", Ce = /* @__PURE__ */ Symbol("dynamic html tag name"), He = /* @__PURE__ */ Symbol("dynamic svg tag name"), ri = /* @__PURE__ */ new Set([
42
42
  /**
43
43
  * There is a "className" property. However, in JSX typings we use "class"
44
44
  * instead to keep name shorter and to match Stencil's name. Thus, it should
@@ -1019,7 +1019,7 @@ const bt = /* @__PURE__ */ new Set(["itemScope"]), ai = /* @__PURE__ */ new Set(
1019
1019
  "volumeChange",
1020
1020
  "waiting",
1021
1021
  "wheel"
1022
- ]), Js = /* @__PURE__ */ new Set([
1022
+ ]), Bs = /* @__PURE__ */ new Set([
1023
1023
  "area",
1024
1024
  "base",
1025
1025
  "br",
@@ -1095,7 +1095,7 @@ const bt = /* @__PURE__ */ new Set(["itemScope"]), ai = /* @__PURE__ */ new Set(
1095
1095
  "tspan",
1096
1096
  "use",
1097
1097
  "view"
1098
- ]), Bs = /* @__PURE__ */ new Set(["title", "svg", "a", "script", "style"]), st = /* @__PURE__ */ new Set([
1098
+ ]), Ks = /* @__PURE__ */ new Set(["title", "svg", "a", "script", "style"]), st = /* @__PURE__ */ new Set([
1099
1099
  "annotation-xml",
1100
1100
  "annotation",
1101
1101
  "maction",
@@ -1127,7 +1127,7 @@ const bt = /* @__PURE__ */ new Set(["itemScope"]), ai = /* @__PURE__ */ new Set(
1127
1127
  "munder",
1128
1128
  "munderover",
1129
1129
  "semantics"
1130
- ]), Ks = /* @__PURE__ */ new Set([
1130
+ ]), _s = /* @__PURE__ */ new Set([
1131
1131
  "annotation-xml",
1132
1132
  "color-profile",
1133
1133
  "font-face",
@@ -1137,7 +1137,7 @@ const bt = /* @__PURE__ */ new Set(["itemScope"]), ai = /* @__PURE__ */ new Set(
1137
1137
  "font-face-name",
1138
1138
  "missing-glyph"
1139
1139
  ]);
1140
- function _s(e) {
1140
+ function Us(e) {
1141
1141
  if (e.length === 0)
1142
1142
  return "";
1143
1143
  const t = e[0];
@@ -1150,11 +1150,11 @@ function _s(e) {
1150
1150
  }
1151
1151
  return e.trim().length === 0 ? t : e;
1152
1152
  }
1153
- const Us = (e) => e.replaceAll("\\", "\\\\").replace(Ws, "\\${").replaceAll("`", "\\`"), Ws = /\$\{/gu, zs = (e) => !Hs.test(e), Hs = /^[^\s"'=<>`]+$/u, qs = /[&<>]/gu, Vs = {
1153
+ const Ws = (e) => e.replaceAll("\\", "\\\\").replace(zs, "\\${").replaceAll("`", "\\`"), zs = /\$\{/gu, Hs = (e) => !qs.test(e), qs = /^[^\s"'=<>`]+$/u, Vs = /[&<>]/gu, Gs = {
1154
1154
  "&": "&amp;",
1155
1155
  "<": "&lt;",
1156
1156
  ">": "&gt;"
1157
- }, li = (e) => e.replace(qs, (t) => Vs[t]), rt = (e) => typeof e == "string" && e.includes("-") && !Ks.has(e), Gs = ["keyed", "ref", "repeat", "live"], se = "staticHtml", X = "staticSvg", re = "html", ee = "svg", ci = /* @__PURE__ */ Symbol("maybe HTML namespace or maybe SVG"), di = "css", pi = "mathml", mi = [di, re, pi, se, X, ee], Xs = new Set(mi), Ys = ["safeClassMap", "safeStyleMap", "deferLoad", "stabilizedRef"], Qs = "nothing", Zs = [...Gs, ...mi, ...Ys, Qs], er = (e) => o.isArrayLiteralExpression(e) && e.elements.every((t) => de(t)), de = (e) => o.isJsxElement(e) || o.isJsxSelfClosingElement(e) || o.isJsxFragment(e), te = {
1157
+ }, li = (e) => e.replace(Vs, (t) => Gs[t]), rt = (e) => typeof e == "string" && e.includes("-") && !_s.has(e), Xs = ["keyed", "ref", "repeat", "live"], se = "staticHtml", X = "staticSvg", re = "html", ee = "svg", ci = /* @__PURE__ */ Symbol("maybe HTML namespace or maybe SVG"), di = "css", pi = "mathml", ui = [di, re, pi, se, X, ee], Ys = new Set(ui), Qs = ["safeClassMap", "safeStyleMap", "deferLoad", "stabilizedRef"], Zs = "nothing", er = [...Xs, ...ui, ...Qs, Zs], tr = (e) => o.isArrayLiteralExpression(e) && e.elements.every((t) => de(t)), de = (e) => o.isJsxElement(e) || o.isJsxSelfClosingElement(e) || o.isJsxFragment(e), te = {
1158
1158
  [re]: ["lit", "lit/html.js", "lit-html"],
1159
1159
  /**
1160
1160
  * Sadly, Lit called these "html" and "svg", rather than "staticHtml" and
@@ -1176,7 +1176,7 @@ const Us = (e) => e.replaceAll("\\", "\\\\").replace(Ws, "\\${").replaceAll("`",
1176
1176
  repeat: ["lit/directives/repeat.js", "lit-html/directives/repeat.js"],
1177
1177
  ref: ["lit/directives/ref.js", "lit-html/directives/ref.js"],
1178
1178
  nothing: ["lit", "@arcgis/lumina", "lit/html.js", "lit-html", "lit-element/lit-element.js"]
1179
- }, tr = /* @__PURE__ */ new Set([
1179
+ }, ir = /* @__PURE__ */ new Set([
1180
1180
  "h",
1181
1181
  "Fragment",
1182
1182
  "state",
@@ -1186,7 +1186,7 @@ const Us = (e) => e.replaceAll("\\", "\\\\").replace(Ws, "\\${").replaceAll("`",
1186
1186
  "bindProperty",
1187
1187
  "bindEvent",
1188
1188
  "bindAttribute"
1189
- ]), ir = /\.(?:css|s[ac]ss|less|styl(?:us)?|postcss|pcss|sss)(\\?|$)/u, oe = "@arcgis/lumina:loadLitCss", Te = "?litCss", Y = "?layeredLitCss", Ve = "?globalFileLitCss", sr = (e) => ({
1189
+ ]), sr = /\.(?:css|s[ac]ss|less|styl(?:us)?|postcss|pcss|sss)(\\?|$)/u, oe = "@arcgis/lumina:loadLitCss", Te = "?litCss", Y = "?layeredLitCss", Ve = "?globalFileLitCss", rr = (e) => ({
1190
1190
  name: oe,
1191
1191
  enforce: "pre",
1192
1192
  configResolved(t) {
@@ -1225,15 +1225,15 @@ const Us = (e) => e.replaceAll("\\", "\\\\").replace(Ws, "\\${").replaceAll("`",
1225
1225
  const l = a.endsWith(Ve);
1226
1226
  if (l && (a = a.slice(0, -Ve.length)), !c && !d && !l)
1227
1227
  return await s.handler.call(this, n, a);
1228
- const p = `${a}?inline`, m = await s.handler.call(this, n, p), { code: f, ...g } = typeof m == "string" ? { code: m } : m ?? {};
1229
- return typeof f != "string" || !f.startsWith(ui) || !f.endsWith(rr) ? (E.warn(
1228
+ const p = `${a}?inline`, u = await s.handler.call(this, n, p), { code: f, ...g } = typeof u == "string" ? { code: u } : u ?? {};
1229
+ return typeof f != "string" || !f.startsWith(mi) || !f.endsWith(nr) ? (E.warn(
1230
1230
  oe,
1231
1231
  `Expected vite:css-post to return a JS module with a string literal. Received: ${JSON.stringify(
1232
1232
  f
1233
1233
  )}`
1234
- ), m) : l ? (e._globalCssString = fi(f), { code: "", map: { mappings: "" } }) : {
1234
+ ), u) : l ? (e._globalCssString = fi(f), { code: "", map: { mappings: "" } }) : {
1235
1235
  ...g,
1236
- code: lr(f, e.hmrEnabled, e.shouldMinify, d),
1236
+ code: cr(f, e.hmrEnabled, e.shouldMinify, d),
1237
1237
  /**
1238
1238
  * Vite's original transform does not generate source maps for inlined
1239
1239
  * css, thus we can't either
@@ -1243,8 +1243,8 @@ const Us = (e) => e.replaceAll("\\", "\\\\").replace(Ws, "\\${").replaceAll("`",
1243
1243
  }
1244
1244
  };
1245
1245
  }
1246
- }), ui = 'export default "', rr = '"', nr = `import { css } from '${te.css[0]}';
1247
- export const styles = css\``, or = "`;\nexport default styles;", ar = `
1246
+ }), mi = 'export default "', nr = '"', or = `import { css } from '${te.css[0]}';
1247
+ export const styles = css\``, ar = "`;\nexport default styles;", lr = `
1248
1248
 
1249
1249
  if(import.meta.hot) {
1250
1250
  import.meta.hot.data.styles ??= styles;
@@ -1255,28 +1255,28 @@ if(import.meta.hot) {
1255
1255
  }
1256
1256
  import.meta.hot.data.styles.styleSheet.replaceSync(nextExports.styles.cssText);
1257
1257
  });
1258
- }`, fi = (e) => e.slice(ui.length - 1);
1259
- function lr(e, t, i, s) {
1260
- const r = fi(e), n = JSON.parse(r), a = Us(n), c = s ? `@layer{${i ? "" : `
1258
+ }`, fi = (e) => e.slice(mi.length - 1);
1259
+ function cr(e, t, i, s) {
1260
+ const r = fi(e), n = JSON.parse(r), a = Ws(n), c = s ? `@layer{${i ? "" : `
1261
1261
  `}${a}${i ? "" : `
1262
1262
  `}}` : a;
1263
- return `${nr}${c}${or}${t ? ar : ""}`;
1263
+ return `${or}${c}${ar}${t ? lr : ""}`;
1264
1264
  }
1265
- function cr(e) {
1266
- return `import("${dr}").then(({ setCustomElementsManifest }) => {
1267
- setCustomElementsManifest(${pr(e)});
1265
+ function dr(e) {
1266
+ return `import("${pr}").then(({ setCustomElementsManifest }) => {
1267
+ setCustomElementsManifest(${ur(e)});
1268
1268
  });`;
1269
1269
  }
1270
- const dr = "@storybook/web-components", pr = (e) => `JSON.parse(\`${mr(JSON.stringify(JSON.stringify(e)).slice(1, -1))}\`)`;
1270
+ const pr = "@storybook/web-components", ur = (e) => `JSON.parse(\`${mr(JSON.stringify(JSON.stringify(e)).slice(1, -1))}\`)`;
1271
1271
  function mr(e) {
1272
1272
  return e.replaceAll('\\"', '"').replaceAll("`", "\\`").replaceAll("${", "\\${");
1273
1273
  }
1274
- function ur(e) {
1275
- fr(e);
1274
+ function fr(e) {
1275
+ gr(e);
1276
1276
  const t = e.options.css?.globalStylesPath;
1277
1277
  if (t === void 0)
1278
1278
  return "";
1279
- const i = u.join(e.dir.root, t);
1279
+ const i = m.join(e.dir.root, t);
1280
1280
  return e.viteCommand === "serve" || e.isInStorybook ? [
1281
1281
  `import globalStyles from "${i}${Y}";`,
1282
1282
  "document.adoptedStyleSheets = [...document.adoptedStyleSheets, globalStyles.styleSheet!];",
@@ -1285,7 +1285,7 @@ function ur(e) {
1285
1285
  `) : `import "${i}${Ve}";`;
1286
1286
  }
1287
1287
  const gi = "hydrated";
1288
- function fr(e) {
1288
+ function gr(e) {
1289
1289
  e._globalHydratedCssString = [
1290
1290
  ":not([",
1291
1291
  e.options.css?.hydratedAttribute ?? gi,
@@ -1302,41 +1302,41 @@ function hi(e, t) {
1302
1302
  ].join(`
1303
1303
  `);
1304
1304
  }
1305
- const gr = (e) => `@layer{${e.shouldMinify ? "" : `
1305
+ const hr = (e) => `@layer{${e.shouldMinify ? "" : `
1306
1306
  `}${e._globalHydratedCssString}${e.shouldMinify ? "" : `
1307
1307
 
1308
1308
  `}${e._globalCssString ? JSON.parse(e._globalCssString) : ""}${e.shouldMinify ? "" : `
1309
1309
  `}}`;
1310
- function hr(e) {
1310
+ function yr(e) {
1311
1311
  const t = [], i = [];
1312
1312
  for (const s of e.privateApiJson.modules)
1313
1313
  for (const r of s.declarations)
1314
- r.customElement === !0 && (i.push(yr(r, e, s.sourcePath)), t.push(s.sourcePath));
1314
+ r.customElement === !0 && (i.push(vr(r, e, s.sourcePath)), t.push(s.sourcePath));
1315
1315
  return [
1316
1316
  'import { runtime } from "./runtime.ts";',
1317
1317
  'import { makeDefineCustomElements } from "@arcgis/lumina";',
1318
- ur(e),
1319
- e.hmrEnabled ? br : "",
1318
+ fr(e),
1319
+ e.hmrEnabled ? wr : "",
1320
1320
  "",
1321
- e.isInStorybook ? cr(e.apiJson) : "",
1321
+ e.isInStorybook ? dr(e.apiJson) : "",
1322
1322
  "",
1323
1323
  "export const defineCustomElements = makeDefineCustomElements(runtime, {",
1324
1324
  i.join(`,
1325
1325
  `),
1326
1326
  "});",
1327
- e.hmrEnabled ? wr(t) : ""
1327
+ e.hmrEnabled ? Sr(t) : ""
1328
1328
  ].join(`
1329
1329
  `);
1330
1330
  }
1331
- const yr = (e, t, i) => [
1331
+ const vr = (e, t, i) => [
1332
1332
  ` "${e.tagName}": [`,
1333
- `()=>import("${u.join(t.dir.root, i)}"),`,
1334
- vr(e),
1333
+ `()=>import("${m.join(t.dir.root, i)}"),`,
1334
+ br(e),
1335
1335
  "]"
1336
1336
  ].join("");
1337
- function vr(e) {
1338
- const { properties: t, asyncMethods: i, syncMethods: s, formAssociated: r } = yi(e), n = t.map((g) => g.join(ms)).join(De), a = i.join(De), c = s.join(De), d = [n, a, c], l = d.findLastIndex((g) => g.length > 0), p = d.slice(0, l + 1);
1339
- return `${p.length > 0 || r ? `"${p.join(us)}"` : ""}${r ? ",1" : ""}`;
1337
+ function br(e) {
1338
+ const { properties: t, asyncMethods: i, syncMethods: s, formAssociated: r } = yi(e), n = t.map((g) => g.join(us)).join(De), a = i.join(De), c = s.join(De), d = [n, a, c], l = d.findLastIndex((g) => g.length > 0), p = d.slice(0, l + 1);
1339
+ return `${p.length > 0 || r ? `"${p.join(ms)}"` : ""}${r ? ",1" : ""}`;
1340
1340
  }
1341
1341
  function yi(e) {
1342
1342
  const t = [], i = [], s = [];
@@ -1347,26 +1347,26 @@ function yi(e) {
1347
1347
  t.push(
1348
1348
  c && !d ? [a.name] : [a.name, d ? String(a.attribute) : ""]
1349
1349
  );
1350
- } else a.kind === "method" && a.name !== "componentOnReady" && (ws(a) ? i.push(a.name) : s.push(a.name));
1350
+ } else a.kind === "method" && a.name !== "componentOnReady" && (Ss(a) ? i.push(a.name) : s.push(a.name));
1351
1351
  }
1352
1352
  const r = e.formAssociated === !0;
1353
1353
  return { tagName: e.tagName, properties: t, asyncMethods: i, syncMethods: s, formAssociated: r };
1354
1354
  }
1355
- const br = `import { handleHmrUpdate, handleComponentMetaUpdate } from "@arcgis/lumina/hmrSupport";
1356
- `, wr = (e) => `
1355
+ const wr = `import { handleHmrUpdate, handleComponentMetaUpdate } from "@arcgis/lumina/hmrSupport";
1356
+ `, Sr = (e) => `
1357
1357
  if(import.meta.hot) {
1358
1358
  import.meta.hot.on("component-meta-update", handleComponentMetaUpdate);
1359
1359
  import.meta.hot.accept([
1360
1360
  ${e.map((t) => ` "/${t}",`).join(`
1361
1361
  `)}
1362
1362
  ], handleHmrUpdate);
1363
- }`, Sr = "@arcgis/lumina-compiler", vi = {
1364
- name: Sr
1363
+ }`, Er = "@arcgis/lumina-compiler", vi = {
1364
+ name: Er
1365
1365
  };
1366
1366
  async function bi(e, t) {
1367
- return ie ??= Cr(e, t), await ie;
1367
+ return ie ??= Tr(e, t), await ie;
1368
1368
  }
1369
- function Er() {
1369
+ function Cr() {
1370
1370
  if ($e === void 0)
1371
1371
  throw Error(
1372
1372
  b(
@@ -1386,9 +1386,9 @@ function wi() {
1386
1386
  );
1387
1387
  return Ge;
1388
1388
  }
1389
- async function Cr(e, t) {
1389
+ async function Tr(e, t) {
1390
1390
  const i = O(e), s = i.dependencies ?? {}, r = i.peerDependencies ?? {}, a = (await Promise.all(
1391
- [...Object.keys(s), ...Object.keys(r)].filter((l) => !Tr.has(l)).flatMap(async (l) => await Si(l, e))
1391
+ [...Object.keys(s), ...Object.keys(r)].filter((l) => !$r.has(l)).flatMap(async (l) => await Si(l, e))
1392
1392
  )).filter(F);
1393
1393
  $e ??= a, Ge = Object.fromEntries(a.flatMap((l) => Object.entries(l.components)));
1394
1394
  const c = t?.serve?.extraDependencies?.map(
@@ -1396,7 +1396,7 @@ async function Cr(e, t) {
1396
1396
  ), d = c === void 0 ? a : a.filter((l) => !c.includes(l.packageName));
1397
1397
  return $e ??= d, d;
1398
1398
  }
1399
- const Tr = /* @__PURE__ */ new Set([
1399
+ const $r = /* @__PURE__ */ new Set([
1400
1400
  "@arcgis/arcade-languageservice",
1401
1401
  "@arcgis/components-build-utils",
1402
1402
  "@arcgis/toolkit",
@@ -1434,11 +1434,11 @@ const Tr = /* @__PURE__ */ new Set([
1434
1434
  ]);
1435
1435
  let $e, Ge, ie;
1436
1436
  async function Si(e, t) {
1437
- const i = await Gt(e, t), s = await Xt(i), r = "exports" in s, n = Dr.bind(void 0, r), a = "@stencil/core" in (s.dependencies ?? {}) || "@stencil/core" in (s.devDependencies ?? {}), c = u.join(i, "dist/esm/loader.js");
1437
+ const i = await Gt(e, t), s = await Xt(i), r = "exports" in s, n = Rr.bind(void 0, r), a = "@stencil/core" in (s.dependencies ?? {}) || "@stencil/core" in (s.devDependencies ?? {}), c = m.join(i, "dist/esm/loader.js");
1438
1438
  if (a ? await _(c) : !1) {
1439
- const g = await H(c, "utf8"), h = $r(g, "bootstrapLazy("), y = g.indexOf(", options", h), v = g.slice(h, y), C = v.startsWith('JSON.parse("') ? v.slice(12, -2).replaceAll('\\"', '"') : v;
1439
+ const g = await H(c, "utf8"), h = Pr(g, "bootstrapLazy("), y = g.indexOf(", options", h), v = g.slice(h, y), C = v.startsWith('JSON.parse("') ? v.slice(12, -2).replaceAll('\\"', '"') : v;
1440
1440
  try {
1441
- const S = JSON.parse(C), k = jr(S, { packageName: e, getImportPath: n });
1441
+ const S = JSON.parse(C), k = Fr(S, { packageName: e, getImportPath: n });
1442
1442
  return { packageName: e, type: "stencil", components: k, packageLocation: i, packageJson: s };
1443
1443
  } catch (S) {
1444
1444
  E.warn("@arcgis/lumina", `Failed to parse dist/esm/loader.js for ${e}.
@@ -1447,7 +1447,7 @@ Error: ${String(S)}`);
1447
1447
  }
1448
1448
  const l = wt(s.customElements);
1449
1449
  if (l != null) {
1450
- const g = u.join(i, l), h = JSON.parse(await H(g, "utf-8")), y = Pr(h), v = Ei(h, {
1450
+ const g = m.join(i, l), h = JSON.parse(await H(g, "utf-8")), y = Ir(h), v = Ei(h, {
1451
1451
  packageName: e,
1452
1452
  getImportPath: n
1453
1453
  });
@@ -1455,15 +1455,15 @@ Error: ${String(S)}`);
1455
1455
  }
1456
1456
  const p = wt(s["web-types"]);
1457
1457
  if (p != null) {
1458
- const g = u.join(i, p), h = JSON.parse(await H(g, "utf-8")), y = Ir(h, {
1458
+ const g = m.join(i, p), h = JSON.parse(await H(g, "utf-8")), y = kr(h, {
1459
1459
  packageName: e,
1460
1460
  getImportPath: n
1461
1461
  });
1462
1462
  return { type: "unknown", packageName: e, components: y, packageLocation: i, packageJson: s };
1463
1463
  }
1464
- const m = u.join(i, "dist/components");
1465
- if (await _(m)) {
1466
- const g = await Fr(m, {
1464
+ const u = m.join(i, "dist/components");
1465
+ if (await _(u)) {
1466
+ const g = await Dr(u, {
1467
1467
  packageName: e,
1468
1468
  getImportPath: n
1469
1469
  });
@@ -1471,7 +1471,7 @@ Error: ${String(S)}`);
1471
1471
  }
1472
1472
  }
1473
1473
  const wt = (e) => Array.isArray(e) ? e[0] : e;
1474
- function $r(e, t) {
1474
+ function Pr(e, t) {
1475
1475
  const i = e.indexOf(t);
1476
1476
  return i === -1 ? -1 : i + t.length;
1477
1477
  }
@@ -1492,7 +1492,7 @@ function Ei(e, t, i = !1) {
1492
1492
  // Older api.json
1493
1493
  "importPath" in d && typeof d.importPath == "string" ? d.importPath : void 0
1494
1494
  )
1495
- ), p = d.tagName, m = {
1495
+ ), p = d.tagName, u = {
1496
1496
  packageName: t.packageName,
1497
1497
  modulePath: l ?? t.getImportPath(p),
1498
1498
  propToAttribute: Object.fromEntries(
@@ -1500,23 +1500,23 @@ function Ei(e, t, i = !1) {
1500
1500
  ),
1501
1501
  requiredProperties: void 0
1502
1502
  };
1503
- if (s[p] = m, i && d.members !== void 0) {
1503
+ if (s[p] = u, i && d.members !== void 0) {
1504
1504
  const f = /* @__PURE__ */ new Set();
1505
1505
  for (let g = 0; g < d.members.length; ++g) {
1506
1506
  const h = d.members[g];
1507
1507
  h.kind === "field" && h.docsTags?.some((y) => y.name === "required") === !0 && f.add(h.name);
1508
1508
  }
1509
- f.size > 0 && (m.requiredProperties = f);
1509
+ f.size > 0 && (u.requiredProperties = f);
1510
1510
  }
1511
1511
  }
1512
1512
  }
1513
1513
  return s;
1514
1514
  }
1515
- const Pr = (e) => (
1515
+ const Ir = (e) => (
1516
1516
  // Since 5.0
1517
1517
  e.compiler?.name === "@arcgis/api-extractor" || // Before 5.0
1518
1518
  e.compiler?.name === vi.name
1519
- ), Ir = (e, t) => Object.fromEntries(
1519
+ ), kr = (e, t) => Object.fromEntries(
1520
1520
  (e.contributions?.html?.elements ?? e.contributions?.html?.tags)?.map(
1521
1521
  (i) => [
1522
1522
  i.name,
@@ -1527,7 +1527,7 @@ const Pr = (e) => (
1527
1527
  }
1528
1528
  ]
1529
1529
  ) ?? []
1530
- ), kr = 1, xr = 2, Ar = 4, Nr = 8, Lr = kr | xr | Ar | Nr, jr = (e, t) => Object.fromEntries(
1530
+ ), xr = 1, Ar = 2, Nr = 4, Lr = 8, jr = xr | Ar | Nr | Lr, Fr = (e, t) => Object.fromEntries(
1531
1531
  e.flatMap(
1532
1532
  ([i, s]) => s.map(
1533
1533
  ([r, n, a]) => [
@@ -1536,13 +1536,13 @@ const Pr = (e) => (
1536
1536
  packageName: t.packageName,
1537
1537
  modulePath: t.getImportPath(n),
1538
1538
  propToAttribute: Object.fromEntries(
1539
- Object.entries(a ?? {}).filter(([c, [d]]) => d & Lr).map(([c, [d, l = c]]) => [c, l])
1539
+ Object.entries(a ?? {}).filter(([c, [d]]) => d & jr).map(([c, [d, l = c]]) => [c, l])
1540
1540
  )
1541
1541
  }
1542
1542
  ]
1543
1543
  )
1544
1544
  )
1545
- ), Fr = async (e, t) => Object.fromEntries(
1545
+ ), Dr = async (e, t) => Object.fromEntries(
1546
1546
  (await tt(e)).filter((i) => i.endsWith(".d.ts")).map((i) => {
1547
1547
  const s = i.slice(0, -5);
1548
1548
  return [
@@ -1554,14 +1554,14 @@ const Pr = (e) => (
1554
1554
  }
1555
1555
  ];
1556
1556
  })
1557
- ), Dr = (e, t) => e ? `components/${t}` : `dist/components/${t}.js`, Rr = (e) => e.startsWith("/") ? e : `/${e}`, nt = (e, t) => `${e}@fs${Rr(t)}`;
1557
+ ), Rr = (e, t) => e ? `components/${t}` : `dist/components/${t}.js`, Or = (e) => e.startsWith("/") ? e : `/${e}`, nt = (e, t) => `${e}@fs${Or(t)}`;
1558
1558
  function Ci(e) {
1559
1559
  const t = e?.apiExtractorPluginConfig.unsafeConfigOverride?.types?.typeScriptConfig?.config.options.target ?? o.ScriptTarget.ESNext, i = o.ScriptTarget[t].toLowerCase();
1560
1560
  return i === "latest" ? "esnext" : i;
1561
1561
  }
1562
1562
  const Xe = "@arcgis/core", Me = O(), Ae = Xe in (Me.dependencies ?? {}) || Xe in (Me.peerDependencies ?? {}) || // Does not depend on `@arcgis/core` to avoid cycle, but uses core in Lumina tests
1563
1563
  Me.name === "@arcgis/lumina";
1564
- async function Or(e, t, i) {
1564
+ async function Mr(e, t, i) {
1565
1565
  if (!Ae)
1566
1566
  return [];
1567
1567
  const s = await Gt(Xe);
@@ -1593,31 +1593,31 @@ const St = (e) => ({
1593
1593
  // This is used be the theme switcher in `@arcgis/storybook-utils`
1594
1594
  id: "arcgisCoreStylesheet"
1595
1595
  }), ot = "customElement.js";
1596
- function Mr(e, t) {
1596
+ function Jr(e, t) {
1597
1597
  if (!t.startsWith(e))
1598
1598
  return t;
1599
- const s = t.split(u.sep);
1600
- return s.at(Jr) !== s.at(Br) ? t : u.join(s.slice(0, -1).join(u.sep), ot);
1599
+ const s = t.split(m.sep);
1600
+ return s.at(Br) !== s.at(Kr) ? t : m.join(s.slice(0, -1).join(m.sep), ot);
1601
1601
  }
1602
- const Jr = -1, Br = -2, Kr = /["']\.\.?\/[^'"]+/gu, _r = (e, t, i, s) => e.replaceAll(Kr, (r) => {
1602
+ const Br = -1, Kr = -2, _r = /["']\.\.?\/[^'"]+/gu, Ur = (e, t, i, s) => e.replaceAll(_r, (r) => {
1603
1603
  const n = r.slice(1);
1604
1604
  if (!n.startsWith("./") && !n.startsWith("../"))
1605
1605
  return r;
1606
- const a = u.join(s, n), c = !n.endsWith(".js") && !n.split("/").at(-1).includes(".") ? Mr(t.dir.distComponents, a) : a, d = c.startsWith(t.dir.distComponents) ? t.dir.dist + We(c.slice(t.dir.dist.length), t.apiExtractor) : c;
1606
+ const a = m.join(s, n), c = !n.endsWith(".js") && !n.split("/").at(-1).includes(".") ? Jr(t.dir.distComponents, a) : a, d = c.startsWith(t.dir.distComponents) ? t.dir.dist + We(c.slice(t.dir.dist.length), t.apiExtractor) : c;
1607
1607
  if (i === s && a === d)
1608
1608
  return r;
1609
- const l = ue(i, d), p = r.endsWith("/") ? `${l}/` : l;
1609
+ const l = me(i, d), p = r.endsWith("/") ? `${l}/` : l;
1610
1610
  return `${r[0]}${p}`;
1611
- }), ue = (e, t) => {
1612
- const i = u.relative(e, t);
1613
- return i.startsWith(".") ? i : `.${u.sep}${i}`;
1611
+ }), me = (e, t) => {
1612
+ const i = m.relative(e, t);
1613
+ return i.startsWith(".") ? i : `.${m.sep}${i}`;
1614
1614
  };
1615
- async function Ur(e, t, i) {
1616
- const s = u.resolve(e.dir.root, t);
1617
- e.viteConfig.build.emptyOutDir !== !1 && await _(s) && await Ts(s, { recursive: !0, force: !0 }), await G(s, { recursive: !0 }), await $s(e.dir.distCdn, u.join(s, "build"), { recursive: !0 });
1615
+ async function Wr(e, t, i) {
1616
+ const s = m.resolve(e.dir.root, t);
1617
+ e.viteConfig.build.emptyOutDir !== !1 && await _(s) && await $s(s, { recursive: !0, force: !0 }), await G(s, { recursive: !0 }), await Ps(e.dir.distCdn, m.join(s, "build"), { recursive: !0 });
1618
1618
  const r = [
1619
1619
  "index.html",
1620
- ...await ks("**/*.html", {
1620
+ ...await xs("**/*.html", {
1621
1621
  cwd: e.dir.src,
1622
1622
  onlyFiles: !0,
1623
1623
  // The files we are looking for are unlikely to be symbolic links
@@ -1625,7 +1625,7 @@ async function Ur(e, t, i) {
1625
1625
  // Not applicable for our glob pattern
1626
1626
  expandDirectories: !1
1627
1627
  })
1628
- ], n = u.relative(e.dir.root, e.dir.src), a = await pe(e), c = u.join(e.dir.src, "loader.ts"), d = a.map((l) => {
1628
+ ], n = m.relative(e.dir.root, e.dir.src), a = await pe(e), c = m.join(e.dir.src, "loader.ts"), d = a.map((l) => {
1629
1629
  if ("cssHref" in l)
1630
1630
  return `<link rel="stylesheet" href="${l.cssHref}">`;
1631
1631
  if ("javascriptCode" in l && l.javascriptCode.at(0)?.includes(c) === !0)
@@ -1633,16 +1633,16 @@ async function Ur(e, t, i) {
1633
1633
  if ("tag" in l) {
1634
1634
  const p = l.children ?? "";
1635
1635
  if (typeof p == "string")
1636
- return `<${l.tag} ${Object.entries(l.attrs ?? {}).map(([m, f]) => `${m}="${f}"`).join(" ")}>${p}</${l.tag}>`;
1636
+ return `<${l.tag} ${Object.entries(l.attrs ?? {}).map(([u, f]) => `${u}="${f}"`).join(" ")}>${p}</${l.tag}>`;
1637
1637
  }
1638
1638
  throw Error(b("@arcgis/lumina:buildWebApp", `Unsupported loader type: ${JSON.stringify(l)}`));
1639
1639
  }).join(`
1640
1640
  `);
1641
1641
  await Promise.all(
1642
1642
  r.map(async (l, p) => {
1643
- const f = p === 0 ? l : u.join(n, l), g = u.join(e.dir.root, f), h = u.join(s, f);
1644
- await G(u.dirname(h), { recursive: !0 });
1645
- const y = await H(g, "utf-8"), v = ue(u.dirname(f), `build/${i}`), C = `${d}<script type="module" src="${v}"><\/script>
1643
+ const f = p === 0 ? l : m.join(n, l), g = m.join(e.dir.root, f), h = m.join(s, f);
1644
+ await G(m.dirname(h), { recursive: !0 });
1645
+ const y = await H(g, "utf-8"), v = me(m.dirname(f), `build/${i}`), C = `${d}<script type="module" src="${v}"><\/script>
1646
1646
  `, S = Math.min(
1647
1647
  ...[y.indexOf("<style>"), y.indexOf("<script"), y.indexOf("</head>")].filter(
1648
1648
  (x) => x !== -1
@@ -1669,7 +1669,7 @@ const Ti = /* @__PURE__ */ new Set([
1669
1669
  "extras",
1670
1670
  "support"
1671
1671
  ]), R = "@arcgis/lumina:buildCdn", ne = "cdn", $i = "index", Q = "main";
1672
- function Wr(e) {
1672
+ function zr(e) {
1673
1673
  const { skip: t = !1, namespace: i, esbuildOptions: s = {}, entrypointTransformer: r } = e.options.build?.cdn ?? {}, n = e.options.build?.webApp?.destination, a = i !== void 0;
1674
1674
  if (a) {
1675
1675
  if (i.toLowerCase() !== i)
@@ -1686,7 +1686,7 @@ function Wr(e) {
1686
1686
  if (e.provideAssets([
1687
1687
  {
1688
1688
  type: "dynamic",
1689
- source: () => gr(e),
1689
+ source: () => hr(e),
1690
1690
  destination: `../${a ? c : Q}.css`
1691
1691
  }
1692
1692
  ]), !t)
@@ -1702,7 +1702,7 @@ function Wr(e) {
1702
1702
  );
1703
1703
  return;
1704
1704
  }
1705
- const d = Ae && O().name !== "@arcgis/embeddable-components", l = Date.now(), p = Array.isArray(s.entryPoints) ? s.entryPoints.map((g) => typeof g == "string" ? { in: g, out: "" } : g) : typeof s.entryPoints == "object" ? Object.entries(s.entryPoints).map(([g, h]) => ({ in: h, out: g })) : [], m = await zr(
1705
+ const d = Ae && O().name !== "@arcgis/embeddable-components", l = Date.now(), p = Array.isArray(s.entryPoints) ? s.entryPoints.map((g) => typeof g == "string" ? { in: g, out: "" } : g) : typeof s.entryPoints == "object" ? Object.entries(s.entryPoints).map(([g, h]) => ({ in: h, out: g })) : [], u = await Hr(
1706
1706
  e,
1707
1707
  c,
1708
1708
  s,
@@ -1710,19 +1710,19 @@ function Wr(e) {
1710
1710
  r,
1711
1711
  d
1712
1712
  );
1713
- await Hr(
1714
- m,
1713
+ await qr(
1714
+ u,
1715
1715
  e,
1716
1716
  a ? `${c}.esm` : c,
1717
1717
  p,
1718
1718
  d
1719
1719
  );
1720
1720
  const f = Date.now();
1721
- E.info(R, `CDN was built in ${f - l}ms`), n && await Ur(e, n, `${a ? `${c}.esm` : c}.js`);
1721
+ E.info(R, `CDN was built in ${f - l}ms`), n && await Wr(e, n, `${a ? `${c}.esm` : c}.js`);
1722
1722
  }
1723
1723
  };
1724
1724
  }
1725
- async function zr(e, t, i, s, r, n) {
1725
+ async function Hr(e, t, i, s, r, n) {
1726
1726
  const a = e.environment;
1727
1727
  if (i.minify && n)
1728
1728
  throw Error(
@@ -1746,7 +1746,7 @@ async function zr(e, t, i, s, r, n) {
1746
1746
  **/
1747
1747
  defineCustomElements({resourcesUrl: import.meta.url});
1748
1748
  ${hi(e._globalCssString, e)}`, d = r?.(c, e) ?? c;
1749
- return await Is({
1749
+ return await ks({
1750
1750
  bundle: !0,
1751
1751
  minify: n ? !0 : a === "production",
1752
1752
  treeShaking: !0,
@@ -1803,8 +1803,8 @@ ${hi(e._globalCssString, e)}`, d = r?.(c, e) ?? c;
1803
1803
  // eslint-disable-next-line require-unicode-regexp
1804
1804
  new RegExp(`\\/${e.options.build.cdn.namespace}\\/${e.options.build.cdn.namespace}\\.css$`)
1805
1805
  );
1806
- l.onResolve({ filter: p }, ({ path: m }) => ({
1807
- path: m,
1806
+ l.onResolve({ filter: p }, ({ path: u }) => ({
1807
+ path: u,
1808
1808
  namespace: "build-cdn:global-css"
1809
1809
  })), l.onLoad({ filter: /.*/, namespace: "build-cdn:global-css" }, () => ({
1810
1810
  contents: "",
@@ -1831,13 +1831,13 @@ ${hi(e._globalCssString, e)}`, d = r?.(c, e) ?? c;
1831
1831
  });
1832
1832
  }
1833
1833
  const Et = "stdin.js";
1834
- async function Hr(e, t, i, s, r) {
1834
+ async function qr(e, t, i, s, r) {
1835
1835
  const n = t.dir.distCdn, a = `${i}.js`;
1836
1836
  let c;
1837
1837
  r && (c = new Set(s.map((p) => `${p.out}.js`)), c.add(a));
1838
1838
  const d = new Map(
1839
1839
  e.outputFiles.map((p) => {
1840
- const m = {
1840
+ const u = {
1841
1841
  code: p.text,
1842
1842
  isProcessing: !1,
1843
1843
  isAsync: void 0,
@@ -1845,23 +1845,23 @@ async function Hr(e, t, i, s, r) {
1845
1845
  }, f = p.path.slice(n.length);
1846
1846
  if (f === Et) {
1847
1847
  if (r) {
1848
- const h = p.text.match(qr)?.[0];
1848
+ const h = p.text.match(Vr)?.[0];
1849
1849
  if (h === void 0)
1850
1850
  throw Error(
1851
1851
  `Failed to find the runtime variable name in the CDN entrypoint file. This likely indicates a bug in Lumina. ${Et} contents:
1852
1852
  ${p.text}`
1853
1853
  );
1854
- m.code = `${m.code.trimEnd()}${Vr(h, s)}`, m.isAsync = !1;
1854
+ u.code = `${u.code.trimEnd()}${Gr(h, s)}`, u.isAsync = !1;
1855
1855
  }
1856
- return [a, m];
1856
+ return [a, u];
1857
1857
  }
1858
- return [f, m];
1858
+ return [f, u];
1859
1859
  })
1860
1860
  );
1861
- r && d.forEach((p, m) => {
1861
+ r && d.forEach((p, u) => {
1862
1862
  if (p.isAsync === void 0)
1863
- if (m.endsWith(".js")) {
1864
- if (Pi(p, d), c?.has(m) === !0 && p.code.includes(Ii))
1863
+ if (u.endsWith(".js")) {
1864
+ if (Pi(p, d), c?.has(u) === !0 && p.code.includes(Ii))
1865
1865
  throw Error(
1866
1866
  b(
1867
1867
  R,
@@ -1873,16 +1873,16 @@ ${p.text}`
1873
1873
  }), t.options.build?.cdn?.transformer?.(d, t);
1874
1874
  const l = /* @__PURE__ */ new Map();
1875
1875
  for (const p of d.keys()) {
1876
- const m = p.lastIndexOf("/");
1877
- if (m !== -1) {
1878
- const f = p.slice(0, m);
1876
+ const u = p.lastIndexOf("/");
1877
+ if (u !== -1) {
1878
+ const f = p.slice(0, u);
1879
1879
  l.set(f, G(n + f, { recursive: !0 }));
1880
1880
  }
1881
1881
  }
1882
- await Promise.all(l.values()), await Promise.all(Array.from(d.entries(), async ([p, { code: m }]) => await U(n + p, m)));
1882
+ await Promise.all(l.values()), await Promise.all(Array.from(d.entries(), async ([p, { code: u }]) => await U(n + p, u)));
1883
1883
  }
1884
- const qr = /(?<=;var [a-zA-Z$_]=[a-zA-Z$_]\()[a-zA-Z$_](?=,\{")/u;
1885
- function Vr(e, t) {
1884
+ const Vr = /(?<=;var [a-zA-Z$_]=[a-zA-Z$_]\()[a-zA-Z$_](?=,\{")/u;
1885
+ function Gr(e, t) {
1886
1886
  let i = [
1887
1887
  "window.$arcgis",
1888
1888
  "||",
@@ -1931,7 +1931,7 @@ function Pi(e, t) {
1931
1931
  e.isProcessing = !0;
1932
1932
  const i = [], s = [], r = [], n = /* @__PURE__ */ new Set(), a = [];
1933
1933
  let c = 0;
1934
- const d = e.code.matchAll(Gr);
1934
+ const d = e.code.matchAll(Xr);
1935
1935
  for (const w of d) {
1936
1936
  const [L, A, z, j, N] = w, K = N.startsWith(Pe);
1937
1937
  if (c !== 0 && c !== w.index) {
@@ -1945,8 +1945,8 @@ function Pi(e, t) {
1945
1945
  if (A !== void 0) {
1946
1946
  const he = [];
1947
1947
  for (const Fe of A.slice(1, -1).split(",")) {
1948
- const [ut, ft = ut] = Fe.split(" as ");
1949
- M || n.add(ft), he.push(`${ut}:${ft}`);
1948
+ const [mt, ft = mt] = Fe.split(" as ");
1949
+ M || n.add(ft), he.push(`${mt}:${ft}`);
1950
1950
  }
1951
1951
  if (M) {
1952
1952
  const Fe = D.oldSingleExportName === void 0 ? `{${he.join(",")}}` : he[0].split(":")[1];
@@ -1973,8 +1973,8 @@ ${D.code}`
1973
1973
  e.code = Tt(e.code, t);
1974
1974
  return;
1975
1975
  }
1976
- const p = Qr(n);
1977
- let m = e.code.slice(0, c);
1976
+ const p = Zr(n);
1977
+ let u = e.code.slice(0, c);
1978
1978
  for (let w = a.length - 1; w >= 0; w--) {
1979
1979
  const [L, A, z, j] = a[w];
1980
1980
  let N = A, K = "";
@@ -1982,17 +1982,17 @@ ${D.code}`
1982
1982
  const M = p();
1983
1983
  s.push(M), K = ` ${M} from`, j !== "" ? (N = z + 4, i.push(j)) : i.push("");
1984
1984
  }
1985
- m = m.slice(0, L) + K + m.slice(L + N);
1985
+ u = u.slice(0, L) + K + u.slice(L + N);
1986
1986
  }
1987
1987
  const [f, g] = Ct(e), h = i.findLastIndex((w) => w.length > 0), y = i.slice(0, h + 1).join(","), v = i.length === 0 ? "_" : `([${y}])`, C = `${Ii}${v}=>{`, S = s.join(","), k = `${g}},${S})`;
1988
1988
  let T = e.code.slice(c, f);
1989
1989
  T = `${r.join("")}${T}`, T = Tt(T, t);
1990
- const x = `${m}${C}${T}${k}`;
1990
+ const x = `${u}${C}${T}${k}`;
1991
1991
  e.code = x;
1992
1992
  }
1993
1993
  const Ii = "export default $arcgis.t(";
1994
1994
  function Ct(e) {
1995
- const t = Xr.exec(e.code), i = t?.index ?? e.code.length;
1995
+ const t = Yr.exec(e.code), i = t?.index ?? e.code.length;
1996
1996
  let s = "";
1997
1997
  if (t !== null) {
1998
1998
  const r = t[1].split(",");
@@ -2008,7 +2008,7 @@ function Ct(e) {
2008
2008
  }
2009
2009
  return [i, s];
2010
2010
  }
2011
- const Gr = /import(?:(\{[^}]+\})from|\*as ([\w$]+) from| ([\w$]+) from)?"([^"]+)";/gu, Xr = /export\{([^}]+)\};\n$/u, Pe = "@arcgis/core/";
2011
+ const Xr = /import(?:(\{[^}]+\})from|\*as ([\w$]+) from| ([\w$]+) from)?"([^"]+)";/gu, Yr = /export\{([^}]+)\};\n$/u, Pe = "@arcgis/core/";
2012
2012
  function ki(e, t) {
2013
2013
  if (!e.startsWith("./"))
2014
2014
  return;
@@ -2020,7 +2020,7 @@ function ki(e, t) {
2020
2020
  return s;
2021
2021
  }
2022
2022
  function Tt(e, t) {
2023
- return e.replaceAll(Yr, (i, s) => {
2023
+ return e.replaceAll(Qr, (i, s) => {
2024
2024
  if (s.startsWith(Pe))
2025
2025
  return `$arcgis.t(m=>m[0],"${xi(s.slice(Pe.length))}")`;
2026
2026
  if (s.startsWith("./")) {
@@ -2031,28 +2031,28 @@ function Tt(e, t) {
2031
2031
  return i;
2032
2032
  });
2033
2033
  }
2034
- const Yr = /(?<![.\w\d])import\("([^"]+)"\)/gu, xi = (e) => e.endsWith(".js") ? e.slice(0, -3) : e;
2035
- function Qr(e) {
2034
+ const Qr = /(?<![.\w\d])import\("([^"]+)"\)/gu, xi = (e) => e.endsWith(".js") ? e.slice(0, -3) : e;
2035
+ function Zr(e) {
2036
2036
  const t = [Ye];
2037
2037
  return () => {
2038
2038
  for (; ; ) {
2039
- const i = tn(t);
2040
- if (sn(t), !e.has(i))
2039
+ const i = sn(t);
2040
+ if (rn(t), !e.has(i))
2041
2041
  return e.add(i), i;
2042
2042
  }
2043
2043
  };
2044
2044
  }
2045
- const Ye = 0, at = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_", Ai = `${at}0123456789`, Zr = at.length, en = Ai.length;
2046
- function tn(e) {
2045
+ const Ye = 0, at = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_", Ai = `${at}0123456789`, en = at.length, tn = Ai.length;
2046
+ function sn(e) {
2047
2047
  let t = at[e[0]];
2048
2048
  for (let i = 1; i < e.length; ++i)
2049
2049
  t += Ai[e[i]];
2050
2050
  return t;
2051
2051
  }
2052
- function sn(e) {
2052
+ function rn(e) {
2053
2053
  let t = e.length - 1;
2054
2054
  for (; t >= 0; ) {
2055
- const i = t === 0 ? Zr : en;
2055
+ const i = t === 0 ? en : tn;
2056
2056
  if (e[t] += 1, e[t] >= i)
2057
2057
  e[t] = Ye, t--;
2058
2058
  else
@@ -2064,7 +2064,7 @@ function Ne(e = O(), t = !1) {
2064
2064
  const i = e.version.includes("next"), s = e.name === "@esri/calcite-components";
2065
2065
  if (s && i)
2066
2066
  return `https://cdn.jsdelivr.net/npm/@esri/calcite-components@${e.version}/dist/${ne}/`;
2067
- const r = t || i ? "jsdev.arcgis.com" : "js.arcgis.com", n = rn(e.name), a = nn(e.version);
2067
+ const r = t || i ? "jsdev.arcgis.com" : "js.arcgis.com", n = nn(e.name), a = on(e.version);
2068
2068
  if (a === void 0)
2069
2069
  throw Error(
2070
2070
  b(
@@ -2074,25 +2074,25 @@ function Ne(e = O(), t = !1) {
2074
2074
  );
2075
2075
  return n.length === 0 ? `https://${r}/${a}/` : s ? `https://${r}/${n}/${a}/` : `https://${r}/${a}/${n}/`;
2076
2076
  }
2077
- const rn = (e) => e.split("/").pop() ?? e;
2078
- function nn(e) {
2077
+ const nn = (e) => e.split("/").pop() ?? e;
2078
+ function on(e) {
2079
2079
  const t = /^(?<major>\d+)\.(?<minor>\d+)\.(?<patch>\d+)(?<prerelease>-.*)?$/u, i = e.match(t);
2080
2080
  if (i?.groups === void 0)
2081
2081
  return;
2082
2082
  const { major: s, minor: r, patch: n, prerelease: a } = i.groups, c = `${s}.${r}.${n}`;
2083
2083
  return a?.startsWith("-next") ? `${c}-next` : c;
2084
2084
  }
2085
- async function on(e, t, i, s, r) {
2085
+ async function an(e, t, i, s, r) {
2086
2086
  const n = t.packageName, { hasCss: a, cdnName: c } = await Ni(t.packageLocation) ?? {};
2087
2087
  if (i === "cdn") {
2088
- const m = t.cdnUrl ?? Ne(t.packageJson, r);
2088
+ const u = t.cdnUrl ?? Ne(t.packageJson, r);
2089
2089
  return [
2090
2090
  ...a ? [
2091
2091
  {
2092
2092
  tag: "link",
2093
2093
  attrs: {
2094
2094
  rel: "stylesheet",
2095
- src: `${m}${c}.css`
2095
+ src: `${u}${c}.css`
2096
2096
  }
2097
2097
  }
2098
2098
  ] : [],
@@ -2100,7 +2100,7 @@ async function on(e, t, i, s, r) {
2100
2100
  tag: "script",
2101
2101
  attrs: {
2102
2102
  type: "module",
2103
- src: `${m}${c}.esm.js`
2103
+ src: `${u}${c}.esm.js`
2104
2104
  }
2105
2105
  }
2106
2106
  ];
@@ -2127,7 +2127,7 @@ async function on(e, t, i, s, r) {
2127
2127
  ];
2128
2128
  }
2129
2129
  async function Ni(e) {
2130
- const t = u.join(e, "dist"), i = u.basename(e), r = (await tt(t)).filter(
2130
+ const t = m.join(e, "dist"), i = m.basename(e), r = (await tt(t)).filter(
2131
2131
  (a) => !Ti.has(a) && !a.includes(".")
2132
2132
  ), n = r.find(
2133
2133
  (a) => a.startsWith("arcgis-") || // This is the case for template-components and field-apps-custom-elements
@@ -2138,7 +2138,7 @@ async function Ni(e) {
2138
2138
  ).then((a) => a.find(F)) : await $t(t, n);
2139
2139
  }
2140
2140
  async function $t(e, t) {
2141
- const i = u.join(e, t, `${t}.css`), s = u.join(e, t, "assets"), r = u.join(e, t, `${t}.esm.js`), [n, a, c] = await Promise.all([
2141
+ const i = m.join(e, t, `${t}.css`), s = m.join(e, t, "assets"), r = m.join(e, t, `${t}.esm.js`), [n, a, c] = await Promise.all([
2142
2142
  _(i),
2143
2143
  _(s),
2144
2144
  _(r)
@@ -2148,7 +2148,7 @@ async function $t(e, t) {
2148
2148
  cdnName: t
2149
2149
  } : void 0;
2150
2150
  }
2151
- async function an(e, t, i, s, r) {
2151
+ async function ln(e, t, i, s, r) {
2152
2152
  const a = t.packageJson.exports?.[`./${Q}.css`] === void 0 ? await Ni(t.packageLocation) : void 0, c = a?.cdnName ?? ne, d = a === void 0 ? `${$i}.js` : `${a.cdnName}.esm.js`;
2153
2153
  if (i === "cdn")
2154
2154
  return {
@@ -2158,7 +2158,7 @@ async function an(e, t, i, s, r) {
2158
2158
  src: `${t.cdnUrl ?? Ne(t.packageJson, r)}${d}`
2159
2159
  }
2160
2160
  };
2161
- const l = ln(t.packageJson), p = `${t.packageName}/${u.normalize(l)}${Y}`, m = [
2161
+ const l = cn(t.packageJson), p = `${t.packageName}/${m.normalize(l)}${Y}`, u = [
2162
2162
  `import styles$${s} from "${p}";`,
2163
2163
  `document.adoptedStyleSheets = [...document.adoptedStyleSheets, styles$${s}.styleSheet];`
2164
2164
  ], f = `${t.packageName}/loader`;
@@ -2169,7 +2169,7 @@ async function an(e, t, i, s, r) {
2169
2169
  */
2170
2170
  optimizableImports: [f],
2171
2171
  javascriptCode: [
2172
- ...m,
2172
+ ...u,
2173
2173
  `import { defineCustomElements as defineCustomElements$${s} } from "${f}";`,
2174
2174
  `defineCustomElements$${s}({`,
2175
2175
  ` resourcesUrl: "${nt(e, t.packageLocation)}/dist/${c}/",`,
@@ -2177,32 +2177,32 @@ async function an(e, t, i, s, r) {
2177
2177
  ]
2178
2178
  };
2179
2179
  }
2180
- function ln(e) {
2180
+ function cn(e) {
2181
2181
  const { exports: t } = e;
2182
2182
  if (t === void 0)
2183
2183
  throw new Error(
2184
2184
  `Package "${e.name}" does not have an "exports" field. All Lumina packages must include an "exports" field.`
2185
2185
  );
2186
- const i = Object.entries(t).filter(([r]) => u.extname(r) === ".css"), s = i.find(([, r]) => r === `./${Q}.css`);
2186
+ const i = Object.entries(t).filter(([r]) => m.extname(r) === ".css"), s = i.find(([, r]) => r === `./${Q}.css`);
2187
2187
  return s ? s[0] : i.length > 0 ? i[0][0] : `./${Q}.css`;
2188
2188
  }
2189
2189
  async function pe(e) {
2190
- return e._loadersCache ??= cn(e), await e._loadersCache;
2190
+ return e._loadersCache ??= dn(e), await e._loadersCache;
2191
2191
  }
2192
- async function cn(e) {
2192
+ async function dn(e) {
2193
2193
  const t = e.viteCommand === "build" ? "cdn" : "lazyNpm", i = e.environment === "development", s = e.viteConfig.base;
2194
2194
  let r = 0;
2195
2195
  const n = async (l) => (await Promise.all(
2196
2196
  l.map(async (p) => {
2197
- const m = r++;
2198
- return p.type === "stencil" ? await on(s, p, t, m, i) : p.type === "@arcgis/lumina" ? await an(s, p, t, m, i) : void 0;
2197
+ const u = r++;
2198
+ return p.type === "stencil" ? await an(s, p, t, u, i) : p.type === "@arcgis/lumina" ? await ln(s, p, t, u, i) : void 0;
2199
2199
  })
2200
2200
  )).filter(F).flat(), a = await Promise.all([
2201
2201
  // This may contain an import map so must be first
2202
- Or(s, t, i),
2202
+ Mr(s, t, i),
2203
2203
  ie.then(n),
2204
2204
  Li(e).then(n)
2205
- ]), c = u.join(e.dir.src, "loader.ts");
2205
+ ]), c = m.join(e.dir.src, "loader.ts");
2206
2206
  return [
2207
2207
  ...a.flat(),
2208
2208
  {
@@ -2239,7 +2239,7 @@ async function Li(e) {
2239
2239
  })
2240
2240
  ).then((i) => i.filter(F)), await e._serveOnlyDependencies);
2241
2241
  }
2242
- const dn = "/@arcgis/lumina-compiler/testSetupFile", pn = /^\/@arcgis\/lumina-compiler\/testSetupFile/u, Je = [dn];
2242
+ const pn = "/@arcgis/lumina-compiler/testSetupFile", un = /^\/@arcgis\/lumina-compiler\/testSetupFile/u, Je = [pn];
2243
2243
  async function mn(e) {
2244
2244
  if (
2245
2245
  /**
@@ -2278,16 +2278,16 @@ async function mn(e) {
2278
2278
  `);
2279
2279
  return [Pt(e), i].join("");
2280
2280
  }
2281
- const Pt = (e) => [e.isInPuppeteerTestBackEnd ? un : "", fn].join(""), un = `import { setupPuppeteerTest } from "@arcgis/lumina-compiler/puppeteerTesting";
2281
+ const Pt = (e) => [e.isInPuppeteerTestBackEnd ? fn : "", gn].join(""), fn = `import { setupPuppeteerTest } from "@arcgis/lumina-compiler/puppeteerTesting";
2282
2282
  setupPuppeteerTest();
2283
- `, fn = `import { setupLuminaTest } from "@arcgis/lumina-compiler/testing";
2283
+ `, gn = `import { setupLuminaTest } from "@arcgis/lumina-compiler/testing";
2284
2284
  setupLuminaTest();
2285
- `, gn = "@arcgis/lumina:generateLoaderTs";
2285
+ `, hn = "@arcgis/lumina:generateLoaderTs";
2286
2286
  let Ie;
2287
- function hn(e) {
2287
+ function yn(e) {
2288
2288
  const t = /[\\\/]src[\\\/]loader\.ts$/u;
2289
- return [xs(e.apiExtractorPluginConfig), {
2290
- name: gn,
2289
+ return [As(e.apiExtractorPluginConfig), {
2290
+ name: hn,
2291
2291
  configResolved() {
2292
2292
  Ie = `${e.dir.root}src/loader.ts`;
2293
2293
  },
@@ -2302,7 +2302,7 @@ function hn(e) {
2302
2302
  id: t
2303
2303
  },
2304
2304
  async handler() {
2305
- return e.apiJsonDeferred !== void 0 && await e.apiJsonDeferred.promise, hr(e);
2305
+ return e.apiJsonDeferred !== void 0 && await e.apiJsonDeferred.promise, yr(e);
2306
2306
  }
2307
2307
  },
2308
2308
  async handleHotUpdate() {
@@ -2312,7 +2312,7 @@ function hn(e) {
2312
2312
  name: "@arcgis/lumina:generateTestSetupVirtualFile",
2313
2313
  load: {
2314
2314
  filter: {
2315
- id: pn
2315
+ id: un
2316
2316
  },
2317
2317
  handler: async () => await mn(e)
2318
2318
  }
@@ -2325,7 +2325,7 @@ function It(e) {
2325
2325
  const kt = (e) => {
2326
2326
  e.server.ws.send({
2327
2327
  type: "full-reload",
2328
- path: u.join("/", u.relative(e.dir.root, Ie))
2328
+ path: m.join("/", m.relative(e.dir.root, Ie))
2329
2329
  });
2330
2330
  }, Qe = "@arcgis/lumina:provideAssets";
2331
2331
  function ce(e, t, i = lt) {
@@ -2333,17 +2333,17 @@ function ce(e, t, i = lt) {
2333
2333
  throw Error(b(Qe, "serveAssets() is only available when Vite is running in serve mode"));
2334
2334
  const s = e._serverConfigured, r = e.server.middlewares.stack.length;
2335
2335
  if (t.forEach((n) => {
2336
- const a = Fi(n), c = Ri(e.dir, Di(a)), d = vn(e.viteConfig.base, c, e.dir.distCdn);
2337
- e.server.middlewares.use(d, (l, p, m) => {
2338
- const f = bn(l.url), g = a.type === "directory" ? u.resolve(a.source, f.slice(1)) : a.source, h = u.join(c, f), y = i.find((v) => v.match(h, e));
2336
+ const a = Fi(n), c = Ri(e.dir, Di(a)), d = bn(e.viteConfig.base, c, e.dir.distCdn);
2337
+ e.server.middlewares.use(d, (l, p, u) => {
2338
+ const f = wn(l.url), g = a.type === "directory" ? m.resolve(a.source, f.slice(1)) : a.source, h = m.join(c, f), y = i.find((v) => v.match(h, e));
2339
2339
  return (typeof g == "function" ? Promise.resolve(g()) : H(g)).then((v) => {
2340
2340
  const C = (typeof g == "function" ? void 0 : y?.transform(v.toString("utf8"), h, e)) ?? v;
2341
- p.setHeader("Cache-Control", "max-age=31536000, immutable"), p.setHeader("Content-Type", As.lookup(f) || "application/octet-stream"), p.write(C), p.end();
2341
+ p.setHeader("Cache-Control", "max-age=31536000, immutable"), p.setHeader("Content-Type", Ns.lookup(f) || "application/octet-stream"), p.write(C), p.end();
2342
2342
  }).catch((v) => {
2343
2343
  (a.type !== "directory" || process.env.DEBUG) && E.warn(
2344
2344
  Qe,
2345
2345
  `Error occurred when trying to serve a file in response to request for "${l.originalUrl ?? f}":${String(v)}`
2346
- ), m();
2346
+ ), u();
2347
2347
  }), !0;
2348
2348
  });
2349
2349
  }), s) {
@@ -2356,8 +2356,8 @@ async function ji(e, t, i = lt) {
2356
2356
  t.map(async (s) => {
2357
2357
  const r = Fi(s), n = Ri(e.dir, Di(r));
2358
2358
  if (r.type === "directory") {
2359
- const a = u.resolve(r.source), d = (await tt(a, { recursive: !0, withFileTypes: !0 })).filter((l) => l.isFile()).map((l) => {
2360
- const p = u.resolve(l.parentPath, l.name), m = u.relative(a, p), f = u.join(n, m);
2359
+ const a = m.resolve(r.source), d = (await tt(a, { recursive: !0, withFileTypes: !0 })).filter((l) => l.isFile()).map((l) => {
2360
+ const p = m.resolve(l.parentPath, l.name), u = m.relative(a, p), f = m.join(n, u);
2361
2361
  return [p, f];
2362
2362
  });
2363
2363
  await Mi(d.map(([l, p]) => p)), await Promise.all(
@@ -2366,9 +2366,9 @@ async function ji(e, t, i = lt) {
2366
2366
  )
2367
2367
  );
2368
2368
  } else if (r.type === "file")
2369
- await G(u.dirname(n), { recursive: !0 }), await xt(r.source, n, i, e);
2369
+ await G(m.dirname(n), { recursive: !0 }), await xt(r.source, n, i, e);
2370
2370
  else if (r.type === "dynamic") {
2371
- await G(u.dirname(n), { recursive: !0 });
2371
+ await G(m.dirname(n), { recursive: !0 });
2372
2372
  const a = await Promise.resolve(r.source());
2373
2373
  await U(n, a);
2374
2374
  }
@@ -2386,7 +2386,7 @@ const Fi = Yt ? (e) => e : (e) => e.type === "dynamic" ? {
2386
2386
  async function xt(e, t, i, s) {
2387
2387
  const r = i.find((n) => n.match(t, s));
2388
2388
  if (r === void 0)
2389
- await Ps(e, t);
2389
+ await Is(e, t);
2390
2390
  else {
2391
2391
  const n = await H(e, "utf8"), a = r.transform(n, t, s);
2392
2392
  await U(t, a);
@@ -2395,7 +2395,7 @@ async function xt(e, t, i, s) {
2395
2395
  function Di(e) {
2396
2396
  if (e.type === "dynamic")
2397
2397
  return e.destination;
2398
- if (e.source.endsWith(u.sep)) {
2398
+ if (e.source.endsWith(m.sep)) {
2399
2399
  if (e.type === "file")
2400
2400
  throw Error(
2401
2401
  b(
@@ -2405,36 +2405,36 @@ function Di(e) {
2405
2405
  );
2406
2406
  return e.destination;
2407
2407
  }
2408
- 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;
2408
+ return e.destination === "" ? m.basename(e.source) : e.destination.endsWith(m.sep) ? e.type === "directory" && e.destination === m.sep ? e.destination : m.join(e.destination, m.basename(e.source)) : e.destination;
2409
2409
  }
2410
2410
  function Ri({ dist: e, distCdnAssets: t }, i) {
2411
- const s = yn(i), r = u.join(
2411
+ const s = vn(i), r = m.join(
2412
2412
  t,
2413
- s ? u.relative(t, i) : i
2414
- ), n = u.relative(e, r), a = Oi(n);
2415
- return u.join(e, a);
2413
+ s ? m.relative(t, i) : i
2414
+ ), n = m.relative(e, r), a = Oi(n);
2415
+ return m.join(e, a);
2416
2416
  }
2417
- function yn(e) {
2418
- if (e.startsWith(u.sep)) {
2419
- const t = Qt(), i = t.startsWith(u.sep) ? t.split(u.sep)[1] ?? "" : "";
2417
+ function vn(e) {
2418
+ if (e.startsWith(m.sep)) {
2419
+ const t = Qt(), i = t.startsWith(m.sep) ? t.split(m.sep)[1] ?? "" : "";
2420
2420
  return e.startsWith(`/${i}/`) || e.startsWith("/Users/");
2421
2421
  } else
2422
- return !!(!Yt && u.isAbsolute(e));
2422
+ return !!(!Yt && m.isAbsolute(e));
2423
2423
  }
2424
- function vn(e, t, i) {
2425
- const s = Oi(u.relative(i, t)), r = s.startsWith("/") ? s.slice(1) : s;
2424
+ function bn(e, t, i) {
2425
+ const s = Oi(m.relative(i, t)), r = s.startsWith("/") ? s.slice(1) : s;
2426
2426
  return `${e}${r}`;
2427
2427
  }
2428
- const Oi = (e) => e.replaceAll("../", ""), bn = (e = "") => e.split("?")[0].split("#")[0];
2428
+ const Oi = (e) => e.replaceAll("../", ""), wn = (e = "") => e.split("?")[0].split("#")[0];
2429
2429
  async function Mi(e) {
2430
- const t = new Set(e.map(u.dirname));
2430
+ const t = new Set(e.map(m.dirname));
2431
2431
  await Promise.all(Array.from(t, async (i) => await G(i, { recursive: !0 })));
2432
2432
  }
2433
- const wn = {
2433
+ const Sn = {
2434
2434
  match: (e, t) => t.environment === "production" && e.endsWith(".json"),
2435
2435
  transform: (e) => JSON.stringify(JSON.parse(e))
2436
- }, lt = [wn];
2437
- function Sn(e) {
2436
+ }, lt = [Sn];
2437
+ function En(e) {
2438
2438
  let t;
2439
2439
  const i = () => [
2440
2440
  ...e.options.assets?.transformers ?? [],
@@ -2465,8 +2465,8 @@ function Sn(e) {
2465
2465
  async configureServer(s) {
2466
2466
  e.server = s, ce(e, await t, i()), s.watcher.on("addDir", (r) => {
2467
2467
  if (r.endsWith("assets")) {
2468
- const n = u.dirname(r);
2469
- u.join(n, "/") === e.dir.root ? ce(e, [Bi], i()) : r.startsWith(e.dir.srcComponents) && ce(e, [Ji(r, n)], i());
2468
+ const n = m.dirname(r);
2469
+ m.join(n, "/") === e.dir.root ? ce(e, [Bi], i()) : r.startsWith(e.dir.srcComponents) && ce(e, [Ji(r, n)], i());
2470
2470
  }
2471
2471
  });
2472
2472
  },
@@ -2478,7 +2478,7 @@ function Sn(e) {
2478
2478
  async function At(e) {
2479
2479
  const t = _("assets"), i = await e.componentFilesPromise, s = await Promise.all(
2480
2480
  i.map(async (r) => {
2481
- const n = u.dirname(r), a = u.join(n, "assets");
2481
+ const n = m.dirname(r), a = m.join(n, "assets");
2482
2482
  return await _(a) ? Ji(a, n) : void 0;
2483
2483
  })
2484
2484
  );
@@ -2487,8 +2487,8 @@ async function At(e) {
2487
2487
  const Ji = (e, t) => ({
2488
2488
  type: "directory",
2489
2489
  source: e,
2490
- destination: u.basename(t)
2491
- }), Bi = { type: "directory", source: "assets/", destination: "" }, Be = "@arcgis/lumina:printTotalBuildSize", En = (e) => ({
2490
+ destination: m.basename(t)
2491
+ }), Bi = { type: "directory", source: "assets/", destination: "" }, Be = "@arcgis/lumina:printTotalBuildSize", Cn = (e) => ({
2492
2492
  name: Be,
2493
2493
  apply: () => e.viteCommand === "build",
2494
2494
  configResolved(t) {
@@ -2504,13 +2504,13 @@ const Ji = (e, t) => ({
2504
2504
  throw Error(b(Be, "Expected vite:reporter to declare a writeBundle() function"));
2505
2505
  i.writeBundle = async function(n, a) {
2506
2506
  let c = 0, d = 0, l = 0, p = 0;
2507
- const m = console.log;
2507
+ const u = console.log;
2508
2508
  console.log = function(...g) {
2509
- if (m.apply(console, g), g.length === 1 && typeof g[0] == "string") {
2510
- const [h, y] = g[0].match(Tn) ?? [];
2509
+ if (u.apply(console, g), g.length === 1 && typeof g[0] == "string") {
2510
+ const [h, y] = g[0].match($n) ?? [];
2511
2511
  if (!h)
2512
2512
  return;
2513
- p || (p = g[0].slice(0, g[0].indexOf(h) + h.length).replaceAll($n, "").length);
2513
+ p || (p = g[0].slice(0, g[0].indexOf(h) + h.length).replaceAll(Pn, "").length);
2514
2514
  const v = Number.parseFloat(h.replace(" kB", "").replaceAll(",", ""));
2515
2515
  y ? (l += Number.parseFloat(y.replace(" kB", "").replaceAll(",", "")), d += v) : c += v;
2516
2516
  }
@@ -2518,7 +2518,7 @@ const Ji = (e, t) => ({
2518
2518
  try {
2519
2519
  await s.call(this, n, a);
2520
2520
  } finally {
2521
- console.log = m;
2521
+ console.log = u;
2522
2522
  }
2523
2523
  if (d > 0) {
2524
2524
  const g = l > 0 ? d : c, h = jt(g), y = e.dir.relativeDist;
@@ -2526,7 +2526,7 @@ const Ji = (e, t) => ({
2526
2526
  [
2527
2527
  Lt,
2528
2528
  y,
2529
- Cn,
2529
+ Tn,
2530
2530
  "*",
2531
2531
  " ".repeat(p - `${y}*`.length - h.length),
2532
2532
  h,
@@ -2537,10 +2537,10 @@ const Ji = (e, t) => ({
2537
2537
  }
2538
2538
  };
2539
2539
  }
2540
- }), Nt = "\x1B[22m\x1B[1m\x1B[22m", Lt = "\x1B[2m", Cn = "\x1B[22m\x1B[36m", Tn = /\d+(?:,\d+)?\.\d{2} kB/gu, $n = /\x1B\[\d+m/gu, Pn = new Intl.NumberFormat("en", {
2540
+ }), Nt = "\x1B[22m\x1B[1m\x1B[22m", Lt = "\x1B[2m", Tn = "\x1B[22m\x1B[36m", $n = /\d+(?:,\d+)?\.\d{2} kB/gu, Pn = /\x1B\[\d+m/gu, In = new Intl.NumberFormat("en", {
2541
2541
  maximumFractionDigits: 2,
2542
2542
  minimumFractionDigits: 2
2543
- }), jt = (e) => `${Pn.format(e)} kB`, In = (e, t = u.resolve("src")) => u.relative(t, u.join(e, "..", ot.slice(0, -3))), Ft = "@arcgis/lumina:configureVite", kn = (e) => ({
2543
+ }), jt = (e) => `${In.format(e)} kB`, kn = (e, t = m.resolve("src")) => m.relative(t, m.join(e, "..", ot.slice(0, -3))), Ft = "@arcgis/lumina:configureVite", xn = (e) => ({
2544
2544
  name: Ft,
2545
2545
  async config({
2546
2546
  server: t,
@@ -2548,7 +2548,7 @@ const Ji = (e, t) => ({
2548
2548
  build: { cssMinify: s, target: r, sourcemap: n, lib: a, rollupOptions: { output: c = [] } = {}, watch: d, emptyOutDir: l } = {},
2549
2549
  test: p = {}
2550
2550
  }) {
2551
- const m = d != null, { include: f, browser: g, environment: h, forceRerunTriggers: y } = p, v = {
2551
+ const u = d != null, { include: f, browser: g, environment: h, forceRerunTriggers: y } = p, v = {
2552
2552
  // Public utilities exposed by the package
2553
2553
  index: "src/index.ts",
2554
2554
  /**
@@ -2614,13 +2614,16 @@ const Ji = (e, t) => ({
2614
2614
  ...T ? [
2615
2615
  "@arcgis/lumina",
2616
2616
  "@arcgis/toolkit",
2617
- "@arcgis/map-components",
2618
- "@arcgis/common-components",
2619
- "@arcgis/charts-components",
2620
- "@arcgis/embeddable-components",
2621
- "@arcgis/imagery-components",
2622
- "@arcgis/map-config-components",
2623
- "@arcgis/portal-components"
2617
+ "@arcgis/ai-components/loader",
2618
+ "@arcgis/ai-playground/loader",
2619
+ "@arcgis/charts-components/loader",
2620
+ "@arcgis/coding-components/loader",
2621
+ "@arcgis/common-components/loader",
2622
+ "@arcgis/imagery-components/loader",
2623
+ "@arcgis/map-config-components/loader",
2624
+ "@arcgis/embeddable-components/loader",
2625
+ "@arcgis/map-components/loader",
2626
+ "@arcgis/portal-components/loader"
2624
2627
  ] : [],
2625
2628
  // By excluding Lumina above, we also disable discovery of packages
2626
2629
  // used by it (Lit), which are then discovered at runtime and cause
@@ -2713,7 +2716,7 @@ const Ji = (e, t) => ({
2713
2716
  * - in API Extractor we can avoid writing unchanged files to disk if
2714
2717
  * the out dir is not emptied between watch rebuilds.
2715
2718
  */
2716
- emptyOutDir: l ?? !m
2719
+ emptyOutDir: l ?? !u
2717
2720
  },
2718
2721
  optimizeDeps: x,
2719
2722
  define: k,
@@ -2748,22 +2751,22 @@ const Ji = (e, t) => ({
2748
2751
  e._originalRollupInputOptions ??= t.input;
2749
2752
  const s = { ...e._originalRollupInputOptions };
2750
2753
  i.forEach((r) => {
2751
- const n = In(r);
2754
+ const n = kn(r);
2752
2755
  s[n] = r;
2753
2756
  }), t.input = s;
2754
2757
  }
2755
- }), xn = (e) => ({
2758
+ }), An = (e) => ({
2756
2759
  name: "@arcgis/lumina:setAssetPath",
2757
2760
  apply: () => e.viteCommand === "build",
2758
2761
  config: (t) => ({
2759
2762
  base: t.base ?? e.options.assets?.defaultPath ?? Ne()
2760
2763
  })
2761
2764
  });
2762
- function An(e = O()) {
2765
+ function Nn(e = O()) {
2763
2766
  const t = e.version ?? "0.0.1";
2764
2767
  return ds(t);
2765
2768
  }
2766
- const Nn = (e) => `/* ${e} */`, P = (e) => (t, i) => {
2769
+ const Ln = (e) => `/* ${e} */`, P = (e) => (t, i) => {
2767
2770
  Object.defineProperty(t, i, {
2768
2771
  get() {
2769
2772
  throw Error(
@@ -2786,7 +2789,7 @@ const Nn = (e) => `/* ${e} */`, P = (e) => (t, i) => {
2786
2789
  });
2787
2790
  };
2788
2791
  function ae(e) {
2789
- if (u.isAbsolute(e))
2792
+ if (m.isAbsolute(e))
2790
2793
  throw Error(
2791
2794
  b(
2792
2795
  "@arcgis/lumina:context",
@@ -2803,7 +2806,7 @@ const le = {
2803
2806
  stencilLikeDocsJson: "docs/docs.json"
2804
2807
  }, Ze = (e) => e.viteConfig.root.includes("/test-packages/") ? 2 : void 0;
2805
2808
  async function Ki(e, t, i, s, r = O()) {
2806
- const n = Ln(e, r), a = u.join(t, "lumina.ts"), d = await _(a) ? await H(a, "utf8") : "";
2809
+ const n = jn(e, r), a = m.join(t, "lumina.ts"), d = await _(a) ? await H(a, "utf8") : "";
2807
2810
  if (d.trim().replaceAll(`\r
2808
2811
  `, `
2809
2812
  `) === n.trim())
@@ -2823,7 +2826,7 @@ ${d}`
2823
2826
  );
2824
2827
  return ei(a, n), !0;
2825
2828
  }
2826
- function Ln(e, t = O()) {
2829
+ function jn(e, t = O()) {
2827
2830
  const i = e.filter((d) => d.type === "@arcgis/lumina").map((d) => `
2828
2831
  /// <reference types="${d.packageName}/types/lumina" />`), s = e.filter((d) => d.type === "stencil"), r = s.map(
2829
2832
  (d, l) => `
@@ -2834,7 +2837,7 @@ declare module "@arcgis/lumina" {
2834
2837
  interface ImportStencilElements extends ${s.map((d, l) => `JSX$${l}.IntrinsicElements`).join(", ")} {}
2835
2838
  }`, a = t.devDependencies ?? {};
2836
2839
  return [
2837
- jn,
2840
+ Fn,
2838
2841
  a.vitest ? `
2839
2842
  /// <reference types="vitest/config" />
2840
2843
  /// <reference types="vitest/browser" />` : "",
@@ -2845,7 +2848,7 @@ declare module "@arcgis/lumina" {
2845
2848
  `
2846
2849
  ].join("");
2847
2850
  }
2848
- const jn = `/**
2851
+ const Fn = `/**
2849
2852
  * This file is autogenerated by \`@arcgis/lumina-compiler\` - do not edit it manually.
2850
2853
  * Manual edits will be overwritten.
2851
2854
  *
@@ -2864,10 +2867,10 @@ const jn = `/**
2864
2867
  * is doing:
2865
2868
  * https://github.com/storybookjs/storybook/blob/a5c2cf1712f70b4e3ecf38d3c98e7db8e8d67849/code/builders/builder-vite/src/plugins/code-generator-plugin.ts#L110
2866
2869
  */
2867
- e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand === "build" && !e.options.build?.cdn?.skip && e.options.build?.webApp?.destination !== void 0, Fn = (e) => ({
2870
+ e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand === "build" && !e.options.build?.cdn?.skip && e.options.build?.webApp?.destination !== void 0, Dn = (e) => ({
2868
2871
  name: be,
2869
2872
  configResolved() {
2870
- !e.isInTest && !e.isInStorybook && (e._updateLuminaTsPromise = Dn(e).catch(
2873
+ !e.isInTest && !e.isInStorybook && (e._updateLuminaTsPromise = Rn(e).catch(
2871
2874
  (t) => E.error(be, `Failed to update package's src/lumina.ts: ${String(t)}`)
2872
2875
  ));
2873
2876
  },
@@ -2911,41 +2914,41 @@ e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand
2911
2914
  });
2912
2915
  e.viteConfig.optimizeDeps.include ??= [];
2913
2916
  for (const s of i)
2914
- e.viteConfig.optimizeDeps.include.includes(s) || e.viteConfig.optimizeDeps.include.push(s);
2917
+ !e.viteConfig.optimizeDeps.include.includes(s) && e.viteConfig.optimizeDeps.exclude?.includes(s) !== !0 && e.viteConfig.optimizeDeps.include.push(s);
2915
2918
  },
2916
2919
  async buildEnd() {
2917
2920
  await e._updateLuminaTsPromise;
2918
2921
  }
2919
2922
  });
2920
- async function Dn(e) {
2923
+ async function Rn(e) {
2921
2924
  const i = (await Promise.all([ie, Li(e)])).flat();
2922
2925
  if (!await Ki(i, e.dir.src))
2923
2926
  return;
2924
2927
  let r = !1;
2925
2928
  function n() {
2926
- r || E.warn(be, Rn), r = !0;
2929
+ r || E.warn(be, On), r = !0;
2927
2930
  }
2928
2931
  process.on("exit", () => {
2929
2932
  n(), clearTimeout(c);
2930
2933
  });
2931
2934
  const c = setTimeout(n, 2e3);
2932
2935
  }
2933
- const Rn = Ns.greenBright(
2936
+ const On = Ls.greenBright(
2934
2937
  `lumina.ts has been updated (potentially because your dependencies changed). Please commit the updated file.
2935
2938
  If build failed with TypeScript errors, try running the build again to check whether new lumina.ts resolves the errors.`
2936
- ), On = { node: "^24.11" }, V = {
2937
- engines: On
2939
+ ), Mn = { node: "^24.11" }, V = {
2940
+ engines: Mn
2938
2941
  };
2939
- async function Mn(e) {
2940
- const t = e.options.apiExtractor?.configFilePath === "" ? void 0 : await js(process.cwd()), i = e.apiExtractorPluginConfig.unsafeConfigOverride === void 0 || t === void 0 ? t ?? e.apiExtractorPluginConfig.unsafeConfigOverride : vt(t, e.apiExtractorPluginConfig.unsafeConfigOverride);
2942
+ async function Jn(e) {
2943
+ const t = e.options.apiExtractor?.configFilePath === "" ? void 0 : await Fs(process.cwd()), i = e.apiExtractorPluginConfig.unsafeConfigOverride === void 0 || t === void 0 ? t ?? e.apiExtractorPluginConfig.unsafeConfigOverride : vt(t, e.apiExtractorPluginConfig.unsafeConfigOverride);
2941
2944
  e._documentationFileNames.apiJson = i?.context?.apiJsonEmitPath === void 0 ? e.options.documentation?.apiJsonFileName === !1 ? void 0 : e.options.documentation?.apiJsonFileName ? ae(e.options.documentation.apiJsonFileName) : le.apiJson : i.context.apiJsonEmitPath || void 0, e._documentationFileNames.apiJson !== void 0 && e.provideAssets([
2942
2945
  {
2943
2946
  type: "dynamic",
2944
2947
  source: () => JSON.stringify(e.apiJson, null, Ze(e)),
2945
- destination: u.join("../..", e._documentationFileNames.apiJson)
2948
+ destination: m.join("../..", e._documentationFileNames.apiJson)
2946
2949
  }
2947
2950
  ]);
2948
- const s = i?.types?.typeScriptConfig ?? Fs(
2951
+ const s = i?.types?.typeScriptConfig ?? Ds(
2949
2952
  process.cwd(),
2950
2953
  e.options.types?.tsconfigPath ?? i?.types?.typeScriptConfigPath,
2951
2954
  !0
@@ -3043,7 +3046,7 @@ function Dt(e, t) {
3043
3046
  }
3044
3047
  const p = {
3045
3048
  ...l,
3046
- members: l.members.filter((m) => m.privacy === void 0)
3049
+ members: l.members.filter((u) => u.privacy === void 0)
3047
3050
  };
3048
3051
  a.declarations.push(p), s.push(p);
3049
3052
  }
@@ -3051,10 +3054,10 @@ function Dt(e, t) {
3051
3054
  }
3052
3055
  e._localDefinedComponents = void 0, e.privateApiJson = t, e.apiJsonComponents = s, e.apiJson = i, r !== void 0 && (e.componentFilesPromise = Promise.resolve(r));
3053
3056
  }
3054
- var Jn = Object.defineProperty, I = (e, t, i, s) => {
3057
+ var Bn = Object.defineProperty, I = (e, t, i, s) => {
3055
3058
  for (var r = void 0, n = e.length - 1, a; n >= 0; n--)
3056
3059
  (a = e[n]) && (r = a(t, i, r) || r);
3057
- return r && Jn(t, i, r), r;
3060
+ return r && Bn(t, i, r), r;
3058
3061
  };
3059
3062
  const J = "@arcgis/lumina:context";
3060
3063
  class $ {
@@ -3063,14 +3066,14 @@ class $ {
3063
3066
  name: J,
3064
3067
  // Make sure these globals are available to all plugins as soon as possible
3065
3068
  enforce: "pre",
3066
- apply: (p, m) => (this._inferBuildSetup(m, p.define), !0),
3069
+ apply: (p, u) => (this._inferBuildSetup(u, p.define), !0),
3067
3070
  configResolved: {
3068
3071
  order: "pre",
3069
3072
  handler: (p) => {
3070
3073
  this.viteConfig = p;
3071
- const m = p.build.minify !== !1;
3072
- this.shouldMinify = m && this.viteCommand !== "serve", Object.hasOwn(this, "shouldMinifyJsx") || (this.shouldMinifyJsx = this.viteCommand !== "serve" || this.isInTest);
3073
- const f = u.join(p.root, u.sep), g = u.join(f, "src", u.sep), h = u.join(g, "components", u.sep), y = u.join(u.resolve(f, p.build.outDir), u.sep), v = u.join(u.relative(f, y), u.sep), C = u.join(y, "components", u.sep), S = u.join(y, this.options.build?.cdn?.namespace ?? ne, u.sep), k = u.join(S, "assets", u.sep);
3074
+ const u = p.build.minify !== !1;
3075
+ this.shouldMinify = u && this.viteCommand !== "serve", Object.hasOwn(this, "shouldMinifyJsx") || (this.shouldMinifyJsx = this.viteCommand !== "serve" || this.isInTest);
3076
+ const f = m.join(p.root, m.sep), g = m.join(f, "src", m.sep), h = m.join(g, "components", m.sep), y = m.join(m.resolve(f, p.build.outDir), m.sep), v = m.join(m.relative(f, y), m.sep), C = m.join(y, "components", m.sep), S = m.join(y, this.options.build?.cdn?.namespace ?? ne, m.sep), k = m.join(S, "assets", m.sep);
3074
3077
  if (this.dir = {
3075
3078
  root: f,
3076
3079
  src: g,
@@ -3099,7 +3102,7 @@ class $ {
3099
3102
  extract: !0
3100
3103
  }, (this.viteCommand === "build" ? p.build.watch : p.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);
3101
3104
  const L = this.viteCommand === "serve" && !this.isInStorybook, A = this.apiExtractorPluginConfig.unsafeConfigOverride;
3102
- L && (A.context.isLuminaMinimalExtraction = !0, A.types.typeCheckedExtraction = !1, A.types.fullTypeCheck = !1), this.isInStorybook && (A.context.dtsEmitPath = ""), this._typeScriptPrinter = Ls({
3105
+ L && (A.context.isLuminaMinimalExtraction = !0, A.types.typeCheckedExtraction = !1, A.types.fullTypeCheck = !1), this.isInStorybook && (A.context.dtsEmitPath = ""), this._typeScriptPrinter = js({
3103
3106
  // Do not downlevel. ESBuild will do that if needed.
3104
3107
  target: o.ScriptTarget.ESNext,
3105
3108
  sourceMap: p.build.sourcemap !== !1
@@ -3144,18 +3147,18 @@ class $ {
3144
3147
  webTypes: c.jetBrains === !1 ? void 0 : c.jetBrains?.webTypesFileName ? ae(c.jetBrains.webTypesFileName) : le.webTypes,
3145
3148
  vsCodeHtml: c.vsCode === !1 ? void 0 : c.vsCode?.htmlFileName ? ae(c.vsCode.htmlFileName) : le.vsCodeHtml,
3146
3149
  vsCodeCss: c.vsCode === !1 ? void 0 : c.vsCode?.cssFileName ? ae(c.vsCode.cssFileName) : le.vsCodeCss
3147
- }, this.apiExtractorPluginConfig = this.options.apiExtractor ?? {}, this.configsPromise = Mn(this);
3150
+ }, this.apiExtractorPluginConfig = this.options.apiExtractor ?? {}, this.configsPromise = Jn(this);
3148
3151
  const d = process.cwd().length + 1;
3149
3152
  this.componentFilesPromise = this.configsPromise.then(() => {
3150
- const p = this.apiExtractorPluginConfig.unsafeConfigOverride.types.typeScriptConfig.config.fileNames, m = [];
3153
+ const p = this.apiExtractorPluginConfig.unsafeConfigOverride.types.typeScriptConfig.config.fileNames, u = [];
3151
3154
  for (let f = 0; f < p.length; ++f) {
3152
3155
  const h = p[f].slice(d);
3153
- Ee(h, "src/components") && m.push(h);
3156
+ Ee(h, "src/components") && u.push(h);
3154
3157
  }
3155
- return m;
3158
+ return u;
3156
3159
  }), bi(void 0, t);
3157
- const l = t.build?.preamble ?? An();
3158
- this.banner = Nn(l);
3160
+ const l = t.build?.preamble ?? Nn();
3161
+ this.banner = Ln(l);
3159
3162
  }
3160
3163
  _inferBuildSetup({ command: t, mode: i }, s) {
3161
3164
  this.isInTest = process.env.NODE_ENV === "test", i === "production" || i === "development" ? this.environment = i : i === "test" || i === "benchmark" ? (this.environment = "development", this.isInTest = !0) : (E.warn(vi.name, `Vite is running in unknown mode "${i}". Assuming development`), this.environment = "development"), this.viteCommand = t;
@@ -3302,7 +3305,7 @@ I([
3302
3305
  I([
3303
3306
  P("configResolved()")
3304
3307
  ], $.prototype, "_typeScriptPrinter");
3305
- function Bn(e, t, i) {
3308
+ function Kn(e, t, i) {
3306
3309
  const s = wi()[t] ?? Ui(e)[t];
3307
3310
  if (s === void 0) {
3308
3311
  if (e.options?.build?.dependencies?.silenceUnknownJsxElementUsage?.(t, i, e) === !0)
@@ -3317,8 +3320,8 @@ function Bn(e, t, i) {
3317
3320
  }
3318
3321
  return s;
3319
3322
  }
3320
- function Kn(e, t) {
3321
- return e.packageName === void 0 ? ue(t, e.modulePath) : u.join(e.packageName, e.modulePath);
3323
+ function _n(e, t) {
3324
+ return e.packageName === void 0 ? me(t, e.modulePath) : m.join(e.packageName, e.modulePath);
3322
3325
  }
3323
3326
  function Ui(e) {
3324
3327
  return e._localDefinedComponents ??= Ei(
@@ -3332,8 +3335,8 @@ function Ui(e) {
3332
3335
  e.viteCommand === "build"
3333
3336
  ), e._localDefinedComponents;
3334
3337
  }
3335
- const Rt = "makeRuntime(", _n = "@arcgis/core", Un = "@arcgis/lumina:injectRuntimeOptions", Wn = (e) => ({
3336
- name: Un,
3338
+ const Rt = "makeRuntime(", Un = "@arcgis/core", Wn = "@arcgis/lumina:injectRuntimeOptions", zn = (e) => ({
3339
+ name: Wn,
3337
3340
  transform: {
3338
3341
  filter: {
3339
3342
  id: /\/src\/runtime\.ts$/u
@@ -3347,7 +3350,7 @@ const Rt = "makeRuntime(", _n = "@arcgis/core", Un = "@arcgis/lumina:injectRunti
3347
3350
  const r = s + Rt.length, n = e.options.css?.commonStylesPath;
3348
3351
  return {
3349
3352
  code: [
3350
- n === void 0 ? "" : `import commonStyles from "${ue(e.dir.src, n)}${Te}";`,
3353
+ n === void 0 ? "" : `import commonStyles from "${me(e.dir.src, n)}${Te}";`,
3351
3354
  t.slice(0, r),
3352
3355
  "{",
3353
3356
  "defaultAssetPath:import.meta.env.BASE_URL,",
@@ -3360,7 +3363,7 @@ const Rt = "makeRuntime(", _n = "@arcgis/core", Un = "@arcgis/lumina:injectRunti
3360
3363
  // Dependency injection. Lumina cannot directly import these to avoid
3361
3364
  // a cyclical dependency.
3362
3365
  Ae ? `
3363
- import {createObservable,trackAccess,createTrackingTarget,runTracked} from "${_n}/applications/Components/reactiveUtils.js";
3366
+ import {createObservable,trackAccess,createTrackingTarget,runTracked} from "${Un}/applications/Components/reactiveUtils.js";
3364
3367
  createObservable,
3365
3368
  runtime.t = trackAccess;
3366
3369
  runtime.o = createObservable;
@@ -3372,11 +3375,11 @@ runtime.r = runTracked;` : ""
3372
3375
  }
3373
3376
  }
3374
3377
  });
3375
- function zn(e) {
3378
+ function Hn(e) {
3376
3379
  return `import "../${e.options.build?.cdn?.namespace === void 0 ? `${ne}/${Q}.css` : `${e.options.build.cdn.namespace}/${e.options.build.cdn.namespace}.css`}";
3377
3380
  `;
3378
3381
  }
3379
- const ye = "@arcgis/lumina:addNonLazyImports", Hn = (e) => ({
3382
+ const ye = "@arcgis/lumina:addNonLazyImports", qn = (e) => ({
3380
3383
  name: ye,
3381
3384
  apply: () => e.viteCommand === "build",
3382
3385
  generateBundle(t, i) {
@@ -3386,9 +3389,9 @@ const ye = "@arcgis/lumina:addNonLazyImports", Hn = (e) => ({
3386
3389
  if (Object.entries(i).forEach(([a, c]) => {
3387
3390
  const d = We(a, e.apiExtractor);
3388
3391
  if (d !== a && (c.fileName = d), c.type === "chunk") {
3389
- const l = u.dirname(u.join(e.dir.dist, a)), p = d === a ? l : u.dirname(u.join(e.dir.dist, d));
3390
- let m = c.code;
3391
- m = _r(m, e, p, l), !e.isInStorybook && d === "chunks/runtime.js" && (n = !0, m = zn(e) + m), m = `${e.banner}${r}${m}`, c.code = m;
3392
+ const l = m.dirname(m.join(e.dir.dist, a)), p = d === a ? l : m.dirname(m.join(e.dir.dist, d));
3393
+ let u = c.code;
3394
+ u = Ur(u, e, p, l), !e.isInStorybook && d === "chunks/runtime.js" && (n = !0, u = Hn(e) + u), u = `${e.banner}${r}${u}`, c.code = u;
3392
3395
  }
3393
3396
  }), !n && !e.isInStorybook)
3394
3397
  throw Error(b(ye, "Expected to find a chunks/runtime.js file in the Vite's build output."));
@@ -3423,18 +3426,18 @@ Possible causes:
3423
3426
  const r = i.flatMap(async ([n, { referencedTagNames: a, referencedDeferredTagNames: c }]) => {
3424
3427
  if (!s.has(n))
3425
3428
  return [];
3426
- const d = u.dirname(n), l = e.dir.src + We(d.slice(e.dir.src.length), e.apiExtractor), p = u.relative(e.dir.src, l);
3427
- function m(T) {
3428
- const x = Bn(e, T, n);
3429
+ const d = m.dirname(n), l = e.dir.src + We(d.slice(e.dir.src.length), e.apiExtractor), p = m.relative(e.dir.src, l);
3430
+ function u(T) {
3431
+ const x = Kn(e, T, n);
3429
3432
  if (x === void 0)
3430
3433
  return;
3431
- const w = Kn(x, p);
3434
+ const w = _n(x, p);
3432
3435
  if (w !== `./${p}`)
3433
3436
  return w.startsWith(".") ? `${w}/${Ot}` : w;
3434
3437
  }
3435
- const f = new Set(a), g = new Set(c), h = Array.from(f, m).filter(F), y = (T) => `import "${T}";
3438
+ const f = new Set(a), g = new Set(c), h = Array.from(f, u).filter(F), y = (T) => `import "${T}";
3436
3439
  `, v = h.map(y).join(""), C = Array.from(g, (T) => {
3437
- const x = m(T);
3440
+ const x = u(T);
3438
3441
  if (x !== void 0) {
3439
3442
  if (f.has(T)) {
3440
3443
  E.warn(
@@ -3449,7 +3452,7 @@ Possible causes:
3449
3452
  }).filter(F), S = `${v}export * from "./${ot}";`, k = C.length > 0 ? `import { deferredLoaders } from "@arcgis/lumina";
3450
3453
  ${S}
3451
3454
  deferredLoaders${C.join("")};` : S;
3452
- return await U(u.join(e.dir.dist, p, Ot), k);
3455
+ return await U(m.join(e.dir.dist, p, Ot), k);
3453
3456
  });
3454
3457
  await Promise.all(r);
3455
3458
  }
@@ -3473,14 +3476,14 @@ function Z(e) {
3473
3476
  return (
3474
3477
  // Inlined string literal
3475
3478
  typeof e == "string" || // Syntax kinds that are never undefined
3476
- qn.has(e.kind) || // Ternary with both branches never undefined
3479
+ Vn.has(e.kind) || // Ternary with both branches never undefined
3477
3480
  o.isConditionalExpression(e) && Z(e.whenTrue) && Z(e.whenFalse) || // Binary expression with operator that never results in undefined Or both sides are definitely not undefined
3478
- o.isBinaryExpression(e) && (Vn.has(e.operatorToken.kind) || Z(e.left) && Z(e.right)) || // `as`, `satisfies`, `()` with definitely not undefined expression
3481
+ o.isBinaryExpression(e) && (Gn.has(e.operatorToken.kind) || Z(e.left) && Z(e.right)) || // `as`, `satisfies`, `()` with definitely not undefined expression
3479
3482
  (o.isParenthesizedExpression(e) || o.isSatisfiesExpression(e) || o.isAsExpression(e)) && Z(e.expression) || // JSX that got converted to html`<p>Something</p>`
3480
- o.isTaggedTemplateExpression(e) && o.isIdentifier(e.tag) && Xs.has(e.tag.text)
3483
+ o.isTaggedTemplateExpression(e) && o.isIdentifier(e.tag) && Ys.has(e.tag.text)
3481
3484
  );
3482
3485
  }
3483
- const qn = /* @__PURE__ */ new Set([
3486
+ const Vn = /* @__PURE__ */ new Set([
3484
3487
  o.SyntaxKind.NumericLiteral,
3485
3488
  o.SyntaxKind.BigIntLiteral,
3486
3489
  o.SyntaxKind.StringLiteral,
@@ -3499,7 +3502,7 @@ const qn = /* @__PURE__ */ new Set([
3499
3502
  o.SyntaxKind.ClassExpression,
3500
3503
  // Trust? Trust.
3501
3504
  o.SyntaxKind.NonNullExpression
3502
- ]), Vn = /* @__PURE__ */ new Set([
3505
+ ]), Gn = /* @__PURE__ */ new Set([
3503
3506
  o.SyntaxKind.PlusEqualsToken,
3504
3507
  o.SyntaxKind.MinusEqualsToken,
3505
3508
  o.SyntaxKind.AsteriskAsteriskEqualsToken,
@@ -3534,9 +3537,9 @@ const qn = /* @__PURE__ */ new Set([
3534
3537
  o.SyntaxKind.SlashToken,
3535
3538
  o.SyntaxKind.PercentToken,
3536
3539
  o.SyntaxKind.AsteriskAsteriskToken
3537
- ]), Gn = {
3540
+ ]), Xn = {
3538
3541
  property(e, t, i, s) {
3539
- const r = Xn(s, i, e), n = r?.type === "stringifiedReflected", a = r?.type === "reflected" || n;
3542
+ const r = Yn(s, i, e), n = r?.type === "stringifiedReflected", a = r?.type === "reflected" || n;
3540
3543
  if (a) {
3541
3544
  const f = _e(t);
3542
3545
  if (f === !0)
@@ -3547,15 +3550,15 @@ const qn = /* @__PURE__ */ new Set([
3547
3550
  const c = t === void 0 ? ["=", o.factory.createToken(o.SyntaxKind.TrueKeyword)] : we(e, t, a), d = c[0] !== "=";
3548
3551
  if (a && d)
3549
3552
  return [r.name, ...c];
3550
- const [l, p] = c, m = r?.type === "stringifiedNonReflected";
3551
- if (n || m) {
3553
+ const [l, p] = c, u = r?.type === "stringifiedNonReflected";
3554
+ if (n || u) {
3552
3555
  const f = Mt(
3553
3556
  p,
3554
3557
  e,
3555
- m ? "" : void 0
3556
- ), h = i === "value" && (s === "input" || s === "textarea" || s === Ce) ? Qn(f, e) : f;
3558
+ u ? "" : void 0
3559
+ ), h = i === "value" && (s === "input" || s === "textarea" || s === Ce) ? Zn(f, e) : f;
3557
3560
  if (h !== p)
3558
- return [m ? `.${i}` : r.name, l, h];
3561
+ return [u ? `.${i}` : r.name, l, h];
3559
3562
  }
3560
3563
  return [`.${i}`, ...c];
3561
3564
  },
@@ -3626,7 +3629,7 @@ const qn = /* @__PURE__ */ new Set([
3626
3629
  return [o.factory.createIdentifier(r)];
3627
3630
  }
3628
3631
  };
3629
- function Xn(e, t, i) {
3632
+ function Yn(e, t, i) {
3630
3633
  if (typeof e == "string") {
3631
3634
  const n = (i.externalComponents[e] ?? i.localComponents[e])?.propToAttribute?.[t];
3632
3635
  if (n !== void 0)
@@ -3701,7 +3704,7 @@ function Jt(e, t) {
3701
3704
  if (i.length === 0)
3702
3705
  return [];
3703
3706
  const s = li(i);
3704
- if (zs(s)) {
3707
+ if (Hs(s)) {
3705
3708
  const r = s.replaceAll('"', "&#34;");
3706
3709
  if (r.length > s.length) {
3707
3710
  const n = s.replaceAll("'", "&#39;");
@@ -3720,7 +3723,7 @@ function Bt(e, t, i) {
3720
3723
  `${i} prop value must be an expression. Found ${String(t?.getText(e.sourceFile))}`
3721
3724
  );
3722
3725
  const s = t.expression;
3723
- if (Yn(s)) {
3726
+ if (Qn(s)) {
3724
3727
  const n = i === "class" ? "safeClassMap" : "safeStyleMap";
3725
3728
  e.neededImports.add(n);
3726
3729
  const a = e.importRenames[n], c = o.factory.createCallExpression(o.factory.createIdentifier(a), void 0, [
@@ -3730,15 +3733,15 @@ function Bt(e, t, i) {
3730
3733
  } else
3731
3734
  return [i, ...we(e, t, !0)];
3732
3735
  }
3733
- const Yn = (e) => o.isObjectLiteralExpression(e) || o.isPropertyAccessExpression(e) || o.isIdentifier(e) || o.isCallExpression(e) || o.isBinaryExpression(e) || o.isConditionalExpression(e);
3734
- function Qn(e, t) {
3736
+ const Qn = (e) => o.isObjectLiteralExpression(e) || o.isPropertyAccessExpression(e) || o.isIdentifier(e) || o.isCallExpression(e) || o.isBinaryExpression(e) || o.isConditionalExpression(e);
3737
+ function Zn(e, t) {
3735
3738
  t.neededImports.add("live");
3736
3739
  const i = t.importRenames.live;
3737
3740
  return o.factory.createCallExpression(o.factory.createIdentifier(i), void 0, [
3738
3741
  typeof e == "string" ? o.factory.createStringLiteral(e) : e
3739
3742
  ]);
3740
3743
  }
3741
- function Zn(e) {
3744
+ function eo(e) {
3742
3745
  if (e && o.isJsxExpression(e) && e.expression && o.isCallExpression(e.expression) && o.isIdentifier(e.expression.expression) && e.expression.expression.text in Kt && e.expression.arguments.length <= 1)
3743
3746
  return {
3744
3747
  propType: Kt[e.expression.expression.text],
@@ -3756,15 +3759,15 @@ const Kt = {
3756
3759
  bindBooleanAttribute: "booleanAttribute",
3757
3760
  bindEvent: "event"
3758
3761
  };
3759
- function eo(e, t, i) {
3760
- return io.has(e) ? e : e.startsWith("on") && t !== void 0 && o.isJsxExpression(t) && t.expression !== void 0 ? "event" : ri.has(e) || e.includes("-") ? "attribute" : !rt(i) && (ni.has(e) || (i === He ? !1 : i === Ce ? (
3762
+ function to(e, t, i) {
3763
+ return so.has(e) ? e : e.startsWith("on") && t !== void 0 && o.isJsxExpression(t) && t.expression !== void 0 ? "event" : ri.has(e) || e.includes("-") ? "attribute" : !rt(i) && (ni.has(e) || (i === He ? !1 : i === Ce ? (
3761
3764
  // When tag name is dynamic, we can't help but check if the prop name matches an "always attribute" in any html element
3762
3765
  Object.values(qe).some((n) => n.has(e))
3763
3766
  ) : qe[i]?.has(e) === !0)) ? bt.has(e) ? "booleanAttribute" : "attribute" : i === "svg" || i === "math" || i === He || i !== Ce && (it.has(i) || st.has(i)) ? e in W.common.reflected || e in W.common.stringifiedReflected || e in W.common.stringifiedNonReflected ? "property" : bt.has(e) ? "booleanAttribute" : "attribute" : "property";
3764
3767
  }
3765
- const to = ["class", "style", "ref", "directives", "key", "deferLoad"], io = new Set(to), so = (e) => typeof e != "string" || e.trim().length > 0;
3768
+ const io = ["class", "style", "ref", "directives", "key", "deferLoad"], so = new Set(io), ro = (e) => typeof e != "string" || e.trim().length > 0;
3766
3769
  function Le({ key: e, parts: t, litTag: i }, s) {
3767
- const r = ro(t);
3770
+ const r = no(t);
3768
3771
  if (r.length % 2 === 0)
3769
3772
  throw new Error("Normalized template parts array length must be odd");
3770
3773
  const [n, ...a] = r;
@@ -3785,11 +3788,11 @@ function Le({ key: e, parts: t, litTag: i }, s) {
3785
3788
  const d = s.importRenames[c], l = o.factory.createTaggedTemplateExpression(
3786
3789
  o.factory.createIdentifier(d),
3787
3790
  void 0,
3788
- a.length === 0 ? o.factory.createNoSubstitutionTemplateLiteral(n) : o.factory.createTemplateExpression(o.factory.createTemplateHead(n), no(a))
3791
+ a.length === 0 ? o.factory.createNoSubstitutionTemplateLiteral(n) : o.factory.createTemplateExpression(o.factory.createTemplateHead(n), oo(a))
3789
3792
  );
3790
3793
  return Ue(s, e, l);
3791
3794
  }
3792
- const ro = (e) => e.reduce(
3795
+ const no = (e) => e.reduce(
3793
3796
  (t, i, s) => {
3794
3797
  const r = t.at(-1), n = typeof r == "string", a = typeof i == "string";
3795
3798
  if (n && a)
@@ -3799,7 +3802,7 @@ const ro = (e) => e.reduce(
3799
3802
  },
3800
3803
  [""]
3801
3804
  );
3802
- function no(e) {
3805
+ function oo(e) {
3803
3806
  if (!(e.length % 2 === 0))
3804
3807
  throw new Error("templatePartsToSpans should be called with normalized parts array without the first item");
3805
3808
  const i = e.length / 2;
@@ -3838,13 +3841,13 @@ function Hi(e, t) {
3838
3841
  );
3839
3842
  }
3840
3843
  const dt = (e) => e.trim().length === 0 ? [] : o.getLeadingCommentRanges(e, 0) ?? [];
3841
- function oo(e) {
3844
+ function ao(e) {
3842
3845
  const t = dt(e);
3843
3846
  if (t.length === 0)
3844
3847
  return [e || " "];
3845
3848
  const i = t.reduceRight(
3846
3849
  ([r, ...n], a) => {
3847
- const c = ao(r), d = qi(c.slice(a.pos, a.end));
3850
+ const c = lo(r), d = qi(c.slice(a.pos, a.end));
3848
3851
  return [
3849
3852
  c.slice(0, a.pos),
3850
3853
  /**
@@ -3863,12 +3866,12 @@ function oo(e) {
3863
3866
  return (typeof s != "string" || s.trim() !== "") && i.push(" "), i;
3864
3867
  }
3865
3868
  const qi = (e) => e.startsWith("//") ? e.slice(2) : e.slice(2, -2);
3866
- function ao(e) {
3869
+ function lo(e) {
3867
3870
  if (typeof e == "string")
3868
3871
  return e;
3869
3872
  throw new Error(`Expected string, got ${typeof e}: ${String(e)}`);
3870
3873
  }
3871
- function lo(e, t) {
3874
+ function co(e, t) {
3872
3875
  if (!(o.isPropertyAccessExpression(t.expression) && t.expression.name.text === "map"))
3873
3876
  return t;
3874
3877
  const s = t.arguments[0];
@@ -3878,7 +3881,7 @@ function lo(e, t) {
3878
3881
  if (!(typeof n == "object" && // If .map() callback has 3rd argument, it's not supported
3879
3882
  s.parameters.length <= 2))
3880
3883
  return t;
3881
- const c = me(s.body);
3884
+ const c = ue(s.body);
3882
3885
  let d = !0, l;
3883
3886
  if (_t(c))
3884
3887
  l = c;
@@ -3888,7 +3891,7 @@ function lo(e, t) {
3888
3891
  const v = c.statements.at(-1);
3889
3892
  if (!(v && o.isReturnStatement(v) && v.expression))
3890
3893
  return t;
3891
- const S = me(v.expression);
3894
+ const S = ue(v.expression);
3892
3895
  if (!_t(S))
3893
3896
  return t;
3894
3897
  const k = c.statements.slice(0, -1);
@@ -3896,13 +3899,13 @@ function lo(e, t) {
3896
3899
  return t;
3897
3900
  d = k.length === 0, l = S;
3898
3901
  }
3899
- const p = o.isJsxElement(l) ? l.openingElement : l, m = Zi(p);
3900
- if (m === -1)
3902
+ const p = o.isJsxElement(l) ? l.openingElement : l, u = Zi(p);
3903
+ if (u === -1)
3901
3904
  return t;
3902
- const f = p.attributes.properties[m];
3905
+ const f = p.attributes.properties[u];
3903
3906
  if (f === void 0 || !o.isJsxAttribute(f))
3904
3907
  return t;
3905
- const g = ct(f.initializer, e.sourceFile), h = co(n, s, g, d, e);
3908
+ const g = ct(f.initializer, e.sourceFile), h = po(n, s, g, d, e);
3906
3909
  if (h === void 0)
3907
3910
  return t;
3908
3911
  e.liftedKeys.add(f.name), e.neededImports.add("repeat");
@@ -3935,7 +3938,7 @@ function Vi(e) {
3935
3938
  void 0
3936
3939
  ), t;
3937
3940
  }
3938
- function co(e, t, i, s, r) {
3941
+ function po(e, t, i, s, r) {
3939
3942
  const n = B(i);
3940
3943
  if (n === void 0)
3941
3944
  return;
@@ -3990,15 +3993,15 @@ function B(e) {
3990
3993
  }
3991
3994
  return t;
3992
3995
  } else {
3993
- if (po.has(e.kind))
3996
+ if (uo.has(e.kind))
3994
3997
  return [];
3995
3998
  {
3996
- const t = me(e);
3999
+ const t = ue(e);
3997
4000
  return t !== e ? B(t) : void 0;
3998
4001
  }
3999
4002
  }
4000
4003
  }
4001
- const po = /* @__PURE__ */ new Set([
4004
+ const uo = /* @__PURE__ */ new Set([
4002
4005
  o.SyntaxKind.NumericLiteral,
4003
4006
  o.SyntaxKind.BigIntLiteral,
4004
4007
  o.SyntaxKind.StringLiteral,
@@ -4007,12 +4010,12 @@ const po = /* @__PURE__ */ new Set([
4007
4010
  o.SyntaxKind.FalseKeyword,
4008
4011
  o.SyntaxKind.NullKeyword,
4009
4012
  o.SyntaxKind.TrueKeyword
4010
- ]), me = (e) => o.isAsExpression(e) || o.isNonNullExpression(e) || o.isSatisfiesExpression(e) || o.isParenthesizedExpression(e) ? me(e.expression) : e, Gi = (e, t) => o.isObjectBindingPattern(e) ? go(e, t) : e;
4013
+ ]), ue = (e) => o.isAsExpression(e) || o.isNonNullExpression(e) || o.isSatisfiesExpression(e) || o.isParenthesizedExpression(e) ? ue(e.expression) : e, Gi = (e, t) => o.isObjectBindingPattern(e) ? ho(e, t) : e;
4011
4014
  function mo(e, t, i) {
4012
4015
  if (e.every(ke, t))
4013
4016
  return t;
4014
4017
  if (o.isIdentifier(t)) {
4015
- const s = o.isBlock(i.body) ? ze(i.body.statements, (n) => uo(n, t)) : void 0;
4018
+ const s = o.isBlock(i.body) ? ze(i.body.statements, (n) => fo(n, t)) : void 0;
4016
4019
  if (s === void 0)
4017
4020
  return;
4018
4021
  const r = Gi(s, e);
@@ -4020,7 +4023,7 @@ function mo(e, t, i) {
4020
4023
  return r;
4021
4024
  }
4022
4025
  }
4023
- function uo(e, t) {
4026
+ function fo(e, t) {
4024
4027
  if (!o.isVariableStatement(e) || !(e.declarationList.flags & o.NodeFlags.Const))
4025
4028
  return;
4026
4029
  const i = e.declarationList.declarations[0];
@@ -4028,13 +4031,13 @@ function uo(e, t) {
4028
4031
  }
4029
4032
  function ke(e) {
4030
4033
  const t = this;
4031
- return o.isIdentifier(t) ? t.text === e : t.elements.some(fo, e);
4034
+ return o.isIdentifier(t) ? t.text === e : t.elements.some(go, e);
4032
4035
  }
4033
- function fo(e) {
4036
+ function go(e) {
4034
4037
  const t = this;
4035
4038
  return o.isOmittedExpression(e) ? !1 : ke.call(e.name, t);
4036
4039
  }
4037
- function go(e, t) {
4040
+ function ho(e, t) {
4038
4041
  let i = !1;
4039
4042
  const s = e.elements.filter((r) => o.isIdentifier(r.name) ? t.includes(r.name.text) : (i = !0, !0));
4040
4043
  return i || s.length === 0 ? e : o.factory.updateObjectBindingPattern(e, s);
@@ -4043,13 +4046,13 @@ const Xi = (e, t) => t.liftedKeys.has(e);
4043
4046
  function q(e, t, i) {
4044
4047
  if (de(i))
4045
4048
  return Yi(e, i);
4046
- const s = o.isCallExpression(i) ? lo(e, i) : i, r = o.visitEachChild(
4049
+ const s = o.isCallExpression(i) ? co(e, i) : i, r = o.visitEachChild(
4047
4050
  s,
4048
4051
  // Do not add "" if parent is binary expression to not turn {(a && <b />) || c} into {(a && <b />) || "" || c}
4049
4052
  q.bind(null, e, t !== void 0 && o.isBinaryExpression(t) ? void 0 : i),
4050
4053
  e.transformationContext
4051
4054
  );
4052
- return t !== void 0 && o.isBinaryExpression(i) && (o.isJsxExpression(t) || de(me(i.right)) || er(i.right)) ? vo(r) : r;
4055
+ return t !== void 0 && o.isBinaryExpression(i) && (o.isJsxExpression(t) || de(ue(i.right)) || tr(i.right)) ? bo(r) : r;
4053
4056
  }
4054
4057
  function Yi(e, t) {
4055
4058
  const i = Qi(e, t);
@@ -4063,17 +4066,17 @@ function Qi(e, t) {
4063
4066
  if (o.isJsxNamespacedName(n))
4064
4067
  throw Error(`JSX namespaced elements are not supported. Found ${n.getText(e.sourceFile)} `);
4065
4068
  if (!o.isIdentifier(n) || !n.text.startsWith(n.text[0].toLowerCase()) && n.text !== Re && n.text !== Oe) {
4066
- const w = o.isIdentifier(n) && n.text === Ms ? Se(i, e) : {
4069
+ const w = o.isIdentifier(n) && n.text === Js ? Se(i, e) : {
4067
4070
  // No need to wrap the function call in a lit-html tag
4068
4071
  litTag: void 0,
4069
- parts: [yo(e, t, n, i)]
4072
+ parts: [vo(e, t, n, i)]
4070
4073
  };
4071
4074
  return {
4072
- key: ho(r, e),
4075
+ key: yo(r, e),
4073
4076
  ...w
4074
4077
  };
4075
4078
  }
4076
- const c = n.text === Re ? Ce : n.text === Oe ? He : n.text, d = n.text === Re ? se : n.text === Oe ? X : Bs.has(c) ? ci : it.has(c) ? ee : re, l = rt(c), p = l ? e.localComponents[c]?.requiredProperties : void 0, m = p === void 0 ? void 0 : new Set(p);
4079
+ const c = n.text === Re ? Ce : n.text === Oe ? He : n.text, d = n.text === Re ? se : n.text === Oe ? X : Ks.has(c) ? ci : it.has(c) ? ee : re, l = rt(c), p = l ? e.localComponents[c]?.requiredProperties : void 0, u = p === void 0 ? void 0 : new Set(p);
4077
4080
  let f;
4078
4081
  const g = [];
4079
4082
  let h = !1;
@@ -4086,29 +4089,29 @@ Found ${x.getText(e.sourceFile)}`
4086
4089
  const { name: w, initializer: L } = x;
4087
4090
  if (o.isJsxNamespacedName(w))
4088
4091
  throw Error(`JSX namespaced attributes are not supported. Found ${w.getText(e.sourceFile)}`);
4089
- const A = w.text, z = Zn(L), j = z?.propType ?? eo(A, L, c);
4090
- m?.delete(A);
4091
- const N = Gn[j](e, z?.initializer ?? L, A, c);
4092
+ const A = w.text, z = eo(L), j = z?.propType ?? to(A, L, c);
4093
+ u?.delete(A);
4094
+ const N = Xn[j](e, z?.initializer ?? L, A, c);
4092
4095
  if (N.length === 0)
4093
4096
  return [];
4094
- const K = e.compiler.shouldMinifyJsx ? [" "] : oo(zi(w, e));
4095
- return j === "key" ? (f = typeof N[0] == "object" && !Xi(w, e) ? N[0] : void 0, K.some(so) ? K : []) : j === "directives" || j === "ref" || A === "deferLoad" ? (h ||= j === "deferLoad", g.push(
4097
+ const K = e.compiler.shouldMinifyJsx ? [" "] : ao(zi(w, e));
4098
+ return j === "key" ? (f = typeof N[0] == "object" && !Xi(w, e) ? N[0] : void 0, K.some(ro) ? K : []) : j === "directives" || j === "ref" || A === "deferLoad" ? (h ||= j === "deferLoad", g.push(
4096
4099
  ...K,
4097
4100
  ...N.flatMap(
4098
4101
  (D, M) => typeof D == "string" || M === 0 || typeof N[M - 1] == "string" ? D : [" ", D]
4099
4102
  )
4100
4103
  ), []) : [...K, ...N];
4101
4104
  });
4102
- if (m !== void 0 && m.size > 0 && e.compiler.logLintError(
4105
+ if (u !== void 0 && u.size > 0 && e.compiler.logLintError(
4103
4106
  "mustIncludeAllRequiredProperties",
4104
4107
  e.sourceFile.fileName,
4105
- `Missing required properties for <${c}> }: ${Array.from(m).join(", ")}`
4108
+ `Missing required properties for <${c}> }: ${Array.from(u).join(", ")}`
4106
4109
  ), g.length > 0 && y.push(...g), typeof c == "string" && st.has(c))
4107
4110
  throw Error(
4108
4111
  `JSX syntax for MathML elements is not yet supported. If you need it, please request it. Otherwise, use the \`math\` function from Lit directly. Tried to use the "${c}" element`
4109
4112
  );
4110
4113
  l && (h ? e.customElementsToImportDeferred.add(c) : e.customElementsToImport.add(c));
4111
- const v = typeof c == "string" && Js.has(c), C = Se(i, e);
4114
+ const v = typeof c == "string" && Bs.has(c), C = Se(i, e);
4112
4115
  if (v && C.parts.length > 0)
4113
4116
  throw Error(
4114
4117
  `Void HTML elements like <${c}> cannot have children. Found ${t.getText(e.sourceFile)}`
@@ -4132,12 +4135,12 @@ Found ${x.getText(e.sourceFile)}`
4132
4135
  ];
4133
4136
  return { key: f, parts: T, litTag: d };
4134
4137
  }
4135
- function ho(e, t) {
4138
+ function yo(e, t) {
4136
4139
  const i = e.attributes.properties[Zi(e)];
4137
4140
  return i && o.isJsxAttribute(i) && !Xi(i.name, t) ? ct(i.initializer, t.sourceFile) : void 0;
4138
4141
  }
4139
4142
  const Zi = (e) => e.attributes.properties.findIndex(({ name: t }) => t && o.isIdentifier(t) && t.text === "key");
4140
- function yo(e, t, i, s) {
4143
+ function vo(e, t, i, s) {
4141
4144
  const n = (o.isJsxElement(t) ? t.openingElement : t).attributes.properties.map((d) => {
4142
4145
  if (o.isJsxSpreadAttribute(d))
4143
4146
  return Hi(zi(d, e), o.factory.createSpreadAssignment(d.expression));
@@ -4146,8 +4149,8 @@ function yo(e, t, i, s) {
4146
4149
  throw Error(`JSX namespaced attributes are not supported. Found ${l.getText(e.sourceFile)}`);
4147
4150
  if (l.text === "key")
4148
4151
  return;
4149
- const m = p === void 0 ? o.factory.createTrue() : o.isStringLiteral(p) ? p : de(p) ? Yi(e, p) : q(e, void 0, p.expression ?? o.factory.createIdentifier("undefined")), f = ti(l.text) ? o.factory.createStringLiteral(l.text) : l;
4150
- return o.factory.createPropertyAssignment(f, m);
4152
+ const u = p === void 0 ? o.factory.createTrue() : o.isStringLiteral(p) ? p : de(p) ? Yi(e, p) : q(e, void 0, p.expression ?? o.factory.createIdentifier("undefined")), f = ti(l.text) ? o.factory.createStringLiteral(l.text) : l;
4153
+ return o.factory.createPropertyAssignment(f, u);
4151
4154
  }), { parts: a, litTag: c } = Se(s, e);
4152
4155
  return a.length > 0 && n.push(
4153
4156
  o.factory.createPropertyAssignment(
@@ -4162,7 +4165,7 @@ function Se(e, t) {
4162
4165
  let i;
4163
4166
  const s = e.flatMap((r) => {
4164
4167
  if (o.isJsxText(r))
4165
- return [t.compiler.shouldMinifyJsx ? _s(r.text) : r.text];
4168
+ return [t.compiler.shouldMinifyJsx ? Us(r.text) : r.text];
4166
4169
  if (o.isJsxExpression(r))
4167
4170
  return pt(t, r, r);
4168
4171
  {
@@ -4181,7 +4184,7 @@ function Se(e, t) {
4181
4184
  });
4182
4185
  return { litTag: i, parts: s };
4183
4186
  }
4184
- function vo(e) {
4187
+ function bo(e) {
4185
4188
  return e.operatorToken.kind === o.SyntaxKind.AmpersandAmpersandToken ? o.factory.createBinaryExpression(
4186
4189
  e,
4187
4190
  o.factory.createToken(o.SyntaxKind.BarBarToken),
@@ -4237,21 +4240,21 @@ const es = (e) => e.reduce((t, [i, s]) => (t[i] ??= [], t[i].push(s), t), {}), t
4237
4240
  ([e, t]) => t.map((i) => [i, e])
4238
4241
  )
4239
4242
  ), is = new Set(Object.keys(ts));
4240
- function bo(e, t) {
4243
+ function wo(e, t) {
4241
4244
  const i = t.importClause, s = i === void 0, r = t.moduleSpecifier;
4242
4245
  if (!o.isStringLiteral(r))
4243
4246
  return t;
4244
- const n = wo(e.sourceFile.fileName, r.text, ""), a = !i?.isTypeOnly;
4245
- if (a && e.existingImportedModules.add(n), ir.test(r.text) && // If id already includes ?, bypass our custom behavior
4247
+ const n = So(e.sourceFile.fileName, r.text, ""), a = !i?.isTypeOnly;
4248
+ if (a && e.existingImportedModules.add(n), sr.test(r.text) && // If id already includes ?, bypass our custom behavior
4246
4249
  !r.text.includes("?")) {
4247
4250
  if (s) {
4248
4251
  if (e.compiler.viteCommand !== "build" || e.compiler.isInStorybook || e.compiler.isInTest)
4249
4252
  return t;
4250
- const l = e.sourceFile.fileName, p = l.includes("/node_modules/") || l.includes("/dist/"), m = `import "${r.text}"`;
4253
+ const l = e.sourceFile.fileName, p = l.includes("/node_modules/") || l.includes("/dist/"), u = `import "${r.text}"`;
4251
4254
  throw Error(
4252
- p ? `Unexpected case: during build, all node_modules runtime dependencies should be externalized (unless explicitly configured otherwise). ${l} is not externalized, and it contains a side-effect CSS import \`${m}\`. How should such CSS import be handled? Options:
4255
+ p ? `Unexpected case: during build, all node_modules runtime dependencies should be externalized (unless explicitly configured otherwise). ${l} is not externalized, and it contains a side-effect CSS import \`${u}\`. How should such CSS import be handled? Options:
4253
4256
  1. (suggested) Externalize ${l}, which will make end-user's bundler treat this CSS import as global CSS.
4254
- 2. Write a transform() plugin to drop the CSS import from ${l}, and then manually import the CSS as needed inside your shadow root or your library's global CSS file.` : `${l}: Found a side-effect CSS import \`${m}\`. Such import is not allowed as it won't work with shadow DOM. Please use \`import { styles } from "${r.text}";\` instead and then add \`static override styles = styles;\` to your component. If this needs to be global CSS, @import it inside your global CSS file`
4257
+ 2. Write a transform() plugin to drop the CSS import from ${l}, and then manually import the CSS as needed inside your shadow root or your library's global CSS file.` : `${l}: Found a side-effect CSS import \`${u}\`. Such import is not allowed as it won't work with shadow DOM. Please use \`import { styles } from "${r.text}";\` instead and then add \`static override styles = styles;\` to your component. If this needs to be global CSS, @import it inside your global CSS file`
4255
4258
  );
4256
4259
  }
4257
4260
  return o.factory.updateImportDeclaration(
@@ -4269,28 +4272,28 @@ function bo(e, t) {
4269
4272
  if (s)
4270
4273
  return t;
4271
4274
  if (i.name !== void 0) {
4272
- const l = i.name.text, p = i.name.text.startsWith(l[0].toUpperCase()), m = u.isAbsolute(n);
4273
- a && !i.isTypeOnly && p && m && e.importedFunctionComponentsFromModules.add(n);
4275
+ const l = i.name.text, p = i.name.text.startsWith(l[0].toUpperCase()), u = m.isAbsolute(n);
4276
+ a && !i.isTypeOnly && p && u && e.importedFunctionComponentsFromModules.add(n);
4274
4277
  }
4275
4278
  const c = i.namedBindings;
4276
4279
  if (c === void 0 || !o.isNamedImports(c))
4277
4280
  return t;
4278
4281
  const d = is.has(r.text);
4279
4282
  if (c.elements.forEach((l) => {
4280
- const p = (l.propertyName ?? l.name).text, m = te[p];
4283
+ const p = (l.propertyName ?? l.name).text, u = te[p];
4281
4284
  if (d) {
4282
- if (m?.some((h) => h === r.text)) {
4285
+ if (u?.some((h) => h === r.text)) {
4283
4286
  const h = ss(p, n);
4284
4287
  e.existingLitImports.add(h), e.importRenames[h] = l.name?.text ?? h;
4285
4288
  }
4286
4289
  } else (l.name.text === "h" || l.name.text === "createElement") && O().name !== "@arcgis/lumina" && (e.hasNonLuminaJsxImport = !0);
4287
- const f = p.startsWith(p[0].toUpperCase()), g = u.isAbsolute(n);
4290
+ const f = p.startsWith(p[0].toUpperCase()), g = m.isAbsolute(n);
4288
4291
  a && !l.isTypeOnly && f && g && e.importedFunctionComponentsFromModules.add(n);
4289
4292
  }), r.text === "@arcgis/lumina") {
4290
4293
  let l = !1;
4291
4294
  const p = c.elements.filter((f) => {
4292
4295
  const g = (f.propertyName ?? f.name).text;
4293
- return tr.has(g) ? !1 : (l ||= !f.isTypeOnly, !0);
4296
+ return ir.has(g) ? !1 : (l ||= !f.isTypeOnly, !0);
4294
4297
  });
4295
4298
  if (p.length === 0)
4296
4299
  return;
@@ -4319,11 +4322,11 @@ function bo(e, t) {
4319
4322
  }
4320
4323
  return t;
4321
4324
  }
4322
- const ss = (e, t) => e === re && te.staticHtml.includes(t) ? se : e === ee && te.staticSvg.includes(t) ? X : e, wo = (e, t, i) => t.startsWith(".") ? u.resolve(e, "..", `${t}${i}`) : t;
4323
- function So(e) {
4324
- return o.isImportDeclaration(e) ? Eo(this, e) : e;
4325
+ const ss = (e, t) => e === re && te.staticHtml.includes(t) ? se : e === ee && te.staticSvg.includes(t) ? X : e, So = (e, t, i) => t.startsWith(".") ? m.resolve(e, "..", `${t}${i}`) : t;
4326
+ function Eo(e) {
4327
+ return o.isImportDeclaration(e) ? Co(this, e) : e;
4325
4328
  }
4326
- function Eo(e, t) {
4329
+ function Co(e, t) {
4327
4330
  const i = t.importClause, s = i?.namedBindings, r = t.moduleSpecifier;
4328
4331
  if (!o.isStringLiteral(r) || !s || !o.isNamedImports(s) || !is.has(r.text))
4329
4332
  return t;
@@ -4348,7 +4351,7 @@ function Eo(e, t) {
4348
4351
  t.attributes
4349
4352
  ) : t;
4350
4353
  }
4351
- function Co(e) {
4354
+ function To(e) {
4352
4355
  const t = es(
4353
4356
  Array.from(e.neededImports, (i) => [te[i][0], i])
4354
4357
  );
@@ -4374,12 +4377,12 @@ function rs(e, t) {
4374
4377
  o.factory.createIdentifier(s)
4375
4378
  );
4376
4379
  }
4377
- function To(e) {
4378
- const t = Er().map(({ packageName: i }) => i);
4380
+ function $o(e) {
4381
+ const t = Cr().map(({ packageName: i }) => i);
4379
4382
  return e.existingImportedModules.forEach((i) => {
4380
- if (u.isAbsolute(i))
4383
+ if (m.isAbsolute(i))
4381
4384
  return;
4382
- const s = Rs(i), r = i.slice(s.length + 1);
4385
+ const s = Os(i), r = i.slice(s.length + 1);
4383
4386
  if (t.includes(s ?? "") && (r.startsWith("dist/components") || r.startsWith("components"))) {
4384
4387
  const n = xe(e.sourceFile.fileName);
4385
4388
  throw new Error(
@@ -4388,7 +4391,7 @@ function To(e) {
4388
4391
  }
4389
4392
  }), [];
4390
4393
  }
4391
- function $o(e) {
4394
+ function Po(e) {
4392
4395
  if (e.compiler.viteCommand === "serve")
4393
4396
  return e.customElementsToImport.clear(), e.customElementsToImportDeferred.clear(), [];
4394
4397
  const t = e.compiler._customElementDependencies;
@@ -4403,7 +4406,7 @@ function $o(e) {
4403
4406
  t[s] ??= { referencedBy: [], referencedTagNames: [], referencedDeferredTagNames: [] }, t[s].referencedBy.push(e.sourceFile.fileName);
4404
4407
  }), [];
4405
4408
  }
4406
- const Po = (e, t) => {
4409
+ const Io = (e, t) => {
4407
4410
  const i = e.pragmas;
4408
4411
  if (i?.has("jsx") === !0 || i?.has("jsxImportSource") === !0)
4409
4412
  return e.statements;
@@ -4413,9 +4416,9 @@ const Po = (e, t) => {
4413
4416
  for (let l = 0; l < d.length; ++l) {
4414
4417
  const p = d[l];
4415
4418
  if (p.customElement === !0) {
4416
- const m = p;
4417
- s = m.encapsulation !== void 0;
4418
- const f = m.superclass;
4419
+ const u = p;
4420
+ s = u.encapsulation !== void 0;
4421
+ const f = u.superclass;
4419
4422
  f?.module !== void 0 && f.package === void 0 && (r = [f.module.split("/").at(-1)]);
4420
4423
  break;
4421
4424
  }
@@ -4427,7 +4430,7 @@ const Po = (e, t) => {
4427
4430
  localComponents: Ui(t.compiler),
4428
4431
  sourceFile: e,
4429
4432
  transformationContext: t.transformation,
4430
- importRenames: Io(e),
4433
+ importRenames: ko(e),
4431
4434
  existingImportedModules: /* @__PURE__ */ new Set(),
4432
4435
  importedFunctionComponentsFromModules: /* @__PURE__ */ new Set(),
4433
4436
  existingLitImports: /* @__PURE__ */ new Set(),
@@ -4441,7 +4444,7 @@ const Po = (e, t) => {
4441
4444
  let a = [];
4442
4445
  if (e.statements.every((d) => {
4443
4446
  if (o.isImportDeclaration(d)) {
4444
- const l = bo(n, d);
4447
+ const l = wo(n, d);
4445
4448
  if (l === void 0)
4446
4449
  return !0;
4447
4450
  if (a.push(l), n.hasNonLuminaJsxImport)
@@ -4451,11 +4454,11 @@ const Po = (e, t) => {
4451
4454
  return !0;
4452
4455
  }), n.hasNonLuminaJsxImport)
4453
4456
  return e.statements;
4454
- if (n.neededImports.size > 0 && (a = a.map(So, n), n.existingLitImports.size > 0))
4457
+ if (n.neededImports.size > 0 && (a = a.map(Eo, n), n.existingLitImports.size > 0))
4455
4458
  throw new Error(
4456
4459
  `Expected context.existingLitImports to be empty by now. Found: ${Array.from(n.existingLitImports).join(", ")}`
4457
4460
  );
4458
- const c = [Co, To, $o].flatMap(
4461
+ const c = [To, $o, Po].flatMap(
4459
4462
  (d) => d(n)
4460
4463
  );
4461
4464
  if (n.neededImports.size > 0)
@@ -4464,18 +4467,18 @@ const Po = (e, t) => {
4464
4467
  );
4465
4468
  return [...c, ...a];
4466
4469
  };
4467
- function Io(e) {
4468
- return ko(e), Object.fromEntries(
4469
- Zs.map((t) => [t, e.identifiers.has(t) ? `${t}$jsx` : t])
4470
+ function ko(e) {
4471
+ return xo(e), Object.fromEntries(
4472
+ er.map((t) => [t, e.identifiers.has(t) ? `${t}$jsx` : t])
4470
4473
  );
4471
4474
  }
4472
- function ko(e) {
4475
+ function xo(e) {
4473
4476
  if (!("identifiers" in e))
4474
4477
  throw new Error(
4475
4478
  "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."
4476
4479
  );
4477
4480
  }
4478
- const Ut = "customElement", xo = (e, t) => {
4481
+ const Ut = "customElement", Ao = (e, t) => {
4479
4482
  const i = [];
4480
4483
  if (t.apiModule?.declarations.forEach((n) => {
4481
4484
  const a = n;
@@ -4489,9 +4492,9 @@ const Ut = "customElement", xo = (e, t) => {
4489
4492
  );
4490
4493
  }), i.length === 0)
4491
4494
  return e.statements;
4492
- const s = u.relative(
4493
- u.dirname(e.fileName),
4494
- u.join(t.compiler.dir.src, "runtime")
4495
+ const s = m.relative(
4496
+ m.dirname(e.fileName),
4497
+ m.join(t.compiler.dir.src, "runtime")
4495
4498
  );
4496
4499
  return [o.factory.createImportDeclaration(
4497
4500
  void 0,
@@ -4505,7 +4508,7 @@ const Ut = "customElement", xo = (e, t) => {
4505
4508
  o.factory.createStringLiteral(s)
4506
4509
  ), ...e.statements, ...i];
4507
4510
  };
4508
- function Ao(e, t, i) {
4511
+ function No(e, t, i) {
4509
4512
  return t.size === 0 ? e : [
4510
4513
  o.factory.createPropertyDeclaration(
4511
4514
  [
@@ -4520,7 +4523,7 @@ function Ao(e, t, i) {
4520
4523
  t.entries(),
4521
4524
  ([s, r]) => o.factory.createPropertyAssignment(
4522
4525
  ti(s) ? o.factory.createStringLiteral(s) : s,
4523
- No(r, i)
4526
+ Lo(r, i)
4524
4527
  )
4525
4528
  )
4526
4529
  )
@@ -4528,7 +4531,7 @@ function Ao(e, t, i) {
4528
4531
  ...e
4529
4532
  ];
4530
4533
  }
4531
- function No(e, t) {
4534
+ function Lo(e, t) {
4532
4535
  let i = 0, s = !0;
4533
4536
  const r = [], n = [];
4534
4537
  for (const d of e.properties)
@@ -4536,11 +4539,11 @@ function No(e, t) {
4536
4539
  function a(d) {
4537
4540
  if (!o.isPropertyAssignment(d) || !o.isIdentifier(d.name))
4538
4541
  return !0;
4539
- const l = d.name.text, p = d.initializer, m = p.kind === o.SyntaxKind.TrueKeyword, f = p.kind === o.SyntaxKind.FalseKeyword;
4542
+ const l = d.name.text, p = d.initializer, u = p.kind === o.SyntaxKind.TrueKeyword, f = p.kind === o.SyntaxKind.FalseKeyword;
4540
4543
  if (l === "attribute")
4541
- return s = !1, i |= m ? ht : 0, !m && !f;
4544
+ return s = !1, i |= u ? ht : 0, !u && !f;
4542
4545
  if (l === "reflect")
4543
- return i |= m ? fs : 0, !1;
4546
+ return i |= u ? fs : 0, !1;
4544
4547
  if (l === "type" && o.isIdentifier(p)) {
4545
4548
  if (p.text === "Boolean")
4546
4549
  return i |= gs, !1;
@@ -4548,10 +4551,13 @@ function No(e, t) {
4548
4551
  return i |= hs, !1;
4549
4552
  } else {
4550
4553
  if (l === "state")
4551
- return s = !1, i |= m ? ys : 0, !1;
4554
+ return s = !1, i |= u ? ys : 0, !1;
4552
4555
  if (l === "readOnly")
4553
- return i |= m ? vs : 0, !1;
4554
- l === "noAccessor" && (i |= m ? bs : 0);
4556
+ return i |= u ? vs : 0, !1;
4557
+ if (l === "noAccessor")
4558
+ return i |= u ? bs : 0, !1;
4559
+ if (l === "useDefault")
4560
+ return i |= u ? ws : 0, !1;
4555
4561
  }
4556
4562
  return !0;
4557
4563
  }
@@ -4570,35 +4576,35 @@ function No(e, t) {
4570
4576
  ...t ? [] : [o.factory.createObjectLiteralExpression(n)]
4571
4577
  ]);
4572
4578
  }
4573
- function Lo(e, t, i) {
4579
+ function jo(e, t, i) {
4574
4580
  let s = -1, r = -1, n = -1;
4575
- e.options?.properties.forEach((p, m) => {
4581
+ e.options?.properties.forEach((p, u) => {
4576
4582
  if (o.isSpreadAssignment(p))
4577
4583
  throw new Error(
4578
4584
  `Spread property assignment is not allowed in @property() as that is not statically analyzable. Found ${p.getText(t)}`
4579
4585
  );
4580
4586
  if (o.isIdentifier(p.name)) {
4581
4587
  const f = p.name.escapedText;
4582
- f === "type" ? s = m : f === "attribute" ? r = m : f === "readOnly" && (n = m);
4588
+ f === "type" ? s = u : f === "attribute" ? r = u : f === "readOnly" && (n = u);
4583
4589
  }
4584
4590
  });
4585
- const a = i.attribute === void 0 && r === -1, c = i.readonly === !0 && i.docsOnlyReadonly !== !0 && n === -1, d = jo(e, i, s), l = [
4591
+ const a = i.attribute === void 0 && r === -1, c = i.readonly === !0 && i.docsOnlyReadonly !== !0 && n === -1, d = Fo(e, i, s), l = [
4586
4592
  ...a ? [o.factory.createPropertyAssignment("attribute", o.factory.createFalse())] : [],
4587
4593
  ...c ? [o.factory.createPropertyAssignment("readOnly", o.factory.createTrue())] : [],
4588
4594
  ...d !== void 0 ? [d] : []
4589
4595
  ];
4590
4596
  return l.length > 0 ? e.options === void 0 ? o.factory.createObjectLiteralExpression(l, !1) : o.factory.updateObjectLiteralExpression(e.options, [...e.options.properties, ...l]) : e.options;
4591
4597
  }
4592
- function jo(e, t, i) {
4598
+ function Fo(e, t, i) {
4593
4599
  if (t.attribute === void 0)
4594
4600
  return;
4595
- const s = Fo(t.type.values);
4601
+ const s = Do(t.type.values);
4596
4602
  return s === "Other" || t.readonly === !0 && (s !== "Boolean" || t.reflects === void 0) || e.options?.properties[i] !== void 0 ? void 0 : o.factory.createPropertyAssignment(
4597
4603
  o.factory.createIdentifier("type"),
4598
4604
  o.factory.createIdentifier(s)
4599
4605
  );
4600
4606
  }
4601
- function Fo(e) {
4607
+ function Do(e) {
4602
4608
  let t = !1, i = !1, s = !1;
4603
4609
  if (e?.forEach((r) => {
4604
4610
  t ||= r.type === "number", i ||= r.type === "boolean", s ||= r.type === "string" || r.type === "any" || r.type === "unknown";
@@ -4610,7 +4616,7 @@ function Fo(e) {
4610
4616
  }
4611
4617
  return "Other";
4612
4618
  }
4613
- function Do(e, t, i, s, r, n) {
4619
+ function Ro(e, t, i, s, r, n) {
4614
4620
  if (i.modifiers === void 0)
4615
4621
  return i;
4616
4622
  let a = -1, c = -1;
@@ -4620,17 +4626,17 @@ function Do(e, t, i, s, r, n) {
4620
4626
  p === "property" && (a = l), p === "state" && (c = l);
4621
4627
  }
4622
4628
  }), a !== -1) {
4623
- const d = Ro(e, t, i, s, r), l = Wt(i, a, r), p = Lo(l, r, d);
4629
+ const d = Oo(e, t, i, s, r), l = Wt(i, a, r), p = jo(l, r, d);
4624
4630
  return n.set(d.name, p ?? o.factory.createObjectLiteralExpression()), l.options = p, zt(i, a);
4625
4631
  } else if (c !== -1) {
4626
- const d = Wt(i, c, r), l = o.factory.createPropertyAssignment("state", o.factory.createTrue()), p = d.options === void 0 ? o.factory.createObjectLiteralExpression([l]) : o.factory.updateObjectLiteralExpression(d.options, [...d.options.properties, l]), m = ii(i.name);
4627
- if (m === void 0)
4632
+ const d = Wt(i, c, r), l = o.factory.createPropertyAssignment("state", o.factory.createTrue()), p = d.options === void 0 ? o.factory.createObjectLiteralExpression([l]) : o.factory.updateObjectLiteralExpression(d.options, [...d.options.properties, l]), u = ii(i.name);
4633
+ if (u === void 0)
4628
4634
  throw new Error("Failed to statically determine the state property name");
4629
- return n.set(m, p), zt(i, c);
4635
+ return n.set(u, p), zt(i, c);
4630
4636
  } else
4631
4637
  return i;
4632
4638
  }
4633
- function Ro(e, t, i, s, r) {
4639
+ function Oo(e, t, i, s, r) {
4634
4640
  const n = t ?? (e.compiler.isInTest ? {
4635
4641
  members: []
4636
4642
  } : void 0);
@@ -4690,7 +4696,7 @@ function zt(e, t) {
4690
4696
  e.initializer
4691
4697
  );
4692
4698
  }
4693
- function Oo(e, t, i, s) {
4699
+ function Mo(e, t, i, s) {
4694
4700
  let r;
4695
4701
  if (e.apiJsonEnabled)
4696
4702
  for (let d = 0; d < e.privateApiJson.modules.length; ++d) {
@@ -4713,9 +4719,9 @@ function Oo(e, t, i, s) {
4713
4719
  } finally {
4714
4720
  c = i.statements, i.statements = a;
4715
4721
  }
4716
- return Mo(i, c);
4722
+ return Jo(i, c);
4717
4723
  }
4718
- const Mo = (e, t) => o.factory.updateSourceFile(
4724
+ const Jo = (e, t) => o.factory.updateSourceFile(
4719
4725
  e,
4720
4726
  t,
4721
4727
  /*
@@ -4730,10 +4736,10 @@ const Mo = (e, t) => o.factory.updateSourceFile(
4730
4736
  e.hasNoDefaultLib,
4731
4737
  e.libReferenceDirectives
4732
4738
  );
4733
- function Jo(e, t) {
4739
+ function Bo(e, t) {
4734
4740
  t.compiler.viteCommand === "build" && ("emitNode" in e && (e.emitNode ??= {}), o.setEmitFlags(e, o.EmitFlags.NoComments));
4735
4741
  }
4736
- const Bo = (e, t) => {
4742
+ const Ko = (e, t) => {
4737
4743
  let i;
4738
4744
  if (t.apiModule !== void 0)
4739
4745
  for (let d = 0; d < t.apiModule.declarations.length; ++d) {
@@ -4749,10 +4755,10 @@ const Bo = (e, t) => {
4749
4755
  function r() {
4750
4756
  s = /* @__PURE__ */ new Map();
4751
4757
  }
4752
- const n = (d) => Ao(d, s, t.compiler.shouldMinify);
4758
+ const n = (d) => No(d, s, t.compiler.shouldMinify);
4753
4759
  function a(d, l) {
4754
- const p = _o(t, i, d, l, e, s);
4755
- return Jo(p, t), p;
4760
+ const p = Uo(t, i, d, l, e, s);
4761
+ return Bo(p, t), p;
4756
4762
  }
4757
4763
  return e.statements.map(
4758
4764
  (d) => ns(a, d, t, r, n)
@@ -4785,11 +4791,11 @@ function ns(e, t, i, s, r = si) {
4785
4791
  i.transformation
4786
4792
  ) : t;
4787
4793
  }
4788
- const Ko = /* @__PURE__ */ new Set(["connectedCallback", "disconnectedCallback"]);
4789
- function _o(e, t, i, s, r, n) {
4794
+ const _o = /* @__PURE__ */ new Set(["connectedCallback", "disconnectedCallback"]);
4795
+ function Uo(e, t, i, s, r, n) {
4790
4796
  if (o.isMethodDeclaration(i)) {
4791
4797
  const a = i.modifiers?.filter(
4792
- (c) => !o.isDecorator(c) || !Uo(c)
4798
+ (c) => !o.isDecorator(c) || !Wo(c)
4793
4799
  );
4794
4800
  if (a?.length !== i.modifiers?.length)
4795
4801
  return o.factory.updateMethodDeclaration(
@@ -4803,7 +4809,7 @@ function _o(e, t, i, s, r, n) {
4803
4809
  i.type,
4804
4810
  i.body
4805
4811
  );
4806
- if ("text" in i.name && Ko.has(i.name.text) && i.body) {
4812
+ if ("text" in i.name && _o.has(i.name.text) && i.body) {
4807
4813
  const c = i.name.text;
4808
4814
  return i.body.statements.some(
4809
4815
  (l) => o.isExpressionStatement(l) && o.isCallExpression(l.expression) && o.isPropertyAccessExpression(l.expression.expression) && l.expression.expression.expression.kind === o.SyntaxKind.SuperKeyword && l.expression.expression.name.text === c
@@ -4829,14 +4835,14 @@ function _o(e, t, i, s, r, n) {
4829
4835
  );
4830
4836
  }
4831
4837
  }
4832
- return o.isPropertyDeclaration(i) || o.isAccessor(i) ? Do(e, t, i, s, r, n) : i;
4833
- }
4834
- const Uo = (e) => o.isCallExpression(e.expression) && o.isIdentifier(e.expression.expression) && e.expression.expression.text === "method", Wo = [
4835
- Po,
4836
- xo,
4837
- Bo
4838
- ], zo = "@arcgis/lumina:transformComponents", Ho = (e) => ({
4839
- name: zo,
4838
+ return o.isPropertyDeclaration(i) || o.isAccessor(i) ? Ro(e, t, i, s, r, n) : i;
4839
+ }
4840
+ const Wo = (e) => o.isCallExpression(e.expression) && o.isIdentifier(e.expression.expression) && e.expression.expression.text === "method", zo = [
4841
+ Io,
4842
+ Ao,
4843
+ Ko
4844
+ ], Ho = "@arcgis/lumina:transformComponents", qo = (e) => ({
4845
+ name: Ho,
4840
4846
  transform: {
4841
4847
  // Transform JSX to lit-html first so that vite:esbuild doesn't transform JSX to h().
4842
4848
  // Also, we need to run on the original fs file, before other transforms so
@@ -4853,11 +4859,11 @@ const Uo = (e) => o.isCallExpression(e.expression) && o.isIdentifier(e.expressio
4853
4859
  e.apiJsonDeferred === void 0 ? [ie] : [ie, e.apiJsonDeferred.promise]
4854
4860
  );
4855
4861
  const s = e.getSourceFile(i, t), n = o.transform(s, [
4856
- (m) => () => Oo(e, m, s, [
4862
+ (u) => () => Mo(e, u, s, [
4857
4863
  ...e.options.types?.sourceFileTransformers ?? [],
4858
- ...Wo
4864
+ ...zo
4859
4865
  ])
4860
- ]).transformed[0], a = e._typeScriptPrinter, c = e.viteConfig.build.sourcemap === !1 ? void 0 : yt.createSourceMapGenerator(qo, u.basename(i), "", u.dirname(i), {}), d = yt.createTextWriter(`
4866
+ ]).transformed[0], a = e._typeScriptPrinter, c = e.viteConfig.build.sourcemap === !1 ? void 0 : yt.createSourceMapGenerator(Vo, m.basename(i), "", m.dirname(i), {}), d = yt.createTextWriter(`
4861
4867
  `);
4862
4868
  a.writeFile(n, d, c);
4863
4869
  const l = d.getText(), p = c?.toJSON();
@@ -4867,10 +4873,10 @@ const Uo = (e) => o.isCallExpression(e.expression) && o.isIdentifier(e.expressio
4867
4873
  };
4868
4874
  }
4869
4875
  }
4870
- }), qo = {
4876
+ }), Vo = {
4871
4877
  getCurrentDirectory: o.sys.getCurrentDirectory,
4872
4878
  getCanonicalFileName: o.sys.useCaseSensitiveFileNames ? si : (e) => e.toLowerCase()
4873
- }, Vo = (e) => ({
4879
+ }, Go = (e) => ({
4874
4880
  name: "@arcgis/lumina:handleDynamicAssets",
4875
4881
  configureServer(t) {
4876
4882
  e.server = t, Ht(e).forEach(({ assets: i, transformers: s }) => ce(e, i, s));
@@ -4889,20 +4895,20 @@ function Ht(e) {
4889
4895
  "type" in s ? t.push(s) : "assets" in s && t.push(...s.assets);
4890
4896
  }), t.length > 0 && i.push({ assets: t }), e.isInBuildWatch || (e.assetsToProvide = void 0), i;
4891
4897
  }
4892
- const et = "@arcgis/lumina:updatePackageJson", Go = (e) => ({
4898
+ const et = "@arcgis/lumina:updatePackageJson", Xo = (e) => ({
4893
4899
  name: et,
4894
4900
  apply: () => e.viteCommand === "serve" && e.environment === "development" && !e.isInTest && !e.isInCi,
4895
4901
  configResolved() {
4896
- Xo(e).catch(
4902
+ Yo(e).catch(
4897
4903
  (t) => E.error(et, `Failed to update package's package.json:${String(t)}`)
4898
4904
  );
4899
4905
  }
4900
4906
  });
4901
- async function Xo(e) {
4902
- const t = u.join(e.dir.root, "package.json"), i = JSON.parse(await H(t, "utf-8")), s = Yo(i, e);
4907
+ async function Yo(e) {
4908
+ const t = m.join(e.dir.root, "package.json"), i = JSON.parse(await H(t, "utf-8")), s = Qo(i, e);
4903
4909
  s && ei(t, JSON.stringify(s, null, 2));
4904
4910
  }
4905
- function Yo(e, t) {
4911
+ function Qo(e, t) {
4906
4912
  const i = e?.devDependencies ?? {};
4907
4913
  Object.keys(e?.peerDependencies ?? {}).forEach((l) => {
4908
4914
  l in i || E.warn(
@@ -4911,7 +4917,7 @@ function Yo(e, t) {
4911
4917
  );
4912
4918
  });
4913
4919
  let s = !1;
4914
- const r = (l) => u.relative(t.dir.root, u.join(t.dir.dist, l)), n = t._documentationFileNames;
4920
+ const r = (l) => m.relative(t.dir.root, m.join(t.dir.dist, l)), n = t._documentationFileNames;
4915
4921
  if (n.vsCodeCss !== void 0) {
4916
4922
  const l = e["css.customData"] ?? [], p = r(n.vsCodeCss);
4917
4923
  l.includes(p) || (e["css.customData"] = [...l, p], s = !0);
@@ -4928,9 +4934,9 @@ function Yo(e, t) {
4928
4934
  const l = r(n.webTypes);
4929
4935
  e["web-types"] !== l && (s = !0, e["web-types"] = l);
4930
4936
  }
4931
- const a = `./${Q}.css`, c = t.options.build?.cdn?.namespace !== void 0, d = ue(
4937
+ const a = `./${Q}.css`, c = t.options.build?.cdn?.namespace !== void 0, d = me(
4932
4938
  t.dir.root,
4933
- u.join(t.dir.distCdn, a)
4939
+ m.join(t.dir.distCdn, a)
4934
4940
  );
4935
4941
  if (!c) {
4936
4942
  e.exports?.[a] !== d && (e.exports ??= {}, e.exports[a] = d, s = !0);
@@ -4941,20 +4947,20 @@ function Yo(e, t) {
4941
4947
  if (s)
4942
4948
  return e;
4943
4949
  }
4944
- const Qo = (e) => ({
4950
+ const Zo = (e) => ({
4945
4951
  timestamp: e.apiJson.timestamp,
4946
4952
  compiler: e.apiJson.compiler,
4947
- components: Zo(e),
4953
+ components: ea(e),
4948
4954
  typeLibrary: {}
4949
4955
  });
4950
- function Zo(e) {
4956
+ function ea(e) {
4951
4957
  const t = [];
4952
4958
  for (const i of e.apiJson.modules)
4953
4959
  for (const s of i.declarations)
4954
- s.customElement === !0 && t.push(ea(s, i.sourcePath));
4960
+ s.customElement === !0 && t.push(ta(s, i.sourcePath));
4955
4961
  return t;
4956
4962
  }
4957
- function ea(e, t) {
4963
+ function ta(e, t) {
4958
4964
  const i = e.superclass ? [{ name: "superclass", text: JSON.stringify(e.superclass) }] : [];
4959
4965
  return {
4960
4966
  filePath: t,
@@ -4969,9 +4975,9 @@ function ea(e, t) {
4969
4975
  dependencies: [],
4970
4976
  dependencyGraph: {},
4971
4977
  deprecation: typeof e.deprecated == "boolean" ? e.deprecated ? "" : void 0 : e.deprecated,
4972
- props: e.members.map(ta).filter(F),
4973
- methods: e.members.map(ia).filter(F),
4974
- events: e.events?.map(sa) ?? [],
4978
+ props: e.members.map(ia).filter(F),
4979
+ methods: e.members.map(sa).filter(F),
4980
+ events: e.events?.map(ra) ?? [],
4975
4981
  styles: e.cssProperties?.map((s) => ({
4976
4982
  name: s.name,
4977
4983
  annotation: "prop",
@@ -4983,7 +4989,7 @@ function ea(e, t) {
4983
4989
  listeners: []
4984
4990
  };
4985
4991
  }
4986
- function ta(e) {
4992
+ function ia(e) {
4987
4993
  if (e.kind !== "field")
4988
4994
  return;
4989
4995
  const t = e, i = t.inheritedFrom ? [{ name: "inheritedFrom", text: JSON.stringify(t.inheritedFrom) }] : [], s = t.readonly ? [{ name: "readonly", text: "" }] : [], r = t.docsTags?.some((n) => n.name === "required") ?? !1;
@@ -4993,7 +4999,7 @@ function ta(e) {
4993
4999
  complexType: t.type === void 0 ? void 0 : {
4994
5000
  original: t.type.text,
4995
5001
  resolved: t.type.text,
4996
- references: mt(t.type.references)
5002
+ references: ut(t.type.references)
4997
5003
  },
4998
5004
  mutable: !0,
4999
5005
  attr: "attribute" in t && typeof t.attribute == "string" ? t.attribute : void 0,
@@ -5012,19 +5018,19 @@ function ta(e) {
5012
5018
  required: r
5013
5019
  };
5014
5020
  }
5015
- const mt = (e) => Object.fromEntries(
5021
+ const ut = (e) => Object.fromEntries(
5016
5022
  e?.map(
5017
5023
  (t) => [
5018
5024
  t.name,
5019
5025
  {
5020
- location: t.package === Ss ? "global" : t.package === void 0 ? "local" : "import",
5021
- path: typeof t.module == "string" && typeof t.package == "string" ? u.join(t.package, t.module) : t.module ?? t.package,
5026
+ location: t.package === Es ? "global" : t.package === void 0 ? "local" : "import",
5027
+ path: typeof t.module == "string" && typeof t.package == "string" ? m.join(t.package, t.module) : t.module ?? t.package,
5022
5028
  id: "notImplemented"
5023
5029
  }
5024
5030
  ]
5025
5031
  ) ?? []
5026
5032
  );
5027
- function ia(e) {
5033
+ function sa(e) {
5028
5034
  if (e.kind !== "method")
5029
5035
  return;
5030
5036
  const t = e, i = e.inheritedFrom ? [{ name: "inheritedFrom", text: JSON.stringify(e.inheritedFrom) }] : [], s = t.parameters?.map(({ name: r, type: n, description: a }) => ({
@@ -5043,7 +5049,7 @@ function ia(e) {
5043
5049
  signature: t.signature ?? "()=>unknown",
5044
5050
  parameters: s,
5045
5051
  return: t.return?.type?.text ?? "void",
5046
- references: mt([
5052
+ references: ut([
5047
5053
  ...t.return?.type?.references ?? [],
5048
5054
  ...t.parameters?.flatMap((r) => r.type.references ?? []) ?? []
5049
5055
  ])
@@ -5055,7 +5061,7 @@ function ia(e) {
5055
5061
  deprecation: typeof t.deprecated == "boolean" ? t.deprecated ? "" : void 0 : t.deprecated
5056
5062
  };
5057
5063
  }
5058
- function sa(e) {
5064
+ function ra(e) {
5059
5065
  const t = e.inheritedFrom ? [{ name: "inheritedFrom", text: JSON.stringify(e.inheritedFrom) }] : [];
5060
5066
  return {
5061
5067
  event: e.name,
@@ -5064,7 +5070,7 @@ function sa(e) {
5064
5070
  complexType: {
5065
5071
  original: e.type.text,
5066
5072
  resolved: e.type.text,
5067
- references: mt(e.type.references)
5073
+ references: ut(e.type.references)
5068
5074
  },
5069
5075
  cancelable: e.cancelable ?? !0,
5070
5076
  composed: e.composed ?? !0,
@@ -5084,7 +5090,7 @@ const os = (e) => e.flatMap(
5084
5090
  description: i.description || void 0
5085
5091
  })) ?? []
5086
5092
  );
5087
- function ra(e) {
5093
+ function na(e) {
5088
5094
  if (e.attributes === void 0)
5089
5095
  return [];
5090
5096
  const t = [];
@@ -5095,7 +5101,7 @@ function ra(e) {
5095
5101
  description: je(s.description, s.deprecated) || void 0,
5096
5102
  default: s.default,
5097
5103
  value: {
5098
- type: na(
5104
+ type: oa(
5099
5105
  s.type.values?.map(
5100
5106
  (r) => r.type === "string" && r.value !== void 0 ? `"${r.value}"` : r.value ?? r.type
5101
5107
  )
@@ -5105,7 +5111,7 @@ function ra(e) {
5105
5111
  }
5106
5112
  return t;
5107
5113
  }
5108
- const na = (e) => e?.length === 1 ? e[0] : e, je = (e = "", t = !1) => t === !1 ? e : `**Deprecated**${typeof t == "string" ? `: ${t}` : ""}. ${e}`, fe = {
5114
+ const oa = (e) => e?.length === 1 ? e[0] : e, je = (e = "", t = !1) => t === !1 ? e : `**Deprecated**${typeof t == "string" ? `: ${t}` : ""}. ${e}`, fe = {
5109
5115
  slots: "Slots",
5110
5116
  events: "Events",
5111
5117
  cssProperties: "CSS Properties",
@@ -5113,7 +5119,7 @@ const na = (e) => e?.length === 1 ? e[0] : e, je = (e = "", t = !1) => t === !1
5113
5119
  methods: "Methods"
5114
5120
  };
5115
5121
  function ls(e) {
5116
- const t = oa(e.slots), i = aa(e.events), s = la(e.cssProperties), r = ca(e.cssParts), n = da(e.members), a = je(e.description, e.deprecated).trim();
5122
+ const t = aa(e.slots), i = la(e.events), s = ca(e.cssProperties), r = da(e.cssParts), n = pa(e.members), a = je(e.description, e.deprecated).trim();
5117
5123
  return [...a ? [`${a}
5118
5124
  --`] : [], i, n, t, s, r].filter(Boolean).join(`
5119
5125
 
@@ -5121,27 +5127,27 @@ function ls(e) {
5121
5127
  }
5122
5128
  const ge = (e, t) => t === void 0 || t.length === 0 ? "" : `### ${e}
5123
5129
  ${t.join(`
5124
- `)}`, oa = (e) => ge(
5130
+ `)}`, aa = (e) => ge(
5125
5131
  fe.slots,
5126
5132
  e?.map((t) => `- ${t.name ? `**${t.name}**` : "_default_"} - ${t.description}`)
5127
- ), aa = (e) => ge(
5133
+ ), la = (e) => ge(
5128
5134
  fe.events,
5129
5135
  e?.filter((t) => t.name !== null && t.name !== void 0).map((t) => `- **${t.name}**${t.description ? ` - ${t.description}` : ""}`)
5130
- ), la = (e = []) => ge(
5136
+ ), ca = (e = []) => ge(
5131
5137
  fe.cssProperties,
5132
5138
  e?.map(
5133
5139
  (t) => `- **${t.name}** - ${t.description} ${t.default ? `_(default: ${t.default})_}` : ""}`
5134
5140
  )
5135
- ), ca = (e) => ge(
5141
+ ), da = (e) => ge(
5136
5142
  fe.cssParts,
5137
5143
  e?.map((t) => `- **${t.name}** - ${t.description}`)
5138
- ), da = (e) => ge(
5144
+ ), pa = (e) => ge(
5139
5145
  fe.methods,
5140
- e.filter(Es).map(
5146
+ e.filter(Cs).map(
5141
5147
  (t) => [`- \`${t.name}${t.signature}\``, je(t.description, t.deprecated)].filter(Boolean).join(" - ")
5142
5148
  )
5143
5149
  );
5144
- function pa(e, t) {
5150
+ function ua(e, t) {
5145
5151
  const i = ma(e), s = os(e), r = as(e), n = O();
5146
5152
  return {
5147
5153
  $schema: "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
@@ -5164,7 +5170,7 @@ const ma = (e) => e.map((t) => ({
5164
5170
  name: t.tagName,
5165
5171
  description: ls(t),
5166
5172
  "doc-url": t.demos?.[0]?.url,
5167
- attributes: ra(t),
5173
+ attributes: na(t),
5168
5174
  slots: t.slots?.map((i) => ({
5169
5175
  name: i.name,
5170
5176
  description: i.description
@@ -5172,10 +5178,10 @@ const ma = (e) => e.map((t) => ({
5172
5178
  // REFACTOR: this was deprecated in the spec: https://github.com/JetBrains/web-types/blob/11e46e47cb65edc1930dc1fae854005ad45ac08f/schema/web-types.json#L866
5173
5179
  events: qt(t),
5174
5180
  js: {
5175
- properties: ua(t),
5181
+ properties: fa(t),
5176
5182
  events: qt(t)
5177
5183
  }
5178
- })), ua = (e) => e.members.filter(Cs).map((t) => ({
5184
+ })), fa = (e) => e.members.filter(Ts).map((t) => ({
5179
5185
  name: t.name,
5180
5186
  description: t.description,
5181
5187
  type: t.type?.text
@@ -5183,90 +5189,90 @@ const ma = (e) => e.map((t) => ({
5183
5189
  name: t.name,
5184
5190
  type: t.type?.text,
5185
5191
  description: t.description
5186
- })) ?? [], fa = (e) => e.map((t) => ({
5192
+ })) ?? [], ga = (e) => e.map((t) => ({
5187
5193
  name: t.tagName,
5188
5194
  description: ls(t),
5189
- attributes: ga(t),
5195
+ attributes: ha(t),
5190
5196
  references: t.demos?.map((i) => ({ name: i.description, url: i.url })) ?? []
5191
- })), ga = (e) => e.attributes?.map((t) => ({
5197
+ })), ha = (e) => e.attributes?.map((t) => ({
5192
5198
  name: t.name,
5193
5199
  description: je(t.description, t.deprecated) || void 0,
5194
- values: ha(t)
5195
- })) ?? [], ha = (e) => e.type.values?.map((t) => t.value ?? "").filter(Boolean).map((t) => ({ name: t })) ?? [], ya = (e) => ({
5200
+ values: ya(t)
5201
+ })) ?? [], ya = (e) => e.type.values?.map((t) => t.value ?? "").filter(Boolean).map((t) => ({ name: t })) ?? [], va = (e) => ({
5196
5202
  $schema: "https://raw.githubusercontent.com/microsoft/vscode-html-languageservice/main/docs/customData.schema.json",
5197
5203
  version: 1.1,
5198
- tags: fa(e)
5199
- }), va = (e) => ({
5204
+ tags: ga(e)
5205
+ }), ba = (e) => ({
5200
5206
  $schema: "https://raw.githubusercontent.com/microsoft/vscode-css-languageservice/main/docs/customData.schema.json",
5201
5207
  version: 1.1,
5202
5208
  properties: os(e),
5203
5209
  pseudoElements: as(e)
5204
- }), ba = "@arcgis/lumina:generateDocs";
5205
- function wa(e) {
5210
+ }), wa = "@arcgis/lumina:generateDocs";
5211
+ function Sa(e) {
5206
5212
  return e._documentationFileNames.stencilLikeDocsJson !== void 0 && e.provideAssets([
5207
5213
  {
5208
5214
  type: "dynamic",
5209
- source: () => JSON.stringify(Qo(e), null, Ze(e)),
5210
- destination: u.join("../..", e._documentationFileNames.stencilLikeDocsJson)
5215
+ source: () => JSON.stringify(Zo(e), null, Ze(e)),
5216
+ destination: m.join("../..", e._documentationFileNames.stencilLikeDocsJson)
5211
5217
  }
5212
5218
  ]), {
5213
- name: ba,
5219
+ name: wa,
5214
5220
  async writeBundle() {
5215
5221
  if (e.isInStorybook)
5216
5222
  return;
5217
- const t = Ze(e), { jetBrains: i } = e.options.documentation ?? {}, s = e._documentationFileNames, r = s.vsCodeHtml === void 0 ? void 0 : u.join(e.dir.dist, s.vsCodeHtml), n = s.vsCodeCss === void 0 ? void 0 : u.join(e.dir.dist, s.vsCodeCss), a = s.webTypes === void 0 ? void 0 : u.join(e.dir.dist, s.webTypes), c = [r, n, a].filter(F);
5223
+ const t = Ze(e), { jetBrains: i } = e.options.documentation ?? {}, s = e._documentationFileNames, r = s.vsCodeHtml === void 0 ? void 0 : m.join(e.dir.dist, s.vsCodeHtml), n = s.vsCodeCss === void 0 ? void 0 : m.join(e.dir.dist, s.vsCodeCss), a = s.webTypes === void 0 ? void 0 : m.join(e.dir.dist, s.webTypes), c = [r, n, a].filter(F);
5218
5224
  if (c.length === 0)
5219
5225
  return;
5220
5226
  await Mi(c);
5221
5227
  const d = [];
5222
5228
  if (r !== void 0) {
5223
- const l = JSON.stringify(ya(e.apiJsonComponents), null, t);
5229
+ const l = JSON.stringify(va(e.apiJsonComponents), null, t);
5224
5230
  d.push(U(r, l));
5225
5231
  }
5226
5232
  if (n !== void 0) {
5227
- const l = JSON.stringify(va(e.apiJsonComponents), null, t);
5233
+ const l = JSON.stringify(ba(e.apiJsonComponents), null, t);
5228
5234
  d.push(U(n, l));
5229
5235
  }
5230
5236
  if (a !== void 0) {
5231
- const l = pa(e.apiJsonComponents, typeof i == "object" ? i : {});
5237
+ const l = ua(e.apiJsonComponents, typeof i == "object" ? i : {});
5232
5238
  d.push(U(a, JSON.stringify(l, null, t)));
5233
5239
  }
5234
5240
  await Promise.all(d);
5235
5241
  }
5236
5242
  };
5237
5243
  }
5238
- function Sa(e) {
5244
+ function Ea(e) {
5239
5245
  return {
5240
5246
  name: "@arcgis/lumina:buildWrappers",
5241
5247
  apply: () => e.viteCommand === "build" && !!e.options.build?.wrappers?.length,
5242
5248
  async writeBundle() {
5243
5249
  e.isInStorybook || await Promise.all(
5244
5250
  e.options.build?.wrappers?.map(async (t) => {
5245
- t.type === "react18" && await Ta(e, t);
5251
+ t.type === "react18" && await $a(e, t);
5246
5252
  }) ?? []
5247
5253
  );
5248
5254
  }
5249
5255
  };
5250
5256
  }
5251
- const Ea = "react", Vt = "@lit/react", Ca = `
5252
- import React from "${Ea}";
5257
+ const Ca = "react", Vt = "@lit/react", Ta = `
5258
+ import React from "${Ca}";
5253
5259
  import { createComponent } from "${Vt}";
5254
5260
  import type { EventName } from "${Vt}";
5255
5261
  import { makeReactWrapperFactory, getReactWrapperOptions } from "@arcgis/lumina";
5256
5262
 
5257
5263
  const createWrapper = /*@__PURE__*/ makeReactWrapperFactory(React, createComponent) as typeof createComponent;
5258
5264
  `;
5259
- async function Ta(e, t) {
5265
+ async function $a(e, t) {
5260
5266
  const { name: i } = O(), s = [];
5261
5267
  for (const a of e.apiJson.modules)
5262
5268
  for (const c of a.declarations)
5263
- c.customElement === !0 && s.push($a(c));
5264
- const r = [`/// <reference types="${i}" preserve="true" />`, Ca, ...s].join(""), n = u.resolve(t.proxiesFile);
5265
- await G(u.dirname(n), { recursive: !0 }), await U(n, r);
5269
+ c.customElement === !0 && s.push(Pa(c));
5270
+ const r = [`/// <reference types="${i}" preserve="true" />`, Ta, ...s].join(""), n = m.resolve(t.proxiesFile);
5271
+ await G(m.dirname(n), { recursive: !0 }), await U(n, r);
5266
5272
  }
5267
- function $a(e) {
5273
+ function Pa(e) {
5268
5274
  const t = e.events?.map(
5269
- (i) => ` ${Ds(`on${ps(i.name)}`)}: "${i.name}" as EventName<HTML${e.pascalCaseName}Element["${i.name}"]>,`
5275
+ (i) => ` ${Rs(`on${ps(i.name)}`)}: "${i.name}" as EventName<HTML${e.pascalCaseName}Element["${i.name}"]>,`
5270
5276
  ).join(`
5271
5277
  `);
5272
5278
  return `
@@ -5281,29 +5287,29 @@ ${t}
5281
5287
  );
5282
5288
  `;
5283
5289
  }
5284
- function Ga(e = {}) {
5290
+ function Xa(e = {}) {
5285
5291
  const t = new $(e), s = [
5286
5292
  t._plugin,
5287
- kn(t),
5288
5293
  xn(t),
5289
- Go(t),
5290
- hn(t),
5291
- wa(t),
5292
- Ho(t),
5293
- Wn(t),
5294
- sr(t),
5295
- Sn(t),
5296
- Vo(t),
5297
- Hn(t),
5298
- Fn(t),
5299
- Os(t),
5300
- Wr(t),
5294
+ An(t),
5295
+ Xo(t),
5296
+ yn(t),
5301
5297
  Sa(t),
5302
- En(t)
5298
+ qo(t),
5299
+ zn(t),
5300
+ rr(t),
5301
+ En(t),
5302
+ Go(t),
5303
+ qn(t),
5304
+ Dn(t),
5305
+ Ms(t),
5306
+ zr(t),
5307
+ Ea(t),
5308
+ Cn(t)
5303
5309
  ].filter(F);
5304
5310
  return s.context = t, s;
5305
5311
  }
5306
- const Xa = {
5312
+ const Ya = {
5307
5313
  initializeComponentDependencies: bi,
5308
5314
  updateLuminaTs: Ki,
5309
5315
  propertyToAttributeMappings: W,
@@ -5315,7 +5321,7 @@ const Xa = {
5315
5321
  htmlAlwaysAttributes: qe
5316
5322
  };
5317
5323
  export {
5318
- Xa as exportsForCodemod,
5324
+ Ya as exportsForCodemod,
5319
5325
  Ne as inferCdnUrl,
5320
- Ga as useLumina
5326
+ Xa as useLumina
5321
5327
  };