@ddd-tool/domain-designer-generator 0.1.0-beta.11 → 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 +1402 -1392
- 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
|
-
};
|
|
812
|
-
}
|
|
813
|
-
function Be() {
|
|
814
|
-
return jt();
|
|
787
|
+
function Be(e = "") {
|
|
788
|
+
const n = Date.now().toString(36), t = Math.random().toString(36).substring(2, 10);
|
|
789
|
+
return `${e}${n}${t}`;
|
|
815
790
|
}
|
|
816
|
-
function At() {
|
|
817
|
-
const
|
|
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,60 +1602,72 @@ 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
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
["
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1636
|
+
if (!B(a))
|
|
1637
|
+
return null;
|
|
1638
|
+
if (a.__isVue)
|
|
1639
|
+
return ["div", e, "VueInstance"];
|
|
1640
|
+
if (sn(a)) {
|
|
1641
|
+
const p = a.value;
|
|
1642
|
+
return [
|
|
1643
|
+
"div",
|
|
1644
|
+
{},
|
|
1645
|
+
["span", e, u(a)],
|
|
1646
|
+
"<",
|
|
1647
|
+
m(p),
|
|
1648
|
+
">"
|
|
1649
|
+
];
|
|
1650
|
+
} else {
|
|
1651
|
+
if (An(a))
|
|
1652
|
+
return [
|
|
1653
|
+
"div",
|
|
1654
|
+
{},
|
|
1655
|
+
["span", e, ke(a) ? "ShallowReactive" : "Reactive"],
|
|
1656
|
+
"<",
|
|
1657
|
+
m(a),
|
|
1658
|
+
`>${ze(a) ? " (readonly)" : ""}`
|
|
1659
|
+
];
|
|
1660
|
+
if (ze(a))
|
|
1661
|
+
return [
|
|
1662
|
+
"div",
|
|
1663
|
+
{},
|
|
1664
|
+
["span", e, ke(a) ? "ShallowReadonly" : "Readonly"],
|
|
1665
|
+
"<",
|
|
1666
|
+
m(a),
|
|
1667
|
+
">"
|
|
1668
|
+
];
|
|
1669
|
+
}
|
|
1670
|
+
return null;
|
|
1661
1671
|
},
|
|
1662
1672
|
hasBody(a) {
|
|
1663
1673
|
return a && a.__isVue;
|
|
@@ -1667,31 +1677,31 @@ function yo() {
|
|
|
1667
1677
|
return [
|
|
1668
1678
|
"div",
|
|
1669
1679
|
{},
|
|
1670
|
-
...
|
|
1680
|
+
...r(a.$)
|
|
1671
1681
|
];
|
|
1672
1682
|
}
|
|
1673
1683
|
};
|
|
1674
|
-
function
|
|
1675
|
-
const
|
|
1676
|
-
a.type.props && a.props &&
|
|
1677
|
-
const
|
|
1678
|
-
|
|
1679
|
-
const b =
|
|
1680
|
-
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([
|
|
1681
1691
|
"div",
|
|
1682
1692
|
{},
|
|
1683
1693
|
[
|
|
1684
1694
|
"span",
|
|
1685
1695
|
{
|
|
1686
|
-
style:
|
|
1696
|
+
style: s.style + ";opacity:0.66"
|
|
1687
1697
|
},
|
|
1688
1698
|
"$ (internal): "
|
|
1689
1699
|
],
|
|
1690
1700
|
["object", { object: a }]
|
|
1691
|
-
]),
|
|
1701
|
+
]), p;
|
|
1692
1702
|
}
|
|
1693
|
-
function
|
|
1694
|
-
return
|
|
1703
|
+
function i(a, p) {
|
|
1704
|
+
return p = Ee({}, p), Object.keys(p).length ? [
|
|
1695
1705
|
"div",
|
|
1696
1706
|
{ style: "line-height:1.25em;margin-bottom:0.6em" },
|
|
1697
1707
|
[
|
|
@@ -1706,33 +1716,33 @@ function yo() {
|
|
|
1706
1716
|
{
|
|
1707
1717
|
style: "padding-left:1.25em"
|
|
1708
1718
|
},
|
|
1709
|
-
...Object.keys(
|
|
1719
|
+
...Object.keys(p).map((g) => [
|
|
1710
1720
|
"div",
|
|
1711
1721
|
{},
|
|
1712
|
-
["span",
|
|
1713
|
-
|
|
1722
|
+
["span", s, g + ": "],
|
|
1723
|
+
m(p[g], !1)
|
|
1714
1724
|
])
|
|
1715
1725
|
]
|
|
1716
1726
|
] : ["span", {}];
|
|
1717
1727
|
}
|
|
1718
|
-
function
|
|
1719
|
-
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)];
|
|
1720
1730
|
}
|
|
1721
|
-
function
|
|
1722
|
-
const
|
|
1723
|
-
if (
|
|
1731
|
+
function _(a, p) {
|
|
1732
|
+
const g = a.type;
|
|
1733
|
+
if (J(g))
|
|
1724
1734
|
return;
|
|
1725
1735
|
const b = {};
|
|
1726
|
-
for (const
|
|
1727
|
-
|
|
1736
|
+
for (const C in a.ctx)
|
|
1737
|
+
f(g, C, p) && (b[C] = a.ctx[C]);
|
|
1728
1738
|
return b;
|
|
1729
1739
|
}
|
|
1730
|
-
function
|
|
1731
|
-
const b = a[
|
|
1732
|
-
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)))
|
|
1733
1743
|
return !0;
|
|
1734
1744
|
}
|
|
1735
|
-
function
|
|
1745
|
+
function u(a) {
|
|
1736
1746
|
return ke(a) ? "ShallowRef" : a.effect ? "ComputedRef" : "Ref";
|
|
1737
1747
|
}
|
|
1738
1748
|
window.devtoolsFormatters ? window.devtoolsFormatters.push(o) : window.devtoolsFormatters = [o];
|
|
@@ -1741,19 +1751,19 @@ process.env.NODE_ENV;
|
|
|
1741
1751
|
process.env.NODE_ENV;
|
|
1742
1752
|
process.env.NODE_ENV;
|
|
1743
1753
|
/**
|
|
1744
|
-
* vue v3.5.
|
|
1754
|
+
* vue v3.5.22
|
|
1745
1755
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
1746
1756
|
* @license MIT
|
|
1747
1757
|
**/
|
|
1748
|
-
function
|
|
1749
|
-
|
|
1758
|
+
function So() {
|
|
1759
|
+
Eo();
|
|
1750
1760
|
}
|
|
1751
|
-
process.env.NODE_ENV !== "production" &&
|
|
1752
|
-
function
|
|
1753
|
-
return
|
|
1761
|
+
process.env.NODE_ENV !== "production" && So();
|
|
1762
|
+
function Ao(e) {
|
|
1763
|
+
return Ft(e) || Vt(e) || Pt(e) || Rt(e) || Ht(e);
|
|
1754
1764
|
}
|
|
1755
|
-
var
|
|
1756
|
-
class
|
|
1765
|
+
var Un = /* @__PURE__ */ ((e) => (e.Java = "java", e.Kotlin = "kotlin", e.CSharp = "csharp", e.Go = "go", e))(Un || {});
|
|
1766
|
+
class A {
|
|
1757
1767
|
imports = /* @__PURE__ */ new Set();
|
|
1758
1768
|
parentDir;
|
|
1759
1769
|
name;
|
|
@@ -1794,20 +1804,20 @@ class S {
|
|
|
1794
1804
|
this.parentDir = n;
|
|
1795
1805
|
}
|
|
1796
1806
|
}
|
|
1797
|
-
var
|
|
1807
|
+
var Ne;
|
|
1798
1808
|
((e) => {
|
|
1799
1809
|
((n) => {
|
|
1800
1810
|
n.Lombok = "Lombok", n.LombokBuilder = "LombokBuilder", n.RecordValueObject = "RecordValueObject", n.CommandHandler = "CommandHandler", n.Jpa = "Jpa", n.Timezone = "Timezone", n.SpringFramework = "SpringFramework";
|
|
1801
1811
|
})(e.JavaGeneratorAddition || (e.JavaGeneratorAddition = {})), ((n) => {
|
|
1802
1812
|
n.TABLE = "TABLE", n.SEQUENCE = "SEQUENCE", n.IDENTITY = "IDENTITY", n.UUID = "UUID", n.AUTO = "AUTO";
|
|
1803
1813
|
})(e.IdGenStrategy || (e.IdGenStrategy = {}));
|
|
1804
|
-
})(
|
|
1805
|
-
var
|
|
1814
|
+
})(Ne || (Ne = {}));
|
|
1815
|
+
var we;
|
|
1806
1816
|
((e) => {
|
|
1807
1817
|
((n) => {
|
|
1808
1818
|
n.ValueClass = "ValueClass", n.CommandHandler = "CommandHandler", n.Timezone = "Timezone";
|
|
1809
1819
|
})(e.KotlinGeneratorAddition || (e.KotlinGeneratorAddition = {}));
|
|
1810
|
-
})(
|
|
1820
|
+
})(we || (we = {}));
|
|
1811
1821
|
var ye;
|
|
1812
1822
|
((e) => {
|
|
1813
1823
|
((n) => {
|
|
@@ -1820,298 +1830,298 @@ var We;
|
|
|
1820
1830
|
n.SinglePackageEachDesigner = "SinglePackageEachDesigner";
|
|
1821
1831
|
})(e.GoGeneratorAddition || (e.GoGeneratorAddition = {}));
|
|
1822
1832
|
})(We || (We = {}));
|
|
1823
|
-
const
|
|
1833
|
+
const Io = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1824
1834
|
__proto__: null,
|
|
1825
|
-
CodeFile:
|
|
1826
|
-
Language:
|
|
1835
|
+
CodeFile: A,
|
|
1836
|
+
Language: Un,
|
|
1827
1837
|
get csharp() {
|
|
1828
1838
|
return ye;
|
|
1829
1839
|
},
|
|
1830
1840
|
get go() {
|
|
1831
1841
|
return We;
|
|
1832
1842
|
},
|
|
1833
|
-
isStruct:
|
|
1843
|
+
isStruct: Ao,
|
|
1834
1844
|
get java() {
|
|
1835
|
-
return
|
|
1845
|
+
return Ne;
|
|
1836
1846
|
},
|
|
1837
1847
|
get kotlin() {
|
|
1838
|
-
return
|
|
1848
|
+
return we;
|
|
1839
1849
|
}
|
|
1840
1850
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1841
|
-
var
|
|
1851
|
+
var w;
|
|
1842
1852
|
((e) => {
|
|
1843
|
-
function n(
|
|
1844
|
-
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("");
|
|
1845
1855
|
}
|
|
1846
1856
|
e.stringToUpperCamel = n;
|
|
1847
|
-
function t(
|
|
1848
|
-
let
|
|
1849
|
-
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("");
|
|
1850
1860
|
}
|
|
1851
1861
|
e.stringToLowerCamel = t;
|
|
1852
|
-
function
|
|
1853
|
-
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);
|
|
1854
1864
|
}
|
|
1855
|
-
e.stringToLowerSnake =
|
|
1856
|
-
function o(
|
|
1857
|
-
return
|
|
1865
|
+
e.stringToLowerSnake = s;
|
|
1866
|
+
function o(f) {
|
|
1867
|
+
return f.trim().split(/(?=[A-Z])/g).join("_").toUpperCase();
|
|
1858
1868
|
}
|
|
1859
1869
|
e.camelToUpperSnake = o;
|
|
1860
|
-
function
|
|
1861
|
-
return
|
|
1870
|
+
function r(f) {
|
|
1871
|
+
return f.trim().split(/(?=[A-Z])/g).join("_").toLowerCase();
|
|
1862
1872
|
}
|
|
1863
|
-
e.camelToLowerSnake =
|
|
1864
|
-
function
|
|
1865
|
-
return
|
|
1873
|
+
e.camelToLowerSnake = r;
|
|
1874
|
+
function i(f) {
|
|
1875
|
+
return f.trim().split("_").map((u) => u.charAt(0).toUpperCase() + u.slice(1)).join("");
|
|
1866
1876
|
}
|
|
1867
|
-
e.snakeToUpperCamel =
|
|
1868
|
-
function
|
|
1869
|
-
return
|
|
1877
|
+
e.snakeToUpperCamel = i;
|
|
1878
|
+
function m(f) {
|
|
1879
|
+
return f.trim().charAt(0).toLowerCase() + f.slice(1);
|
|
1870
1880
|
}
|
|
1871
|
-
e.lowerFirst =
|
|
1872
|
-
function
|
|
1873
|
-
return
|
|
1881
|
+
e.lowerFirst = m;
|
|
1882
|
+
function _(f) {
|
|
1883
|
+
return f.trim().charAt(0).toUpperCase() + f.slice(1);
|
|
1874
1884
|
}
|
|
1875
|
-
e.upperFirst =
|
|
1876
|
-
})(
|
|
1877
|
-
const j =
|
|
1885
|
+
e.upperFirst = _;
|
|
1886
|
+
})(w || (w = {}));
|
|
1887
|
+
const j = Ne.JavaGeneratorAddition, ko = de.createHotSwapPlugin(() => {
|
|
1878
1888
|
const e = "value", n = "command", t = "event";
|
|
1879
|
-
function
|
|
1880
|
-
return
|
|
1889
|
+
function s(o) {
|
|
1890
|
+
return w.stringToUpperCamel(o._attributes.name);
|
|
1881
1891
|
}
|
|
1882
1892
|
return {
|
|
1883
1893
|
unmount({ api: o }) {
|
|
1884
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({});
|
|
1885
1895
|
},
|
|
1886
1896
|
mount({ api: o }) {
|
|
1887
|
-
const
|
|
1888
|
-
function
|
|
1889
|
-
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));
|
|
1890
1900
|
}
|
|
1891
|
-
function
|
|
1892
|
-
if (
|
|
1893
|
-
const
|
|
1894
|
-
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;
|
|
1895
1905
|
}
|
|
1896
|
-
return
|
|
1906
|
+
return u(a, p);
|
|
1897
1907
|
}
|
|
1898
|
-
function
|
|
1899
|
-
for (const
|
|
1900
|
-
if (!
|
|
1901
|
-
|
|
1908
|
+
function f(a, p) {
|
|
1909
|
+
for (const g of p) {
|
|
1910
|
+
if (!m(g)) {
|
|
1911
|
+
u(a, g);
|
|
1902
1912
|
continue;
|
|
1903
1913
|
}
|
|
1904
1914
|
a.add(
|
|
1905
|
-
`${
|
|
1915
|
+
`${r.value.namespace}.${r.value.moduleName}.${e}.${s(g)}`
|
|
1906
1916
|
);
|
|
1907
1917
|
}
|
|
1908
1918
|
}
|
|
1909
|
-
function
|
|
1910
|
-
const
|
|
1911
|
-
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";
|
|
1912
1922
|
}
|
|
1913
1923
|
o.commands._setInfoCodeProvider(
|
|
1914
1924
|
(a) => {
|
|
1915
|
-
const
|
|
1916
|
-
|
|
1917
|
-
const
|
|
1918
|
-
return
|
|
1919
|
-
|
|
1920
|
-
),
|
|
1921
|
-
|
|
1922
|
-
),
|
|
1923
|
-
|
|
1924
|
-
),
|
|
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("}")), [
|
|
1925
1935
|
{
|
|
1926
1936
|
type: "Info",
|
|
1927
|
-
imports:
|
|
1928
|
-
content:
|
|
1937
|
+
imports: p,
|
|
1938
|
+
content: l.join(`
|
|
1929
1939
|
`)
|
|
1930
1940
|
}
|
|
1931
1941
|
];
|
|
1932
1942
|
}
|
|
1933
1943
|
), o.commands._setCommandCodeProvider(
|
|
1934
1944
|
(a) => {
|
|
1935
|
-
const
|
|
1945
|
+
const p = [], g = r.value.additions, b = r.value.nonNullAnnotation.split(".").pop();
|
|
1936
1946
|
{
|
|
1937
|
-
const
|
|
1938
|
-
|
|
1939
|
-
const
|
|
1940
|
-
if (
|
|
1941
|
-
|
|
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}(`);
|
|
1942
1952
|
const d = [];
|
|
1943
|
-
for (const
|
|
1944
|
-
const c =
|
|
1953
|
+
for (const N of v) {
|
|
1954
|
+
const c = s(N);
|
|
1945
1955
|
d.push(
|
|
1946
1956
|
` @${b}
|
|
1947
|
-
${
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
)} ${
|
|
1957
|
+
${_(
|
|
1958
|
+
C,
|
|
1959
|
+
N
|
|
1960
|
+
)} ${w.lowerFirst(c)}`
|
|
1951
1961
|
);
|
|
1952
1962
|
}
|
|
1953
1963
|
$.push(d.join(`,
|
|
1954
|
-
`)), $.push(") {"), $.push(` public ${
|
|
1955
|
-
} else if (
|
|
1956
|
-
$.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} {`);
|
|
1957
1967
|
for (const d of v) {
|
|
1958
|
-
const
|
|
1968
|
+
const N = s(d);
|
|
1959
1969
|
$.push(` @${b}`), $.push(
|
|
1960
|
-
` private final ${C
|
|
1970
|
+
` private final ${_(C, d)} ${w.lowerFirst(N)};`
|
|
1961
1971
|
);
|
|
1962
1972
|
}
|
|
1963
1973
|
$.push("}");
|
|
1964
1974
|
} else {
|
|
1965
|
-
$.push(`public class ${
|
|
1975
|
+
$.push(`public class ${l} {`);
|
|
1966
1976
|
for (const c of v) {
|
|
1967
|
-
const h =
|
|
1977
|
+
const h = s(c);
|
|
1968
1978
|
$.push(` @${b}`), $.push(
|
|
1969
|
-
` private final ${C
|
|
1979
|
+
` private final ${_(C, c)} ${w.lowerFirst(h)};`
|
|
1970
1980
|
);
|
|
1971
1981
|
}
|
|
1972
1982
|
$.push("");
|
|
1973
|
-
const d = [],
|
|
1983
|
+
const d = [], N = [];
|
|
1974
1984
|
for (const c of v) {
|
|
1975
|
-
const h =
|
|
1985
|
+
const h = s(c);
|
|
1976
1986
|
d.push(
|
|
1977
|
-
`@${b} ${
|
|
1978
|
-
),
|
|
1987
|
+
`@${b} ${u(C, c)} ${w.lowerFirst(h)}`
|
|
1988
|
+
), N.push(`this.${w.lowerFirst(h)} = ${w.lowerFirst(h)};`);
|
|
1979
1989
|
}
|
|
1980
|
-
$.push(` public ${
|
|
1990
|
+
$.push(` public ${l}(${d.join(", ")}) {`), $.push(` ${N.join(`
|
|
1981
1991
|
`)}`), $.push(" }");
|
|
1982
1992
|
for (const c of v) {
|
|
1983
|
-
const h =
|
|
1984
|
-
$.push(""), $.push(` public ${C
|
|
1993
|
+
const h = s(c);
|
|
1994
|
+
$.push(""), $.push(` public ${_(C, c)} get${h} () {`), $.push(` return this.${w.lowerFirst(h)};`), $.push(" }");
|
|
1985
1995
|
}
|
|
1986
1996
|
$.push("}");
|
|
1987
1997
|
}
|
|
1988
|
-
|
|
1998
|
+
p.push({
|
|
1989
1999
|
type: "Command",
|
|
1990
|
-
imports:
|
|
2000
|
+
imports: C,
|
|
1991
2001
|
content: $.join(`
|
|
1992
2002
|
`)
|
|
1993
2003
|
});
|
|
1994
2004
|
}
|
|
1995
|
-
if (!
|
|
1996
|
-
return
|
|
2005
|
+
if (!g.has(j.CommandHandler))
|
|
2006
|
+
return p;
|
|
1997
2007
|
{
|
|
1998
|
-
const
|
|
1999
|
-
|
|
2000
|
-
const
|
|
2001
|
-
|
|
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 {`);
|
|
2002
2012
|
const v = [...o.states.designer.value._getContext().getAssociationMap()[a._attributes.__id]].filter(
|
|
2003
2013
|
(d) => d._attributes.rule === "Agg"
|
|
2004
2014
|
);
|
|
2005
2015
|
for (const d of v)
|
|
2006
|
-
|
|
2007
|
-
$.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({
|
|
2008
2018
|
type: "CommandHandler",
|
|
2009
|
-
imports:
|
|
2019
|
+
imports: C,
|
|
2010
2020
|
content: $.join(`
|
|
2011
2021
|
`)
|
|
2012
2022
|
});
|
|
2013
2023
|
}
|
|
2014
|
-
return
|
|
2024
|
+
return p;
|
|
2015
2025
|
}
|
|
2016
2026
|
), o.commands._setFacadeCommandCodeProvider((a) => {
|
|
2017
|
-
const
|
|
2027
|
+
const p = [], g = r.value.additions, b = r.value.nonNullAnnotation.split(".").pop();
|
|
2018
2028
|
{
|
|
2019
|
-
const
|
|
2020
|
-
|
|
2021
|
-
const
|
|
2022
|
-
if (
|
|
2023
|
-
|
|
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}(`);
|
|
2024
2034
|
const d = [];
|
|
2025
|
-
for (const
|
|
2026
|
-
const c =
|
|
2035
|
+
for (const N of v) {
|
|
2036
|
+
const c = s(N);
|
|
2027
2037
|
d.push(
|
|
2028
2038
|
` @${b}
|
|
2029
|
-
${
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
)} ${
|
|
2039
|
+
${_(
|
|
2040
|
+
C,
|
|
2041
|
+
N
|
|
2042
|
+
)} ${w.lowerFirst(c)}`
|
|
2033
2043
|
);
|
|
2034
2044
|
}
|
|
2035
2045
|
$.push(d.join(`,
|
|
2036
|
-
`)), $.push(") {"), $.push(` public ${
|
|
2037
|
-
} else if (
|
|
2038
|
-
$.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} {`);
|
|
2039
2049
|
for (const d of v) {
|
|
2040
|
-
const
|
|
2050
|
+
const N = s(d);
|
|
2041
2051
|
$.push(` @${b}`), $.push(
|
|
2042
|
-
` private final ${C
|
|
2052
|
+
` private final ${_(C, d)} ${w.lowerFirst(N)};`
|
|
2043
2053
|
);
|
|
2044
2054
|
}
|
|
2045
2055
|
$.push("}");
|
|
2046
2056
|
} else {
|
|
2047
|
-
$.push(`public class ${
|
|
2057
|
+
$.push(`public class ${l} {`);
|
|
2048
2058
|
for (const c of v) {
|
|
2049
|
-
const h =
|
|
2059
|
+
const h = s(c);
|
|
2050
2060
|
$.push(` @${b}`), $.push(
|
|
2051
|
-
` private final ${C
|
|
2061
|
+
` private final ${_(C, c)} ${w.lowerFirst(h)};`
|
|
2052
2062
|
);
|
|
2053
2063
|
}
|
|
2054
2064
|
$.push("");
|
|
2055
|
-
const d = [],
|
|
2065
|
+
const d = [], N = [];
|
|
2056
2066
|
for (const c of v) {
|
|
2057
|
-
const h =
|
|
2067
|
+
const h = s(c);
|
|
2058
2068
|
d.push(
|
|
2059
|
-
`@${b} ${
|
|
2060
|
-
),
|
|
2069
|
+
`@${b} ${u(C, c)} ${w.lowerFirst(h)}`
|
|
2070
|
+
), N.push(`this.${w.lowerFirst(h)} = ${w.lowerFirst(h)};`);
|
|
2061
2071
|
}
|
|
2062
|
-
$.push(` public ${
|
|
2072
|
+
$.push(` public ${l}(${d.join(", ")}) {`), $.push(` ${N.join(`
|
|
2063
2073
|
`)}`), $.push(" }");
|
|
2064
2074
|
for (const c of v) {
|
|
2065
|
-
const h =
|
|
2066
|
-
$.push(""), $.push(` public ${C
|
|
2075
|
+
const h = s(c);
|
|
2076
|
+
$.push(""), $.push(` public ${_(C, c)} get${h} () {`), $.push(` return this.${w.lowerFirst(h)};`), $.push(" }");
|
|
2067
2077
|
}
|
|
2068
2078
|
$.push("}");
|
|
2069
2079
|
}
|
|
2070
|
-
|
|
2080
|
+
p.push({
|
|
2071
2081
|
type: "FacadeCommand",
|
|
2072
|
-
imports:
|
|
2082
|
+
imports: C,
|
|
2073
2083
|
content: $.join(`
|
|
2074
2084
|
`)
|
|
2075
2085
|
});
|
|
2076
2086
|
}
|
|
2077
|
-
if (!
|
|
2078
|
-
return
|
|
2087
|
+
if (!g.has(j.CommandHandler))
|
|
2088
|
+
return p;
|
|
2079
2089
|
{
|
|
2080
|
-
const
|
|
2081
|
-
|
|
2082
|
-
const
|
|
2083
|
-
|
|
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 {`);
|
|
2084
2094
|
const v = [...o.states.designer.value._getContext().getAssociationMap()[a._attributes.__id]].filter(
|
|
2085
2095
|
(d) => d._attributes.rule === "Agg"
|
|
2086
2096
|
);
|
|
2087
2097
|
for (const d of v)
|
|
2088
|
-
|
|
2089
|
-
$.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({
|
|
2090
2100
|
type: "FacadeCommandHandler",
|
|
2091
|
-
imports:
|
|
2101
|
+
imports: C,
|
|
2092
2102
|
content: $.join(`
|
|
2093
2103
|
`)
|
|
2094
2104
|
});
|
|
2095
2105
|
}
|
|
2096
|
-
return
|
|
2106
|
+
return p;
|
|
2097
2107
|
}), o.commands._setAggCodeProvider(
|
|
2098
2108
|
(a) => {
|
|
2099
|
-
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);
|
|
2100
2110
|
{
|
|
2101
2111
|
const v = /* @__PURE__ */ new Set();
|
|
2102
|
-
v.add(
|
|
2112
|
+
v.add(r.value.nonNullAnnotation);
|
|
2103
2113
|
const d = [];
|
|
2104
|
-
d.push(`public interface ${
|
|
2114
|
+
d.push(`public interface ${C} {`);
|
|
2105
2115
|
for (const c of $) {
|
|
2106
|
-
const h =
|
|
2107
|
-
d.push(` public ${
|
|
2116
|
+
const h = s(c);
|
|
2117
|
+
d.push(` public ${_(v, c)} get${h}();`), d.push("");
|
|
2108
2118
|
}
|
|
2109
|
-
const
|
|
2110
|
-
for (const c of
|
|
2111
|
-
const h =
|
|
2112
|
-
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("");
|
|
2113
2123
|
}
|
|
2114
|
-
d.push("}"),
|
|
2124
|
+
d.push("}"), l.push({
|
|
2115
2125
|
type: "Agg",
|
|
2116
2126
|
imports: v,
|
|
2117
2127
|
content: d.join(`
|
|
@@ -2120,211 +2130,211 @@ const j = we.JavaGeneratorAddition, Oo = le.createHotSwapPlugin(() => {
|
|
|
2120
2130
|
}
|
|
2121
2131
|
{
|
|
2122
2132
|
const v = /* @__PURE__ */ new Set();
|
|
2123
|
-
v.add(
|
|
2133
|
+
v.add(r.value.nonNullAnnotation);
|
|
2124
2134
|
const d = [];
|
|
2125
|
-
if (
|
|
2135
|
+
if (f(v, $), p.has(j.Lombok)) {
|
|
2126
2136
|
d.push(
|
|
2127
|
-
|
|
2128
|
-
), d.push("@lombok.Getter"),
|
|
2129
|
-
|
|
2130
|
-
), 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} {`);
|
|
2131
2141
|
for (const c of $) {
|
|
2132
|
-
const h =
|
|
2133
|
-
d.push(` @${b}`),
|
|
2134
|
-
|
|
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"
|
|
2135
2145
|
), d.push(" @EmbeddedId"), v.add(
|
|
2136
|
-
|
|
2146
|
+
r.value.jdkVersion === "8" ? "javax.persistence.AttributeOverride" : "jakarta.persistence.AttributeOverride"
|
|
2137
2147
|
), v.add(
|
|
2138
|
-
|
|
2148
|
+
r.value.jdkVersion === "8" ? "javax.persistence.Column" : "jakarta.persistence.Column"
|
|
2139
2149
|
), d.push(
|
|
2140
|
-
` @AttributeOverride(name = "value", column = @Column(name = "${
|
|
2150
|
+
` @AttributeOverride(name = "value", column = @Column(name = "${w.camelToLowerSnake(
|
|
2141
2151
|
h
|
|
2142
2152
|
)}", updatable = false))`
|
|
2143
|
-
)) :
|
|
2144
|
-
|
|
2153
|
+
)) : m(c) ? (v.add(
|
|
2154
|
+
r.value.jdkVersion === "8" ? "javax.persistence.Embedded" : "jakarta.persistence.Embedded"
|
|
2145
2155
|
), d.push(" @Embedded"), v.add(
|
|
2146
|
-
|
|
2156
|
+
r.value.jdkVersion === "8" ? "javax.persistence.AttributeOverride" : "jakarta.persistence.AttributeOverride"
|
|
2147
2157
|
), v.add(
|
|
2148
|
-
|
|
2158
|
+
r.value.jdkVersion === "8" ? "javax.persistence.Column" : "jakarta.persistence.Column"
|
|
2149
2159
|
), d.push(
|
|
2150
|
-
` @AttributeOverride(name = "value", column = @Column(name = "${
|
|
2160
|
+
` @AttributeOverride(name = "value", column = @Column(name = "${w.camelToLowerSnake(
|
|
2151
2161
|
h
|
|
2152
2162
|
)}"))`
|
|
2153
2163
|
)) : (v.add(
|
|
2154
|
-
|
|
2155
|
-
), 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)};`);
|
|
2156
2166
|
}
|
|
2157
|
-
const
|
|
2158
|
-
for (const c of
|
|
2159
|
-
const h =
|
|
2160
|
-
v.add(`${
|
|
2161
|
-
` 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(
|
|
2162
2172
|
h
|
|
2163
2173
|
)}) {`
|
|
2164
2174
|
), d.push(" // HACK need implement"), d.push(" }");
|
|
2165
2175
|
}
|
|
2166
2176
|
d.push("}");
|
|
2167
2177
|
} else {
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
), 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} {`);
|
|
2171
2181
|
for (const y of $) {
|
|
2172
|
-
const O =
|
|
2173
|
-
d.push(` @${b}`),
|
|
2174
|
-
|
|
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"
|
|
2175
2185
|
), d.push(" @EmbeddedId"), v.add(
|
|
2176
|
-
|
|
2186
|
+
r.value.jdkVersion === "8" ? "javax.persistence.AttributeOverride" : "jakarta.persistence.AttributeOverride"
|
|
2177
2187
|
), v.add(
|
|
2178
|
-
|
|
2188
|
+
r.value.jdkVersion === "8" ? "javax.persistence.Column" : "jakarta.persistence.Column"
|
|
2179
2189
|
), d.push(
|
|
2180
|
-
` @AttributeOverride(name = "value", column = @Column(name = "${
|
|
2190
|
+
` @AttributeOverride(name = "value", column = @Column(name = "${w.camelToLowerSnake(
|
|
2181
2191
|
O
|
|
2182
2192
|
)}", updatable = false))`
|
|
2183
|
-
)) :
|
|
2184
|
-
|
|
2193
|
+
)) : m(y) ? (v.add(
|
|
2194
|
+
r.value.jdkVersion === "8" ? "javax.persistence.Embedded" : "jakarta.persistence.Embedded"
|
|
2185
2195
|
), d.push(" @Embedded"), v.add(
|
|
2186
|
-
|
|
2196
|
+
r.value.jdkVersion === "8" ? "javax.persistence.AttributeOverride" : "jakarta.persistence.AttributeOverride"
|
|
2187
2197
|
), v.add(
|
|
2188
|
-
|
|
2198
|
+
r.value.jdkVersion === "8" ? "javax.persistence.Column" : "jakarta.persistence.Column"
|
|
2189
2199
|
), d.push(
|
|
2190
|
-
` @AttributeOverride(name = "value", column = @Column(name = "${
|
|
2200
|
+
` @AttributeOverride(name = "value", column = @Column(name = "${w.camelToLowerSnake(
|
|
2191
2201
|
O
|
|
2192
2202
|
)}"))`
|
|
2193
2203
|
)) : (v.add(
|
|
2194
|
-
|
|
2195
|
-
), 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)};`);
|
|
2196
2206
|
}
|
|
2197
2207
|
d.push("");
|
|
2198
|
-
const
|
|
2208
|
+
const N = [], c = [];
|
|
2199
2209
|
for (const y of $) {
|
|
2200
|
-
if (
|
|
2210
|
+
if (p.has(j.Jpa))
|
|
2201
2211
|
break;
|
|
2202
|
-
const O =
|
|
2203
|
-
|
|
2204
|
-
`@${b} ${
|
|
2205
|
-
), 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)};`);
|
|
2206
2216
|
}
|
|
2207
|
-
d.push(` public ${
|
|
2217
|
+
d.push(` public ${C}Impl(${N.join(", ")}) {`), d.push(` ${c.join(`
|
|
2208
2218
|
`)}`), d.push(" }");
|
|
2209
2219
|
for (const y of $) {
|
|
2210
|
-
const O =
|
|
2211
|
-
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(" }");
|
|
2212
2222
|
}
|
|
2213
|
-
const h = [...
|
|
2223
|
+
const h = [...g._getContext().getAssociationMap()[a._attributes.__id]].filter(
|
|
2214
2224
|
(y) => y._attributes.rule === "Command" || y._attributes.rule === "FacadeCommand"
|
|
2215
2225
|
);
|
|
2216
2226
|
for (const y of h) {
|
|
2217
|
-
const O =
|
|
2218
|
-
v.add(`${
|
|
2219
|
-
` 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(
|
|
2220
2230
|
O
|
|
2221
2231
|
)}) {`
|
|
2222
2232
|
), d.push(" // HACK need implement"), d.push(" }");
|
|
2223
2233
|
}
|
|
2224
2234
|
d.push("}");
|
|
2225
2235
|
}
|
|
2226
|
-
|
|
2236
|
+
l.push({
|
|
2227
2237
|
type: "AggImpl",
|
|
2228
2238
|
imports: v,
|
|
2229
2239
|
content: d.join(`
|
|
2230
2240
|
`)
|
|
2231
2241
|
});
|
|
2232
2242
|
}
|
|
2233
|
-
return
|
|
2243
|
+
return l;
|
|
2234
2244
|
}
|
|
2235
2245
|
), o.commands._setEventCodeProvider(
|
|
2236
2246
|
(a) => {
|
|
2237
|
-
const
|
|
2238
|
-
|
|
2239
|
-
const
|
|
2240
|
-
if (
|
|
2241
|
-
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}(`);
|
|
2242
2252
|
const v = [];
|
|
2243
2253
|
for (const d of $) {
|
|
2244
|
-
const
|
|
2254
|
+
const N = s(d);
|
|
2245
2255
|
v.push(
|
|
2246
|
-
` @${
|
|
2247
|
-
${
|
|
2248
|
-
|
|
2256
|
+
` @${g}
|
|
2257
|
+
${_(
|
|
2258
|
+
p,
|
|
2249
2259
|
d
|
|
2250
|
-
)} ${
|
|
2260
|
+
)} ${w.lowerFirst(N)}`
|
|
2251
2261
|
);
|
|
2252
2262
|
}
|
|
2253
|
-
|
|
2254
|
-
`)),
|
|
2263
|
+
l.push(v.join(`,
|
|
2264
|
+
`)), l.push(") {"), l.push(` public ${C} {`), l.push(" // HACK check value"), l.push(" }"), l.push("}");
|
|
2255
2265
|
} else if (b.has(j.Lombok)) {
|
|
2256
|
-
|
|
2266
|
+
l.push("@lombok.AllArgsConstructor"), l.push("@lombok.Getter"), b.has(j.LombokBuilder) && l.push("@lombok.Builder(toBuilder = true)"), l.push(`public class ${C} {`);
|
|
2257
2267
|
for (const v of $) {
|
|
2258
|
-
const d =
|
|
2259
|
-
|
|
2260
|
-
` private final ${
|
|
2268
|
+
const d = s(v);
|
|
2269
|
+
l.push(` @${g}`), l.push(
|
|
2270
|
+
` private final ${_(p, v)} ${w.lowerFirst(d)};`
|
|
2261
2271
|
);
|
|
2262
2272
|
}
|
|
2263
|
-
|
|
2273
|
+
l.push("}");
|
|
2264
2274
|
} else {
|
|
2265
|
-
|
|
2266
|
-
for (const
|
|
2267
|
-
const c =
|
|
2268
|
-
|
|
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)};`);
|
|
2269
2279
|
}
|
|
2270
|
-
|
|
2280
|
+
l.push("");
|
|
2271
2281
|
const v = [], d = [];
|
|
2272
|
-
for (const
|
|
2273
|
-
const c =
|
|
2282
|
+
for (const N of $) {
|
|
2283
|
+
const c = s(N);
|
|
2274
2284
|
v.push(
|
|
2275
|
-
`@${
|
|
2276
|
-
), d.push(`this.${
|
|
2285
|
+
`@${g} ${u(p, N)} ${w.lowerFirst(c)}`
|
|
2286
|
+
), d.push(`this.${w.lowerFirst(c)} = ${w.lowerFirst(c)};`);
|
|
2277
2287
|
}
|
|
2278
|
-
|
|
2279
|
-
`)}`),
|
|
2280
|
-
for (const
|
|
2281
|
-
const c =
|
|
2282
|
-
|
|
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(" }");
|
|
2283
2293
|
}
|
|
2284
|
-
|
|
2294
|
+
l.push("}");
|
|
2285
2295
|
}
|
|
2286
2296
|
return [
|
|
2287
2297
|
{
|
|
2288
2298
|
type: "Event",
|
|
2289
|
-
imports:
|
|
2290
|
-
content:
|
|
2299
|
+
imports: p,
|
|
2300
|
+
content: l.join(`
|
|
2291
2301
|
`)
|
|
2292
2302
|
}
|
|
2293
2303
|
];
|
|
2294
2304
|
}
|
|
2295
2305
|
), o.commands._setReadModelCodeProvider(() => []), o.commands._setCodeFileProvider(() => {
|
|
2296
|
-
const a = [],
|
|
2297
|
-
function
|
|
2306
|
+
const a = [], p = {};
|
|
2307
|
+
function g(v) {
|
|
2298
2308
|
for (const d of Object.values(v)) {
|
|
2299
|
-
if (!
|
|
2309
|
+
if (!m(d))
|
|
2300
2310
|
continue;
|
|
2301
|
-
const
|
|
2302
|
-
if (
|
|
2311
|
+
const N = [...r.value.namespace.split(/\./), r.value.moduleName, e], c = s(d) + ".java";
|
|
2312
|
+
if (p[`${N.join("/")}/${c}`] === !0)
|
|
2303
2313
|
continue;
|
|
2304
2314
|
const h = o.commands._genInfoCode(d);
|
|
2305
2315
|
if (h.length === 0)
|
|
2306
2316
|
continue;
|
|
2307
|
-
const y = new
|
|
2308
|
-
y.appendContentln(`package ${
|
|
2317
|
+
const y = new A(N, c);
|
|
2318
|
+
y.appendContentln(`package ${r.value.namespace}.${r.value.moduleName}.${e};`), y.appendContentln("");
|
|
2309
2319
|
for (const O of h[0].imports)
|
|
2310
2320
|
y.appendContentln(`import ${O};`);
|
|
2311
|
-
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;
|
|
2312
2322
|
}
|
|
2313
2323
|
}
|
|
2314
2324
|
const b = o.states.designer.value._getContext().getCommands();
|
|
2315
2325
|
for (const v of b) {
|
|
2316
|
-
|
|
2317
|
-
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];
|
|
2318
2328
|
d.forEach((c) => {
|
|
2319
2329
|
if (c.type === "Command") {
|
|
2320
|
-
const h = new
|
|
2321
|
-
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);
|
|
2322
2332
|
for (const y of c.imports)
|
|
2323
2333
|
h.appendContentln(`import ${y};`);
|
|
2324
2334
|
h.appendContentln(""), h.appendContentln(c.content), a.push(h);
|
|
2325
2335
|
} else if (c.type === "CommandHandler") {
|
|
2326
|
-
const h = new
|
|
2327
|
-
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);
|
|
2328
2338
|
for (const y of c.imports)
|
|
2329
2339
|
h.appendContentln(`import ${y};`);
|
|
2330
2340
|
h.appendContentln(""), h.appendContentln(c.content), a.push(h);
|
|
@@ -2332,20 +2342,20 @@ const j = we.JavaGeneratorAddition, Oo = le.createHotSwapPlugin(() => {
|
|
|
2332
2342
|
isNever(c.type);
|
|
2333
2343
|
});
|
|
2334
2344
|
}
|
|
2335
|
-
const
|
|
2336
|
-
for (const v of
|
|
2337
|
-
|
|
2338
|
-
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];
|
|
2339
2349
|
d.forEach((c) => {
|
|
2340
2350
|
if (c.type === "FacadeCommand") {
|
|
2341
|
-
const h = new
|
|
2342
|
-
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);
|
|
2343
2353
|
for (const y of c.imports)
|
|
2344
2354
|
h.appendContentln(`import ${y};`);
|
|
2345
2355
|
h.appendContentln(""), h.appendContentln(c.content), a.push(h);
|
|
2346
2356
|
} else if (c.type === "FacadeCommandHandler") {
|
|
2347
|
-
const h = new
|
|
2348
|
-
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);
|
|
2349
2359
|
for (const y of c.imports)
|
|
2350
2360
|
h.appendContentln(`import ${y};`);
|
|
2351
2361
|
h.appendContentln(""), h.appendContentln(c.content), a.push(h);
|
|
@@ -2353,20 +2363,20 @@ const j = we.JavaGeneratorAddition, Oo = le.createHotSwapPlugin(() => {
|
|
|
2353
2363
|
isNever(c.type);
|
|
2354
2364
|
});
|
|
2355
2365
|
}
|
|
2356
|
-
const
|
|
2357
|
-
for (const v of
|
|
2358
|
-
|
|
2359
|
-
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];
|
|
2360
2370
|
d.forEach((c) => {
|
|
2361
2371
|
if (c.type === "Agg") {
|
|
2362
|
-
const h = new
|
|
2363
|
-
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);
|
|
2364
2374
|
for (const y of c.imports)
|
|
2365
2375
|
h.appendContentln(`import ${y};`);
|
|
2366
2376
|
h.appendContentln(""), h.appendContentln(c.content), a.push(h);
|
|
2367
2377
|
} else if (c.type === "AggImpl") {
|
|
2368
|
-
const h = new
|
|
2369
|
-
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);
|
|
2370
2380
|
for (const y of c.imports)
|
|
2371
2381
|
h.appendContentln(`import ${y};`);
|
|
2372
2382
|
h.appendContentln(""), h.appendContentln(c.content), a.push(h);
|
|
@@ -2376,11 +2386,11 @@ const j = we.JavaGeneratorAddition, Oo = le.createHotSwapPlugin(() => {
|
|
|
2376
2386
|
}
|
|
2377
2387
|
const $ = o.states.designer.value._getContext().getEvents();
|
|
2378
2388
|
for (const v of $) {
|
|
2379
|
-
|
|
2380
|
-
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];
|
|
2381
2391
|
d.forEach((c) => {
|
|
2382
|
-
const h = new
|
|
2383
|
-
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);
|
|
2384
2394
|
for (const y of c.imports)
|
|
2385
2395
|
h.appendContentln(`import ${y};`);
|
|
2386
2396
|
h.appendContentln(""), h.appendContentln(c.content), a.push(h);
|
|
@@ -2390,427 +2400,427 @@ const j = we.JavaGeneratorAddition, Oo = le.createHotSwapPlugin(() => {
|
|
|
2390
2400
|
});
|
|
2391
2401
|
}
|
|
2392
2402
|
};
|
|
2393
|
-
}), Pe =
|
|
2403
|
+
}), Pe = we.KotlinGeneratorAddition, xo = de.createHotSwapPlugin(() => ({
|
|
2394
2404
|
unmount({ api: e }) {
|
|
2395
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({});
|
|
2396
2406
|
},
|
|
2397
2407
|
mount({ api: e }) {
|
|
2398
|
-
const n = "value", t = e.states.context,
|
|
2399
|
-
function o(
|
|
2400
|
-
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));
|
|
2401
2411
|
}
|
|
2402
|
-
function
|
|
2403
|
-
return o(
|
|
2412
|
+
function r(f, u) {
|
|
2413
|
+
return o(u) ? w.stringToUpperCamel(u._attributes.name) : _(f, u);
|
|
2404
2414
|
}
|
|
2405
|
-
function
|
|
2406
|
-
return
|
|
2415
|
+
function i(f) {
|
|
2416
|
+
return w.stringToUpperCamel(f._attributes.name);
|
|
2407
2417
|
}
|
|
2408
|
-
function
|
|
2409
|
-
for (const a of
|
|
2418
|
+
function m(f, u) {
|
|
2419
|
+
for (const a of u) {
|
|
2410
2420
|
if (!o(a)) {
|
|
2411
|
-
|
|
2421
|
+
_(f, a);
|
|
2412
2422
|
continue;
|
|
2413
2423
|
}
|
|
2414
|
-
|
|
2415
|
-
`${t.value.namespace}.${t.value.moduleName}.${n}.${
|
|
2424
|
+
f.add(
|
|
2425
|
+
`${t.value.namespace}.${t.value.moduleName}.${n}.${i(a)}`
|
|
2416
2426
|
);
|
|
2417
2427
|
}
|
|
2418
2428
|
}
|
|
2419
|
-
function
|
|
2420
|
-
const a = t.value.additions,
|
|
2421
|
-
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";
|
|
2422
2432
|
}
|
|
2423
2433
|
e.commands._setInfoCodeProvider(
|
|
2424
|
-
(
|
|
2425
|
-
const
|
|
2426
|
-
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)})`), [
|
|
2427
2437
|
{
|
|
2428
2438
|
type: "Info",
|
|
2429
|
-
imports:
|
|
2430
|
-
content:
|
|
2439
|
+
imports: u,
|
|
2440
|
+
content: g.join(`
|
|
2431
2441
|
`)
|
|
2432
2442
|
}
|
|
2433
2443
|
];
|
|
2434
2444
|
}
|
|
2435
2445
|
), e.commands._setCommandCodeProvider(
|
|
2436
|
-
(
|
|
2437
|
-
const
|
|
2446
|
+
(f) => {
|
|
2447
|
+
const u = [], a = t.value.additions;
|
|
2438
2448
|
{
|
|
2439
|
-
const
|
|
2440
|
-
|
|
2441
|
-
const
|
|
2442
|
-
for (const $ of
|
|
2443
|
-
const v =
|
|
2444
|
-
|
|
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, $)}`);
|
|
2445
2455
|
}
|
|
2446
|
-
b.push(`data class ${
|
|
2456
|
+
b.push(`data class ${g}(${l.join(", ")})`), u.push({
|
|
2447
2457
|
type: "Command",
|
|
2448
|
-
imports:
|
|
2458
|
+
imports: p,
|
|
2449
2459
|
content: b.join(`
|
|
2450
2460
|
`)
|
|
2451
2461
|
});
|
|
2452
2462
|
}
|
|
2453
2463
|
if (!a.has(Pe.CommandHandler))
|
|
2454
|
-
return
|
|
2464
|
+
return u;
|
|
2455
2465
|
{
|
|
2456
|
-
const
|
|
2457
|
-
b.push(`class ${
|
|
2458
|
-
const
|
|
2459
|
-
(
|
|
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"
|
|
2460
2470
|
);
|
|
2461
|
-
for (const
|
|
2462
|
-
|
|
2463
|
-
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({
|
|
2464
2474
|
type: "CommandHandler",
|
|
2465
|
-
imports:
|
|
2475
|
+
imports: p,
|
|
2466
2476
|
content: b.join(`
|
|
2467
2477
|
`)
|
|
2468
2478
|
});
|
|
2469
2479
|
}
|
|
2470
|
-
return
|
|
2480
|
+
return u;
|
|
2471
2481
|
}
|
|
2472
2482
|
), e.commands._setFacadeCommandCodeProvider(
|
|
2473
|
-
(
|
|
2474
|
-
const
|
|
2475
|
-
|
|
2483
|
+
(f) => {
|
|
2484
|
+
const u = /* @__PURE__ */ new Set(), a = i(f), p = [], g = Object.values(f.inner);
|
|
2485
|
+
m(u, g);
|
|
2476
2486
|
const b = [];
|
|
2477
|
-
for (const
|
|
2478
|
-
const
|
|
2479
|
-
b.push(`val ${
|
|
2487
|
+
for (const C of g) {
|
|
2488
|
+
const l = i(C);
|
|
2489
|
+
b.push(`val ${w.lowerFirst(l)}: ${r(u, C)}`);
|
|
2480
2490
|
}
|
|
2481
|
-
return
|
|
2491
|
+
return p.push(`data class ${a}(${b.join(", ")})`), [
|
|
2482
2492
|
{
|
|
2483
2493
|
type: "FacadeCommand",
|
|
2484
|
-
imports:
|
|
2485
|
-
content:
|
|
2494
|
+
imports: u,
|
|
2495
|
+
content: p.join(`
|
|
2486
2496
|
`)
|
|
2487
2497
|
}
|
|
2488
2498
|
];
|
|
2489
2499
|
}
|
|
2490
|
-
), e.commands._setAggCodeProvider((
|
|
2491
|
-
const
|
|
2492
|
-
|
|
2493
|
-
const
|
|
2494
|
-
for (const v of
|
|
2495
|
-
const d =
|
|
2496
|
-
|
|
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})`);
|
|
2497
2507
|
}
|
|
2498
|
-
|
|
2499
|
-
`)}`),
|
|
2508
|
+
g.push(`interface ${p} {`), g.push(` ${C.join(`
|
|
2509
|
+
`)}`), g.push("}"), g.push(""), g.push(`class ${p}Impl(`);
|
|
2500
2510
|
const $ = [];
|
|
2501
2511
|
for (const v of b) {
|
|
2502
|
-
const d =
|
|
2503
|
-
$.push(`val ${
|
|
2512
|
+
const d = i(v);
|
|
2513
|
+
$.push(`val ${w.lowerFirst(d)}: ${r(u, v)}`);
|
|
2504
2514
|
}
|
|
2505
|
-
|
|
2506
|
-
`)}`),
|
|
2507
|
-
for (const v of
|
|
2508
|
-
const d =
|
|
2509
|
-
|
|
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(" }");
|
|
2510
2520
|
}
|
|
2511
|
-
return
|
|
2521
|
+
return g.push("}"), [
|
|
2512
2522
|
{
|
|
2513
2523
|
type: "Agg",
|
|
2514
|
-
imports:
|
|
2515
|
-
content:
|
|
2524
|
+
imports: u,
|
|
2525
|
+
content: g.join(`
|
|
2516
2526
|
`)
|
|
2517
2527
|
}
|
|
2518
2528
|
];
|
|
2519
2529
|
}), e.commands._setEventCodeProvider(
|
|
2520
|
-
(
|
|
2521
|
-
const
|
|
2522
|
-
|
|
2530
|
+
(f) => {
|
|
2531
|
+
const u = /* @__PURE__ */ new Set(), a = i(f), p = [], g = Object.values(f.inner);
|
|
2532
|
+
m(u, g);
|
|
2523
2533
|
const b = [];
|
|
2524
|
-
for (const
|
|
2525
|
-
const
|
|
2526
|
-
b.push(`val ${
|
|
2534
|
+
for (const C of g) {
|
|
2535
|
+
const l = i(C);
|
|
2536
|
+
b.push(`val ${w.lowerFirst(l)}: ${r(u, C)}`);
|
|
2527
2537
|
}
|
|
2528
|
-
return
|
|
2538
|
+
return p.push(`data class ${a}(${b.join(", ")})`), [
|
|
2529
2539
|
{
|
|
2530
2540
|
type: "Event",
|
|
2531
|
-
imports:
|
|
2532
|
-
content:
|
|
2541
|
+
imports: u,
|
|
2542
|
+
content: p.join(`
|
|
2533
2543
|
`)
|
|
2534
2544
|
}
|
|
2535
2545
|
];
|
|
2536
2546
|
}
|
|
2537
2547
|
), e.commands._setReadModelCodeProvider(() => []), e.commands._setCodeFileProvider(() => {
|
|
2538
|
-
const
|
|
2539
|
-
function a(
|
|
2540
|
-
for (const $ of Object.values(
|
|
2548
|
+
const f = [], u = {};
|
|
2549
|
+
function a(l) {
|
|
2550
|
+
for (const $ of Object.values(l)) {
|
|
2541
2551
|
if (!o($))
|
|
2542
2552
|
continue;
|
|
2543
|
-
const v = [...t.value.namespace.split(/\./), t.value.moduleName, n], d =
|
|
2544
|
-
if (
|
|
2553
|
+
const v = [...t.value.namespace.split(/\./), t.value.moduleName, n], d = i($) + ".kt";
|
|
2554
|
+
if (u[`${v.join("/")}/${d}`] === !0)
|
|
2545
2555
|
continue;
|
|
2546
|
-
const
|
|
2547
|
-
if (
|
|
2556
|
+
const N = e.commands._genInfoCode($);
|
|
2557
|
+
if (N.length === 0)
|
|
2548
2558
|
continue;
|
|
2549
|
-
const c = new
|
|
2559
|
+
const c = new A(v, d);
|
|
2550
2560
|
c.appendContentln(`package ${t.value.namespace}.${t.value.moduleName}.${n}`), c.appendContentln("");
|
|
2551
|
-
for (const h of
|
|
2561
|
+
for (const h of N[0].imports)
|
|
2552
2562
|
c.appendContentln(`import ${h}`);
|
|
2553
|
-
c.appendContentln(""), c.appendContentln(
|
|
2563
|
+
c.appendContentln(""), c.appendContentln(N[0].content), f.push(c), u[`${v.join("/")}/${d}`] = !0;
|
|
2554
2564
|
}
|
|
2555
2565
|
}
|
|
2556
|
-
const
|
|
2557
|
-
for (const
|
|
2558
|
-
a(
|
|
2559
|
-
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 = [];
|
|
2560
2570
|
d.appendContentln(`package ${t.value.namespace}.${t.value.moduleName}`), d.appendContentln(""), $.forEach((c) => {
|
|
2561
|
-
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);
|
|
2562
2572
|
});
|
|
2563
2573
|
for (const c of d.getImports())
|
|
2564
2574
|
d.appendContentln(`import ${c}`);
|
|
2565
2575
|
d.appendContentln("");
|
|
2566
|
-
for (const c of
|
|
2576
|
+
for (const c of N)
|
|
2567
2577
|
d.appendContentln(c);
|
|
2568
|
-
|
|
2578
|
+
f.push(d);
|
|
2569
2579
|
}
|
|
2570
|
-
const
|
|
2571
|
-
for (const
|
|
2572
|
-
a(
|
|
2573
|
-
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 = [];
|
|
2574
2584
|
d.appendContentln(`package ${t.value.namespace}.${t.value.moduleName}`), d.appendContentln(""), $.forEach((c) => {
|
|
2575
|
-
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);
|
|
2576
2586
|
});
|
|
2577
2587
|
for (const c of d.getImports())
|
|
2578
2588
|
d.appendContentln(`import ${c}`);
|
|
2579
2589
|
d.appendContentln("");
|
|
2580
|
-
for (const c of
|
|
2590
|
+
for (const c of N)
|
|
2581
2591
|
d.appendContentln(c);
|
|
2582
|
-
|
|
2592
|
+
f.push(d);
|
|
2583
2593
|
}
|
|
2584
2594
|
const b = e.states.designer.value._getContext().getAggs();
|
|
2585
|
-
for (const
|
|
2586
|
-
a(
|
|
2587
|
-
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 = [];
|
|
2588
2598
|
d.appendContentln(`package ${t.value.namespace}.${t.value.moduleName}`), d.appendContentln(""), $.forEach((c) => {
|
|
2589
|
-
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);
|
|
2590
2600
|
});
|
|
2591
2601
|
for (const c of d.getImports())
|
|
2592
2602
|
d.appendContentln(`import ${c}`);
|
|
2593
2603
|
d.appendContentln("");
|
|
2594
|
-
for (const c of
|
|
2604
|
+
for (const c of N)
|
|
2595
2605
|
d.appendContentln(c);
|
|
2596
|
-
|
|
2606
|
+
f.push(d);
|
|
2597
2607
|
}
|
|
2598
|
-
const
|
|
2599
|
-
for (const
|
|
2600
|
-
a(
|
|
2601
|
-
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];
|
|
2602
2612
|
$.forEach((d) => {
|
|
2603
2613
|
if (d.type === "Event") {
|
|
2604
|
-
const
|
|
2605
|
-
|
|
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);
|
|
2606
2616
|
for (const c of d.imports)
|
|
2607
|
-
|
|
2608
|
-
|
|
2617
|
+
N.appendContentln(`import ${c}`);
|
|
2618
|
+
N.appendContentln(""), N.appendContentln(d.content), f.push(N);
|
|
2609
2619
|
} else
|
|
2610
2620
|
isNever(d.type);
|
|
2611
2621
|
});
|
|
2612
2622
|
}
|
|
2613
|
-
return
|
|
2623
|
+
return f;
|
|
2614
2624
|
});
|
|
2615
2625
|
}
|
|
2616
|
-
})),
|
|
2626
|
+
})), To = de.createHotSwapPlugin(() => ({
|
|
2617
2627
|
unmount({ api: e }) {
|
|
2618
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({});
|
|
2619
2629
|
},
|
|
2620
2630
|
mount({ api: e }) {
|
|
2621
|
-
const n = e.states.context, t = e.states.designer.value._getContext().getDesignerOptions().ignoreValueObjects.map((
|
|
2622
|
-
function
|
|
2623
|
-
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));
|
|
2624
2634
|
}
|
|
2625
|
-
function o(
|
|
2626
|
-
return
|
|
2635
|
+
function o(_, f) {
|
|
2636
|
+
return s(f) ? w.stringToUpperCamel(f._attributes.name) : m(_, f);
|
|
2627
2637
|
}
|
|
2628
|
-
function
|
|
2629
|
-
return
|
|
2638
|
+
function r(_) {
|
|
2639
|
+
return w.stringToUpperCamel(_._attributes.name);
|
|
2630
2640
|
}
|
|
2631
|
-
function
|
|
2632
|
-
return
|
|
2641
|
+
function i(_) {
|
|
2642
|
+
return w.stringToLowerCamel(_._attributes.name);
|
|
2633
2643
|
}
|
|
2634
|
-
function _
|
|
2635
|
-
const
|
|
2636
|
-
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";
|
|
2637
2647
|
}
|
|
2638
2648
|
e.commands._setInfoCodeProvider(
|
|
2639
|
-
(
|
|
2640
|
-
const
|
|
2641
|
-
return
|
|
2642
|
-
`func New${
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
)}) ${
|
|
2646
|
-
),
|
|
2647
|
-
`func (${
|
|
2648
|
-
|
|
2649
|
-
|
|
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
|
+
_
|
|
2650
2660
|
)} {`
|
|
2651
|
-
),
|
|
2661
|
+
), u.push(` return ${i(_)}.value`), u.push("}"), [{ type: "Info", imports: f, content: u.join(`
|
|
2652
2662
|
`) }];
|
|
2653
2663
|
}
|
|
2654
2664
|
), e.commands._setCommandCodeProvider(
|
|
2655
|
-
(
|
|
2656
|
-
const
|
|
2657
|
-
|
|
2658
|
-
const
|
|
2659
|
-
for (const
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
for (const
|
|
2663
|
-
|
|
2664
|
-
`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(
|
|
2665
2675
|
a,
|
|
2666
|
-
|
|
2676
|
+
l
|
|
2667
2677
|
)} {`
|
|
2668
|
-
),
|
|
2669
|
-
const b = [],
|
|
2670
|
-
for (const
|
|
2671
|
-
b.push(`${
|
|
2672
|
-
return
|
|
2673
|
-
`)},`),
|
|
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(`
|
|
2674
2684
|
`) }];
|
|
2675
2685
|
}
|
|
2676
2686
|
), e.commands._setFacadeCommandCodeProvider(
|
|
2677
|
-
(
|
|
2678
|
-
const
|
|
2679
|
-
|
|
2680
|
-
for (const
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
for (const
|
|
2684
|
-
|
|
2685
|
-
`func (${
|
|
2686
|
-
|
|
2687
|
-
|
|
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
|
|
2688
2698
|
)} {`
|
|
2689
|
-
),
|
|
2690
|
-
const b = [],
|
|
2691
|
-
for (const
|
|
2692
|
-
b.push(`${
|
|
2693
|
-
return
|
|
2694
|
-
`)},`),
|
|
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("}"), [
|
|
2695
2705
|
{
|
|
2696
2706
|
type: "FacadeCommand",
|
|
2697
|
-
imports:
|
|
2698
|
-
content:
|
|
2707
|
+
imports: p,
|
|
2708
|
+
content: g.join(`
|
|
2699
2709
|
`)
|
|
2700
2710
|
}
|
|
2701
2711
|
];
|
|
2702
2712
|
}
|
|
2703
|
-
), e.commands._setAggCodeProvider((
|
|
2704
|
-
const
|
|
2705
|
-
b.push(`type ${
|
|
2706
|
-
for (const v of
|
|
2707
|
-
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)}`);
|
|
2708
2718
|
b.push("}");
|
|
2709
|
-
for (const v of
|
|
2719
|
+
for (const v of p)
|
|
2710
2720
|
b.push(
|
|
2711
|
-
`func (${a} ${
|
|
2712
|
-
|
|
2721
|
+
`func (${a} ${u}) Get${r(v)} () ${o(
|
|
2722
|
+
g,
|
|
2713
2723
|
v
|
|
2714
2724
|
)} {`
|
|
2715
|
-
), b.push(` return ${a}.${
|
|
2716
|
-
const
|
|
2717
|
-
for (const v of
|
|
2718
|
-
|
|
2719
|
-
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(`,
|
|
2720
2730
|
`)},`), b.push(" }"), b.push("}"), b.push("");
|
|
2721
|
-
const $ = [...
|
|
2731
|
+
const $ = [...f._getContext().getAssociationMap()[_._attributes.__id]].filter((v) => v._attributes.rule === "Command" || v._attributes.rule === "FacadeCommand");
|
|
2722
2732
|
for (const v of $) {
|
|
2723
|
-
const d =
|
|
2724
|
-
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("}");
|
|
2725
2735
|
}
|
|
2726
2736
|
return [
|
|
2727
2737
|
{
|
|
2728
2738
|
type: "Agg",
|
|
2729
|
-
imports:
|
|
2739
|
+
imports: g,
|
|
2730
2740
|
content: b.join(`
|
|
2731
2741
|
`)
|
|
2732
2742
|
}
|
|
2733
2743
|
];
|
|
2734
2744
|
}), e.commands._setEventCodeProvider(
|
|
2735
|
-
(
|
|
2736
|
-
const
|
|
2737
|
-
|
|
2738
|
-
for (const
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
for (const
|
|
2742
|
-
|
|
2743
|
-
`func (${
|
|
2744
|
-
|
|
2745
|
-
|
|
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
|
|
2746
2756
|
)} {`
|
|
2747
|
-
),
|
|
2748
|
-
const b = [],
|
|
2749
|
-
for (const
|
|
2750
|
-
b.push(`${
|
|
2751
|
-
return
|
|
2752
|
-
`)},`),
|
|
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("}"), [
|
|
2753
2763
|
{
|
|
2754
2764
|
type: "Event",
|
|
2755
|
-
imports:
|
|
2756
|
-
content:
|
|
2765
|
+
imports: u,
|
|
2766
|
+
content: f.join(`
|
|
2757
2767
|
`)
|
|
2758
2768
|
}
|
|
2759
2769
|
];
|
|
2760
2770
|
}
|
|
2761
2771
|
), e.commands._setCodeFileProvider(() => {
|
|
2762
|
-
const
|
|
2763
|
-
function
|
|
2764
|
-
for (const c of Object.values(
|
|
2765
|
-
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))
|
|
2766
2776
|
continue;
|
|
2767
|
-
const h =
|
|
2768
|
-
if (
|
|
2777
|
+
const h = r(c);
|
|
2778
|
+
if (f[`${u.join("/")}/${h}`] === !0)
|
|
2769
2779
|
continue;
|
|
2770
2780
|
const y = e.commands._genInfoCode(c);
|
|
2771
|
-
y.length !== 0 && (
|
|
2781
|
+
y.length !== 0 && (g.addImports(y[0].imports), b.push(y[0].content), b.push(""), f[`${u.join("/")}/${h}`] = !0);
|
|
2772
2782
|
}
|
|
2773
2783
|
}
|
|
2774
|
-
const
|
|
2775
|
-
for (const
|
|
2776
|
-
|
|
2777
|
-
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);
|
|
2778
2788
|
for (const h of c)
|
|
2779
|
-
|
|
2789
|
+
f[h.content] !== !0 && (a.addImports(h.imports), p.push(h.content));
|
|
2780
2790
|
}
|
|
2781
2791
|
const $ = e.states.designer.value._getContext().getFacadeCommands();
|
|
2782
|
-
for (const
|
|
2783
|
-
|
|
2784
|
-
const c = e.commands._genFacadeCommandCode(
|
|
2792
|
+
for (const N of $) {
|
|
2793
|
+
C(N.inner);
|
|
2794
|
+
const c = e.commands._genFacadeCommandCode(N);
|
|
2785
2795
|
for (const h of c)
|
|
2786
|
-
|
|
2796
|
+
f[h.content] !== !0 && (a.addImports(h.imports), p.push(h.content));
|
|
2787
2797
|
}
|
|
2788
2798
|
const v = e.states.designer.value._getContext().getAggs();
|
|
2789
|
-
for (const
|
|
2790
|
-
|
|
2791
|
-
const c = e.commands._genAggCode(
|
|
2799
|
+
for (const N of v) {
|
|
2800
|
+
C(N.inner);
|
|
2801
|
+
const c = e.commands._genAggCode(N);
|
|
2792
2802
|
for (const h of c)
|
|
2793
|
-
|
|
2803
|
+
f[h.content] !== !0 && (a.addImports(h.imports), p.push(h.content));
|
|
2794
2804
|
}
|
|
2795
2805
|
const d = e.states.designer.value._getContext().getEvents();
|
|
2796
|
-
for (const
|
|
2797
|
-
|
|
2798
|
-
const c = e.commands._genEventCode(
|
|
2806
|
+
for (const N of d) {
|
|
2807
|
+
C(N.inner);
|
|
2808
|
+
const c = e.commands._genEventCode(N);
|
|
2799
2809
|
for (const h of c)
|
|
2800
|
-
|
|
2810
|
+
f[h.content] !== !0 && (a.addImports(h.imports), p.push(h.content));
|
|
2801
2811
|
}
|
|
2802
2812
|
return a.appendContentln(`package ${n.value.moduleName}`), a.appendContentln(""), a.getImports().length > 0 && (a.appendContentln("import ("), a.appendContentln(` ${[...a.getImports()].join(`
|
|
2803
|
-
`)}`), a.appendContentln(")")), a.appendContentln(
|
|
2804
|
-
`)),
|
|
2805
|
-
`)}`),
|
|
2806
|
-
`)),
|
|
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), _;
|
|
2807
2817
|
});
|
|
2808
2818
|
}
|
|
2809
|
-
})), M = ye.CSharpGeneratorAddition,
|
|
2819
|
+
})), M = ye.CSharpGeneratorAddition, Do = de.createHotSwapPlugin(() => {
|
|
2810
2820
|
const e = " ";
|
|
2811
|
-
function n(t,
|
|
2821
|
+
function n(t, s = 1) {
|
|
2812
2822
|
return t.split(`
|
|
2813
|
-
`).map((o) => e.repeat(
|
|
2823
|
+
`).map((o) => e.repeat(s) + o).join(`
|
|
2814
2824
|
`);
|
|
2815
2825
|
}
|
|
2816
2826
|
return {
|
|
@@ -2818,179 +2828,179 @@ const j = we.JavaGeneratorAddition, Oo = le.createHotSwapPlugin(() => {
|
|
|
2818
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({});
|
|
2819
2829
|
},
|
|
2820
2830
|
mount({ api: t }) {
|
|
2821
|
-
const
|
|
2822
|
-
function
|
|
2823
|
-
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));
|
|
2824
2834
|
}
|
|
2825
|
-
function
|
|
2826
|
-
return
|
|
2835
|
+
function i(u, a) {
|
|
2836
|
+
return r(a) ? w.stringToUpperCamel(a._attributes.name) : f(u, a);
|
|
2827
2837
|
}
|
|
2828
|
-
function
|
|
2829
|
-
return
|
|
2838
|
+
function m(u) {
|
|
2839
|
+
return w.stringToUpperCamel(u._attributes.name);
|
|
2830
2840
|
}
|
|
2831
|
-
function
|
|
2832
|
-
return
|
|
2841
|
+
function _(u) {
|
|
2842
|
+
return u.has(M.RecordStruct) ? " struct" : "";
|
|
2833
2843
|
}
|
|
2834
|
-
function
|
|
2835
|
-
const
|
|
2836
|
-
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";
|
|
2837
2847
|
}
|
|
2838
2848
|
t.commands._setInfoCodeProvider(
|
|
2839
|
-
(
|
|
2840
|
-
const a =
|
|
2841
|
-
return
|
|
2842
|
-
`public record${
|
|
2843
|
-
|
|
2844
|
-
|
|
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
|
|
2845
2855
|
)} value);`
|
|
2846
2856
|
), [
|
|
2847
2857
|
{
|
|
2848
2858
|
type: "Info",
|
|
2849
|
-
content:
|
|
2859
|
+
content: g.join(`
|
|
2850
2860
|
`),
|
|
2851
|
-
imports:
|
|
2861
|
+
imports: p
|
|
2852
2862
|
}
|
|
2853
2863
|
];
|
|
2854
2864
|
}
|
|
2855
2865
|
), t.commands._setCommandCodeProvider(
|
|
2856
|
-
(
|
|
2857
|
-
const a = [],
|
|
2866
|
+
(u) => {
|
|
2867
|
+
const a = [], p = s.value.additions, g = /* @__PURE__ */ new Set(), b = m(u);
|
|
2858
2868
|
{
|
|
2859
|
-
const
|
|
2860
|
-
|
|
2869
|
+
const C = [], l = Object.values(u.inner);
|
|
2870
|
+
C.push(`public record${_(p)} ${b}`), C.push("(");
|
|
2861
2871
|
const $ = [];
|
|
2862
|
-
for (const v of
|
|
2863
|
-
const d =
|
|
2864
|
-
$.push(`${
|
|
2872
|
+
for (const v of l) {
|
|
2873
|
+
const d = m(v);
|
|
2874
|
+
$.push(`${i(g, v)} ${w.upperFirst(d)}`);
|
|
2865
2875
|
}
|
|
2866
|
-
|
|
2867
|
-
`)}`),
|
|
2876
|
+
C.push(` ${$.join(`,
|
|
2877
|
+
`)}`), C.push(")"), C.push("{"), C.push("}"), a.push({
|
|
2868
2878
|
type: "Command",
|
|
2869
|
-
content:
|
|
2879
|
+
content: C.join(`
|
|
2870
2880
|
`),
|
|
2871
|
-
imports:
|
|
2881
|
+
imports: g
|
|
2872
2882
|
});
|
|
2873
2883
|
}
|
|
2874
2884
|
{
|
|
2875
|
-
const
|
|
2876
|
-
|
|
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({
|
|
2877
2887
|
type: "CommandHandler",
|
|
2878
|
-
content:
|
|
2888
|
+
content: l.join(`
|
|
2879
2889
|
`),
|
|
2880
|
-
imports:
|
|
2890
|
+
imports: g
|
|
2881
2891
|
});
|
|
2882
2892
|
}
|
|
2883
2893
|
return a;
|
|
2884
2894
|
}
|
|
2885
2895
|
), t.commands._setFacadeCommandCodeProvider(
|
|
2886
|
-
(
|
|
2887
|
-
const a = [],
|
|
2896
|
+
(u) => {
|
|
2897
|
+
const a = [], p = s.value.additions, g = /* @__PURE__ */ new Set(), b = m(u);
|
|
2888
2898
|
{
|
|
2889
|
-
const
|
|
2890
|
-
|
|
2899
|
+
const C = [], l = Object.values(u.inner);
|
|
2900
|
+
C.push(`public record${_(p)} ${b}`), C.push("(");
|
|
2891
2901
|
const $ = [];
|
|
2892
|
-
for (const v of
|
|
2893
|
-
const d =
|
|
2894
|
-
$.push(`${
|
|
2902
|
+
for (const v of l) {
|
|
2903
|
+
const d = m(v);
|
|
2904
|
+
$.push(`${i(g, v)} ${w.upperFirst(d)}`);
|
|
2895
2905
|
}
|
|
2896
|
-
|
|
2897
|
-
`)}`),
|
|
2906
|
+
C.push(` ${$.join(`,
|
|
2907
|
+
`)}`), C.push(")"), C.push("{"), C.push("}"), a.push({
|
|
2898
2908
|
type: "FacadeCommand",
|
|
2899
|
-
content:
|
|
2909
|
+
content: C.join(`
|
|
2900
2910
|
`),
|
|
2901
|
-
imports:
|
|
2911
|
+
imports: g
|
|
2902
2912
|
});
|
|
2903
2913
|
}
|
|
2904
2914
|
{
|
|
2905
|
-
const
|
|
2906
|
-
|
|
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({
|
|
2907
2917
|
type: "FacadeCommandHandler",
|
|
2908
|
-
content:
|
|
2918
|
+
content: l.join(`
|
|
2909
2919
|
`),
|
|
2910
|
-
imports:
|
|
2920
|
+
imports: g
|
|
2911
2921
|
});
|
|
2912
2922
|
}
|
|
2913
2923
|
return a;
|
|
2914
2924
|
}
|
|
2915
2925
|
), t.commands._setAggCodeProvider(
|
|
2916
|
-
(
|
|
2917
|
-
const a = [],
|
|
2926
|
+
(u) => {
|
|
2927
|
+
const a = [], p = t.states.designer.value, g = s.value.additions;
|
|
2918
2928
|
{
|
|
2919
|
-
const b = /* @__PURE__ */ new Set(),
|
|
2920
|
-
|
|
2921
|
-
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");
|
|
2922
2932
|
for (const d of v) {
|
|
2923
|
-
const
|
|
2924
|
-
$.push(`void Handle${
|
|
2933
|
+
const N = m(d);
|
|
2934
|
+
$.push(`void Handle${N}(${N} command);`);
|
|
2925
2935
|
}
|
|
2926
|
-
|
|
2936
|
+
C.push(` ${$.join(`
|
|
2927
2937
|
|
|
2928
|
-
`)}`),
|
|
2938
|
+
`)}`), C.push("}"), C.push(""), a.push({
|
|
2929
2939
|
type: "Agg",
|
|
2930
|
-
content:
|
|
2940
|
+
content: C.join(`
|
|
2931
2941
|
`),
|
|
2932
2942
|
imports: b
|
|
2933
2943
|
});
|
|
2934
2944
|
}
|
|
2935
2945
|
{
|
|
2936
|
-
const b = /* @__PURE__ */ new Set(),
|
|
2937
|
-
if (
|
|
2938
|
-
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 = [];
|
|
2939
2949
|
for (const h of $) {
|
|
2940
|
-
const y =
|
|
2941
|
-
|
|
2950
|
+
const y = m(h);
|
|
2951
|
+
N.push(`${i(b, h)} ${w.lowerFirst(y)}`);
|
|
2942
2952
|
}
|
|
2943
|
-
|
|
2944
|
-
`)}`),
|
|
2953
|
+
C.push(`public class ${l}`), C.push("("), C.push(` ${N.join(`,
|
|
2954
|
+
`)}`), C.push(`): I${l}${v}`), C.push("{");
|
|
2945
2955
|
for (const h of $) {
|
|
2946
|
-
const y =
|
|
2947
|
-
|
|
2948
|
-
` public ${
|
|
2956
|
+
const y = m(h);
|
|
2957
|
+
C.push(
|
|
2958
|
+
` public ${i(b, h)} ${w.upperFirst(
|
|
2949
2959
|
y
|
|
2950
|
-
)} { get; private set; } = ${
|
|
2951
|
-
),
|
|
2960
|
+
)} { get; private set; } = ${w.lowerFirst(y)};`
|
|
2961
|
+
), C.push("");
|
|
2952
2962
|
}
|
|
2953
2963
|
const c = [];
|
|
2954
2964
|
for (const h of d) {
|
|
2955
|
-
const y =
|
|
2965
|
+
const y = m(h);
|
|
2956
2966
|
c.push(`public void Handle${y}(${y} command)`), c.push("{"), c.push(" // HACK implement"), c.push("}"), c.push("");
|
|
2957
2967
|
}
|
|
2958
|
-
|
|
2959
|
-
`)}`),
|
|
2968
|
+
C.push(` ${c.join(`
|
|
2969
|
+
`)}`), C.push("}");
|
|
2960
2970
|
} else {
|
|
2961
|
-
const d = [...
|
|
2962
|
-
|
|
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("{");
|
|
2963
2973
|
for (const h of $) {
|
|
2964
|
-
const y =
|
|
2965
|
-
|
|
2966
|
-
` public ${
|
|
2974
|
+
const y = m(h);
|
|
2975
|
+
C.push(
|
|
2976
|
+
` public ${i(b, h)} ${w.lowerFirst(
|
|
2967
2977
|
y
|
|
2968
2978
|
)} { get; private set; }`
|
|
2969
2979
|
);
|
|
2970
2980
|
}
|
|
2971
|
-
|
|
2972
|
-
const
|
|
2981
|
+
C.push("");
|
|
2982
|
+
const N = [];
|
|
2973
2983
|
for (const h of $) {
|
|
2974
|
-
const y =
|
|
2975
|
-
|
|
2984
|
+
const y = m(h);
|
|
2985
|
+
N.push(`${i(b, h)} ${y}`);
|
|
2976
2986
|
}
|
|
2977
|
-
|
|
2987
|
+
C.push(` public ${l}(${N.join(", ")})`), C.push(" {");
|
|
2978
2988
|
for (const h of $) {
|
|
2979
|
-
const y =
|
|
2980
|
-
|
|
2989
|
+
const y = m(h);
|
|
2990
|
+
C.push(` ${y} = ${w.lowerFirst(y)};`);
|
|
2981
2991
|
}
|
|
2982
|
-
|
|
2992
|
+
C.push(" }");
|
|
2983
2993
|
const c = [];
|
|
2984
2994
|
for (const h of d) {
|
|
2985
|
-
const y =
|
|
2995
|
+
const y = m(h);
|
|
2986
2996
|
c.push(`public void Handle${y}(${y} command)`), c.push("{"), c.push(" // HACK implement"), c.push("}"), c.push("");
|
|
2987
2997
|
}
|
|
2988
|
-
|
|
2989
|
-
`)}`),
|
|
2998
|
+
C.push(` ${c.join(`
|
|
2999
|
+
`)}`), C.push("}");
|
|
2990
3000
|
}
|
|
2991
3001
|
a.push({
|
|
2992
3002
|
type: "AggImpl",
|
|
2993
|
-
content:
|
|
3003
|
+
content: C.join(`
|
|
2994
3004
|
`),
|
|
2995
3005
|
imports: b
|
|
2996
3006
|
});
|
|
@@ -2998,74 +3008,74 @@ const j = we.JavaGeneratorAddition, Oo = le.createHotSwapPlugin(() => {
|
|
|
2998
3008
|
return a;
|
|
2999
3009
|
}
|
|
3000
3010
|
), t.commands._setEventCodeProvider(
|
|
3001
|
-
(
|
|
3002
|
-
const a =
|
|
3003
|
-
|
|
3004
|
-
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 = [];
|
|
3005
3015
|
for (const $ of b) {
|
|
3006
|
-
const v =
|
|
3007
|
-
|
|
3016
|
+
const v = m($);
|
|
3017
|
+
l.push(`${i(g, $)} ${w.upperFirst(v)}`);
|
|
3008
3018
|
}
|
|
3009
|
-
return
|
|
3010
|
-
`)}`),
|
|
3019
|
+
return C.push(` ${l.join(`,
|
|
3020
|
+
`)}`), C.push(")"), C.push("{"), C.push("}"), [
|
|
3011
3021
|
{
|
|
3012
3022
|
type: "Event",
|
|
3013
|
-
content:
|
|
3023
|
+
content: C.join(`
|
|
3014
3024
|
`),
|
|
3015
|
-
imports:
|
|
3025
|
+
imports: g
|
|
3016
3026
|
}
|
|
3017
3027
|
];
|
|
3018
3028
|
}
|
|
3019
3029
|
), t.commands._setReadModelCodeProvider(() => []), t.commands._setCodeFileProvider(() => {
|
|
3020
|
-
const
|
|
3021
|
-
function
|
|
3030
|
+
const u = [], a = {}, p = [...s.value.namespace.split(/\./), w.stringToUpperCamel(s.value.moduleName)];
|
|
3031
|
+
function g(v) {
|
|
3022
3032
|
for (const d of Object.values(v)) {
|
|
3023
|
-
if (!
|
|
3033
|
+
if (!r(d))
|
|
3024
3034
|
continue;
|
|
3025
|
-
const
|
|
3026
|
-
if (a[`${
|
|
3035
|
+
const N = m(d) + ".cs";
|
|
3036
|
+
if (a[`${p.join("/")}/${N}`] === !0)
|
|
3027
3037
|
continue;
|
|
3028
3038
|
const c = t.commands._genInfoCode(d);
|
|
3029
3039
|
if (c.length === 0)
|
|
3030
3040
|
continue;
|
|
3031
|
-
const h = new
|
|
3041
|
+
const h = new A(p, N);
|
|
3032
3042
|
for (const y of c[0].imports)
|
|
3033
3043
|
h.appendContentln(`using ${y};`);
|
|
3034
3044
|
h.appendContentln(""), h.appendContentln(
|
|
3035
|
-
`namespace ${
|
|
3036
|
-
), 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;
|
|
3037
3047
|
}
|
|
3038
3048
|
}
|
|
3039
3049
|
const b = t.states.designer.value._getContext().getCommands();
|
|
3040
3050
|
for (const v of b) {
|
|
3041
|
-
|
|
3042
|
-
const d =
|
|
3043
|
-
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)
|
|
3044
3054
|
if (h.type === "Command") {
|
|
3045
3055
|
c.addImports(h.imports);
|
|
3046
3056
|
for (const y of h.imports)
|
|
3047
3057
|
c.appendContentln(`using ${y};`);
|
|
3048
3058
|
c.appendContentln(""), c.appendContentln(
|
|
3049
|
-
`namespace ${
|
|
3059
|
+
`namespace ${s.value.namespace}.${w.stringToUpperCamel(s.value.moduleName)}`
|
|
3050
3060
|
), c.appendContentln("{"), c.appendContentln(n(h.content)), c.appendContentln("}");
|
|
3051
3061
|
}
|
|
3052
|
-
|
|
3062
|
+
u.push(c);
|
|
3053
3063
|
}
|
|
3054
|
-
const
|
|
3055
|
-
for (const v of
|
|
3056
|
-
|
|
3057
|
-
const d =
|
|
3058
|
-
c.addImports(
|
|
3059
|
-
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)
|
|
3060
3070
|
c.appendContentln(`using ${h};`);
|
|
3061
3071
|
c.appendContentln(""), c.appendContentln(
|
|
3062
|
-
`namespace ${
|
|
3063
|
-
), 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);
|
|
3064
3074
|
}
|
|
3065
|
-
const
|
|
3066
|
-
for (const v of
|
|
3067
|
-
|
|
3068
|
-
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);
|
|
3069
3079
|
for (const h of d) {
|
|
3070
3080
|
c.addImports(h.imports);
|
|
3071
3081
|
for (const y of h.imports)
|
|
@@ -3073,34 +3083,34 @@ const j = we.JavaGeneratorAddition, Oo = le.createHotSwapPlugin(() => {
|
|
|
3073
3083
|
c.appendContentln("");
|
|
3074
3084
|
}
|
|
3075
3085
|
c.appendContentln(
|
|
3076
|
-
`namespace ${
|
|
3086
|
+
`namespace ${s.value.namespace}.${w.stringToUpperCamel(s.value.moduleName)}`
|
|
3077
3087
|
), c.appendContentln("{");
|
|
3078
3088
|
for (const h of d)
|
|
3079
3089
|
c.appendContentln(n(h.content));
|
|
3080
|
-
c.appendContentln("}"),
|
|
3090
|
+
c.appendContentln("}"), u.push(c);
|
|
3081
3091
|
}
|
|
3082
3092
|
const $ = t.states.designer.value._getContext().getEvents();
|
|
3083
3093
|
for (const v of $) {
|
|
3084
|
-
|
|
3085
|
-
const d =
|
|
3086
|
-
c.addImports(
|
|
3087
|
-
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)
|
|
3088
3098
|
c.appendContentln(`using ${h};`);
|
|
3089
3099
|
c.appendContentln(""), c.appendContentln(
|
|
3090
|
-
`namespace ${
|
|
3091
|
-
), 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);
|
|
3092
3102
|
}
|
|
3093
|
-
return
|
|
3103
|
+
return u;
|
|
3094
3104
|
});
|
|
3095
3105
|
}
|
|
3096
3106
|
};
|
|
3097
3107
|
});
|
|
3098
3108
|
export {
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
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
|
|
3106
3116
|
};
|