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