@arcgis/lumina-compiler 5.0.0-next.65 → 5.0.0-next.67

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/dist/context/index.d.ts +9 -9
  2. package/dist/context/typeScript.d.ts +1 -1
  3. package/dist/dependencies/arcgisCore.d.ts +1 -1
  4. package/dist/dependencies/discover.d.ts +3 -3
  5. package/dist/dependencies/index.d.ts +1 -1
  6. package/dist/dependencies/loaders.d.ts +3 -3
  7. package/dist/dependencies/lumina.d.ts +2 -2
  8. package/dist/dependencies/stencil.d.ts +2 -2
  9. package/dist/dependencies/testSetupFiles.d.ts +1 -1
  10. package/dist/dependencies/updateLumina.d.ts +1 -1
  11. package/dist/docs/config.d.ts +1 -1
  12. package/dist/docs/index.d.ts +1 -1
  13. package/dist/docs/stencilDocsJson.d.ts +1 -1
  14. package/dist/docs/vsCodeCustomData/index.d.ts +1 -1
  15. package/dist/docs/vsCodeCustomData/utils.d.ts +1 -1
  16. package/dist/docs/webTypes/index.d.ts +1 -1
  17. package/dist/docs/webTypes/utils.d.ts +1 -1
  18. package/dist/entrypoints/addNonLazyImports.d.ts +1 -1
  19. package/dist/entrypoints/dtsUtils.d.ts +2 -2
  20. package/dist/entrypoints/findUtils.d.ts +1 -1
  21. package/dist/entrypoints/handleComponentImports.d.ts +1 -1
  22. package/dist/entrypoints/pathMapping.d.ts +1 -1
  23. package/dist/entrypoints/resolveTagName.d.ts +3 -3
  24. package/dist/extractor/LuminaApiExtractor.d.ts +3 -3
  25. package/dist/extractor/declaration.d.ts +1 -1
  26. package/dist/extractor/helpers/event.d.ts +1 -1
  27. package/dist/extractor/helpers/method.d.ts +1 -1
  28. package/dist/extractor/helpers/property.d.ts +1 -1
  29. package/dist/extractor/helpers/resolveType.d.ts +1 -1
  30. package/dist/extractor/index.d.ts +2 -2
  31. package/dist/frameworkTypes/index.d.ts +1 -1
  32. package/dist/frameworkTypes/utils.d.ts +1 -1
  33. package/dist/index.d.ts +10 -10
  34. package/dist/index.js +503 -458
  35. package/dist/jsxToLitHtml/autoAddNothing.d.ts +2 -2
  36. package/dist/jsxToLitHtml/comments.d.ts +2 -2
  37. package/dist/jsxToLitHtml/convertProps.d.ts +4 -4
  38. package/dist/jsxToLitHtml/imports.d.ts +4 -9
  39. package/dist/jsxToLitHtml/importsConfig.d.ts +8 -1
  40. package/dist/jsxToLitHtml/index.d.ts +1 -1
  41. package/dist/jsxToLitHtml/inferPropType.d.ts +1 -1
  42. package/dist/jsxToLitHtml/insertRepeatCall.d.ts +1 -1
  43. package/dist/jsxToLitHtml/jsxVisitor.d.ts +2 -2
  44. package/dist/jsxToLitHtml/templateParts.d.ts +1 -1
  45. package/dist/jsxToLitHtml/throwOnImportingExternalized.d.ts +1 -1
  46. package/dist/jsxToLitHtml/types.d.ts +2 -2
  47. package/dist/loader/css.d.ts +1 -1
  48. package/dist/loader/index.d.ts +1 -1
  49. package/dist/loader/lazy.d.ts +2 -2
  50. package/dist/plugins/buildCdn.d.ts +2 -2
  51. package/dist/plugins/buildWebApp.d.ts +1 -1
  52. package/dist/plugins/buildWrappers.d.ts +1 -1
  53. package/dist/plugins/configureVite.d.ts +2 -2
  54. package/dist/plugins/externalizeDependencies.d.ts +1 -1
  55. package/dist/plugins/handleDynamicAssets.d.ts +1 -1
  56. package/dist/plugins/handleStaticAssets.d.ts +1 -1
  57. package/dist/plugins/loadLitCss.d.ts +1 -1
  58. package/dist/plugins/printTotalBuildSize.d.ts +1 -1
  59. package/dist/plugins/provideAssets.d.ts +3 -3
  60. package/dist/plugins/setAssetsPath.d.ts +1 -1
  61. package/dist/plugins/updatePackageJson.d.ts +1 -1
  62. package/dist/publicTypes.d.ts +4 -4
  63. package/dist/puppeteerTesting/index.d.ts +7 -7
  64. package/dist/puppeteerTesting/index.js +2 -2
  65. package/dist/puppeteerTesting/puppeteer/element.d.ts +4 -4
  66. package/dist/puppeteerTesting/puppeteer/events.d.ts +2 -2
  67. package/dist/puppeteerTesting/puppeteer/page.d.ts +1 -1
  68. package/dist/puppeteerTesting/puppeteer/types.d.ts +2 -2
  69. package/dist/puppeteerTesting/vitest/types.d.ts +1 -1
  70. package/dist/testing/index.d.ts +4 -4
  71. package/dist/tests/utils.d.ts +2 -2
  72. package/dist/transformers/index.d.ts +1 -1
  73. package/dist/transformers/injectRuntimeOptions.d.ts +1 -1
  74. package/dist/transformers/members.d.ts +1 -1
  75. package/dist/transformers/property.d.ts +2 -2
  76. package/dist/transformers/propertyOptions.d.ts +2 -2
  77. package/dist/transformers/utils.d.ts +2 -2
  78. package/dist/types/astTransformers.d.ts +1 -1
  79. package/dist/types/hideInternalLitElement.d.ts +1 -1
  80. package/dist/types/index.d.ts +1 -1
  81. package/dist/types/liftSetterTypes.d.ts +1 -1
  82. package/dist/types/textTransformers.d.ts +1 -1
  83. package/dist/types/transformComponentMembers.d.ts +1 -1
  84. package/dist/useLumina.d.ts +1 -1
  85. package/package.json +5 -5
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { externalizeDependencies as as, path as u, toSystemPathSeparators as de, retrievePackageJson as R, fetchPackageLocation as Ai, asyncRetrievePackageJson as Li, existsAsync as U, findPath as cs, toPosixPathSeparators as De, isPosix as Ni, getCwd as Fi } from "@arcgis/components-build-utils";
1
+ import { externalizeDependencies as as, path as u, toSystemPathSeparators as de, retrievePackageJson as R, fetchPackageLocation as Ai, asyncRetrievePackageJson as Ni, existsAsync as U, findPath as cs, toPosixPathSeparators as De, isPosix as Li, getCwd as Fi } from "@arcgis/components-build-utils";
2
2
  import ls from "vite-plugin-dts";
3
3
  import o from "typescript";
4
4
  import { f as E, l as T } from "./logger-hJvg0JOj.js";
@@ -11,8 +11,8 @@ import { mappedFind as ve } from "@arcgis/toolkit/array";
11
11
  import { build as As } from "esbuild";
12
12
  import { identity as Ri } from "@arcgis/toolkit/function";
13
13
  import { Deferred as Oi } from "@arcgis/toolkit/promise";
14
- import { glob as Ls } from "glob";
15
- import Ns from "mime-types";
14
+ import { glob as Ns } from "glob";
15
+ import Ls from "mime-types";
16
16
  import { writeFileSync as Mi } from "node:fs";
17
17
  import Fs from "chalk";
18
18
  import { readFile as js } from "fs/promises";
@@ -492,7 +492,7 @@ function Vt(e, t, i) {
492
492
  const gr = /(?<=this.)[\w$]+/gu;
493
493
  function yr(e, t) {
494
494
  if (Ke(e, t), o.isPropertyDeclaration(e)) {
495
- const i = Le(e.modifiers);
495
+ const i = Ne(e.modifiers);
496
496
  if (i !== e.modifiers)
497
497
  return o.factory.updatePropertyDeclaration(
498
498
  e,
@@ -503,7 +503,7 @@ function yr(e, t) {
503
503
  e.initializer
504
504
  );
505
505
  } else if (o.isGetAccessor(e)) {
506
- const i = Le(e.modifiers);
506
+ const i = Ne(e.modifiers);
507
507
  if (i !== e.modifiers)
508
508
  return o.factory.updateGetAccessorDeclaration(
509
509
  e,
@@ -514,11 +514,11 @@ function yr(e, t) {
514
514
  e.body
515
515
  );
516
516
  } else if (o.isSetAccessor(e)) {
517
- const i = Le(e.modifiers);
517
+ const i = Ne(e.modifiers);
518
518
  if (i !== e.modifiers)
519
519
  return o.factory.updateSetAccessorDeclaration(e, i, e.name, e.parameters, e.body);
520
520
  } else if (o.isMethodDeclaration(e)) {
521
- const i = Le(e.modifiers);
521
+ const i = Ne(e.modifiers);
522
522
  if (i !== e.modifiers)
523
523
  return o.factory.updateMethodDeclaration(
524
524
  e,
@@ -537,7 +537,7 @@ function yr(e, t) {
537
537
  function Gt(e) {
538
538
  return e?.some((i) => i.kind === o.SyntaxKind.ReadonlyKeyword) ? e : [o.factory.createModifier(o.SyntaxKind.ReadonlyKeyword), ...e ?? []];
539
539
  }
540
- function Le(e) {
540
+ function Ne(e) {
541
541
  return e?.some((i) => i.kind === o.SyntaxKind.PrivateKeyword) ? e : [
542
542
  o.factory.createModifier(o.SyntaxKind.PrivateKeyword),
543
543
  ...(e ?? []).filter(
@@ -1797,7 +1797,7 @@ function kr(e) {
1797
1797
  }
1798
1798
  return e.trim().length === 0 ? t : e;
1799
1799
  }
1800
- const Ar = (e) => e.replaceAll("\\", "\\\\").replace(Lr, "\\${").replaceAll("`", "\\`"), Lr = /\$\{/gu, Nr = (e) => !Fr.test(e), Fr = /^[^\s"'=<>`]+$/u, jr = /[&<>]/gu, Dr = {
1800
+ const Ar = (e) => e.replaceAll("\\", "\\\\").replace(Nr, "\\${").replaceAll("`", "\\`"), Nr = /\$\{/gu, Lr = (e) => !Fr.test(e), Fr = /^[^\s"'=<>`]+$/u, jr = /[&<>]/gu, Dr = {
1801
1801
  "&": "&amp;",
1802
1802
  "<": "&lt;",
1803
1803
  ">": "&gt;"
@@ -1832,7 +1832,17 @@ const Or = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, Mr = /\n\s+\
1832
1832
  repeat: ["lit/directives/repeat.js", "lit-html/directives/repeat.js"],
1833
1833
  ref: ["lit/directives/ref.js", "lit-html/directives/ref.js"],
1834
1834
  nothing: ["lit", "@arcgis/lumina", "lit/html.js", "lit-html", "lit-element/lit-element.js"]
1835
- }, rn = /\.(?:css|s[ac]ss|less|styl(?:us)?|postcss|pcss|sss)(\\?|$)/u, fe = "@arcgis/lumina:loadLitCss", _e = "?litCss", ie = "?layeredLitCss", vt = "?globalFileLitCss", Ur = (e) => ({
1835
+ }, Ur = /* @__PURE__ */ new Set([
1836
+ "h",
1837
+ "Fragment",
1838
+ "state",
1839
+ "property",
1840
+ "method",
1841
+ "bindBooleanAttribute",
1842
+ "bindProperty",
1843
+ "bindEvent",
1844
+ "bindAttribute"
1845
+ ]), rn = /\.(?:css|s[ac]ss|less|styl(?:us)?|postcss|pcss|sss)(\\?|$)/u, fe = "@arcgis/lumina:loadLitCss", _e = "?litCss", ie = "?layeredLitCss", vt = "?globalFileLitCss", zr = (e) => ({
1836
1846
  name: fe,
1837
1847
  enforce: "pre",
1838
1848
  configResolved(t) {
@@ -1872,7 +1882,7 @@ const Or = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, Mr = /\n\s+\
1872
1882
  if (l && (a = a.slice(0, -vt.length)), !c && !d && !l)
1873
1883
  return await n.handler.call(this, r, a);
1874
1884
  const p = `${a}?inline`, f = await n.handler.call(this, r, p), { code: m, ...g } = typeof f == "string" ? { code: f } : f ?? {};
1875
- if (typeof m != "string" || !m.startsWith(on) || !m.endsWith(zr))
1885
+ if (typeof m != "string" || !m.startsWith(on) || !m.endsWith(qr))
1876
1886
  return T.warn(
1877
1887
  fe,
1878
1888
  `Expected vite:css-post to return a JS module with a string literal. Received: ${JSON.stringify(
@@ -1902,7 +1912,7 @@ const Or = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, Mr = /\n\s+\
1902
1912
  }
1903
1913
  return {
1904
1914
  ...g,
1905
- code: Xr(m, e.hmrEnabled, e.shouldMinify, d),
1915
+ code: Qr(m, e.hmrEnabled, e.shouldMinify, d),
1906
1916
  /**
1907
1917
  * Vite's original transform does not generate source maps for inlined
1908
1918
  * css, thus we can't either
@@ -1913,8 +1923,8 @@ const Or = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, Mr = /\n\s+\
1913
1923
  }
1914
1924
  };
1915
1925
  }
1916
- }), on = 'export default "', zr = '"', qr = `import { css } from '${ce.css[0]}';
1917
- export const styles = css\``, Vr = "`;\nexport default styles;", Gr = `
1926
+ }), on = 'export default "', qr = '"', Vr = `import { css } from '${ce.css[0]}';
1927
+ export const styles = css\``, Gr = "`;\nexport default styles;", Xr = `
1918
1928
 
1919
1929
  if(import.meta.hot) {
1920
1930
  import.meta.hot.data.styles ??= styles;
@@ -1926,23 +1936,23 @@ if(import.meta.hot) {
1926
1936
  import.meta.hot.data.styles.styleSheet.replaceSync(nextExports.styles.cssText);
1927
1937
  });
1928
1938
  }`, an = (e) => e.slice(on.length - 1);
1929
- function Xr(e, t, i, n) {
1939
+ function Qr(e, t, i, n) {
1930
1940
  const s = an(e), r = JSON.parse(s), a = Ar(r), c = n ? `@layer{${i ? "" : `
1931
1941
  `}${a}${i ? "" : `
1932
1942
  `}}` : a;
1933
- return `${qr}${c}${Vr}${t ? Gr : ""}`;
1943
+ return `${Vr}${c}${Gr}${t ? Xr : ""}`;
1934
1944
  }
1935
- function Qr(e) {
1936
- return `import("${Zr}").then(({ setCustomElementsManifest }) => {
1937
- setCustomElementsManifest(${Yr(e)});
1945
+ function Zr(e) {
1946
+ return `import("${Yr}").then(({ setCustomElementsManifest }) => {
1947
+ setCustomElementsManifest(${eo(e)});
1938
1948
  });`;
1939
1949
  }
1940
- const Zr = "@storybook/web-components", Yr = (e) => `JSON.parse(\`${eo(JSON.stringify(JSON.stringify(e)).slice(1, -1))}\`)`;
1941
- function eo(e) {
1950
+ const Yr = "@storybook/web-components", eo = (e) => `JSON.parse(\`${to(JSON.stringify(JSON.stringify(e)).slice(1, -1))}\`)`;
1951
+ function to(e) {
1942
1952
  return e.replaceAll('\\"', '"').replaceAll("`", "\\`").replaceAll("${", "\\${");
1943
1953
  }
1944
- function to(e) {
1945
- io(e);
1954
+ function io(e) {
1955
+ no(e);
1946
1956
  const t = e.options.css?.globalStylesPath;
1947
1957
  if (t === void 0)
1948
1958
  return "";
@@ -1955,7 +1965,7 @@ function to(e) {
1955
1965
  `) : `import "${i}${vt}";`;
1956
1966
  }
1957
1967
  const cn = "hydrated";
1958
- function io(e) {
1968
+ function no(e) {
1959
1969
  e._globalHydratedCssString = [
1960
1970
  ":not([",
1961
1971
  e.options.css?.hydratedAttribute ?? cn,
@@ -1972,42 +1982,42 @@ function ln(e, t) {
1972
1982
  ].join(`
1973
1983
  `);
1974
1984
  }
1975
- const no = (e) => `@layer{${e.shouldMinify ? "" : `
1985
+ const so = (e) => `@layer{${e.shouldMinify ? "" : `
1976
1986
  `}${e._globalHydratedCssString}${e.shouldMinify ? "" : `
1977
1987
 
1978
1988
  `}${e._globalCssString ? JSON.parse(e._globalCssString) : ""}${e.shouldMinify ? "" : `
1979
1989
  `}}`;
1980
- function so(e) {
1990
+ function ro(e) {
1981
1991
  const t = [], i = [];
1982
1992
  for (const n of e.privateApiJson.modules) {
1983
1993
  t.push(n.sourcePath);
1984
1994
  for (const s of n.declarations)
1985
- "customElement" in s && i.push(oo(s, e, n.sourcePath));
1995
+ "customElement" in s && i.push(ao(s, e, n.sourcePath));
1986
1996
  }
1987
1997
  return [
1988
- 'import { runtime } from "./runtime";',
1998
+ 'import { runtime } from "./runtime.ts";',
1989
1999
  'import { makeDefineCustomElements } from "@arcgis/lumina";',
1990
- to(e),
1991
- e.hmrEnabled ? co : "",
2000
+ io(e),
2001
+ e.hmrEnabled ? lo : "",
1992
2002
  "",
1993
- e.isInStorybook ? Qr(e.apiJson) : "",
2003
+ e.isInStorybook ? Zr(e.apiJson) : "",
1994
2004
  "",
1995
2005
  "export const defineCustomElements = makeDefineCustomElements(runtime, {",
1996
2006
  i.join(`,
1997
2007
  `),
1998
2008
  "});",
1999
- e.hmrEnabled ? lo(t) : ""
2009
+ e.hmrEnabled ? po(t) : ""
2000
2010
  ].join(`
2001
2011
  `);
2002
2012
  }
2003
- const ro = `import "./index";
2004
- export declare const defineCustomElements: import("@arcgis/lumina").DefineCustomElements;`, oo = (e, t, i) => [
2013
+ const oo = `import "./index.js";
2014
+ export declare const defineCustomElements: import("@arcgis/lumina").DefineCustomElements;`, ao = (e, t, i) => [
2005
2015
  ` "${e.tagName}": [`,
2006
2016
  `()=>import("${u.join(t.dir.root, i)}"),`,
2007
- ao(e),
2017
+ co(e),
2008
2018
  "]"
2009
2019
  ].join("");
2010
- function ao(e) {
2020
+ function co(e) {
2011
2021
  const { properties: t, asyncMethods: i, syncMethods: n } = dn(e), s = t.map((p) => p.join(bs)).join(it), r = i.join(it), a = n.join(it), c = [s, r, a], d = c.findLastIndex((p) => p.length > 0), l = c.slice(0, d + 1);
2012
2022
  return l.length > 0 ? `"${l.join(Ss)}"` : "";
2013
2023
  }
@@ -2024,8 +2034,8 @@ function dn(e) {
2024
2034
  }
2025
2035
  return { tagName: e.tagName, properties: t, asyncMethods: i, syncMethods: n };
2026
2036
  }
2027
- const co = `import { handleHmrUpdate, handleComponentMetaUpdate } from "@arcgis/lumina/hmrSupport";
2028
- `, lo = (e) => `
2037
+ const lo = `import { handleHmrUpdate, handleComponentMetaUpdate } from "@arcgis/lumina/hmrSupport";
2038
+ `, po = (e) => `
2029
2039
  if(import.meta.hot) {
2030
2040
  import.meta.hot.on("component-meta-update", handleComponentMetaUpdate);
2031
2041
  import.meta.hot.accept([
@@ -2050,25 +2060,25 @@ ${e.map((t) => ` "/${t}",`).join(`
2050
2060
  function we(e, t) {
2051
2061
  if (!e.startsWith(t) || !e.endsWith(".tsx"))
2052
2062
  return !1;
2053
- const [i, n] = e.slice(0, -4).split(u.sep).slice(po);
2063
+ const [i, n] = e.slice(0, -4).split(u.sep).slice(mo);
2054
2064
  return i === n;
2055
2065
  }
2056
- const po = -2;
2066
+ const mo = -2;
2057
2067
  function Zt(e) {
2058
2068
  const t = o.isUnionTypeNode(e) ? e.types.map(Yt) : [Yt(e)], i = new Set(t), n = i.delete("true"), s = i.delete("false");
2059
2069
  (n || s) && i.add("boolean");
2060
2070
  let r = Array.from(i).sort();
2061
- if (r.length > 1 && (r = r.map((a) => a.includes("=>") ? `(${a})` : a)), !(r.length > mo))
2062
- return r.map(go);
2071
+ if (r.length > 1 && (r = r.map((a) => a.includes("=>") ? `(${a})` : a)), !(r.length > uo))
2072
+ return r.map(yo);
2063
2073
  }
2064
- const mo = 40, uo = (e) => e?.some(
2074
+ const uo = 40, fo = (e) => e?.some(
2065
2075
  (t) => t.type === "number" || t.type === "boolean" || t.type === "string" || /**
2066
2076
  * Treat "any" as possibly literal, but not "unknown". Matches Stencil
2067
2077
  * behavior.
2068
2078
  */
2069
2079
  t.type === "any"
2070
- ) ?? !1, fo = (e) => e.length === 1 && e[0].type !== "string" && e[0].type !== "number" && e[0].type !== "boolean" && e[0].type !== "any" ? void 0 : e, mn = (e) => e.map(un).join(" | "), un = (e) => e.type === "string" && e.value !== void 0 ? `"${e.value}"` : e.value ?? e.type;
2071
- function go(e) {
2080
+ ) ?? !1, go = (e) => e.length === 1 && e[0].type !== "string" && e[0].type !== "number" && e[0].type !== "boolean" && e[0].type !== "any" ? void 0 : e, mn = (e) => e.map(un).join(" | "), un = (e) => e.type === "string" && e.value !== void 0 ? `"${e.value}"` : e.value ?? e.type;
2081
+ function yo(e) {
2072
2082
  return e === "boolean" ? { type: "boolean" } : Number.isNaN(Number.parseFloat(e)) ? e.startsWith('"') || e.startsWith("'") ? {
2073
2083
  value: e.slice(1, -1),
2074
2084
  type: "string"
@@ -2082,7 +2092,7 @@ function go(e) {
2082
2092
  function He(e, t, i, n, s = !1) {
2083
2093
  let { typeNode: r, references: a } = ti(e, t, i, n), c = Zt(r);
2084
2094
  c === void 0 && ({ typeNode: r, references: a } = ti(e, t, i, n, !1), c = Zt(r) ?? []);
2085
- const d = s ? c.filter((m) => m.type !== "null" && m.type !== "undefined") : c, l = mn(d), p = fo(d), f = ds(a, l);
2095
+ const d = s ? c.filter((m) => m.type !== "null" && m.type !== "undefined") : c, l = mn(d), p = go(d), f = ds(a, l);
2086
2096
  return {
2087
2097
  text: l,
2088
2098
  references: f,
@@ -2090,21 +2100,21 @@ function He(e, t, i, n, s = !1) {
2090
2100
  };
2091
2101
  }
2092
2102
  function Yt(e) {
2093
- yo.writeNode(o.EmitHint.Unspecified, e, void 0, rt);
2103
+ ho.writeNode(o.EmitHint.Unspecified, e, void 0, rt);
2094
2104
  const t = rt.getText();
2095
2105
  return rt.clear(), t;
2096
2106
  }
2097
- const yo = ji({ removeComments: !0 }), rt = Re.createTextWriter(`
2098
- `), fn = o.TypeFormatFlags.NoTruncation | o.TypeFormatFlags.WriteArrayAsGenericType | o.TypeFormatFlags.SuppressAnyReturnType | o.TypeFormatFlags.MultilineObjectLiterals, ho = fn & o.TypeFormatFlags.NodeBuilderFlagsMask, vo = ho | o.NodeBuilderFlags.IgnoreErrors | o.NodeBuilderFlags.NoTruncation;
2099
- function bo(e, t, i, n = !0) {
2107
+ const ho = ji({ removeComments: !0 }), rt = Re.createTextWriter(`
2108
+ `), fn = o.TypeFormatFlags.NoTruncation | o.TypeFormatFlags.WriteArrayAsGenericType | o.TypeFormatFlags.SuppressAnyReturnType | o.TypeFormatFlags.MultilineObjectLiterals, vo = fn & o.TypeFormatFlags.NodeBuilderFlagsMask, bo = vo | o.NodeBuilderFlags.IgnoreErrors | o.NodeBuilderFlags.NoTruncation;
2109
+ function So(e, t, i, n = !0) {
2100
2110
  const s = /* @__PURE__ */ new Map();
2101
2111
  oe(t, s, i, n);
2102
2112
  const r = t.flags & o.TypeFlags.Union ? t.types.every(ei) : ei(t), a = e.typeToTypeNode(
2103
2113
  t,
2104
2114
  void 0,
2105
- vo & (r ? ~o.TypeFormatFlags.MultilineObjectLiterals : -1)
2115
+ bo & (r ? ~o.TypeFormatFlags.MultilineObjectLiterals : -1)
2106
2116
  );
2107
- return s.forEach(So), a === void 0 ? (T.warn("@arcgis/lumina", "Unexpected case: Failed to convert type to type node."), o.factory.createTypeReferenceNode(o.factory.createIdentifier("unknown"), void 0)) : a;
2117
+ return s.forEach(wo), a === void 0 ? (T.warn("@arcgis/lumina", "Unexpected case: Failed to convert type to type node."), o.factory.createTypeReferenceNode(o.factory.createIdentifier("unknown"), void 0)) : a;
2108
2118
  }
2109
2119
  const ei = (e) => e.flags & o.TypeFlags.Object ? e.getProperties().length === 1 : !!(e.flags & o.TypeFlags.PossiblyFalsy);
2110
2120
  function ti(e, t, i, n, s = !0) {
@@ -2136,10 +2146,10 @@ function ti(e, t, i, n, s = !0) {
2136
2146
  name: m,
2137
2147
  package: void 0,
2138
2148
  module: "index.js"
2139
- } : wo(f, m, i, n);
2149
+ } : To(f, m, i, n);
2140
2150
  r.push(g), a.add(m);
2141
2151
  }
2142
- return { typeNode: bo(e, t, c, s), references: r };
2152
+ return { typeNode: So(e, t, c, s), references: r };
2143
2153
  }
2144
2154
  function oe(e, t, i, n = !0) {
2145
2155
  if (typeof e != "object" || e === null || !("checker" in e))
@@ -2169,10 +2179,10 @@ function oe(e, t, i, n = !0) {
2169
2179
  c !== "resolvedBaseConstructorType" && c !== "resolvedBaseTypes" && c !== "typeParameters" && c !== "typeParameter" && (Array.isArray(d) ? d.forEach((l) => oe(l, t, i, n)) : oe(d, t, i, n));
2170
2180
  });
2171
2181
  }
2172
- function So(e, t) {
2182
+ function wo(e, t) {
2173
2183
  e.origin !== void 0 && (t.origin = e.origin), e.aliasSymbol !== void 0 && (t.aliasSymbol = e.aliasSymbol), e.aliasTypeArguments !== void 0 && (t.aliasTypeArguments = e.aliasTypeArguments);
2174
2184
  }
2175
- function wo(e, t, i, n) {
2185
+ function To(e, t, i, n) {
2176
2186
  const s = e?.declarations?.map((c) => c.getSourceFile()) ?? [];
2177
2187
  if (s.length === 0) {
2178
2188
  if (t === "Array")
@@ -2193,7 +2203,7 @@ function wo(e, t, i, n) {
2193
2203
  package: Di,
2194
2204
  module: void 0
2195
2205
  };
2196
- const { packageName: r, moduleName: a } = To(s[0].fileName, n);
2206
+ const { packageName: r, moduleName: a } = Eo(s[0].fileName, n);
2197
2207
  return r ? {
2198
2208
  name: t,
2199
2209
  package: r,
@@ -2205,7 +2215,7 @@ function wo(e, t, i, n) {
2205
2215
  module: a
2206
2216
  };
2207
2217
  }
2208
- function To(e, t) {
2218
+ function Eo(e, t) {
2209
2219
  const i = e.split("/node_modules/");
2210
2220
  if (i.length > 1) {
2211
2221
  const a = i.at(-1);
@@ -2218,18 +2228,18 @@ function To(e, t) {
2218
2228
  }
2219
2229
  return {
2220
2230
  packageName: void 0,
2221
- moduleName: u.relative(t.root, Co(Eo(e, t)))
2231
+ moduleName: u.relative(t.root, $o(Co(e, t)))
2222
2232
  };
2223
2233
  }
2224
- function Eo(e, t) {
2234
+ function Co(e, t) {
2225
2235
  return we(e, t.srcComponents) ? u.join(t.dist, pn(e, t.src)) : e.startsWith(t.src) ? u.join(t.dist, e.slice(t.src.length)) : e;
2226
2236
  }
2227
- const Co = (e) => e.endsWith(".js") || e.endsWith(".d.ts") ? e : `${e.endsWith(".ts") ? e.slice(0, -3) : e.endsWith(".tsx") ? e.slice(0, -4) : e}.d.ts`;
2237
+ const $o = (e) => e.endsWith(".js") || e.endsWith(".d.ts") ? e : `${e.endsWith(".ts") ? e.slice(0, -3) : e.endsWith(".tsx") ? e.slice(0, -4) : e}.d.ts`;
2228
2238
  function gn(e) {
2229
2239
  const t = e.split("/"), n = e[0].startsWith("@") ? 2 : 1, s = t.slice(0, n).join("/"), r = t.slice(n).join("/");
2230
2240
  return { packageName: s, moduleName: r };
2231
2241
  }
2232
- const $o = (e) => e.includes("/node_modules/") || e.includes("/dist/");
2242
+ const Po = (e) => e.includes("/node_modules/") || e.includes("/dist/");
2233
2243
  function ii(e, t, i) {
2234
2244
  const n = e.declarations;
2235
2245
  if (n !== void 0)
@@ -2243,7 +2253,7 @@ function ii(e, t, i) {
2243
2253
  for (const c of a) {
2244
2254
  const d = ni(c, t, i);
2245
2255
  if (d !== void 0)
2246
- return i === "core" && d.includes("#event-") ? d : Po(d);
2256
+ return i === "core" && d.includes("#event-") ? d : xo(d);
2247
2257
  }
2248
2258
  }
2249
2259
  }
@@ -2267,15 +2277,15 @@ function ni(e, t, i) {
2267
2277
  });
2268
2278
  });
2269
2279
  }
2270
- const Po = (e) => e.split("#")[0], xo = "@arcgis/lumina:addMethodMetadata";
2271
- function Io(e, t, i, n, s) {
2280
+ const xo = (e) => e.split("#")[0], Io = "@arcgis/lumina:addMethodMetadata";
2281
+ function ko(e, t, i, n, s) {
2272
2282
  const r = i.getSignatureFromDeclaration(e);
2273
2283
  if (r === void 0)
2274
2284
  return;
2275
2285
  for (const l of e.parameters) {
2276
2286
  if (!o.isIdentifier(l.name)) {
2277
2287
  T.warn(
2278
- xo,
2288
+ Io,
2279
2289
  `Object binding patterns are not yet supported in the docs. Found ${l.name?.getText(n)} in ${e.name.getText(n)}`,
2280
2290
  n.fileName
2281
2291
  );
@@ -2296,11 +2306,11 @@ function Io(e, t, i, n, s) {
2296
2306
  type: c
2297
2307
  }, t.signature = d.replace(" =>", ":");
2298
2308
  }
2299
- const ko = (e, t, i, n) => {
2309
+ const Ao = (e, t, i, n) => {
2300
2310
  const s = e.typeScriptTypeChecker, r = o.isSetAccessor(t) ? t.parameters[0] : t, a = s.getTypeAtLocation(r), c = !i;
2301
2311
  return He(s, a, n, e.dir, c);
2302
2312
  };
2303
- function Ao(e, t, i, n) {
2313
+ function No(e, t, i, n) {
2304
2314
  const s = i.typeScriptTypeChecker, a = s.getTypeAtLocation(e).getProperty("emit");
2305
2315
  if (a?.valueDeclaration === void 0)
2306
2316
  return;
@@ -2328,18 +2338,18 @@ function Ao(e, t, i, n) {
2328
2338
  return Ct(e.name, s, g), Lo(e, g, n), g.privacy === void 0 ? g : void 0;
2329
2339
  }
2330
2340
  }
2331
- const Ne = "createEvent";
2341
+ const Le = "createEvent";
2332
2342
  function Lo(e, t, i) {
2333
2343
  if (!e.initializer || !o.isCallExpression(e.initializer))
2334
2344
  return;
2335
2345
  const n = e.initializer;
2336
- if (!o.isIdentifier(n.expression) || n.expression.text !== Ne)
2346
+ if (!o.isIdentifier(n.expression) || n.expression.text !== Le)
2337
2347
  return;
2338
2348
  const s = n.arguments[0];
2339
2349
  if (s !== void 0) {
2340
2350
  if (!o.isObjectLiteralExpression(s)) {
2341
2351
  Z(
2342
- `Expected object literal expression as first argument of ${Ne}(). Found ${t.name} = createEvent(${s.getText(i)})`,
2352
+ `Expected object literal expression as first argument of ${Le}(). Found ${t.name} = createEvent(${s.getText(i)})`,
2343
2353
  {
2344
2354
  file: i,
2345
2355
  node: e
@@ -2349,7 +2359,7 @@ function Lo(e, t, i) {
2349
2359
  }
2350
2360
  if (s.properties.some((r) => o.isSpreadAssignment(r))) {
2351
2361
  Z(
2352
- `Unexpected spread syntax in ${Ne}() argument. ${Ne}() arguments must be statically parsable at compile time`,
2362
+ `Unexpected spread syntax in ${Le}() argument. ${Le}() arguments must be statically parsable at compile time`,
2353
2363
  {
2354
2364
  file: i,
2355
2365
  node: e
@@ -2361,14 +2371,16 @@ function Lo(e, t, i) {
2361
2371
  !o.isPropertyAssignment(r) || !o.isIdentifier(r.name) || (r.name.text === "cancelable" && !re(r.initializer, i) && (t.cancelable = !1), r.name.text === "bubbles" && !re(r.initializer, i) && (t.bubbles = !1), r.name.text === "composed" && !re(r.initializer, i) && (t.composed = !1));
2362
2372
  }
2363
2373
  }
2364
- const At = "@arcgis/lumina-compiler";
2374
+ const Fo = "@arcgis/lumina-compiler", At = {
2375
+ name: Fo
2376
+ };
2365
2377
  class Ue extends ps {
2366
2378
  constructor(t, i) {
2367
- super({ sortModules: t.isFullApiExtraction, cwd: t.dir.root, environment: t.environment }), this.context = t, this.isPatchOnly = i, this.localCssImports = void 0, this.localTagName = void 0, this.localClassName = void 0, this.pairedSetter = void 0, this.apiComponent = void 0, this.indexedComponents = /* @__PURE__ */ new Map(), this.moduleName = "", this.resolveJsDocLink = Oo(this), this.copyDocDefinitions = t.options.documentation?.copyDefinitions ?? {};
2379
+ super({ sortModules: t.isFullApiExtraction, cwd: t.dir.root, environment: t.environment }), this.localCssImports = void 0, this.localTagName = void 0, this.localClassName = void 0, this.pairedSetter = void 0, this.apiComponent = void 0, this.indexedComponents = /* @__PURE__ */ new Map(), this.moduleName = "", this.resolveJsDocLink = Jo(this), this.context = t, this.isPatchOnly = i, this.copyDocDefinitions = t.options.documentation?.copyDefinitions ?? {};
2368
2380
  }
2369
2381
  extract(t) {
2370
2382
  const i = super.extract(t);
2371
- return i.compiler.name = At, i;
2383
+ return i.compiler.name = At.name, i;
2372
2384
  }
2373
2385
  extractModules(t) {
2374
2386
  const i = super.extractModules(t);
@@ -2376,7 +2388,7 @@ class Ue extends ps {
2376
2388
  for (const n of i) {
2377
2389
  this.moduleName = n.path;
2378
2390
  for (const s of n.declarations)
2379
- "customElement" in s && (this.apiComponent = s, this.context.isFullApiExtraction && Ro(s, this), this.inheritMembers(n.path, s, i), this.context.isFullApiExtraction && (s.members.sort(tt), s.attributes?.sort(tt), s.events?.sort(tt)));
2391
+ "customElement" in s && (this.apiComponent = s, this.context.isFullApiExtraction && Mo(s, this), this.inheritMembers(n.path, s, i), this.context.isFullApiExtraction && (s.members.sort(tt), s.attributes?.sort(tt), s.events?.sort(tt)));
2380
2392
  }
2381
2393
  return i;
2382
2394
  }
@@ -2562,13 +2574,13 @@ console.log("${s.tagName} is ready to go!");
2562
2574
  inheritedFrom: void 0,
2563
2575
  privacy: void 0
2564
2576
  };
2565
- return this.context.isFullApiExtraction && (this.extractComponentFieldDetails(t, d), (r === void 0 && (d.type.values === void 0 || !uo(d.type.values)) || d.readonly && !d.reflects) && (d.attribute = void 0)), d;
2577
+ return this.context.isFullApiExtraction && (this.extractComponentFieldDetails(t, d), (r === void 0 && (d.type.values === void 0 || !fo(d.type.values)) || d.readonly && !d.reflects) && (d.attribute = void 0)), d;
2566
2578
  }
2567
2579
  /**
2568
2580
  * Based on a `non-@property()` property, extract a public event if it is one.
2569
2581
  */
2570
2582
  extractComponentEvent(t, i) {
2571
- const n = Ao(t, i, this.context, this.file);
2583
+ const n = No(t, i, this.context, this.file);
2572
2584
  return n !== void 0 && this.copyDoc(t, this.copyDocDefinitions.events, n, this.apiComponent, this.apiModule), n;
2573
2585
  }
2574
2586
  /**
@@ -2585,7 +2597,7 @@ console.log("${s.tagName} is ready to go!");
2585
2597
  // in the documentation. The full type is still present in the .d.ts files.
2586
2598
  i.name === "messageOverrides" ? {
2587
2599
  text: "Record<string, unknown>"
2588
- } : ko(this.context, l, m, this.file);
2600
+ } : Ao(this.context, l, m, this.file);
2589
2601
  const g = o.isPropertyDeclaration(t) && t.type !== void 0 && t.initializer !== void 0 && o.isPropertyAccessExpression(t.initializer) && o.isPropertyAccessExpression(t.initializer.expression) && t.initializer.expression.expression.kind === o.SyntaxKind.ThisKeyword && o.isIdentifier(t.initializer.expression.name) && o.isIdentifier(t.initializer.name);
2590
2602
  if ("initializer" in t && t.initializer !== void 0 && (!i.default || !i.description) || g) {
2591
2603
  const h = t.initializer, v = s.getSymbolAtLocation(h), b = v !== void 0 && ((v.flags ?? 0) & o.SymbolFlags.Alias) !== 0 ? s.getAliasedSymbol(v) : v, w = b?.getDeclarations() ?? [];
@@ -2638,7 +2650,7 @@ console.log("${s.tagName} is ready to go!");
2638
2650
  description: void 0,
2639
2651
  deprecated: void 0,
2640
2652
  parameters: [],
2641
- return: n ? Fo : No,
2653
+ return: n ? Do : jo,
2642
2654
  inheritedFrom: void 0,
2643
2655
  docsTags: void 0,
2644
2656
  signature: "",
@@ -2646,7 +2658,7 @@ console.log("${s.tagName} is ready to go!");
2646
2658
  };
2647
2659
  if (this.context.isFullApiExtraction) {
2648
2660
  const r = this.context.typeScriptTypeChecker;
2649
- Io(t, s, r, this.file, this.context.dir), n && !Ui(s) && Z("Public method marked as async must have a Promise<SomeType> return type annotation.", {
2661
+ ko(t, s, r, this.file, this.context.dir), n && !Ui(s) && Z("Public method marked as async must have a Promise<SomeType> return type annotation.", {
2650
2662
  file: this.file,
2651
2663
  node: t
2652
2664
  }), this.copyDoc(t, this.copyDocDefinitions.methods, s, this.apiComponent, this.apiModule);
@@ -2707,17 +2719,17 @@ console.log("${s.tagName} is ready to go!");
2707
2719
  const ot = {
2708
2720
  name: "LitElement",
2709
2721
  package: "@arcgis/lumina"
2710
- }, No = { type: { text: "unknown" } }, Fo = { type: { text: "Promise<unknown>" } };
2711
- async function jo(e, t) {
2722
+ }, jo = { type: { text: "unknown" } }, Do = { type: { text: "Promise<unknown>" } };
2723
+ async function Ro(e, t) {
2712
2724
  t && (e.componentFilesPromise = We(e, e.dir.srcComponents));
2713
- const i = await e.componentFilesPromise, n = await Ho(e, i);
2725
+ const i = await e.componentFilesPromise, n = await zo(e, i);
2714
2726
  await e.componentStoriesPromise, e._componentPathMapping = /* @__PURE__ */ Object.create(null), e._localDefinedComponents = void 0;
2715
2727
  const s = yn(n, e, !1);
2716
2728
  e.privateApiJson = s;
2717
2729
  const [r, a] = hn(s);
2718
2730
  return e.apiJsonComponents = a, e.apiJson = r, e._htmlElementReferencesReplacer = void 0, s;
2719
2731
  }
2720
- function Do(e, t, i) {
2732
+ function Oo(e, t, i) {
2721
2733
  const n = e.getSourceFile(t, i), s = yn([n], e, !0), r = s.modules[0];
2722
2734
  {
2723
2735
  const m = hn(s)[0].modules[0], g = e.apiJson.modules.findIndex((v) => v.path === m.path), y = e.apiJson.modules[g], h = Array.from(e.apiJson.modules);
@@ -2762,7 +2774,7 @@ function hn(e) {
2762
2774
  }
2763
2775
  return [t, i];
2764
2776
  }
2765
- function Ro(e, t) {
2777
+ function Mo(e, t) {
2766
2778
  M(e, t);
2767
2779
  for (const i of e.members) {
2768
2780
  if (i.kind === "field")
@@ -2798,12 +2810,12 @@ function Ro(e, t) {
2798
2810
  M(i, t);
2799
2811
  }
2800
2812
  function Fe(e, t) {
2801
- e !== void 0 && (e.references?.reduce((i, n) => Mo(n, t, i), 0), e.text = e.text.replaceAll(
2802
- Wo,
2803
- (i, n) => Lt(t.indexedComponents.get(n)) ?? i
2804
- ), e.values?.forEach(Jo, t.indexedComponents));
2813
+ e !== void 0 && (e.references?.reduce((i, n) => Ko(n, t, i), 0), e.text = e.text.replaceAll(
2814
+ Uo,
2815
+ (i, n) => Nt(t.indexedComponents.get(n)) ?? i
2816
+ ), e.values?.forEach(Bo, t.indexedComponents));
2805
2817
  }
2806
- const Oo = (e) => (t, i) => {
2818
+ const Jo = (e) => (t, i) => {
2807
2819
  let n = i.indexOf(" ");
2808
2820
  n === -1 && (n = i.length);
2809
2821
  const s = i.slice(0, n), r = i.slice(n + 1);
@@ -2838,7 +2850,7 @@ const Oo = (e) => (t, i) => {
2838
2850
  const f = d === e.apiComponent;
2839
2851
  return `[${r || (f ? c : `${d.tagName}.${c}`)}](${l}#${c})`;
2840
2852
  };
2841
- function Mo(e, t, i) {
2853
+ function Ko(e, t, i) {
2842
2854
  if (e.viewUrl !== void 0 && (e.viewUrl = e.viewUrl.replace(
2843
2855
  t.alternativeDocumentationHost,
2844
2856
  t.normalizedDocumentationHost
@@ -2850,18 +2862,18 @@ function Mo(e, t, i) {
2850
2862
  const n = t.indexedComponents.get(e.name);
2851
2863
  if (n !== void 0) {
2852
2864
  const s = e.name.length;
2853
- e.name = Lt(n);
2865
+ e.name = Nt(n);
2854
2866
  const r = e.name.length - s - si;
2855
- e.viewUrl = n.demos?.at(0)?.url.replace(t.alternativeDocumentationHost, t.normalizedDocumentationHost), e.start = e.start - si, e.end = e.end + r, i += r - _o;
2867
+ e.viewUrl = n.demos?.at(0)?.url.replace(t.alternativeDocumentationHost, t.normalizedDocumentationHost), e.start = e.start - si, e.end = e.end + r, i += r - Ho;
2856
2868
  }
2857
2869
  }
2858
2870
  return i;
2859
2871
  }
2860
- function Jo(e) {
2861
- e.type.startsWith("ToElement<") && (e.type = Lt(this.get(e.type.slice(10, -1))) ?? e.type);
2872
+ function Bo(e) {
2873
+ e.type.startsWith("ToElement<") && (e.type = Nt(this.get(e.type.slice(10, -1))) ?? e.type);
2862
2874
  }
2863
- const Lt = (e) => e ? `HTML${e.pascalCaseName}Element` : void 0, Ko = "ToElement<", si = Ko.length, Bo = ">", _o = Bo.length, Wo = /ToElement<(\w+)>/gu;
2864
- async function Ho(e, t) {
2875
+ const Nt = (e) => e ? `HTML${e.pascalCaseName}Element` : void 0, _o = "ToElement<", si = _o.length, Wo = ">", Ho = Wo.length, Uo = /ToElement<(\w+)>/gu;
2876
+ async function zo(e, t) {
2865
2877
  if (e.viteCommand === "serve" && (Object.hasOwn(e, "typeScriptHost") || (e.typeScriptHost = o.createCompilerHost(e.typeScriptConfig, !1))), e.typeScriptProgram !== void 0) {
2866
2878
  const i = e.typeScriptProgram.getSourceFiles(), n = new Set(t);
2867
2879
  return i.filter((s) => n.has(s.fileName));
@@ -2874,9 +2886,9 @@ async function Ho(e, t) {
2874
2886
  );
2875
2887
  }
2876
2888
  async function vn(e, t) {
2877
- return le ??= zo(e, t), await le;
2889
+ return le ??= Vo(e, t), await le;
2878
2890
  }
2879
- function Uo() {
2891
+ function qo() {
2880
2892
  if (ze === void 0)
2881
2893
  throw Error(
2882
2894
  E(
@@ -2896,9 +2908,9 @@ function bn() {
2896
2908
  );
2897
2909
  return bt;
2898
2910
  }
2899
- async function zo(e, t) {
2911
+ async function Vo(e, t) {
2900
2912
  const i = R(e), n = i.dependencies ?? {}, s = i.peerDependencies ?? {}, a = (await Promise.all(
2901
- [...Object.keys(n), ...Object.keys(s)].filter((l) => !qo.has(l)).flatMap(async (l) => await Sn(l, e))
2913
+ [...Object.keys(n), ...Object.keys(s)].filter((l) => !Go.has(l)).flatMap(async (l) => await Sn(l, e))
2902
2914
  )).filter(j);
2903
2915
  ze ??= a, bt = Object.fromEntries(a.flatMap((l) => Object.entries(l.components)));
2904
2916
  const c = t?.serve?.extraDependencies?.map(
@@ -2906,7 +2918,7 @@ async function zo(e, t) {
2906
2918
  ), d = c === void 0 ? a : a.filter((l) => !c.includes(l.packageName));
2907
2919
  return ze ??= d, d;
2908
2920
  }
2909
- const qo = /* @__PURE__ */ new Set([
2921
+ const Go = /* @__PURE__ */ new Set([
2910
2922
  "@arcgis/arcade-languageservice",
2911
2923
  "@arcgis/components-build-utils",
2912
2924
  "@arcgis/toolkit",
@@ -2944,11 +2956,11 @@ const qo = /* @__PURE__ */ new Set([
2944
2956
  ]);
2945
2957
  let ze, bt, le;
2946
2958
  async function Sn(e, t) {
2947
- const i = await Ai(e, t), n = await Li(i), s = "exports" in n, r = Yo.bind(void 0, s), a = "@stencil/core" in (n.dependencies ?? {}) || "@stencil/core" in (n.devDependencies ?? {}), c = u.join(i, "dist/esm/loader.js");
2959
+ const i = await Ai(e, t), n = await Ni(i), s = "exports" in n, r = oa.bind(void 0, s), a = "@stencil/core" in (n.dependencies ?? {}) || "@stencil/core" in (n.devDependencies ?? {}), c = u.join(i, "dist/esm/loader.js");
2948
2960
  if (a ? await U(c) : !1) {
2949
- const g = await B(c, "utf8"), y = Vo(g, "bootstrapLazy("), h = g.indexOf(", options", y), v = g.slice(y, h), b = v.startsWith('JSON.parse("') ? v.slice(12, -2).replaceAll('\\"', '"') : v;
2961
+ const g = await B(c, "utf8"), y = Xo(g, "bootstrapLazy("), h = g.indexOf(", options", y), v = g.slice(y, h), b = v.startsWith('JSON.parse("') ? v.slice(12, -2).replaceAll('\\"', '"') : v;
2950
2962
  try {
2951
- const w = JSON.parse(b), I = Qo(w, { packageName: e, getImportPath: r });
2963
+ const w = JSON.parse(b), I = sa(w, { packageName: e, getImportPath: r });
2952
2964
  return { packageName: e, type: "stencil", components: I, packageLocation: i, packageJson: n };
2953
2965
  } catch (w) {
2954
2966
  T.warn("@arcgis/lumina", `Failed to parse dist/esm/loader.js for ${e}.
@@ -2957,7 +2969,7 @@ Error: ${String(w)}`);
2957
2969
  }
2958
2970
  const l = ri(n.customElements);
2959
2971
  if (l != null) {
2960
- const g = u.join(i, l), y = JSON.parse(await B(g, "utf-8")), h = Go(y), v = wn(y, {
2972
+ const g = u.join(i, l), y = JSON.parse(await B(g, "utf-8")), h = Qo(y), v = wn(y, {
2961
2973
  packageName: e,
2962
2974
  getImportPath: r
2963
2975
  });
@@ -2965,7 +2977,7 @@ Error: ${String(w)}`);
2965
2977
  }
2966
2978
  const p = ri(n["web-types"]);
2967
2979
  if (p != null) {
2968
- const g = u.join(i, p), y = JSON.parse(await B(g, "utf-8")), h = Xo(y, {
2980
+ const g = u.join(i, p), y = JSON.parse(await B(g, "utf-8")), h = Zo(y, {
2969
2981
  packageName: e,
2970
2982
  getImportPath: r,
2971
2983
  packageRoot: i
@@ -2974,7 +2986,7 @@ Error: ${String(w)}`);
2974
2986
  }
2975
2987
  const f = u.join(i, "dist/components");
2976
2988
  if (await U(f)) {
2977
- const g = await Zo(f, {
2989
+ const g = await ra(f, {
2978
2990
  packageName: e,
2979
2991
  getImportPath: r
2980
2992
  });
@@ -2982,7 +2994,7 @@ Error: ${String(w)}`);
2982
2994
  }
2983
2995
  }
2984
2996
  const ri = (e) => Array.isArray(e) ? e[0] : e;
2985
- function Vo(e, t) {
2997
+ function Xo(e, t) {
2986
2998
  const i = e.indexOf(t);
2987
2999
  return i === -1 ? -1 : i + t.length;
2988
3000
  }
@@ -3023,7 +3035,7 @@ function wn(e, t, i = !1) {
3023
3035
  }
3024
3036
  return n;
3025
3037
  }
3026
- const Go = (e) => e.compiler?.name === At, Xo = (e, t) => Object.fromEntries(
3038
+ const Qo = (e) => e.compiler?.name === At.name, Zo = (e, t) => Object.fromEntries(
3027
3039
  (e.contributions?.html?.elements ?? e.contributions?.html?.tags)?.map(
3028
3040
  (i) => [
3029
3041
  i.name,
@@ -3034,7 +3046,7 @@ const Go = (e) => e.compiler?.name === At, Xo = (e, t) => Object.fromEntries(
3034
3046
  }
3035
3047
  ]
3036
3048
  ) ?? []
3037
- ), Qo = (e, t) => Object.fromEntries(
3049
+ ), Yo = 1, ea = 2, ta = 4, ia = 8, na = Yo | ea | ta | ia, sa = (e, t) => Object.fromEntries(
3038
3050
  e.flatMap(
3039
3051
  ([i, n]) => n.map(
3040
3052
  ([s, r, a]) => [
@@ -3043,16 +3055,13 @@ const Go = (e) => e.compiler?.name === At, Xo = (e, t) => Object.fromEntries(
3043
3055
  packageName: t.packageName,
3044
3056
  moduleName: t.getImportPath(r),
3045
3057
  propToAttribute: Object.fromEntries(
3046
- Object.entries(a ?? {}).filter(
3047
- ([c, [d]]) => d & 15
3048
- /* HasAttribute */
3049
- ).map(([c, [d, l = c]]) => [c, l])
3058
+ Object.entries(a ?? {}).filter(([c, [d]]) => d & na).map(([c, [d, l = c]]) => [c, l])
3050
3059
  )
3051
3060
  }
3052
3061
  ]
3053
3062
  )
3054
3063
  )
3055
- ), Zo = async (e, t) => Object.fromEntries(
3064
+ ), ra = async (e, t) => Object.fromEntries(
3056
3065
  (await Ge(e)).filter((i) => i.endsWith(".d.ts")).map((i) => {
3057
3066
  const n = i.slice(0, -5);
3058
3067
  return [
@@ -3064,16 +3073,16 @@ const Go = (e) => e.compiler?.name === At, Xo = (e, t) => Object.fromEntries(
3064
3073
  }
3065
3074
  ];
3066
3075
  })
3067
- ), Yo = (e, t) => e ? `components/${t}` : `dist/components/${t}.js`, ea = (e) => e.startsWith("/") ? e : `/${e}`, Nt = (e, t) => `${e}@fs${ea(t)}`;
3076
+ ), oa = (e, t) => e ? `components/${t}` : `dist/components/${t}.js`, aa = (e) => e.startsWith("/") ? e : `/${e}`, Lt = (e, t) => `${e}@fs${aa(t)}`;
3068
3077
  function Xe(e = R(), t = !1, i = e.name === "@esri/calcite-components") {
3069
3078
  const n = e.version.includes("next"), s = e.name === "@esri/calcite-components";
3070
3079
  if (s && n)
3071
3080
  return `https://cdn.jsdelivr.net/npm/@esri/calcite-components@${e.version}/dist/calcite/`;
3072
- const r = t || n ? "jsdev.arcgis.com" : "js.arcgis.com", a = ta(e.name), c = ia(e.version, i);
3081
+ const r = t || n ? "jsdev.arcgis.com" : "js.arcgis.com", a = ca(e.name), c = la(e.version, i);
3073
3082
  return a.length === 0 ? `https://${r}/${c}/` : s ? `https://${r}/${a}/${c}/` : `https://${r}/${c}/${a}/`;
3074
3083
  }
3075
- const ta = (e) => e.split("/").pop() ?? e;
3076
- function ia(e, t) {
3084
+ const ca = (e) => e.split("/").pop() ?? e;
3085
+ function la(e, t) {
3077
3086
  if (/\d+\.\d+\.\d+-(?:.*)$/u.test(e))
3078
3087
  return "next";
3079
3088
  const n = /^(?<major>\d+)\.(?<minor>\d+)\.(?<patch>\d+)/u, s = e.match(n);
@@ -3102,14 +3111,14 @@ function se(e) {
3102
3111
  return (
3103
3112
  // Inlined string literal
3104
3113
  typeof e == "string" || // Syntax kinds that are never undefined
3105
- na.has(e.kind) || // Ternary with both branches never undefined
3114
+ da.has(e.kind) || // Ternary with both branches never undefined
3106
3115
  o.isConditionalExpression(e) && se(e.whenTrue) && se(e.whenFalse) || // Binary expression with operator that never results in undefined Or both sides are definitely not undefined
3107
- o.isBinaryExpression(e) && (sa.has(e.operatorToken.kind) || se(e.left) && se(e.right)) || // `as`, `satisfies`, `()` with definitely not undefined expression
3116
+ o.isBinaryExpression(e) && (pa.has(e.operatorToken.kind) || se(e.left) && se(e.right)) || // `as`, `satisfies`, `()` with definitely not undefined expression
3108
3117
  (o.isParenthesizedExpression(e) || o.isSatisfiesExpression(e) || o.isAsExpression(e)) && se(e.expression) || // JSX that got converted to html`<p>Something</p>`
3109
3118
  o.isTaggedTemplateExpression(e) && o.isIdentifier(e.tag) && Kr.has(e.tag.text)
3110
3119
  );
3111
3120
  }
3112
- const na = /* @__PURE__ */ new Set([
3121
+ const da = /* @__PURE__ */ new Set([
3113
3122
  o.SyntaxKind.NumericLiteral,
3114
3123
  o.SyntaxKind.BigIntLiteral,
3115
3124
  o.SyntaxKind.StringLiteral,
@@ -3128,7 +3137,7 @@ const na = /* @__PURE__ */ new Set([
3128
3137
  o.SyntaxKind.ClassExpression,
3129
3138
  // Trust? Trust.
3130
3139
  o.SyntaxKind.NonNullExpression
3131
- ]), sa = /* @__PURE__ */ new Set([
3140
+ ]), pa = /* @__PURE__ */ new Set([
3132
3141
  o.SyntaxKind.PlusEqualsToken,
3133
3142
  o.SyntaxKind.MinusEqualsToken,
3134
3143
  o.SyntaxKind.AsteriskAsteriskEqualsToken,
@@ -3163,9 +3172,9 @@ const na = /* @__PURE__ */ new Set([
3163
3172
  o.SyntaxKind.SlashToken,
3164
3173
  o.SyntaxKind.PercentToken,
3165
3174
  o.SyntaxKind.AsteriskAsteriskToken
3166
- ]), ra = {
3175
+ ]), ma = {
3167
3176
  property(e, t, i, n) {
3168
- const s = oa(n, i, e), r = s?.type === "stringifiedReflected", a = s?.type === "reflected" || r;
3177
+ const s = ua(n, i, e), r = s?.type === "stringifiedReflected", a = s?.type === "reflected" || r;
3169
3178
  if (a) {
3170
3179
  const m = ct(t);
3171
3180
  if (m === !0)
@@ -3182,7 +3191,7 @@ const na = /* @__PURE__ */ new Set([
3182
3191
  p,
3183
3192
  e,
3184
3193
  f ? "" : void 0
3185
- ), y = i === "value" && (n === "input" || n === "textarea" || n === Be) ? ca(m, e) : m;
3194
+ ), y = i === "value" && (n === "input" || n === "textarea" || n === Be) ? ga(m, e) : m;
3186
3195
  if (y !== p)
3187
3196
  return [f ? `.${i}` : s.name, l, y];
3188
3197
  }
@@ -3255,7 +3264,7 @@ const na = /* @__PURE__ */ new Set([
3255
3264
  return [o.factory.createIdentifier(s)];
3256
3265
  }
3257
3266
  };
3258
- function oa(e, t, i) {
3267
+ function ua(e, t, i) {
3259
3268
  if (typeof e == "string") {
3260
3269
  const r = (i.externalComponents[e] ?? i.localComponents[e])?.propToAttribute?.[t];
3261
3270
  if (r !== void 0)
@@ -3330,7 +3339,7 @@ function ai(e, t) {
3330
3339
  if (i.length === 0)
3331
3340
  return [];
3332
3341
  const n = Yi(i);
3333
- if (Nr(n)) {
3342
+ if (Lr(n)) {
3334
3343
  const s = n.replaceAll('"', "&#34;");
3335
3344
  if (s.length > n.length) {
3336
3345
  const r = n.replaceAll("'", "&#39;");
@@ -3349,7 +3358,7 @@ function ci(e, t, i) {
3349
3358
  `${i} prop value must be an expression. Found ${String(t?.getText(e.sourceFile))}`
3350
3359
  );
3351
3360
  const n = t.expression;
3352
- if (aa(n)) {
3361
+ if (fa(n)) {
3353
3362
  const r = i === "class" ? "safeClassMap" : "safeStyleMap";
3354
3363
  e.neededImports.add(r);
3355
3364
  const a = e.importRenames[r], c = o.factory.createCallExpression(o.factory.createIdentifier(a), void 0, [
@@ -3359,15 +3368,15 @@ function ci(e, t, i) {
3359
3368
  } else
3360
3369
  return [i, ...Oe(e, t, !0)];
3361
3370
  }
3362
- const aa = (e) => o.isObjectLiteralExpression(e) || o.isPropertyAccessExpression(e) || o.isIdentifier(e) || o.isCallExpression(e) || o.isBinaryExpression(e) || o.isConditionalExpression(e);
3363
- function ca(e, t) {
3371
+ const fa = (e) => o.isObjectLiteralExpression(e) || o.isPropertyAccessExpression(e) || o.isIdentifier(e) || o.isCallExpression(e) || o.isBinaryExpression(e) || o.isConditionalExpression(e);
3372
+ function ga(e, t) {
3364
3373
  t.neededImports.add("live");
3365
3374
  const i = t.importRenames.live;
3366
3375
  return o.factory.createCallExpression(o.factory.createIdentifier(i), void 0, [
3367
3376
  typeof e == "string" ? o.factory.createStringLiteral(e) : e
3368
3377
  ]);
3369
3378
  }
3370
- function la(e) {
3379
+ function ya(e) {
3371
3380
  if (e && o.isJsxExpression(e) && e.expression && o.isCallExpression(e.expression) && o.isIdentifier(e.expression.expression) && e.expression.expression.text in li && e.expression.arguments.length <= 1)
3372
3381
  return {
3373
3382
  propType: li[e.expression.expression.text],
@@ -3385,15 +3394,15 @@ const li = {
3385
3394
  bindBooleanAttribute: "booleanAttribute",
3386
3395
  bindEvent: "event"
3387
3396
  };
3388
- function da(e, t, i) {
3389
- return ma.has(e) ? e : e.startsWith("on") && t !== void 0 && o.isJsxExpression(t) && t.expression !== void 0 ? "event" : Gi.has(e) || e.includes("-") ? "attribute" : !kt(i) && (Xi.has(e) || (i === yt ? !1 : i === Be ? (
3397
+ function ha(e, t, i) {
3398
+ return ba.has(e) ? e : e.startsWith("on") && t !== void 0 && o.isJsxExpression(t) && t.expression !== void 0 ? "event" : Gi.has(e) || e.includes("-") ? "attribute" : !kt(i) && (Xi.has(e) || (i === yt ? !1 : i === Be ? (
3390
3399
  // When tag name is dynamic, we can't help but check if the prop name matches an "always attribute" in any html element
3391
3400
  Object.values(ht).some((r) => r.has(e))
3392
3401
  ) : ht[i]?.has(e) === !0)) ? Qt.has(e) ? "booleanAttribute" : "attribute" : i === "svg" || i === "math" || i === yt || i !== Be && (xt.has(i) || It.has(i)) ? e in z.common.reflected || e in z.common.stringifiedReflected || e in z.common.stringifiedNonReflected ? "property" : Qt.has(e) ? "booleanAttribute" : "attribute" : "property";
3393
3402
  }
3394
- const pa = ["class", "style", "ref", "directives", "key", "deferLoad"], ma = new Set(pa), ua = (e) => typeof e != "string" || e.trim().length > 0;
3403
+ const va = ["class", "style", "ref", "directives", "key", "deferLoad"], ba = new Set(va), Sa = (e) => typeof e != "string" || e.trim().length > 0;
3395
3404
  function Qe({ key: e, parts: t, litTag: i }, n) {
3396
- const s = fa(t);
3405
+ const s = wa(t);
3397
3406
  if (s.length % 2 === 0)
3398
3407
  throw new Error("Normalized template parts array length must be odd");
3399
3408
  const [r, ...a] = s;
@@ -3414,11 +3423,11 @@ function Qe({ key: e, parts: t, litTag: i }, n) {
3414
3423
  const d = n.importRenames[c], l = o.factory.createTaggedTemplateExpression(
3415
3424
  o.factory.createIdentifier(d),
3416
3425
  void 0,
3417
- a.length === 0 ? o.factory.createNoSubstitutionTemplateLiteral(r) : o.factory.createTemplateExpression(o.factory.createTemplateHead(r), ga(a))
3426
+ a.length === 0 ? o.factory.createNoSubstitutionTemplateLiteral(r) : o.factory.createTemplateExpression(o.factory.createTemplateHead(r), Ta(a))
3418
3427
  );
3419
3428
  return lt(n, e, l);
3420
3429
  }
3421
- const fa = (e) => e.reduce(
3430
+ const wa = (e) => e.reduce(
3422
3431
  (t, i, n) => {
3423
3432
  const s = t.at(-1), r = typeof s == "string", a = typeof i == "string";
3424
3433
  if (r && a)
@@ -3428,7 +3437,7 @@ const fa = (e) => e.reduce(
3428
3437
  },
3429
3438
  [""]
3430
3439
  );
3431
- function ga(e) {
3440
+ function Ta(e) {
3432
3441
  if (!(e.length % 2 === 0))
3433
3442
  throw new Error("templatePartsToSpans should be called with normalized parts array without the first item");
3434
3443
  const i = e.length / 2;
@@ -3467,13 +3476,13 @@ function En(e, t) {
3467
3476
  );
3468
3477
  }
3469
3478
  const jt = (e) => e.trim().length === 0 ? [] : o.getLeadingCommentRanges(e, 0) ?? [];
3470
- function ya(e) {
3479
+ function Ea(e) {
3471
3480
  const t = jt(e);
3472
3481
  if (t.length === 0)
3473
3482
  return [e || " "];
3474
3483
  const i = t.reduceRight(
3475
3484
  ([s, ...r], a) => {
3476
- const c = ha(s), d = Cn(c.slice(a.pos, a.end));
3485
+ const c = Ca(s), d = Cn(c.slice(a.pos, a.end));
3477
3486
  return [
3478
3487
  c.slice(0, a.pos),
3479
3488
  /**
@@ -3492,12 +3501,12 @@ function ya(e) {
3492
3501
  return (typeof n != "string" || n.trim() !== "") && i.push(" "), i;
3493
3502
  }
3494
3503
  const Cn = (e) => e.startsWith("//") ? e.slice(2) : e.slice(2, -2);
3495
- function ha(e) {
3504
+ function Ca(e) {
3496
3505
  if (typeof e == "string")
3497
3506
  return e;
3498
3507
  throw new Error(`Expected string, got ${typeof e}: ${String(e)}`);
3499
3508
  }
3500
- function va(e, t) {
3509
+ function $a(e, t) {
3501
3510
  if (!(o.isPropertyAccessExpression(t.expression) && t.expression.name.text === "map"))
3502
3511
  return t;
3503
3512
  const n = t.arguments[0];
@@ -3531,7 +3540,7 @@ function va(e, t) {
3531
3540
  const m = p.attributes.properties[f];
3532
3541
  if (m === void 0 || !o.isJsxAttribute(m))
3533
3542
  return t;
3534
- const g = Ft(m.initializer, e.sourceFile), y = ba(r, n, g, d, e);
3543
+ const g = Ft(m.initializer, e.sourceFile), y = Pa(r, n, g, d, e);
3535
3544
  if (y === void 0)
3536
3545
  return t;
3537
3546
  e.liftedKeys.add(m.name), e.neededImports.add("repeat");
@@ -3564,7 +3573,7 @@ function $n(e) {
3564
3573
  void 0
3565
3574
  ), t;
3566
3575
  }
3567
- function ba(e, t, i, n, s) {
3576
+ function Pa(e, t, i, n, s) {
3568
3577
  const r = K(i);
3569
3578
  if (r === void 0)
3570
3579
  return;
@@ -3580,7 +3589,7 @@ function ba(e, t, i, n, s) {
3580
3589
  return;
3581
3590
  }
3582
3591
  if (!n) {
3583
- const d = wa(r, a, t);
3592
+ const d = Ia(r, a, t);
3584
3593
  if (d === void 0)
3585
3594
  return;
3586
3595
  a = d;
@@ -3619,7 +3628,7 @@ function K(e) {
3619
3628
  }
3620
3629
  return t;
3621
3630
  } else {
3622
- if (Sa.has(e.kind))
3631
+ if (xa.has(e.kind))
3623
3632
  return [];
3624
3633
  {
3625
3634
  const t = Te(e);
@@ -3627,7 +3636,7 @@ function K(e) {
3627
3636
  }
3628
3637
  }
3629
3638
  }
3630
- const Sa = /* @__PURE__ */ new Set([
3639
+ const xa = /* @__PURE__ */ new Set([
3631
3640
  o.SyntaxKind.NumericLiteral,
3632
3641
  o.SyntaxKind.BigIntLiteral,
3633
3642
  o.SyntaxKind.StringLiteral,
@@ -3636,12 +3645,12 @@ const Sa = /* @__PURE__ */ new Set([
3636
3645
  o.SyntaxKind.FalseKeyword,
3637
3646
  o.SyntaxKind.NullKeyword,
3638
3647
  o.SyntaxKind.TrueKeyword
3639
- ]), Te = (e) => o.isAsExpression(e) || o.isNonNullExpression(e) || o.isSatisfiesExpression(e) || o.isParenthesizedExpression(e) ? Te(e.expression) : e, Pn = (e, t) => o.isObjectBindingPattern(e) ? Ca(e, t) : e;
3640
- function wa(e, t, i) {
3648
+ ]), Te = (e) => o.isAsExpression(e) || o.isNonNullExpression(e) || o.isSatisfiesExpression(e) || o.isParenthesizedExpression(e) ? Te(e.expression) : e, Pn = (e, t) => o.isObjectBindingPattern(e) ? Na(e, t) : e;
3649
+ function Ia(e, t, i) {
3641
3650
  if (e.every(qe, t))
3642
3651
  return t;
3643
3652
  if (o.isIdentifier(t)) {
3644
- const n = o.isBlock(i.body) ? ve(i.body.statements, (r) => Ta(r, t)) : void 0;
3653
+ const n = o.isBlock(i.body) ? ve(i.body.statements, (r) => ka(r, t)) : void 0;
3645
3654
  if (n === void 0)
3646
3655
  return;
3647
3656
  const s = Pn(n, e);
@@ -3649,7 +3658,7 @@ function wa(e, t, i) {
3649
3658
  return s;
3650
3659
  }
3651
3660
  }
3652
- function Ta(e, t) {
3661
+ function ka(e, t) {
3653
3662
  if (!o.isVariableStatement(e) || !(e.declarationList.flags & o.NodeFlags.Const))
3654
3663
  return;
3655
3664
  const i = e.declarationList.declarations[0];
@@ -3657,19 +3666,19 @@ function Ta(e, t) {
3657
3666
  }
3658
3667
  function qe(e) {
3659
3668
  const t = this;
3660
- return o.isIdentifier(t) ? t.text === e : t.elements.some(Ea, e);
3669
+ return o.isIdentifier(t) ? t.text === e : t.elements.some(Aa, e);
3661
3670
  }
3662
- function Ea(e) {
3671
+ function Aa(e) {
3663
3672
  const t = this;
3664
3673
  return o.isOmittedExpression(e) ? !1 : qe.call(e.name, t);
3665
3674
  }
3666
- function Ca(e, t) {
3675
+ function Na(e, t) {
3667
3676
  let i = !1;
3668
3677
  const n = e.elements.filter((s) => o.isIdentifier(s.name) ? t.includes(s.name.text) : (i = !0, !0));
3669
3678
  return i || n.length === 0 ? e : o.factory.updateObjectBindingPattern(e, n);
3670
3679
  }
3671
- const xn = (e, t) => t.liftedKeys.has(e), $a = (e) => e.apiJsonComponents.map(({ name: t, importPath: i }) => `import type { ${t} } from "./${i}";`).join(`
3672
- `), Pa = /^[a-zA-Z_$][a-zA-Z\d_$]*$/u, Ze = (e) => !Pa.test(e), ue = (e) => Ze(e) ? `"${e}"` : e;
3680
+ const xn = (e, t) => t.liftedKeys.has(e), La = (e) => e.apiJsonComponents.map(({ name: t, importPath: i }) => `import type { ${t} } from "./${i}/index.js";`).join(`
3681
+ `), Fa = /^[a-zA-Z_$][a-zA-Z\d_$]*$/u, Ze = (e) => !Fa.test(e), ue = (e) => Ze(e) ? `"${e}"` : e;
3673
3682
  function $e(e, t) {
3674
3683
  const i = [], n = [];
3675
3684
  let s = !1;
@@ -3695,13 +3704,13 @@ const pi = (e) => e.map((t) => `'${t}'`).join(" | ");
3695
3704
  function V(e, t, i) {
3696
3705
  if (Se(i))
3697
3706
  return In(e, i);
3698
- const n = o.isCallExpression(i) ? va(e, i) : i, s = o.visitEachChild(
3707
+ const n = o.isCallExpression(i) ? $a(e, i) : i, s = o.visitEachChild(
3699
3708
  n,
3700
3709
  // Do not add "" if parent is binary expression to not turn {(a && <b />) || c} into {(a && <b />) || "" || c}
3701
3710
  V.bind(null, e, t !== void 0 && o.isBinaryExpression(t) ? void 0 : i),
3702
3711
  e.transformationContext
3703
3712
  );
3704
- return t !== void 0 && o.isBinaryExpression(i) && (o.isJsxExpression(t) || Se(Te(i.right)) || Hr(i.right)) ? ka(s) : s;
3713
+ return t !== void 0 && o.isBinaryExpression(i) && (o.isJsxExpression(t) || Se(Te(i.right)) || Hr(i.right)) ? Ra(s) : s;
3705
3714
  }
3706
3715
  function In(e, t) {
3707
3716
  const i = kn(e, t);
@@ -3718,10 +3727,10 @@ function kn(e, t) {
3718
3727
  const S = o.isIdentifier(r) && r.text === $r ? Me(i, e) : {
3719
3728
  // No need to wrap the function call in a lit-html tag
3720
3729
  litTag: void 0,
3721
- parts: [Ia(e, t, r, i)]
3730
+ parts: [Da(e, t, r, i)]
3722
3731
  };
3723
3732
  return {
3724
- key: xa(s, e),
3733
+ key: ja(s, e),
3725
3734
  ...S
3726
3735
  };
3727
3736
  }
@@ -3738,18 +3747,18 @@ Found ${C.getText(e.sourceFile)}`
3738
3747
  const { name: S, initializer: k } = C;
3739
3748
  if (o.isJsxNamespacedName(S))
3740
3749
  throw Error(`JSX namespaced attributes are not supported. Found ${S.getText(e.sourceFile)}`);
3741
- const L = S.text, q = la(k), D = q?.propType ?? da(L, k, c);
3742
- f?.delete(L);
3743
- const N = ra[D](e, q?.initializer ?? k, L, c);
3744
- if (N.length === 0)
3750
+ const N = S.text, q = ya(k), D = q?.propType ?? ha(N, k, c);
3751
+ f?.delete(N);
3752
+ const L = ma[D](e, q?.initializer ?? k, N, c);
3753
+ if (L.length === 0)
3745
3754
  return [];
3746
- const W = e.compiler.shouldMinifyJsx ? [" "] : ya(Tn(S, e));
3747
- return D === "key" ? (m = typeof N[0] == "object" && !xn(S, e) ? N[0] : void 0, W.some(ua) ? W : []) : D === "directives" || D === "ref" || L === "deferLoad" ? (y ||= D === "deferLoad", g.push(
3755
+ const W = e.compiler.shouldMinifyJsx ? [" "] : Ea(Tn(S, e));
3756
+ return D === "key" ? (m = typeof L[0] == "object" && !xn(S, e) ? L[0] : void 0, W.some(Sa) ? W : []) : D === "directives" || D === "ref" || N === "deferLoad" ? (y ||= D === "deferLoad", g.push(
3748
3757
  ...W,
3749
- ...N.flatMap(
3750
- (O, J) => typeof O == "string" || J === 0 || typeof N[J - 1] == "string" ? O : [" ", O]
3758
+ ...L.flatMap(
3759
+ (O, J) => typeof O == "string" || J === 0 || typeof L[J - 1] == "string" ? O : [" ", O]
3751
3760
  )
3752
- ), []) : [...W, ...N];
3761
+ ), []) : [...W, ...L];
3753
3762
  });
3754
3763
  if (f !== void 0 && f.size > 0 && e.compiler.logLintError(
3755
3764
  "mustIncludeAllRequiredProperties",
@@ -3784,12 +3793,12 @@ Found ${C.getText(e.sourceFile)}`
3784
3793
  ];
3785
3794
  return { key: m, parts: A, litTag: d };
3786
3795
  }
3787
- function xa(e, t) {
3796
+ function ja(e, t) {
3788
3797
  const i = e.attributes.properties[An(e)];
3789
3798
  return i && o.isJsxAttribute(i) && !xn(i.name, t) ? Ft(i.initializer, t.sourceFile) : void 0;
3790
3799
  }
3791
3800
  const An = (e) => e.attributes.properties.findIndex(({ name: t }) => t && o.isIdentifier(t) && t.text === "key");
3792
- function Ia(e, t, i, n) {
3801
+ function Da(e, t, i, n) {
3793
3802
  const r = (o.isJsxElement(t) ? t.openingElement : t).attributes.properties.map((d) => {
3794
3803
  if (o.isJsxSpreadAttribute(d))
3795
3804
  return En(Tn(d, e), o.factory.createSpreadAssignment(d.expression));
@@ -3833,7 +3842,7 @@ function Me(e, t) {
3833
3842
  });
3834
3843
  return { litTag: i, parts: n };
3835
3844
  }
3836
- function ka(e) {
3845
+ function Ra(e) {
3837
3846
  return e.operatorToken.kind === o.SyntaxKind.AmpersandAmpersandToken ? o.factory.createBinaryExpression(
3838
3847
  e,
3839
3848
  o.factory.createToken(o.SyntaxKind.BarBarToken),
@@ -3884,22 +3893,22 @@ function Dt(e, t, i) {
3884
3893
  ] : [V(e, i, t.expression)]
3885
3894
  );
3886
3895
  }
3887
- const Ln = (e) => e.reduce((t, [i, n]) => (t[i] ??= [], t[i].push(n), t), {}), Nn = Ln(
3896
+ const Nn = (e) => e.reduce((t, [i, n]) => (t[i] ??= [], t[i].push(n), t), {}), Ln = Nn(
3888
3897
  Object.entries(ce).flatMap(
3889
3898
  ([e, t]) => t.map((i) => [i, e])
3890
3899
  )
3891
- ), Fn = new Set(Object.keys(Nn));
3892
- function Aa(e, t) {
3900
+ ), Fn = new Set(Object.keys(Ln));
3901
+ function Oa(e, t) {
3893
3902
  const i = t.importClause, n = i === void 0, s = t.moduleSpecifier;
3894
3903
  if (!o.isStringLiteral(s))
3895
3904
  return t;
3896
- const r = La(e.sourceFile.fileName, s.text, ""), a = !i?.isTypeOnly;
3905
+ const r = Ma(e.sourceFile.fileName, s.text, ""), a = !i?.isTypeOnly;
3897
3906
  if (a && e.existingImportedModules.add(r), rn.test(s.text) && // If id already includes ?, bypass our custom behavior
3898
3907
  !s.text.includes("?")) {
3899
3908
  if (n) {
3900
3909
  if (e.compiler.viteCommand !== "build" || e.compiler.isInStorybook || e.compiler.isInTest)
3901
3910
  return t;
3902
- const l = e.sourceFile.fileName, p = $o(l), f = `import "${s.text}"`;
3911
+ const l = e.sourceFile.fileName, p = Po(l), f = `import "${s.text}"`;
3903
3912
  throw Error(
3904
3913
  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 \`${f}\`. How should such CSS import be handled? Options:
3905
3914
  1. (suggested) Externalize ${l}, which will make end-user's bundler treat this CSS import as global CSS.
@@ -3928,7 +3937,7 @@ function Aa(e, t) {
3928
3937
  if (c === void 0 || !o.isNamedImports(c))
3929
3938
  return t;
3930
3939
  const d = Fn.has(s.text);
3931
- return c.elements.forEach((l) => {
3940
+ if (c.elements.forEach((l) => {
3932
3941
  const p = (l.propertyName ?? l.name).text, f = ce[p];
3933
3942
  if (d) {
3934
3943
  if (f?.some((y) => y === s.text)) {
@@ -3938,13 +3947,44 @@ function Aa(e, t) {
3938
3947
  } else (l.name.text === "h" || l.name.text === "createElement") && R().name !== "@arcgis/lumina" && (e.hasNonLuminaJsxImport = !0);
3939
3948
  const m = p.startsWith(p[0].toUpperCase()), g = u.isAbsolute(r);
3940
3949
  a && !l.isTypeOnly && m && g && e.importedFunctionComponentsFromModules.add(r);
3941
- }), t;
3950
+ }), s.text === "@arcgis/lumina") {
3951
+ let l = !1;
3952
+ const p = c.elements.filter((m) => {
3953
+ const g = (m.propertyName ?? m.name).text;
3954
+ return Ur.has(g) ? !1 : (l ||= !m.isTypeOnly, !0);
3955
+ });
3956
+ if (p.length === 0)
3957
+ return;
3958
+ if (p.length !== c.elements.length) {
3959
+ const m = i.isTypeOnly || !l, g = l ? p : p.map(
3960
+ (y) => o.factory.updateImportSpecifier(
3961
+ y,
3962
+ !1,
3963
+ y.propertyName,
3964
+ y.name
3965
+ )
3966
+ );
3967
+ return o.factory.updateImportDeclaration(
3968
+ t,
3969
+ t.modifiers,
3970
+ o.factory.updateImportClause(
3971
+ i,
3972
+ m,
3973
+ i.name,
3974
+ o.factory.updateNamedImports(c, g)
3975
+ ),
3976
+ t.moduleSpecifier,
3977
+ t.attributes
3978
+ );
3979
+ }
3980
+ }
3981
+ return t;
3942
3982
  }
3943
- const jn = (e, t) => e === me && ce.staticHtml.includes(t) ? pe : e === ae && ce.staticSvg.includes(t) ? te : e, La = (e, t, i) => t.startsWith(".") ? u.resolve(e, "..", `${t}${i}`) : t;
3944
- function Na(e) {
3945
- return o.isImportDeclaration(e) ? Fa(this, e) : e;
3983
+ const jn = (e, t) => e === me && ce.staticHtml.includes(t) ? pe : e === ae && ce.staticSvg.includes(t) ? te : e, Ma = (e, t, i) => t.startsWith(".") ? u.resolve(e, "..", `${t}${i}`) : t;
3984
+ function Ja(e) {
3985
+ return o.isImportDeclaration(e) ? Ka(this, e) : e;
3946
3986
  }
3947
- function Fa(e, t) {
3987
+ function Ka(e, t) {
3948
3988
  const i = t.importClause, n = i?.namedBindings, s = t.moduleSpecifier;
3949
3989
  if (!o.isStringLiteral(s) || !n || !o.isNamedImports(n) || !Fn.has(s.text))
3950
3990
  return t;
@@ -3954,7 +3994,7 @@ function Fa(e, t) {
3954
3994
  const l = (d.propertyName ?? d.name).text, p = jn(l, s.text);
3955
3995
  return e.existingLitImports.delete(p), e.neededImports.has(p) ? (e.neededImports.delete(p), a = !0, o.factory.updateImportSpecifier(d, !1, d.propertyName, d.name)) : r ? o.factory.updateImportSpecifier(d, !0, d.propertyName, d.name) : d;
3956
3996
  });
3957
- return Nn[s.text]?.forEach((d) => {
3997
+ return Ln[s.text]?.forEach((d) => {
3958
3998
  !e.neededImports.has(d) || e.existingLitImports.has(d) || (e.neededImports.delete(d), a = !0, c.push(Dn(d, e)));
3959
3999
  }), a ? o.factory.updateImportDeclaration(
3960
4000
  t,
@@ -3969,8 +4009,8 @@ function Fa(e, t) {
3969
4009
  t.attributes
3970
4010
  ) : t;
3971
4011
  }
3972
- function ja(e) {
3973
- const t = Ln(
4012
+ function Ba(e) {
4013
+ const t = Nn(
3974
4014
  Array.from(e.neededImports, (i) => [ce[i][0], i])
3975
4015
  );
3976
4016
  return Object.entries(t).map(
@@ -3995,8 +4035,8 @@ function Dn(e, t) {
3995
4035
  o.factory.createIdentifier(n)
3996
4036
  );
3997
4037
  }
3998
- function Da(e) {
3999
- const t = Uo().map(({ packageName: i }) => i);
4038
+ function _a(e) {
4039
+ const t = qo().map(({ packageName: i }) => i);
4000
4040
  return e.existingImportedModules.forEach((i) => {
4001
4041
  if (u.isAbsolute(i))
4002
4042
  return;
@@ -4009,7 +4049,7 @@ function Da(e) {
4009
4049
  }
4010
4050
  }), [];
4011
4051
  }
4012
- function Ra(e) {
4052
+ function Wa(e) {
4013
4053
  if (e.compiler.viteCommand === "serve")
4014
4054
  return e.customElementsToImport.clear(), e.customElementsToImportDeferred.clear(), [];
4015
4055
  const t = e.compiler._customElementDependencies;
@@ -4024,7 +4064,7 @@ function Ra(e) {
4024
4064
  t[n] ??= { referencedBy: [], referencedTagNames: [], referencedDeferredTagNames: [] }, t[n].referencedBy.push(e.sourceFile.fileName);
4025
4065
  }), [];
4026
4066
  }
4027
- function Oa(e, t, i) {
4067
+ function Ha(e, t, i) {
4028
4068
  const n = bn()[t] ?? Rn(e)[t];
4029
4069
  if (n === void 0) {
4030
4070
  if (e.options?.build?.dependencies?.silenceUnknownJsxElementUsage?.(t, i, e) === !0)
@@ -4039,7 +4079,7 @@ function Oa(e, t, i) {
4039
4079
  }
4040
4080
  return n;
4041
4081
  }
4042
- function Ma(e, t) {
4082
+ function Ua(e, t) {
4043
4083
  return e.packageName === void 0 ? Ce(t, e.moduleName) : u.join(e.packageName, e.moduleName);
4044
4084
  }
4045
4085
  function Rn(e) {
@@ -4054,7 +4094,7 @@ function Rn(e) {
4054
4094
  e.viteCommand === "build"
4055
4095
  ), e._localDefinedComponents;
4056
4096
  }
4057
- const Ja = (e, t) => {
4097
+ const za = (e, t) => {
4058
4098
  const i = e.pragmas;
4059
4099
  if (i?.has("jsx") === !0 || i?.has("jsxImportSource") === !0)
4060
4100
  return e.statements;
@@ -4064,7 +4104,7 @@ const Ja = (e, t) => {
4064
4104
  localComponents: Rn(t.compiler),
4065
4105
  sourceFile: e,
4066
4106
  transformationContext: t.transformation,
4067
- importRenames: Ka(e),
4107
+ importRenames: qa(e),
4068
4108
  existingImportedModules: /* @__PURE__ */ new Set(),
4069
4109
  importedFunctionComponentsFromModules: /* @__PURE__ */ new Set(),
4070
4110
  existingLitImports: /* @__PURE__ */ new Set(),
@@ -4080,18 +4120,21 @@ const Ja = (e, t) => {
4080
4120
  let s = [];
4081
4121
  if (e.statements.every((a) => {
4082
4122
  if (o.isImportDeclaration(a)) {
4083
- if (s.push(Aa(n, a)), n.hasNonLuminaJsxImport)
4123
+ const c = Oa(n, a);
4124
+ if (c === void 0)
4125
+ return !0;
4126
+ if (s.push(c), n.hasNonLuminaJsxImport)
4084
4127
  return !1;
4085
4128
  } else
4086
4129
  s.push(V(n, void 0, a));
4087
4130
  return !0;
4088
4131
  }), n.hasNonLuminaJsxImport)
4089
4132
  return e.statements;
4090
- if (n.neededImports.size > 0 && (s = s.map(Na, n), n.existingLitImports.size > 0))
4133
+ if (n.neededImports.size > 0 && (s = s.map(Ja, n), n.existingLitImports.size > 0))
4091
4134
  throw new Error(
4092
4135
  `Expected context.existingLitImports to be empty by now. Found: ${Array.from(n.existingLitImports).join(", ")}`
4093
4136
  );
4094
- const r = [ja, Da, Ra].flatMap(
4137
+ const r = [Ba, _a, Wa].flatMap(
4095
4138
  (a) => a(n)
4096
4139
  );
4097
4140
  if (n.neededImports.size > 0)
@@ -4100,18 +4143,18 @@ const Ja = (e, t) => {
4100
4143
  );
4101
4144
  return [...r, ...s];
4102
4145
  };
4103
- function Ka(e) {
4104
- return Ba(e), Object.fromEntries(
4146
+ function qa(e) {
4147
+ return Va(e), Object.fromEntries(
4105
4148
  Wr.map((t) => [t, e.identifiers.has(t) ? `${t}$jsx` : t])
4106
4149
  );
4107
4150
  }
4108
- function Ba(e) {
4151
+ function Va(e) {
4109
4152
  if (!("identifiers" in e))
4110
4153
  throw new Error(
4111
4154
  "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."
4112
4155
  );
4113
4156
  }
4114
- function _a(e, t, i) {
4157
+ function Ga(e, t, i) {
4115
4158
  return t.size === 0 ? e : [
4116
4159
  o.factory.createPropertyDeclaration(
4117
4160
  [
@@ -4125,7 +4168,7 @@ function _a(e, t, i) {
4125
4168
  Array.from(t.entries()).map(
4126
4169
  ([n, s]) => o.factory.createPropertyAssignment(
4127
4170
  Ze(n) ? o.factory.createStringLiteral(n) : n,
4128
- Wa(s, i)
4171
+ Xa(s, i)
4129
4172
  )
4130
4173
  )
4131
4174
  )
@@ -4133,7 +4176,7 @@ function _a(e, t, i) {
4133
4176
  ...e
4134
4177
  ];
4135
4178
  }
4136
- function Wa(e, t) {
4179
+ function Xa(e, t) {
4137
4180
  let i = 0, n = !0;
4138
4181
  const s = [], r = [];
4139
4182
  for (const d of e.properties)
@@ -4175,7 +4218,7 @@ function Wa(e, t) {
4175
4218
  ...t ? [] : [o.factory.createObjectLiteralExpression(r)]
4176
4219
  ]);
4177
4220
  }
4178
- function Ha(e, t, i, n, s) {
4221
+ function Qa(e, t, i, n, s) {
4179
4222
  let r = -1, a = -1, c = -1;
4180
4223
  t.options?.properties.forEach((m, g) => {
4181
4224
  if (o.isSpreadAssignment(m))
@@ -4187,23 +4230,23 @@ function Ha(e, t, i, n, s) {
4187
4230
  y === "type" ? r = g : y === "attribute" ? a = g : y === "readOnly" && (c = g);
4188
4231
  }
4189
4232
  });
4190
- const d = s.attribute === void 0 && a === -1, l = s.readonly === !0 && s.docsOnlyReadonly !== !0 && c === -1, p = Ua(e, t, i, s, r), f = [
4233
+ const d = s.attribute === void 0 && a === -1, l = s.readonly === !0 && s.docsOnlyReadonly !== !0 && c === -1, p = Za(e, t, i, s, r), f = [
4191
4234
  ...d ? [o.factory.createPropertyAssignment("attribute", o.factory.createFalse())] : [],
4192
4235
  ...l ? [o.factory.createPropertyAssignment("readOnly", o.factory.createTrue())] : [],
4193
4236
  ...p !== void 0 ? [p] : []
4194
4237
  ];
4195
4238
  return f.length > 0 ? t.options === void 0 ? o.factory.createObjectLiteralExpression(f, !1) : o.factory.updateObjectLiteralExpression(t.options, [...t.options.properties, ...f]) : t.options;
4196
4239
  }
4197
- function Ua(e, t, i, n, s) {
4240
+ function Za(e, t, i, n, s) {
4198
4241
  if (n.attribute === void 0)
4199
4242
  return;
4200
- const r = qa(e), a = i.compiler.viteCommand === "serve" || r !== "Other" ? r : za(n.type.values);
4243
+ const r = ec(e), a = i.compiler.viteCommand === "serve" || r !== "Other" ? r : Ya(n.type.values);
4201
4244
  return a === "Other" || n.readonly && (a !== "Boolean" || !n.reflects) || t.options?.properties[s] !== void 0 ? void 0 : o.factory.createPropertyAssignment(
4202
4245
  o.factory.createIdentifier("type"),
4203
4246
  o.factory.createIdentifier(a)
4204
4247
  );
4205
4248
  }
4206
- function za(e) {
4249
+ function Ya(e) {
4207
4250
  let t = !1, i = !1, n = !1;
4208
4251
  if (e?.forEach((s) => {
4209
4252
  t ||= s.type === "number", i ||= s.type === "boolean", n ||= s.type === "string" || s.type === "any" || s.type === "unknown";
@@ -4215,7 +4258,7 @@ function za(e) {
4215
4258
  }
4216
4259
  return "Other";
4217
4260
  }
4218
- function qa(e) {
4261
+ function ec(e) {
4219
4262
  const t = e.type ?? (o.isSetAccessor(e) ? e.parameters[0].type : void 0);
4220
4263
  if (t === void 0) {
4221
4264
  if ("initializer" in e && e.initializer !== void 0) {
@@ -4232,7 +4275,7 @@ function qa(e) {
4232
4275
  }
4233
4276
  return "Other";
4234
4277
  }
4235
- function Va(e, t, i, n, s) {
4278
+ function tc(e, t, i, n, s) {
4236
4279
  if (t.modifiers === void 0)
4237
4280
  return t;
4238
4281
  let r = -1, a = -1;
@@ -4242,7 +4285,7 @@ function Va(e, t, i, n, s) {
4242
4285
  l === "property" && (r = d), l === "state" && (a = d);
4243
4286
  }
4244
4287
  }), r !== -1) {
4245
- const c = Ga(e, t, i, n), d = mi(t, r, n), l = Ha(t, d, e, n, c);
4288
+ const c = ic(e, t, i, n), d = mi(t, r, n), l = Qa(t, d, e, n, c);
4246
4289
  let p = !1;
4247
4290
  return s.set(c.name, l ?? o.factory.createObjectLiteralExpression()), p = !0, d.options = l, ui(t, d, r, p);
4248
4291
  } else if (a !== -1) {
@@ -4253,7 +4296,7 @@ function Va(e, t, i, n, s) {
4253
4296
  } else
4254
4297
  return t;
4255
4298
  }
4256
- function Ga(e, t, i, n) {
4299
+ function ic(e, t, i, n) {
4257
4300
  const s = e.apiModule?.declarations.find(
4258
4301
  (a) => a.name === i
4259
4302
  ) ?? (e.compiler.isInTest ? {
@@ -4320,16 +4363,16 @@ function ui(e, t, i, n) {
4320
4363
  e.initializer
4321
4364
  );
4322
4365
  }
4323
- const Xa = (e, t) => {
4366
+ const nc = (e, t) => {
4324
4367
  if (t.apiModule === void 0 && !t.compiler.isInTest)
4325
4368
  return e.statements;
4326
4369
  let i;
4327
4370
  function n() {
4328
4371
  i = /* @__PURE__ */ new Map();
4329
4372
  }
4330
- const s = (c) => _a(c, i, t.compiler.shouldMinify);
4373
+ const s = (c) => Ga(c, i, t.compiler.shouldMinify);
4331
4374
  function r(c, d) {
4332
- const l = Za(t, c, d, e, i);
4375
+ const l = rc(t, c, d, e, i);
4333
4376
  return Ke(l, t), l;
4334
4377
  }
4335
4378
  return e.statements.map(
@@ -4363,11 +4406,11 @@ function On(e, t, i, n, s = Ri) {
4363
4406
  i.transformation
4364
4407
  ) : t;
4365
4408
  }
4366
- const Qa = /* @__PURE__ */ new Set(["connectedCallback", "disconnectedCallback"]);
4367
- function Za(e, t, i, n, s) {
4409
+ const sc = /* @__PURE__ */ new Set(["connectedCallback", "disconnectedCallback"]);
4410
+ function rc(e, t, i, n, s) {
4368
4411
  if (o.isMethodDeclaration(t)) {
4369
4412
  const r = t.modifiers?.filter(
4370
- (a) => !o.isDecorator(a) || !Ya(a)
4413
+ (a) => !o.isDecorator(a) || !oc(a)
4371
4414
  );
4372
4415
  if (r?.length !== t.modifiers?.length)
4373
4416
  return o.factory.updateMethodDeclaration(
@@ -4381,7 +4424,7 @@ function Za(e, t, i, n, s) {
4381
4424
  t.type,
4382
4425
  t.body
4383
4426
  );
4384
- if ("text" in t.name && Qa.has(t.name.text) && t.body) {
4427
+ if ("text" in t.name && sc.has(t.name.text) && t.body) {
4385
4428
  const a = t.name.text;
4386
4429
  return t.body.statements.some(
4387
4430
  (d) => o.isExpressionStatement(d) && o.isCallExpression(d.expression) && o.isPropertyAccessExpression(d.expression.expression) && d.expression.expression.expression.kind === o.SyntaxKind.SuperKeyword && d.expression.expression.name.text === a
@@ -4407,14 +4450,14 @@ function Za(e, t, i, n, s) {
4407
4450
  );
4408
4451
  }
4409
4452
  }
4410
- return o.isPropertyDeclaration(t) || o.isAccessor(t) ? Va(e, t, i, n, s) : t;
4453
+ return o.isPropertyDeclaration(t) || o.isAccessor(t) ? tc(e, t, i, n, s) : t;
4411
4454
  }
4412
- const Ya = (e) => o.isCallExpression(e.expression) && o.isIdentifier(e.expression.expression) && e.expression.expression.text === "method", ec = [
4413
- Ja,
4455
+ const oc = (e) => o.isCallExpression(e.expression) && o.isIdentifier(e.expression.expression) && e.expression.expression.text === "method", ac = [
4456
+ za,
4414
4457
  Hs,
4415
- Xa
4416
- ], tc = "@arcgis/lumina:transformComponents", ic = (e) => ({
4417
- name: tc,
4458
+ nc
4459
+ ], cc = "@arcgis/lumina:transformComponents", lc = (e) => ({
4460
+ name: cc,
4418
4461
  transform: {
4419
4462
  // Transform JSX to lit-html first so that vite:esbuild doesn't transform JSX to h().
4420
4463
  order: "pre",
@@ -4432,7 +4475,7 @@ const Ya = (e) => o.isCallExpression(e.expression) && o.isIdentifier(e.expressio
4432
4475
  const r = o.transform(n, [
4433
4476
  (m) => () => zi(e, m, n, [
4434
4477
  ...e.options.types?.sourceFileTransformers ?? [],
4435
- ...ec
4478
+ ...ac
4436
4479
  ])
4437
4480
  ]).transformed[0], a = e._compilerOptionsForPrinter, c = e._typeScriptPrinter, d = a.sourceMap ? Re.createSourceMapGenerator(
4438
4481
  e.typeScriptHost,
@@ -4450,7 +4493,7 @@ const Ya = (e) => o.isCallExpression(e.expression) && o.isIdentifier(e.expressio
4450
4493
  }
4451
4494
  }
4452
4495
  });
4453
- function nc(e) {
4496
+ function dc(e) {
4454
4497
  const t = e.typeScriptConfig;
4455
4498
  return {
4456
4499
  ...t,
@@ -4482,7 +4525,7 @@ function nc(e) {
4482
4525
  skipLibCheck: !0
4483
4526
  };
4484
4527
  }
4485
- function sc(e) {
4528
+ function pc(e) {
4486
4529
  const t = e.options.types?.tsconfigPath, i = t && u.isAbsolute(t) ? t : cs(t ?? "tsconfig.json");
4487
4530
  if (i === void 0)
4488
4531
  throw Error(
@@ -4521,7 +4564,7 @@ function Mn(e) {
4521
4564
  const i = o.ScriptTarget[t].toLowerCase();
4522
4565
  return i === "latest" ? "esnext" : i;
4523
4566
  }
4524
- function rc(e, t) {
4567
+ function mc(e, t) {
4525
4568
  if (e.isInStorybook && e.viteCommand === "serve") {
4526
4569
  const i = (a, c, d, ...l) => {
4527
4570
  const p = a.filter(
@@ -4543,16 +4586,16 @@ function rc(e, t) {
4543
4586
  e.typeScriptProgram = a.getProgram(), e.typeScriptTypeChecker = e.typeScriptProgram.getTypeChecker(), e._typeScriptReload?.resolve(), e._typeScriptReload = new Oi();
4544
4587
  }, e.typeScriptWatchProgram = o.createWatchProgram(n), e.typeScriptConfig = e.typeScriptProgram.getCompilerOptions();
4545
4588
  }
4546
- e.typeScriptConfig.sourceMap = t, e._compilerOptionsForPrinter = nc(e), e._typeScriptPrinter = ji(e._compilerOptionsForPrinter);
4589
+ e.typeScriptConfig.sourceMap = t, e._compilerOptionsForPrinter = dc(e), e._typeScriptPrinter = ji(e._compilerOptionsForPrinter);
4547
4590
  }
4548
4591
  const St = "@arcgis/core", dt = R(), Pe = St in (dt.dependencies ?? {}) || St in (dt.peerDependencies ?? {}) || // Does not depend on `@arcgis/core` to avoid cycle, but uses core in Lumina tests
4549
4592
  dt.name === "@arcgis/lumina";
4550
- async function oc(e, t, i) {
4593
+ async function uc(e, t, i) {
4551
4594
  if (!Pe)
4552
4595
  return [];
4553
4596
  const n = await Ai(St);
4554
4597
  if (t === "cdn") {
4555
- const s = await Li(n), r = Xe({ name: "", version: s.version }, i);
4598
+ const s = await Ni(n), r = Xe({ name: "", version: s.version }, i);
4556
4599
  return [
4557
4600
  // Use the ESM CDN
4558
4601
  // <script src="https://jsdev.arcgis.com/VERSION/"><\/script>
@@ -4571,7 +4614,7 @@ async function oc(e, t, i) {
4571
4614
  fi(r)
4572
4615
  ];
4573
4616
  } else
4574
- return [fi(Nt(e, `${n}/assets/`))];
4617
+ return [fi(Lt(e, `${n}/assets/`))];
4575
4618
  }
4576
4619
  const fi = (e) => ({
4577
4620
  // Not using join() because it would turn https:// into https:/
@@ -4579,12 +4622,12 @@ const fi = (e) => ({
4579
4622
  // This is used be the theme switcher in `@arcgis/storybook-utils`
4580
4623
  id: "arcgisCoreStylesheet"
4581
4624
  });
4582
- async function ac(e, t, i) {
4625
+ async function fc(e, t, i) {
4583
4626
  const n = u.resolve(e.dir.root, t);
4584
4627
  e.viteConfig.build.emptyOutDir !== !1 && await U(n) && await xs(n, { recursive: !0, force: !0 }), await ee(n, { recursive: !0 }), await Is(e.dir.distCdn, u.join(n, "build"), { recursive: !0 });
4585
4628
  const s = [
4586
4629
  "index.html",
4587
- ...await Ls("**/*.html", {
4630
+ ...await Ns("**/*.html", {
4588
4631
  cwd: e.dir.src,
4589
4632
  nodir: !0,
4590
4633
  posix: !0
@@ -4633,7 +4676,7 @@ const Jn = /* @__PURE__ */ new Set([
4633
4676
  "extras",
4634
4677
  "support"
4635
4678
  ]), _ = "@arcgis/lumina:buildCdn", xe = "cdn", Kn = "index", ne = "main";
4636
- function cc(e) {
4679
+ function gc(e) {
4637
4680
  const { skip: t = !1, namespace: i, esbuildOptions: n = {}, entrypointTransformer: s } = e.options.build?.cdn ?? {}, r = e.options.build?.webApp?.destination, a = i !== void 0;
4638
4681
  if (a) {
4639
4682
  if (i.toLowerCase() !== i)
@@ -4650,7 +4693,7 @@ function cc(e) {
4650
4693
  if (e.provideAssets([
4651
4694
  {
4652
4695
  type: "dynamic",
4653
- source: () => no(e),
4696
+ source: () => so(e),
4654
4697
  destination: `../${a ? c : ne}.css`
4655
4698
  }
4656
4699
  ]), !t)
@@ -4666,7 +4709,7 @@ function cc(e) {
4666
4709
  );
4667
4710
  return;
4668
4711
  }
4669
- const d = Pe && R().name !== "@arcgis/embeddable-components", l = Date.now(), p = Array.isArray(n.entryPoints) ? n.entryPoints.map((g) => typeof g == "string" ? { in: g, out: "" } : g) : typeof n.entryPoints == "object" ? Object.entries(n.entryPoints).map(([g, y]) => ({ in: y, out: g })) : [], f = await lc(
4712
+ const d = Pe && R().name !== "@arcgis/embeddable-components", l = Date.now(), p = Array.isArray(n.entryPoints) ? n.entryPoints.map((g) => typeof g == "string" ? { in: g, out: "" } : g) : typeof n.entryPoints == "object" ? Object.entries(n.entryPoints).map(([g, y]) => ({ in: y, out: g })) : [], f = await yc(
4670
4713
  e,
4671
4714
  c,
4672
4715
  n,
@@ -4674,7 +4717,7 @@ function cc(e) {
4674
4717
  s,
4675
4718
  d
4676
4719
  );
4677
- await dc(
4720
+ await hc(
4678
4721
  f,
4679
4722
  e,
4680
4723
  a ? `${c}.esm` : c,
@@ -4682,11 +4725,11 @@ function cc(e) {
4682
4725
  d
4683
4726
  );
4684
4727
  const m = Date.now();
4685
- T.info(_, `CDN was built in ${m - l}ms`), r && await ac(e, r, `${a ? `${c}.esm` : c}.js`);
4728
+ T.info(_, `CDN was built in ${m - l}ms`), r && await fc(e, r, `${a ? `${c}.esm` : c}.js`);
4686
4729
  }
4687
4730
  };
4688
4731
  }
4689
- async function lc(e, t, i, n, s, r) {
4732
+ async function yc(e, t, i, n, s, r) {
4690
4733
  const a = e.environment;
4691
4734
  if (i.minify && r)
4692
4735
  throw Error(
@@ -4794,7 +4837,7 @@ ${ln(e._globalCssString, e)}`, d = s?.(c, e) ?? c;
4794
4837
  }
4795
4838
  });
4796
4839
  }
4797
- async function dc(e, t, i, n, s) {
4840
+ async function hc(e, t, i, n, s) {
4798
4841
  const r = t.dir.distCdn, a = `${i}.js`, c = new Map(
4799
4842
  e.outputFiles.map((d) => {
4800
4843
  const l = {
@@ -4805,13 +4848,13 @@ async function dc(e, t, i, n, s) {
4805
4848
  }, p = d.path.slice(r.length);
4806
4849
  if (p === "stdin.js") {
4807
4850
  if (s) {
4808
- const m = d.text.match(pc)?.[0];
4851
+ const m = d.text.match(vc)?.[0];
4809
4852
  if (m === void 0)
4810
4853
  throw Error(
4811
4854
  `Failed to find the runtime variable name in the CDN entrypoint file. This likely indicates a bug in Lumina. stdin.js contents:
4812
4855
  ${d.text}`
4813
4856
  );
4814
- l.code = `${l.code.trimEnd()}${mc(m, n)}`, l.isAsync = !1;
4857
+ l.code = `${l.code.trimEnd()}${bc(m, n)}`, l.isAsync = !1;
4815
4858
  }
4816
4859
  return [a, l];
4817
4860
  }
@@ -4822,8 +4865,8 @@ ${d.text}`
4822
4865
  d.isAsync === void 0 && (l.endsWith(".js") ? Bn(d, c) : d.isAsync = !1);
4823
4866
  }), t.options.build?.cdn?.transformer?.(c, t), await Promise.all(Array.from(c.entries(), async ([d, { code: l }]) => await F(r + d, l)));
4824
4867
  }
4825
- const pc = /(?<=;var [a-zA-Z$_]=[a-zA-Z$_]\()[a-zA-Z$_](?=,\{")/u;
4826
- function mc(e, t) {
4868
+ const vc = /(?<=;var [a-zA-Z$_]=[a-zA-Z$_]\()[a-zA-Z$_](?=,\{")/u;
4869
+ function bc(e, t) {
4827
4870
  let i = [
4828
4871
  "window.$arcgis",
4829
4872
  "||",
@@ -4872,26 +4915,26 @@ function Bn(e, t) {
4872
4915
  e.isProcessing = !0;
4873
4916
  const i = [], n = [], s = [], r = /* @__PURE__ */ new Set(), a = [];
4874
4917
  let c = 0;
4875
- const d = e.code.matchAll(uc);
4918
+ const d = e.code.matchAll(Sc);
4876
4919
  for (const S of d) {
4877
- const [k, L, q, D, N] = S, W = N.startsWith(Ve);
4920
+ const [k, N, q, D, L] = S, W = L.startsWith(Ve);
4878
4921
  if (c !== 0 && c !== S.index) {
4879
4922
  const O = e.code.slice(c, S.index);
4880
4923
  s.push(O), a.push([c, O.length, 0, ""]);
4881
4924
  }
4882
4925
  if (c = S.index + k.length, W)
4883
- a.push([S.index, k.length, 0, ""]), n.push(`"${Wn(N.slice(Ve.length))}"`), i.push(L?.replaceAll(" as ", ":") ?? q ?? D ?? "");
4926
+ a.push([S.index, k.length, 0, ""]), n.push(`"${Wn(L.slice(Ve.length))}"`), i.push(N?.replaceAll(" as ", ":") ?? q ?? D ?? "");
4884
4927
  else {
4885
- const O = _n(N, t), J = O?.isAsync === !0;
4886
- if (L !== void 0) {
4928
+ const O = _n(L, t), J = O?.isAsync === !0;
4929
+ if (N !== void 0) {
4887
4930
  const Ae = [];
4888
- for (const et of L.slice(1, -1).split(",")) {
4931
+ for (const et of N.slice(1, -1).split(",")) {
4889
4932
  const [Jt, Kt = Jt] = et.split(" as ");
4890
4933
  J || r.add(Kt), Ae.push(`${Jt}:${Kt}`);
4891
4934
  }
4892
4935
  if (J) {
4893
4936
  const et = O.oldSingleExportName === void 0 ? `{${Ae.join(",")}}` : Ae[0].split(":")[1];
4894
- a.push([S.index + 6, 0, L.length, et]);
4937
+ a.push([S.index + 6, 0, N.length, et]);
4895
4938
  }
4896
4939
  } else if (q === void 0 && D === void 0)
4897
4940
  J && a.push([S.index + 6, 0, 0, ""]);
@@ -4914,16 +4957,16 @@ ${O.code}`
4914
4957
  e.code = yi(e.code, t);
4915
4958
  return;
4916
4959
  }
4917
- const p = yc(r);
4960
+ const p = Ec(r);
4918
4961
  let f = e.code.slice(0, c);
4919
4962
  for (let S = a.length - 1; S >= 0; S--) {
4920
- const [k, L, q, D] = a[S];
4921
- let N = L, W = "";
4922
- if (L === 0) {
4963
+ const [k, N, q, D] = a[S];
4964
+ let L = N, W = "";
4965
+ if (N === 0) {
4923
4966
  const J = p();
4924
- n.push(J), W = ` ${J} from`, D !== "" ? (N = q + 4, i.push(D)) : i.push("");
4967
+ n.push(J), W = ` ${J} from`, D !== "" ? (L = q + 4, i.push(D)) : i.push("");
4925
4968
  }
4926
- f = f.slice(0, k) + W + f.slice(k + N);
4969
+ f = f.slice(0, k) + W + f.slice(k + L);
4927
4970
  }
4928
4971
  const [m, g] = gi(e), y = i.findLastIndex((S) => S.length > 0), h = i.slice(0, y + 1).join(","), b = `export default $arcgis.t(${i.length === 0 ? "_" : `([${h}])`}=>{`, w = n.join(","), I = `${g}},${w})`;
4929
4972
  let A = e.code.slice(c, m);
@@ -4932,7 +4975,7 @@ ${O.code}`
4932
4975
  e.code = C;
4933
4976
  }
4934
4977
  function gi(e) {
4935
- const t = fc.exec(e.code), i = t?.index ?? e.code.length;
4978
+ const t = wc.exec(e.code), i = t?.index ?? e.code.length;
4936
4979
  let n = "";
4937
4980
  if (t !== null) {
4938
4981
  const s = t[1].split(",");
@@ -4948,7 +4991,7 @@ function gi(e) {
4948
4991
  }
4949
4992
  return [i, n];
4950
4993
  }
4951
- const uc = /import(?:(\{[^}]+\})from|\*as ([\w$]+) from| ([\w$]+) from)?"([^"]+)";/gu, fc = /export\{([^}]+)\};\n$/u, Ve = "@arcgis/core/";
4994
+ const Sc = /import(?:(\{[^}]+\})from|\*as ([\w$]+) from| ([\w$]+) from)?"([^"]+)";/gu, wc = /export\{([^}]+)\};\n$/u, Ve = "@arcgis/core/";
4952
4995
  function _n(e, t) {
4953
4996
  if (!e.startsWith("./"))
4954
4997
  return;
@@ -4960,7 +5003,7 @@ function _n(e, t) {
4960
5003
  return n;
4961
5004
  }
4962
5005
  function yi(e, t) {
4963
- return e.replaceAll(gc, (i, n) => {
5006
+ return e.replaceAll(Tc, (i, n) => {
4964
5007
  if (n.startsWith(Ve))
4965
5008
  return `$arcgis.t(m=>m[0],"${Wn(n.slice(Ve.length))}")`;
4966
5009
  if (n.startsWith("./")) {
@@ -4971,28 +5014,28 @@ function yi(e, t) {
4971
5014
  return i;
4972
5015
  });
4973
5016
  }
4974
- const gc = /(?<![.\w\d])import\("([^"]+)"\)/gu, Wn = (e) => e.endsWith(".js") ? e.slice(0, -3) : e;
4975
- function yc(e) {
5017
+ const Tc = /(?<![.\w\d])import\("([^"]+)"\)/gu, Wn = (e) => e.endsWith(".js") ? e.slice(0, -3) : e;
5018
+ function Ec(e) {
4976
5019
  const t = [wt];
4977
5020
  return () => {
4978
5021
  for (; ; ) {
4979
- const i = bc(t);
4980
- if (Sc(t), !e.has(i))
5022
+ const i = Pc(t);
5023
+ if (xc(t), !e.has(i))
4981
5024
  return e.add(i), i;
4982
5025
  }
4983
5026
  };
4984
5027
  }
4985
- const wt = 0, Rt = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_", Hn = `${Rt}0123456789`, hc = Rt.length, vc = Hn.length;
4986
- function bc(e) {
5028
+ const wt = 0, Rt = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_", Hn = `${Rt}0123456789`, Cc = Rt.length, $c = Hn.length;
5029
+ function Pc(e) {
4987
5030
  let t = Rt[e[0]];
4988
5031
  for (let i = 1; i < e.length; i++)
4989
5032
  t += Hn[e[i]];
4990
5033
  return t;
4991
5034
  }
4992
- function Sc(e) {
5035
+ function xc(e) {
4993
5036
  let t = e.length - 1;
4994
5037
  for (; t >= 0; ) {
4995
- const i = t === 0 ? hc : vc;
5038
+ const i = t === 0 ? Cc : $c;
4996
5039
  if (e[t] += 1, e[t] >= i)
4997
5040
  e[t] = wt, t--;
4998
5041
  else
@@ -5000,7 +5043,7 @@ function Sc(e) {
5000
5043
  }
5001
5044
  e.push(wt);
5002
5045
  }
5003
- async function wc(e, t, i, n, s) {
5046
+ async function Ic(e, t, i, n, s) {
5004
5047
  const r = t.packageName, { hasCss: a, cdnName: c } = await Un(t.packageLocation) ?? {};
5005
5048
  if (i === "cdn") {
5006
5049
  const f = t.cdnUrl ?? Xe(t.packageJson, s);
@@ -5038,7 +5081,7 @@ async function wc(e, t, i, n, s) {
5038
5081
  ...l,
5039
5082
  `import { defineCustomElements as defineCustomElements$${n} } from "${p}";`,
5040
5083
  `defineCustomElements$${n}(globalThis.window, {`,
5041
- ` resourcesUrl: "${Nt(e, t.packageLocation)}/dist/${c}/",`,
5084
+ ` resourcesUrl: "${Lt(e, t.packageLocation)}/dist/${c}/",`,
5042
5085
  "});"
5043
5086
  ]
5044
5087
  }
@@ -5066,7 +5109,7 @@ async function hi(e, t) {
5066
5109
  cdnName: t
5067
5110
  } : void 0;
5068
5111
  }
5069
- async function Tc(e, t, i, n, s) {
5112
+ async function kc(e, t, i, n, s) {
5070
5113
  const a = t.packageJson.exports?.[`./${ne}.css`] === void 0 ? await Un(t.packageLocation) : void 0, c = a?.cdnName ?? xe, d = a === void 0 ? `${Kn}.js` : `${a.cdnName}.esm.js`;
5071
5114
  if (i === "cdn")
5072
5115
  return {
@@ -5076,7 +5119,7 @@ async function Tc(e, t, i, n, s) {
5076
5119
  src: `${t.cdnUrl ?? Xe(t.packageJson, s)}${d}`
5077
5120
  }
5078
5121
  };
5079
- const l = Ec(t.packageJson), p = `${t.packageName}/${u.normalize(l)}${ie}`, f = [
5122
+ const l = Ac(t.packageJson), p = `${t.packageName}/${u.normalize(l)}${ie}`, f = [
5080
5123
  `import styles$${n} from "${p}";`,
5081
5124
  `document.adoptedStyleSheets = [...document.adoptedStyleSheets, styles$${n}.styleSheet];`
5082
5125
  ], m = `${t.packageName}/loader`;
@@ -5090,12 +5133,12 @@ async function Tc(e, t, i, n, s) {
5090
5133
  ...f,
5091
5134
  `import { defineCustomElements as defineCustomElements$${n} } from "${m}";`,
5092
5135
  `defineCustomElements$${n}({`,
5093
- ` resourcesUrl: "${Nt(e, t.packageLocation)}/dist/${c}/",`,
5136
+ ` resourcesUrl: "${Lt(e, t.packageLocation)}/dist/${c}/",`,
5094
5137
  "});"
5095
5138
  ]
5096
5139
  };
5097
5140
  }
5098
- function Ec(e) {
5141
+ function Ac(e) {
5099
5142
  const { exports: t } = e;
5100
5143
  if (t === void 0)
5101
5144
  throw new Error(
@@ -5105,19 +5148,19 @@ function Ec(e) {
5105
5148
  return n ? n[0] : i.length > 0 ? i[0][0] : `./${ne}.css`;
5106
5149
  }
5107
5150
  async function Ee(e) {
5108
- return e._loadersCache ??= Cc(e), await e._loadersCache;
5151
+ return e._loadersCache ??= Nc(e), await e._loadersCache;
5109
5152
  }
5110
- async function Cc(e) {
5153
+ async function Nc(e) {
5111
5154
  const t = e.viteCommand === "build" ? "cdn" : "lazyNpm", i = e.environment === "development", n = e.viteConfig.base;
5112
5155
  let s = 0;
5113
5156
  const r = async (l) => (await Promise.all(
5114
5157
  l.map(async (p) => {
5115
5158
  const f = s++;
5116
- return p.type === "stencil" ? await wc(n, p, t, f, i) : p.type === "@arcgis/lumina" ? await Tc(n, p, t, f, i) : void 0;
5159
+ return p.type === "stencil" ? await Ic(n, p, t, f, i) : p.type === "@arcgis/lumina" ? await kc(n, p, t, f, i) : void 0;
5117
5160
  })
5118
5161
  )).filter(j).flat(), a = await Promise.all([
5119
5162
  // This may contain an import map so must be first
5120
- oc(n, t, i),
5163
+ uc(n, t, i),
5121
5164
  le.then(r),
5122
5165
  zn(e).then(r)
5123
5166
  ]), c = u.join(e.dir.src, "loader.ts");
@@ -5157,8 +5200,8 @@ async function zn(e) {
5157
5200
  })
5158
5201
  ).then((i) => i.filter(j)), await e._serveOnlyDependencies);
5159
5202
  }
5160
- const $c = "/@arcgis/lumina-compiler/testSetupFile", Pc = /^\/@arcgis\/lumina-compiler\/testSetupFile/u, pt = [$c];
5161
- async function xc(e) {
5203
+ const Lc = "/@arcgis/lumina-compiler/testSetupFile", Fc = /^\/@arcgis\/lumina-compiler\/testSetupFile/u, pt = [Lc];
5204
+ async function jc(e) {
5162
5205
  if (
5163
5206
  /**
5164
5207
  * Only import custom element dependencies if we are running in Vitest browser mode.
@@ -5196,12 +5239,12 @@ async function xc(e) {
5196
5239
  `);
5197
5240
  return [vi(e), i].join("");
5198
5241
  }
5199
- const vi = (e) => [e.isInPuppeteerTestBackEnd ? Ic : "", kc].join(""), Ic = `import { setupPuppeteerTest } from "@arcgis/lumina-compiler/puppeteerTesting";
5242
+ const vi = (e) => [e.isInPuppeteerTestBackEnd ? Dc : "", Rc].join(""), Dc = `import { setupPuppeteerTest } from "@arcgis/lumina-compiler/puppeteerTesting";
5200
5243
  setupPuppeteerTest();
5201
- `, kc = `import { setupLuminaTest } from "@arcgis/lumina-compiler/testing";
5244
+ `, Rc = `import { setupLuminaTest } from "@arcgis/lumina-compiler/testing";
5202
5245
  setupLuminaTest();
5203
5246
  `;
5204
- function Ac(e) {
5247
+ function Oc(e) {
5205
5248
  let t = !1, i, n;
5206
5249
  const s = /[\\\/]src[\\\/]loader\.ts$/u, r = "@arcgis/lumina:generateLoaderTs", a = {
5207
5250
  name: r,
@@ -5223,11 +5266,11 @@ function Ac(e) {
5223
5266
  id: s
5224
5267
  },
5225
5268
  async handler() {
5226
- return i === void 0 && e.apiJsonEnabled && (i = jo(e, t), t = !0, await i, e.apiJsonDeferred.resolve()), so(e);
5269
+ return i === void 0 && e.apiJsonEnabled && (i = Ro(e, t), t = !0, await i, e.apiJsonDeferred.resolve()), ro(e);
5227
5270
  }
5228
5271
  },
5229
5272
  async writeBundle() {
5230
- e.isInStorybook || await F(u.join(e.dir.dist, "loader.d.ts"), ro);
5273
+ e.isInStorybook || await F(u.join(e.dir.dist, "loader.d.ts"), oo);
5231
5274
  },
5232
5275
  async handleHotUpdate({ file: m, modules: g, read: y }) {
5233
5276
  const h = await c(m, y);
@@ -5287,7 +5330,7 @@ function Ac(e) {
5287
5330
  if (!we(m, e.dir.srcComponents))
5288
5331
  return;
5289
5332
  y ??= await g();
5290
- const v = Do(e, m, y);
5333
+ const v = Oo(e, m, y);
5291
5334
  if (v === void 0)
5292
5335
  return !1;
5293
5336
  for (const b of v) {
@@ -5311,9 +5354,9 @@ function Ac(e) {
5311
5354
  name: "@arcgis/lumina:generateTestSetupVirtualFile",
5312
5355
  load: {
5313
5356
  filter: {
5314
- id: Pc
5357
+ id: Fc
5315
5358
  },
5316
- handler: async () => await xc(e)
5359
+ handler: async () => await jc(e)
5317
5360
  }
5318
5361
  }];
5319
5362
  }
@@ -5323,12 +5366,12 @@ function he(e, t, i = Ot) {
5323
5366
  throw Error(E(Tt, "serveAssets() is only available when Vite is running in serve mode"));
5324
5367
  const n = e._serverConfigured, s = e.server.middlewares.stack.length;
5325
5368
  if (t.forEach((r) => {
5326
- const a = Vn(r), c = Xn(e.dir, Gn(a)), d = Nc(e.viteConfig.base, c, e.dir.distCdn);
5369
+ const a = Vn(r), c = Xn(e.dir, Gn(a)), d = Jc(e.viteConfig.base, c, e.dir.distCdn);
5327
5370
  e.server.middlewares.use(d, (l, p, f) => {
5328
- const m = Fc(l.url), g = a.type === "directory" ? u.resolve(a.source, m.slice(1)) : a.source, y = u.join(c, m), h = i.find((v) => v.match(y, e));
5371
+ const m = Kc(l.url), g = a.type === "directory" ? u.resolve(a.source, m.slice(1)) : a.source, y = u.join(c, m), h = i.find((v) => v.match(y, e));
5329
5372
  return (typeof g == "function" ? Promise.resolve(g()) : B(g)).then((v) => {
5330
5373
  const b = (typeof g == "function" ? void 0 : h?.transform(v.toString("utf8"), y, e)) ?? v;
5331
- p.setHeader("Cache-Control", "max-age=31536000, immutable"), p.setHeader("Content-Type", Ns.lookup(m) || "application/octet-stream"), p.write(b), p.end();
5374
+ p.setHeader("Cache-Control", "max-age=31536000, immutable"), p.setHeader("Content-Type", Ls.lookup(m) || "application/octet-stream"), p.write(b), p.end();
5332
5375
  }).catch((v) => {
5333
5376
  (a.type !== "directory" || process.env.DEBUG) && T.warn(
5334
5377
  Tt,
@@ -5365,7 +5408,7 @@ async function qn(e, t, i = Ot) {
5365
5408
  })
5366
5409
  );
5367
5410
  }
5368
- const Vn = Ni ? (e) => e : (e) => e.type === "dynamic" ? {
5411
+ const Vn = Li ? (e) => e : (e) => e.type === "dynamic" ? {
5369
5412
  ...e,
5370
5413
  destination: De(e.destination)
5371
5414
  } : {
@@ -5398,33 +5441,33 @@ function Gn(e) {
5398
5441
  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;
5399
5442
  }
5400
5443
  function Xn({ dist: e, distCdnAssets: t }, i) {
5401
- const n = Lc(i), s = u.join(
5444
+ const n = Mc(i), s = u.join(
5402
5445
  t,
5403
5446
  n ? u.relative(t, i) : i
5404
5447
  ), r = u.relative(e, s), a = Qn(r);
5405
5448
  return u.join(e, a);
5406
5449
  }
5407
- function Lc(e) {
5450
+ function Mc(e) {
5408
5451
  if (e.startsWith(u.sep)) {
5409
5452
  const t = Fi(), i = t.startsWith(u.sep) ? t.split(u.sep)[1] ?? "" : "";
5410
5453
  return e.startsWith(`/${i}/`) || e.startsWith("/Users/");
5411
5454
  } else
5412
- return !!(!Ni && u.isAbsolute(e));
5455
+ return !!(!Li && u.isAbsolute(e));
5413
5456
  }
5414
- function Nc(e, t, i) {
5457
+ function Jc(e, t, i) {
5415
5458
  const n = Qn(u.relative(i, t)), s = n.startsWith("/") ? n.slice(1) : n;
5416
5459
  return `${e}${s}`;
5417
5460
  }
5418
- const Qn = (e) => e.replaceAll("../", ""), Fc = (e = "") => e.split("?")[0].split("#")[0];
5461
+ const Qn = (e) => e.replaceAll("../", ""), Kc = (e = "") => e.split("?")[0].split("#")[0];
5419
5462
  async function Zn(e) {
5420
5463
  const t = new Set(e.map(u.dirname));
5421
5464
  await Promise.all(Array.from(t, async (i) => await ee(i, { recursive: !0 })));
5422
5465
  }
5423
- const jc = {
5466
+ const Bc = {
5424
5467
  match: (e, t) => t.environment === "production" && e.endsWith(".json"),
5425
5468
  transform: (e) => JSON.stringify(JSON.parse(e))
5426
- }, Ot = [jc];
5427
- function Dc(e) {
5469
+ }, Ot = [Bc];
5470
+ function _c(e) {
5428
5471
  let t;
5429
5472
  const i = () => [
5430
5473
  ...e.options.assets?.transformers ?? [],
@@ -5478,7 +5521,7 @@ const Yn = (e, t) => ({
5478
5521
  type: "directory",
5479
5522
  source: e,
5480
5523
  destination: u.basename(t)
5481
- }), es = { type: "directory", source: "assets/", destination: "" }, mt = "@arcgis/lumina:printTotalBuildSize", Rc = (e) => ({
5524
+ }), es = { type: "directory", source: "assets/", destination: "" }, mt = "@arcgis/lumina:printTotalBuildSize", Wc = (e) => ({
5482
5525
  name: mt,
5483
5526
  apply: () => e.viteCommand === "build",
5484
5527
  configResolved(t) {
@@ -5497,10 +5540,10 @@ const Yn = (e, t) => ({
5497
5540
  const f = console.log;
5498
5541
  console.log = function(...g) {
5499
5542
  if (f.apply(console, g), g.length === 1 && typeof g[0] == "string") {
5500
- const [y, h] = g[0].match(Mc) ?? [];
5543
+ const [y, h] = g[0].match(Uc) ?? [];
5501
5544
  if (!y)
5502
5545
  return;
5503
- p || (p = g[0].slice(0, g[0].indexOf(y) + y.length).replaceAll(Jc, "").length);
5546
+ p || (p = g[0].slice(0, g[0].indexOf(y) + y.length).replaceAll(zc, "").length);
5504
5547
  const v = Number.parseFloat(y.replace(" kB", "").replaceAll(",", ""));
5505
5548
  h ? (l += Number.parseFloat(h.replace(" kB", "").replaceAll(",", "")), d += v) : c += v;
5506
5549
  }
@@ -5516,7 +5559,7 @@ const Yn = (e, t) => ({
5516
5559
  [
5517
5560
  Ti,
5518
5561
  h,
5519
- Oc,
5562
+ Hc,
5520
5563
  "*",
5521
5564
  " ".repeat(p - `${h}*`.length - y.length),
5522
5565
  y,
@@ -5527,10 +5570,10 @@ const Yn = (e, t) => ({
5527
5570
  }
5528
5571
  };
5529
5572
  }
5530
- }), wi = "\x1B[22m\x1B[1m\x1B[22m", Ti = "\x1B[2m", Oc = "\x1B[22m\x1B[36m", Mc = /\d+(?:,\d+)?\.\d{2} kB/gu, Jc = /\x1B\[\d+m/gu, Kc = new Intl.NumberFormat("en", {
5573
+ }), wi = "\x1B[22m\x1B[1m\x1B[22m", Ti = "\x1B[2m", Hc = "\x1B[22m\x1B[36m", Uc = /\d+(?:,\d+)?\.\d{2} kB/gu, zc = /\x1B\[\d+m/gu, qc = new Intl.NumberFormat("en", {
5531
5574
  maximumFractionDigits: 2,
5532
5575
  minimumFractionDigits: 2
5533
- }), Ei = (e) => `${Kc.format(e)} kB`, Ci = "@arcgis/lumina:configureVite", Bc = (e) => ({
5576
+ }), Ei = (e) => `${qc.format(e)} kB`, Ci = "@arcgis/lumina:configureVite", Vc = (e) => ({
5534
5577
  name: Ci,
5535
5578
  async config({
5536
5579
  server: t,
@@ -5732,18 +5775,18 @@ const Yn = (e, t) => ({
5732
5775
  n[r] = s;
5733
5776
  }), t.input = n;
5734
5777
  }
5735
- }), _c = (e) => ({
5778
+ }), Gc = (e) => ({
5736
5779
  name: "@arcgis/lumina:setAssetPath",
5737
5780
  apply: () => e.viteCommand === "build",
5738
5781
  config: (t) => ({
5739
5782
  base: t.base ?? e.options.assets?.defaultPath ?? Xe()
5740
5783
  })
5741
5784
  });
5742
- function Wc(e = R()) {
5785
+ function Xc(e = R()) {
5743
5786
  const t = e.version ?? "0.0.1";
5744
5787
  return hs(t);
5745
5788
  }
5746
- const Hc = (e) => `/*! ${e} */`, P = (e) => (t, i) => {
5789
+ const Qc = (e) => `/*! ${e} */`, P = (e) => (t, i) => {
5747
5790
  Object.defineProperty(t, i, {
5748
5791
  get() {
5749
5792
  throw Error(
@@ -5783,7 +5826,7 @@ const ye = {
5783
5826
  stencilLikeDocsJson: "docs/docs.json"
5784
5827
  };
5785
5828
  async function ts(e, t, i, n, s = R()) {
5786
- const r = Uc(e, i, s), a = u.join(t, "lumina.ts"), d = await U(a) ? await B(a, "utf8") : "";
5829
+ const r = Zc(e, i, s), a = u.join(t, "lumina.ts"), d = await U(a) ? await B(a, "utf8") : "";
5787
5830
  if (d.trim().replaceAll(`\r
5788
5831
  `, `
5789
5832
  `) === r.trim())
@@ -5803,7 +5846,7 @@ ${d}`
5803
5846
  );
5804
5847
  return Mi(a, r), !0;
5805
5848
  }
5806
- function Uc(e, t, i = R()) {
5849
+ function Zc(e, t, i = R()) {
5807
5850
  const n = e.filter((l) => l.type === "@arcgis/lumina").map((l) => `
5808
5851
  /// <reference types="${l.packageName}/types/lumina" />`), s = e.filter((l) => l.type === "stencil"), r = s.map(
5809
5852
  (l, p) => `
@@ -5814,11 +5857,11 @@ declare module "@arcgis/lumina" {
5814
5857
  interface ImportStencilElements extends ${s.map((l, p) => `JSX$${p}.IntrinsicElements`).join(", ")} {}
5815
5858
  }`, c = i.devDependencies ?? {};
5816
5859
  return [
5817
- zc,
5860
+ Yc,
5818
5861
  // Avoid cyclic references for tests in @arcgis/lumina
5819
5862
  i.name === "@arcgis/lumina" ? "" : `
5820
5863
  /// <reference types="@arcgis/lumina/typings" />`,
5821
- t ? qc : "",
5864
+ t ? el : "",
5822
5865
  c.vitest ? `
5823
5866
  /// <reference types="vitest/config" />
5824
5867
  /// <reference types="vitest/browser" />` : "",
@@ -5829,7 +5872,7 @@ declare module "@arcgis/lumina" {
5829
5872
  `
5830
5873
  ].join("");
5831
5874
  }
5832
- const zc = `/**
5875
+ const Yc = `/**
5833
5876
  * This file is autogenerated by \`@arcgis/lumina-compiler\` - do not edit it manually.
5834
5877
  * Manual edits will be overwritten.
5835
5878
  *
@@ -5837,7 +5880,7 @@ const zc = `/**
5837
5880
  * as well as @arcgis/core typings if you use @arcgis/core.
5838
5881
  *
5839
5882
  * If you need to provide additional typings, create a separate file.
5840
- */`, qc = `
5883
+ */`, el = `
5841
5884
  /// <reference types="@arcgis/core/interfaces" />`, Je = "@arcgis/lumina:dependencySupport", is = (e, t) => e.viteCommand === "serve" && /**
5842
5885
  * Vitest started calling transformIndexHtml in browser mode versions ^2.1.4
5843
5886
  * However, it is a bit buggy (see
@@ -5849,10 +5892,10 @@ const zc = `/**
5849
5892
  * is doing:
5850
5893
  * https://github.com/storybookjs/storybook/blob/a5c2cf1712f70b4e3ecf38d3c98e7db8e8d67849/code/builders/builder-vite/src/plugins/code-generator-plugin.ts#L110
5851
5894
  */
5852
- e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand === "build" && !e.options.build?.cdn?.skip && e.options.build?.webApp?.destination !== void 0, Vc = (e) => ({
5895
+ e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand === "build" && !e.options.build?.cdn?.skip && e.options.build?.webApp?.destination !== void 0, tl = (e) => ({
5853
5896
  name: Je,
5854
5897
  configResolved() {
5855
- !e.isInTest && !e.isInStorybook && (e._updateLuminaTsPromise = Gc(e).catch(
5898
+ !e.isInTest && !e.isInStorybook && (e._updateLuminaTsPromise = il(e).catch(
5856
5899
  (t) => T.error(Je, `Failed to update package's src/lumina.ts: ${String(t)}`)
5857
5900
  ));
5858
5901
  },
@@ -5902,28 +5945,28 @@ e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand
5902
5945
  await e._updateLuminaTsPromise;
5903
5946
  }
5904
5947
  });
5905
- async function Gc(e) {
5948
+ async function il(e) {
5906
5949
  const i = (await Promise.all([le, zn(e)])).flat();
5907
5950
  if (!await ts(i, e.dir.src, Pe))
5908
5951
  return;
5909
5952
  let s = !1;
5910
5953
  function r() {
5911
- s || T.warn(Je, Xc), s = !0;
5954
+ s || T.warn(Je, nl), s = !0;
5912
5955
  }
5913
5956
  process.on("exit", () => {
5914
5957
  r(), clearTimeout(c);
5915
5958
  });
5916
5959
  const c = setTimeout(r, 2e3);
5917
5960
  }
5918
- const Xc = Fs.greenBright(
5961
+ const nl = Fs.greenBright(
5919
5962
  `lumina.ts has been updated (potentially because your dependencies changed). Please commit the updated file.
5920
5963
  If build failed with TypeScript errors, try running the build again to check whether new lumina.ts resolves the errors.`
5921
5964
  );
5922
- async function Qc(e, t) {
5965
+ async function sl(e, t) {
5923
5966
  const i = /* @__PURE__ */ new Map();
5924
5967
  await Promise.all(
5925
5968
  e.map(async (s) => {
5926
- const r = await js(s, "utf-8"), a = r.match(Zc)?.[1];
5969
+ const r = await js(s, "utf-8"), a = r.match(rl)?.[1];
5927
5970
  if (a === void 0) {
5928
5971
  T.warn(
5929
5972
  "@arcgis/lumina:parseStoryFiles",
@@ -5935,14 +5978,14 @@ async function Qc(e, t) {
5935
5978
  let c = i.get(a);
5936
5979
  c === void 0 && (c = [], i.set(a, c));
5937
5980
  const d = [];
5938
- for (const l of r.matchAll(Yc)) {
5939
- const p = l[1], f = nl(p), m = r.indexOf("{", l.index), g = r.indexOf("}", m), y = r.slice(0, l.index).trimEnd();
5981
+ for (const l of r.matchAll(ol)) {
5982
+ const p = l[1], f = dl(p), m = r.indexOf("{", l.index), g = r.indexOf("}", m), y = r.slice(0, l.index).trimEnd();
5940
5983
  let h = "";
5941
5984
  if (y.endsWith("*/")) {
5942
5985
  const w = y.lastIndexOf("/**");
5943
- h = y.slice(w + 3, -2).trim().replaceAll(tl, "");
5986
+ h = y.slice(w + 3, -2).trim().replaceAll(cl, "");
5944
5987
  }
5945
- const v = r.slice(m, g).match(el)?.[1] || f, b = il(f);
5988
+ const v = r.slice(m, g).match(al)?.[1] || f, b = ll(f);
5946
5989
  d.push({
5947
5990
  description: `${v}${h ? `
5948
5991
  ${h}` : ""}`,
@@ -5967,11 +6010,13 @@ ${h}` : ""}`,
5967
6010
  }
5968
6011
  return n;
5969
6012
  }
5970
- const Zc = /component: ["']([^"']+)["']/u, Yc = /export const (\w+)/gu, el = /name: ["']([^"']+)["']/u, tl = /^\s*\*\s?/gmu, il = (e) => e.toLowerCase().replace(/[ ’–—―′¿'`~!@#$%^&*()_|+\-=?;:'",.<>{}[\]\\/]/giu, "-").replace(/-+/gu, "-").replace(/^-+/u, "").replace(/-+$/u, ""), nl = (e) => e.replace(/_/gu, " ").replace(/-/gu, " ").replace(/\./gu, " ").replace(/([^\n])([A-Z])([a-z])/gu, (t, i, n, s) => `${i} ${n}${s}`).replace(/([a-z])([A-Z])/gu, (t, i, n) => `${i} ${n}`).replace(/([a-z])([0-9])/giu, (t, i, n) => `${i} ${n}`).replace(/([0-9])([a-z])/giu, (t, i, n) => `${i} ${n}`).replace(/(\s|^)(\w)/gu, (t, i, n) => `${i}${n.toUpperCase()}`).replace(/ +/gu, " ").trim(), G = { node: "^24.11" };
5971
- var sl = Object.defineProperty, x = (e, t, i, n) => {
6013
+ const rl = /component: ["']([^"']+)["']/u, ol = /export const (\w+)/gu, al = /name: ["']([^"']+)["']/u, cl = /^\s*\*\s?/gmu, ll = (e) => e.toLowerCase().replace(/[ ’–—―′¿'`~!@#$%^&*()_|+\-=?;:'",.<>{}[\]\\/]/giu, "-").replace(/-+/gu, "-").replace(/^-+/u, "").replace(/-+$/u, ""), dl = (e) => e.replace(/_/gu, " ").replace(/-/gu, " ").replace(/\./gu, " ").replace(/([^\n])([A-Z])([a-z])/gu, (t, i, n, s) => `${i} ${n}${s}`).replace(/([a-z])([A-Z])/gu, (t, i, n) => `${i} ${n}`).replace(/([a-z])([0-9])/giu, (t, i, n) => `${i} ${n}`).replace(/([0-9])([a-z])/giu, (t, i, n) => `${i} ${n}`).replace(/(\s|^)(\w)/gu, (t, i, n) => `${i}${n.toUpperCase()}`).replace(/ +/gu, " ").trim(), pl = { node: "^24.11" }, G = {
6014
+ engines: pl
6015
+ };
6016
+ var ml = Object.defineProperty, x = (e, t, i, n) => {
5972
6017
  for (var s = void 0, r = e.length - 1, a; r >= 0; r--)
5973
6018
  (a = e[r]) && (s = a(t, i, s) || s);
5974
- return s && sl(t, i, s), s;
6019
+ return s && ml(t, i, s), s;
5975
6020
  };
5976
6021
  const H = "@arcgis/lumina:context";
5977
6022
  class $ {
@@ -6012,7 +6057,7 @@ class $ {
6012
6057
  "Vite output directory is outside the root directory. This is not officially supported by Lumina and may lead to unexpected behavior. Contact Lumina maintainers if you need this to be supported."
6013
6058
  ), this.isInStorybook = l.resolve.conditions.includes("storybook"), this.isFullApiExtraction = this.viteCommand === "build" || this.isInStorybook, this.hmrEnabled = this.viteCommand === "serve" && !this.isInTest && !!(l.server?.hmr ?? !0), this.isInBuildWatch = l.command === "build" && l.build.watch != null;
6014
6059
  const I = this.isInTest && l.test?.browser?.enabled === !0 && l.resolve.conditions.includes("node"), A = this.isInTest && l.test?.browser?.enabled !== !0 && l.resolve.conditions.includes("node");
6015
- this.apiJsonEnabled = !I && !this.isInPuppeteerTestBackEnd && !A, this.apiJsonEnabled || (this._localDefinedComponents = {}, this.options.build ??= {}, this.options.build.dependencies ??= {}, this.options.build.dependencies.silenceUnknownJsxElementUsage = () => !0, this.typeScriptHost = o.createCompilerHost({}, !1)), this._startCollectingComponentStories(), rc(this, l.build.sourcemap !== !1), is(this) && Ee(this);
6060
+ this.apiJsonEnabled = !I && !this.isInPuppeteerTestBackEnd && !A, this.apiJsonEnabled || (this._localDefinedComponents = {}, this.options.build ??= {}, this.options.build.dependencies ??= {}, this.options.build.dependencies.silenceUnknownJsxElementUsage = () => !0, this.typeScriptHost = o.createCompilerHost({}, !1)), this._startCollectingComponentStories(), mc(this, l.build.sourcemap !== !1), is(this) && Ee(this);
6016
6061
  }
6017
6062
  },
6018
6063
  configureServer: {
@@ -6035,17 +6080,17 @@ class $ {
6035
6080
  }
6036
6081
  }, this._localDefinedComponents = void 0, this._cssImports = /* @__PURE__ */ new Map(), this._cssDocs = void 0, this.isInCi = !!process.env.CI, this._declarationTextTransformers = [], this._serverConfigured = !1, this.assetsToProvide = [], this._globalCssString = void 0, this._loadersCache = void 0, this._serveOnlyDependencies = void 0, this._customElementDependencies = /* @__PURE__ */ Object.create(null), this._htmlElementReferencesReplacer = void 0, this._silencedRules = void 0, this._updateLuminaTsPromise = void 0, this._didCallOptions = !1, this._originalRollupInputOptions = void 0, this.options = t;
6037
6082
  const i = 3;
6038
- (!G.node.startsWith("^") || G.node[i] !== ".") && T.error(
6083
+ (!G.engines.node.startsWith("^") || G.engines.node[i] !== ".") && T.error(
6039
6084
  H,
6040
- `Unsupported Node.js version syntax used in monorepo's package.json. Expected "^NN.NN", got "${G.node}". Update @arcgis/lumina-compiler to support this syntax.`
6085
+ `Unsupported Node.js version syntax used in monorepo's package.json. Expected "^NN.NN", got "${G.engines.node}". Update @arcgis/lumina-compiler to support this syntax.`
6041
6086
  );
6042
- const n = Number.parseInt(G.node.slice(1, i)), s = Number.parseInt(G.node.slice(i + 1)), r = Number.parseInt(process.version.slice(1, i)), a = Number.parseInt(process.version.slice(i + 1));
6087
+ const n = Number.parseInt(G.engines.node.slice(1, i)), s = Number.parseInt(G.engines.node.slice(i + 1)), r = Number.parseInt(process.version.slice(1, i)), a = Number.parseInt(process.version.slice(i + 1));
6043
6088
  r < n || r === n && a < s ? T.warn(
6044
6089
  H,
6045
- `Lumina requires Node.js version ${G.node}. Current version is ${process.version}. Some features may not work as expected.`
6090
+ `Lumina requires Node.js version ${G.engines.node}. Current version is ${process.version}. Some features may not work as expected.`
6046
6091
  ) : r > n && T.info(
6047
6092
  H,
6048
- `Lumina was tested with Node.js version ${G.node}. Current version is ${process.version}. Some features may not work as expected.`
6093
+ `Lumina was tested with Node.js version ${G.engines.node}. Current version is ${process.version}. Some features may not work as expected.`
6049
6094
  );
6050
6095
  const c = t.documentation ?? {};
6051
6096
  this._documentationFileNames = {
@@ -6054,18 +6099,18 @@ class $ {
6054
6099
  webTypes: c.jetBrains === !1 ? void 0 : c.jetBrains?.webTypesFileName ? ge(c.jetBrains.webTypesFileName) : ye.webTypes,
6055
6100
  vsCodeHtml: c.vsCode === !1 ? void 0 : c.vsCode?.htmlFileName ? ge(c.vsCode.htmlFileName) : ye.vsCodeHtml,
6056
6101
  vsCodeCss: c.vsCode === !1 ? void 0 : c.vsCode?.cssFileName ? ge(c.vsCode.cssFileName) : ye.vsCodeCss
6057
- }, vn(void 0, t), this.componentFilesPromise = We(this, u.resolve("src/components")), sc(this);
6058
- const d = t.build?.preamble ?? Wc();
6059
- this.banner = Hc(d);
6102
+ }, vn(void 0, t), this.componentFilesPromise = We(this, u.resolve("src/components")), pc(this);
6103
+ const d = t.build?.preamble ?? Xc();
6104
+ this.banner = Qc(d);
6060
6105
  }
6061
6106
  _startCollectingComponentStories() {
6062
6107
  const t = this.options.documentation?.publicStoryUrlPrefix;
6063
- this.isFullApiExtraction && typeof t == "string" ? this.componentStoriesPromise = this.componentFilesPromise.then(async () => await Qc(this.componentStoryFiles, t)).then((i) => {
6108
+ this.isFullApiExtraction && typeof t == "string" ? this.componentStoriesPromise = this.componentFilesPromise.then(async () => await sl(this.componentStoryFiles, t)).then((i) => {
6064
6109
  this.componentStories = i;
6065
6110
  }) : (this.componentStoriesPromise = void 0, this.componentStories = void 0);
6066
6111
  }
6067
6112
  _inferBuildSetup({ command: t, mode: i }, n) {
6068
- this.isInTest = process.env.NODE_ENV === "test", i === "production" || i === "development" ? this.environment = i : i === "test" || i === "benchmark" ? (this.environment = "development", this.isInTest = !0) : (T.warn(At, `Vite is running in unknown mode "${i}". Assuming development`), this.environment = "development"), this.viteCommand = t;
6113
+ this.isInTest = process.env.NODE_ENV === "test", i === "production" || i === "development" ? this.environment = i : i === "test" || i === "benchmark" ? (this.environment = "development", this.isInTest = !0) : (T.warn(At.name, `Vite is running in unknown mode "${i}". Assuming development`), this.environment = "development"), this.viteCommand = t;
6069
6114
  const s = n?.__IS_IN_PUPPETEER__ === !0, r = this.viteCommand === "serve" && this.isInTest && this.options.puppeteerTesting?.enabled === !0;
6070
6115
  this.isInPuppeteerTestBackEnd = r && !s, this.isInPuppeteerTestFrontEnd = r && s;
6071
6116
  }
@@ -6229,8 +6274,8 @@ x([
6229
6274
  x([
6230
6275
  P("configResolved()")
6231
6276
  ], $.prototype, "_typeScriptPrinter");
6232
- const $i = "makeRuntime(", rl = "@arcgis/core", ol = "@arcgis/lumina:injectRuntimeOptions", al = (e) => ({
6233
- name: ol,
6277
+ const $i = "makeRuntime(", ul = "@arcgis/core", fl = "@arcgis/lumina:injectRuntimeOptions", gl = (e) => ({
6278
+ name: fl,
6234
6279
  transform: {
6235
6280
  filter: {
6236
6281
  id: /\/src\/runtime\.ts$/u
@@ -6255,7 +6300,7 @@ const $i = "makeRuntime(", rl = "@arcgis/core", ol = "@arcgis/lumina:injectRunti
6255
6300
  "}",
6256
6301
  t.slice(s),
6257
6302
  Pe ? `
6258
- import {createObservable,trackAccess,createTrackingTarget,runTracked} from "${rl}/applications/Components/reactiveUtils.js";
6303
+ import {createObservable,trackAccess,createTrackingTarget,runTracked} from "${ul}/applications/Components/reactiveUtils.js";
6259
6304
  createObservable,
6260
6305
  runtime.t = trackAccess;
6261
6306
  runtime.o = createObservable;
@@ -6267,11 +6312,11 @@ runtime.r = runTracked;` : ""
6267
6312
  }
6268
6313
  }
6269
6314
  });
6270
- function cl(e) {
6315
+ function yl(e) {
6271
6316
  return `import "../${e.options.build?.cdn?.namespace === void 0 ? `${xe}/${ne}.css` : `${e.options.build.cdn.namespace}/${e.options.build.cdn.namespace}.css`}";
6272
6317
  `;
6273
6318
  }
6274
- const je = "@arcgis/lumina:addNonLazyImports", ll = (e) => ({
6319
+ const je = "@arcgis/lumina:addNonLazyImports", hl = (e) => ({
6275
6320
  name: je,
6276
6321
  apply: () => e.viteCommand === "build",
6277
6322
  generateBundle(t, i) {
@@ -6281,7 +6326,7 @@ const je = "@arcgis/lumina:addNonLazyImports", ll = (e) => ({
6281
6326
  if (a !== s && (r.fileName = a), r.type === "chunk") {
6282
6327
  const c = u.dirname(u.join(e.dir.dist, s)), d = a === s ? c : u.dirname(u.join(e.dir.dist, a));
6283
6328
  let l = r.code;
6284
- l = Bi(l, e, d, c), !e.isInStorybook && a === "chunks/runtime.js" && (n = !0, l = cl(e) + l), r.code = l;
6329
+ l = Bi(l, e, d, c), !e.isInStorybook && a === "chunks/runtime.js" && (n = !0, l = yl(e) + l), r.code = l;
6285
6330
  }
6286
6331
  }), !n && !e.isInStorybook)
6287
6332
  throw Error(E(je, "Expected to find a chunks/runtime.js file in the Vite's build output."));
@@ -6318,12 +6363,12 @@ Possible causes:
6318
6363
  return [];
6319
6364
  const d = u.dirname(r), l = be(d, e.dir.srcComponents, e), p = u.relative(e.dir.src, l);
6320
6365
  function f(S) {
6321
- const k = Oa(e, S, r);
6366
+ const k = Ha(e, S, r);
6322
6367
  if (k === void 0)
6323
6368
  return;
6324
- const L = Ma(k, p);
6325
- if (L !== `./${p}`)
6326
- return L.startsWith(".") ? `${L}/${Pi}` : L;
6369
+ const N = Ua(k, p);
6370
+ if (N !== `./${p}`)
6371
+ return N.startsWith(".") ? `${N}/${Pi}` : N;
6327
6372
  }
6328
6373
  const m = new Set(a), g = new Set(c), y = Array.from(m, f).filter(j), h = (S) => `import "${S}";
6329
6374
  `, v = y.map(h).join(""), b = /* @__PURE__ */ new Set(), w = Array.from(g, (S) => {
@@ -6344,12 +6389,12 @@ ${I}
6344
6389
  deferredLoaders${w.join("")};` : I;
6345
6390
  return [
6346
6391
  F(u.join(e.dir.dist, p, Pi), C),
6347
- F(u.join(e.dir.dist, p, dl), A)
6392
+ F(u.join(e.dir.dist, p, vl), A)
6348
6393
  ];
6349
6394
  });
6350
6395
  await Promise.all(s);
6351
6396
  }
6352
- }), Pi = "index.js", dl = "index.d.ts", ns = (e, t, i, n = /* @__PURE__ */ new Set()) => t.flatMap((s) => i.has(s) ? [s] : n.has(s) ? [] : (n.add(s), ns(e, e[s].referencedBy, i, n))), pl = (e) => ({
6397
+ }), Pi = "index.js", vl = "index.d.ts", ns = (e, t, i, n = /* @__PURE__ */ new Set()) => t.flatMap((s) => i.has(s) ? [s] : n.has(s) ? [] : (n.add(s), ns(e, e[s].referencedBy, i, n))), bl = (e) => ({
6353
6398
  name: "@arcgis/lumina:handleDynamicAssets",
6354
6399
  configureServer(t) {
6355
6400
  e.server = t, xi(e).forEach(({ assets: i, transformers: n }) => he(e, i, n));
@@ -6368,20 +6413,20 @@ function xi(e) {
6368
6413
  "type" in n ? t.push(n) : "assets" in n && t.push(...n.assets);
6369
6414
  }), t.length > 0 && i.push({ assets: t }), e.isInBuildWatch || (e.assetsToProvide = void 0), i;
6370
6415
  }
6371
- const Et = "@arcgis/lumina:updatePackageJson", ml = (e) => ({
6416
+ const Et = "@arcgis/lumina:updatePackageJson", Sl = (e) => ({
6372
6417
  name: Et,
6373
6418
  apply: () => e.viteCommand === "serve" && e.environment === "development" && !e.isInTest && !e.isInCi,
6374
6419
  configResolved() {
6375
- ul(e).catch(
6420
+ wl(e).catch(
6376
6421
  (t) => T.error(Et, `Failed to update package's package.json:${String(t)}`)
6377
6422
  );
6378
6423
  }
6379
6424
  });
6380
- async function ul(e) {
6381
- const t = u.join(e.dir.root, "package.json"), i = JSON.parse(await B(t, "utf-8")), n = fl(i, e);
6425
+ async function wl(e) {
6426
+ const t = u.join(e.dir.root, "package.json"), i = JSON.parse(await B(t, "utf-8")), n = Tl(i, e);
6382
6427
  n && Mi(t, JSON.stringify(n, null, 2));
6383
6428
  }
6384
- function fl(e, t) {
6429
+ function Tl(e, t) {
6385
6430
  const i = e?.devDependencies ?? {};
6386
6431
  Object.keys(e?.peerDependencies ?? {}).forEach((l) => {
6387
6432
  l in i || T.warn(
@@ -6420,20 +6465,20 @@ function fl(e, t) {
6420
6465
  if (n)
6421
6466
  return e;
6422
6467
  }
6423
- const gl = (e) => ({
6468
+ const El = (e) => ({
6424
6469
  timestamp: e.apiJson.timestamp,
6425
6470
  compiler: e.apiJson.compiler,
6426
- components: yl(e),
6471
+ components: Cl(e),
6427
6472
  typeLibrary: {}
6428
6473
  });
6429
- function yl(e) {
6474
+ function Cl(e) {
6430
6475
  const t = [];
6431
6476
  for (const i of e.apiJson.modules)
6432
6477
  for (const n of i.declarations)
6433
- "customElement" in n && t.push(hl(n, i.sourcePath));
6478
+ "customElement" in n && t.push($l(n, i.sourcePath));
6434
6479
  return t;
6435
6480
  }
6436
- function hl(e, t) {
6481
+ function $l(e, t) {
6437
6482
  const i = e.superclass ? [{ name: "superclass", text: JSON.stringify(e.superclass) }] : [];
6438
6483
  return {
6439
6484
  filePath: t,
@@ -6448,9 +6493,9 @@ function hl(e, t) {
6448
6493
  dependencies: [],
6449
6494
  dependencyGraph: {},
6450
6495
  deprecation: typeof e.deprecated == "boolean" ? e.deprecated ? "" : void 0 : e.deprecated,
6451
- props: e.members.map(vl).filter(j),
6452
- methods: e.members.map(bl).filter(j),
6453
- events: e.events?.map(Sl) ?? [],
6496
+ props: e.members.map(Pl).filter(j),
6497
+ methods: e.members.map(xl).filter(j),
6498
+ events: e.events?.map(Il) ?? [],
6454
6499
  styles: e.cssProperties?.map((n) => ({
6455
6500
  name: n.name,
6456
6501
  annotation: "prop",
@@ -6462,7 +6507,7 @@ function hl(e, t) {
6462
6507
  listeners: []
6463
6508
  };
6464
6509
  }
6465
- function vl(e) {
6510
+ function Pl(e) {
6466
6511
  if (e.kind !== "field")
6467
6512
  return;
6468
6513
  const t = e, i = t.inheritedFrom ? [{ name: "inheritedFrom", text: JSON.stringify(t.inheritedFrom) }] : [], n = t.readonly ? [{ name: "readonly", text: "" }] : [], s = t.docsTags?.some((r) => r.name === "required") ?? !1;
@@ -6503,7 +6548,7 @@ const Mt = (e) => Object.fromEntries(
6503
6548
  ]
6504
6549
  ) ?? []
6505
6550
  );
6506
- function bl(e) {
6551
+ function xl(e) {
6507
6552
  if (e.kind !== "method")
6508
6553
  return;
6509
6554
  const t = e, i = e.inheritedFrom ? [{ name: "inheritedFrom", text: JSON.stringify(e.inheritedFrom) }] : [], n = t.parameters?.map(({ name: s, type: r, description: a }) => ({
@@ -6534,7 +6579,7 @@ function bl(e) {
6534
6579
  deprecation: typeof t.deprecated == "boolean" ? t.deprecated ? "" : void 0 : t.deprecated
6535
6580
  };
6536
6581
  }
6537
- function Sl(e) {
6582
+ function Il(e) {
6538
6583
  const t = e.inheritedFrom ? [{ name: "inheritedFrom", text: JSON.stringify(e.inheritedFrom) }] : [];
6539
6584
  return {
6540
6585
  event: e.name,
@@ -6562,14 +6607,14 @@ const ss = (e) => e.flatMap(
6562
6607
  name: `::part(${i.name})`,
6563
6608
  description: i.description || void 0
6564
6609
  })) ?? []
6565
- ), wl = (e) => e.attributes?.map((t) => ({
6610
+ ), kl = (e) => e.attributes?.map((t) => ({
6566
6611
  name: t.name ?? "",
6567
6612
  description: Ye(t.description, t.deprecated) || void 0,
6568
6613
  default: t.default,
6569
6614
  value: {
6570
- type: Tl(t.type.values?.map(un))
6615
+ type: Al(t.type.values?.map(un))
6571
6616
  }
6572
- })) ?? [], Tl = (e) => e?.length === 1 ? e[0] : e, Ye = (e = "", t = !1) => t === !1 ? e : `**Deprecated**${typeof t == "string" ? `: ${t}` : ""}. ${e}`, Ie = {
6617
+ })) ?? [], Al = (e) => e?.length === 1 ? e[0] : e, Ye = (e = "", t = !1) => t === !1 ? e : `**Deprecated**${typeof t == "string" ? `: ${t}` : ""}. ${e}`, Ie = {
6573
6618
  slots: "Slots",
6574
6619
  events: "Events",
6575
6620
  cssProperties: "CSS Properties",
@@ -6577,7 +6622,7 @@ const ss = (e) => e.flatMap(
6577
6622
  methods: "Methods"
6578
6623
  };
6579
6624
  function os(e) {
6580
- const t = El(e.slots), i = Cl(e.events), n = $l(e.cssProperties), s = Pl(e.cssParts), r = xl(e.members), a = Ye(e.description, e.deprecated).trim();
6625
+ const t = Nl(e.slots), i = Ll(e.events), n = Fl(e.cssProperties), s = jl(e.cssParts), r = Dl(e.members), a = Ye(e.description, e.deprecated).trim();
6581
6626
  return [...a ? [`${a}
6582
6627
  --`] : [], i, r, t, n, s].filter(Boolean).join(`
6583
6628
 
@@ -6585,28 +6630,28 @@ function os(e) {
6585
6630
  }
6586
6631
  const ke = (e, t) => t === void 0 || t.length === 0 ? "" : `### ${e}
6587
6632
  ${t.join(`
6588
- `)}`, El = (e) => ke(
6633
+ `)}`, Nl = (e) => ke(
6589
6634
  Ie.slots,
6590
6635
  e?.map((t) => `- ${t.name ? `**${t.name}**` : "_default_"} - ${t.description}`)
6591
- ), Cl = (e) => ke(
6636
+ ), Ll = (e) => ke(
6592
6637
  Ie.events,
6593
6638
  e?.filter((t) => t.name !== null && t.name !== void 0).map((t) => `- **${t.name}**${t.description ? ` - ${t.description}` : ""}`)
6594
- ), $l = (e = []) => ke(
6639
+ ), Fl = (e = []) => ke(
6595
6640
  Ie.cssProperties,
6596
6641
  e?.map(
6597
6642
  (t) => `- **${t.name}** - ${t.description} ${t.default ? `_(default: ${t.default})_}` : ""}`
6598
6643
  )
6599
- ), Pl = (e) => ke(
6644
+ ), jl = (e) => ke(
6600
6645
  Ie.cssParts,
6601
6646
  e?.map((t) => `- **${t.name}** - ${t.description}`)
6602
- ), xl = (e) => ke(
6647
+ ), Dl = (e) => ke(
6603
6648
  Ie.methods,
6604
6649
  e.filter(fs).map(
6605
6650
  (t) => [`- \`${t.name}${t.signature}\``, Ye(t.description, t.deprecated)].filter(Boolean).join(" - ")
6606
6651
  )
6607
6652
  );
6608
- function Il(e, t) {
6609
- const i = kl(e), n = ss(e), s = rs(e), r = R();
6653
+ function Rl(e, t) {
6654
+ const i = Ol(e), n = ss(e), s = rs(e), r = R();
6610
6655
  return {
6611
6656
  $schema: "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
6612
6657
  name: r.name,
@@ -6624,21 +6669,21 @@ function Il(e, t) {
6624
6669
  }
6625
6670
  };
6626
6671
  }
6627
- const kl = (e) => e.map((t) => ({
6672
+ const Ol = (e) => e.map((t) => ({
6628
6673
  name: t.tagName,
6629
6674
  description: os(t),
6630
6675
  "doc-url": t.demos?.[0]?.url,
6631
- attributes: wl(t),
6676
+ attributes: kl(t),
6632
6677
  slots: t.slots?.map((i) => ({
6633
6678
  name: i.name,
6634
6679
  description: i.description
6635
6680
  })),
6636
6681
  events: Ii(t),
6637
6682
  js: {
6638
- properties: Al(t),
6683
+ properties: Ml(t),
6639
6684
  events: Ii(t)
6640
6685
  }
6641
- })), Al = (e) => e.members.filter(gs).map((t) => ({
6686
+ })), Ml = (e) => e.members.filter(gs).map((t) => ({
6642
6687
  name: t.name,
6643
6688
  description: t.description,
6644
6689
  type: t.type?.text
@@ -6646,30 +6691,30 @@ const kl = (e) => e.map((t) => ({
6646
6691
  name: t.name,
6647
6692
  type: t.type?.text,
6648
6693
  description: t.description
6649
- })) ?? [], Ll = (e) => e.map((t) => ({
6694
+ })) ?? [], Jl = (e) => e.map((t) => ({
6650
6695
  name: t.tagName,
6651
6696
  description: os(t),
6652
- attributes: Nl(t),
6697
+ attributes: Kl(t),
6653
6698
  references: t.demos?.map((i) => ({ name: i.description, url: i.url })) ?? []
6654
- })), Nl = (e) => e.attributes?.map((t) => ({
6699
+ })), Kl = (e) => e.attributes?.map((t) => ({
6655
6700
  name: t.name,
6656
6701
  description: Ye(t.description, t.deprecated) || void 0,
6657
- values: Fl(t)
6658
- })) ?? [], Fl = (e) => e.type.values?.map((t) => t.value ?? "").filter(Boolean).map((t) => ({ name: t })) ?? [], jl = (e) => ({
6702
+ values: Bl(t)
6703
+ })) ?? [], Bl = (e) => e.type.values?.map((t) => t.value ?? "").filter(Boolean).map((t) => ({ name: t })) ?? [], _l = (e) => ({
6659
6704
  $schema: "https://raw.githubusercontent.com/microsoft/vscode-html-languageservice/main/docs/customData.schema.json",
6660
6705
  version: 1.1,
6661
- tags: Ll(e)
6662
- }), Dl = (e) => ({
6706
+ tags: Jl(e)
6707
+ }), Wl = (e) => ({
6663
6708
  $schema: "https://raw.githubusercontent.com/microsoft/vscode-css-languageservice/main/docs/customData.schema.json",
6664
6709
  version: 1.1,
6665
6710
  properties: ss(e),
6666
6711
  pseudoElements: rs(e)
6667
- }), Rl = "@arcgis/lumina:generateDocs";
6668
- function Ol(e) {
6712
+ }), Hl = "@arcgis/lumina:generateDocs";
6713
+ function Ul(e) {
6669
6714
  return e._documentationFileNames.stencilLikeDocsJson !== void 0 && e.provideAssets([
6670
6715
  {
6671
6716
  type: "dynamic",
6672
- source: () => JSON.stringify(gl(e), null, 2),
6717
+ source: () => JSON.stringify(El(e), null, 2),
6673
6718
  destination: u.join("../..", e._documentationFileNames.stencilLikeDocsJson)
6674
6719
  }
6675
6720
  ]), e._documentationFileNames.apiJson !== void 0 && e.provideAssets([
@@ -6679,7 +6724,7 @@ function Ol(e) {
6679
6724
  destination: u.join("../..", e._documentationFileNames.apiJson)
6680
6725
  }
6681
6726
  ]), {
6682
- name: Rl,
6727
+ name: Hl,
6683
6728
  async writeBundle() {
6684
6729
  if (e.isInStorybook)
6685
6730
  return;
@@ -6689,24 +6734,24 @@ function Ol(e) {
6689
6734
  await Zn(a);
6690
6735
  const c = [];
6691
6736
  if (n !== void 0) {
6692
- const d = JSON.stringify(jl(e.apiJsonComponents), null, 2);
6737
+ const d = JSON.stringify(_l(e.apiJsonComponents), null, 2);
6693
6738
  c.push(F(n, d));
6694
6739
  }
6695
6740
  if (s !== void 0) {
6696
- const d = JSON.stringify(Dl(e.apiJsonComponents), null, 2);
6741
+ const d = JSON.stringify(Wl(e.apiJsonComponents), null, 2);
6697
6742
  c.push(F(s, d));
6698
6743
  }
6699
6744
  if (r !== void 0) {
6700
- const d = Il(e.apiJsonComponents, typeof t == "object" ? t : {});
6745
+ const d = Rl(e.apiJsonComponents, typeof t == "object" ? t : {});
6701
6746
  c.push(F(r, JSON.stringify(d, null, 2)));
6702
6747
  }
6703
6748
  await Promise.all(c);
6704
6749
  }
6705
6750
  };
6706
6751
  }
6707
- const Ml = (e) => `import type { h, EventHandler } from "@arcgis/lumina";
6752
+ const zl = (e) => `import type { h, EventHandler } from "@arcgis/lumina";
6708
6753
 
6709
- ${e.map(Jl).join(`
6754
+ ${e.map(ql).join(`
6710
6755
 
6711
6756
  `)}
6712
6757
 
@@ -6718,7 +6763,7 @@ ${e.map(({ tagName: t, pascalCaseName: i }) => ` "${t}": Lumina${i};`).join
6718
6763
  }
6719
6764
  }
6720
6765
  }`;
6721
- function Jl({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6766
+ function ql({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6722
6767
  const [s, r] = $e(e, i);
6723
6768
  return [
6724
6769
  `interface Lumina${t} extends ${s}h.JSX.HTMLAttributes<HTML${t}Element> {
@@ -6731,7 +6776,7 @@ function Jl({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6731
6776
  r
6732
6777
  ].join("");
6733
6778
  }
6734
- function Kl(e) {
6779
+ function Vl(e) {
6735
6780
  const t = ` interface IntrinsicElements {
6736
6781
  ${e.map(({ pascalCaseName: i, tagName: n }) => ` "${n}": Preact${i};`).join(`
6737
6782
  `)}
@@ -6739,7 +6784,7 @@ ${e.map(({ pascalCaseName: i, tagName: n }) => ` "${n}": Preact${i};`).join
6739
6784
  return `import { HTMLAttributes } from "preact";
6740
6785
  import type { EventHandler } from "@arcgis/lumina";
6741
6786
 
6742
- ${e.map(Bl).join(`
6787
+ ${e.map(Gl).join(`
6743
6788
 
6744
6789
  `)}
6745
6790
 
@@ -6752,7 +6797,7 @@ ${t}
6752
6797
  }
6753
6798
  }`;
6754
6799
  }
6755
- function Bl({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6800
+ function Gl({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6756
6801
  const [s, r] = $e(e, i);
6757
6802
  return [
6758
6803
  `interface Preact${t} extends ${s}HTMLAttributes<HTML${t}Element> {
@@ -6765,13 +6810,13 @@ function Bl({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6765
6810
  r
6766
6811
  ].join("");
6767
6812
  }
6768
- function _l(e) {
6813
+ function Xl(e) {
6769
6814
  const t = e.map(({ pascalCaseName: i, tagName: n }) => ` "${n}": React${i};`).join(`
6770
6815
  `);
6771
6816
  return `import type { HTMLProps } from 'react';
6772
6817
  import type { EventHandler } from "@arcgis/lumina";
6773
6818
 
6774
- ${e.map(Wl).join(`
6819
+ ${e.map(Ql).join(`
6775
6820
 
6776
6821
  `)}
6777
6822
 
@@ -6797,7 +6842,7 @@ ${t}
6797
6842
  }
6798
6843
  }`;
6799
6844
  }
6800
- function Wl({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6845
+ function Ql({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6801
6846
  const [s, r] = $e(e, i);
6802
6847
  return [
6803
6848
  `interface React${t} extends ${s}HTMLProps<HTML${t}Element> {
@@ -6810,10 +6855,10 @@ function Wl({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6810
6855
  r
6811
6856
  ].join("");
6812
6857
  }
6813
- const Hl = (e) => `import { JSXBase as StencilJsx } from "@stencil/core/internal";
6858
+ const Zl = (e) => `import { JSXBase as StencilJsx } from "@stencil/core/internal";
6814
6859
  import type { EventHandler } from "@arcgis/lumina";
6815
6860
 
6816
- ${e.map(Ul).join(`
6861
+ ${e.map(Yl).join(`
6817
6862
 
6818
6863
  `)}
6819
6864
 
@@ -6831,7 +6876,7 @@ declare module "@stencil/core/internal/stencil-public-runtime" {
6831
6876
  interface IntrinsicElements extends ExposedElements {}
6832
6877
  }
6833
6878
  }`;
6834
- function Ul({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6879
+ function Yl({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6835
6880
  const [s, r] = $e(e, i);
6836
6881
  return [
6837
6882
  `interface Stencil${t} extends ${s}StencilJsx.HTMLAttributes<HTML${t}Element> {
@@ -6844,16 +6889,16 @@ function Ul({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6844
6889
  r
6845
6890
  ].join("");
6846
6891
  }
6847
- const zl = (e, t, i) => [i, t, ql(e), Vl(e)].join(`
6892
+ const ed = (e, t, i) => [i, t, td(e), id(e)].join(`
6848
6893
 
6849
- `), ql = (e) => e.filter((t) => (t.events?.length ?? 0) > 0).map(
6894
+ `), td = (e) => e.filter((t) => (t.events?.length ?? 0) > 0).map(
6850
6895
  ({ pascalCaseName: t }) => `export interface ${t}CustomEvent<T> extends CustomEvent<T> {
6851
6896
  detail: T;
6852
6897
  target: HTML${t}Element;
6853
6898
  currentTarget: HTML${t}Element;
6854
6899
  }`
6855
6900
  ).join(`
6856
- `), Vl = (e) => `export { ToEvents, TargetedEvent } from "@arcgis/lumina";
6901
+ `), id = (e) => `export { ToEvents, TargetedEvent } from "@arcgis/lumina";
6857
6902
 
6858
6903
  declare global {
6859
6904
  interface HTMLElementTagNameMap {
@@ -6861,12 +6906,12 @@ ${e.map(({ pascalCaseName: t, tagName: i }) => ` "${i}": HTML${t}Element;`).j
6861
6906
  `)}
6862
6907
  }
6863
6908
 
6864
- ${e.map(Gl).join(`
6909
+ ${e.map(nd).join(`
6865
6910
  `).split(`
6866
6911
  `).map((t) => t.length > 0 ? ` ${t}` : t).join(`
6867
6912
  `)}
6868
6913
  }`;
6869
- function Gl({ name: e, pascalCaseName: t, events: i = [] }) {
6914
+ function nd({ name: e, pascalCaseName: t, events: i = [] }) {
6870
6915
  const n = i.length > 0, s = `${t}CustomEvent`, r = `HTML${t}Element`;
6871
6916
  return [
6872
6917
  n ? `interface ${r}EventMap {
@@ -6885,7 +6930,7 @@ ${n ? ` addEventListener<K extends keyof ${r}EventMap>(type: K, listener: (this
6885
6930
  }`
6886
6931
  ].join("");
6887
6932
  }
6888
- function Xl(e) {
6933
+ function sd(e) {
6889
6934
  const t = ` interface IntrinsicElements {
6890
6935
  ${e.map(({ pascalCaseName: i, tagName: n }) => ` "${n}": Preact${i};`).join(`
6891
6936
  `)}
@@ -6893,7 +6938,7 @@ ${e.map(({ pascalCaseName: i, tagName: n }) => ` "${n}": Preact${i};`).join
6893
6938
  return `import { JSX as PreactJsx } from "preact";
6894
6939
  import type { EventHandler } from "@arcgis/lumina";
6895
6940
 
6896
- ${e.map(Ql).join(`
6941
+ ${e.map(rd).join(`
6897
6942
 
6898
6943
  `)}
6899
6944
 
@@ -6906,7 +6951,7 @@ ${t}
6906
6951
  }
6907
6952
  }`;
6908
6953
  }
6909
- function Ql({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6954
+ function rd({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6910
6955
  const [s, r] = $e(e, i);
6911
6956
  return [
6912
6957
  `/** @deprecated Update to Preact 10.27.2+ or 11+ and consume types/preact file over types/preact10 */
@@ -6921,7 +6966,7 @@ function Ql({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6921
6966
  r
6922
6967
  ].join("");
6923
6968
  }
6924
- function Zl(e) {
6969
+ function od(e) {
6925
6970
  let t;
6926
6971
  return {
6927
6972
  name: "@arcgis/lumina:generateFrameworkTypes",
@@ -6929,11 +6974,11 @@ function Zl(e) {
6929
6974
  generateBundle() {
6930
6975
  if (e.isInStorybook)
6931
6976
  return;
6932
- t = $a(e);
6977
+ t = La(e);
6933
6978
  const i = u.join(e.dir.dist, "index.d.ts");
6934
6979
  e._declarationTextTransformers.push((n) => {
6935
6980
  const { filePath: s, content: r } = n;
6936
- return s === i ? { filePath: s, content: zl(e.apiJsonComponents, r, t) } : n;
6981
+ return s === i ? { filePath: s, content: ed(e.apiJsonComponents, r, t) } : n;
6937
6982
  });
6938
6983
  },
6939
6984
  async writeBundle() {
@@ -6943,49 +6988,49 @@ function Zl(e) {
6943
6988
  await ee(i, { recursive: !0 });
6944
6989
  const n = `/// <reference types="../index.d.ts" />
6945
6990
  ${t.replaceAll("./", "../")}`, s = Object.entries({
6946
- react: _l(e.apiJsonComponents),
6947
- preact: Kl(e.apiJsonComponents),
6948
- preact10: Xl(e.apiJsonComponents),
6949
- stencil: Hl(e.apiJsonComponents),
6950
- lumina: Ml(e.apiJsonComponents)
6991
+ react: Xl(e.apiJsonComponents),
6992
+ preact: Vl(e.apiJsonComponents),
6993
+ preact10: sd(e.apiJsonComponents),
6994
+ stencil: Zl(e.apiJsonComponents),
6995
+ lumina: zl(e.apiJsonComponents)
6951
6996
  }).map(
6952
6997
  async ([r, a]) => await F(u.join(i, `${r}.d.ts`), `${n}
6953
6998
  ${a}`)
6954
6999
  );
6955
- s.push(F(u.join(i, "components.d.ts"), 'export * from "./stencil";')), await Promise.all(s);
7000
+ s.push(F(u.join(i, "components.d.ts"), 'export * from "./stencil.js";')), await Promise.all(s);
6956
7001
  }
6957
7002
  };
6958
7003
  }
6959
- function Yl(e) {
7004
+ function ad(e) {
6960
7005
  return {
6961
7006
  name: "@arcgis/lumina:buildWrappers",
6962
7007
  apply: () => e.viteCommand === "build" && !!e.options.build?.wrappers?.length,
6963
7008
  async writeBundle() {
6964
7009
  e.isInStorybook || await Promise.all(
6965
7010
  e.options.build?.wrappers?.map(async (t) => {
6966
- t.type === "react18" && await id(e, t);
7011
+ t.type === "react18" && await dd(e, t);
6967
7012
  }) ?? []
6968
7013
  );
6969
7014
  }
6970
7015
  };
6971
7016
  }
6972
- const ed = "react", ki = "@lit/react", td = `
6973
- import React from "${ed}";
7017
+ const cd = "react", ki = "@lit/react", ld = `
7018
+ import React from "${cd}";
6974
7019
  import { createComponent } from "${ki}";
6975
7020
  import type { EventName } from "${ki}";
6976
7021
  import { makeReactWrapperFactory, getReactWrapperOptions } from "@arcgis/lumina";
6977
7022
 
6978
7023
  const createWrapper = /*@__PURE__*/ makeReactWrapperFactory(React, createComponent) as typeof createComponent;
6979
7024
  `;
6980
- async function id(e, t) {
7025
+ async function dd(e, t) {
6981
7026
  const { name: i } = R(), n = [];
6982
7027
  for (const a of e.apiJson.modules)
6983
7028
  for (const c of a.declarations)
6984
- "customElement" in c && n.push(nd(c));
6985
- const s = [`/// <reference types="${i}" preserve="true" />`, td, ...n].join(""), r = u.resolve(t.proxiesFile);
7029
+ "customElement" in c && n.push(pd(c));
7030
+ const s = [`/// <reference types="${i}" preserve="true" />`, ld, ...n].join(""), r = u.resolve(t.proxiesFile);
6986
7031
  await ee(u.dirname(r), { recursive: !0 }), await F(r, s);
6987
7032
  }
6988
- function nd(e) {
7033
+ function pd(e) {
6989
7034
  const t = e.events?.map(
6990
7035
  (i) => ` ${ue(`on${vs(i.name)}`)}: "${i.name}" as EventName<HTML${e.pascalCaseName}Element["${i.name}"]>,`
6991
7036
  ).join(`
@@ -7001,31 +7046,31 @@ ${t}
7001
7046
  );
7002
7047
  `;
7003
7048
  }
7004
- function Td(e = {}) {
7049
+ function Ad(e = {}) {
7005
7050
  const t = new $(e), n = [
7006
7051
  t._plugin,
7007
- Bc(t),
7008
- _c(t),
7009
- ml(t),
7010
- Cr(t),
7011
- Ac(t),
7012
- Zl(t),
7013
- Ol(t),
7014
- ic(t),
7015
- al(t),
7016
- Ur(t),
7017
- Dc(t),
7018
- pl(t),
7019
- ll(t),
7020
7052
  Vc(t),
7053
+ Gc(t),
7054
+ Sl(t),
7055
+ Cr(t),
7056
+ Oc(t),
7057
+ od(t),
7058
+ Ul(t),
7059
+ lc(t),
7060
+ gl(t),
7061
+ zr(t),
7062
+ _c(t),
7063
+ bl(t),
7064
+ hl(t),
7065
+ tl(t),
7021
7066
  Ds(t),
7022
- cc(t),
7023
- Yl(t),
7024
- Rc(t)
7067
+ gc(t),
7068
+ ad(t),
7069
+ Wc(t)
7025
7070
  ].filter(j);
7026
7071
  return n.context = t, n;
7027
7072
  }
7028
- const Ed = {
7073
+ const Nd = {
7029
7074
  initializeComponentDependencies: vn,
7030
7075
  updateLuminaTs: ts,
7031
7076
  propertyToAttributeMappings: z,
@@ -7040,7 +7085,7 @@ const Ed = {
7040
7085
  };
7041
7086
  export {
7042
7087
  Ue as LuminaApiExtractor,
7043
- Ed as exportsForCodemod,
7088
+ Nd as exportsForCodemod,
7044
7089
  Xe as inferCdnUrl,
7045
- Td as useLumina
7090
+ Ad as useLumina
7046
7091
  };