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