@topol.io/editor-react 0.2.1 → 1.0.0-alpha.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.
- package/LICENSE +1 -1
- package/dist/topol-editor-react.es.js +631 -414
- package/dist/topol-editor-react.umd.js +11 -11
- package/dist/types/{src/TopolEditor.d.ts → EmailEditor.d.ts} +7 -8
- package/dist/types/LandingPageEditor.d.ts +37 -0
- package/dist/types/TopolEditor.d.ts +3 -0
- package/dist/types/entry.d.ts +48 -0
- package/dist/types/types.d.ts +19 -0
- package/package.json +15 -6
- package/dist/types/types/IReactTopolOptions.d.ts +0 -2
|
@@ -1,5 +1,215 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import Be, { useRef as _, useEffect as D, forwardRef as Me, useImperativeHandle as Le } from "react";
|
|
2
|
+
function ze(t) {
|
|
3
|
+
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
4
|
+
}
|
|
5
|
+
var Ye = function(t, d, g) {
|
|
6
|
+
var s = document.head || document.getElementsByTagName("head")[0], u = document.createElement("script");
|
|
7
|
+
typeof d == "function" && (g = d, d = {}), d = d || {}, g = g || function() {
|
|
8
|
+
}, u.type = d.type || "text/javascript", u.charset = d.charset || "utf8", u.async = "async" in d ? !!d.async : !0, u.src = t, d.attrs && Ie(u, d.attrs), d.text && (u.text = "" + d.text);
|
|
9
|
+
var E = "onload" in u ? he : Ue;
|
|
10
|
+
E(u, g), u.onload || he(u, g), s.appendChild(u);
|
|
11
|
+
};
|
|
12
|
+
function Ie(t, d) {
|
|
13
|
+
for (var g in d)
|
|
14
|
+
t.setAttribute(g, d[g]);
|
|
15
|
+
}
|
|
16
|
+
function he(t, d) {
|
|
17
|
+
t.onload = function() {
|
|
18
|
+
this.onerror = this.onload = null, d(null, t);
|
|
19
|
+
}, t.onerror = function() {
|
|
20
|
+
this.onerror = this.onload = null, d(new Error("Failed to load " + this.src), t);
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
function Ue(t, d) {
|
|
24
|
+
t.onreadystatechange = function() {
|
|
25
|
+
this.readyState != "complete" && this.readyState != "loaded" || (this.onreadystatechange = null, d(null, t));
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
const Z = /* @__PURE__ */ ze(Ye);
|
|
29
|
+
var J = {};
|
|
30
|
+
const N = {
|
|
31
|
+
production: J.VITE_TOPOL_URL,
|
|
32
|
+
dev: J.VITE_TOPOL_DEV_URL,
|
|
33
|
+
staging: J.VITE_TOPOL_STAGING_URL
|
|
34
|
+
}, We = "https://d10h8ga60f7b91.cloudfront.net/preview-app-{stage}/loader/build.js";
|
|
35
|
+
function $e(t = "production") {
|
|
36
|
+
switch (t) {
|
|
37
|
+
case "dev":
|
|
38
|
+
return N.dev;
|
|
39
|
+
case "staging":
|
|
40
|
+
return N.staging;
|
|
41
|
+
case "production":
|
|
42
|
+
return N.production;
|
|
43
|
+
default:
|
|
44
|
+
return We.replace("{stage}", String(t));
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
async function Ve(t) {
|
|
48
|
+
return new Promise((d, g) => {
|
|
49
|
+
Z(N.production, (s) => {
|
|
50
|
+
if (s !== null) {
|
|
51
|
+
g(s);
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
window.TopolPlugin.init(t), d(!0);
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
const X = {
|
|
59
|
+
/**
|
|
60
|
+
* Initialize the Email Editor.
|
|
61
|
+
* @param topolOptions - Configuration options for the editor
|
|
62
|
+
* @param options - Plugin options including stage selection
|
|
63
|
+
* @returns Promise that resolves to true when the editor is ready
|
|
64
|
+
*/
|
|
65
|
+
init: (t, d) => new Promise((g, s) => {
|
|
66
|
+
const u = $e(d == null ? void 0 : d.stage);
|
|
67
|
+
Z(u, async (E) => {
|
|
68
|
+
if (E !== null) {
|
|
69
|
+
if (u !== N.production)
|
|
70
|
+
try {
|
|
71
|
+
return await Ve(t), g(!0);
|
|
72
|
+
} catch (v) {
|
|
73
|
+
s(v);
|
|
74
|
+
}
|
|
75
|
+
s(E);
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
window.TopolPlugin.init(t), g(!0);
|
|
79
|
+
});
|
|
80
|
+
}),
|
|
81
|
+
/** Trigger the save callback with current editor content */
|
|
82
|
+
save: () => {
|
|
83
|
+
window.TopolPlugin.save();
|
|
84
|
+
},
|
|
85
|
+
/** Load a template JSON into the editor */
|
|
86
|
+
load: (t) => {
|
|
87
|
+
window.TopolPlugin.load(t);
|
|
88
|
+
},
|
|
89
|
+
/** Toggle the preview mode */
|
|
90
|
+
togglePreview: () => {
|
|
91
|
+
window.TopolPlugin.togglePreview();
|
|
92
|
+
},
|
|
93
|
+
/** Toggle between desktop and mobile preview sizes */
|
|
94
|
+
togglePreviewSize: () => {
|
|
95
|
+
window.TopolPlugin.togglePreviewSize();
|
|
96
|
+
},
|
|
97
|
+
/** Select a file from the custom file manager */
|
|
98
|
+
chooseFile: (t) => {
|
|
99
|
+
window.TopolPlugin.chooseFile(t);
|
|
100
|
+
},
|
|
101
|
+
/** Undo the last action */
|
|
102
|
+
undo: () => {
|
|
103
|
+
window.TopolPlugin.undo();
|
|
104
|
+
},
|
|
105
|
+
/** Redo the last undone action */
|
|
106
|
+
redo: () => {
|
|
107
|
+
window.TopolPlugin.redo();
|
|
108
|
+
},
|
|
109
|
+
/** Destroy the editor instance and clean up resources */
|
|
110
|
+
destroy: () => {
|
|
111
|
+
window.TopolPlugin.destroy();
|
|
112
|
+
},
|
|
113
|
+
/** Update the list of saved/reusable blocks */
|
|
114
|
+
setSavedBlocks: (t) => {
|
|
115
|
+
window.TopolPlugin.setSavedBlocks(t);
|
|
116
|
+
},
|
|
117
|
+
/** Set custom HTML for the preview */
|
|
118
|
+
setPreviewHTML: (t) => {
|
|
119
|
+
window.TopolPlugin.setPreviewHTML(t);
|
|
120
|
+
},
|
|
121
|
+
/** Display a notification in the editor */
|
|
122
|
+
createNotification: (t) => {
|
|
123
|
+
window.TopolPlugin.createNotification(t);
|
|
124
|
+
},
|
|
125
|
+
/** Set the list of active collaboration members */
|
|
126
|
+
setActiveMembers: (t) => {
|
|
127
|
+
window.TopolPlugin.setActiveMembers(t);
|
|
128
|
+
},
|
|
129
|
+
/** Switch to mobile view */
|
|
130
|
+
changeEmailToMobile: () => {
|
|
131
|
+
window.TopolPlugin.changeEmailToMobile();
|
|
132
|
+
},
|
|
133
|
+
/** Switch to desktop view */
|
|
134
|
+
changeEmailToDesktop: () => {
|
|
135
|
+
window.TopolPlugin.changeEmailToDesktop();
|
|
136
|
+
},
|
|
137
|
+
/** Toggle visibility of hidden blocks and structures */
|
|
138
|
+
toggleBlocksAndStructuresVisibility: () => {
|
|
139
|
+
window.TopolPlugin.toggleBlocksAndStructuresVisibility();
|
|
140
|
+
},
|
|
141
|
+
/** Update the content of a custom block */
|
|
142
|
+
updateCustomBlockContent: (t) => {
|
|
143
|
+
window.TopolPlugin.updateCustomBlockContent(t);
|
|
144
|
+
},
|
|
145
|
+
/** Refresh comments/conversations */
|
|
146
|
+
refreshComments: (t) => {
|
|
147
|
+
window.TopolPlugin.refreshComments(t);
|
|
148
|
+
},
|
|
149
|
+
/** Refresh synced rows */
|
|
150
|
+
refreshSyncedRows: () => {
|
|
151
|
+
window.TopolPlugin.refreshSyncedRows();
|
|
152
|
+
},
|
|
153
|
+
/** Open the premade templates selection modal */
|
|
154
|
+
openPremadeTemplatesSelection: () => {
|
|
155
|
+
window.TopolPlugin.openPremadeTemplatesSelection();
|
|
156
|
+
},
|
|
157
|
+
/** Update the API authorization header */
|
|
158
|
+
updateApiAuthorizationHeader: (t) => {
|
|
159
|
+
window.TopolPlugin.updateApiAuthorizationHeader(t);
|
|
160
|
+
},
|
|
161
|
+
/** Set the template name/title */
|
|
162
|
+
setTemplateName: (t) => {
|
|
163
|
+
window.TopolPlugin.setTemplateName(t);
|
|
164
|
+
},
|
|
165
|
+
/** Toggle the AI chat feature */
|
|
166
|
+
toggleChatAI: () => {
|
|
167
|
+
window.TopolPlugin.toggleChatAI();
|
|
168
|
+
},
|
|
169
|
+
/** Toggle the autosaves feature */
|
|
170
|
+
toggleAutosaves: () => {
|
|
171
|
+
window.TopolPlugin.toggleAutosaves();
|
|
172
|
+
},
|
|
173
|
+
/** Toggle the comments panel */
|
|
174
|
+
toggleComments: () => {
|
|
175
|
+
window.TopolPlugin.toggleComments();
|
|
176
|
+
},
|
|
177
|
+
/** Create a new language variant */
|
|
178
|
+
createLanguage: (t) => {
|
|
179
|
+
window.TopolPlugin.createLanguage(t);
|
|
180
|
+
},
|
|
181
|
+
/** Set the primary language */
|
|
182
|
+
setPrimaryLanguage: (t) => {
|
|
183
|
+
window.TopolPlugin.setPrimaryLanguage(t);
|
|
184
|
+
},
|
|
185
|
+
/** Delete a language variant */
|
|
186
|
+
deleteLanguage: (t) => {
|
|
187
|
+
window.TopolPlugin.deleteLanguage(t);
|
|
188
|
+
},
|
|
189
|
+
/** Select/switch to a language */
|
|
190
|
+
selectLanguage: (t) => {
|
|
191
|
+
window.TopolPlugin.selectLanguage(t);
|
|
192
|
+
}
|
|
193
|
+
}, He = "https://v1.page-assets.topol.io/topol-lpe.js", Fe = {
|
|
194
|
+
/**
|
|
195
|
+
* Inits Landing Page Editor.
|
|
196
|
+
*
|
|
197
|
+
* @param options - Configuration options for the editor
|
|
198
|
+
* @param pluginOptions - Plugin options (reserved for future staging/dev URL support)
|
|
199
|
+
* @returns Promise that resolves with the editor instance
|
|
200
|
+
*/
|
|
201
|
+
init: (t, d) => new Promise((g, s) => {
|
|
202
|
+
Z(He, (u) => {
|
|
203
|
+
if (u !== null) {
|
|
204
|
+
s(u);
|
|
205
|
+
return;
|
|
206
|
+
}
|
|
207
|
+
const E = window.LandingPageEditor(t);
|
|
208
|
+
g(E);
|
|
209
|
+
});
|
|
210
|
+
})
|
|
211
|
+
}, Qe = X;
|
|
212
|
+
var M = { exports: {} }, x = {};
|
|
3
213
|
/**
|
|
4
214
|
* @license React
|
|
5
215
|
* react-jsx-runtime.production.js
|
|
@@ -9,29 +219,29 @@ var A = { exports: {} }, P = {};
|
|
|
9
219
|
* This source code is licensed under the MIT license found in the
|
|
10
220
|
* LICENSE file in the root directory of this source tree.
|
|
11
221
|
*/
|
|
12
|
-
var
|
|
13
|
-
function
|
|
14
|
-
if (
|
|
15
|
-
|
|
16
|
-
var
|
|
17
|
-
function
|
|
18
|
-
var
|
|
19
|
-
if (
|
|
20
|
-
|
|
21
|
-
for (var
|
|
22
|
-
|
|
23
|
-
} else
|
|
24
|
-
return
|
|
25
|
-
$$typeof:
|
|
26
|
-
type:
|
|
27
|
-
key:
|
|
28
|
-
ref:
|
|
29
|
-
props:
|
|
222
|
+
var be;
|
|
223
|
+
function qe() {
|
|
224
|
+
if (be) return x;
|
|
225
|
+
be = 1;
|
|
226
|
+
var t = Symbol.for("react.transitional.element"), d = Symbol.for("react.fragment");
|
|
227
|
+
function g(s, u, E) {
|
|
228
|
+
var v = null;
|
|
229
|
+
if (E !== void 0 && (v = "" + E), u.key !== void 0 && (v = "" + u.key), "key" in u) {
|
|
230
|
+
E = {};
|
|
231
|
+
for (var m in u)
|
|
232
|
+
m !== "key" && (E[m] = u[m]);
|
|
233
|
+
} else E = u;
|
|
234
|
+
return u = E.ref, {
|
|
235
|
+
$$typeof: t,
|
|
236
|
+
type: s,
|
|
237
|
+
key: v,
|
|
238
|
+
ref: u !== void 0 ? u : null,
|
|
239
|
+
props: E
|
|
30
240
|
};
|
|
31
241
|
}
|
|
32
|
-
return
|
|
242
|
+
return x.Fragment = d, x.jsx = g, x.jsxs = g, x;
|
|
33
243
|
}
|
|
34
|
-
var
|
|
244
|
+
var j = {};
|
|
35
245
|
/**
|
|
36
246
|
* @license React
|
|
37
247
|
* react-jsx-runtime.development.js
|
|
@@ -41,79 +251,79 @@ var R = {};
|
|
|
41
251
|
* This source code is licensed under the MIT license found in the
|
|
42
252
|
* LICENSE file in the root directory of this source tree.
|
|
43
253
|
*/
|
|
44
|
-
var
|
|
45
|
-
function
|
|
46
|
-
return
|
|
47
|
-
function
|
|
254
|
+
var Pe;
|
|
255
|
+
function Ge() {
|
|
256
|
+
return Pe || (Pe = 1, process.env.NODE_ENV !== "production" && function() {
|
|
257
|
+
function t(e) {
|
|
48
258
|
if (e == null) return null;
|
|
49
259
|
if (typeof e == "function")
|
|
50
|
-
return e.$$typeof ===
|
|
260
|
+
return e.$$typeof === xe ? null : e.displayName || e.name || null;
|
|
51
261
|
if (typeof e == "string") return e;
|
|
52
262
|
switch (e) {
|
|
53
|
-
case
|
|
263
|
+
case Y:
|
|
54
264
|
return "Fragment";
|
|
55
|
-
case
|
|
265
|
+
case Ae:
|
|
56
266
|
return "Portal";
|
|
57
|
-
case
|
|
267
|
+
case te:
|
|
58
268
|
return "Profiler";
|
|
59
|
-
case
|
|
269
|
+
case ne:
|
|
60
270
|
return "StrictMode";
|
|
61
|
-
case
|
|
271
|
+
case U:
|
|
62
272
|
return "Suspense";
|
|
63
|
-
case
|
|
273
|
+
case W:
|
|
64
274
|
return "SuspenseList";
|
|
65
275
|
}
|
|
66
276
|
if (typeof e == "object")
|
|
67
277
|
switch (typeof e.tag == "number" && console.error(
|
|
68
278
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
69
279
|
), e.$$typeof) {
|
|
70
|
-
case
|
|
280
|
+
case ae:
|
|
71
281
|
return (e.displayName || "Context") + ".Provider";
|
|
72
|
-
case
|
|
282
|
+
case re:
|
|
73
283
|
return (e._context.displayName || "Context") + ".Consumer";
|
|
74
|
-
case
|
|
75
|
-
var
|
|
76
|
-
return e = e.displayName, e || (e =
|
|
77
|
-
case W:
|
|
78
|
-
return t = e.displayName || null, t !== null ? t : o(e.type) || "Memo";
|
|
284
|
+
case I:
|
|
285
|
+
var r = e.render;
|
|
286
|
+
return e = e.displayName, e || (e = r.displayName || r.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
|
|
79
287
|
case $:
|
|
80
|
-
|
|
288
|
+
return r = e.displayName || null, r !== null ? r : t(e.type) || "Memo";
|
|
289
|
+
case V:
|
|
290
|
+
r = e._payload, e = e._init;
|
|
81
291
|
try {
|
|
82
|
-
return
|
|
292
|
+
return t(e(r));
|
|
83
293
|
} catch {
|
|
84
294
|
}
|
|
85
295
|
}
|
|
86
296
|
return null;
|
|
87
297
|
}
|
|
88
|
-
function
|
|
298
|
+
function d(e) {
|
|
89
299
|
return "" + e;
|
|
90
300
|
}
|
|
91
|
-
function
|
|
301
|
+
function g(e) {
|
|
92
302
|
try {
|
|
93
|
-
|
|
94
|
-
var
|
|
303
|
+
d(e);
|
|
304
|
+
var r = !1;
|
|
95
305
|
} catch {
|
|
96
|
-
|
|
306
|
+
r = !0;
|
|
97
307
|
}
|
|
98
|
-
if (
|
|
99
|
-
|
|
100
|
-
var
|
|
101
|
-
return
|
|
102
|
-
|
|
308
|
+
if (r) {
|
|
309
|
+
r = console;
|
|
310
|
+
var a = r.error, f = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
311
|
+
return a.call(
|
|
312
|
+
r,
|
|
103
313
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
104
|
-
|
|
105
|
-
),
|
|
314
|
+
f
|
|
315
|
+
), d(e);
|
|
106
316
|
}
|
|
107
317
|
}
|
|
108
|
-
function
|
|
318
|
+
function s() {
|
|
109
319
|
}
|
|
110
|
-
function
|
|
111
|
-
if (
|
|
112
|
-
|
|
320
|
+
function u() {
|
|
321
|
+
if (A === 0) {
|
|
322
|
+
ue = console.log, se = console.info, ce = console.warn, de = console.error, fe = console.group, ge = console.groupCollapsed, ve = console.groupEnd;
|
|
113
323
|
var e = {
|
|
114
324
|
configurable: !0,
|
|
115
325
|
enumerable: !0,
|
|
116
|
-
value:
|
|
326
|
+
value: s,
|
|
117
327
|
writable: !0
|
|
118
328
|
};
|
|
119
329
|
Object.defineProperties(console, {
|
|
@@ -126,204 +336,204 @@ function Ne() {
|
|
|
126
336
|
groupEnd: e
|
|
127
337
|
});
|
|
128
338
|
}
|
|
129
|
-
|
|
339
|
+
A++;
|
|
130
340
|
}
|
|
131
|
-
function
|
|
132
|
-
if (
|
|
341
|
+
function E() {
|
|
342
|
+
if (A--, A === 0) {
|
|
133
343
|
var e = { configurable: !0, enumerable: !0, writable: !0 };
|
|
134
344
|
Object.defineProperties(console, {
|
|
135
|
-
log:
|
|
136
|
-
info:
|
|
137
|
-
warn:
|
|
138
|
-
error:
|
|
139
|
-
group:
|
|
140
|
-
groupCollapsed:
|
|
141
|
-
groupEnd:
|
|
345
|
+
log: R({}, e, { value: ue }),
|
|
346
|
+
info: R({}, e, { value: se }),
|
|
347
|
+
warn: R({}, e, { value: ce }),
|
|
348
|
+
error: R({}, e, { value: de }),
|
|
349
|
+
group: R({}, e, { value: fe }),
|
|
350
|
+
groupCollapsed: R({}, e, { value: ge }),
|
|
351
|
+
groupEnd: R({}, e, { value: ve })
|
|
142
352
|
});
|
|
143
353
|
}
|
|
144
|
-
0 >
|
|
354
|
+
0 > A && console.error(
|
|
145
355
|
"disabledDepth fell below zero. This is a bug in React. Please file an issue."
|
|
146
356
|
);
|
|
147
357
|
}
|
|
148
|
-
function
|
|
149
|
-
if (
|
|
358
|
+
function v(e) {
|
|
359
|
+
if (F === void 0)
|
|
150
360
|
try {
|
|
151
361
|
throw Error();
|
|
152
|
-
} catch (
|
|
153
|
-
var
|
|
154
|
-
|
|
155
|
-
at`) ? " (<anonymous>)" : -1 <
|
|
362
|
+
} catch (a) {
|
|
363
|
+
var r = a.stack.trim().match(/\n( *(at )?)/);
|
|
364
|
+
F = r && r[1] || "", Ee = -1 < a.stack.indexOf(`
|
|
365
|
+
at`) ? " (<anonymous>)" : -1 < a.stack.indexOf("@") ? "@unknown:0:0" : "";
|
|
156
366
|
}
|
|
157
367
|
return `
|
|
158
|
-
` +
|
|
368
|
+
` + F + e + Ee;
|
|
159
369
|
}
|
|
160
|
-
function
|
|
161
|
-
if (!e ||
|
|
162
|
-
var
|
|
163
|
-
if (
|
|
164
|
-
|
|
165
|
-
var
|
|
166
|
-
|
|
370
|
+
function m(e, r) {
|
|
371
|
+
if (!e || q) return "";
|
|
372
|
+
var a = G.get(e);
|
|
373
|
+
if (a !== void 0) return a;
|
|
374
|
+
q = !0, a = Error.prepareStackTrace, Error.prepareStackTrace = void 0;
|
|
375
|
+
var f = null;
|
|
376
|
+
f = y.H, y.H = null, u();
|
|
167
377
|
try {
|
|
168
|
-
var
|
|
378
|
+
var T = {
|
|
169
379
|
DetermineComponentFrameRoot: function() {
|
|
170
380
|
try {
|
|
171
|
-
if (
|
|
172
|
-
var
|
|
381
|
+
if (r) {
|
|
382
|
+
var C = function() {
|
|
173
383
|
throw Error();
|
|
174
384
|
};
|
|
175
|
-
if (Object.defineProperty(
|
|
385
|
+
if (Object.defineProperty(C.prototype, "props", {
|
|
176
386
|
set: function() {
|
|
177
387
|
throw Error();
|
|
178
388
|
}
|
|
179
389
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
180
390
|
try {
|
|
181
|
-
Reflect.construct(
|
|
182
|
-
} catch (
|
|
183
|
-
var
|
|
391
|
+
Reflect.construct(C, []);
|
|
392
|
+
} catch (P) {
|
|
393
|
+
var B = P;
|
|
184
394
|
}
|
|
185
|
-
Reflect.construct(e, [],
|
|
395
|
+
Reflect.construct(e, [], C);
|
|
186
396
|
} else {
|
|
187
397
|
try {
|
|
188
|
-
|
|
189
|
-
} catch (
|
|
190
|
-
|
|
398
|
+
C.call();
|
|
399
|
+
} catch (P) {
|
|
400
|
+
B = P;
|
|
191
401
|
}
|
|
192
|
-
e.call(
|
|
402
|
+
e.call(C.prototype);
|
|
193
403
|
}
|
|
194
404
|
} else {
|
|
195
405
|
try {
|
|
196
406
|
throw Error();
|
|
197
|
-
} catch (
|
|
198
|
-
|
|
407
|
+
} catch (P) {
|
|
408
|
+
B = P;
|
|
199
409
|
}
|
|
200
|
-
(
|
|
410
|
+
(C = e()) && typeof C.catch == "function" && C.catch(function() {
|
|
201
411
|
});
|
|
202
412
|
}
|
|
203
|
-
} catch (
|
|
204
|
-
if (
|
|
205
|
-
return [
|
|
413
|
+
} catch (P) {
|
|
414
|
+
if (P && B && typeof P.stack == "string")
|
|
415
|
+
return [P.stack, B.stack];
|
|
206
416
|
}
|
|
207
417
|
return [null, null];
|
|
208
418
|
}
|
|
209
419
|
};
|
|
210
|
-
|
|
211
|
-
var
|
|
212
|
-
|
|
420
|
+
T.DetermineComponentFrameRoot.displayName = "DetermineComponentFrameRoot";
|
|
421
|
+
var p = Object.getOwnPropertyDescriptor(
|
|
422
|
+
T.DetermineComponentFrameRoot,
|
|
213
423
|
"name"
|
|
214
424
|
);
|
|
215
|
-
|
|
216
|
-
|
|
425
|
+
p && p.configurable && Object.defineProperty(
|
|
426
|
+
T.DetermineComponentFrameRoot,
|
|
217
427
|
"name",
|
|
218
428
|
{ value: "DetermineComponentFrameRoot" }
|
|
219
429
|
);
|
|
220
|
-
var
|
|
221
|
-
if (
|
|
222
|
-
var
|
|
223
|
-
`),
|
|
430
|
+
var c = T.DetermineComponentFrameRoot(), b = c[0], k = c[1];
|
|
431
|
+
if (b && k) {
|
|
432
|
+
var h = b.split(`
|
|
433
|
+
`), S = k.split(`
|
|
224
434
|
`);
|
|
225
|
-
for (
|
|
435
|
+
for (c = p = 0; p < h.length && !h[p].includes(
|
|
226
436
|
"DetermineComponentFrameRoot"
|
|
227
437
|
); )
|
|
228
|
-
|
|
229
|
-
for (;
|
|
438
|
+
p++;
|
|
439
|
+
for (; c < S.length && !S[c].includes(
|
|
230
440
|
"DetermineComponentFrameRoot"
|
|
231
441
|
); )
|
|
232
|
-
|
|
233
|
-
if (
|
|
234
|
-
for (
|
|
235
|
-
|
|
236
|
-
for (; 1 <=
|
|
237
|
-
if (
|
|
238
|
-
if (
|
|
442
|
+
c++;
|
|
443
|
+
if (p === h.length || c === S.length)
|
|
444
|
+
for (p = h.length - 1, c = S.length - 1; 1 <= p && 0 <= c && h[p] !== S[c]; )
|
|
445
|
+
c--;
|
|
446
|
+
for (; 1 <= p && 0 <= c; p--, c--)
|
|
447
|
+
if (h[p] !== S[c]) {
|
|
448
|
+
if (p !== 1 || c !== 1)
|
|
239
449
|
do
|
|
240
|
-
if (
|
|
241
|
-
var
|
|
242
|
-
` +
|
|
450
|
+
if (p--, c--, 0 > c || h[p] !== S[c]) {
|
|
451
|
+
var O = `
|
|
452
|
+
` + h[p].replace(
|
|
243
453
|
" at new ",
|
|
244
454
|
" at "
|
|
245
455
|
);
|
|
246
|
-
return e.displayName &&
|
|
456
|
+
return e.displayName && O.includes("<anonymous>") && (O = O.replace("<anonymous>", e.displayName)), typeof e == "function" && G.set(e, O), O;
|
|
247
457
|
}
|
|
248
|
-
while (1 <=
|
|
458
|
+
while (1 <= p && 0 <= c);
|
|
249
459
|
break;
|
|
250
460
|
}
|
|
251
461
|
}
|
|
252
462
|
} finally {
|
|
253
|
-
|
|
463
|
+
q = !1, y.H = f, E(), Error.prepareStackTrace = a;
|
|
254
464
|
}
|
|
255
|
-
return
|
|
465
|
+
return h = (h = e ? e.displayName || e.name : "") ? v(h) : "", typeof e == "function" && G.set(e, h), h;
|
|
256
466
|
}
|
|
257
|
-
function
|
|
467
|
+
function l(e) {
|
|
258
468
|
if (e == null) return "";
|
|
259
469
|
if (typeof e == "function") {
|
|
260
|
-
var
|
|
261
|
-
return
|
|
470
|
+
var r = e.prototype;
|
|
471
|
+
return m(
|
|
262
472
|
e,
|
|
263
|
-
!(!
|
|
473
|
+
!(!r || !r.isReactComponent)
|
|
264
474
|
);
|
|
265
475
|
}
|
|
266
|
-
if (typeof e == "string") return
|
|
476
|
+
if (typeof e == "string") return v(e);
|
|
267
477
|
switch (e) {
|
|
268
|
-
case
|
|
269
|
-
return
|
|
270
|
-
case
|
|
271
|
-
return
|
|
478
|
+
case U:
|
|
479
|
+
return v("Suspense");
|
|
480
|
+
case W:
|
|
481
|
+
return v("SuspenseList");
|
|
272
482
|
}
|
|
273
483
|
if (typeof e == "object")
|
|
274
484
|
switch (e.$$typeof) {
|
|
275
|
-
case
|
|
276
|
-
return e =
|
|
277
|
-
case W:
|
|
278
|
-
return x(e.type);
|
|
485
|
+
case I:
|
|
486
|
+
return e = m(e.render, !1), e;
|
|
279
487
|
case $:
|
|
280
|
-
|
|
488
|
+
return l(e.type);
|
|
489
|
+
case V:
|
|
490
|
+
r = e._payload, e = e._init;
|
|
281
491
|
try {
|
|
282
|
-
return
|
|
492
|
+
return l(e(r));
|
|
283
493
|
} catch {
|
|
284
494
|
}
|
|
285
495
|
}
|
|
286
496
|
return "";
|
|
287
497
|
}
|
|
288
|
-
function
|
|
289
|
-
var e =
|
|
498
|
+
function o() {
|
|
499
|
+
var e = y.A;
|
|
290
500
|
return e === null ? null : e.getOwner();
|
|
291
501
|
}
|
|
292
|
-
function
|
|
293
|
-
if (
|
|
294
|
-
var
|
|
295
|
-
if (
|
|
502
|
+
function n(e) {
|
|
503
|
+
if (le.call(e, "key")) {
|
|
504
|
+
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
505
|
+
if (r && r.isReactWarning) return !1;
|
|
296
506
|
}
|
|
297
507
|
return e.key !== void 0;
|
|
298
508
|
}
|
|
299
|
-
function
|
|
300
|
-
function
|
|
301
|
-
|
|
509
|
+
function i(e, r) {
|
|
510
|
+
function a() {
|
|
511
|
+
pe || (pe = !0, console.error(
|
|
302
512
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
303
|
-
|
|
513
|
+
r
|
|
304
514
|
));
|
|
305
515
|
}
|
|
306
|
-
|
|
307
|
-
get:
|
|
516
|
+
a.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
517
|
+
get: a,
|
|
308
518
|
configurable: !0
|
|
309
519
|
});
|
|
310
520
|
}
|
|
311
|
-
function
|
|
312
|
-
var e =
|
|
313
|
-
return
|
|
521
|
+
function w() {
|
|
522
|
+
var e = t(this.type);
|
|
523
|
+
return me[e] || (me[e] = !0, console.error(
|
|
314
524
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
315
525
|
)), e = this.props.ref, e !== void 0 ? e : null;
|
|
316
526
|
}
|
|
317
|
-
function
|
|
318
|
-
return
|
|
319
|
-
$$typeof:
|
|
527
|
+
function Se(e, r, a, f, T, p) {
|
|
528
|
+
return a = p.ref, e = {
|
|
529
|
+
$$typeof: z,
|
|
320
530
|
type: e,
|
|
321
|
-
key:
|
|
322
|
-
props:
|
|
323
|
-
_owner:
|
|
324
|
-
}, (
|
|
531
|
+
key: r,
|
|
532
|
+
props: p,
|
|
533
|
+
_owner: T
|
|
534
|
+
}, (a !== void 0 ? a : null) !== null ? Object.defineProperty(e, "ref", {
|
|
325
535
|
enumerable: !1,
|
|
326
|
-
get:
|
|
536
|
+
get: w
|
|
327
537
|
}) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
|
|
328
538
|
configurable: !1,
|
|
329
539
|
enumerable: !1,
|
|
@@ -336,315 +546,322 @@ function Ne() {
|
|
|
336
546
|
value: null
|
|
337
547
|
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
338
548
|
}
|
|
339
|
-
function
|
|
340
|
-
if (typeof e == "string" || typeof e == "function" || e ===
|
|
341
|
-
var
|
|
342
|
-
if (
|
|
343
|
-
if (
|
|
344
|
-
if (
|
|
345
|
-
for (
|
|
346
|
-
|
|
347
|
-
Object.freeze && Object.freeze(
|
|
549
|
+
function K(e, r, a, f, T, p) {
|
|
550
|
+
if (typeof e == "string" || typeof e == "function" || e === Y || e === te || e === ne || e === U || e === W || e === Oe || typeof e == "object" && e !== null && (e.$$typeof === V || e.$$typeof === $ || e.$$typeof === ae || e.$$typeof === re || e.$$typeof === I || e.$$typeof === je || e.getModuleId !== void 0)) {
|
|
551
|
+
var c = r.children;
|
|
552
|
+
if (c !== void 0)
|
|
553
|
+
if (f)
|
|
554
|
+
if (H(c)) {
|
|
555
|
+
for (f = 0; f < c.length; f++)
|
|
556
|
+
ee(c[f], e);
|
|
557
|
+
Object.freeze && Object.freeze(c);
|
|
348
558
|
} else
|
|
349
559
|
console.error(
|
|
350
560
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
351
561
|
);
|
|
352
|
-
else
|
|
562
|
+
else ee(c, e);
|
|
353
563
|
} else
|
|
354
|
-
|
|
564
|
+
c = "", (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (c += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."), e === null ? f = "null" : H(e) ? f = "array" : e !== void 0 && e.$$typeof === z ? (f = "<" + (t(e.type) || "Unknown") + " />", c = " Did you accidentally export a JSX literal instead of a component?") : f = typeof e, console.error(
|
|
355
565
|
"React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",
|
|
356
|
-
|
|
357
|
-
|
|
566
|
+
f,
|
|
567
|
+
c
|
|
358
568
|
);
|
|
359
|
-
if (
|
|
360
|
-
|
|
361
|
-
var
|
|
362
|
-
return
|
|
569
|
+
if (le.call(r, "key")) {
|
|
570
|
+
c = t(e);
|
|
571
|
+
var b = Object.keys(r).filter(function(h) {
|
|
572
|
+
return h !== "key";
|
|
363
573
|
});
|
|
364
|
-
|
|
574
|
+
f = 0 < b.length ? "{key: someKey, " + b.join(": ..., ") + ": ...}" : "{key: someKey}", we[c + f] || (b = 0 < b.length ? "{" + b.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
365
575
|
`A props object containing a "key" prop is being spread into JSX:
|
|
366
576
|
let props = %s;
|
|
367
577
|
<%s {...props} />
|
|
368
578
|
React keys must be passed directly to JSX without using spread:
|
|
369
579
|
let props = %s;
|
|
370
580
|
<%s key={someKey} {...props} />`,
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
),
|
|
581
|
+
f,
|
|
582
|
+
c,
|
|
583
|
+
b,
|
|
584
|
+
c
|
|
585
|
+
), we[c + f] = !0);
|
|
376
586
|
}
|
|
377
|
-
if (
|
|
378
|
-
|
|
379
|
-
for (var
|
|
380
|
-
|
|
381
|
-
} else
|
|
382
|
-
return
|
|
383
|
-
|
|
587
|
+
if (c = null, a !== void 0 && (g(a), c = "" + a), n(r) && (g(r.key), c = "" + r.key), "key" in r) {
|
|
588
|
+
a = {};
|
|
589
|
+
for (var k in r)
|
|
590
|
+
k !== "key" && (a[k] = r[k]);
|
|
591
|
+
} else a = r;
|
|
592
|
+
return c && i(
|
|
593
|
+
a,
|
|
384
594
|
typeof e == "function" ? e.displayName || e.name || "Unknown" : e
|
|
385
|
-
),
|
|
595
|
+
), Se(e, c, p, T, o(), a);
|
|
386
596
|
}
|
|
387
|
-
function
|
|
388
|
-
if (typeof e == "object" && e && e.$$typeof !==
|
|
389
|
-
if (
|
|
390
|
-
for (var
|
|
391
|
-
var
|
|
392
|
-
|
|
597
|
+
function ee(e, r) {
|
|
598
|
+
if (typeof e == "object" && e && e.$$typeof !== Ne) {
|
|
599
|
+
if (H(e))
|
|
600
|
+
for (var a = 0; a < e.length; a++) {
|
|
601
|
+
var f = e[a];
|
|
602
|
+
L(f) && oe(f, r);
|
|
393
603
|
}
|
|
394
|
-
else if (
|
|
604
|
+
else if (L(e))
|
|
395
605
|
e._store && (e._store.validated = 1);
|
|
396
|
-
else if (e === null || typeof e != "object" ?
|
|
397
|
-
for (; !(e =
|
|
398
|
-
|
|
606
|
+
else if (e === null || typeof e != "object" ? a = null : (a = ie && e[ie] || e["@@iterator"], a = typeof a == "function" ? a : null), typeof a == "function" && a !== e.entries && (a = a.call(e), a !== e))
|
|
607
|
+
for (; !(e = a.next()).done; )
|
|
608
|
+
L(e.value) && oe(e.value, r);
|
|
399
609
|
}
|
|
400
610
|
}
|
|
401
|
-
function
|
|
402
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
611
|
+
function L(e) {
|
|
612
|
+
return typeof e == "object" && e !== null && e.$$typeof === z;
|
|
403
613
|
}
|
|
404
|
-
function
|
|
405
|
-
if (e._store && !e._store.validated && e.key == null && (e._store.validated = 1,
|
|
406
|
-
|
|
407
|
-
var
|
|
408
|
-
e && e._owner != null && e._owner !==
|
|
409
|
-
var
|
|
410
|
-
|
|
411
|
-
var
|
|
412
|
-
return
|
|
614
|
+
function oe(e, r) {
|
|
615
|
+
if (e._store && !e._store.validated && e.key == null && (e._store.validated = 1, r = ke(r), !Te[r])) {
|
|
616
|
+
Te[r] = !0;
|
|
617
|
+
var a = "";
|
|
618
|
+
e && e._owner != null && e._owner !== o() && (a = null, typeof e._owner.tag == "number" ? a = t(e._owner.type) : typeof e._owner.name == "string" && (a = e._owner.name), a = " It was passed a child from " + a + ".");
|
|
619
|
+
var f = y.getCurrentStack;
|
|
620
|
+
y.getCurrentStack = function() {
|
|
621
|
+
var T = l(e.type);
|
|
622
|
+
return f && (T += f() || ""), T;
|
|
413
623
|
}, console.error(
|
|
414
624
|
'Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
),
|
|
625
|
+
r,
|
|
626
|
+
a
|
|
627
|
+
), y.getCurrentStack = f;
|
|
418
628
|
}
|
|
419
629
|
}
|
|
420
|
-
function
|
|
421
|
-
var
|
|
422
|
-
return
|
|
630
|
+
function ke(e) {
|
|
631
|
+
var r = "", a = o();
|
|
632
|
+
return a && (a = t(a.type)) && (r = `
|
|
423
633
|
|
|
424
|
-
Check the render method of \`` +
|
|
634
|
+
Check the render method of \`` + a + "`."), r || (e = t(e)) && (r = `
|
|
425
635
|
|
|
426
|
-
Check the top-level render call using <` + e + ">."),
|
|
636
|
+
Check the top-level render call using <` + e + ">."), r;
|
|
427
637
|
}
|
|
428
|
-
var
|
|
429
|
-
|
|
430
|
-
var
|
|
431
|
-
|
|
432
|
-
return
|
|
433
|
-
},
|
|
434
|
-
return
|
|
638
|
+
var _e = Be, z = Symbol.for("react.transitional.element"), Ae = Symbol.for("react.portal"), Y = Symbol.for("react.fragment"), ne = Symbol.for("react.strict_mode"), te = Symbol.for("react.profiler"), re = Symbol.for("react.consumer"), ae = Symbol.for("react.context"), I = Symbol.for("react.forward_ref"), U = Symbol.for("react.suspense"), W = Symbol.for("react.suspense_list"), $ = Symbol.for("react.memo"), V = Symbol.for("react.lazy"), Oe = Symbol.for("react.offscreen"), ie = Symbol.iterator, xe = Symbol.for("react.client.reference"), y = _e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, le = Object.prototype.hasOwnProperty, R = Object.assign, je = Symbol.for("react.client.reference"), H = Array.isArray, A = 0, ue, se, ce, de, fe, ge, ve;
|
|
639
|
+
s.__reactDisabledLog = !0;
|
|
640
|
+
var F, Ee, q = !1, G = new (typeof WeakMap == "function" ? WeakMap : Map)(), Ne = Symbol.for("react.client.reference"), pe, me = {}, we = {}, Te = {};
|
|
641
|
+
j.Fragment = Y, j.jsx = function(e, r, a, f, T) {
|
|
642
|
+
return K(e, r, a, !1, f, T);
|
|
643
|
+
}, j.jsxs = function(e, r, a, f, T) {
|
|
644
|
+
return K(e, r, a, !0, f, T);
|
|
435
645
|
};
|
|
436
|
-
}()),
|
|
437
|
-
}
|
|
438
|
-
var Ee;
|
|
439
|
-
function Me() {
|
|
440
|
-
return Ee || (Ee = 1, process.env.NODE_ENV === "production" ? A.exports = pe() : A.exports = Ne()), A.exports;
|
|
646
|
+
}()), j;
|
|
441
647
|
}
|
|
442
|
-
var
|
|
443
|
-
function
|
|
444
|
-
return
|
|
648
|
+
var Ce;
|
|
649
|
+
function Je() {
|
|
650
|
+
return Ce || (Ce = 1, process.env.NODE_ENV === "production" ? M.exports = qe() : M.exports = Ge()), M.exports;
|
|
445
651
|
}
|
|
446
|
-
var
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
o.setAttribute(c, l[c]);
|
|
456
|
-
}
|
|
457
|
-
function me(o, l) {
|
|
458
|
-
o.onload = function() {
|
|
459
|
-
this.onerror = this.onload = null, l(null, o);
|
|
460
|
-
}, o.onerror = function() {
|
|
461
|
-
this.onerror = this.onload = null, l(new Error("Failed to load " + this.src), o);
|
|
462
|
-
};
|
|
463
|
-
}
|
|
464
|
-
function Ue(o, l) {
|
|
465
|
-
o.onreadystatechange = function() {
|
|
466
|
-
this.readyState != "complete" && this.readyState != "loaded" || (this.onreadystatechange = null, l(null, o));
|
|
467
|
-
};
|
|
468
|
-
}
|
|
469
|
-
const be = /* @__PURE__ */ Ye(We), J = "https://d5aoblv5p04cg.cloudfront.net/editor-3/loader/build.js", ze = "https://d5aoblv5p04cg.cloudfront.net/develop/loader/build.js", He = "https://d5aoblv5p04cg.cloudfront.net/staging/loader/build.js";
|
|
470
|
-
function Ve(o = "production") {
|
|
471
|
-
switch (o) {
|
|
472
|
-
case "dev":
|
|
473
|
-
return ze;
|
|
474
|
-
case "staging":
|
|
475
|
-
return He;
|
|
476
|
-
case "production":
|
|
477
|
-
return J;
|
|
478
|
-
default:
|
|
479
|
-
return `https://d10h8ga60f7b91.cloudfront.net/preview-app-${o}/loader/build.js`;
|
|
480
|
-
}
|
|
481
|
-
}
|
|
482
|
-
async function qe(o) {
|
|
483
|
-
return new Promise((l, c) => {
|
|
484
|
-
be(J, (r) => {
|
|
485
|
-
r !== null && c(r), window.TopolPlugin.init(o), l(!0);
|
|
486
|
-
});
|
|
487
|
-
});
|
|
488
|
-
}
|
|
489
|
-
const we = {
|
|
490
|
-
init: (o, l) => new Promise((c, r) => {
|
|
491
|
-
const i = Ve(l == null ? void 0 : l.stage);
|
|
492
|
-
be(i, async (f) => {
|
|
493
|
-
if (f !== null) {
|
|
494
|
-
if (i !== J)
|
|
495
|
-
try {
|
|
496
|
-
return await qe(o), c(!0);
|
|
497
|
-
} catch (g) {
|
|
498
|
-
r(g);
|
|
499
|
-
}
|
|
500
|
-
r(f);
|
|
501
|
-
}
|
|
502
|
-
window.TopolPlugin.init(o), c(!0);
|
|
503
|
-
});
|
|
504
|
-
}),
|
|
505
|
-
save: () => {
|
|
506
|
-
window.TopolPlugin.save();
|
|
507
|
-
},
|
|
508
|
-
load: (o) => {
|
|
509
|
-
window.TopolPlugin.load(o);
|
|
510
|
-
},
|
|
511
|
-
togglePreview: () => {
|
|
512
|
-
window.TopolPlugin.togglePreview();
|
|
513
|
-
},
|
|
514
|
-
togglePreviewSize: () => {
|
|
515
|
-
window.TopolPlugin.togglePreviewSize();
|
|
516
|
-
},
|
|
517
|
-
chooseFile: (o) => {
|
|
518
|
-
window.TopolPlugin.chooseFile(o);
|
|
519
|
-
},
|
|
520
|
-
undo: () => {
|
|
521
|
-
window.TopolPlugin.undo();
|
|
522
|
-
},
|
|
523
|
-
redo: () => {
|
|
524
|
-
window.TopolPlugin.redo();
|
|
525
|
-
},
|
|
526
|
-
destroy: () => {
|
|
527
|
-
window.TopolPlugin.destroy();
|
|
528
|
-
},
|
|
529
|
-
setSavedBlocks: (o) => {
|
|
530
|
-
window.TopolPlugin.setSavedBlocks(o);
|
|
531
|
-
},
|
|
532
|
-
setPreviewHTML: (o) => {
|
|
533
|
-
window.TopolPlugin.setPreviewHTML(o);
|
|
534
|
-
},
|
|
535
|
-
createNotification: (o) => {
|
|
536
|
-
window.TopolPlugin.createNotification(o);
|
|
537
|
-
},
|
|
538
|
-
setActiveMembers: (o) => {
|
|
539
|
-
window.TopolPlugin.setActiveMembers(o);
|
|
540
|
-
},
|
|
541
|
-
changeEmailToMobile: () => {
|
|
542
|
-
window.TopolPlugin.changeEmailToMobile();
|
|
543
|
-
},
|
|
544
|
-
changeEmailToDesktop: () => {
|
|
545
|
-
window.TopolPlugin.changeEmailToDesktop();
|
|
546
|
-
},
|
|
547
|
-
toggleBlocksAndStructuresVisibility: () => {
|
|
548
|
-
window.TopolPlugin.toggleBlocksAndStructuresVisibility();
|
|
549
|
-
},
|
|
550
|
-
updateCustomBlockContent: (o) => {
|
|
551
|
-
window.TopolPlugin.updateCustomBlockContent(o);
|
|
552
|
-
},
|
|
553
|
-
refreshComments: (o) => {
|
|
554
|
-
window.TopolPlugin.refreshComments(o);
|
|
555
|
-
},
|
|
556
|
-
refreshSyncedRows: () => {
|
|
557
|
-
window.TopolPlugin.refreshSyncedRows();
|
|
558
|
-
},
|
|
559
|
-
openPremadeTemplatesSelection: () => {
|
|
560
|
-
window.TopolPlugin.openPremadeTemplatesSelection();
|
|
561
|
-
},
|
|
562
|
-
updateApiAuthorizationHeader: (o) => {
|
|
563
|
-
window.TopolPlugin.updateApiAuthorizationHeader(o);
|
|
564
|
-
},
|
|
565
|
-
setTemplateName: (o) => {
|
|
566
|
-
window.TopolPlugin.setTemplateName(o);
|
|
567
|
-
}
|
|
568
|
-
}, Fe = "editor";
|
|
569
|
-
let q = !1, F = !1;
|
|
570
|
-
function Le(o) {
|
|
571
|
-
const l = () => {
|
|
572
|
-
const c = {
|
|
573
|
-
onSave(r, i) {
|
|
574
|
-
o.onSave !== void 0 && o.onSave(r, i);
|
|
652
|
+
var Q = Je();
|
|
653
|
+
const ye = "topol-email-editor-id";
|
|
654
|
+
function Xe(t) {
|
|
655
|
+
const d = _(!1), g = _(!1), s = _(t);
|
|
656
|
+
return s.current = t, D(() => d.current ? void 0 : (d.current = !0, (async () => {
|
|
657
|
+
const E = s.current, v = {
|
|
658
|
+
onSave(l, o) {
|
|
659
|
+
var n, i;
|
|
660
|
+
(i = (n = s.current).onSave) == null || i.call(n, l, o);
|
|
575
661
|
},
|
|
576
|
-
onSaveAndClose(
|
|
577
|
-
|
|
662
|
+
onSaveAndClose(l, o) {
|
|
663
|
+
var n, i;
|
|
664
|
+
(i = (n = s.current).onSaveAndClose) == null || i.call(n, l, o);
|
|
578
665
|
},
|
|
579
|
-
onTestSend(
|
|
580
|
-
|
|
666
|
+
onTestSend(l, o, n) {
|
|
667
|
+
var i, w;
|
|
668
|
+
(w = (i = s.current).onTestSend) == null || w.call(i, l, o, n);
|
|
581
669
|
},
|
|
582
670
|
onOpenFileManager() {
|
|
583
|
-
|
|
671
|
+
var l, o;
|
|
672
|
+
(o = (l = s.current).onOpenFileManager) == null || o.call(l);
|
|
584
673
|
},
|
|
585
674
|
onLoaded() {
|
|
586
|
-
|
|
675
|
+
var l, o;
|
|
676
|
+
(o = (l = s.current).onLoaded) == null || o.call(l);
|
|
587
677
|
},
|
|
588
|
-
onBlockSave(
|
|
589
|
-
o
|
|
678
|
+
onBlockSave(l) {
|
|
679
|
+
var o, n;
|
|
680
|
+
(n = (o = s.current).onBlockSave) == null || n.call(o, l);
|
|
590
681
|
},
|
|
591
|
-
onBlockRemove(
|
|
592
|
-
o
|
|
682
|
+
onBlockRemove(l) {
|
|
683
|
+
var o, n;
|
|
684
|
+
(n = (o = s.current).onBlockRemove) == null || n.call(o, l);
|
|
593
685
|
},
|
|
594
|
-
onBlockEdit(
|
|
595
|
-
o
|
|
686
|
+
onBlockEdit(l) {
|
|
687
|
+
var o, n;
|
|
688
|
+
(n = (o = s.current).onBlockEdit) == null || n.call(o, l);
|
|
596
689
|
},
|
|
597
690
|
onInit() {
|
|
598
|
-
|
|
691
|
+
var l, o;
|
|
692
|
+
(o = (l = s.current).onInit) == null || o.call(l), g.current = !0;
|
|
599
693
|
},
|
|
600
|
-
onUndoChange(
|
|
601
|
-
o
|
|
694
|
+
onUndoChange(l) {
|
|
695
|
+
var o, n;
|
|
696
|
+
(n = (o = s.current).onUndoChange) == null || n.call(o, l);
|
|
602
697
|
},
|
|
603
|
-
onRedoChange(
|
|
604
|
-
o
|
|
698
|
+
onRedoChange(l) {
|
|
699
|
+
var o, n;
|
|
700
|
+
(n = (o = s.current).onRedoChange) == null || n.call(o, l);
|
|
605
701
|
},
|
|
606
|
-
onPreview(
|
|
607
|
-
o
|
|
702
|
+
onPreview(l) {
|
|
703
|
+
var o, n;
|
|
704
|
+
(n = (o = s.current).onPreview) == null || n.call(o, l);
|
|
608
705
|
},
|
|
609
|
-
onAlert(
|
|
610
|
-
o
|
|
706
|
+
onAlert(l) {
|
|
707
|
+
var o, n;
|
|
708
|
+
(n = (o = s.current).onAlert) == null || n.call(o, l);
|
|
611
709
|
},
|
|
612
710
|
onClose() {
|
|
613
|
-
|
|
711
|
+
var l, o;
|
|
712
|
+
(o = (l = s.current).onClose) == null || o.call(l);
|
|
713
|
+
},
|
|
714
|
+
onBannerClick(l, o) {
|
|
715
|
+
var n, i;
|
|
716
|
+
(i = (n = s.current).onBannerClick) == null || i.call(n, l, o);
|
|
614
717
|
},
|
|
615
|
-
onEdittedWithoutSaveChanged(
|
|
616
|
-
o
|
|
718
|
+
onEdittedWithoutSaveChanged(l) {
|
|
719
|
+
var o, n;
|
|
720
|
+
(n = (o = s.current).onEdittedWithoutSaveChanged) == null || n.call(o, l);
|
|
617
721
|
},
|
|
618
|
-
onOpenCustomBlockDialog(
|
|
619
|
-
o
|
|
722
|
+
onOpenCustomBlockDialog(l) {
|
|
723
|
+
var o, n;
|
|
724
|
+
(n = (o = s.current).onOpenCustomBlockDialog) == null || n.call(o, l);
|
|
620
725
|
},
|
|
621
|
-
onTemplateRename(
|
|
622
|
-
o
|
|
726
|
+
onTemplateRename(l) {
|
|
727
|
+
var o, n;
|
|
728
|
+
(n = (o = s.current).onTemplateRename) == null || n.call(o, l);
|
|
623
729
|
},
|
|
624
|
-
updateTestingEmailAddresses(
|
|
625
|
-
o
|
|
730
|
+
updateTestingEmailAddresses(l) {
|
|
731
|
+
var o, n;
|
|
732
|
+
(n = (o = s.current).updateTestingEmailAddresses) == null || n.call(o, l);
|
|
626
733
|
},
|
|
627
|
-
onError(
|
|
628
|
-
|
|
734
|
+
onError(l, o) {
|
|
735
|
+
var n, i;
|
|
736
|
+
(i = (n = s.current).onError) == null || i.call(n, l, o);
|
|
629
737
|
}
|
|
738
|
+
}, m = {
|
|
739
|
+
id: "#" + ye,
|
|
740
|
+
...E.options,
|
|
741
|
+
callbacks: v
|
|
630
742
|
};
|
|
631
|
-
|
|
632
|
-
}
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
})
|
|
638
|
-
|
|
639
|
-
|
|
743
|
+
await X.init(m, { stage: E.stage || "production" });
|
|
744
|
+
})().catch((E) => {
|
|
745
|
+
var v, m;
|
|
746
|
+
(m = (v = s.current).onError) == null || m.call(v, "init", (E == null ? void 0 : E.message) || "Failed to initialize editor"), console.error("[@topol.io/editor-react] EmailEditor initialization failed:", E);
|
|
747
|
+
}), () => {
|
|
748
|
+
g.current && (X.destroy(), g.current = !1), d.current = !1;
|
|
749
|
+
}), []), /* @__PURE__ */ Q.jsx(
|
|
750
|
+
"div",
|
|
751
|
+
{
|
|
752
|
+
id: ye,
|
|
753
|
+
style: { position: "absolute", height: "100vh", width: "100%" }
|
|
754
|
+
}
|
|
755
|
+
);
|
|
756
|
+
}
|
|
757
|
+
const Re = "topol-landing-page-editor-id", De = Me((t, d) => {
|
|
758
|
+
const g = _(!1), s = _(null), u = _(t);
|
|
759
|
+
return u.current = t, Le(d, () => ({
|
|
760
|
+
load(E) {
|
|
761
|
+
var v;
|
|
762
|
+
(v = s.current) == null || v.load(E);
|
|
763
|
+
}
|
|
764
|
+
})), D(() => g.current ? void 0 : (g.current = !0, (async () => {
|
|
765
|
+
const v = u.current, m = {
|
|
766
|
+
onSave(o, n) {
|
|
767
|
+
var i, w;
|
|
768
|
+
(w = (i = u.current).onSave) == null || w.call(i, o, n);
|
|
769
|
+
},
|
|
770
|
+
onSaveAndClose(o, n) {
|
|
771
|
+
var i, w;
|
|
772
|
+
(w = (i = u.current).onSaveAndClose) == null || w.call(i, o, n);
|
|
773
|
+
},
|
|
774
|
+
onOpenFileManager() {
|
|
775
|
+
var o, n;
|
|
776
|
+
(n = (o = u.current).onOpenFileManager) == null || n.call(o);
|
|
777
|
+
},
|
|
778
|
+
onLoaded() {
|
|
779
|
+
var o, n;
|
|
780
|
+
(n = (o = u.current).onLoaded) == null || n.call(o);
|
|
781
|
+
},
|
|
782
|
+
onBlockSave(o) {
|
|
783
|
+
var n, i;
|
|
784
|
+
(i = (n = u.current).onBlockSave) == null || i.call(n, o);
|
|
785
|
+
},
|
|
786
|
+
onBlockRemove(o) {
|
|
787
|
+
var n, i;
|
|
788
|
+
(i = (n = u.current).onBlockRemove) == null || i.call(n, o);
|
|
789
|
+
},
|
|
790
|
+
onBlockEdit(o) {
|
|
791
|
+
var n, i;
|
|
792
|
+
(i = (n = u.current).onBlockEdit) == null || i.call(n, o);
|
|
793
|
+
},
|
|
794
|
+
onInit() {
|
|
795
|
+
var o, n;
|
|
796
|
+
(n = (o = u.current).onInit) == null || n.call(o);
|
|
797
|
+
},
|
|
798
|
+
onClose() {
|
|
799
|
+
var o, n;
|
|
800
|
+
(n = (o = u.current).onClose) == null || n.call(o);
|
|
801
|
+
},
|
|
802
|
+
onUndoChange(o) {
|
|
803
|
+
var n, i;
|
|
804
|
+
(i = (n = u.current).onUndoChange) == null || i.call(n, o);
|
|
805
|
+
},
|
|
806
|
+
onRedoChange(o) {
|
|
807
|
+
var n, i;
|
|
808
|
+
(i = (n = u.current).onRedoChange) == null || i.call(n, o);
|
|
809
|
+
},
|
|
810
|
+
onPreview(o) {
|
|
811
|
+
var n, i;
|
|
812
|
+
(i = (n = u.current).onPreview) == null || i.call(n, o);
|
|
813
|
+
},
|
|
814
|
+
onAlert(o) {
|
|
815
|
+
var n, i;
|
|
816
|
+
(i = (n = u.current).onAlert) == null || i.call(n, o);
|
|
817
|
+
},
|
|
818
|
+
onBannerClick(o, n) {
|
|
819
|
+
var i, w;
|
|
820
|
+
(w = (i = u.current).onBannerClick) == null || w.call(i, o, n);
|
|
821
|
+
},
|
|
822
|
+
onEdittedWithoutSaveChanged(o) {
|
|
823
|
+
var n, i;
|
|
824
|
+
(i = (n = u.current).onEdittedWithoutSaveChanged) == null || i.call(n, o);
|
|
825
|
+
},
|
|
826
|
+
onOpenCustomBlockDialog(o) {
|
|
827
|
+
var n, i;
|
|
828
|
+
(i = (n = u.current).onOpenCustomBlockDialog) == null || i.call(n, o);
|
|
829
|
+
},
|
|
830
|
+
onTemplateRename(o) {
|
|
831
|
+
var n, i;
|
|
832
|
+
(i = (n = u.current).onTemplateRename) == null || i.call(n, o);
|
|
833
|
+
},
|
|
834
|
+
onError(o, n) {
|
|
835
|
+
var i, w;
|
|
836
|
+
(w = (i = u.current).onError) == null || w.call(i, o, n);
|
|
837
|
+
}
|
|
838
|
+
}, l = await Fe.init({ config: v.options, ...m }, { stage: v.stage || "production" });
|
|
839
|
+
s.current = l, l.render("#" + Re);
|
|
840
|
+
})().catch((v) => {
|
|
841
|
+
var m, l;
|
|
842
|
+
(l = (m = u.current).onError) == null || l.call(m, "init", (v == null ? void 0 : v.message) || "Failed to initialize editor"), console.error("[@topol.io/editor-react] LandingPageEditor initialization failed:", v);
|
|
843
|
+
}), () => {
|
|
844
|
+
var v;
|
|
845
|
+
(v = s.current) == null || v.destroy(), s.current = null, g.current = !1;
|
|
846
|
+
}), []), /* @__PURE__ */ Q.jsx(
|
|
640
847
|
"div",
|
|
641
848
|
{
|
|
642
|
-
id:
|
|
849
|
+
id: Re,
|
|
643
850
|
style: { position: "absolute", height: "100vh", width: "100%" }
|
|
644
851
|
}
|
|
645
852
|
);
|
|
853
|
+
});
|
|
854
|
+
De.displayName = "LandingPageEditor";
|
|
855
|
+
function Ke(t) {
|
|
856
|
+
return D(() => {
|
|
857
|
+
console.warn("[@topol.io/editor-react] TopolEditor is deprecated and will be removed in a future version. Please use EmailEditor instead.");
|
|
858
|
+
}, []), /* @__PURE__ */ Q.jsx(Xe, { ...t });
|
|
646
859
|
}
|
|
647
860
|
export {
|
|
648
|
-
|
|
649
|
-
|
|
861
|
+
X as CoreEmailEditor,
|
|
862
|
+
Fe as CoreLandingPageEditor,
|
|
863
|
+
Xe as EmailEditor,
|
|
864
|
+
De as LandingPageEditor,
|
|
865
|
+
Ke as TopolEditor,
|
|
866
|
+
Qe as TopolPlugin
|
|
650
867
|
};
|