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