@ddd-tool/domain-designer-generator 0.1.0-beta.1 → 0.1.0-beta.11
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/domain/define.d.ts +12 -3
- package/domain-plugin/generator-csharp-plugin.d.ts +6 -6
- package/domain-plugin/generator-java-plugin.d.ts +8 -8
- package/index.js +1725 -1545
- package/package.json +8 -8
package/index.js
CHANGED
|
@@ -1,59 +1,59 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/shared v3.5.
|
|
2
|
+
* @vue/shared v3.5.14
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
6
6
|
/*! #__NO_SIDE_EFFECTS__ */
|
|
7
7
|
// @__NO_SIDE_EFFECTS__
|
|
8
|
-
function
|
|
8
|
+
function Bn(e) {
|
|
9
9
|
const n = /* @__PURE__ */ Object.create(null);
|
|
10
10
|
for (const t of e.split(",")) n[t] = 1;
|
|
11
11
|
return (t) => t in n;
|
|
12
12
|
}
|
|
13
13
|
process.env.NODE_ENV !== "production" && Object.freeze({});
|
|
14
14
|
process.env.NODE_ENV !== "production" && Object.freeze([]);
|
|
15
|
-
const Fe = Object.assign,
|
|
15
|
+
const Fe = Object.assign, Un = Object.prototype.hasOwnProperty, Ve = (e, n) => Un.call(e, n), Y = Array.isArray, te = (e) => dn(e) === "[object Map]", zn = (e) => typeof e == "function", Gn = (e) => typeof e == "string", ue = (e) => typeof e == "symbol", je = (e) => e !== null && typeof e == "object", Jn = Object.prototype.toString, dn = (e) => Jn.call(e), mn = (e) => dn(e).slice(8, -1), Ye = (e) => Gn(e) && e !== "NaN" && e[0] !== "-" && "" + parseInt(e, 10) === e, Wn = (e) => {
|
|
16
16
|
const n = /* @__PURE__ */ Object.create(null);
|
|
17
17
|
return (t) => n[t] || (n[t] = e(t));
|
|
18
|
-
},
|
|
18
|
+
}, Yn = Wn((e) => e.charAt(0).toUpperCase() + e.slice(1)), q = (e, n) => !Object.is(e, n);
|
|
19
19
|
/**
|
|
20
|
-
* @vue/reactivity v3.5.
|
|
20
|
+
* @vue/reactivity v3.5.14
|
|
21
21
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
22
22
|
* @license MIT
|
|
23
23
|
**/
|
|
24
24
|
function X(e, ...n) {
|
|
25
25
|
}
|
|
26
|
-
let
|
|
27
|
-
function
|
|
26
|
+
let A, fn = 0, oe, se;
|
|
27
|
+
function qn(e, n = !1) {
|
|
28
28
|
if (e.flags |= 8, n) {
|
|
29
|
-
e.next =
|
|
29
|
+
e.next = se, se = e;
|
|
30
30
|
return;
|
|
31
31
|
}
|
|
32
|
-
e.next =
|
|
32
|
+
e.next = oe, oe = e;
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function qe() {
|
|
35
35
|
fn++;
|
|
36
36
|
}
|
|
37
37
|
function Ze() {
|
|
38
38
|
if (--fn > 0)
|
|
39
39
|
return;
|
|
40
|
-
if (
|
|
41
|
-
let n =
|
|
42
|
-
for (
|
|
40
|
+
if (se) {
|
|
41
|
+
let n = se;
|
|
42
|
+
for (se = void 0; n; ) {
|
|
43
43
|
const t = n.next;
|
|
44
44
|
n.next = void 0, n.flags &= -9, n = t;
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
let e;
|
|
48
|
-
for (;
|
|
49
|
-
let n =
|
|
50
|
-
for (
|
|
48
|
+
for (; oe; ) {
|
|
49
|
+
let n = oe;
|
|
50
|
+
for (oe = void 0; n; ) {
|
|
51
51
|
const t = n.next;
|
|
52
52
|
if (n.next = void 0, n.flags &= -9, n.flags & 1)
|
|
53
53
|
try {
|
|
54
54
|
n.trigger();
|
|
55
|
-
} catch (
|
|
56
|
-
e || (e =
|
|
55
|
+
} catch (r) {
|
|
56
|
+
e || (e = r);
|
|
57
57
|
}
|
|
58
58
|
n = t;
|
|
59
59
|
}
|
|
@@ -64,97 +64,92 @@ function Zn(e) {
|
|
|
64
64
|
for (let n = e.deps; n; n = n.nextDep)
|
|
65
65
|
n.version = -1, n.prevActiveLink = n.dep.activeLink, n.dep.activeLink = n;
|
|
66
66
|
}
|
|
67
|
-
function
|
|
68
|
-
let n, t = e.depsTail,
|
|
69
|
-
for (;
|
|
70
|
-
const
|
|
71
|
-
|
|
67
|
+
function Qn(e) {
|
|
68
|
+
let n, t = e.depsTail, r = t;
|
|
69
|
+
for (; r; ) {
|
|
70
|
+
const o = r.prevDep;
|
|
71
|
+
r.version === -1 ? (r === t && (t = o), vn(r), et(r)) : n = r, r.dep.activeLink = r.prevActiveLink, r.prevActiveLink = void 0, r = o;
|
|
72
72
|
}
|
|
73
73
|
e.deps = n, e.depsTail = t;
|
|
74
74
|
}
|
|
75
75
|
function Xn(e) {
|
|
76
76
|
for (let n = e.deps; n; n = n.nextDep)
|
|
77
|
-
if (n.dep.version !== n.version || n.dep.computed && (
|
|
77
|
+
if (n.dep.version !== n.version || n.dep.computed && (hn(n.dep.computed) || n.dep.version !== n.version))
|
|
78
78
|
return !0;
|
|
79
79
|
return !!e._dirty;
|
|
80
80
|
}
|
|
81
|
-
function
|
|
82
|
-
if (e.flags & 4 && !(e.flags & 16) || (e.flags &= -17, e.globalVersion ===
|
|
83
|
-
return;
|
|
84
|
-
e.globalVersion = se;
|
|
85
|
-
const n = e.dep;
|
|
86
|
-
if (e.flags |= 2, n.version > 0 && !e.isSSR && e.deps && !Xn(e)) {
|
|
87
|
-
e.flags &= -3;
|
|
81
|
+
function hn(e) {
|
|
82
|
+
if (e.flags & 4 && !(e.flags & 16) || (e.flags &= -17, e.globalVersion === re) || (e.globalVersion = re, !e.isSSR && e.flags & 128 && (!e.deps && !e._dirty || !Xn(e))))
|
|
88
83
|
return;
|
|
89
|
-
|
|
90
|
-
const t =
|
|
91
|
-
|
|
84
|
+
e.flags |= 2;
|
|
85
|
+
const n = e.dep, t = A, r = R;
|
|
86
|
+
A = e, R = !0;
|
|
92
87
|
try {
|
|
93
88
|
Zn(e);
|
|
94
|
-
const
|
|
95
|
-
(n.version === 0 ||
|
|
96
|
-
} catch (
|
|
97
|
-
throw n.version++,
|
|
89
|
+
const o = e.fn(e._value);
|
|
90
|
+
(n.version === 0 || q(o, e._value)) && (e.flags |= 128, e._value = o, n.version++);
|
|
91
|
+
} catch (o) {
|
|
92
|
+
throw n.version++, o;
|
|
98
93
|
} finally {
|
|
99
|
-
|
|
94
|
+
A = t, R = r, Qn(e), e.flags &= -3;
|
|
100
95
|
}
|
|
101
96
|
}
|
|
102
|
-
function
|
|
103
|
-
const { dep: t, prevSub:
|
|
104
|
-
if (
|
|
97
|
+
function vn(e, n = !1) {
|
|
98
|
+
const { dep: t, prevSub: r, nextSub: o } = e;
|
|
99
|
+
if (r && (r.nextSub = o, e.prevSub = void 0), o && (o.prevSub = r, e.nextSub = void 0), process.env.NODE_ENV !== "production" && t.subsHead === e && (t.subsHead = o), t.subs === e && (t.subs = r, !r && t.computed)) {
|
|
105
100
|
t.computed.flags &= -5;
|
|
106
|
-
for (let
|
|
107
|
-
|
|
101
|
+
for (let s = t.computed.deps; s; s = s.nextDep)
|
|
102
|
+
vn(s, !0);
|
|
108
103
|
}
|
|
109
104
|
!n && !--t.sc && t.map && t.map.delete(t.key);
|
|
110
105
|
}
|
|
111
|
-
function
|
|
106
|
+
function et(e) {
|
|
112
107
|
const { prevDep: n, nextDep: t } = e;
|
|
113
108
|
n && (n.nextDep = t, e.prevDep = void 0), t && (t.prevDep = n, e.nextDep = void 0);
|
|
114
109
|
}
|
|
115
110
|
let R = !0;
|
|
116
111
|
const gn = [];
|
|
117
|
-
function
|
|
112
|
+
function nt() {
|
|
118
113
|
gn.push(R), R = !1;
|
|
119
114
|
}
|
|
120
|
-
function
|
|
115
|
+
function tt() {
|
|
121
116
|
const e = gn.pop();
|
|
122
117
|
R = e === void 0 ? !0 : e;
|
|
123
118
|
}
|
|
124
|
-
let
|
|
125
|
-
class
|
|
119
|
+
let re = 0;
|
|
120
|
+
class ot {
|
|
126
121
|
constructor(n, t) {
|
|
127
122
|
this.sub = n, this.dep = t, this.version = t.version, this.nextDep = this.prevDep = this.nextSub = this.prevSub = this.prevActiveLink = void 0;
|
|
128
123
|
}
|
|
129
124
|
}
|
|
130
|
-
class
|
|
125
|
+
class Qe {
|
|
131
126
|
constructor(n) {
|
|
132
127
|
this.computed = n, this.version = 0, this.activeLink = void 0, this.subs = void 0, this.map = void 0, this.key = void 0, this.sc = 0, process.env.NODE_ENV !== "production" && (this.subsHead = void 0);
|
|
133
128
|
}
|
|
134
129
|
track(n) {
|
|
135
|
-
if (!
|
|
130
|
+
if (!A || !R || A === this.computed)
|
|
136
131
|
return;
|
|
137
132
|
let t = this.activeLink;
|
|
138
|
-
if (t === void 0 || t.sub !==
|
|
139
|
-
t = this.activeLink = new
|
|
133
|
+
if (t === void 0 || t.sub !== A)
|
|
134
|
+
t = this.activeLink = new ot(A, this), A.deps ? (t.prevDep = A.depsTail, A.depsTail.nextDep = t, A.depsTail = t) : A.deps = A.depsTail = t, _n(t);
|
|
140
135
|
else if (t.version === -1 && (t.version = this.version, t.nextDep)) {
|
|
141
|
-
const
|
|
142
|
-
|
|
136
|
+
const r = t.nextDep;
|
|
137
|
+
r.prevDep = t.prevDep, t.prevDep && (t.prevDep.nextDep = r), t.prevDep = A.depsTail, t.nextDep = void 0, A.depsTail.nextDep = t, A.depsTail = t, A.deps === t && (A.deps = r);
|
|
143
138
|
}
|
|
144
|
-
return process.env.NODE_ENV !== "production" &&
|
|
139
|
+
return process.env.NODE_ENV !== "production" && A.onTrack && A.onTrack(
|
|
145
140
|
Fe(
|
|
146
141
|
{
|
|
147
|
-
effect:
|
|
142
|
+
effect: A
|
|
148
143
|
},
|
|
149
144
|
n
|
|
150
145
|
)
|
|
151
146
|
), t;
|
|
152
147
|
}
|
|
153
148
|
trigger(n) {
|
|
154
|
-
this.version++,
|
|
149
|
+
this.version++, re++, this.notify(n);
|
|
155
150
|
}
|
|
156
151
|
notify(n) {
|
|
157
|
-
|
|
152
|
+
qe();
|
|
158
153
|
try {
|
|
159
154
|
if (process.env.NODE_ENV !== "production")
|
|
160
155
|
for (let t = this.subsHead; t; t = t.nextSub)
|
|
@@ -173,296 +168,296 @@ class qe {
|
|
|
173
168
|
}
|
|
174
169
|
}
|
|
175
170
|
}
|
|
176
|
-
function
|
|
171
|
+
function _n(e) {
|
|
177
172
|
if (e.dep.sc++, e.sub.flags & 4) {
|
|
178
173
|
const n = e.dep.computed;
|
|
179
174
|
if (n && !e.dep.subs) {
|
|
180
175
|
n.flags |= 20;
|
|
181
|
-
for (let
|
|
182
|
-
|
|
176
|
+
for (let r = n.deps; r; r = r.nextDep)
|
|
177
|
+
_n(r);
|
|
183
178
|
}
|
|
184
179
|
const t = e.dep.subs;
|
|
185
180
|
t !== e && (e.prevSub = t, t && (t.nextSub = e)), process.env.NODE_ENV !== "production" && e.dep.subsHead === void 0 && (e.dep.subsHead = e), e.dep.subs = e;
|
|
186
181
|
}
|
|
187
182
|
}
|
|
188
|
-
const Re = /* @__PURE__ */ new WeakMap(),
|
|
183
|
+
const Re = /* @__PURE__ */ new WeakMap(), K = Symbol(
|
|
189
184
|
process.env.NODE_ENV !== "production" ? "Object iterate" : ""
|
|
190
|
-
),
|
|
185
|
+
), He = Symbol(
|
|
191
186
|
process.env.NODE_ENV !== "production" ? "Map keys iterate" : ""
|
|
192
|
-
),
|
|
187
|
+
), ae = Symbol(
|
|
193
188
|
process.env.NODE_ENV !== "production" ? "Array iterate" : ""
|
|
194
189
|
);
|
|
195
|
-
function
|
|
196
|
-
if (R &&
|
|
197
|
-
let
|
|
198
|
-
|
|
199
|
-
let
|
|
200
|
-
|
|
190
|
+
function k(e, n, t) {
|
|
191
|
+
if (R && A) {
|
|
192
|
+
let r = Re.get(e);
|
|
193
|
+
r || Re.set(e, r = /* @__PURE__ */ new Map());
|
|
194
|
+
let o = r.get(t);
|
|
195
|
+
o || (r.set(t, o = new Qe()), o.map = r, o.key = t), process.env.NODE_ENV !== "production" ? o.track({
|
|
201
196
|
target: e,
|
|
202
197
|
type: n,
|
|
203
198
|
key: t
|
|
204
|
-
}) :
|
|
199
|
+
}) : o.track();
|
|
205
200
|
}
|
|
206
201
|
}
|
|
207
|
-
function V(e, n, t, o, s
|
|
208
|
-
const
|
|
209
|
-
if (!
|
|
210
|
-
|
|
202
|
+
function V(e, n, t, r, o, s) {
|
|
203
|
+
const p = Re.get(e);
|
|
204
|
+
if (!p) {
|
|
205
|
+
re++;
|
|
211
206
|
return;
|
|
212
207
|
}
|
|
213
|
-
const
|
|
214
|
-
|
|
208
|
+
const _ = (C) => {
|
|
209
|
+
C && (process.env.NODE_ENV !== "production" ? C.trigger({
|
|
215
210
|
target: e,
|
|
216
211
|
type: n,
|
|
217
212
|
key: t,
|
|
218
|
-
newValue:
|
|
219
|
-
oldValue:
|
|
220
|
-
oldTarget:
|
|
221
|
-
}) :
|
|
213
|
+
newValue: r,
|
|
214
|
+
oldValue: o,
|
|
215
|
+
oldTarget: s
|
|
216
|
+
}) : C.trigger());
|
|
222
217
|
};
|
|
223
|
-
if (
|
|
224
|
-
|
|
218
|
+
if (qe(), n === "clear")
|
|
219
|
+
p.forEach(_);
|
|
225
220
|
else {
|
|
226
|
-
const
|
|
227
|
-
if (
|
|
228
|
-
const
|
|
229
|
-
|
|
230
|
-
(l === "length" || l ===
|
|
221
|
+
const C = Y(e), m = C && Ye(t);
|
|
222
|
+
if (C && t === "length") {
|
|
223
|
+
const i = Number(r);
|
|
224
|
+
p.forEach((a, l) => {
|
|
225
|
+
(l === "length" || l === ae || !ue(l) && l >= i) && _(a);
|
|
231
226
|
});
|
|
232
227
|
} else
|
|
233
|
-
switch ((t !== void 0 ||
|
|
228
|
+
switch ((t !== void 0 || p.has(void 0)) && _(p.get(t)), m && _(p.get(ae)), n) {
|
|
234
229
|
case "add":
|
|
235
|
-
|
|
230
|
+
C ? m && _(p.get("length")) : (_(p.get(K)), te(e) && _(p.get(He)));
|
|
236
231
|
break;
|
|
237
232
|
case "delete":
|
|
238
|
-
|
|
233
|
+
C || (_(p.get(K)), te(e) && _(p.get(He)));
|
|
239
234
|
break;
|
|
240
235
|
case "set":
|
|
241
|
-
|
|
236
|
+
te(e) && _(p.get(K));
|
|
242
237
|
break;
|
|
243
238
|
}
|
|
244
239
|
}
|
|
245
240
|
Ze();
|
|
246
241
|
}
|
|
247
|
-
function
|
|
242
|
+
function J(e) {
|
|
248
243
|
const n = E(e);
|
|
249
|
-
return n === e ? n : (
|
|
244
|
+
return n === e ? n : (k(n, "iterate", ae), H(e) ? n : n.map(I));
|
|
250
245
|
}
|
|
251
246
|
function Xe(e) {
|
|
252
|
-
return
|
|
247
|
+
return k(e = E(e), "iterate", ae), e;
|
|
253
248
|
}
|
|
254
|
-
const
|
|
249
|
+
const st = {
|
|
255
250
|
__proto__: null,
|
|
256
251
|
[Symbol.iterator]() {
|
|
257
|
-
return Oe(this, Symbol.iterator,
|
|
252
|
+
return Oe(this, Symbol.iterator, I);
|
|
258
253
|
},
|
|
259
254
|
concat(...e) {
|
|
260
|
-
return
|
|
261
|
-
...e.map((n) =>
|
|
255
|
+
return J(this).concat(
|
|
256
|
+
...e.map((n) => Y(n) ? J(n) : n)
|
|
262
257
|
);
|
|
263
258
|
},
|
|
264
259
|
entries() {
|
|
265
|
-
return Oe(this, "entries", (e) => (e[1] =
|
|
260
|
+
return Oe(this, "entries", (e) => (e[1] = I(e[1]), e));
|
|
266
261
|
},
|
|
267
262
|
every(e, n) {
|
|
268
|
-
return
|
|
263
|
+
return D(this, "every", e, n, void 0, arguments);
|
|
269
264
|
},
|
|
270
265
|
filter(e, n) {
|
|
271
|
-
return
|
|
266
|
+
return D(this, "filter", e, n, (t) => t.map(I), arguments);
|
|
272
267
|
},
|
|
273
268
|
find(e, n) {
|
|
274
|
-
return
|
|
269
|
+
return D(this, "find", e, n, I, arguments);
|
|
275
270
|
},
|
|
276
271
|
findIndex(e, n) {
|
|
277
|
-
return
|
|
272
|
+
return D(this, "findIndex", e, n, void 0, arguments);
|
|
278
273
|
},
|
|
279
274
|
findLast(e, n) {
|
|
280
|
-
return
|
|
275
|
+
return D(this, "findLast", e, n, I, arguments);
|
|
281
276
|
},
|
|
282
277
|
findLastIndex(e, n) {
|
|
283
|
-
return
|
|
278
|
+
return D(this, "findLastIndex", e, n, void 0, arguments);
|
|
284
279
|
},
|
|
285
280
|
// flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement
|
|
286
281
|
forEach(e, n) {
|
|
287
|
-
return
|
|
282
|
+
return D(this, "forEach", e, n, void 0, arguments);
|
|
288
283
|
},
|
|
289
284
|
includes(...e) {
|
|
290
|
-
return
|
|
285
|
+
return Ie(this, "includes", e);
|
|
291
286
|
},
|
|
292
287
|
indexOf(...e) {
|
|
293
|
-
return
|
|
288
|
+
return Ie(this, "indexOf", e);
|
|
294
289
|
},
|
|
295
290
|
join(e) {
|
|
296
|
-
return
|
|
291
|
+
return J(this).join(e);
|
|
297
292
|
},
|
|
298
293
|
// keys() iterator only reads `length`, no optimisation required
|
|
299
294
|
lastIndexOf(...e) {
|
|
300
|
-
return
|
|
295
|
+
return Ie(this, "lastIndexOf", e);
|
|
301
296
|
},
|
|
302
297
|
map(e, n) {
|
|
303
|
-
return
|
|
298
|
+
return D(this, "map", e, n, void 0, arguments);
|
|
304
299
|
},
|
|
305
300
|
pop() {
|
|
306
|
-
return
|
|
301
|
+
return ne(this, "pop");
|
|
307
302
|
},
|
|
308
303
|
push(...e) {
|
|
309
|
-
return
|
|
304
|
+
return ne(this, "push", e);
|
|
310
305
|
},
|
|
311
306
|
reduce(e, ...n) {
|
|
312
|
-
return
|
|
307
|
+
return cn(this, "reduce", e, n);
|
|
313
308
|
},
|
|
314
309
|
reduceRight(e, ...n) {
|
|
315
|
-
return
|
|
310
|
+
return cn(this, "reduceRight", e, n);
|
|
316
311
|
},
|
|
317
312
|
shift() {
|
|
318
|
-
return
|
|
313
|
+
return ne(this, "shift");
|
|
319
314
|
},
|
|
320
315
|
// slice could use ARRAY_ITERATE but also seems to beg for range tracking
|
|
321
316
|
some(e, n) {
|
|
322
|
-
return
|
|
317
|
+
return D(this, "some", e, n, void 0, arguments);
|
|
323
318
|
},
|
|
324
319
|
splice(...e) {
|
|
325
|
-
return
|
|
320
|
+
return ne(this, "splice", e);
|
|
326
321
|
},
|
|
327
322
|
toReversed() {
|
|
328
|
-
return
|
|
323
|
+
return J(this).toReversed();
|
|
329
324
|
},
|
|
330
325
|
toSorted(e) {
|
|
331
|
-
return
|
|
326
|
+
return J(this).toSorted(e);
|
|
332
327
|
},
|
|
333
328
|
toSpliced(...e) {
|
|
334
|
-
return
|
|
329
|
+
return J(this).toSpliced(...e);
|
|
335
330
|
},
|
|
336
331
|
unshift(...e) {
|
|
337
|
-
return
|
|
332
|
+
return ne(this, "unshift", e);
|
|
338
333
|
},
|
|
339
334
|
values() {
|
|
340
|
-
return Oe(this, "values",
|
|
335
|
+
return Oe(this, "values", I);
|
|
341
336
|
}
|
|
342
337
|
};
|
|
343
338
|
function Oe(e, n, t) {
|
|
344
|
-
const
|
|
345
|
-
return
|
|
346
|
-
const
|
|
347
|
-
return
|
|
348
|
-
}),
|
|
349
|
-
}
|
|
350
|
-
const
|
|
351
|
-
function
|
|
352
|
-
const
|
|
353
|
-
if (
|
|
354
|
-
const
|
|
355
|
-
return
|
|
356
|
-
}
|
|
357
|
-
let
|
|
358
|
-
|
|
359
|
-
return t.call(this,
|
|
360
|
-
} : t.length > 2 && (
|
|
361
|
-
return t.call(this,
|
|
339
|
+
const r = Xe(e), o = r[n]();
|
|
340
|
+
return r !== e && !H(e) && (o._next = o.next, o.next = () => {
|
|
341
|
+
const s = o._next();
|
|
342
|
+
return s.value && (s.value = t(s.value)), s;
|
|
343
|
+
}), o;
|
|
344
|
+
}
|
|
345
|
+
const rt = Array.prototype;
|
|
346
|
+
function D(e, n, t, r, o, s) {
|
|
347
|
+
const p = Xe(e), _ = p !== e && !H(e), C = p[n];
|
|
348
|
+
if (C !== rt[n]) {
|
|
349
|
+
const a = C.apply(e, s);
|
|
350
|
+
return _ ? I(a) : a;
|
|
351
|
+
}
|
|
352
|
+
let m = t;
|
|
353
|
+
p !== e && (_ ? m = function(a, l) {
|
|
354
|
+
return t.call(this, I(a), l, e);
|
|
355
|
+
} : t.length > 2 && (m = function(a, l) {
|
|
356
|
+
return t.call(this, a, l, e);
|
|
362
357
|
}));
|
|
363
|
-
const
|
|
364
|
-
return
|
|
365
|
-
}
|
|
366
|
-
function
|
|
367
|
-
const
|
|
368
|
-
let
|
|
369
|
-
return
|
|
370
|
-
return t.call(this,
|
|
371
|
-
}) :
|
|
372
|
-
return t.call(this,
|
|
373
|
-
}),
|
|
374
|
-
}
|
|
375
|
-
function
|
|
376
|
-
const
|
|
377
|
-
|
|
378
|
-
const
|
|
379
|
-
return (
|
|
380
|
-
}
|
|
381
|
-
function
|
|
382
|
-
|
|
383
|
-
const
|
|
384
|
-
return Ze(),
|
|
385
|
-
}
|
|
386
|
-
const
|
|
387
|
-
/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((e) => e !== "arguments" && e !== "caller").map((e) => Symbol[e]).filter(
|
|
358
|
+
const i = C.call(p, m, r);
|
|
359
|
+
return _ && o ? o(i) : i;
|
|
360
|
+
}
|
|
361
|
+
function cn(e, n, t, r) {
|
|
362
|
+
const o = Xe(e);
|
|
363
|
+
let s = t;
|
|
364
|
+
return o !== e && (H(e) ? t.length > 3 && (s = function(p, _, C) {
|
|
365
|
+
return t.call(this, p, _, C, e);
|
|
366
|
+
}) : s = function(p, _, C) {
|
|
367
|
+
return t.call(this, p, I(_), C, e);
|
|
368
|
+
}), o[n](s, ...r);
|
|
369
|
+
}
|
|
370
|
+
function Ie(e, n, t) {
|
|
371
|
+
const r = E(e);
|
|
372
|
+
k(r, "iterate", ae);
|
|
373
|
+
const o = r[n](...t);
|
|
374
|
+
return (o === -1 || o === !1) && $t(t[0]) ? (t[0] = E(t[0]), r[n](...t)) : o;
|
|
375
|
+
}
|
|
376
|
+
function ne(e, n, t = []) {
|
|
377
|
+
nt(), qe();
|
|
378
|
+
const r = E(e)[n].apply(e, t);
|
|
379
|
+
return Ze(), tt(), r;
|
|
380
|
+
}
|
|
381
|
+
const at = /* @__PURE__ */ Bn("__proto__,__v_isRef,__isVue"), Cn = new Set(
|
|
382
|
+
/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((e) => e !== "arguments" && e !== "caller").map((e) => Symbol[e]).filter(ue)
|
|
388
383
|
);
|
|
389
|
-
function
|
|
390
|
-
|
|
384
|
+
function it(e) {
|
|
385
|
+
ue(e) || (e = String(e));
|
|
391
386
|
const n = E(this);
|
|
392
|
-
return
|
|
387
|
+
return k(n, "has", e), n.hasOwnProperty(e);
|
|
393
388
|
}
|
|
394
|
-
class
|
|
389
|
+
class $n {
|
|
395
390
|
constructor(n = !1, t = !1) {
|
|
396
391
|
this._isReadonly = n, this._isShallow = t;
|
|
397
392
|
}
|
|
398
|
-
get(n, t,
|
|
393
|
+
get(n, t, r) {
|
|
399
394
|
if (t === "__v_skip") return n.__v_skip;
|
|
400
|
-
const
|
|
395
|
+
const o = this._isReadonly, s = this._isShallow;
|
|
401
396
|
if (t === "__v_isReactive")
|
|
402
|
-
return !
|
|
397
|
+
return !o;
|
|
403
398
|
if (t === "__v_isReadonly")
|
|
404
|
-
return
|
|
399
|
+
return o;
|
|
405
400
|
if (t === "__v_isShallow")
|
|
406
|
-
return
|
|
401
|
+
return s;
|
|
407
402
|
if (t === "__v_raw")
|
|
408
|
-
return
|
|
403
|
+
return r === (o ? s ? yn : Nn : s ? gt : wn).get(n) || // receiver is not the reactive proxy, but has the same prototype
|
|
409
404
|
// this means the receiver is a user proxy of the reactive proxy
|
|
410
|
-
Object.getPrototypeOf(n) === Object.getPrototypeOf(
|
|
411
|
-
const
|
|
412
|
-
if (!
|
|
413
|
-
let
|
|
414
|
-
if (
|
|
415
|
-
return
|
|
405
|
+
Object.getPrototypeOf(n) === Object.getPrototypeOf(r) ? n : void 0;
|
|
406
|
+
const p = Y(n);
|
|
407
|
+
if (!o) {
|
|
408
|
+
let C;
|
|
409
|
+
if (p && (C = st[t]))
|
|
410
|
+
return C;
|
|
416
411
|
if (t === "hasOwnProperty")
|
|
417
|
-
return
|
|
412
|
+
return it;
|
|
418
413
|
}
|
|
419
|
-
const
|
|
414
|
+
const _ = Reflect.get(
|
|
420
415
|
n,
|
|
421
416
|
t,
|
|
422
417
|
// if this is a proxy wrapping a ref, return methods using the raw ref
|
|
423
418
|
// as receiver so that we don't have to call `toRaw` on the ref in all
|
|
424
419
|
// its class methods
|
|
425
|
-
Z(n) ? n :
|
|
420
|
+
Z(n) ? n : r
|
|
426
421
|
);
|
|
427
|
-
return (
|
|
422
|
+
return (ue(t) ? Cn.has(t) : at(t)) || (o || k(n, "get", t), s) ? _ : Z(_) ? p && Ye(t) ? _ : _.value : je(_) ? o ? ve(_) : jn(_) : _;
|
|
428
423
|
}
|
|
429
424
|
}
|
|
430
|
-
class
|
|
425
|
+
class ct extends $n {
|
|
431
426
|
constructor(n = !1) {
|
|
432
427
|
super(!1, n);
|
|
433
428
|
}
|
|
434
|
-
set(n, t,
|
|
435
|
-
let
|
|
429
|
+
set(n, t, r, o) {
|
|
430
|
+
let s = n[t];
|
|
436
431
|
if (!this._isShallow) {
|
|
437
|
-
const
|
|
438
|
-
if (!
|
|
439
|
-
return
|
|
432
|
+
const C = ee(s);
|
|
433
|
+
if (!H(r) && !ee(r) && (s = E(s), r = E(r)), !Y(n) && Z(s) && !Z(r))
|
|
434
|
+
return C ? !1 : (s.value = r, !0);
|
|
440
435
|
}
|
|
441
|
-
const
|
|
436
|
+
const p = Y(n) && Ye(t) ? Number(t) < n.length : Ve(n, t), _ = Reflect.set(
|
|
442
437
|
n,
|
|
443
438
|
t,
|
|
444
|
-
|
|
445
|
-
Z(n) ? n :
|
|
439
|
+
r,
|
|
440
|
+
Z(n) ? n : o
|
|
446
441
|
);
|
|
447
|
-
return n === E(
|
|
442
|
+
return n === E(o) && (p ? q(r, s) && V(n, "set", t, r, s) : V(n, "add", t, r)), _;
|
|
448
443
|
}
|
|
449
444
|
deleteProperty(n, t) {
|
|
450
|
-
const
|
|
451
|
-
return
|
|
445
|
+
const r = Ve(n, t), o = n[t], s = Reflect.deleteProperty(n, t);
|
|
446
|
+
return s && r && V(n, "delete", t, void 0, o), s;
|
|
452
447
|
}
|
|
453
448
|
has(n, t) {
|
|
454
|
-
const
|
|
455
|
-
return (!
|
|
449
|
+
const r = Reflect.has(n, t);
|
|
450
|
+
return (!ue(t) || !Cn.has(t)) && k(n, "has", t), r;
|
|
456
451
|
}
|
|
457
452
|
ownKeys(n) {
|
|
458
|
-
return
|
|
453
|
+
return k(
|
|
459
454
|
n,
|
|
460
455
|
"iterate",
|
|
461
|
-
|
|
456
|
+
Y(n) ? "length" : K
|
|
462
457
|
), Reflect.ownKeys(n);
|
|
463
458
|
}
|
|
464
459
|
}
|
|
465
|
-
class
|
|
460
|
+
class bn extends $n {
|
|
466
461
|
constructor(n = !1) {
|
|
467
462
|
super(!0, n);
|
|
468
463
|
}
|
|
@@ -479,20 +474,20 @@ class $n extends Cn {
|
|
|
479
474
|
), !0;
|
|
480
475
|
}
|
|
481
476
|
}
|
|
482
|
-
const
|
|
483
|
-
function
|
|
484
|
-
return function(...
|
|
485
|
-
const
|
|
486
|
-
return !n &&
|
|
487
|
-
|
|
477
|
+
const ut = /* @__PURE__ */ new ct(), lt = /* @__PURE__ */ new bn(), pt = /* @__PURE__ */ new bn(!0), Le = (e) => e, pe = (e) => Reflect.getPrototypeOf(e);
|
|
478
|
+
function dt(e, n, t) {
|
|
479
|
+
return function(...r) {
|
|
480
|
+
const o = this.__v_raw, s = E(o), p = te(s), _ = e === "entries" || e === Symbol.iterator && p, C = e === "keys" && p, m = o[e](...r), i = t ? Le : n ? Me : I;
|
|
481
|
+
return !n && k(
|
|
482
|
+
s,
|
|
488
483
|
"iterate",
|
|
489
|
-
|
|
484
|
+
C ? He : K
|
|
490
485
|
), {
|
|
491
486
|
// iterator protocol
|
|
492
487
|
next() {
|
|
493
|
-
const { value:
|
|
494
|
-
return l ? { value:
|
|
495
|
-
value:
|
|
488
|
+
const { value: a, done: l } = m.next();
|
|
489
|
+
return l ? { value: a, done: l } : {
|
|
490
|
+
value: _ ? [i(a[0]), i(a[1])] : i(a),
|
|
496
491
|
done: l
|
|
497
492
|
};
|
|
498
493
|
},
|
|
@@ -503,80 +498,80 @@ function pt(e, n, t) {
|
|
|
503
498
|
};
|
|
504
499
|
};
|
|
505
500
|
}
|
|
506
|
-
function
|
|
501
|
+
function de(e) {
|
|
507
502
|
return function(...n) {
|
|
508
503
|
if (process.env.NODE_ENV !== "production") {
|
|
509
504
|
const t = n[0] ? `on key "${n[0]}" ` : "";
|
|
510
505
|
X(
|
|
511
|
-
`${
|
|
506
|
+
`${Yn(e)} operation ${t}failed: target is readonly.`,
|
|
512
507
|
E(this)
|
|
513
508
|
);
|
|
514
509
|
}
|
|
515
510
|
return e === "delete" ? !1 : e === "clear" ? void 0 : this;
|
|
516
511
|
};
|
|
517
512
|
}
|
|
518
|
-
function
|
|
513
|
+
function mt(e, n) {
|
|
519
514
|
const t = {
|
|
520
|
-
get(
|
|
521
|
-
const
|
|
522
|
-
e || (
|
|
523
|
-
const { has:
|
|
524
|
-
if (
|
|
525
|
-
return
|
|
526
|
-
if (
|
|
527
|
-
return
|
|
528
|
-
|
|
515
|
+
get(o) {
|
|
516
|
+
const s = this.__v_raw, p = E(s), _ = E(o);
|
|
517
|
+
e || (q(o, _) && k(p, "get", o), k(p, "get", _));
|
|
518
|
+
const { has: C } = pe(p), m = n ? Le : e ? Me : I;
|
|
519
|
+
if (C.call(p, o))
|
|
520
|
+
return m(s.get(o));
|
|
521
|
+
if (C.call(p, _))
|
|
522
|
+
return m(s.get(_));
|
|
523
|
+
s !== p && s.get(o);
|
|
529
524
|
},
|
|
530
525
|
get size() {
|
|
531
|
-
const
|
|
532
|
-
return !e &&
|
|
526
|
+
const o = this.__v_raw;
|
|
527
|
+
return !e && k(E(o), "iterate", K), Reflect.get(o, "size", o);
|
|
533
528
|
},
|
|
534
|
-
has(
|
|
535
|
-
const
|
|
536
|
-
return e || (
|
|
529
|
+
has(o) {
|
|
530
|
+
const s = this.__v_raw, p = E(s), _ = E(o);
|
|
531
|
+
return e || (q(o, _) && k(p, "has", o), k(p, "has", _)), o === _ ? s.has(o) : s.has(o) || s.has(_);
|
|
537
532
|
},
|
|
538
|
-
forEach(
|
|
539
|
-
const
|
|
540
|
-
return !e &&
|
|
533
|
+
forEach(o, s) {
|
|
534
|
+
const p = this, _ = p.__v_raw, C = E(_), m = n ? Le : e ? Me : I;
|
|
535
|
+
return !e && k(C, "iterate", K), _.forEach((i, a) => o.call(s, m(i), m(a), p));
|
|
541
536
|
}
|
|
542
537
|
};
|
|
543
538
|
return Fe(
|
|
544
539
|
t,
|
|
545
540
|
e ? {
|
|
546
|
-
add:
|
|
547
|
-
set:
|
|
548
|
-
delete:
|
|
549
|
-
clear:
|
|
541
|
+
add: de("add"),
|
|
542
|
+
set: de("set"),
|
|
543
|
+
delete: de("delete"),
|
|
544
|
+
clear: de("clear")
|
|
550
545
|
} : {
|
|
551
|
-
add(
|
|
552
|
-
!n && !
|
|
553
|
-
const
|
|
554
|
-
return
|
|
546
|
+
add(o) {
|
|
547
|
+
!n && !H(o) && !ee(o) && (o = E(o));
|
|
548
|
+
const s = E(this);
|
|
549
|
+
return pe(s).has.call(s, o) || (s.add(o), V(s, "add", o, o)), this;
|
|
555
550
|
},
|
|
556
|
-
set(
|
|
557
|
-
!n && !
|
|
558
|
-
const
|
|
559
|
-
let
|
|
560
|
-
|
|
561
|
-
const
|
|
562
|
-
return
|
|
551
|
+
set(o, s) {
|
|
552
|
+
!n && !H(s) && !ee(s) && (s = E(s));
|
|
553
|
+
const p = E(this), { has: _, get: C } = pe(p);
|
|
554
|
+
let m = _.call(p, o);
|
|
555
|
+
m ? process.env.NODE_ENV !== "production" && un(p, _, o) : (o = E(o), m = _.call(p, o));
|
|
556
|
+
const i = C.call(p, o);
|
|
557
|
+
return p.set(o, s), m ? q(s, i) && V(p, "set", o, s, i) : V(p, "add", o, s), this;
|
|
563
558
|
},
|
|
564
|
-
delete(
|
|
565
|
-
const
|
|
566
|
-
let
|
|
567
|
-
|
|
568
|
-
const
|
|
569
|
-
return
|
|
559
|
+
delete(o) {
|
|
560
|
+
const s = E(this), { has: p, get: _ } = pe(s);
|
|
561
|
+
let C = p.call(s, o);
|
|
562
|
+
C ? process.env.NODE_ENV !== "production" && un(s, p, o) : (o = E(o), C = p.call(s, o));
|
|
563
|
+
const m = _ ? _.call(s, o) : void 0, i = s.delete(o);
|
|
564
|
+
return C && V(s, "delete", o, void 0, m), i;
|
|
570
565
|
},
|
|
571
566
|
clear() {
|
|
572
|
-
const
|
|
573
|
-
return
|
|
574
|
-
|
|
567
|
+
const o = E(this), s = o.size !== 0, p = process.env.NODE_ENV !== "production" ? te(o) ? new Map(o) : new Set(o) : void 0, _ = o.clear();
|
|
568
|
+
return s && V(
|
|
569
|
+
o,
|
|
575
570
|
"clear",
|
|
576
571
|
void 0,
|
|
577
572
|
void 0,
|
|
578
|
-
|
|
579
|
-
),
|
|
573
|
+
p
|
|
574
|
+
), _;
|
|
580
575
|
}
|
|
581
576
|
}
|
|
582
577
|
), [
|
|
@@ -584,36 +579,36 @@ function dt(e, n) {
|
|
|
584
579
|
"values",
|
|
585
580
|
"entries",
|
|
586
581
|
Symbol.iterator
|
|
587
|
-
].forEach((
|
|
588
|
-
t[
|
|
582
|
+
].forEach((o) => {
|
|
583
|
+
t[o] = dt(o, e, n);
|
|
589
584
|
}), t;
|
|
590
585
|
}
|
|
591
|
-
function
|
|
592
|
-
const t =
|
|
593
|
-
return (o, s
|
|
594
|
-
Ve(t,
|
|
595
|
-
|
|
596
|
-
|
|
586
|
+
function en(e, n) {
|
|
587
|
+
const t = mt(e, n);
|
|
588
|
+
return (r, o, s) => o === "__v_isReactive" ? !e : o === "__v_isReadonly" ? e : o === "__v_raw" ? r : Reflect.get(
|
|
589
|
+
Ve(t, o) && o in r ? t : r,
|
|
590
|
+
o,
|
|
591
|
+
s
|
|
597
592
|
);
|
|
598
593
|
}
|
|
599
594
|
const ft = {
|
|
600
|
-
get: /* @__PURE__ */
|
|
601
|
-
}, mt = {
|
|
602
|
-
get: /* @__PURE__ */ Qe(!0, !1)
|
|
595
|
+
get: /* @__PURE__ */ en(!1, !1)
|
|
603
596
|
}, ht = {
|
|
604
|
-
get: /* @__PURE__ */
|
|
597
|
+
get: /* @__PURE__ */ en(!0, !1)
|
|
598
|
+
}, vt = {
|
|
599
|
+
get: /* @__PURE__ */ en(!0, !0)
|
|
605
600
|
};
|
|
606
|
-
function
|
|
607
|
-
const
|
|
608
|
-
if (
|
|
609
|
-
const
|
|
601
|
+
function un(e, n, t) {
|
|
602
|
+
const r = E(t);
|
|
603
|
+
if (r !== t && n.call(e, r)) {
|
|
604
|
+
const o = mn(e);
|
|
610
605
|
X(
|
|
611
|
-
`Reactive ${
|
|
606
|
+
`Reactive ${o} contains both the raw and reactive versions of the same object${o === "Map" ? " as keys" : ""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`
|
|
612
607
|
);
|
|
613
608
|
}
|
|
614
609
|
}
|
|
615
|
-
const
|
|
616
|
-
function
|
|
610
|
+
const wn = /* @__PURE__ */ new WeakMap(), gt = /* @__PURE__ */ new WeakMap(), Nn = /* @__PURE__ */ new WeakMap(), yn = /* @__PURE__ */ new WeakMap();
|
|
611
|
+
function _t(e) {
|
|
617
612
|
switch (e) {
|
|
618
613
|
case "Object":
|
|
619
614
|
case "Array":
|
|
@@ -627,38 +622,38 @@ function vt(e) {
|
|
|
627
622
|
return 0;
|
|
628
623
|
}
|
|
629
624
|
}
|
|
630
|
-
function
|
|
631
|
-
return e.__v_skip || !Object.isExtensible(e) ? 0 :
|
|
625
|
+
function Ct(e) {
|
|
626
|
+
return e.__v_skip || !Object.isExtensible(e) ? 0 : _t(mn(e));
|
|
632
627
|
}
|
|
633
|
-
function
|
|
634
|
-
return
|
|
628
|
+
function jn(e) {
|
|
629
|
+
return ee(e) ? e : nn(
|
|
635
630
|
e,
|
|
636
631
|
!1,
|
|
637
|
-
|
|
632
|
+
ut,
|
|
638
633
|
ft,
|
|
639
|
-
|
|
634
|
+
wn
|
|
640
635
|
);
|
|
641
636
|
}
|
|
642
|
-
function
|
|
643
|
-
return
|
|
637
|
+
function ve(e) {
|
|
638
|
+
return nn(
|
|
644
639
|
e,
|
|
645
640
|
!0,
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
641
|
+
lt,
|
|
642
|
+
ht,
|
|
643
|
+
Nn
|
|
649
644
|
);
|
|
650
645
|
}
|
|
651
646
|
function fe(e) {
|
|
652
|
-
return
|
|
647
|
+
return nn(
|
|
653
648
|
e,
|
|
654
649
|
!0,
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
650
|
+
pt,
|
|
651
|
+
vt,
|
|
652
|
+
yn
|
|
658
653
|
);
|
|
659
654
|
}
|
|
660
|
-
function
|
|
661
|
-
if (!
|
|
655
|
+
function nn(e, n, t, r, o) {
|
|
656
|
+
if (!je(e))
|
|
662
657
|
return process.env.NODE_ENV !== "production" && X(
|
|
663
658
|
`value cannot be made ${n ? "readonly" : "reactive"}: ${String(
|
|
664
659
|
e
|
|
@@ -666,44 +661,44 @@ function en(e, n, t, o, s) {
|
|
|
666
661
|
), e;
|
|
667
662
|
if (e.__v_raw && !(n && e.__v_isReactive))
|
|
668
663
|
return e;
|
|
669
|
-
const
|
|
670
|
-
if (
|
|
671
|
-
return a;
|
|
672
|
-
const c = _t(e);
|
|
673
|
-
if (c === 0)
|
|
664
|
+
const s = Ct(e);
|
|
665
|
+
if (s === 0)
|
|
674
666
|
return e;
|
|
675
|
-
const
|
|
667
|
+
const p = o.get(e);
|
|
668
|
+
if (p)
|
|
669
|
+
return p;
|
|
670
|
+
const _ = new Proxy(
|
|
676
671
|
e,
|
|
677
|
-
|
|
672
|
+
s === 2 ? r : t
|
|
678
673
|
);
|
|
679
|
-
return
|
|
674
|
+
return o.set(e, _), _;
|
|
680
675
|
}
|
|
681
|
-
function
|
|
676
|
+
function ee(e) {
|
|
682
677
|
return !!(e && e.__v_isReadonly);
|
|
683
678
|
}
|
|
684
|
-
function
|
|
679
|
+
function H(e) {
|
|
685
680
|
return !!(e && e.__v_isShallow);
|
|
686
681
|
}
|
|
687
|
-
function
|
|
682
|
+
function $t(e) {
|
|
688
683
|
return e ? !!e.__v_raw : !1;
|
|
689
684
|
}
|
|
690
685
|
function E(e) {
|
|
691
686
|
const n = e && e.__v_raw;
|
|
692
687
|
return n ? E(n) : e;
|
|
693
688
|
}
|
|
694
|
-
const
|
|
689
|
+
const I = (e) => je(e) ? jn(e) : e, Me = (e) => je(e) ? ve(e) : e;
|
|
695
690
|
function Z(e) {
|
|
696
691
|
return e ? e.__v_isRef === !0 : !1;
|
|
697
692
|
}
|
|
698
693
|
function ge(e) {
|
|
699
|
-
return
|
|
694
|
+
return bt(e, !1);
|
|
700
695
|
}
|
|
701
|
-
function
|
|
702
|
-
return Z(e) ? e : new
|
|
696
|
+
function bt(e, n) {
|
|
697
|
+
return Z(e) ? e : new wt(e, n);
|
|
703
698
|
}
|
|
704
|
-
class
|
|
699
|
+
class wt {
|
|
705
700
|
constructor(n, t) {
|
|
706
|
-
this.dep = new
|
|
701
|
+
this.dep = new Qe(), this.__v_isRef = !0, this.__v_isShallow = !1, this._rawValue = t ? n : E(n), this._value = t ? n : I(n), this.__v_isShallow = t;
|
|
707
702
|
}
|
|
708
703
|
get value() {
|
|
709
704
|
return process.env.NODE_ENV !== "production" ? this.dep.track({
|
|
@@ -713,8 +708,8 @@ class bt {
|
|
|
713
708
|
}) : this.dep.track(), this._value;
|
|
714
709
|
}
|
|
715
710
|
set value(n) {
|
|
716
|
-
const t = this._rawValue,
|
|
717
|
-
n =
|
|
711
|
+
const t = this._rawValue, r = this.__v_isShallow || H(n) || ee(n);
|
|
712
|
+
n = r ? n : E(n), q(n, t) && (this._rawValue = n, this._value = r ? n : I(n), process.env.NODE_ENV !== "production" ? this.dep.trigger({
|
|
718
713
|
target: this,
|
|
719
714
|
type: "set",
|
|
720
715
|
key: "value",
|
|
@@ -723,17 +718,17 @@ class bt {
|
|
|
723
718
|
}) : this.dep.trigger());
|
|
724
719
|
}
|
|
725
720
|
}
|
|
726
|
-
class
|
|
727
|
-
constructor(n, t,
|
|
728
|
-
this.fn = n, this.setter = t, this._value = void 0, this.dep = new
|
|
721
|
+
class Nt {
|
|
722
|
+
constructor(n, t, r) {
|
|
723
|
+
this.fn = n, this.setter = t, this._value = void 0, this.dep = new Qe(this), this.__v_isRef = !0, this.deps = void 0, this.depsTail = void 0, this.flags = 16, this.globalVersion = re - 1, this.next = void 0, this.effect = this, this.__v_isReadonly = !t, this.isSSR = r;
|
|
729
724
|
}
|
|
730
725
|
/**
|
|
731
726
|
* @internal
|
|
732
727
|
*/
|
|
733
728
|
notify() {
|
|
734
729
|
if (this.flags |= 16, !(this.flags & 8) && // avoid infinite self recursion
|
|
735
|
-
|
|
736
|
-
return
|
|
730
|
+
A !== this)
|
|
731
|
+
return qn(this, !0), !0;
|
|
737
732
|
process.env.NODE_ENV;
|
|
738
733
|
}
|
|
739
734
|
get value() {
|
|
@@ -742,229 +737,230 @@ class wt {
|
|
|
742
737
|
type: "get",
|
|
743
738
|
key: "value"
|
|
744
739
|
}) : this.dep.track();
|
|
745
|
-
return
|
|
740
|
+
return hn(this), n && (n.version = this.dep.version), this._value;
|
|
746
741
|
}
|
|
747
742
|
set value(n) {
|
|
748
743
|
this.setter ? this.setter(n) : process.env.NODE_ENV !== "production" && X("Write operation failed: computed value is readonly");
|
|
749
744
|
}
|
|
750
745
|
}
|
|
751
|
-
function
|
|
752
|
-
let
|
|
753
|
-
|
|
754
|
-
const
|
|
755
|
-
return process.env.NODE_ENV,
|
|
746
|
+
function Ke(e, n, t = !1) {
|
|
747
|
+
let r, o;
|
|
748
|
+
zn(e) ? r = e : (r = e.get, o = e.set);
|
|
749
|
+
const s = new Nt(r, o, t);
|
|
750
|
+
return process.env.NODE_ENV, s;
|
|
756
751
|
}
|
|
757
|
-
const
|
|
758
|
-
let
|
|
752
|
+
const yt = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
753
|
+
let jt = (e = 21) => {
|
|
759
754
|
let n = "", t = crypto.getRandomValues(new Uint8Array(e |= 0));
|
|
760
755
|
for (; e--; )
|
|
761
|
-
n +=
|
|
756
|
+
n += yt[t[e] & 63];
|
|
762
757
|
return n;
|
|
763
758
|
};
|
|
764
759
|
function Et(e, n = !0, t = !1) {
|
|
765
|
-
const
|
|
766
|
-
let
|
|
767
|
-
const
|
|
768
|
-
let
|
|
760
|
+
const r = ge();
|
|
761
|
+
let o;
|
|
762
|
+
const s = ge(!1);
|
|
763
|
+
let p = () => {
|
|
769
764
|
};
|
|
770
|
-
const
|
|
771
|
-
apply: function(
|
|
772
|
-
let
|
|
765
|
+
const _ = new Proxy(e, {
|
|
766
|
+
apply: function(i, a, l) {
|
|
767
|
+
let f;
|
|
773
768
|
try {
|
|
774
|
-
|
|
775
|
-
} catch (
|
|
776
|
-
|
|
769
|
+
f = i(...l);
|
|
770
|
+
} catch (b) {
|
|
771
|
+
f = b;
|
|
777
772
|
}
|
|
778
|
-
if (
|
|
779
|
-
if (
|
|
780
|
-
throw
|
|
773
|
+
if (f instanceof Error) {
|
|
774
|
+
if (r.value = f, o = f, n)
|
|
775
|
+
throw p(), f;
|
|
781
776
|
} else
|
|
782
|
-
|
|
777
|
+
s.value = !0, r.value = void 0, o = !0, p();
|
|
783
778
|
}
|
|
784
|
-
}),
|
|
785
|
-
},
|
|
786
|
-
(
|
|
787
|
-
|
|
779
|
+
}), C = () => {
|
|
780
|
+
}, m = new Proxy(
|
|
781
|
+
(i) => {
|
|
782
|
+
r.value = i;
|
|
788
783
|
},
|
|
789
784
|
{
|
|
790
|
-
apply: function(
|
|
791
|
-
|
|
785
|
+
apply: function(i, a, l) {
|
|
786
|
+
i(...l), C(...l);
|
|
792
787
|
}
|
|
793
788
|
}
|
|
794
789
|
);
|
|
795
790
|
return {
|
|
796
|
-
promise: new Promise((
|
|
797
|
-
if (n &&
|
|
798
|
-
|
|
791
|
+
promise: new Promise((i, a) => {
|
|
792
|
+
if (n && o instanceof Error) {
|
|
793
|
+
a(o);
|
|
799
794
|
return;
|
|
800
|
-
} else if (
|
|
801
|
-
|
|
795
|
+
} else if (o === !0) {
|
|
796
|
+
i();
|
|
802
797
|
return;
|
|
803
798
|
}
|
|
804
799
|
let l;
|
|
805
800
|
t && (l = setTimeout(() => {
|
|
806
|
-
const
|
|
807
|
-
|
|
808
|
-
}, t)),
|
|
809
|
-
l && (clearTimeout(l), l = void 0),
|
|
801
|
+
const f = new Error("timeout!");
|
|
802
|
+
r.value = f, n && a(f);
|
|
803
|
+
}, t)), p = () => {
|
|
804
|
+
l && (clearTimeout(l), l = void 0), i();
|
|
810
805
|
};
|
|
811
806
|
}),
|
|
812
|
-
callback:
|
|
813
|
-
onError:
|
|
814
|
-
resolved:
|
|
815
|
-
error:
|
|
807
|
+
callback: _,
|
|
808
|
+
onError: m,
|
|
809
|
+
resolved: Ke(() => s.value),
|
|
810
|
+
error: Ke(() => r.value)
|
|
816
811
|
};
|
|
817
812
|
}
|
|
818
|
-
function
|
|
819
|
-
return
|
|
813
|
+
function Be() {
|
|
814
|
+
return jt();
|
|
820
815
|
}
|
|
821
|
-
function
|
|
822
|
-
const e = {}, n = {}, t = /* @__PURE__ */ new WeakMap(),
|
|
816
|
+
function At() {
|
|
817
|
+
const e = {}, n = {}, t = /* @__PURE__ */ new WeakMap(), r = {};
|
|
823
818
|
return Object.freeze({
|
|
824
|
-
registerAgg(
|
|
825
|
-
if (
|
|
819
|
+
registerAgg(o) {
|
|
820
|
+
if (o.isInitialized.value)
|
|
826
821
|
throw new Error("Agg must register before initialized");
|
|
827
|
-
if (o
|
|
822
|
+
if (r[o.__id])
|
|
828
823
|
throw new Error("Agg already registered");
|
|
829
|
-
|
|
830
|
-
delete o
|
|
831
|
-
}), o
|
|
832
|
-
const
|
|
833
|
-
for (const
|
|
834
|
-
|
|
835
|
-
for (const
|
|
836
|
-
|
|
837
|
-
t.set(
|
|
824
|
+
o.type === "MultiInstance" && o.api.events.destroyed.watchPublish(() => {
|
|
825
|
+
delete r[o.__id];
|
|
826
|
+
}), r[o.__id] = o;
|
|
827
|
+
const s = [];
|
|
828
|
+
for (const p of Object.values(e))
|
|
829
|
+
p.mount({ api: o.api, __aggId: o.__id, isInitialized: o.isInitialized });
|
|
830
|
+
for (const p of Object.values(n))
|
|
831
|
+
p.mount({ api: o.api, __aggId: o.__id }), s.push(p.__id);
|
|
832
|
+
t.set(o, s);
|
|
838
833
|
},
|
|
839
|
-
createSetupPlugin(
|
|
840
|
-
let
|
|
841
|
-
return
|
|
842
|
-
__id:
|
|
834
|
+
createSetupPlugin(o) {
|
|
835
|
+
let s;
|
|
836
|
+
return o instanceof Function ? s = o() : s = o, Object.freeze({
|
|
837
|
+
__id: Be(),
|
|
843
838
|
type: "Setup",
|
|
844
|
-
mount(
|
|
845
|
-
if (
|
|
839
|
+
mount(p) {
|
|
840
|
+
if (p.isInitialized.value)
|
|
846
841
|
throw new Error("Can not setup after initialized");
|
|
847
|
-
|
|
842
|
+
s.mount({ api: p.api, __aggId: p.__aggId });
|
|
848
843
|
}
|
|
849
844
|
});
|
|
850
845
|
},
|
|
851
|
-
createHotSwapPlugin(
|
|
852
|
-
let
|
|
853
|
-
return
|
|
854
|
-
__id:
|
|
846
|
+
createHotSwapPlugin(o) {
|
|
847
|
+
let s;
|
|
848
|
+
return o instanceof Function ? s = o() : s = o, Object.freeze({
|
|
849
|
+
__id: Be(),
|
|
855
850
|
type: "HotSwap",
|
|
856
|
-
mount:
|
|
857
|
-
unmount:
|
|
851
|
+
mount: s.mount,
|
|
852
|
+
unmount: s.unmount
|
|
858
853
|
});
|
|
859
854
|
},
|
|
860
|
-
registerPlugin(
|
|
861
|
-
if (
|
|
862
|
-
if (e[
|
|
855
|
+
registerPlugin(o) {
|
|
856
|
+
if (o.type === "Setup") {
|
|
857
|
+
if (e[o.__id])
|
|
863
858
|
throw new Error("Plugin already registered");
|
|
864
|
-
e[
|
|
865
|
-
for (const
|
|
866
|
-
|
|
867
|
-
api:
|
|
868
|
-
__aggId:
|
|
869
|
-
isInitialized:
|
|
859
|
+
e[o.__id] = o;
|
|
860
|
+
for (const s in r)
|
|
861
|
+
o.mount({
|
|
862
|
+
api: r[s].api,
|
|
863
|
+
__aggId: r[s].__id,
|
|
864
|
+
isInitialized: r[s].isInitialized
|
|
870
865
|
});
|
|
871
|
-
} else if (
|
|
872
|
-
n[
|
|
873
|
-
for (const
|
|
874
|
-
t.has(
|
|
866
|
+
} else if (o.type === "HotSwap") {
|
|
867
|
+
n[o.__id] = o;
|
|
868
|
+
for (const s in r)
|
|
869
|
+
t.has(r[s]) && !t.get(r[s]).includes(o.__id) && (o.mount({ api: r[s].api, __aggId: r[s].__id }), t.get(r[s]).push(o.__id));
|
|
875
870
|
} else
|
|
876
|
-
isNever(
|
|
871
|
+
isNever(o);
|
|
877
872
|
},
|
|
878
|
-
unregisterPlugin(
|
|
879
|
-
if (
|
|
873
|
+
unregisterPlugin(o) {
|
|
874
|
+
if (o.type === "Setup")
|
|
880
875
|
throw new Error("Can not unregister setup plugin");
|
|
881
|
-
if (
|
|
882
|
-
for (const
|
|
883
|
-
t.has(
|
|
884
|
-
delete n[
|
|
876
|
+
if (o.type === "HotSwap") {
|
|
877
|
+
for (const s in r)
|
|
878
|
+
t.has(r[s]) && t.get(r[s]).includes(o.__id) && o.unmount({ api: r[s].api, __aggId: r[s].__id });
|
|
879
|
+
delete n[o.__id];
|
|
885
880
|
} else
|
|
886
|
-
isNever(
|
|
881
|
+
isNever(o);
|
|
887
882
|
}
|
|
888
883
|
});
|
|
889
884
|
}
|
|
890
|
-
function
|
|
891
|
-
return
|
|
885
|
+
function St(e) {
|
|
886
|
+
return At();
|
|
892
887
|
}
|
|
893
888
|
function Ot(e) {
|
|
894
|
-
const n =
|
|
889
|
+
const n = It(e);
|
|
895
890
|
return fe({
|
|
896
891
|
states: n.states,
|
|
897
892
|
commands: n.commands,
|
|
898
893
|
events: n.events
|
|
899
894
|
});
|
|
900
895
|
}
|
|
901
|
-
function
|
|
896
|
+
function It(e) {
|
|
902
897
|
const n = e.states;
|
|
903
|
-
for (const
|
|
904
|
-
n[
|
|
905
|
-
const t = fe(e.states),
|
|
906
|
-
for (const
|
|
907
|
-
|
|
898
|
+
for (const p of Object.keys(e.states))
|
|
899
|
+
n[p] = ve(n[p]);
|
|
900
|
+
const t = fe(e.states), r = ve(e.commands), o = {}, s = e.events;
|
|
901
|
+
for (const p in e.events)
|
|
902
|
+
o[p] = s[p].api;
|
|
908
903
|
return fe({
|
|
909
904
|
states: t,
|
|
910
|
-
commands:
|
|
911
|
-
events: fe(
|
|
905
|
+
commands: r,
|
|
906
|
+
events: fe(o),
|
|
912
907
|
destroy: e.destroy
|
|
913
908
|
});
|
|
914
909
|
}
|
|
915
|
-
function
|
|
910
|
+
function kt(e) {
|
|
916
911
|
const {
|
|
917
912
|
callback: n,
|
|
918
913
|
onError: t,
|
|
919
|
-
promise:
|
|
920
|
-
resolved:
|
|
914
|
+
promise: r,
|
|
915
|
+
resolved: o
|
|
921
916
|
} = Et(() => {
|
|
922
917
|
}, !1, 5e3);
|
|
923
|
-
function a
|
|
924
|
-
if (
|
|
918
|
+
function s(a) {
|
|
919
|
+
if (o.value === !0)
|
|
925
920
|
throw new Error("Agg already initialized");
|
|
926
|
-
|
|
921
|
+
p.push(a());
|
|
927
922
|
}
|
|
928
|
-
const
|
|
929
|
-
onCreated(
|
|
930
|
-
Promise.resolve().then(
|
|
923
|
+
const p = [], _ = e({
|
|
924
|
+
onCreated(a) {
|
|
925
|
+
Promise.resolve().then(a);
|
|
931
926
|
},
|
|
932
|
-
onBeforeInitialize:
|
|
933
|
-
isInitialized:
|
|
934
|
-
untilInitialized:
|
|
927
|
+
onBeforeInitialize: s,
|
|
928
|
+
isInitialized: Ke(() => o.value),
|
|
929
|
+
untilInitialized: r
|
|
935
930
|
});
|
|
936
931
|
setTimeout(
|
|
937
|
-
() => Promise.all(
|
|
932
|
+
() => Promise.all(p).then(() => {
|
|
938
933
|
n();
|
|
939
|
-
}).catch((
|
|
940
|
-
t(
|
|
941
|
-
})
|
|
934
|
+
}).catch((a) => {
|
|
935
|
+
t(a);
|
|
936
|
+
}),
|
|
937
|
+
0
|
|
942
938
|
);
|
|
943
|
-
const
|
|
939
|
+
const C = _.states || {}, m = _.commands || {}, i = _.events || {};
|
|
944
940
|
return {
|
|
945
|
-
__id:
|
|
941
|
+
__id: Be(),
|
|
946
942
|
type: "Singleton",
|
|
947
943
|
api: Ot({
|
|
948
|
-
states:
|
|
949
|
-
commands:
|
|
950
|
-
events:
|
|
944
|
+
states: C,
|
|
945
|
+
commands: m,
|
|
946
|
+
events: i,
|
|
951
947
|
destroy: () => {
|
|
952
948
|
}
|
|
953
949
|
}),
|
|
954
|
-
isInitialized:
|
|
950
|
+
isInitialized: o,
|
|
955
951
|
async untilInitialized() {
|
|
956
|
-
return await
|
|
957
|
-
throw new Error(`Failed to initialize Agg: ${
|
|
958
|
-
Stack : ${
|
|
952
|
+
return await r.catch((a) => {
|
|
953
|
+
throw new Error(`Failed to initialize Agg: ${a.message}
|
|
954
|
+
Stack : ${a.stack || "unkown"}`);
|
|
959
955
|
});
|
|
960
956
|
}
|
|
961
957
|
};
|
|
962
958
|
}
|
|
963
|
-
let
|
|
959
|
+
let me;
|
|
964
960
|
function xt(e) {
|
|
965
|
-
return
|
|
961
|
+
return kt(() => {
|
|
966
962
|
const n = ge(e), t = ge({});
|
|
967
|
-
let
|
|
963
|
+
let r = () => [], o = () => [], s = () => [], p = () => [], _ = () => [], C = () => [], m = () => [];
|
|
968
964
|
return {
|
|
969
965
|
states: {
|
|
970
966
|
designer: n,
|
|
@@ -972,78 +968,78 @@ function xt(e) {
|
|
|
972
968
|
},
|
|
973
969
|
commands: {
|
|
974
970
|
genCodeFiles() {
|
|
975
|
-
return
|
|
971
|
+
return m();
|
|
976
972
|
},
|
|
977
973
|
clearCaches() {
|
|
978
974
|
},
|
|
979
|
-
setContext(
|
|
980
|
-
t.value =
|
|
975
|
+
setContext(i) {
|
|
976
|
+
t.value = i;
|
|
981
977
|
},
|
|
982
|
-
setDomainDesigner(
|
|
983
|
-
this.clearCaches(), n.value =
|
|
978
|
+
setDomainDesigner(i) {
|
|
979
|
+
this.clearCaches(), n.value = i;
|
|
984
980
|
},
|
|
985
|
-
_genInfoCode(...
|
|
986
|
-
return
|
|
981
|
+
_genInfoCode(...i) {
|
|
982
|
+
return r(...i);
|
|
987
983
|
},
|
|
988
|
-
_setInfoCodeProvider(
|
|
989
|
-
|
|
984
|
+
_setInfoCodeProvider(i) {
|
|
985
|
+
r = i;
|
|
990
986
|
},
|
|
991
|
-
_genCommandCode(...
|
|
992
|
-
return
|
|
987
|
+
_genCommandCode(...i) {
|
|
988
|
+
return o(...i);
|
|
993
989
|
},
|
|
994
|
-
_setCommandCodeProvider(
|
|
995
|
-
|
|
990
|
+
_setCommandCodeProvider(i) {
|
|
991
|
+
o = i;
|
|
996
992
|
},
|
|
997
|
-
_genFacadeCommandCode(...
|
|
998
|
-
return
|
|
993
|
+
_genFacadeCommandCode(...i) {
|
|
994
|
+
return s(...i);
|
|
999
995
|
},
|
|
1000
|
-
_setFacadeCommandCodeProvider(
|
|
1001
|
-
|
|
996
|
+
_setFacadeCommandCodeProvider(i) {
|
|
997
|
+
s = i;
|
|
1002
998
|
},
|
|
1003
|
-
_genAggCode(...
|
|
1004
|
-
return
|
|
999
|
+
_genAggCode(...i) {
|
|
1000
|
+
return p(...i);
|
|
1005
1001
|
},
|
|
1006
|
-
_setAggCodeProvider(
|
|
1007
|
-
|
|
1002
|
+
_setAggCodeProvider(i) {
|
|
1003
|
+
p = i;
|
|
1008
1004
|
},
|
|
1009
|
-
_genEventCode(...
|
|
1010
|
-
return
|
|
1005
|
+
_genEventCode(...i) {
|
|
1006
|
+
return _(...i);
|
|
1011
1007
|
},
|
|
1012
|
-
_setEventCodeProvider(
|
|
1013
|
-
|
|
1008
|
+
_setEventCodeProvider(i) {
|
|
1009
|
+
_ = i;
|
|
1014
1010
|
},
|
|
1015
|
-
_genReadModelCode(...
|
|
1016
|
-
return
|
|
1011
|
+
_genReadModelCode(...i) {
|
|
1012
|
+
return C(...i);
|
|
1017
1013
|
},
|
|
1018
|
-
_setReadModelCodeProvider(
|
|
1019
|
-
|
|
1014
|
+
_setReadModelCodeProvider(i) {
|
|
1015
|
+
C = i;
|
|
1020
1016
|
},
|
|
1021
|
-
_setCodeFileProvider(
|
|
1022
|
-
|
|
1017
|
+
_setCodeFileProvider(i) {
|
|
1018
|
+
m = i;
|
|
1023
1019
|
}
|
|
1024
1020
|
}
|
|
1025
1021
|
};
|
|
1026
1022
|
});
|
|
1027
1023
|
}
|
|
1028
|
-
const
|
|
1029
|
-
function
|
|
1030
|
-
if (!
|
|
1024
|
+
const le = St();
|
|
1025
|
+
function Ao(e) {
|
|
1026
|
+
if (!me) {
|
|
1031
1027
|
if (!e)
|
|
1032
1028
|
throw new Error("designer is required");
|
|
1033
|
-
|
|
1029
|
+
me = xt(e), le.registerAgg(me);
|
|
1034
1030
|
}
|
|
1035
|
-
return
|
|
1031
|
+
return me.api;
|
|
1036
1032
|
}
|
|
1037
1033
|
function Ee(e) {
|
|
1038
1034
|
return e && e._attributes && e._attributes.rule === "Info";
|
|
1039
1035
|
}
|
|
1040
|
-
function
|
|
1036
|
+
function Tt(e) {
|
|
1041
1037
|
return e && e._attributes && e._attributes.rule === "Agg";
|
|
1042
1038
|
}
|
|
1043
|
-
function
|
|
1039
|
+
function Dt(e) {
|
|
1044
1040
|
return e && e._attributes && e._attributes.rule === "Command";
|
|
1045
1041
|
}
|
|
1046
|
-
function
|
|
1042
|
+
function Pt(e) {
|
|
1047
1043
|
return e && e._attributes && e._attributes.rule === "FacadeCommand";
|
|
1048
1044
|
}
|
|
1049
1045
|
function Ft(e) {
|
|
@@ -1052,46 +1048,46 @@ function Ft(e) {
|
|
|
1052
1048
|
function Vt(e) {
|
|
1053
1049
|
return e && e._attributes && e._attributes.rule === "ReadModel";
|
|
1054
1050
|
}
|
|
1055
|
-
const
|
|
1051
|
+
const Ue = process.env.NODE_ENV !== "production" ? Object.freeze({}) : {};
|
|
1056
1052
|
process.env.NODE_ENV !== "production" && Object.freeze([]);
|
|
1057
1053
|
const Rt = () => {
|
|
1058
|
-
},
|
|
1059
|
-
(e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97),
|
|
1060
|
-
let
|
|
1061
|
-
const
|
|
1062
|
-
function
|
|
1063
|
-
if (
|
|
1054
|
+
}, Ht = (e) => e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && // uppercase letter
|
|
1055
|
+
(e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97), Ae = Object.assign, T = Array.isArray, G = (e) => typeof e == "function", L = (e) => typeof e == "string", Lt = (e) => typeof e == "symbol", B = (e) => e !== null && typeof e == "object";
|
|
1056
|
+
let ln;
|
|
1057
|
+
const Se = () => ln || (ln = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {});
|
|
1058
|
+
function tn(e) {
|
|
1059
|
+
if (T(e)) {
|
|
1064
1060
|
const n = {};
|
|
1065
1061
|
for (let t = 0; t < e.length; t++) {
|
|
1066
|
-
const
|
|
1067
|
-
if (
|
|
1068
|
-
for (const
|
|
1069
|
-
n[
|
|
1062
|
+
const r = e[t], o = L(r) ? Ut(r) : tn(r);
|
|
1063
|
+
if (o)
|
|
1064
|
+
for (const s in o)
|
|
1065
|
+
n[s] = o[s];
|
|
1070
1066
|
}
|
|
1071
1067
|
return n;
|
|
1072
|
-
} else if (
|
|
1068
|
+
} else if (L(e) || B(e))
|
|
1073
1069
|
return e;
|
|
1074
1070
|
}
|
|
1075
|
-
const Mt = /;(?![^(]*\))/g,
|
|
1076
|
-
function
|
|
1071
|
+
const Mt = /;(?![^(]*\))/g, Kt = /:([^]+)/, Bt = /\/\*[^]*?\*\//g;
|
|
1072
|
+
function Ut(e) {
|
|
1077
1073
|
const n = {};
|
|
1078
|
-
return e.replace(
|
|
1074
|
+
return e.replace(Bt, "").split(Mt).forEach((t) => {
|
|
1079
1075
|
if (t) {
|
|
1080
|
-
const
|
|
1081
|
-
|
|
1076
|
+
const r = t.split(Kt);
|
|
1077
|
+
r.length > 1 && (n[r[0].trim()] = r[1].trim());
|
|
1082
1078
|
}
|
|
1083
1079
|
}), n;
|
|
1084
1080
|
}
|
|
1085
|
-
function
|
|
1081
|
+
function on(e) {
|
|
1086
1082
|
let n = "";
|
|
1087
|
-
if (
|
|
1083
|
+
if (L(e))
|
|
1088
1084
|
n = e;
|
|
1089
|
-
else if (
|
|
1085
|
+
else if (T(e))
|
|
1090
1086
|
for (let t = 0; t < e.length; t++) {
|
|
1091
|
-
const
|
|
1092
|
-
|
|
1087
|
+
const r = on(e[t]);
|
|
1088
|
+
r && (n += r + " ");
|
|
1093
1089
|
}
|
|
1094
|
-
else if (
|
|
1090
|
+
else if (B(e))
|
|
1095
1091
|
for (const t in e)
|
|
1096
1092
|
e[t] && (n += t + " ");
|
|
1097
1093
|
return n.trim();
|
|
@@ -1106,25 +1102,25 @@ Symbol(
|
|
|
1106
1102
|
process.env.NODE_ENV !== "production" ? "Array iterate" : ""
|
|
1107
1103
|
);
|
|
1108
1104
|
new Set(
|
|
1109
|
-
/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((e) => e !== "arguments" && e !== "caller").map((e) => Symbol[e]).filter(
|
|
1105
|
+
/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((e) => e !== "arguments" && e !== "caller").map((e) => Symbol[e]).filter(Lt)
|
|
1110
1106
|
);
|
|
1111
1107
|
function En(e) {
|
|
1112
|
-
return
|
|
1108
|
+
return ze(e) ? En(e.__v_raw) : !!(e && e.__v_isReactive);
|
|
1113
1109
|
}
|
|
1114
|
-
function
|
|
1110
|
+
function ze(e) {
|
|
1115
1111
|
return !!(e && e.__v_isReadonly);
|
|
1116
1112
|
}
|
|
1117
|
-
function
|
|
1113
|
+
function ke(e) {
|
|
1118
1114
|
return !!(e && e.__v_isShallow);
|
|
1119
1115
|
}
|
|
1120
|
-
function
|
|
1116
|
+
function Ge(e) {
|
|
1121
1117
|
return e ? !!e.__v_raw : !1;
|
|
1122
1118
|
}
|
|
1123
|
-
function
|
|
1119
|
+
function U(e) {
|
|
1124
1120
|
const n = e && e.__v_raw;
|
|
1125
|
-
return n ?
|
|
1121
|
+
return n ? U(n) : e;
|
|
1126
1122
|
}
|
|
1127
|
-
function
|
|
1123
|
+
function sn(e) {
|
|
1128
1124
|
return e ? e.__v_isRef === !0 : !1;
|
|
1129
1125
|
}
|
|
1130
1126
|
/**
|
|
@@ -1133,44 +1129,44 @@ function on(e) {
|
|
|
1133
1129
|
* @license MIT
|
|
1134
1130
|
**/
|
|
1135
1131
|
const z = [];
|
|
1136
|
-
function
|
|
1132
|
+
function zt(e) {
|
|
1137
1133
|
z.push(e);
|
|
1138
1134
|
}
|
|
1139
|
-
function
|
|
1135
|
+
function Gt() {
|
|
1140
1136
|
z.pop();
|
|
1141
1137
|
}
|
|
1142
1138
|
let xe = !1;
|
|
1143
|
-
function
|
|
1139
|
+
function ie(e, ...n) {
|
|
1144
1140
|
if (xe) return;
|
|
1145
1141
|
xe = !0;
|
|
1146
|
-
const t = z.length ? z[z.length - 1].component : null,
|
|
1147
|
-
if (
|
|
1148
|
-
|
|
1149
|
-
|
|
1142
|
+
const t = z.length ? z[z.length - 1].component : null, r = t && t.appContext.config.warnHandler, o = Jt();
|
|
1143
|
+
if (r)
|
|
1144
|
+
rn(
|
|
1145
|
+
r,
|
|
1150
1146
|
t,
|
|
1151
1147
|
11,
|
|
1152
1148
|
[
|
|
1153
1149
|
// eslint-disable-next-line no-restricted-syntax
|
|
1154
|
-
e + n.map((
|
|
1155
|
-
var
|
|
1156
|
-
return (
|
|
1150
|
+
e + n.map((s) => {
|
|
1151
|
+
var p, _;
|
|
1152
|
+
return (_ = (p = s.toString) == null ? void 0 : p.call(s)) != null ? _ : JSON.stringify(s);
|
|
1157
1153
|
}).join(""),
|
|
1158
1154
|
t && t.proxy,
|
|
1159
|
-
|
|
1160
|
-
({ vnode:
|
|
1155
|
+
o.map(
|
|
1156
|
+
({ vnode: s }) => `at <${Ln(t, s.type)}>`
|
|
1161
1157
|
).join(`
|
|
1162
1158
|
`),
|
|
1163
|
-
|
|
1159
|
+
o
|
|
1164
1160
|
]
|
|
1165
1161
|
);
|
|
1166
1162
|
else {
|
|
1167
|
-
const
|
|
1168
|
-
|
|
1169
|
-
`, ...Wt(
|
|
1163
|
+
const s = [`[Vue warn]: ${e}`, ...n];
|
|
1164
|
+
o.length && s.push(`
|
|
1165
|
+
`, ...Wt(o));
|
|
1170
1166
|
}
|
|
1171
1167
|
xe = !1;
|
|
1172
1168
|
}
|
|
1173
|
-
function
|
|
1169
|
+
function Jt() {
|
|
1174
1170
|
let e = z[z.length - 1];
|
|
1175
1171
|
if (!e)
|
|
1176
1172
|
return [];
|
|
@@ -1181,36 +1177,36 @@ function Gt() {
|
|
|
1181
1177
|
vnode: e,
|
|
1182
1178
|
recurseCount: 0
|
|
1183
1179
|
});
|
|
1184
|
-
const
|
|
1185
|
-
e =
|
|
1180
|
+
const r = e.component && e.component.parent;
|
|
1181
|
+
e = r && r.vnode;
|
|
1186
1182
|
}
|
|
1187
1183
|
return n;
|
|
1188
1184
|
}
|
|
1189
1185
|
function Wt(e) {
|
|
1190
1186
|
const n = [];
|
|
1191
|
-
return e.forEach((t,
|
|
1192
|
-
n.push(...
|
|
1193
|
-
`], ...
|
|
1187
|
+
return e.forEach((t, r) => {
|
|
1188
|
+
n.push(...r === 0 ? [] : [`
|
|
1189
|
+
`], ...Yt(t));
|
|
1194
1190
|
}), n;
|
|
1195
1191
|
}
|
|
1196
|
-
function
|
|
1197
|
-
const t = n > 0 ? `... (${n} recursive calls)` : "",
|
|
1192
|
+
function Yt({ vnode: e, recurseCount: n }) {
|
|
1193
|
+
const t = n > 0 ? `... (${n} recursive calls)` : "", r = e.component ? e.component.parent == null : !1, o = ` at <${Ln(
|
|
1198
1194
|
e.component,
|
|
1199
1195
|
e.type,
|
|
1200
|
-
|
|
1201
|
-
)}`,
|
|
1202
|
-
return e.props ? [
|
|
1196
|
+
r
|
|
1197
|
+
)}`, s = ">" + t;
|
|
1198
|
+
return e.props ? [o, ...qt(e.props), s] : [o + s];
|
|
1203
1199
|
}
|
|
1204
|
-
function
|
|
1200
|
+
function qt(e) {
|
|
1205
1201
|
const n = [], t = Object.keys(e);
|
|
1206
|
-
return t.slice(0, 3).forEach((
|
|
1207
|
-
n.push(...
|
|
1202
|
+
return t.slice(0, 3).forEach((r) => {
|
|
1203
|
+
n.push(...An(r, e[r]));
|
|
1208
1204
|
}), t.length > 3 && n.push(" ..."), n;
|
|
1209
1205
|
}
|
|
1210
|
-
function
|
|
1211
|
-
return
|
|
1206
|
+
function An(e, n, t) {
|
|
1207
|
+
return L(n) ? (n = JSON.stringify(n), t ? n : [`${e}=${n}`]) : typeof n == "number" || typeof n == "boolean" || n == null ? t ? n : [`${e}=${n}`] : sn(n) ? (n = An(e, U(n.value), !0), t ? n : [`${e}=Ref<`, n, ">"]) : G(n) ? [`${e}=fn${n.name ? `<${n.name}>` : ""}`] : (n = U(n), t ? n : [`${e}=`, n]);
|
|
1212
1208
|
}
|
|
1213
|
-
const
|
|
1209
|
+
const Sn = {
|
|
1214
1210
|
sp: "serverPrefetch hook",
|
|
1215
1211
|
bc: "beforeCreate hook",
|
|
1216
1212
|
c: "created hook",
|
|
@@ -1243,80 +1239,80 @@ const jn = {
|
|
|
1243
1239
|
15: "component update",
|
|
1244
1240
|
16: "app unmount cleanup function"
|
|
1245
1241
|
};
|
|
1246
|
-
function
|
|
1242
|
+
function rn(e, n, t, r) {
|
|
1247
1243
|
try {
|
|
1248
|
-
return
|
|
1249
|
-
} catch (
|
|
1250
|
-
On(
|
|
1244
|
+
return r ? e(...r) : e();
|
|
1245
|
+
} catch (o) {
|
|
1246
|
+
On(o, n, t);
|
|
1251
1247
|
}
|
|
1252
1248
|
}
|
|
1253
|
-
function On(e, n, t,
|
|
1254
|
-
const
|
|
1249
|
+
function On(e, n, t, r = !0) {
|
|
1250
|
+
const o = n ? n.vnode : null, { errorHandler: s, throwUnhandledErrorInProduction: p } = n && n.appContext.config || Ue;
|
|
1255
1251
|
if (n) {
|
|
1256
|
-
let
|
|
1257
|
-
const
|
|
1258
|
-
for (;
|
|
1259
|
-
const
|
|
1260
|
-
if (
|
|
1261
|
-
for (let
|
|
1262
|
-
if (
|
|
1252
|
+
let _ = n.parent;
|
|
1253
|
+
const C = n.proxy, m = process.env.NODE_ENV !== "production" ? Sn[t] : `https://vuejs.org/error-reference/#runtime-${t}`;
|
|
1254
|
+
for (; _; ) {
|
|
1255
|
+
const i = _.ec;
|
|
1256
|
+
if (i) {
|
|
1257
|
+
for (let a = 0; a < i.length; a++)
|
|
1258
|
+
if (i[a](e, C, m) === !1)
|
|
1263
1259
|
return;
|
|
1264
1260
|
}
|
|
1265
|
-
|
|
1261
|
+
_ = _.parent;
|
|
1266
1262
|
}
|
|
1267
|
-
if (
|
|
1268
|
-
|
|
1263
|
+
if (s) {
|
|
1264
|
+
rn(s, null, 10, [
|
|
1269
1265
|
e,
|
|
1270
|
-
|
|
1271
|
-
|
|
1266
|
+
C,
|
|
1267
|
+
m
|
|
1272
1268
|
]);
|
|
1273
1269
|
return;
|
|
1274
1270
|
}
|
|
1275
1271
|
}
|
|
1276
|
-
Zt(e, t,
|
|
1272
|
+
Zt(e, t, o, r, p);
|
|
1277
1273
|
}
|
|
1278
|
-
function Zt(e, n, t,
|
|
1274
|
+
function Zt(e, n, t, r = !0, o = !1) {
|
|
1279
1275
|
if (process.env.NODE_ENV !== "production") {
|
|
1280
|
-
const
|
|
1281
|
-
if (t &&
|
|
1276
|
+
const s = Sn[n];
|
|
1277
|
+
if (t && zt(t), ie(`Unhandled error${s ? ` during execution of ${s}` : ""}`), t && Gt(), r)
|
|
1282
1278
|
throw e;
|
|
1283
|
-
} else if (
|
|
1279
|
+
} else if (o)
|
|
1284
1280
|
throw e;
|
|
1285
1281
|
}
|
|
1286
1282
|
const x = [];
|
|
1287
|
-
let
|
|
1288
|
-
const
|
|
1283
|
+
let P = -1;
|
|
1284
|
+
const Q = [];
|
|
1289
1285
|
let F = null, W = 0;
|
|
1290
|
-
const
|
|
1291
|
-
let
|
|
1286
|
+
const Qt = /* @__PURE__ */ Promise.resolve();
|
|
1287
|
+
let Je = null;
|
|
1292
1288
|
const Xt = 100;
|
|
1293
|
-
function
|
|
1294
|
-
let n =
|
|
1289
|
+
function eo(e) {
|
|
1290
|
+
let n = P + 1, t = x.length;
|
|
1295
1291
|
for (; n < t; ) {
|
|
1296
|
-
const
|
|
1297
|
-
|
|
1292
|
+
const r = n + t >>> 1, o = x[r], s = ce(o);
|
|
1293
|
+
s < e || s === e && o.flags & 2 ? n = r + 1 : t = r;
|
|
1298
1294
|
}
|
|
1299
1295
|
return n;
|
|
1300
1296
|
}
|
|
1301
|
-
function
|
|
1297
|
+
function no(e) {
|
|
1302
1298
|
if (!(e.flags & 1)) {
|
|
1303
|
-
const n =
|
|
1299
|
+
const n = ce(e), t = x[x.length - 1];
|
|
1304
1300
|
!t || // fast path when the job id is larger than the tail
|
|
1305
|
-
!(e.flags & 2) && n >=
|
|
1301
|
+
!(e.flags & 2) && n >= ce(t) ? x.push(e) : x.splice(eo(n), 0, e), e.flags |= 1, In();
|
|
1306
1302
|
}
|
|
1307
1303
|
}
|
|
1308
|
-
function
|
|
1309
|
-
|
|
1310
|
-
}
|
|
1311
|
-
function no(e) {
|
|
1312
|
-
D(e) ? q.push(...e) : F && e.id === -1 ? F.splice(W + 1, 0, e) : e.flags & 1 || (q.push(e), e.flags |= 1), An();
|
|
1304
|
+
function In() {
|
|
1305
|
+
Je || (Je = Qt.then(kn));
|
|
1313
1306
|
}
|
|
1314
1307
|
function to(e) {
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1308
|
+
T(e) ? Q.push(...e) : F && e.id === -1 ? F.splice(W + 1, 0, e) : e.flags & 1 || (Q.push(e), e.flags |= 1), In();
|
|
1309
|
+
}
|
|
1310
|
+
function oo(e) {
|
|
1311
|
+
if (Q.length) {
|
|
1312
|
+
const n = [...new Set(Q)].sort(
|
|
1313
|
+
(t, r) => ce(t) - ce(r)
|
|
1318
1314
|
);
|
|
1319
|
-
if (
|
|
1315
|
+
if (Q.length = 0, F) {
|
|
1320
1316
|
F.push(...n);
|
|
1321
1317
|
return;
|
|
1322
1318
|
}
|
|
@@ -1327,17 +1323,17 @@ function to(e) {
|
|
|
1327
1323
|
F = null, W = 0;
|
|
1328
1324
|
}
|
|
1329
1325
|
}
|
|
1330
|
-
const
|
|
1331
|
-
function
|
|
1326
|
+
const ce = (e) => e.id == null ? e.flags & 2 ? -1 : 1 / 0 : e.id;
|
|
1327
|
+
function kn(e) {
|
|
1332
1328
|
process.env.NODE_ENV !== "production" && (e = e || /* @__PURE__ */ new Map());
|
|
1333
1329
|
const n = process.env.NODE_ENV !== "production" ? (t) => xn(e, t) : Rt;
|
|
1334
1330
|
try {
|
|
1335
|
-
for (
|
|
1336
|
-
const t = x[
|
|
1331
|
+
for (P = 0; P < x.length; P++) {
|
|
1332
|
+
const t = x[P];
|
|
1337
1333
|
if (t && !(t.flags & 8)) {
|
|
1338
1334
|
if (process.env.NODE_ENV !== "production" && n(t))
|
|
1339
1335
|
continue;
|
|
1340
|
-
t.flags & 4 && (t.flags &= -2),
|
|
1336
|
+
t.flags & 4 && (t.flags &= -2), rn(
|
|
1341
1337
|
t,
|
|
1342
1338
|
t.i,
|
|
1343
1339
|
t.i ? 15 : 14
|
|
@@ -1345,69 +1341,69 @@ function In(e) {
|
|
|
1345
1341
|
}
|
|
1346
1342
|
}
|
|
1347
1343
|
} finally {
|
|
1348
|
-
for (;
|
|
1349
|
-
const t = x[
|
|
1344
|
+
for (; P < x.length; P++) {
|
|
1345
|
+
const t = x[P];
|
|
1350
1346
|
t && (t.flags &= -2);
|
|
1351
1347
|
}
|
|
1352
|
-
|
|
1348
|
+
P = -1, x.length = 0, oo(e), Je = null, (x.length || Q.length) && kn(e);
|
|
1353
1349
|
}
|
|
1354
1350
|
}
|
|
1355
1351
|
function xn(e, n) {
|
|
1356
1352
|
const t = e.get(n) || 0;
|
|
1357
1353
|
if (t > Xt) {
|
|
1358
|
-
const
|
|
1354
|
+
const r = n.i, o = r && Hn(r.type);
|
|
1359
1355
|
return On(
|
|
1360
|
-
`Maximum recursive updates exceeded${
|
|
1356
|
+
`Maximum recursive updates exceeded${o ? ` in component <${o}>` : ""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,
|
|
1361
1357
|
null,
|
|
1362
1358
|
10
|
|
1363
1359
|
), !0;
|
|
1364
1360
|
}
|
|
1365
1361
|
return e.set(n, t + 1), !1;
|
|
1366
1362
|
}
|
|
1367
|
-
const
|
|
1368
|
-
process.env.NODE_ENV !== "production" && (
|
|
1369
|
-
createRecord:
|
|
1370
|
-
rerender:
|
|
1371
|
-
reload:
|
|
1363
|
+
const Te = /* @__PURE__ */ new Map();
|
|
1364
|
+
process.env.NODE_ENV !== "production" && (Se().__VUE_HMR_RUNTIME__ = {
|
|
1365
|
+
createRecord: De(so),
|
|
1366
|
+
rerender: De(ro),
|
|
1367
|
+
reload: De(ao)
|
|
1372
1368
|
});
|
|
1373
|
-
const
|
|
1374
|
-
function
|
|
1375
|
-
return
|
|
1376
|
-
initialDef:
|
|
1369
|
+
const _e = /* @__PURE__ */ new Map();
|
|
1370
|
+
function so(e, n) {
|
|
1371
|
+
return _e.has(e) ? !1 : (_e.set(e, {
|
|
1372
|
+
initialDef: Ce(n),
|
|
1377
1373
|
instances: /* @__PURE__ */ new Set()
|
|
1378
1374
|
}), !0);
|
|
1379
1375
|
}
|
|
1380
|
-
function
|
|
1376
|
+
function Ce(e) {
|
|
1381
1377
|
return Mn(e) ? e.__vccOpts : e;
|
|
1382
1378
|
}
|
|
1383
|
-
function
|
|
1384
|
-
const t =
|
|
1385
|
-
t && (t.initialDef.render = n, [...t.instances].forEach((
|
|
1386
|
-
n && (
|
|
1379
|
+
function ro(e, n) {
|
|
1380
|
+
const t = _e.get(e);
|
|
1381
|
+
t && (t.initialDef.render = n, [...t.instances].forEach((r) => {
|
|
1382
|
+
n && (r.render = n, Ce(r.type).render = n), r.renderCache = [], r.update();
|
|
1387
1383
|
}));
|
|
1388
1384
|
}
|
|
1389
|
-
function
|
|
1390
|
-
const t =
|
|
1385
|
+
function ao(e, n) {
|
|
1386
|
+
const t = _e.get(e);
|
|
1391
1387
|
if (!t) return;
|
|
1392
|
-
n =
|
|
1393
|
-
const
|
|
1394
|
-
for (let
|
|
1395
|
-
const
|
|
1396
|
-
let
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
}) :
|
|
1400
|
-
}
|
|
1401
|
-
|
|
1402
|
-
|
|
1388
|
+
n = Ce(n), pn(t.initialDef, n);
|
|
1389
|
+
const r = [...t.instances];
|
|
1390
|
+
for (let o = 0; o < r.length; o++) {
|
|
1391
|
+
const s = r[o], p = Ce(s.type);
|
|
1392
|
+
let _ = Te.get(p);
|
|
1393
|
+
_ || (p !== t.initialDef && pn(p, n), Te.set(p, _ = /* @__PURE__ */ new Set())), _.add(s), s.appContext.propsCache.delete(s.type), s.appContext.emitsCache.delete(s.type), s.appContext.optionsCache.delete(s.type), s.ceReload ? (_.add(s), s.ceReload(n.styles), _.delete(s)) : s.parent ? no(() => {
|
|
1394
|
+
s.parent.update(), _.delete(s);
|
|
1395
|
+
}) : s.appContext.reload ? s.appContext.reload() : typeof window < "u" && window.location.reload(), s.root.ce && s !== s.root && s.root.ce._removeChildStyle(p);
|
|
1396
|
+
}
|
|
1397
|
+
to(() => {
|
|
1398
|
+
Te.clear();
|
|
1403
1399
|
});
|
|
1404
1400
|
}
|
|
1405
|
-
function
|
|
1406
|
-
|
|
1401
|
+
function pn(e, n) {
|
|
1402
|
+
Ae(e, n);
|
|
1407
1403
|
for (const t in e)
|
|
1408
1404
|
t !== "__file" && !(t in n) && delete e[t];
|
|
1409
1405
|
}
|
|
1410
|
-
function
|
|
1406
|
+
function De(e) {
|
|
1411
1407
|
return (n, t) => {
|
|
1412
1408
|
try {
|
|
1413
1409
|
return e(n, t);
|
|
@@ -1415,35 +1411,35 @@ function Pe(e) {
|
|
|
1415
1411
|
}
|
|
1416
1412
|
};
|
|
1417
1413
|
}
|
|
1418
|
-
let
|
|
1419
|
-
const
|
|
1420
|
-
function
|
|
1421
|
-
e.shapeFlag & 6 && e.component ? (e.transition = n,
|
|
1414
|
+
let $e = null, io = null;
|
|
1415
|
+
const co = (e) => e.__isTeleport;
|
|
1416
|
+
function Tn(e, n) {
|
|
1417
|
+
e.shapeFlag & 6 && e.component ? (e.transition = n, Tn(e.component.subTree, n)) : e.shapeFlag & 128 ? (e.ssContent.transition = n.clone(e.ssContent), e.ssFallback.transition = n.clone(e.ssFallback)) : e.transition = n;
|
|
1422
1418
|
}
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
const
|
|
1419
|
+
Se().requestIdleCallback;
|
|
1420
|
+
Se().cancelIdleCallback;
|
|
1421
|
+
const uo = Symbol.for("v-ndc");
|
|
1426
1422
|
process.env.NODE_ENV;
|
|
1427
|
-
const
|
|
1428
|
-
function
|
|
1423
|
+
const lo = {}, Dn = (e) => Object.getPrototypeOf(e) === lo, po = (e) => e.__isSuspense, Pn = Symbol.for("v-fgt"), mo = Symbol.for("v-txt"), fo = Symbol.for("v-cmt");
|
|
1424
|
+
function ho(e) {
|
|
1429
1425
|
return e ? e.__v_isVNode === !0 : !1;
|
|
1430
1426
|
}
|
|
1431
|
-
const
|
|
1427
|
+
const vo = (...e) => Vn(
|
|
1432
1428
|
...e
|
|
1433
|
-
), Fn = ({ key: e }) => e ?? null,
|
|
1429
|
+
), Fn = ({ key: e }) => e ?? null, he = ({
|
|
1434
1430
|
ref: e,
|
|
1435
1431
|
ref_key: n,
|
|
1436
1432
|
ref_for: t
|
|
1437
|
-
}) => (typeof e == "number" && (e = "" + e), e != null ?
|
|
1438
|
-
function go(e, n = null, t = null,
|
|
1439
|
-
const
|
|
1433
|
+
}) => (typeof e == "number" && (e = "" + e), e != null ? L(e) || sn(e) || G(e) ? { i: $e, r: e, k: n, f: !!t } : e : null);
|
|
1434
|
+
function go(e, n = null, t = null, r = 0, o = null, s = e === Pn ? 0 : 1, p = !1, _ = !1) {
|
|
1435
|
+
const C = {
|
|
1440
1436
|
__v_isVNode: !0,
|
|
1441
1437
|
__v_skip: !0,
|
|
1442
1438
|
type: e,
|
|
1443
1439
|
props: n,
|
|
1444
1440
|
key: n && Fn(n),
|
|
1445
|
-
ref: n &&
|
|
1446
|
-
scopeId:
|
|
1441
|
+
ref: n && he(n),
|
|
1442
|
+
scopeId: io,
|
|
1447
1443
|
slotScopeIds: null,
|
|
1448
1444
|
children: t,
|
|
1449
1445
|
component: null,
|
|
@@ -1458,33 +1454,33 @@ function go(e, n = null, t = null, o = 0, s = null, a = e === Tn ? 0 : 1, c = !1
|
|
|
1458
1454
|
targetStart: null,
|
|
1459
1455
|
targetAnchor: null,
|
|
1460
1456
|
staticCount: 0,
|
|
1461
|
-
shapeFlag:
|
|
1462
|
-
patchFlag:
|
|
1463
|
-
dynamicProps:
|
|
1457
|
+
shapeFlag: s,
|
|
1458
|
+
patchFlag: r,
|
|
1459
|
+
dynamicProps: o,
|
|
1464
1460
|
dynamicChildren: null,
|
|
1465
1461
|
appContext: null,
|
|
1466
|
-
ctx:
|
|
1462
|
+
ctx: $e
|
|
1467
1463
|
};
|
|
1468
|
-
return
|
|
1464
|
+
return _ ? (an(C, t), s & 128 && e.normalize(C)) : t && (C.shapeFlag |= L(t) ? 8 : 16), process.env.NODE_ENV !== "production" && C.key !== C.key && ie("VNode created with invalid key (NaN). VNode type:", C.type), C;
|
|
1469
1465
|
}
|
|
1470
|
-
const
|
|
1471
|
-
function Vn(e, n = null, t = null,
|
|
1472
|
-
if ((!e || e ===
|
|
1473
|
-
const
|
|
1466
|
+
const _o = process.env.NODE_ENV !== "production" ? vo : Vn;
|
|
1467
|
+
function Vn(e, n = null, t = null, r = 0, o = null, s = !1) {
|
|
1468
|
+
if ((!e || e === uo) && (process.env.NODE_ENV !== "production" && !e && ie(`Invalid vnode type when creating vnode: ${e}.`), e = fo), ho(e)) {
|
|
1469
|
+
const _ = be(
|
|
1474
1470
|
e,
|
|
1475
1471
|
n,
|
|
1476
1472
|
!0
|
|
1477
1473
|
/* mergeRef: true */
|
|
1478
1474
|
);
|
|
1479
|
-
return t &&
|
|
1475
|
+
return t && an(_, t), _.patchFlag = -2, _;
|
|
1480
1476
|
}
|
|
1481
1477
|
if (Mn(e) && (e = e.__vccOpts), n) {
|
|
1482
|
-
n =
|
|
1483
|
-
let { class:
|
|
1484
|
-
|
|
1478
|
+
n = Co(n);
|
|
1479
|
+
let { class: _, style: C } = n;
|
|
1480
|
+
_ && !L(_) && (n.class = on(_)), B(C) && (Ge(C) && !T(C) && (C = Ae({}, C)), n.style = tn(C));
|
|
1485
1481
|
}
|
|
1486
|
-
const
|
|
1487
|
-
return process.env.NODE_ENV !== "production" &&
|
|
1482
|
+
const p = L(e) ? 1 : po(e) ? 128 : co(e) ? 64 : B(e) ? 4 : G(e) ? 2 : 0;
|
|
1483
|
+
return process.env.NODE_ENV !== "production" && p & 4 && Ge(e) && (e = U(e), ie(
|
|
1488
1484
|
"Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`.",
|
|
1489
1485
|
`
|
|
1490
1486
|
Component that was made reactive: `,
|
|
@@ -1493,32 +1489,32 @@ Component that was made reactive: `,
|
|
|
1493
1489
|
e,
|
|
1494
1490
|
n,
|
|
1495
1491
|
t,
|
|
1492
|
+
r,
|
|
1496
1493
|
o,
|
|
1494
|
+
p,
|
|
1497
1495
|
s,
|
|
1498
|
-
c,
|
|
1499
|
-
a,
|
|
1500
1496
|
!0
|
|
1501
1497
|
);
|
|
1502
1498
|
}
|
|
1503
|
-
function
|
|
1504
|
-
return e ?
|
|
1499
|
+
function Co(e) {
|
|
1500
|
+
return e ? Ge(e) || Dn(e) ? Ae({}, e) : e : null;
|
|
1505
1501
|
}
|
|
1506
|
-
function
|
|
1507
|
-
const { props:
|
|
1502
|
+
function be(e, n, t = !1, r = !1) {
|
|
1503
|
+
const { props: o, ref: s, patchFlag: p, children: _, transition: C } = e, m = n ? bo(o || {}, n) : o, i = {
|
|
1508
1504
|
__v_isVNode: !0,
|
|
1509
1505
|
__v_skip: !0,
|
|
1510
1506
|
type: e.type,
|
|
1511
|
-
props:
|
|
1512
|
-
key:
|
|
1507
|
+
props: m,
|
|
1508
|
+
key: m && Fn(m),
|
|
1513
1509
|
ref: n && n.ref ? (
|
|
1514
1510
|
// #2078 in the case of <component :is="vnode" ref="extra"/>
|
|
1515
1511
|
// if the vnode itself already has a ref, cloneVNode will need to merge
|
|
1516
1512
|
// the refs so the single vnode can be set on multiple refs
|
|
1517
|
-
t &&
|
|
1518
|
-
) :
|
|
1513
|
+
t && s ? T(s) ? s.concat(he(n)) : [s, he(n)] : he(n)
|
|
1514
|
+
) : s,
|
|
1519
1515
|
scopeId: e.scopeId,
|
|
1520
1516
|
slotScopeIds: e.slotScopeIds,
|
|
1521
|
-
children: process.env.NODE_ENV !== "production" &&
|
|
1517
|
+
children: process.env.NODE_ENV !== "production" && p === -1 && T(_) ? _.map(Rn) : _,
|
|
1522
1518
|
target: e.target,
|
|
1523
1519
|
targetStart: e.targetStart,
|
|
1524
1520
|
targetAnchor: e.targetAnchor,
|
|
@@ -1528,75 +1524,75 @@ function $e(e, n, t = !1, o = !1) {
|
|
|
1528
1524
|
// existing patch flag to be reliable and need to add the FULL_PROPS flag.
|
|
1529
1525
|
// note: preserve flag for fragments since they use the flag for children
|
|
1530
1526
|
// fast paths only.
|
|
1531
|
-
patchFlag: n && e.type !==
|
|
1527
|
+
patchFlag: n && e.type !== Pn ? p === -1 ? 16 : p | 16 : p,
|
|
1532
1528
|
dynamicProps: e.dynamicProps,
|
|
1533
1529
|
dynamicChildren: e.dynamicChildren,
|
|
1534
1530
|
appContext: e.appContext,
|
|
1535
1531
|
dirs: e.dirs,
|
|
1536
|
-
transition:
|
|
1532
|
+
transition: C,
|
|
1537
1533
|
// These should technically only be non-null on mounted VNodes. However,
|
|
1538
1534
|
// they *should* be copied for kept-alive vnodes. So we just always copy
|
|
1539
1535
|
// them since them being non-null during a mount doesn't affect the logic as
|
|
1540
1536
|
// they will simply be overwritten.
|
|
1541
1537
|
component: e.component,
|
|
1542
1538
|
suspense: e.suspense,
|
|
1543
|
-
ssContent: e.ssContent &&
|
|
1544
|
-
ssFallback: e.ssFallback &&
|
|
1539
|
+
ssContent: e.ssContent && be(e.ssContent),
|
|
1540
|
+
ssFallback: e.ssFallback && be(e.ssFallback),
|
|
1545
1541
|
el: e.el,
|
|
1546
1542
|
anchor: e.anchor,
|
|
1547
1543
|
ctx: e.ctx,
|
|
1548
1544
|
ce: e.ce
|
|
1549
1545
|
};
|
|
1550
|
-
return
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
),
|
|
1546
|
+
return C && r && Tn(
|
|
1547
|
+
i,
|
|
1548
|
+
C.clone(i)
|
|
1549
|
+
), i;
|
|
1554
1550
|
}
|
|
1555
1551
|
function Rn(e) {
|
|
1556
|
-
const n =
|
|
1557
|
-
return
|
|
1552
|
+
const n = be(e);
|
|
1553
|
+
return T(e.children) && (n.children = e.children.map(Rn)), n;
|
|
1558
1554
|
}
|
|
1559
|
-
function
|
|
1560
|
-
return
|
|
1555
|
+
function $o(e = " ", n = 0) {
|
|
1556
|
+
return _o(mo, null, e, n);
|
|
1561
1557
|
}
|
|
1562
|
-
function
|
|
1558
|
+
function an(e, n) {
|
|
1563
1559
|
let t = 0;
|
|
1564
|
-
const { shapeFlag:
|
|
1560
|
+
const { shapeFlag: r } = e;
|
|
1565
1561
|
if (n == null)
|
|
1566
1562
|
n = null;
|
|
1567
|
-
else if (
|
|
1563
|
+
else if (T(n))
|
|
1568
1564
|
t = 16;
|
|
1569
1565
|
else if (typeof n == "object")
|
|
1570
|
-
if (
|
|
1571
|
-
const
|
|
1572
|
-
|
|
1566
|
+
if (r & 65) {
|
|
1567
|
+
const o = n.default;
|
|
1568
|
+
o && (o._c && (o._d = !1), an(e, o()), o._c && (o._d = !0));
|
|
1573
1569
|
return;
|
|
1574
1570
|
} else
|
|
1575
|
-
t = 32, !n._ && !
|
|
1576
|
-
else
|
|
1571
|
+
t = 32, !n._ && !Dn(n) && (n._ctx = $e);
|
|
1572
|
+
else G(n) ? (n = { default: n, _ctx: $e }, t = 32) : (n = String(n), r & 64 ? (t = 16, n = [$o(n)]) : t = 8);
|
|
1577
1573
|
e.children = n, e.shapeFlag |= t;
|
|
1578
1574
|
}
|
|
1579
|
-
function
|
|
1575
|
+
function bo(...e) {
|
|
1580
1576
|
const n = {};
|
|
1581
1577
|
for (let t = 0; t < e.length; t++) {
|
|
1582
|
-
const
|
|
1583
|
-
for (const
|
|
1584
|
-
if (
|
|
1585
|
-
n.class !==
|
|
1586
|
-
else if (
|
|
1587
|
-
n.style =
|
|
1588
|
-
else if (
|
|
1589
|
-
const
|
|
1590
|
-
|
|
1591
|
-
} else
|
|
1578
|
+
const r = e[t];
|
|
1579
|
+
for (const o in r)
|
|
1580
|
+
if (o === "class")
|
|
1581
|
+
n.class !== r.class && (n.class = on([n.class, r.class]));
|
|
1582
|
+
else if (o === "style")
|
|
1583
|
+
n.style = tn([n.style, r.style]);
|
|
1584
|
+
else if (Ht(o)) {
|
|
1585
|
+
const s = n[o], p = r[o];
|
|
1586
|
+
p && s !== p && !(T(s) && s.includes(p)) && (n[o] = s ? [].concat(s, p) : p);
|
|
1587
|
+
} else o !== "" && (n[o] = r[o]);
|
|
1592
1588
|
}
|
|
1593
1589
|
return n;
|
|
1594
1590
|
}
|
|
1595
1591
|
{
|
|
1596
|
-
const e =
|
|
1597
|
-
let
|
|
1598
|
-
return (
|
|
1599
|
-
|
|
1592
|
+
const e = Se(), n = (t, r) => {
|
|
1593
|
+
let o;
|
|
1594
|
+
return (o = e[t]) || (o = e[t] = []), o.push(r), (s) => {
|
|
1595
|
+
o.length > 1 ? o.forEach((p) => p(s)) : o[0](s);
|
|
1600
1596
|
};
|
|
1601
1597
|
};
|
|
1602
1598
|
n(
|
|
@@ -1608,94 +1604,94 @@ function $o(...e) {
|
|
|
1608
1604
|
);
|
|
1609
1605
|
}
|
|
1610
1606
|
process.env.NODE_ENV;
|
|
1611
|
-
const
|
|
1612
|
-
function
|
|
1613
|
-
return
|
|
1614
|
-
}
|
|
1615
|
-
function
|
|
1616
|
-
let
|
|
1617
|
-
if (!
|
|
1618
|
-
const
|
|
1619
|
-
|
|
1620
|
-
}
|
|
1621
|
-
if (!
|
|
1622
|
-
const
|
|
1623
|
-
for (const
|
|
1624
|
-
if (
|
|
1625
|
-
return
|
|
1607
|
+
const wo = /(?:^|[-_])(\w)/g, No = (e) => e.replace(wo, (n) => n.toUpperCase()).replace(/[-_]/g, "");
|
|
1608
|
+
function Hn(e, n = !0) {
|
|
1609
|
+
return G(e) ? e.displayName || e.name : e.name || n && e.__name;
|
|
1610
|
+
}
|
|
1611
|
+
function Ln(e, n, t = !1) {
|
|
1612
|
+
let r = Hn(n);
|
|
1613
|
+
if (!r && n.__file) {
|
|
1614
|
+
const o = n.__file.match(/([^/\\]+)\.\w+$/);
|
|
1615
|
+
o && (r = o[1]);
|
|
1616
|
+
}
|
|
1617
|
+
if (!r && e && e.parent) {
|
|
1618
|
+
const o = (s) => {
|
|
1619
|
+
for (const p in s)
|
|
1620
|
+
if (s[p] === n)
|
|
1621
|
+
return p;
|
|
1626
1622
|
};
|
|
1627
|
-
|
|
1623
|
+
r = o(
|
|
1628
1624
|
e.components || e.parent.type.components
|
|
1629
|
-
) ||
|
|
1625
|
+
) || o(e.appContext.components);
|
|
1630
1626
|
}
|
|
1631
|
-
return
|
|
1627
|
+
return r ? No(r) : t ? "App" : "Anonymous";
|
|
1632
1628
|
}
|
|
1633
1629
|
function Mn(e) {
|
|
1634
|
-
return
|
|
1630
|
+
return G(e) && "__vccOpts" in e;
|
|
1635
1631
|
}
|
|
1636
|
-
function
|
|
1632
|
+
function yo() {
|
|
1637
1633
|
if (process.env.NODE_ENV === "production" || typeof window > "u")
|
|
1638
1634
|
return;
|
|
1639
|
-
const e = { style: "color:#3ba776" }, n = { style: "color:#1677ff" }, t = { style: "color:#f5222d" },
|
|
1635
|
+
const e = { style: "color:#3ba776" }, n = { style: "color:#1677ff" }, t = { style: "color:#f5222d" }, r = { style: "color:#eb2f96" }, o = {
|
|
1640
1636
|
__vue_custom_formatter: !0,
|
|
1641
|
-
header(
|
|
1642
|
-
return
|
|
1637
|
+
header(a) {
|
|
1638
|
+
return B(a) ? a.__isVue ? ["div", e, "VueInstance"] : sn(a) ? [
|
|
1643
1639
|
"div",
|
|
1644
1640
|
{},
|
|
1645
|
-
["span", e,
|
|
1641
|
+
["span", e, i(a)],
|
|
1646
1642
|
"<",
|
|
1647
1643
|
// avoid debugger accessing value affecting behavior
|
|
1648
|
-
|
|
1644
|
+
_("_value" in a ? a._value : a),
|
|
1649
1645
|
">"
|
|
1650
|
-
] : En(
|
|
1646
|
+
] : En(a) ? [
|
|
1651
1647
|
"div",
|
|
1652
1648
|
{},
|
|
1653
|
-
["span", e,
|
|
1649
|
+
["span", e, ke(a) ? "ShallowReactive" : "Reactive"],
|
|
1654
1650
|
"<",
|
|
1655
|
-
|
|
1656
|
-
`>${
|
|
1657
|
-
] :
|
|
1651
|
+
_(a),
|
|
1652
|
+
`>${ze(a) ? " (readonly)" : ""}`
|
|
1653
|
+
] : ze(a) ? [
|
|
1658
1654
|
"div",
|
|
1659
1655
|
{},
|
|
1660
|
-
["span", e,
|
|
1656
|
+
["span", e, ke(a) ? "ShallowReadonly" : "Readonly"],
|
|
1661
1657
|
"<",
|
|
1662
|
-
|
|
1658
|
+
_(a),
|
|
1663
1659
|
">"
|
|
1664
1660
|
] : null : null;
|
|
1665
1661
|
},
|
|
1666
|
-
hasBody(
|
|
1667
|
-
return
|
|
1662
|
+
hasBody(a) {
|
|
1663
|
+
return a && a.__isVue;
|
|
1668
1664
|
},
|
|
1669
|
-
body(
|
|
1670
|
-
if (
|
|
1665
|
+
body(a) {
|
|
1666
|
+
if (a && a.__isVue)
|
|
1671
1667
|
return [
|
|
1672
1668
|
"div",
|
|
1673
1669
|
{},
|
|
1674
|
-
...a
|
|
1670
|
+
...s(a.$)
|
|
1675
1671
|
];
|
|
1676
1672
|
}
|
|
1677
1673
|
};
|
|
1678
|
-
function a
|
|
1674
|
+
function s(a) {
|
|
1679
1675
|
const l = [];
|
|
1680
|
-
|
|
1681
|
-
const
|
|
1682
|
-
|
|
1683
|
-
const
|
|
1684
|
-
return
|
|
1676
|
+
a.type.props && a.props && l.push(p("props", U(a.props))), a.setupState !== Ue && l.push(p("setup", a.setupState)), a.data !== Ue && l.push(p("data", U(a.data)));
|
|
1677
|
+
const f = C(a, "computed");
|
|
1678
|
+
f && l.push(p("computed", f));
|
|
1679
|
+
const b = C(a, "inject");
|
|
1680
|
+
return b && l.push(p("injected", b)), l.push([
|
|
1685
1681
|
"div",
|
|
1686
1682
|
{},
|
|
1687
1683
|
[
|
|
1688
1684
|
"span",
|
|
1689
1685
|
{
|
|
1690
|
-
style:
|
|
1686
|
+
style: r.style + ";opacity:0.66"
|
|
1691
1687
|
},
|
|
1692
1688
|
"$ (internal): "
|
|
1693
1689
|
],
|
|
1694
|
-
["object", { object:
|
|
1690
|
+
["object", { object: a }]
|
|
1695
1691
|
]), l;
|
|
1696
1692
|
}
|
|
1697
|
-
function
|
|
1698
|
-
return l =
|
|
1693
|
+
function p(a, l) {
|
|
1694
|
+
return l = Ae({}, l), Object.keys(l).length ? [
|
|
1699
1695
|
"div",
|
|
1700
1696
|
{ style: "line-height:1.25em;margin-bottom:0.6em" },
|
|
1701
1697
|
[
|
|
@@ -1703,43 +1699,43 @@ function No() {
|
|
|
1703
1699
|
{
|
|
1704
1700
|
style: "color:#476582"
|
|
1705
1701
|
},
|
|
1706
|
-
|
|
1702
|
+
a
|
|
1707
1703
|
],
|
|
1708
1704
|
[
|
|
1709
1705
|
"div",
|
|
1710
1706
|
{
|
|
1711
1707
|
style: "padding-left:1.25em"
|
|
1712
1708
|
},
|
|
1713
|
-
...Object.keys(l).map((
|
|
1709
|
+
...Object.keys(l).map((f) => [
|
|
1714
1710
|
"div",
|
|
1715
1711
|
{},
|
|
1716
|
-
["span",
|
|
1717
|
-
|
|
1712
|
+
["span", r, f + ": "],
|
|
1713
|
+
_(l[f], !1)
|
|
1718
1714
|
])
|
|
1719
1715
|
]
|
|
1720
1716
|
] : ["span", {}];
|
|
1721
1717
|
}
|
|
1722
|
-
function
|
|
1723
|
-
return typeof
|
|
1718
|
+
function _(a, l = !0) {
|
|
1719
|
+
return typeof a == "number" ? ["span", n, a] : typeof a == "string" ? ["span", t, JSON.stringify(a)] : typeof a == "boolean" ? ["span", r, a] : B(a) ? ["object", { object: l ? U(a) : a }] : ["span", t, String(a)];
|
|
1724
1720
|
}
|
|
1725
|
-
function
|
|
1726
|
-
const
|
|
1727
|
-
if (
|
|
1721
|
+
function C(a, l) {
|
|
1722
|
+
const f = a.type;
|
|
1723
|
+
if (G(f))
|
|
1728
1724
|
return;
|
|
1729
|
-
const
|
|
1730
|
-
for (const
|
|
1731
|
-
|
|
1732
|
-
return
|
|
1733
|
-
}
|
|
1734
|
-
function
|
|
1735
|
-
const
|
|
1736
|
-
if (
|
|
1725
|
+
const b = {};
|
|
1726
|
+
for (const g in a.ctx)
|
|
1727
|
+
m(f, g, l) && (b[g] = a.ctx[g]);
|
|
1728
|
+
return b;
|
|
1729
|
+
}
|
|
1730
|
+
function m(a, l, f) {
|
|
1731
|
+
const b = a[f];
|
|
1732
|
+
if (T(b) && b.includes(l) || B(b) && l in b || a.extends && m(a.extends, l, f) || a.mixins && a.mixins.some((g) => m(g, l, f)))
|
|
1737
1733
|
return !0;
|
|
1738
1734
|
}
|
|
1739
|
-
function
|
|
1740
|
-
return
|
|
1735
|
+
function i(a) {
|
|
1736
|
+
return ke(a) ? "ShallowRef" : a.effect ? "ComputedRef" : "Ref";
|
|
1741
1737
|
}
|
|
1742
|
-
window.devtoolsFormatters ? window.devtoolsFormatters.push(
|
|
1738
|
+
window.devtoolsFormatters ? window.devtoolsFormatters.push(o) : window.devtoolsFormatters = [o];
|
|
1743
1739
|
}
|
|
1744
1740
|
process.env.NODE_ENV;
|
|
1745
1741
|
process.env.NODE_ENV;
|
|
@@ -1749,15 +1745,15 @@ process.env.NODE_ENV;
|
|
|
1749
1745
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
1750
1746
|
* @license MIT
|
|
1751
1747
|
**/
|
|
1752
|
-
function
|
|
1753
|
-
|
|
1748
|
+
function jo() {
|
|
1749
|
+
yo();
|
|
1754
1750
|
}
|
|
1755
|
-
process.env.NODE_ENV !== "production" &&
|
|
1751
|
+
process.env.NODE_ENV !== "production" && jo();
|
|
1756
1752
|
function Eo(e) {
|
|
1757
|
-
return
|
|
1753
|
+
return Dt(e) || Pt(e) || Tt(e) || Ft(e) || Vt(e);
|
|
1758
1754
|
}
|
|
1759
|
-
var
|
|
1760
|
-
class
|
|
1755
|
+
var Kn = /* @__PURE__ */ ((e) => (e.Java = "java", e.Kotlin = "kotlin", e.CSharp = "csharp", e.Go = "go", e))(Kn || {});
|
|
1756
|
+
class S {
|
|
1761
1757
|
imports = /* @__PURE__ */ new Set();
|
|
1762
1758
|
parentDir;
|
|
1763
1759
|
name;
|
|
@@ -1798,869 +1794,1023 @@ class j {
|
|
|
1798
1794
|
this.parentDir = n;
|
|
1799
1795
|
}
|
|
1800
1796
|
}
|
|
1801
|
-
var
|
|
1797
|
+
var we;
|
|
1802
1798
|
((e) => {
|
|
1803
1799
|
((n) => {
|
|
1804
|
-
n.Lombok = "Lombok", n.LombokBuilder = "LombokBuilder", n.
|
|
1805
|
-
})(e.JavaGeneratorAddition || (e.JavaGeneratorAddition = {}))
|
|
1806
|
-
|
|
1807
|
-
|
|
1800
|
+
n.Lombok = "Lombok", n.LombokBuilder = "LombokBuilder", n.RecordValueObject = "RecordValueObject", n.CommandHandler = "CommandHandler", n.Jpa = "Jpa", n.Timezone = "Timezone", n.SpringFramework = "SpringFramework";
|
|
1801
|
+
})(e.JavaGeneratorAddition || (e.JavaGeneratorAddition = {})), ((n) => {
|
|
1802
|
+
n.TABLE = "TABLE", n.SEQUENCE = "SEQUENCE", n.IDENTITY = "IDENTITY", n.UUID = "UUID", n.AUTO = "AUTO";
|
|
1803
|
+
})(e.IdGenStrategy || (e.IdGenStrategy = {}));
|
|
1804
|
+
})(we || (we = {}));
|
|
1805
|
+
var Ne;
|
|
1808
1806
|
((e) => {
|
|
1809
1807
|
((n) => {
|
|
1810
1808
|
n.ValueClass = "ValueClass", n.CommandHandler = "CommandHandler", n.Timezone = "Timezone";
|
|
1811
1809
|
})(e.KotlinGeneratorAddition || (e.KotlinGeneratorAddition = {}));
|
|
1812
|
-
})(
|
|
1813
|
-
var
|
|
1810
|
+
})(Ne || (Ne = {}));
|
|
1811
|
+
var ye;
|
|
1814
1812
|
((e) => {
|
|
1815
1813
|
((n) => {
|
|
1816
1814
|
n.Timezone = "Timezone", n.RecordStruct = "RecordStruct", n.PrimaryConstructor = "PrimaryConstructor", n.CommandHandlerInterface = "CommandHandlerInterface", n.AggInterface = "AggInterface";
|
|
1817
1815
|
})(e.CSharpGeneratorAddition || (e.CSharpGeneratorAddition = {}));
|
|
1818
|
-
})(
|
|
1816
|
+
})(ye || (ye = {}));
|
|
1819
1817
|
var We;
|
|
1820
1818
|
((e) => {
|
|
1821
1819
|
((n) => {
|
|
1822
1820
|
n.SinglePackageEachDesigner = "SinglePackageEachDesigner";
|
|
1823
1821
|
})(e.GoGeneratorAddition || (e.GoGeneratorAddition = {}));
|
|
1824
1822
|
})(We || (We = {}));
|
|
1825
|
-
const
|
|
1823
|
+
const So = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1826
1824
|
__proto__: null,
|
|
1827
|
-
CodeFile:
|
|
1828
|
-
Language:
|
|
1825
|
+
CodeFile: S,
|
|
1826
|
+
Language: Kn,
|
|
1829
1827
|
get csharp() {
|
|
1830
|
-
return
|
|
1828
|
+
return ye;
|
|
1831
1829
|
},
|
|
1832
1830
|
get go() {
|
|
1833
1831
|
return We;
|
|
1834
1832
|
},
|
|
1835
1833
|
isStruct: Eo,
|
|
1836
1834
|
get java() {
|
|
1837
|
-
return
|
|
1835
|
+
return we;
|
|
1838
1836
|
},
|
|
1839
1837
|
get kotlin() {
|
|
1840
|
-
return
|
|
1838
|
+
return Ne;
|
|
1841
1839
|
}
|
|
1842
1840
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1843
1841
|
var N;
|
|
1844
1842
|
((e) => {
|
|
1845
|
-
function n(
|
|
1846
|
-
return
|
|
1843
|
+
function n(m) {
|
|
1844
|
+
return m.trim().split(m.includes("_") || m.includes("-") || m.includes(" ") ? /_|\s|-/ : /(?=[A-Z])/g).map((i) => i.charAt(0).toUpperCase() + i.toLowerCase().slice(1)).join("");
|
|
1847
1845
|
}
|
|
1848
1846
|
e.stringToUpperCamel = n;
|
|
1849
|
-
function t(
|
|
1850
|
-
let
|
|
1851
|
-
return
|
|
1847
|
+
function t(m) {
|
|
1848
|
+
let i = !0;
|
|
1849
|
+
return m.trim().split(m.includes("_") || m.includes("-") || m.includes(" ") ? /_|\s|-/ : /(?=[A-Z])/g).map((a) => i ? (i = !1, a.toLowerCase()) : a.charAt(0).toUpperCase() + a.toLowerCase().slice(1)).join("");
|
|
1852
1850
|
}
|
|
1853
1851
|
e.stringToLowerCamel = t;
|
|
1854
|
-
function
|
|
1855
|
-
return
|
|
1852
|
+
function r(m) {
|
|
1853
|
+
return m = m.trim(), m.includes("_") ? m.toLowerCase() : m.includes(" ") || m.includes("-") ? m.split(/\s|-/).join("_").toLowerCase() : s(m);
|
|
1856
1854
|
}
|
|
1857
|
-
e.stringToLowerSnake =
|
|
1858
|
-
function
|
|
1859
|
-
return
|
|
1855
|
+
e.stringToLowerSnake = r;
|
|
1856
|
+
function o(m) {
|
|
1857
|
+
return m.trim().split(/(?=[A-Z])/g).join("_").toUpperCase();
|
|
1860
1858
|
}
|
|
1861
|
-
e.camelToUpperSnake =
|
|
1862
|
-
function
|
|
1863
|
-
return
|
|
1859
|
+
e.camelToUpperSnake = o;
|
|
1860
|
+
function s(m) {
|
|
1861
|
+
return m.trim().split(/(?=[A-Z])/g).join("_").toLowerCase();
|
|
1864
1862
|
}
|
|
1865
|
-
e.camelToLowerSnake =
|
|
1866
|
-
function
|
|
1867
|
-
return
|
|
1863
|
+
e.camelToLowerSnake = s;
|
|
1864
|
+
function p(m) {
|
|
1865
|
+
return m.trim().split("_").map((i) => i.charAt(0).toUpperCase() + i.slice(1)).join("");
|
|
1868
1866
|
}
|
|
1869
|
-
e.snakeToUpperCamel =
|
|
1870
|
-
function
|
|
1871
|
-
return
|
|
1867
|
+
e.snakeToUpperCamel = p;
|
|
1868
|
+
function _(m) {
|
|
1869
|
+
return m.trim().charAt(0).toLowerCase() + m.slice(1);
|
|
1872
1870
|
}
|
|
1873
|
-
e.lowerFirst =
|
|
1874
|
-
function
|
|
1875
|
-
return
|
|
1871
|
+
e.lowerFirst = _;
|
|
1872
|
+
function C(m) {
|
|
1873
|
+
return m.trim().charAt(0).toUpperCase() + m.slice(1);
|
|
1876
1874
|
}
|
|
1877
|
-
e.upperFirst =
|
|
1875
|
+
e.upperFirst = C;
|
|
1878
1876
|
})(N || (N = {}));
|
|
1879
|
-
const
|
|
1880
|
-
const e = "value";
|
|
1881
|
-
function
|
|
1882
|
-
return N.stringToUpperCamel(
|
|
1877
|
+
const j = we.JavaGeneratorAddition, Oo = le.createHotSwapPlugin(() => {
|
|
1878
|
+
const e = "value", n = "command", t = "event";
|
|
1879
|
+
function r(o) {
|
|
1880
|
+
return N.stringToUpperCamel(o._attributes.name);
|
|
1883
1881
|
}
|
|
1884
1882
|
return {
|
|
1885
|
-
unmount({ api:
|
|
1886
|
-
|
|
1883
|
+
unmount({ api: o }) {
|
|
1884
|
+
o.commands.clearCaches(), o.commands._setCommandCodeProvider(() => []), o.commands._setFacadeCommandCodeProvider(() => []), o.commands._setAggCodeProvider(() => []), o.commands._setEventCodeProvider(() => []), o.commands._setReadModelCodeProvider(() => []), o.commands._setCodeFileProvider(() => []), o.commands.setContext({});
|
|
1887
1885
|
},
|
|
1888
|
-
mount({ api:
|
|
1889
|
-
const
|
|
1890
|
-
function a
|
|
1891
|
-
return !
|
|
1886
|
+
mount({ api: o }) {
|
|
1887
|
+
const s = o.states.context, p = o.states.designer.value._getContext().getDesignerOptions().ignoreValueObjects.map((a) => N.stringToLowerCamel(a));
|
|
1888
|
+
function _(a) {
|
|
1889
|
+
return !p.includes(N.stringToLowerCamel(a._attributes.name));
|
|
1892
1890
|
}
|
|
1893
|
-
function
|
|
1894
|
-
|
|
1891
|
+
function C(a, l) {
|
|
1892
|
+
if (_(l)) {
|
|
1893
|
+
const f = r(l);
|
|
1894
|
+
return a.add(`${s.value.namespace}.${s.value.moduleName}.${e}.${f}`), f;
|
|
1895
|
+
}
|
|
1896
|
+
return i(a, l);
|
|
1895
1897
|
}
|
|
1896
|
-
function
|
|
1897
|
-
for (const
|
|
1898
|
-
if (!
|
|
1899
|
-
|
|
1898
|
+
function m(a, l) {
|
|
1899
|
+
for (const f of l) {
|
|
1900
|
+
if (!_(f)) {
|
|
1901
|
+
i(a, f);
|
|
1900
1902
|
continue;
|
|
1901
1903
|
}
|
|
1902
|
-
|
|
1903
|
-
`${
|
|
1904
|
+
a.add(
|
|
1905
|
+
`${s.value.namespace}.${s.value.moduleName}.${e}.${r(f)}`
|
|
1904
1906
|
);
|
|
1905
1907
|
}
|
|
1906
1908
|
}
|
|
1907
|
-
function
|
|
1908
|
-
const
|
|
1909
|
-
return /\b(time|timestamp|date|deadline|expire)\b/.test(
|
|
1909
|
+
function i(a, l) {
|
|
1910
|
+
const f = s.value.additions, b = N.stringToLowerSnake(l._attributes.name).replace(/_/, " ");
|
|
1911
|
+
return /\b(time|timestamp|date|deadline|expire)\b/.test(b) ? f.has(j.Timezone) ? (a.add("java.time.OffsetDateTime"), "OffsetDateTime") : (a.add("java.time.LocalDateTime"), "LocalDateTime") : /\b(enum|gender|sex|count|amount|num|number|flag|times)\b/.test(b) ? "Integer" : /\b(price)$/.test(b) ? (a.add("java.math.BigDecimal"), "BigDecimal") : /^(if|is)\b/.test(b) ? "Boolean" : Ee(l) && (l._attributes.type === "Id" || l._attributes.type === "Version" || /\b(id|identifier|ver|version)$/.test(b)) ? "Long" : "String";
|
|
1910
1912
|
}
|
|
1911
|
-
|
|
1912
|
-
(
|
|
1913
|
-
const
|
|
1914
|
-
|
|
1915
|
-
const
|
|
1916
|
-
return
|
|
1913
|
+
o.commands._setInfoCodeProvider(
|
|
1914
|
+
(a) => {
|
|
1915
|
+
const l = /* @__PURE__ */ new Set();
|
|
1916
|
+
l.add(s.value.nonNullAnnotation);
|
|
1917
|
+
const f = s.value.nonNullAnnotation.split(".").pop(), b = r(a), g = s.value.additions, u = [];
|
|
1918
|
+
return g.has(j.RecordValueObject) ? (g.has(j.Jpa) && (l.add(
|
|
1919
|
+
s.value.jdkVersion === "8" ? "javax.persistence.Embeddable" : "jakarta.persistence.Embeddable"
|
|
1920
|
+
), u.push("@Embeddable")), u.push(`public record ${b}(@${f} ${i(l, a)} value) {`), u.push(` public ${b} {`), u.push(" // HACK check value"), u.push(" }"), u.push("}")) : g.has(j.Lombok) ? (u.push("@lombok.Getter"), g.has(j.Jpa) && (l.add(
|
|
1921
|
+
s.value.jdkVersion === "8" ? "javax.persistence.Embeddable" : "jakarta.persistence.Embeddable"
|
|
1922
|
+
), u.push("@Embeddable")), u.push(`public class ${b} {`), u.push(` private final ${i(l, a)} value;`), u.push(""), u.push(` public ${b} (@${f} ${i(l, a)} value) {`), u.push(" // HACK check value"), u.push(" this.value = value;"), u.push(" }"), u.push("}")) : (g.has(j.Jpa) && (l.add(
|
|
1923
|
+
s.value.jdkVersion === "8" ? "javax.persistence.Embeddable" : "jakarta.persistence.Embeddable"
|
|
1924
|
+
), u.push("@Embeddable")), u.push(`public class ${r(a)} {`), u.push(` private final ${i(l, a)} value;`), u.push(""), u.push(` public ${b} (@${f} ${i(l, a)} value) {`), u.push(" // HACK check value"), u.push(" this.value = value;"), u.push(" }"), u.push(""), u.push(` public ${i(l, a)} getValue() {`), u.push(" return this.value;"), u.push(" }"), u.push("}")), [
|
|
1917
1925
|
{
|
|
1918
1926
|
type: "Info",
|
|
1919
|
-
imports:
|
|
1920
|
-
content:
|
|
1927
|
+
imports: l,
|
|
1928
|
+
content: u.join(`
|
|
1921
1929
|
`)
|
|
1922
1930
|
}
|
|
1923
1931
|
];
|
|
1924
1932
|
}
|
|
1925
|
-
)
|
|
1926
|
-
|
|
1927
|
-
|
|
1933
|
+
), o.commands._setCommandCodeProvider(
|
|
1934
|
+
(a) => {
|
|
1935
|
+
const l = [], f = s.value.additions, b = s.value.nonNullAnnotation.split(".").pop();
|
|
1936
|
+
{
|
|
1937
|
+
const g = /* @__PURE__ */ new Set();
|
|
1938
|
+
g.add(s.value.nonNullAnnotation);
|
|
1939
|
+
const u = r(a), $ = [], v = Object.values(a.inner);
|
|
1940
|
+
if (m(g, v), f.has(j.RecordValueObject)) {
|
|
1941
|
+
f.has(j.LombokBuilder) && $.push("@lombok.Builder(toBuilder = true)"), $.push(`public record ${u}(`);
|
|
1942
|
+
const d = [];
|
|
1943
|
+
for (const w of v) {
|
|
1944
|
+
const c = r(w);
|
|
1945
|
+
d.push(
|
|
1946
|
+
` @${b}
|
|
1947
|
+
${C(
|
|
1948
|
+
g,
|
|
1949
|
+
w
|
|
1950
|
+
)} ${N.lowerFirst(c)}`
|
|
1951
|
+
);
|
|
1952
|
+
}
|
|
1953
|
+
$.push(d.join(`,
|
|
1954
|
+
`)), $.push(") {"), $.push(` public ${u} {`), $.push(" // HACK check value"), $.push(" }"), $.push("}");
|
|
1955
|
+
} else if (f.has(j.Lombok)) {
|
|
1956
|
+
$.push("@lombok.AllArgsConstructor"), $.push("@lombok.Getter"), f.has(j.LombokBuilder) && $.push("@lombok.Builder(toBuilder = true)"), $.push(`public class ${u} {`);
|
|
1957
|
+
for (const d of v) {
|
|
1958
|
+
const w = r(d);
|
|
1959
|
+
$.push(` @${b}`), $.push(
|
|
1960
|
+
` private final ${C(g, d)} ${N.lowerFirst(w)};`
|
|
1961
|
+
);
|
|
1962
|
+
}
|
|
1963
|
+
$.push("}");
|
|
1964
|
+
} else {
|
|
1965
|
+
$.push(`public class ${u} {`);
|
|
1966
|
+
for (const c of v) {
|
|
1967
|
+
const h = r(c);
|
|
1968
|
+
$.push(` @${b}`), $.push(
|
|
1969
|
+
` private final ${C(g, c)} ${N.lowerFirst(h)};`
|
|
1970
|
+
);
|
|
1971
|
+
}
|
|
1972
|
+
$.push("");
|
|
1973
|
+
const d = [], w = [];
|
|
1974
|
+
for (const c of v) {
|
|
1975
|
+
const h = r(c);
|
|
1976
|
+
d.push(
|
|
1977
|
+
`@${b} ${i(g, c)} ${N.lowerFirst(h)}`
|
|
1978
|
+
), w.push(`this.${N.lowerFirst(h)} = ${N.lowerFirst(h)};`);
|
|
1979
|
+
}
|
|
1980
|
+
$.push(` public ${u}(${d.join(", ")}) {`), $.push(` ${w.join(`
|
|
1981
|
+
`)}`), $.push(" }");
|
|
1982
|
+
for (const c of v) {
|
|
1983
|
+
const h = r(c);
|
|
1984
|
+
$.push(""), $.push(` public ${C(g, c)} get${h} () {`), $.push(` return this.${N.lowerFirst(h)};`), $.push(" }");
|
|
1985
|
+
}
|
|
1986
|
+
$.push("}");
|
|
1987
|
+
}
|
|
1988
|
+
l.push({
|
|
1989
|
+
type: "Command",
|
|
1990
|
+
imports: g,
|
|
1991
|
+
content: $.join(`
|
|
1992
|
+
`)
|
|
1993
|
+
});
|
|
1994
|
+
}
|
|
1995
|
+
if (!f.has(j.CommandHandler))
|
|
1996
|
+
return l;
|
|
1997
|
+
{
|
|
1998
|
+
const g = /* @__PURE__ */ new Set();
|
|
1999
|
+
g.add(s.value.nonNullAnnotation);
|
|
2000
|
+
const u = r(a), $ = [];
|
|
2001
|
+
f.has(j.SpringFramework) && (g.add("org.springframework.stereotype.Component"), $.push("@Component")), f.has(j.Lombok) && $.push("@lombok.RequiredArgsConstructor"), $.push(`public class ${u}Handler {`);
|
|
2002
|
+
const v = [...o.states.designer.value._getContext().getAssociationMap()[a._attributes.__id]].filter(
|
|
2003
|
+
(d) => d._attributes.rule === "Agg"
|
|
2004
|
+
);
|
|
2005
|
+
for (const d of v)
|
|
2006
|
+
g.add(`${s.value.namespace}.${s.value.moduleName}.${r(d)}`), $.push(` public ${r(d)} handle(@${b} ${u} command) {`), $.push(" // HACK Implement"), $.push(" }");
|
|
2007
|
+
$.push("}"), l.push({
|
|
2008
|
+
type: "CommandHandler",
|
|
2009
|
+
imports: g,
|
|
2010
|
+
content: $.join(`
|
|
2011
|
+
`)
|
|
2012
|
+
});
|
|
2013
|
+
}
|
|
2014
|
+
return l;
|
|
2015
|
+
}
|
|
2016
|
+
), o.commands._setFacadeCommandCodeProvider((a) => {
|
|
2017
|
+
const l = [], f = s.value.additions, b = s.value.nonNullAnnotation.split(".").pop();
|
|
1928
2018
|
{
|
|
1929
|
-
const
|
|
1930
|
-
|
|
1931
|
-
const
|
|
1932
|
-
if (g
|
|
1933
|
-
|
|
1934
|
-
const
|
|
1935
|
-
for (const
|
|
1936
|
-
const
|
|
1937
|
-
|
|
1938
|
-
` @${
|
|
1939
|
-
${
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
)} ${N.lowerFirst(
|
|
2019
|
+
const g = /* @__PURE__ */ new Set();
|
|
2020
|
+
g.add(s.value.nonNullAnnotation);
|
|
2021
|
+
const u = r(a), $ = [], v = Object.values(a.inner);
|
|
2022
|
+
if (m(g, v), f.has(j.RecordValueObject)) {
|
|
2023
|
+
f.has(j.LombokBuilder) && $.push("@lombok.Builder(toBuilder = true)"), $.push(`public record ${u}(`);
|
|
2024
|
+
const d = [];
|
|
2025
|
+
for (const w of v) {
|
|
2026
|
+
const c = r(w);
|
|
2027
|
+
d.push(
|
|
2028
|
+
` @${b}
|
|
2029
|
+
${C(
|
|
2030
|
+
g,
|
|
2031
|
+
w
|
|
2032
|
+
)} ${N.lowerFirst(c)}`
|
|
1943
2033
|
);
|
|
1944
2034
|
}
|
|
1945
|
-
|
|
1946
|
-
`)),
|
|
1947
|
-
} else if (
|
|
1948
|
-
|
|
1949
|
-
for (const
|
|
1950
|
-
const
|
|
1951
|
-
|
|
1952
|
-
` private final ${
|
|
2035
|
+
$.push(d.join(`,
|
|
2036
|
+
`)), $.push(") {"), $.push(` public ${u} {`), $.push(" // HACK check value"), $.push(" }"), $.push("}");
|
|
2037
|
+
} else if (f.has(j.Lombok)) {
|
|
2038
|
+
$.push("@lombok.AllArgsConstructor"), $.push("@lombok.Getter"), f.has(j.LombokBuilder) && $.push("@lombok.Builder(toBuilder = true)"), $.push(`public class ${u} {`);
|
|
2039
|
+
for (const d of v) {
|
|
2040
|
+
const w = r(d);
|
|
2041
|
+
$.push(` @${b}`), $.push(
|
|
2042
|
+
` private final ${C(g, d)} ${N.lowerFirst(w)};`
|
|
1953
2043
|
);
|
|
1954
2044
|
}
|
|
1955
|
-
|
|
2045
|
+
$.push("}");
|
|
1956
2046
|
} else {
|
|
1957
|
-
|
|
1958
|
-
for (const
|
|
1959
|
-
const
|
|
1960
|
-
|
|
1961
|
-
` private final ${
|
|
2047
|
+
$.push(`public class ${u} {`);
|
|
2048
|
+
for (const c of v) {
|
|
2049
|
+
const h = r(c);
|
|
2050
|
+
$.push(` @${b}`), $.push(
|
|
2051
|
+
` private final ${C(g, c)} ${N.lowerFirst(h)};`
|
|
1962
2052
|
);
|
|
1963
2053
|
}
|
|
1964
|
-
|
|
1965
|
-
const
|
|
1966
|
-
for (const
|
|
1967
|
-
const
|
|
1968
|
-
|
|
1969
|
-
`@${
|
|
1970
|
-
),
|
|
2054
|
+
$.push("");
|
|
2055
|
+
const d = [], w = [];
|
|
2056
|
+
for (const c of v) {
|
|
2057
|
+
const h = r(c);
|
|
2058
|
+
d.push(
|
|
2059
|
+
`@${b} ${i(g, c)} ${N.lowerFirst(h)}`
|
|
2060
|
+
), w.push(`this.${N.lowerFirst(h)} = ${N.lowerFirst(h)};`);
|
|
1971
2061
|
}
|
|
1972
|
-
|
|
1973
|
-
`)}`),
|
|
1974
|
-
for (const
|
|
1975
|
-
const
|
|
1976
|
-
|
|
2062
|
+
$.push(` public ${u}(${d.join(", ")}) {`), $.push(` ${w.join(`
|
|
2063
|
+
`)}`), $.push(" }");
|
|
2064
|
+
for (const c of v) {
|
|
2065
|
+
const h = r(c);
|
|
2066
|
+
$.push(""), $.push(` public ${C(g, c)} get${h} () {`), $.push(` return this.${N.lowerFirst(h)};`), $.push(" }");
|
|
1977
2067
|
}
|
|
1978
|
-
|
|
2068
|
+
$.push("}");
|
|
1979
2069
|
}
|
|
1980
|
-
|
|
1981
|
-
type: "
|
|
1982
|
-
imports:
|
|
1983
|
-
content:
|
|
2070
|
+
l.push({
|
|
2071
|
+
type: "FacadeCommand",
|
|
2072
|
+
imports: g,
|
|
2073
|
+
content: $.join(`
|
|
1984
2074
|
`)
|
|
1985
2075
|
});
|
|
1986
2076
|
}
|
|
1987
|
-
if (!
|
|
1988
|
-
return
|
|
2077
|
+
if (!f.has(j.CommandHandler))
|
|
2078
|
+
return l;
|
|
1989
2079
|
{
|
|
1990
|
-
const
|
|
1991
|
-
|
|
1992
|
-
const
|
|
1993
|
-
|
|
1994
|
-
const
|
|
1995
|
-
(
|
|
2080
|
+
const g = /* @__PURE__ */ new Set();
|
|
2081
|
+
g.add(s.value.nonNullAnnotation);
|
|
2082
|
+
const u = r(a), $ = [];
|
|
2083
|
+
f.has(j.SpringFramework) && (g.add("org.springframework.stereotype.Component"), $.push("@Component")), f.has(j.Lombok) && $.push("@lombok.RequiredArgsConstructor"), $.push(`public class ${u}Handler {`);
|
|
2084
|
+
const v = [...o.states.designer.value._getContext().getAssociationMap()[a._attributes.__id]].filter(
|
|
2085
|
+
(d) => d._attributes.rule === "Agg"
|
|
1996
2086
|
);
|
|
1997
|
-
for (const
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
type: "
|
|
2001
|
-
imports:
|
|
2002
|
-
content:
|
|
2087
|
+
for (const d of v)
|
|
2088
|
+
g.add(`${s.value.namespace}.${s.value.moduleName}.${r(d)}`), $.push(` public ${r(d)} handle(@${b} ${u} command) {`), $.push(" // HACK Implement"), $.push(" }");
|
|
2089
|
+
$.push("}"), l.push({
|
|
2090
|
+
type: "FacadeCommandHandler",
|
|
2091
|
+
imports: g,
|
|
2092
|
+
content: $.join(`
|
|
2003
2093
|
`)
|
|
2004
2094
|
});
|
|
2005
2095
|
}
|
|
2006
|
-
return
|
|
2007
|
-
}
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
const i = o.value.additions, l = t.states.designer.value, m = o.value.nonNullAnnotation.split(".").pop(), C = n(r), p = [];
|
|
2096
|
+
return l;
|
|
2097
|
+
}), o.commands._setAggCodeProvider(
|
|
2098
|
+
(a) => {
|
|
2099
|
+
const l = s.value.additions, f = o.states.designer.value, b = s.value.nonNullAnnotation.split(".").pop(), g = r(a), u = [], $ = Object.values(a.inner);
|
|
2011
2100
|
{
|
|
2012
|
-
const
|
|
2013
|
-
|
|
2014
|
-
const
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2101
|
+
const v = /* @__PURE__ */ new Set();
|
|
2102
|
+
v.add(s.value.nonNullAnnotation);
|
|
2103
|
+
const d = [];
|
|
2104
|
+
d.push(`public interface ${g} {`);
|
|
2105
|
+
for (const c of $) {
|
|
2106
|
+
const h = r(c);
|
|
2107
|
+
d.push(` public ${C(v, c)} get${h}();`), d.push("");
|
|
2018
2108
|
}
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2109
|
+
const w = [...f._getContext().getAssociationMap()[a._attributes.__id]].filter((c) => c._attributes.rule === "Command" || c._attributes.rule === "FacadeCommand");
|
|
2110
|
+
for (const c of w) {
|
|
2111
|
+
const h = r(c);
|
|
2112
|
+
v.add(`${s.value.namespace}.${s.value.moduleName}.${n}.${h}`), d.push(` public void handle${h}(@${b} ${h} command);`), d.push("");
|
|
2113
|
+
}
|
|
2114
|
+
d.push("}"), u.push({
|
|
2022
2115
|
type: "Agg",
|
|
2023
|
-
imports:
|
|
2024
|
-
content:
|
|
2116
|
+
imports: v,
|
|
2117
|
+
content: d.join(`
|
|
2025
2118
|
`)
|
|
2026
2119
|
});
|
|
2027
2120
|
}
|
|
2028
2121
|
{
|
|
2029
|
-
const
|
|
2030
|
-
|
|
2031
|
-
const
|
|
2032
|
-
if (
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2122
|
+
const v = /* @__PURE__ */ new Set();
|
|
2123
|
+
v.add(s.value.nonNullAnnotation);
|
|
2124
|
+
const d = [];
|
|
2125
|
+
if (m(v, $), l.has(j.Lombok)) {
|
|
2126
|
+
d.push(
|
|
2127
|
+
l.has(j.Jpa) ? "@lombok.NoArgsConstructor" : "@lombok.AllArgsConstructor"
|
|
2128
|
+
), d.push("@lombok.Getter"), l.has(j.Jpa) && (v.add(
|
|
2129
|
+
s.value.jdkVersion === "8" ? "javax.persistence.Entity" : "jakarta.persistence.Entity"
|
|
2130
|
+
), d.push("@Entity"), v.add(s.value.jdkVersion === "8" ? "javax.persistence.Table" : "jakarta.persistence.Table"), d.push(`@Table(name = "${N.camelToLowerSnake(g)}")`)), d.push(`public class ${g}Impl implements ${g} {`);
|
|
2131
|
+
for (const c of $) {
|
|
2132
|
+
const h = r(c);
|
|
2133
|
+
d.push(` @${b}`), l.has(j.Jpa) && (c._attributes.type === "Id" ? (v.add(
|
|
2134
|
+
s.value.jdkVersion === "8" ? "javax.persistence.EmbeddedId" : "jakarta.persistence.EmbeddedId"
|
|
2135
|
+
), d.push(" @EmbeddedId"), v.add(
|
|
2136
|
+
s.value.jdkVersion === "8" ? "javax.persistence.AttributeOverride" : "jakarta.persistence.AttributeOverride"
|
|
2137
|
+
), v.add(
|
|
2138
|
+
s.value.jdkVersion === "8" ? "javax.persistence.Column" : "jakarta.persistence.Column"
|
|
2139
|
+
), d.push(
|
|
2140
|
+
` @AttributeOverride(name = "value", column = @Column(name = "${N.camelToLowerSnake(
|
|
2141
|
+
h
|
|
2142
|
+
)}", updatable = false))`
|
|
2143
|
+
)) : _(c) ? (v.add(
|
|
2144
|
+
s.value.jdkVersion === "8" ? "javax.persistence.Embedded" : "jakarta.persistence.Embedded"
|
|
2145
|
+
), d.push(" @Embedded"), v.add(
|
|
2146
|
+
s.value.jdkVersion === "8" ? "javax.persistence.AttributeOverride" : "jakarta.persistence.AttributeOverride"
|
|
2147
|
+
), v.add(
|
|
2148
|
+
s.value.jdkVersion === "8" ? "javax.persistence.Column" : "jakarta.persistence.Column"
|
|
2149
|
+
), d.push(
|
|
2150
|
+
` @AttributeOverride(name = "value", column = @Column(name = "${N.camelToLowerSnake(
|
|
2151
|
+
h
|
|
2152
|
+
)}"))`
|
|
2153
|
+
)) : (v.add(
|
|
2154
|
+
s.value.jdkVersion === "8" ? "javax.persistence.Column" : "jakarta.persistence.Column"
|
|
2155
|
+
), d.push(` @Column(name = "${N.camelToLowerSnake(h)}")`))), d.push(` private ${C(v, c)} ${N.lowerFirst(h)};`);
|
|
2037
2156
|
}
|
|
2038
|
-
const
|
|
2039
|
-
for (const
|
|
2040
|
-
const
|
|
2041
|
-
|
|
2042
|
-
` public void handle${
|
|
2043
|
-
|
|
2157
|
+
const w = [...f._getContext().getAssociationMap()[a._attributes.__id]].filter((c) => c._attributes.rule === "Command" || c._attributes.rule === "FacadeCommand");
|
|
2158
|
+
for (const c of w) {
|
|
2159
|
+
const h = r(c);
|
|
2160
|
+
v.add(`${s.value.namespace}.${s.value.moduleName}.${n}.${h}`), d.push(""), d.push(
|
|
2161
|
+
` public void handle${h}(@${b} ${h} ${N.lowerFirst(
|
|
2162
|
+
h
|
|
2044
2163
|
)}) {`
|
|
2045
|
-
),
|
|
2164
|
+
), d.push(" // HACK need implement"), d.push(" }");
|
|
2046
2165
|
}
|
|
2047
|
-
|
|
2166
|
+
d.push("}");
|
|
2048
2167
|
} else {
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2168
|
+
l.has(j.Jpa) && (v.add(
|
|
2169
|
+
s.value.jdkVersion === "8" ? "javax.persistence.Entity" : "jakarta.persistence.Entity"
|
|
2170
|
+
), d.push("@Entity"), v.add(s.value.jdkVersion === "8" ? "javax.persistence.Table" : "jakarta.persistence.Table"), d.push(`@Table(name = "${N.camelToLowerSnake(g)}")`)), d.push(`public class ${g}Impl implements ${g} {`);
|
|
2171
|
+
for (const y of $) {
|
|
2172
|
+
const O = r(y);
|
|
2173
|
+
d.push(` @${b}`), l.has(j.Jpa) && (y._attributes.type === "Id" ? (v.add(
|
|
2174
|
+
s.value.jdkVersion === "8" ? "javax.persistence.EmbeddedId" : "jakarta.persistence.EmbeddedId"
|
|
2175
|
+
), d.push(" @EmbeddedId"), v.add(
|
|
2176
|
+
s.value.jdkVersion === "8" ? "javax.persistence.AttributeOverride" : "jakarta.persistence.AttributeOverride"
|
|
2177
|
+
), v.add(
|
|
2178
|
+
s.value.jdkVersion === "8" ? "javax.persistence.Column" : "jakarta.persistence.Column"
|
|
2179
|
+
), d.push(
|
|
2180
|
+
` @AttributeOverride(name = "value", column = @Column(name = "${N.camelToLowerSnake(
|
|
2181
|
+
O
|
|
2182
|
+
)}", updatable = false))`
|
|
2183
|
+
)) : _(y) ? (v.add(
|
|
2184
|
+
s.value.jdkVersion === "8" ? "javax.persistence.Embedded" : "jakarta.persistence.Embedded"
|
|
2185
|
+
), d.push(" @Embedded"), v.add(
|
|
2186
|
+
s.value.jdkVersion === "8" ? "javax.persistence.AttributeOverride" : "jakarta.persistence.AttributeOverride"
|
|
2187
|
+
), v.add(
|
|
2188
|
+
s.value.jdkVersion === "8" ? "javax.persistence.Column" : "jakarta.persistence.Column"
|
|
2189
|
+
), d.push(
|
|
2190
|
+
` @AttributeOverride(name = "value", column = @Column(name = "${N.camelToLowerSnake(
|
|
2191
|
+
O
|
|
2192
|
+
)}"))`
|
|
2193
|
+
)) : (v.add(
|
|
2194
|
+
s.value.jdkVersion === "8" ? "javax.persistence.Column" : "jakarta.persistence.Column"
|
|
2195
|
+
), d.push(` @Column(name = "${N.camelToLowerSnake(O)}")`))), d.push(` private ${C(v, y)} ${N.lowerFirst(O)};`);
|
|
2053
2196
|
}
|
|
2054
|
-
|
|
2055
|
-
const
|
|
2056
|
-
for (const
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2197
|
+
d.push("");
|
|
2198
|
+
const w = [], c = [];
|
|
2199
|
+
for (const y of $) {
|
|
2200
|
+
if (l.has(j.Jpa))
|
|
2201
|
+
break;
|
|
2202
|
+
const O = r(y);
|
|
2203
|
+
w.push(
|
|
2204
|
+
`@${b} ${C(v, y)} ${N.lowerFirst(O)}`
|
|
2205
|
+
), c.push(`this.${N.lowerFirst(O)} = ${N.lowerFirst(O)};`);
|
|
2061
2206
|
}
|
|
2062
|
-
|
|
2063
|
-
`)}`),
|
|
2064
|
-
for (const
|
|
2065
|
-
const
|
|
2066
|
-
|
|
2207
|
+
d.push(` public ${g}Impl(${w.join(", ")}) {`), d.push(` ${c.join(`
|
|
2208
|
+
`)}`), d.push(" }");
|
|
2209
|
+
for (const y of $) {
|
|
2210
|
+
const O = r(y);
|
|
2211
|
+
d.push(""), d.push(` @${b}`), d.push(` public ${C(v, y)} get${O}() {`), d.push(` return this.${N.lowerFirst(O)};`), d.push(" }");
|
|
2067
2212
|
}
|
|
2068
|
-
const
|
|
2069
|
-
(
|
|
2213
|
+
const h = [...f._getContext().getAssociationMap()[a._attributes.__id]].filter(
|
|
2214
|
+
(y) => y._attributes.rule === "Command" || y._attributes.rule === "FacadeCommand"
|
|
2070
2215
|
);
|
|
2071
|
-
for (const
|
|
2072
|
-
const
|
|
2073
|
-
|
|
2074
|
-
` public void handle${
|
|
2075
|
-
|
|
2216
|
+
for (const y of h) {
|
|
2217
|
+
const O = r(y);
|
|
2218
|
+
v.add(`${s.value.namespace}.${s.value.moduleName}.${n}.${O}`), d.push(""), d.push(
|
|
2219
|
+
` public void handle${O}(@${b} ${O} ${N.lowerFirst(
|
|
2220
|
+
O
|
|
2076
2221
|
)}) {`
|
|
2077
|
-
),
|
|
2222
|
+
), d.push(" // HACK need implement"), d.push(" }");
|
|
2078
2223
|
}
|
|
2079
|
-
|
|
2224
|
+
d.push("}");
|
|
2080
2225
|
}
|
|
2081
|
-
|
|
2226
|
+
u.push({
|
|
2082
2227
|
type: "AggImpl",
|
|
2083
|
-
imports:
|
|
2084
|
-
content:
|
|
2228
|
+
imports: v,
|
|
2229
|
+
content: d.join(`
|
|
2085
2230
|
`)
|
|
2086
2231
|
});
|
|
2087
2232
|
}
|
|
2088
|
-
return
|
|
2233
|
+
return u;
|
|
2089
2234
|
}
|
|
2090
|
-
),
|
|
2091
|
-
(
|
|
2092
|
-
const
|
|
2093
|
-
|
|
2094
|
-
const
|
|
2095
|
-
if (
|
|
2096
|
-
|
|
2097
|
-
const
|
|
2098
|
-
for (const
|
|
2099
|
-
const
|
|
2100
|
-
|
|
2101
|
-
` @${
|
|
2102
|
-
${
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
)} ${N.lowerFirst(
|
|
2235
|
+
), o.commands._setEventCodeProvider(
|
|
2236
|
+
(a) => {
|
|
2237
|
+
const l = /* @__PURE__ */ new Set();
|
|
2238
|
+
l.add(s.value.nonNullAnnotation);
|
|
2239
|
+
const f = s.value.nonNullAnnotation.split(".").pop(), b = s.value.additions, g = r(a), u = [], $ = Object.values(a.inner);
|
|
2240
|
+
if (m(l, $), b.has(j.RecordValueObject)) {
|
|
2241
|
+
b.has(j.LombokBuilder) && u.push("@lombok.Builder(toBuilder = true)"), u.push(`public record ${g}(`);
|
|
2242
|
+
const v = [];
|
|
2243
|
+
for (const d of $) {
|
|
2244
|
+
const w = r(d);
|
|
2245
|
+
v.push(
|
|
2246
|
+
` @${f}
|
|
2247
|
+
${C(
|
|
2248
|
+
l,
|
|
2249
|
+
d
|
|
2250
|
+
)} ${N.lowerFirst(w)}`
|
|
2106
2251
|
);
|
|
2107
2252
|
}
|
|
2108
|
-
|
|
2109
|
-
`)),
|
|
2110
|
-
} else if (
|
|
2111
|
-
|
|
2112
|
-
for (const
|
|
2113
|
-
const
|
|
2114
|
-
|
|
2115
|
-
` private final ${
|
|
2253
|
+
u.push(v.join(`,
|
|
2254
|
+
`)), u.push(") {"), u.push(` public ${g} {`), u.push(" // HACK check value"), u.push(" }"), u.push("}");
|
|
2255
|
+
} else if (b.has(j.Lombok)) {
|
|
2256
|
+
u.push("@lombok.AllArgsConstructor"), u.push("@lombok.Getter"), b.has(j.LombokBuilder) && u.push("@lombok.Builder(toBuilder = true)"), u.push(`public class ${g} {`);
|
|
2257
|
+
for (const v of $) {
|
|
2258
|
+
const d = r(v);
|
|
2259
|
+
u.push(` @${f}`), u.push(
|
|
2260
|
+
` private final ${C(l, v)} ${N.lowerFirst(d)};`
|
|
2116
2261
|
);
|
|
2117
2262
|
}
|
|
2118
|
-
|
|
2263
|
+
u.push("}");
|
|
2119
2264
|
} else {
|
|
2120
|
-
|
|
2121
|
-
for (const
|
|
2122
|
-
const
|
|
2123
|
-
|
|
2265
|
+
u.push(`public class ${g} {`);
|
|
2266
|
+
for (const w of $) {
|
|
2267
|
+
const c = r(w);
|
|
2268
|
+
u.push(` @${f}`), u.push(` private final ${c} ${N.lowerFirst(c)};`);
|
|
2124
2269
|
}
|
|
2125
|
-
|
|
2126
|
-
const
|
|
2127
|
-
for (const
|
|
2128
|
-
const
|
|
2129
|
-
|
|
2130
|
-
`@${
|
|
2131
|
-
),
|
|
2270
|
+
u.push("");
|
|
2271
|
+
const v = [], d = [];
|
|
2272
|
+
for (const w of $) {
|
|
2273
|
+
const c = r(w);
|
|
2274
|
+
v.push(
|
|
2275
|
+
`@${f} ${i(l, w)} ${N.lowerFirst(c)}`
|
|
2276
|
+
), d.push(`this.${N.lowerFirst(c)} = ${N.lowerFirst(c)};`);
|
|
2132
2277
|
}
|
|
2133
|
-
|
|
2134
|
-
`)}`),
|
|
2135
|
-
for (const
|
|
2136
|
-
const
|
|
2137
|
-
|
|
2278
|
+
u.push(` public ${g}(${v.join(", ")}) {`), u.push(` ${d.join(`
|
|
2279
|
+
`)}`), u.push(" }");
|
|
2280
|
+
for (const w of $) {
|
|
2281
|
+
const c = r(w);
|
|
2282
|
+
u.push(""), u.push(` public ${c} get${c} () {`), u.push(` return this.${N.lowerFirst(c)};`), u.push(" }");
|
|
2138
2283
|
}
|
|
2139
|
-
|
|
2284
|
+
u.push("}");
|
|
2140
2285
|
}
|
|
2141
2286
|
return [
|
|
2142
2287
|
{
|
|
2143
2288
|
type: "Event",
|
|
2144
|
-
imports:
|
|
2145
|
-
content:
|
|
2289
|
+
imports: l,
|
|
2290
|
+
content: u.join(`
|
|
2146
2291
|
`)
|
|
2147
2292
|
}
|
|
2148
2293
|
];
|
|
2149
2294
|
}
|
|
2150
|
-
),
|
|
2151
|
-
const
|
|
2152
|
-
function
|
|
2153
|
-
for (const
|
|
2154
|
-
if (!
|
|
2295
|
+
), o.commands._setReadModelCodeProvider(() => []), o.commands._setCodeFileProvider(() => {
|
|
2296
|
+
const a = [], l = {};
|
|
2297
|
+
function f(v) {
|
|
2298
|
+
for (const d of Object.values(v)) {
|
|
2299
|
+
if (!_(d))
|
|
2155
2300
|
continue;
|
|
2156
|
-
const
|
|
2157
|
-
if (
|
|
2301
|
+
const w = [...s.value.namespace.split(/\./), s.value.moduleName, e], c = r(d) + ".java";
|
|
2302
|
+
if (l[`${w.join("/")}/${c}`] === !0)
|
|
2158
2303
|
continue;
|
|
2159
|
-
const
|
|
2160
|
-
if (
|
|
2304
|
+
const h = o.commands._genInfoCode(d);
|
|
2305
|
+
if (h.length === 0)
|
|
2161
2306
|
continue;
|
|
2162
|
-
const
|
|
2163
|
-
|
|
2164
|
-
for (const
|
|
2165
|
-
|
|
2166
|
-
|
|
2307
|
+
const y = new S(w, c);
|
|
2308
|
+
y.appendContentln(`package ${s.value.namespace}.${s.value.moduleName}.${e};`), y.appendContentln("");
|
|
2309
|
+
for (const O of h[0].imports)
|
|
2310
|
+
y.appendContentln(`import ${O};`);
|
|
2311
|
+
y.appendContentln(""), y.appendContentln(h[0].content), a.push(y), l[`${w.join("/")}/${c}`] = !0;
|
|
2167
2312
|
}
|
|
2168
2313
|
}
|
|
2169
|
-
const
|
|
2170
|
-
for (const
|
|
2171
|
-
|
|
2172
|
-
const
|
|
2173
|
-
|
|
2174
|
-
if (
|
|
2175
|
-
const
|
|
2176
|
-
|
|
2177
|
-
for (const
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
} else if (
|
|
2181
|
-
const
|
|
2182
|
-
|
|
2183
|
-
for (const
|
|
2184
|
-
|
|
2185
|
-
|
|
2314
|
+
const b = o.states.designer.value._getContext().getCommands();
|
|
2315
|
+
for (const v of b) {
|
|
2316
|
+
f(v.inner);
|
|
2317
|
+
const d = o.commands._genCommandCode(v), w = [...s.value.namespace.split(/\./), s.value.moduleName, n];
|
|
2318
|
+
d.forEach((c) => {
|
|
2319
|
+
if (c.type === "Command") {
|
|
2320
|
+
const h = new S(w, r(v) + ".java");
|
|
2321
|
+
h.appendContentln(`package ${s.value.namespace}.${s.value.moduleName}.${n};`), h.appendContentln(""), h.addImports(c.imports);
|
|
2322
|
+
for (const y of c.imports)
|
|
2323
|
+
h.appendContentln(`import ${y};`);
|
|
2324
|
+
h.appendContentln(""), h.appendContentln(c.content), a.push(h);
|
|
2325
|
+
} else if (c.type === "CommandHandler") {
|
|
2326
|
+
const h = new S(w, r(v) + "Handler.java");
|
|
2327
|
+
h.appendContentln(`package ${s.value.namespace}.${s.value.moduleName}.${n};`), h.appendContentln(""), h.addImports(c.imports);
|
|
2328
|
+
for (const y of c.imports)
|
|
2329
|
+
h.appendContentln(`import ${y};`);
|
|
2330
|
+
h.appendContentln(""), h.appendContentln(c.content), a.push(h);
|
|
2186
2331
|
} else
|
|
2187
|
-
isNever(
|
|
2332
|
+
isNever(c.type);
|
|
2188
2333
|
});
|
|
2189
2334
|
}
|
|
2190
|
-
const
|
|
2191
|
-
for (const
|
|
2192
|
-
|
|
2193
|
-
const
|
|
2194
|
-
|
|
2195
|
-
if (
|
|
2196
|
-
const
|
|
2197
|
-
|
|
2198
|
-
for (const
|
|
2199
|
-
|
|
2200
|
-
|
|
2335
|
+
const g = o.states.designer.value._getContext().getFacadeCommands();
|
|
2336
|
+
for (const v of g) {
|
|
2337
|
+
f(v.inner);
|
|
2338
|
+
const d = o.commands._genFacadeCommandCode(v), w = [...s.value.namespace.split(/\./), s.value.moduleName, n];
|
|
2339
|
+
d.forEach((c) => {
|
|
2340
|
+
if (c.type === "FacadeCommand") {
|
|
2341
|
+
const h = new S(w, r(v) + ".java");
|
|
2342
|
+
h.appendContentln(`package ${s.value.namespace}.${s.value.moduleName}.${n};`), h.appendContentln(""), h.addImports(c.imports);
|
|
2343
|
+
for (const y of c.imports)
|
|
2344
|
+
h.appendContentln(`import ${y};`);
|
|
2345
|
+
h.appendContentln(""), h.appendContentln(c.content), a.push(h);
|
|
2346
|
+
} else if (c.type === "FacadeCommandHandler") {
|
|
2347
|
+
const h = new S(w, r(v) + "Handler.java");
|
|
2348
|
+
h.appendContentln(`package ${s.value.namespace}.${s.value.moduleName}.${n};`), h.appendContentln(""), h.addImports(c.imports);
|
|
2349
|
+
for (const y of c.imports)
|
|
2350
|
+
h.appendContentln(`import ${y};`);
|
|
2351
|
+
h.appendContentln(""), h.appendContentln(c.content), a.push(h);
|
|
2201
2352
|
} else
|
|
2202
|
-
isNever(
|
|
2353
|
+
isNever(c.type);
|
|
2203
2354
|
});
|
|
2204
2355
|
}
|
|
2205
|
-
const
|
|
2206
|
-
for (const
|
|
2207
|
-
|
|
2208
|
-
const
|
|
2209
|
-
|
|
2210
|
-
if (
|
|
2211
|
-
const
|
|
2212
|
-
|
|
2213
|
-
for (const
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
} else if (
|
|
2217
|
-
const
|
|
2218
|
-
|
|
2219
|
-
for (const
|
|
2220
|
-
|
|
2221
|
-
|
|
2356
|
+
const u = o.states.designer.value._getContext().getAggs();
|
|
2357
|
+
for (const v of u) {
|
|
2358
|
+
f(v.inner);
|
|
2359
|
+
const d = o.commands._genAggCode(v), w = [...s.value.namespace.split(/\./), s.value.moduleName];
|
|
2360
|
+
d.forEach((c) => {
|
|
2361
|
+
if (c.type === "Agg") {
|
|
2362
|
+
const h = new S(w, r(v) + ".java");
|
|
2363
|
+
h.appendContentln(`package ${s.value.namespace}.${s.value.moduleName};`), h.appendContentln(""), h.addImports(c.imports);
|
|
2364
|
+
for (const y of c.imports)
|
|
2365
|
+
h.appendContentln(`import ${y};`);
|
|
2366
|
+
h.appendContentln(""), h.appendContentln(c.content), a.push(h);
|
|
2367
|
+
} else if (c.type === "AggImpl") {
|
|
2368
|
+
const h = new S(w, r(v) + "Impl.java");
|
|
2369
|
+
h.appendContentln(`package ${s.value.namespace}.${s.value.moduleName};`), h.appendContentln(""), h.addImports(c.imports);
|
|
2370
|
+
for (const y of c.imports)
|
|
2371
|
+
h.appendContentln(`import ${y};`);
|
|
2372
|
+
h.appendContentln(""), h.appendContentln(c.content), a.push(h);
|
|
2222
2373
|
} else
|
|
2223
|
-
isNever(
|
|
2374
|
+
isNever(c.type);
|
|
2224
2375
|
});
|
|
2225
2376
|
}
|
|
2226
|
-
const
|
|
2227
|
-
for (const
|
|
2228
|
-
|
|
2229
|
-
const
|
|
2230
|
-
|
|
2231
|
-
const
|
|
2232
|
-
|
|
2233
|
-
for (const
|
|
2234
|
-
|
|
2235
|
-
|
|
2377
|
+
const $ = o.states.designer.value._getContext().getEvents();
|
|
2378
|
+
for (const v of $) {
|
|
2379
|
+
f(v.inner);
|
|
2380
|
+
const d = o.commands._genEventCode(v), w = [...s.value.namespace.split(/\./), s.value.moduleName, t];
|
|
2381
|
+
d.forEach((c) => {
|
|
2382
|
+
const h = new S(w, r(v) + ".java");
|
|
2383
|
+
h.appendContentln(`package ${s.value.namespace}.${s.value.moduleName}.${t};`), h.appendContentln(""), h.addImports(c.imports);
|
|
2384
|
+
for (const y of c.imports)
|
|
2385
|
+
h.appendContentln(`import ${y};`);
|
|
2386
|
+
h.appendContentln(""), h.appendContentln(c.content), a.push(h);
|
|
2236
2387
|
});
|
|
2237
2388
|
}
|
|
2238
|
-
return
|
|
2389
|
+
return a;
|
|
2239
2390
|
});
|
|
2240
2391
|
}
|
|
2241
2392
|
};
|
|
2242
|
-
}),
|
|
2393
|
+
}), Pe = Ne.KotlinGeneratorAddition, Io = le.createHotSwapPlugin(() => ({
|
|
2243
2394
|
unmount({ api: e }) {
|
|
2244
2395
|
e.commands.clearCaches(), e.commands._setCommandCodeProvider(() => []), e.commands._setFacadeCommandCodeProvider(() => []), e.commands._setAggCodeProvider(() => []), e.commands._setEventCodeProvider(() => []), e.commands._setReadModelCodeProvider(() => []), e.commands._setCodeFileProvider(() => []), e.commands.setContext({});
|
|
2245
2396
|
},
|
|
2246
2397
|
mount({ api: e }) {
|
|
2247
|
-
const n = "value", t = e.states.context,
|
|
2248
|
-
function
|
|
2249
|
-
return !
|
|
2398
|
+
const n = "value", t = e.states.context, r = e.states.designer.value._getContext().getDesignerOptions().ignoreValueObjects.map((m) => N.stringToLowerCamel(m));
|
|
2399
|
+
function o(m) {
|
|
2400
|
+
return !r.includes(N.stringToLowerCamel(m._attributes.name));
|
|
2250
2401
|
}
|
|
2251
|
-
function
|
|
2252
|
-
return
|
|
2402
|
+
function s(m, i) {
|
|
2403
|
+
return o(i) ? N.stringToUpperCamel(i._attributes.name) : C(m, i);
|
|
2253
2404
|
}
|
|
2254
|
-
function
|
|
2255
|
-
return N.stringToUpperCamel(
|
|
2405
|
+
function p(m) {
|
|
2406
|
+
return N.stringToUpperCamel(m._attributes.name);
|
|
2256
2407
|
}
|
|
2257
|
-
function
|
|
2258
|
-
for (const
|
|
2259
|
-
if (!
|
|
2260
|
-
|
|
2408
|
+
function _(m, i) {
|
|
2409
|
+
for (const a of i) {
|
|
2410
|
+
if (!o(a)) {
|
|
2411
|
+
C(m, a);
|
|
2261
2412
|
continue;
|
|
2262
2413
|
}
|
|
2263
|
-
|
|
2264
|
-
`${t.value.namespace}.${t.value.moduleName}.${n}.${
|
|
2414
|
+
m.add(
|
|
2415
|
+
`${t.value.namespace}.${t.value.moduleName}.${n}.${p(a)}`
|
|
2265
2416
|
);
|
|
2266
2417
|
}
|
|
2267
2418
|
}
|
|
2268
|
-
function
|
|
2269
|
-
const
|
|
2270
|
-
return /\b(time|timestamp|date|deadline|expire)\b/.test(l) ?
|
|
2419
|
+
function C(m, i) {
|
|
2420
|
+
const a = t.value.additions, l = N.stringToLowerSnake(i._attributes.name).replace(/_/, " ");
|
|
2421
|
+
return /\b(time|timestamp|date|deadline|expire)\b/.test(l) ? a.has(Pe.Timezone) ? (m.add("java.time.OffsetDateTime"), "OffsetDateTime") : (m.add("java.time.LocalDateTime"), "LocalDateTime") : /\b(enum|gender|sex|count|amount|num|number|flag|times)\b/.test(l) ? "Integer" : /\b(price)$/.test(l) ? (m.add("java.math.BigDecimal"), "BigDecimal") : /^(if|is)\b/.test(l) ? "Boolean" : Ee(i) && (i._attributes.type === "Id" || i._attributes.type === "Version") || /\b(id|identifier|ver|version)$/.test(l) ? "Long" : "String";
|
|
2271
2422
|
}
|
|
2272
2423
|
e.commands._setInfoCodeProvider(
|
|
2273
|
-
(
|
|
2274
|
-
const
|
|
2275
|
-
return l.has(
|
|
2424
|
+
(m) => {
|
|
2425
|
+
const i = /* @__PURE__ */ new Set(), a = p(m), l = t.value.additions, f = [];
|
|
2426
|
+
return l.has(Pe.ValueClass) ? (i.add("kotlin.jvm.JvmInline"), f.push("@JvmInline"), f.push(`value class ${a}(val value: ${C(i, m)})`)) : f.push(`data class ${a}(val value: ${C(i, m)})`), [
|
|
2276
2427
|
{
|
|
2277
2428
|
type: "Info",
|
|
2278
|
-
imports:
|
|
2279
|
-
content:
|
|
2429
|
+
imports: i,
|
|
2430
|
+
content: f.join(`
|
|
2280
2431
|
`)
|
|
2281
2432
|
}
|
|
2282
2433
|
];
|
|
2283
2434
|
}
|
|
2284
2435
|
), e.commands._setCommandCodeProvider(
|
|
2285
|
-
(
|
|
2286
|
-
const
|
|
2436
|
+
(m) => {
|
|
2437
|
+
const i = [], a = t.value.additions;
|
|
2287
2438
|
{
|
|
2288
|
-
const l = /* @__PURE__ */ new Set(),
|
|
2289
|
-
|
|
2290
|
-
const
|
|
2291
|
-
for (const $ of
|
|
2292
|
-
const
|
|
2293
|
-
|
|
2439
|
+
const l = /* @__PURE__ */ new Set(), f = p(m), b = [], g = Object.values(m.inner);
|
|
2440
|
+
_(l, g);
|
|
2441
|
+
const u = [];
|
|
2442
|
+
for (const $ of g) {
|
|
2443
|
+
const v = p($);
|
|
2444
|
+
u.push(`val ${N.lowerFirst(v)}: ${s(l, $)}`);
|
|
2294
2445
|
}
|
|
2295
|
-
|
|
2446
|
+
b.push(`data class ${f}(${u.join(", ")})`), i.push({
|
|
2296
2447
|
type: "Command",
|
|
2297
2448
|
imports: l,
|
|
2298
|
-
content:
|
|
2449
|
+
content: b.join(`
|
|
2299
2450
|
`)
|
|
2300
2451
|
});
|
|
2301
2452
|
}
|
|
2302
|
-
if (!
|
|
2303
|
-
return
|
|
2453
|
+
if (!a.has(Pe.CommandHandler))
|
|
2454
|
+
return i;
|
|
2304
2455
|
{
|
|
2305
|
-
const l = /* @__PURE__ */ new Set(),
|
|
2306
|
-
|
|
2307
|
-
const
|
|
2308
|
-
(
|
|
2456
|
+
const l = /* @__PURE__ */ new Set(), f = p(m), b = [];
|
|
2457
|
+
b.push(`class ${f}Handler {`);
|
|
2458
|
+
const g = [...e.states.designer.value._getContext().getAssociationMap()[m._attributes.__id]].filter(
|
|
2459
|
+
(u) => u._attributes.rule === "Agg"
|
|
2309
2460
|
);
|
|
2310
|
-
for (const
|
|
2311
|
-
l.add(`${t.value.namespace}.${t.value.moduleName}.${
|
|
2312
|
-
|
|
2461
|
+
for (const u of g)
|
|
2462
|
+
l.add(`${t.value.namespace}.${t.value.moduleName}.${p(u)}`), b.push(` fun handle(command: ${f}): ${p(u)} {`), b.push(" // HACK Implement"), b.push(" }");
|
|
2463
|
+
b.push("}"), i.push({
|
|
2313
2464
|
type: "CommandHandler",
|
|
2314
2465
|
imports: l,
|
|
2315
|
-
content:
|
|
2466
|
+
content: b.join(`
|
|
2316
2467
|
`)
|
|
2317
2468
|
});
|
|
2318
2469
|
}
|
|
2319
|
-
return
|
|
2470
|
+
return i;
|
|
2320
2471
|
}
|
|
2321
2472
|
), e.commands._setFacadeCommandCodeProvider(
|
|
2322
|
-
(
|
|
2323
|
-
const
|
|
2324
|
-
|
|
2325
|
-
const
|
|
2326
|
-
for (const
|
|
2327
|
-
const
|
|
2328
|
-
|
|
2473
|
+
(m) => {
|
|
2474
|
+
const i = /* @__PURE__ */ new Set(), a = p(m), l = [], f = Object.values(m.inner);
|
|
2475
|
+
_(i, f);
|
|
2476
|
+
const b = [];
|
|
2477
|
+
for (const g of f) {
|
|
2478
|
+
const u = p(g);
|
|
2479
|
+
b.push(`val ${N.lowerFirst(u)}: ${s(i, g)}`);
|
|
2329
2480
|
}
|
|
2330
|
-
return l.push(`data class ${
|
|
2481
|
+
return l.push(`data class ${a}(${b.join(", ")})`), [
|
|
2331
2482
|
{
|
|
2332
2483
|
type: "FacadeCommand",
|
|
2333
|
-
imports:
|
|
2484
|
+
imports: i,
|
|
2334
2485
|
content: l.join(`
|
|
2335
2486
|
`)
|
|
2336
2487
|
}
|
|
2337
2488
|
];
|
|
2338
2489
|
}
|
|
2339
|
-
), e.commands._setAggCodeProvider((
|
|
2340
|
-
const
|
|
2341
|
-
|
|
2342
|
-
const
|
|
2343
|
-
for (const
|
|
2344
|
-
const
|
|
2345
|
-
|
|
2490
|
+
), e.commands._setAggCodeProvider((m) => {
|
|
2491
|
+
const i = /* @__PURE__ */ new Set(), a = e.states.designer.value, l = p(m), f = [], b = Object.values(m.inner);
|
|
2492
|
+
_(i, b);
|
|
2493
|
+
const g = [], u = [...a._getContext().getAssociationMap()[m._attributes.__id]].filter((v) => v._attributes.rule === "Command" || v._attributes.rule === "FacadeCommand");
|
|
2494
|
+
for (const v of u) {
|
|
2495
|
+
const d = p(v);
|
|
2496
|
+
g.push(`fun handle(command: ${d})`);
|
|
2346
2497
|
}
|
|
2347
|
-
|
|
2348
|
-
`)}`),
|
|
2498
|
+
f.push(`interface ${l} {`), f.push(` ${g.join(`
|
|
2499
|
+
`)}`), f.push("}"), f.push(""), f.push(`class ${l}Impl(`);
|
|
2349
2500
|
const $ = [];
|
|
2350
|
-
for (const
|
|
2351
|
-
const
|
|
2352
|
-
$.push(`val ${N.lowerFirst(
|
|
2501
|
+
for (const v of b) {
|
|
2502
|
+
const d = p(v);
|
|
2503
|
+
$.push(`val ${N.lowerFirst(d)}: ${s(i, v)}`);
|
|
2353
2504
|
}
|
|
2354
|
-
|
|
2355
|
-
`)}`),
|
|
2356
|
-
for (const
|
|
2357
|
-
const
|
|
2358
|
-
|
|
2505
|
+
f.push(` ${$.join(`,
|
|
2506
|
+
`)}`), f.push(`): ${l} {`);
|
|
2507
|
+
for (const v of u) {
|
|
2508
|
+
const d = p(v);
|
|
2509
|
+
f.push(` override fun handle(command: ${d}) {`), f.push(" // HACK Implement"), f.push(" }");
|
|
2359
2510
|
}
|
|
2360
|
-
return
|
|
2511
|
+
return f.push("}"), [
|
|
2361
2512
|
{
|
|
2362
2513
|
type: "Agg",
|
|
2363
|
-
imports:
|
|
2364
|
-
content:
|
|
2514
|
+
imports: i,
|
|
2515
|
+
content: f.join(`
|
|
2365
2516
|
`)
|
|
2366
2517
|
}
|
|
2367
2518
|
];
|
|
2368
2519
|
}), e.commands._setEventCodeProvider(
|
|
2369
|
-
(
|
|
2370
|
-
const
|
|
2371
|
-
|
|
2372
|
-
const
|
|
2373
|
-
for (const
|
|
2374
|
-
const
|
|
2375
|
-
|
|
2520
|
+
(m) => {
|
|
2521
|
+
const i = /* @__PURE__ */ new Set(), a = p(m), l = [], f = Object.values(m.inner);
|
|
2522
|
+
_(i, f);
|
|
2523
|
+
const b = [];
|
|
2524
|
+
for (const g of f) {
|
|
2525
|
+
const u = p(g);
|
|
2526
|
+
b.push(`val ${N.lowerFirst(u)}: ${s(i, g)}`);
|
|
2376
2527
|
}
|
|
2377
|
-
return l.push(`data class ${
|
|
2528
|
+
return l.push(`data class ${a}(${b.join(", ")})`), [
|
|
2378
2529
|
{
|
|
2379
2530
|
type: "Event",
|
|
2380
|
-
imports:
|
|
2531
|
+
imports: i,
|
|
2381
2532
|
content: l.join(`
|
|
2382
2533
|
`)
|
|
2383
2534
|
}
|
|
2384
2535
|
];
|
|
2385
2536
|
}
|
|
2386
2537
|
), e.commands._setReadModelCodeProvider(() => []), e.commands._setCodeFileProvider(() => {
|
|
2387
|
-
const
|
|
2388
|
-
function
|
|
2389
|
-
for (const $ of Object.values(
|
|
2390
|
-
if (!
|
|
2538
|
+
const m = [], i = {};
|
|
2539
|
+
function a(u) {
|
|
2540
|
+
for (const $ of Object.values(u)) {
|
|
2541
|
+
if (!o($))
|
|
2391
2542
|
continue;
|
|
2392
|
-
const
|
|
2393
|
-
if (
|
|
2543
|
+
const v = [...t.value.namespace.split(/\./), t.value.moduleName, n], d = p($) + ".kt";
|
|
2544
|
+
if (i[`${v.join("/")}/${d}`] === !0)
|
|
2394
2545
|
continue;
|
|
2395
|
-
const
|
|
2396
|
-
if (
|
|
2546
|
+
const w = e.commands._genInfoCode($);
|
|
2547
|
+
if (w.length === 0)
|
|
2397
2548
|
continue;
|
|
2398
|
-
const
|
|
2399
|
-
|
|
2400
|
-
for (const
|
|
2401
|
-
|
|
2402
|
-
|
|
2549
|
+
const c = new S(v, d);
|
|
2550
|
+
c.appendContentln(`package ${t.value.namespace}.${t.value.moduleName}.${n}`), c.appendContentln("");
|
|
2551
|
+
for (const h of w[0].imports)
|
|
2552
|
+
c.appendContentln(`import ${h}`);
|
|
2553
|
+
c.appendContentln(""), c.appendContentln(w[0].content), m.push(c), i[`${v.join("/")}/${d}`] = !0;
|
|
2403
2554
|
}
|
|
2404
2555
|
}
|
|
2405
2556
|
const l = e.states.designer.value._getContext().getCommands();
|
|
2406
|
-
for (const
|
|
2407
|
-
|
|
2408
|
-
const $ = e.commands._genCommandCode(
|
|
2409
|
-
|
|
2410
|
-
|
|
2557
|
+
for (const u of l) {
|
|
2558
|
+
a(u.inner);
|
|
2559
|
+
const $ = e.commands._genCommandCode(u), v = [...t.value.namespace.split(/\./), t.value.moduleName], d = new S(v, p(u) + ".kt"), w = [];
|
|
2560
|
+
d.appendContentln(`package ${t.value.namespace}.${t.value.moduleName}`), d.appendContentln(""), $.forEach((c) => {
|
|
2561
|
+
c.type === "Command" || c.type === "CommandHandler" ? (d.addImports(c.imports), w.push(c.content)) : isNever(c.type);
|
|
2411
2562
|
});
|
|
2412
|
-
for (const
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
for (const
|
|
2416
|
-
|
|
2417
|
-
|
|
2563
|
+
for (const c of d.getImports())
|
|
2564
|
+
d.appendContentln(`import ${c}`);
|
|
2565
|
+
d.appendContentln("");
|
|
2566
|
+
for (const c of w)
|
|
2567
|
+
d.appendContentln(c);
|
|
2568
|
+
m.push(d);
|
|
2418
2569
|
}
|
|
2419
|
-
const
|
|
2420
|
-
for (const
|
|
2421
|
-
|
|
2422
|
-
const $ = e.commands._genFacadeCommandCode(
|
|
2423
|
-
$.forEach((
|
|
2424
|
-
|
|
2425
|
-
const h = new j(_, c(f) + ".kt");
|
|
2426
|
-
h.appendContentln(`package ${t.value.namespace}.${t.value.moduleName}`), h.appendContentln(""), h.addImports(b.imports);
|
|
2427
|
-
for (const u of b.imports)
|
|
2428
|
-
h.appendContentln(`import ${u}`);
|
|
2429
|
-
h.appendContentln(""), h.appendContentln(b.content), d.push(h);
|
|
2430
|
-
} else
|
|
2431
|
-
isNever(b.type);
|
|
2570
|
+
const f = e.states.designer.value._getContext().getFacadeCommands();
|
|
2571
|
+
for (const u of f) {
|
|
2572
|
+
a(u.inner);
|
|
2573
|
+
const $ = e.commands._genFacadeCommandCode(u), v = [...t.value.namespace.split(/\./), t.value.moduleName], d = new S(v, p(u) + ".kt"), w = [];
|
|
2574
|
+
d.appendContentln(`package ${t.value.namespace}.${t.value.moduleName}`), d.appendContentln(""), $.forEach((c) => {
|
|
2575
|
+
c.type === "FacadeCommand" || c.type === "FacadeCommandHandler" ? (d.addImports(c.imports), w.push(c.content)) : isNever(c.type);
|
|
2432
2576
|
});
|
|
2577
|
+
for (const c of d.getImports())
|
|
2578
|
+
d.appendContentln(`import ${c}`);
|
|
2579
|
+
d.appendContentln("");
|
|
2580
|
+
for (const c of w)
|
|
2581
|
+
d.appendContentln(c);
|
|
2582
|
+
m.push(d);
|
|
2433
2583
|
}
|
|
2434
|
-
const
|
|
2435
|
-
for (const
|
|
2436
|
-
|
|
2437
|
-
const $ = e.commands._genAggCode(
|
|
2438
|
-
|
|
2439
|
-
|
|
2584
|
+
const b = e.states.designer.value._getContext().getAggs();
|
|
2585
|
+
for (const u of b) {
|
|
2586
|
+
a(u.inner);
|
|
2587
|
+
const $ = e.commands._genAggCode(u), v = [...t.value.namespace.split(/\./), t.value.moduleName], d = new S(v, p(u) + ".kt"), w = [];
|
|
2588
|
+
d.appendContentln(`package ${t.value.namespace}.${t.value.moduleName}`), d.appendContentln(""), $.forEach((c) => {
|
|
2589
|
+
c.type === "Agg" || c.type === "AggImpl" ? (d.addImports(c.imports), w.push(c.content)) : isNever(c.type);
|
|
2440
2590
|
});
|
|
2441
|
-
for (const
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
for (const
|
|
2445
|
-
|
|
2446
|
-
|
|
2591
|
+
for (const c of d.getImports())
|
|
2592
|
+
d.appendContentln(`import ${c}`);
|
|
2593
|
+
d.appendContentln("");
|
|
2594
|
+
for (const c of w)
|
|
2595
|
+
d.appendContentln(c);
|
|
2596
|
+
m.push(d);
|
|
2447
2597
|
}
|
|
2448
|
-
const
|
|
2449
|
-
for (const
|
|
2450
|
-
|
|
2451
|
-
const $ = e.commands._genEventCode(
|
|
2452
|
-
$.forEach((
|
|
2453
|
-
if (
|
|
2454
|
-
const
|
|
2455
|
-
|
|
2456
|
-
for (const
|
|
2457
|
-
|
|
2458
|
-
|
|
2598
|
+
const g = e.states.designer.value._getContext().getEvents();
|
|
2599
|
+
for (const u of g) {
|
|
2600
|
+
a(u.inner);
|
|
2601
|
+
const $ = e.commands._genEventCode(u), v = [...t.value.namespace.split(/\./), t.value.moduleName];
|
|
2602
|
+
$.forEach((d) => {
|
|
2603
|
+
if (d.type === "Event") {
|
|
2604
|
+
const w = new S(v, p(u) + ".kt");
|
|
2605
|
+
w.appendContentln(`package ${t.value.namespace}.${t.value.moduleName}`), w.appendContentln(""), w.addImports(d.imports);
|
|
2606
|
+
for (const c of d.imports)
|
|
2607
|
+
w.appendContentln(`import ${c}`);
|
|
2608
|
+
w.appendContentln(""), w.appendContentln(d.content), m.push(w);
|
|
2459
2609
|
} else
|
|
2460
|
-
isNever(
|
|
2610
|
+
isNever(d.type);
|
|
2461
2611
|
});
|
|
2462
2612
|
}
|
|
2463
|
-
return
|
|
2613
|
+
return m;
|
|
2464
2614
|
});
|
|
2465
2615
|
}
|
|
2466
|
-
})),
|
|
2616
|
+
})), ko = le.createHotSwapPlugin(() => ({
|
|
2467
2617
|
unmount({ api: e }) {
|
|
2468
2618
|
e.commands.clearCaches(), e.commands._setCommandCodeProvider(() => []), e.commands._setFacadeCommandCodeProvider(() => []), e.commands._setAggCodeProvider(() => []), e.commands._setEventCodeProvider(() => []), e.commands._setReadModelCodeProvider(() => []), e.commands._setCodeFileProvider(() => []), e.commands.setContext({});
|
|
2469
2619
|
},
|
|
2470
2620
|
mount({ api: e }) {
|
|
2471
|
-
const n = e.states.context, t = e.states.designer.value._getContext().getDesignerOptions().ignoreValueObjects.map((
|
|
2472
|
-
function
|
|
2473
|
-
return !t.includes(N.stringToLowerCamel(
|
|
2621
|
+
const n = e.states.context, t = e.states.designer.value._getContext().getDesignerOptions().ignoreValueObjects.map((C) => N.stringToLowerCamel(C));
|
|
2622
|
+
function r(C) {
|
|
2623
|
+
return !t.includes(N.stringToLowerCamel(C._attributes.name));
|
|
2474
2624
|
}
|
|
2475
|
-
function
|
|
2476
|
-
return
|
|
2625
|
+
function o(C, m) {
|
|
2626
|
+
return r(m) ? N.stringToUpperCamel(m._attributes.name) : _(C, m);
|
|
2477
2627
|
}
|
|
2478
|
-
function
|
|
2479
|
-
return N.stringToUpperCamel(
|
|
2628
|
+
function s(C) {
|
|
2629
|
+
return N.stringToUpperCamel(C._attributes.name);
|
|
2480
2630
|
}
|
|
2481
|
-
function
|
|
2482
|
-
return N.stringToLowerCamel(
|
|
2631
|
+
function p(C) {
|
|
2632
|
+
return N.stringToLowerCamel(C._attributes.name);
|
|
2483
2633
|
}
|
|
2484
|
-
function
|
|
2485
|
-
const
|
|
2486
|
-
return /\b(time|timestamp|date|deadline|expire)\b/.test(
|
|
2634
|
+
function _(C, m) {
|
|
2635
|
+
const i = N.stringToLowerSnake(m._attributes.name).replace(/_/, " ");
|
|
2636
|
+
return /\b(time|timestamp|date|deadline|expire)\b/.test(i) ? (C.add("time"), "time.Time") : /\b(enum|gender|sex|count|amount|num|number|flag|times)\b/.test(i) ? "int" : /\b(price)$/.test(i) ? "string" : /^(if|is)\b/.test(i) ? "bool" : Ee(m) && (m._attributes.type === "Id" || m._attributes.type === "Version" || /\b(id|identifier|ver|version)$/.test(i)) ? "int64" : "string";
|
|
2487
2637
|
}
|
|
2488
2638
|
e.commands._setInfoCodeProvider(
|
|
2489
|
-
(
|
|
2490
|
-
const
|
|
2491
|
-
return
|
|
2492
|
-
`func New${
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
)}) ${
|
|
2496
|
-
),
|
|
2497
|
-
`func (${
|
|
2498
|
-
|
|
2499
|
-
|
|
2639
|
+
(C) => {
|
|
2640
|
+
const m = /* @__PURE__ */ new Set(), i = [];
|
|
2641
|
+
return i.push(`type ${s(C)} struct {`), i.push(` value ${_(m, C)}`), i.push("}"), i.push(""), i.push(
|
|
2642
|
+
`func New${s(C)}(value ${_(
|
|
2643
|
+
m,
|
|
2644
|
+
C
|
|
2645
|
+
)}) ${s(C)} {`
|
|
2646
|
+
), i.push(" // HACK check value"), i.push(` return ${s(C)}{value}`), i.push("}"), i.push(
|
|
2647
|
+
`func (${p(C)} ${s(C)}) GetValue() ${_(
|
|
2648
|
+
m,
|
|
2649
|
+
C
|
|
2500
2650
|
)} {`
|
|
2501
|
-
),
|
|
2651
|
+
), i.push(` return ${p(C)}.value`), i.push("}"), [{ type: "Info", imports: m, content: i.join(`
|
|
2502
2652
|
`) }];
|
|
2503
2653
|
}
|
|
2504
2654
|
), e.commands._setCommandCodeProvider(
|
|
2505
|
-
(
|
|
2506
|
-
const
|
|
2507
|
-
l.push(`type ${
|
|
2508
|
-
const
|
|
2509
|
-
for (const
|
|
2510
|
-
l.push(` ${
|
|
2655
|
+
(C) => {
|
|
2656
|
+
const m = s(C), i = p(C), a = /* @__PURE__ */ new Set(), l = [];
|
|
2657
|
+
l.push(`type ${m} struct {`);
|
|
2658
|
+
const f = Object.values(C.inner);
|
|
2659
|
+
for (const u of f)
|
|
2660
|
+
l.push(` ${p(u)} ${o(a, u)}`);
|
|
2511
2661
|
l.push("}");
|
|
2512
|
-
for (const
|
|
2662
|
+
for (const u of f)
|
|
2513
2663
|
l.push(
|
|
2514
|
-
`func (${
|
|
2515
|
-
|
|
2516
|
-
|
|
2664
|
+
`func (${i} ${m}) Get${s(u)} () ${o(
|
|
2665
|
+
a,
|
|
2666
|
+
u
|
|
2517
2667
|
)} {`
|
|
2518
|
-
), l.push(` return ${
|
|
2519
|
-
const
|
|
2520
|
-
for (const
|
|
2521
|
-
|
|
2522
|
-
return l.push(`func New${
|
|
2523
|
-
`)},`), l.push(" }"), l.push("}"), [{ type: "Command", imports:
|
|
2668
|
+
), l.push(` return ${i}.${p(u)}`), l.push("}");
|
|
2669
|
+
const b = [], g = [];
|
|
2670
|
+
for (const u of f)
|
|
2671
|
+
b.push(`${p(u)} ${o(a, u)}`), g.push(p(u));
|
|
2672
|
+
return l.push(`func New${m}(${b.join(", ")}) ${m} {`), l.push(" // HACK check value"), l.push(` return ${m}{`), l.push(` ${g.join(`,
|
|
2673
|
+
`)},`), l.push(" }"), l.push("}"), [{ type: "Command", imports: a, content: l.join(`
|
|
2524
2674
|
`) }];
|
|
2525
2675
|
}
|
|
2526
2676
|
), e.commands._setFacadeCommandCodeProvider(
|
|
2527
|
-
(
|
|
2528
|
-
const
|
|
2529
|
-
|
|
2530
|
-
for (const
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
for (const
|
|
2534
|
-
|
|
2535
|
-
`func (${
|
|
2677
|
+
(C) => {
|
|
2678
|
+
const m = s(C), i = p(C), a = Object.values(C.inner), l = /* @__PURE__ */ new Set(), f = [];
|
|
2679
|
+
f.push(`type ${m} struct {`);
|
|
2680
|
+
for (const u of a)
|
|
2681
|
+
f.push(` ${p(u)} ${o(l, u)}`);
|
|
2682
|
+
f.push("}");
|
|
2683
|
+
for (const u of a)
|
|
2684
|
+
f.push(
|
|
2685
|
+
`func (${i} ${m}) Get${s(u)} () ${o(
|
|
2536
2686
|
l,
|
|
2537
|
-
|
|
2687
|
+
u
|
|
2538
2688
|
)} {`
|
|
2539
|
-
),
|
|
2540
|
-
const
|
|
2541
|
-
for (const
|
|
2542
|
-
|
|
2543
|
-
return
|
|
2544
|
-
`)},`),
|
|
2689
|
+
), f.push(` return ${i}.${p(u)}`), f.push("}");
|
|
2690
|
+
const b = [], g = [];
|
|
2691
|
+
for (const u of a)
|
|
2692
|
+
b.push(`${p(u)} ${o(l, u)}`), g.push(p(u));
|
|
2693
|
+
return f.push(`func New${m}(${b.join(", ")}) ${m} {`), f.push(" // HACK check value"), f.push(` return ${m}{`), f.push(` ${g.join(`,
|
|
2694
|
+
`)},`), f.push(" }"), f.push("}"), [
|
|
2545
2695
|
{
|
|
2546
2696
|
type: "FacadeCommand",
|
|
2547
2697
|
imports: l,
|
|
2548
|
-
content:
|
|
2698
|
+
content: f.join(`
|
|
2549
2699
|
`)
|
|
2550
2700
|
}
|
|
2551
2701
|
];
|
|
2552
2702
|
}
|
|
2553
|
-
), e.commands._setAggCodeProvider((
|
|
2554
|
-
const
|
|
2555
|
-
|
|
2556
|
-
for (const
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
for (const
|
|
2560
|
-
|
|
2561
|
-
`func (${
|
|
2562
|
-
|
|
2563
|
-
|
|
2703
|
+
), e.commands._setAggCodeProvider((C) => {
|
|
2704
|
+
const m = e.states.designer.value, i = s(C), a = p(C), l = Object.values(C.inner), f = /* @__PURE__ */ new Set(), b = [];
|
|
2705
|
+
b.push(`type ${i} struct {`);
|
|
2706
|
+
for (const v of l)
|
|
2707
|
+
b.push(` ${p(v)} ${o(f, v)}`);
|
|
2708
|
+
b.push("}");
|
|
2709
|
+
for (const v of l)
|
|
2710
|
+
b.push(
|
|
2711
|
+
`func (${a} ${i}) Get${s(v)} () ${o(
|
|
2712
|
+
f,
|
|
2713
|
+
v
|
|
2564
2714
|
)} {`
|
|
2565
|
-
),
|
|
2566
|
-
const
|
|
2567
|
-
for (const
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
`)},`),
|
|
2571
|
-
const $ = [...
|
|
2572
|
-
for (const
|
|
2573
|
-
const
|
|
2574
|
-
|
|
2715
|
+
), b.push(` return ${a}.${p(v)}`), b.push("}");
|
|
2716
|
+
const g = [], u = [];
|
|
2717
|
+
for (const v of l)
|
|
2718
|
+
g.push(`${p(v)} ${o(f, v)}`), u.push(p(v));
|
|
2719
|
+
b.push(`func New${i}(${g.join(", ")}) ${i} {`), b.push(" // HACK check value"), b.push(` return ${i}{`), b.push(` ${u.join(`,
|
|
2720
|
+
`)},`), b.push(" }"), b.push("}"), b.push("");
|
|
2721
|
+
const $ = [...m._getContext().getAssociationMap()[C._attributes.__id]].filter((v) => v._attributes.rule === "Command" || v._attributes.rule === "FacadeCommand");
|
|
2722
|
+
for (const v of $) {
|
|
2723
|
+
const d = s(v), w = p(v);
|
|
2724
|
+
b.push(`func (${a} ${i}) Handle${d} (${w} ${d}) {`), b.push(" // HACK implement"), b.push("}");
|
|
2575
2725
|
}
|
|
2576
2726
|
return [
|
|
2577
2727
|
{
|
|
2578
2728
|
type: "Agg",
|
|
2579
|
-
imports:
|
|
2580
|
-
content:
|
|
2729
|
+
imports: f,
|
|
2730
|
+
content: b.join(`
|
|
2581
2731
|
`)
|
|
2582
2732
|
}
|
|
2583
2733
|
];
|
|
2584
2734
|
}), e.commands._setEventCodeProvider(
|
|
2585
|
-
(
|
|
2586
|
-
const
|
|
2587
|
-
|
|
2588
|
-
for (const
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
for (const
|
|
2592
|
-
|
|
2593
|
-
`func (${
|
|
2594
|
-
|
|
2595
|
-
|
|
2735
|
+
(C) => {
|
|
2736
|
+
const m = [], i = /* @__PURE__ */ new Set(), a = Object.values(C.inner), l = s(C), f = p(C);
|
|
2737
|
+
m.push(`type ${l} struct {`);
|
|
2738
|
+
for (const u of a)
|
|
2739
|
+
m.push(` ${p(u)} ${o(i, u)}`);
|
|
2740
|
+
m.push("}");
|
|
2741
|
+
for (const u of a)
|
|
2742
|
+
m.push(
|
|
2743
|
+
`func (${f} ${l}) Get${s(u)} () ${o(
|
|
2744
|
+
i,
|
|
2745
|
+
u
|
|
2596
2746
|
)} {`
|
|
2597
|
-
),
|
|
2598
|
-
const
|
|
2599
|
-
for (const
|
|
2600
|
-
|
|
2601
|
-
return
|
|
2602
|
-
`)},`),
|
|
2747
|
+
), m.push(` return ${f}.${p(u)}`), m.push("}");
|
|
2748
|
+
const b = [], g = [];
|
|
2749
|
+
for (const u of a)
|
|
2750
|
+
b.push(`${p(u)} ${o(i, u)}`), g.push(p(u));
|
|
2751
|
+
return m.push(`func New${l}(${b.join(", ")}) ${l} {`), m.push(" // HACK check value"), m.push(` return ${l}{`), m.push(` ${g.join(`,
|
|
2752
|
+
`)},`), m.push(" }"), m.push("}"), [
|
|
2603
2753
|
{
|
|
2604
2754
|
type: "Event",
|
|
2605
|
-
imports:
|
|
2606
|
-
content:
|
|
2755
|
+
imports: i,
|
|
2756
|
+
content: m.join(`
|
|
2607
2757
|
`)
|
|
2608
2758
|
}
|
|
2609
2759
|
];
|
|
2610
2760
|
}
|
|
2611
2761
|
), e.commands._setCodeFileProvider(() => {
|
|
2612
|
-
const
|
|
2613
|
-
function
|
|
2614
|
-
for (const
|
|
2615
|
-
if (!
|
|
2762
|
+
const C = [], m = {}, i = [...n.value.namespace.split(/\./), n.value.moduleName], a = new S(i, `${n.value.moduleName}.go`), l = [], f = new S(i, `${n.value.moduleName}_value_object.go`), b = [];
|
|
2763
|
+
function g(w) {
|
|
2764
|
+
for (const c of Object.values(w)) {
|
|
2765
|
+
if (!r(c))
|
|
2616
2766
|
continue;
|
|
2617
|
-
const
|
|
2618
|
-
if (
|
|
2767
|
+
const h = s(c);
|
|
2768
|
+
if (m[`${i.join("/")}/${h}`] === !0)
|
|
2619
2769
|
continue;
|
|
2620
|
-
const y = e.commands._genInfoCode(
|
|
2621
|
-
y.length !== 0 && (
|
|
2770
|
+
const y = e.commands._genInfoCode(c);
|
|
2771
|
+
y.length !== 0 && (f.addImports(y[0].imports), b.push(y[0].content), b.push(""), m[`${i.join("/")}/${h}`] = !0);
|
|
2622
2772
|
}
|
|
2623
2773
|
}
|
|
2624
|
-
const
|
|
2625
|
-
for (const
|
|
2626
|
-
|
|
2627
|
-
const
|
|
2628
|
-
for (const
|
|
2629
|
-
|
|
2774
|
+
const u = e.states.designer.value._getContext().getCommands();
|
|
2775
|
+
for (const w of u) {
|
|
2776
|
+
g(w.inner);
|
|
2777
|
+
const c = e.commands._genCommandCode(w);
|
|
2778
|
+
for (const h of c)
|
|
2779
|
+
m[h.content] !== !0 && (a.addImports(h.imports), l.push(h.content));
|
|
2630
2780
|
}
|
|
2631
2781
|
const $ = e.states.designer.value._getContext().getFacadeCommands();
|
|
2632
|
-
for (const
|
|
2633
|
-
|
|
2634
|
-
const
|
|
2635
|
-
for (const
|
|
2636
|
-
|
|
2782
|
+
for (const w of $) {
|
|
2783
|
+
g(w.inner);
|
|
2784
|
+
const c = e.commands._genFacadeCommandCode(w);
|
|
2785
|
+
for (const h of c)
|
|
2786
|
+
m[h.content] !== !0 && (a.addImports(h.imports), l.push(h.content));
|
|
2637
2787
|
}
|
|
2638
|
-
const
|
|
2639
|
-
for (const
|
|
2640
|
-
|
|
2641
|
-
const
|
|
2642
|
-
for (const
|
|
2643
|
-
|
|
2788
|
+
const v = e.states.designer.value._getContext().getAggs();
|
|
2789
|
+
for (const w of v) {
|
|
2790
|
+
g(w.inner);
|
|
2791
|
+
const c = e.commands._genAggCode(w);
|
|
2792
|
+
for (const h of c)
|
|
2793
|
+
m[h.content] !== !0 && (a.addImports(h.imports), l.push(h.content));
|
|
2644
2794
|
}
|
|
2645
|
-
const
|
|
2646
|
-
for (const
|
|
2647
|
-
|
|
2648
|
-
const
|
|
2649
|
-
for (const
|
|
2650
|
-
|
|
2795
|
+
const d = e.states.designer.value._getContext().getEvents();
|
|
2796
|
+
for (const w of d) {
|
|
2797
|
+
g(w.inner);
|
|
2798
|
+
const c = e.commands._genEventCode(w);
|
|
2799
|
+
for (const h of c)
|
|
2800
|
+
m[h.content] !== !0 && (a.addImports(h.imports), l.push(h.content));
|
|
2651
2801
|
}
|
|
2652
|
-
return
|
|
2653
|
-
`)}`),
|
|
2654
|
-
`)),
|
|
2655
|
-
`)}`),
|
|
2656
|
-
`)),
|
|
2802
|
+
return a.appendContentln(`package ${n.value.moduleName}`), a.appendContentln(""), a.getImports().length > 0 && (a.appendContentln("import ("), a.appendContentln(` ${[...a.getImports()].join(`
|
|
2803
|
+
`)}`), a.appendContentln(")")), a.appendContentln(l.join(`
|
|
2804
|
+
`)), f.appendContentln(`package ${n.value.moduleName}`), f.appendContentln(""), f.getImports().length > 0 && (f.appendContentln("import ("), f.appendContentln(` ${[...f.getImports()].map((w) => `"${w}"`).join(`
|
|
2805
|
+
`)}`), f.appendContentln(")"), f.appendContentln("")), f.appendContentln(b.join(`
|
|
2806
|
+
`)), C.push(a), C.push(f), C;
|
|
2657
2807
|
});
|
|
2658
2808
|
}
|
|
2659
|
-
})),
|
|
2809
|
+
})), M = ye.CSharpGeneratorAddition, xo = le.createHotSwapPlugin(() => {
|
|
2660
2810
|
const e = " ";
|
|
2661
|
-
function n(t,
|
|
2811
|
+
function n(t, r = 1) {
|
|
2662
2812
|
return t.split(`
|
|
2663
|
-
`).map((
|
|
2813
|
+
`).map((o) => e.repeat(r) + o).join(`
|
|
2664
2814
|
`);
|
|
2665
2815
|
}
|
|
2666
2816
|
return {
|
|
@@ -2668,259 +2818,289 @@ const O = be.JavaGeneratorAddition, Oo = ue.createHotSwapPlugin(() => {
|
|
|
2668
2818
|
t.commands.clearCaches(), t.commands._setCommandCodeProvider(() => []), t.commands._setFacadeCommandCodeProvider(() => []), t.commands._setAggCodeProvider(() => []), t.commands._setEventCodeProvider(() => []), t.commands._setReadModelCodeProvider(() => []), t.commands._setCodeFileProvider(() => []), t.commands.setContext({});
|
|
2669
2819
|
},
|
|
2670
2820
|
mount({ api: t }) {
|
|
2671
|
-
const
|
|
2672
|
-
function
|
|
2673
|
-
return !
|
|
2821
|
+
const r = t.states.context, o = t.states.designer.value._getContext().getDesignerOptions().ignoreValueObjects.map((i) => N.stringToLowerCamel(i));
|
|
2822
|
+
function s(i) {
|
|
2823
|
+
return !o.includes(N.stringToLowerCamel(i._attributes.name));
|
|
2674
2824
|
}
|
|
2675
|
-
function
|
|
2676
|
-
return a
|
|
2825
|
+
function p(i, a) {
|
|
2826
|
+
return s(a) ? N.stringToUpperCamel(a._attributes.name) : m(i, a);
|
|
2677
2827
|
}
|
|
2678
|
-
function
|
|
2679
|
-
return N.stringToUpperCamel(
|
|
2828
|
+
function _(i) {
|
|
2829
|
+
return N.stringToUpperCamel(i._attributes.name);
|
|
2680
2830
|
}
|
|
2681
|
-
function
|
|
2682
|
-
return
|
|
2831
|
+
function C(i) {
|
|
2832
|
+
return i.has(M.RecordStruct) ? " struct" : "";
|
|
2683
2833
|
}
|
|
2684
|
-
function
|
|
2685
|
-
const l =
|
|
2686
|
-
return /\b(time|timestamp|date|deadline|expire)\b/.test(
|
|
2834
|
+
function m(i, a) {
|
|
2835
|
+
const l = r.value.additions, f = N.stringToLowerSnake(a._attributes.name).replace(/_/, " ");
|
|
2836
|
+
return /\b(time|timestamp|date|deadline|expire)\b/.test(f) ? l.has(M.Timezone) ? "System.DateTimeOffset" : "System.DateTime" : /\b(enum|gender|sex|count|amount|num|number|flag|times)\b/.test(f) ? "int" : /\b(price)$/.test(f) ? "decimal" : /^(if|is)\b/.test(f) ? "bool" : Ee(a) && (a._attributes.type === "Id" || a._attributes.type === "Version" || /\b(id|identifier|ver|version)$/.test(f)) ? "long" : "string";
|
|
2687
2837
|
}
|
|
2688
2838
|
t.commands._setInfoCodeProvider(
|
|
2689
|
-
(
|
|
2690
|
-
const
|
|
2691
|
-
return
|
|
2692
|
-
`public record${
|
|
2839
|
+
(i) => {
|
|
2840
|
+
const a = r.value.additions, l = /* @__PURE__ */ new Set(), f = [];
|
|
2841
|
+
return f.push(
|
|
2842
|
+
`public record${C(a)} ${_(i)}(${m(
|
|
2693
2843
|
l,
|
|
2694
|
-
|
|
2844
|
+
i
|
|
2695
2845
|
)} value);`
|
|
2696
2846
|
), [
|
|
2697
2847
|
{
|
|
2698
2848
|
type: "Info",
|
|
2699
|
-
content:
|
|
2849
|
+
content: f.join(`
|
|
2700
2850
|
`),
|
|
2701
2851
|
imports: l
|
|
2702
2852
|
}
|
|
2703
2853
|
];
|
|
2704
2854
|
}
|
|
2705
2855
|
), t.commands._setCommandCodeProvider(
|
|
2706
|
-
(
|
|
2707
|
-
const
|
|
2856
|
+
(i) => {
|
|
2857
|
+
const a = [], l = r.value.additions, f = /* @__PURE__ */ new Set(), b = _(i);
|
|
2708
2858
|
{
|
|
2709
|
-
const
|
|
2710
|
-
|
|
2859
|
+
const g = [], u = Object.values(i.inner);
|
|
2860
|
+
g.push(`public record${C(l)} ${b}`), g.push("(");
|
|
2711
2861
|
const $ = [];
|
|
2712
|
-
for (const
|
|
2713
|
-
const
|
|
2714
|
-
$.push(`${
|
|
2862
|
+
for (const v of u) {
|
|
2863
|
+
const d = _(v);
|
|
2864
|
+
$.push(`${p(f, v)} ${N.upperFirst(d)}`);
|
|
2715
2865
|
}
|
|
2716
|
-
|
|
2717
|
-
`)}`),
|
|
2866
|
+
g.push(` ${$.join(`,
|
|
2867
|
+
`)}`), g.push(")"), g.push("{"), g.push("}"), a.push({
|
|
2718
2868
|
type: "Command",
|
|
2719
|
-
content:
|
|
2869
|
+
content: g.join(`
|
|
2720
2870
|
`),
|
|
2721
|
-
imports:
|
|
2871
|
+
imports: f
|
|
2722
2872
|
});
|
|
2723
2873
|
}
|
|
2724
2874
|
{
|
|
2725
|
-
const
|
|
2726
|
-
|
|
2875
|
+
const g = l.has(M.CommandHandlerInterface) ? ` : ${r.value.commandHandlerInterface}` : "", u = [];
|
|
2876
|
+
u.push(`public class ${b}Handler${g}`), u.push("{"), u.push(` public void Handle(${b} command)`), u.push(" {"), u.push(" // HACK implement"), u.push(" }"), u.push("}"), a.push({
|
|
2727
2877
|
type: "CommandHandler",
|
|
2728
|
-
content:
|
|
2878
|
+
content: u.join(`
|
|
2729
2879
|
`),
|
|
2730
|
-
imports:
|
|
2880
|
+
imports: f
|
|
2731
2881
|
});
|
|
2732
2882
|
}
|
|
2733
|
-
return
|
|
2883
|
+
return a;
|
|
2884
|
+
}
|
|
2885
|
+
), t.commands._setFacadeCommandCodeProvider(
|
|
2886
|
+
(i) => {
|
|
2887
|
+
const a = [], l = r.value.additions, f = /* @__PURE__ */ new Set(), b = _(i);
|
|
2888
|
+
{
|
|
2889
|
+
const g = [], u = Object.values(i.inner);
|
|
2890
|
+
g.push(`public record${C(l)} ${b}`), g.push("(");
|
|
2891
|
+
const $ = [];
|
|
2892
|
+
for (const v of u) {
|
|
2893
|
+
const d = _(v);
|
|
2894
|
+
$.push(`${p(f, v)} ${N.upperFirst(d)}`);
|
|
2895
|
+
}
|
|
2896
|
+
g.push(` ${$.join(`,
|
|
2897
|
+
`)}`), g.push(")"), g.push("{"), g.push("}"), a.push({
|
|
2898
|
+
type: "FacadeCommand",
|
|
2899
|
+
content: g.join(`
|
|
2900
|
+
`),
|
|
2901
|
+
imports: f
|
|
2902
|
+
});
|
|
2903
|
+
}
|
|
2904
|
+
{
|
|
2905
|
+
const g = l.has(M.CommandHandlerInterface) ? ` : ${r.value.commandHandlerInterface}` : "", u = [];
|
|
2906
|
+
u.push(`public class ${b}Handler${g}`), u.push("{"), u.push(` public void Handle(${b} command)`), u.push(" {"), u.push(" // HACK implement"), u.push(" }"), u.push("}"), a.push({
|
|
2907
|
+
type: "FacadeCommandHandler",
|
|
2908
|
+
content: u.join(`
|
|
2909
|
+
`),
|
|
2910
|
+
imports: f
|
|
2911
|
+
});
|
|
2912
|
+
}
|
|
2913
|
+
return a;
|
|
2734
2914
|
}
|
|
2735
2915
|
), t.commands._setAggCodeProvider(
|
|
2736
|
-
(
|
|
2737
|
-
const
|
|
2916
|
+
(i) => {
|
|
2917
|
+
const a = [], l = t.states.designer.value, f = r.value.additions;
|
|
2738
2918
|
{
|
|
2739
|
-
const
|
|
2740
|
-
|
|
2741
|
-
const $ = [],
|
|
2742
|
-
for (const
|
|
2743
|
-
const
|
|
2744
|
-
$.push(`void Handle${
|
|
2919
|
+
const b = /* @__PURE__ */ new Set(), g = [], u = f.has(M.AggInterface) ? ` : ${r.value.aggInterface}` : "";
|
|
2920
|
+
g.push(`public interface I${_(i)}${u}`), g.push("{");
|
|
2921
|
+
const $ = [], v = [...l._getContext().getAssociationMap()[i._attributes.__id]].filter((d) => d._attributes.rule === "Command" || d._attributes.rule === "FacadeCommand");
|
|
2922
|
+
for (const d of v) {
|
|
2923
|
+
const w = _(d);
|
|
2924
|
+
$.push(`void Handle${w}(${w} command);`);
|
|
2745
2925
|
}
|
|
2746
|
-
|
|
2926
|
+
g.push(` ${$.join(`
|
|
2747
2927
|
|
|
2748
|
-
`)}`),
|
|
2928
|
+
`)}`), g.push("}"), g.push(""), a.push({
|
|
2749
2929
|
type: "Agg",
|
|
2750
|
-
content:
|
|
2930
|
+
content: g.join(`
|
|
2751
2931
|
`),
|
|
2752
|
-
imports:
|
|
2932
|
+
imports: b
|
|
2753
2933
|
});
|
|
2754
2934
|
}
|
|
2755
2935
|
{
|
|
2756
|
-
const
|
|
2757
|
-
if (
|
|
2758
|
-
const
|
|
2759
|
-
for (const
|
|
2760
|
-
const y =
|
|
2761
|
-
|
|
2936
|
+
const b = /* @__PURE__ */ new Set(), g = [], u = _(i), $ = Object.values(i.inner), v = f.has(M.AggInterface) ? `, ${r.value.aggInterface}` : "";
|
|
2937
|
+
if (f.has(M.PrimaryConstructor)) {
|
|
2938
|
+
const d = [...l._getContext().getAssociationMap()[i._attributes.__id]].filter((h) => h._attributes.rule === "Command" || h._attributes.rule === "FacadeCommand"), w = [];
|
|
2939
|
+
for (const h of $) {
|
|
2940
|
+
const y = _(h);
|
|
2941
|
+
w.push(`${p(b, h)} ${N.lowerFirst(y)}`);
|
|
2762
2942
|
}
|
|
2763
|
-
|
|
2764
|
-
`)}`),
|
|
2765
|
-
for (const
|
|
2766
|
-
const y =
|
|
2767
|
-
|
|
2768
|
-
` public ${
|
|
2943
|
+
g.push(`public class ${u}`), g.push("("), g.push(` ${w.join(`,
|
|
2944
|
+
`)}`), g.push(`): I${u}${v}`), g.push("{");
|
|
2945
|
+
for (const h of $) {
|
|
2946
|
+
const y = _(h);
|
|
2947
|
+
g.push(
|
|
2948
|
+
` public ${p(b, h)} ${N.upperFirst(
|
|
2769
2949
|
y
|
|
2770
2950
|
)} { get; private set; } = ${N.lowerFirst(y)};`
|
|
2771
|
-
),
|
|
2951
|
+
), g.push("");
|
|
2772
2952
|
}
|
|
2773
|
-
const
|
|
2774
|
-
for (const
|
|
2775
|
-
const y =
|
|
2776
|
-
|
|
2953
|
+
const c = [];
|
|
2954
|
+
for (const h of d) {
|
|
2955
|
+
const y = _(h);
|
|
2956
|
+
c.push(`public void Handle${y}(${y} command)`), c.push("{"), c.push(" // HACK implement"), c.push("}"), c.push("");
|
|
2777
2957
|
}
|
|
2778
|
-
|
|
2779
|
-
`)}`),
|
|
2958
|
+
g.push(` ${c.join(`
|
|
2959
|
+
`)}`), g.push("}");
|
|
2780
2960
|
} else {
|
|
2781
|
-
const
|
|
2782
|
-
|
|
2783
|
-
for (const
|
|
2784
|
-
const y =
|
|
2785
|
-
|
|
2786
|
-
` public ${
|
|
2961
|
+
const d = [...l._getContext().getAssociationMap()[i._attributes.__id]].filter((h) => h._attributes.rule === "Command" || h._attributes.rule === "FacadeCommand");
|
|
2962
|
+
g.push(`public class ${u} : I${u}${v}`), g.push("{");
|
|
2963
|
+
for (const h of $) {
|
|
2964
|
+
const y = _(h);
|
|
2965
|
+
g.push(
|
|
2966
|
+
` public ${p(b, h)} ${N.lowerFirst(
|
|
2787
2967
|
y
|
|
2788
2968
|
)} { get; private set; }`
|
|
2789
2969
|
);
|
|
2790
2970
|
}
|
|
2791
|
-
|
|
2792
|
-
const
|
|
2793
|
-
for (const
|
|
2794
|
-
const y =
|
|
2795
|
-
|
|
2971
|
+
g.push("");
|
|
2972
|
+
const w = [];
|
|
2973
|
+
for (const h of $) {
|
|
2974
|
+
const y = _(h);
|
|
2975
|
+
w.push(`${p(b, h)} ${y}`);
|
|
2796
2976
|
}
|
|
2797
|
-
|
|
2798
|
-
for (const
|
|
2799
|
-
const y =
|
|
2800
|
-
|
|
2977
|
+
g.push(` public ${u}(${w.join(", ")})`), g.push(" {");
|
|
2978
|
+
for (const h of $) {
|
|
2979
|
+
const y = _(h);
|
|
2980
|
+
g.push(` ${y} = ${N.lowerFirst(y)};`);
|
|
2801
2981
|
}
|
|
2802
|
-
|
|
2803
|
-
const
|
|
2804
|
-
for (const
|
|
2805
|
-
const y =
|
|
2806
|
-
|
|
2982
|
+
g.push(" }");
|
|
2983
|
+
const c = [];
|
|
2984
|
+
for (const h of d) {
|
|
2985
|
+
const y = _(h);
|
|
2986
|
+
c.push(`public void Handle${y}(${y} command)`), c.push("{"), c.push(" // HACK implement"), c.push("}"), c.push("");
|
|
2807
2987
|
}
|
|
2808
|
-
|
|
2809
|
-
`)}`),
|
|
2988
|
+
g.push(` ${c.join(`
|
|
2989
|
+
`)}`), g.push("}");
|
|
2810
2990
|
}
|
|
2811
|
-
|
|
2991
|
+
a.push({
|
|
2812
2992
|
type: "AggImpl",
|
|
2813
|
-
content:
|
|
2993
|
+
content: g.join(`
|
|
2814
2994
|
`),
|
|
2815
|
-
imports:
|
|
2995
|
+
imports: b
|
|
2816
2996
|
});
|
|
2817
2997
|
}
|
|
2818
|
-
return
|
|
2998
|
+
return a;
|
|
2819
2999
|
}
|
|
2820
3000
|
), t.commands._setEventCodeProvider(
|
|
2821
|
-
(
|
|
2822
|
-
const
|
|
2823
|
-
|
|
2824
|
-
const
|
|
2825
|
-
for (const $ of
|
|
2826
|
-
const
|
|
2827
|
-
|
|
3001
|
+
(i) => {
|
|
3002
|
+
const a = r.value.additions, l = _(i), f = /* @__PURE__ */ new Set(), b = Object.values(i.inner), g = [];
|
|
3003
|
+
g.push(`public record${C(a)} ${l}`), g.push("(");
|
|
3004
|
+
const u = [];
|
|
3005
|
+
for (const $ of b) {
|
|
3006
|
+
const v = _($);
|
|
3007
|
+
u.push(`${p(f, $)} ${N.upperFirst(v)}`);
|
|
2828
3008
|
}
|
|
2829
|
-
return
|
|
2830
|
-
`)}`),
|
|
3009
|
+
return g.push(` ${u.join(`,
|
|
3010
|
+
`)}`), g.push(")"), g.push("{"), g.push("}"), [
|
|
2831
3011
|
{
|
|
2832
3012
|
type: "Event",
|
|
2833
|
-
content:
|
|
3013
|
+
content: g.join(`
|
|
2834
3014
|
`),
|
|
2835
|
-
imports:
|
|
3015
|
+
imports: f
|
|
2836
3016
|
}
|
|
2837
3017
|
];
|
|
2838
3018
|
}
|
|
2839
3019
|
), t.commands._setReadModelCodeProvider(() => []), t.commands._setCodeFileProvider(() => {
|
|
2840
|
-
const
|
|
2841
|
-
function
|
|
2842
|
-
for (const
|
|
2843
|
-
if (!
|
|
3020
|
+
const i = [], a = {}, l = [...r.value.namespace.split(/\./), N.stringToUpperCamel(r.value.moduleName)];
|
|
3021
|
+
function f(v) {
|
|
3022
|
+
for (const d of Object.values(v)) {
|
|
3023
|
+
if (!s(d))
|
|
2844
3024
|
continue;
|
|
2845
|
-
const
|
|
2846
|
-
if (
|
|
3025
|
+
const w = _(d) + ".cs";
|
|
3026
|
+
if (a[`${l.join("/")}/${w}`] === !0)
|
|
2847
3027
|
continue;
|
|
2848
|
-
const
|
|
2849
|
-
if (
|
|
3028
|
+
const c = t.commands._genInfoCode(d);
|
|
3029
|
+
if (c.length === 0)
|
|
2850
3030
|
continue;
|
|
2851
|
-
const
|
|
2852
|
-
for (const y of
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
`namespace ${
|
|
2856
|
-
),
|
|
3031
|
+
const h = new S(l, w);
|
|
3032
|
+
for (const y of c[0].imports)
|
|
3033
|
+
h.appendContentln(`using ${y};`);
|
|
3034
|
+
h.appendContentln(""), h.appendContentln(
|
|
3035
|
+
`namespace ${r.value.namespace}.${N.stringToUpperCamel(r.value.moduleName)}`
|
|
3036
|
+
), h.appendContentln("{"), h.appendContentln(n(c[0].content)), h.appendContentln("}"), i.push(h), a[`${l.join("/")}/${w}`] = !0;
|
|
2857
3037
|
}
|
|
2858
3038
|
}
|
|
2859
|
-
const
|
|
2860
|
-
for (const
|
|
2861
|
-
|
|
2862
|
-
const
|
|
2863
|
-
for (const
|
|
2864
|
-
if (
|
|
2865
|
-
|
|
2866
|
-
for (const y of
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
`namespace ${
|
|
2870
|
-
),
|
|
3039
|
+
const b = t.states.designer.value._getContext().getCommands();
|
|
3040
|
+
for (const v of b) {
|
|
3041
|
+
f(v.inner);
|
|
3042
|
+
const d = _(v) + ".cs", w = t.commands._genCommandCode(v), c = new S(l, d);
|
|
3043
|
+
for (const h of w)
|
|
3044
|
+
if (h.type === "Command") {
|
|
3045
|
+
c.addImports(h.imports);
|
|
3046
|
+
for (const y of h.imports)
|
|
3047
|
+
c.appendContentln(`using ${y};`);
|
|
3048
|
+
c.appendContentln(""), c.appendContentln(
|
|
3049
|
+
`namespace ${r.value.namespace}.${N.stringToUpperCamel(r.value.moduleName)}`
|
|
3050
|
+
), c.appendContentln("{"), c.appendContentln(n(h.content)), c.appendContentln("}");
|
|
2871
3051
|
}
|
|
2872
|
-
|
|
3052
|
+
i.push(c);
|
|
2873
3053
|
}
|
|
2874
|
-
const
|
|
2875
|
-
for (const
|
|
2876
|
-
|
|
2877
|
-
const
|
|
2878
|
-
|
|
2879
|
-
for (const
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
`namespace ${
|
|
2883
|
-
),
|
|
3054
|
+
const g = t.states.designer.value._getContext().getFacadeCommands();
|
|
3055
|
+
for (const v of g) {
|
|
3056
|
+
f(v.inner);
|
|
3057
|
+
const d = _(v) + ".cs", w = t.commands._genFacadeCommandCode(v), c = new S(l, d);
|
|
3058
|
+
c.addImports(w[0].imports);
|
|
3059
|
+
for (const h of w[0].imports)
|
|
3060
|
+
c.appendContentln(`using ${h};`);
|
|
3061
|
+
c.appendContentln(""), c.appendContentln(
|
|
3062
|
+
`namespace ${r.value.namespace}.${N.stringToUpperCamel(r.value.moduleName)}`
|
|
3063
|
+
), c.appendContentln("{"), c.appendContentln(n(w[0].content)), c.appendContentln("}"), i.push(c);
|
|
2884
3064
|
}
|
|
2885
|
-
const
|
|
2886
|
-
for (const
|
|
2887
|
-
|
|
2888
|
-
const
|
|
2889
|
-
for (const
|
|
2890
|
-
|
|
2891
|
-
for (const y of
|
|
2892
|
-
|
|
2893
|
-
|
|
3065
|
+
const u = t.states.designer.value._getContext().getAggs();
|
|
3066
|
+
for (const v of u) {
|
|
3067
|
+
f(v.inner);
|
|
3068
|
+
const d = t.commands._genAggCode(v), w = _(v) + ".cs", c = new S(l, w);
|
|
3069
|
+
for (const h of d) {
|
|
3070
|
+
c.addImports(h.imports);
|
|
3071
|
+
for (const y of h.imports)
|
|
3072
|
+
c.appendContentln(`using ${y};`);
|
|
3073
|
+
c.appendContentln("");
|
|
2894
3074
|
}
|
|
2895
|
-
|
|
2896
|
-
`namespace ${
|
|
2897
|
-
),
|
|
2898
|
-
for (const
|
|
2899
|
-
|
|
2900
|
-
|
|
3075
|
+
c.appendContentln(
|
|
3076
|
+
`namespace ${r.value.namespace}.${N.stringToUpperCamel(r.value.moduleName)}`
|
|
3077
|
+
), c.appendContentln("{");
|
|
3078
|
+
for (const h of d)
|
|
3079
|
+
c.appendContentln(n(h.content));
|
|
3080
|
+
c.appendContentln("}"), i.push(c);
|
|
2901
3081
|
}
|
|
2902
3082
|
const $ = t.states.designer.value._getContext().getEvents();
|
|
2903
|
-
for (const
|
|
2904
|
-
|
|
2905
|
-
const
|
|
2906
|
-
|
|
2907
|
-
for (const
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
`namespace ${
|
|
2911
|
-
),
|
|
3083
|
+
for (const v of $) {
|
|
3084
|
+
f(v.inner);
|
|
3085
|
+
const d = _(v) + ".cs", w = t.commands._genEventCode(v), c = new S(l, d);
|
|
3086
|
+
c.addImports(w[0].imports);
|
|
3087
|
+
for (const h of w[0].imports)
|
|
3088
|
+
c.appendContentln(`using ${h};`);
|
|
3089
|
+
c.appendContentln(""), c.appendContentln(
|
|
3090
|
+
`namespace ${r.value.namespace}.${N.stringToUpperCamel(r.value.moduleName)}`
|
|
3091
|
+
), c.appendContentln("{"), c.appendContentln(n(w[0].content)), c.appendContentln("}"), i.push(c);
|
|
2912
3092
|
}
|
|
2913
|
-
return
|
|
3093
|
+
return i;
|
|
2914
3094
|
});
|
|
2915
3095
|
}
|
|
2916
3096
|
};
|
|
2917
3097
|
});
|
|
2918
3098
|
export {
|
|
2919
3099
|
xo as GENERATOR_CSHARP_PLUGIN,
|
|
2920
|
-
|
|
3100
|
+
ko as GENERATOR_GO_PLUGIN,
|
|
2921
3101
|
Oo as GENERATOR_JAVA_PLUGIN,
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
3102
|
+
Io as GENERATOR_KOTLIN_PLUGIN,
|
|
3103
|
+
le as GeneratorPliginHelper,
|
|
3104
|
+
So as define,
|
|
3105
|
+
Ao as useGeneratorAgg
|
|
2926
3106
|
};
|