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