@grapesjs/studio-sdk-plugins 1.0.35 → 1.0.37

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 (92) hide show
  1. package/dist/accordionComponent/index.cjs.js +7 -7
  2. package/dist/accordionComponent/index.es.js +185 -159
  3. package/dist/accordionComponent/index.umd.js +7 -7
  4. package/dist/aiChat/clientToolsProcessors.d.ts +1 -2
  5. package/dist/aiChat/components/utils.d.ts +1 -0
  6. package/dist/aiChat/components/utilsTw.d.ts +11 -0
  7. package/dist/aiChat/index.cjs.js +75 -75
  8. package/dist/aiChat/index.es.js +9122 -8628
  9. package/dist/aiChat/index.js +75 -75
  10. package/dist/aiChat/index.umd.js +75 -75
  11. package/dist/aiChat/projectGeneration.d.ts +17 -0
  12. package/dist/animationComponent/index.cjs.js +3 -3
  13. package/dist/animationComponent/index.es.js +221 -195
  14. package/dist/animationComponent/index.umd.js +3 -3
  15. package/dist/canvasAbsoluteMode/index.cjs.js +1 -1
  16. package/dist/canvasAbsoluteMode/index.es.js +199 -173
  17. package/dist/canvasAbsoluteMode/index.umd.js +1 -1
  18. package/dist/canvasEmptyState/index.cjs.js +1 -1
  19. package/dist/canvasEmptyState/index.es.js +149 -123
  20. package/dist/canvasEmptyState/index.umd.js +1 -1
  21. package/dist/canvasFullSize/index.cjs.js +9 -9
  22. package/dist/canvasFullSize/index.es.js +186 -160
  23. package/dist/canvasFullSize/index.umd.js +9 -9
  24. package/dist/canvasGridMode/index.cjs.js +5 -5
  25. package/dist/canvasGridMode/index.es.js +263 -237
  26. package/dist/canvasGridMode/index.umd.js +2 -2
  27. package/dist/canvasScreenshot/index.cjs.js +1 -1
  28. package/dist/canvasScreenshot/index.es.js +168 -142
  29. package/dist/canvasScreenshot/index.umd.js +1 -1
  30. package/dist/dataSourceEjs/index.cjs.js +9 -9
  31. package/dist/dataSourceEjs/index.es.js +271 -245
  32. package/dist/dataSourceEjs/index.umd.js +9 -9
  33. package/dist/dataSourceHandlebars/index.cjs.js +8 -8
  34. package/dist/dataSourceHandlebars/index.es.js +232 -206
  35. package/dist/dataSourceHandlebars/index.umd.js +8 -8
  36. package/dist/dialogComponent/index.cjs.js +14 -14
  37. package/dist/dialogComponent/index.es.js +157 -131
  38. package/dist/dialogComponent/index.umd.js +14 -14
  39. package/dist/flexComponent/index.cjs.js +13 -13
  40. package/dist/flexComponent/index.es.js +497 -471
  41. package/dist/flexComponent/index.umd.js +13 -13
  42. package/dist/fsLightboxComponent/index.cjs.js +3 -3
  43. package/dist/fsLightboxComponent/index.es.js +189 -163
  44. package/dist/fsLightboxComponent/index.umd.js +3 -3
  45. package/dist/googleFontsAssetProvider/index.cjs.js +1 -1
  46. package/dist/googleFontsAssetProvider/index.es.js +175 -149
  47. package/dist/googleFontsAssetProvider/index.umd.js +1 -1
  48. package/dist/iconifyComponent/index.cjs.js +2 -2
  49. package/dist/iconifyComponent/index.es.js +207 -181
  50. package/dist/iconifyComponent/index.umd.js +2 -2
  51. package/dist/index.cjs.js +36 -36
  52. package/dist/index.es.js +917 -891
  53. package/dist/index.umd.js +36 -36
  54. package/dist/layoutSidebarButtons/index.cjs.js +1 -1
  55. package/dist/layoutSidebarButtons/index.es.js +192 -166
  56. package/dist/layoutSidebarButtons/index.umd.js +1 -1
  57. package/dist/lightGalleryComponent/index.cjs.js +1 -1
  58. package/dist/lightGalleryComponent/index.es.js +265 -239
  59. package/dist/lightGalleryComponent/index.umd.js +1 -1
  60. package/dist/linkImageComponent/index.cjs.js +2 -2
  61. package/dist/linkImageComponent/index.es.js +121 -95
  62. package/dist/linkImageComponent/index.umd.js +2 -2
  63. package/dist/listPagesComponent/index.cjs.js +5 -5
  64. package/dist/listPagesComponent/index.es.js +171 -145
  65. package/dist/listPagesComponent/index.umd.js +5 -5
  66. package/dist/presetPrintable/index.cjs.js +3 -3
  67. package/dist/presetPrintable/index.es.js +227 -201
  68. package/dist/presetPrintable/index.umd.js +3 -3
  69. package/dist/prosemirror/index.cjs.js +7 -7
  70. package/dist/prosemirror/index.es.js +457 -431
  71. package/dist/prosemirror/index.umd.js +8 -8
  72. package/dist/rendererReact/index.cjs.js +1 -1
  73. package/dist/rendererReact/index.es.js +248 -223
  74. package/dist/rendererReact/index.js +1 -1
  75. package/dist/rendererReact/index.umd.js +1 -1
  76. package/dist/rteTinyMce/index.cjs.js +2 -2
  77. package/dist/rteTinyMce/index.es.js +150 -124
  78. package/dist/rteTinyMce/index.umd.js +2 -2
  79. package/dist/shapeDividerComponent/index.cjs.js +4 -4
  80. package/dist/shapeDividerComponent/index.es.js +143 -117
  81. package/dist/shapeDividerComponent/index.umd.js +4 -4
  82. package/dist/swiperComponent/index.cjs.js +9 -9
  83. package/dist/swiperComponent/index.es.js +218 -192
  84. package/dist/swiperComponent/index.umd.js +7 -7
  85. package/dist/tableComponent/index.cjs.js +1 -1
  86. package/dist/tableComponent/index.es.js +275 -249
  87. package/dist/tableComponent/index.umd.js +1 -1
  88. package/dist/types.d.ts +1 -1
  89. package/dist/youtubeAssetProvider/index.cjs.js +1 -1
  90. package/dist/youtubeAssetProvider/index.es.js +134 -108
  91. package/dist/youtubeAssetProvider/index.umd.js +1 -1
  92. package/package.json +2 -2
@@ -1,98 +1,124 @@
1
- const $ = "app.grapesjs.com", b = "app-stage.grapesjs.com", w = "app2.grapesjs.com", P = "app-stage2.grapesjs.com", S = [
2
- $,
1
+ const m = "app.grapesjs.com", I = "app-stage.grapesjs.com", v = "app2.grapesjs.com", w = "app-stage2.grapesjs.com", $ = [
2
+ m,
3
+ v,
4
+ I,
3
5
  w,
4
- b,
5
- P,
6
6
  "localhost",
7
7
  "127.0.0.1",
8
8
  ".local-credentialless.webcontainer.io",
9
9
  // For stackblitz.com demos
10
10
  ".local.webcontainer.io",
11
11
  // For stackblitz.com demos
12
- "-sandpack.codesandbox.io"
12
+ "-sandpack.codesandbox.io",
13
13
  // For Sandpack demos
14
- ], O = "license:check:start", N = "license:check:end", v = () => typeof window < "u", T = ({
15
- isDev: o,
14
+ ".claudemcpcontent.com",
15
+ // For Claude mcp app
16
+ ".web-sandbox.oaiusercontent.com"
17
+ // For OpenAI mcp app
18
+ ], O = "license:check:end", T = () => typeof window < "u", L = ({
19
+ isDev: s,
16
20
  isStage: t,
17
21
  isPlatform: e
18
- }) => `${o ? "" : `https://${t ? b : $}`}/${e ? "platform-api" : "api"}`, k = () => {
19
- const o = v() && window.location.hostname;
20
- return !!o && (S.includes(o) || S.some((t) => o.endsWith(t)));
22
+ }) => `${s ? "" : `https://${t ? I : m}`}/${e ? "platform-api" : "api"}`, k = () => {
23
+ if (!T()) return "";
24
+ const { hostname: s } = window.location;
25
+ if (s) return s;
26
+ try {
27
+ return window.parent.location.hostname || "";
28
+ } catch {
29
+ return "";
30
+ }
31
+ }, A = () => {
32
+ const s = k();
33
+ return !!s && ($.includes(s) || $.some((t) => s.endsWith(t)));
21
34
  };
22
- async function L({
23
- path: o,
35
+ async function B({
36
+ path: s,
24
37
  baseApiUrl: t,
25
38
  method: e = "GET",
26
- headers: s = {},
39
+ headers: r = {},
27
40
  params: n,
28
- body: r
41
+ body: a
29
42
  }) {
30
- const i = `${t || T({ isDev: !1, isStage: !1 })}${o}`, c = {
43
+ const i = `${t || L({ isDev: !1, isStage: !1 })}${s}`, l = {
31
44
  method: e,
32
45
  headers: {
33
46
  "Content-Type": "application/json",
34
- ...s
47
+ ...r
35
48
  }
36
49
  };
37
- r && (c.body = JSON.stringify(r));
38
- const l = n ? new URLSearchParams(n).toString() : "", u = l ? `?${l}` : "", p = await fetch(`${i}${u}`, c);
50
+ a && (l.body = JSON.stringify(a));
51
+ const c = n ? new URLSearchParams(n).toString() : "", u = c ? `?${c}` : "", p = await fetch(`${i}${u}`, l);
39
52
  if (!p.ok)
40
53
  throw new Error(`HTTP error! status: ${p.status}`);
41
54
  return p.json();
42
55
  }
43
- var m = /* @__PURE__ */ ((o) => (o.free = "free", o.startup = "startup", o.business = "business", o.enterprise = "enterprise", o))(m || {});
44
- const x = {
45
- [m.free]: 0,
46
- [m.startup]: 10,
47
- [m.business]: 20,
48
- [m.enterprise]: 30
56
+ var y = /* @__PURE__ */ ((s) => (s.free = "free", s.startup = "startup", s.business = "business", s.enterprise = "enterprise", s))(y || {}), b = /* @__PURE__ */ ((s) => (s.toastAdd = "studio:toastAdd", s.toastRemove = "studio:toastRemove", s.dialogOpen = "studio:dialogOpen", s.dialogClose = "studio:dialogClose", s.dialogExportCode = "studio:dialogExportCode", s.dialogImportCode = "studio:dialogImportCode", s.sidebarLeftSet = "studio:sidebarLeft:set", s.sidebarLeftGet = "studio:sidebarLeft:get", s.sidebarLeftToggle = "studio:sidebarLeft:toggle", s.sidebarRightSet = "studio:sidebarRight:set", s.sidebarRightGet = "studio:sidebarRight:get", s.sidebarRightToggle = "studio:sidebarRight:toggle", s.sidebarTopSet = "studio:sidebarTop:set", s.sidebarTopGet = "studio:sidebarTop:get", s.sidebarTopToggle = "studio:sidebarTop:toggle", s.sidebarBottomSet = "studio:sidebarBottom:set", s.sidebarBottomGet = "studio:sidebarBottom:get", s.sidebarBottomToggle = "studio:sidebarBottom:toggle", s.symbolAdd = "studio:symbolAdd", s.symbolDetach = "studio:symbolDetach", s.symbolOverride = "studio:symbolOverride", s.symbolPropagateStyles = "studio:propagateStyles", s.getPagesConfig = "studio:getPagesConfig", s.setPagesConfig = "studio:setPagesConfig", s.getPageSettings = "studio:getPageSettings", s.setPageSettings = "studio:setPageSettings", s.clearPage = "studio:clearPage", s.projectFiles = "studio:projectFiles", s.validateCode = "studio:validateCode", s.canvasReload = "studio:canvasReload", s.getBlocksPanel = "studio:getBlocksPanel", s.setBlocksPanel = "studio:setBlocksPanel", s.getStateContextMenu = "studio:getStateContextMenu", s.setStateContextMenu = "studio:setStateContextMenu", s.contextMenuComponent = "studio:contextMenuComponent", s.layoutAdd = "studio:layoutAdd", s.layoutRemove = "studio:layoutRemove", s.layoutToggle = "studio:layoutToggle", s.layoutUpdate = "studio:layoutUpdate", s.layoutGet = "studio:layoutGet", s.layoutConfigGet = "studio:layoutConfigGet", s.layoutConfigSet = "studio:layoutConfigSet", s.layoutComponentAdd = "studio:layoutComponentAdd", s.layoutComponentGet = "studio:layoutComponentGet", s.layoutComponentRemove = "studio:layoutComponentRemove", s.layoutComponentRender = "studio:layoutComponentRender", s.getStateTheme = "studio:getStateTheme", s.setStateTheme = "studio:setStateTheme", s.settings = "studio:settings", s.assetProviderGet = "studio:assetProviderGet", s.assetProviderAdd = "studio:assetProviderAdd", s.assetProviderRemove = "studio:assetProviderRemove", s.fontGet = "studio:fontGet", s.fontAdd = "studio:fontAdd", s.fontRemove = "studio:fontRemove", s.fontManagerOpen = "studio:fontManagerOpen", s.menuFontLoad = "studio:menuFontLoad", s.toggleStateDataSource = "studio:toggleStateDataSource", s.getStateDataSource = "studio:getStateDataSource", s.dataSourceSetGlobalData = "studio:dataSourceSetGlobalData", s.dataSourceSetImporter = "studio:dataSourceSetImporter", s.dataSourceSetExporter = "studio:dataSourceSetExporter", s.setDragAbsolute = "studio:setDragAbsolute", s))(b || {});
57
+ const S = {
58
+ [y.free]: 0,
59
+ [y.startup]: 10,
60
+ [y.business]: 20,
61
+ [y.enterprise]: 30
49
62
  };
50
- function C(o) {
51
- const t = o;
52
- return t.init = (e) => (s) => o(s, e), t;
63
+ function N(s) {
64
+ const t = s;
65
+ return t.init = (e) => (r) => s(r, e), t;
53
66
  }
54
- const B = (o) => /* @__PURE__ */ C(o);
55
- async function A({
56
- editor: o,
67
+ const M = (s) => /* @__PURE__ */ N(s);
68
+ async function G({
69
+ editor: s,
57
70
  plan: t,
58
71
  pluginName: e,
59
- licenseKey: s,
72
+ licenseKey: r,
60
73
  onLicenseCheckResponse: n,
61
- cleanup: r
74
+ cleanup: a
62
75
  }) {
63
- let a = "", i = !1;
64
- const c = k(), l = (p) => {
65
- console.warn("Cleanup plugin:", e, "Reason:", p), r();
66
- }, u = (p = {}) => {
67
- var g;
68
- const { error: h, sdkLicense: y } = p, d = (g = p.plan) == null ? void 0 : g.category;
69
- if (!(y || p.license) || h)
76
+ let o = "", i;
77
+ const l = (p) => {
78
+ console.warn("Cleanup plugin:", e, "Reason:", p), a();
79
+ }, c = (p = {}) => {
80
+ var f;
81
+ const { error: h, sdkLicense: E } = p, g = (f = p.plan) == null ? void 0 : f.category;
82
+ if (!(E || p.license) || h)
70
83
  l(h || "Invalid license");
71
- else if (d) {
72
- const E = x[t], I = x[d];
73
- E > I && l({ pluginRequiredPlan: t, licensePlan: d });
84
+ else if (g) {
85
+ const x = S[t], P = S[g];
86
+ x > P && l({ pluginRequiredPlan: t, licensePlan: g });
74
87
  }
75
88
  };
76
- o.on(O, (p) => {
77
- a = p == null ? void 0 : p.baseApiUrl, i = !0;
78
- }), o.on(N, (p) => {
79
- n == null || n(p), u(p);
80
- }), setTimeout(async () => {
81
- if (!i) {
82
- if (c) return;
83
- if (s) {
84
- const p = await M({ licenseKey: s, pluginName: e, baseApiUrl: a });
85
- n == null || n(p), p && u(p);
86
- } else
87
- l("The `licenseKey` option not provided");
88
- }
89
- }, 2e3);
89
+ s.Commands.has(b.settings) && (i = s.runCommand(b.settings), o = (i == null ? void 0 : i.baseUrl) || "");
90
+ const u = (p) => {
91
+ n == null || n(p), p && c(p);
92
+ };
93
+ if (!i) {
94
+ s.onReady(async () => {
95
+ if (!A())
96
+ if (r) {
97
+ const p = await D({ licenseKey: r, pluginName: e, baseApiUrl: o });
98
+ u(p);
99
+ } else
100
+ l("The `licenseKey` option not provided");
101
+ });
102
+ return;
103
+ }
104
+ if (i.licensePlan || i.licenseError) {
105
+ const p = j(i);
106
+ u(p);
107
+ return;
108
+ }
109
+ s.on(O, (p) => u(p));
90
110
  }
91
- async function M(o) {
92
- const { licenseKey: t, pluginName: e, baseApiUrl: s } = o;
111
+ const j = (s) => ({
112
+ sdkLicense: s.license,
113
+ license: s.license,
114
+ error: s.licenseError,
115
+ plan: s.licensePlan
116
+ });
117
+ async function D(s) {
118
+ const { licenseKey: t, pluginName: e, baseApiUrl: r } = s;
93
119
  try {
94
- return (await L({
95
- baseApiUrl: s,
120
+ return (await B({
121
+ baseApiUrl: r,
96
122
  path: `/sdk/${t || "na"}`,
97
123
  method: "POST",
98
124
  params: {
@@ -104,36 +130,36 @@ async function M(o) {
104
130
  return console.error("Error during SDK license check:", n), !1;
105
131
  }
106
132
  }
107
- const j = (o) => {
108
- const t = o;
133
+ const F = (s) => {
134
+ const t = s;
109
135
  return t.logicalOperator === "and" || t.logicalOperator === "or";
110
- }, W = (o, t) => (o.config.optsHtml = {
111
- ...o.config.optsHtml,
136
+ }, J = (s, t) => (s.config.optsHtml = {
137
+ ...s.config.optsHtml,
112
138
  exporter: t
113
139
  }, () => {
114
- o.config.optsHtml.exporter = void 0;
115
- }), _ = (o, t) => {
140
+ s.config.optsHtml.exporter = void 0;
141
+ }), W = (s, t) => {
116
142
  const e = (n) => {
117
- const { input: r } = n, { contains: a } = t;
118
- (!a || r.includes(a)) && (n.input = t.importer.import(r));
119
- }, s = o.Parser.events.htmlBefore;
120
- return o.on(s, e), () => {
121
- o.off(s, e);
143
+ const { input: a } = n, { contains: o } = t;
144
+ (!o || a.includes(o)) && (n.input = t.importer.import(a));
145
+ }, r = s.Parser.events.htmlBefore;
146
+ return s.on(r, e), () => {
147
+ s.off(r, e);
122
148
  };
123
149
  };
124
- class J {
150
+ class _ {
125
151
  getVariableSyntax({ dataResolver: t }) {
126
- const { defaultValue: e } = t, s = this.getFullPath(t), n = e ? ` || \`${e}\`` : "";
127
- return `<%= ${s}${n} %>`;
152
+ const { defaultValue: e } = t, r = this.getFullPath(t), n = e ? ` || \`${e}\`` : "";
153
+ return `<%= ${r}${n} %>`;
128
154
  }
129
155
  getCollectionStartSyntax({ dataResolver: t }) {
130
- const { collectionId: e, dataSource: s, startIndex: n, endIndex: r } = t, a = (s == null ? void 0 : s.path) || e || "", i = this._sanitizeVariableName(e);
131
- let c = "";
132
- if (n !== void 0 || r !== void 0) {
133
- const l = n ?? 0, u = r !== void 0 ? r : "";
134
- c = `.slice(${l}${u !== "" ? `, ${u}` : ""})`;
156
+ const { collectionId: e, dataSource: r, startIndex: n, endIndex: a } = t, o = (r == null ? void 0 : r.path) || e || "", i = this._sanitizeVariableName(e);
157
+ let l = "";
158
+ if (n !== void 0 || a !== void 0) {
159
+ const c = n ?? 0, u = a !== void 0 ? a : "";
160
+ l = `.slice(${c}${u !== "" ? `, ${u}` : ""})`;
135
161
  }
136
- return `<% ${a}${c}.forEach(function(currentItem, index, arr) {
162
+ return `<% ${o}${l}.forEach(function(currentItem, index, arr) {
137
163
  const startIndex = parseInt(${n ?? 0}, 10);
138
164
  const endIndex = startIndex + arr.length;
139
165
  const ${i}={ currentItem, currentIndex: startIndex + index, remainingItems: endIndex - (startIndex + index)} %>`;
@@ -153,37 +179,37 @@ const ${i}={ currentItem, currentIndex: startIndex + index, remainingItems: endI
153
179
  getConditionalEndSyntax() {
154
180
  return "<% } %>";
155
181
  }
156
- getFullPath({ collectionId: t, path: e, variableType: s }) {
157
- return (t ? [this._sanitizeVariableName(t), s, e].filter(Boolean).join(".") : e) || "";
182
+ getFullPath({ collectionId: t, path: e, variableType: r }) {
183
+ return (t ? [this._sanitizeVariableName(t), r, e].filter(Boolean).join(".") : e) || "";
158
184
  }
159
185
  _parseCondition(t) {
160
186
  if (!t) return "";
161
- if (j(t)) {
162
- const e = t.statements.map((r) => this._parseCondition(r)), s = F[t.logicalOperator];
163
- let n = e.length > 1 ? `(${e.join(`)${s}(`)})` : e[0];
187
+ if (F(t)) {
188
+ const e = t.statements.map((a) => this._parseCondition(a)), r = R[t.logicalOperator];
189
+ let n = e.length > 1 ? `(${e.join(`)${r}(`)})` : e[0];
164
190
  return t.logicalOperator === "xor" && (n = `!!(${n})`), n;
165
191
  } else {
166
- const e = this._parseValue(t.left), s = this._parseValue(t.right);
192
+ const e = this._parseValue(t.left), r = this._parseValue(t.right);
167
193
  switch (t.operator) {
168
194
  case "equals":
169
- return `${e} === ${s}`;
195
+ return `${e} === ${r}`;
170
196
  case ">":
171
197
  case "<":
172
198
  case ">=":
173
199
  case "<=":
174
200
  case "=":
175
201
  case "!=":
176
- return `${e} ${t.operator} ${s}`;
202
+ return `${e} ${t.operator} ${r}`;
177
203
  case "contains":
178
- return `${e}?.includes(${s})`;
204
+ return `${e}?.includes(${r})`;
179
205
  case "startsWith":
180
- return `${e}?.startsWith(${s})`;
206
+ return `${e}?.startsWith(${r})`;
181
207
  case "endsWith":
182
- return `${e}?.endsWith(${s})`;
208
+ return `${e}?.endsWith(${r})`;
183
209
  case "equalsIgnoreCase":
184
- return `${e}?.toLowerCase() === ${s}?.toLowerCase()`;
210
+ return `${e}?.toLowerCase() === ${r}?.toLowerCase()`;
185
211
  case "trimEquals":
186
- return `${e}?.trim() === ${s}?.trim()`;
212
+ return `${e}?.trim() === ${r}?.trim()`;
187
213
  case "isTruthy":
188
214
  return `!!${e}`;
189
215
  case "isFalsy":
@@ -205,7 +231,7 @@ const ${i}={ currentItem, currentIndex: startIndex + index, remainingItems: endI
205
231
  case "isBoolean":
206
232
  return `typeof ${e} === 'boolean'`;
207
233
  default:
208
- return `${e} ${t.operator} ${s}`;
234
+ return `${e} ${t.operator} ${r}`;
209
235
  }
210
236
  }
211
237
  }
@@ -213,11 +239,11 @@ const ${i}={ currentItem, currentIndex: startIndex + index, remainingItems: endI
213
239
  return typeof t == "object" ? this.getFullPath(t) : typeof t == "string" ? `'${t.replace(/'/g, "\\'")}'` : String(t);
214
240
  }
215
241
  }
216
- const F = {
242
+ const R = {
217
243
  and: "&&",
218
244
  or: "||",
219
245
  xor: "^"
220
- }, U = ["===", "==", "!==", "!=", "<=", ">=", "<", ">", "&&", "||"], D = {
246
+ }, U = ["===", "==", "!==", "!=", "<=", ">=", "<", ">", "&&", "||"], V = {
221
247
  "===": "=",
222
248
  "==": "=",
223
249
  "!==": "!=",
@@ -229,7 +255,7 @@ const F = {
229
255
  "&&": "&&",
230
256
  "||": "||"
231
257
  };
232
- class V {
258
+ class q {
233
259
  constructor() {
234
260
  this.messages = [], this.collectionStack = [];
235
261
  }
@@ -244,37 +270,37 @@ class V {
244
270
  }
245
271
  parseEjsTemplate(t) {
246
272
  const e = [];
247
- let s = 0;
248
- for (; s < t.length; ) {
249
- const n = t.indexOf("<%", s);
273
+ let r = 0;
274
+ for (; r < t.length; ) {
275
+ const n = t.indexOf("<%", r);
250
276
  if (n === -1) {
251
- s < t.length && e.push(this.createAppendLiteral(t.slice(s)));
277
+ r < t.length && e.push(this.createAppendLiteral(t.slice(r)));
252
278
  break;
253
279
  }
254
- n > s && e.push(this.createAppendLiteral(t.slice(s, n)));
255
- const r = t.indexOf("%>", n);
256
- if (r === -1)
280
+ n > r && e.push(this.createAppendLiteral(t.slice(r, n)));
281
+ const a = t.indexOf("%>", n);
282
+ if (a === -1)
257
283
  throw new Error("Unclosed EJS tag");
258
- const a = t.slice(n + 2, r).trim();
259
- if (s = r + 2, a.startsWith("=") || a.startsWith("-")) {
260
- const i = a.slice(1).trim();
284
+ const o = t.slice(n + 2, a).trim();
285
+ if (r = a + 2, o.startsWith("=") || o.startsWith("-")) {
286
+ const i = o.slice(1).trim();
261
287
  e.push(this.createAppendExpression(i));
262
288
  } else {
263
- if (a.startsWith("#"))
289
+ if (o.startsWith("#"))
264
290
  continue;
265
- if (a.startsWith("if")) {
266
- const i = this.parseIfStatement(a, t, s);
267
- e.push(i), s = i.endPos || s;
268
- } else if (a.startsWith("for")) {
269
- const i = this.parseForStatement(a, t, s);
270
- e.push(i), s = i.endPos || s;
291
+ if (o.startsWith("if")) {
292
+ const i = this.parseIfStatement(o, t, r);
293
+ e.push(i), r = i.endPos || r;
294
+ } else if (o.startsWith("for")) {
295
+ const i = this.parseForStatement(o, t, r);
296
+ e.push(i), r = i.endPos || r;
271
297
  } else {
272
- const i = a.match(/([\w][\w.-]*[\w])\s*\.\s*forEach\s*\(\s*(\w+)\s*=>\s*\{?/);
298
+ const i = o.match(/([\w][\w.-]*[\w])\s*\.\s*forEach\s*\(\s*(\w+)\s*=>\s*\{?/);
273
299
  if (i) {
274
- const c = i[1], l = i[2], u = this.parseForEachStatement(c, l, t, s);
275
- e.push(u), s = u.endPos || s;
300
+ const l = i[1], c = i[2], u = this.parseForEachStatement(l, c, t, r);
301
+ e.push(u), r = u.endPos || r;
276
302
  } else
277
- this.addMessage("info", `Unsupported scriptlet content: ${a}`);
303
+ this.addMessage("info", `Unsupported scriptlet content: ${o}`);
278
304
  }
279
305
  }
280
306
  }
@@ -303,57 +329,57 @@ class V {
303
329
  }
304
330
  };
305
331
  }
306
- parseIfStatement(t, e, s) {
332
+ parseIfStatement(t, e, r) {
307
333
  const n = t.match(/if\s*\((.*)\)\s*\{?/);
308
334
  if (!n)
309
335
  throw new Error("Invalid if statement syntax");
310
- const r = this.parseJsExpression(n[1]), { body: a, endPos: i } = this.parseTemplateBlock(e, s);
311
- let c = null, l = i;
312
- const u = e.indexOf("<%", l);
313
- if (u === l) {
336
+ const a = this.parseJsExpression(n[1]), { body: o, endPos: i } = this.parseTemplateBlock(e, r);
337
+ let l = null, c = i;
338
+ const u = e.indexOf("<%", c);
339
+ if (u === c) {
314
340
  const p = e.indexOf("%>", u);
315
341
  if (p !== -1) {
316
- const h = e.slice(u + 2, p).trim(), y = p + 2 - u;
342
+ const h = e.slice(u + 2, p).trim(), E = p + 2 - u;
317
343
  if (h.startsWith("} else if")) {
318
- l = u + y;
319
- const d = h.substring(h.indexOf("if")).trim(), f = this.parseIfStatement(d, e, l);
320
- c = {
344
+ c = u + E;
345
+ const g = h.substring(h.indexOf("if")).trim(), d = this.parseIfStatement(g, e, c);
346
+ l = {
321
347
  type: "IfStatement",
322
- test: f.test,
323
- consequent: f.consequent,
324
- alternate: f.alternate
325
- }, l = f.endPos;
348
+ test: d.test,
349
+ consequent: d.consequent,
350
+ alternate: d.alternate
351
+ }, c = d.endPos;
326
352
  } else if (h.startsWith("} else")) {
327
- l = u + y;
328
- const { body: d, endPos: f } = this.parseTemplateBlock(e, l);
329
- c = {
353
+ c = u + E;
354
+ const { body: g, endPos: d } = this.parseTemplateBlock(e, c);
355
+ l = {
330
356
  type: "BlockStatement",
331
- body: d
332
- }, l = f;
333
- const g = e.indexOf("<%", l), E = e.indexOf("%>", g);
334
- g === l && e.slice(g + 2, E).trim() === "}" && (l = E + 2);
335
- } else h === "}" && (l = u + y);
357
+ body: g
358
+ }, c = d;
359
+ const f = e.indexOf("<%", c), x = e.indexOf("%>", f);
360
+ f === c && e.slice(f + 2, x).trim() === "}" && (c = x + 2);
361
+ } else h === "}" && (c = u + E);
336
362
  }
337
363
  }
338
364
  return {
339
365
  type: "IfStatement",
340
- test: r,
366
+ test: a,
341
367
  consequent: {
342
368
  type: "BlockStatement",
343
- body: a
369
+ body: o
344
370
  },
345
- alternate: c,
346
- endPos: l
371
+ alternate: l,
372
+ endPos: c
347
373
  };
348
374
  }
349
- parseForStatement(t, e, s) {
375
+ parseForStatement(t, e, r) {
350
376
  const n = t.match(/for\s*\((.*)\)\s*\{?/);
351
377
  if (!n)
352
378
  throw new Error("Invalid for statement syntax");
353
- const r = n[1].split("of");
354
- if (r.length !== 2)
379
+ const a = n[1].split("of");
380
+ if (a.length !== 2)
355
381
  throw new Error("Only for...of loops are supported");
356
- const a = r[0].trim().replace(/^let\s+|^const\s+|^var\s+/, ""), i = r[1].trim(), { body: c, endPos: l } = this.parseTemplateBlock(e, s);
382
+ const o = a[0].trim().replace(/^let\s+|^const\s+|^var\s+/, ""), i = a[1].trim(), { body: l, endPos: c } = this.parseTemplateBlock(e, r);
357
383
  return {
358
384
  type: "ForStatement",
359
385
  init: {
@@ -362,7 +388,7 @@ class V {
362
388
  declarations: [
363
389
  {
364
390
  type: "VariableDeclarator",
365
- id: { type: "Identifier", name: a },
391
+ id: { type: "Identifier", name: o },
366
392
  init: this.parseJsExpression(i)
367
393
  }
368
394
  ]
@@ -371,72 +397,72 @@ class V {
371
397
  update: null,
372
398
  body: {
373
399
  type: "BlockStatement",
374
- body: c
400
+ body: l
375
401
  },
376
402
  // Consume the closing '}' tag for the for loop
377
403
  endPos: (() => {
378
- const u = e.indexOf("<%", l), p = e.indexOf("%>", u);
379
- return u === l && e.slice(u + 2, p).trim() === "}" ? p + 2 : l;
404
+ const u = e.indexOf("<%", c), p = e.indexOf("%>", u);
405
+ return u === c && e.slice(u + 2, p).trim() === "}" ? p + 2 : c;
380
406
  })()
381
407
  };
382
408
  }
383
- parseForEachStatement(t, e, s, n) {
384
- const { body: r, endPos: a } = this.parseTemplateBlock(s, n);
409
+ parseForEachStatement(t, e, r, n) {
410
+ const { body: a, endPos: o } = this.parseTemplateBlock(r, n);
385
411
  return {
386
412
  type: "ForEachStatement",
387
413
  collection: this.parseJsExpression(t),
388
414
  itemIdentifier: { type: "Identifier", name: e },
389
415
  body: {
390
416
  type: "BlockStatement",
391
- body: r
417
+ body: a
392
418
  },
393
419
  endPos: (() => {
394
- const i = s.indexOf("<%", a), c = s.indexOf("%>", i);
395
- return i === a && s.slice(i + 2, c).trim() === "}" ? c + 2 : a;
420
+ const i = r.indexOf("<%", o), l = r.indexOf("%>", i);
421
+ return i === o && r.slice(i + 2, l).trim() === "}" ? l + 2 : o;
396
422
  })()
397
423
  };
398
424
  }
399
425
  parseTemplateBlock(t, e) {
400
- const s = [];
426
+ const r = [];
401
427
  let n = e;
402
428
  for (; n < t.length; ) {
403
- const r = t.indexOf("<%", n);
404
- if (r === -1) {
405
- n < t.length && s.push(this.createAppendLiteral(t.slice(n))), n = t.length;
429
+ const a = t.indexOf("<%", n);
430
+ if (a === -1) {
431
+ n < t.length && r.push(this.createAppendLiteral(t.slice(n))), n = t.length;
406
432
  break;
407
433
  }
408
- r > n && s.push(this.createAppendLiteral(t.slice(n, r)));
409
- const a = t.indexOf("%>", r);
410
- if (a === -1)
434
+ a > n && r.push(this.createAppendLiteral(t.slice(n, a)));
435
+ const o = t.indexOf("%>", a);
436
+ if (o === -1)
411
437
  throw new Error("Unclosed EJS tag within block");
412
- const i = t.slice(r + 2, a).trim();
438
+ const i = t.slice(a + 2, o).trim();
413
439
  if (i === "}" || i.startsWith("} else")) {
414
- n = r;
440
+ n = a;
415
441
  break;
416
442
  }
417
- if (n = a + 2, i.startsWith("=") || i.startsWith("-")) {
418
- const c = i.slice(1).trim();
419
- s.push(this.createAppendExpression(c));
443
+ if (n = o + 2, i.startsWith("=") || i.startsWith("-")) {
444
+ const l = i.slice(1).trim();
445
+ r.push(this.createAppendExpression(l));
420
446
  } else {
421
447
  if (i.startsWith("#"))
422
448
  continue;
423
449
  if (i.startsWith("if")) {
424
- const c = this.parseIfStatement(i, t, n);
425
- s.push(c), n = c.endPos || n;
450
+ const l = this.parseIfStatement(i, t, n);
451
+ r.push(l), n = l.endPos || n;
426
452
  } else if (i.startsWith("for")) {
427
- const c = this.parseForStatement(i, t, n);
428
- s.push(c), n = c.endPos || n;
453
+ const l = this.parseForStatement(i, t, n);
454
+ r.push(l), n = l.endPos || n;
429
455
  } else {
430
- const c = i.match(/([\w][\w.-]*[\w])\s*\.\s*forEach\s*\(\s*(\w+)\s*=>\s*\{?/);
431
- if (c) {
432
- const l = c[1], u = c[2], p = this.parseForEachStatement(l, u, t, n);
433
- s.push(p), n = p.endPos || n;
456
+ const l = i.match(/([\w][\w.-]*[\w])\s*\.\s*forEach\s*\(\s*(\w+)\s*=>\s*\{?/);
457
+ if (l) {
458
+ const c = l[1], u = l[2], p = this.parseForEachStatement(c, u, t, n);
459
+ r.push(p), n = p.endPos || n;
434
460
  } else
435
461
  this.addMessage("info", `Unsupported scriptlet content within block: ${i}`);
436
462
  }
437
463
  }
438
464
  }
439
- return { body: s, endPos: n };
465
+ return { body: r, endPos: n };
440
466
  }
441
467
  parseJsExpression(t) {
442
468
  if (/^(['"]).*\1$/.test(t))
@@ -460,33 +486,33 @@ class V {
460
486
  value: t === "true"
461
487
  };
462
488
  for (const n of U) {
463
- const r = t.lastIndexOf(n);
464
- if (r > 0 && t[r - 1] !== "!" && t[r - 1] !== "=" && t[r - 1] !== "<" && t[r - 1] !== ">")
489
+ const a = t.lastIndexOf(n);
490
+ if (a > 0 && t[a - 1] !== "!" && t[a - 1] !== "=" && t[a - 1] !== "<" && t[a - 1] !== ">")
465
491
  return {
466
492
  type: n === "&&" || n === "||" ? "LogicalExpression" : "BinaryExpression",
467
- operator: D[n],
468
- left: this.parseJsExpression(t.slice(0, r).trim()),
469
- right: this.parseJsExpression(t.slice(r + n.length).trim())
493
+ operator: V[n],
494
+ left: this.parseJsExpression(t.slice(0, a).trim()),
495
+ right: this.parseJsExpression(t.slice(a + n.length).trim())
470
496
  };
471
497
  }
472
- const e = t.indexOf("."), s = t.indexOf("[");
473
- if (e > 0 && (s === -1 || e < s) || s > 0 && (e === -1 || s < e)) {
474
- const n = e > 0 && (s === -1 || e < s) ? e : s;
475
- let r, a, i = !1;
498
+ const e = t.indexOf("."), r = t.indexOf("[");
499
+ if (e > 0 && (r === -1 || e < r) || r > 0 && (e === -1 || r < e)) {
500
+ const n = e > 0 && (r === -1 || e < r) ? e : r;
501
+ let a, o, i = !1;
476
502
  if (n === e)
477
- r = t.slice(0, e), a = { type: "Identifier", name: t.slice(e + 1) }, i = !1;
503
+ a = t.slice(0, e), o = { type: "Identifier", name: t.slice(e + 1) }, i = !1;
478
504
  else {
479
- r = t.slice(0, s);
480
- const c = t.indexOf("]", s);
481
- if (c === -1)
505
+ a = t.slice(0, r);
506
+ const l = t.indexOf("]", r);
507
+ if (l === -1)
482
508
  throw new Error("Unclosed bracket in expression");
483
- const l = t.slice(s + 1, c);
484
- a = /^(['"]).*\1$/.test(l) || /^-?\d+(\.\d+)?$/.test(l) ? this.parseJsExpression(l) : { type: "Identifier", name: l }, i = !0;
509
+ const c = t.slice(r + 1, l);
510
+ o = /^(['"]).*\1$/.test(c) || /^-?\d+(\.\d+)?$/.test(c) ? this.parseJsExpression(c) : { type: "Identifier", name: c }, i = !0;
485
511
  }
486
512
  return {
487
513
  type: "MemberExpression",
488
- object: this.parseJsExpression(r),
489
- property: a,
514
+ object: this.parseJsExpression(a),
515
+ property: o,
490
516
  computed: i
491
517
  };
492
518
  }
@@ -529,8 +555,8 @@ class V {
529
555
  }
530
556
  handleProgram(t) {
531
557
  let e = "";
532
- for (const s of t.body)
533
- e += this.astToGrapesJS(s);
558
+ for (const r of t.body)
559
+ e += this.astToGrapesJS(r);
534
560
  return e;
535
561
  }
536
562
  handleVariableDeclaration(t) {
@@ -540,11 +566,11 @@ class V {
540
566
  return t.expression.type === "CallExpression" && t.expression.callee.type === "Identifier" && t.expression.callee.name === "__append" && t.expression.arguments.length > 0 ? this.astToGrapesJS(t.expression.arguments[0]) : "";
541
567
  }
542
568
  handleIfStatement(t) {
543
- const e = this.getConditionExpression(t.test), s = this.astToGrapesJS(t.consequent);
569
+ const e = this.getConditionExpression(t.test), r = this.astToGrapesJS(t.consequent);
544
570
  let n = "";
545
571
  return t.alternate && (n = this.astToGrapesJS(t.alternate)), `
546
572
  <data-condition data-gjs-data-resolver='${JSON.stringify({ condition: e })}'>
547
- <data-condition-true-content>${s}</data-condition-true-content>
573
+ <data-condition-true-content>${r}</data-condition-true-content>
548
574
  <data-condition-false-content>${n}</data-condition-false-content>
549
575
  </data-condition>
550
576
  `;
@@ -556,44 +582,44 @@ class V {
556
582
  const e = t.init.declarations[0];
557
583
  if (e.id.type !== "Identifier")
558
584
  return this.addMessage("warning", "Unsupported for loop variable declaration id"), "";
559
- let s = "";
585
+ let r = "";
560
586
  if (e.init)
561
- s = this.getExpressionString(e.init);
587
+ r = this.getExpressionString(e.init);
562
588
  else
563
589
  return this.addMessage("warning", "For loop collection is undefined"), "";
564
- const n = e.id.name, r = n;
590
+ const n = e.id.name, a = n;
565
591
  this.collectionStack.push(n);
566
- const a = this.astToGrapesJS(t.body);
592
+ const o = this.astToGrapesJS(t.body);
567
593
  return this.collectionStack.pop(), `
568
594
  <data-collection data-gjs-data-resolver='${JSON.stringify({
569
- dataSource: { type: "data-variable", path: s },
570
- collectionId: r
595
+ dataSource: { type: "data-variable", path: r },
596
+ collectionId: a
571
597
  })}'>
572
598
  <data-collection-item>
573
- ${a}
599
+ ${o}
574
600
  </data-collection-item>
575
601
  </data-collection>
576
602
  `;
577
603
  }
578
604
  handleForEachStatement(t) {
579
- const e = this.getExpressionString(t.collection), s = t.itemIdentifier.name, n = s;
580
- this.collectionStack.push(s);
581
- const r = this.astToGrapesJS(t.body);
605
+ const e = this.getExpressionString(t.collection), r = t.itemIdentifier.name, n = r;
606
+ this.collectionStack.push(r);
607
+ const a = this.astToGrapesJS(t.body);
582
608
  return this.collectionStack.pop(), `
583
609
  <data-collection data-gjs-data-resolver='${JSON.stringify({
584
610
  dataSource: { type: "data-variable", path: e },
585
611
  collectionId: n
586
612
  })}'>
587
613
  <data-collection-item>
588
- ${r}
614
+ ${a}
589
615
  </data-collection-item>
590
616
  </data-collection>
591
617
  `;
592
618
  }
593
619
  handleBlockStatement(t) {
594
620
  let e = "";
595
- for (const s of t.body)
596
- e += this.astToGrapesJS(s);
621
+ for (const r of t.body)
622
+ e += this.astToGrapesJS(r);
597
623
  return e;
598
624
  }
599
625
  handleLiteral(t) {
@@ -602,9 +628,9 @@ class V {
602
628
  handleIdentifier(t) {
603
629
  let e = { path: t.name };
604
630
  if (this.collectionStack.length > 0) {
605
- const s = this.collectionStack[this.collectionStack.length - 1];
606
- t.name === s && (e = {
607
- collectionId: s,
631
+ const r = this.collectionStack[this.collectionStack.length - 1];
632
+ t.name === r && (e = {
633
+ collectionId: r,
608
634
  variableType: "currentItem"
609
635
  });
610
636
  }
@@ -613,18 +639,18 @@ class V {
613
639
  handleMemberExpression(t, e = {}) {
614
640
  let n = { path: this.getExpressionString(t), ...e };
615
641
  if (this.collectionStack.length > 0) {
616
- const r = this.collectionStack[this.collectionStack.length - 1];
617
- let a = t;
642
+ const a = this.collectionStack[this.collectionStack.length - 1];
643
+ let o = t;
618
644
  const i = [];
619
- for (; a.type === "MemberExpression"; )
620
- a.property.type === "Identifier" && !a.computed ? i.unshift(a.property.name) : a.property.type === "Literal" && a.computed ? i.unshift(String(a.property.value)) : i.unshift(this.getExpressionString(a.property)), a = a.object;
621
- if (a.type === "Identifier" && a.name === r) {
622
- const c = i.join(".");
645
+ for (; o.type === "MemberExpression"; )
646
+ o.property.type === "Identifier" && !o.computed ? i.unshift(o.property.name) : o.property.type === "Literal" && o.computed ? i.unshift(String(o.property.value)) : i.unshift(this.getExpressionString(o.property)), o = o.object;
647
+ if (o.type === "Identifier" && o.name === a) {
648
+ const l = i.join(".");
623
649
  n = {
624
650
  ...e,
625
- collectionId: r,
651
+ collectionId: a,
626
652
  variableType: "currentItem",
627
- path: c
653
+ path: l
628
654
  };
629
655
  }
630
656
  }
@@ -641,8 +667,8 @@ class V {
641
667
  handleCallExpression(t) {
642
668
  var e;
643
669
  if (t.callee.type === "Identifier" && t.callee.name === "include") {
644
- const s = ((e = t.arguments[0]) == null ? void 0 : e.type) === "Literal" ? String(t.arguments[0].value) : "";
645
- return this.addMessage("info", `Partial includes are not fully supported: ${s}`), "";
670
+ const r = ((e = t.arguments[0]) == null ? void 0 : e.type) === "Literal" ? String(t.arguments[0].value) : "";
671
+ return this.addMessage("info", `Partial includes are not fully supported: ${r}`), "";
646
672
  }
647
673
  return "";
648
674
  }
@@ -658,20 +684,20 @@ class V {
658
684
  ]
659
685
  };
660
686
  if (t.type === "MemberExpression") {
661
- let e = this.getExpressionString(t), s = "isTruthy";
662
- return e.startsWith("!!") ? (s = "isTruthy", e = e.slice(2)) : e.startsWith("!") && (s = "isFalsy", e = e.slice(1)), {
687
+ let e = this.getExpressionString(t), r = "isTruthy";
688
+ return e.startsWith("!!") ? (r = "isTruthy", e = e.slice(2)) : e.startsWith("!") && (r = "isFalsy", e = e.slice(1)), {
663
689
  logicalOperator: "and",
664
690
  statements: [
665
691
  {
666
692
  left: { type: "data-variable", path: e },
667
- operator: s
693
+ operator: r
668
694
  }
669
695
  ]
670
696
  };
671
697
  }
672
698
  if (t.type === "BinaryExpression" || t.type === "LogicalExpression") {
673
- const e = this.getConditionExpression(t.left), s = this.getConditionExpression(t.right);
674
- return `${e} ${t.operator} ${s}`;
699
+ const e = this.getConditionExpression(t.left), r = this.getConditionExpression(t.right);
700
+ return `${e} ${t.operator} ${r}`;
675
701
  }
676
702
  return t.type === "Literal" ? typeof t.value == "string" ? `'${t.value}'` : String(t.value ?? "") : this.getExpressionString(t);
677
703
  }
@@ -682,16 +708,16 @@ class V {
682
708
  case "Literal":
683
709
  return String(t.value ?? "");
684
710
  case "MemberExpression": {
685
- const e = this.getExpressionString(t.object), s = this.getExpressionString(t.property);
686
- return t.computed ? `${e}[${s}]` : `${e}.${s}`;
711
+ const e = this.getExpressionString(t.object), r = this.getExpressionString(t.property);
712
+ return t.computed ? `${e}[${r}]` : `${e}.${r}`;
687
713
  }
688
714
  case "BinaryExpression": {
689
- const e = this.getExpressionString(t.left), s = this.getExpressionString(t.right);
690
- return `${e} ${t.operator} ${s}`;
715
+ const e = this.getExpressionString(t.left), r = this.getExpressionString(t.right);
716
+ return `${e} ${t.operator} ${r}`;
691
717
  }
692
718
  case "LogicalExpression": {
693
- const e = this.getExpressionString(t.left), s = this.getExpressionString(t.right);
694
- return `${e} ${t.operator} ${s}`;
719
+ const e = this.getExpressionString(t.left), r = this.getExpressionString(t.right);
720
+ return `${e} ${t.operator} ${r}`;
695
721
  }
696
722
  default:
697
723
  return this.addMessage("warning", `Unsupported expression type for getExpressionString: ${t.type}`), "";
@@ -704,21 +730,21 @@ class V {
704
730
  });
705
731
  }
706
732
  }
707
- const G = "dataSourceEjs", q = m.startup, H = function(o, t = {}) {
708
- const e = W(o, new J()), s = _(o, {
733
+ const H = "dataSourceEjs", K = y.startup, z = function(s, t = {}) {
734
+ const e = J(s, new _()), r = W(s, {
709
735
  contains: "<%",
710
- importer: new V()
736
+ importer: new q()
711
737
  });
712
- A({
713
- editor: o,
738
+ G({
739
+ editor: s,
714
740
  licenseKey: t.licenseKey,
715
- plan: q,
716
- pluginName: G,
741
+ plan: K,
742
+ pluginName: H,
717
743
  cleanup: () => {
718
- e(), s();
744
+ e(), r();
719
745
  }
720
746
  });
721
- }, K = B(H);
747
+ }, C = M(z);
722
748
  export {
723
- K as default
749
+ C as default
724
750
  };