@plitzi/sdk-shared 0.38.24 → 0.39.1

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 (197) hide show
  1. package/CHANGELOG.md +153 -1
  2. package/dist/actions/functions.d.ts +22 -1
  3. package/dist/actions/functions.mjs +3 -3
  4. package/dist/actions/index.d.ts +1 -1
  5. package/dist/actions/index.mjs +7 -7
  6. package/dist/auth/failureChannel.mjs +1 -0
  7. package/dist/auth/index.d.ts +1 -1
  8. package/dist/auth/index.mjs +2 -2
  9. package/dist/auth/visitorRoles.d.ts +8 -0
  10. package/dist/auth/visitorRoles.mjs +5 -2
  11. package/dist/authoring/declare.d.ts +34 -1
  12. package/dist/authoring/elementCallbacks.d.ts +13 -0
  13. package/dist/authoring/elementCallbacks.mjs +11 -5
  14. package/dist/authoring/index.mjs +3 -3
  15. package/dist/authoring/paramSpec.d.ts +1 -0
  16. package/dist/dataSource/getBindingsDetails.d.ts +1 -1
  17. package/dist/dataSource/getBindingsDetails.mjs +1 -1
  18. package/dist/dataSource/globalSources.d.ts +1 -1
  19. package/dist/dataSource/index.d.ts +1 -2
  20. package/dist/dataSource/index.mjs +1 -1
  21. package/dist/dataSource/utility/arrayMap.mjs +1 -1
  22. package/dist/dataSource/utility/capitalize.mjs +1 -1
  23. package/dist/dataSource/utility/styleSelector.mjs +5 -3
  24. package/dist/dataSource/utility/styleVariant.mjs +17 -13
  25. package/dist/dataSource/variables/index.d.ts +2 -0
  26. package/dist/dataSource/variables/index.mjs +1 -0
  27. package/dist/dataSource/{resolveVariables.d.ts → variables/resolveVariables.d.ts} +1 -1
  28. package/dist/dataSource/{resolveVariables.mjs → variables/resolveVariables.mjs} +1 -1
  29. package/dist/devTools/chrome.d.ts +6 -0
  30. package/dist/devTools/chrome.mjs +2 -2
  31. package/dist/devTools/index.mjs +5 -5
  32. package/dist/devTools/sight/index.d.ts +1 -0
  33. package/dist/devTools/sight/index.mjs +1 -0
  34. package/dist/devTools/sight/sight.d.ts +28 -0
  35. package/dist/devTools/sight/sight.mjs +127 -0
  36. package/dist/devTools/utils/PlitziConsole.d.ts +14 -0
  37. package/dist/devTools/utils/PlitziConsole.mjs +20 -3
  38. package/dist/flags/flagsCookie.mjs +4 -4
  39. package/dist/flags/resolveFlags.d.ts +1 -1
  40. package/dist/helpers/index.mjs +19 -19
  41. package/dist/helpers/ruleEvaluator.d.ts +2 -0
  42. package/dist/helpers/ruleEvaluator.mjs +2 -2
  43. package/dist/helpers/scroll.d.ts +10 -0
  44. package/dist/helpers/scroll.mjs +2 -2
  45. package/dist/helpers/twigWrapper/Evaluator/Evaluator.mjs +90 -88
  46. package/dist/helpers/twigWrapper/Evaluator/helpers.d.ts +6 -0
  47. package/dist/helpers/twigWrapper/Evaluator/helpers.mjs +11 -2
  48. package/dist/helpers/twigWrapper/filters/arrays.d.ts +2 -0
  49. package/dist/helpers/twigWrapper/filters/arrays.mjs +66 -0
  50. package/dist/helpers/twigWrapper/filters/catalog/index.d.ts +17 -0
  51. package/dist/helpers/twigWrapper/filters/catalog/index.mjs +351 -0
  52. package/dist/helpers/twigWrapper/filters/dateParts.d.ts +25 -0
  53. package/dist/helpers/twigWrapper/filters/dateParts.mjs +56 -0
  54. package/dist/helpers/twigWrapper/filters/dates.d.ts +2 -0
  55. package/dist/helpers/twigWrapper/filters/dates.mjs +97 -0
  56. package/dist/helpers/twigWrapper/filters/filters.d.ts +3 -13
  57. package/dist/helpers/twigWrapper/filters/filters.mjs +25 -483
  58. package/dist/helpers/twigWrapper/filters/hashing.d.ts +3 -0
  59. package/dist/helpers/twigWrapper/filters/hashing.mjs +101 -0
  60. package/dist/helpers/twigWrapper/filters/index.mjs +4 -1
  61. package/dist/helpers/twigWrapper/filters/misc.d.ts +5 -0
  62. package/dist/helpers/twigWrapper/filters/misc.mjs +52 -0
  63. package/dist/helpers/twigWrapper/filters/numbers.d.ts +2 -0
  64. package/dist/helpers/twigWrapper/filters/numbers.mjs +36 -0
  65. package/dist/helpers/twigWrapper/filters/objects.d.ts +3 -0
  66. package/dist/helpers/twigWrapper/filters/objects.mjs +61 -0
  67. package/dist/helpers/twigWrapper/filters/raw.d.ts +8 -0
  68. package/dist/helpers/twigWrapper/filters/raw.mjs +7 -0
  69. package/dist/helpers/twigWrapper/filters/strings.d.ts +7 -0
  70. package/dist/helpers/twigWrapper/filters/strings.mjs +79 -0
  71. package/dist/helpers/twigWrapper/filters/types.d.ts +5 -0
  72. package/dist/helpers/twigWrapper/filters/types.mjs +4 -0
  73. package/dist/helpers/twigWrapper/filters/values.d.ts +12 -0
  74. package/dist/helpers/twigWrapper/filters/values.mjs +17 -0
  75. package/dist/helpers/twigWrapper/inspectTemplate.d.ts +5 -0
  76. package/dist/helpers/twigWrapper/inspectTemplate.mjs +39 -20
  77. package/dist/helpers/utils.d.ts +4 -0
  78. package/dist/helpers/utils.mjs +3 -5
  79. package/dist/navigation/index.d.ts +2 -0
  80. package/dist/navigation/index.mjs +2 -1
  81. package/dist/navigation/sitemap.d.ts +16 -0
  82. package/dist/navigation/sitemap.mjs +25 -0
  83. package/dist/network/entitlements.d.ts +101 -0
  84. package/dist/network/entitlements.mjs +4 -0
  85. package/dist/network/graphql/builder/Mutations/Space/SpaceRunE2eTestsMutation.d.ts +31 -0
  86. package/dist/network/graphql/builder/Mutations/Space/SpaceRunE2eTestsMutation.mjs +13 -0
  87. package/dist/network/graphql/builder/Mutations/Space/SpaceSetTestsMutation.d.ts +5 -0
  88. package/dist/network/graphql/builder/Mutations/Space/SpaceSetTestsMutation.mjs +11 -0
  89. package/dist/network/graphql/builder/Mutations/Space/SpaceUpdateSettingsMutation.d.ts +1 -1
  90. package/dist/network/graphql/builder/Mutations/Space/SpaceUpdateSettingsMutation.mjs +1 -1
  91. package/dist/network/graphql/builder/Mutations/index.d.ts +5 -0
  92. package/dist/network/graphql/builder/Mutations/index.mjs +150 -146
  93. package/dist/network/graphql/builder/Queries/Space/SpaceTestsQuery.d.ts +40 -0
  94. package/dist/network/graphql/builder/Queries/Space/SpaceTestsQuery.mjs +24 -0
  95. package/dist/network/graphql/builder/Queries/index.d.ts +3 -0
  96. package/dist/network/graphql/builder/Queries/index.mjs +44 -42
  97. package/dist/network/graphql/sdk/Queries/InitQuery.d.ts +3 -1
  98. package/dist/network/graphql/sdk/Queries/InitQuery.mjs +1 -1
  99. package/dist/network/index.d.ts +1 -0
  100. package/dist/network/index.mjs +9 -8
  101. package/dist/network/spaceEvents.d.ts +20 -1
  102. package/dist/network/spaceEvents.mjs +12 -0
  103. package/dist/project/index.mjs +8 -5
  104. package/dist/project/layout/check.d.ts +22 -0
  105. package/dist/project/layout/check.mjs +60 -0
  106. package/dist/project/{layout.d.ts → layout/codes.d.ts} +3 -66
  107. package/dist/project/layout/codes.mjs +108 -0
  108. package/dist/project/layout/contents.d.ts +10 -0
  109. package/dist/project/layout/contents.mjs +31 -0
  110. package/dist/project/layout/files.d.ts +31 -0
  111. package/dist/project/layout/files.mjs +49 -0
  112. package/dist/project/layout/folders.d.ts +4 -0
  113. package/dist/project/layout/folders.mjs +69 -0
  114. package/dist/project/layout/index.d.ts +16 -0
  115. package/dist/project/layout/index.mjs +5 -0
  116. package/dist/project/layout/plugins.d.ts +46 -0
  117. package/dist/project/layout/plugins.mjs +99 -0
  118. package/dist/project/layout/vendor.d.ts +15 -0
  119. package/dist/project/layout/vendor.mjs +34 -0
  120. package/dist/project/pages/index.d.ts +8 -0
  121. package/dist/project/pages/index.mjs +14 -0
  122. package/dist/project/paths/index.d.ts +52 -4
  123. package/dist/project/paths/index.mjs +2 -2
  124. package/dist/project/root.d.ts +6 -0
  125. package/dist/project/root.mjs +11 -10
  126. package/dist/realtime/client.mjs +104 -91
  127. package/dist/realtime/presence.d.ts +2 -2
  128. package/dist/realtime/presence.mjs +27 -21
  129. package/dist/runs/index.d.ts +73 -0
  130. package/dist/runs/index.mjs +6 -0
  131. package/dist/runs/report.d.ts +56 -0
  132. package/dist/runs/report.mjs +17 -0
  133. package/dist/schema/index.d.ts +6 -0
  134. package/dist/schema/index.mjs +18 -12
  135. package/dist/schema/motion.d.ts +25 -0
  136. package/dist/schema/motion.mjs +47 -19
  137. package/dist/schema/pageAccess.d.ts +6 -0
  138. package/dist/schema/pageAccess.mjs +8 -3
  139. package/dist/schema/pageHead.d.ts +64 -0
  140. package/dist/schema/pageHead.mjs +68 -0
  141. package/dist/schema/providerAnswer.d.ts +17 -0
  142. package/dist/schema/providerAnswer.mjs +4 -0
  143. package/dist/schema/providerWhen.d.ts +36 -0
  144. package/dist/schema/providerWhen.mjs +58 -0
  145. package/dist/schema/schemaSettings.d.ts +14 -0
  146. package/dist/schema/schemaSettings.mjs +4 -0
  147. package/dist/schema/serverElements.d.ts +20 -1
  148. package/dist/schema/serverElements.mjs +41 -28
  149. package/dist/schema/serverInput.d.ts +34 -0
  150. package/dist/schema/serverInput.mjs +60 -0
  151. package/dist/schema/serverQuery.d.ts +47 -0
  152. package/dist/schema/serverQuery.mjs +70 -0
  153. package/dist/server/index.mjs +5 -5
  154. package/dist/server/rsc/refreshRsc.d.ts +6 -2
  155. package/dist/server/rsc/refreshRsc.mjs +75 -59
  156. package/dist/server/rsc/useRscSync.mjs +22 -18
  157. package/dist/source/export.d.ts +1 -1
  158. package/dist/state/index.mjs +3 -3
  159. package/dist/state/paintedState.d.ts +20 -4
  160. package/dist/state/paintedState.mjs +13 -12
  161. package/dist/state/runtimeStatePersist.mjs +109 -48
  162. package/dist/store/renderSettings.d.ts +2 -0
  163. package/dist/store/renderSettings.mjs +13 -5
  164. package/dist/store/storeHooks.d.ts +45 -45
  165. package/dist/style/index.mjs +16 -16
  166. package/dist/style/styleConstants.d.ts +12 -2
  167. package/dist/style/styleConstants.mjs +20 -0
  168. package/dist/style/styleStates.d.ts +5 -0
  169. package/dist/style/styleStates.mjs +21 -5
  170. package/dist/types/ActionTypes.d.ts +26 -3
  171. package/dist/types/AuthTypes.d.ts +19 -1
  172. package/dist/types/CommonTypes.d.ts +3 -2
  173. package/dist/types/ElementTypes.d.ts +1 -1
  174. package/dist/types/InteractionTypes.d.ts +10 -1
  175. package/dist/types/JobTypes.d.ts +2 -1
  176. package/dist/types/OAuthTypes.d.ts +246 -0
  177. package/dist/types/OAuthTypes.mjs +0 -0
  178. package/dist/types/PluginTypes.d.ts +2 -0
  179. package/dist/types/PreviewTypes.d.ts +71 -0
  180. package/dist/types/PreviewTypes.mjs +0 -0
  181. package/dist/types/RealtimeTypes.d.ts +11 -0
  182. package/dist/types/SchemaTypes.d.ts +63 -0
  183. package/dist/types/ServerAdapterTypes.d.ts +345 -0
  184. package/dist/types/ServerAdapterTypes.mjs +0 -0
  185. package/dist/types/ServerConfigTypes.d.ts +527 -0
  186. package/dist/types/ServerConfigTypes.mjs +0 -0
  187. package/dist/types/ServerLogTypes.d.ts +119 -0
  188. package/dist/types/ServerLogTypes.mjs +0 -0
  189. package/dist/types/ServerTypes.d.ts +30 -1215
  190. package/dist/types/StoreTypes.d.ts +39 -1
  191. package/dist/types/TestTypes.d.ts +249 -0
  192. package/dist/types/TestTypes.mjs +0 -0
  193. package/dist/types/index.d.ts +6 -0
  194. package/eslint.config.mjs +3 -1
  195. package/package.json +2 -2
  196. package/setupTests.ts +4 -3
  197. package/dist/project/layout.mjs +0 -394
@@ -1,108 +1,124 @@
1
1
  import { authFailureFromResponse as e, reportAuthFailure as t } from "../../auth/failureChannel.mjs";
2
2
  import { recordRenderActionRuns as n } from "../../store/actionRuns/actionRunsRecorder.mjs";
3
3
  import { getPaths as r, matchRoutePath as i } from "../../navigation/routes.mjs";
4
- import { collectServerElements as a, hasServerElements as o } from "../../schema/serverElements.mjs";
4
+ import { collectServerElements as a, hasServerElements as o, rscFailureOf as s } from "../../schema/serverElements.mjs";
5
5
  //#region src/server/rsc/refreshRsc.ts
6
- var s = (e, t, n) => {
6
+ var c = (e, t, n) => {
7
7
  if (!e) return;
8
8
  let a = e.pages.reduce((t, n) => (n in e.flat && (t[n] = e.flat[n]), t), {});
9
9
  return i(r(a, e.pageFolders, n), t.split("?")[0], n).pageId;
10
- }, c = (e, t, n, r) => {
10
+ }, l = (e, t, n, r) => {
11
11
  let i = new Set(a(e, t, [...n], r).map(({ id: e }) => e));
12
12
  return n.filter((e) => i.has(e));
13
- }, l = (e) => `rsc.data.${e}`, u = () => typeof window > "u" ? "" : `${window.location.pathname}${window.location.search}`, d = "*", f = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new WeakMap(), m = () => ({
13
+ }, u = (e) => `rsc.data.${e}`, d = () => typeof window > "u" ? "" : `${window.location.pathname}${window.location.search}`, f = "*", p = /* @__PURE__ */ new Map(), m = /* @__PURE__ */ new WeakMap(), h = /* @__PURE__ */ new Map(), g = (e, t) => {
14
+ h.set(e, t);
15
+ }, _ = (e) => {
16
+ let t = e.get("rsc.instance");
17
+ return typeof t == "string" && h.get(t) || e;
18
+ }, v = () => ({
14
19
  seq: 0,
15
20
  inFlight: /* @__PURE__ */ new Set(),
16
21
  asked: /* @__PURE__ */ new Map()
17
- }), h = (e) => {
22
+ }), y = (e) => {
18
23
  let t = e.get("rsc.instance");
19
24
  if (typeof t == "string" && t) {
20
- let e = f.get(t);
25
+ let e = p.get(t);
21
26
  if (e) return e;
22
- let n = m();
23
- return f.set(t, n), n;
27
+ let n = v();
28
+ return p.set(t, n), n;
24
29
  }
25
- let n = p.get(e);
30
+ let n = m.get(e);
26
31
  if (n) return n;
27
- let r = m();
28
- return p.set(e, r), r;
29
- }, g = (e, t) => {
32
+ let r = v();
33
+ return m.set(e, r), r;
34
+ }, b = (e, t) => {
30
35
  let n = {};
31
36
  t.inFlight.forEach((e) => {
32
- e.here && (e.ids ?? [d]).forEach((e) => {
37
+ e.here && (e.ids ?? [f]).forEach((e) => {
33
38
  n[e] = !0;
34
39
  });
35
40
  }), e.set("rsc.refreshing", n);
36
- }, _ = (e, t) => !e || !!t && t.every((t) => e.includes(t)), v = (e, t) => {
37
- h(e).inFlight.forEach((e) => {
41
+ }, x = (e, t) => !e || !!t && t.every((t) => e.includes(t)), S = (e, t) => {
42
+ y(e).inFlight.forEach((e) => {
38
43
  (!t || e.ids?.some((e) => t.includes(e))) && e.controller.abort();
39
44
  });
40
- }, y = (e) => {
41
- f.get(e)?.inFlight.forEach((e) => e.controller.abort()), f.delete(e);
42
- }, b = (e, t, n, r, i) => {
45
+ }, C = (e) => {
46
+ p.get(e)?.inFlight.forEach((e) => e.controller.abort()), p.delete(e), h.delete(e);
47
+ }, w = (e, t) => {
48
+ let n = Object.entries(t).flatMap(([e, t]) => {
49
+ let n = s(t);
50
+ return n === void 0 ? [] : [[e, n]];
51
+ });
52
+ if (n.length === 0) return;
53
+ let r = e.get("rsc.failures") ?? {};
54
+ e.set("rsc.failures", {
55
+ ...Object.fromEntries(n),
56
+ ...r
57
+ });
58
+ }, T = (e, t, n, r, i) => {
43
59
  let { ids: a, seq: o } = n;
44
60
  e.batch(() => {
45
- if (a?.length) Object.entries(r).forEach(([n, r]) => {
46
- (t.asked.get(n) ?? 0) <= o && (t.asked.get(d) ?? 0) <= o && e.set(l(n), r);
61
+ if (w(e, r), a?.length) Object.entries(r).forEach(([n, r]) => {
62
+ (t.asked.get(n) ?? 0) <= o && (t.asked.get(f) ?? 0) <= o && e.set(u(n), r);
47
63
  });
48
64
  else {
49
- let n = e.get("rsc.data") ?? {}, i = (e) => e !== d && (t.asked.get(e) ?? 0) > o, a = Object.fromEntries([...Object.entries(r).filter(([e]) => !i(e)), ...Object.entries(n).filter(([e]) => i(e))]);
65
+ let n = e.get("rsc.data") ?? {}, i = (e) => e !== f && (t.asked.get(e) ?? 0) > o, a = Object.fromEntries([...Object.entries(r).filter(([e]) => !i(e)), ...Object.entries(n).filter(([e]) => i(e))]);
50
66
  e.set("rsc.data", a);
51
67
  }
52
68
  e.set("rsc.loaded", !0), e.set("rsc.stale", !1), e.set("rsc.location", i);
53
69
  });
54
- }, x = async (r, i, a, { location: l, fresh: f = !1 } = {}) => {
55
- let { enabled: p, endpoint: m } = r.get("rsc") ?? {};
56
- if (!p || !m || typeof window > "u") return;
57
- let v = l ?? u(), y = r.get("schema"), x = r.get("runtime.sources.auth"), S = l ? s(y, l, !!x?.details) : r.get("navigation.currentPageId"), C = l ? void 0 : r.get("runtime.sources.flags");
58
- if (!y) return;
59
- let w = i?.length ? c(y, S, i, C) : void 0;
60
- if (w ? !w.length : !o(y, S, C)) return;
61
- let T = new URLSearchParams({ location: v });
62
- w?.length && T.set("ids", w.join(",")), Object.entries(a ?? {}).forEach(([e, t]) => T.set(e, t));
63
- let E = `${m}?${T.toString()}`, D = h(r), O = [...D.inFlight].find((e) => e.url === E && (e.fresh || !f));
64
- if (O) return O.promise;
65
- D.inFlight.forEach((e) => {
66
- _(w, e.ids) && e.controller.abort();
70
+ }, E = async (r, i, a, { location: s, fresh: u = !1 } = {}) => {
71
+ let p = _(r), { enabled: m, endpoint: h } = p.get("rsc") ?? {};
72
+ if (!m || !h || typeof window > "u") return;
73
+ let g = s ?? d(), v = p.get("schema"), S = p.get("runtime.sources.auth"), C = s ? c(v, s, !!S?.details) : p.get("navigation.currentPageId"), w = s ? void 0 : p.get("runtime.sources.flags");
74
+ if (!v) return;
75
+ let E = i?.length ? l(v, C, i, w) : void 0;
76
+ if (E ? !E.length : !o(v, C, w)) return;
77
+ let D = new URLSearchParams({ location: g });
78
+ E?.length && D.set("ids", E.join(",")), Object.entries(a ?? {}).forEach(([e, t]) => D.set(e, t));
79
+ let O = `${h}?${D.toString()}`, k = y(p), A = [...k.inFlight].find((e) => e.url === O && (e.fresh || !u));
80
+ if (A) return A.promise;
81
+ k.inFlight.forEach((e) => {
82
+ x(E, e.ids) && e.controller.abort();
67
83
  });
68
- let k = ++D.seq;
69
- w?.length ? w.forEach((e) => D.asked.set(e, k)) : (D.asked.clear(), D.asked.set(d, k));
70
- let A = new AbortController(), j = {
71
- url: E,
72
- ...w?.length ? { ids: w } : {},
73
- here: v === u(),
74
- fresh: f,
75
- seq: k,
76
- controller: A,
84
+ let j = ++k.seq;
85
+ E?.length ? E.forEach((e) => k.asked.set(e, j)) : (k.asked.clear(), k.asked.set(f, j));
86
+ let M = new AbortController(), N = {
87
+ url: O,
88
+ ...E?.length ? { ids: E } : {},
89
+ here: g === d(),
90
+ fresh: u,
91
+ seq: j,
92
+ controller: M,
77
93
  promise: Promise.resolve()
78
- }, M = async (i) => {
79
- let a = await fetch(E, {
80
- ...f ? {
94
+ }, P = async (r) => {
95
+ let i = await fetch(O, {
96
+ ...u ? {
81
97
  cache: "no-cache",
82
98
  headers: {
83
99
  Accept: "application/json",
84
100
  "Cache-Control": "no-cache"
85
101
  }
86
102
  } : { headers: { Accept: "application/json" } },
87
- signal: A.signal
103
+ signal: M.signal
88
104
  });
89
- if (!a.ok) {
90
- let n = e(a.status, await a.json().catch(() => void 0));
105
+ if (!i.ok) {
106
+ let n = e(i.status, await i.json().catch(() => void 0));
91
107
  if (n && await t({
92
108
  reason: n,
93
- url: m
94
- }) && !i) return M(!0);
95
- r.set("rsc.stale", !0);
109
+ url: h
110
+ }) && !r) return P(!0);
111
+ p.set("rsc.stale", !0);
96
112
  return;
97
113
  }
98
- let { serverData: o, actionRuns: s } = await a.json();
99
- s?.length && n(s), b(r, D, j, o ?? {}, v);
114
+ let { serverData: a, actionRuns: o } = await i.json();
115
+ o?.length && n(o), T(p, k, N, a ?? {}, g);
100
116
  };
101
- return j.promise = M(!1).catch(() => {
102
- A.signal.aborted || r.set("rsc.stale", !0);
117
+ return N.promise = P(!1).catch(() => {
118
+ M.signal.aborted || p.set("rsc.stale", !0);
103
119
  }).finally(() => {
104
- D.inFlight.delete(j), g(r, D);
105
- }), D.inFlight.add(j), g(r, D), j.promise;
120
+ k.inFlight.delete(N), b(p, k);
121
+ }), k.inFlight.add(N), b(p, k), N.promise;
106
122
  };
107
123
  //#endregion
108
- export { v as cancelRsc, u as currentRscLocation, x as default, x as refreshRsc, y as releaseRscRequests, l as rscDataPath };
124
+ export { S as cancelRsc, d as currentRscLocation, E as default, E as refreshRsc, g as holdRscRoot, w as noteRscFailures, C as releaseRscRequests, u as rscDataPath };
@@ -1,38 +1,42 @@
1
1
  import { useCommonStore as e, useCommonStoreSync as t } from "../../store/storeHooks.mjs";
2
- import n, { currentRscLocation as r, releaseRscRequests as i } from "./refreshRsc.mjs";
3
- import { useEffect as a, useId as o } from "react";
4
- import { useStoreById as s } from "@plitzi/nexus/react";
2
+ import n, { currentRscLocation as r, holdRscRoot as i, noteRscFailures as a, releaseRscRequests as o } from "./refreshRsc.mjs";
3
+ import { useEffect as s, useId as c } from "react";
4
+ import { useStoreById as l } from "@plitzi/nexus/react";
5
5
  //#region src/server/rsc/useRscSync.ts
6
- var c = (c) => {
7
- let l = s(), u = o(), [d] = e("schema.rsc", { mode: "mount" }), [f] = e([
6
+ var u = (u) => {
7
+ let d = l(), f = c(), [p] = e("schema.rsc", { mode: "mount" }), [m] = e([
8
8
  "navigation.routeParams",
9
9
  "navigation.queryParams",
10
10
  "navigation.currentPageId",
11
11
  "navigation.href"
12
- ]), p = JSON.stringify(f), { rscData: m, rscPath: h } = c ?? {}, g = (d?.enabled ?? !1) && !!h;
13
- t([
12
+ ]), h = JSON.stringify(m), { rscData: g, rscPath: _ } = u ?? {}, v = (p?.enabled ?? !1) && !!_;
13
+ i(f, d), t([
14
14
  "rsc.enabled",
15
15
  "rsc.endpoint",
16
16
  "rsc.instance"
17
17
  ], [
18
- g,
19
- h,
20
- u
18
+ v,
19
+ _,
20
+ f
21
21
  ]), t([
22
22
  "rsc.data",
23
23
  "rsc.loaded",
24
24
  "rsc.location"
25
25
  ], [
26
- m?.serverData ?? {},
27
- m !== void 0,
26
+ g?.serverData ?? {},
27
+ g !== void 0,
28
28
  r()
29
- ], { mode: "mount" }), a(() => () => i(u), [u]), a(() => {
30
- !g || l.get("rsc.loaded") && l.get("rsc.location") === r() && !l.get("rsc.stale") || n(l);
29
+ ], { mode: "mount" }), s(() => () => o(f), [f]);
30
+ let y = g?.serverData;
31
+ s(() => {
32
+ y && a(d, y);
33
+ }, [d, y]), s(() => {
34
+ !v || d.get("rsc.loaded") && d.get("rsc.location") === r() && !d.get("rsc.stale") || n(d);
31
35
  }, [
32
- g,
33
- p,
34
- l
36
+ v,
37
+ h,
38
+ d
35
39
  ]);
36
40
  };
37
41
  //#endregion
38
- export { c as default };
42
+ export { u as default };
@@ -53,7 +53,7 @@ export type SpaceExport = {
53
53
  manifest: unknown;
54
54
  }[];
55
55
  /**
56
- * The space's functions, by path in `functions/`, and the version of them this is — what `plitzi functions push`
56
+ * The space's functions, by path in `functions/`, and the version of them this is — what `plitzi space push functions`
57
57
  * checks the space's copy has not moved on from.
58
58
  */
59
59
  functions: {
@@ -1,3 +1,3 @@
1
- import { PAINTED_STATE_BUDGET as e, clearPaintedEntry as t, paintedEntryFromCookies as n, paintedKeys as r, paintedStateCookieName as i, paintedStateFor as a, pickPainted as o, readPaintedEntry as s, writePaintedEntry as c } from "./paintedState.mjs";
2
- import { runtimeStatePersist as l, stateOwner as u } from "./runtimeStatePersist.mjs";
3
- export { e as PAINTED_STATE_BUDGET, t as clearPaintedEntry, n as paintedEntryFromCookies, r as paintedKeys, i as paintedStateCookieName, a as paintedStateFor, o as pickPainted, s as readPaintedEntry, l as runtimeStatePersist, u as stateOwner, c as writePaintedEntry };
1
+ import { PAINTED_STATE_BUDGET as e, accountOwner as t, browserKeys as n, clearPaintedEntry as r, paintedEntryFromCookies as i, paintedKeys as a, paintedStateCookieName as o, paintedStateFor as s, pickPainted as c, readPaintedEntry as l, writePaintedEntry as u } from "./paintedState.mjs";
2
+ import { runtimeStatePersist as d, stateOwner as f } from "./runtimeStatePersist.mjs";
3
+ export { e as PAINTED_STATE_BUDGET, t as accountOwner, n as browserKeys, r as clearPaintedEntry, i as paintedEntryFromCookies, a as paintedKeys, o as paintedStateCookieName, s as paintedStateFor, c as pickPainted, l as readPaintedEntry, d as runtimeStatePersist, f as stateOwner, u as writePaintedEntry };
@@ -12,8 +12,11 @@
12
12
  * every request, so it holds only what the first paint needs, and never more than {@link PAINTED_STATE_BUDGET}.
13
13
  *
14
14
  * The entry carries who wrote it, as the kept state in web storage does, and a page that finds it written by somebody
15
- * else discards what it rendered with. The server cannot tell — who the visitor is, for a space with its own sign-in,
16
- * is only settled in the browser.
15
+ * else discards what it rendered with — all but the browser's keys (`browserState`), which are nobody's. The server
16
+ * can tell only half of that — who the visitor is, for a space with its own sign-in, is only settled in the browser — so
17
+ * it draws an entry whole unless the request proved an account and the entry names another: the page's providers read
18
+ * the painted values before its auth settles, and a dashboard drawn from the previous account's cookie asked for that
19
+ * account's workspace before the page could discard it.
17
20
  */
18
21
  /** Bytes of the encoded value: well inside the 4096 a browser allows a cookie, name and attributes included. */
19
22
  export declare const PAINTED_STATE_BUDGET = 3072;
@@ -21,6 +24,8 @@ export type PaintedEntry = {
21
24
  owner: string;
22
25
  values: Record<string, unknown>;
23
26
  };
27
+ /** How an account is written as the owner of an entry — here and on the kept state in web storage alike. */
28
+ export declare const accountOwner: (id: number | string) => string;
24
29
  /**
25
30
  * Per space, as the web storage key is (`plitzi_<webId>_state`) — and per port, because a cookie's scope is the host
26
31
  * without it: two spaces served from `localhost` on two ports would otherwise read each other's. See `debugCookieName`.
@@ -30,6 +35,13 @@ export declare const paintedStateCookieName: (webId: number, host: string | unde
30
35
  export declare const paintedKeys: (settings: {
31
36
  paintedState?: unknown;
32
37
  } | undefined) => Set<string>;
38
+ /**
39
+ * The kept keys a space says are the browser's rather than whoever is signed in (`settings.browserState`): a choice
40
+ * made of the browser itself — the cookie consent — that signing in, out, or as somebody else does not take away.
41
+ */
42
+ export declare const browserKeys: (settings: {
43
+ browserState?: unknown;
44
+ } | undefined) => Set<string>;
33
45
  /** The declared keys' values out of `runtime.state` — a key with no value is left out, not written as `undefined`. */
34
46
  export declare const pickPainted: (state: unknown, keys: ReadonlySet<string>) => Record<string, unknown>;
35
47
  /**
@@ -39,9 +51,13 @@ export declare const pickPainted: (state: unknown, keys: ReadonlySet<string>) =>
39
51
  export declare const paintedEntryFromCookies: (cookies: string | undefined, name: string) => PaintedEntry | undefined;
40
52
  /**
41
53
  * What the server renders with: the entry's values for the keys the space declares — a key it no longer declares, or
42
- * one the visitor added, is not the server's to render.
54
+ * one the visitor added, is not the server's to render — and, when `account`, the one the request proved, is not the
55
+ * one that wrote it, only the browser's keys.
43
56
  */
44
- export declare const paintedStateFor: (cookies: string | undefined, name: string, keys: ReadonlySet<string>) => Record<string, unknown> | undefined;
57
+ export declare const paintedStateFor: (cookies: string | undefined, name: string, settings: {
58
+ paintedState?: unknown;
59
+ browserState?: unknown;
60
+ } | undefined, account?: number | string) => Record<string, unknown> | undefined;
45
61
  /** The entry in this document's cookies. */
46
62
  export declare const readPaintedEntry: (name: string) => PaintedEntry | undefined;
47
63
  /**
@@ -1,10 +1,10 @@
1
1
  import { isRecord as e } from "../helpers/isRecord.mjs";
2
2
  import { cookieFromHeader as t, documentCookies as n } from "../helpers/cookies.mjs";
3
3
  //#region src/state/paintedState.ts
4
- var r = 3072, i = 31536e3, a = (e, t) => {
4
+ var r = 3072, i = 31536e3, a = (e) => `user:${String(e)}`, o = (e, t) => {
5
5
  let n = t?.split(":")[1];
6
6
  return n ? `plitzi_${e}_painted_${n}` : `plitzi_${e}_painted`;
7
- }, o = (e) => new Set(Array.isArray(e?.paintedState) ? e.paintedState.filter((e) => typeof e == "string" && e !== "") : []), s = (t, n) => e(t) ? Object.fromEntries(Object.entries(t).filter(([e, t]) => n.has(e) && t !== void 0)) : {}, c = (n, r) => {
7
+ }, s = (e) => new Set(Array.isArray(e) ? e.filter((e) => typeof e == "string" && e !== "") : []), c = (e) => s(e?.paintedState), l = (e) => s(e?.browserState), u = (t, n) => e(t) ? Object.fromEntries(Object.entries(t).filter(([e, t]) => n.has(e) && t !== void 0)) : {}, d = (n, r) => {
8
8
  let i = t(n, r);
9
9
  if (i !== void 0) try {
10
10
  let t = JSON.parse(i);
@@ -15,24 +15,25 @@ var r = 3072, i = 31536e3, a = (e, t) => {
15
15
  } catch {
16
16
  return;
17
17
  }
18
- }, l = (e, t, n) => {
19
- if (n.size === 0) return;
20
- let r = c(e, t);
21
- if (!r) return;
22
- let i = s(r.values, n);
23
- return Object.keys(i).length > 0 ? i : void 0;
24
- }, u = (e) => c(n(), e), d = (e, t) => {
18
+ }, f = (e, t, n, r) => {
19
+ let i = c(n);
20
+ if (i.size === 0) return;
21
+ let o = d(e, t);
22
+ if (!o) return;
23
+ let s = r !== void 0 && o.owner.startsWith("user:") && o.owner !== a(r), f = l(n), p = u(o.values, s ? new Set([...i].filter((e) => f.has(e))) : i);
24
+ return Object.keys(p).length > 0 ? p : void 0;
25
+ }, p = (e) => d(n(), e), m = (e, t) => {
25
26
  let n = encodeURIComponent(JSON.stringify(t));
26
- if (n.length > 3072) return f(e), "too-large";
27
+ if (n.length > 3072) return h(e), "too-large";
27
28
  try {
28
29
  return document.cookie = `${e}=${n};path=/;max-age=${i};SameSite=Lax`, "written";
29
30
  } catch {
30
31
  return "unavailable";
31
32
  }
32
- }, f = (e) => {
33
+ }, h = (e) => {
33
34
  try {
34
35
  document.cookie = `${e}=;path=/;max-age=0;SameSite=Lax`;
35
36
  } catch {}
36
37
  };
37
38
  //#endregion
38
- export { r as PAINTED_STATE_BUDGET, f as clearPaintedEntry, c as paintedEntryFromCookies, o as paintedKeys, a as paintedStateCookieName, l as paintedStateFor, s as pickPainted, u as readPaintedEntry, d as writePaintedEntry };
39
+ export { r as PAINTED_STATE_BUDGET, a as accountOwner, l as browserKeys, h as clearPaintedEntry, d as paintedEntryFromCookies, c as paintedKeys, o as paintedStateCookieName, f as paintedStateFor, u as pickPainted, p as readPaintedEntry, m as writePaintedEntry };
@@ -1,28 +1,28 @@
1
1
  import { isRecord as e } from "../helpers/isRecord.mjs";
2
2
  import { pConsole as t } from "../devTools/utils/PlitziConsole.mjs";
3
- import { clearPaintedEntry as n, paintedKeys as r, paintedStateCookieName as i, pickPainted as a, readPaintedEntry as o, writePaintedEntry as s } from "./paintedState.mjs";
4
- import { persistMiddleware as c } from "@plitzi/nexus";
3
+ import { accountOwner as n, browserKeys as r, clearPaintedEntry as i, paintedKeys as a, paintedStateCookieName as o, pickPainted as s, readPaintedEntry as c, writePaintedEntry as l } from "./paintedState.mjs";
4
+ import { persistMiddleware as u } from "@plitzi/nexus";
5
5
  //#region src/state/runtimeStatePersist.ts
6
- var l = /* @__PURE__ */ new Set([
6
+ var d = /* @__PURE__ */ new Set([
7
7
  "init",
8
8
  "initLoading",
9
9
  "authenticating"
10
- ]), u = (e) => {
10
+ ]), f = (e) => {
11
11
  let t = e.runtime?.sources.auth;
12
12
  if (t) {
13
13
  if (t.status === void 0) return { kind: "browser" };
14
- if (!l.has(t.status)) return t.isAuthenticated && t.details?.id !== void 0 ? {
14
+ if (!d.has(t.status)) return t.isAuthenticated && t.details?.id !== void 0 ? {
15
15
  kind: "account",
16
16
  id: String(t.details.id)
17
17
  } : { kind: "guest" };
18
18
  }
19
- }, d = (e) => {
19
+ }, p = (e) => {
20
20
  switch (e.kind) {
21
- case "account": return `user:${e.id}`;
21
+ case "account": return n(e.id);
22
22
  case "guest": return "guest";
23
23
  case "browser": return "";
24
24
  }
25
- }, f = (e, t) => ({
25
+ }, m = (e, t) => ({
26
26
  getItem: (n) => {
27
27
  let r = e.getItem(n);
28
28
  if (r === null) return null;
@@ -37,75 +37,136 @@ var l = /* @__PURE__ */ new Set([
37
37
  payload: r
38
38
  })),
39
39
  removeItem: (t) => e.removeItem(t)
40
- }), p = "runtime.state", m = (e, t) => Object.fromEntries(Object.entries(e).filter(([e]) => !t.has(e))), h = (t, n) => e(t) ? Object.fromEntries(Object.entries(t).filter(([e]) => n.has(e))) : {}, g = (e) => e.schema?.settings, _ = (e) => new Set((e?.transientState ?? []).filter((e) => typeof e == "string" && e !== "")), v = (e) => {
40
+ }), h = "runtime.state", g = (e, t) => Object.fromEntries(Object.entries(e).filter(([e]) => !t.has(e))), _ = (e) => e.schema?.settings, v = (e) => new Set(Array.isArray(e) ? e.filter((e) => typeof e == "string" && e !== "") : []), y = (e) => {
41
+ let t = v(e?.keptState);
42
+ if (t.size > 0) return (e) => t.has(e);
43
+ let n = v(e?.transientState);
44
+ return (e) => !n.has(e);
45
+ }, b = (t, n) => e(t) ? Object.fromEntries(Object.entries(t).filter(([e]) => n(e))) : {}, x = (e) => {
46
+ let t = y(e), n = r(e);
47
+ return (e) => t(e) && !n.has(e);
48
+ }, S = (e) => {
41
49
  try {
42
50
  return e === "session" ? globalThis.sessionStorage : globalThis.localStorage;
43
51
  } catch {
44
52
  return;
45
53
  }
46
- }, y = (c, l) => {
47
- let f = i(l, typeof window > "u" ? void 0 : window.location.host), p = !1, h;
54
+ }, C = (n, u) => {
55
+ let d = o(u, typeof window > "u" ? void 0 : window.location.host), m = !1, h;
48
56
  return () => {
49
- let i = c.getState();
50
- if (typeof document > "u" || i.render?.isHydrating && !i.render.hydrated) return;
51
- let l = g(i), _ = r(l), v = u(i);
52
- if (!l?.keepState || _.size === 0 || v === void 0) return;
53
- let y = d(v), b = i.runtime?.state;
54
- if (!p) {
55
- p = !0;
56
- let t = o(f);
57
- if (t && t.owner !== y && (n(f), e(b) && [..._].some((e) => e in b))) {
58
- c.setState("runtime.state", m(b, _));
59
- return;
57
+ let o = n.getState();
58
+ if (typeof document > "u" || o.render?.isHydrating && !o.render.hydrated) return;
59
+ let u = _(o), v = a(u), y = f(o);
60
+ if (!u?.keepState || v.size === 0 || y === void 0) return;
61
+ let b = p(y), x = o.runtime?.state;
62
+ if (!m) {
63
+ m = !0;
64
+ let t = c(d);
65
+ if (t && t.owner !== b) {
66
+ let t = r(u), i = new Set([...v].filter((e) => !t.has(e)));
67
+ if (e(x) && [...i].some((e) => e in x)) {
68
+ n.setState("runtime.state", g(x, i));
69
+ return;
70
+ }
60
71
  }
61
- h = t?.owner === y ? JSON.stringify(a(t.values, _)) : void 0;
72
+ h = t?.owner === b ? JSON.stringify(s(t.values, v)) : void 0;
62
73
  }
63
- let x = a(b, _), S = JSON.stringify(x);
64
- S !== h && (h = S, Object.keys(x).length === 0 ? n(f) : s(f, {
65
- owner: y,
66
- values: x
67
- }) === "too-large" && t.warning("store", `settings.paintedState holds more than a cookie can carry — the first paint uses the space's defaults for ${[..._].join(", ")}. Declare only what the first paint shows.`, {
74
+ let S = s(x, v), C = JSON.stringify(S);
75
+ C !== h && (h = C, Object.keys(S).length === 0 ? i(d) : l(d, {
76
+ owner: b,
77
+ values: S
78
+ }) === "too-large" && t.warning("store", `settings.paintedState holds more than a cookie can carry — the first paint uses the space's defaults for ${[...v].join(", ")}. Declare only what the first paint shows.`, {
68
79
  storeName: "runtime",
69
80
  path: "runtime.state",
70
81
  prev: void 0,
71
- next: x
82
+ next: S
72
83
  }));
73
84
  };
74
- }, b = (t) => {
75
- let n = c({
85
+ }, w = (e) => `plitzi_${String(e)}_state_browser`, T = (e, t) => {
86
+ try {
87
+ let n = e.getItem(t);
88
+ return n === null ? void 0 : JSON.parse(n);
89
+ } catch {
90
+ return;
91
+ }
92
+ }, E = (n, i) => {
93
+ let a = w(i), o = !1, s;
94
+ return () => {
95
+ let i = n.getState();
96
+ if (i.render?.isHydrating && !i.render.hydrated) return;
97
+ let c = _(i), l = r(c), u = S(c?.stateStorage === "sessionStorage" ? "session" : "local");
98
+ if (!c?.keepState || l.size === 0 || !u) return;
99
+ let d = i.runtime?.state, f = (e) => b(e, (e) => l.has(e));
100
+ if (!o) {
101
+ o = !0;
102
+ let t = f(T(u, a));
103
+ if (s = JSON.stringify(t), Object.keys(t).length > 0 && JSON.stringify({
104
+ ...f(d),
105
+ ...t
106
+ }) !== JSON.stringify(f(d))) {
107
+ n.setState("runtime.state", {
108
+ ...e(d) ? d : {},
109
+ ...t
110
+ });
111
+ return;
112
+ }
113
+ }
114
+ let p = f(d), m = JSON.stringify(p);
115
+ if (m !== s) {
116
+ s = m;
117
+ try {
118
+ Object.keys(p).length === 0 ? u.removeItem(a) : u.setItem(a, m);
119
+ } catch {
120
+ t.warning("store", `settings.browserState could not be kept — the browser refused to store ${[...l].join(", ")}, so the next visit starts without them.`, {
121
+ storeName: "runtime",
122
+ path: "runtime.state",
123
+ prev: void 0,
124
+ next: p
125
+ });
126
+ }
127
+ }
128
+ };
129
+ }, D = (t) => {
130
+ let n = u({
76
131
  key: `plitzi_${t}_state`,
77
- paths: [p],
78
- partializePath: (t, n, r) => e(n) ? m(n, _(g(r))) : n,
132
+ paths: [h],
133
+ partializePath: (t, n, r) => {
134
+ let i = x(_(r));
135
+ return e(n) ? b(n, i) : n;
136
+ },
79
137
  mergePath: (t, n, r, i) => {
80
- let a = _(g(i));
81
- return a.size > 0 && e(n) ? {
82
- ...m(n, a),
83
- ...h(r, a)
138
+ let a = x(_(i));
139
+ return e(n) ? {
140
+ ...b(r, () => !0),
141
+ ...b(n, a)
84
142
  } : n;
85
143
  },
86
144
  storage: (e) => {
87
145
  let { render: t } = e;
88
146
  if (t?.isHydrating && !t.hydrated) return !1;
89
- let n = g(e), r = u(e);
147
+ let n = _(e), r = f(e);
90
148
  if (!n?.keepState || r === void 0) return !1;
91
- let i = v(n.stateStorage === "sessionStorage" ? "session" : "local");
92
- return i ? f(i, d(r)) : !1;
149
+ let i = S(n.stateStorage === "sessionStorage" ? "session" : "local");
150
+ return i ? m(i, p(r)) : !1;
93
151
  }
94
152
  });
95
153
  return (i) => {
96
- let a = n(i), o = i.getState().runtime?.state, s = u(i.getState()), c = y(i, t);
154
+ let o = n(i), s = i.getState().runtime?.state, c = f(i.getState()), l = C(i, t), u = E(i, t);
97
155
  return {
98
- ...a,
156
+ ...o,
99
157
  onChange: (t) => {
100
- let n = s, l = u(i.getState());
101
- if (l !== void 0 && (s = l), n?.kind === "account" && l !== void 0 && d(l) !== d(n)) {
102
- let t = e(o) ? m(o, r(g(i.getState()))) : o;
103
- i.setState("runtime.state", t);
158
+ let n = c, d = f(i.getState());
159
+ if (d !== void 0 && (c = d), n?.kind === "account" && d !== void 0 && p(d) !== p(n)) {
160
+ let t = _(i.getState()), n = b(i.getState().runtime?.state, (e) => r(t).has(e)), o = e(s) ? g(s, a(t)) : s, c = Object.keys(n).length > 0 ? {
161
+ ...e(o) ? o : {},
162
+ ...n
163
+ } : o;
164
+ i.setState("runtime.state", c);
104
165
  }
105
- a?.onChange?.(t), c();
166
+ o?.onChange?.(t), l(), u();
106
167
  }
107
168
  };
108
169
  };
109
170
  };
110
171
  //#endregion
111
- export { b as runtimeStatePersist, u as stateOwner };
172
+ export { D as runtimeStatePersist, f as stateOwner };
@@ -26,6 +26,8 @@ export declare const useRenderOverride: (overrides: RenderSettings) => {
26
26
  isHydrating: boolean;
27
27
  hydrated: boolean;
28
28
  overQuota: boolean;
29
+ quotaNear: boolean;
30
+ badge: boolean;
29
31
  testAttributes: boolean;
30
32
  ownsHead: boolean;
31
33
  enclosed: boolean;
@@ -9,11 +9,13 @@ var n = {
9
9
  isHydrating: !1,
10
10
  hydrated: !1,
11
11
  overQuota: !1,
12
+ quotaNear: !1,
13
+ badge: !1,
12
14
  testAttributes: !0,
13
15
  ownsHead: !0,
14
16
  enclosed: !1
15
17
  }, r = () => {
16
- let [[r, i, a, o, s, c, l, u, d, f]] = e([
18
+ let [[r, i, a, o, s, c, l, u, d, f, p, m]] = e([
17
19
  "render.previewMode",
18
20
  "render.debugMode",
19
21
  "render.renderMode",
@@ -21,6 +23,8 @@ var n = {
21
23
  "render.isHydrating",
22
24
  "render.hydrated",
23
25
  "render.overQuota",
26
+ "render.quotaNear",
27
+ "render.badge",
24
28
  "render.testAttributes",
25
29
  "render.ownsHead",
26
30
  "render.enclosed"
@@ -33,9 +37,11 @@ var n = {
33
37
  isHydrating: s ?? n.isHydrating,
34
38
  hydrated: c ?? n.hydrated,
35
39
  overQuota: l ?? n.overQuota,
36
- testAttributes: u ?? n.testAttributes,
37
- ownsHead: d ?? n.ownsHead,
38
- enclosed: f ?? n.enclosed
40
+ quotaNear: u ?? n.quotaNear,
41
+ badge: d ?? n.badge,
42
+ testAttributes: f ?? n.testAttributes,
43
+ ownsHead: p ?? n.ownsHead,
44
+ enclosed: m ?? n.enclosed
39
45
  }), [
40
46
  r,
41
47
  i,
@@ -46,7 +52,9 @@ var n = {
46
52
  l,
47
53
  u,
48
54
  d,
49
- f
55
+ f,
56
+ p,
57
+ m
50
58
  ]);
51
59
  }, i = (e) => {
52
60
  let n = r();