@chili-publish/studio-sdk 1.26.0 → 1.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/_bundles/main.es.js +789 -777
  2. package/_bundles/main.es.js.map +1 -1
  3. package/_bundles/main.js +3 -4
  4. package/_bundles/main.js.map +1 -1
  5. package/lib/editor-engine.json +1 -1
  6. package/lib/package.json +1 -1
  7. package/lib/src/controllers/BrandKitController.d.ts +48 -2
  8. package/lib/src/controllers/BrandKitController.js +148 -66
  9. package/lib/src/controllers/BrandKitController.js.map +1 -1
  10. package/lib/src/controllers/PageController.d.ts +4 -4
  11. package/lib/src/controllers/PageController.js +2 -2
  12. package/lib/src/controllers/PageController.js.map +1 -1
  13. package/lib/src/controllers/SubscriberController.d.ts +8 -2
  14. package/lib/src/controllers/SubscriberController.js +11 -3
  15. package/lib/src/controllers/SubscriberController.js.map +1 -1
  16. package/lib/src/controllers/UndoManagerController.d.ts +7 -1
  17. package/lib/src/controllers/UndoManagerController.js +11 -3
  18. package/lib/src/controllers/UndoManagerController.js.map +1 -1
  19. package/lib/src/index.d.ts +1 -1
  20. package/lib/src/index.js.map +1 -1
  21. package/lib/src/interactions/Connector.d.ts +5 -1
  22. package/lib/src/interactions/Connector.js +2 -2
  23. package/lib/src/interactions/Connector.js.map +1 -1
  24. package/lib/src/next/controllers/SubscriberController.d.ts +5 -0
  25. package/lib/src/next/controllers/SubscriberController.js +7 -0
  26. package/lib/src/next/controllers/SubscriberController.js.map +1 -1
  27. package/lib/src/next/tests/controllers/SubscriberContoller.test.js +1 -0
  28. package/lib/src/next/tests/controllers/SubscriberContoller.test.js.map +1 -1
  29. package/lib/src/sdk.js +1 -0
  30. package/lib/src/sdk.js.map +1 -1
  31. package/lib/src/tests/__mocks__/Brandkit.js +15 -0
  32. package/lib/src/tests/__mocks__/Brandkit.js.map +1 -1
  33. package/lib/src/tests/controllers/BrandKitController.test.js +64 -1
  34. package/lib/src/tests/controllers/BrandKitController.test.js.map +1 -1
  35. package/lib/src/tests/controllers/SubscriberContoller.test.js +9 -3
  36. package/lib/src/tests/controllers/SubscriberContoller.test.js.map +1 -1
  37. package/lib/src/tests/controllers/UndoManagerController.test.js +2 -2
  38. package/lib/src/tests/controllers/UndoManagerController.test.js.map +1 -1
  39. package/lib/src/types/BrandKitTypes.d.ts +10 -3
  40. package/lib/src/types/CommonTypes.d.ts +8 -2
  41. package/lib/src/types/CommonTypes.js.map +1 -1
  42. package/lib/src/types/FrameTypes.d.ts +8 -3
  43. package/lib/src/types/FrameTypes.js +1 -0
  44. package/lib/src/types/FrameTypes.js.map +1 -1
  45. package/lib/src/utils/ConfigHelper.js +1 -0
  46. package/lib/src/utils/ConfigHelper.js.map +1 -1
  47. package/package.json +1 -1
@@ -1,39 +1,39 @@
1
1
  var Ie = (s) => {
2
2
  throw TypeError(s);
3
3
  };
4
- var ve = (s, a, t) => a.has(s) || Ie("Cannot " + t);
5
- var i = (s, a, t) => (ve(s, a, "read from private field"), t ? t.call(s) : a.get(s)), u = (s, a, t) => a.has(s) ? Ie("Cannot add the same private member more than once") : a instanceof WeakSet ? a.add(s) : a.set(s, t), g = (s, a, t, e) => (ve(s, a, "write to private field"), e ? e.call(s, t) : a.set(s, t), t);
6
- const bs = "2.9.latest", cs = {
4
+ var ve = (s, i, t) => i.has(s) || Ie("Cannot " + t);
5
+ var a = (s, i, t) => (ve(s, i, "read from private field"), t ? t.call(s) : i.get(s)), u = (s, i, t) => i.has(s) ? Ie("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(s) : i.set(s, t), g = (s, i, t, e) => (ve(s, i, "write to private field"), e ? e.call(s, t) : i.set(s, t), t);
6
+ const bs = "2.10.latest", cs = {
7
7
  current: bs
8
- }, Is = "1.26.0", hs = {
8
+ }, Is = "1.27.0", hs = {
9
9
  version: Is
10
10
  };
11
- var H;
11
+ var _;
12
12
  (function(s) {
13
13
  s.Call = "call", s.Reply = "reply", s.Syn = "syn", s.SynAck = "synAck", s.Ack = "ack";
14
- })(H || (H = {}));
15
- var it;
14
+ })(_ || (_ = {}));
15
+ var ct;
16
16
  (function(s) {
17
17
  s.Fulfilled = "fulfilled", s.Rejected = "rejected";
18
- })(it || (it = {}));
19
- var Rt;
18
+ })(ct || (ct = {}));
19
+ var xt;
20
20
  (function(s) {
21
21
  s.ConnectionDestroyed = "ConnectionDestroyed", s.ConnectionTimeout = "ConnectionTimeout", s.NoIframeSrc = "NoIframeSrc";
22
- })(Rt || (Rt = {}));
22
+ })(xt || (xt = {}));
23
23
  var Yt;
24
24
  (function(s) {
25
25
  s.DataCloneError = "DataCloneError";
26
26
  })(Yt || (Yt = {}));
27
- var at;
27
+ var ot;
28
28
  (function(s) {
29
29
  s.Message = "message";
30
- })(at || (at = {}));
31
- const vs = (s, a) => {
30
+ })(ot || (ot = {}));
31
+ const vs = (s, i) => {
32
32
  const t = [];
33
33
  let e = !1;
34
34
  return {
35
35
  destroy(r) {
36
- e || (e = !0, a(`${s}: Destroying connection`), t.forEach((n) => {
36
+ e || (e = !0, i(`${s}: Destroying connection`), t.forEach((n) => {
37
37
  n(r);
38
38
  }));
39
39
  },
@@ -41,220 +41,220 @@ const vs = (s, a) => {
41
41
  e ? r() : t.push(r);
42
42
  }
43
43
  };
44
- }, Ps = (s) => (...a) => {
45
- s && console.log("[Penpal]", ...a);
44
+ }, Ps = (s) => (...i) => {
45
+ s && console.log("[Penpal]", ...i);
46
46
  }, As = {
47
47
  "http:": "80",
48
48
  "https:": "443"
49
- }, Fs = /^(https?:)?\/\/([^/:]+)?(:(\d+))?/, Es = ["file:", "data:"], Ls = (s) => {
50
- if (s && Es.find((l) => s.startsWith(l)))
49
+ }, Fs = /^(https?:)?\/\/([^/:]+)?(:(\d+))?/, Es = ["file:", "data:"], Ds = (s) => {
50
+ if (s && Es.find((h) => s.startsWith(h)))
51
51
  return "null";
52
- const a = document.location, t = Fs.exec(s);
52
+ const i = document.location, t = Fs.exec(s);
53
53
  let e, r, n;
54
- t ? (e = t[1] ? t[1] : a.protocol, r = t[2], n = t[4]) : (e = a.protocol, r = a.hostname, n = a.port);
54
+ t ? (e = t[1] ? t[1] : i.protocol, r = t[2], n = t[4]) : (e = i.protocol, r = i.hostname, n = i.port);
55
55
  const c = n && n !== As[e] ? `:${n}` : "";
56
56
  return `${e}//${r}${c}`;
57
- }, Pe = ({ name: s, message: a, stack: t }) => ({
57
+ }, Pe = ({ name: s, message: i, stack: t }) => ({
58
58
  name: s,
59
- message: a,
59
+ message: i,
60
60
  stack: t
61
- }), Ds = (s) => {
62
- const a = new Error();
63
- return Object.keys(s).forEach((t) => a[t] = s[t]), a;
64
- }, Os = (s, a, t) => {
65
- const { localName: e, local: r, remote: n, originForSending: c, originForReceiving: l } = s;
66
- let h = !1;
61
+ }), Ls = (s) => {
62
+ const i = new Error();
63
+ return Object.keys(s).forEach((t) => i[t] = s[t]), i;
64
+ }, Os = (s, i, t) => {
65
+ const { localName: e, local: r, remote: n, originForSending: c, originForReceiving: h } = s;
66
+ let l = !1;
67
67
  const y = (p) => {
68
- if (p.source !== n || p.data.penpal !== H.Call)
68
+ if (p.source !== n || p.data.penpal !== _.Call)
69
69
  return;
70
- if (p.origin !== l) {
71
- t(`${e} received message from origin ${p.origin} which did not match expected origin ${l}`);
70
+ if (p.origin !== h) {
71
+ t(`${e} received message from origin ${p.origin} which did not match expected origin ${h}`);
72
72
  return;
73
73
  }
74
- const m = p.data, { methodName: S, args: b, id: v } = m;
75
- t(`${e}: Received ${S}() call`);
76
- const J = (A) => (k) => {
77
- if (t(`${e}: Sending ${S}() reply`), h) {
78
- t(`${e}: Unable to send ${S}() reply due to destroyed connection`);
74
+ const f = p.data, { methodName: I, args: S, id: b } = f;
75
+ t(`${e}: Received ${I}() call`);
76
+ const L = (P) => (N) => {
77
+ if (t(`${e}: Sending ${I}() reply`), l) {
78
+ t(`${e}: Unable to send ${I}() reply due to destroyed connection`);
79
79
  return;
80
80
  }
81
- const D = {
82
- penpal: H.Reply,
83
- id: v,
84
- resolution: A,
85
- returnValue: k
81
+ const M = {
82
+ penpal: _.Reply,
83
+ id: b,
84
+ resolution: P,
85
+ returnValue: N
86
86
  };
87
- A === it.Rejected && k instanceof Error && (D.returnValue = Pe(k), D.returnValueIsError = !0);
87
+ P === ct.Rejected && N instanceof Error && (M.returnValue = Pe(N), M.returnValueIsError = !0);
88
88
  try {
89
- n.postMessage(D, c);
90
- } catch (I) {
91
- if (I.name === Yt.DataCloneError) {
92
- const _ = {
93
- penpal: H.Reply,
94
- id: v,
95
- resolution: it.Rejected,
96
- returnValue: Pe(I),
89
+ n.postMessage(M, c);
90
+ } catch (v) {
91
+ if (v.name === Yt.DataCloneError) {
92
+ const $ = {
93
+ penpal: _.Reply,
94
+ id: b,
95
+ resolution: ct.Rejected,
96
+ returnValue: Pe(v),
97
97
  returnValueIsError: !0
98
98
  };
99
- n.postMessage(_, c);
99
+ n.postMessage($, c);
100
100
  }
101
- throw I;
101
+ throw v;
102
102
  }
103
103
  };
104
- new Promise((A) => A(a[S].apply(a, b))).then(J(it.Fulfilled), J(it.Rejected));
104
+ new Promise((P) => P(i[I].apply(i, S))).then(L(ct.Fulfilled), L(ct.Rejected));
105
105
  };
106
- return r.addEventListener(at.Message, y), () => {
107
- h = !0, r.removeEventListener(at.Message, y);
106
+ return r.addEventListener(ot.Message, y), () => {
107
+ l = !0, r.removeEventListener(ot.Message, y);
108
108
  };
109
109
  };
110
110
  let Ns = 0;
111
- const xs = () => ++Ns, ls = ".", ds = (s) => s ? s.split(ls) : [], Rs = (s) => s.join(ls), Ms = (s, a) => {
112
- const t = ds(a || "");
113
- return t.push(s), Rs(t);
114
- }, Vs = (s, a, t) => {
115
- const e = ds(a);
111
+ const Ms = () => ++Ns, ls = ".", ds = (s) => s ? s.split(ls) : [], xs = (s) => s.join(ls), Rs = (s, i) => {
112
+ const t = ds(i || "");
113
+ return t.push(s), xs(t);
114
+ }, Vs = (s, i, t) => {
115
+ const e = ds(i);
116
116
  return e.reduce((r, n, c) => (typeof r[n] > "u" && (r[n] = {}), c === e.length - 1 && (r[n] = t), r[n]), s), s;
117
- }, us = (s, a) => {
117
+ }, us = (s, i) => {
118
118
  const t = {};
119
119
  return Object.keys(s).forEach((e) => {
120
- const r = s[e], n = Ms(e, a);
120
+ const r = s[e], n = Rs(e, i);
121
121
  typeof r == "object" && Object.assign(t, us(r, n)), typeof r == "function" && (t[n] = r);
122
122
  }), t;
123
- }, Js = (s) => {
124
- const a = {};
123
+ }, Bs = (s) => {
124
+ const i = {};
125
125
  for (const t in s)
126
- Vs(a, t, s[t]);
127
- return a;
128
- }, Bs = (s, a, t, e, r) => {
129
- const { localName: n, local: c, remote: l, originForSending: h, originForReceiving: y } = a;
126
+ Vs(i, t, s[t]);
127
+ return i;
128
+ }, Js = (s, i, t, e, r) => {
129
+ const { localName: n, local: c, remote: h, originForSending: l, originForReceiving: y } = i;
130
130
  let p = !1;
131
131
  r(`${n}: Connecting call sender`);
132
- const m = (b) => (...v) => {
133
- r(`${n}: Sending ${b}() call`);
134
- let J;
132
+ const f = (S) => (...b) => {
133
+ r(`${n}: Sending ${S}() call`);
134
+ let L;
135
135
  try {
136
- l.closed && (J = !0);
136
+ h.closed && (L = !0);
137
137
  } catch {
138
- J = !0;
138
+ L = !0;
139
139
  }
140
- if (J && e(), p) {
141
- const A = new Error(`Unable to send ${b}() call due to destroyed connection`);
142
- throw A.code = Rt.ConnectionDestroyed, A;
140
+ if (L && e(), p) {
141
+ const P = new Error(`Unable to send ${S}() call due to destroyed connection`);
142
+ throw P.code = xt.ConnectionDestroyed, P;
143
143
  }
144
- return new Promise((A, k) => {
145
- const D = xs(), I = ($) => {
146
- if ($.source !== l || $.data.penpal !== H.Reply || $.data.id !== D)
144
+ return new Promise((P, N) => {
145
+ const M = Ms(), v = (K) => {
146
+ if (K.source !== h || K.data.penpal !== _.Reply || K.data.id !== M)
147
147
  return;
148
- if ($.origin !== y) {
149
- r(`${n} received message from origin ${$.origin} which did not match expected origin ${y}`);
148
+ if (K.origin !== y) {
149
+ r(`${n} received message from origin ${K.origin} which did not match expected origin ${y}`);
150
150
  return;
151
151
  }
152
- const Ct = $.data;
153
- r(`${n}: Received ${b}() reply`), c.removeEventListener(at.Message, I);
154
- let mt = Ct.returnValue;
155
- Ct.returnValueIsError && (mt = Ds(mt)), (Ct.resolution === it.Fulfilled ? A : k)(mt);
152
+ const mt = K.data;
153
+ r(`${n}: Received ${S}() reply`), c.removeEventListener(ot.Message, v);
154
+ let wt = mt.returnValue;
155
+ mt.returnValueIsError && (wt = Ls(wt)), (mt.resolution === ct.Fulfilled ? P : N)(wt);
156
156
  };
157
- c.addEventListener(at.Message, I);
158
- const _ = {
159
- penpal: H.Call,
160
- id: D,
161
- methodName: b,
162
- args: v
157
+ c.addEventListener(ot.Message, v);
158
+ const $ = {
159
+ penpal: _.Call,
160
+ id: M,
161
+ methodName: S,
162
+ args: b
163
163
  };
164
- l.postMessage(_, h);
164
+ h.postMessage($, l);
165
165
  });
166
- }, S = t.reduce((b, v) => (b[v] = m(v), b), {});
167
- return Object.assign(s, Js(S)), () => {
166
+ }, I = t.reduce((S, b) => (S[b] = f(b), S), {});
167
+ return Object.assign(s, Bs(I)), () => {
168
168
  p = !0;
169
169
  };
170
- }, Us = (s, a, t, e, r) => {
170
+ }, Us = (s, i, t, e, r) => {
171
171
  const { destroy: n, onDestroy: c } = e;
172
- let l, h;
172
+ let h, l;
173
173
  const y = {};
174
174
  return (p) => {
175
- if (p.origin !== a) {
176
- r(`Parent: Handshake - Received ACK message from origin ${p.origin} which did not match expected origin ${a}`);
175
+ if (p.origin !== i) {
176
+ r(`Parent: Handshake - Received ACK message from origin ${p.origin} which did not match expected origin ${i}`);
177
177
  return;
178
178
  }
179
179
  r("Parent: Handshake - Received ACK");
180
- const m = {
180
+ const f = {
181
181
  localName: "Parent",
182
182
  local: window,
183
183
  remote: p.source,
184
184
  originForSending: t,
185
- originForReceiving: a
185
+ originForReceiving: i
186
186
  };
187
- l && l(), l = Os(m, s, r), c(l), h && h.forEach((b) => {
188
- delete y[b];
189
- }), h = p.data.methodNames;
190
- const S = Bs(y, m, h, n, r);
191
- return c(S), y;
187
+ h && h(), h = Os(f, s, r), c(h), l && l.forEach((S) => {
188
+ delete y[S];
189
+ }), l = p.data.methodNames;
190
+ const I = Js(y, f, l, n, r);
191
+ return c(I), y;
192
192
  };
193
- }, ks = (s, a, t, e) => (r) => {
193
+ }, ks = (s, i, t, e) => (r) => {
194
194
  if (r.origin !== t) {
195
195
  s(`Parent: Handshake - Received SYN message from origin ${r.origin} which did not match expected origin ${t}`);
196
196
  return;
197
197
  }
198
198
  s("Parent: Handshake - Received SYN, responding with SYN-ACK");
199
199
  const n = {
200
- penpal: H.SynAck,
201
- methodNames: Object.keys(a)
200
+ penpal: _.SynAck,
201
+ methodNames: Object.keys(i)
202
202
  };
203
203
  r.source.postMessage(n, e);
204
- }, Ts = 6e4, Gs = (s, a) => {
205
- const { destroy: t, onDestroy: e } = a, r = setInterval(() => {
204
+ }, Ts = 6e4, Gs = (s, i) => {
205
+ const { destroy: t, onDestroy: e } = i, r = setInterval(() => {
206
206
  s.isConnected || (clearInterval(r), t());
207
207
  }, Ts);
208
208
  e(() => {
209
209
  clearInterval(r);
210
210
  });
211
- }, Hs = (s, a) => {
211
+ }, Hs = (s, i) => {
212
212
  let t;
213
213
  return s !== void 0 && (t = window.setTimeout(() => {
214
214
  const e = new Error(`Connection timed out after ${s}ms`);
215
- e.code = Rt.ConnectionTimeout, a(e);
215
+ e.code = xt.ConnectionTimeout, i(e);
216
216
  }, s)), () => {
217
217
  clearTimeout(t);
218
218
  };
219
219
  }, _s = (s) => {
220
220
  if (!s.src && !s.srcdoc) {
221
- const a = new Error("Iframe must have src or srcdoc property defined.");
222
- throw a.code = Rt.NoIframeSrc, a;
221
+ const i = new Error("Iframe must have src or srcdoc property defined.");
222
+ throw i.code = xt.NoIframeSrc, i;
223
223
  }
224
224
  }, $s = (s) => {
225
- let { iframe: a, methods: t = {}, childOrigin: e, timeout: r, debug: n = !1 } = s;
226
- const c = Ps(n), l = vs("Parent", c), { onDestroy: h, destroy: y } = l;
227
- e || (_s(a), e = Ls(a.src));
228
- const p = e === "null" ? "*" : e, m = us(t), S = ks(c, m, e, p), b = Us(m, e, p, l, c);
225
+ let { iframe: i, methods: t = {}, childOrigin: e, timeout: r, debug: n = !1 } = s;
226
+ const c = Ps(n), h = vs("Parent", c), { onDestroy: l, destroy: y } = h;
227
+ e || (_s(i), e = Ds(i.src));
228
+ const p = e === "null" ? "*" : e, f = us(t), I = ks(c, f, e, p), S = Us(f, e, p, h, c);
229
229
  return {
230
- promise: new Promise((J, A) => {
231
- const k = Hs(r, y), D = (I) => {
232
- if (!(I.source !== a.contentWindow || !I.data)) {
233
- if (I.data.penpal === H.Syn) {
234
- S(I);
230
+ promise: new Promise((L, P) => {
231
+ const N = Hs(r, y), M = (v) => {
232
+ if (!(v.source !== i.contentWindow || !v.data)) {
233
+ if (v.data.penpal === _.Syn) {
234
+ I(v);
235
235
  return;
236
236
  }
237
- if (I.data.penpal === H.Ack) {
238
- const _ = b(I);
239
- _ && (k(), J(_));
237
+ if (v.data.penpal === _.Ack) {
238
+ const $ = S(v);
239
+ $ && (N(), L($));
240
240
  return;
241
241
  }
242
242
  }
243
243
  };
244
- window.addEventListener(at.Message, D), c("Parent: Awaiting handshake"), Gs(a, l), h((I) => {
245
- window.removeEventListener(at.Message, D), I && A(I);
244
+ window.addEventListener(ot.Message, M), c("Parent: Awaiting handshake"), Gs(i, h), l((v) => {
245
+ window.removeEventListener(ot.Message, M), v && P(v);
246
246
  });
247
247
  }),
248
248
  destroy() {
249
249
  y();
250
250
  }
251
251
  };
252
- }, zs = (s) => {
253
- const a = new RegExp(/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w.-]+)+[\w]+\/$/);
252
+ }, Ks = (s) => {
253
+ const i = new RegExp(/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w.-]+)+[\w]+\/$/);
254
254
  let t = "";
255
- return a.test(s) ? t = s : s.indexOf("/index.html") > -1 ? t = s.replace("/index.html", "/") : s.charAt(-1) !== "/" && (t = `${s}/`), t;
256
- }, Ks = (s, a, t) => {
257
- const e = zs(a), n = `<html>
255
+ return i.test(s) ? t = s : s.indexOf("/index.html") > -1 ? t = s.replace("/index.html", "/") : s.charAt(-1) !== "/" && (t = `${s}/`), t;
256
+ }, zs = (s, i, t) => {
257
+ const e = Ks(i), n = `<html>
258
258
  <head>
259
259
  <base href="/" />
260
260
  <meta charset="UTF-8"/>
@@ -265,26 +265,25 @@ const xs = () => ++Ns, ls = ".", ds = (s) => s ? s.split(ls) : [], Rs = (s) => s
265
265
  <script>
266
266
  <\/script>
267
267
  <script src="${e}init.js" async><\/script>
268
- <script src="${e}init_engine.js"><\/script>
268
+ <script src="${e}flutter_bootstrap.js"><\/script>
269
269
  <script>
270
270
  initializeStudioEngine({
271
271
  assetBase: '${e}',
272
- entryPointUrl: '${e}main.dart.js',
273
272
  });
274
273
  <\/script>
275
274
  </body>
276
275
  </html>
277
276
  `;
278
277
  s.srcdoc = n;
279
- }, Ws = (s, a, t, e = "chili-editor", r) => {
278
+ }, Ws = (s, i, t, e = "chili-editor", r) => {
280
279
  const n = `#${e}`, c = document.createElement("iframe");
281
280
  c.setAttribute("srcdoc", " "), c.setAttribute("title", "Chili-Editor"), c.setAttribute("style", "width: 100%; height: 100%;"), c.setAttribute("frameBorder", "0"), c.setAttribute("referrerpolicy", "origin");
282
- const l = () => {
283
- const h = document.querySelector(n);
284
- h && (h == null || h.appendChild(c), Ks(c, s, r));
281
+ const h = () => {
282
+ const l = document.querySelector(n);
283
+ l && (l == null || l.appendChild(c), zs(c, s, r));
285
284
  };
286
- document.readyState === "complete" || document.readyState === "interactive" ? l() : document.addEventListener("DOMContentLoaded", () => {
287
- l();
285
+ document.readyState === "complete" || document.readyState === "interactive" ? h() : document.addEventListener("DOMContentLoaded", () => {
286
+ h();
288
287
  }), t(
289
288
  $s({
290
289
  // The iframe to which a connection should be made
@@ -292,52 +291,53 @@ const xs = () => ++Ns, ls = ".", ds = (s) => s ? s.split(ls) : [], Rs = (s) => s
292
291
  // All the methods that we want to expose to the child should be inside the methods object
293
292
  // f.e. stateChange(documentJson)
294
293
  methods: {
295
- actionsChanged: a.onActionsChanged,
296
- stateChanged: a.onStateChanged,
297
- documentLoaded: a.onDocumentLoaded,
298
- authExpired: a.onAuthExpired,
299
- viewportRequested: a.onViewportRequested,
300
- selectedFramesContent: a.onSelectedFramesContentChanged,
301
- selectedFramesLayout: a.onSelectedFramesLayoutChanged,
302
- allFramesLayout: a.onFramesLayoutChanged,
303
- selectedLayoutProperties: a.onSelectedLayoutPropertiesChanged,
304
- openLayoutPropertiesPanel: a.onPageSelectionChanged,
305
- selectedLayoutUnit: a.onSelectedLayoutUnitChanged,
306
- scrubberPositionChanged: a.onScrubberPositionChanged,
307
- frameAnimationsChanged: a.onFrameAnimationsChanged,
308
- selectedToolChanged: a.onSelectedToolChanged,
309
- variableListChanged: a.onVariableListChanged,
310
- undoStackStateChanged: a.onUndoStateChanged,
311
- selectedLayoutFramesChanged: a.onSelectedLayoutFramesChanged,
312
- selectedTextStyleChanged: a.onSelectedTextStyleChanged,
313
- colorsChanged: a.onColorsChanged,
314
- paragraphStylesChanged: a.onParagraphStylesChanged,
315
- characterStylesChanged: a.onCharacterStylesChanged,
316
- fontFamiliesChanged: a.onFontFamiliesChanged,
317
- selectedLayoutId: a.onSelectedLayoutIdChanged,
318
- layoutListChanged: a.onLayoutsChanged,
319
- connectorEvent: a.onConnectorEvent,
320
- connectorsChanged: a.onConnectorsChanged,
321
- zoomChanged: a.onZoomChanged,
322
- pageSnapshotInvalidated: a.onPageSnapshotInvalidated,
323
- pagesChanged: a.onPagesChanged,
324
- pageSizeChanged: a.onPageSizeChanged,
325
- shapeCornerRadiusChanged: a.onShapeCornerRadiusChanged,
326
- cropActiveFrameIdChanged: a.onCropActiveFrameIdChanged,
327
- asyncError: a.onAsyncError,
328
- viewModeChanged: a.onViewModeChanged,
329
- barcodeValidationChanged: a.onBarcodeValidationChanged,
330
- selectedPageIdChanged: a.onSelectedPageIdChanged,
331
- dataSourceIdChanged: a.onDataSourceIdChanged,
332
- documentIssueListChanged: a.onDocumentIssueListChanged,
333
- customUndoDataChanged: a.onCustomUndoDataChanged,
334
- engineEditingModeChanged: a.onEngineEditModeChanged
294
+ actionsChanged: i.onActionsChanged,
295
+ stateChanged: i.onStateChanged,
296
+ documentLoaded: i.onDocumentLoaded,
297
+ authExpired: i.onAuthExpired,
298
+ viewportRequested: i.onViewportRequested,
299
+ selectedFramesContent: i.onSelectedFramesContentChanged,
300
+ selectedFramesLayout: i.onSelectedFramesLayoutChanged,
301
+ allFramesLayout: i.onFramesLayoutChanged,
302
+ selectedLayoutProperties: i.onSelectedLayoutPropertiesChanged,
303
+ openLayoutPropertiesPanel: i.onPageSelectionChanged,
304
+ selectedLayoutUnit: i.onSelectedLayoutUnitChanged,
305
+ scrubberPositionChanged: i.onScrubberPositionChanged,
306
+ frameAnimationsChanged: i.onFrameAnimationsChanged,
307
+ selectedToolChanged: i.onSelectedToolChanged,
308
+ variableListChanged: i.onVariableListChanged,
309
+ undoStackStateChanged: i.onUndoStateChanged,
310
+ selectedLayoutFramesChanged: i.onSelectedLayoutFramesChanged,
311
+ selectedTextStyleChanged: i.onSelectedTextStyleChanged,
312
+ colorsChanged: i.onColorsChanged,
313
+ paragraphStylesChanged: i.onParagraphStylesChanged,
314
+ characterStylesChanged: i.onCharacterStylesChanged,
315
+ fontFamiliesChanged: i.onFontFamiliesChanged,
316
+ selectedLayoutId: i.onSelectedLayoutIdChanged,
317
+ layoutListChanged: i.onLayoutsChanged,
318
+ connectorEvent: i.onConnectorEvent,
319
+ connectorsChanged: i.onConnectorsChanged,
320
+ zoomChanged: i.onZoomChanged,
321
+ pageSnapshotInvalidated: i.onPageSnapshotInvalidated,
322
+ pagesChanged: i.onPagesChanged,
323
+ pageSizeChanged: i.onPageSizeChanged,
324
+ shapeCornerRadiusChanged: i.onShapeCornerRadiusChanged,
325
+ cropActiveFrameIdChanged: i.onCropActiveFrameIdChanged,
326
+ asyncError: i.onAsyncError,
327
+ viewModeChanged: i.onViewModeChanged,
328
+ barcodeValidationChanged: i.onBarcodeValidationChanged,
329
+ selectedPageIdChanged: i.onSelectedPageIdChanged,
330
+ dataSourceIdChanged: i.onDataSourceIdChanged,
331
+ documentIssueListChanged: i.onDocumentIssueListChanged,
332
+ customUndoDataChanged: i.onCustomUndoDataChanged,
333
+ engineEditingModeChanged: i.onEngineEditModeChanged,
334
+ brandKitMediaChanged: i.onBrandKitMediaChanged
335
335
  }
336
336
  })
337
337
  );
338
338
  };
339
- var Y = /* @__PURE__ */ ((s) => (s.GraFxStudioEnvironmentApiUrl = "ENVIRONMENT_API", s.GraFxStudioSdkVersion = "SDK_VERSION", s.GraFxStudioDocumentType = "DOCUMENT_TYPE", s.GraFxStudioTemplateId = "TEMPLATE_ID", s.GraFxStudioAuthToken = "GRAFX_AUTH_TOKEN", s.QueryCallCacheEnabled = "ENABLE_QUERY_CALL_CACHE", s))(Y || {});
340
- const js = {
339
+ var Z = /* @__PURE__ */ ((s) => (s.GraFxStudioEnvironmentApiUrl = "ENVIRONMENT_API", s.GraFxStudioSdkVersion = "SDK_VERSION", s.GraFxStudioDocumentType = "DOCUMENT_TYPE", s.GraFxStudioTemplateId = "TEMPLATE_ID", s.GraFxStudioAuthToken = "GRAFX_AUTH_TOKEN", s.QueryCallCacheEnabled = "ENABLE_QUERY_CALL_CACHE", s))(Z || {});
340
+ const qs = {
341
341
  shortcutOptions: {
342
342
  debugPanel: { enabled: !1 },
343
343
  ellipse: { enabled: !1 },
@@ -352,9 +352,9 @@ const js = {
352
352
  viewMode: { enabled: !1 }
353
353
  }
354
354
  };
355
- var qs = /* @__PURE__ */ ((s) => (s.overflow = "overflow", s.fontLoading = "fontLoading", s.actionRegister = "actionRegister", s.actionExecution = "actionExecution", s.actionCircular = "actionCircular", s))(qs || {}), gs = /* @__PURE__ */ ((s) => (s.project = "project", s.template = "template", s))(gs || {});
355
+ var js = /* @__PURE__ */ ((s) => (s.overflow = "overflow", s.fontLoading = "fontLoading", s.actionRegister = "actionRegister", s.actionExecution = "actionExecution", s.actionCircular = "actionCircular", s))(js || {}), gs = /* @__PURE__ */ ((s) => (s.project = "project", s.template = "template", s))(gs || {});
356
356
  const Ys = 404075;
357
- function o(s, a = !0) {
357
+ function o(s, i = !0) {
358
358
  try {
359
359
  if (!s.success) {
360
360
  const e = s.error ?? "Yikes, something went wrong", r = {
@@ -369,7 +369,7 @@ function o(s, a = !0) {
369
369
  } else
370
370
  throw new Error(e, r);
371
371
  }
372
- const t = s.data && a;
372
+ const t = s.data && i;
373
373
  return {
374
374
  ...s,
375
375
  parsedData: t ? JSON.parse(s.data) : s.data
@@ -379,51 +379,51 @@ function o(s, a = !0) {
379
379
  }
380
380
  }
381
381
  class Zs extends Error {
382
- constructor(a, t, e) {
383
- super(t, e), this.statusCode = a;
382
+ constructor(i, t, e) {
383
+ super(t, e), this.statusCode = i;
384
384
  }
385
385
  }
386
- var L;
386
+ var O;
387
387
  class Ae {
388
388
  /**
389
389
  * @ignore
390
390
  */
391
- constructor(a) {
391
+ constructor(i) {
392
392
  /**
393
393
  * @ignore
394
394
  */
395
- u(this, L);
396
- this.getAll = async () => (await i(this, L)).getActions().then((e) => o(e)), this.getById = async (t) => (await i(this, L)).getActionById(t).then((r) => o(r)), this.create = async () => (await i(this, L)).createAction().then((e) => o(e)), this.duplicate = async (t) => (await i(this, L)).duplicateAction(t).then((r) => o(r)), this.remove = async (t) => (await i(this, L)).removeAction(t).then((r) => o(r)), this.update = async (t, e) => (await i(this, L)).updateAction(t, JSON.stringify(e)).then((n) => o(n)), this.rename = async (t, e) => this.update(t, { name: e }), this.updateScript = async (t, e) => this.update(t, { script: e }), this.updateTriggers = async (t, e) => this.update(t, { triggers: e }), this.move = async (t, e) => (await i(this, L)).moveActions(t, e).then((n) => o(n)), this.setTypeError = async (t, e) => this.update(t, { hasTypeError: e }), this.disable = async () => (await i(this, L)).disableActions().then((e) => o(e)), this.enable = async () => (await i(this, L)).enableActions().then((e) => o(e)), g(this, L, a);
395
+ u(this, O);
396
+ this.getAll = async () => (await a(this, O)).getActions().then((e) => o(e)), this.getById = async (t) => (await a(this, O)).getActionById(t).then((r) => o(r)), this.create = async () => (await a(this, O)).createAction().then((e) => o(e)), this.duplicate = async (t) => (await a(this, O)).duplicateAction(t).then((r) => o(r)), this.remove = async (t) => (await a(this, O)).removeAction(t).then((r) => o(r)), this.update = async (t, e) => (await a(this, O)).updateAction(t, JSON.stringify(e)).then((n) => o(n)), this.rename = async (t, e) => this.update(t, { name: e }), this.updateScript = async (t, e) => this.update(t, { script: e }), this.updateTriggers = async (t, e) => this.update(t, { triggers: e }), this.move = async (t, e) => (await a(this, O)).moveActions(t, e).then((n) => o(n)), this.setTypeError = async (t, e) => this.update(t, { hasTypeError: e }), this.disable = async () => (await a(this, O)).disableActions().then((e) => o(e)), this.enable = async () => (await a(this, O)).enableActions().then((e) => o(e)), g(this, O, i);
397
397
  }
398
398
  }
399
- L = new WeakMap();
399
+ O = new WeakMap();
400
400
  var E;
401
401
  class Fe {
402
402
  /**
403
403
  * @ignore
404
404
  */
405
- constructor(a) {
405
+ constructor(i) {
406
406
  /**
407
407
  * @ignore
408
408
  */
409
409
  u(this, E);
410
- this.getAllOnSelectedLayout = async () => (await i(this, E)).getAnimationsOnSelectedLayout().then((e) => o(e)), this.getByFrameId = async (t, e) => (await i(this, E)).getAnimationByFrameId(t, e).then((n) => o(n)), this.getByLayoutId = async (t) => (await i(this, E)).getAnimationsByLayoutId(t).then((r) => o(r)), this.setFrameAnimation = async (t) => (await i(this, E)).setFrameAnimation(JSON.stringify(t)).then(
410
+ this.getAllOnSelectedLayout = async () => (await a(this, E)).getAnimationsOnSelectedLayout().then((e) => o(e)), this.getByFrameId = async (t, e) => (await a(this, E)).getAnimationByFrameId(t, e).then((n) => o(n)), this.getByLayoutId = async (t) => (await a(this, E)).getAnimationsByLayoutId(t).then((r) => o(r)), this.setFrameAnimation = async (t) => (await a(this, E)).setFrameAnimation(JSON.stringify(t)).then(
411
411
  (r) => o({ ...r, data: JSON.stringify(t) })
412
- ), this.play = async () => (await i(this, E)).playAnimation().then((e) => o(e)), this.pause = async () => (await i(this, E)).pauseAnimation().then((e) => o(e)), this.setScrubberPosition = async (t) => (await i(this, E)).setScrubberPosition(t).then((r) => o(r)), this.setDuration = async (t) => (await i(this, E)).setAnimationDuration(t).then((r) => o(r)), this.resetFrameAnimation = async (t) => (await i(this, E)).resetFrameAnimation(t).then((r) => o(r)), this.reset = async () => (await i(this, E)).resetAnimation().then((e) => o(e)), g(this, E, a);
412
+ ), this.play = async () => (await a(this, E)).playAnimation().then((e) => o(e)), this.pause = async () => (await a(this, E)).pauseAnimation().then((e) => o(e)), this.setScrubberPosition = async (t) => (await a(this, E)).setScrubberPosition(t).then((r) => o(r)), this.setDuration = async (t) => (await a(this, E)).setAnimationDuration(t).then((r) => o(r)), this.resetFrameAnimation = async (t) => (await a(this, E)).resetFrameAnimation(t).then((r) => o(r)), this.reset = async () => (await a(this, E)).resetAnimation().then((e) => o(e)), g(this, E, i);
413
413
  }
414
414
  }
415
415
  E = new WeakMap();
416
- var T = /* @__PURE__ */ ((s) => (s.code39 = "code39", s.code93 = "code93", s.code128 = "code128", s.dataMatrix = "dataMatrix", s.ean13 = "ean13", s.ean8 = "ean8", s.qr = "qr", s.upca = "upca", s.upce = "upce", s.gs1128 = "gs1128", s))(T || {}), Ot = /* @__PURE__ */ ((s) => (s.low = "low", s.medium = "medium", s.quartile = "quartile", s.high = "high", s))(Ot || {}), wt = /* @__PURE__ */ ((s) => (s.utf8 = "utf8", s.iso8859_1 = "iso8859_1", s.code128a = "code128a", s.code128b = "code128b", s.code128c = "code128c", s))(wt || {}), Qs = /* @__PURE__ */ ((s) => (s.success = "success", s.empty = "empty", s.invalidLength = "invalidLength", s.invalidCharacters = "invalidCharacters", s.invalidChecksum = "invalidChecksum", s.invalidUPCE = "invalidUPCE", s.otherError = "otherError", s))(Qs || {}), q = /* @__PURE__ */ ((s) => (s.top = "top", s.right = "right", s.bottom = "bottom", s.left = "left", s))(q || {}), Xs = /* @__PURE__ */ ((s) => (s.top = "top", s.child = "child", s))(Xs || {}), tr = /* @__PURE__ */ ((s) => (s.px = "px", s.mm = "mm", s.cm = "cm", s.inch = "inch", s.pt = "pt", s))(tr || {}), er = /* @__PURE__ */ ((s) => (s.print = "print", s.digitalStatic = "digitalStatic", s.digitalAnimated = "digitalAnimated", s))(er || {}), B;
416
+ var G = /* @__PURE__ */ ((s) => (s.code39 = "code39", s.code93 = "code93", s.code128 = "code128", s.dataMatrix = "dataMatrix", s.ean13 = "ean13", s.ean8 = "ean8", s.qr = "qr", s.upca = "upca", s.upce = "upce", s.gs1128 = "gs1128", s))(G || {}), Ot = /* @__PURE__ */ ((s) => (s.low = "low", s.medium = "medium", s.quartile = "quartile", s.high = "high", s))(Ot || {}), ft = /* @__PURE__ */ ((s) => (s.utf8 = "utf8", s.iso8859_1 = "iso8859_1", s.code128a = "code128a", s.code128b = "code128b", s.code128c = "code128c", s))(ft || {}), Qs = /* @__PURE__ */ ((s) => (s.success = "success", s.empty = "empty", s.invalidLength = "invalidLength", s.invalidCharacters = "invalidCharacters", s.invalidChecksum = "invalidChecksum", s.invalidUPCE = "invalidUPCE", s.otherError = "otherError", s))(Qs || {}), Y = /* @__PURE__ */ ((s) => (s.top = "top", s.right = "right", s.bottom = "bottom", s.left = "left", s))(Y || {}), Xs = /* @__PURE__ */ ((s) => (s.top = "top", s.child = "child", s))(Xs || {}), tr = /* @__PURE__ */ ((s) => (s.px = "px", s.mm = "mm", s.cm = "cm", s.inch = "inch", s.pt = "pt", s))(tr || {}), er = /* @__PURE__ */ ((s) => (s.print = "print", s.digitalStatic = "digitalStatic", s.digitalAnimated = "digitalAnimated", s))(er || {}), k;
417
417
  class Ee {
418
418
  /**
419
419
  * @ignore
420
420
  */
421
- constructor(a) {
421
+ constructor(i) {
422
422
  /**
423
423
  * @ignore
424
424
  */
425
- u(this, B);
426
- this.setBarcodeProperties = async (t, e) => (await i(this, B)).setBarcodeProperties(t, JSON.stringify(e)).then((n) => o(n)), this.setEnableBackground = async (t, e) => {
425
+ u(this, k);
426
+ this.setBarcodeProperties = async (t, e) => (await a(this, k)).setBarcodeProperties(t, JSON.stringify(e)).then((n) => o(n)), this.setEnableBackground = async (t, e) => {
427
427
  const r = { enableBackground: e };
428
428
  return this.setBarcodeProperties(t, r);
429
429
  }, this.setBackgroundColor = async (t, e) => {
@@ -435,7 +435,7 @@ class Ee {
435
435
  }, this.setBarColor = async (t, e) => {
436
436
  const r = { barColor: e };
437
437
  return this.setBarcodeProperties(t, r);
438
- }, this.setBarcodeSource = async (t, e) => (await i(this, B)).setBarcodeSource(t, JSON.stringify(e)).then((n) => o(n)), this.removeBarcodeSource = async (t) => (await i(this, B)).setBarcodeSource(t, null).then((r) => o(r)), this.setEnableText = async (t, e) => {
438
+ }, this.setBarcodeSource = async (t, e) => (await a(this, k)).setBarcodeSource(t, JSON.stringify(e)).then((n) => o(n)), this.removeBarcodeSource = async (t) => (await a(this, k)).setBarcodeSource(t, null).then((r) => o(r)), this.setEnableText = async (t, e) => {
439
439
  const r = { enableText: e };
440
440
  return this.setBarcodeProperties(t, r);
441
441
  }, this.setBarHeight = async (t, e) => {
@@ -446,52 +446,52 @@ class Ee {
446
446
  return this.setBarcodeProperties(t, r);
447
447
  }, this.setQuietZoneValue = async (t, e, r) => {
448
448
  const n = r ? {
449
- left: r === q.left ? e : void 0,
450
- top: r === q.top ? e : void 0,
451
- right: r === q.right ? e : void 0,
452
- bottom: r === q.bottom ? e : void 0
449
+ left: r === Y.left ? e : void 0,
450
+ top: r === Y.top ? e : void 0,
451
+ right: r === Y.right ? e : void 0,
452
+ bottom: r === Y.bottom ? e : void 0
453
453
  } : { left: e, top: e, right: e, bottom: e };
454
- return (await i(this, B)).setBarcodeProperties(t, JSON.stringify({ quietZone: n })).then((l) => o(l));
454
+ return (await a(this, k)).setBarcodeProperties(t, JSON.stringify({ quietZone: n })).then((h) => o(h));
455
455
  }, this.setAreQuietZoneValuesCombined = async (t, e) => {
456
456
  const r = { areQuietZoneValuesCombined: e };
457
- return (await i(this, B)).setBarcodeProperties(t, JSON.stringify({ quietZone: r })).then((c) => o(c));
458
- }, this.setErrorCorrectionLevel = async (t, e) => (await i(this, B)).setBarcodeProperties(t, JSON.stringify({ errorCorrectionLevel: e })).then((n) => o(n)), this.setCharacterSet = async (t, e) => (await i(this, B)).setBarcodeProperties(t, JSON.stringify({ characterSet: e })).then((n) => o(n)), this.setDrawLightMarginIndicator = async (t, e) => {
457
+ return (await a(this, k)).setBarcodeProperties(t, JSON.stringify({ quietZone: r })).then((c) => o(c));
458
+ }, this.setErrorCorrectionLevel = async (t, e) => (await a(this, k)).setBarcodeProperties(t, JSON.stringify({ errorCorrectionLevel: e })).then((n) => o(n)), this.setCharacterSet = async (t, e) => (await a(this, k)).setBarcodeProperties(t, JSON.stringify({ characterSet: e })).then((n) => o(n)), this.setDrawLightMarginIndicator = async (t, e) => {
459
459
  const r = { drawStartStopChars: e };
460
460
  return this.setBarcodeProperties(t, r);
461
461
  }, this.setDrawStartStopChars = async (t, e) => {
462
462
  const r = { drawStartStopChars: e };
463
463
  return this.setBarcodeProperties(t, r);
464
464
  }, this.getBarcodeConfigationOptions = (t) => {
465
- let e = !0, r = !0, n = !0, c, l, h = !1, y = !1, p = !1;
465
+ let e = !0, r = !0, n = !0, c, h, l = !1, y = !1, p = !1;
466
466
  switch (t) {
467
- case T.qr:
468
- c = [wt.iso8859_1, wt.utf8], l = [
467
+ case G.qr:
468
+ c = [ft.iso8859_1, ft.utf8], h = [
469
469
  Ot.low,
470
470
  Ot.medium,
471
471
  Ot.quartile,
472
472
  Ot.high
473
473
  ];
474
- case T.dataMatrix:
475
- e = !1, r = !1, n = !1, h = !0;
474
+ case G.dataMatrix:
475
+ e = !1, r = !1, n = !1, l = !0;
476
476
  break;
477
- case T.ean13:
477
+ case G.ean13:
478
478
  e = !1, y = !0;
479
479
  break;
480
- case T.ean8:
480
+ case G.ean8:
481
481
  y = !0;
482
- case T.upca:
483
- case T.upce:
482
+ case G.upca:
483
+ case G.upce:
484
484
  e = !1;
485
485
  break;
486
- case T.code128:
487
- case T.gs1128:
486
+ case G.code128:
487
+ case G.gs1128:
488
488
  c = [
489
- wt.code128a,
490
- wt.code128b,
491
- wt.code128c
489
+ ft.code128a,
490
+ ft.code128b,
491
+ ft.code128c
492
492
  ];
493
493
  break;
494
- case T.code39:
494
+ case G.code39:
495
495
  p = !0;
496
496
  break;
497
497
  }
@@ -500,38 +500,38 @@ class Ee {
500
500
  allowBarHeight: r,
501
501
  allowQuietZone: !0,
502
502
  allowedCharacterSets: c,
503
- allowedErrorCorrectionLevels: l,
503
+ allowedErrorCorrectionLevels: h,
504
504
  allowToggleText: e,
505
- quietZoneAlwaysCombined: h,
505
+ quietZoneAlwaysCombined: l,
506
506
  allowToggleLightMarginIndicator: y,
507
507
  allowToggleDrawStartAndEndChar: p
508
508
  };
509
- }, g(this, B, a);
509
+ }, g(this, k, i);
510
510
  }
511
511
  }
512
- B = new WeakMap();
513
- var U = /* @__PURE__ */ ((s) => (s.rgb = "rgb", s.hex = "hex", s.cmyk = "cmyk", s.spotCmyk = "spotCmyk", s.spotRgb = "spotRgb", s.spotHex = "spotHex", s))(U || {}), z = /* @__PURE__ */ ((s) => (s.rgb = "rgb", s.hex = "hex", s.cmyk = "cmyk", s.gray = "gray", s.hsl = "hsl", s.spot = "spot", s.spotCMYK = "spotCMYK", s.spotRGB = "spotRGB", s.spotHEX = "spotHEX", s))(z || {}), ys = /* @__PURE__ */ ((s) => (s.local = "local", s.brandKit = "brandKit", s.stylekit = "brandKit", s))(ys || {});
514
- const Le = (s) => s.type === U.hex, Zt = (s) => s.type === U.spotHex, sr = (s) => s.type === U.spotRgb, rr = (s) => s.type === U.spotCmyk, nr = (s) => sr(s) || rr(s) || Zt(s), ar = (s) => {
515
- const a = ir(s.type);
512
+ k = new WeakMap();
513
+ var T = /* @__PURE__ */ ((s) => (s.rgb = "rgb", s.hex = "hex", s.cmyk = "cmyk", s.spotCmyk = "spotCmyk", s.spotRgb = "spotRgb", s.spotHex = "spotHex", s))(T || {}), z = /* @__PURE__ */ ((s) => (s.rgb = "rgb", s.hex = "hex", s.cmyk = "cmyk", s.gray = "gray", s.hsl = "hsl", s.spot = "spot", s.spotCMYK = "spotCMYK", s.spotRGB = "spotRGB", s.spotHEX = "spotHEX", s))(z || {}), ys = /* @__PURE__ */ ((s) => (s.local = "local", s.brandKit = "brandKit", s.stylekit = "brandKit", s))(ys || {});
514
+ const De = (s) => s.type === T.hex, Zt = (s) => s.type === T.spotHex, sr = (s) => s.type === T.spotRgb, rr = (s) => s.type === T.spotCmyk, nr = (s) => sr(s) || rr(s) || Zt(s), ar = (s) => {
515
+ const i = ir(s.type);
516
516
  return nr(s) ? {
517
517
  ...Zt(s) && { value: s.displayValue },
518
518
  ...!Zt(s) && { ...s.displayValue },
519
519
  spotName: s.value,
520
- type: a
520
+ type: i
521
521
  } : {
522
- ...Le(s) && { value: s.value },
523
- ...!Le(s) && { ...s.value },
524
- type: a
522
+ ...De(s) && { value: s.value },
523
+ ...!De(s) && { ...s.value },
524
+ type: i
525
525
  };
526
- }, De = (s, a, t) => {
526
+ }, Le = (s, i, t) => {
527
527
  const { brandKitColorGuid: e, brandKitFontFamilyGuid: r, fontStyleId: n, ...c } = s;
528
528
  return {
529
- ...Object.keys(c).reduce((h, y) => ({ ...h, [y]: { value: s[y] } }), {}),
530
- ...a && {
529
+ ...Object.keys(c).reduce((l, y) => ({ ...l, [y]: { value: s[y] } }), {}),
530
+ ...i && {
531
531
  color: {
532
532
  value: {
533
- id: a.id,
534
- color: a.color,
533
+ id: i.id,
534
+ color: i.color,
535
535
  type: ys.brandKit,
536
536
  isApplied: c.fillColorApplied
537
537
  }
@@ -543,125 +543,126 @@ const Le = (s) => s.type === U.hex, Zt = (s) => s.type === U.spotHex, sr = (s) =
543
543
  };
544
544
  }, ir = (s) => {
545
545
  switch (s) {
546
- case U.rgb:
546
+ case T.rgb:
547
547
  return z.rgb;
548
- case U.cmyk:
548
+ case T.cmyk:
549
549
  return z.cmyk;
550
- case U.hex:
550
+ case T.hex:
551
551
  return z.hex;
552
- case U.spotRgb:
552
+ case T.spotRgb:
553
553
  return z.spotRGB;
554
- case U.spotCmyk:
554
+ case T.spotCmyk:
555
555
  return z.spotCMYK;
556
- case U.spotHex:
556
+ case T.spotHex:
557
557
  return z.spotHEX;
558
558
  }
559
- }, Oe = (s, a) => {
560
- if (!(s === null || a === void 0))
561
- return (s || []).find((t) => t.id === a);
562
- }, Ne = (s, a, t) => {
559
+ }, Oe = (s, i) => {
560
+ if (!(s === null || i === void 0))
561
+ return (s || []).find((t) => t.id === i);
562
+ }, Ne = (s, i, t) => {
563
563
  var e, r;
564
- if (!(s === null || a === void 0 || t === void 0))
565
- return (r = (e = (s || []).find((n) => n.id === a)) == null ? void 0 : e.fontStyles.find((n) => n.fontStyleId === t)) == null ? void 0 : r.id;
564
+ if (!(s === null || i === void 0 || t === void 0))
565
+ return (r = (e = (s || []).find((n) => n.id === i)) == null ? void 0 : e.fontStyles.find((n) => n.fontStyleId === t)) == null ? void 0 : r.id;
566
566
  };
567
- var ot;
568
- class xe {
567
+ var D;
568
+ class Me {
569
569
  /**
570
570
  * @ignore
571
571
  */
572
- constructor(a, t) {
572
+ constructor(i, t) {
573
573
  /**
574
574
  * @ignore
575
575
  */
576
- u(this, ot);
577
- this.getId = async () => (await i(this, ot)).getBrandKitId().then((r) => o(r)), this.getVersion = async () => (await i(this, ot)).getBrandKitVersion().then((r) => o(r)), this.updateIdAndVersion = async (e, r) => (await i(this, ot)).updateBrandKitIdAndVersion(e, r).then((c) => o(c)), this.get = async () => {
578
- const e = await this.getId(), r = await this.getVersion(), n = this.colorStyleController.getAll(), c = this.fontController.getFontFamilies(), l = this.characterStyleController.getAll(), h = this.paragraphStyleController.getAll(), [y, p, m, S] = await Promise.all([
579
- n,
576
+ u(this, D);
577
+ this.getId = async () => (await a(this, D)).getBrandKitId().then((r) => o(r)), this.getVersion = async () => (await a(this, D)).getBrandKitVersion().then((r) => o(r)), this.getName = async () => (await a(this, D)).getBrandKitName().then((r) => o(r)), this.rename = async (e) => (await a(this, D)).renameBrandKit(e).then((n) => o(n)), this.updateIdAndVersion = async (e, r) => (await a(this, D)).updateBrandKitIdAndVersion(e, r).then((c) => o(c)), this.get = async () => {
578
+ const e = await this.getId(), r = await this.getVersion(), n = await this.getName(), c = this.colorStyleController.getAll(), h = this.fontController.getFontFamilies(), l = this.characterStyleController.getAll(), y = this.paragraphStyleController.getAll(), p = this.getAllMedia(), [f, I, S, b, L] = await Promise.all([
580
579
  c,
581
580
  h,
582
- l
583
- ]), b = {
581
+ y,
582
+ l,
583
+ p
584
+ ]), P = {
584
585
  id: e.parsedData,
585
586
  brandKit: {
586
587
  id: e.parsedData,
588
+ name: n.parsedData,
587
589
  lastModifiedDate: r.parsedData,
588
- colors: y.parsedData,
589
- fonts: p.parsedData,
590
- paragraphStyles: m.parsedData,
591
- characterStyles: S.parsedData
590
+ colors: f.parsedData,
591
+ fonts: I.parsedData,
592
+ paragraphStyles: S.parsedData,
593
+ characterStyles: b.parsedData,
594
+ media: L.parsedData
592
595
  }
593
- }, v = {
596
+ }, N = {
594
597
  success: !0,
595
- data: JSON.stringify(b),
596
- parsedData: b,
598
+ data: JSON.stringify(P),
599
+ parsedData: P,
597
600
  status: 200
598
601
  };
599
- return o(v);
600
- }, this.remove = async () => {
601
- const r = (await this.colorStyleController.getAll()).parsedData || [], c = (await this.paragraphStyleController.getAll()).parsedData || [], h = (await this.characterStyleController.getAll()).parsedData || [], p = (await this.fontController.getFontFamilies()).parsedData || [];
602
- try {
603
- await this.undoManagerController.record("brandKit.remove", async (m) => {
604
- for (const S of r)
605
- await m.colorStyle.remove(S.id);
606
- for (const S of c)
607
- await m.paragraphStyle.remove(S.id);
608
- for (const S of h)
609
- await m.characterStyle.remove(S.id);
610
- for (const S of p)
611
- await m.font.removeFontFamily(S.id);
612
- });
613
- } catch (m) {
614
- throw this.undoManagerController.undo(), m;
615
- }
602
+ return o(N);
603
+ }, this.getAllMedia = async () => (await a(this, D)).getAllBrandKitMedia().then((r) => o(r)), this.addMedia = async (e, r, n) => (await a(this, D)).addBrandKitMedia(e, r, n).then((h) => o(h)), this.updateMedia = async (e, r, n) => (await a(this, D)).updateBrandKitMedia(e, r, n).then((h) => o(h)), this.renameMedia = async (e, r) => (await a(this, D)).renameBrandKitMedia(e, r).then((c) => o(c)), this.removeMedia = async (e) => (await a(this, D)).removeBrandKitMedia(e).then((n) => o(n)), this.remove = async () => {
604
+ const r = (await this.colorStyleController.getAll()).parsedData || [], c = (await this.paragraphStyleController.getAll()).parsedData || [], l = (await this.characterStyleController.getAll()).parsedData || [], p = (await this.fontController.getFontFamilies()).parsedData || [], I = (await this.getAllMedia()).parsedData || [];
605
+ await this.undoManagerController.record("brandKit.remove", async (S) => {
606
+ for (const b of r)
607
+ await S.colorStyle.remove(b.id);
608
+ for (const b of c)
609
+ await S.paragraphStyle.remove(b.id);
610
+ for (const b of l)
611
+ await S.characterStyle.remove(b.id);
612
+ for (const b of p)
613
+ await S.font.removeFontFamily(b.id);
614
+ for (const b of I)
615
+ await this.removeMedia(b.name);
616
+ });
616
617
  }, this.set = async (e) => {
617
- try {
618
- let r = {
618
+ let r = {
619
+ success: !0,
620
+ status: 200,
621
+ parsedData: {
622
+ id: e.id,
623
+ version: e.brandKit.lastModifiedDate,
624
+ name: e.brandKit.name,
625
+ colors: [],
626
+ fonts: [],
627
+ paragraphStyles: [],
628
+ characterStyles: [],
629
+ media: []
630
+ }
631
+ };
632
+ return await this.undoManagerController.record("brandKit.set", async (n) => {
633
+ const c = await this.setColors(e, n), h = await this.setFonts(e, n), { parsedData: l = [] } = await n.colorStyle.getAll(), { parsedData: y } = await n.font.getFontFamilies();
634
+ await this.setParagraphStyles(e, n, {
635
+ localColors: l,
636
+ localFonts: y,
637
+ localColorGuidMap: c,
638
+ localFontGuidMap: h
639
+ }), await this.setCharacterStyles(e, n, {
640
+ localColors: l,
641
+ localFonts: y,
642
+ localColorGuidMap: c,
643
+ localFontGuidMap: h
644
+ }), await this.setMedia(e);
645
+ const { parsedData: p } = await n.paragraphStyle.getAll(), { parsedData: f } = await n.characterStyle.getAll(), { parsedData: I } = await this.getAllMedia();
646
+ await n.brandKit.updateIdAndVersion(e.id, e.brandKit.lastModifiedDate), await n.brandKit.rename(e.brandKit.name), r = {
619
647
  success: !0,
620
648
  status: 200,
621
649
  parsedData: {
622
650
  id: e.id,
623
651
  version: e.brandKit.lastModifiedDate,
624
- colors: [],
625
- fonts: [],
626
- paragraphStyles: [],
627
- characterStyles: []
652
+ name: e.brandKit.name,
653
+ colors: l || [],
654
+ fonts: y || [],
655
+ paragraphStyles: p || [],
656
+ characterStyles: f || [],
657
+ media: I || []
628
658
  }
629
659
  };
630
- return await this.undoManagerController.record("brandKit.set", async (n) => {
631
- const c = await this.setColors(e, n), l = await this.setFonts(e, n), { parsedData: h = [] } = await n.colorStyle.getAll(), { parsedData: y } = await n.font.getFontFamilies();
632
- await this.setParagraphStyles(e, n, {
633
- localColors: h,
634
- localFonts: y,
635
- localColorGuidMap: c,
636
- localFontGuidMap: l
637
- }), await this.setCharacterStyles(e, n, {
638
- localColors: h,
639
- localFonts: y,
640
- localColorGuidMap: c,
641
- localFontGuidMap: l
642
- });
643
- const { parsedData: p } = await n.paragraphStyle.getAll(), { parsedData: m } = await n.characterStyle.getAll();
644
- await n.brandKit.updateIdAndVersion(e.id, e.brandKit.lastModifiedDate), r = {
645
- success: !0,
646
- status: 200,
647
- parsedData: {
648
- id: e.id,
649
- version: e.brandKit.lastModifiedDate,
650
- colors: h || [],
651
- fonts: y || [],
652
- paragraphStyles: p || [],
653
- characterStyles: m || []
654
- }
655
- };
656
- }), r;
657
- } catch (r) {
658
- throw this.undoManagerController.undo(), r;
659
- }
660
- }, g(this, ot, a), this.colorStyleController = t.colorStyle, this.fontController = t.font, this.mediaController = t.mediaConnector, this.paragraphStyleController = t.paragraphStyle, this.characterStyleController = t.characterStyle, this.undoManagerController = t.undoManager;
660
+ }), r;
661
+ }, g(this, D, i), this.colorStyleController = t.colorStyle, this.fontController = t.font, this.mediaController = t.mediaConnector, this.paragraphStyleController = t.paragraphStyle, this.characterStyleController = t.characterStyle, this.undoManagerController = t.undoManager;
661
662
  }
662
- async setColors(a, t) {
663
+ async setColors(i, t) {
663
664
  const e = /* @__PURE__ */ new Map();
664
- for (const r of a.brandKit.colors || []) {
665
+ for (const r of i.brandKit.colors || []) {
665
666
  const { parsedData: n } = await t.colorStyle.create();
666
667
  if (!n) continue;
667
668
  e.set(r.guid, n);
@@ -670,137 +671,141 @@ class xe {
670
671
  }
671
672
  return e;
672
673
  }
673
- async setFonts(a, t) {
674
- const e = a.fontConnectorId, r = /* @__PURE__ */ new Map();
675
- for (const n of a.brandKit.fonts || []) {
674
+ async setFonts(i, t) {
675
+ const e = i.fontConnectorId, r = /* @__PURE__ */ new Map();
676
+ for (const n of i.brandKit.fonts || []) {
676
677
  const { parsedData: c = [] } = await t.fontConnector.detail(e, n.fontFamilyId);
677
678
  if (!(c != null && c[0])) throw new Error(`No font styles for family ID: ${n.fontFamilyId}`);
678
- const { parsedData: l } = await t.font.addFontFamily(e, {
679
+ const { parsedData: h } = await t.font.addFontFamily(e, {
679
680
  name: c[0].familyName,
680
681
  fontFamilyId: n.fontFamilyId
681
682
  });
682
- l && r.set(n.fontFamilyBrandKitGuid, l);
683
+ h && r.set(n.fontFamilyBrandKitGuid, h);
683
684
  }
684
685
  return r;
685
686
  }
686
- async setParagraphStyles(a, t, e) {
687
- const { localColors: r, localFonts: n, localColorGuidMap: c, localFontGuidMap: l } = e;
688
- for (const h of a.brandKit.paragraphStyles || []) {
689
- const y = c.get(h.brandKitColorGuid), p = l.get(h.brandKitFontFamilyGuid), m = Ne(n, p, h.fontStyleId);
690
- if (!p || !m)
691
- throw new Error(`Paragraph style could not be created with an empty font family: ${h.name}`);
692
- const S = Oe(r, y);
693
- if (!S) throw new Error(`Paragraph style could not be created with an empty color: ${h.name}`);
694
- const { parsedData: b } = await t.paragraphStyle.create(), v = De(
695
- h,
696
- S,
697
- `${m}`
687
+ async setParagraphStyles(i, t, e) {
688
+ const { localColors: r, localFonts: n, localColorGuidMap: c, localFontGuidMap: h } = e;
689
+ for (const l of i.brandKit.paragraphStyles || []) {
690
+ const y = c.get(l.brandKitColorGuid), p = h.get(l.brandKitFontFamilyGuid), f = Ne(n, p, l.fontStyleId);
691
+ if (!p || !f)
692
+ throw new Error(`Paragraph style could not be created with an empty font family: ${l.name}`);
693
+ const I = Oe(r, y);
694
+ if (!I) throw new Error(`Paragraph style could not be created with an empty color: ${l.name}`);
695
+ const { parsedData: S } = await t.paragraphStyle.create(), b = Le(
696
+ l,
697
+ I,
698
+ `${f}`
698
699
  );
699
- await t.paragraphStyle.rename(b, h.name), await t.paragraphStyle.update(b, v);
700
+ await t.paragraphStyle.rename(S, l.name), await t.paragraphStyle.update(S, b);
700
701
  }
701
702
  }
702
- async setCharacterStyles(a, t, e) {
703
- const { localColors: r, localFonts: n, localColorGuidMap: c, localFontGuidMap: l } = e;
704
- for (const h of a.brandKit.characterStyles || []) {
705
- const y = h.brandKitColorGuid ? c.get(h.brandKitColorGuid) : void 0, p = h.brandKitFontFamilyGuid ? l.get(h.brandKitFontFamilyGuid) : void 0, m = Oe(r, y), S = Ne(n, p, h.fontStyleId), { parsedData: b } = await t.characterStyle.create(), v = De(
706
- h,
707
- m,
708
- S
703
+ async setCharacterStyles(i, t, e) {
704
+ const { localColors: r, localFonts: n, localColorGuidMap: c, localFontGuidMap: h } = e;
705
+ for (const l of i.brandKit.characterStyles || []) {
706
+ const y = l.brandKitColorGuid ? c.get(l.brandKitColorGuid) : void 0, p = l.brandKitFontFamilyGuid ? h.get(l.brandKitFontFamilyGuid) : void 0, f = Oe(r, y), I = Ne(n, p, l.fontStyleId), { parsedData: S } = await t.characterStyle.create(), b = Le(
707
+ l,
708
+ f,
709
+ I
709
710
  );
710
- await t.characterStyle.rename(b, h.name), await t.characterStyle.update(b, v);
711
+ await t.characterStyle.rename(S, l.name), await t.characterStyle.update(S, b);
711
712
  }
712
713
  }
714
+ async setMedia(i) {
715
+ for (const t of i.brandKit.media || [])
716
+ await this.addMedia(t.name, t.mediaConnectorId, t.mediaId);
717
+ }
713
718
  }
714
- ot = new WeakMap();
715
- var Q;
719
+ D = new WeakMap();
720
+ var X;
716
721
  class Qt {
717
722
  /**
718
723
  * @ignore
719
724
  */
720
- constructor(a) {
725
+ constructor(i) {
721
726
  /**
722
727
  * @ignore
723
728
  */
724
- u(this, Q);
725
- this.zoomToPage = async (t, e, r, n, c) => (t !== void 0 && console.warn("id has no effect and will be deprecated in the future"), (await i(this, Q)).zoomToPage(e, r, n, c).then((h) => o(h))), this.getZoomPercentage = async () => (await i(this, Q)).getZoomPercentage().then((e) => o(e)), this.setZoomPercentage = async (t) => (await i(this, Q)).setZoomPercentage(t).then((r) => o(r)), this.setViewMode = async (t) => (await i(this, Q)).setViewMode(t).then((r) => o(r)), g(this, Q, a);
729
+ u(this, X);
730
+ this.zoomToPage = async (t, e, r, n, c) => (t !== void 0 && console.warn("id has no effect and will be deprecated in the future"), (await a(this, X)).zoomToPage(e, r, n, c).then((l) => o(l))), this.getZoomPercentage = async () => (await a(this, X)).getZoomPercentage().then((e) => o(e)), this.setZoomPercentage = async (t) => (await a(this, X)).setZoomPercentage(t).then((r) => o(r)), this.setViewMode = async (t) => (await a(this, X)).setViewMode(t).then((r) => o(r)), g(this, X, i);
726
731
  }
727
732
  }
728
- Q = new WeakMap();
729
- var N;
730
- class Re {
733
+ X = new WeakMap();
734
+ var R;
735
+ class xe {
731
736
  /**
732
737
  * @ignore
733
738
  */
734
- constructor(a) {
739
+ constructor(i) {
735
740
  /**
736
741
  * @ignore
737
742
  */
738
- u(this, N);
739
- this.getAll = async () => (await i(this, N)).getCharacterStyles().then((e) => o(e)), this.getById = async (t) => (await i(this, N)).getCharacterStyleById(t).then((r) => o(r)), this.create = async () => (await i(this, N)).createCharacterStyle().then((e) => o(e)), this.update = async (t, e) => (await i(this, N)).updateCharacterStyle(t, JSON.stringify(e)).then((n) => o(n)), this.remove = async (t) => (await i(this, N)).removeCharacterStyle(t).then((r) => o(r)), this.duplicate = async (t) => (await i(this, N)).duplicateCharacterStyle(t).then((r) => o(r)), this.rename = async (t, e) => (await i(this, N)).renameCharacterStyle(t, e).then((n) => o(n)), this.move = async (t, e) => (await i(this, N)).moveCharacterStyles(t, e).then((n) => o(n)), g(this, N, a);
743
+ u(this, R);
744
+ this.getAll = async () => (await a(this, R)).getCharacterStyles().then((e) => o(e)), this.getById = async (t) => (await a(this, R)).getCharacterStyleById(t).then((r) => o(r)), this.create = async () => (await a(this, R)).createCharacterStyle().then((e) => o(e)), this.update = async (t, e) => (await a(this, R)).updateCharacterStyle(t, JSON.stringify(e)).then((n) => o(n)), this.remove = async (t) => (await a(this, R)).removeCharacterStyle(t).then((r) => o(r)), this.duplicate = async (t) => (await a(this, R)).duplicateCharacterStyle(t).then((r) => o(r)), this.rename = async (t, e) => (await a(this, R)).renameCharacterStyle(t, e).then((n) => o(n)), this.move = async (t, e) => (await a(this, R)).moveCharacterStyles(t, e).then((n) => o(n)), g(this, R, i);
740
745
  }
741
746
  }
742
- N = new WeakMap();
743
- var X;
744
- class Me {
747
+ R = new WeakMap();
748
+ var tt;
749
+ class Re {
745
750
  /**
746
751
  * @ignore
747
752
  */
748
- constructor(a) {
753
+ constructor(i) {
749
754
  /**
750
755
  * @ignore
751
756
  */
752
- u(this, X);
757
+ u(this, tt);
753
758
  this.copyFrames = async (t) => {
754
- const r = await (await i(this, X)).copyFrames(t);
759
+ const r = await (await a(this, tt)).copyFrames(t);
755
760
  return r.data && await navigator.clipboard.writeText(r.data), o(r);
756
761
  }, this.cutFrames = async (t) => {
757
- const r = await (await i(this, X)).cutFrames(t);
762
+ const r = await (await a(this, tt)).cutFrames(t);
758
763
  return r.data && await navigator.clipboard.writeText(r.data), o(r);
759
764
  }, this.pasteFrames = async () => {
760
- const t = await i(this, X), e = await navigator.clipboard.readText(), r = await t.pasteFrames(e);
765
+ const t = await a(this, tt), e = await navigator.clipboard.readText(), r = await t.pasteFrames(e);
761
766
  return o(r);
762
767
  }, this.getContentType = async () => {
763
- const t = await i(this, X), e = await navigator.clipboard.readText(), r = await t.getClipboardContentType(e);
768
+ const t = await a(this, tt), e = await navigator.clipboard.readText(), r = await t.getClipboardContentType(e);
764
769
  return o(r);
765
- }, g(this, X, a);
770
+ }, g(this, tt, i);
766
771
  }
767
772
  }
768
- X = new WeakMap();
769
- var Bt;
773
+ tt = new WeakMap();
774
+ var Jt;
770
775
  class Ve {
771
776
  /**
772
777
  * @ignore
773
778
  */
774
- constructor(a) {
779
+ constructor(i) {
775
780
  /**
776
781
  * @ignore
777
782
  */
778
- u(this, Bt);
779
- this.convertToRgb = async (t) => (await i(this, Bt)).colorToRgb(JSON.stringify(t)).then((r) => o(r)), g(this, Bt, a);
783
+ u(this, Jt);
784
+ this.convertToRgb = async (t) => (await a(this, Jt)).colorToRgb(JSON.stringify(t)).then((r) => o(r)), g(this, Jt, i);
780
785
  }
781
786
  }
782
- Bt = new WeakMap();
783
- var x;
784
- class Je {
787
+ Jt = new WeakMap();
788
+ var V;
789
+ class Be {
785
790
  /**
786
791
  * @ignore
787
792
  */
788
- constructor(a) {
793
+ constructor(i) {
789
794
  /**
790
795
  * @ignore
791
796
  */
792
- u(this, x);
793
- this.getAll = async () => (await i(this, x)).getColors().then((e) => o(e)), this.getById = async (t) => (await i(this, x)).getColorById(t).then((r) => o(r)), this.create = async () => (await i(this, x)).createColor().then((e) => o(e)), this.duplicate = async (t) => (await i(this, x)).duplicateColor(t).then((r) => o(r)), this.move = async (t, e) => (await i(this, x)).moveColors(t, e).then((n) => o(n)), this.rename = async (t, e) => (await i(this, x)).renameColor(t, e).then((n) => o(n)), this.update = async (t, e) => {
794
- const r = await i(this, x), n = e;
797
+ u(this, V);
798
+ this.getAll = async () => (await a(this, V)).getColors().then((e) => o(e)), this.getById = async (t) => (await a(this, V)).getColorById(t).then((r) => o(r)), this.create = async () => (await a(this, V)).createColor().then((e) => o(e)), this.duplicate = async (t) => (await a(this, V)).duplicateColor(t).then((r) => o(r)), this.move = async (t, e) => (await a(this, V)).moveColors(t, e).then((n) => o(n)), this.rename = async (t, e) => (await a(this, V)).renameColor(t, e).then((n) => o(n)), this.update = async (t, e) => {
799
+ const r = await a(this, V), n = e;
795
800
  return n.type === z.spot && (n.type = z.spotCMYK), r.updateColor(t, JSON.stringify(n)).then((c) => o(c));
796
- }, this.remove = async (t) => (await i(this, x)).removeColor(t).then((r) => o(r)), g(this, x, a);
801
+ }, this.remove = async (t) => (await a(this, V)).removeColor(t).then((r) => o(r)), g(this, V, i);
797
802
  }
798
803
  }
799
- x = new WeakMap();
800
- var Mt = /* @__PURE__ */ ((s) => (s[s.file = 0] = "file", s[s.collection = 1] = "collection", s))(Mt || {}), Xt = /* @__PURE__ */ ((s) => (s.LowResolutionWeb = "lowresWeb", s.HighResolutionWeb = "highresWeb", s))(Xt || {}), Vt = /* @__PURE__ */ ((s) => (s.file = "file", s.collection = "collection", s))(Vt || {}), or = /* @__PURE__ */ ((s) => (s.media = "media", s.fonts = "fonts", s.data = "data", s))(or || {}), cr = /* @__PURE__ */ ((s) => (s.name = "name", s.path = "relativePath", s.id = "id", s))(cr || {}), hr = /* @__PURE__ */ ((s) => (s.ascending = "asc", s.descending = "desc", s))(hr || {}), lr = /* @__PURE__ */ ((s) => (s.text = "text", s.boolean = "boolean", s))(lr || {}), dr = /* @__PURE__ */ ((s) => (s.query = "query", s.upload = "upload", s))(dr || {}), Nt = /* @__PURE__ */ ((s) => (s.url = "url", s.grafx = "grafx", s.local = "local", s))(Nt || {});
804
+ V = new WeakMap();
805
+ var Rt = /* @__PURE__ */ ((s) => (s[s.file = 0] = "file", s[s.collection = 1] = "collection", s))(Rt || {}), Xt = /* @__PURE__ */ ((s) => (s.LowResolutionWeb = "lowresWeb", s.HighResolutionWeb = "highresWeb", s))(Xt || {}), Vt = /* @__PURE__ */ ((s) => (s.file = "file", s.collection = "collection", s))(Vt || {}), or = /* @__PURE__ */ ((s) => (s.media = "media", s.fonts = "fonts", s.data = "data", s))(or || {}), cr = /* @__PURE__ */ ((s) => (s.name = "name", s.path = "relativePath", s.id = "id", s))(cr || {}), hr = /* @__PURE__ */ ((s) => (s.ascending = "asc", s.descending = "desc", s))(hr || {}), lr = /* @__PURE__ */ ((s) => (s.text = "text", s.boolean = "boolean", s))(lr || {}), dr = /* @__PURE__ */ ((s) => (s.query = "query", s.upload = "upload", s))(dr || {}), Nt = /* @__PURE__ */ ((s) => (s.url = "url", s.grafx = "grafx", s.local = "local", s))(Nt || {});
801
806
  class bn {
802
- constructor(a, t, e, r = "engineToConnector") {
803
- this.direction = "engineToConnector", this.name = a, this.direction = r, t === "var" ? this.value = `${t}.${e}` : this.value = e;
807
+ constructor(i, t, e, r = "engineToConnector") {
808
+ this.direction = "engineToConnector", this.name = i, this.direction = r, t === "var" ? this.value = `${t}.${e}` : this.value = e;
804
809
  }
805
810
  }
806
811
  var ur = /* @__PURE__ */ ((s) => (s.variable = "var", s.value = "value", s))(ur || {}), gr = /* @__PURE__ */ ((s) => (s.engineToConnector = "engineToConnector", s.connectorToEngine = "connectorToEngine", s))(gr || {}), te = /* @__PURE__ */ ((s) => (s.loading = "loading", s.loaded = "loaded", s.running = "running", s.ready = "ready", s.error = "error", s))(te || {}), yr = /* @__PURE__ */ ((s) => (s.stateChanged = "stateChanged", s.authChanged = "authChanged", s.reloadRequired = "reloadRequired", s.unloaded = "unloaded", s))(yr || {});
@@ -810,8 +815,8 @@ const In = {
810
815
  /* local */
811
816
  };
812
817
  class vn {
813
- constructor(a) {
814
- this.type = "grafxToken", this.token = a;
818
+ constructor(i) {
819
+ this.type = "grafxToken", this.token = i;
815
820
  }
816
821
  }
817
822
  class Pn {
@@ -821,87 +826,87 @@ class Pn {
821
826
  }
822
827
  var pr = /* @__PURE__ */ ((s) => (s.grafxToken = "grafxToken", s.refreshed = "refreshed", s))(pr || {}), Cr = /* @__PURE__ */ ((s) => (s.grafxToken = "grafxToken", s.any = "any", s))(Cr || {}), ps = /* @__PURE__ */ ((s) => (s.minDimension = "minDimension", s))(ps || {});
823
828
  class mr extends Error {
824
- constructor(a, t) {
825
- super(a), this.type = t;
829
+ constructor(i, t) {
830
+ super(i), this.type = t;
826
831
  }
827
832
  }
828
833
  class ne {
829
834
  constructor() {
830
- this.makeConnectorSourceForwardsCompatible = (a) => {
831
- if (a.source != Nt.grafx || this.isSourceMigrated(a))
832
- return a;
833
- let t = a.url;
835
+ this.makeConnectorSourceForwardsCompatible = (i) => {
836
+ if (i.source != Nt.grafx || this.isSourceMigrated(i))
837
+ return i;
838
+ let t = i.url;
834
839
  for (; t.endsWith("/"); )
835
840
  t = t.substring(0, t.length - 1);
836
841
  const e = t.split("/");
837
842
  return { id: e[e.length - 1], source: Nt.grafx };
838
- }, this.makeMultipleConnectorsBackwardsCompatible = (a, t) => a.map((e) => this.makeSingleConnectorBackwardsCompatible(e, t)), this.makeSingleConnectorBackwardsCompatible = (a, t) => a.source.source != Nt.grafx ? a : {
839
- id: a.id,
840
- name: a.name,
841
- iconUrl: a.iconUrl,
842
- source: this.makeConnectorSourceBackwardsCompatible(a.source, t)
843
- }, this.makeConnectorSourceBackwardsCompatible = (a, t) => {
843
+ }, this.makeMultipleConnectorsBackwardsCompatible = (i, t) => i.map((e) => this.makeSingleConnectorBackwardsCompatible(e, t)), this.makeSingleConnectorBackwardsCompatible = (i, t) => i.source.source != Nt.grafx ? i : {
844
+ id: i.id,
845
+ name: i.name,
846
+ iconUrl: i.iconUrl,
847
+ source: this.makeConnectorSourceBackwardsCompatible(i.source, t)
848
+ }, this.makeConnectorSourceBackwardsCompatible = (i, t) => {
844
849
  let e = t;
845
850
  for (; e != null && e.endsWith("/"); )
846
851
  e = e.substring(0, e.length - 1);
847
852
  return {
848
- url: `${e}/connectors/${a.id}`,
853
+ url: `${e}/connectors/${i.id}`,
849
854
  source: Nt.grafx
850
855
  };
851
- }, this.isSourceMigrated = (a) => "id" in a;
856
+ }, this.isSourceMigrated = (i) => "id" in i;
852
857
  }
853
858
  }
854
- var R, ft, ct, as;
855
- let Be = (as = class {
859
+ var B, St, ht, as;
860
+ let Je = (as = class {
856
861
  /**
857
862
  * @ignore
858
863
  */
859
- constructor(a, t) {
864
+ constructor(i, t) {
860
865
  /**
861
866
  * @ignore
862
867
  */
863
- u(this, R);
864
- u(this, ft);
865
- u(this, ct);
866
- this.getById = async (e) => (await i(this, R)).getConnectorById(e).then((n) => o(n)).then((n) => {
868
+ u(this, B);
869
+ u(this, St);
870
+ u(this, ht);
871
+ this.getById = async (e) => (await a(this, B)).getConnectorById(e).then((n) => o(n)).then((n) => {
867
872
  const c = { ...n, parsedData: null };
868
- return n.parsedData && (c.parsedData = i(this, ct).makeSingleConnectorBackwardsCompatible(
873
+ return n.parsedData && (c.parsedData = a(this, ht).makeSingleConnectorBackwardsCompatible(
869
874
  n.parsedData,
870
- i(this, ft).get(Y.GraFxStudioEnvironmentApiUrl)
875
+ a(this, St).get(Z.GraFxStudioEnvironmentApiUrl)
871
876
  )), c;
872
- }), this.getAllByType = async (e) => (await i(this, R)).getConnectors(e).then((n) => o(n)).then((n) => {
877
+ }), this.getAllByType = async (e) => (await a(this, B)).getConnectors(e).then((n) => o(n)).then((n) => {
873
878
  const c = { ...n, parsedData: null };
874
- return n.parsedData && (c.parsedData = i(this, ct).makeMultipleConnectorsBackwardsCompatible(
879
+ return n.parsedData && (c.parsedData = a(this, ht).makeMultipleConnectorsBackwardsCompatible(
875
880
  n.parsedData,
876
- i(this, ft).get(Y.GraFxStudioEnvironmentApiUrl)
881
+ a(this, St).get(Z.GraFxStudioEnvironmentApiUrl)
877
882
  )), c;
878
883
  }), this.register = async (e) => {
879
- const r = await i(this, R), n = i(this, ct).makeConnectorSourceForwardsCompatible(e);
884
+ const r = await a(this, B), n = a(this, ht).makeConnectorSourceForwardsCompatible(e);
880
885
  return r.registerConnector(JSON.stringify(n)).then((c) => o(c));
881
- }, this.unregister = async (e) => (await i(this, R)).unregisterConnector(e).then((n) => o(n)), this.configure = async (e, r) => {
882
- const n = await i(this, R);
886
+ }, this.unregister = async (e) => (await a(this, B)).unregisterConnector(e).then((n) => o(n)), this.configure = async (e, r) => {
887
+ const n = await a(this, B);
883
888
  return await this.waitToBeReady(e), await r(new wr(e, n)), n.updateConnectorConfiguration(e).then((c) => o(c));
884
- }, this.getState = async (e) => (await i(this, R)).getConnectorState(e).then((n) => o(n)), this.getOptions = async (e) => (await i(this, R)).getConnectorOptions(e).then((n) => o(n)), this.waitToBeReady = async (e, r = 2e3) => {
889
+ }, this.getState = async (e) => (await a(this, B)).getConnectorState(e).then((n) => o(n)), this.getOptions = async (e) => (await a(this, B)).getConnectorOptions(e).then((n) => o(n)), this.waitToBeReady = async (e, r = 2e3) => {
885
890
  let n = Math.max(r, 500);
886
891
  n = Math.min(n, 5e3);
887
892
  const c = 100;
888
- let l = 0;
893
+ let h = 0;
889
894
  try {
890
- for (; l * c < n; ) {
891
- const h = await this.getState(e);
892
- if (h.success && h.parsedData && (h.parsedData.type === te.running || h.parsedData.type === te.ready))
895
+ for (; h * c < n; ) {
896
+ const l = await this.getState(e);
897
+ if (l.success && l.parsedData && (l.parsedData.type === te.running || l.parsedData.type === te.ready))
893
898
  return o(
894
899
  { data: null, success: !0, error: void 0, status: 0, parsedData: void 0 },
895
900
  !1
896
901
  );
897
- await new Promise((y) => setTimeout(y, c)), l++;
902
+ await new Promise((y) => setTimeout(y, c)), h++;
898
903
  }
899
- } catch (h) {
904
+ } catch (l) {
900
905
  return o(
901
906
  {
902
907
  data: null,
903
908
  success: !1,
904
- error: `Error while getting connector state ${h}`,
909
+ error: `Error while getting connector state ${l}`,
905
910
  status: 5e4,
906
911
  parsedData: void 0
907
912
  },
@@ -919,16 +924,16 @@ let Be = (as = class {
919
924
  !1
920
925
  );
921
926
  }, this.updateMappings = async (e, r) => await this.configure(e, async (n) => {
922
- const { parsedData: c } = await this.getMappings(e), l = (c == null ? void 0 : c.filter(
927
+ const { parsedData: c } = await this.getMappings(e), h = (c == null ? void 0 : c.filter(
923
928
  (p) => !r.some(
924
- (m) => m.name === p.name && m.direction === p.direction
929
+ (f) => f.name === p.name && f.direction === p.direction
925
930
  )
926
- )) ?? [], h = r.filter((p) => p.name !== "" && p.value !== ""), y = [...l, ...h];
931
+ )) ?? [], l = r.filter((p) => p.name !== "" && p.value !== ""), y = [...h, ...l];
927
932
  await n.setMappings(y);
928
- }), g(this, R, a), g(this, ft, t), g(this, ct, new ne());
933
+ }), g(this, B, i), g(this, St, t), g(this, ht, new ne());
929
934
  }
930
- async getMappings(a, t) {
931
- return (await i(this, R)).getConnectorMappings(a).then((r) => o(r)).then(
935
+ async getMappings(i, t) {
936
+ return (await a(this, B)).getConnectorMappings(i).then((r) => o(r)).then(
932
937
  (r) => {
933
938
  var n;
934
939
  return t ? {
@@ -938,176 +943,176 @@ let Be = (as = class {
938
943
  }
939
944
  );
940
945
  }
941
- }, R = new WeakMap(), ft = new WeakMap(), ct = new WeakMap(), as);
942
- var ht, lt;
946
+ }, B = new WeakMap(), St = new WeakMap(), ht = new WeakMap(), as);
947
+ var lt, dt;
943
948
  class wr {
944
949
  /**
945
950
  * @ignore
946
951
  */
947
- constructor(a, t) {
952
+ constructor(i, t) {
948
953
  /**
949
954
  * @ignore
950
955
  */
951
- u(this, ht);
952
956
  u(this, lt);
953
- this.setOptions = async (e) => i(this, lt).setConnectorOptions(i(this, ht), JSON.stringify(e)).then((r) => o(r)), this.setMappings = async (e) => {
954
- const r = await i(this, lt).setConnectorMappings(
955
- i(this, ht),
957
+ u(this, dt);
958
+ this.setOptions = async (e) => a(this, dt).setConnectorOptions(a(this, lt), JSON.stringify(e)).then((r) => o(r)), this.setMappings = async (e) => {
959
+ const r = await a(this, dt).setConnectorMappings(
960
+ a(this, lt),
956
961
  e.map(function(n) {
957
962
  return JSON.stringify(n);
958
963
  })
959
964
  );
960
965
  return o(r);
961
- }, this.setHttpHeader = async (e, r) => i(this, lt).connectorAuthenticationSetHttpHeader(i(this, ht), e, r).then((n) => o(n)), g(this, ht, a), g(this, lt, t);
966
+ }, this.setHttpHeader = async (e, r) => a(this, dt).connectorAuthenticationSetHttpHeader(a(this, lt), e, r).then((n) => o(n)), g(this, lt, i), g(this, dt, t);
962
967
  }
963
968
  }
964
- ht = new WeakMap(), lt = new WeakMap();
965
- var tt, Ut;
969
+ lt = new WeakMap(), dt = new WeakMap();
970
+ var et, Ut;
966
971
  class Ue {
967
972
  /**
968
973
  * @ignore
969
974
  */
970
- constructor(a, t) {
975
+ constructor(i, t) {
971
976
  /**
972
977
  * @ignore
973
978
  */
974
- u(this, tt);
979
+ u(this, et);
975
980
  u(this, Ut);
976
- this.getPage = async (e, r, n = {}) => (await i(this, tt)).dataConnectorGetPage(e, JSON.stringify(r), JSON.stringify(n)).then((l) => o(l)).then((l) => {
977
- const h = { ...l, parsedData: null };
978
- return l.parsedData && (h.parsedData = {
979
- data: l.parsedData.data.map(
980
- (y) => i(this, Ut).mapEngineToDataItem(y)
981
+ this.getPage = async (e, r, n = {}) => (await a(this, et)).dataConnectorGetPage(e, JSON.stringify(r), JSON.stringify(n)).then((h) => o(h)).then((h) => {
982
+ const l = { ...h, parsedData: null };
983
+ return h.parsedData && (l.parsedData = {
984
+ data: h.parsedData.data.map(
985
+ (y) => a(this, Ut).mapEngineToDataItem(y)
981
986
  ),
982
- continuationToken: l.parsedData.continuationToken
983
- }), h;
984
- }), this.getModel = async (e, r = {}) => (await i(this, tt)).dataConnectorGetModel(e, JSON.stringify(r)).then((c) => o(c)), this.getConfigurationOptions = async (e) => (await i(this, tt)).dataConnectorGetConfigurationOptions(e).then((n) => o(n)), this.getCapabilities = async (e) => (await i(this, tt)).dataConnectorGetCapabilities(e).then((n) => o(n)), g(this, tt, a), g(this, Ut, t);
987
+ continuationToken: h.parsedData.continuationToken
988
+ }), l;
989
+ }), this.getModel = async (e, r = {}) => (await a(this, et)).dataConnectorGetModel(e, JSON.stringify(r)).then((c) => o(c)), this.getConfigurationOptions = async (e) => (await a(this, et)).dataConnectorGetConfigurationOptions(e).then((n) => o(n)), this.getCapabilities = async (e) => (await a(this, et)).dataConnectorGetCapabilities(e).then((n) => o(n)), g(this, et, i), g(this, Ut, t);
985
990
  }
986
991
  }
987
- tt = new WeakMap(), Ut = new WeakMap();
988
- var et, kt;
992
+ et = new WeakMap(), Ut = new WeakMap();
993
+ var st, kt;
989
994
  class ke {
990
995
  /**
991
996
  * @ignore
992
997
  */
993
- constructor(a, t) {
998
+ constructor(i, t) {
994
999
  /**
995
1000
  * @ignore
996
1001
  */
997
- u(this, et);
1002
+ u(this, st);
998
1003
  u(this, kt);
999
- this.setDataSource = async (e) => (await i(this, et)).setDataSource(e).then((n) => o(n)), this.getDataSource = async () => (await i(this, et)).getDataSource().then((r) => o(r)), this.removeDataSource = async () => (await i(this, et)).removeDataSource().then((r) => o(r)), this.setDataRow = async (e) => {
1000
- const r = await i(this, et), n = i(this, kt).mapDataItemToEngine(e);
1004
+ this.setDataSource = async (e) => (await a(this, st)).setDataSource(e).then((n) => o(n)), this.getDataSource = async () => (await a(this, st)).getDataSource().then((r) => o(r)), this.removeDataSource = async () => (await a(this, st)).removeDataSource().then((r) => o(r)), this.setDataRow = async (e) => {
1005
+ const r = await a(this, st), n = a(this, kt).mapDataItemToEngine(e);
1001
1006
  return r.setDataRow(JSON.stringify(n)).then((c) => o(c));
1002
- }, g(this, et, a), g(this, kt, t);
1007
+ }, g(this, st, i), g(this, kt, t);
1003
1008
  }
1004
1009
  }
1005
- et = new WeakMap(), kt = new WeakMap();
1006
- var st;
1010
+ st = new WeakMap(), kt = new WeakMap();
1011
+ var rt;
1007
1012
  class Te {
1008
1013
  /**
1009
1014
  * @ignore
1010
1015
  */
1011
- constructor(a) {
1016
+ constructor(i) {
1012
1017
  /**
1013
1018
  * @ignore
1014
1019
  */
1015
- u(this, st);
1016
- this.getAllLogs = async () => (await i(this, st)).getLogs().then((e) => o(e)), this.toggleDebugPanel = async () => (await i(this, st)).toggleDebugPanel().then((e) => o(e)), this.enableDebug = async () => (await i(this, st)).enableDebug().then((e) => o(e)), this.disableDebug = async () => (await i(this, st)).disableDebug().then((e) => o(e)), g(this, st, a);
1020
+ u(this, rt);
1021
+ this.getAllLogs = async () => (await a(this, rt)).getLogs().then((e) => o(e)), this.toggleDebugPanel = async () => (await a(this, rt)).toggleDebugPanel().then((e) => o(e)), this.enableDebug = async () => (await a(this, rt)).enableDebug().then((e) => o(e)), this.disableDebug = async () => (await a(this, rt)).disableDebug().then((e) => o(e)), g(this, rt, i);
1017
1022
  }
1018
1023
  }
1019
- st = new WeakMap();
1020
- var dt;
1024
+ rt = new WeakMap();
1025
+ var ut;
1021
1026
  class Ge {
1022
1027
  /**
1023
1028
  * @ignore
1024
1029
  */
1025
- constructor(a) {
1030
+ constructor(i) {
1026
1031
  /**
1027
1032
  * @ignore
1028
1033
  */
1029
- u(this, dt);
1030
- this.getCurrentState = async () => (await i(this, dt)).getCurrentDocumentState().then((e) => o(e)), this.load = async (t, e = { keepConnectors: !1 }) => {
1031
- const r = await i(this, dt), n = typeof t != "string" ? JSON.stringify(t) : t;
1034
+ u(this, ut);
1035
+ this.getCurrentState = async () => (await a(this, ut)).getCurrentDocumentState().then((e) => o(e)), this.load = async (t, e = { keepConnectors: !1 }) => {
1036
+ const r = await a(this, ut), n = typeof t != "string" ? JSON.stringify(t) : t;
1032
1037
  return r.loadDocument(n, JSON.stringify(e)).then((c) => o(c));
1033
1038
  }, this.createAndLoad = async (t) => {
1034
- const e = await i(this, dt), r = JSON.stringify(t);
1039
+ const e = await a(this, ut), r = JSON.stringify(t);
1035
1040
  return e.createAndLoadDocument(r).then((n) => o(n));
1036
- }, g(this, dt, a);
1041
+ }, g(this, ut, i);
1037
1042
  }
1038
1043
  }
1039
- dt = new WeakMap();
1040
- var fr = /* @__PURE__ */ ((s) => (s.top = "top", s.bottom = "bottom", s.left = "left", s.right = "right", s))(fr || {}), Kt = /* @__PURE__ */ ((s) => (s.url = "url", s.variable = "variable", s.connector = "connector", s))(Kt || {}), Sr = /* @__PURE__ */ ((s) => (s.text = "text", s.image = "image", s.shape = "shape", s.barcode = "barcode", s))(Sr || {}), br = /* @__PURE__ */ ((s) => (s.variable = "variable", s.text = "text", s))(br || {}), Ir = /* @__PURE__ */ ((s) => (s.leftToRight = "leftToRight", s.rightToLeft = "rightToLeft", s.weak = "weak", s))(Ir || {}), vr = /* @__PURE__ */ ((s) => (s.horizontal = "horizontal", s.vertical = "vertical", s.onPath = "onPath", s))(vr || {}), Pr = /* @__PURE__ */ ((s) => (s.top = "top", s.bottom = "bottom", s.middle = "middle", s.justify = "justify", s))(Pr || {}), Ar = /* @__PURE__ */ ((s) => (s.normal = "normal", s.screen = "screen", s.overlay = "overlay", s.darken = "darken", s.lighten = "lighten", s.colorDodge = "colorDodge", s.colorBurn = "colorBurn", s.hardLight = "hardLight", s.softLight = "softLight", s.difference = "difference", s.exclusion = "exclusion", s.multiply = "multiply", s.hue = "hue", s.saturation = "saturation", s.color = "color", s.luminosity = "luminosity", s))(Ar || {}), Fr = /* @__PURE__ */ ((s) => (s.fill = "fill", s.fit = "fit", s.smartCrop = "smartCrop", s.manualCrop = "manualCrop", s))(Fr || {}), Er = /* @__PURE__ */ ((s) => (s.topLeft = "topLeft", s.topCenter = "topCenter", s.topRight = "topRight", s.centerLeft = "centerLeft", s.center = "center", s.centerRight = "centerRight", s.bottomLeft = "bottomLeft", s.bottomCenter = "bottomCenter", s.bottomRight = "bottomRight", s))(Er || {}), Lr = /* @__PURE__ */ ((s) => (s.bringToFront = "bringToFront", s.sendToBack = "sendToBack", s.bringForward = "bringForward", s.sendBackward = "sendBackward", s))(Lr || {}), Dr = /* @__PURE__ */ ((s) => (s.relative = "relative", s.start = "start", s.end = "end", s.startAndEnd = "startAndEnd", s.center = "center", s))(Dr || {}), Or = /* @__PURE__ */ ((s) => (s.page = "page", s.frame = "frame", s))(Or || {}), Nr = /* @__PURE__ */ ((s) => (s.start = "start", s.end = "end", s.center = "center", s))(Nr || {});
1044
+ ut = new WeakMap();
1045
+ var fr = /* @__PURE__ */ ((s) => (s.top = "top", s.bottom = "bottom", s.left = "left", s.right = "right", s))(fr || {}), zt = /* @__PURE__ */ ((s) => (s.url = "url", s.variable = "variable", s.connector = "connector", s.brandKitMedia = "brandKitMedia", s))(zt || {}), Sr = /* @__PURE__ */ ((s) => (s.text = "text", s.image = "image", s.shape = "shape", s.barcode = "barcode", s))(Sr || {}), br = /* @__PURE__ */ ((s) => (s.variable = "variable", s.text = "text", s))(br || {}), Ir = /* @__PURE__ */ ((s) => (s.leftToRight = "leftToRight", s.rightToLeft = "rightToLeft", s.weak = "weak", s))(Ir || {}), vr = /* @__PURE__ */ ((s) => (s.horizontal = "horizontal", s.vertical = "vertical", s.onPath = "onPath", s))(vr || {}), Pr = /* @__PURE__ */ ((s) => (s.top = "top", s.bottom = "bottom", s.middle = "middle", s.justify = "justify", s))(Pr || {}), Ar = /* @__PURE__ */ ((s) => (s.normal = "normal", s.screen = "screen", s.overlay = "overlay", s.darken = "darken", s.lighten = "lighten", s.colorDodge = "colorDodge", s.colorBurn = "colorBurn", s.hardLight = "hardLight", s.softLight = "softLight", s.difference = "difference", s.exclusion = "exclusion", s.multiply = "multiply", s.hue = "hue", s.saturation = "saturation", s.color = "color", s.luminosity = "luminosity", s))(Ar || {}), Fr = /* @__PURE__ */ ((s) => (s.fill = "fill", s.fit = "fit", s.smartCrop = "smartCrop", s.manualCrop = "manualCrop", s))(Fr || {}), Er = /* @__PURE__ */ ((s) => (s.topLeft = "topLeft", s.topCenter = "topCenter", s.topRight = "topRight", s.centerLeft = "centerLeft", s.center = "center", s.centerRight = "centerRight", s.bottomLeft = "bottomLeft", s.bottomCenter = "bottomCenter", s.bottomRight = "bottomRight", s))(Er || {}), Dr = /* @__PURE__ */ ((s) => (s.bringToFront = "bringToFront", s.sendToBack = "sendToBack", s.bringForward = "bringForward", s.sendBackward = "sendBackward", s))(Dr || {}), Lr = /* @__PURE__ */ ((s) => (s.relative = "relative", s.start = "start", s.end = "end", s.startAndEnd = "startAndEnd", s.center = "center", s))(Lr || {}), Or = /* @__PURE__ */ ((s) => (s.page = "page", s.frame = "frame", s))(Or || {}), Nr = /* @__PURE__ */ ((s) => (s.start = "start", s.end = "end", s.center = "center", s))(Nr || {});
1041
1046
  class Fn {
1042
1047
  constructor() {
1043
1048
  this.type = "page";
1044
1049
  }
1045
1050
  }
1046
1051
  class En {
1047
- constructor(a, t) {
1048
- this.type = "frame", this.frameId = a, this.edge = t;
1052
+ constructor(i, t) {
1053
+ this.type = "frame", this.frameId = i, this.edge = t;
1049
1054
  }
1050
1055
  }
1051
- var Cs = /* @__PURE__ */ ((s) => (s.frameCrop = "frameCrop", s.assetCrop = "assetCrop", s))(Cs || {}), M;
1056
+ var Cs = /* @__PURE__ */ ((s) => (s.frameCrop = "frameCrop", s.assetCrop = "assetCrop", s))(Cs || {}), J;
1052
1057
  class He {
1053
1058
  /**
1054
1059
  * @ignore
1055
1060
  */
1056
- constructor(a) {
1061
+ constructor(i) {
1057
1062
  /**
1058
1063
  * @ignore
1059
1064
  */
1060
- u(this, M);
1065
+ u(this, J);
1061
1066
  this.insertImageVariableToFrame = async (t, e) => {
1062
- const r = await i(this, M), n = { id: e, type: Kt.variable };
1067
+ const r = await a(this, J), n = { id: e, type: zt.variable };
1063
1068
  return r.setImageSource(t, JSON.stringify(n)).then((c) => o(c));
1064
- }, this.insertTextVariable = async (t) => (await i(this, M)).insertTextVariable(t).then((r) => o(r)), this.enterTextEditMode = async (t) => (await i(this, M)).enterTextEditMode(t).then((r) => o(r)), this.exitTextEditMode = async () => (await i(this, M)).exitTextEditMode().then((e) => o(e)), this.getText = async (t, e) => (await i(this, M)).getTextByFrameId(t, e).then((n) => o(n)), this.setText = async (t, e) => (await i(this, M)).setTextByFrameId(t, e).then((n) => o(n)), this.selectText = async (t, e, r) => (await i(this, M)).selectTextById(t, e, r).then((c) => o(c)), this.addCustomUndoData = async (t, e, r) => (await i(this, M)).setCustomUndoData(t, e, r ?? !1).then((c) => o(c)), g(this, M, a);
1069
+ }, this.insertTextVariable = async (t) => (await a(this, J)).insertTextVariable(t).then((r) => o(r)), this.enterTextEditMode = async (t) => (await a(this, J)).enterTextEditMode(t).then((r) => o(r)), this.exitTextEditMode = async () => (await a(this, J)).exitTextEditMode().then((e) => o(e)), this.getText = async (t, e) => (await a(this, J)).getTextByFrameId(t, e).then((n) => o(n)), this.setText = async (t, e) => (await a(this, J)).setTextByFrameId(t, e).then((n) => o(n)), this.selectText = async (t, e, r) => (await a(this, J)).selectTextById(t, e, r).then((c) => o(c)), this.addCustomUndoData = async (t, e, r) => (await a(this, J)).setCustomUndoData(t, e, r ?? !1).then((c) => o(c)), g(this, J, i);
1065
1070
  }
1066
1071
  }
1067
- M = new WeakMap();
1068
- var rt, St;
1072
+ J = new WeakMap();
1073
+ var nt, bt;
1069
1074
  class _e {
1070
1075
  /**
1071
1076
  * @ignore
1072
1077
  */
1073
- constructor(a) {
1078
+ constructor(i) {
1074
1079
  /**
1075
1080
  * @ignore
1076
1081
  */
1077
- u(this, rt);
1078
- u(this, St);
1079
- this.query = async (t, e, r = {}) => (await i(this, rt)).fontConnectorQuery(t, JSON.stringify(e), JSON.stringify(r)).then((c) => o(c)), this.detail = async (t, e, r = {}) => (await i(this, rt)).fontConnectorDetail(t, e, JSON.stringify(r)).then((c) => o(c)), this.download = async (t, e, r = {}) => (await i(this, St)).fontConnectorDownload(t, e, JSON.stringify(r)).then((c) => c ?? c), this.preview = async (t, e, r, n = {}) => (await i(this, St)).fontConnectorPreview(t, e, r, JSON.stringify(n)).then((l) => l ?? l), this.getConfigurationOptions = async (t) => (await i(this, rt)).fontConnectorGetConfigurationOptions(t).then((r) => o(r)), this.getCapabilities = async (t) => (await i(this, rt)).fontConnectorGetCapabilities(t).then((r) => o(r)), this.parseDeprecatedFontType = (t) => {
1080
- if (t === Mt.file) return Vt.file;
1081
- if (t === Mt.collection) return Vt.collection;
1082
- }, g(this, rt, a), g(this, St, a);
1082
+ u(this, nt);
1083
+ u(this, bt);
1084
+ this.query = async (t, e, r = {}) => (await a(this, nt)).fontConnectorQuery(t, JSON.stringify(e), JSON.stringify(r)).then((c) => o(c)), this.detail = async (t, e, r = {}) => (await a(this, nt)).fontConnectorDetail(t, e, JSON.stringify(r)).then((c) => o(c)), this.download = async (t, e, r = {}) => (await a(this, bt)).fontConnectorDownload(t, e, JSON.stringify(r)).then((c) => c ?? c), this.preview = async (t, e, r, n = {}) => (await a(this, bt)).fontConnectorPreview(t, e, r, JSON.stringify(n)).then((h) => h ?? h), this.getConfigurationOptions = async (t) => (await a(this, nt)).fontConnectorGetConfigurationOptions(t).then((r) => o(r)), this.getCapabilities = async (t) => (await a(this, nt)).fontConnectorGetCapabilities(t).then((r) => o(r)), this.parseDeprecatedFontType = (t) => {
1085
+ if (t === Rt.file) return Vt.file;
1086
+ if (t === Rt.collection) return Vt.collection;
1087
+ }, g(this, nt, i), g(this, bt, i);
1083
1088
  }
1084
1089
  }
1085
- rt = new WeakMap(), St = new WeakMap();
1086
- var P;
1090
+ nt = new WeakMap(), bt = new WeakMap();
1091
+ var A;
1087
1092
  class $e {
1088
1093
  /**
1089
1094
  * @ignore
1090
1095
  */
1091
- constructor(a) {
1096
+ constructor(i) {
1092
1097
  /**
1093
1098
  * @ignore
1094
1099
  */
1095
- u(this, P);
1096
- this.addFontFamily = async (t, e) => (await i(this, P)).addFontFamily(t, JSON.stringify(e)).then((n) => o(n)), this.removeFontFamily = async (t) => (await i(this, P)).removeFontFamily(t).then((r) => o(r)), this.addFontStyle = async (t, e) => (await i(this, P)).addFontStyle(t, JSON.stringify(e)).then((n) => o(n)), this.removeFontStyle = async (t) => (await i(this, P)).removeFontStyle(t).then((r) => o(r)), this.getFontFamilies = async () => (await i(this, P)).getFontFamilies().then((e) => o(e)), this.getFontStyles = async (t) => (await i(this, P)).getFontStyles(t).then((r) => o(r)), this.getFontFamilyById = async (t) => (await i(this, P)).getFontFamilyById(t).then((r) => o(r)), this.getFontStyleById = async (t) => (await i(this, P)).getFontStyleById(t).then((r) => o(r)), this.getDefaultFontStyle = async () => (await i(this, P)).getDefaultFontStyle().then((e) => o(e)), this.getDefaultFontFamily = async () => (await i(this, P)).getDefaultFontFamily().then((e) => o(e)), this.isFontFamilyUsed = async (t) => (await i(this, P)).isFontFamilyUsed(t).then((r) => o(r)), this.isFontStyleUsed = async (t) => (await i(this, P)).isFontStyleUsed(t).then((r) => o(r)), this.moveFontFamilies = async (t, e) => (await i(this, P)).moveFontFamilies(t, e).then((n) => o(n)), g(this, P, a);
1100
+ u(this, A);
1101
+ this.addFontFamily = async (t, e) => (await a(this, A)).addFontFamily(t, JSON.stringify(e)).then((n) => o(n)), this.removeFontFamily = async (t) => (await a(this, A)).removeFontFamily(t).then((r) => o(r)), this.addFontStyle = async (t, e) => (await a(this, A)).addFontStyle(t, JSON.stringify(e)).then((n) => o(n)), this.removeFontStyle = async (t) => (await a(this, A)).removeFontStyle(t).then((r) => o(r)), this.getFontFamilies = async () => (await a(this, A)).getFontFamilies().then((e) => o(e)), this.getFontStyles = async (t) => (await a(this, A)).getFontStyles(t).then((r) => o(r)), this.getFontFamilyById = async (t) => (await a(this, A)).getFontFamilyById(t).then((r) => o(r)), this.getFontStyleById = async (t) => (await a(this, A)).getFontStyleById(t).then((r) => o(r)), this.getDefaultFontStyle = async () => (await a(this, A)).getDefaultFontStyle().then((e) => o(e)), this.getDefaultFontFamily = async () => (await a(this, A)).getDefaultFontFamily().then((e) => o(e)), this.isFontFamilyUsed = async (t) => (await a(this, A)).isFontFamilyUsed(t).then((r) => o(r)), this.isFontStyleUsed = async (t) => (await a(this, A)).isFontStyleUsed(t).then((r) => o(r)), this.moveFontFamilies = async (t, e) => (await a(this, A)).moveFontFamilies(t, e).then((n) => o(n)), g(this, A, i);
1097
1102
  }
1098
1103
  }
1099
- P = new WeakMap();
1100
- var bt;
1104
+ A = new WeakMap();
1105
+ var It;
1101
1106
  class ee {
1102
1107
  /**
1103
1108
  * @ignore
1104
1109
  */
1105
- constructor(a) {
1110
+ constructor(i) {
1106
1111
  /**
1107
1112
  * @ignore
1108
1113
  */
1109
- u(this, bt);
1110
- this.setShapeProperties = async (t, e) => (await i(this, bt)).setShapeProperties(t, JSON.stringify(e)).then((n) => o(n)), this.setEnableFill = async (t, e) => {
1114
+ u(this, It);
1115
+ this.setShapeProperties = async (t, e) => (await a(this, It)).setShapeProperties(t, JSON.stringify(e)).then((n) => o(n)), this.setEnableFill = async (t, e) => {
1111
1116
  const r = { enableFill: e };
1112
1117
  return this.setShapeProperties(t, r);
1113
1118
  }, this.setFillColor = async (t, e) => {
@@ -1125,7 +1130,7 @@ class ee {
1125
1130
  }, this.setFlagAllCornersSame = async (t, e) => {
1126
1131
  const r = { allCornersSame: e };
1127
1132
  return this.setShapeProperties(t, r);
1128
- }, this.setShapeCorners = async (t, e) => (await i(this, bt)).setShapeCorners(t, JSON.stringify(e)).then((n) => o(n)), this.setRadiusAll = async (t, e) => {
1133
+ }, this.setShapeCorners = async (t, e) => (await a(this, It)).setShapeCorners(t, JSON.stringify(e)).then((n) => o(n)), this.setRadiusAll = async (t, e) => {
1129
1134
  const r = { radiusAll: e };
1130
1135
  return this.setShapeCorners(t, r);
1131
1136
  }, this.setRadiusTopLeft = async (t, e) => {
@@ -1140,61 +1145,61 @@ class ee {
1140
1145
  }, this.setRadiusBottomRight = async (t, e) => {
1141
1146
  const r = { bottomRight: e };
1142
1147
  return this.setShapeCorners(t, r);
1143
- }, g(this, bt, a);
1148
+ }, g(this, It, i);
1144
1149
  }
1145
1150
  }
1146
- bt = new WeakMap();
1151
+ It = new WeakMap();
1147
1152
  var d;
1148
- class ze {
1153
+ class Ke {
1149
1154
  /**
1150
1155
  * @ignore
1151
1156
  */
1152
- constructor(a) {
1157
+ constructor(i) {
1153
1158
  /**
1154
1159
  * @ignore
1155
1160
  */
1156
1161
  u(this, d);
1157
- this.getAll = async () => (await i(this, d)).getFrames().then((e) => o(e)), this.getSelected = async () => (await i(this, d)).getSelectedFrames().then((e) => o(e)), this.getAllByPageId = async (t) => (await i(this, d)).getFramesByPageId(t).then((r) => o(r)), this.getByName = async (t) => (await i(this, d)).getFrameByName(t).then((r) => o(r)), this.getById = async (t) => (await i(this, d)).getFrameById(t).then((r) => o(r)), this.getPropertiesOnSelectedLayout = async () => (await i(this, d)).getFramePropertiesOnSelectedLayout().then((e) => o(e)), this.getLayoutProperties = async (t, e) => (await i(this, d)).getFramePropertiesByFrameId(t, e).then((n) => o(n)), this.getAllLayoutProperties = async (t) => (await i(this, d)).getFramesProperties(t).then((r) => o(r)), this.resetTransformation = async (t) => (await i(this, d)).resetFrameTransformation(t).then((r) => o(r)), this.resetSize = async (t) => (await i(this, d)).resetFrameTransformation(t).then((r) => o(r)), this.select = async (t) => (await i(this, d)).selectFrames([t]).then((r) => o(r)), this.selectMultiple = async (t) => (await i(this, d)).selectFrames(t).then((r) => o(r)), this.deselectAll = async () => (await i(this, d)).deselectFrames().then((e) => o(e)), this.reorderFrames = async (t, e) => (await i(this, d)).reorderFrames(t, e).then((n) => o(n)), this.setZIndex = async (t, e) => (await i(this, d)).setFrameZIndex(t, e).then((n) => o(n)), this.setHeight = async (t, e) => (await i(this, d)).setFrameHeight(t, e).then((n) => o(n)), this.setRotation = async (t, e) => (await i(this, d)).setFrameRotation(t, e).then((n) => o(n)), this.setWidth = async (t, e) => (await i(this, d)).setFrameWidth(t, e).then((n) => o(n)), this.setX = async (t, e) => (await i(this, d)).setFrameX(t, e).then((n) => o(n)), this.setY = async (t, e) => (await i(this, d)).setFrameY(t, e).then((n) => o(n)), this.rename = async (t, e) => (await i(this, d)).renameFrame(t, e).then((n) => o(n)), this.reset = async (t) => (await i(this, d)).resetFrame(t).then((r) => o(r)), this.resetX = async (t) => (await i(this, d)).resetFrameTransformation(t).then((r) => o(r)), this.resetY = async (t) => (await i(this, d)).resetFrameTransformation(t).then((r) => o(r)), this.resetRotation = async (t) => (await i(this, d)).resetFrameTransformation(t).then((r) => o(r)), this.resetWidth = async (t) => (await i(this, d)).resetFrameTransformation(t).then((r) => o(r)), this.resetHeight = async (t) => (await i(this, d)).resetFrameTransformation(t).then((r) => o(r)), this.resetImageFrameFitMode = async (t) => (await i(this, d)).resetImageFrameFitMode(t).then((r) => o(r)), this.setVisibility = async (t, e) => (await i(this, d)).setFrameIsVisible(t, e).then((n) => o(n)), this.setIsVisible = async (t, e) => (await i(this, d)).setFrameIsVisible(t, e).then((n) => o(n)), this.remove = async (t) => (await i(this, d)).removeFrames([t]).then((r) => o(r)), this.removeFrames = async (t) => (await i(this, d)).removeFrames(t).then((r) => o(r)), this.create = async (t, e, r, n, c) => (await i(this, d)).addFrame(t, e, r, n, c).then((h) => o(h)), this.createShapeFrame = async (t, e, r, n, c) => (await i(this, d)).addFrame(t, e, r, n, c).then((h) => o(h)), this.createBarcodeFrame = async (t, e) => (await i(this, d)).addBarcodeFrame(t, e == null ? void 0 : e.x, e == null ? void 0 : e.y).then((n) => o(n)), this.duplicateFrames = async (t) => (await i(this, d)).duplicateFrames(t).then((r) => o(r)), this.updateImageSource = async (t, e) => {
1158
- const r = await i(this, d), n = e !== null ? JSON.stringify(e) : null;
1162
+ this.getAll = async () => (await a(this, d)).getFrames().then((e) => o(e)), this.getSelected = async () => (await a(this, d)).getSelectedFrames().then((e) => o(e)), this.getAllByPageId = async (t) => (await a(this, d)).getFramesByPageId(t).then((r) => o(r)), this.getByName = async (t) => (await a(this, d)).getFrameByName(t).then((r) => o(r)), this.getById = async (t) => (await a(this, d)).getFrameById(t).then((r) => o(r)), this.getPropertiesOnSelectedLayout = async () => (await a(this, d)).getFramePropertiesOnSelectedLayout().then((e) => o(e)), this.getLayoutProperties = async (t, e) => (await a(this, d)).getFramePropertiesByFrameId(t, e).then((n) => o(n)), this.getAllLayoutProperties = async (t) => (await a(this, d)).getFramesProperties(t).then((r) => o(r)), this.resetTransformation = async (t) => (await a(this, d)).resetFrameTransformation(t).then((r) => o(r)), this.resetSize = async (t) => (await a(this, d)).resetFrameTransformation(t).then((r) => o(r)), this.select = async (t) => (await a(this, d)).selectFrames([t]).then((r) => o(r)), this.selectMultiple = async (t) => (await a(this, d)).selectFrames(t).then((r) => o(r)), this.deselectAll = async () => (await a(this, d)).deselectFrames().then((e) => o(e)), this.reorderFrames = async (t, e) => (await a(this, d)).reorderFrames(t, e).then((n) => o(n)), this.setZIndex = async (t, e) => (await a(this, d)).setFrameZIndex(t, e).then((n) => o(n)), this.setHeight = async (t, e) => (await a(this, d)).setFrameHeight(t, e).then((n) => o(n)), this.setRotation = async (t, e) => (await a(this, d)).setFrameRotation(t, e).then((n) => o(n)), this.setWidth = async (t, e) => (await a(this, d)).setFrameWidth(t, e).then((n) => o(n)), this.setX = async (t, e) => (await a(this, d)).setFrameX(t, e).then((n) => o(n)), this.setY = async (t, e) => (await a(this, d)).setFrameY(t, e).then((n) => o(n)), this.rename = async (t, e) => (await a(this, d)).renameFrame(t, e).then((n) => o(n)), this.reset = async (t) => (await a(this, d)).resetFrame(t).then((r) => o(r)), this.resetX = async (t) => (await a(this, d)).resetFrameTransformation(t).then((r) => o(r)), this.resetY = async (t) => (await a(this, d)).resetFrameTransformation(t).then((r) => o(r)), this.resetRotation = async (t) => (await a(this, d)).resetFrameTransformation(t).then((r) => o(r)), this.resetWidth = async (t) => (await a(this, d)).resetFrameTransformation(t).then((r) => o(r)), this.resetHeight = async (t) => (await a(this, d)).resetFrameTransformation(t).then((r) => o(r)), this.resetImageFrameFitMode = async (t) => (await a(this, d)).resetImageFrameFitMode(t).then((r) => o(r)), this.setVisibility = async (t, e) => (await a(this, d)).setFrameIsVisible(t, e).then((n) => o(n)), this.setIsVisible = async (t, e) => (await a(this, d)).setFrameIsVisible(t, e).then((n) => o(n)), this.remove = async (t) => (await a(this, d)).removeFrames([t]).then((r) => o(r)), this.removeFrames = async (t) => (await a(this, d)).removeFrames(t).then((r) => o(r)), this.create = async (t, e, r, n, c) => (await a(this, d)).addFrame(t, e, r, n, c).then((l) => o(l)), this.createShapeFrame = async (t, e, r, n, c) => (await a(this, d)).addFrame(t, e, r, n, c).then((l) => o(l)), this.createBarcodeFrame = async (t, e) => (await a(this, d)).addBarcodeFrame(t, e == null ? void 0 : e.x, e == null ? void 0 : e.y).then((n) => o(n)), this.duplicateFrames = async (t) => (await a(this, d)).duplicateFrames(t).then((r) => o(r)), this.updateImageSource = async (t, e) => {
1163
+ const r = await a(this, d), n = e !== null ? JSON.stringify(e) : null;
1159
1164
  return r.setImageSource(t, n).then((c) => o(c));
1160
1165
  }, this.removeImageSource = async (t) => this.updateImageSource(t, null), this.setImageFromConnector = async (t, e, r) => {
1161
1166
  const n = {
1162
1167
  id: e,
1163
1168
  assetId: r,
1164
- type: Kt.connector
1169
+ type: zt.connector
1165
1170
  };
1166
1171
  return this.updateImageSource(t, n);
1167
1172
  }, this.setImageFromUrl = async (t, e) => {
1168
- const r = { url: e, type: Kt.url };
1173
+ const r = { url: e, type: zt.url };
1169
1174
  return this.updateImageSource(t, r);
1170
- }, this.setImageFrameFitMode = async (t, e) => (await i(this, d)).setImageFrameFitMode(t, e).then((n) => o(n)), this.setImageFrameFitModePosition = async (t, e) => (await i(this, d)).setImageFrameFitModePosition(t, e).then((n) => o(n)), this.setFrameConstrainProportions = async (t, e) => (console.error("setFrameConstrainProportions is not supported anymore"), o({
1175
+ }, this.setImageFrameFitMode = async (t, e) => (await a(this, d)).setImageFrameFitMode(t, e).then((n) => o(n)), this.setImageFrameFitModePosition = async (t, e) => (await a(this, d)).setImageFrameFitModePosition(t, e).then((n) => o(n)), this.setFrameConstrainProportions = async (t, e) => (console.error("setFrameConstrainProportions is not supported anymore"), o({
1171
1176
  success: !1,
1172
1177
  status: 0,
1173
1178
  error: "setFrameConstrainProportions is not supported anymore",
1174
1179
  parsedData: null
1175
- })), this.setVerticalAlign = async (t, e) => (await i(this, d)).setVerticalAlignment(t, e).then((n) => o(n)), this.setMinCopyfitting = async (t, e) => (await i(this, d)).setMinCopyfitting(t, e).then((n) => o(n)), this.setMaxCopyfitting = async (t, e) => (await i(this, d)).setMaxCopyfitting(t, e).then((n) => o(n)), this.setEnableCopyfitting = async (t, e) => (await i(this, d)).setEnableCopyfitting(t, e).then((n) => o(n)), this.resetMinCopyfitting = async (t) => (await i(this, d)).resetMinCopyfitting(t).then((r) => o(r)), this.resetMaxCopyfitting = async (t) => (await i(this, d)).resetMaxCopyfitting(t).then((r) => o(r)), this.resetEnableCopyfitting = async (t) => (await i(this, d)).resetEnableCopyfitting(t).then((r) => o(r)), this.setShapeFrameEnableFill = async (t, e) => this.shapeController.setEnableFill(t, e), this.setShapeFrameFillColor = async (t, e) => this.shapeController.setFillColor(t, e), this.setShapeFrameEnableStroke = async (t, e) => this.shapeController.setEnableStroke(t, e), this.setShapeFrameStrokeColor = async (t, e) => this.shapeController.setStrokeColor(t, e), this.setShapeFrameStrokeWeight = async (t, e) => this.shapeController.setStrokeWeight(t, e), this.setBlendMode = async (t, e) => (await i(this, d)).setFrameBlendMode(t, e).then((n) => o(n)), this.enterCropMode = async (t, e = Cs.frameCrop) => (await i(this, d)).enterCropMode(t, e).then((n) => o(n)), this.applyCropMode = async () => (await i(this, d)).applyCropMode().then((e) => o(e)), this.exitCropMode = async () => (await i(this, d)).cancelCropMode().then((e) => o(e)), this.enterSubjectMode = async (t) => (await i(this, d)).enterSubjectMode(t).then((r) => o(r)), this.applySubjectMode = async () => (await i(this, d)).applySubjectMode().then((e) => o(e)), this.exitSubjectMode = async () => (await i(this, d)).cancelSubjectMode().then((e) => o(e)), this.resetCropMode = async (t) => (console.error("resetCropMode is not supported anymore"), o({
1180
+ })), this.setVerticalAlign = async (t, e) => (await a(this, d)).setVerticalAlignment(t, e).then((n) => o(n)), this.setMinCopyfitting = async (t, e) => (await a(this, d)).setMinCopyfitting(t, e).then((n) => o(n)), this.setMaxCopyfitting = async (t, e) => (await a(this, d)).setMaxCopyfitting(t, e).then((n) => o(n)), this.setEnableCopyfitting = async (t, e) => (await a(this, d)).setEnableCopyfitting(t, e).then((n) => o(n)), this.resetMinCopyfitting = async (t) => (await a(this, d)).resetMinCopyfitting(t).then((r) => o(r)), this.resetMaxCopyfitting = async (t) => (await a(this, d)).resetMaxCopyfitting(t).then((r) => o(r)), this.resetEnableCopyfitting = async (t) => (await a(this, d)).resetEnableCopyfitting(t).then((r) => o(r)), this.setShapeFrameEnableFill = async (t, e) => this.shapeController.setEnableFill(t, e), this.setShapeFrameFillColor = async (t, e) => this.shapeController.setFillColor(t, e), this.setShapeFrameEnableStroke = async (t, e) => this.shapeController.setEnableStroke(t, e), this.setShapeFrameStrokeColor = async (t, e) => this.shapeController.setStrokeColor(t, e), this.setShapeFrameStrokeWeight = async (t, e) => this.shapeController.setStrokeWeight(t, e), this.setBlendMode = async (t, e) => (await a(this, d)).setFrameBlendMode(t, e).then((n) => o(n)), this.enterCropMode = async (t, e = Cs.frameCrop) => (await a(this, d)).enterCropMode(t, e).then((n) => o(n)), this.applyCropMode = async () => (await a(this, d)).applyCropMode().then((e) => o(e)), this.exitCropMode = async () => (await a(this, d)).cancelCropMode().then((e) => o(e)), this.enterSubjectMode = async (t) => (await a(this, d)).enterSubjectMode(t).then((r) => o(r)), this.applySubjectMode = async () => (await a(this, d)).applySubjectMode().then((e) => o(e)), this.exitSubjectMode = async () => (await a(this, d)).cancelSubjectMode().then((e) => o(e)), this.resetCropMode = async (t) => (console.error("resetCropMode is not supported anymore"), o({
1176
1181
  success: !1,
1177
1182
  status: 0,
1178
1183
  error: "resetCropMode is not supported anymore",
1179
1184
  parsedData: null
1180
1185
  })), this.setEnableAutoGrow = async (t, e) => {
1181
1186
  const r = { enabled: { value: e } };
1182
- return (await i(this, d)).updateAutoGrowSettings(t, JSON.stringify(r)).then((c) => o(c));
1187
+ return (await a(this, d)).updateAutoGrowSettings(t, JSON.stringify(r)).then((c) => o(c));
1183
1188
  }, this.setAutoGrowMinWidth = async (t, e) => {
1184
1189
  const r = { minWidth: { value: e } };
1185
- return (await i(this, d)).updateAutoGrowSettings(t, JSON.stringify(r)).then((c) => o(c));
1190
+ return (await a(this, d)).updateAutoGrowSettings(t, JSON.stringify(r)).then((c) => o(c));
1186
1191
  }, this.setAutoGrowMaxWidth = async (t, e) => {
1187
1192
  const r = { maxWidth: { value: e } };
1188
- return (await i(this, d)).updateAutoGrowSettings(t, JSON.stringify(r)).then((c) => o(c));
1193
+ return (await a(this, d)).updateAutoGrowSettings(t, JSON.stringify(r)).then((c) => o(c));
1189
1194
  }, this.setAutoGrowMinHeight = async (t, e) => {
1190
1195
  const r = { minHeight: { value: e } };
1191
- return (await i(this, d)).updateAutoGrowSettings(t, JSON.stringify(r)).then((c) => o(c));
1196
+ return (await a(this, d)).updateAutoGrowSettings(t, JSON.stringify(r)).then((c) => o(c));
1192
1197
  }, this.setAutoGrowMaxHeight = async (t, e) => {
1193
1198
  const r = { maxHeight: { value: e } };
1194
- return (await i(this, d)).updateAutoGrowSettings(t, JSON.stringify(r)).then((c) => o(c));
1199
+ return (await a(this, d)).updateAutoGrowSettings(t, JSON.stringify(r)).then((c) => o(c));
1195
1200
  }, this.setAutoGrowDirections = async (t, e) => {
1196
1201
  const r = { directions: { value: e } };
1197
- return (await i(this, d)).updateAutoGrowSettings(t, JSON.stringify(r)).then((c) => o(c));
1202
+ return (await a(this, d)).updateAutoGrowSettings(t, JSON.stringify(r)).then((c) => o(c));
1198
1203
  }, this.resetAutoGrowSettingsEnabled = async (t) => (console.error("resetAutoGrowSettingsEnabled is not supported anymore"), o({
1199
1204
  success: !1,
1200
1205
  status: 0,
@@ -1231,77 +1236,77 @@ class ze {
1231
1236
  error: "resetAutoGrow is not supported anymore",
1232
1237
  parsedData: null
1233
1238
  })), this.setAnchor = async (t, e, r, n, c) => {
1234
- const l = {
1239
+ const h = {
1235
1240
  horizontal: e,
1236
1241
  type: r,
1237
1242
  target: n,
1238
1243
  endTarget: c
1239
1244
  };
1240
- return (await i(this, d)).setAnchorProperties(t, JSON.stringify(l)).then((y) => o(y));
1241
- }, this.setVerticalAnchor = async (t, e, r, n) => this.setAnchor(t, !1, e, r, n), this.setHorizontalAnchor = async (t, e, r, n) => this.setAnchor(t, !0, e, r, n), this.resetAnchoring = async (t) => (await i(this, d)).resetFrameTransformation(t).then((r) => o(r)), this.resetVisibility = async (t) => (await i(this, d)).setFrameIsVisible(t, null).then((r) => o(r)), this.getConfiguration = async (t) => (await i(this, d)).getFrameConfiguration(t).then((r) => o(r)), this.resetAssetCropOverride = async (t) => (await i(this, d)).resetAssetCropOverride(t).then((r) => o(r)), this.resetAllAssetCropOverrides = async (t) => (await i(this, d)).resetAllAssetCropOverrides(t).then((r) => o(r)), g(this, d, a), this.shapeController = new ee(i(this, d));
1245
+ return (await a(this, d)).setAnchorProperties(t, JSON.stringify(h)).then((y) => o(y));
1246
+ }, this.setVerticalAnchor = async (t, e, r, n) => this.setAnchor(t, !1, e, r, n), this.setHorizontalAnchor = async (t, e, r, n) => this.setAnchor(t, !0, e, r, n), this.resetAnchoring = async (t) => (await a(this, d)).resetFrameTransformation(t).then((r) => o(r)), this.resetVisibility = async (t) => (await a(this, d)).setFrameIsVisible(t, null).then((r) => o(r)), this.getConfiguration = async (t) => (await a(this, d)).getFrameConfiguration(t).then((r) => o(r)), this.resetAssetCropOverride = async (t) => (await a(this, d)).resetAssetCropOverride(t).then((r) => o(r)), this.resetAllAssetCropOverrides = async (t) => (await a(this, d)).resetAllAssetCropOverrides(t).then((r) => o(r)), g(this, d, i), this.shapeController = new ee(a(this, d));
1242
1247
  }
1243
1248
  }
1244
1249
  d = new WeakMap();
1245
- class Ke {
1250
+ class ze {
1246
1251
  constructor() {
1247
1252
  this.currentEngineVersion = cs.current, this.currentSDKVersion = hs.version;
1248
1253
  }
1249
1254
  }
1250
- var w, Tt;
1255
+ var m, Tt;
1251
1256
  class We {
1252
1257
  /**
1253
1258
  * @ignore
1254
1259
  */
1255
- constructor(a) {
1260
+ constructor(i) {
1256
1261
  /**
1257
1262
  * @ignore
1258
1263
  */
1259
- u(this, w);
1264
+ u(this, m);
1260
1265
  u(this, Tt);
1261
- this.getAll = async () => (await i(this, w)).getLayouts().then((e) => o(e)), this.getById = async (t) => (await i(this, w)).getLayoutById(t).then((r) => o(r)), this.getByName = async (t) => (await i(this, w)).getLayoutByName(t).then((r) => o(r)), this.getSelected = async () => (await i(this, w)).getSelectedLayout().then((e) => o(e)), this.remove = async (t) => (await i(this, w)).removeLayout(t).then((r) => o(r)), this.create = async (t, e) => {
1262
- const r = await i(this, w);
1266
+ this.getAll = async () => (await a(this, m)).getLayouts().then((e) => o(e)), this.getById = async (t) => (await a(this, m)).getLayoutById(t).then((r) => o(r)), this.getByName = async (t) => (await a(this, m)).getLayoutByName(t).then((r) => o(r)), this.getSelected = async () => (await a(this, m)).getSelectedLayout().then((e) => o(e)), this.remove = async (t) => (await a(this, m)).removeLayout(t).then((r) => o(r)), this.create = async (t, e) => {
1267
+ const r = await a(this, m);
1263
1268
  return e != null && e.length ? r.addLayouts(t, JSON.stringify(e)).then((n) => o(n)) : r.addLayout(t).then((n) => o(n));
1264
- }, this.rename = async (t, e) => (await i(this, w)).renameLayout(t, e).then((n) => o(n)), this.select = async (t) => (await i(this, w)).selectLayout(t).then((r) => o(r)), this.duplicate = async (t) => (await i(this, w)).duplicateLayout(t).then((r) => o(r)), this.reset = async (t) => (await i(this, w)).resetLayout(t).then((r) => o(r)), this.setHeight = async (t, e) => (await i(this, w)).setLayoutHeight(t, e).then((n) => o(n)), this.setWidth = async (t, e) => (await i(this, w)).setLayoutWidth(t, e).then((n) => o(n)), this.setUnit = async (t, e) => (await i(this, w)).setLayoutUnit(t, e).then((n) => o(n)), this.resetHeight = async (t) => (await i(this, w)).resetLayoutHeight(t).then((r) => o(r)), this.resetWidth = async (t) => (await i(this, w)).resetLayoutWidth(t).then((r) => o(r)), this.resetUnit = async (t) => (await i(this, w)).resetLayoutUnit(t).then((r) => o(r)), this.getSelectedSnapshot = async () => (await i(this, Tt)).getPageSnapshot().then((e) => e ?? e), this.setIntent = async (t, e) => (await i(this, w)).setLayoutIntent(t, e).then((n) => o(n)), this.resetIntent = async (t) => (await i(this, w)).resetLayoutIntent(t).then((r) => o(r)), this.setFillColor = async (t, e) => (await i(this, w)).setLayoutFillColor(t, JSON.stringify(e)).then((n) => o(n)), this.setFillColorEnabled = async (t, e) => (await i(this, w)).setLayoutFillColorEnabled(t, e).then((n) => o(n)), this.resetFillColor = async (t) => (await i(this, w)).resetLayoutFillColor(t).then((r) => o(r)), this.setBleedValue = async (t, e, r) => {
1269
+ }, this.rename = async (t, e) => (await a(this, m)).renameLayout(t, e).then((n) => o(n)), this.select = async (t) => (await a(this, m)).selectLayout(t).then((r) => o(r)), this.duplicate = async (t) => (await a(this, m)).duplicateLayout(t).then((r) => o(r)), this.reset = async (t) => (await a(this, m)).resetLayout(t).then((r) => o(r)), this.setHeight = async (t, e) => (await a(this, m)).setLayoutHeight(t, e).then((n) => o(n)), this.setWidth = async (t, e) => (await a(this, m)).setLayoutWidth(t, e).then((n) => o(n)), this.setUnit = async (t, e) => (await a(this, m)).setLayoutUnit(t, e).then((n) => o(n)), this.resetHeight = async (t) => (await a(this, m)).resetLayoutHeight(t).then((r) => o(r)), this.resetWidth = async (t) => (await a(this, m)).resetLayoutWidth(t).then((r) => o(r)), this.resetUnit = async (t) => (await a(this, m)).resetLayoutUnit(t).then((r) => o(r)), this.getSelectedSnapshot = async () => (await a(this, Tt)).getPageSnapshot().then((e) => e ?? e), this.setIntent = async (t, e) => (await a(this, m)).setLayoutIntent(t, e).then((n) => o(n)), this.resetIntent = async (t) => (await a(this, m)).resetLayoutIntent(t).then((r) => o(r)), this.setFillColor = async (t, e) => (await a(this, m)).setLayoutFillColor(t, JSON.stringify(e)).then((n) => o(n)), this.setFillColorEnabled = async (t, e) => (await a(this, m)).setLayoutFillColorEnabled(t, e).then((n) => o(n)), this.resetFillColor = async (t) => (await a(this, m)).resetLayoutFillColor(t).then((r) => o(r)), this.setBleedValue = async (t, e, r) => {
1265
1270
  const n = r ? {
1266
- left: r === q.left ? e : void 0,
1267
- top: r === q.top ? e : void 0,
1268
- right: r === q.right ? e : void 0,
1269
- bottom: r === q.bottom ? e : void 0
1271
+ left: r === Y.left ? e : void 0,
1272
+ top: r === Y.top ? e : void 0,
1273
+ right: r === Y.right ? e : void 0,
1274
+ bottom: r === Y.bottom ? e : void 0
1270
1275
  } : { left: e, top: e, right: e, bottom: e };
1271
- return (await i(this, w)).updateLayoutBleed(t, JSON.stringify(n)).then((l) => o(l));
1276
+ return (await a(this, m)).updateLayoutBleed(t, JSON.stringify(n)).then((h) => o(h));
1272
1277
  }, this.setAreBleedValuesCombined = async (t, e) => {
1273
1278
  const r = { areBleedValuesCombined: e };
1274
- return (await i(this, w)).updateLayoutBleed(t, JSON.stringify(r)).then((c) => o(c));
1275
- }, this.resetBleedValues = async (t) => (await i(this, w)).updateLayoutBleed(t, null).then((r) => o(r)), this.setPrivateData = async (t, e) => (await i(this, w)).setLayoutPrivateData(t, JSON.stringify(e)).then((n) => o(n)), this.getPrivateData = async (t) => (await i(this, w)).getLayoutPrivateData(t).then((r) => o(r)), this.setDisplayName = async (t, e) => (await i(this, w)).setLayoutDisplayName(t, e).then((n) => o(n)), this.getDisplayName = async (t) => (await i(this, w)).getLayoutDisplayName(t).then((r) => o(r)), this.resetDisplayName = async (t) => (await i(this, w)).setLayoutDisplayName(t, null).then((r) => o(r)), this.setAvailableForUser = async (t, e) => (await i(this, w)).setLayoutAvailableForUser(t, e).then((n) => o(n)), this.setSelectedByUser = async (t, e) => (await i(this, w)).setLayoutSelectedByUser(t, e).then((n) => o(n)), this.setResizableByUser = async (t, e) => (await i(this, w)).setLayoutResizableByUser(t, JSON.stringify(e)).then((n) => o(n)), g(this, w, a), g(this, Tt, a);
1279
+ return (await a(this, m)).updateLayoutBleed(t, JSON.stringify(r)).then((c) => o(c));
1280
+ }, this.resetBleedValues = async (t) => (await a(this, m)).updateLayoutBleed(t, null).then((r) => o(r)), this.setPrivateData = async (t, e) => (await a(this, m)).setLayoutPrivateData(t, JSON.stringify(e)).then((n) => o(n)), this.getPrivateData = async (t) => (await a(this, m)).getLayoutPrivateData(t).then((r) => o(r)), this.setDisplayName = async (t, e) => (await a(this, m)).setLayoutDisplayName(t, e).then((n) => o(n)), this.getDisplayName = async (t) => (await a(this, m)).getLayoutDisplayName(t).then((r) => o(r)), this.resetDisplayName = async (t) => (await a(this, m)).setLayoutDisplayName(t, null).then((r) => o(r)), this.setAvailableForUser = async (t, e) => (await a(this, m)).setLayoutAvailableForUser(t, e).then((n) => o(n)), this.setSelectedByUser = async (t, e) => (await a(this, m)).setLayoutSelectedByUser(t, e).then((n) => o(n)), this.setResizableByUser = async (t, e) => (await a(this, m)).setLayoutResizableByUser(t, JSON.stringify(e)).then((n) => o(n)), g(this, m, i), g(this, Tt, i);
1276
1281
  }
1277
1282
  }
1278
- w = new WeakMap(), Tt = new WeakMap();
1279
- var se = /* @__PURE__ */ ((s) => (s.thumbnail = "thumbnail", s.mediumres = "mediumres", s.highres = "highres", s.original = "original", s))(se || {}), ms = /* @__PURE__ */ ((s) => (s.web = "web", s.print = "print", s.animation = "animation", s))(ms || {}), K, Gt;
1280
- class je {
1283
+ m = new WeakMap(), Tt = new WeakMap();
1284
+ var se = /* @__PURE__ */ ((s) => (s.thumbnail = "thumbnail", s.mediumres = "mediumres", s.highres = "highres", s.original = "original", s))(se || {}), ms = /* @__PURE__ */ ((s) => (s.web = "web", s.print = "print", s.animation = "animation", s))(ms || {}), W, Gt;
1285
+ class qe {
1281
1286
  /**
1282
1287
  * @ignore
1283
1288
  */
1284
- constructor(a) {
1289
+ constructor(i) {
1285
1290
  /**
1286
1291
  * @ignore
1287
1292
  */
1288
- u(this, K);
1293
+ u(this, W);
1289
1294
  u(this, Gt);
1290
- this.query = async (t, e, r = {}) => (await i(this, K)).mediaConnectorQuery(t, JSON.stringify(e), JSON.stringify(r)).then((c) => o(c)), this.detail = async (t, e, r = {}) => (await i(this, K)).mediaConnectorDetail(t, e, JSON.stringify(r)).then((c) => o(c)), this.download = async (t, e, r, n = {}) => {
1295
+ this.query = async (t, e, r = {}) => (await a(this, W)).mediaConnectorQuery(t, JSON.stringify(e), JSON.stringify(r)).then((c) => o(c)), this.detail = async (t, e, r = {}) => (await a(this, W)).mediaConnectorDetail(t, e, JSON.stringify(r)).then((c) => o(c)), this.download = async (t, e, r, n = {}) => {
1291
1296
  const c = this.parseDeprecatedMediaDownloadType(
1292
1297
  r
1293
1298
  );
1294
- return (await i(this, Gt)).mediaConnectorDownload(
1299
+ return (await a(this, Gt)).mediaConnectorDownload(
1295
1300
  t,
1296
1301
  e,
1297
1302
  c,
1298
1303
  ms.web,
1299
1304
  JSON.stringify(n)
1300
- ).then((h) => h ?? h);
1301
- }, this.getConfigurationOptions = async (t) => (await i(this, K)).mediaConnectorGetConfigurationOptions(t).then((r) => o(r)), this.getCapabilities = async (t) => (await i(this, K)).mediaConnectorGetCapabilities(t).then((r) => o(r)), this.parseDeprecatedMediaType = (t) => {
1302
- if (t === Mt.file) return Vt.file;
1303
- if (t === Mt.collection) return Vt.collection;
1304
- }, this.upload = async (t, e, r = {}) => (await i(this, K)).mediaConnectorUpload(t, JSON.stringify(e), JSON.stringify(r)).then((c) => o(c)), g(this, K, a), g(this, Gt, a);
1305
+ ).then((l) => l ?? l);
1306
+ }, this.getConfigurationOptions = async (t) => (await a(this, W)).mediaConnectorGetConfigurationOptions(t).then((r) => o(r)), this.getCapabilities = async (t) => (await a(this, W)).mediaConnectorGetCapabilities(t).then((r) => o(r)), this.parseDeprecatedMediaType = (t) => {
1307
+ if (t === Rt.file) return Vt.file;
1308
+ if (t === Rt.collection) return Vt.collection;
1309
+ }, this.upload = async (t, e, r = {}) => (await a(this, W)).mediaConnectorUpload(t, JSON.stringify(e), JSON.stringify(r)).then((c) => o(c)), g(this, W, i), g(this, Gt, i);
1305
1310
  }
1306
1311
  /**
1307
1312
  * This method will parse the deprecatedMediaDownloadType to the new media download type.
@@ -1309,24 +1314,24 @@ class je {
1309
1314
  * @param deprecatedMediaDownloadType legacy download type
1310
1315
  * @returns MediaDownloadType
1311
1316
  */
1312
- parseDeprecatedMediaDownloadType(a) {
1313
- switch (a) {
1317
+ parseDeprecatedMediaDownloadType(i) {
1318
+ switch (i) {
1314
1319
  case Xt.HighResolutionWeb:
1315
1320
  return se.highres;
1316
1321
  case Xt.LowResolutionWeb:
1317
1322
  return se.thumbnail;
1318
1323
  default:
1319
- return a;
1324
+ return i;
1320
1325
  }
1321
1326
  }
1322
1327
  }
1323
- K = new WeakMap(), Gt = new WeakMap();
1328
+ W = new WeakMap(), Gt = new WeakMap();
1324
1329
  var F, Ht, is;
1325
- let qe = (is = class {
1330
+ let je = (is = class {
1326
1331
  /**
1327
1332
  * @ignore
1328
1333
  */
1329
- constructor(a) {
1334
+ constructor(i) {
1330
1335
  /**
1331
1336
  * @ignore
1332
1337
  */
@@ -1335,40 +1340,40 @@ let qe = (is = class {
1335
1340
  * @ignore
1336
1341
  */
1337
1342
  u(this, Ht);
1338
- this.add = async () => (await i(this, F)).addPage().then((e) => o(e)), this.remove = async (t) => (await i(this, F)).removePage(t).then((r) => o(r)), this.select = async (t) => (await i(this, F)).selectPage(t).then((r) => o(r)), this.setVisibility = async (t, e) => (await i(this, F)).setPageIsVisible(t, e).then((n) => o(n)), this.duplicate = async (t) => (await i(this, F)).duplicatePage(t).then((r) => o(r)), this.getAll = async () => (await i(this, F)).getPages().then((e) => o(e)), this.getById = async (t) => (await i(this, F)).getPageById(t).then((r) => o(r)), this.getSnapshot = async (t, e) => (await i(this, Ht)).getPageSnapshotWithSettings(t, e == null ? null : JSON.stringify(e)).then((n) => n ?? n), this.setWidth = async (t, e) => (t !== void 0 && console.warn("pageId has no effect since all pages are being updated simultaneously."), (await i(this, F)).setPageWidth(e).then((n) => o(n))), this.setHeight = async (t, e) => (t !== void 0 && console.warn("pageId has no effect since all pages are being updated simultaneously."), (await i(this, F)).setPageHeight(e).then((n) => o(n))), this.setSize = async (t, e) => (await i(this, F)).setPageSize(t, e).then((n) => o(n)), this.move = async (t, e) => (await i(this, F)).reorderPages(t, e).then((n) => o(n)), g(this, F, a), g(this, Ht, a);
1343
+ this.add = async () => (await a(this, F)).addPage().then((e) => o(e)), this.remove = async (t) => (await a(this, F)).removePage(t).then((r) => o(r)), this.select = async (t) => (await a(this, F)).selectPage(t).then((r) => o(r)), this.setVisibility = async (t, e) => (await a(this, F)).setPageIsVisible(t, e).then((n) => o(n)), this.duplicate = async (t) => (await a(this, F)).duplicatePage(t).then((r) => o(r)), this.getAll = async () => (await a(this, F)).getPages().then((e) => o(e)), this.getById = async (t) => (await a(this, F)).getPageById(t).then((r) => o(r)), this.getSnapshot = async (t, e) => (await a(this, Ht)).getPageSnapshotWithSettings(t, e == null ? null : JSON.stringify(e)).then((n) => n ?? n), this.setWidth = async (t, e) => (t !== void 0 && console.warn("pageId has no effect since all pages are being updated simultaneously."), (await a(this, F)).setPageWidth(e).then((n) => o(n))), this.setHeight = async (t, e) => (t !== void 0 && console.warn("pageId has no effect since all pages are being updated simultaneously."), (await a(this, F)).setPageHeight(e).then((n) => o(n))), this.setSize = async (t, e) => (await a(this, F)).setPageSize(t, e).then((n) => o(n)), this.move = async (t, e) => (await a(this, F)).reorderPages(t, e).then((n) => o(n)), g(this, F, i), g(this, Ht, i);
1339
1344
  }
1340
1345
  }, F = new WeakMap(), Ht = new WeakMap(), is);
1341
- var V;
1346
+ var U;
1342
1347
  class Ye {
1343
1348
  /**
1344
1349
  * @ignore
1345
1350
  */
1346
- constructor(a) {
1351
+ constructor(i) {
1347
1352
  /**
1348
1353
  * @ignore
1349
1354
  */
1350
- u(this, V);
1351
- this.getAll = async () => (await i(this, V)).getParagraphStyles().then((e) => o(e)), this.getById = async (t) => (await i(this, V)).getParagraphStyleById(t).then((r) => o(r)), this.create = async () => (await i(this, V)).createParagraphStyle().then((e) => o(e)), this.duplicate = async (t) => (await i(this, V)).duplicateParagraphStyle(t).then((r) => o(r)), this.update = async (t, e) => (await i(this, V)).updateParagraphStyle(t, JSON.stringify(e)).then((n) => o(n)), this.rename = async (t, e) => (await i(this, V)).renameParagraphStyle(t, e).then((n) => o(n)), this.remove = async (t) => (await i(this, V)).removeParagraphStyle(t).then((r) => o(r)), this.move = async (t, e) => (await i(this, V)).moveParagraphStyles(t, e).then((n) => o(n)), g(this, V, a);
1355
+ u(this, U);
1356
+ this.getAll = async () => (await a(this, U)).getParagraphStyles().then((e) => o(e)), this.getById = async (t) => (await a(this, U)).getParagraphStyleById(t).then((r) => o(r)), this.create = async () => (await a(this, U)).createParagraphStyle().then((e) => o(e)), this.duplicate = async (t) => (await a(this, U)).duplicateParagraphStyle(t).then((r) => o(r)), this.update = async (t, e) => (await a(this, U)).updateParagraphStyle(t, JSON.stringify(e)).then((n) => o(n)), this.rename = async (t, e) => (await a(this, U)).renameParagraphStyle(t, e).then((n) => o(n)), this.remove = async (t) => (await a(this, U)).removeParagraphStyle(t).then((r) => o(r)), this.move = async (t, e) => (await a(this, U)).moveParagraphStyles(t, e).then((n) => o(n)), g(this, U, i);
1352
1357
  }
1353
1358
  }
1354
- V = new WeakMap();
1355
- var O = /* @__PURE__ */ ((s) => (s.info = "info", s.warn = "warn", s.error = "error", s))(O || {}), ws = /* @__PURE__ */ ((s) => (s.general = "general", s.connector = "connector", s.event = "event", s.engine = "engine", s))(ws || {}), Jt = /* @__PURE__ */ ((s) => (s.throw = "throw", s.log = "log", s))(Jt || {});
1356
- class xr {
1357
- constructor(a, t, e, r) {
1358
- this.type = "action", this.message = a, this.id = t, this.event = e, this.eventChain = r;
1359
+ U = new WeakMap();
1360
+ var x = /* @__PURE__ */ ((s) => (s.info = "info", s.warn = "warn", s.error = "error", s))(x || {}), ws = /* @__PURE__ */ ((s) => (s.general = "general", s.connector = "connector", s.event = "event", s.engine = "engine", s))(ws || {}), Bt = /* @__PURE__ */ ((s) => (s.throw = "throw", s.log = "log", s))(Bt || {});
1361
+ class Mr {
1362
+ constructor(i, t, e, r) {
1363
+ this.type = "action", this.message = i, this.id = t, this.event = e, this.eventChain = r;
1359
1364
  }
1360
1365
  }
1361
- class Rr {
1362
- constructor(a, t, e) {
1363
- this.type = "dataRow", this.count = a, this.message = t, this.exceptions = e;
1366
+ class xr {
1367
+ constructor(i, t, e) {
1368
+ this.type = "dataRow", this.count = i, this.message = t, this.exceptions = e;
1364
1369
  }
1365
1370
  }
1366
- var ae = /* @__PURE__ */ ((s) => (s.shortText = "shortText", s.longText = "longText", s.image = "image", s.list = "list", s.boolean = "boolean", s.group = "group", s.number = "number", s.date = "date", s))(ae || {}), Mr = /* @__PURE__ */ ((s) => (s.Monday = "monday", s.Tuesday = "tuesday", s.Wednesday = "wednesday", s.Thursday = "thursday", s.Friday = "friday", s.Saturday = "saturday", s.Sunday = "sunday", s))(Mr || {}), Vr = /* @__PURE__ */ ((s) => (s.en_US = "en_US", s.cs = "cs", s.da = "da", s.nl = "nl", s.fi = "fi", s.fr = "fr", s.de = "de", s.it = "it", s.no = "no", s.pl = "pl", s.pt_PT = "pt_PT", s.es_ES = "es_ES", s.sv = "sv", s))(Vr || {}), xt = /* @__PURE__ */ ((s) => (s.visible = "visible", s.invisible = "invisible", s.conditional = "conditional", s))(xt || {}), Jr = /* @__PURE__ */ ((s) => (s.boolean = "boolean", s.text = "text", s.number = "number", s))(Jr || {}), Br = /* @__PURE__ */ ((s) => (s.equals = "=", s.notEquals = "!=", s.greaterThan = ">", s.greaterThanOrEquals = ">=", s.lessThan = "<", s.lessThanOrEquals = "<=", s))(Br || {});
1371
+ var ae = /* @__PURE__ */ ((s) => (s.shortText = "shortText", s.longText = "longText", s.image = "image", s.list = "list", s.boolean = "boolean", s.group = "group", s.number = "number", s.date = "date", s))(ae || {}), Rr = /* @__PURE__ */ ((s) => (s.Monday = "monday", s.Tuesday = "tuesday", s.Wednesday = "wednesday", s.Thursday = "thursday", s.Friday = "friday", s.Saturday = "saturday", s.Sunday = "sunday", s))(Rr || {}), Vr = /* @__PURE__ */ ((s) => (s.en_US = "en_US", s.cs = "cs", s.da = "da", s.nl = "nl", s.fi = "fi", s.fr = "fr", s.de = "de", s.it = "it", s.no = "no", s.pl = "pl", s.pt_PT = "pt_PT", s.es_ES = "es_ES", s.sv = "sv", s))(Vr || {}), Mt = /* @__PURE__ */ ((s) => (s.visible = "visible", s.invisible = "invisible", s.conditional = "conditional", s))(Mt || {}), Br = /* @__PURE__ */ ((s) => (s.boolean = "boolean", s.text = "text", s.number = "number", s))(Br || {}), Jr = /* @__PURE__ */ ((s) => (s.equals = "=", s.notEquals = "!=", s.greaterThan = ">", s.greaterThanOrEquals = ">=", s.lessThan = "<", s.lessThanOrEquals = "<=", s))(Jr || {});
1367
1372
  let Ur = class {
1368
1373
  /**
1369
1374
  * @ignore
1370
1375
  */
1371
- constructor(a, t) {
1376
+ constructor(i, t) {
1372
1377
  this.onActionsChanged = (e) => {
1373
1378
  this.config.events.onActionsChanged.trigger(JSON.parse(e));
1374
1379
  }, this.onAnimationChanged = (e) => {
@@ -1407,13 +1412,13 @@ let Ur = class {
1407
1412
  }, this.onVariableListChanged = (e) => {
1408
1413
  const n = JSON.parse(e).map(
1409
1414
  (c) => {
1410
- var l;
1415
+ var h;
1411
1416
  return c.type === ae.list ? {
1412
1417
  ...c,
1413
1418
  items: c.items.map(
1414
- (h) => h.value
1419
+ (l) => l.value
1415
1420
  ),
1416
- selected: (l = c.selected) == null ? void 0 : l.value
1421
+ selected: (h = c.selected) == null ? void 0 : h.value
1417
1422
  } : c;
1418
1423
  }
1419
1424
  );
@@ -1447,7 +1452,7 @@ let Ur = class {
1447
1452
  }, this.onConnectorsChanged = (e) => {
1448
1453
  const n = new ne().makeMultipleConnectorsBackwardsCompatible(
1449
1454
  JSON.parse(e),
1450
- this.localConfig.get(Y.GraFxStudioEnvironmentApiUrl)
1455
+ this.localConfig.get(Z.GraFxStudioEnvironmentApiUrl)
1451
1456
  );
1452
1457
  this.config.events.onConnectorsChanged.trigger(n);
1453
1458
  }, this.onSelectedPageIdChanged = (e) => {
@@ -1455,7 +1460,7 @@ let Ur = class {
1455
1460
  }, this.onPagesChanged = (e) => {
1456
1461
  this.config.events.onPagesChanged.trigger(JSON.parse(e));
1457
1462
  }, this.onPageSnapshotInvalidated = (e) => {
1458
- this.config.events.onPageSnapshotInvalidated.trigger(JSON.parse(e));
1463
+ this.config.events.onPageSnapshotInvalidated.trigger(e);
1459
1464
  }, this.onPageSizeChanged = (e) => {
1460
1465
  this.config.events.onPageSizeChanged.trigger(JSON.parse(e));
1461
1466
  }, this.onShapeCornerRadiusChanged = (e) => {
@@ -1465,14 +1470,14 @@ let Ur = class {
1465
1470
  }, this.onAsyncError = (e) => {
1466
1471
  const r = JSON.parse(e);
1467
1472
  if ((r == null ? void 0 : r.type) === "dataRow") {
1468
- const n = new Rr(
1473
+ const n = new xr(
1469
1474
  r.count,
1470
1475
  r.message,
1471
1476
  r.exceptions
1472
1477
  );
1473
1478
  this.config.events.onAsyncError.trigger(n);
1474
1479
  } else if ((r == null ? void 0 : r.type) === "action") {
1475
- const n = new xr(
1480
+ const n = new Mr(
1476
1481
  r.message,
1477
1482
  r.id,
1478
1483
  r.event,
@@ -1491,82 +1496,82 @@ let Ur = class {
1491
1496
  this.config.events.onDocumentIssueListChanged.trigger(JSON.parse(e));
1492
1497
  }, this.onEngineEditModeChanged = (e) => {
1493
1498
  this.config.events.onEngineEditModeChanged.trigger(JSON.parse(e));
1494
- }, this.config = a, this.localConfig = t;
1499
+ }, this.onBrandKitMediaChanged = (e) => {
1500
+ this.config.events.onBrandKitMediaChanged.trigger(JSON.parse(e));
1501
+ }, this.config = i, this.localConfig = t;
1495
1502
  }
1496
1503
  };
1497
- var ut;
1504
+ var gt;
1498
1505
  class Ze {
1499
1506
  /**
1500
1507
  * @ignore
1501
1508
  */
1502
- constructor(a) {
1509
+ constructor(i) {
1503
1510
  /**
1504
1511
  * @ignore
1505
1512
  */
1506
- u(this, ut);
1507
- this.set = async (t) => (await i(this, ut)).selectedTextStyleDeltaUpdate(JSON.stringify(t)).then((r) => o(r)), this.removeSelected = async () => (await i(this, ut)).selectedTextStyleClean().then((e) => o(e)), this.getSelected = async () => (await i(this, ut)).getSelectedTextStyle().then((e) => o(e)), g(this, ut, a);
1513
+ u(this, gt);
1514
+ this.set = async (t) => (await a(this, gt)).selectedTextStyleDeltaUpdate(JSON.stringify(t)).then((r) => o(r)), this.removeSelected = async () => (await a(this, gt)).selectedTextStyleClean().then((e) => o(e)), this.getSelected = async () => (await a(this, gt)).getSelectedTextStyle().then((e) => o(e)), g(this, gt, i);
1508
1515
  }
1509
1516
  }
1510
- ut = new WeakMap();
1511
- var kr = /* @__PURE__ */ ((s) => (s.FRAME_X = "frameX", s.FRAME_Y = "frameY", s.WIDTH = "width", s.HEIGHT = "height", s.FRAME_ROTATION = "frameRotation", s))(kr || {}), Tr = /* @__PURE__ */ ((s) => (s.LAYOUT_HEIGHT = "layoutHeight", s.LAYOUT_WIDTH = "layoutWidth", s.BLEED_TOP = "bleedTop", s.BLEED_BOTTOM = "bleedBottom", s.BLEED_LEFT = "bleedLeft", s.BLEED_RIGHT = "bleedRight", s.BLEED_VALUES_COMBINED = "areBleedValuesCombined", s))(Tr || {}), G = /* @__PURE__ */ ((s) => (s.SELECT = "select", s.ZOOM = "zoom", s.HAND = "hand", s.IMAGE_FRAME = "imageFrame", s.TEXT_FRAME = "textFrame", s.SHAPE_RECT = "rect", s.SHAPE_ELLIPSE = "ellipse", s.SHAPE_POLYGON = "polygon", s))(G || {}), Gr = /* @__PURE__ */ ((s) => (s.MP4 = "mp4", s.GIF = "gif", s.PNG = "png", s.JPG = "jpg", s.PDF = "pdf", s))(Gr || {}), re = /* @__PURE__ */ ((s) => (s.SANDBOX = "sandbox", s.PRODUCTION = "online", s))(re || {}), It;
1517
+ gt = new WeakMap();
1518
+ var kr = /* @__PURE__ */ ((s) => (s.FRAME_X = "frameX", s.FRAME_Y = "frameY", s.WIDTH = "width", s.HEIGHT = "height", s.FRAME_ROTATION = "frameRotation", s))(kr || {}), Tr = /* @__PURE__ */ ((s) => (s.LAYOUT_HEIGHT = "layoutHeight", s.LAYOUT_WIDTH = "layoutWidth", s.BLEED_TOP = "bleedTop", s.BLEED_BOTTOM = "bleedBottom", s.BLEED_LEFT = "bleedLeft", s.BLEED_RIGHT = "bleedRight", s.BLEED_VALUES_COMBINED = "areBleedValuesCombined", s))(Tr || {}), H = /* @__PURE__ */ ((s) => (s.SELECT = "select", s.ZOOM = "zoom", s.HAND = "hand", s.IMAGE_FRAME = "imageFrame", s.TEXT_FRAME = "textFrame", s.SHAPE_RECT = "rect", s.SHAPE_ELLIPSE = "ellipse", s.SHAPE_POLYGON = "polygon", s))(H || {}), Gr = /* @__PURE__ */ ((s) => (s.MP4 = "mp4", s.GIF = "gif", s.PNG = "png", s.JPG = "jpg", s.PDF = "pdf", s))(Gr || {}), re = /* @__PURE__ */ ((s) => (s.SANDBOX = "sandbox", s.PRODUCTION = "online", s))(re || {}), vt;
1512
1519
  class Qe {
1513
1520
  /**
1514
1521
  * @ignore
1515
1522
  */
1516
- constructor(a) {
1523
+ constructor(i) {
1517
1524
  /**
1518
1525
  * @ignore
1519
1526
  */
1520
- u(this, It);
1521
- this.setTool = async (t) => (await i(this, It)).setTool(t).then((r) => o(r)), this.getSelected = async () => (await i(this, It)).getSelectedTool().then((e) => o(e)), this.setPointer = async () => this.setTool(G.SELECT), this.setSelect = async () => this.setTool(G.SELECT), this.setHand = async () => this.setTool(G.HAND), this.setZoom = async () => this.setTool(G.ZOOM), this.setTextFrame = async () => this.setTool(G.TEXT_FRAME), this.setImageFrame = async () => this.setTool(G.IMAGE_FRAME), this.setShapeRect = async () => this.setTool(G.SHAPE_RECT), this.setShapeEllipse = async () => this.setTool(G.SHAPE_ELLIPSE), this.setShapePolygon = async () => this.setTool(G.SHAPE_POLYGON), g(this, It, a);
1527
+ u(this, vt);
1528
+ this.setTool = async (t) => (await a(this, vt)).setTool(t).then((r) => o(r)), this.getSelected = async () => (await a(this, vt)).getSelectedTool().then((e) => o(e)), this.setPointer = async () => this.setTool(H.SELECT), this.setSelect = async () => this.setTool(H.SELECT), this.setHand = async () => this.setTool(H.HAND), this.setZoom = async () => this.setTool(H.ZOOM), this.setTextFrame = async () => this.setTool(H.TEXT_FRAME), this.setImageFrame = async () => this.setTool(H.IMAGE_FRAME), this.setShapeRect = async () => this.setTool(H.SHAPE_RECT), this.setShapeEllipse = async () => this.setTool(H.SHAPE_ELLIPSE), this.setShapePolygon = async () => this.setTool(H.SHAPE_POLYGON), g(this, vt, i);
1522
1529
  }
1523
1530
  }
1524
- It = new WeakMap();
1525
- var W, vt, _t;
1531
+ vt = new WeakMap();
1532
+ var q, yt, _t;
1526
1533
  class Xe {
1527
1534
  /**
1528
1535
  * @ignore
1529
1536
  */
1530
- constructor(a, t) {
1537
+ constructor(i, t) {
1531
1538
  /**
1532
1539
  * @ignore
1533
1540
  */
1534
- u(this, W);
1535
- u(this, vt);
1541
+ u(this, q);
1542
+ u(this, yt);
1536
1543
  u(this, _t);
1537
- this.undo = async () => (await i(this, W)).undo().then((r) => o(r)), this.redo = async () => (await i(this, W)).redo().then((r) => o(r)), this.addCustomData = async (e, r) => (await i(this, W)).setCustomUndoData(e, r, !1).then((c) => o(c)), this.record = async (e, r) => {
1544
+ this.undo = async () => (await a(this, q)).undo().then((r) => o(r)), this.redo = async () => (await a(this, q)).redo().then((r) => o(r)), this.addCustomData = async (e, r) => (await a(this, q)).setCustomUndoData(e, r, !1).then((c) => o(c)), this.record = async (e, r) => {
1538
1545
  try {
1539
- await i(this, vt).beginIfNoneActive(e), await r(i(this, _t));
1546
+ await a(this, yt).beginIfNoneActive(e), await r(a(this, _t)), await a(this, yt).end();
1540
1547
  } catch (n) {
1541
- throw n;
1542
- } finally {
1543
- await i(this, vt).end();
1548
+ throw await a(this, yt).abort(), n;
1544
1549
  }
1545
- }, this.pause = async () => (await i(this, W)).pause().then((r) => o(r)), this.resume = async () => (await i(this, W)).resume().then((r) => o(r)), g(this, W, a), g(this, _t, t), g(this, vt, new Hr(a));
1550
+ }, this.pause = async () => (await a(this, q)).pause().then((r) => o(r)), this.resume = async () => (await a(this, q)).resume().then((r) => o(r)), g(this, q, i), g(this, _t, t), g(this, yt, new Hr(i));
1546
1551
  }
1547
1552
  }
1548
- W = new WeakMap(), vt = new WeakMap(), _t = new WeakMap();
1549
- var gt;
1553
+ q = new WeakMap(), yt = new WeakMap(), _t = new WeakMap();
1554
+ var at;
1550
1555
  class Hr {
1551
1556
  /**
1552
1557
  * @ignore
1553
1558
  */
1554
- constructor(a) {
1559
+ constructor(i) {
1555
1560
  /**
1556
1561
  * @ignore
1557
1562
  */
1558
- u(this, gt);
1559
- this.begin = async (t) => (await i(this, gt)).begin(t).then((r) => o(r)), this.beginIfNoneActive = async (t) => (await i(this, gt)).beginIfNoneActive(t).then((r) => o(r)), this.end = async () => (await i(this, gt)).end().then((e) => o(e)), g(this, gt, a);
1563
+ u(this, at);
1564
+ this.begin = async (t) => (await a(this, at)).begin(t).then((r) => o(r)), this.beginIfNoneActive = async (t) => (await a(this, at)).beginIfNoneActive(t).then((r) => o(r)), this.end = async () => (await a(this, at)).end().then((e) => o(e)), this.abort = async () => (await a(this, at)).abort().then((e) => o(e)), g(this, at, i);
1560
1565
  }
1561
1566
  }
1562
- gt = new WeakMap();
1563
- const _r = (s, a = 2) => {
1564
- const t = Math.pow(10, a);
1567
+ at = new WeakMap();
1568
+ const _r = (s, i = 2) => {
1569
+ const t = Math.pow(10, i);
1565
1570
  return Math.round(s * t) / t;
1566
1571
  };
1567
1572
  var Pt;
1568
1573
  class ts {
1569
- constructor(a) {
1574
+ constructor(i) {
1570
1575
  u(this, Pt);
1571
1576
  this.round = (t, e) => o({
1572
1577
  data: String(_r(t, e)),
@@ -1577,17 +1582,17 @@ class ts {
1577
1582
  const { type: e = re.SANDBOX, environment: r = "ft-nostress", version: n = "1" } = t, c = e == re.SANDBOX ? "chili-publish-sandbox" : "chili-publish";
1578
1583
  return `https://${r}.${c}.online/grafx/api/v${n}/environment/${r}`;
1579
1584
  }, this.stageFiles = async (t, e, r) => {
1580
- const n = i(this, Pt).get(Y.GraFxStudioEnvironmentApiUrl);
1585
+ const n = a(this, Pt).get(Z.GraFxStudioEnvironmentApiUrl);
1581
1586
  if (!n)
1582
1587
  throw new Error("GraFx Studio Environment API URL is not set");
1583
- const c = `${n}connectors/${e}/stage`, l = i(this, Pt).get(Y.GraFxStudioAuthToken);
1584
- if (!l)
1588
+ const c = `${n}connectors/${e}/stage`, h = a(this, Pt).get(Z.GraFxStudioAuthToken);
1589
+ if (!h)
1585
1590
  throw new Error("GraFx Studio Auth Token is not set");
1586
- const h = new FormData();
1587
- t.forEach((m, S) => {
1588
- const b = m instanceof File ? m.name : `blob-${S}`;
1589
- h.append("files", m, b);
1590
- }), r && h.append(
1591
+ const l = new FormData();
1592
+ t.forEach((f, I) => {
1593
+ const S = f instanceof File ? f.name : `blob-${I}`;
1594
+ l.append("files", f, S);
1595
+ }), r && l.append(
1591
1596
  "validationJson",
1592
1597
  JSON.stringify({
1593
1598
  allowedMimeTypes: r.mimeTypes,
@@ -1599,25 +1604,25 @@ class ts {
1599
1604
  );
1600
1605
  const y = await fetch(c, {
1601
1606
  method: "POST",
1602
- body: h,
1607
+ body: l,
1603
1608
  headers: {
1604
- Authorization: `Bearer ${l}`
1609
+ Authorization: `Bearer ${h}`
1605
1610
  }
1606
1611
  });
1607
1612
  if (y.status === 422) {
1608
- const m = await y.json();
1609
- throw new mr(m.message, ps.minDimension);
1613
+ const f = await y.json();
1614
+ throw new mr(f.message, ps.minDimension);
1610
1615
  }
1611
1616
  if (!y.ok)
1612
1617
  throw new Error("Failed to stage files");
1613
1618
  return await y.json();
1614
- }, g(this, Pt, a);
1619
+ }, g(this, Pt, i);
1615
1620
  }
1616
1621
  }
1617
1622
  Pt = new WeakMap();
1618
1623
  var $t;
1619
1624
  class $r {
1620
- constructor(a) {
1625
+ constructor(i) {
1621
1626
  u(this, $t);
1622
1627
  this.setMinimum = async (t, e) => {
1623
1628
  const r = { minValue: { value: e } };
@@ -1643,18 +1648,18 @@ class $r {
1643
1648
  }, this.setNumberOfDecimals = async (t, e) => {
1644
1649
  const r = { numberOfDecimals: { value: e } };
1645
1650
  return this.applyPropertiesUpdate(t, r);
1646
- }, g(this, $t, a);
1651
+ }, g(this, $t, i);
1647
1652
  }
1648
- async applyPropertiesUpdate(a, t) {
1649
- const r = await (await i(this, $t)).updateNumberVariableProperties(a, JSON.stringify(t));
1653
+ async applyPropertiesUpdate(i, t) {
1654
+ const r = await (await a(this, $t)).updateNumberVariableProperties(i, JSON.stringify(t));
1650
1655
  return o(r);
1651
1656
  }
1652
1657
  }
1653
1658
  $t = new WeakMap();
1654
- var zt;
1655
- class zr {
1656
- constructor(a) {
1657
- u(this, zt);
1659
+ var Kt;
1660
+ class Kr {
1661
+ constructor(i) {
1662
+ u(this, Kt);
1658
1663
  this.setDisplayFormat = async (t, e) => {
1659
1664
  const r = { displayFormat: { value: e } };
1660
1665
  return this.applyPropertiesUpdate(t, r);
@@ -1670,47 +1675,47 @@ class zr {
1670
1675
  }, this.setExcludedDays = async (t, e) => {
1671
1676
  const r = { excludedDays: { value: e } };
1672
1677
  return this.applyPropertiesUpdate(t, r);
1673
- }, g(this, zt, a);
1678
+ }, g(this, Kt, i);
1674
1679
  }
1675
- async applyPropertiesUpdate(a, t) {
1676
- const r = await (await i(this, zt)).updateDateVariableProperties(a, JSON.stringify(t));
1680
+ async applyPropertiesUpdate(i, t) {
1681
+ const r = await (await a(this, Kt)).updateDateVariableProperties(i, JSON.stringify(t));
1677
1682
  return o(r);
1678
1683
  }
1679
1684
  }
1680
- zt = new WeakMap();
1681
- var f, At, Ft, os;
1685
+ Kt = new WeakMap();
1686
+ var w, At, Ft, os;
1682
1687
  let es = (os = class {
1683
1688
  /**
1684
1689
  * @ignore
1685
1690
  */
1686
- constructor(a) {
1691
+ constructor(i) {
1687
1692
  /**
1688
1693
  * @ignore
1689
1694
  */
1690
- u(this, f);
1695
+ u(this, w);
1691
1696
  u(this, At);
1692
1697
  u(this, Ft);
1693
- this.getAll = async () => (await i(this, f)).getVariables().then((e) => o(e)).then((e) => {
1698
+ this.getAll = async () => (await a(this, w)).getVariables().then((e) => o(e)).then((e) => {
1694
1699
  const r = e;
1695
1700
  return r.parsedData && (r.parsedData = this.makeVariablesBackwardsCompatible(r.parsedData)), r;
1696
- }), this.getById = async (t) => (await i(this, f)).getVariableById(t).then((r) => o(r)).then((r) => {
1701
+ }), this.getById = async (t) => (await a(this, w)).getVariableById(t).then((r) => o(r)).then((r) => {
1697
1702
  const n = r;
1698
1703
  return n.parsedData && (n.parsedData = this.makeVariableBackwardsCompatible(n.parsedData)), n;
1699
- }), this.getByName = async (t) => (await i(this, f)).getVariableByName(t).then((r) => o(r)).then((r) => {
1704
+ }), this.getByName = async (t) => (await a(this, w)).getVariableByName(t).then((r) => o(r)).then((r) => {
1700
1705
  const n = r;
1701
1706
  return n.parsedData && (n.parsedData = this.makeVariableBackwardsCompatible(n.parsedData)), n;
1702
- }), this.create = async (t, e) => (await i(this, f)).addVariable(t, e).then((n) => o(n)), this.remove = async (t) => (await i(this, f)).removeVariables(t).then((r) => o(r)), this.rename = async (t, e) => (await i(this, f)).setVariableName(t, e).then((n) => o(n)), this.setLabel = async (t, e) => (await i(this, f)).setVariableLabel(t, e).then((n) => o(n)), g(this, At, async (t, e) => (await i(this, f)).setVariablePlaceholder(t, e).then((n) => o(n))), this.setPlaceholder = async (t, e) => i(this, At).call(this, t, e), this.resetPlaceholder = async (t) => i(this, At).call(this, t, null), g(this, Ft, async (t, e) => (await i(this, f)).setVariableHelpText(t, e).then((n) => o(n))), this.setHelpText = async (t, e) => i(this, Ft).call(this, t, e), this.resetHelpText = async (t) => i(this, Ft).call(this, t, null), this.setType = async (t, e) => (await i(this, f)).setVariableType(t, e).then((n) => o(n)), this.setListVariable = async (t, e) => (await i(this, f)).setListVariableItems(
1707
+ }), this.create = async (t, e) => (await a(this, w)).addVariable(t, e).then((n) => o(n)), this.remove = async (t) => (await a(this, w)).removeVariables(t).then((r) => o(r)), this.rename = async (t, e) => (await a(this, w)).setVariableName(t, e).then((n) => o(n)), this.setLabel = async (t, e) => (await a(this, w)).setVariableLabel(t, e).then((n) => o(n)), g(this, At, async (t, e) => (await a(this, w)).setVariablePlaceholder(t, e).then((n) => o(n))), this.setPlaceholder = async (t, e) => a(this, At).call(this, t, e), this.resetPlaceholder = async (t) => a(this, At).call(this, t, null), g(this, Ft, async (t, e) => (await a(this, w)).setVariableHelpText(t, e).then((n) => o(n))), this.setHelpText = async (t, e) => a(this, Ft).call(this, t, e), this.resetHelpText = async (t) => a(this, Ft).call(this, t, null), this.setType = async (t, e) => (await a(this, w)).setVariableType(t, e).then((n) => o(n)), this.setListVariable = async (t, e) => (await a(this, w)).setListVariableItems(
1703
1708
  t,
1704
1709
  e.map((n) => JSON.stringify({ value: n }))
1705
- ).then((n) => o(n)), this.setValue = async (t, e) => (await i(this, f)).setVariableValue(t, e).then((n) => o(n)), this.duplicate = async (t) => (await i(this, f)).duplicateVariable(t).then((r) => o(r)), this.groupVariables = async (t, e) => (await i(this, f)).groupVariables(t, e).then((n) => o(n)), this.ungroupVariables = async (t) => (await i(this, f)).ungroupVariable(t).then((r) => o(r)), this.move = async (t, e, r) => (await i(this, f)).moveVariable(e, r, t).then((c) => o(c)), this.moveVariables = async (t, e, r) => (await i(this, f)).moveVariables(e, r, t).then((c) => o(c)), this.setIsVisible = async (t, e) => {
1706
- const r = e ? { type: xt.visible } : { type: xt.invisible };
1710
+ ).then((n) => o(n)), this.setValue = async (t, e) => (await a(this, w)).setVariableValue(t, e).then((n) => o(n)), this.duplicate = async (t) => (await a(this, w)).duplicateVariable(t).then((r) => o(r)), this.groupVariables = async (t, e) => (await a(this, w)).groupVariables(t, e).then((n) => o(n)), this.ungroupVariables = async (t) => (await a(this, w)).ungroupVariable(t).then((r) => o(r)), this.move = async (t, e, r) => (await a(this, w)).moveVariable(e, r, t).then((c) => o(c)), this.moveVariables = async (t, e, r) => (await a(this, w)).moveVariables(e, r, t).then((c) => o(c)), this.setIsVisible = async (t, e) => {
1711
+ const r = e ? { type: Mt.visible } : { type: Mt.invisible };
1707
1712
  return this.setVariableVisibility(t, r);
1708
1713
  }, this.setIsHidden = async (t, e) => {
1709
- const r = e ? { type: xt.invisible } : { type: xt.visible };
1714
+ const r = e ? { type: Mt.invisible } : { type: Mt.visible };
1710
1715
  return this.setVariableVisibility(t, r);
1711
- }, this.setVariableVisibility = async (t, e) => (await i(this, f)).setVariableVisibility(t, JSON.stringify(e)).then((n) => o(n)), this.setLayoutsForVariableVisibility = async (t) => (await i(this, f)).setLayoutsForVariableVisibility(t ? JSON.stringify(t) : null).then((r) => o(r)), this.setIsRequired = async (t, e) => (await i(this, f)).setVariableIsRequired(t, e).then((n) => o(n)), this.setIsReadonly = async (t, e) => (await i(this, f)).setVariableIsReadonly(t, e).then((n) => o(n)), this.getImageVariableConnectorId = async (t) => (await i(this, f)).getImageVariableConnectorId(t).then((r) => o(r)), this.setImageVariableConnector = async (t, e) => {
1712
- const r = await i(this, f), c = new ne().makeConnectorSourceForwardsCompatible(e);
1713
- return r.setImageVariableConnector(t, JSON.stringify(c)).then((l) => o(l));
1716
+ }, this.setVariableVisibility = async (t, e) => (await a(this, w)).setVariableVisibility(t, JSON.stringify(e)).then((n) => o(n)), this.setLayoutsForVariableVisibility = async (t) => (await a(this, w)).setLayoutsForVariableVisibility(t ? JSON.stringify(t) : null).then((r) => o(r)), this.setIsRequired = async (t, e) => (await a(this, w)).setVariableIsRequired(t, e).then((n) => o(n)), this.setIsReadonly = async (t, e) => (await a(this, w)).setVariableIsReadonly(t, e).then((n) => o(n)), this.getImageVariableConnectorId = async (t) => (await a(this, w)).getImageVariableConnectorId(t).then((r) => o(r)), this.setImageVariableConnector = async (t, e) => {
1717
+ const r = await a(this, w), c = new ne().makeConnectorSourceForwardsCompatible(e);
1718
+ return r.setImageVariableConnector(t, JSON.stringify(c)).then((h) => o(h));
1714
1719
  }, this.removeSource = async (t) => this.setValue(t, null), this.setPrefix = async (t, e) => {
1715
1720
  const r = { prefix: { value: e } };
1716
1721
  return this.applyPrefixSuffixDeltaUpdate(t, r);
@@ -1723,35 +1728,37 @@ let es = (os = class {
1723
1728
  }, this.setSuffixCharacterStyle = async (t, e) => {
1724
1729
  const r = { suffixCharacterStyleId: { value: e } };
1725
1730
  return this.applyPrefixSuffixDeltaUpdate(t, r);
1726
- }, this.setPrivateData = async (t, e) => (await i(this, f)).setVariablePrivateData(t, JSON.stringify(e)).then((n) => o(n)), this.getPrivateData = async (t) => (await i(this, f)).getVariablePrivateData(t).then((r) => o(r)), this.setAllowImageQuery = async (t, e) => (await i(this, f)).setImageVariableAllowQuery(t, e).then((n) => o(n)), this.setAllowImageUpload = async (t, e) => (await i(this, f)).setImageVariableAllowUpload(t, e).then((n) => o(n)), this.setMinImageUploadSize = async (t, e, r) => (await i(this, f)).setImageVariableUploadMinSize(t, e, r).then((c) => o(c)), g(this, f, a), this.number = new $r(i(this, f)), this.date = new zr(i(this, f));
1731
+ }, this.setPrivateData = async (t, e) => (await a(this, w)).setVariablePrivateData(t, JSON.stringify(e)).then((n) => o(n)), this.getPrivateData = async (t) => (await a(this, w)).getVariablePrivateData(t).then((r) => o(r)), this.setAllowImageQuery = async (t, e) => (await a(this, w)).setImageVariableAllowQuery(t, e).then((n) => o(n)), this.setAllowImageUpload = async (t, e) => (await a(this, w)).setImageVariableAllowUpload(t, e).then((n) => o(n)), this.setMinImageUploadSize = async (t, e, r) => (await a(this, w)).setImageVariableUploadMinSize(t, e, r).then((c) => o(c)), g(this, w, i), this.number = new $r(a(this, w)), this.date = new Kr(a(this, w));
1727
1732
  }
1728
- makeVariablesBackwardsCompatible(a) {
1729
- return a.map((t) => this.makeVariableBackwardsCompatible(t));
1733
+ makeVariablesBackwardsCompatible(i) {
1734
+ return i.map((t) => this.makeVariableBackwardsCompatible(t));
1730
1735
  }
1731
- makeVariableBackwardsCompatible(a) {
1732
- return a.type !== ae.list ? a : this.makeListVariableBackwardsCompatible(a);
1736
+ makeVariableBackwardsCompatible(i) {
1737
+ return i.type !== ae.list ? i : this.makeListVariableBackwardsCompatible(i);
1733
1738
  }
1734
- makeListVariableBackwardsCompatible(a) {
1735
- const t = a, e = a.items, r = a.selected, n = e.map((c) => c.value);
1739
+ makeListVariableBackwardsCompatible(i) {
1740
+ const t = i, e = i.items, r = i.selected, n = e.map((c) => c.value);
1736
1741
  return t.items = n, t.selected = r == null ? void 0 : r.value, t;
1737
1742
  }
1738
- async applyPrefixSuffixDeltaUpdate(a, t) {
1739
- const r = await (await i(this, f)).updateVariablePrefixSuffixProperties(a, JSON.stringify(t));
1743
+ async applyPrefixSuffixDeltaUpdate(i, t) {
1744
+ const r = await (await a(this, w)).updateVariablePrefixSuffixProperties(i, JSON.stringify(t));
1740
1745
  return o(r);
1741
1746
  }
1742
- }, f = new WeakMap(), At = new WeakMap(), Ft = new WeakMap(), os);
1743
- class Kr {
1747
+ }, w = new WeakMap(), At = new WeakMap(), Ft = new WeakMap(), os);
1748
+ class zr {
1744
1749
  /**
1745
1750
  * @ignore
1746
1751
  */
1747
- constructor(a) {
1752
+ constructor(i) {
1748
1753
  this.onVariableListChanged = (t) => {
1749
1754
  this.config.events.onVariableListChanged.trigger(JSON.parse(t));
1750
1755
  }, this.onConnectorsChanged = (t) => {
1751
1756
  this.config.events.onConnectorsChanged.trigger(JSON.parse(t));
1752
1757
  }, this.onPageSizeChanged = (t) => {
1753
1758
  this.config.events.onPageSizeChanged.trigger(JSON.parse(t));
1754
- }, this.config = a;
1759
+ }, this.onEngineEditModeChanged = (t) => {
1760
+ this.config.events.onEngineEditModeChanged.trigger(JSON.parse(t));
1761
+ }, this.config = i;
1755
1762
  }
1756
1763
  }
1757
1764
  var j;
@@ -1759,46 +1766,46 @@ class Wr {
1759
1766
  /**
1760
1767
  * @ignore
1761
1768
  */
1762
- constructor(a) {
1769
+ constructor(i) {
1763
1770
  /**
1764
1771
  * @ignore
1765
1772
  */
1766
1773
  u(this, j);
1767
- this.getAll = async () => (await i(this, j)).getVariables().then((e) => o(e)), this.getById = async (t) => (await i(this, j)).getVariableById(t).then((r) => o(r)), this.getByName = async (t) => (await i(this, j)).getVariableByName(t).then((r) => o(r)), this.setListVariable = async (t, e) => (await i(this, j)).setListVariableItems(
1774
+ this.getAll = async () => (await a(this, j)).getVariables().then((e) => o(e)), this.getById = async (t) => (await a(this, j)).getVariableById(t).then((r) => o(r)), this.getByName = async (t) => (await a(this, j)).getVariableByName(t).then((r) => o(r)), this.setListVariable = async (t, e) => (await a(this, j)).setListVariableItems(
1768
1775
  t,
1769
1776
  e.map((n) => JSON.stringify(n))
1770
- ).then((n) => o(n)), this.setImageVariableConnector = async (t, e) => (await i(this, j)).setImageVariableConnector(t, JSON.stringify(e)).then((n) => o(n)), g(this, j, a), this.image = new jr(a);
1777
+ ).then((n) => o(n)), this.setImageVariableConnector = async (t, e) => (await a(this, j)).setImageVariableConnector(t, JSON.stringify(e)).then((n) => o(n)), g(this, j, i), this.image = new qr(i);
1771
1778
  }
1772
1779
  }
1773
1780
  j = new WeakMap();
1774
- var yt;
1775
- class jr {
1776
- constructor(a) {
1777
- u(this, yt);
1778
- this.setAllowQuery = async (t, e) => (await i(this, yt)).setImageVariableAllowQuery(t, e).then((n) => o(n)), this.setAllowUpload = async (t, e) => (await i(this, yt)).setImageVariableAllowUpload(t, e).then((n) => o(n)), this.setMinUploadSize = async (t, e, r) => (await i(this, yt)).setImageVariableUploadMinSize(t, e, r).then((c) => o(c)), g(this, yt, a);
1779
- }
1780
- }
1781
- yt = new WeakMap();
1782
1781
  var pt;
1783
1782
  class qr {
1783
+ constructor(i) {
1784
+ u(this, pt);
1785
+ this.setAllowQuery = async (t, e) => (await a(this, pt)).setImageVariableAllowQuery(t, e).then((n) => o(n)), this.setAllowUpload = async (t, e) => (await a(this, pt)).setImageVariableAllowUpload(t, e).then((n) => o(n)), this.setMinUploadSize = async (t, e, r) => (await a(this, pt)).setImageVariableUploadMinSize(t, e, r).then((c) => o(c)), g(this, pt, i);
1786
+ }
1787
+ }
1788
+ pt = new WeakMap();
1789
+ var Ct;
1790
+ class jr {
1784
1791
  /**
1785
1792
  * @ignore
1786
1793
  */
1787
- constructor(a) {
1794
+ constructor(i) {
1788
1795
  /**
1789
1796
  * @ignore
1790
1797
  */
1791
- u(this, pt);
1792
- this.register = async (t) => (await i(this, pt)).registerConnector(JSON.stringify(t)).then((r) => o(r)), this.getById = async (t) => (await i(this, pt)).getConnectorById(t).then((r) => o(r)), this.getAllByType = async (t) => (await i(this, pt)).getConnectors(t).then((r) => o(r)), g(this, pt, a);
1798
+ u(this, Ct);
1799
+ this.register = async (t) => (await a(this, Ct)).registerConnector(JSON.stringify(t)).then((r) => o(r)), this.getById = async (t) => (await a(this, Ct)).getConnectorById(t).then((r) => o(r)), this.getAllByType = async (t) => (await a(this, Ct)).getConnectors(t).then((r) => o(r)), g(this, Ct, i);
1793
1800
  }
1794
1801
  }
1795
- pt = new WeakMap();
1802
+ Ct = new WeakMap();
1796
1803
  var Et, Wt;
1797
1804
  class Yr {
1798
1805
  /**
1799
1806
  * @ignore
1800
1807
  */
1801
- constructor(a) {
1808
+ constructor(i) {
1802
1809
  /**
1803
1810
  * @ignore
1804
1811
  */
@@ -1807,7 +1814,7 @@ class Yr {
1807
1814
  * @ignore
1808
1815
  */
1809
1816
  u(this, Wt);
1810
- this.setWidth = async (t) => (await i(this, Et)).setPageWidth(t).then((r) => o(r)), this.setHeight = async (t) => (await i(this, Et)).setPageHeight(t).then((r) => o(r)), g(this, Et, a), g(this, Wt, a);
1817
+ this.setWidth = async (t) => (await a(this, Et)).setPageWidth(t).then((r) => o(r)), this.setHeight = async (t) => (await a(this, Et)).setPageHeight(t).then((r) => o(r)), g(this, Et, i), g(this, Wt, i);
1811
1818
  }
1812
1819
  }
1813
1820
  Et = new WeakMap(), Wt = new WeakMap();
@@ -1817,35 +1824,35 @@ class ss {
1817
1824
  * The SDK should be configured clientside and it exposes all controllers to work with in other applications
1818
1825
  * @param config The configuration object where the SDK and editor can get configured
1819
1826
  */
1820
- constructor(a, t, e) {
1821
- this.config = a, this.connection = t, this.editorAPI = e, this.subscriber = new Kr(a), this.variable = new Wr(this.editorAPI), this.connector = new qr(this.editorAPI), this.page = new Yr(this.editorAPI), this.canvas = new Qt(this.editorAPI);
1827
+ constructor(i, t, e) {
1828
+ this.config = i, this.connection = t, this.editorAPI = e, this.subscriber = new zr(i), this.variable = new Wr(this.editorAPI), this.connector = new jr(this.editorAPI), this.page = new Yr(this.editorAPI), this.canvas = new Qt(this.editorAPI);
1822
1829
  }
1823
1830
  }
1824
1831
  class fs {
1825
- constructor(a) {
1826
- this.logger = a;
1832
+ constructor(i) {
1833
+ this.logger = i;
1827
1834
  }
1828
- createEventHandlerFn(a, t) {
1835
+ createEventHandlerFn(i, t) {
1829
1836
  return (...r) => {
1830
1837
  try {
1831
- const n = a(...r);
1832
- return n instanceof Promise ? n.catch((c) => this.handleError(c, t, a.name)) : n;
1838
+ const n = i(...r);
1839
+ return n instanceof Promise ? n.catch((c) => this.handleError(c, t, i.name)) : n;
1833
1840
  } catch (n) {
1834
- this.handleError(n, t, a.name);
1841
+ this.handleError(n, t, i.name);
1835
1842
  }
1836
1843
  };
1837
1844
  }
1838
- handleError(a, t, e) {
1845
+ handleError(i, t, e) {
1839
1846
  var r;
1840
- if (t === Jt.log)
1841
- (r = this.logger) == null || r.call(this, O.error, ws.event, `Error in callback ${e}: ${a}`);
1847
+ if (t === Bt.log)
1848
+ (r = this.logger) == null || r.call(this, x.error, ws.event, `Error in callback ${e}: ${i}`);
1842
1849
  else
1843
- throw a;
1850
+ throw i;
1844
1851
  }
1845
1852
  }
1846
1853
  class rs extends fs {
1847
- constructor(a, t) {
1848
- super(t), this.handler = a;
1854
+ constructor(i, t) {
1855
+ super(t), this.handler = i;
1849
1856
  }
1850
1857
  /**
1851
1858
  * Executes the defined handler with the provided arguments.
@@ -1853,15 +1860,15 @@ class rs extends fs {
1853
1860
  * @param args The arguments to pass to the callbacks.
1854
1861
  * @returns The result of executing the callbacks.
1855
1862
  */
1856
- trigger(...a) {
1863
+ trigger(...i) {
1857
1864
  const t = this.handler();
1858
1865
  if (t)
1859
- return this.createEventHandlerFn(t, Jt.throw)(...a);
1866
+ return this.createEventHandlerFn(t, Bt.throw)(...i);
1860
1867
  }
1861
1868
  }
1862
1869
  class C extends fs {
1863
- constructor(a, t) {
1864
- super(t), this.legacyHandler = a, this.subscriptions = /* @__PURE__ */ new Set();
1870
+ constructor(i, t) {
1871
+ super(t), this.legacyHandler = i, this.subscriptions = /* @__PURE__ */ new Set();
1865
1872
  }
1866
1873
  /**
1867
1874
  * Executes the registered callbacks with provided arguments
@@ -1869,11 +1876,11 @@ class C extends fs {
1869
1876
  * @param args The arguments to pass to the callbacks.
1870
1877
  * @returns The result of executing the callbacks.
1871
1878
  */
1872
- trigger(...a) {
1879
+ trigger(...i) {
1873
1880
  const t = this.legacyHandler();
1874
- t && this.createEventHandlerFn(t, Jt.log)(...a);
1881
+ t && this.createEventHandlerFn(t, Bt.log)(...i);
1875
1882
  for (const e of this.subscriptions)
1876
- e(...a);
1883
+ e(...i);
1877
1884
  }
1878
1885
  /**
1879
1886
  * Registers a callback function.
@@ -1885,8 +1892,8 @@ class C extends fs {
1885
1892
  * - "throw": Throws an error. Keep in mind that throwing of error in one of the callback will prevent calling of others
1886
1893
  * @returns A function to unsubscribe the callback, preventing it from being invoked in the future.
1887
1894
  */
1888
- registerCallback(a, t = Jt.log) {
1889
- const e = this.createEventHandlerFn(a, t);
1895
+ registerCallback(i, t = Bt.log) {
1896
+ const e = this.createEventHandlerFn(i, t);
1890
1897
  return this.subscriptions.add(e), () => {
1891
1898
  this.subscriptions.delete(e);
1892
1899
  };
@@ -1899,23 +1906,23 @@ class ie {
1899
1906
  * @param config The configuration object to create the runtime configuration object from.
1900
1907
  * @returns The runtime configuration object.
1901
1908
  */
1902
- static createRuntimeConfig(a) {
1903
- var e, r, n, c, l, h, y, p, m, S, b, v, J, A, k, D, I, _, $, Ct, mt, oe, ce, he, le, de, ue, ge, ye, pe, Ce, me, we, fe, Se;
1904
- const t = { ...a };
1909
+ static createRuntimeConfig(i) {
1910
+ var e, r, n, c, h, l, y, p, f, I, S, b, L, P, N, M, v, $, K, mt, wt, oe, ce, he, le, de, ue, ge, ye, pe, Ce, me, we, fe, Se;
1911
+ const t = { ...i };
1905
1912
  return t.logging = {
1906
- logLevel: ((e = a.logging) == null ? void 0 : e.logLevel) || O.error,
1907
- logger: ((r = a.logging) == null ? void 0 : r.logger) || ((Dt, jt, qt) => {
1913
+ logLevel: ((e = i.logging) == null ? void 0 : e.logLevel) || x.error,
1914
+ logger: ((r = i.logging) == null ? void 0 : r.logger) || ((Lt, qt, jt) => {
1908
1915
  var be;
1909
- if (ie.isLoggingEnabled(Dt, ((be = t.logging) == null ? void 0 : be.logLevel) ?? O.error))
1910
- switch (Dt) {
1911
- case O.error:
1912
- console.error(`[${jt}] [${Dt}] ${qt}`);
1916
+ if (ie.isLoggingEnabled(Lt, ((be = t.logging) == null ? void 0 : be.logLevel) ?? x.error))
1917
+ switch (Lt) {
1918
+ case x.error:
1919
+ console.error(`[${qt}] [${Lt}] ${jt}`);
1913
1920
  break;
1914
- case O.warn:
1915
- console.warn(`[${jt}] [${Dt}] ${qt}`);
1921
+ case x.warn:
1922
+ console.warn(`[${qt}] [${Lt}] ${jt}`);
1916
1923
  break;
1917
1924
  default:
1918
- console.log(`[${jt}] [${Dt}] ${qt}`);
1925
+ console.log(`[${qt}] [${Lt}] ${jt}`);
1919
1926
  }
1920
1927
  })
1921
1928
  }, t.handlers = {
@@ -1927,11 +1934,11 @@ class ie {
1927
1934
  }, t.events = {
1928
1935
  onActionsChanged: new C(
1929
1936
  () => t.onActionsChanged,
1930
- (l = t.logging) == null ? void 0 : l.logger
1937
+ (h = t.logging) == null ? void 0 : h.logger
1931
1938
  ),
1932
1939
  onStateChanged: new C(
1933
1940
  () => t.onStateChanged,
1934
- (h = t.logging) == null ? void 0 : h.logger
1941
+ (l = t.logging) == null ? void 0 : l.logger
1935
1942
  ),
1936
1943
  onDocumentLoaded: new C(
1937
1944
  () => t.onDocumentLoaded,
@@ -1943,55 +1950,55 @@ class ie {
1943
1950
  ),
1944
1951
  onFramesLayoutChanged: new C(
1945
1952
  () => t.onFramesLayoutChanged,
1946
- (m = t.logging) == null ? void 0 : m.logger
1953
+ (f = t.logging) == null ? void 0 : f.logger
1947
1954
  ),
1948
1955
  onSelectedFramesContentChanged: new C(
1949
1956
  () => t.onSelectedFramesContentChanged,
1950
- (S = t.logging) == null ? void 0 : S.logger
1957
+ (I = t.logging) == null ? void 0 : I.logger
1951
1958
  ),
1952
1959
  onPageSelectionChanged: new C(
1953
1960
  () => t.onPageSelectionChanged,
1954
- (b = t.logging) == null ? void 0 : b.logger
1961
+ (S = t.logging) == null ? void 0 : S.logger
1955
1962
  ),
1956
1963
  onSelectedLayoutPropertiesChanged: new C(
1957
1964
  () => t.onSelectedLayoutPropertiesChanged,
1958
- (v = t.logging) == null ? void 0 : v.logger
1965
+ (b = t.logging) == null ? void 0 : b.logger
1959
1966
  ),
1960
1967
  onSelectedLayoutUnitChanged: new C(
1961
1968
  () => t.onSelectedLayoutUnitChanged,
1962
- (J = t.logging) == null ? void 0 : J.logger
1969
+ (L = t.logging) == null ? void 0 : L.logger
1963
1970
  ),
1964
1971
  onScrubberPositionChanged: new C(
1965
1972
  () => t.onScrubberPositionChanged,
1966
- (A = t.logging) == null ? void 0 : A.logger
1973
+ (P = t.logging) == null ? void 0 : P.logger
1967
1974
  ),
1968
1975
  onFrameAnimationsChanged: new C(
1969
1976
  () => t.onFrameAnimationsChanged,
1970
- (k = t.logging) == null ? void 0 : k.logger
1977
+ (N = t.logging) == null ? void 0 : N.logger
1971
1978
  ),
1972
1979
  onVariableListChanged: new C(
1973
1980
  () => t.onVariableListChanged,
1974
- (D = t.logging) == null ? void 0 : D.logger
1981
+ (M = t.logging) == null ? void 0 : M.logger
1975
1982
  ),
1976
1983
  onSelectedToolChanged: new C(
1977
1984
  () => t.onSelectedToolChanged,
1978
- (I = t.logging) == null ? void 0 : I.logger
1985
+ (v = t.logging) == null ? void 0 : v.logger
1979
1986
  ),
1980
1987
  onUndoStackStateChanged: new C(
1981
1988
  () => t.onUndoStackStateChanged,
1982
- (_ = t.logging) == null ? void 0 : _.logger
1989
+ ($ = t.logging) == null ? void 0 : $.logger
1983
1990
  ),
1984
1991
  onSelectedLayoutFramesChanged: new C(
1985
1992
  () => t.onSelectedLayoutFramesChanged,
1986
- ($ = t.logging) == null ? void 0 : $.logger
1993
+ (K = t.logging) == null ? void 0 : K.logger
1987
1994
  ),
1988
1995
  onSelectedTextStyleChanged: new C(
1989
1996
  () => t.onSelectedTextStyleChanged,
1990
- (Ct = t.logging) == null ? void 0 : Ct.logger
1997
+ (mt = t.logging) == null ? void 0 : mt.logger
1991
1998
  ),
1992
1999
  onColorsChanged: new C(
1993
2000
  () => t.onColorsChanged,
1994
- (mt = t.logging) == null ? void 0 : mt.logger
2001
+ (wt = t.logging) == null ? void 0 : wt.logger
1995
2002
  ),
1996
2003
  onParagraphStylesChanged: new C(
1997
2004
  () => t.onParagraphStylesChanged,
@@ -2073,11 +2080,15 @@ class ie {
2073
2080
  onEngineEditModeChanged: new C(
2074
2081
  () => t.onEngineEditModeChanged,
2075
2082
  t.logging.logger
2083
+ ),
2084
+ onBrandKitMediaChanged: new C(
2085
+ () => t.onBrandKitMediaChanged,
2086
+ t.logging.logger
2076
2087
  )
2077
2088
  }, t;
2078
2089
  }
2079
- static isLoggingEnabled(a, t) {
2080
- return t == O.info || t == O.warn && (a == O.warn || a == O.error) ? !0 : t == O.error && a == O.error;
2090
+ static isLoggingEnabled(i, t) {
2091
+ return t == x.info || t == x.warn && (i == x.warn || i == x.error) ? !0 : t == x.error && i == x.error;
2081
2092
  }
2082
2093
  }
2083
2094
  class Zr {
@@ -2087,8 +2098,8 @@ class Zr {
2087
2098
  * @param value The value to check.
2088
2099
  * @returns `true` if the value is a `DatePropertyWrapper`, otherwise `false`.
2089
2100
  */
2090
- isDatePropertyWrapper(a) {
2091
- return typeof a == "object" && (a == null ? void 0 : a.type) === "date";
2101
+ isDatePropertyWrapper(i) {
2102
+ return typeof i == "object" && (i == null ? void 0 : i.type) === "date";
2092
2103
  }
2093
2104
  /**
2094
2105
  * Checks if the given value is a `Date` object instance.
@@ -2096,8 +2107,8 @@ class Zr {
2096
2107
  * @param value The value to check.
2097
2108
  * @returns `true` if the value is a `Date` object, otherwise `false`.
2098
2109
  */
2099
- isDateObject(a) {
2100
- return a instanceof Date;
2110
+ isDateObject(i) {
2111
+ return i instanceof Date;
2101
2112
  }
2102
2113
  /**
2103
2114
  * Transforms an `EngineDataItem` into a `DataItem`.
@@ -2108,9 +2119,9 @@ class Zr {
2108
2119
  * @param dataItem the EngineDataItem to transform.
2109
2120
  * @returns the resulting `DataItem` with parsed date properties.
2110
2121
  */
2111
- mapEngineToDataItem(a) {
2122
+ mapEngineToDataItem(i) {
2112
2123
  const t = {};
2113
- return Object.entries(a).forEach(([e, r]) => {
2124
+ return Object.entries(i).forEach(([e, r]) => {
2114
2125
  t[e] = this.isDatePropertyWrapper(r) ? new Date(r.value) : r;
2115
2126
  }), t;
2116
2127
  }
@@ -2123,58 +2134,58 @@ class Zr {
2123
2134
  * @param dataItem the `DataItem` to transform.
2124
2135
  * @returns the resulting `EngineDataItem` with parsed date properties.
2125
2136
  */
2126
- mapDataItemToEngine(a) {
2137
+ mapDataItemToEngine(i) {
2127
2138
  const t = {};
2128
- return Object.entries(a).forEach(([e, r]) => {
2139
+ return Object.entries(i).forEach(([e, r]) => {
2129
2140
  t[e] = this.isDateObject(r) ? { value: r.getTime(), type: "date" } : r;
2130
2141
  }), t;
2131
2142
  }
2132
2143
  }
2133
- var nt;
2144
+ var it;
2134
2145
  class Qr {
2135
2146
  /**
2136
2147
  * @ignore
2137
2148
  */
2138
- constructor(a) {
2149
+ constructor(i) {
2139
2150
  /**
2140
2151
  * @ignore
2141
2152
  */
2142
- u(this, nt);
2143
- g(this, nt, a);
2153
+ u(this, it);
2154
+ g(this, it, i);
2144
2155
  }
2145
2156
  /**
2146
2157
  * This method returns the value for a given configuration key. If a value was not found in the configuration store
2147
2158
  * this method returns an error. The key cannot be null.
2148
2159
  * @returns value for a given configuration key
2149
2160
  */
2150
- async getValue(a) {
2151
- return (await i(this, nt)).getConfigValue(a).then((e) => o(e));
2161
+ async getValue(i) {
2162
+ return (await a(this, it)).getConfigValue(i).then((e) => o(e));
2152
2163
  }
2153
2164
  /**
2154
2165
  * This method sets, or overrides the value for a given key. Null values are not allowed for both key and value,
2155
2166
  * using them will result in an error.
2156
2167
  * @returns
2157
2168
  */
2158
- async setValue(a, t) {
2159
- return (await i(this, nt)).setConfigValue(a, t).then((r) => o(r));
2169
+ async setValue(i, t) {
2170
+ return (await a(this, it)).setConfigValue(i, t).then((r) => o(r));
2160
2171
  }
2161
2172
  /**
2162
2173
  * This method updates the studio options. Only defined options are updated, null values are ignored.
2163
2174
  * @returns
2164
2175
  */
2165
- async updateStudioOptions(a) {
2166
- return (await i(this, nt)).updateStudioOptions(JSON.stringify(a)).then((e) => o(e));
2176
+ async updateStudioOptions(i) {
2177
+ return (await a(this, it)).updateStudioOptions(JSON.stringify(i)).then((e) => o(e));
2167
2178
  }
2168
2179
  /**
2169
2180
  * This method returns the engine session id. This id is unique for this engine session
2170
2181
  * @returns the engine session id
2171
2182
  */
2172
2183
  async getEngineSessionId() {
2173
- return (await i(this, nt)).getEngineSessionId().then((t) => o(t));
2184
+ return (await a(this, it)).getEngineSessionId().then((t) => o(t));
2174
2185
  }
2175
2186
  }
2176
- nt = new WeakMap();
2177
- var Lt;
2187
+ it = new WeakMap();
2188
+ var Dt;
2178
2189
  class ns extends Qr {
2179
2190
  /**
2180
2191
  * @ignore
@@ -2184,8 +2195,8 @@ class ns extends Qr {
2184
2195
  /**
2185
2196
  * @ignore
2186
2197
  */
2187
- u(this, Lt);
2188
- g(this, Lt, e);
2198
+ u(this, Dt);
2199
+ g(this, Dt, e);
2189
2200
  }
2190
2201
  /**
2191
2202
  * This method returns the value for a given configuration key. If a value was not found in the configuration store,
@@ -2193,7 +2204,7 @@ class ns extends Qr {
2193
2204
  * @returns value for a given configuration key
2194
2205
  */
2195
2206
  async getValue(t) {
2196
- const e = i(this, Lt).get(t);
2207
+ const e = a(this, Dt).get(t);
2197
2208
  return e != null ? o(
2198
2209
  {
2199
2210
  status: 200,
@@ -2212,18 +2223,18 @@ class ns extends Qr {
2212
2223
  */
2213
2224
  async setValue(t, e) {
2214
2225
  const r = super.setValue(t, e);
2215
- return i(this, Lt).set(t, e), r;
2226
+ return a(this, Dt).set(t, e), r;
2216
2227
  }
2217
2228
  }
2218
- Lt = new WeakMap();
2229
+ Dt = new WeakMap();
2219
2230
  const Xr = "studio-cdn.chiligrafx.com", tn = `https://${Xr}/editor/${cs.current}/web`;
2220
- let Z;
2231
+ let Q;
2221
2232
  class Nn {
2222
2233
  /**
2223
2234
  * The SDK should be configured clientside and it exposes all controllers to work with in other applications
2224
2235
  * @param config The configuration object where the SDK and editor can get configured
2225
2236
  */
2226
- constructor(a) {
2237
+ constructor(i) {
2227
2238
  this.localConfig = /* @__PURE__ */ new Map(), this.dataItemMappingTools = new Zr(), this.loadEditor = () => {
2228
2239
  var t;
2229
2240
  Ws(
@@ -2277,30 +2288,31 @@ class Nn {
2277
2288
  onDataSourceIdChanged: this.subscriber.onDataSourceIdChanged,
2278
2289
  onDocumentIssueListChanged: this.subscriber.onDocumentIssueListChanged,
2279
2290
  onCustomUndoDataChanged: this.subscriber.onCustomUndoDataChanged,
2280
- onEngineEditModeChanged: this.subscriber.onEngineEditModeChanged
2291
+ onEngineEditModeChanged: this.subscriber.onEngineEditModeChanged,
2292
+ onBrandKitMediaChanged: this.subscriber.onBrandKitMediaChanged
2281
2293
  },
2282
2294
  this.setConnection,
2283
2295
  this.config.editorId,
2284
2296
  this.config.studioStyling
2285
- ), this.editorAPI = Z == null ? void 0 : Z.promise.then((e) => e), this.action = new Ae(this.editorAPI), this.layout = new We(this.editorAPI), this.frame = new ze(this.editorAPI), this.barcode = new Ee(this.editorAPI), this.animation = new Fe(this.editorAPI), this.document = new Ge(this.editorAPI), this.configuration = new ns(this.editorAPI, this.localConfig), this.utils = new ts(this.localConfig), this.tool = new Qe(this.editorAPI), this.page = new qe(this.editorAPI), this.debug = new Te(this.editorAPI), this.undoManager = new Xe(this.editorAPI, this), this.textSelection = new Ze(this.editorAPI), this.colorStyle = new Je(this.editorAPI), this.paragraphStyle = new Ye(this.editorAPI), this.characterStyle = new Re(this.editorAPI), this.mediaConnector = new je(this.editorAPI), this.fontConnector = new _e(this.editorAPI), this.dataConnector = new Ue(this.editorAPI, this.dataItemMappingTools), this.dataSource = new ke(this.editorAPI, this.dataItemMappingTools), this.connector = new Be(this.editorAPI, this.localConfig), this.variable = new es(this.editorAPI), this.font = new $e(this.editorAPI), this.experiment = new He(this.editorAPI), this.canvas = new Qt(this.editorAPI), this.shape = new ee(this.editorAPI), this.colorConversion = new Ve(this.editorAPI), this.info = new Ke(), this.clipboard = new Me(this.editorAPI), this.brandKit = new xe(this.editorAPI, this), this.next = new ss(this.config, this.connection, this.editorAPI), this.configuration.setValue(Y.GraFxStudioSdkVersion, hs.version), this.configuration.setValue(
2286
- Y.GraFxStudioDocumentType,
2297
+ ), this.editorAPI = Q == null ? void 0 : Q.promise.then((e) => e), this.action = new Ae(this.editorAPI), this.layout = new We(this.editorAPI), this.frame = new Ke(this.editorAPI), this.barcode = new Ee(this.editorAPI), this.animation = new Fe(this.editorAPI), this.document = new Ge(this.editorAPI), this.configuration = new ns(this.editorAPI, this.localConfig), this.utils = new ts(this.localConfig), this.tool = new Qe(this.editorAPI), this.page = new je(this.editorAPI), this.debug = new Te(this.editorAPI), this.undoManager = new Xe(this.editorAPI, this), this.textSelection = new Ze(this.editorAPI), this.colorStyle = new Be(this.editorAPI), this.paragraphStyle = new Ye(this.editorAPI), this.characterStyle = new xe(this.editorAPI), this.mediaConnector = new qe(this.editorAPI), this.fontConnector = new _e(this.editorAPI), this.dataConnector = new Ue(this.editorAPI, this.dataItemMappingTools), this.dataSource = new ke(this.editorAPI, this.dataItemMappingTools), this.connector = new Je(this.editorAPI, this.localConfig), this.variable = new es(this.editorAPI), this.font = new $e(this.editorAPI), this.experiment = new He(this.editorAPI), this.canvas = new Qt(this.editorAPI), this.shape = new ee(this.editorAPI), this.colorConversion = new Ve(this.editorAPI), this.info = new ze(), this.clipboard = new Re(this.editorAPI), this.brandKit = new Me(this.editorAPI, this), this.next = new ss(this.config, this.connection, this.editorAPI), this.configuration.setValue(Z.GraFxStudioSdkVersion, hs.version), this.configuration.setValue(
2298
+ Z.GraFxStudioDocumentType,
2287
2299
  this.config.documentType || gs.template
2288
- ), this.configuration.updateStudioOptions(this.config.studioOptions || js), this.configuration.setValue(
2289
- Y.QueryCallCacheEnabled,
2300
+ ), this.configuration.updateStudioOptions(this.config.studioOptions || qs), this.configuration.setValue(
2301
+ Z.QueryCallCacheEnabled,
2290
2302
  ((t = this.config.enableQueryCallCache) == null ? void 0 : t.toString()) || "false"
2291
2303
  );
2292
2304
  }, this.setConnection = (t) => {
2293
- Z = t;
2294
- }, this.config = ie.createRuntimeConfig(a), this.connection = Z, this.editorAPI = Z == null ? void 0 : Z.promise.then((t) => t), this.action = new Ae(this.editorAPI), this.layout = new We(this.editorAPI), this.frame = new ze(this.editorAPI), this.shape = new ee(this.editorAPI), this.barcode = new Ee(this.editorAPI), this.undoManager = new Xe(this.editorAPI, this), this.connector = new Be(this.editorAPI, this.localConfig), this.mediaConnector = new je(this.editorAPI), this.fontConnector = new _e(this.editorAPI), this.dataConnector = new Ue(this.editorAPI, this.dataItemMappingTools), this.dataSource = new ke(this.editorAPI, this.dataItemMappingTools), this.animation = new Fe(this.editorAPI), this.document = new Ge(this.editorAPI), this.configuration = new ns(this.editorAPI, this.localConfig), this.variable = new es(this.editorAPI), this.utils = new ts(this.localConfig), this.subscriber = new Ur(this.config, this.localConfig), this.tool = new Qe(this.editorAPI), this.page = new qe(this.editorAPI), this.debug = new Te(this.editorAPI), this.textSelection = new Ze(this.editorAPI), this.colorStyle = new Je(this.editorAPI), this.paragraphStyle = new Ye(this.editorAPI), this.characterStyle = new Re(this.editorAPI), this.font = new $e(this.editorAPI), this.experiment = new He(this.editorAPI), this.canvas = new Qt(this.editorAPI), this.colorConversion = new Ve(this.editorAPI), this.info = new Ke(), this.clipboard = new Me(this.editorAPI), this.next = new ss(this.config, this.connection, this.editorAPI), this.enabledNextSubscribers = this.config.enableNextSubscribers, this.brandKit = new xe(this.editorAPI, this);
2305
+ Q = t;
2306
+ }, this.config = ie.createRuntimeConfig(i), this.connection = Q, this.editorAPI = Q == null ? void 0 : Q.promise.then((t) => t), this.action = new Ae(this.editorAPI), this.layout = new We(this.editorAPI), this.frame = new Ke(this.editorAPI), this.shape = new ee(this.editorAPI), this.barcode = new Ee(this.editorAPI), this.undoManager = new Xe(this.editorAPI, this), this.connector = new Je(this.editorAPI, this.localConfig), this.mediaConnector = new qe(this.editorAPI), this.fontConnector = new _e(this.editorAPI), this.dataConnector = new Ue(this.editorAPI, this.dataItemMappingTools), this.dataSource = new ke(this.editorAPI, this.dataItemMappingTools), this.animation = new Fe(this.editorAPI), this.document = new Ge(this.editorAPI), this.configuration = new ns(this.editorAPI, this.localConfig), this.variable = new es(this.editorAPI), this.utils = new ts(this.localConfig), this.subscriber = new Ur(this.config, this.localConfig), this.tool = new Qe(this.editorAPI), this.page = new je(this.editorAPI), this.debug = new Te(this.editorAPI), this.textSelection = new Ze(this.editorAPI), this.colorStyle = new Be(this.editorAPI), this.paragraphStyle = new Ye(this.editorAPI), this.characterStyle = new xe(this.editorAPI), this.font = new $e(this.editorAPI), this.experiment = new He(this.editorAPI), this.canvas = new Qt(this.editorAPI), this.colorConversion = new Ve(this.editorAPI), this.info = new ze(), this.clipboard = new Re(this.editorAPI), this.next = new ss(this.config, this.connection, this.editorAPI), this.enabledNextSubscribers = this.config.enableNextSubscribers, this.brandKit = new Me(this.editorAPI, this);
2295
2307
  }
2296
2308
  }
2297
2309
  var en = /* @__PURE__ */ ((s) => (s.top = "top", s.left = "left", s.right = "right", s.bottom = "bottom", s.topLeft = "topLeft", s.topRight = "topRight", s.bottomLeft = "bottomLeft", s.bottomRight = "bottomRight", s))(en || {}), sn = /* @__PURE__ */ ((s) => (s.horizontal = "horizontal", s.vertical = "vertical", s))(sn || {}), rn = /* @__PURE__ */ ((s) => (s.easeIn = "easeIn", s.easeOut = "easeOut", s.easeInOut = "easeInOut", s))(rn || {}), nn = /* @__PURE__ */ ((s) => (s.quadratic = "Quadratic", s.cubic = "Cubic", s.quartic = "Quartic", s.quintic = "Quintic", s.sine = "Sine", s.exponential = "Exponential", s.circular = "Circular", s.elastic = "Elastic", s.bounce = "Bounce", s.back = "Back", s))(nn || {}), an = /* @__PURE__ */ ((s) => (s.bounce = "bounce", s.flash = "flash", s.headshake = "headShake", s.heartbeat = "heartbeat", s.pulse = "pulse", s.rubberBand = "rubberBand", s.vertical = "vertical", s.horizontal = "horizontal", s.swing = "swing", s.tada = "tada", s))(an || {}), on = /* @__PURE__ */ ((s) => (s.preview = "preview", s.normal = "normal", s))(on || {}), cn = /* @__PURE__ */ ((s) => (s.Square = "square", s.Line = "line", s))(cn || {}), hn = /* @__PURE__ */ ((s) => (s.BOLD = "Bold", s.ITALIC = "Italic", s.REGULAR = "Regular", s))(hn || {}), ln = /* @__PURE__ */ ((s) => (s.LEFT = "left", s.CENTER = "center", s.RIGHT = "right", s.JUSTIFY = "justify", s))(ln || {}), dn = /* @__PURE__ */ ((s) => (s.TOP = "top", s.CENTER = "center", s.BOTTOM = "bottom", s))(dn || {}), un = /* @__PURE__ */ ((s) => (s.TO_LOWER_CASE = "lowercase", s.TO_UPPER_CASE = "uppercase", s.NORMAL = "normal", s))(un || {}), gn = /* @__PURE__ */ ((s) => (s.SUPERSCRIPT = "superscript", s.SUBSCRIPT = "subscript", s.NORMAL = "normal", s))(gn || {}), yn = /* @__PURE__ */ ((s) => (s.STYLE = "textStyle", s.PROPERTIES = "textProperties", s.APPEARANCE = "appearance", s))(yn || {}), pn = /* @__PURE__ */ ((s) => (s.PARAGRAPH = "paragraphStyleId", s.CHARACTER = "characterStyleId", s.FONT_FAMILY = "fontKey", s.FONT_STYLE = "fontStyle", s.FONT_SIZE = "fontSize", s.LETTER_SPACING = "letterSpacing", s.LINE_HEIGHT = "lineHeight", s.TEXT_ALIGN = "textAlign", s.VERTICAL_ALIGN = "verticalAlign", s.TYPOGRAPHIC_CASE = "typographicCase", s.SUB_SUPER_SCRIPT = "subSuperScript", s.UNDERLINE = "underline", s.LINE_THROUGH = "lineThrough", s.FILL_COLOR = "fillColor", s.COLOR = "color", s.FILL_COLOR_APPLIED = "fillColorApplied", s.STROKE_COLOR = "strokeColor", s.STROKE_COLOR_APPLIED = "strokeColorApplied", s.DROP_SHADOW_COLOR = "dropShadowColor", s.BLEND_MODE = "blendMode", s.OPACITY = "opacity", s.TRACKING_RIGHT = "trackingRight", s.BASELINE_SHIFT = "baselineShiftValue", s.STROKE_WIDTH = "strokeWidth", s))(pn || {}), Cn = /* @__PURE__ */ ((s) => (s.selectedLayoutChanged = "selectedLayoutChanged", s.frameMoved = "frameMoved", s.pageSizeChanged = "pageSizeChanged", s.documentLoaded = "documentLoaded", s.variableValueChanged = "variableValueChanged", s))(Cn || {}), mn = /* @__PURE__ */ ((s) => (s.ellipse = "ellipse", s.rectangle = "rectangle", s.polygon = "polygon", s))(mn || {}), wn = /* @__PURE__ */ ((s) => (s.all = "all", s.only = "only", s.none = "none", s))(wn || {}), fn = /* @__PURE__ */ ((s) => (s.normal = "normal", s.textEdit = "textEdit", s.customCrop = "customCrop", s.frameSubjectArea = "frameSubjectArea", s.perAssetCrop = "perAssetCrop", s))(fn || {}), Ss = /* @__PURE__ */ ((s) => (s.url = "url", s.grafx = "grafx", s.local = "local", s))(Ss || {});
2298
- const xn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2310
+ const Mn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2299
2311
  __proto__: null,
2300
2312
  ConnectorRegistrationSource: Ss
2301
2313
  }, Symbol.toStringTag, { value: "Module" }));
2302
2314
  export {
2303
- xr as ActionAsyncError,
2315
+ Mr as ActionAsyncError,
2304
2316
  Cn as ActionEditorEvent,
2305
2317
  ln as Alignment,
2306
2318
  Nr as AnchorTargetEdgeType,
@@ -2308,10 +2320,10 @@ export {
2308
2320
  pr as AuthCredentialsTypeEnum,
2309
2321
  Cr as AuthRefreshTypeEnum,
2310
2322
  fr as AutoGrowDirection,
2311
- wt as BarcodeCharacterSet,
2323
+ ft as BarcodeCharacterSet,
2312
2324
  Ot as BarcodeErrorCorrectionLevel,
2313
2325
  br as BarcodeSourceTypeEnum,
2314
- T as BarcodeType,
2326
+ G as BarcodeType,
2315
2327
  Qs as BarcodeValidationResult,
2316
2328
  an as BasicAnimationsEmphasisStyles,
2317
2329
  Ar as BlendMode,
@@ -2330,11 +2342,11 @@ export {
2330
2342
  or as ConnectorType,
2331
2343
  wn as CornerRadiusType,
2332
2344
  Cs as CropType,
2333
- Rr as DataRowAsyncError,
2334
- Mr as Day,
2345
+ xr as DataRowAsyncError,
2346
+ Rr as Day,
2335
2347
  Xt as DeprecatedMediaConnectorDownloadType,
2336
- Mt as DeprecatedMediaType,
2337
- qs as DocumentIssueTypeEnum,
2348
+ Rt as DeprecatedMediaType,
2349
+ js as DocumentIssueTypeEnum,
2338
2350
  gs as DocumentType,
2339
2351
  Gr as DownloadFormats,
2340
2352
  rn as EaseTypes,
@@ -2346,11 +2358,11 @@ export {
2346
2358
  cn as FontPreviewFormat,
2347
2359
  hn as FontWeights,
2348
2360
  En as FrameAnchorTarget,
2349
- Dr as FrameAnchorType,
2361
+ Lr as FrameAnchorType,
2350
2362
  kr as FramePropertyNames,
2351
2363
  Sr as FrameTypeEnum,
2352
2364
  vn as GrafxTokenAuthCredentials,
2353
- Kt as ImageSourceTypeEnum,
2365
+ zt as ImageSourceTypeEnum,
2354
2366
  er as LayoutIntent,
2355
2367
  Tr as LayoutPropertyNames,
2356
2368
  Xs as LayoutType,
@@ -2359,9 +2371,9 @@ export {
2359
2371
  ms as MediaDownloadIntent,
2360
2372
  se as MediaDownloadType,
2361
2373
  Vt as MediaType,
2362
- xn as Next,
2374
+ Mn as Next,
2363
2375
  Fn as PageAnchorTarget,
2364
- q as PositionEnum,
2376
+ Y as PositionEnum,
2365
2377
  Pn as RefreshedAuthCredendentials,
2366
2378
  gn as Scripting,
2367
2379
  yn as SelectedTextStyleSections,
@@ -2373,18 +2385,18 @@ export {
2373
2385
  hr as SortOrder,
2374
2386
  Ir as TextDirection,
2375
2387
  dn as TextPosition,
2376
- G as ToolType,
2388
+ H as ToolType,
2377
2389
  nn as TweenTypes,
2378
- Lr as UpdateZIndexMethod,
2390
+ Dr as UpdateZIndexMethod,
2379
2391
  mr as UploadAssetValidationError,
2380
2392
  ps as UploadAssetValidationErrorType,
2381
2393
  ae as VariableType,
2382
- Br as VariableVisibilityOperator,
2383
- Jr as VariableVisibilityTargetType,
2384
- xt as VariableVisibilityType,
2394
+ Jr as VariableVisibilityOperator,
2395
+ Br as VariableVisibilityTargetType,
2396
+ Mt as VariableVisibilityType,
2385
2397
  Pr as VerticalAlign,
2386
2398
  on as ViewMode,
2387
- Y as WellKnownConfigurationKeys,
2399
+ Z as WellKnownConfigurationKeys,
2388
2400
  Nn as default,
2389
2401
  In as grafxMediaConnectorRegistration
2390
2402
  };