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