solid-intlayer 9.9.1 → 9.9.3-canary.0

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 (108) hide show
  1. package/dist/cjs/LoadingBoundary.cjs +1 -1
  2. package/dist/cjs/analytics/useAnalytics.cjs +1 -1
  3. package/dist/cjs/analytics/useConversion.cjs +1 -1
  4. package/dist/cjs/analytics/useExperiment.cjs +1 -1
  5. package/dist/cjs/client/IntlayerProvider.cjs +1 -1
  6. package/dist/cjs/client/getBrowserLocale.cjs +1 -1
  7. package/dist/cjs/client/t.cjs +1 -1
  8. package/dist/cjs/client/useDictionary.cjs +1 -1
  9. package/dist/cjs/client/useDictionaryAsync.cjs +1 -1
  10. package/dist/cjs/client/useDictionaryDynamic.cjs +1 -1
  11. package/dist/cjs/client/useIntlayer.cjs +1 -1
  12. package/dist/cjs/client/useLoadDynamic.cjs +1 -1
  13. package/dist/cjs/client/useLocale.cjs +1 -1
  14. package/dist/cjs/client/useLocaleBase.cjs +1 -1
  15. package/dist/cjs/client/usePathname.cjs +1 -1
  16. package/dist/cjs/client/useRewriteURL.cjs +1 -1
  17. package/dist/cjs/client/useTraduction.cjs +1 -1
  18. package/dist/cjs/editor/createEditedContentSource.cjs +1 -1
  19. package/dist/cjs/editor/useEditor.cjs +1 -1
  20. package/dist/cjs/format/useCompact.cjs +1 -1
  21. package/dist/cjs/format/useCurrency.cjs +1 -1
  22. package/dist/cjs/format/useDate.cjs +1 -1
  23. package/dist/cjs/format/useIntl.cjs +1 -1
  24. package/dist/cjs/format/useList.cjs +1 -1
  25. package/dist/cjs/format/useNumber.cjs +1 -1
  26. package/dist/cjs/format/usePercentage.cjs +1 -1
  27. package/dist/cjs/format/useRelativeTime.cjs +1 -1
  28. package/dist/cjs/format/useUnit.cjs +1 -1
  29. package/dist/cjs/getDictionary.cjs +1 -1
  30. package/dist/cjs/getIntlayer.cjs +1 -1
  31. package/dist/cjs/html/HTMLProvider.cjs +1 -1
  32. package/dist/cjs/html/HTMLRenderer.cjs +1 -1
  33. package/dist/cjs/markdown/MarkdownProvider.cjs +1 -1
  34. package/dist/cjs/markdown/MarkdownRenderer.cjs +1 -1
  35. package/dist/cjs/plugins.cjs +1 -1
  36. package/dist/esm/LoadingBoundary.mjs +3 -3
  37. package/dist/esm/analytics/useAnalytics.mjs +11 -11
  38. package/dist/esm/analytics/useConversion.mjs +1 -1
  39. package/dist/esm/analytics/useExperiment.mjs +7 -7
  40. package/dist/esm/client/IntlayerProvider.mjs +26 -26
  41. package/dist/esm/client/getBrowserLocale.mjs +21 -21
  42. package/dist/esm/client/t.mjs +5 -5
  43. package/dist/esm/client/useDictionary.mjs +17 -17
  44. package/dist/esm/client/useDictionaryAsync.mjs +7 -7
  45. package/dist/esm/client/useDictionaryDynamic.mjs +23 -23
  46. package/dist/esm/client/useIntlayer.mjs +8 -8
  47. package/dist/esm/client/useLoadDynamic.mjs +19 -19
  48. package/dist/esm/client/useLocale.mjs +10 -10
  49. package/dist/esm/client/useLocaleBase.mjs +6 -6
  50. package/dist/esm/client/usePathname.mjs +4 -4
  51. package/dist/esm/client/useRewriteURL.mjs +8 -8
  52. package/dist/esm/client/useTraduction.mjs +5 -5
  53. package/dist/esm/editor/createEditedContentSource.mjs +3 -3
  54. package/dist/esm/editor/useEditor.mjs +10 -10
  55. package/dist/esm/format/useCompact.mjs +6 -6
  56. package/dist/esm/format/useCurrency.mjs +6 -6
  57. package/dist/esm/format/useDate.mjs +10 -10
  58. package/dist/esm/format/useIntl.mjs +5 -5
  59. package/dist/esm/format/useList.mjs +6 -6
  60. package/dist/esm/format/useNumber.mjs +6 -6
  61. package/dist/esm/format/usePercentage.mjs +6 -6
  62. package/dist/esm/format/useRelativeTime.mjs +6 -6
  63. package/dist/esm/format/useUnit.mjs +6 -6
  64. package/dist/esm/getDictionary.mjs +4 -4
  65. package/dist/esm/getIntlayer.mjs +3 -3
  66. package/dist/esm/html/HTMLProvider.mjs +6 -6
  67. package/dist/esm/html/HTMLRenderer.mjs +14 -14
  68. package/dist/esm/markdown/MarkdownProvider.mjs +19 -19
  69. package/dist/esm/markdown/MarkdownRenderer.mjs +28 -28
  70. package/dist/esm/plugins.mjs +97 -97
  71. package/dist/{esm-BnFj8Txc.js → esm-YGODKOLP.js} +1 -1
  72. package/dist/{esm-hfQR-yiQ.mjs → esm-bdKnuomJ.mjs} +2 -2
  73. package/dist/solid/analytics/useAnalytics.jsx +3 -3
  74. package/dist/solid/analytics/useConversion.js +1 -1
  75. package/dist/solid/analytics/useExperiment.js +3 -3
  76. package/dist/solid/client/IntlayerProvider.jsx +4 -4
  77. package/dist/solid/client/getBrowserLocale.jsx +1 -1
  78. package/dist/solid/client/t.js +1 -1
  79. package/dist/solid/client/useDictionary.js +3 -3
  80. package/dist/solid/client/useDictionaryAsync.js +3 -3
  81. package/dist/solid/client/useDictionaryDynamic.js +2 -2
  82. package/dist/solid/client/useIntlayer.js +2 -2
  83. package/dist/solid/client/useLoadDynamic.js +1 -1
  84. package/dist/solid/client/useLocale.js +2 -2
  85. package/dist/solid/client/useLocaleBase.js +1 -1
  86. package/dist/solid/client/usePathname.js +2 -2
  87. package/dist/solid/client/useRewriteURL.js +2 -2
  88. package/dist/solid/client/useTraduction.js +2 -2
  89. package/dist/solid/editor/createEditedContentSource.js +2 -2
  90. package/dist/solid/editor/useEditor.jsx +2 -2
  91. package/dist/solid/{esm-BS5TZIsL.js → esm-1cHk4dPd.js} +2 -2
  92. package/dist/solid/format/useCompact.js +1 -1
  93. package/dist/solid/format/useCurrency.js +2 -2
  94. package/dist/solid/format/useDate.js +2 -2
  95. package/dist/solid/format/useIntl.js +2 -2
  96. package/dist/solid/format/useList.js +1 -1
  97. package/dist/solid/format/useNumber.js +2 -2
  98. package/dist/solid/format/usePercentage.js +2 -2
  99. package/dist/solid/format/useRelativeTime.js +2 -2
  100. package/dist/solid/format/useUnit.js +1 -1
  101. package/dist/solid/getDictionary.js +1 -1
  102. package/dist/solid/getIntlayer.js +1 -1
  103. package/dist/solid/html/HTMLProvider.jsx +1 -1
  104. package/dist/solid/html/HTMLRenderer.jsx +1 -1
  105. package/dist/solid/markdown/MarkdownProvider.jsx +1 -1
  106. package/dist/solid/markdown/MarkdownRenderer.jsx +3 -3
  107. package/dist/solid/plugins.jsx +4 -4
  108. package/package.json +9 -9
@@ -1,13 +1,13 @@
1
- import { getContextProvider as e } from "../solidCompat.mjs";
2
- import { createComponent as t } from "solid-js/web";
3
- import { createContext as n, useContext as r } from "solid-js";
1
+ import { createComponent as e } from "solid-js/web";
2
+ import { createContext as t, useContext as n } from "solid-js";
3
+ import { getContextProvider as r } from "../solidCompat.mjs";
4
4
  // src/html/HTMLProvider.tsx
5
- var i = n(null), a = e(i), o = () => r(i), s = (e) => t(a, {
5
+ var i = t(null), a = r(i), o = () => n(i), s = (t) => e(a, {
6
6
  get value() {
7
- return { components: e.components };
7
+ return { components: t.components };
8
8
  },
9
9
  get children() {
10
- return e.children;
10
+ return t.children;
11
11
  }
12
12
  });
13
13
  export { s as HTMLProvider, o as useHTMLContext };
@@ -1,19 +1,19 @@
1
- import { useHTMLContext as e } from "./HTMLProvider.mjs";
2
- import { getHTML as t } from "@intlayer/core/interpreter";
3
- import { Dynamic as n, createComponent as r, mergeProps as i } from "solid-js/web";
4
- import { VOID_HTML_ELEMENTS as a } from "@intlayer/core/transpiler";
1
+ import { Dynamic as e, createComponent as t, mergeProps as n } from "solid-js/web";
2
+ import { getHTML as r } from "@intlayer/core/interpreter";
3
+ import { VOID_HTML_ELEMENTS as i } from "@intlayer/core/transpiler";
4
+ import { useHTMLContext as a } from "./HTMLProvider.mjs";
5
5
  // src/html/HTMLRenderer.tsx
6
- var o = (e, { components: o = {} } = {}) => {
7
- let s = Object.fromEntries(Object.entries(o).filter(([, e]) => e).map(([e, t]) => [e, (e) => r(n, i({ component: t }, e))])), c = new Proxy(s, { get(e, t) {
8
- if (typeof t == "string" && t in e) return e[t];
9
- if (typeof t == "string" && /^[a-z][a-z0-9]*$/.test(t)) return a.has(t) ? ({ children: e, ...a }) => r(n, i({ component: t }, a)) : (e) => r(n, i({ component: t }, e));
6
+ var o = (a, { components: o = {} } = {}) => {
7
+ let s = Object.fromEntries(Object.entries(o).filter(([, e]) => e).map(([r, i]) => [r, (r) => t(e, n({ component: i }, r))])), c = new Proxy(s, { get(r, a) {
8
+ if (typeof a == "string" && a in r) return r[a];
9
+ if (typeof a == "string" && /^[a-z][a-z0-9]*$/.test(a)) return i.has(a) ? ({ children: r, ...i }) => t(e, n({ component: a }, i)) : (r) => t(e, n({ component: a }, r));
10
10
  } });
11
- return t(e, c);
12
- }, s = ({ components: t } = {}) => {
13
- let n = e();
14
- return (e) => o(e, { components: {
15
- ...n?.components,
16
- ...t
11
+ return r(a, c);
12
+ }, s = ({ components: e } = {}) => {
13
+ let t = a();
14
+ return (n) => o(n, { components: {
15
+ ...t?.components,
16
+ ...e
17
17
  } });
18
18
  }, c = (e) => s({ components: e.components || e.userComponents })(e.children || e.html || "");
19
19
  export { c as HTMLRenderer, o as renderHTML, s as useHTMLRenderer };
@@ -1,36 +1,36 @@
1
- import { getContextProvider as e } from "../solidCompat.mjs";
2
- import { compileMarkdown as t } from "./compiler.mjs";
3
- import { createComponent as n } from "solid-js/web";
4
- import { createContext as r, useContext as i } from "solid-js";
1
+ import { createComponent as e } from "solid-js/web";
2
+ import { createContext as t, useContext as n } from "solid-js";
3
+ import { getContextProvider as r } from "../solidCompat.mjs";
4
+ import { compileMarkdown as i } from "./compiler.mjs";
5
5
  // src/markdown/MarkdownProvider.tsx
6
- var a = r(null), o = e(a), s = (e) => {
7
- let r = (n, r, i, a) => {
8
- if (e.renderMarkdown) return e.renderMarkdown(n, r, i, a);
6
+ var a = t(null), o = r(a), s = (t) => {
7
+ let n = (e, n, r, a) => {
8
+ if (t.renderMarkdown) return t.renderMarkdown(e, n, r, a);
9
9
  let o = {
10
- forceBlock: r?.forceBlock ?? e.forceBlock,
11
- preserveFrontmatter: r?.preserveFrontmatter ?? e.preserveFrontmatter,
12
- tagfilter: r?.tagfilter ?? e.tagfilter,
13
- wrapper: a || e.wrapper,
10
+ forceBlock: n?.forceBlock ?? t.forceBlock,
11
+ preserveFrontmatter: n?.preserveFrontmatter ?? t.preserveFrontmatter,
12
+ tagfilter: n?.tagfilter ?? t.tagfilter,
13
+ wrapper: a || t.wrapper,
14
14
  components: {
15
- ...e.components,
16
- ...i ?? {}
15
+ ...t.components,
16
+ ...r ?? {}
17
17
  }
18
18
  };
19
- return t(n, o);
19
+ return i(e, o);
20
20
  };
21
- return n(o, {
21
+ return e(o, {
22
22
  get value() {
23
23
  return {
24
- components: e.components,
25
- renderMarkdown: r
24
+ components: t.components,
25
+ renderMarkdown: n
26
26
  };
27
27
  },
28
28
  get children() {
29
- return e.children;
29
+ return t.children;
30
30
  }
31
31
  });
32
32
  }, c = () => {
33
- let e = i(a);
33
+ let e = n(a);
34
34
  if (!e) throw Error("useMarkdown must be used within a MarkdownProvider. To fix this error, wrap your component with <MarkdownProvider>.");
35
35
  return e;
36
36
  };
@@ -1,41 +1,41 @@
1
- import { createEditedContentSource as e } from "../editor/createEditedContentSource.mjs";
2
- import { LoadingBoundary as t } from "../LoadingBoundary.mjs";
3
- import { createAsyncValue as n } from "../solidCompat.mjs";
4
- import { compileMarkdown as r } from "./compiler.mjs";
5
- import { MarkdownContext as i, useMarkdown as a } from "./MarkdownProvider.mjs";
6
- import { createComponent as o } from "solid-js/web";
7
- import { getMarkdownMetadata as s } from "@intlayer/core/markdown";
8
- import { createMemo as c, useContext as l } from "solid-js";
9
- import { getContentNodeByKeyPath as u } from "@intlayer/core/dictionaryManipulator";
1
+ import { createComponent as e } from "solid-js/web";
2
+ import { getContentNodeByKeyPath as t } from "@intlayer/core/dictionaryManipulator";
3
+ import { getMarkdownMetadata as n } from "@intlayer/core/markdown";
4
+ import { createMemo as r, useContext as i } from "solid-js";
5
+ import { createEditedContentSource as a } from "../editor/createEditedContentSource.mjs";
6
+ import { LoadingBoundary as o } from "../LoadingBoundary.mjs";
7
+ import { createAsyncValue as s } from "../solidCompat.mjs";
8
+ import { compileMarkdown as c } from "./compiler.mjs";
9
+ import { MarkdownContext as l, useMarkdown as u } from "./MarkdownProvider.mjs";
10
10
  // src/markdown/MarkdownRenderer.tsx
11
- var d = (e, t = {}) => r(e, t), f = (e = {}) => {
12
- let t = l(i);
11
+ var d = (e, t = {}) => c(e, t), f = (e = {}) => {
12
+ let t = i(l);
13
13
  return (n) => t ? t.renderMarkdown(n, {
14
14
  forceBlock: e.forceBlock,
15
15
  preserveFrontmatter: e.preserveFrontmatter,
16
16
  tagfilter: e.tagfilter
17
17
  }, e.components, e.wrapper) : d(n, e);
18
- }, p = (r) => {
19
- let s = l(i), { renderMarkdown: c } = a(), u = e(() => r.dictionaryKey, () => r.keyPath), d = n(() => [
20
- u() ?? r.children,
21
- r.forceBlock,
22
- r.preserveFrontmatter,
23
- r.tagfilter,
24
- r.components,
25
- r.wrapper
26
- ], ([e, t, n, r, i, a]) => c(e, {
18
+ }, p = (t) => {
19
+ let n = i(l), { renderMarkdown: r } = u(), c = a(() => t.dictionaryKey, () => t.keyPath), d = s(() => [
20
+ c() ?? t.children,
21
+ t.forceBlock,
22
+ t.preserveFrontmatter,
23
+ t.tagfilter,
24
+ t.components,
25
+ t.wrapper
26
+ ], ([e, t, i, a, o, s]) => r(e, {
27
27
  forceBlock: t,
28
- preserveFrontmatter: n,
29
- tagfilter: r
28
+ preserveFrontmatter: i,
29
+ tagfilter: a
30
30
  }, {
31
- ...s?.components ?? {},
32
- ...i ?? {}
33
- }, a));
34
- return o(t, { get children() {
31
+ ...n?.components ?? {},
32
+ ...o ?? {}
33
+ }, s));
34
+ return e(o, { get children() {
35
35
  return d();
36
36
  } });
37
37
  }, m = (e) => {
38
- let t = c(() => s(e.children));
39
- return c(() => u(t(), e.metadataKeyPath))();
38
+ let i = r(() => n(e.children));
39
+ return r(() => t(i(), e.metadataKeyPath))();
40
40
  };
41
41
  export { m as MarkdownMetadataRenderer, p as MarkdownRenderer, d as renderMarkdown, f as useMarkdownRenderer };
@@ -1,15 +1,15 @@
1
- import { reportExposure as e } from "./analytics/exposureSink.mjs";
2
- import { renderIntlayerNode as t } from "./IntlayerNode.mjs";
3
- import { LoadingBoundary as n } from "./LoadingBoundary.mjs";
4
- import { lazyComponent as r } from "./solidCompat.mjs";
5
- import { renderSolidElement as i } from "./solidElement/renderSolidElement.mjs";
6
- import { bindInsertedValues as a, conditionPlugin as o, enumerationPlugin as s, fallbackPlugin as c, filePlugin as l, genderPlugin as u, isInterpolableWrapperNode as d, nestedPlugin as f, pluralPlugin as p, resolveInterpreterLocale as m, selectPlugin as h, splitInsertionTemplate as g, transformInterpolableNode as _, translationPlugin as v } from "@intlayer/core/interpreter";
7
- import { createComponent as y, mergeProps as b } from "solid-js/web";
8
- import { editor as x, internationalization as S } from "@intlayer/config/built";
9
- import { getMarkdownMetadata as C } from "@intlayer/core/markdown";
10
- import * as w from "@intlayer/types/nodeType";
1
+ import { createComponent as e, mergeProps as t } from "solid-js/web";
2
+ import { editor as n, internationalization as r } from "@intlayer/config/built";
3
+ import { bindInsertedValues as i, conditionPlugin as a, enumerationPlugin as o, fallbackPlugin as s, filePlugin as c, genderPlugin as l, isInterpolableWrapperNode as u, nestedPlugin as d, pluralPlugin as f, resolveInterpreterLocale as p, selectPlugin as m, splitInsertionTemplate as h, transformInterpolableNode as g, translationPlugin as _ } from "@intlayer/core/interpreter";
4
+ import { getMarkdownMetadata as v } from "@intlayer/core/markdown";
5
+ import * as y from "@intlayer/types/nodeType";
6
+ import { reportExposure as b } from "./analytics/exposureSink.mjs";
7
+ import { renderIntlayerNode as x } from "./IntlayerNode.mjs";
8
+ import { LoadingBoundary as S } from "./LoadingBoundary.mjs";
9
+ import { lazyComponent as C } from "./solidCompat.mjs";
10
+ import { renderSolidElement as w } from "./solidElement/renderSolidElement.mjs";
11
11
  // src/plugins.tsx
12
- var T = process.env.INTLAYER_EDITOR_ENABLED === "false" ? null : r(() => import("./editor/ContentSelector.mjs").then((e) => ({ default: e.ContentSelector }))), E = process.env.INTLAYER_NODE_TYPE_MARKDOWN === "false" ? null : import("./markdown/MarkdownRenderer.mjs").then((e) => ({
12
+ var T = process.env.INTLAYER_EDITOR_ENABLED === "false" ? null : C(() => import("./editor/ContentSelector.mjs").then((e) => ({ default: e.ContentSelector }))), E = process.env.INTLAYER_NODE_TYPE_MARKDOWN === "false" ? null : import("./markdown/MarkdownRenderer.mjs").then((e) => ({
13
13
  MarkdownRenderer: e.MarkdownRenderer,
14
14
  MarkdownMetadataRenderer: e.MarkdownMetadataRenderer
15
15
  })), D = process.env.INTLAYER_NODE_TYPE_HTML === "false" ? null : import("./html/HTMLRenderer.mjs").then((e) => e.HTMLRenderer);
@@ -18,68 +18,68 @@ var O = {
18
18
  id: "intlayer-node-plugin",
19
19
  canHandle: (e) => typeof e == "bigint" || typeof e == "string" || typeof e == "number",
20
20
  transform: (r, i) => {
21
- if (process.env.INTLAYER_ANALYTICS_ENABLED !== "false" && e({
21
+ if (process.env.INTLAYER_ANALYTICS_ENABLED !== "false" && b({
22
22
  dictionaryKey: i.dictionaryKey,
23
23
  keyPath: i.keyPath,
24
24
  locale: i.locale,
25
25
  nodeType: "text"
26
- }), process.env.INTLAYER_EDITOR_ENABLED !== "false" && x.enabled) {
27
- let { plugins: e, ...r } = i;
28
- return t({
26
+ }), process.env.INTLAYER_EDITOR_ENABLED !== "false" && n.enabled) {
27
+ let { plugins: n, ...r } = i;
28
+ return x({
29
29
  value: r.children,
30
- children: y(n, {
30
+ children: e(S, {
31
31
  get fallback() {
32
32
  return r.children;
33
33
  },
34
34
  get children() {
35
- return y(T, b(r, { get children() {
35
+ return e(T, t(r, { get children() {
36
36
  return r.children;
37
37
  } }));
38
38
  }
39
39
  })
40
40
  });
41
41
  }
42
- return t({
42
+ return x({
43
43
  value: i.children,
44
44
  children: i.children
45
45
  });
46
46
  }
47
- }, k = process.env.INTLAYER_NODE_TYPE_SOLID_NODE === "false" ? c : {
47
+ }, k = process.env.INTLAYER_NODE_TYPE_SOLID_NODE === "false" ? s : {
48
48
  id: "solid-node-plugin",
49
49
  canHandle: (e) => typeof e == "object" && e?.props !== void 0 || typeof Node < "u" && e instanceof Node,
50
- transform: (r, { plugins: a, ...o }) => (process.env.INTLAYER_ANALYTICS_ENABLED !== "false" && e({
51
- dictionaryKey: o.dictionaryKey,
52
- keyPath: o.keyPath,
53
- locale: o.locale,
50
+ transform: (r, { plugins: i, ...a }) => (process.env.INTLAYER_ANALYTICS_ENABLED !== "false" && b({
51
+ dictionaryKey: a.dictionaryKey,
52
+ keyPath: a.keyPath,
53
+ locale: a.locale,
54
54
  nodeType: "solid-node"
55
- }), t({
56
- ...o,
55
+ }), x({
56
+ ...a,
57
57
  value: "[[solid-element]]",
58
- children: process.env.INTLAYER_EDITOR_ENABLED !== "false" && x.enabled ? y(n, {
58
+ children: process.env.INTLAYER_EDITOR_ENABLED !== "false" && n.enabled ? e(S, {
59
59
  get fallback() {
60
- return typeof Node < "u" && r instanceof Node ? r : i(r);
60
+ return typeof Node < "u" && r instanceof Node ? r : w(r);
61
61
  },
62
62
  get children() {
63
- return y(T, b(o, { get children() {
64
- return typeof Node < "u" && r instanceof Node ? r : i(r);
63
+ return e(T, t(a, { get children() {
64
+ return typeof Node < "u" && r instanceof Node ? r : w(r);
65
65
  } }));
66
66
  }
67
- }) : typeof Node < "u" && r instanceof Node ? r : i(r)
67
+ }) : typeof Node < "u" && r instanceof Node ? r : w(r)
68
68
  }))
69
69
  }, A = (e, t) => {
70
- let n = g(e, t);
70
+ let n = h(e, t);
71
71
  return n.isSimple, n.parts;
72
- }, j = process.env.INTLAYER_NODE_TYPE_INSERTION === "false" ? c : {
72
+ }, j = process.env.INTLAYER_NODE_TYPE_INSERTION === "false" ? s : {
73
73
  id: "insertion-plugin",
74
- canHandle: (e) => typeof e == "object" && e?.nodeType === w.INSERTION,
74
+ canHandle: (e) => typeof e == "object" && e?.nodeType === y.INSERTION,
75
75
  transform: (e, t, n) => {
76
- let r = [...t.keyPath, { type: w.INSERTION }], i = e[w.INSERTION];
76
+ let r = [...t.keyPath, { type: y.INSERTION }], a = e[y.INSERTION];
77
77
  return (e) => {
78
78
  let o = {
79
79
  id: "insertion-string-plugin",
80
- canHandle: (e) => typeof e == "string" || d(e),
80
+ canHandle: (e) => typeof e == "string" || u(e),
81
81
  transform: (n, r, i) => {
82
- if (d(n)) return _(n, e, r, t.plugins, i);
82
+ if (u(n)) return g(n, e, r, t.plugins, i);
83
83
  let a = A(i(n, {
84
84
  ...r,
85
85
  children: n,
@@ -91,71 +91,71 @@ var O = {
91
91
  children: a
92
92
  });
93
93
  }
94
- }, s = n(i, {
94
+ }, s = n(a, {
95
95
  ...t,
96
- children: i,
96
+ children: a,
97
97
  keyPath: r,
98
98
  plugins: [o, ...t.plugins ?? []]
99
99
  });
100
- return a(i, s, e, !0);
100
+ return i(a, s, e, !0);
101
101
  };
102
102
  }
103
- }, M = r(() => E.then((e) => ({ default: e.MarkdownRenderer }))), N = r(() => E.then((e) => ({ default: e.MarkdownMetadataRenderer }))), P = process.env.INTLAYER_NODE_TYPE_MARKDOWN === "false" ? c : {
103
+ }, M = C(() => E.then((e) => ({ default: e.MarkdownRenderer }))), N = C(() => E.then((e) => ({ default: e.MarkdownMetadataRenderer }))), P = process.env.INTLAYER_NODE_TYPE_MARKDOWN === "false" ? s : {
104
104
  id: "markdown-string-plugin",
105
105
  canHandle: (e) => typeof e == "string",
106
- transform: (e, r, i) => {
107
- let { plugins: a, ...o } = r, s = i(C(e) ?? {}, {
106
+ transform: (r, i, a) => {
107
+ let { plugins: o, ...s } = i, c = a(v(r) ?? {}, {
108
108
  plugins: [{
109
109
  id: "markdown-metadata-plugin",
110
110
  canHandle: (e) => typeof e == "string" || typeof e == "number" || typeof e == "boolean" || !e,
111
- transform: (r, i) => t({
112
- ...i,
113
- value: r,
114
- children: process.env.INTLAYER_EDITOR_ENABLED !== "false" && x.enabled ? y(n, { get children() {
115
- return y(T, b(o, { get children() {
116
- return y(N, b(o, {
111
+ transform: (i, a) => x({
112
+ ...a,
113
+ value: i,
114
+ children: process.env.INTLAYER_EDITOR_ENABLED !== "false" && n.enabled ? e(S, { get children() {
115
+ return e(T, t(s, { get children() {
116
+ return e(N, t(s, {
117
117
  get metadataKeyPath() {
118
- return i.keyPath;
118
+ return a.keyPath;
119
119
  },
120
- children: e
120
+ children: r
121
121
  }));
122
122
  } }));
123
- } }) : y(N, b(o, {
123
+ } }) : e(N, t(s, {
124
124
  get metadataKeyPath() {
125
- return i.keyPath;
125
+ return a.keyPath;
126
126
  },
127
- children: e
127
+ children: r
128
128
  }))
129
129
  })
130
130
  }],
131
- dictionaryKey: o.dictionaryKey,
131
+ dictionaryKey: s.dictionaryKey,
132
132
  keyPath: []
133
- }), c = (i) => t({
134
- ...r,
135
- value: e,
136
- children: process.env.INTLAYER_EDITOR_ENABLED !== "false" && x.enabled ? y(n, { get children() {
137
- return y(T, b(o, { get children() {
138
- return y(M, b(o, {
139
- components: i,
140
- children: e
133
+ }), l = (a) => x({
134
+ ...i,
135
+ value: r,
136
+ children: process.env.INTLAYER_EDITOR_ENABLED !== "false" && n.enabled ? e(S, { get children() {
137
+ return e(T, t(s, { get children() {
138
+ return e(M, t(s, {
139
+ components: a,
140
+ children: r
141
141
  }));
142
142
  } }));
143
- } }) : y(M, b(o, {
144
- components: i,
145
- children: e
143
+ } }) : e(M, t(s, {
144
+ components: a,
145
+ children: r
146
146
  })),
147
147
  additionalProps: {
148
- metadata: s,
149
- use: c
148
+ metadata: c,
149
+ use: l
150
150
  }
151
151
  });
152
- return c();
152
+ return l();
153
153
  }
154
- }, F = process.env.INTLAYER_NODE_TYPE_MARKDOWN === "false" ? c : {
154
+ }, F = process.env.INTLAYER_NODE_TYPE_MARKDOWN === "false" ? s : {
155
155
  id: "markdown-plugin",
156
- canHandle: (e) => typeof e == "object" && e?.nodeType === w.MARKDOWN,
156
+ canHandle: (e) => typeof e == "object" && e?.nodeType === y.MARKDOWN,
157
157
  transform: (e, t, n) => {
158
- let r = [...t.keyPath, { type: w.MARKDOWN }], i = e[w.MARKDOWN];
158
+ let r = [...t.keyPath, { type: y.MARKDOWN }], i = e[y.MARKDOWN];
159
159
  return n(i, {
160
160
  ...t,
161
161
  children: i,
@@ -163,46 +163,46 @@ var O = {
163
163
  plugins: [P, ...t.plugins ?? []]
164
164
  });
165
165
  }
166
- }, I = r(() => D.then((e) => ({ default: e }))), L = process.env.INTLAYER_NODE_TYPE_HTML === "false" ? c : {
166
+ }, I = C(() => D.then((e) => ({ default: e }))), L = process.env.INTLAYER_NODE_TYPE_HTML === "false" ? s : {
167
167
  id: "html-plugin",
168
- canHandle: (e) => typeof e == "object" && e?.nodeType === w.HTML,
169
- transform: (e, r) => {
170
- let i = e[w.HTML], { plugins: a, children: o, ...s } = r, c = (e) => t({
171
- ...s,
172
- value: i,
173
- children: process.env.INTLAYER_EDITOR_ENABLED !== "false" && x.enabled ? y(n, { get children() {
174
- return y(T, b(s, { get children() {
175
- return y(I, b(s, {
176
- html: i,
177
- components: e
168
+ canHandle: (e) => typeof e == "object" && e?.nodeType === y.HTML,
169
+ transform: (r, i) => {
170
+ let a = r[y.HTML], { plugins: o, children: s, ...c } = i, l = (r) => x({
171
+ ...c,
172
+ value: a,
173
+ children: process.env.INTLAYER_EDITOR_ENABLED !== "false" && n.enabled ? e(S, { get children() {
174
+ return e(T, t(c, { get children() {
175
+ return e(I, t(c, {
176
+ html: a,
177
+ components: r
178
178
  }));
179
179
  } }));
180
- } }) : y(I, b(s, {
181
- html: i,
182
- components: e
180
+ } }) : e(I, t(c, {
181
+ html: a,
182
+ components: r
183
183
  })),
184
- additionalProps: { use: c }
184
+ additionalProps: { use: l }
185
185
  });
186
- return c();
186
+ return l();
187
187
  }
188
188
  }, R = /* @__PURE__ */ new Map(), z = (e, t = !0) => {
189
- let n = m(e), r = `${n}_${t}`;
190
- if (R.has(r)) return R.get(r);
191
- let i = [
189
+ let n = p(e), i = `${n}_${t}`;
190
+ if (R.has(i)) return R.get(i);
191
+ let u = [
192
192
  O,
193
- v(n, t ? S.defaultLocale : void 0),
194
- s,
195
- p(n),
193
+ _(n, t ? r.defaultLocale : void 0),
196
194
  o,
197
195
  f(n),
196
+ a,
197
+ d(n),
198
+ c,
198
199
  l,
199
- u,
200
- h,
200
+ m,
201
201
  k,
202
202
  j,
203
203
  F,
204
204
  L
205
- ].filter((e) => e !== c);
206
- return R.set(r, i), i;
205
+ ].filter((e) => e !== s);
206
+ return R.set(i, u), u;
207
207
  };
208
208
  export { z as getPlugins, L as htmlPlugin, j as insertionPlugin, O as intlayerNodePlugins, F as markdownPlugin, P as markdownStringPlugin, k as solidNodePlugins };
@@ -1 +1 @@
1
- const e=require("./isEnabled-CuTKz0YA.js");let t=require("@intlayer/config/built");var n=e=>e.map(e=>e.key===void 0?`*`:String(e.key)).join(`.`),r=e=>({dictionaryKey:e.dictionaryKey,keyPath:n(e.keyPath),locale:e.locale,nodeType:e.nodeType,experimentKey:e.experimentKey,variant:e.variant}),i=e=>{let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return t>>>0},a=(e,t,n,r)=>{if(n.length===0)throw Error(`assignVariant requires at least one variant`);if(n.length===1)return n[0];let a=i(`${e}:${t}`)/4294967296;if(!r||r.length!==n.length){let e=Math.floor(a*n.length);return n[Math.min(e,n.length-1)]}let o=r.reduce((e,t)=>e+t,0);if(o<=0)return n[Math.floor(a*n.length)];let s=0,c=a*o;for(let e=0;e<n.length;e++)if(s+=r[e],c<s)return n[e];return n[n.length-1]},o=``,s=e=>[e.url,e.dictionaryKey,e.keyPath,e.locale,e.experimentKey??``,e.variant??``].join(o),c=({max:e})=>{let t=[],n=new Map,r=()=>t.length+n.size,i=()=>{for(;r()>e&&n.size>0;){let e=n.keys().next().value;n.delete(e)}r()>e&&(t=t.slice(r()-e))};return{push:e=>{if(e.type===`content_exposure`){let t=s(e),r=n.get(t);r?(r.count=(r.count??1)+(e.count??1),r.t=e.t):n.set(t,{...e,count:e.count??1})}else t.push(e);return i(),r()},drain:()=>{let e=[...t,...n.values()];return t=[],n.clear(),e},size:r}},l=(e,t)=>t>=1?!0:t<=0?!1:i(e)/4294967295<t,u=`__intlayer_analytics_sid__`,d=()=>{let e=typeof globalThis<`u`?globalThis.crypto:void 0;return e?.randomUUID?e.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`},f=()=>{if(typeof window>`u`||!window.sessionStorage)return d();try{let e=window.sessionStorage.getItem(u);if(e)return e;let t=d();return window.sessionStorage.setItem(u,t),t}catch{return d()}},p=(e,t,{useBeacon:n=!1,token:r}={})=>{try{let i=JSON.stringify(t);return n&&typeof navigator<`u`&&typeof navigator.sendBeacon==`function`?navigator.sendBeacon(e,i):typeof fetch==`function`&&(fetch(e,{method:`POST`,headers:{"Content-Type":`application/json`,...r?{Authorization:`Bearer ${r}`}:{}},body:i,keepalive:!0,credentials:`omit`,mode:`cors`}).catch(()=>{}),!0)}catch{return!1}},m=e=>{if(typeof window>`u`)return;let t=window.requestIdleCallback;typeof t==`function`?t(()=>e()):setTimeout(e,1)},h=`__intlayer_public_token__`,g=6e4,_=()=>{try{let e=window.sessionStorage?.getItem(h);if(!e)return null;let t=JSON.parse(e);return typeof t?.token!=`string`||typeof t?.expiresAt!=`number`?null:t}catch{return null}},v=e=>{try{window.sessionStorage?.setItem(h,JSON.stringify(e))}catch{}},y=({backendURL:e,clientId:t})=>{let n=`${e.replace(/\/$/,``)}/api/public/token`,r=null,i=null,a=e=>e!==null&&e.expiresAt-g>Date.now(),o=()=>{if(a(r))return r.token;if(typeof window<`u`){let e=_();if(a(e))return r=e,e.token}},s=async()=>{try{let e=await fetch(n,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({clientId:t}),credentials:`omit`,mode:`cors`});if(!e.ok)return;let i=await e.json(),a=i?.data?.token,o=i?.data?.expiresIn??0;if(!a||o<=0)return;r={token:a,expiresAt:Date.now()+o*1e3},typeof window<`u`&&v(r)}catch{}finally{i=null}};return{getToken:o,prime:()=>{t&&typeof fetch==`function`&&(o()||(i||=s()))}}},b=`intlayer-analytics/1`,x=()=>typeof window>`u`||!window.location?``:window.location.pathname,S=()=>{if(typeof document<`u`&&document.referrer)try{return new URL(document.referrer).host}catch{return}},C=t=>{let n=f(),r=e.r(),i=!r&&l(n,t.sampleRate),o=c({max:t.maxBufferSize}),s=`${t.backendURL.replace(/\/$/,``)}/api/analytics/events`,u=y({backendURL:t.backendURL,clientId:t.clientId}),d=``,h=null,g=!1,_=null,v=null,C=new Set,w=(e=!1)=>{let r=o.drain(),i=u.getToken();for(let a=0;a<r.length;a+=200)p(s,{token:i,clientId:i?void 0:t.clientId,sessionId:n,sdkVersion:b,events:r.slice(a,a+200)},{useBeacon:e,token:i})},T=e=>{o.push(e)>=t.maxBufferSize&&w()},E=e=>{d=e},D=(e={})=>{if(!i)return;let t=e.url??x(),n=e.reason??`initial`;(n!==`route_change`||t!==v)&&(v=t,C=new Set,T({type:`page_view`,t:Date.now(),url:t,locale:e.locale??d,ref:e.ref??S(),vw:e.vw??(typeof window<`u`?window.innerWidth:void 0),vh:e.vh??(typeof window<`u`?window.innerHeight:void 0),reason:n}))},O=e=>{if(!i)return;let t=e.locale??d,n=[e.dictionaryKey,e.keyPath,t,e.experimentKey??``,e.variant??``].join(``);C.has(n)||(C.add(n),T({...e,type:`content_exposure`,t:Date.now(),url:x(),locale:t}))},k=e=>{r||(T({...e,type:`conversion`,t:Date.now(),url:x(),locale:e.locale??d}),w())},A=(e,t,r)=>a(n,e,t,r),j=()=>{if(typeof window>`u`)return;let e=()=>{document.visibilityState===`hidden`&&w(!0)},t=()=>w(!0),n=()=>D({reason:`route_change`});document.addEventListener(`visibilitychange`,e),window.addEventListener(`pagehide`,t,{capture:!0}),window.addEventListener(`popstate`,n);let r=window.history,i=r.pushState,a=function(...e){let t=i.apply(this,e);return D({reason:`route_change`}),t};r.pushState=a,_=()=>{document.removeEventListener(`visibilitychange`,e),window.removeEventListener(`pagehide`,t,{capture:!0}),window.removeEventListener(`popstate`,n),r.pushState===a&&(r.pushState=i)}};return{setLocale:E,trackPageView:D,trackContentExposure:O,trackConversion:k,getVariant:A,flush:w,start:()=>{g||r||(g=!0,u.prime(),h=setInterval(w,t.flushInterval),h?.unref?.(),m(j))},stop:()=>{g&&(g=!1,h&&=(clearInterval(h),null),_?.(),_=null,w(!0))}}},w=`__intlayer_analytics_client__`,T=`__intlayer_analytics_ref_count__`,E=()=>typeof window>`u`?null:window[w]??null,D=e=>{typeof window<`u`&&(window[w]=e)},O=()=>{if(typeof window>`u`)return 0;let e=window;return e[T]=(e[T]??0)+1,e[T]},k=()=>{if(typeof window>`u`)return 0;let e=window;return e[T]=Math.max(0,(e[T]??0)-1),e[T]},A=()=>{O();let e=E();if(e)return e;let n=C({backendURL:t.editor?.backendURL??``,clientId:t.editor?.clientId,flushInterval:t.analytics?.flushInterval??2e4,maxBufferSize:500,sampleRate:t.analytics?.sampleRate??1});return D(n),n.start(),n},j=()=>{k()>0||(E()?.stop(),D(null))};exports.buildContentExposure=r,exports.getGlobalAnalyticsClient=E,exports.initAnalyticsClient=A,exports.stopAnalyticsClient=j;
1
+ const e=require("./isEnabled-CuTKz0YA.js");let t=require("@intlayer/config/built");var n=e=>e.map(e=>e.key===void 0?`*`:String(e.key)).join(`.`),r=e=>({dictionaryKey:e.dictionaryKey,keyPath:n(e.keyPath),locale:e.locale,nodeType:e.nodeType,experimentKey:e.experimentKey,variant:e.variant}),i=e=>{let t=0x811c9dc5;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return t>>>0},a=(e,t,n,r)=>{if(n.length===0)throw Error(`assignVariant requires at least one variant`);if(n.length===1)return n[0];let a=i(`${e}:${t}`)/4294967296;if(!r||r.length!==n.length){let e=Math.floor(a*n.length);return n[Math.min(e,n.length-1)]}let o=r.reduce((e,t)=>e+t,0);if(o<=0)return n[Math.floor(a*n.length)];let s=0,c=a*o;for(let e=0;e<n.length;e++)if(s+=r[e],c<s)return n[e];return n[n.length-1]},o=``,s=e=>[e.url,e.dictionaryKey,e.keyPath,e.locale,e.experimentKey??``,e.variant??``].join(o),c=({max:e})=>{let t=[],n=new Map,r=()=>t.length+n.size,i=()=>{for(;r()>e&&n.size>0;){let e=n.keys().next().value;n.delete(e)}r()>e&&(t=t.slice(r()-e))};return{push:e=>{if(e.type===`content_exposure`){let t=s(e),r=n.get(t);r?(r.count=(r.count??1)+(e.count??1),r.t=e.t):n.set(t,{...e,count:e.count??1})}else t.push(e);return i(),r()},drain:()=>{let e=[...t,...n.values()];return t=[],n.clear(),e},size:r}},l=(e,t)=>t>=1?!0:t<=0?!1:i(e)/0xffffffff<t,u=`__intlayer_analytics_sid__`,d=()=>{let e=typeof globalThis<`u`?globalThis.crypto:void 0;return e?.randomUUID?e.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`},f=()=>{if(typeof window>`u`||!window.sessionStorage)return d();try{let e=window.sessionStorage.getItem(u);if(e)return e;let t=d();return window.sessionStorage.setItem(u,t),t}catch{return d()}},p=(e,t,{useBeacon:n=!1,token:r}={})=>{try{let i=JSON.stringify(t);return n&&typeof navigator<`u`&&typeof navigator.sendBeacon==`function`?navigator.sendBeacon(e,i):typeof fetch==`function`&&(fetch(e,{method:`POST`,headers:{"Content-Type":`application/json`,...r?{Authorization:`Bearer ${r}`}:{}},body:i,keepalive:!0,credentials:`omit`,mode:`cors`}).catch(()=>{}),!0)}catch{return!1}},m=e=>{if(typeof window>`u`)return;let t=window.requestIdleCallback;typeof t==`function`?t(()=>e()):setTimeout(e,1)},h=`__intlayer_public_token__`,g=6e4,_=()=>{try{let e=window.sessionStorage?.getItem(h);if(!e)return null;let t=JSON.parse(e);return typeof t?.token!=`string`||typeof t?.expiresAt!=`number`?null:t}catch{return null}},v=e=>{try{window.sessionStorage?.setItem(h,JSON.stringify(e))}catch{}},y=({backendURL:e,clientId:t})=>{let n=`${e.replace(/\/$/,``)}/api/public/token`,r=null,i=null,a=e=>e!==null&&e.expiresAt-g>Date.now(),o=()=>{if(a(r))return r.token;if(typeof window<`u`){let e=_();if(a(e))return r=e,e.token}},s=async()=>{try{let e=await fetch(n,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({clientId:t}),credentials:`omit`,mode:`cors`});if(!e.ok)return;let i=await e.json(),a=i?.data?.token,o=i?.data?.expiresIn??0;if(!a||o<=0)return;r={token:a,expiresAt:Date.now()+o*1e3},typeof window<`u`&&v(r)}catch{}finally{i=null}};return{getToken:o,prime:()=>{t&&typeof fetch==`function`&&(o()||(i||=s()))}}},b=`intlayer-analytics/1`,x=()=>typeof window>`u`||!window.location?``:window.location.pathname,S=()=>{if(typeof document<`u`&&document.referrer)try{return new URL(document.referrer).host}catch{return}},C=t=>{let n=f(),r=e.r(),i=!r&&l(n,t.sampleRate),o=c({max:t.maxBufferSize}),s=`${t.backendURL.replace(/\/$/,``)}/api/analytics/events`,u=y({backendURL:t.backendURL,clientId:t.clientId}),d=``,h=null,g=!1,_=null,v=null,C=new Set,w=(e=!1)=>{let r=o.drain(),i=u.getToken();for(let a=0;a<r.length;a+=200)p(s,{token:i,clientId:i?void 0:t.clientId,sessionId:n,sdkVersion:b,events:r.slice(a,a+200)},{useBeacon:e,token:i})},T=e=>{o.push(e)>=t.maxBufferSize&&w()},E=e=>{d=e},D=(e={})=>{if(!i)return;let t=e.url??x(),n=e.reason??`initial`;(n!==`route_change`||t!==v)&&(v=t,C=new Set,T({type:`page_view`,t:Date.now(),url:t,locale:e.locale??d,ref:e.ref??S(),vw:e.vw??(typeof window<`u`?window.innerWidth:void 0),vh:e.vh??(typeof window<`u`?window.innerHeight:void 0),reason:n}))},O=e=>{if(!i)return;let t=e.locale??d,n=[e.dictionaryKey,e.keyPath,t,e.experimentKey??``,e.variant??``].join(``);C.has(n)||(C.add(n),T({...e,type:`content_exposure`,t:Date.now(),url:x(),locale:t}))},k=e=>{r||(T({...e,type:`conversion`,t:Date.now(),url:x(),locale:e.locale??d}),w())},A=(e,t,r)=>a(n,e,t,r),j=()=>{if(typeof window>`u`)return;let e=()=>{document.visibilityState===`hidden`&&w(!0)},t=()=>w(!0),n=()=>D({reason:`route_change`});document.addEventListener(`visibilitychange`,e),window.addEventListener(`pagehide`,t,{capture:!0}),window.addEventListener(`popstate`,n);let r=window.history,i=r.pushState,a=function(...e){let t=i.apply(this,e);return D({reason:`route_change`}),t};r.pushState=a,_=()=>{document.removeEventListener(`visibilitychange`,e),window.removeEventListener(`pagehide`,t,{capture:!0}),window.removeEventListener(`popstate`,n),r.pushState===a&&(r.pushState=i)}};return{setLocale:E,trackPageView:D,trackContentExposure:O,trackConversion:k,getVariant:A,flush:w,start:()=>{g||r||(g=!0,u.prime(),h=setInterval(w,t.flushInterval),h?.unref?.(),m(j))},stop:()=>{g&&(g=!1,h&&=(clearInterval(h),null),_?.(),_=null,w(!0))}}},w=`__intlayer_analytics_client__`,T=`__intlayer_analytics_ref_count__`,E=()=>typeof window>`u`?null:window[w]??null,D=e=>{typeof window<`u`&&(window[w]=e)},O=()=>{if(typeof window>`u`)return 0;let e=window;return e[T]=(e[T]??0)+1,e[T]},k=()=>{if(typeof window>`u`)return 0;let e=window;return e[T]=Math.max(0,(e[T]??0)-1),e[T]},A=()=>{O();let e=E();if(e)return e;let n=C({backendURL:t.editor?.backendURL??``,clientId:t.editor?.clientId,flushInterval:t.analytics?.flushInterval??2e4,maxBufferSize:500,sampleRate:t.analytics?.sampleRate??1});return D(n),n.start(),n},j=()=>{k()>0||(E()?.stop(),D(null))};exports.buildContentExposure=r,exports.getGlobalAnalyticsClient=E,exports.initAnalyticsClient=A,exports.stopAnalyticsClient=j;
@@ -9,7 +9,7 @@ var r = (e) => e.map((e) => e.key === void 0 ? "*" : String(e.key)).join("."), i
9
9
  experimentKey: e.experimentKey,
10
10
  variant: e.variant
11
11
  }), a = (e) => {
12
- let t = 2166136261;
12
+ let t = 0x811c9dc5;
13
13
  for (let n = 0; n < e.length; n++) t ^= e.charCodeAt(n), t = Math.imul(t, 16777619);
14
14
  return t >>> 0;
15
15
  }, o = (e, t, n, r) => {
@@ -57,7 +57,7 @@ var r = (e) => e.map((e) => e.key === void 0 ? "*" : String(e.key)).join("."), i
57
57
  },
58
58
  size: r
59
59
  };
60
- }, u = (e, t) => t >= 1 ? !0 : t <= 0 ? !1 : a(e) / 4294967295 < t, d = "__intlayer_analytics_sid__", f = () => {
60
+ }, u = (e, t) => t >= 1 ? !0 : t <= 0 ? !1 : a(e) / 0xffffffff < t, d = "__intlayer_analytics_sid__", f = () => {
61
61
  let e = typeof globalThis < "u" ? globalThis.crypto : void 0;
62
62
  return e?.randomUUID ? e.randomUUID() : `${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 10)}`;
63
63
  }, p = () => {
@@ -1,8 +1,8 @@
1
1
  import { t as isEnabled } from "../isEnabled-C5NUhdhZ.js";
2
+ import { createSignal, onCleanup } from "solid-js";
2
3
  import { useIntlayerContext } from "../client/IntlayerProvider.jsx";
3
4
  import { createWatchEffect, onMounted } from "../solidCompat.js";
4
5
  import { setExposureSink } from "./exposureSink.js";
5
- import { createSignal, onCleanup } from "solid-js";
6
6
  // src/analytics/useAnalytics.tsx
7
7
  /**
8
8
  * Initializes the Intlayer analytics client singleton when analytics is enabled
@@ -21,7 +21,7 @@ var useAnalytics = () => {
21
21
  let cancelled = false;
22
22
  let initialized = false;
23
23
  onMounted(() => {
24
- import("../esm-BS5TZIsL.js").then(({ initAnalyticsClient, buildContentExposure }) => {
24
+ import("../esm-1cHk4dPd.js").then(({ initAnalyticsClient, buildContentExposure }) => {
25
25
  if (cancelled) return;
26
26
  const clientInstance = initAnalyticsClient();
27
27
  initialized = true;
@@ -50,7 +50,7 @@ var useAnalytics = () => {
50
50
  onCleanup(() => {
51
51
  cancelled = true;
52
52
  setExposureSink(null);
53
- import("../esm-BS5TZIsL.js").then(({ stopAnalyticsClient }) => {
53
+ import("../esm-1cHk4dPd.js").then(({ stopAnalyticsClient }) => {
54
54
  if (initialized) stopAnalyticsClient();
55
55
  }).catch(() => {});
56
56
  });
@@ -16,7 +16,7 @@ import { t as isEnabled } from "../isEnabled-C5NUhdhZ.js";
16
16
  var useConversion = () => {
17
17
  return (params) => {
18
18
  if (process.env.INTLAYER_ANALYTICS_ENABLED === "false" || !isEnabled) return;
19
- import("../esm-BS5TZIsL.js").then(({ getGlobalAnalyticsClient }) => {
19
+ import("../esm-1cHk4dPd.js").then(({ getGlobalAnalyticsClient }) => {
20
20
  getGlobalAnalyticsClient()?.trackConversion(params);
21
21
  }).catch(() => {});
22
22
  };
@@ -1,6 +1,6 @@
1
1
  import { t as isEnabled } from "../isEnabled-C5NUhdhZ.js";
2
- import { onMounted } from "../solidCompat.js";
3
2
  import { createSignal, onCleanup } from "solid-js";
3
+ import { onMounted } from "../solidCompat.js";
4
4
  // src/analytics/useExperiment.ts
5
5
  /**
6
6
  * Assigns this session to a variant of an A/B experiment and records the
@@ -28,7 +28,7 @@ var useExperiment = (experimentKey, variants, weights) => {
28
28
  let initialized = false;
29
29
  onMounted(() => {
30
30
  if (process.env.INTLAYER_ANALYTICS_ENABLED === "false" || !isEnabled) return;
31
- import("../esm-BS5TZIsL.js").then(({ initAnalyticsClient }) => {
31
+ import("../esm-1cHk4dPd.js").then(({ initAnalyticsClient }) => {
32
32
  if (cancelled) return;
33
33
  const client = initAnalyticsClient();
34
34
  initialized = true;
@@ -46,7 +46,7 @@ var useExperiment = (experimentKey, variants, weights) => {
46
46
  });
47
47
  onCleanup(() => {
48
48
  cancelled = true;
49
- import("../esm-BS5TZIsL.js").then(({ stopAnalyticsClient }) => {
49
+ import("../esm-1cHk4dPd.js").then(({ stopAnalyticsClient }) => {
50
50
  if (initialized) stopAnalyticsClient();
51
51
  }).catch(() => {});
52
52
  });
@@ -1,10 +1,10 @@
1
+ import { internationalization } from "@intlayer/config/built";
2
+ import { setIntlayerIdentifier } from "@intlayer/config/client";
3
+ import { localeResolver } from "@intlayer/core/localization";
4
+ import { createContext, createMemo, untrack, useContext } from "solid-js";
1
5
  import { LoadingBoundary } from "../LoadingBoundary.jsx";
2
6
  import { createWritableMemo, getContextProvider, lazyComponent, onMounted, runInTransition } from "../solidCompat.js";
3
7
  import { getLocaleInStorage, setLocaleInStorage } from "./useLocaleStorage.js";
4
- import { internationalization } from "@intlayer/config/built";
5
- import { createContext, createMemo, untrack, useContext } from "solid-js";
6
- import { localeResolver } from "@intlayer/core/localization";
7
- import { setIntlayerIdentifier } from "@intlayer/config/client";
8
8
  // src/client/IntlayerProvider.tsx
9
9
  var LazyEditorProvider = process.env.INTLAYER_EDITOR_ENABLED !== "false" ? lazyComponent(() => import("../editor/EditorProvider.jsx").then((m) => ({ default: m.EditorProvider }))) : null;
10
10
  var LazyAnalyticsProvider = process.env.INTLAYER_ANALYTICS_ENABLED !== "false" ? lazyComponent(() => import("../analytics/AnalyticsProvider.jsx").then((m) => ({ default: m.AnalyticsProvider }))) : null;
@@ -1,7 +1,7 @@
1
- import { getLocaleFromStorageClient } from "@intlayer/core/utils";
2
1
  import { internationalization } from "@intlayer/config/built";
3
2
  import { DEFAULT_LOCALE } from "@intlayer/config/defaultValues";
4
3
  import { localeDetector } from "@intlayer/core/localization";
4
+ import { getLocaleFromStorageClient } from "@intlayer/core/utils";
5
5
  // src/client/getBrowserLocale.tsx
6
6
  var LanguageDetector = /* @__PURE__ */ function(LanguageDetector) {
7
7
  LanguageDetector["Querystring"] = "querystring";
@@ -1,6 +1,6 @@
1
- import { IntlayerClientContext } from "./IntlayerProvider.jsx";
2
1
  import { getTranslation } from "@intlayer/core/interpreter";
3
2
  import { useContext } from "solid-js";
3
+ import { IntlayerClientContext } from "./IntlayerProvider.jsx";
4
4
  // src/client/t.ts
5
5
  /**
6
6
  * On the client side, this function returns the translation of the provided multilang content.