@opentiny/tiny-engine-setting-events 2.7.0-rc.0 → 2.8.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,540 +1,342 @@
1
1
  import "./style.css";
2
- import { ref as Xe, reactive as Ze, provide as vt, nextTick as wt, resolveComponent as H, createBlock as ve, openBlock as j, withCtx as X, createElementVNode as _, createVNode as S, resolveDynamicComponent as dt, createTextVNode as Ue, unref as W, createElementBlock as se, Fragment as Qe, withDirectives as ct, renderList as st, normalizeClass as Je, toDisplayString as ge, createCommentVNode as et, vShow as ht, computed as Ye, watchEffect as bt, watch as ut, inject as _t } from "vue";
3
- import { callEntry as k, META_APP as V, getMetaApi as M, getOptions as re, useLayout as J, useHistory as le, useCanvas as N, getMergeMeta as K, useBlock as Ne, useMaterial as Ie, useModal as Le, useMessage as Be, useProperties as ne } from "@opentiny/tiny-engine-meta-register";
4
- import { TinyAlert as kt, DialogBox as Et, Button as tt, Form as Dt, FormItem as ft, Input as rt, Popover as St, Tooltip as At, Collapse as Nt, CollapseItem as gt, Checkbox as It, Search as Lt } from "@opentiny/vue";
5
- import Pe from "@opentiny/tiny-engine-common/js/i18n";
6
- import { SvgButton as Ve, BlockLinkEvent as Me, PluginPanel as Bt, VueMonaco as $e } from "@opentiny/tiny-engine-common";
7
- import { iconChevronDown as Oe } from "@opentiny/vue-icon";
8
- import { string2Ast as ae } from "@opentiny/tiny-engine-common/js/ast";
9
- import { CodeConfigurator as Ee, InputConfigurator as Ce, VariableConfigurator as ye, SwitchConfigurator as xe } from "@opentiny/tiny-engine-configurator";
10
- import { PROP_DATA_TYPE as fe } from "@opentiny/tiny-engine-common/js/constants";
11
- import { constants as De, utils as Se } from "@opentiny/tiny-engine-utils";
12
- const Z = {
2
+ import { ref as Lt, reactive as Ut, provide as he, nextTick as Ee, resolveComponent as B, createBlock as tt, openBlock as S, withCtx as I, createElementVNode as m, createVNode as _, resolveDynamicComponent as te, createTextVNode as Dt, unref as O, createElementBlock as J, Fragment as $t, withDirectives as ee, renderList as Ht, normalizeClass as It, toDisplayString as W, createCommentVNode as zt, vShow as ne, computed as Tt, watchEffect as ue, watch as ie, inject as ge } from "vue";
3
+ import { callEntry as b, META_APP as C, getMetaApi as k, getOptions as X, useLayout as N, useHistory as K, useCanvas as y, getMergeMeta as L, useBlock as pt, useMaterial as vt, useModal as bt, useMessage as _t, useProperties as $ } from "@opentiny/tiny-engine-meta-register";
4
+ import { TinyAlert as ye, DialogBox as fe, Button as Ft, Form as we, FormItem as oe, Input as qt, Popover as xe, Tooltip as Ce, Collapse as ke, CollapseItem as se, Checkbox as De, Search as Se } from "@opentiny/vue";
5
+ import Et from "@opentiny/tiny-engine-common/js/i18n";
6
+ import { SvgButton as yt, BlockLinkEvent as wt, PluginPanel as Ae, VueMonaco as St } from "@opentiny/tiny-engine-common";
7
+ import { iconChevronDown as xt } from "@opentiny/vue-icon";
8
+ import { string2Ast as H } from "@opentiny/tiny-engine-common/js/ast";
9
+ import { CodeConfigurator as st, InputConfigurator as rt, VariableConfigurator as at, SwitchConfigurator as lt } from "@opentiny/tiny-engine-configurator";
10
+ import { PROP_DATA_TYPE as G } from "@opentiny/tiny-engine-common/js/constants";
11
+ import { constants as ht, utils as ut } from "@opentiny/tiny-engine-utils";
12
+ const R = {
13
13
  id: "engine.setting.event",
14
14
  title: "高级",
15
15
  type: "plugins",
16
16
  name: "event",
17
17
  icon: "target"
18
18
  };
19
- var Pt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, lt = { exports: {} };
20
- (function(h, e) {
21
- (function(n, t) {
22
- t(e);
23
- })(Pt, function(n) {
24
- const i = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", a = new Uint8Array(64), c = new Uint8Array(128);
25
- for (let p = 0; p < i.length; p++) {
26
- const u = i.charCodeAt(p);
27
- a[p] = u, c[u] = p;
28
- }
29
- function s(p, u) {
30
- let d = 0, f = 0, E = 0;
31
- do {
32
- const x = p.next();
33
- E = c[x], d |= (E & 31) << f, f += 5;
34
- } while (E & 32);
35
- const w = d & 1;
36
- return d >>>= 1, w && (d = -2147483648 | -d), u + d;
37
- }
38
- function r(p, u, d) {
39
- let f = u - d;
40
- f = f < 0 ? -f << 1 | 1 : f << 1;
41
- do {
42
- let E = f & 31;
43
- f >>>= 5, f > 0 && (E |= 32), p.write(a[E]);
44
- } while (f > 0);
45
- return u;
46
- }
47
- function b(p, u) {
48
- return p.pos >= u ? !1 : p.peek() !== 44;
49
- }
50
- const l = 1024 * 16, v = typeof TextDecoder < "u" ? /* @__PURE__ */ new TextDecoder() : typeof Buffer < "u" ? {
51
- decode(p) {
52
- return Buffer.from(p.buffer, p.byteOffset, p.byteLength).toString();
53
- }
54
- } : {
55
- decode(p) {
56
- let u = "";
57
- for (let d = 0; d < p.length; d++)
58
- u += String.fromCharCode(p[d]);
59
- return u;
60
- }
61
- };
62
- class g {
63
- constructor() {
64
- this.pos = 0, this.out = "", this.buffer = new Uint8Array(l);
65
- }
66
- write(u) {
67
- const { buffer: d } = this;
68
- d[this.pos++] = u, this.pos === l && (this.out += v.decode(d), this.pos = 0);
69
- }
70
- flush() {
71
- const { buffer: u, out: d, pos: f } = this;
72
- return f > 0 ? d + v.decode(u.subarray(0, f)) : d;
73
- }
74
- }
75
- class m {
76
- constructor(u) {
77
- this.pos = 0, this.buffer = u;
78
- }
79
- next() {
80
- return this.buffer.charCodeAt(this.pos++);
81
- }
82
- peek() {
83
- return this.buffer.charCodeAt(this.pos);
84
- }
85
- indexOf(u) {
86
- const { buffer: d, pos: f } = this, E = d.indexOf(u, f);
87
- return E === -1 ? d.length : E;
88
- }
89
- }
90
- const C = [];
91
- function A(p) {
92
- const { length: u } = p, d = new m(p), f = [], E = [];
93
- let w = 0;
94
- for (; d.pos < u; d.pos++) {
95
- w = s(d, w);
96
- const x = s(d, 0);
97
- if (!b(d, u)) {
98
- const R = E.pop();
99
- R[2] = w, R[3] = x;
100
- continue;
101
- }
102
- const L = s(d, 0), O = s(d, 0) & 1 ? [w, x, 0, 0, L, s(d, 0)] : [w, x, 0, 0, L];
103
- let G = C;
104
- if (b(d, u)) {
105
- G = [];
106
- do {
107
- const R = s(d, 0);
108
- G.push(R);
109
- } while (b(d, u));
110
- }
111
- O.vars = G, f.push(O), E.push(O);
112
- }
113
- return f;
114
- }
115
- function I(p) {
116
- const u = new g();
117
- for (let d = 0; d < p.length; )
118
- d = T(p, d, u, [0]);
119
- return u.flush();
120
- }
121
- function T(p, u, d, f) {
122
- const E = p[u], { 0: w, 1: x, 2: L, 3: U, 4: $, vars: O } = E;
123
- u > 0 && d.write(44), f[0] = r(d, w, f[0]), r(d, x, 0), r(d, $, 0);
124
- const G = E.length === 6 ? 1 : 0;
125
- r(d, G, 0), E.length === 6 && r(d, E[5], 0);
126
- for (const R of O)
127
- r(d, R, 0);
128
- for (u++; u < p.length; ) {
129
- const R = p[u], { 0: P, 1: F } = R;
130
- if (P > L || P === L && F >= U)
131
- break;
132
- u = T(p, u, d, f);
133
- }
134
- return d.write(44), f[0] = r(d, L, f[0]), r(d, U, 0), u;
135
- }
136
- function z(p) {
137
- const { length: u } = p, d = new m(p), f = [], E = [];
138
- let w = 0, x = 0, L = 0, U = 0, $ = 0, O = 0, G = 0, R = 0;
139
- do {
140
- const P = d.indexOf(";");
141
- let F = 0;
142
- for (; d.pos < P; d.pos++) {
143
- if (F = s(d, F), !b(d, P)) {
144
- const ue = E.pop();
145
- ue[2] = w, ue[3] = F;
146
- continue;
147
- }
148
- const ce = s(d, 0), he = ce & 1, be = ce & 2, _e = ce & 4;
149
- let at = null, ot = C, Ae;
150
- if (he) {
151
- const ue = s(d, x);
152
- L = s(d, x === ue ? L : 0), x = ue, Ae = [w, F, 0, 0, ue, L];
153
- } else
154
- Ae = [w, F, 0, 0];
155
- if (Ae.isScope = !!_e, be) {
156
- const ue = U, je = $;
157
- U = s(d, U);
158
- const Ke = ue === U;
159
- $ = s(d, Ke ? $ : 0), O = s(d, Ke && je === $ ? O : 0), at = [U, $, O];
160
- }
161
- if (Ae.callsite = at, b(d, P)) {
162
- ot = [];
163
- do {
164
- G = w, R = F;
165
- const ue = s(d, 0);
166
- let je;
167
- if (ue < -1) {
168
- je = [[s(d, 0)]];
169
- for (let Ke = -1; Ke > ue; Ke--) {
170
- const yt = G;
171
- G = s(d, G), R = s(d, G === yt ? R : 0);
172
- const xt = s(d, 0);
173
- je.push([xt, G, R]);
174
- }
175
- } else
176
- je = [[ue]];
177
- ot.push(je);
178
- } while (b(d, P));
179
- }
180
- Ae.bindings = ot, f.push(Ae), E.push(Ae);
181
- }
182
- w++, d.pos = P + 1;
183
- } while (d.pos < u);
184
- return f;
185
- }
186
- function D(p) {
187
- if (p.length === 0)
188
- return "";
189
- const u = new g();
190
- for (let d = 0; d < p.length; )
191
- d = y(p, d, u, [0, 0, 0, 0, 0, 0, 0]);
192
- return u.flush();
193
- }
194
- function y(p, u, d, f) {
195
- const E = p[u], { 0: w, 1: x, 2: L, 3: U, isScope: $, callsite: O, bindings: G } = E;
196
- f[0] < w ? (B(d, f[0], w), f[0] = w, f[1] = 0) : u > 0 && d.write(44), f[1] = r(d, E[1], f[1]);
197
- const R = (E.length === 6 ? 1 : 0) | (O ? 2 : 0) | ($ ? 4 : 0);
198
- if (r(d, R, 0), E.length === 6) {
199
- const { 4: P, 5: F } = E;
200
- P !== f[2] && (f[3] = 0), f[2] = r(d, P, f[2]), f[3] = r(d, F, f[3]);
201
- }
202
- if (O) {
203
- const { 0: P, 1: F, 2: ce } = E.callsite;
204
- P !== f[4] ? (f[5] = 0, f[6] = 0) : F !== f[5] && (f[6] = 0), f[4] = r(d, P, f[4]), f[5] = r(d, F, f[5]), f[6] = r(d, ce, f[6]);
205
- }
206
- if (G)
207
- for (const P of G) {
208
- P.length > 1 && r(d, -P.length, 0);
209
- const F = P[0][0];
210
- r(d, F, 0);
211
- let ce = w, he = x;
212
- for (let be = 1; be < P.length; be++) {
213
- const _e = P[be];
214
- ce = r(d, _e[1], ce), he = r(d, _e[2], he), r(d, _e[0], 0);
215
- }
216
- }
217
- for (u++; u < p.length; ) {
218
- const P = p[u], { 0: F, 1: ce } = P;
219
- if (F > L || F === L && ce >= U)
220
- break;
221
- u = y(p, u, d, f);
222
- }
223
- return f[0] < L ? (B(d, f[0], L), f[0] = L, f[1] = 0) : d.write(44), f[1] = r(d, U, f[1]), u;
224
- }
225
- function B(p, u, d) {
226
- do
227
- p.write(59);
228
- while (++u < d);
229
- }
230
- function q(p) {
231
- const { length: u } = p, d = new m(p), f = [];
232
- let E = 0, w = 0, x = 0, L = 0, U = 0;
233
- do {
234
- const $ = d.indexOf(";"), O = [];
235
- let G = !0, R = 0;
236
- for (E = 0; d.pos < $; ) {
237
- let P;
238
- E = s(d, E), E < R && (G = !1), R = E, b(d, $) ? (w = s(d, w), x = s(d, x), L = s(d, L), b(d, $) ? (U = s(d, U), P = [E, w, x, L, U]) : P = [E, w, x, L]) : P = [E], O.push(P), d.pos++;
239
- }
240
- G || me(O), f.push(O), d.pos = $ + 1;
241
- } while (d.pos <= u);
242
- return f;
243
- }
244
- function me(p) {
245
- p.sort(de);
246
- }
247
- function de(p, u) {
248
- return p[0] - u[0];
249
- }
250
- function te(p) {
251
- const u = new g();
252
- let d = 0, f = 0, E = 0, w = 0;
253
- for (let x = 0; x < p.length; x++) {
254
- const L = p[x];
255
- if (x > 0 && u.write(59), L.length === 0)
256
- continue;
257
- let U = 0;
258
- for (let $ = 0; $ < L.length; $++) {
259
- const O = L[$];
260
- $ > 0 && u.write(44), U = r(u, O[0], U), O.length !== 1 && (d = r(u, O[1], d), f = r(u, O[2], f), E = r(u, O[3], E), O.length !== 4 && (w = r(u, O[4], w)));
261
- }
262
- }
263
- return u.flush();
19
+ var Ne = 44, Ie = 59, re = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", me = new Uint8Array(64), Le = new Uint8Array(128);
20
+ for (let c = 0; c < re.length; c++) {
21
+ const t = re.charCodeAt(c);
22
+ me[c] = t, Le[t] = c;
23
+ }
24
+ function Vt(c, t, n) {
25
+ let e = t - n;
26
+ e = e < 0 ? -e << 1 | 1 : e << 1;
27
+ do {
28
+ let i = e & 31;
29
+ e >>>= 5, e > 0 && (i |= 32), c.write(me[i]);
30
+ } while (e > 0);
31
+ return t;
32
+ }
33
+ var ae = 1024 * 16, le = typeof TextDecoder < "u" ? /* @__PURE__ */ new TextDecoder() : typeof Buffer < "u" ? {
34
+ decode(c) {
35
+ return Buffer.from(c.buffer, c.byteOffset, c.byteLength).toString();
36
+ }
37
+ } : {
38
+ decode(c) {
39
+ let t = "";
40
+ for (let n = 0; n < c.length; n++)
41
+ t += String.fromCharCode(c[n]);
42
+ return t;
43
+ }
44
+ }, Be = class {
45
+ constructor() {
46
+ this.pos = 0, this.out = "", this.buffer = new Uint8Array(ae);
47
+ }
48
+ write(c) {
49
+ const { buffer: t } = this;
50
+ t[this.pos++] = c, this.pos === ae && (this.out += le.decode(t), this.pos = 0);
51
+ }
52
+ flush() {
53
+ const { buffer: c, out: t, pos: n } = this;
54
+ return n > 0 ? t + le.decode(c.subarray(0, n)) : t;
55
+ }
56
+ };
57
+ function Pe(c) {
58
+ const t = new Be();
59
+ let n = 0, e = 0, i = 0, o = 0;
60
+ for (let s = 0; s < c.length; s++) {
61
+ const r = c[s];
62
+ if (s > 0 && t.write(Ie), r.length === 0) continue;
63
+ let a = 0;
64
+ for (let d = 0; d < r.length; d++) {
65
+ const f = r[d];
66
+ d > 0 && t.write(Ne), a = Vt(t, f[0], a), f.length !== 1 && (n = Vt(t, f[1], n), e = Vt(t, f[2], e), i = Vt(t, f[3], i), f.length !== 4 && (o = Vt(t, f[4], o)));
264
67
  }
265
- n.decode = q, n.decodeGeneratedRanges = z, n.decodeOriginalScopes = A, n.encode = te, n.encodeGeneratedRanges = D, n.encodeOriginalScopes = I, Object.defineProperty(n, "__esModule", { value: !0 });
266
- });
267
- })(lt, lt.exports);
268
- var Vt = lt.exports;
269
- class nt {
270
- constructor(e) {
271
- this.bits = e instanceof nt ? e.bits.slice() : [];
272
68
  }
273
- add(e) {
274
- this.bits[e >> 5] |= 1 << (e & 31);
69
+ return t.flush();
70
+ }
71
+ class Jt {
72
+ constructor(t) {
73
+ this.bits = t instanceof Jt ? t.bits.slice() : [];
275
74
  }
276
- has(e) {
277
- return !!(this.bits[e >> 5] & 1 << (e & 31));
75
+ add(t) {
76
+ this.bits[t >> 5] |= 1 << (t & 31);
77
+ }
78
+ has(t) {
79
+ return !!(this.bits[t >> 5] & 1 << (t & 31));
278
80
  }
279
81
  }
280
- class We {
281
- constructor(e, n, t) {
282
- this.start = e, this.end = n, this.original = t, this.intro = "", this.outro = "", this.content = t, this.storeName = !1, this.edited = !1, this.previous = null, this.next = null;
82
+ class Rt {
83
+ constructor(t, n, e) {
84
+ this.start = t, this.end = n, this.original = e, this.intro = "", this.outro = "", this.content = e, this.storeName = !1, this.edited = !1, this.previous = null, this.next = null;
283
85
  }
284
- appendLeft(e) {
285
- this.outro += e;
86
+ appendLeft(t) {
87
+ this.outro += t;
286
88
  }
287
- appendRight(e) {
288
- this.intro = this.intro + e;
89
+ appendRight(t) {
90
+ this.intro = this.intro + t;
289
91
  }
290
92
  clone() {
291
- const e = new We(this.start, this.end, this.original);
292
- return e.intro = this.intro, e.outro = this.outro, e.content = this.content, e.storeName = this.storeName, e.edited = this.edited, e;
93
+ const t = new Rt(this.start, this.end, this.original);
94
+ return t.intro = this.intro, t.outro = this.outro, t.content = this.content, t.storeName = this.storeName, t.edited = this.edited, t;
293
95
  }
294
- contains(e) {
295
- return this.start < e && e < this.end;
96
+ contains(t) {
97
+ return this.start < t && t < this.end;
296
98
  }
297
- eachNext(e) {
99
+ eachNext(t) {
298
100
  let n = this;
299
101
  for (; n; )
300
- e(n), n = n.next;
102
+ t(n), n = n.next;
301
103
  }
302
- eachPrevious(e) {
104
+ eachPrevious(t) {
303
105
  let n = this;
304
106
  for (; n; )
305
- e(n), n = n.previous;
107
+ t(n), n = n.previous;
306
108
  }
307
- edit(e, n, t) {
308
- return this.content = e, t || (this.intro = "", this.outro = ""), this.storeName = n, this.edited = !0, this;
109
+ edit(t, n, e) {
110
+ return this.content = t, e || (this.intro = "", this.outro = ""), this.storeName = n, this.edited = !0, this;
309
111
  }
310
- prependLeft(e) {
311
- this.outro = e + this.outro;
112
+ prependLeft(t) {
113
+ this.outro = t + this.outro;
312
114
  }
313
- prependRight(e) {
314
- this.intro = e + this.intro;
115
+ prependRight(t) {
116
+ this.intro = t + this.intro;
315
117
  }
316
118
  reset() {
317
119
  this.intro = "", this.outro = "", this.edited && (this.content = this.original, this.storeName = !1, this.edited = !1);
318
120
  }
319
- split(e) {
320
- const n = e - this.start, t = this.original.slice(0, n), o = this.original.slice(n);
321
- this.original = t;
322
- const i = new We(e, this.end, o);
323
- return i.outro = this.outro, this.outro = "", this.end = e, this.edited ? (i.edit("", !1), this.content = "") : this.content = t, i.next = this.next, i.next && (i.next.previous = i), i.previous = this, this.next = i, i;
121
+ split(t) {
122
+ const n = t - this.start, e = this.original.slice(0, n), i = this.original.slice(n);
123
+ this.original = e;
124
+ const o = new Rt(t, this.end, i);
125
+ return o.outro = this.outro, this.outro = "", this.end = t, this.edited ? (o.edit("", !1), this.content = "") : this.content = e, o.next = this.next, o.next && (o.next.previous = o), o.previous = this, this.next = o, o;
324
126
  }
325
127
  toString() {
326
128
  return this.intro + this.content + this.outro;
327
129
  }
328
- trimEnd(e) {
329
- if (this.outro = this.outro.replace(e, ""), this.outro.length) return !0;
330
- const n = this.content.replace(e, "");
130
+ trimEnd(t) {
131
+ if (this.outro = this.outro.replace(t, ""), this.outro.length) return !0;
132
+ const n = this.content.replace(t, "");
331
133
  if (n.length)
332
134
  return n !== this.content && (this.split(this.start + n.length).edit("", void 0, !0), this.edited && this.edit(n, this.storeName, !0)), !0;
333
- if (this.edit("", void 0, !0), this.intro = this.intro.replace(e, ""), this.intro.length) return !0;
135
+ if (this.edit("", void 0, !0), this.intro = this.intro.replace(t, ""), this.intro.length) return !0;
334
136
  }
335
- trimStart(e) {
336
- if (this.intro = this.intro.replace(e, ""), this.intro.length) return !0;
337
- const n = this.content.replace(e, "");
137
+ trimStart(t) {
138
+ if (this.intro = this.intro.replace(t, ""), this.intro.length) return !0;
139
+ const n = this.content.replace(t, "");
338
140
  if (n.length) {
339
141
  if (n !== this.content) {
340
- const t = this.split(this.end - n.length);
341
- this.edited && t.edit(n, this.storeName, !0), this.edit("", void 0, !0);
142
+ const e = this.split(this.end - n.length);
143
+ this.edited && e.edit(n, this.storeName, !0), this.edit("", void 0, !0);
342
144
  }
343
145
  return !0;
344
- } else if (this.edit("", void 0, !0), this.outro = this.outro.replace(e, ""), this.outro.length) return !0;
146
+ } else if (this.edit("", void 0, !0), this.outro = this.outro.replace(t, ""), this.outro.length) return !0;
345
147
  }
346
148
  }
347
- function Mt() {
348
- return typeof globalThis < "u" && typeof globalThis.btoa == "function" ? (h) => globalThis.btoa(unescape(encodeURIComponent(h))) : typeof Buffer == "function" ? (h) => Buffer.from(h, "utf-8").toString("base64") : () => {
149
+ function Ve() {
150
+ return typeof globalThis < "u" && typeof globalThis.btoa == "function" ? (c) => globalThis.btoa(unescape(encodeURIComponent(c))) : typeof Buffer == "function" ? (c) => Buffer.from(c, "utf-8").toString("base64") : () => {
349
151
  throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.");
350
152
  };
351
153
  }
352
- const Ot = /* @__PURE__ */ Mt();
353
- class Rt {
354
- constructor(e) {
355
- this.version = 3, this.file = e.file, this.sources = e.sources, this.sourcesContent = e.sourcesContent, this.names = e.names, this.mappings = Vt.encode(e.mappings), typeof e.x_google_ignoreList < "u" && (this.x_google_ignoreList = e.x_google_ignoreList), typeof e.debugId < "u" && (this.debugId = e.debugId);
154
+ const Me = /* @__PURE__ */ Ve();
155
+ class Oe {
156
+ constructor(t) {
157
+ this.version = 3, this.file = t.file, this.sources = t.sources, this.sourcesContent = t.sourcesContent, this.names = t.names, this.mappings = Pe(t.mappings), typeof t.x_google_ignoreList < "u" && (this.x_google_ignoreList = t.x_google_ignoreList), typeof t.debugId < "u" && (this.debugId = t.debugId);
356
158
  }
357
159
  toString() {
358
160
  return JSON.stringify(this);
359
161
  }
360
162
  toUrl() {
361
- return "data:application/json;charset=utf-8;base64," + Ot(this.toString());
163
+ return "data:application/json;charset=utf-8;base64," + Me(this.toString());
362
164
  }
363
165
  }
364
- function Tt(h) {
365
- const e = h.split(`
366
- `), n = e.filter((i) => /^\t+/.test(i)), t = e.filter((i) => /^ {2,}/.test(i));
367
- if (n.length === 0 && t.length === 0)
166
+ function Te(c) {
167
+ const t = c.split(`
168
+ `), n = t.filter((o) => /^\t+/.test(o)), e = t.filter((o) => /^ {2,}/.test(o));
169
+ if (n.length === 0 && e.length === 0)
368
170
  return null;
369
- if (n.length >= t.length)
171
+ if (n.length >= e.length)
370
172
  return " ";
371
- const o = t.reduce((i, a) => {
372
- const c = /^ +/.exec(a)[0].length;
373
- return Math.min(c, i);
173
+ const i = e.reduce((o, s) => {
174
+ const r = /^ +/.exec(s)[0].length;
175
+ return Math.min(r, o);
374
176
  }, 1 / 0);
375
- return new Array(o + 1).join(" ");
177
+ return new Array(i + 1).join(" ");
376
178
  }
377
- function Ut(h, e) {
378
- const n = h.split(/[/\\]/), t = e.split(/[/\\]/);
379
- for (n.pop(); n[0] === t[0]; )
380
- n.shift(), t.shift();
179
+ function Re(c, t) {
180
+ const n = c.split(/[/\\]/), e = t.split(/[/\\]/);
181
+ for (n.pop(); n[0] === e[0]; )
182
+ n.shift(), e.shift();
381
183
  if (n.length) {
382
- let o = n.length;
383
- for (; o--; ) n[o] = "..";
184
+ let i = n.length;
185
+ for (; i--; ) n[i] = "..";
384
186
  }
385
- return n.concat(t).join("/");
187
+ return n.concat(e).join("/");
386
188
  }
387
- const jt = Object.prototype.toString;
388
- function $t(h) {
389
- return jt.call(h) === "[object Object]";
189
+ const Ue = Object.prototype.toString;
190
+ function je(c) {
191
+ return Ue.call(c) === "[object Object]";
390
192
  }
391
- function mt(h) {
392
- const e = h.split(`
193
+ function de(c) {
194
+ const t = c.split(`
393
195
  `), n = [];
394
- for (let t = 0, o = 0; t < e.length; t++)
395
- n.push(o), o += e[t].length + 1;
396
- return function(o) {
397
- let i = 0, a = n.length;
398
- for (; i < a; ) {
399
- const r = i + a >> 1;
400
- o < n[r] ? a = r : i = r + 1;
196
+ for (let e = 0, i = 0; e < t.length; e++)
197
+ n.push(i), i += t[e].length + 1;
198
+ return function(i) {
199
+ let o = 0, s = n.length;
200
+ for (; o < s; ) {
201
+ const d = o + s >> 1;
202
+ i < n[d] ? s = d : o = d + 1;
401
203
  }
402
- const c = i - 1, s = o - n[c];
403
- return { line: c, column: s };
204
+ const r = o - 1, a = i - n[r];
205
+ return { line: r, column: a };
404
206
  };
405
207
  }
406
- const zt = /\w/;
407
- class Ft {
408
- constructor(e) {
409
- this.hires = e, this.generatedCodeLine = 0, this.generatedCodeColumn = 0, this.raw = [], this.rawSegments = this.raw[this.generatedCodeLine] = [], this.pending = null;
208
+ const $e = /\w/;
209
+ class ze {
210
+ constructor(t) {
211
+ this.hires = t, this.generatedCodeLine = 0, this.generatedCodeColumn = 0, this.raw = [], this.rawSegments = this.raw[this.generatedCodeLine] = [], this.pending = null;
410
212
  }
411
- addEdit(e, n, t, o) {
213
+ addEdit(t, n, e, i) {
412
214
  if (n.length) {
413
- const i = n.length - 1;
414
- let a = n.indexOf(`
415
- `, 0), c = -1;
416
- for (; a >= 0 && i > a; ) {
417
- const r = [this.generatedCodeColumn, e, t.line, t.column];
418
- o >= 0 && r.push(o), this.rawSegments.push(r), this.generatedCodeLine += 1, this.raw[this.generatedCodeLine] = this.rawSegments = [], this.generatedCodeColumn = 0, c = a, a = n.indexOf(`
419
- `, a + 1);
215
+ const o = n.length - 1;
216
+ let s = n.indexOf(`
217
+ `, 0), r = -1;
218
+ for (; s >= 0 && o > s; ) {
219
+ const d = [this.generatedCodeColumn, t, e.line, e.column];
220
+ i >= 0 && d.push(i), this.rawSegments.push(d), this.generatedCodeLine += 1, this.raw[this.generatedCodeLine] = this.rawSegments = [], this.generatedCodeColumn = 0, r = s, s = n.indexOf(`
221
+ `, s + 1);
420
222
  }
421
- const s = [this.generatedCodeColumn, e, t.line, t.column];
422
- o >= 0 && s.push(o), this.rawSegments.push(s), this.advance(n.slice(c + 1));
223
+ const a = [this.generatedCodeColumn, t, e.line, e.column];
224
+ i >= 0 && a.push(i), this.rawSegments.push(a), this.advance(n.slice(r + 1));
423
225
  } else this.pending && (this.rawSegments.push(this.pending), this.advance(n));
424
226
  this.pending = null;
425
227
  }
426
- addUneditedChunk(e, n, t, o, i) {
427
- let a = n.start, c = !0, s = !1;
428
- for (; a < n.end; ) {
429
- if (t[a] === `
228
+ addUneditedChunk(t, n, e, i, o) {
229
+ let s = n.start, r = !0, a = !1;
230
+ for (; s < n.end; ) {
231
+ if (e[s] === `
430
232
  `)
431
- o.line += 1, o.column = 0, this.generatedCodeLine += 1, this.raw[this.generatedCodeLine] = this.rawSegments = [], this.generatedCodeColumn = 0, c = !0, s = !1;
233
+ i.line += 1, i.column = 0, this.generatedCodeLine += 1, this.raw[this.generatedCodeLine] = this.rawSegments = [], this.generatedCodeColumn = 0, r = !0, a = !1;
432
234
  else {
433
- if (this.hires || c || i.has(a)) {
434
- const r = [this.generatedCodeColumn, e, o.line, o.column];
435
- this.hires === "boundary" ? zt.test(t[a]) ? s || (this.rawSegments.push(r), s = !0) : (this.rawSegments.push(r), s = !1) : this.rawSegments.push(r);
235
+ if (this.hires || r || o.has(s)) {
236
+ const d = [this.generatedCodeColumn, t, i.line, i.column];
237
+ this.hires === "boundary" ? $e.test(e[s]) ? a || (this.rawSegments.push(d), a = !0) : (this.rawSegments.push(d), a = !1) : this.rawSegments.push(d);
436
238
  }
437
- o.column += 1, this.generatedCodeColumn += 1, c = !1;
239
+ i.column += 1, this.generatedCodeColumn += 1, r = !1;
438
240
  }
439
- a += 1;
241
+ s += 1;
440
242
  }
441
243
  this.pending = null;
442
244
  }
443
- advance(e) {
444
- if (!e) return;
445
- const n = e.split(`
245
+ advance(t) {
246
+ if (!t) return;
247
+ const n = t.split(`
446
248
  `);
447
249
  if (n.length > 1) {
448
- for (let t = 0; t < n.length - 1; t++)
250
+ for (let e = 0; e < n.length - 1; e++)
449
251
  this.generatedCodeLine++, this.raw[this.generatedCodeLine] = this.rawSegments = [];
450
252
  this.generatedCodeColumn = 0;
451
253
  }
452
254
  this.generatedCodeColumn += n[n.length - 1].length;
453
255
  }
454
256
  }
455
- const He = `
456
- `, ze = {
257
+ const Mt = `
258
+ `, At = {
457
259
  insertLeft: !1,
458
260
  insertRight: !1,
459
261
  storeName: !1
460
262
  };
461
- class Q {
462
- constructor(e, n = {}) {
463
- const t = new We(0, e.length, e);
263
+ class U {
264
+ constructor(t, n = {}) {
265
+ const e = new Rt(0, t.length, t);
464
266
  Object.defineProperties(this, {
465
- original: { writable: !0, value: e },
267
+ original: { writable: !0, value: t },
466
268
  outro: { writable: !0, value: "" },
467
269
  intro: { writable: !0, value: "" },
468
- firstChunk: { writable: !0, value: t },
469
- lastChunk: { writable: !0, value: t },
470
- lastSearchedChunk: { writable: !0, value: t },
270
+ firstChunk: { writable: !0, value: e },
271
+ lastChunk: { writable: !0, value: e },
272
+ lastSearchedChunk: { writable: !0, value: e },
471
273
  byStart: { writable: !0, value: {} },
472
274
  byEnd: { writable: !0, value: {} },
473
275
  filename: { writable: !0, value: n.filename },
474
276
  indentExclusionRanges: { writable: !0, value: n.indentExclusionRanges },
475
- sourcemapLocations: { writable: !0, value: new nt() },
277
+ sourcemapLocations: { writable: !0, value: new Jt() },
476
278
  storedNames: { writable: !0, value: {} },
477
279
  indentStr: { writable: !0, value: void 0 },
478
280
  ignoreList: { writable: !0, value: n.ignoreList },
479
281
  offset: { writable: !0, value: n.offset || 0 }
480
- }), this.byStart[0] = t, this.byEnd[e.length] = t;
282
+ }), this.byStart[0] = e, this.byEnd[t.length] = e;
481
283
  }
482
- addSourcemapLocation(e) {
483
- this.sourcemapLocations.add(e);
284
+ addSourcemapLocation(t) {
285
+ this.sourcemapLocations.add(t);
484
286
  }
485
- append(e) {
486
- if (typeof e != "string") throw new TypeError("outro content must be a string");
487
- return this.outro += e, this;
287
+ append(t) {
288
+ if (typeof t != "string") throw new TypeError("outro content must be a string");
289
+ return this.outro += t, this;
488
290
  }
489
- appendLeft(e, n) {
490
- if (e = e + this.offset, typeof n != "string") throw new TypeError("inserted content must be a string");
491
- this._split(e);
492
- const t = this.byEnd[e];
493
- return t ? t.appendLeft(n) : this.intro += n, this;
291
+ appendLeft(t, n) {
292
+ if (t = t + this.offset, typeof n != "string") throw new TypeError("inserted content must be a string");
293
+ this._split(t);
294
+ const e = this.byEnd[t];
295
+ return e ? e.appendLeft(n) : this.intro += n, this;
494
296
  }
495
- appendRight(e, n) {
496
- if (e = e + this.offset, typeof n != "string") throw new TypeError("inserted content must be a string");
497
- this._split(e);
498
- const t = this.byStart[e];
499
- return t ? t.appendRight(n) : this.outro += n, this;
297
+ appendRight(t, n) {
298
+ if (t = t + this.offset, typeof n != "string") throw new TypeError("inserted content must be a string");
299
+ this._split(t);
300
+ const e = this.byStart[t];
301
+ return e ? e.appendRight(n) : this.outro += n, this;
500
302
  }
501
303
  clone() {
502
- const e = new Q(this.original, { filename: this.filename, offset: this.offset });
503
- let n = this.firstChunk, t = e.firstChunk = e.lastSearchedChunk = n.clone();
304
+ const t = new U(this.original, { filename: this.filename, offset: this.offset });
305
+ let n = this.firstChunk, e = t.firstChunk = t.lastSearchedChunk = n.clone();
504
306
  for (; n; ) {
505
- e.byStart[t.start] = t, e.byEnd[t.end] = t;
506
- const o = n.next, i = o && o.clone();
507
- i && (t.next = i, i.previous = t, t = i), n = o;
307
+ t.byStart[e.start] = e, t.byEnd[e.end] = e;
308
+ const i = n.next, o = i && i.clone();
309
+ o && (e.next = o, o.previous = e, e = o), n = i;
508
310
  }
509
- return e.lastChunk = t, this.indentExclusionRanges && (e.indentExclusionRanges = this.indentExclusionRanges.slice()), e.sourcemapLocations = new nt(this.sourcemapLocations), e.intro = this.intro, e.outro = this.outro, e;
510
- }
511
- generateDecodedMap(e) {
512
- e = e || {};
513
- const n = 0, t = Object.keys(this.storedNames), o = new Ft(e.hires), i = mt(this.original);
514
- return this.intro && o.advance(this.intro), this.firstChunk.eachNext((a) => {
515
- const c = i(a.start);
516
- a.intro.length && o.advance(a.intro), a.edited ? o.addEdit(
311
+ return t.lastChunk = e, this.indentExclusionRanges && (t.indentExclusionRanges = this.indentExclusionRanges.slice()), t.sourcemapLocations = new Jt(this.sourcemapLocations), t.intro = this.intro, t.outro = this.outro, t;
312
+ }
313
+ generateDecodedMap(t) {
314
+ t = t || {};
315
+ const n = 0, e = Object.keys(this.storedNames), i = new ze(t.hires), o = de(this.original);
316
+ return this.intro && i.advance(this.intro), this.firstChunk.eachNext((s) => {
317
+ const r = o(s.start);
318
+ s.intro.length && i.advance(s.intro), s.edited ? i.addEdit(
517
319
  n,
518
- a.content,
519
- c,
520
- a.storeName ? t.indexOf(a.original) : -1
521
- ) : o.addUneditedChunk(n, a, this.original, c, this.sourcemapLocations), a.outro.length && o.advance(a.outro);
320
+ s.content,
321
+ r,
322
+ s.storeName ? e.indexOf(s.original) : -1
323
+ ) : i.addUneditedChunk(n, s, this.original, r, this.sourcemapLocations), s.outro.length && i.advance(s.outro);
522
324
  }), {
523
- file: e.file ? e.file.split(/[/\\]/).pop() : void 0,
325
+ file: t.file ? t.file.split(/[/\\]/).pop() : void 0,
524
326
  sources: [
525
- e.source ? Ut(e.file || "", e.source) : e.file || ""
327
+ t.source ? Re(t.file || "", t.source) : t.file || ""
526
328
  ],
527
- sourcesContent: e.includeContent ? [this.original] : void 0,
528
- names: t,
529
- mappings: o.raw,
329
+ sourcesContent: t.includeContent ? [this.original] : void 0,
330
+ names: e,
331
+ mappings: i.raw,
530
332
  x_google_ignoreList: this.ignoreList ? [n] : void 0
531
333
  };
532
334
  }
533
- generateMap(e) {
534
- return new Rt(this.generateDecodedMap(e));
335
+ generateMap(t) {
336
+ return new Oe(this.generateDecodedMap(t));
535
337
  }
536
338
  _ensureindentStr() {
537
- this.indentStr === void 0 && (this.indentStr = Tt(this.original));
339
+ this.indentStr === void 0 && (this.indentStr = Te(this.original));
538
340
  }
539
341
  _getRawIndentString() {
540
342
  return this._ensureindentStr(), this.indentStr;
@@ -542,385 +344,385 @@ class Q {
542
344
  getIndentString() {
543
345
  return this._ensureindentStr(), this.indentStr === null ? " " : this.indentStr;
544
346
  }
545
- indent(e, n) {
546
- const t = /^[^\r\n]/gm;
547
- if ($t(e) && (n = e, e = void 0), e === void 0 && (this._ensureindentStr(), e = this.indentStr || " "), e === "") return this;
347
+ indent(t, n) {
348
+ const e = /^[^\r\n]/gm;
349
+ if (je(t) && (n = t, t = void 0), t === void 0 && (this._ensureindentStr(), t = this.indentStr || " "), t === "") return this;
548
350
  n = n || {};
549
- const o = {};
550
- n.exclude && (typeof n.exclude[0] == "number" ? [n.exclude] : n.exclude).forEach((b) => {
551
- for (let l = b[0]; l < b[1]; l += 1)
552
- o[l] = !0;
351
+ const i = {};
352
+ n.exclude && (typeof n.exclude[0] == "number" ? [n.exclude] : n.exclude).forEach((f) => {
353
+ for (let l = f[0]; l < f[1]; l += 1)
354
+ i[l] = !0;
553
355
  });
554
- let i = n.indentStart !== !1;
555
- const a = (r) => i ? `${e}${r}` : (i = !0, r);
556
- this.intro = this.intro.replace(t, a);
557
- let c = 0, s = this.firstChunk;
558
- for (; s; ) {
559
- const r = s.end;
560
- if (s.edited)
561
- o[c] || (s.content = s.content.replace(t, a), s.content.length && (i = s.content[s.content.length - 1] === `
356
+ let o = n.indentStart !== !1;
357
+ const s = (d) => o ? `${t}${d}` : (o = !0, d);
358
+ this.intro = this.intro.replace(e, s);
359
+ let r = 0, a = this.firstChunk;
360
+ for (; a; ) {
361
+ const d = a.end;
362
+ if (a.edited)
363
+ i[r] || (a.content = a.content.replace(e, s), a.content.length && (o = a.content[a.content.length - 1] === `
562
364
  `));
563
365
  else
564
- for (c = s.start; c < r; ) {
565
- if (!o[c]) {
566
- const b = this.original[c];
567
- b === `
568
- ` ? i = !0 : b !== "\r" && i && (i = !1, c === s.start || (this._splitChunk(s, c), s = s.next), s.prependRight(e));
366
+ for (r = a.start; r < d; ) {
367
+ if (!i[r]) {
368
+ const f = this.original[r];
369
+ f === `
370
+ ` ? o = !0 : f !== "\r" && o && (o = !1, r === a.start || (this._splitChunk(a, r), a = a.next), a.prependRight(t));
569
371
  }
570
- c += 1;
372
+ r += 1;
571
373
  }
572
- c = s.end, s = s.next;
374
+ r = a.end, a = a.next;
573
375
  }
574
- return this.outro = this.outro.replace(t, a), this;
376
+ return this.outro = this.outro.replace(e, s), this;
575
377
  }
576
378
  insert() {
577
379
  throw new Error(
578
380
  "magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)"
579
381
  );
580
382
  }
581
- insertLeft(e, n) {
582
- return ze.insertLeft || (console.warn(
383
+ insertLeft(t, n) {
384
+ return At.insertLeft || (console.warn(
583
385
  "magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead"
584
- ), ze.insertLeft = !0), this.appendLeft(e, n);
386
+ ), At.insertLeft = !0), this.appendLeft(t, n);
585
387
  }
586
- insertRight(e, n) {
587
- return ze.insertRight || (console.warn(
388
+ insertRight(t, n) {
389
+ return At.insertRight || (console.warn(
588
390
  "magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead"
589
- ), ze.insertRight = !0), this.prependRight(e, n);
391
+ ), At.insertRight = !0), this.prependRight(t, n);
590
392
  }
591
- move(e, n, t) {
592
- if (e = e + this.offset, n = n + this.offset, t = t + this.offset, t >= e && t <= n) throw new Error("Cannot move a selection inside itself");
593
- this._split(e), this._split(n), this._split(t);
594
- const o = this.byStart[e], i = this.byEnd[n], a = o.previous, c = i.next, s = this.byStart[t];
595
- if (!s && i === this.lastChunk) return this;
596
- const r = s ? s.previous : this.lastChunk;
597
- return a && (a.next = c), c && (c.previous = a), r && (r.next = o), s && (s.previous = i), o.previous || (this.firstChunk = i.next), i.next || (this.lastChunk = o.previous, this.lastChunk.next = null), o.previous = r, i.next = s || null, r || (this.firstChunk = o), s || (this.lastChunk = i), this;
393
+ move(t, n, e) {
394
+ if (t = t + this.offset, n = n + this.offset, e = e + this.offset, e >= t && e <= n) throw new Error("Cannot move a selection inside itself");
395
+ this._split(t), this._split(n), this._split(e);
396
+ const i = this.byStart[t], o = this.byEnd[n], s = i.previous, r = o.next, a = this.byStart[e];
397
+ if (!a && o === this.lastChunk) return this;
398
+ const d = a ? a.previous : this.lastChunk;
399
+ return s && (s.next = r), r && (r.previous = s), d && (d.next = i), a && (a.previous = o), i.previous || (this.firstChunk = o.next), o.next || (this.lastChunk = i.previous, this.lastChunk.next = null), i.previous = d, o.next = a || null, d || (this.firstChunk = i), a || (this.lastChunk = o), this;
598
400
  }
599
- overwrite(e, n, t, o) {
600
- return o = o || {}, this.update(e, n, t, { ...o, overwrite: !o.contentOnly });
401
+ overwrite(t, n, e, i) {
402
+ return i = i || {}, this.update(t, n, e, { ...i, overwrite: !i.contentOnly });
601
403
  }
602
- update(e, n, t, o) {
603
- if (e = e + this.offset, n = n + this.offset, typeof t != "string") throw new TypeError("replacement content must be a string");
404
+ update(t, n, e, i) {
405
+ if (t = t + this.offset, n = n + this.offset, typeof e != "string") throw new TypeError("replacement content must be a string");
604
406
  if (this.original.length !== 0) {
605
- for (; e < 0; ) e += this.original.length;
407
+ for (; t < 0; ) t += this.original.length;
606
408
  for (; n < 0; ) n += this.original.length;
607
409
  }
608
410
  if (n > this.original.length) throw new Error("end is out of bounds");
609
- if (e === n)
411
+ if (t === n)
610
412
  throw new Error(
611
413
  "Cannot overwrite a zero-length range – use appendLeft or prependRight instead"
612
414
  );
613
- this._split(e), this._split(n), o === !0 && (ze.storeName || (console.warn(
415
+ this._split(t), this._split(n), i === !0 && (At.storeName || (console.warn(
614
416
  "The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"
615
- ), ze.storeName = !0), o = { storeName: !0 });
616
- const i = o !== void 0 ? o.storeName : !1, a = o !== void 0 ? o.overwrite : !1;
617
- if (i) {
618
- const r = this.original.slice(e, n);
619
- Object.defineProperty(this.storedNames, r, {
417
+ ), At.storeName = !0), i = { storeName: !0 });
418
+ const o = i !== void 0 ? i.storeName : !1, s = i !== void 0 ? i.overwrite : !1;
419
+ if (o) {
420
+ const d = this.original.slice(t, n);
421
+ Object.defineProperty(this.storedNames, d, {
620
422
  writable: !0,
621
423
  value: !0,
622
424
  enumerable: !0
623
425
  });
624
426
  }
625
- const c = this.byStart[e], s = this.byEnd[n];
626
- if (c) {
627
- let r = c;
628
- for (; r !== s; ) {
629
- if (r.next !== this.byStart[r.end])
427
+ const r = this.byStart[t], a = this.byEnd[n];
428
+ if (r) {
429
+ let d = r;
430
+ for (; d !== a; ) {
431
+ if (d.next !== this.byStart[d.end])
630
432
  throw new Error("Cannot overwrite across a split point");
631
- r = r.next, r.edit("", !1);
433
+ d = d.next, d.edit("", !1);
632
434
  }
633
- c.edit(t, i, !a);
435
+ r.edit(e, o, !s);
634
436
  } else {
635
- const r = new We(e, n, "").edit(t, i);
636
- s.next = r, r.previous = s;
437
+ const d = new Rt(t, n, "").edit(e, o);
438
+ a.next = d, d.previous = a;
637
439
  }
638
440
  return this;
639
441
  }
640
- prepend(e) {
641
- if (typeof e != "string") throw new TypeError("outro content must be a string");
642
- return this.intro = e + this.intro, this;
643
- }
644
- prependLeft(e, n) {
645
- if (e = e + this.offset, typeof n != "string") throw new TypeError("inserted content must be a string");
646
- this._split(e);
647
- const t = this.byEnd[e];
648
- return t ? t.prependLeft(n) : this.intro = n + this.intro, this;
649
- }
650
- prependRight(e, n) {
651
- if (e = e + this.offset, typeof n != "string") throw new TypeError("inserted content must be a string");
652
- this._split(e);
653
- const t = this.byStart[e];
654
- return t ? t.prependRight(n) : this.outro = n + this.outro, this;
655
- }
656
- remove(e, n) {
657
- if (e = e + this.offset, n = n + this.offset, this.original.length !== 0) {
658
- for (; e < 0; ) e += this.original.length;
442
+ prepend(t) {
443
+ if (typeof t != "string") throw new TypeError("outro content must be a string");
444
+ return this.intro = t + this.intro, this;
445
+ }
446
+ prependLeft(t, n) {
447
+ if (t = t + this.offset, typeof n != "string") throw new TypeError("inserted content must be a string");
448
+ this._split(t);
449
+ const e = this.byEnd[t];
450
+ return e ? e.prependLeft(n) : this.intro = n + this.intro, this;
451
+ }
452
+ prependRight(t, n) {
453
+ if (t = t + this.offset, typeof n != "string") throw new TypeError("inserted content must be a string");
454
+ this._split(t);
455
+ const e = this.byStart[t];
456
+ return e ? e.prependRight(n) : this.outro = n + this.outro, this;
457
+ }
458
+ remove(t, n) {
459
+ if (t = t + this.offset, n = n + this.offset, this.original.length !== 0) {
460
+ for (; t < 0; ) t += this.original.length;
659
461
  for (; n < 0; ) n += this.original.length;
660
462
  }
661
- if (e === n) return this;
662
- if (e < 0 || n > this.original.length) throw new Error("Character is out of bounds");
663
- if (e > n) throw new Error("end must be greater than start");
664
- this._split(e), this._split(n);
665
- let t = this.byStart[e];
666
- for (; t; )
667
- t.intro = "", t.outro = "", t.edit(""), t = n > t.end ? this.byStart[t.end] : null;
463
+ if (t === n) return this;
464
+ if (t < 0 || n > this.original.length) throw new Error("Character is out of bounds");
465
+ if (t > n) throw new Error("end must be greater than start");
466
+ this._split(t), this._split(n);
467
+ let e = this.byStart[t];
468
+ for (; e; )
469
+ e.intro = "", e.outro = "", e.edit(""), e = n > e.end ? this.byStart[e.end] : null;
668
470
  return this;
669
471
  }
670
- reset(e, n) {
671
- if (e = e + this.offset, n = n + this.offset, this.original.length !== 0) {
672
- for (; e < 0; ) e += this.original.length;
472
+ reset(t, n) {
473
+ if (t = t + this.offset, n = n + this.offset, this.original.length !== 0) {
474
+ for (; t < 0; ) t += this.original.length;
673
475
  for (; n < 0; ) n += this.original.length;
674
476
  }
675
- if (e === n) return this;
676
- if (e < 0 || n > this.original.length) throw new Error("Character is out of bounds");
677
- if (e > n) throw new Error("end must be greater than start");
678
- this._split(e), this._split(n);
679
- let t = this.byStart[e];
680
- for (; t; )
681
- t.reset(), t = n > t.end ? this.byStart[t.end] : null;
477
+ if (t === n) return this;
478
+ if (t < 0 || n > this.original.length) throw new Error("Character is out of bounds");
479
+ if (t > n) throw new Error("end must be greater than start");
480
+ this._split(t), this._split(n);
481
+ let e = this.byStart[t];
482
+ for (; e; )
483
+ e.reset(), e = n > e.end ? this.byStart[e.end] : null;
682
484
  return this;
683
485
  }
684
486
  lastChar() {
685
487
  if (this.outro.length) return this.outro[this.outro.length - 1];
686
- let e = this.lastChunk;
488
+ let t = this.lastChunk;
687
489
  do {
688
- if (e.outro.length) return e.outro[e.outro.length - 1];
689
- if (e.content.length) return e.content[e.content.length - 1];
690
- if (e.intro.length) return e.intro[e.intro.length - 1];
691
- } while (e = e.previous);
490
+ if (t.outro.length) return t.outro[t.outro.length - 1];
491
+ if (t.content.length) return t.content[t.content.length - 1];
492
+ if (t.intro.length) return t.intro[t.intro.length - 1];
493
+ } while (t = t.previous);
692
494
  return this.intro.length ? this.intro[this.intro.length - 1] : "";
693
495
  }
694
496
  lastLine() {
695
- let e = this.outro.lastIndexOf(He);
696
- if (e !== -1) return this.outro.substr(e + 1);
697
- let n = this.outro, t = this.lastChunk;
497
+ let t = this.outro.lastIndexOf(Mt);
498
+ if (t !== -1) return this.outro.substr(t + 1);
499
+ let n = this.outro, e = this.lastChunk;
698
500
  do {
699
- if (t.outro.length > 0) {
700
- if (e = t.outro.lastIndexOf(He), e !== -1) return t.outro.substr(e + 1) + n;
701
- n = t.outro + n;
501
+ if (e.outro.length > 0) {
502
+ if (t = e.outro.lastIndexOf(Mt), t !== -1) return e.outro.substr(t + 1) + n;
503
+ n = e.outro + n;
702
504
  }
703
- if (t.content.length > 0) {
704
- if (e = t.content.lastIndexOf(He), e !== -1) return t.content.substr(e + 1) + n;
705
- n = t.content + n;
505
+ if (e.content.length > 0) {
506
+ if (t = e.content.lastIndexOf(Mt), t !== -1) return e.content.substr(t + 1) + n;
507
+ n = e.content + n;
706
508
  }
707
- if (t.intro.length > 0) {
708
- if (e = t.intro.lastIndexOf(He), e !== -1) return t.intro.substr(e + 1) + n;
709
- n = t.intro + n;
509
+ if (e.intro.length > 0) {
510
+ if (t = e.intro.lastIndexOf(Mt), t !== -1) return e.intro.substr(t + 1) + n;
511
+ n = e.intro + n;
710
512
  }
711
- } while (t = t.previous);
712
- return e = this.intro.lastIndexOf(He), e !== -1 ? this.intro.substr(e + 1) + n : this.intro + n;
513
+ } while (e = e.previous);
514
+ return t = this.intro.lastIndexOf(Mt), t !== -1 ? this.intro.substr(t + 1) + n : this.intro + n;
713
515
  }
714
- slice(e = 0, n = this.original.length - this.offset) {
715
- if (e = e + this.offset, n = n + this.offset, this.original.length !== 0) {
716
- for (; e < 0; ) e += this.original.length;
516
+ slice(t = 0, n = this.original.length - this.offset) {
517
+ if (t = t + this.offset, n = n + this.offset, this.original.length !== 0) {
518
+ for (; t < 0; ) t += this.original.length;
717
519
  for (; n < 0; ) n += this.original.length;
718
520
  }
719
- let t = "", o = this.firstChunk;
720
- for (; o && (o.start > e || o.end <= e); ) {
721
- if (o.start < n && o.end >= n)
722
- return t;
723
- o = o.next;
521
+ let e = "", i = this.firstChunk;
522
+ for (; i && (i.start > t || i.end <= t); ) {
523
+ if (i.start < n && i.end >= n)
524
+ return e;
525
+ i = i.next;
724
526
  }
725
- if (o && o.edited && o.start !== e)
726
- throw new Error(`Cannot use replaced character ${e} as slice start anchor.`);
727
- const i = o;
728
- for (; o; ) {
729
- o.intro && (i !== o || o.start === e) && (t += o.intro);
730
- const a = o.start < n && o.end >= n;
731
- if (a && o.edited && o.end !== n)
527
+ if (i && i.edited && i.start !== t)
528
+ throw new Error(`Cannot use replaced character ${t} as slice start anchor.`);
529
+ const o = i;
530
+ for (; i; ) {
531
+ i.intro && (o !== i || i.start === t) && (e += i.intro);
532
+ const s = i.start < n && i.end >= n;
533
+ if (s && i.edited && i.end !== n)
732
534
  throw new Error(`Cannot use replaced character ${n} as slice end anchor.`);
733
- const c = i === o ? e - o.start : 0, s = a ? o.content.length + n - o.end : o.content.length;
734
- if (t += o.content.slice(c, s), o.outro && (!a || o.end === n) && (t += o.outro), a)
535
+ const r = o === i ? t - i.start : 0, a = s ? i.content.length + n - i.end : i.content.length;
536
+ if (e += i.content.slice(r, a), i.outro && (!s || i.end === n) && (e += i.outro), s)
735
537
  break;
736
- o = o.next;
538
+ i = i.next;
737
539
  }
738
- return t;
540
+ return e;
739
541
  }
740
542
  // TODO deprecate this? not really very useful
741
- snip(e, n) {
742
- const t = this.clone();
743
- return t.remove(0, e), t.remove(n, t.original.length), t;
543
+ snip(t, n) {
544
+ const e = this.clone();
545
+ return e.remove(0, t), e.remove(n, e.original.length), e;
744
546
  }
745
- _split(e) {
746
- if (this.byStart[e] || this.byEnd[e]) return;
547
+ _split(t) {
548
+ if (this.byStart[t] || this.byEnd[t]) return;
747
549
  let n = this.lastSearchedChunk;
748
- const t = e > n.end;
550
+ const e = t > n.end;
749
551
  for (; n; ) {
750
- if (n.contains(e)) return this._splitChunk(n, e);
751
- n = t ? this.byStart[n.end] : this.byEnd[n.start];
552
+ if (n.contains(t)) return this._splitChunk(n, t);
553
+ n = e ? this.byStart[n.end] : this.byEnd[n.start];
752
554
  }
753
555
  }
754
- _splitChunk(e, n) {
755
- if (e.edited && e.content.length) {
756
- const o = mt(this.original)(n);
556
+ _splitChunk(t, n) {
557
+ if (t.edited && t.content.length) {
558
+ const i = de(this.original)(n);
757
559
  throw new Error(
758
- `Cannot split a chunk that has already been edited (${o.line}:${o.column} – "${e.original}")`
560
+ `Cannot split a chunk that has already been edited (${i.line}:${i.column} – "${t.original}")`
759
561
  );
760
562
  }
761
- const t = e.split(n);
762
- return this.byEnd[n] = e, this.byStart[n] = t, this.byEnd[t.end] = t, e === this.lastChunk && (this.lastChunk = t), this.lastSearchedChunk = e, !0;
563
+ const e = t.split(n);
564
+ return this.byEnd[n] = t, this.byStart[n] = e, this.byEnd[e.end] = e, t === this.lastChunk && (this.lastChunk = e), this.lastSearchedChunk = t, !0;
763
565
  }
764
566
  toString() {
765
- let e = this.intro, n = this.firstChunk;
567
+ let t = this.intro, n = this.firstChunk;
766
568
  for (; n; )
767
- e += n.toString(), n = n.next;
768
- return e + this.outro;
569
+ t += n.toString(), n = n.next;
570
+ return t + this.outro;
769
571
  }
770
572
  isEmpty() {
771
- let e = this.firstChunk;
573
+ let t = this.firstChunk;
772
574
  do
773
- if (e.intro.length && e.intro.trim() || e.content.length && e.content.trim() || e.outro.length && e.outro.trim())
575
+ if (t.intro.length && t.intro.trim() || t.content.length && t.content.trim() || t.outro.length && t.outro.trim())
774
576
  return !1;
775
- while (e = e.next);
577
+ while (t = t.next);
776
578
  return !0;
777
579
  }
778
580
  length() {
779
- let e = this.firstChunk, n = 0;
581
+ let t = this.firstChunk, n = 0;
780
582
  do
781
- n += e.intro.length + e.content.length + e.outro.length;
782
- while (e = e.next);
583
+ n += t.intro.length + t.content.length + t.outro.length;
584
+ while (t = t.next);
783
585
  return n;
784
586
  }
785
587
  trimLines() {
786
588
  return this.trim("[\\r\\n]");
787
589
  }
788
- trim(e) {
789
- return this.trimStart(e).trimEnd(e);
590
+ trim(t) {
591
+ return this.trimStart(t).trimEnd(t);
790
592
  }
791
- trimEndAborted(e) {
792
- const n = new RegExp((e || "\\s") + "+$");
593
+ trimEndAborted(t) {
594
+ const n = new RegExp((t || "\\s") + "+$");
793
595
  if (this.outro = this.outro.replace(n, ""), this.outro.length) return !0;
794
- let t = this.lastChunk;
596
+ let e = this.lastChunk;
795
597
  do {
796
- const o = t.end, i = t.trimEnd(n);
797
- if (t.end !== o && (this.lastChunk === t && (this.lastChunk = t.next), this.byEnd[t.end] = t, this.byStart[t.next.start] = t.next, this.byEnd[t.next.end] = t.next), i) return !0;
798
- t = t.previous;
799
- } while (t);
598
+ const i = e.end, o = e.trimEnd(n);
599
+ if (e.end !== i && (this.lastChunk === e && (this.lastChunk = e.next), this.byEnd[e.end] = e, this.byStart[e.next.start] = e.next, this.byEnd[e.next.end] = e.next), o) return !0;
600
+ e = e.previous;
601
+ } while (e);
800
602
  return !1;
801
603
  }
802
- trimEnd(e) {
803
- return this.trimEndAborted(e), this;
604
+ trimEnd(t) {
605
+ return this.trimEndAborted(t), this;
804
606
  }
805
- trimStartAborted(e) {
806
- const n = new RegExp("^" + (e || "\\s") + "+");
607
+ trimStartAborted(t) {
608
+ const n = new RegExp("^" + (t || "\\s") + "+");
807
609
  if (this.intro = this.intro.replace(n, ""), this.intro.length) return !0;
808
- let t = this.firstChunk;
610
+ let e = this.firstChunk;
809
611
  do {
810
- const o = t.end, i = t.trimStart(n);
811
- if (t.end !== o && (t === this.lastChunk && (this.lastChunk = t.next), this.byEnd[t.end] = t, this.byStart[t.next.start] = t.next, this.byEnd[t.next.end] = t.next), i) return !0;
812
- t = t.next;
813
- } while (t);
612
+ const i = e.end, o = e.trimStart(n);
613
+ if (e.end !== i && (e === this.lastChunk && (this.lastChunk = e.next), this.byEnd[e.end] = e, this.byStart[e.next.start] = e.next, this.byEnd[e.next.end] = e.next), o) return !0;
614
+ e = e.next;
615
+ } while (e);
814
616
  return !1;
815
617
  }
816
- trimStart(e) {
817
- return this.trimStartAborted(e), this;
618
+ trimStart(t) {
619
+ return this.trimStartAborted(t), this;
818
620
  }
819
621
  hasChanged() {
820
622
  return this.original !== this.toString();
821
623
  }
822
- _replaceRegexp(e, n) {
823
- function t(i, a) {
824
- return typeof n == "string" ? n.replace(/\$(\$|&|\d+)/g, (c, s) => s === "$" ? "$" : s === "&" ? i[0] : +s < i.length ? i[+s] : `$${s}`) : n(...i, i.index, a, i.groups);
624
+ _replaceRegexp(t, n) {
625
+ function e(o, s) {
626
+ return typeof n == "string" ? n.replace(/\$(\$|&|\d+)/g, (r, a) => a === "$" ? "$" : a === "&" ? o[0] : +a < o.length ? o[+a] : `$${a}`) : n(...o, o.index, s, o.groups);
825
627
  }
826
- function o(i, a) {
827
- let c;
828
- const s = [];
829
- for (; c = i.exec(a); )
830
- s.push(c);
831
- return s;
628
+ function i(o, s) {
629
+ let r;
630
+ const a = [];
631
+ for (; r = o.exec(s); )
632
+ a.push(r);
633
+ return a;
832
634
  }
833
- if (e.global)
834
- o(e, this.original).forEach((a) => {
835
- if (a.index != null) {
836
- const c = t(a, this.original);
837
- c !== a[0] && this.overwrite(a.index, a.index + a[0].length, c);
635
+ if (t.global)
636
+ i(t, this.original).forEach((s) => {
637
+ if (s.index != null) {
638
+ const r = e(s, this.original);
639
+ r !== s[0] && this.overwrite(s.index, s.index + s[0].length, r);
838
640
  }
839
641
  });
840
642
  else {
841
- const i = this.original.match(e);
842
- if (i && i.index != null) {
843
- const a = t(i, this.original);
844
- a !== i[0] && this.overwrite(i.index, i.index + i[0].length, a);
643
+ const o = this.original.match(t);
644
+ if (o && o.index != null) {
645
+ const s = e(o, this.original);
646
+ s !== o[0] && this.overwrite(o.index, o.index + o[0].length, s);
845
647
  }
846
648
  }
847
649
  return this;
848
650
  }
849
- _replaceString(e, n) {
850
- const { original: t } = this, o = t.indexOf(e);
851
- return o !== -1 && this.overwrite(o, o + e.length, n), this;
651
+ _replaceString(t, n) {
652
+ const { original: e } = this, i = e.indexOf(t);
653
+ return i !== -1 && this.overwrite(i, i + t.length, n), this;
852
654
  }
853
- replace(e, n) {
854
- return typeof e == "string" ? this._replaceString(e, n) : this._replaceRegexp(e, n);
655
+ replace(t, n) {
656
+ return typeof t == "string" ? this._replaceString(t, n) : this._replaceRegexp(t, n);
855
657
  }
856
- _replaceAllString(e, n) {
857
- const { original: t } = this, o = e.length;
858
- for (let i = t.indexOf(e); i !== -1; i = t.indexOf(e, i + o))
859
- t.slice(i, i + o) !== n && this.overwrite(i, i + o, n);
658
+ _replaceAllString(t, n) {
659
+ const { original: e } = this, i = t.length;
660
+ for (let o = e.indexOf(t); o !== -1; o = e.indexOf(t, o + i))
661
+ e.slice(o, o + i) !== n && this.overwrite(o, o + i, n);
860
662
  return this;
861
663
  }
862
- replaceAll(e, n) {
863
- if (typeof e == "string")
864
- return this._replaceAllString(e, n);
865
- if (!e.global)
664
+ replaceAll(t, n) {
665
+ if (typeof t == "string")
666
+ return this._replaceAllString(t, n);
667
+ if (!t.global)
866
668
  throw new TypeError(
867
669
  "MagicString.prototype.replaceAll called with a non-global RegExp argument"
868
670
  );
869
- return this._replaceRegexp(e, n);
671
+ return this._replaceRegexp(t, n);
870
672
  }
871
673
  }
872
- const Ge = (h, e) => {
873
- const n = h.__vccOpts || h;
874
- for (const [t, o] of e)
875
- n[t] = o;
674
+ const Bt = (c, t) => {
675
+ const n = c.__vccOpts || c;
676
+ for (const [e, i] of t)
677
+ n[e] = i;
876
678
  return n;
877
- }, ee = Xe(!1), Y = k(() => {
878
- ee.value = !0;
679
+ }, j = Lt(!1), V = b(() => {
680
+ j.value = !0;
879
681
  }, {
880
682
  metaData: {
881
683
  id: "engine.setting.event.BindEventsDialog.open"
882
684
  },
883
685
  ctx: () => ({
884
- string2Ast: ae,
885
- getMergeMeta: K,
886
- useCanvas: N,
887
- useHistory: le,
888
- useLayout: J,
889
- getOptions: re,
890
- getMetaApi: M,
891
- META_APP: V,
892
- MagicString: Q,
893
- meta: Z,
894
- dialogVisible: ee,
895
- open: Y,
896
- close: ie
686
+ string2Ast: H,
687
+ getMergeMeta: L,
688
+ useCanvas: y,
689
+ useHistory: K,
690
+ useLayout: N,
691
+ getOptions: X,
692
+ getMetaApi: k,
693
+ META_APP: C,
694
+ MagicString: U,
695
+ meta: R,
696
+ dialogVisible: j,
697
+ open: V,
698
+ close: F
897
699
  })
898
- }), ie = k(() => {
899
- ee.value = !1;
700
+ }), F = b(() => {
701
+ j.value = !1;
900
702
  }, {
901
703
  metaData: {
902
704
  id: "engine.setting.event.BindEventsDialog.close"
903
705
  },
904
706
  ctx: () => ({
905
- string2Ast: ae,
906
- getMergeMeta: K,
907
- useCanvas: N,
908
- useHistory: le,
909
- useLayout: J,
910
- getOptions: re,
911
- getMetaApi: M,
912
- META_APP: V,
913
- MagicString: Q,
914
- meta: Z,
915
- dialogVisible: ee,
916
- open: Y,
917
- close: ie
707
+ string2Ast: H,
708
+ getMergeMeta: L,
709
+ useCanvas: y,
710
+ useHistory: K,
711
+ useLayout: N,
712
+ getOptions: X,
713
+ getMetaApi: k,
714
+ META_APP: C,
715
+ MagicString: U,
716
+ meta: R,
717
+ dialogVisible: j,
718
+ open: V,
719
+ close: F
918
720
  })
919
- }), Jt = {
721
+ }), Fe = {
920
722
  components: {
921
- TinyButton: tt,
922
- TinyDialogBox: Et,
923
- TinyAlert: kt
723
+ TinyButton: Ft,
724
+ TinyDialogBox: fe,
725
+ TinyAlert: ye
924
726
  },
925
727
  inheritAttrs: !1,
926
728
  props: {
@@ -929,20 +731,20 @@ const Ge = (h, e) => {
929
731
  default: () => ({})
930
732
  }
931
733
  },
932
- setup(h) {
734
+ setup(c) {
933
735
  const {
934
- BindEventsDialogSidebar: e,
736
+ BindEventsDialogSidebar: t,
935
737
  BindEventsDialogContent: n
936
- } = K(Z.id).components, {
937
- PLUGIN_NAME: t,
938
- activePlugin: o
939
- } = J(), {
940
- pageState: i
738
+ } = L(R.id).components, {
739
+ PLUGIN_NAME: e,
740
+ activePlugin: i
941
741
  } = N(), {
942
- getMethods: a,
943
- saveMethod: c,
944
- highlightMethod: s
945
- } = M(V.Page), r = Ze({
742
+ pageState: o
743
+ } = y(), {
744
+ getMethods: s,
745
+ saveMethod: r,
746
+ highlightMethod: a
747
+ } = k(C.Page), d = Ut({
946
748
  editorContent: "",
947
749
  bindMethodInfo: {},
948
750
  tip: "",
@@ -950,297 +752,297 @@ const Ge = (h, e) => {
950
752
  enableExtraParams: !1,
951
753
  isValidParams: !0
952
754
  });
953
- vt("context", r);
954
- const b = k((D) => {
955
- r.bindMethodInfo = D;
755
+ he("context", d);
756
+ const f = b((E) => {
757
+ d.bindMethodInfo = E;
956
758
  }, {
957
759
  metaData: {
958
760
  id: "engine.setting.event.BindEventsDialog.selectMethod"
959
761
  },
960
762
  ctx: () => ({
961
- props: h,
962
- BindEventsDialogSidebar: e,
763
+ props: c,
764
+ BindEventsDialogSidebar: t,
963
765
  BindEventsDialogContent: n,
964
- PLUGIN_NAME: t,
965
- activePlugin: o,
966
- pageState: i,
967
- getMethods: a,
968
- saveMethod: c,
969
- highlightMethod: s,
970
- state: r,
971
- selectMethod: b,
766
+ PLUGIN_NAME: e,
767
+ activePlugin: i,
768
+ pageState: o,
769
+ getMethods: s,
770
+ saveMethod: r,
771
+ highlightMethod: a,
772
+ state: d,
773
+ selectMethod: f,
972
774
  bindMethod: l,
973
- resetTipError: v,
974
- getExtraParams: g,
975
- getFormatParams: m,
976
- rewriteMethodParams: C,
977
- activePagePlugin: A,
978
- confirm: I,
979
- openedDialog: T,
980
- closeDialog: z,
981
- string2Ast: ae,
982
- getMergeMeta: K,
983
- useCanvas: N,
984
- useHistory: le,
985
- useLayout: J,
986
- getOptions: re,
987
- getMetaApi: M,
988
- META_APP: V,
989
- MagicString: Q,
990
- meta: Z,
991
- dialogVisible: ee,
992
- open: Y,
993
- close: ie
775
+ resetTipError: u,
776
+ getExtraParams: h,
777
+ getFormatParams: g,
778
+ rewriteMethodParams: p,
779
+ activePagePlugin: w,
780
+ confirm: x,
781
+ openedDialog: A,
782
+ closeDialog: P,
783
+ string2Ast: H,
784
+ getMergeMeta: L,
785
+ useCanvas: y,
786
+ useHistory: K,
787
+ useLayout: N,
788
+ getOptions: X,
789
+ getMetaApi: k,
790
+ META_APP: C,
791
+ MagicString: U,
792
+ meta: R,
793
+ dialogVisible: j,
794
+ open: V,
795
+ close: F
994
796
  })
995
- }), l = k((D) => {
996
- var de, te;
997
- if (!D)
797
+ }), l = b((E) => {
798
+ var Y, q;
799
+ if (!E)
998
800
  return;
999
- const y = (de = h.eventBinding) == null ? void 0 : de.eventName;
1000
- if (!y)
801
+ const v = (Y = c.eventBinding) == null ? void 0 : Y.eventName;
802
+ if (!v)
1001
803
  return;
1002
- const B = (te = i == null ? void 0 : i.currentSchema) == null ? void 0 : te.props;
1003
- if (!B)
804
+ const D = (q = o == null ? void 0 : o.currentSchema) == null ? void 0 : q.props;
805
+ if (!D)
1004
806
  return;
1005
807
  const {
1006
- name: q,
1007
- extra: me
1008
- } = D;
1009
- h[y] || (B[y] = {
808
+ name: M,
809
+ extra: et
810
+ } = E;
811
+ c[v] || (D[v] = {
1010
812
  type: "JSExpression",
1011
813
  value: ""
1012
- }), me && r.enableExtraParams && (B[y].params = me), B[y].value = `this.${q}`, le().addHistory();
814
+ }), et && d.enableExtraParams && (D[v].params = et), D[v].value = `this.${M}`, K().addHistory();
1013
815
  }, {
1014
816
  metaData: {
1015
817
  id: "engine.setting.event.BindEventsDialog.bindMethod"
1016
818
  },
1017
819
  ctx: () => ({
1018
- props: h,
1019
- BindEventsDialogSidebar: e,
820
+ props: c,
821
+ BindEventsDialogSidebar: t,
1020
822
  BindEventsDialogContent: n,
1021
- PLUGIN_NAME: t,
1022
- activePlugin: o,
1023
- pageState: i,
1024
- getMethods: a,
1025
- saveMethod: c,
1026
- highlightMethod: s,
1027
- state: r,
1028
- selectMethod: b,
823
+ PLUGIN_NAME: e,
824
+ activePlugin: i,
825
+ pageState: o,
826
+ getMethods: s,
827
+ saveMethod: r,
828
+ highlightMethod: a,
829
+ state: d,
830
+ selectMethod: f,
1029
831
  bindMethod: l,
1030
- resetTipError: v,
1031
- getExtraParams: g,
1032
- getFormatParams: m,
1033
- rewriteMethodParams: C,
1034
- activePagePlugin: A,
1035
- confirm: I,
1036
- openedDialog: T,
1037
- closeDialog: z,
1038
- string2Ast: ae,
1039
- getMergeMeta: K,
1040
- useCanvas: N,
1041
- useHistory: le,
1042
- useLayout: J,
1043
- getOptions: re,
1044
- getMetaApi: M,
1045
- META_APP: V,
1046
- MagicString: Q,
1047
- meta: Z,
1048
- dialogVisible: ee,
1049
- open: Y,
1050
- close: ie
832
+ resetTipError: u,
833
+ getExtraParams: h,
834
+ getFormatParams: g,
835
+ rewriteMethodParams: p,
836
+ activePagePlugin: w,
837
+ confirm: x,
838
+ openedDialog: A,
839
+ closeDialog: P,
840
+ string2Ast: H,
841
+ getMergeMeta: L,
842
+ useCanvas: y,
843
+ useHistory: K,
844
+ useLayout: N,
845
+ getOptions: X,
846
+ getMetaApi: k,
847
+ META_APP: C,
848
+ MagicString: U,
849
+ meta: R,
850
+ dialogVisible: j,
851
+ open: V,
852
+ close: F
1051
853
  })
1052
- }), v = k(() => {
1053
- r.tipError = !1, r.tip = "", r.isValidParams = !0;
854
+ }), u = b(() => {
855
+ d.tipError = !1, d.tip = "", d.isValidParams = !0;
1054
856
  }, {
1055
857
  metaData: {
1056
858
  id: "engine.setting.event.BindEventsDialog.resetTipError"
1057
859
  },
1058
860
  ctx: () => ({
1059
- props: h,
1060
- BindEventsDialogSidebar: e,
861
+ props: c,
862
+ BindEventsDialogSidebar: t,
1061
863
  BindEventsDialogContent: n,
1062
- PLUGIN_NAME: t,
1063
- activePlugin: o,
1064
- pageState: i,
1065
- getMethods: a,
1066
- saveMethod: c,
1067
- highlightMethod: s,
1068
- state: r,
1069
- selectMethod: b,
864
+ PLUGIN_NAME: e,
865
+ activePlugin: i,
866
+ pageState: o,
867
+ getMethods: s,
868
+ saveMethod: r,
869
+ highlightMethod: a,
870
+ state: d,
871
+ selectMethod: f,
1070
872
  bindMethod: l,
1071
- resetTipError: v,
1072
- getExtraParams: g,
1073
- getFormatParams: m,
1074
- rewriteMethodParams: C,
1075
- activePagePlugin: A,
1076
- confirm: I,
1077
- openedDialog: T,
1078
- closeDialog: z,
1079
- string2Ast: ae,
1080
- getMergeMeta: K,
1081
- useCanvas: N,
1082
- useHistory: le,
1083
- useLayout: J,
1084
- getOptions: re,
1085
- getMetaApi: M,
1086
- META_APP: V,
1087
- MagicString: Q,
1088
- meta: Z,
1089
- dialogVisible: ee,
1090
- open: Y,
1091
- close: ie
873
+ resetTipError: u,
874
+ getExtraParams: h,
875
+ getFormatParams: g,
876
+ rewriteMethodParams: p,
877
+ activePagePlugin: w,
878
+ confirm: x,
879
+ openedDialog: A,
880
+ closeDialog: P,
881
+ string2Ast: H,
882
+ getMergeMeta: L,
883
+ useCanvas: y,
884
+ useHistory: K,
885
+ useLayout: N,
886
+ getOptions: X,
887
+ getMetaApi: k,
888
+ META_APP: C,
889
+ MagicString: U,
890
+ meta: R,
891
+ dialogVisible: j,
892
+ open: V,
893
+ close: F
1092
894
  })
1093
- }), g = k(() => {
1094
- let D = "";
1095
- if (r.enableExtraParams)
895
+ }), h = b(() => {
896
+ let E = "";
897
+ if (d.enableExtraParams)
1096
898
  try {
1097
- D = JSON.parse(r.editorContent), r.isValidParams = Array.isArray(D);
899
+ E = JSON.parse(d.editorContent), d.isValidParams = Array.isArray(E);
1098
900
  } catch {
1099
- r.isValidParams = !1;
901
+ d.isValidParams = !1;
1100
902
  }
1101
- return D;
903
+ return E;
1102
904
  }, {
1103
905
  metaData: {
1104
906
  id: "engine.setting.event.BindEventsDialog.getExtraParams"
1105
907
  },
1106
908
  ctx: () => ({
1107
- props: h,
1108
- BindEventsDialogSidebar: e,
909
+ props: c,
910
+ BindEventsDialogSidebar: t,
1109
911
  BindEventsDialogContent: n,
1110
- PLUGIN_NAME: t,
1111
- activePlugin: o,
1112
- pageState: i,
1113
- getMethods: a,
1114
- saveMethod: c,
1115
- highlightMethod: s,
1116
- state: r,
1117
- selectMethod: b,
912
+ PLUGIN_NAME: e,
913
+ activePlugin: i,
914
+ pageState: o,
915
+ getMethods: s,
916
+ saveMethod: r,
917
+ highlightMethod: a,
918
+ state: d,
919
+ selectMethod: f,
1118
920
  bindMethod: l,
1119
- resetTipError: v,
1120
- getExtraParams: g,
1121
- getFormatParams: m,
1122
- rewriteMethodParams: C,
1123
- activePagePlugin: A,
1124
- confirm: I,
1125
- openedDialog: T,
1126
- closeDialog: z,
1127
- string2Ast: ae,
1128
- getMergeMeta: K,
1129
- useCanvas: N,
1130
- useHistory: le,
1131
- useLayout: J,
1132
- getOptions: re,
1133
- getMetaApi: M,
1134
- META_APP: V,
1135
- MagicString: Q,
1136
- meta: Z,
1137
- dialogVisible: ee,
1138
- open: Y,
1139
- close: ie
921
+ resetTipError: u,
922
+ getExtraParams: h,
923
+ getFormatParams: g,
924
+ rewriteMethodParams: p,
925
+ activePagePlugin: w,
926
+ confirm: x,
927
+ openedDialog: A,
928
+ closeDialog: P,
929
+ string2Ast: H,
930
+ getMergeMeta: L,
931
+ useCanvas: y,
932
+ useHistory: K,
933
+ useLayout: N,
934
+ getOptions: X,
935
+ getMetaApi: k,
936
+ META_APP: C,
937
+ MagicString: U,
938
+ meta: R,
939
+ dialogVisible: j,
940
+ open: V,
941
+ close: F
1140
942
  })
1141
- }), m = k((D) => Array.from({
1142
- length: D.length
1143
- }, (y, B) => `args${B}`).join(","), {
943
+ }), g = b((E) => Array.from({
944
+ length: E.length
945
+ }, (v, D) => `args${D}`).join(","), {
1144
946
  metaData: {
1145
947
  id: "engine.setting.event.BindEventsDialog.getFormatParams"
1146
948
  },
1147
949
  ctx: () => ({
1148
- props: h,
1149
- BindEventsDialogSidebar: e,
950
+ props: c,
951
+ BindEventsDialogSidebar: t,
1150
952
  BindEventsDialogContent: n,
1151
- PLUGIN_NAME: t,
1152
- activePlugin: o,
1153
- pageState: i,
1154
- getMethods: a,
1155
- saveMethod: c,
1156
- highlightMethod: s,
1157
- state: r,
1158
- selectMethod: b,
953
+ PLUGIN_NAME: e,
954
+ activePlugin: i,
955
+ pageState: o,
956
+ getMethods: s,
957
+ saveMethod: r,
958
+ highlightMethod: a,
959
+ state: d,
960
+ selectMethod: f,
1159
961
  bindMethod: l,
1160
- resetTipError: v,
1161
- getExtraParams: g,
1162
- getFormatParams: m,
1163
- rewriteMethodParams: C,
1164
- activePagePlugin: A,
1165
- confirm: I,
1166
- openedDialog: T,
1167
- closeDialog: z,
1168
- string2Ast: ae,
1169
- getMergeMeta: K,
1170
- useCanvas: N,
1171
- useHistory: le,
1172
- useLayout: J,
1173
- getOptions: re,
1174
- getMetaApi: M,
1175
- META_APP: V,
1176
- MagicString: Q,
1177
- meta: Z,
1178
- dialogVisible: ee,
1179
- open: Y,
1180
- close: ie
962
+ resetTipError: u,
963
+ getExtraParams: h,
964
+ getFormatParams: g,
965
+ rewriteMethodParams: p,
966
+ activePagePlugin: w,
967
+ confirm: x,
968
+ openedDialog: A,
969
+ closeDialog: P,
970
+ string2Ast: H,
971
+ getMergeMeta: L,
972
+ useCanvas: y,
973
+ useHistory: K,
974
+ useLayout: N,
975
+ getOptions: X,
976
+ getMetaApi: k,
977
+ META_APP: C,
978
+ MagicString: U,
979
+ meta: R,
980
+ dialogVisible: j,
981
+ open: V,
982
+ close: F
1181
983
  })
1182
- }), C = k((D, y, B, q, me) => {
1183
- var p, u, d, f, E;
1184
- const de = me && q.length ? `event,${B}` : B, te = `function ${y} (${de}) {
984
+ }), p = b((E, v, D, M, et) => {
985
+ var nt, it, ot, Z, jt;
986
+ const Y = et && M.length ? `event,${D}` : D, q = `function ${v} (${Y}) {
1185
987
  }
1186
988
  `;
1187
- if (!D)
1188
- return te;
989
+ if (!E)
990
+ return q;
1189
991
  try {
1190
- const w = new Q(D), x = ae(D);
1191
- if (((u = (p = x == null ? void 0 : x.program) == null ? void 0 : p.body[0]) == null ? void 0 : u.type) !== "FunctionDeclaration")
1192
- return te;
1193
- if (((d = x == null ? void 0 : x.program) == null ? void 0 : d.body[0].params.length) === q.length + 1)
1194
- return D;
1195
- const L = (f = x == null ? void 0 : x.program) == null ? void 0 : f.body[0].id.end, U = (E = x == null ? void 0 : x.program) == null ? void 0 : E.body[0].body.start;
1196
- return w.remove(L, U), w.appendLeft(L, `(${de})`), w.toString();
992
+ const gt = new U(E), T = H(E);
993
+ if (((it = (nt = T == null ? void 0 : T.program) == null ? void 0 : nt.body[0]) == null ? void 0 : it.type) !== "FunctionDeclaration")
994
+ return q;
995
+ if (((ot = T == null ? void 0 : T.program) == null ? void 0 : ot.body[0].params.length) === M.length + 1)
996
+ return E;
997
+ const Pt = (Z = T == null ? void 0 : T.program) == null ? void 0 : Z.body[0].id.end, Xt = (jt = T == null ? void 0 : T.program) == null ? void 0 : jt.body[0].body.start;
998
+ return gt.remove(Pt, Xt), gt.appendLeft(Pt, `(${Y})`), gt.toString();
1197
999
  } catch {
1198
- return te;
1000
+ return q;
1199
1001
  }
1200
1002
  }, {
1201
1003
  metaData: {
1202
1004
  id: "engine.setting.event.BindEventsDialog.rewriteMethodParams"
1203
1005
  },
1204
1006
  ctx: () => ({
1205
- props: h,
1206
- BindEventsDialogSidebar: e,
1007
+ props: c,
1008
+ BindEventsDialogSidebar: t,
1207
1009
  BindEventsDialogContent: n,
1208
- PLUGIN_NAME: t,
1209
- activePlugin: o,
1210
- pageState: i,
1211
- getMethods: a,
1212
- saveMethod: c,
1213
- highlightMethod: s,
1214
- state: r,
1215
- selectMethod: b,
1010
+ PLUGIN_NAME: e,
1011
+ activePlugin: i,
1012
+ pageState: o,
1013
+ getMethods: s,
1014
+ saveMethod: r,
1015
+ highlightMethod: a,
1016
+ state: d,
1017
+ selectMethod: f,
1216
1018
  bindMethod: l,
1217
- resetTipError: v,
1218
- getExtraParams: g,
1219
- getFormatParams: m,
1220
- rewriteMethodParams: C,
1221
- activePagePlugin: A,
1222
- confirm: I,
1223
- openedDialog: T,
1224
- closeDialog: z,
1225
- string2Ast: ae,
1226
- getMergeMeta: K,
1227
- useCanvas: N,
1228
- useHistory: le,
1229
- useLayout: J,
1230
- getOptions: re,
1231
- getMetaApi: M,
1232
- META_APP: V,
1233
- MagicString: Q,
1234
- meta: Z,
1235
- dialogVisible: ee,
1236
- open: Y,
1237
- close: ie
1019
+ resetTipError: u,
1020
+ getExtraParams: h,
1021
+ getFormatParams: g,
1022
+ rewriteMethodParams: p,
1023
+ activePagePlugin: w,
1024
+ confirm: x,
1025
+ openedDialog: A,
1026
+ closeDialog: P,
1027
+ string2Ast: H,
1028
+ getMergeMeta: L,
1029
+ useCanvas: y,
1030
+ useHistory: K,
1031
+ useLayout: N,
1032
+ getOptions: X,
1033
+ getMetaApi: k,
1034
+ META_APP: C,
1035
+ MagicString: U,
1036
+ meta: R,
1037
+ dialogVisible: j,
1038
+ open: V,
1039
+ close: F
1238
1040
  })
1239
- }), A = k(() => {
1240
- o(t.Page).then(() => {
1241
- wt(() => {
1242
- var D;
1243
- s && s((D = r.bindMethodInfo) == null ? void 0 : D.name);
1041
+ }), w = b(() => {
1042
+ i(e.Page).then(() => {
1043
+ Ee(() => {
1044
+ var E;
1045
+ a && a((E = d.bindMethodInfo) == null ? void 0 : E.name);
1244
1046
  });
1245
1047
  });
1246
1048
  }, {
@@ -1248,252 +1050,252 @@ const Ge = (h, e) => {
1248
1050
  id: "engine.setting.event.BindEventsDialog.activePagePlugin"
1249
1051
  },
1250
1052
  ctx: () => ({
1251
- props: h,
1252
- BindEventsDialogSidebar: e,
1053
+ props: c,
1054
+ BindEventsDialogSidebar: t,
1253
1055
  BindEventsDialogContent: n,
1254
- PLUGIN_NAME: t,
1255
- activePlugin: o,
1256
- pageState: i,
1257
- getMethods: a,
1258
- saveMethod: c,
1259
- highlightMethod: s,
1260
- state: r,
1261
- selectMethod: b,
1056
+ PLUGIN_NAME: e,
1057
+ activePlugin: i,
1058
+ pageState: o,
1059
+ getMethods: s,
1060
+ saveMethod: r,
1061
+ highlightMethod: a,
1062
+ state: d,
1063
+ selectMethod: f,
1262
1064
  bindMethod: l,
1263
- resetTipError: v,
1264
- getExtraParams: g,
1265
- getFormatParams: m,
1266
- rewriteMethodParams: C,
1267
- activePagePlugin: A,
1268
- confirm: I,
1269
- openedDialog: T,
1270
- closeDialog: z,
1271
- string2Ast: ae,
1272
- getMergeMeta: K,
1273
- useCanvas: N,
1274
- useHistory: le,
1275
- useLayout: J,
1276
- getOptions: re,
1277
- getMetaApi: M,
1278
- META_APP: V,
1279
- MagicString: Q,
1280
- meta: Z,
1281
- dialogVisible: ee,
1282
- open: Y,
1283
- close: ie
1065
+ resetTipError: u,
1066
+ getExtraParams: h,
1067
+ getFormatParams: g,
1068
+ rewriteMethodParams: p,
1069
+ activePagePlugin: w,
1070
+ confirm: x,
1071
+ openedDialog: A,
1072
+ closeDialog: P,
1073
+ string2Ast: H,
1074
+ getMergeMeta: L,
1075
+ useCanvas: y,
1076
+ useHistory: K,
1077
+ useLayout: N,
1078
+ getOptions: X,
1079
+ getMetaApi: k,
1080
+ META_APP: C,
1081
+ MagicString: U,
1082
+ meta: R,
1083
+ dialogVisible: j,
1084
+ open: V,
1085
+ close: F
1284
1086
  })
1285
- }), I = k(async () => {
1286
- var u, d;
1287
- if (r.tipError)
1087
+ }), x = b(async () => {
1088
+ var it, ot;
1089
+ if (d.tipError)
1288
1090
  return;
1289
- let D = "event";
1290
- const y = g();
1291
- let B = D;
1292
- if (!r.isValidParams)
1091
+ let E = "event";
1092
+ const v = h();
1093
+ let D = E;
1094
+ if (!d.isValidParams)
1293
1095
  return;
1294
- y && (D = y.join(","), B = m(y)), l({
1295
- ...r.bindMethodInfo,
1296
- params: D,
1297
- extra: y
1096
+ v && (E = v.join(","), D = g(v)), l({
1097
+ ...d.bindMethodInfo,
1098
+ params: E,
1099
+ extra: v
1298
1100
  });
1299
1101
  const {
1300
- name: q
1301
- } = r.bindMethodInfo, me = (d = (u = a()) == null ? void 0 : u[r.bindMethodInfo.name]) == null ? void 0 : d.value, de = C(me, q, B, y, r.enableExtraParams), te = {
1302
- name: q,
1303
- content: de
1102
+ name: M
1103
+ } = d.bindMethodInfo, et = (ot = (it = s()) == null ? void 0 : it[d.bindMethodInfo.name]) == null ? void 0 : ot.value, Y = p(et, M, D, v, d.enableExtraParams), q = {
1104
+ name: M,
1105
+ content: Y
1304
1106
  }, {
1305
- beforeSaveMethod: p
1306
- } = re(Z.id);
1307
- typeof p == "function" && await p(te, r.bindMethodInfo), c == null || c(te), A(), ie();
1107
+ beforeSaveMethod: nt
1108
+ } = X(R.id);
1109
+ typeof nt == "function" && await nt(q, d.bindMethodInfo), r == null || r(q), w(), F();
1308
1110
  }, {
1309
1111
  metaData: {
1310
1112
  id: "engine.setting.event.BindEventsDialog.confirm"
1311
1113
  },
1312
1114
  ctx: () => ({
1313
- props: h,
1314
- BindEventsDialogSidebar: e,
1115
+ props: c,
1116
+ BindEventsDialogSidebar: t,
1315
1117
  BindEventsDialogContent: n,
1316
- PLUGIN_NAME: t,
1317
- activePlugin: o,
1318
- pageState: i,
1319
- getMethods: a,
1320
- saveMethod: c,
1321
- highlightMethod: s,
1322
- state: r,
1323
- selectMethod: b,
1118
+ PLUGIN_NAME: e,
1119
+ activePlugin: i,
1120
+ pageState: o,
1121
+ getMethods: s,
1122
+ saveMethod: r,
1123
+ highlightMethod: a,
1124
+ state: d,
1125
+ selectMethod: f,
1324
1126
  bindMethod: l,
1325
- resetTipError: v,
1326
- getExtraParams: g,
1327
- getFormatParams: m,
1328
- rewriteMethodParams: C,
1329
- activePagePlugin: A,
1330
- confirm: I,
1331
- openedDialog: T,
1332
- closeDialog: z,
1333
- string2Ast: ae,
1334
- getMergeMeta: K,
1335
- useCanvas: N,
1336
- useHistory: le,
1337
- useLayout: J,
1338
- getOptions: re,
1339
- getMetaApi: M,
1340
- META_APP: V,
1341
- MagicString: Q,
1342
- meta: Z,
1343
- dialogVisible: ee,
1344
- open: Y,
1345
- close: ie
1127
+ resetTipError: u,
1128
+ getExtraParams: h,
1129
+ getFormatParams: g,
1130
+ rewriteMethodParams: p,
1131
+ activePagePlugin: w,
1132
+ confirm: x,
1133
+ openedDialog: A,
1134
+ closeDialog: P,
1135
+ string2Ast: H,
1136
+ getMergeMeta: L,
1137
+ useCanvas: y,
1138
+ useHistory: K,
1139
+ useLayout: N,
1140
+ getOptions: X,
1141
+ getMetaApi: k,
1142
+ META_APP: C,
1143
+ MagicString: U,
1144
+ meta: R,
1145
+ dialogVisible: j,
1146
+ open: V,
1147
+ close: F
1346
1148
  })
1347
- }), T = k(() => {
1348
- var D, y, B;
1349
- r.enableExtraParams = !!((y = (D = h.eventBinding) == null ? void 0 : D.params) != null && y.length), r.editorContent = JSON.stringify(((B = h.eventBinding) == null ? void 0 : B.params) || [], null, 2), v();
1149
+ }), A = b(() => {
1150
+ var E, v, D;
1151
+ d.enableExtraParams = !!((v = (E = c.eventBinding) == null ? void 0 : E.params) != null && v.length), d.editorContent = JSON.stringify(((D = c.eventBinding) == null ? void 0 : D.params) || [], null, 2), u();
1350
1152
  }, {
1351
1153
  metaData: {
1352
1154
  id: "engine.setting.event.BindEventsDialog.openedDialog"
1353
1155
  },
1354
1156
  ctx: () => ({
1355
- props: h,
1356
- BindEventsDialogSidebar: e,
1157
+ props: c,
1158
+ BindEventsDialogSidebar: t,
1357
1159
  BindEventsDialogContent: n,
1358
- PLUGIN_NAME: t,
1359
- activePlugin: o,
1360
- pageState: i,
1361
- getMethods: a,
1362
- saveMethod: c,
1363
- highlightMethod: s,
1364
- state: r,
1365
- selectMethod: b,
1160
+ PLUGIN_NAME: e,
1161
+ activePlugin: i,
1162
+ pageState: o,
1163
+ getMethods: s,
1164
+ saveMethod: r,
1165
+ highlightMethod: a,
1166
+ state: d,
1167
+ selectMethod: f,
1366
1168
  bindMethod: l,
1367
- resetTipError: v,
1368
- getExtraParams: g,
1369
- getFormatParams: m,
1370
- rewriteMethodParams: C,
1371
- activePagePlugin: A,
1372
- confirm: I,
1373
- openedDialog: T,
1374
- closeDialog: z,
1375
- string2Ast: ae,
1376
- getMergeMeta: K,
1377
- useCanvas: N,
1378
- useHistory: le,
1379
- useLayout: J,
1380
- getOptions: re,
1381
- getMetaApi: M,
1382
- META_APP: V,
1383
- MagicString: Q,
1384
- meta: Z,
1385
- dialogVisible: ee,
1386
- open: Y,
1387
- close: ie
1169
+ resetTipError: u,
1170
+ getExtraParams: h,
1171
+ getFormatParams: g,
1172
+ rewriteMethodParams: p,
1173
+ activePagePlugin: w,
1174
+ confirm: x,
1175
+ openedDialog: A,
1176
+ closeDialog: P,
1177
+ string2Ast: H,
1178
+ getMergeMeta: L,
1179
+ useCanvas: y,
1180
+ useHistory: K,
1181
+ useLayout: N,
1182
+ getOptions: X,
1183
+ getMetaApi: k,
1184
+ META_APP: C,
1185
+ MagicString: U,
1186
+ meta: R,
1187
+ dialogVisible: j,
1188
+ open: V,
1189
+ close: F
1388
1190
  })
1389
- }), z = k(() => {
1390
- v(), ie();
1191
+ }), P = b(() => {
1192
+ u(), F();
1391
1193
  }, {
1392
1194
  metaData: {
1393
1195
  id: "engine.setting.event.BindEventsDialog.closeDialog"
1394
1196
  },
1395
1197
  ctx: () => ({
1396
- props: h,
1397
- BindEventsDialogSidebar: e,
1198
+ props: c,
1199
+ BindEventsDialogSidebar: t,
1398
1200
  BindEventsDialogContent: n,
1399
- PLUGIN_NAME: t,
1400
- activePlugin: o,
1401
- pageState: i,
1402
- getMethods: a,
1403
- saveMethod: c,
1404
- highlightMethod: s,
1405
- state: r,
1406
- selectMethod: b,
1201
+ PLUGIN_NAME: e,
1202
+ activePlugin: i,
1203
+ pageState: o,
1204
+ getMethods: s,
1205
+ saveMethod: r,
1206
+ highlightMethod: a,
1207
+ state: d,
1208
+ selectMethod: f,
1407
1209
  bindMethod: l,
1408
- resetTipError: v,
1409
- getExtraParams: g,
1410
- getFormatParams: m,
1411
- rewriteMethodParams: C,
1412
- activePagePlugin: A,
1413
- confirm: I,
1414
- openedDialog: T,
1415
- closeDialog: z,
1416
- string2Ast: ae,
1417
- getMergeMeta: K,
1418
- useCanvas: N,
1419
- useHistory: le,
1420
- useLayout: J,
1421
- getOptions: re,
1422
- getMetaApi: M,
1423
- META_APP: V,
1424
- MagicString: Q,
1425
- meta: Z,
1426
- dialogVisible: ee,
1427
- open: Y,
1428
- close: ie
1210
+ resetTipError: u,
1211
+ getExtraParams: h,
1212
+ getFormatParams: g,
1213
+ rewriteMethodParams: p,
1214
+ activePagePlugin: w,
1215
+ confirm: x,
1216
+ openedDialog: A,
1217
+ closeDialog: P,
1218
+ string2Ast: H,
1219
+ getMergeMeta: L,
1220
+ useCanvas: y,
1221
+ useHistory: K,
1222
+ useLayout: N,
1223
+ getOptions: X,
1224
+ getMetaApi: k,
1225
+ META_APP: C,
1226
+ MagicString: U,
1227
+ meta: R,
1228
+ dialogVisible: j,
1229
+ open: V,
1230
+ close: F
1429
1231
  })
1430
1232
  });
1431
1233
  return {
1432
- BindEventsDialogSidebar: e,
1234
+ BindEventsDialogSidebar: t,
1433
1235
  BindEventsDialogContent: n,
1434
- state: r,
1435
- dialogVisible: ee,
1436
- confirm: I,
1437
- closeDialog: z,
1438
- openedDialog: T,
1439
- selectMethod: b
1236
+ state: d,
1237
+ dialogVisible: j,
1238
+ confirm: x,
1239
+ closeDialog: P,
1240
+ openedDialog: A,
1241
+ selectMethod: f
1440
1242
  };
1441
1243
  }
1442
- }, Xt = { class: "bind-event-dialog-tip" }, Gt = { class: "bind-event-dialog-content" }, Kt = { class: "bind-dialog-footer" };
1443
- function Ht(h, e, n, t, o, i) {
1444
- const a = H("tiny-alert"), c = H("tiny-button"), s = H("tiny-dialog-box");
1445
- return j(), ve(s, {
1446
- visible: t.dialogVisible,
1244
+ }, Je = { class: "bind-event-dialog-tip" }, Xe = { class: "bind-event-dialog-content" }, Ke = { class: "bind-dialog-footer" };
1245
+ function He(c, t, n, e, i, o) {
1246
+ const s = B("tiny-alert"), r = B("tiny-button"), a = B("tiny-dialog-box");
1247
+ return S(), tt(a, {
1248
+ visible: e.dialogVisible,
1447
1249
  title: "事件绑定",
1448
1250
  width: "50%",
1449
1251
  "dialog-class": "bind-event-dialog",
1450
1252
  draggable: "",
1451
1253
  "append-to-body": !0,
1452
- onClose: t.closeDialog,
1453
- onOpened: t.openedDialog
1254
+ onClose: e.closeDialog,
1255
+ onOpened: e.openedDialog
1454
1256
  }, {
1455
- footer: X(() => [
1456
- _("div", Kt, [
1457
- S(c, { onClick: t.closeDialog }, {
1458
- default: X(() => e[0] || (e[0] = [
1459
- Ue("取 消")
1257
+ footer: I(() => [
1258
+ m("div", Ke, [
1259
+ _(r, { onClick: e.closeDialog }, {
1260
+ default: I(() => t[0] || (t[0] = [
1261
+ Dt("取 消")
1460
1262
  ])),
1461
1263
  _: 1,
1462
1264
  __: [0]
1463
1265
  }, 8, ["onClick"]),
1464
- S(c, {
1266
+ _(r, {
1465
1267
  type: "info",
1466
- onClick: t.confirm
1268
+ onClick: e.confirm
1467
1269
  }, {
1468
- default: X(() => e[1] || (e[1] = [
1469
- Ue("确 定")
1270
+ default: I(() => t[1] || (t[1] = [
1271
+ Dt("确 定")
1470
1272
  ])),
1471
1273
  _: 1,
1472
1274
  __: [1]
1473
1275
  }, 8, ["onClick"])
1474
1276
  ])
1475
1277
  ]),
1476
- default: X(() => [
1477
- _("div", Xt, [
1478
- S(a, {
1278
+ default: I(() => [
1279
+ m("div", Je, [
1280
+ _(s, {
1479
1281
  type: "info",
1480
1282
  description: "选择已有方法或者添加新方法(点击 确定 之后将在JS面板中创建一个该名称的新方法)。",
1481
1283
  class: "header-alert",
1482
1284
  closable: !1
1483
1285
  })
1484
1286
  ]),
1485
- _("div", Gt, [
1486
- (j(), ve(dt(t.BindEventsDialogSidebar), {
1487
- dialogVisible: t.dialogVisible,
1287
+ m("div", Xe, [
1288
+ (S(), tt(te(e.BindEventsDialogSidebar), {
1289
+ dialogVisible: e.dialogVisible,
1488
1290
  eventBinding: n.eventBinding
1489
1291
  }, null, 8, ["dialogVisible", "eventBinding"])),
1490
- (j(), ve(dt(t.BindEventsDialogContent), { dialogVisible: t.dialogVisible }, null, 8, ["dialogVisible"]))
1292
+ (S(), tt(te(e.BindEventsDialogContent), { dialogVisible: e.dialogVisible }, null, 8, ["dialogVisible"]))
1491
1293
  ])
1492
1294
  ]),
1493
1295
  _: 1
1494
1296
  }, 8, ["visible", "onClose", "onOpened"]);
1495
1297
  }
1496
- const Re = /* @__PURE__ */ Ge(Jt, [["render", Ht], ["__scopeId", "data-v-84897b97"]]), Ct = {
1298
+ const Ct = /* @__PURE__ */ Bt(Fe, [["render", He], ["__scopeId", "data-v-84897b97"]]), pe = {
1497
1299
  onClick: {
1498
1300
  label: {
1499
1301
  zh_CN: "点击事件"
@@ -1550,19 +1352,19 @@ const Re = /* @__PURE__ */ Ge(Jt, [["render", Ht], ["__scopeId", "data-v-84897b9
1550
1352
  },
1551
1353
  defaultValue: ""
1552
1354
  }
1553
- }, pt = ["onabort", "onafterprint", "onanimationend", "onanimationiteration", "onanimationstart", "onappinstalled", "onauxclick", "onbeforeinstallprompt", "onbeforeprint", "onbeforeunload", "onbeforexrselect", "onblur", "oncancel", "oncanplay", "oncanplaythrough", "onchange", "onclick", "onclose", "oncontextlost", "oncontextmenu", "oncontextrestored", "oncuechange", "ondblclick", "ondrag", "ondragend", "ondragenter", "ondragleave", "ondragover", "ondragstart", "ondrop", "ondurationchange", "onemptied", "onended", "onerror", "onfocus", "onformdata", "ongotpointercapture", "onhashchange", "oninput", "oninvalid", "onkeydown", "onkeypress", "onkeyup", "onlanguagechange", "onload", "onloadeddata", "onloadedmetadata", "onloadstart", "onlostpointercapture", "onmessage", "onmessageerror", "onmousedown", "onmouseenter", "onmouseleave", "onmousemove", "onmouseout", "onmouseover", "onmouseup", "onmousewheel", "onoffline", "ononline", "onpagehide", "onpageshow", "onpause", "onplay", "onplaying", "onpointercancel", "onpointerdown", "onpointerenter", "onpointerleave", "onpointermove", "onpointerout", "onpointerover", "onpointerrawupdate", "onpointerup", "onpopstate", "onprogress", "onratechange", "onrejectionhandled", "onreset", "onresize", "onscroll", "onsearch", "onsecuritypolicyviolation", "onseeked", "onseeking", "onselect", "onselectionchange", "onselectstart", "onslotchange", "onstalled", "onstorage", "onsubmit", "onsuspend", "ontimeupdate", "ontoggle", "ontransitioncancel", "ontransitionend", "ontransitionrun", "ontransitionstart", "onunhandledrejection", "onunload", "onvolumechange", "onwaiting", "onwebkitanimationend", "onwebkitanimationiteration", "onwebkitanimationstart", "onwebkittransitionend", "onwheel"], qe = k((h) => !!pt.map((n) => {
1554
- const t = n[2].toUpperCase();
1555
- return `${n.substring(0, 2)}${t}${n.substring(3)}`;
1556
- }).includes(h), {
1355
+ }, ce = ["onabort", "onafterprint", "onanimationend", "onanimationiteration", "onanimationstart", "onappinstalled", "onauxclick", "onbeforeinstallprompt", "onbeforeprint", "onbeforeunload", "onbeforexrselect", "onblur", "oncancel", "oncanplay", "oncanplaythrough", "onchange", "onclick", "onclose", "oncontextlost", "oncontextmenu", "oncontextrestored", "oncuechange", "ondblclick", "ondrag", "ondragend", "ondragenter", "ondragleave", "ondragover", "ondragstart", "ondrop", "ondurationchange", "onemptied", "onended", "onerror", "onfocus", "onformdata", "ongotpointercapture", "onhashchange", "oninput", "oninvalid", "onkeydown", "onkeypress", "onkeyup", "onlanguagechange", "onload", "onloadeddata", "onloadedmetadata", "onloadstart", "onlostpointercapture", "onmessage", "onmessageerror", "onmousedown", "onmouseenter", "onmouseleave", "onmousemove", "onmouseout", "onmouseover", "onmouseup", "onmousewheel", "onoffline", "ononline", "onpagehide", "onpageshow", "onpause", "onplay", "onplaying", "onpointercancel", "onpointerdown", "onpointerenter", "onpointerleave", "onpointermove", "onpointerout", "onpointerover", "onpointerrawupdate", "onpointerup", "onpopstate", "onprogress", "onratechange", "onrejectionhandled", "onreset", "onresize", "onscroll", "onsearch", "onsecuritypolicyviolation", "onseeked", "onseeking", "onselect", "onselectionchange", "onselectstart", "onslotchange", "onstalled", "onstorage", "onsubmit", "onsuspend", "ontimeupdate", "ontoggle", "ontransitioncancel", "ontransitionend", "ontransitionrun", "ontransitionstart", "onunhandledrejection", "onunload", "onvolumechange", "onwaiting", "onwebkitanimationend", "onwebkitanimationiteration", "onwebkitanimationstart", "onwebkittransitionend", "onwheel"], Ot = b((c) => !!ce.map((n) => {
1356
+ const e = n[2].toUpperCase();
1357
+ return `${n.substring(0, 2)}${e}${n.substring(3)}`;
1358
+ }).includes(c), {
1557
1359
  metaData: {
1558
1360
  id: "engine.setting.event.commonjs-events.checkEvent"
1559
1361
  },
1560
1362
  ctx: () => ({
1561
- commonEvents: Ct,
1562
- allEvents: pt,
1563
- checkEvent: qe
1363
+ commonEvents: pe,
1364
+ allEvents: ce,
1365
+ checkEvent: Ot
1564
1366
  })
1565
- }), qt = { class: "footer" }, Yt = {
1367
+ }), qe = { class: "footer" }, Ge = {
1566
1368
  __name: "AddEventsDialog",
1567
1369
  props: {
1568
1370
  visible: {
@@ -1575,36 +1377,36 @@ const Re = /* @__PURE__ */ Ge(Jt, [["render", Ht], ["__scopeId", "data-v-84897b9
1575
1377
  }
1576
1378
  },
1577
1379
  emits: ["closeDialog", "addEvent"],
1578
- setup(h, { emit: e }) {
1579
- const n = h, t = e, o = Ze({
1380
+ setup(c, { emit: t }) {
1381
+ const n = c, e = t, i = Ut({
1580
1382
  eventDescription: "",
1581
1383
  eventName: ""
1582
- }), i = Xe(null), a = k((b, l, v) => {
1583
- if (n.componentEvents[o.eventName]) {
1584
- v(new Error("事件名已存在"));
1384
+ }), o = Lt(null), s = b((f, l, u) => {
1385
+ if (n.componentEvents[i.eventName]) {
1386
+ u(new Error("事件名已存在"));
1585
1387
  return;
1586
1388
  }
1587
- if (!qe(o.eventName)) {
1588
- v(new Error("请输入正确的浏览器事件名"));
1389
+ if (!Ot(i.eventName)) {
1390
+ u(new Error("请输入正确的浏览器事件名"));
1589
1391
  return;
1590
1392
  }
1591
- v();
1393
+ u();
1592
1394
  }, {
1593
1395
  metaData: {
1594
1396
  id: "engine.setting.event.AddEventsDialog.eventNameValidator"
1595
1397
  },
1596
1398
  ctx: () => ({
1597
- checkEvent: qe,
1399
+ checkEvent: Ot,
1598
1400
  props: n,
1599
- emits: t,
1600
- formData: o,
1601
- ruleForm: i,
1602
- eventNameValidator: a,
1603
- rules: c,
1604
- closeDialog: s,
1605
- addMethod: r
1401
+ emits: e,
1402
+ formData: i,
1403
+ ruleForm: o,
1404
+ eventNameValidator: s,
1405
+ rules: r,
1406
+ closeDialog: a,
1407
+ addMethod: d
1606
1408
  })
1607
- }), c = {
1409
+ }), r = {
1608
1410
  eventDescription: [{
1609
1411
  required: !0,
1610
1412
  message: "必填"
@@ -1613,36 +1415,36 @@ const Re = /* @__PURE__ */ Ge(Jt, [["render", Ht], ["__scopeId", "data-v-84897b9
1613
1415
  required: !0,
1614
1416
  message: "必填"
1615
1417
  }, {
1616
- validator: a
1418
+ validator: s
1617
1419
  }]
1618
- }, s = k(() => {
1619
- t("closeDialog");
1420
+ }, a = b(() => {
1421
+ e("closeDialog");
1620
1422
  }, {
1621
1423
  metaData: {
1622
1424
  id: "engine.setting.event.AddEventsDialog.closeDialog"
1623
1425
  },
1624
1426
  ctx: () => ({
1625
- checkEvent: qe,
1427
+ checkEvent: Ot,
1626
1428
  props: n,
1627
- emits: t,
1628
- formData: o,
1629
- ruleForm: i,
1630
- eventNameValidator: a,
1631
- rules: c,
1632
- closeDialog: s,
1633
- addMethod: r
1429
+ emits: e,
1430
+ formData: i,
1431
+ ruleForm: o,
1432
+ eventNameValidator: s,
1433
+ rules: r,
1434
+ closeDialog: a,
1435
+ addMethod: d
1634
1436
  })
1635
- }), r = k(() => {
1636
- i.value && i.value.validate((b) => {
1637
- if (!b)
1437
+ }), d = b(() => {
1438
+ o.value && o.value.validate((f) => {
1439
+ if (!f)
1638
1440
  return;
1639
1441
  const {
1640
1442
  eventName: l,
1641
- eventDescription: v
1642
- } = o;
1643
- t("addEvent", {
1443
+ eventDescription: u
1444
+ } = i;
1445
+ e("addEvent", {
1644
1446
  eventName: l,
1645
- eventDescription: v
1447
+ eventDescription: u
1646
1448
  });
1647
1449
  });
1648
1450
  }, {
@@ -1650,82 +1452,82 @@ const Re = /* @__PURE__ */ Ge(Jt, [["render", Ht], ["__scopeId", "data-v-84897b9
1650
1452
  id: "engine.setting.event.AddEventsDialog.addMethod"
1651
1453
  },
1652
1454
  ctx: () => ({
1653
- checkEvent: qe,
1455
+ checkEvent: Ot,
1654
1456
  props: n,
1655
- emits: t,
1656
- formData: o,
1657
- ruleForm: i,
1658
- eventNameValidator: a,
1659
- rules: c,
1660
- closeDialog: s,
1661
- addMethod: r
1457
+ emits: e,
1458
+ formData: i,
1459
+ ruleForm: o,
1460
+ eventNameValidator: s,
1461
+ rules: r,
1462
+ closeDialog: a,
1463
+ addMethod: d
1662
1464
  })
1663
1465
  });
1664
- return (b, l) => (j(), ve(W(Et), {
1665
- visible: h.visible,
1466
+ return (f, l) => (S(), tt(O(fe), {
1467
+ visible: c.visible,
1666
1468
  title: "添加新事件",
1667
1469
  width: "400px",
1668
1470
  "append-to-body": !0,
1669
1471
  "close-on-click-modal": !1,
1670
- onClose: W(s)
1472
+ onClose: O(a)
1671
1473
  }, {
1672
- footer: X(() => [
1673
- _("div", qt, [
1674
- S(W(tt), { onClick: W(s) }, {
1675
- default: X(() => l[2] || (l[2] = [
1676
- Ue(" 取消")
1474
+ footer: I(() => [
1475
+ m("div", qe, [
1476
+ _(O(Ft), { onClick: O(a) }, {
1477
+ default: I(() => l[2] || (l[2] = [
1478
+ Dt(" 取消")
1677
1479
  ])),
1678
1480
  _: 1,
1679
1481
  __: [2]
1680
1482
  }, 8, ["onClick"]),
1681
- S(W(tt), {
1483
+ _(O(Ft), {
1682
1484
  type: "primary",
1683
- onClick: W(r)
1485
+ onClick: O(d)
1684
1486
  }, {
1685
- default: X(() => l[3] || (l[3] = [
1686
- Ue(" 确定")
1487
+ default: I(() => l[3] || (l[3] = [
1488
+ Dt(" 确定")
1687
1489
  ])),
1688
1490
  _: 1,
1689
1491
  __: [3]
1690
1492
  }, 8, ["onClick"])
1691
1493
  ])
1692
1494
  ]),
1693
- default: X(() => [
1694
- S(W(Dt), {
1495
+ default: I(() => [
1496
+ _(O(we), {
1695
1497
  ref_key: "ruleForm",
1696
- ref: i,
1697
- model: o,
1698
- rules: c,
1498
+ ref: o,
1499
+ model: i,
1500
+ rules: r,
1699
1501
  "label-width": "80px",
1700
1502
  "inline-message": !0,
1701
1503
  "validate-type": "text",
1702
1504
  "label-position": "left",
1703
1505
  class: "add-custom-event-form"
1704
1506
  }, {
1705
- default: X(() => [
1706
- S(W(ft), {
1507
+ default: I(() => [
1508
+ _(O(oe), {
1707
1509
  label: "事件函数名",
1708
1510
  prop: "eventName",
1709
1511
  required: ""
1710
1512
  }, {
1711
- default: X(() => [
1712
- S(W(rt), {
1713
- modelValue: o.eventName,
1714
- "onUpdate:modelValue": l[0] || (l[0] = (v) => o.eventName = v),
1513
+ default: I(() => [
1514
+ _(O(qt), {
1515
+ modelValue: i.eventName,
1516
+ "onUpdate:modelValue": l[0] || (l[0] = (u) => i.eventName = u),
1715
1517
  placeholder: "小驼峰格式,如:onDrag"
1716
1518
  }, null, 8, ["modelValue"])
1717
1519
  ]),
1718
1520
  _: 1
1719
1521
  }),
1720
- S(W(ft), {
1522
+ _(O(oe), {
1721
1523
  label: "事件描述",
1722
1524
  prop: "eventDescription",
1723
1525
  required: ""
1724
1526
  }, {
1725
- default: X(() => [
1726
- S(W(rt), {
1727
- modelValue: o.eventDescription,
1728
- "onUpdate:modelValue": l[1] || (l[1] = (v) => o.eventDescription = v)
1527
+ default: I(() => [
1528
+ _(O(qt), {
1529
+ modelValue: i.eventDescription,
1530
+ "onUpdate:modelValue": l[1] || (l[1] = (u) => i.eventDescription = u)
1729
1531
  }, null, 8, ["modelValue"])
1730
1532
  ]),
1731
1533
  _: 1
@@ -1737,125 +1539,125 @@ const Re = /* @__PURE__ */ Ge(Jt, [["render", Ht], ["__scopeId", "data-v-84897b9
1737
1539
  _: 1
1738
1540
  }, 8, ["visible", "onClose"]));
1739
1541
  }
1740
- }, Te = /* @__PURE__ */ Ge(Yt, [["__scopeId", "data-v-2ed7fac6"]]), Wt = {
1542
+ }, kt = /* @__PURE__ */ Bt(Ge, [["__scopeId", "data-v-2ed7fac6"]]), We = {
1741
1543
  components: {
1742
- BlockLinkEvent: Me,
1743
- BindEventsDialog: Re,
1744
- TinyPopover: St,
1745
- TinyButton: tt,
1746
- IconChevronDown: Oe(),
1747
- SvgButton: Ve,
1748
- AddEventsDialog: Te
1544
+ BlockLinkEvent: wt,
1545
+ BindEventsDialog: Ct,
1546
+ TinyPopover: xe,
1547
+ TinyButton: Ft,
1548
+ IconChevronDown: xt(),
1549
+ SvgButton: yt,
1550
+ AddEventsDialog: kt
1749
1551
  },
1750
1552
  inheritAttrs: !1,
1751
1553
  setup() {
1752
1554
  const {
1753
- PLUGIN_NAME: h,
1754
- activePlugin: e
1755
- } = J(), {
1756
- pageState: n
1555
+ PLUGIN_NAME: c,
1556
+ activePlugin: t
1757
1557
  } = N(), {
1758
- getBlockEvents: t,
1759
- getCurrentBlock: o,
1760
- removeEventLink: i
1761
- } = Ne(), {
1762
- getMaterial: a
1763
- } = Ie(), {
1764
- confirm: c
1765
- } = Le(), s = Pe.global.locale.value, {
1766
- highlightMethod: r
1767
- } = M(V.Page), {
1768
- commonEvents: b = {}
1769
- } = K("engine.setting.event").options, l = Ze({
1558
+ pageState: n
1559
+ } = y(), {
1560
+ getBlockEvents: e,
1561
+ getCurrentBlock: i,
1562
+ removeEventLink: o
1563
+ } = pt(), {
1564
+ getMaterial: s
1565
+ } = vt(), {
1566
+ confirm: r
1567
+ } = bt(), a = Et.global.locale.value, {
1568
+ highlightMethod: d
1569
+ } = k(C.Page), {
1570
+ commonEvents: f = {}
1571
+ } = L("engine.setting.event").options, l = Ut({
1770
1572
  eventName: "",
1771
1573
  // 事件名称
1772
1574
  eventBinding: null,
1773
1575
  // 事件绑定的处理方法对象
1774
1576
  componentEvent: {},
1775
- customEvents: b,
1577
+ customEvents: f,
1776
1578
  bindActions: {},
1777
1579
  showBindEventDialog: !1
1778
- }), v = Ye(() => !!n.isBlock), g = Ye(() => Object.keys(l.bindActions).length === 0), m = Ye(() => ({
1580
+ }), u = Tt(() => !!n.isBlock), h = Tt(() => Object.keys(l.bindActions).length === 0), g = Tt(() => ({
1779
1581
  ...l.componentEvent,
1780
1582
  ...l.customEvents
1781
1583
  }));
1782
- bt(() => {
1783
- var de, te, p, u, d;
1784
- const y = (de = n == null ? void 0 : n.currentSchema) == null ? void 0 : de.componentName, B = a(y);
1785
- l.componentEvent = ((p = (te = B == null ? void 0 : B.content) == null ? void 0 : te.schema) == null ? void 0 : p.events) || ((u = B == null ? void 0 : B.schema) == null ? void 0 : u.events) || {};
1786
- const q = ((d = n == null ? void 0 : n.currentSchema) == null ? void 0 : d.props) || {}, me = Object.keys(q);
1787
- l.bindActions = {}, Object.entries(m.value).forEach(([f, E]) => {
1788
- var w, x, L;
1789
- if (me.indexOf(f) > -1) {
1790
- const U = q[f], {
1791
- value: $,
1792
- params: O
1793
- } = U, G = !O && ((x = (w = $.match(/\((.+)\)$/)) == null ? void 0 : w[1]) == null ? void 0 : x.split(",")) || O, R = {
1794
- eventName: f,
1584
+ ue(() => {
1585
+ var Y, q, nt, it, ot;
1586
+ const v = (Y = n == null ? void 0 : n.currentSchema) == null ? void 0 : Y.componentName, D = s(v);
1587
+ l.componentEvent = ((nt = (q = D == null ? void 0 : D.content) == null ? void 0 : q.schema) == null ? void 0 : nt.events) || ((it = D == null ? void 0 : D.schema) == null ? void 0 : it.events) || {};
1588
+ const M = ((ot = n == null ? void 0 : n.currentSchema) == null ? void 0 : ot.props) || {}, et = Object.keys(M);
1589
+ l.bindActions = {}, Object.entries(g.value).forEach(([Z, jt]) => {
1590
+ var gt, T, Pt;
1591
+ if (et.indexOf(Z) > -1) {
1592
+ const Xt = M[Z], {
1593
+ value: ve,
1594
+ params: Gt
1595
+ } = Xt, be = !Gt && ((T = (gt = ve.match(/\((.+)\)$/)) == null ? void 0 : gt[1]) == null ? void 0 : T.split(",")) || Gt, ft = {
1596
+ eventName: Z,
1795
1597
  ref: "",
1796
- event: q[f],
1797
- params: G
1598
+ event: M[Z],
1599
+ params: be
1798
1600
  };
1799
- if (R.event.type === "JSExpression" && (R.ref = R.event.value.replace("this.", "").replace(/\(.*\)$/, "")), n.isBlock) {
1800
- R.metaEvent = E;
1801
- const P = t(o()), F = (L = n == null ? void 0 : n.currentSchema) == null ? void 0 : L.id;
1802
- F && P && Object.entries(P).forEach(([ce, he]) => {
1803
- var be, _e;
1804
- F === ((be = he == null ? void 0 : he.linked) == null ? void 0 : be.id) && f === ((_e = he == null ? void 0 : he.linked) == null ? void 0 : _e.event) && (R.linked = he.linked, R.linkedEventName = ce);
1601
+ if (ft.event.type === "JSExpression" && (ft.ref = ft.event.value.replace("this.", "").replace(/\(.*\)$/, "")), n.isBlock) {
1602
+ ft.metaEvent = jt;
1603
+ const Wt = e(i()), Yt = (Pt = n == null ? void 0 : n.currentSchema) == null ? void 0 : Pt.id;
1604
+ Yt && Wt && Object.entries(Wt).forEach(([_e, mt]) => {
1605
+ var Zt, Qt;
1606
+ Yt === ((Zt = mt == null ? void 0 : mt.linked) == null ? void 0 : Zt.id) && Z === ((Qt = mt == null ? void 0 : mt.linked) == null ? void 0 : Qt.event) && (ft.linked = mt.linked, ft.linkedEventName = _e);
1805
1607
  });
1806
1608
  }
1807
- l.bindActions[f] = R;
1609
+ l.bindActions[Z] = ft;
1808
1610
  }
1809
1611
  });
1810
1612
  });
1811
- const C = k((y, B) => {
1812
- B && l.bindActions[y.eventName] || (l.eventBinding = y, Y());
1613
+ const p = b((v, D) => {
1614
+ D && l.bindActions[v.eventName] || (l.eventBinding = v, V());
1813
1615
  }, {
1814
1616
  metaData: {
1815
1617
  id: "engine.setting.event.BindEvents.openActionDialog"
1816
1618
  },
1817
1619
  ctx: () => ({
1818
- PLUGIN_NAME: h,
1819
- activePlugin: e,
1620
+ PLUGIN_NAME: c,
1621
+ activePlugin: t,
1820
1622
  pageState: n,
1821
- getBlockEvents: t,
1822
- getCurrentBlock: o,
1823
- removeEventLink: i,
1824
- getMaterial: a,
1825
- confirm: c,
1826
- locale: s,
1827
- highlightMethod: r,
1828
- commonEvents: b,
1623
+ getBlockEvents: e,
1624
+ getCurrentBlock: i,
1625
+ removeEventLink: o,
1626
+ getMaterial: s,
1627
+ confirm: r,
1628
+ locale: a,
1629
+ highlightMethod: d,
1630
+ commonEvents: f,
1829
1631
  state: l,
1830
- isBlock: v,
1831
- isEmpty: g,
1832
- renderEventList: m,
1833
- openActionDialog: C,
1834
- deleteAction: A,
1835
- delEvent: I,
1836
- openCodePanel: T,
1837
- handleToggleAddEventDialog: z,
1838
- handleAddEvent: D,
1839
- useModal: Le,
1840
- getMergeMeta: K,
1841
- useCanvas: N,
1842
- useLayout: J,
1843
- useBlock: Ne,
1844
- useMaterial: Ie,
1845
- getMetaApi: M,
1846
- META_APP: V,
1847
- useMessage: Be,
1848
- i18n: Pe,
1849
- BlockLinkEvent: Me,
1850
- SvgButton: Ve,
1851
- iconChevronDown: Oe,
1852
- BindEventsDialog: Re,
1853
- openDialog: Y,
1854
- AddEventsDialog: Te
1632
+ isBlock: u,
1633
+ isEmpty: h,
1634
+ renderEventList: g,
1635
+ openActionDialog: p,
1636
+ deleteAction: w,
1637
+ delEvent: x,
1638
+ openCodePanel: A,
1639
+ handleToggleAddEventDialog: P,
1640
+ handleAddEvent: E,
1641
+ useModal: bt,
1642
+ getMergeMeta: L,
1643
+ useCanvas: y,
1644
+ useLayout: N,
1645
+ useBlock: pt,
1646
+ useMaterial: vt,
1647
+ getMetaApi: k,
1648
+ META_APP: C,
1649
+ useMessage: _t,
1650
+ i18n: Et,
1651
+ BlockLinkEvent: wt,
1652
+ SvgButton: yt,
1653
+ iconChevronDown: xt,
1654
+ BindEventsDialog: Ct,
1655
+ openDialog: V,
1656
+ AddEventsDialog: kt
1855
1657
  })
1856
- }), A = k((y) => {
1857
- var q;
1858
- Object.keys(((q = n == null ? void 0 : n.currentSchema) == null ? void 0 : q.props) || {}).indexOf(y.eventName) > -1 && (delete n.currentSchema.props[y.eventName], Be().publish({
1658
+ }), w = b((v) => {
1659
+ var M;
1660
+ Object.keys(((M = n == null ? void 0 : n.currentSchema) == null ? void 0 : M.props) || {}).indexOf(v.eventName) > -1 && (delete n.currentSchema.props[v.eventName], _t().publish({
1859
1661
  topic: "schemaChange",
1860
1662
  data: {
1861
1663
  props: n.currentSchema.props
@@ -1866,52 +1668,52 @@ const Re = /* @__PURE__ */ Ge(Jt, [["render", Ht], ["__scopeId", "data-v-84897b9
1866
1668
  id: "engine.setting.event.BindEvents.deleteAction"
1867
1669
  },
1868
1670
  ctx: () => ({
1869
- PLUGIN_NAME: h,
1870
- activePlugin: e,
1671
+ PLUGIN_NAME: c,
1672
+ activePlugin: t,
1871
1673
  pageState: n,
1872
- getBlockEvents: t,
1873
- getCurrentBlock: o,
1874
- removeEventLink: i,
1875
- getMaterial: a,
1876
- confirm: c,
1877
- locale: s,
1878
- highlightMethod: r,
1879
- commonEvents: b,
1674
+ getBlockEvents: e,
1675
+ getCurrentBlock: i,
1676
+ removeEventLink: o,
1677
+ getMaterial: s,
1678
+ confirm: r,
1679
+ locale: a,
1680
+ highlightMethod: d,
1681
+ commonEvents: f,
1880
1682
  state: l,
1881
- isBlock: v,
1882
- isEmpty: g,
1883
- renderEventList: m,
1884
- openActionDialog: C,
1885
- deleteAction: A,
1886
- delEvent: I,
1887
- openCodePanel: T,
1888
- handleToggleAddEventDialog: z,
1889
- handleAddEvent: D,
1890
- useModal: Le,
1891
- getMergeMeta: K,
1892
- useCanvas: N,
1893
- useLayout: J,
1894
- useBlock: Ne,
1895
- useMaterial: Ie,
1896
- getMetaApi: M,
1897
- META_APP: V,
1898
- useMessage: Be,
1899
- i18n: Pe,
1900
- BlockLinkEvent: Me,
1901
- SvgButton: Ve,
1902
- iconChevronDown: Oe,
1903
- BindEventsDialog: Re,
1904
- openDialog: Y,
1905
- AddEventsDialog: Te
1683
+ isBlock: u,
1684
+ isEmpty: h,
1685
+ renderEventList: g,
1686
+ openActionDialog: p,
1687
+ deleteAction: w,
1688
+ delEvent: x,
1689
+ openCodePanel: A,
1690
+ handleToggleAddEventDialog: P,
1691
+ handleAddEvent: E,
1692
+ useModal: bt,
1693
+ getMergeMeta: L,
1694
+ useCanvas: y,
1695
+ useLayout: N,
1696
+ useBlock: pt,
1697
+ useMaterial: vt,
1698
+ getMetaApi: k,
1699
+ META_APP: C,
1700
+ useMessage: _t,
1701
+ i18n: Et,
1702
+ BlockLinkEvent: wt,
1703
+ SvgButton: yt,
1704
+ iconChevronDown: xt,
1705
+ BindEventsDialog: Ct,
1706
+ openDialog: V,
1707
+ AddEventsDialog: kt
1906
1708
  })
1907
- }), I = k((y) => {
1908
- c({
1709
+ }), x = b((v) => {
1710
+ r({
1909
1711
  title: "提示",
1910
- message: `您确定要删除事件 ${y.eventName} 吗?`,
1712
+ message: `您确定要删除事件 ${v.eventName} 吗?`,
1911
1713
  exec() {
1912
- n.isBlock && i({
1913
- linked: y.linked
1914
- }), A(y);
1714
+ n.isBlock && o({
1715
+ linked: v.linked
1716
+ }), w(v);
1915
1717
  }
1916
1718
  });
1917
1719
  }, {
@@ -1919,148 +1721,148 @@ const Re = /* @__PURE__ */ Ge(Jt, [["render", Ht], ["__scopeId", "data-v-84897b9
1919
1721
  id: "engine.setting.event.BindEvents.delEvent"
1920
1722
  },
1921
1723
  ctx: () => ({
1922
- PLUGIN_NAME: h,
1923
- activePlugin: e,
1724
+ PLUGIN_NAME: c,
1725
+ activePlugin: t,
1924
1726
  pageState: n,
1925
- getBlockEvents: t,
1926
- getCurrentBlock: o,
1927
- removeEventLink: i,
1928
- getMaterial: a,
1929
- confirm: c,
1930
- locale: s,
1931
- highlightMethod: r,
1932
- commonEvents: b,
1727
+ getBlockEvents: e,
1728
+ getCurrentBlock: i,
1729
+ removeEventLink: o,
1730
+ getMaterial: s,
1731
+ confirm: r,
1732
+ locale: a,
1733
+ highlightMethod: d,
1734
+ commonEvents: f,
1933
1735
  state: l,
1934
- isBlock: v,
1935
- isEmpty: g,
1936
- renderEventList: m,
1937
- openActionDialog: C,
1938
- deleteAction: A,
1939
- delEvent: I,
1940
- openCodePanel: T,
1941
- handleToggleAddEventDialog: z,
1942
- handleAddEvent: D,
1943
- useModal: Le,
1944
- getMergeMeta: K,
1945
- useCanvas: N,
1946
- useLayout: J,
1947
- useBlock: Ne,
1948
- useMaterial: Ie,
1949
- getMetaApi: M,
1950
- META_APP: V,
1951
- useMessage: Be,
1952
- i18n: Pe,
1953
- BlockLinkEvent: Me,
1954
- SvgButton: Ve,
1955
- iconChevronDown: Oe,
1956
- BindEventsDialog: Re,
1957
- openDialog: Y,
1958
- AddEventsDialog: Te
1736
+ isBlock: u,
1737
+ isEmpty: h,
1738
+ renderEventList: g,
1739
+ openActionDialog: p,
1740
+ deleteAction: w,
1741
+ delEvent: x,
1742
+ openCodePanel: A,
1743
+ handleToggleAddEventDialog: P,
1744
+ handleAddEvent: E,
1745
+ useModal: bt,
1746
+ getMergeMeta: L,
1747
+ useCanvas: y,
1748
+ useLayout: N,
1749
+ useBlock: pt,
1750
+ useMaterial: vt,
1751
+ getMetaApi: k,
1752
+ META_APP: C,
1753
+ useMessage: _t,
1754
+ i18n: Et,
1755
+ BlockLinkEvent: wt,
1756
+ SvgButton: yt,
1757
+ iconChevronDown: xt,
1758
+ BindEventsDialog: Ct,
1759
+ openDialog: V,
1760
+ AddEventsDialog: kt
1959
1761
  })
1960
- }), T = k((y) => {
1961
- y && e(h.Page).then(() => {
1962
- r && r(y.ref);
1762
+ }), A = b((v) => {
1763
+ v && t(c.Page).then(() => {
1764
+ d && d(v.ref);
1963
1765
  });
1964
1766
  }, {
1965
1767
  metaData: {
1966
1768
  id: "engine.setting.event.BindEvents.openCodePanel"
1967
1769
  },
1968
1770
  ctx: () => ({
1969
- PLUGIN_NAME: h,
1970
- activePlugin: e,
1771
+ PLUGIN_NAME: c,
1772
+ activePlugin: t,
1971
1773
  pageState: n,
1972
- getBlockEvents: t,
1973
- getCurrentBlock: o,
1974
- removeEventLink: i,
1975
- getMaterial: a,
1976
- confirm: c,
1977
- locale: s,
1978
- highlightMethod: r,
1979
- commonEvents: b,
1774
+ getBlockEvents: e,
1775
+ getCurrentBlock: i,
1776
+ removeEventLink: o,
1777
+ getMaterial: s,
1778
+ confirm: r,
1779
+ locale: a,
1780
+ highlightMethod: d,
1781
+ commonEvents: f,
1980
1782
  state: l,
1981
- isBlock: v,
1982
- isEmpty: g,
1983
- renderEventList: m,
1984
- openActionDialog: C,
1985
- deleteAction: A,
1986
- delEvent: I,
1987
- openCodePanel: T,
1988
- handleToggleAddEventDialog: z,
1989
- handleAddEvent: D,
1990
- useModal: Le,
1991
- getMergeMeta: K,
1992
- useCanvas: N,
1993
- useLayout: J,
1994
- useBlock: Ne,
1995
- useMaterial: Ie,
1996
- getMetaApi: M,
1997
- META_APP: V,
1998
- useMessage: Be,
1999
- i18n: Pe,
2000
- BlockLinkEvent: Me,
2001
- SvgButton: Ve,
2002
- iconChevronDown: Oe,
2003
- BindEventsDialog: Re,
2004
- openDialog: Y,
2005
- AddEventsDialog: Te
1783
+ isBlock: u,
1784
+ isEmpty: h,
1785
+ renderEventList: g,
1786
+ openActionDialog: p,
1787
+ deleteAction: w,
1788
+ delEvent: x,
1789
+ openCodePanel: A,
1790
+ handleToggleAddEventDialog: P,
1791
+ handleAddEvent: E,
1792
+ useModal: bt,
1793
+ getMergeMeta: L,
1794
+ useCanvas: y,
1795
+ useLayout: N,
1796
+ useBlock: pt,
1797
+ useMaterial: vt,
1798
+ getMetaApi: k,
1799
+ META_APP: C,
1800
+ useMessage: _t,
1801
+ i18n: Et,
1802
+ BlockLinkEvent: wt,
1803
+ SvgButton: yt,
1804
+ iconChevronDown: xt,
1805
+ BindEventsDialog: Ct,
1806
+ openDialog: V,
1807
+ AddEventsDialog: kt
2006
1808
  })
2007
- }), z = k((y) => {
2008
- l.showBindEventDialog = y;
1809
+ }), P = b((v) => {
1810
+ l.showBindEventDialog = v;
2009
1811
  }, {
2010
1812
  metaData: {
2011
1813
  id: "engine.setting.event.BindEvents.handleToggleAddEventDialog"
2012
1814
  },
2013
1815
  ctx: () => ({
2014
- PLUGIN_NAME: h,
2015
- activePlugin: e,
1816
+ PLUGIN_NAME: c,
1817
+ activePlugin: t,
2016
1818
  pageState: n,
2017
- getBlockEvents: t,
2018
- getCurrentBlock: o,
2019
- removeEventLink: i,
2020
- getMaterial: a,
2021
- confirm: c,
2022
- locale: s,
2023
- highlightMethod: r,
2024
- commonEvents: b,
1819
+ getBlockEvents: e,
1820
+ getCurrentBlock: i,
1821
+ removeEventLink: o,
1822
+ getMaterial: s,
1823
+ confirm: r,
1824
+ locale: a,
1825
+ highlightMethod: d,
1826
+ commonEvents: f,
2025
1827
  state: l,
2026
- isBlock: v,
2027
- isEmpty: g,
2028
- renderEventList: m,
2029
- openActionDialog: C,
2030
- deleteAction: A,
2031
- delEvent: I,
2032
- openCodePanel: T,
2033
- handleToggleAddEventDialog: z,
2034
- handleAddEvent: D,
2035
- useModal: Le,
2036
- getMergeMeta: K,
2037
- useCanvas: N,
2038
- useLayout: J,
2039
- useBlock: Ne,
2040
- useMaterial: Ie,
2041
- getMetaApi: M,
2042
- META_APP: V,
2043
- useMessage: Be,
2044
- i18n: Pe,
2045
- BlockLinkEvent: Me,
2046
- SvgButton: Ve,
2047
- iconChevronDown: Oe,
2048
- BindEventsDialog: Re,
2049
- openDialog: Y,
2050
- AddEventsDialog: Te
1828
+ isBlock: u,
1829
+ isEmpty: h,
1830
+ renderEventList: g,
1831
+ openActionDialog: p,
1832
+ deleteAction: w,
1833
+ delEvent: x,
1834
+ openCodePanel: A,
1835
+ handleToggleAddEventDialog: P,
1836
+ handleAddEvent: E,
1837
+ useModal: bt,
1838
+ getMergeMeta: L,
1839
+ useCanvas: y,
1840
+ useLayout: N,
1841
+ useBlock: pt,
1842
+ useMaterial: vt,
1843
+ getMetaApi: k,
1844
+ META_APP: C,
1845
+ useMessage: _t,
1846
+ i18n: Et,
1847
+ BlockLinkEvent: wt,
1848
+ SvgButton: yt,
1849
+ iconChevronDown: xt,
1850
+ BindEventsDialog: Ct,
1851
+ openDialog: V,
1852
+ AddEventsDialog: kt
2051
1853
  })
2052
- }), D = k((y) => {
1854
+ }), E = b((v) => {
2053
1855
  const {
2054
- eventName: B,
2055
- eventDescription: q
2056
- } = y;
1856
+ eventName: D,
1857
+ eventDescription: M
1858
+ } = v;
2057
1859
  Object.assign(l.customEvents, {
2058
- [B]: {
1860
+ [D]: {
2059
1861
  label: {
2060
- zh_CN: q
1862
+ zh_CN: M
2061
1863
  },
2062
1864
  description: {
2063
- zh_CN: `${q}的回调函数`
1865
+ zh_CN: `${M}的回调函数`
2064
1866
  },
2065
1867
  type: "event",
2066
1868
  functionInfo: {
@@ -2075,65 +1877,65 @@ const Re = /* @__PURE__ */ Ge(Jt, [["render", Ht], ["__scopeId", "data-v-84897b9
2075
1877
  id: "engine.setting.event.BindEvents.handleAddEvent"
2076
1878
  },
2077
1879
  ctx: () => ({
2078
- PLUGIN_NAME: h,
2079
- activePlugin: e,
1880
+ PLUGIN_NAME: c,
1881
+ activePlugin: t,
2080
1882
  pageState: n,
2081
- getBlockEvents: t,
2082
- getCurrentBlock: o,
2083
- removeEventLink: i,
2084
- getMaterial: a,
2085
- confirm: c,
2086
- locale: s,
2087
- highlightMethod: r,
2088
- commonEvents: b,
1883
+ getBlockEvents: e,
1884
+ getCurrentBlock: i,
1885
+ removeEventLink: o,
1886
+ getMaterial: s,
1887
+ confirm: r,
1888
+ locale: a,
1889
+ highlightMethod: d,
1890
+ commonEvents: f,
2089
1891
  state: l,
2090
- isBlock: v,
2091
- isEmpty: g,
2092
- renderEventList: m,
2093
- openActionDialog: C,
2094
- deleteAction: A,
2095
- delEvent: I,
2096
- openCodePanel: T,
2097
- handleToggleAddEventDialog: z,
2098
- handleAddEvent: D,
2099
- useModal: Le,
2100
- getMergeMeta: K,
2101
- useCanvas: N,
2102
- useLayout: J,
2103
- useBlock: Ne,
2104
- useMaterial: Ie,
2105
- getMetaApi: M,
2106
- META_APP: V,
2107
- useMessage: Be,
2108
- i18n: Pe,
2109
- BlockLinkEvent: Me,
2110
- SvgButton: Ve,
2111
- iconChevronDown: Oe,
2112
- BindEventsDialog: Re,
2113
- openDialog: Y,
2114
- AddEventsDialog: Te
1892
+ isBlock: u,
1893
+ isEmpty: h,
1894
+ renderEventList: g,
1895
+ openActionDialog: p,
1896
+ deleteAction: w,
1897
+ delEvent: x,
1898
+ openCodePanel: A,
1899
+ handleToggleAddEventDialog: P,
1900
+ handleAddEvent: E,
1901
+ useModal: bt,
1902
+ getMergeMeta: L,
1903
+ useCanvas: y,
1904
+ useLayout: N,
1905
+ useBlock: pt,
1906
+ useMaterial: vt,
1907
+ getMetaApi: k,
1908
+ META_APP: C,
1909
+ useMessage: _t,
1910
+ i18n: Et,
1911
+ BlockLinkEvent: wt,
1912
+ SvgButton: yt,
1913
+ iconChevronDown: xt,
1914
+ BindEventsDialog: Ct,
1915
+ openDialog: V,
1916
+ AddEventsDialog: kt
2115
1917
  })
2116
1918
  });
2117
1919
  return {
2118
1920
  state: l,
2119
- isBlock: v,
2120
- isEmpty: g,
2121
- delEvent: I,
2122
- openCodePanel: T,
2123
- openActionDialog: C,
2124
- handleAddEvent: D,
2125
- handleToggleAddEventDialog: z,
2126
- renderEventList: m,
2127
- locale: s
1921
+ isBlock: u,
1922
+ isEmpty: h,
1923
+ delEvent: x,
1924
+ openCodePanel: A,
1925
+ openActionDialog: p,
1926
+ handleAddEvent: E,
1927
+ handleToggleAddEventDialog: P,
1928
+ renderEventList: g,
1929
+ locale: a
2128
1930
  };
2129
1931
  }
2130
- }, Zt = { class: "bind-action-list" }, Qt = { class: "popover-head" }, en = { class: "bind-event-list" }, tn = ["onClick"], nn = { class: "bind-actions" }, on = { class: "action-item bind-action-item" }, sn = ["onClick"], rn = { class: "event-bind" }, ln = { class: "action-buttons" }, an = { class: "empty-action" }, dn = { class: "icon" };
2131
- function cn(h, e, n, t, o, i) {
2132
- const a = H("icon-chevron-down"), c = H("tiny-button"), s = H("tiny-popover"), r = H("svg-icon"), b = H("block-link-event"), l = H("svg-button"), v = H("bind-events-dialog"), g = H("add-events-dialog");
2133
- return j(), se(Qe, null, [
2134
- _("div", Zt, [
2135
- _("div", Qt, [
2136
- S(s, {
1932
+ }, Ye = { class: "bind-action-list" }, Ze = { class: "popover-head" }, Qe = { class: "bind-event-list" }, tn = ["onClick"], en = { class: "bind-actions" }, nn = { class: "action-item bind-action-item" }, on = ["onClick"], sn = { class: "event-bind" }, rn = { class: "action-buttons" }, an = { class: "empty-action" }, ln = { class: "icon" };
1933
+ function dn(c, t, n, e, i, o) {
1934
+ const s = B("icon-chevron-down"), r = B("tiny-button"), a = B("tiny-popover"), d = B("svg-icon"), f = B("block-link-event"), l = B("svg-button"), u = B("bind-events-dialog"), h = B("add-events-dialog");
1935
+ return S(), J($t, null, [
1936
+ m("div", Ye, [
1937
+ m("div", Ze, [
1938
+ _(a, {
2137
1939
  popperClass: "option-popper setting-advanced-bind-event-list",
2138
1940
  placement: "bottom-start",
2139
1941
  trigger: "hover",
@@ -2141,340 +1943,340 @@ function cn(h, e, n, t, o, i) {
2141
1943
  width: "256",
2142
1944
  "visible-arrow": !1
2143
1945
  }, {
2144
- reference: X(() => [
2145
- S(c, { class: "bind-event-btn" }, {
2146
- default: X(() => [
2147
- e[2] || (e[2] = _("span", null, "绑定事件", -1)),
2148
- S(a, { class: "icon-chevron-down bind-event-btn-icon" })
1946
+ reference: I(() => [
1947
+ _(r, { class: "bind-event-btn" }, {
1948
+ default: I(() => [
1949
+ t[2] || (t[2] = m("span", null, "绑定事件", -1)),
1950
+ _(s, { class: "icon-chevron-down bind-event-btn-icon" })
2149
1951
  ]),
2150
1952
  _: 1,
2151
1953
  __: [2]
2152
1954
  })
2153
1955
  ]),
2154
- default: X(() => [
2155
- _("ul", en, [
2156
- (j(!0), se(Qe, null, st(t.renderEventList, (m, C) => {
2157
- var A;
2158
- return j(), se("li", {
2159
- key: C,
2160
- class: Je(["bind-event-list-item", { "bind-event-list-item-notallow": t.state.bindActions[C] }]),
2161
- onClick: (I) => t.openActionDialog({ eventName: C }, !0)
1956
+ default: I(() => [
1957
+ m("ul", Qe, [
1958
+ (S(!0), J($t, null, Ht(e.renderEventList, (g, p) => {
1959
+ var w;
1960
+ return S(), J("li", {
1961
+ key: p,
1962
+ class: It(["bind-event-list-item", { "bind-event-list-item-notallow": e.state.bindActions[p] }]),
1963
+ onClick: (x) => e.openActionDialog({ eventName: p }, !0)
2162
1964
  }, [
2163
- _("div", null, ge(C) + "  |  " + ge(((A = m == null ? void 0 : m.label) == null ? void 0 : A[t.locale]) || C), 1)
1965
+ m("div", null, W(p) + "  |  " + W(((w = g == null ? void 0 : g.label) == null ? void 0 : w[e.locale]) || p), 1)
2164
1966
  ], 10, tn);
2165
1967
  }), 128))
2166
1968
  ])
2167
1969
  ]),
2168
1970
  _: 1
2169
1971
  }),
2170
- S(c, {
1972
+ _(r, {
2171
1973
  class: "title add-custom-event-button bind-action-button-item",
2172
- onClick: e[0] || (e[0] = (m) => t.handleToggleAddEventDialog(!0))
1974
+ onClick: t[0] || (t[0] = (g) => e.handleToggleAddEventDialog(!0))
2173
1975
  }, {
2174
- default: X(() => [
2175
- S(r, {
1976
+ default: I(() => [
1977
+ _(d, {
2176
1978
  name: "add",
2177
1979
  class: "custom-event-button-icon"
2178
1980
  }),
2179
- e[3] || (e[3] = _("span", { class: "custom-event-button-text" }, "添加新事件", -1))
1981
+ t[3] || (t[3] = m("span", { class: "custom-event-button-text" }, "添加新事件", -1))
2180
1982
  ]),
2181
1983
  _: 1,
2182
1984
  __: [3]
2183
1985
  })
2184
1986
  ]),
2185
- ct(_("ul", nn, [
2186
- (j(!0), se(Qe, null, st(t.state.bindActions, (m) => {
2187
- var C, A;
2188
- return j(), se("li", {
2189
- key: m.eventName
1987
+ ee(m("ul", en, [
1988
+ (S(!0), J($t, null, Ht(e.state.bindActions, (g) => {
1989
+ var p, w;
1990
+ return S(), J("li", {
1991
+ key: g.eventName
2190
1992
  }, [
2191
- _("div", on, [
2192
- _("div", {
1993
+ m("div", nn, [
1994
+ m("div", {
2193
1995
  class: "binding-name",
2194
- onClick: (I) => t.openActionDialog(m)
1996
+ onClick: (x) => e.openActionDialog(g)
2195
1997
  }, [
2196
- _("div", null, [
2197
- Ue(ge(m.eventName), 1),
2198
- _("span", null, ge((A = (C = t.renderEventList[m.eventName]) == null ? void 0 : C.label) == null ? void 0 : A[t.locale]), 1)
1998
+ m("div", null, [
1999
+ Dt(W(g.eventName), 1),
2000
+ m("span", null, W((w = (p = e.renderEventList[g.eventName]) == null ? void 0 : p.label) == null ? void 0 : w[e.locale]), 1)
2199
2001
  ]),
2200
- _("div", {
2201
- class: Je({ linked: m.linked })
2202
- }, ge(m.linkedEventName), 3),
2203
- _("span", rn, ge(m.ref), 1)
2204
- ], 8, sn),
2205
- _("div", ln, [
2206
- t.isBlock ? (j(), ve(b, {
2002
+ m("div", {
2003
+ class: It({ linked: g.linked })
2004
+ }, W(g.linkedEventName), 3),
2005
+ m("span", sn, W(g.ref), 1)
2006
+ ], 8, on),
2007
+ m("div", rn, [
2008
+ e.isBlock ? (S(), tt(f, {
2207
2009
  key: 0,
2208
- data: m
2209
- }, null, 8, ["data"])) : et("", !0),
2210
- S(l, {
2010
+ data: g
2011
+ }, null, 8, ["data"])) : zt("", !0),
2012
+ _(l, {
2211
2013
  name: "plugin-icon-page-schema",
2212
2014
  tips: "定位到代码",
2213
2015
  placement: "top",
2214
2016
  hoverBgColor: !1,
2215
- onClick: (I) => t.openCodePanel(m)
2017
+ onClick: (x) => e.openCodePanel(g)
2216
2018
  }, null, 8, ["onClick"]),
2217
- S(l, {
2019
+ _(l, {
2218
2020
  name: "setting",
2219
2021
  hoverBgColor: !1,
2220
- onClick: (I) => t.openActionDialog(m, !1)
2022
+ onClick: (x) => e.openActionDialog(g, !1)
2221
2023
  }, null, 8, ["onClick"]),
2222
- S(l, {
2024
+ _(l, {
2223
2025
  name: "delete",
2224
2026
  hoverBgColor: !1,
2225
- onClick: (I) => t.delEvent(m)
2027
+ onClick: (x) => e.delEvent(g)
2226
2028
  }, null, 8, ["onClick"])
2227
2029
  ])
2228
2030
  ])
2229
2031
  ]);
2230
2032
  }), 128))
2231
2033
  ], 512), [
2232
- [ht, !t.isEmpty]
2034
+ [ne, !e.isEmpty]
2233
2035
  ]),
2234
- ct(_("div", an, [
2235
- _("div", dn, [
2236
- S(r, {
2036
+ ee(m("div", an, [
2037
+ m("div", ln, [
2038
+ _(d, {
2237
2039
  name: "empty-action",
2238
2040
  class: "empty-action-icon"
2239
2041
  })
2240
2042
  ]),
2241
- e[4] || (e[4] = _("div", { class: "center" }, "支持添加原生DOM事件,然后点击 绑定事件 为画布所选元素增加事件", -1))
2043
+ t[4] || (t[4] = m("div", { class: "center" }, "支持添加原生DOM事件,然后点击 绑定事件 为画布所选元素增加事件", -1))
2242
2044
  ], 512), [
2243
- [ht, t.isEmpty]
2045
+ [ne, e.isEmpty]
2244
2046
  ])
2245
2047
  ]),
2246
- S(v, {
2247
- eventBinding: t.state.eventBinding
2048
+ _(u, {
2049
+ eventBinding: e.state.eventBinding
2248
2050
  }, null, 8, ["eventBinding"]),
2249
- S(g, {
2250
- visible: t.state.showBindEventDialog,
2251
- componentEvents: t.renderEventList,
2252
- onCloseDialog: e[1] || (e[1] = (m) => t.handleToggleAddEventDialog(!1)),
2253
- onAddEvent: t.handleAddEvent
2051
+ _(h, {
2052
+ visible: e.state.showBindEventDialog,
2053
+ componentEvents: e.renderEventList,
2054
+ onCloseDialog: t[1] || (t[1] = (g) => e.handleToggleAddEventDialog(!1)),
2055
+ onAddEvent: e.handleAddEvent
2254
2056
  }, null, 8, ["visible", "componentEvents", "onAddEvent"])
2255
2057
  ], 64);
2256
2058
  }
2257
- const hn = /* @__PURE__ */ Ge(Wt, [["render", cn], ["__scopeId", "data-v-64f96b67"]]), {
2258
- DEFAULT_LOOP_NAME: oe
2259
- } = De, {
2260
- string2Obj: we
2261
- } = Se, un = {
2059
+ const cn = /* @__PURE__ */ Bt(We, [["render", dn], ["__scopeId", "data-v-64f96b67"]]), {
2060
+ DEFAULT_LOOP_NAME: z
2061
+ } = ht, {
2062
+ string2Obj: dt
2063
+ } = ut, hn = {
2262
2064
  components: {
2263
- SwitchConfigurator: xe,
2264
- TinyTooltip: At,
2265
- VariableConfigurator: ye,
2266
- InputConfigurator: Ce,
2267
- CodeConfigurator: Ee
2065
+ SwitchConfigurator: lt,
2066
+ TinyTooltip: Ce,
2067
+ VariableConfigurator: at,
2068
+ InputConfigurator: rt,
2069
+ CodeConfigurator: st
2268
2070
  },
2269
2071
  inheritAttrs: !1,
2270
2072
  setup() {
2271
2073
  const {
2272
- pageState: h
2273
- } = N(), e = Xe(!1), n = Ye(() => {
2074
+ pageState: c
2075
+ } = y(), t = Lt(!1), n = Tt(() => {
2274
2076
  var l;
2275
- return ((l = e.value) == null ? void 0 : l.type) === fe.JSEXPRESSION;
2276
- }), t = k(() => {
2277
- var l, v;
2278
- return ((v = (l = ne().getSchema()) == null ? void 0 : l.loopArgs) == null ? void 0 : v[1]) || oe.INDEX;
2077
+ return ((l = t.value) == null ? void 0 : l.type) === G.JSEXPRESSION;
2078
+ }), e = b(() => {
2079
+ var l, u;
2080
+ return ((u = (l = $().getSchema()) == null ? void 0 : l.loopArgs) == null ? void 0 : u[1]) || z.INDEX;
2279
2081
  }, {
2280
2082
  metaData: {
2281
2083
  id: "engine.setting.event.AdvanceConfig.getIndexName"
2282
2084
  },
2283
2085
  ctx: () => ({
2284
- pageState: h,
2285
- condition: e,
2086
+ pageState: c,
2087
+ condition: t,
2286
2088
  isBind: n,
2287
- getIndexName: t,
2288
- state: o,
2289
- setLoopKey: i,
2290
- openEditor: a,
2291
- setConfig: c,
2292
- setLoopIndex: s,
2293
- setLoop: r,
2294
- setLoopItem: b,
2295
- CodeConfigurator: Ee,
2296
- InputConfigurator: Ce,
2297
- SwitchConfigurator: xe,
2298
- VariableConfigurator: ye,
2299
- useProperties: ne,
2300
- useCanvas: N,
2301
- PROP_DATA_TYPE: fe,
2302
- constants: De,
2303
- utils: Se,
2304
- DEFAULT_LOOP_NAME: oe,
2305
- string2Obj: we
2089
+ getIndexName: e,
2090
+ state: i,
2091
+ setLoopKey: o,
2092
+ openEditor: s,
2093
+ setConfig: r,
2094
+ setLoopIndex: a,
2095
+ setLoop: d,
2096
+ setLoopItem: f,
2097
+ CodeConfigurator: st,
2098
+ InputConfigurator: rt,
2099
+ SwitchConfigurator: lt,
2100
+ VariableConfigurator: at,
2101
+ useProperties: $,
2102
+ useCanvas: y,
2103
+ PROP_DATA_TYPE: G,
2104
+ constants: ht,
2105
+ utils: ut,
2106
+ DEFAULT_LOOP_NAME: z,
2107
+ string2Obj: dt
2306
2108
  })
2307
- }), o = Ze({
2109
+ }), i = Ut({
2308
2110
  loopData: {
2309
- type: fe.JSEXPRESSION,
2111
+ type: G.JSEXPRESSION,
2310
2112
  value: "[]"
2311
2113
  },
2312
2114
  loopItem: "item",
2313
2115
  loopIndex: "index",
2314
- isLoop: Ye(() => {
2116
+ isLoop: Tt(() => {
2315
2117
  var l;
2316
- return ((l = o.loopData) == null ? void 0 : l.type) === fe.JSEXPRESSION;
2118
+ return ((l = i.loopData) == null ? void 0 : l.type) === G.JSEXPRESSION;
2317
2119
  }),
2318
2120
  loopKey: "",
2319
2121
  shouldUpdate: !1
2320
2122
  });
2321
- ut(() => [h == null ? void 0 : h.currentSchema, o.shouldUpdate], ([l]) => {
2322
- var v, g, m, C;
2323
- e.value = (l == null ? void 0 : l.condition) === void 0 ? !0 : l == null ? void 0 : l.condition, o.loopData = l == null ? void 0 : l.loop, o.loopItem = ((v = l == null ? void 0 : l.loopArgs) == null ? void 0 : v[0]) || "", o.loopIndex = ((g = l == null ? void 0 : l.loopArgs) == null ? void 0 : g[1]) || "", o.loopKey = ((C = (m = l == null ? void 0 : l.props) == null ? void 0 : m.key) == null ? void 0 : C.value) || "";
2123
+ ie(() => [c == null ? void 0 : c.currentSchema, i.shouldUpdate], ([l]) => {
2124
+ var u, h, g, p;
2125
+ t.value = (l == null ? void 0 : l.condition) === void 0 ? !0 : l == null ? void 0 : l.condition, i.loopData = l == null ? void 0 : l.loop, i.loopItem = ((u = l == null ? void 0 : l.loopArgs) == null ? void 0 : u[0]) || "", i.loopIndex = ((h = l == null ? void 0 : l.loopArgs) == null ? void 0 : h[1]) || "", i.loopKey = ((p = (g = l == null ? void 0 : l.props) == null ? void 0 : g.key) == null ? void 0 : p.value) || "";
2324
2126
  });
2325
- const i = k((l = "") => {
2326
- var I;
2127
+ const o = b((l = "") => {
2128
+ var x;
2327
2129
  l = l.replace(/\s*/g, "");
2328
2130
  const {
2329
- getSchema: v,
2330
- setProp: g
2331
- } = ne(), m = v();
2332
- if (!m)
2131
+ getSchema: u,
2132
+ setProp: h
2133
+ } = $(), g = u();
2134
+ if (!g)
2333
2135
  return;
2334
- const C = Number(l).toString() !== "NaN";
2335
- let A = (I = m.props) == null ? void 0 : I.key;
2336
- l && !C && (A = {
2337
- type: fe.JSEXPRESSION,
2136
+ const p = Number(l).toString() !== "NaN";
2137
+ let w = (x = g.props) == null ? void 0 : x.key;
2138
+ l && !p && (w = {
2139
+ type: G.JSEXPRESSION,
2338
2140
  value: l
2339
- }), l || (o.isLoop ? A = {
2340
- type: fe.JSEXPRESSION,
2341
- value: t()
2342
- } : A = ""), g("key", A);
2141
+ }), l || (i.isLoop ? w = {
2142
+ type: G.JSEXPRESSION,
2143
+ value: e()
2144
+ } : w = ""), h("key", w);
2343
2145
  }, {
2344
2146
  metaData: {
2345
2147
  id: "engine.setting.event.AdvanceConfig.setLoopKey"
2346
2148
  },
2347
2149
  ctx: () => ({
2348
- pageState: h,
2349
- condition: e,
2150
+ pageState: c,
2151
+ condition: t,
2350
2152
  isBind: n,
2351
- getIndexName: t,
2352
- state: o,
2353
- setLoopKey: i,
2354
- openEditor: a,
2355
- setConfig: c,
2356
- setLoopIndex: s,
2357
- setLoop: r,
2358
- setLoopItem: b,
2359
- CodeConfigurator: Ee,
2360
- InputConfigurator: Ce,
2361
- SwitchConfigurator: xe,
2362
- VariableConfigurator: ye,
2363
- useProperties: ne,
2364
- useCanvas: N,
2365
- PROP_DATA_TYPE: fe,
2366
- constants: De,
2367
- utils: Se,
2368
- DEFAULT_LOOP_NAME: oe,
2369
- string2Obj: we
2153
+ getIndexName: e,
2154
+ state: i,
2155
+ setLoopKey: o,
2156
+ openEditor: s,
2157
+ setConfig: r,
2158
+ setLoopIndex: a,
2159
+ setLoop: d,
2160
+ setLoopItem: f,
2161
+ CodeConfigurator: st,
2162
+ InputConfigurator: rt,
2163
+ SwitchConfigurator: lt,
2164
+ VariableConfigurator: at,
2165
+ useProperties: $,
2166
+ useCanvas: y,
2167
+ PROP_DATA_TYPE: G,
2168
+ constants: ht,
2169
+ utils: ut,
2170
+ DEFAULT_LOOP_NAME: z,
2171
+ string2Obj: dt
2370
2172
  })
2371
2173
  });
2372
- ut([() => o.isLoop, () => o.loopIndex], () => {
2373
- !o.loopKey && o.isLoop && i(t()), o.isLoop || i("");
2174
+ ie([() => i.isLoop, () => i.loopIndex], () => {
2175
+ !i.loopKey && i.isLoop && o(e()), i.isLoop || o("");
2374
2176
  });
2375
- const a = k(() => {
2177
+ const s = b(() => {
2376
2178
  var l;
2377
- o.loopData = (l = ne().getSchema()) == null ? void 0 : l.loop;
2179
+ i.loopData = (l = $().getSchema()) == null ? void 0 : l.loop;
2378
2180
  }, {
2379
2181
  metaData: {
2380
2182
  id: "engine.setting.event.AdvanceConfig.openEditor"
2381
2183
  },
2382
2184
  ctx: () => ({
2383
- pageState: h,
2384
- condition: e,
2185
+ pageState: c,
2186
+ condition: t,
2385
2187
  isBind: n,
2386
- getIndexName: t,
2387
- state: o,
2388
- setLoopKey: i,
2389
- openEditor: a,
2390
- setConfig: c,
2391
- setLoopIndex: s,
2392
- setLoop: r,
2393
- setLoopItem: b,
2394
- CodeConfigurator: Ee,
2395
- InputConfigurator: Ce,
2396
- SwitchConfigurator: xe,
2397
- VariableConfigurator: ye,
2398
- useProperties: ne,
2399
- useCanvas: N,
2400
- PROP_DATA_TYPE: fe,
2401
- constants: De,
2402
- utils: Se,
2403
- DEFAULT_LOOP_NAME: oe,
2404
- string2Obj: we
2188
+ getIndexName: e,
2189
+ state: i,
2190
+ setLoopKey: o,
2191
+ openEditor: s,
2192
+ setConfig: r,
2193
+ setLoopIndex: a,
2194
+ setLoop: d,
2195
+ setLoopItem: f,
2196
+ CodeConfigurator: st,
2197
+ InputConfigurator: rt,
2198
+ SwitchConfigurator: lt,
2199
+ VariableConfigurator: at,
2200
+ useProperties: $,
2201
+ useCanvas: y,
2202
+ PROP_DATA_TYPE: G,
2203
+ constants: ht,
2204
+ utils: ut,
2205
+ DEFAULT_LOOP_NAME: z,
2206
+ string2Obj: dt
2405
2207
  })
2406
- }), c = k((l) => {
2208
+ }), r = b((l) => {
2407
2209
  const {
2408
- getSchema: v
2409
- } = ne(), g = v();
2410
- if (!g)
2210
+ getSchema: u
2211
+ } = $(), h = u();
2212
+ if (!h)
2411
2213
  return;
2412
2214
  const {
2413
- operateNode: m
2414
- } = N();
2215
+ operateNode: g
2216
+ } = y();
2415
2217
  if (l === !1 || l != null && l.type)
2416
- m({
2218
+ g({
2417
2219
  type: "updateAttributes",
2418
- id: g.id,
2220
+ id: h.id,
2419
2221
  value: {
2420
2222
  condition: l
2421
2223
  }
2422
2224
  });
2423
2225
  else {
2424
2226
  const {
2425
- condition: C,
2426
- children: A,
2427
- ...I
2428
- } = g;
2429
- m({
2227
+ condition: p,
2228
+ children: w,
2229
+ ...x
2230
+ } = h;
2231
+ g({
2430
2232
  type: "updateAttributes",
2431
- id: g.id,
2233
+ id: h.id,
2432
2234
  value: {
2433
- ...I
2235
+ ...x
2434
2236
  },
2435
2237
  overwrite: !0
2436
2238
  });
2437
2239
  }
2438
- N().canvasApi.value.updateRect(), e.value = l;
2240
+ y().canvasApi.value.updateRect(), t.value = l;
2439
2241
  }, {
2440
2242
  metaData: {
2441
2243
  id: "engine.setting.event.AdvanceConfig.setConfig"
2442
2244
  },
2443
2245
  ctx: () => ({
2444
- pageState: h,
2445
- condition: e,
2246
+ pageState: c,
2247
+ condition: t,
2446
2248
  isBind: n,
2447
- getIndexName: t,
2448
- state: o,
2449
- setLoopKey: i,
2450
- openEditor: a,
2451
- setConfig: c,
2452
- setLoopIndex: s,
2453
- setLoop: r,
2454
- setLoopItem: b,
2455
- CodeConfigurator: Ee,
2456
- InputConfigurator: Ce,
2457
- SwitchConfigurator: xe,
2458
- VariableConfigurator: ye,
2459
- useProperties: ne,
2460
- useCanvas: N,
2461
- PROP_DATA_TYPE: fe,
2462
- constants: De,
2463
- utils: Se,
2464
- DEFAULT_LOOP_NAME: oe,
2465
- string2Obj: we
2249
+ getIndexName: e,
2250
+ state: i,
2251
+ setLoopKey: o,
2252
+ openEditor: s,
2253
+ setConfig: r,
2254
+ setLoopIndex: a,
2255
+ setLoop: d,
2256
+ setLoopItem: f,
2257
+ CodeConfigurator: st,
2258
+ InputConfigurator: rt,
2259
+ SwitchConfigurator: lt,
2260
+ VariableConfigurator: at,
2261
+ useProperties: $,
2262
+ useCanvas: y,
2263
+ PROP_DATA_TYPE: G,
2264
+ constants: ht,
2265
+ utils: ut,
2266
+ DEFAULT_LOOP_NAME: z,
2267
+ string2Obj: dt
2466
2268
  })
2467
- }), s = k((l) => {
2468
- const v = ne().getSchema();
2469
- let g = v.loopArgs;
2269
+ }), a = b((l) => {
2270
+ const u = $().getSchema();
2271
+ let h = u.loopArgs;
2470
2272
  const {
2471
- operateNode: m
2472
- } = N();
2473
- g ? g[1] = l || oe.INDEX : g = [oe.ITEM, l], m({
2273
+ operateNode: g
2274
+ } = y();
2275
+ h ? h[1] = l || z.INDEX : h = [z.ITEM, l], g({
2474
2276
  type: "updateAttributes",
2475
- id: v.id,
2277
+ id: u.id,
2476
2278
  value: {
2477
- loopArgs: g
2279
+ loopArgs: h
2478
2280
  }
2479
2281
  });
2480
2282
  }, {
@@ -2482,99 +2284,99 @@ const hn = /* @__PURE__ */ Ge(Wt, [["render", cn], ["__scopeId", "data-v-64f96b6
2482
2284
  id: "engine.setting.event.AdvanceConfig.setLoopIndex"
2483
2285
  },
2484
2286
  ctx: () => ({
2485
- pageState: h,
2486
- condition: e,
2287
+ pageState: c,
2288
+ condition: t,
2487
2289
  isBind: n,
2488
- getIndexName: t,
2489
- state: o,
2490
- setLoopKey: i,
2491
- openEditor: a,
2492
- setConfig: c,
2493
- setLoopIndex: s,
2494
- setLoop: r,
2495
- setLoopItem: b,
2496
- CodeConfigurator: Ee,
2497
- InputConfigurator: Ce,
2498
- SwitchConfigurator: xe,
2499
- VariableConfigurator: ye,
2500
- useProperties: ne,
2501
- useCanvas: N,
2502
- PROP_DATA_TYPE: fe,
2503
- constants: De,
2504
- utils: Se,
2505
- DEFAULT_LOOP_NAME: oe,
2506
- string2Obj: we
2290
+ getIndexName: e,
2291
+ state: i,
2292
+ setLoopKey: o,
2293
+ openEditor: s,
2294
+ setConfig: r,
2295
+ setLoopIndex: a,
2296
+ setLoop: d,
2297
+ setLoopItem: f,
2298
+ CodeConfigurator: st,
2299
+ InputConfigurator: rt,
2300
+ SwitchConfigurator: lt,
2301
+ VariableConfigurator: at,
2302
+ useProperties: $,
2303
+ useCanvas: y,
2304
+ PROP_DATA_TYPE: G,
2305
+ constants: ht,
2306
+ utils: ut,
2307
+ DEFAULT_LOOP_NAME: z,
2308
+ string2Obj: dt
2507
2309
  })
2508
- }), r = k((l) => {
2310
+ }), d = b((l) => {
2509
2311
  const {
2510
- operateNode: v
2511
- } = N(), {
2512
- getSchema: g
2513
- } = ne(), m = g();
2312
+ operateNode: u
2313
+ } = y(), {
2314
+ getSchema: h
2315
+ } = $(), g = h();
2514
2316
  if (l) {
2515
- const C = l != null && l.type ? l : we(l);
2516
- v({
2317
+ const p = l != null && l.type ? l : dt(l);
2318
+ u({
2517
2319
  type: "updateAttributes",
2518
- id: m.id,
2320
+ id: g.id,
2519
2321
  value: {
2520
- loop: C
2322
+ loop: p
2521
2323
  }
2522
- }), s(oe.INDEX);
2324
+ }), a(z.INDEX);
2523
2325
  } else {
2524
- i();
2326
+ o();
2525
2327
  const {
2526
- loop: C,
2527
- loopArgs: A,
2528
- children: I,
2529
- ...T
2530
- } = m;
2531
- v({
2328
+ loop: p,
2329
+ loopArgs: w,
2330
+ children: x,
2331
+ ...A
2332
+ } = g;
2333
+ u({
2532
2334
  type: "updateAttributes",
2533
- id: m.id,
2534
- value: T,
2335
+ id: g.id,
2336
+ value: A,
2535
2337
  overwrite: !0
2536
2338
  });
2537
2339
  }
2538
- o.shouldUpdate = !o.shouldUpdate;
2340
+ i.shouldUpdate = !i.shouldUpdate;
2539
2341
  }, {
2540
2342
  metaData: {
2541
2343
  id: "engine.setting.event.AdvanceConfig.setLoop"
2542
2344
  },
2543
2345
  ctx: () => ({
2544
- pageState: h,
2545
- condition: e,
2346
+ pageState: c,
2347
+ condition: t,
2546
2348
  isBind: n,
2547
- getIndexName: t,
2548
- state: o,
2549
- setLoopKey: i,
2550
- openEditor: a,
2551
- setConfig: c,
2552
- setLoopIndex: s,
2553
- setLoop: r,
2554
- setLoopItem: b,
2555
- CodeConfigurator: Ee,
2556
- InputConfigurator: Ce,
2557
- SwitchConfigurator: xe,
2558
- VariableConfigurator: ye,
2559
- useProperties: ne,
2560
- useCanvas: N,
2561
- PROP_DATA_TYPE: fe,
2562
- constants: De,
2563
- utils: Se,
2564
- DEFAULT_LOOP_NAME: oe,
2565
- string2Obj: we
2349
+ getIndexName: e,
2350
+ state: i,
2351
+ setLoopKey: o,
2352
+ openEditor: s,
2353
+ setConfig: r,
2354
+ setLoopIndex: a,
2355
+ setLoop: d,
2356
+ setLoopItem: f,
2357
+ CodeConfigurator: st,
2358
+ InputConfigurator: rt,
2359
+ SwitchConfigurator: lt,
2360
+ VariableConfigurator: at,
2361
+ useProperties: $,
2362
+ useCanvas: y,
2363
+ PROP_DATA_TYPE: G,
2364
+ constants: ht,
2365
+ utils: ut,
2366
+ DEFAULT_LOOP_NAME: z,
2367
+ string2Obj: dt
2566
2368
  })
2567
- }), b = k((l) => {
2568
- const v = ne().getSchema();
2569
- let g = v.loopArgs;
2369
+ }), f = b((l) => {
2370
+ const u = $().getSchema();
2371
+ let h = u.loopArgs;
2570
2372
  const {
2571
- operateNode: m
2572
- } = N();
2573
- g ? g[0] = l || oe.ITEM : g = [l, oe.INDEX], m({
2373
+ operateNode: g
2374
+ } = y();
2375
+ h ? h[0] = l || z.ITEM : h = [l, z.INDEX], g({
2574
2376
  type: "updateAttributes",
2575
- id: v.id,
2377
+ id: u.id,
2576
2378
  value: {
2577
- loopArgs: g
2379
+ loopArgs: h
2578
2380
  }
2579
2381
  });
2580
2382
  }, {
@@ -2582,139 +2384,139 @@ const hn = /* @__PURE__ */ Ge(Wt, [["render", cn], ["__scopeId", "data-v-64f96b6
2582
2384
  id: "engine.setting.event.AdvanceConfig.setLoopItem"
2583
2385
  },
2584
2386
  ctx: () => ({
2585
- pageState: h,
2586
- condition: e,
2387
+ pageState: c,
2388
+ condition: t,
2587
2389
  isBind: n,
2588
- getIndexName: t,
2589
- state: o,
2590
- setLoopKey: i,
2591
- openEditor: a,
2592
- setConfig: c,
2593
- setLoopIndex: s,
2594
- setLoop: r,
2595
- setLoopItem: b,
2596
- CodeConfigurator: Ee,
2597
- InputConfigurator: Ce,
2598
- SwitchConfigurator: xe,
2599
- VariableConfigurator: ye,
2600
- useProperties: ne,
2601
- useCanvas: N,
2602
- PROP_DATA_TYPE: fe,
2603
- constants: De,
2604
- utils: Se,
2605
- DEFAULT_LOOP_NAME: oe,
2606
- string2Obj: we
2390
+ getIndexName: e,
2391
+ state: i,
2392
+ setLoopKey: o,
2393
+ openEditor: s,
2394
+ setConfig: r,
2395
+ setLoopIndex: a,
2396
+ setLoop: d,
2397
+ setLoopItem: f,
2398
+ CodeConfigurator: st,
2399
+ InputConfigurator: rt,
2400
+ SwitchConfigurator: lt,
2401
+ VariableConfigurator: at,
2402
+ useProperties: $,
2403
+ useCanvas: y,
2404
+ PROP_DATA_TYPE: G,
2405
+ constants: ht,
2406
+ utils: ut,
2407
+ DEFAULT_LOOP_NAME: z,
2408
+ string2Obj: dt
2607
2409
  })
2608
2410
  });
2609
2411
  return {
2610
- condition: e,
2611
- setConfig: c,
2412
+ condition: t,
2413
+ setConfig: r,
2612
2414
  isBind: n,
2613
- state: o,
2614
- setLoop: r,
2615
- setLoopItem: b,
2616
- DEFAULT_LOOP_NAME: oe,
2617
- openEditor: a,
2618
- setLoopIndex: s,
2619
- setLoopKey: i,
2620
- getIndexName: t
2415
+ state: i,
2416
+ setLoop: d,
2417
+ setLoopItem: f,
2418
+ DEFAULT_LOOP_NAME: z,
2419
+ openEditor: s,
2420
+ setLoopIndex: a,
2421
+ setLoopKey: o,
2422
+ getIndexName: e
2621
2423
  };
2622
2424
  }
2623
- }, fn = { class: "advanced-config-container" }, gn = { class: "advnce-config" }, mn = { class: "advanced-config-form-item" }, pn = ["title"], vn = { class: "advnce-config loop-data-item" }, bn = { class: "advanced-config-form-item" }, _n = ["title"], En = { class: "advnce-config" }, Cn = { class: "advanced-config-form-item" }, yn = { class: "advnce-config" }, xn = { class: "advanced-config-form-item" }, wn = { class: "advnce-config" }, kn = { class: "advanced-config-form-item" };
2624
- function Dn(h, e, n, t, o, i) {
2625
- var l, v;
2626
- const a = H("switch-configurator"), c = H("variable-configurator"), s = H("code-configurator"), r = H("input-configurator"), b = H("tiny-tooltip");
2627
- return j(), se("div", fn, [
2628
- _("div", gn, [
2629
- e[6] || (e[6] = _("label", { class: "text-ellipsis-multiple" }, "是否渲染", -1)),
2630
- _("div", mn, [
2631
- t.isBind ? (j(), se("div", {
2425
+ }, un = { class: "advanced-config-container" }, gn = { class: "advnce-config" }, fn = { class: "advanced-config-form-item" }, mn = ["title"], pn = { class: "advnce-config loop-data-item" }, vn = { class: "advanced-config-form-item" }, bn = ["title"], _n = { class: "advnce-config" }, En = { class: "advanced-config-form-item" }, yn = { class: "advnce-config" }, wn = { class: "advanced-config-form-item" }, xn = { class: "advnce-config" }, Cn = { class: "advanced-config-form-item" };
2426
+ function kn(c, t, n, e, i, o) {
2427
+ var l, u;
2428
+ const s = B("switch-configurator"), r = B("variable-configurator"), a = B("code-configurator"), d = B("input-configurator"), f = B("tiny-tooltip");
2429
+ return S(), J("div", un, [
2430
+ m("div", gn, [
2431
+ t[6] || (t[6] = m("label", { class: "text-ellipsis-multiple" }, "是否渲染", -1)),
2432
+ m("div", fn, [
2433
+ e.isBind ? (S(), J("div", {
2632
2434
  key: 1,
2633
2435
  class: "binding-state text-ellipsis-multiple",
2634
- title: t.condition.value
2635
- }, " 已绑定:" + ge(t.condition.value), 9, pn)) : (j(), ve(a, {
2436
+ title: e.condition.value
2437
+ }, " 已绑定:" + W(e.condition.value), 9, mn)) : (S(), tt(s, {
2636
2438
  key: 0,
2637
- modelValue: t.condition,
2638
- "onUpdate:modelValue": t.setConfig
2439
+ modelValue: e.condition,
2440
+ "onUpdate:modelValue": e.setConfig
2639
2441
  }, null, 8, ["modelValue", "onUpdate:modelValue"])),
2640
- S(c, {
2641
- modelValue: t.condition,
2442
+ _(r, {
2443
+ modelValue: e.condition,
2642
2444
  "onUpdate:modelValue": [
2643
- e[0] || (e[0] = (g) => t.condition = g),
2644
- t.setConfig
2445
+ t[0] || (t[0] = (h) => e.condition = h),
2446
+ e.setConfig
2645
2447
  ],
2646
2448
  name: "advance"
2647
2449
  }, null, 8, ["modelValue", "onUpdate:modelValue"])
2648
2450
  ])
2649
2451
  ]),
2650
- _("div", vn, [
2651
- e[7] || (e[7] = _("label", { class: "text-ellipsis-multiple" }, "循环数据", -1)),
2652
- _("div", bn, [
2653
- t.state.isLoop ? (j(), se("div", {
2452
+ m("div", pn, [
2453
+ t[7] || (t[7] = m("label", { class: "text-ellipsis-multiple" }, "循环数据", -1)),
2454
+ m("div", vn, [
2455
+ e.state.isLoop ? (S(), J("div", {
2654
2456
  key: 1,
2655
2457
  class: "binding-state text-ellipsis-multiple",
2656
- title: (l = t.state.loopData) == null ? void 0 : l.value
2657
- }, " 已绑定:" + ge((v = t.state.loopData) == null ? void 0 : v.value), 9, _n)) : (j(), ve(s, {
2458
+ title: (l = e.state.loopData) == null ? void 0 : l.value
2459
+ }, " 已绑定:" + W((u = e.state.loopData) == null ? void 0 : u.value), 9, bn)) : (S(), tt(a, {
2658
2460
  key: 0,
2659
- modelValue: t.state.loopData,
2461
+ modelValue: e.state.loopData,
2660
2462
  "onUpdate:modelValue": [
2661
- e[1] || (e[1] = (g) => t.state.loopData = g),
2662
- t.setLoop
2463
+ t[1] || (t[1] = (h) => e.state.loopData = h),
2464
+ e.setLoop
2663
2465
  ],
2664
2466
  "data-type": "JSExpression",
2665
- onOpen: t.openEditor
2467
+ onOpen: e.openEditor
2666
2468
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onOpen"])),
2667
- S(c, {
2668
- modelValue: t.state.loopData,
2469
+ _(r, {
2470
+ modelValue: e.state.loopData,
2669
2471
  "onUpdate:modelValue": [
2670
- e[2] || (e[2] = (g) => t.state.loopData = g),
2671
- t.setLoop
2472
+ t[2] || (t[2] = (h) => e.state.loopData = h),
2473
+ e.setLoop
2672
2474
  ],
2673
2475
  name: "advance"
2674
2476
  }, null, 8, ["modelValue", "onUpdate:modelValue"])
2675
2477
  ])
2676
2478
  ]),
2677
- _("div", En, [
2678
- e[8] || (e[8] = _("label", { class: "text-ellipsis-multiple" }, "迭代变量名", -1)),
2679
- _("div", Cn, [
2680
- S(r, {
2681
- modelValue: t.state.loopItem,
2479
+ m("div", _n, [
2480
+ t[8] || (t[8] = m("label", { class: "text-ellipsis-multiple" }, "迭代变量名", -1)),
2481
+ m("div", En, [
2482
+ _(d, {
2483
+ modelValue: e.state.loopItem,
2682
2484
  "onUpdate:modelValue": [
2683
- e[3] || (e[3] = (g) => t.state.loopItem = g),
2684
- t.setLoopItem
2485
+ t[3] || (t[3] = (h) => e.state.loopItem = h),
2486
+ e.setLoopItem
2685
2487
  ],
2686
- placeholder: `默认值为:${t.DEFAULT_LOOP_NAME.ITEM}`
2488
+ placeholder: `默认值为:${e.DEFAULT_LOOP_NAME.ITEM}`
2687
2489
  }, null, 8, ["modelValue", "placeholder", "onUpdate:modelValue"])
2688
2490
  ])
2689
2491
  ]),
2690
- _("div", yn, [
2691
- e[9] || (e[9] = _("label", { class: "text-ellipsis-multiple" }, "索引变量名", -1)),
2692
- _("div", xn, [
2693
- S(r, {
2694
- modelValue: t.state.loopIndex,
2492
+ m("div", yn, [
2493
+ t[9] || (t[9] = m("label", { class: "text-ellipsis-multiple" }, "索引变量名", -1)),
2494
+ m("div", wn, [
2495
+ _(d, {
2496
+ modelValue: e.state.loopIndex,
2695
2497
  "onUpdate:modelValue": [
2696
- e[4] || (e[4] = (g) => t.state.loopIndex = g),
2697
- t.setLoopIndex
2498
+ t[4] || (t[4] = (h) => e.state.loopIndex = h),
2499
+ e.setLoopIndex
2698
2500
  ],
2699
- placeholder: `默认值为:${t.DEFAULT_LOOP_NAME.INDEX}`
2501
+ placeholder: `默认值为:${e.DEFAULT_LOOP_NAME.INDEX}`
2700
2502
  }, null, 8, ["modelValue", "placeholder", "onUpdate:modelValue"])
2701
2503
  ])
2702
2504
  ]),
2703
- _("div", wn, [
2704
- e[10] || (e[10] = _("label", { class: "text-ellipsis-multiple" }, "key", -1)),
2705
- _("div", kn, [
2706
- S(b, {
2505
+ m("div", xn, [
2506
+ t[10] || (t[10] = m("label", { class: "text-ellipsis-multiple" }, "key", -1)),
2507
+ m("div", Cn, [
2508
+ _(f, {
2707
2509
  content: "建议填写循环项中的唯一值(如item.id),如果填写为数字将不保存",
2708
2510
  effect: "light"
2709
2511
  }, {
2710
- default: X(() => [
2711
- S(r, {
2712
- modelValue: t.state.loopKey,
2512
+ default: I(() => [
2513
+ _(d, {
2514
+ modelValue: e.state.loopKey,
2713
2515
  "onUpdate:modelValue": [
2714
- e[5] || (e[5] = (g) => t.state.loopKey = g),
2715
- t.setLoopKey
2516
+ t[5] || (t[5] = (h) => e.state.loopKey = h),
2517
+ e.setLoopKey
2716
2518
  ],
2717
- placeholder: `默认为索引名:${t.getIndexName()}`
2519
+ placeholder: `默认为索引名:${e.getIndexName()}`
2718
2520
  }, null, 8, ["modelValue", "placeholder", "onUpdate:modelValue"])
2719
2521
  ]),
2720
2522
  _: 1
@@ -2723,46 +2525,46 @@ function Dn(h, e, n, t, o, i) {
2723
2525
  ])
2724
2526
  ]);
2725
2527
  }
2726
- const Sn = /* @__PURE__ */ Ge(un, [["render", Dn], ["__scopeId", "data-v-275ffc6c"]]), An = {
2528
+ const Dn = /* @__PURE__ */ Bt(hn, [["render", kn], ["__scopeId", "data-v-275ffc6c"]]), Sn = {
2727
2529
  __name: "Main",
2728
2530
  props: {
2729
2531
  fixedPanels: Array
2730
2532
  },
2731
2533
  emits: [],
2732
- setup(h, { emit: e }) {
2733
- const n = Xe(["bindEvent", "advancedConfig"]), {
2734
- PLUGIN_NAME: t
2735
- } = J(), i = Ze({
2736
- emitEvent: e
2534
+ setup(c, { emit: t }) {
2535
+ const n = Lt(["bindEvent", "advancedConfig"]), {
2536
+ PLUGIN_NAME: e
2537
+ } = N(), o = Ut({
2538
+ emitEvent: t
2737
2539
  });
2738
- return vt("panelState", i), (a, c) => (j(), ve(W(Bt), {
2540
+ return he("panelState", o), (s, r) => (S(), tt(O(Ae), {
2739
2541
  title: "高级",
2740
- "fixed-panels": h.fixedPanels,
2741
- "fixed-name": W(t).Event,
2542
+ "fixed-panels": c.fixedPanels,
2543
+ "fixed-name": O(e).Event,
2742
2544
  "header-margin-bottom": 0,
2743
- onClose: c[1] || (c[1] = (s) => a.$emit("close"))
2545
+ onClose: r[1] || (r[1] = (a) => s.$emit("close"))
2744
2546
  }, {
2745
- content: X(() => [
2746
- S(W(Nt), {
2547
+ content: I(() => [
2548
+ _(O(ke), {
2747
2549
  modelValue: n.value,
2748
- "onUpdate:modelValue": c[0] || (c[0] = (s) => n.value = s)
2550
+ "onUpdate:modelValue": r[0] || (r[0] = (a) => n.value = a)
2749
2551
  }, {
2750
- default: X(() => [
2751
- S(W(gt), {
2552
+ default: I(() => [
2553
+ _(O(se), {
2752
2554
  title: "事件绑定",
2753
2555
  name: "bindEvent"
2754
2556
  }, {
2755
- default: X(() => [
2756
- S(hn)
2557
+ default: I(() => [
2558
+ _(cn)
2757
2559
  ]),
2758
2560
  _: 1
2759
2561
  }),
2760
- S(W(gt), {
2562
+ _(O(se), {
2761
2563
  title: "高级配置",
2762
2564
  name: "advancedConfig"
2763
2565
  }, {
2764
- default: X(() => [
2765
- S(Sn)
2566
+ default: I(() => [
2567
+ _(Dn)
2766
2568
  ]),
2767
2569
  _: 1
2768
2570
  })
@@ -2773,222 +2575,222 @@ const Sn = /* @__PURE__ */ Ge(un, [["render", Dn], ["__scopeId", "data-v-275ffc6
2773
2575
  _: 1
2774
2576
  }, 8, ["fixed-panels", "fixed-name"]));
2775
2577
  }
2776
- }, pe = "newMethod", it = /[^0-9a-zA-Z_$]/, Fe = /^[a-zA-Z_$][0-9a-zA-Z_$]*$/, ke = {
2578
+ }, Q = "newMethod", Kt = /[^0-9a-zA-Z_$]/, Nt = /^[a-zA-Z_$][0-9a-zA-Z_$]*$/, ct = {
2777
2579
  default: "选择已有方法或者添加新方法(点击 确定 之后将在JS面板中创建一个该名称的新方法)",
2778
2580
  exist: "方法名称已存在",
2779
2581
  ruleInvalid: "请输入有效的方法名,可以由字母、数字、下划线、$ 符号组成,不能以数字开头",
2780
2582
  empty: "方法名称不能为空"
2781
- }, Nn = {
2583
+ }, An = {
2782
2584
  components: {
2783
- MonacoEditor: $e,
2784
- TinyInput: rt,
2785
- TinyCheckbox: It
2585
+ MonacoEditor: St,
2586
+ TinyInput: qt,
2587
+ TinyCheckbox: De
2786
2588
  },
2787
2589
  props: {
2788
2590
  dialogVisible: Boolean
2789
2591
  },
2790
2592
  setup() {
2791
2593
  const {
2792
- getMethodNameList: h
2793
- } = M(V.Page), e = _t("context"), n = {
2594
+ getMethodNameList: c
2595
+ } = k(C.Page), t = ge("context"), n = {
2794
2596
  language: "json",
2795
2597
  lineNumbers: !1,
2796
2598
  minimap: {
2797
2599
  enabled: !1
2798
2600
  }
2799
- }, t = k((s) => {
2800
- e.editorContent = s;
2601
+ }, e = b((a) => {
2602
+ t.editorContent = a;
2801
2603
  }, {
2802
2604
  metaData: {
2803
2605
  id: "engine.setting.event.BindEventsDialogContent.editorContentChange"
2804
2606
  },
2805
2607
  ctx: () => ({
2806
- getMethodNameList: h,
2807
- context: e,
2608
+ getMethodNameList: c,
2609
+ context: t,
2808
2610
  editorOptions: n,
2809
- editorContentChange: t,
2810
- validMethodNameEmpty: o,
2811
- validMethodNameExist: i,
2812
- invalidMethodName: a,
2813
- change: c,
2814
- VueMonaco: $e,
2815
- getMetaApi: M,
2816
- META_APP: V,
2817
- METHOD_TIPS_MAP: ke,
2818
- NEW_METHOD_TYPE: pe,
2819
- VALID_VARNAME_RE: Fe
2611
+ editorContentChange: e,
2612
+ validMethodNameEmpty: i,
2613
+ validMethodNameExist: o,
2614
+ invalidMethodName: s,
2615
+ change: r,
2616
+ VueMonaco: St,
2617
+ getMetaApi: k,
2618
+ META_APP: C,
2619
+ METHOD_TIPS_MAP: ct,
2620
+ NEW_METHOD_TYPE: Q,
2621
+ VALID_VARNAME_RE: Nt
2820
2622
  })
2821
- }), o = k((s) => !s, {
2623
+ }), i = b((a) => !a, {
2822
2624
  metaData: {
2823
2625
  id: "engine.setting.event.BindEventsDialogContent.validMethodNameEmpty"
2824
2626
  },
2825
2627
  ctx: () => ({
2826
- getMethodNameList: h,
2827
- context: e,
2628
+ getMethodNameList: c,
2629
+ context: t,
2828
2630
  editorOptions: n,
2829
- editorContentChange: t,
2830
- validMethodNameEmpty: o,
2831
- validMethodNameExist: i,
2832
- invalidMethodName: a,
2833
- change: c,
2834
- VueMonaco: $e,
2835
- getMetaApi: M,
2836
- META_APP: V,
2837
- METHOD_TIPS_MAP: ke,
2838
- NEW_METHOD_TYPE: pe,
2839
- VALID_VARNAME_RE: Fe
2631
+ editorContentChange: e,
2632
+ validMethodNameEmpty: i,
2633
+ validMethodNameExist: o,
2634
+ invalidMethodName: s,
2635
+ change: r,
2636
+ VueMonaco: St,
2637
+ getMetaApi: k,
2638
+ META_APP: C,
2639
+ METHOD_TIPS_MAP: ct,
2640
+ NEW_METHOD_TYPE: Q,
2641
+ VALID_VARNAME_RE: Nt
2840
2642
  })
2841
- }), i = k((s) => h == null ? void 0 : h().includes(s), {
2643
+ }), o = b((a) => c == null ? void 0 : c().includes(a), {
2842
2644
  metaData: {
2843
2645
  id: "engine.setting.event.BindEventsDialogContent.validMethodNameExist"
2844
2646
  },
2845
2647
  ctx: () => ({
2846
- getMethodNameList: h,
2847
- context: e,
2648
+ getMethodNameList: c,
2649
+ context: t,
2848
2650
  editorOptions: n,
2849
- editorContentChange: t,
2850
- validMethodNameEmpty: o,
2851
- validMethodNameExist: i,
2852
- invalidMethodName: a,
2853
- change: c,
2854
- VueMonaco: $e,
2855
- getMetaApi: M,
2856
- META_APP: V,
2857
- METHOD_TIPS_MAP: ke,
2858
- NEW_METHOD_TYPE: pe,
2859
- VALID_VARNAME_RE: Fe
2651
+ editorContentChange: e,
2652
+ validMethodNameEmpty: i,
2653
+ validMethodNameExist: o,
2654
+ invalidMethodName: s,
2655
+ change: r,
2656
+ VueMonaco: St,
2657
+ getMetaApi: k,
2658
+ META_APP: C,
2659
+ METHOD_TIPS_MAP: ct,
2660
+ NEW_METHOD_TYPE: Q,
2661
+ VALID_VARNAME_RE: Nt
2860
2662
  })
2861
- }), a = k((s) => !Fe.test(s), {
2663
+ }), s = b((a) => !Nt.test(a), {
2862
2664
  metaData: {
2863
2665
  id: "engine.setting.event.BindEventsDialogContent.invalidMethodName"
2864
2666
  },
2865
2667
  ctx: () => ({
2866
- getMethodNameList: h,
2867
- context: e,
2668
+ getMethodNameList: c,
2669
+ context: t,
2868
2670
  editorOptions: n,
2869
- editorContentChange: t,
2870
- validMethodNameEmpty: o,
2871
- validMethodNameExist: i,
2872
- invalidMethodName: a,
2873
- change: c,
2874
- VueMonaco: $e,
2875
- getMetaApi: M,
2876
- META_APP: V,
2877
- METHOD_TIPS_MAP: ke,
2878
- NEW_METHOD_TYPE: pe,
2879
- VALID_VARNAME_RE: Fe
2671
+ editorContentChange: e,
2672
+ validMethodNameEmpty: i,
2673
+ validMethodNameExist: o,
2674
+ invalidMethodName: s,
2675
+ change: r,
2676
+ VueMonaco: St,
2677
+ getMetaApi: k,
2678
+ META_APP: C,
2679
+ METHOD_TIPS_MAP: ct,
2680
+ NEW_METHOD_TYPE: Q,
2681
+ VALID_VARNAME_RE: Nt
2880
2682
  })
2881
- }), c = k((s) => {
2882
- const r = [{
2883
- validator: o,
2884
- tip: ke.empty
2885
- }, {
2683
+ }), r = b((a) => {
2684
+ const d = [{
2886
2685
  validator: i,
2887
- tip: ke.exist
2686
+ tip: ct.empty
2687
+ }, {
2688
+ validator: o,
2689
+ tip: ct.exist
2888
2690
  }, {
2889
- validator: a,
2890
- tip: ke.ruleInvalid
2691
+ validator: s,
2692
+ tip: ct.ruleInvalid
2891
2693
  }];
2892
- for (let b = 0; b < r.length; b++) {
2893
- const l = r[b];
2894
- if (l.validator(s)) {
2895
- e.tipError = !0, e.tip = l.tip;
2694
+ for (let f = 0; f < d.length; f++) {
2695
+ const l = d[f];
2696
+ if (l.validator(a)) {
2697
+ t.tipError = !0, t.tip = l.tip;
2896
2698
  return;
2897
2699
  }
2898
2700
  }
2899
- e.tipError = !1, e.tip = "";
2701
+ t.tipError = !1, t.tip = "";
2900
2702
  }, {
2901
2703
  metaData: {
2902
2704
  id: "engine.setting.event.BindEventsDialogContent.change"
2903
2705
  },
2904
2706
  ctx: () => ({
2905
- getMethodNameList: h,
2906
- context: e,
2707
+ getMethodNameList: c,
2708
+ context: t,
2907
2709
  editorOptions: n,
2908
- editorContentChange: t,
2909
- validMethodNameEmpty: o,
2910
- validMethodNameExist: i,
2911
- invalidMethodName: a,
2912
- change: c,
2913
- VueMonaco: $e,
2914
- getMetaApi: M,
2915
- META_APP: V,
2916
- METHOD_TIPS_MAP: ke,
2917
- NEW_METHOD_TYPE: pe,
2918
- VALID_VARNAME_RE: Fe
2710
+ editorContentChange: e,
2711
+ validMethodNameEmpty: i,
2712
+ validMethodNameExist: o,
2713
+ invalidMethodName: s,
2714
+ change: r,
2715
+ VueMonaco: St,
2716
+ getMetaApi: k,
2717
+ META_APP: C,
2718
+ METHOD_TIPS_MAP: ct,
2719
+ NEW_METHOD_TYPE: Q,
2720
+ VALID_VARNAME_RE: Nt
2919
2721
  })
2920
2722
  });
2921
2723
  return {
2922
- NEW_METHOD_TYPE: pe,
2923
- context: e,
2724
+ NEW_METHOD_TYPE: Q,
2725
+ context: t,
2924
2726
  editorOptions: n,
2925
- change: c,
2926
- editorContentChange: t
2727
+ change: r,
2728
+ editorContentChange: e
2927
2729
  };
2928
2730
  }
2929
- }, In = { class: "content-right" }, Ln = { class: "new-action-tip" }, Bn = { class: "content-right-title" }, Pn = { class: "set-params-tip" }, Vn = { class: "content-right-monaco" }, Mn = {
2731
+ }, Nn = { class: "content-right" }, In = { class: "new-action-tip" }, Ln = { class: "content-right-title" }, Bn = { class: "set-params-tip" }, Pn = { class: "content-right-monaco" }, Vn = {
2930
2732
  key: 1,
2931
2733
  class: "mark"
2932
- }, On = {
2734
+ }, Mn = {
2933
2735
  key: 0,
2934
2736
  class: "params-tip"
2935
2737
  };
2936
- function Rn(h, e, n, t, o, i) {
2937
- const a = H("tiny-input"), c = H("tiny-checkbox"), s = H("monaco-editor");
2938
- return j(), se("div", In, [
2939
- _("div", {
2940
- class: Je(["content-right-top", { "tip-error": t.context.tipError }])
2738
+ function On(c, t, n, e, i, o) {
2739
+ const s = B("tiny-input"), r = B("tiny-checkbox"), a = B("monaco-editor");
2740
+ return S(), J("div", Nn, [
2741
+ m("div", {
2742
+ class: It(["content-right-top", { "tip-error": e.context.tipError }])
2941
2743
  }, [
2942
- e[2] || (e[2] = _("div", { class: "content-right-title" }, "方法名称", -1)),
2943
- S(a, {
2944
- modelValue: t.context.bindMethodInfo.name,
2744
+ t[2] || (t[2] = m("div", { class: "content-right-title" }, "方法名称", -1)),
2745
+ _(s, {
2746
+ modelValue: e.context.bindMethodInfo.name,
2945
2747
  "onUpdate:modelValue": [
2946
- e[0] || (e[0] = (r) => t.context.bindMethodInfo.name = r),
2947
- t.change
2748
+ t[0] || (t[0] = (d) => e.context.bindMethodInfo.name = d),
2749
+ e.change
2948
2750
  ],
2949
- disabled: t.context.bindMethodInfo.type !== t.NEW_METHOD_TYPE,
2950
- class: Je([{ "status-error": t.context.tipError }]),
2751
+ disabled: e.context.bindMethodInfo.type !== e.NEW_METHOD_TYPE,
2752
+ class: It([{ "status-error": e.context.tipError }]),
2951
2753
  placeholder: "请从左侧选择一个方法进行绑定,或者选择添加新方法,输入自定义方法名称。"
2952
2754
  }, null, 8, ["modelValue", "disabled", "class", "onUpdate:modelValue"]),
2953
- _("div", Ln, ge(t.context.tip), 1)
2755
+ m("div", In, W(e.context.tip), 1)
2954
2756
  ], 2),
2955
- _("div", {
2956
- class: Je(["content-right-bottom", { "tip-error": !t.context.isValidParams }])
2757
+ m("div", {
2758
+ class: It(["content-right-bottom", { "tip-error": !e.context.isValidParams }])
2957
2759
  }, [
2958
- _("div", Bn, [
2959
- S(c, {
2960
- modelValue: t.context.enableExtraParams,
2961
- "onUpdate:modelValue": e[1] || (e[1] = (r) => t.context.enableExtraParams = r),
2760
+ m("div", Ln, [
2761
+ _(r, {
2762
+ modelValue: e.context.enableExtraParams,
2763
+ "onUpdate:modelValue": t[1] || (t[1] = (d) => e.context.enableExtraParams = d),
2962
2764
  name: "tiny-checkbox"
2963
2765
  }, {
2964
- default: X(() => e[3] || (e[3] = [
2965
- Ue("扩展参数设置")
2766
+ default: I(() => t[3] || (t[3] = [
2767
+ Dt("扩展参数设置")
2966
2768
  ])),
2967
2769
  _: 1,
2968
2770
  __: [3]
2969
2771
  }, 8, ["modelValue"]),
2970
- _("div", Pn, [
2971
- e[4] || (e[4] = _("div", null, "扩展参数:调用当前事件传入的真实参数,数组格式,追加在原有事件参数之后", -1)),
2972
- Ue(" 如: " + ge(t.context.bindMethodInfo.name) + "(eventArgs, extParam1, extParam2, ...) ", 1)
2772
+ m("div", Bn, [
2773
+ t[4] || (t[4] = m("div", null, "扩展参数:调用当前事件传入的真实参数,数组格式,追加在原有事件参数之后", -1)),
2774
+ Dt(" 如: " + W(e.context.bindMethodInfo.name) + "(eventArgs, extParam1, extParam2, ...) ", 1)
2973
2775
  ])
2974
2776
  ]),
2975
- _("div", Vn, [
2976
- n.dialogVisible ? (j(), ve(s, {
2777
+ m("div", Pn, [
2778
+ n.dialogVisible ? (S(), tt(a, {
2977
2779
  key: 0,
2978
- value: t.context.editorContent,
2979
- options: t.editorOptions,
2980
- onChange: t.editorContentChange,
2780
+ value: e.context.editorContent,
2781
+ options: e.editorOptions,
2782
+ onChange: e.editorContentChange,
2981
2783
  class: "monaco-editor"
2982
- }, null, 8, ["value", "options", "onChange"])) : et("", !0),
2983
- t.context.enableExtraParams ? et("", !0) : (j(), se("div", Mn))
2784
+ }, null, 8, ["value", "options", "onChange"])) : zt("", !0),
2785
+ e.context.enableExtraParams ? zt("", !0) : (S(), J("div", Vn))
2984
2786
  ]),
2985
- !t.context.isValidParams && t.context.enableExtraParams ? (j(), se("div", On, ' 请输入数组格式的参数,参数可以为表达式。例如:["extParam1", "item.status", 1, "getNames()"] ')) : et("", !0)
2787
+ !e.context.isValidParams && e.context.enableExtraParams ? (S(), J("div", Mn, ' 请输入数组格式的参数,参数可以为表达式。例如:["extParam1", "item.status", 1, "getNames()"] ')) : zt("", !0)
2986
2788
  ], 2)
2987
2789
  ]);
2988
2790
  }
2989
- const Tn = /* @__PURE__ */ Ge(Nn, [["render", Rn], ["__scopeId", "data-v-fc0b367d"]]), Un = {
2791
+ const Tn = /* @__PURE__ */ Bt(An, [["render", On], ["__scopeId", "data-v-fc0b367d"]]), Rn = {
2990
2792
  components: {
2991
- TinySearch: Lt
2793
+ TinySearch: Se
2992
2794
  },
2993
2795
  props: {
2994
2796
  eventBinding: {
@@ -2996,110 +2798,110 @@ const Tn = /* @__PURE__ */ Ge(Nn, [["render", Rn], ["__scopeId", "data-v-fc0b367
2996
2798
  default: () => ({})
2997
2799
  }
2998
2800
  },
2999
- setup(h) {
2801
+ setup(c) {
3000
2802
  const {
3001
- getMethodNameList: e
3002
- } = M(V.Page), n = Xe(""), t = Xe([]), o = _t("context"), i = k((c, s) => {
3003
- const r = c.map((v) => {
3004
- var g;
3005
- return Number.parseInt((g = v.match(/\d+$/)) == null ? void 0 : g[0]) || 0;
3006
- }).sort((v, g) => v - g).pop();
3007
- let l = `${(s == null ? void 0 : s.replace(it, "_")) || ""}New`;
3008
- return r > -1 && (l += `${r + 1}`), l;
2803
+ getMethodNameList: t
2804
+ } = k(C.Page), n = Lt(""), e = Lt([]), i = ge("context"), o = b((r, a) => {
2805
+ const d = r.map((u) => {
2806
+ var h;
2807
+ return Number.parseInt((h = u.match(/\d+$/)) == null ? void 0 : h[0]) || 0;
2808
+ }).sort((u, h) => u - h).pop();
2809
+ let l = `${(a == null ? void 0 : a.replace(Kt, "_")) || ""}New`;
2810
+ return d > -1 && (l += `${d + 1}`), l;
3009
2811
  }, {
3010
2812
  metaData: {
3011
2813
  id: "engine.setting.event.BindEventsDialogSidebar.generateMethodName"
3012
2814
  },
3013
2815
  ctx: () => ({
3014
- props: h,
3015
- getMethodNameList: e,
2816
+ props: c,
2817
+ getMethodNameList: t,
3016
2818
  searchValue: n,
3017
- filteredMethodList: t,
3018
- context: o,
3019
- generateMethodName: i,
3020
- selectMethod: a,
3021
- getMetaApi: M,
3022
- META_APP: V,
3023
- INVALID_VARNAME_CHAR_RE: it,
3024
- NEW_METHOD_TYPE: pe
2819
+ filteredMethodList: e,
2820
+ context: i,
2821
+ generateMethodName: o,
2822
+ selectMethod: s,
2823
+ getMetaApi: k,
2824
+ META_APP: C,
2825
+ INVALID_VARNAME_CHAR_RE: Kt,
2826
+ NEW_METHOD_TYPE: Q
3025
2827
  })
3026
- }), a = k((c) => {
3027
- o.bindMethodInfo = c;
2828
+ }), s = b((r) => {
2829
+ i.bindMethodInfo = r;
3028
2830
  }, {
3029
2831
  metaData: {
3030
2832
  id: "engine.setting.event.BindEventsDialogSidebar.selectMethod"
3031
2833
  },
3032
2834
  ctx: () => ({
3033
- props: h,
3034
- getMethodNameList: e,
2835
+ props: c,
2836
+ getMethodNameList: t,
3035
2837
  searchValue: n,
3036
- filteredMethodList: t,
3037
- context: o,
3038
- generateMethodName: i,
3039
- selectMethod: a,
3040
- getMetaApi: M,
3041
- META_APP: V,
3042
- INVALID_VARNAME_CHAR_RE: it,
3043
- NEW_METHOD_TYPE: pe
2838
+ filteredMethodList: e,
2839
+ context: i,
2840
+ generateMethodName: o,
2841
+ selectMethod: s,
2842
+ getMetaApi: k,
2843
+ META_APP: C,
2844
+ INVALID_VARNAME_CHAR_RE: Kt,
2845
+ NEW_METHOD_TYPE: Q
3044
2846
  })
3045
2847
  });
3046
- return bt(() => {
3047
- var v, g;
3048
- const c = (v = h.eventBinding) == null ? void 0 : v.eventName, s = (e == null ? void 0 : e().filter((m) => m.includes(c))) || [], b = {
2848
+ return ue(() => {
2849
+ var u, h;
2850
+ const r = (u = c.eventBinding) == null ? void 0 : u.eventName, a = (t == null ? void 0 : t().filter((g) => g.includes(r))) || [], f = {
3049
2851
  title: "添加新方法",
3050
- name: i(s, c),
3051
- type: pe
2852
+ name: o(a, r),
2853
+ type: Q
3052
2854
  };
3053
- (g = h.eventBinding) != null && g.ref ? a({
3054
- name: h.eventBinding.ref
3055
- }) : a(b);
3056
- const l = (e == null ? void 0 : e().filter((m) => m.includes(n.value)).map((m) => ({
3057
- name: m
2855
+ (h = c.eventBinding) != null && h.ref ? s({
2856
+ name: c.eventBinding.ref
2857
+ }) : s(f);
2858
+ const l = (t == null ? void 0 : t().filter((g) => g.includes(n.value)).map((g) => ({
2859
+ name: g
3058
2860
  }))) || [];
3059
- t.value = [b, ...l];
2861
+ e.value = [f, ...l];
3060
2862
  }), {
3061
- context: o,
2863
+ context: i,
3062
2864
  searchValue: n,
3063
- filteredMethodList: t,
3064
- selectMethod: a
2865
+ filteredMethodList: e,
2866
+ selectMethod: s
3065
2867
  };
3066
2868
  }
3067
- }, jn = { class: "dialog-content-left" }, $n = { class: "left-list-wrap" }, zn = { class: "left-action-list" }, Fn = { class: "action-list-wrap" }, Jn = ["onClick"];
3068
- function Xn(h, e, n, t, o, i) {
3069
- const a = H("tiny-search");
3070
- return j(), se("div", jn, [
3071
- e[1] || (e[1] = _("div", { class: "left-title" }, "响应方法", -1)),
3072
- _("div", $n, [
3073
- _("div", zn, [
3074
- S(a, {
3075
- modelValue: t.searchValue,
3076
- "onUpdate:modelValue": e[0] || (e[0] = (c) => t.searchValue = c),
2869
+ }, Un = { class: "dialog-content-left" }, jn = { class: "left-list-wrap" }, $n = { class: "left-action-list" }, zn = { class: "action-list-wrap" }, Fn = ["onClick"];
2870
+ function Jn(c, t, n, e, i, o) {
2871
+ const s = B("tiny-search");
2872
+ return S(), J("div", Un, [
2873
+ t[1] || (t[1] = m("div", { class: "left-title" }, "响应方法", -1)),
2874
+ m("div", jn, [
2875
+ m("div", $n, [
2876
+ _(s, {
2877
+ modelValue: e.searchValue,
2878
+ "onUpdate:modelValue": t[0] || (t[0] = (r) => e.searchValue = r),
3077
2879
  placeholder: "搜索"
3078
2880
  }, null, 8, ["modelValue"]),
3079
- _("ul", Fn, [
3080
- (j(!0), se(Qe, null, st(t.filteredMethodList, (c) => (j(), se("li", {
3081
- key: c.name,
3082
- onClick: (s) => t.selectMethod(c)
2881
+ m("ul", zn, [
2882
+ (S(!0), J($t, null, Ht(e.filteredMethodList, (r) => (S(), J("li", {
2883
+ key: r.name,
2884
+ onClick: (a) => e.selectMethod(r)
3083
2885
  }, [
3084
- _("div", {
3085
- class: Je(["action-name", { active: c.name === t.context.bindMethodInfo.name }])
3086
- }, ge(c.title || c.name), 3)
3087
- ], 8, Jn))), 128))
2886
+ m("div", {
2887
+ class: It(["action-name", { active: r.name === e.context.bindMethodInfo.name }])
2888
+ }, W(r.title || r.name), 3)
2889
+ ], 8, Fn))), 128))
3088
2890
  ])
3089
2891
  ])
3090
2892
  ])
3091
2893
  ]);
3092
2894
  }
3093
- const Gn = /* @__PURE__ */ Ge(Un, [["render", Xn], ["__scopeId", "data-v-9bcc2645"]]), io = {
3094
- ...Z,
3095
- entry: An,
3096
- options: { commonEvents: Ct },
2895
+ const Xn = /* @__PURE__ */ Bt(Rn, [["render", Jn], ["__scopeId", "data-v-9bcc2645"]]), ii = {
2896
+ ...R,
2897
+ entry: Sn,
2898
+ options: { commonEvents: pe },
3097
2899
  components: {
3098
- BindEventsDialogSidebar: Gn,
2900
+ BindEventsDialogSidebar: Xn,
3099
2901
  BindEventsDialogContent: Tn
3100
2902
  }
3101
2903
  };
3102
2904
  export {
3103
- io as default
2905
+ ii as default
3104
2906
  };
3105
2907
  //# sourceMappingURL=index.js.map