@opentiny/tiny-engine-setting-events 2.7.0-alpha.2 → 2.7.0-alpha.3

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