plugin-tls 3.5.1 → 4.0.0
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/dist/Destroyable-BqvuD4gL-Cmk1ocqj.cjs +1 -0
- package/dist/Destroyable-BqvuD4gL-D50ZO9eN.js +129 -0
- package/dist/createTierModeOptionsPluginHost-C3kmxB00.cjs +1 -0
- package/dist/createTierModeOptionsPluginHost-CeND_z6P.js +852 -0
- package/dist/index-com.d.ts +3 -0
- package/dist/index-com.d.ts.map +1 -0
- package/dist/index-node.cjs +1 -0
- package/dist/index-node.d.ts +3 -0
- package/dist/index-node.d.ts.map +1 -0
- package/dist/index-node.js +256 -0
- package/dist/index-web.cjs +1 -0
- package/dist/index-web.d.ts +3 -0
- package/dist/index-web.d.ts.map +1 -0
- package/dist/index-web.js +326 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +388 -1466
- package/dist/options/index-node.d.ts +2 -0
- package/dist/options/index-node.d.ts.map +1 -0
- package/dist/options/index-web.d.ts +2 -0
- package/dist/options/index-web.d.ts.map +1 -0
- package/dist/options/index.d.ts +3 -3
- package/dist/options/index.d.ts.map +1 -1
- package/dist/options/options-plugin-host/{index.d.ts → index-com.d.ts} +1 -1
- package/dist/options/options-plugin-host/index-com.d.ts.map +1 -0
- package/dist/options/options-plugin-host/index-node.d.ts +4 -0
- package/dist/options/options-plugin-host/index-node.d.ts.map +1 -0
- package/dist/options/options-plugin-host/index-web.d.ts +4 -0
- package/dist/options/options-plugin-host/index-web.d.ts.map +1 -0
- package/dist/options/options-plugin-host/tier-mode-options/TierModeOptionsPluginHost.d.ts +1 -1
- package/dist/options/options-plugin-host/tier-mode-options/TierModeOptionsPluginHost.d.ts.map +1 -1
- package/dist/options/options-plugin-host/tier-mode-options/TierModeOptionsPluginHostEventEmitter.d.ts +2 -2
- package/dist/options/options-plugin-host/tier-mode-options/TierModeOptionsPluginHostEventEmitter.d.ts.map +1 -1
- package/dist/options/options-plugin-host/tier-mode-options/TierModeOptionsPluginHostEventTarget.d.ts +1 -1
- package/dist/options/options-plugin-host/tier-mode-options/TierModeOptionsPluginHostEventTarget.d.ts.map +1 -1
- package/dist/options/options-plugin-host/tier-mode-options/index.d.ts +0 -2
- package/dist/options/options-plugin-host/tier-mode-options/index.d.ts.map +1 -1
- package/dist/options/options-plugin-host/tier-options/TierOptionsPluginHost.d.ts +1 -1
- package/dist/options/options-plugin-host/tier-options/TierOptionsPluginHost.d.ts.map +1 -1
- package/dist/options/options-plugin-host/tier-options/TierOptionsPluginHostEventEmitter.d.ts +2 -2
- package/dist/options/options-plugin-host/tier-options/TierOptionsPluginHostEventEmitter.d.ts.map +1 -1
- package/dist/options/options-plugin-host/tier-options/TierOptionsPluginHostEventTarget.d.ts +1 -1
- package/dist/options/options-plugin-host/tier-options/TierOptionsPluginHostEventTarget.d.ts.map +1 -1
- package/dist/options/options-plugin-host/tier-options/index.d.ts +0 -2
- package/dist/options/options-plugin-host/tier-options/index.d.ts.map +1 -1
- package/dist/plugin-host/PluginHostEventEmitter.d.ts +2 -2
- package/dist/plugin-host/PluginHostEventEmitter.d.ts.map +1 -1
- package/dist/plugin-host/PluginHostEventTarget.d.ts +1 -1
- package/dist/plugin-host/PluginHostEventTarget.d.ts.map +1 -1
- package/dist/plugin-host/index-node.d.ts +2 -0
- package/dist/plugin-host/index-node.d.ts.map +1 -0
- package/dist/plugin-host/index-web.d.ts +2 -0
- package/dist/plugin-host/index-web.d.ts.map +1 -0
- package/dist/plugin-host/index.d.ts +0 -2
- package/dist/plugin-host/index.d.ts.map +1 -1
- package/dist/plugin-manager/IExtend.d.ts +3 -0
- package/dist/plugin-manager/IExtend.d.ts.map +1 -1
- package/dist/plugin-manager/mixin.d.ts +4 -0
- package/dist/plugin-manager/mixin.d.ts.map +1 -1
- package/package.json +23 -6
- package/dist/index.umd.cjs +0 -1
- package/dist/options/options-plugin-host/index.d.ts.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,86 +1,71 @@
|
|
|
1
|
-
import { Destroyable as M
|
|
2
|
-
import { omitMembers as
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Object.
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
function L() {
|
|
23
|
-
return function(t) {
|
|
24
|
-
return t;
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
function Q(s, t) {
|
|
28
|
-
return p(s, t), t;
|
|
1
|
+
import { Destroyable as M } from "@gby/destroyable";
|
|
2
|
+
import { omitMembers as m, removeUndefined as P, pickMembers as y, serialCallFuns as c } from "com-tools";
|
|
3
|
+
import { m as x, T as d, c as w, a as f, P as h } from "./createTierModeOptionsPluginHost-CeND_z6P.js";
|
|
4
|
+
import { M as et, b as nt, d as st, e as rt, f as it, g as ot, h as ut, i as at, j as pt, k as ct, l as gt, p as lt, n as dt, s as ft, o as ht, t as Ot, q as Mt } from "./createTierModeOptionsPluginHost-CeND_z6P.js";
|
|
5
|
+
function o(n, ...e) {
|
|
6
|
+
for (const t of e) {
|
|
7
|
+
const s = Object.getOwnPropertyDescriptors(t);
|
|
8
|
+
Object.defineProperties(n, s);
|
|
9
|
+
}
|
|
10
|
+
return n;
|
|
11
|
+
}
|
|
12
|
+
function C(n, e, t) {
|
|
13
|
+
let s = Object.getOwnPropertyDescriptors(e);
|
|
14
|
+
return t && m(s, t), Object.defineProperties(n, s), n;
|
|
15
|
+
}
|
|
16
|
+
function U(n, e, t) {
|
|
17
|
+
let s = Object.getOwnPropertyDescriptors(e);
|
|
18
|
+
return t ? Object.defineProperties(n, P(y(s, t))) : Object.defineProperties(n, s), n;
|
|
19
|
+
}
|
|
20
|
+
function j(n, e) {
|
|
21
|
+
return e;
|
|
29
22
|
}
|
|
30
|
-
function
|
|
23
|
+
function v() {
|
|
31
24
|
return function(e) {
|
|
32
|
-
return
|
|
25
|
+
return e;
|
|
33
26
|
};
|
|
34
27
|
}
|
|
35
|
-
function
|
|
36
|
-
return
|
|
28
|
+
function H(n, e) {
|
|
29
|
+
return o(n, e), e;
|
|
37
30
|
}
|
|
38
|
-
function
|
|
39
|
-
return function(
|
|
40
|
-
return
|
|
31
|
+
function I(n) {
|
|
32
|
+
return function(t) {
|
|
33
|
+
return o(n, t), t;
|
|
41
34
|
};
|
|
42
35
|
}
|
|
43
|
-
function
|
|
44
|
-
return
|
|
36
|
+
function a(n, e) {
|
|
37
|
+
return o(n, e), n;
|
|
45
38
|
}
|
|
46
|
-
function
|
|
39
|
+
function k(n) {
|
|
47
40
|
return function(t) {
|
|
48
|
-
return t;
|
|
41
|
+
return o(n, t), n;
|
|
49
42
|
};
|
|
50
43
|
}
|
|
51
|
-
function
|
|
52
|
-
return
|
|
44
|
+
function B(n, e) {
|
|
45
|
+
return e;
|
|
53
46
|
}
|
|
54
|
-
function
|
|
47
|
+
function N() {
|
|
55
48
|
return function(e) {
|
|
56
|
-
return
|
|
49
|
+
return e;
|
|
57
50
|
};
|
|
58
51
|
}
|
|
59
|
-
function
|
|
60
|
-
return
|
|
52
|
+
function V(n, e) {
|
|
53
|
+
return o(n.prototype, e), e;
|
|
61
54
|
}
|
|
62
|
-
function
|
|
63
|
-
return function(
|
|
64
|
-
return
|
|
55
|
+
function q(n) {
|
|
56
|
+
return function(t) {
|
|
57
|
+
return o(n.prototype, t), t;
|
|
65
58
|
};
|
|
66
59
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
const t = { ...s };
|
|
70
|
-
for (const e of b)
|
|
71
|
-
typeof t[e] == "function" && delete t[e];
|
|
72
|
-
return t;
|
|
73
|
-
}
|
|
74
|
-
function T(s, t) {
|
|
75
|
-
let e = Object.getOwnPropertyDescriptors(t);
|
|
76
|
-
for (const n of b)
|
|
77
|
-
typeof t[n] == "function" && delete e[n];
|
|
78
|
-
return Object.defineProperties(s, e), s;
|
|
60
|
+
function F(n, e) {
|
|
61
|
+
return o(n.prototype, e), n;
|
|
79
62
|
}
|
|
80
|
-
function
|
|
81
|
-
return
|
|
63
|
+
function S(n) {
|
|
64
|
+
return function(t) {
|
|
65
|
+
return o(n.prototype, t), n;
|
|
66
|
+
};
|
|
82
67
|
}
|
|
83
|
-
class
|
|
68
|
+
class $ extends M {
|
|
84
69
|
/**
|
|
85
70
|
* 插件的宿主
|
|
86
71
|
*/
|
|
@@ -92,8 +77,8 @@ class ot extends M {
|
|
|
92
77
|
/**
|
|
93
78
|
* @param host - 插件的宿主
|
|
94
79
|
*/
|
|
95
|
-
constructor(
|
|
96
|
-
super(),
|
|
80
|
+
constructor(e) {
|
|
81
|
+
super(), e && (this.host = e);
|
|
97
82
|
}
|
|
98
83
|
destroyThis() {
|
|
99
84
|
return this.plugins.clear(), this.host = null, super.destroyThis();
|
|
@@ -103,19 +88,19 @@ class ot extends M {
|
|
|
103
88
|
* @param plugin - 插件
|
|
104
89
|
* @returns 是否注册了插件
|
|
105
90
|
*/
|
|
106
|
-
hasUsed(
|
|
107
|
-
return this.plugins.has(
|
|
91
|
+
hasUsed(e) {
|
|
92
|
+
return this.plugins.has(e);
|
|
108
93
|
}
|
|
109
94
|
/**
|
|
110
95
|
* 使用插件、注册插件
|
|
111
96
|
* @param plugin - 插件
|
|
112
97
|
* @param args - 传递给插件的选项
|
|
113
98
|
*/
|
|
114
|
-
use(
|
|
115
|
-
const { plugins:
|
|
116
|
-
if (
|
|
117
|
-
const
|
|
118
|
-
return
|
|
99
|
+
use(e, ...t) {
|
|
100
|
+
const { plugins: s } = this;
|
|
101
|
+
if (s.has(e)) return s.get(e);
|
|
102
|
+
const r = e.onUse(this.host, ...t);
|
|
103
|
+
return s.set(e, r), r;
|
|
119
104
|
}
|
|
120
105
|
/**
|
|
121
106
|
* 插件宿主实例的注册插件的方法
|
|
@@ -124,11 +109,11 @@ class ot extends M {
|
|
|
124
109
|
* 会调用每个插件的 {@link IPlugin.use } 方法
|
|
125
110
|
* @param hostInst - 插件宿主的新实例
|
|
126
111
|
*/
|
|
127
|
-
instUse(
|
|
128
|
-
const { plugins:
|
|
129
|
-
if (
|
|
130
|
-
const
|
|
131
|
-
return
|
|
112
|
+
instUse(e, t, ...s) {
|
|
113
|
+
const { plugins: r } = this;
|
|
114
|
+
if (r.has(t)) return r.get(t);
|
|
115
|
+
const i = this.use(t, ...s);
|
|
116
|
+
return t.onCreate?.(e), i;
|
|
132
117
|
}
|
|
133
118
|
/**
|
|
134
119
|
* 插件宿主创建实例时调用
|
|
@@ -138,11 +123,11 @@ class ot extends M {
|
|
|
138
123
|
* 如果插件的 created 方法返回 Promise,则会等待 Promise resolve
|
|
139
124
|
* @param hostInst - 插件宿主的新实例
|
|
140
125
|
*/
|
|
141
|
-
onCreate(
|
|
142
|
-
const
|
|
143
|
-
for (const [
|
|
144
|
-
|
|
145
|
-
return
|
|
126
|
+
onCreate(e, ...t) {
|
|
127
|
+
const s = [];
|
|
128
|
+
for (const [r] of this.plugins)
|
|
129
|
+
r.onCreate && s.push(r.onCreate.bind(r));
|
|
130
|
+
return c(s, void 0, [e, ...t]);
|
|
146
131
|
}
|
|
147
132
|
/**
|
|
148
133
|
* 插件宿主创建实例时调用
|
|
@@ -152,11 +137,11 @@ class ot extends M {
|
|
|
152
137
|
* @param hostInst - 插件宿主的新实例
|
|
153
138
|
* @param args - 初始化宿主实例时的参数
|
|
154
139
|
*/
|
|
155
|
-
onInit(
|
|
156
|
-
const
|
|
157
|
-
for (const [
|
|
158
|
-
|
|
159
|
-
return
|
|
140
|
+
onInit(e, ...t) {
|
|
141
|
+
const s = [];
|
|
142
|
+
for (const [r] of this.plugins)
|
|
143
|
+
r.onInit && s.push(r.onInit.bind(r));
|
|
144
|
+
return c(s, void 0, [e, ...t]);
|
|
160
145
|
}
|
|
161
146
|
/**
|
|
162
147
|
* 插件宿主被销毁时调用
|
|
@@ -165,14 +150,14 @@ class ot extends M {
|
|
|
165
150
|
* 会调用每个插件的 {@link IPlugin.onDestroy} 方法
|
|
166
151
|
* @param hostInst - 被销毁的插件实例
|
|
167
152
|
*/
|
|
168
|
-
onDestroy(
|
|
169
|
-
const
|
|
170
|
-
for (const [
|
|
171
|
-
|
|
172
|
-
return
|
|
153
|
+
onDestroy(e) {
|
|
154
|
+
const t = [];
|
|
155
|
+
for (const [s] of this.plugins)
|
|
156
|
+
s.onDestroy && t.push(s.onDestroy.bind(s));
|
|
157
|
+
return t.reverse(), c(t, void 0, [e]);
|
|
173
158
|
}
|
|
174
159
|
}
|
|
175
|
-
class
|
|
160
|
+
class W extends M {
|
|
176
161
|
/**
|
|
177
162
|
* 插件的宿主
|
|
178
163
|
*/
|
|
@@ -184,8 +169,8 @@ class ut extends M {
|
|
|
184
169
|
/**
|
|
185
170
|
* @param host - 插件的宿主
|
|
186
171
|
*/
|
|
187
|
-
constructor(
|
|
188
|
-
super(),
|
|
172
|
+
constructor(e) {
|
|
173
|
+
super(), e && (this.host = e);
|
|
189
174
|
}
|
|
190
175
|
destroyThis() {
|
|
191
176
|
return this.plugins.clear(), this.host = null, super.destroyThis();
|
|
@@ -195,17 +180,17 @@ class ut extends M {
|
|
|
195
180
|
* @param plugin - 插件
|
|
196
181
|
* @returns 是否注册了插件
|
|
197
182
|
*/
|
|
198
|
-
hasUsed(
|
|
199
|
-
return this.plugins.has(
|
|
183
|
+
hasUsed(e) {
|
|
184
|
+
return this.plugins.has(e);
|
|
200
185
|
}
|
|
201
186
|
/**
|
|
202
187
|
* 使用插件、注册插件
|
|
203
188
|
* @param plugin - 插件
|
|
204
189
|
* @returns 返回插件对象本身
|
|
205
190
|
*/
|
|
206
|
-
use(
|
|
207
|
-
const { plugins:
|
|
208
|
-
return
|
|
191
|
+
use(e) {
|
|
192
|
+
const { plugins: t } = this;
|
|
193
|
+
return t.has(e) || (x(this.host.prototype, e), t.add(e)), e;
|
|
209
194
|
}
|
|
210
195
|
/**
|
|
211
196
|
* 插件宿主实例的注册插件的方法
|
|
@@ -214,9 +199,9 @@ class ut extends M {
|
|
|
214
199
|
* 会调用每个插件的 {@link IExtend.use } 方法
|
|
215
200
|
* @param hostInst - 插件宿主的新实例
|
|
216
201
|
*/
|
|
217
|
-
instUse(
|
|
218
|
-
const { plugins:
|
|
219
|
-
return
|
|
202
|
+
instUse(e, t, ...s) {
|
|
203
|
+
const { plugins: r } = this;
|
|
204
|
+
return r.has(t) || (this.use(t), t.onCreate?.call(e, e, ...s)), t;
|
|
220
205
|
}
|
|
221
206
|
/**
|
|
222
207
|
* 插件宿主创建实例时调用
|
|
@@ -226,11 +211,11 @@ class ut extends M {
|
|
|
226
211
|
* 如果插件的 created 方法返回 Promise,则会等待 Promise resolve
|
|
227
212
|
* @param hostInst - 插件宿主的新实例
|
|
228
213
|
*/
|
|
229
|
-
onCreate(
|
|
230
|
-
const
|
|
231
|
-
for (const
|
|
232
|
-
|
|
233
|
-
return
|
|
214
|
+
onCreate(e, ...t) {
|
|
215
|
+
const s = [];
|
|
216
|
+
for (const r of this.plugins)
|
|
217
|
+
r.onCreate && s.push(r.onCreate);
|
|
218
|
+
return c(s, e, [e, ...t]);
|
|
234
219
|
}
|
|
235
220
|
/**
|
|
236
221
|
* 插件宿主创建实例时调用
|
|
@@ -240,11 +225,11 @@ class ut extends M {
|
|
|
240
225
|
* @param hostInst - 插件宿主的新实例
|
|
241
226
|
* @param args - 初始化宿主实例时的参数
|
|
242
227
|
*/
|
|
243
|
-
onInit(
|
|
244
|
-
const
|
|
245
|
-
for (const
|
|
246
|
-
|
|
247
|
-
return
|
|
228
|
+
onInit(e, ...t) {
|
|
229
|
+
const s = [];
|
|
230
|
+
for (const r of this.plugins)
|
|
231
|
+
r.onInit && s.push(r.onInit);
|
|
232
|
+
return c(s, e, [e, ...t]);
|
|
248
233
|
}
|
|
249
234
|
/**
|
|
250
235
|
* 插件宿主被销毁时调用
|
|
@@ -253,849 +238,263 @@ class ut extends M {
|
|
|
253
238
|
* 会调用每个插件的 {@link IExtend.onDestroy} 方法
|
|
254
239
|
* @param hostInst - 被销毁的插件实例
|
|
255
240
|
*/
|
|
256
|
-
onDestroy(
|
|
257
|
-
const
|
|
258
|
-
for (const
|
|
259
|
-
|
|
260
|
-
return
|
|
241
|
+
onDestroy(e) {
|
|
242
|
+
const t = [];
|
|
243
|
+
for (const s of this.plugins)
|
|
244
|
+
s.onDestroy && t.push(s.onDestroy);
|
|
245
|
+
return t.reverse(), c(t, e, [e]);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
function O(n, e) {
|
|
249
|
+
const t = [{ target: n, props: e }];
|
|
250
|
+
let s;
|
|
251
|
+
for (; s = t.shift(); ) {
|
|
252
|
+
const { target: r, props: i } = s;
|
|
253
|
+
for (const [p, u] of Object.entries(i)) {
|
|
254
|
+
if (u != null && typeof u == "object" && (!u.constructor || u.constructor === Object)) {
|
|
255
|
+
t.push({ target: r[p], props: u });
|
|
256
|
+
continue;
|
|
257
|
+
}
|
|
258
|
+
r[p] = u;
|
|
259
|
+
}
|
|
261
260
|
}
|
|
261
|
+
return n;
|
|
262
262
|
}
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
plugins = /* @__PURE__ */ new Map();
|
|
273
|
-
/**
|
|
274
|
-
* @param host - 插件的宿主
|
|
275
|
-
*/
|
|
276
|
-
constructor(t) {
|
|
277
|
-
super(), t && (this.host = t);
|
|
278
|
-
}
|
|
279
|
-
destroyThis() {
|
|
280
|
-
return this.plugins.clear(), this.host = null, super.destroyThis();
|
|
281
|
-
}
|
|
282
|
-
/**
|
|
283
|
-
* 是否注册了插件 或 扩展
|
|
284
|
-
* @param plugin - 插件 或 扩展
|
|
285
|
-
* @returns 是否注册了插件 或 扩展
|
|
286
|
-
*/
|
|
287
|
-
hasUsed(t) {
|
|
288
|
-
return this.plugins.has(t);
|
|
289
|
-
}
|
|
290
|
-
/**
|
|
291
|
-
* 判断一个对象是否是插件
|
|
292
|
-
* @param target
|
|
293
|
-
* @returns
|
|
294
|
-
*/
|
|
295
|
-
isPlugin(t) {
|
|
296
|
-
const { plugins: e } = this;
|
|
297
|
-
return e.has(t) ? e.get(t) !== O : A(t);
|
|
298
|
-
}
|
|
299
|
-
/**
|
|
300
|
-
* 使用插件、注册插件
|
|
301
|
-
* @param ext - 插件
|
|
302
|
-
* @param args - 传递给插件的选项
|
|
303
|
-
*/
|
|
304
|
-
useExtend(t) {
|
|
305
|
-
const { plugins: e } = this;
|
|
306
|
-
return e.has(t) ? e.get(t) : (T(this.host.prototype, t), e.set(t, O), t);
|
|
307
|
-
}
|
|
308
|
-
/**
|
|
309
|
-
* 插件宿主实例的注册插件的方法
|
|
310
|
-
*
|
|
311
|
-
* @remarks
|
|
312
|
-
* 会调用每个插件的 {@link IExtend.use } 方法
|
|
313
|
-
* @param hostInst - 插件宿主的新实例
|
|
314
|
-
*/
|
|
315
|
-
instUseExtend(t, e, ...n) {
|
|
316
|
-
const { plugins: i } = this;
|
|
317
|
-
return i.has(e) ? i.get(e) : (this.useExtend(e), e.onCreate?.call(t, t, ...n), e);
|
|
318
|
-
}
|
|
319
|
-
/**
|
|
320
|
-
* 使用插件、注册插件
|
|
321
|
-
* @param plugin - 插件
|
|
322
|
-
* @param args - 传递给插件的选项
|
|
323
|
-
*/
|
|
324
|
-
usePlugin(t, ...e) {
|
|
325
|
-
const { plugins: n } = this;
|
|
326
|
-
if (n.has(t)) return n.get(t);
|
|
327
|
-
const i = t.onUse(this.host, ...e);
|
|
328
|
-
return n.set(t, i), i;
|
|
329
|
-
}
|
|
330
|
-
/**
|
|
331
|
-
* 插件宿主实例的注册插件的方法
|
|
332
|
-
*
|
|
333
|
-
* @remarks
|
|
334
|
-
* 会调用每个插件的 {@link IPlugin.use } 方法
|
|
335
|
-
* @param hostInst - 插件宿主的新实例
|
|
336
|
-
*/
|
|
337
|
-
instUsePlugin(t, e, ...n) {
|
|
338
|
-
const { plugins: i } = this;
|
|
339
|
-
if (i.has(e)) return i.get(e);
|
|
340
|
-
const r = this.usePlugin(e, ...n);
|
|
341
|
-
return e.onCreate?.(t), r;
|
|
342
|
-
}
|
|
343
|
-
/**
|
|
344
|
-
* 插件宿主创建实例时调用
|
|
345
|
-
*
|
|
346
|
-
* @remarks
|
|
347
|
-
* 会调用每个插件的 {@link IPlugin.onCreate} 方法
|
|
348
|
-
* 如果插件的 created 方法返回 Promise,则会等待 Promise resolve
|
|
349
|
-
* @param hostInst - 插件宿主的新实例
|
|
350
|
-
*/
|
|
351
|
-
onCreate(t, ...e) {
|
|
352
|
-
const n = [];
|
|
353
|
-
for (const [i, r] of this.plugins)
|
|
354
|
-
if (i.onCreate) {
|
|
355
|
-
const o = r === O ? i.onCreate : i.onCreate.bind(i);
|
|
356
|
-
n.push(o);
|
|
263
|
+
function b(n, e) {
|
|
264
|
+
const t = {}, s = [{ target: n, props: e, targetProps: t }];
|
|
265
|
+
let r;
|
|
266
|
+
for (; r = s.shift(); ) {
|
|
267
|
+
const { target: i, props: p, targetProps: u } = r;
|
|
268
|
+
for (const [l, g] of Object.entries(p)) {
|
|
269
|
+
if (g != null && typeof g == "object" && (!g.constructor || g.constructor === Object)) {
|
|
270
|
+
s.push({ target: i[l], props: g, targetProps: u[l] = {} });
|
|
271
|
+
continue;
|
|
357
272
|
}
|
|
358
|
-
|
|
273
|
+
u[l] = i[l];
|
|
274
|
+
}
|
|
359
275
|
}
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
* @param args - 初始化宿主实例时的参数
|
|
367
|
-
*/
|
|
368
|
-
onInit(t, ...e) {
|
|
369
|
-
const n = [];
|
|
370
|
-
for (const [i, r] of this.plugins)
|
|
371
|
-
if (i.onInit) {
|
|
372
|
-
const o = r === O ? i.onInit : i.onInit.bind(i);
|
|
373
|
-
n.push(o);
|
|
374
|
-
}
|
|
375
|
-
return g(n, t, [t, ...e]);
|
|
276
|
+
return t;
|
|
277
|
+
}
|
|
278
|
+
function z(n, e) {
|
|
279
|
+
const t = b(n, e);
|
|
280
|
+
function s() {
|
|
281
|
+
O(n, e);
|
|
376
282
|
}
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
*
|
|
380
|
-
* @remarks
|
|
381
|
-
* 会调用每个插件的 {@link IPlugin.onDestroy} 方法
|
|
382
|
-
* @param hostInst - 被销毁的插件实例
|
|
383
|
-
*/
|
|
384
|
-
onDestroy(t) {
|
|
385
|
-
const e = [];
|
|
386
|
-
for (const [n, i] of this.plugins)
|
|
387
|
-
if (n.onDestroy) {
|
|
388
|
-
const r = i === O ? n.onDestroy : n.onDestroy.bind(n);
|
|
389
|
-
e.push(r);
|
|
390
|
-
}
|
|
391
|
-
return e.reverse(), g(e, t, [t]);
|
|
283
|
+
function r() {
|
|
284
|
+
O(n, t);
|
|
392
285
|
}
|
|
286
|
+
return { set: s, unset: r };
|
|
393
287
|
}
|
|
394
|
-
function
|
|
395
|
-
const
|
|
396
|
-
return function(
|
|
397
|
-
const
|
|
288
|
+
function A(n, e) {
|
|
289
|
+
const t = e ?? "defaultOptions", s = `_${t}`;
|
|
290
|
+
return function(i) {
|
|
291
|
+
const p = a(i, {
|
|
398
292
|
/**
|
|
399
293
|
* 全局级别的默认选项
|
|
400
294
|
*/
|
|
401
|
-
get [
|
|
402
|
-
return
|
|
295
|
+
get [t]() {
|
|
296
|
+
return n;
|
|
403
297
|
}
|
|
404
298
|
});
|
|
405
|
-
|
|
299
|
+
a(p.prototype, {
|
|
406
300
|
/**
|
|
407
301
|
* 实例级的默认选项
|
|
408
302
|
*/
|
|
409
|
-
get [
|
|
410
|
-
return this[
|
|
303
|
+
get [t]() {
|
|
304
|
+
return this[s] || (this[s] = structuredClone(p.defaultOptions));
|
|
411
305
|
}
|
|
412
306
|
});
|
|
413
307
|
};
|
|
414
308
|
}
|
|
415
|
-
function
|
|
416
|
-
const
|
|
417
|
-
return
|
|
309
|
+
function G(n, e, t) {
|
|
310
|
+
const s = `_${e}`;
|
|
311
|
+
return a(n.prototype, {
|
|
418
312
|
/**
|
|
419
313
|
* 实例级的默认选项
|
|
420
314
|
*/
|
|
421
|
-
get [
|
|
422
|
-
return this[
|
|
315
|
+
get [e]() {
|
|
316
|
+
return this[s] || (this[s] = structuredClone(n[e]));
|
|
423
317
|
}
|
|
424
|
-
}),
|
|
425
|
-
}
|
|
426
|
-
function E(s) {
|
|
427
|
-
const t = s.split(".");
|
|
428
|
-
return t[0] === "" && t.shift(), t;
|
|
429
|
-
}
|
|
430
|
-
function x(s, t) {
|
|
431
|
-
for (const e of t)
|
|
432
|
-
if (s = s[e], s == null) return;
|
|
433
|
-
return s;
|
|
434
|
-
}
|
|
435
|
-
function pt(s, t) {
|
|
436
|
-
return x(s, E(t));
|
|
437
|
-
}
|
|
438
|
-
function U(s, t, e) {
|
|
439
|
-
const n = t.pop(), i = t.length;
|
|
440
|
-
let r = 0;
|
|
441
|
-
for (; r < i; ) {
|
|
442
|
-
const o = s[t[r]];
|
|
443
|
-
if (o == null) break;
|
|
444
|
-
s = o, r++;
|
|
445
|
-
}
|
|
446
|
-
t = t.slice(r);
|
|
447
|
-
for (const o of t)
|
|
448
|
-
s = s[o] = {};
|
|
449
|
-
return s[n] = e, s;
|
|
318
|
+
}), t;
|
|
450
319
|
}
|
|
451
|
-
function
|
|
452
|
-
|
|
320
|
+
function J(n, e, t) {
|
|
321
|
+
const s = a(n, {
|
|
322
|
+
/**
|
|
323
|
+
* 全局级别的默认选项
|
|
324
|
+
*/
|
|
325
|
+
modeOptions: new d(e, t)
|
|
326
|
+
});
|
|
327
|
+
return a(s.prototype, {
|
|
328
|
+
/**
|
|
329
|
+
* 实例级的默认选项
|
|
330
|
+
*/
|
|
331
|
+
get modeOptions() {
|
|
332
|
+
return this._modeOptions || (this._modeOptions = new d(e, void 0, this.constructor.modeOptions));
|
|
333
|
+
},
|
|
334
|
+
get mode() {
|
|
335
|
+
return this.modeOptions.mode;
|
|
336
|
+
},
|
|
337
|
+
set mode(r) {
|
|
338
|
+
this.modeOptions.mode = r;
|
|
339
|
+
},
|
|
340
|
+
get options() {
|
|
341
|
+
return this.modeOptions.fullOption;
|
|
342
|
+
}
|
|
343
|
+
}), n;
|
|
453
344
|
}
|
|
454
|
-
const
|
|
455
|
-
|
|
456
|
-
|
|
345
|
+
const Q = {
|
|
346
|
+
onUse(n, e, t) {
|
|
347
|
+
const s = e ?? w;
|
|
348
|
+
o(n, {
|
|
349
|
+
modeOptions: new d(
|
|
350
|
+
s,
|
|
351
|
+
void 0,
|
|
352
|
+
t
|
|
353
|
+
)
|
|
354
|
+
}), o(n.prototype, {
|
|
355
|
+
get modeOptions() {
|
|
356
|
+
const r = this, i = n;
|
|
357
|
+
return r._modeOptions || (r._modeOptions = new d(
|
|
358
|
+
i.modeOptions.mode,
|
|
359
|
+
void 0,
|
|
360
|
+
i.modeOptions
|
|
361
|
+
));
|
|
362
|
+
},
|
|
363
|
+
get mode() {
|
|
364
|
+
return this.modeOptions.mode;
|
|
365
|
+
},
|
|
366
|
+
set mode(r) {
|
|
367
|
+
const i = this;
|
|
368
|
+
i.modeOptions.mode = r;
|
|
369
|
+
},
|
|
370
|
+
get options() {
|
|
371
|
+
return this.modeOptions.plainFullOption;
|
|
372
|
+
}
|
|
373
|
+
});
|
|
457
374
|
},
|
|
458
|
-
|
|
459
|
-
|
|
375
|
+
onCreate(n, e) {
|
|
376
|
+
n.modeOptions.setOption(e);
|
|
377
|
+
}
|
|
378
|
+
}, R = {
|
|
379
|
+
onUse(n, e, t) {
|
|
380
|
+
o(n, {
|
|
381
|
+
/**
|
|
382
|
+
* 全局级别的默认选项
|
|
383
|
+
*/
|
|
384
|
+
defaultOptions: new f(e, t)
|
|
385
|
+
}), o(n.prototype, {
|
|
386
|
+
/**
|
|
387
|
+
* 实例级的默认选项
|
|
388
|
+
*/
|
|
389
|
+
get defaultOptions() {
|
|
390
|
+
return this._defaultOptions || (this._defaultOptions = new f(void 0, n.defaultOptions));
|
|
391
|
+
}
|
|
392
|
+
});
|
|
460
393
|
},
|
|
461
|
-
|
|
462
|
-
|
|
394
|
+
onCreate(n, e) {
|
|
395
|
+
n.defaultOptions.option = e;
|
|
463
396
|
}
|
|
464
397
|
};
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
398
|
+
function X(n, e) {
|
|
399
|
+
const t = a(n, {
|
|
400
|
+
/**
|
|
401
|
+
* 全局级别的默认选项
|
|
402
|
+
*/
|
|
403
|
+
defaultOptions: new f(e)
|
|
404
|
+
});
|
|
405
|
+
return a(t.prototype, {
|
|
406
|
+
/**
|
|
407
|
+
* 实例级的默认选项
|
|
408
|
+
*/
|
|
409
|
+
get defaultOptions() {
|
|
410
|
+
return this._defaultOptions || (this._defaultOptions = new f(void 0, this.constructor.defaultOptions));
|
|
411
|
+
}
|
|
412
|
+
}), n;
|
|
413
|
+
}
|
|
414
|
+
function T(n) {
|
|
415
|
+
const e = a(n, {
|
|
416
|
+
/**
|
|
417
|
+
* 是否使用独立的插件管理器
|
|
418
|
+
* @defaultValue false
|
|
419
|
+
*/
|
|
420
|
+
isolatedPluginManager: !1,
|
|
421
|
+
/**
|
|
422
|
+
* PluginHost 的插件管理器
|
|
423
|
+
*/
|
|
424
|
+
get pluginManager() {
|
|
425
|
+
return (!this._pluginManager || this.isolatedPluginManager && !this.hasOwnProperty("_pluginManager")) && (this._pluginManager = new h(this)), this._pluginManager;
|
|
426
|
+
},
|
|
427
|
+
// _pluginManager: PluginManager<HOST,Plugin>;
|
|
428
|
+
/**
|
|
429
|
+
* {@inheritDoc PluginExtendManager.usePlugin}
|
|
430
|
+
*/
|
|
431
|
+
usePlugin(t, ...s) {
|
|
432
|
+
return this.pluginManager.usePlugin(t, ...s);
|
|
483
433
|
},
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
434
|
+
/**
|
|
435
|
+
* {@inheritDoc PluginExtendManager.useExtend}
|
|
436
|
+
*/
|
|
437
|
+
useExtend(t) {
|
|
438
|
+
return this.pluginManager.useExtend(t);
|
|
487
439
|
},
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
440
|
+
/**
|
|
441
|
+
* 是否注册了插件 或 扩展
|
|
442
|
+
* @param plugin - 插件 或 扩展
|
|
443
|
+
* @returns 是否注册了插件 或 扩展
|
|
444
|
+
*/
|
|
445
|
+
hasUsed(t) {
|
|
446
|
+
return this.pluginManager.hasUsed(t);
|
|
447
|
+
}
|
|
448
|
+
});
|
|
449
|
+
return a(e.prototype, {
|
|
450
|
+
/**
|
|
451
|
+
* 插件管理器
|
|
452
|
+
*/
|
|
453
|
+
get pluginManager() {
|
|
454
|
+
return this.constructor.pluginManager;
|
|
491
455
|
},
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
456
|
+
/**
|
|
457
|
+
* 实例的注册插件的方法
|
|
458
|
+
* @param plugin
|
|
459
|
+
* @param options
|
|
460
|
+
* @returns
|
|
461
|
+
*/
|
|
462
|
+
usePlugin(t, ...s) {
|
|
463
|
+
return this.pluginManager.instUsePlugin(this, t, ...s);
|
|
495
464
|
},
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
465
|
+
/**
|
|
466
|
+
* {@inheritDoc PluginExtendManager.useExtend}
|
|
467
|
+
*/
|
|
468
|
+
useExtend(t, ...s) {
|
|
469
|
+
return this.pluginManager.instUseExtend(this, t, ...s);
|
|
499
470
|
},
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
471
|
+
/**
|
|
472
|
+
* 初始化实例
|
|
473
|
+
* @param args
|
|
474
|
+
*/
|
|
475
|
+
async init(...t) {
|
|
476
|
+
return super.init && await super.init(...t), this.pluginManager.onInit(this, ...t);
|
|
503
477
|
},
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
* 设置选项
|
|
511
|
-
* @remarks
|
|
512
|
-
* 会将被设置的选项浅合并进当前选项中
|
|
513
|
-
* @param option
|
|
514
|
-
* @param deep - 是否要进行深度合并
|
|
515
|
-
*/
|
|
516
|
-
setOption(t, e) {
|
|
517
|
-
const n = e ? y(this.option, t) : Object.assign(this.option, t);
|
|
518
|
-
return this.updateFullOption(), n;
|
|
519
|
-
}
|
|
520
|
-
/**
|
|
521
|
-
* 未定义值的类型
|
|
522
|
-
*/
|
|
523
|
-
get undefinedValue() {
|
|
524
|
-
return this._undefinedValue;
|
|
525
|
-
}
|
|
526
|
-
set undefinedValue(t) {
|
|
527
|
-
this._undefinedValue = t, this.isUndefined = P[t] || P.UndefinedAndNull;
|
|
528
|
-
}
|
|
529
|
-
_undefinedValue = "UndefinedAndNull";
|
|
530
|
-
/**
|
|
531
|
-
* 未定义值的判断函数
|
|
532
|
-
*/
|
|
533
|
-
isUndefined = P.UndefinedAndNull;
|
|
534
|
-
/**
|
|
535
|
-
* 获取选项成员
|
|
536
|
-
* @param key
|
|
537
|
-
* @returns
|
|
538
|
-
*/
|
|
539
|
-
getMember(t) {
|
|
540
|
-
return this.option[t];
|
|
541
|
-
}
|
|
542
|
-
/**
|
|
543
|
-
* 设置选项成员
|
|
544
|
-
* @param key
|
|
545
|
-
* @param value
|
|
546
|
-
* @param deep - 是否要进行深度合并
|
|
547
|
-
*/
|
|
548
|
-
setMember(t, e, n) {
|
|
549
|
-
const i = this.option;
|
|
550
|
-
if (e === void 0)
|
|
551
|
-
delete i[t];
|
|
552
|
-
else {
|
|
553
|
-
const r = i[t];
|
|
554
|
-
n && r && typeof r == "object" ? y(r, e) : i[t] = e;
|
|
478
|
+
/**
|
|
479
|
+
* 销毁实例
|
|
480
|
+
* @returns
|
|
481
|
+
*/
|
|
482
|
+
async destroy() {
|
|
483
|
+
if (await this.pluginManager.onDestroy(this), super.destroy) return super.destroy();
|
|
555
484
|
}
|
|
556
|
-
|
|
557
|
-
}
|
|
558
|
-
/**
|
|
559
|
-
* 获取属性路径对应的值
|
|
560
|
-
* @param propPath
|
|
561
|
-
* @returns
|
|
562
|
-
*/
|
|
563
|
-
getValue(t) {
|
|
564
|
-
return x(this.option, t);
|
|
565
|
-
}
|
|
566
|
-
/**
|
|
567
|
-
* 设置属性路径对应的值
|
|
568
|
-
* @param propPath
|
|
569
|
-
* @param value
|
|
570
|
-
* @param deep - 是否要进行深度合并
|
|
571
|
-
* @returns
|
|
572
|
-
*/
|
|
573
|
-
setValue(t, e, n) {
|
|
574
|
-
const i = this.option;
|
|
575
|
-
let r;
|
|
576
|
-
n && (r = x(i, t)) && typeof r == "object" ? y(r, e) : U(this.option, t, e), this.updateFullOption();
|
|
577
|
-
}
|
|
485
|
+
}), n;
|
|
578
486
|
}
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
*/
|
|
586
|
-
get extends() {
|
|
587
|
-
return this._extends;
|
|
588
|
-
}
|
|
589
|
-
set extends(t) {
|
|
590
|
-
this._extends = t, this.updateFullOption();
|
|
591
|
-
}
|
|
592
|
-
_extends = null;
|
|
593
|
-
/**
|
|
594
|
-
* 选项
|
|
595
|
-
*/
|
|
596
|
-
option = {};
|
|
597
|
-
/**
|
|
598
|
-
* 获取完整的选项
|
|
599
|
-
* @remarks
|
|
600
|
-
* 会与继承来的选项进行合并
|
|
601
|
-
*/
|
|
602
|
-
get plainFullOption() {
|
|
603
|
-
let t = this._plainFullOption;
|
|
604
|
-
if (t) return t;
|
|
605
|
-
const { extends: e, option: n } = this;
|
|
606
|
-
if (t = n, e) {
|
|
607
|
-
const i = e.plainFullOption;
|
|
608
|
-
t = w(i, n);
|
|
487
|
+
function Y(n) {
|
|
488
|
+
const e = T(n);
|
|
489
|
+
return new Proxy(e, {
|
|
490
|
+
construct: function(t, s, r) {
|
|
491
|
+
const i = new t(...s);
|
|
492
|
+
return e.pluginManager.onCreate(this, ...s), i;
|
|
609
493
|
}
|
|
610
|
-
|
|
611
|
-
}
|
|
612
|
-
_plainFullOption = null;
|
|
613
|
-
/**
|
|
614
|
-
* 更新
|
|
615
|
-
*/
|
|
616
|
-
updateFullOption() {
|
|
617
|
-
this._plainFullOption = null;
|
|
618
|
-
}
|
|
619
|
-
/**
|
|
620
|
-
* 获取选项成员
|
|
621
|
-
* @param key
|
|
622
|
-
* @returns
|
|
623
|
-
*/
|
|
624
|
-
getMember(t) {
|
|
625
|
-
const e = this.option[t];
|
|
626
|
-
if (!this.isUndefined(e)) return e;
|
|
627
|
-
const n = this.extends;
|
|
628
|
-
if (n)
|
|
629
|
-
return n.getMember(t);
|
|
630
|
-
}
|
|
631
|
-
/**
|
|
632
|
-
* 获取属性路径对应的值
|
|
633
|
-
* @param propPath
|
|
634
|
-
* @returns
|
|
635
|
-
*/
|
|
636
|
-
getValue(t) {
|
|
637
|
-
const e = super.getValue(t);
|
|
638
|
-
if (!this.isUndefined(e)) return e;
|
|
639
|
-
const n = this.extends;
|
|
640
|
-
if (n)
|
|
641
|
-
return n.getValue(t);
|
|
642
|
-
}
|
|
494
|
+
});
|
|
643
495
|
}
|
|
644
|
-
function
|
|
645
|
-
|
|
646
|
-
return {
|
|
647
|
-
get: function() {
|
|
648
|
-
return this[n] || (this[n] = new u(void 0, this.constructor[e]));
|
|
649
|
-
}
|
|
650
|
-
};
|
|
651
|
-
}
|
|
652
|
-
class B extends v {
|
|
653
|
-
constructor(t, e) {
|
|
654
|
-
super(), e && this.setModeOption(t, e), this.mode = t;
|
|
655
|
-
}
|
|
656
|
-
/**
|
|
657
|
-
* 模式的配置
|
|
658
|
-
*/
|
|
659
|
-
modes = {};
|
|
660
|
-
/**
|
|
661
|
-
* 当前模式
|
|
662
|
-
*/
|
|
663
|
-
get mode() {
|
|
664
|
-
return this._mode || (this.mode = this.modeNames[0]);
|
|
665
|
-
}
|
|
666
|
-
set mode(t) {
|
|
667
|
-
this._mode = t, this.hasMode(t) || this.setModeOption(t, {}), this.updateFullOption();
|
|
668
|
-
}
|
|
669
|
-
_mode;
|
|
670
|
-
/**
|
|
671
|
-
* 所有的模式名字
|
|
672
|
-
*/
|
|
673
|
-
get modeNames() {
|
|
674
|
-
return this._modeNames || (this._modeNames = this.getModeNames());
|
|
675
|
-
}
|
|
676
|
-
_modeNames = null;
|
|
677
|
-
/**
|
|
678
|
-
* 获取所有的模式名字
|
|
679
|
-
* @returns
|
|
680
|
-
*/
|
|
681
|
-
getModeNames() {
|
|
682
|
-
return Object.keys(this.modes);
|
|
683
|
-
}
|
|
684
|
-
/**
|
|
685
|
-
* 判断是否有某个模式
|
|
686
|
-
* @param mode
|
|
687
|
-
* @returns
|
|
688
|
-
*/
|
|
689
|
-
hasMode(t) {
|
|
690
|
-
return !!this.modes[t];
|
|
691
|
-
}
|
|
692
|
-
/**
|
|
693
|
-
* 当前模式的选项
|
|
694
|
-
*/
|
|
695
|
-
get optionManager() {
|
|
696
|
-
return this.modes[this.mode];
|
|
697
|
-
}
|
|
698
|
-
/**
|
|
699
|
-
* 当前模式对应的选项
|
|
700
|
-
*/
|
|
701
|
-
get option() {
|
|
702
|
-
return this.optionManager.option;
|
|
703
|
-
}
|
|
704
|
-
get plainFullOption() {
|
|
705
|
-
return this._plainFullOption ?? (this._plainFullOption = this.getFullModeOption(this.mode));
|
|
706
|
-
}
|
|
707
|
-
_plainFullOption = null;
|
|
708
|
-
/**
|
|
709
|
-
* 更新
|
|
710
|
-
*/
|
|
711
|
-
updateFullOption() {
|
|
712
|
-
this._plainFullOption = null, this._modeNames = null;
|
|
713
|
-
}
|
|
714
|
-
/**
|
|
715
|
-
* 返回已合并继承选项的选项
|
|
716
|
-
* @remarks
|
|
717
|
-
* 与继承选项只是浅合并
|
|
718
|
-
* @param mode
|
|
719
|
-
* @returns
|
|
720
|
-
*/
|
|
721
|
-
getModeOption(t) {
|
|
722
|
-
return this.modes[t].option;
|
|
723
|
-
}
|
|
724
|
-
/**
|
|
725
|
-
* 返回已合并继承选项的完整选项
|
|
726
|
-
* @remarks
|
|
727
|
-
* 与继承选项合并
|
|
728
|
-
* @param mode
|
|
729
|
-
* @returns
|
|
730
|
-
*/
|
|
731
|
-
getFullModeOption(t) {
|
|
732
|
-
return this.modes[t]?.plainFullOption;
|
|
733
|
-
}
|
|
734
|
-
/**
|
|
735
|
-
* 给模式设置选项
|
|
736
|
-
* @param mode
|
|
737
|
-
* @param option
|
|
738
|
-
* @param deep - 是否要进行深度合并
|
|
739
|
-
* @param extend - 继承哪个模式
|
|
740
|
-
*/
|
|
741
|
-
setModeOption(t, e, n, i) {
|
|
742
|
-
const { modes: r } = this, o = r[t] || (r[t] = new u());
|
|
743
|
-
if (o.setOption(e, n), i) {
|
|
744
|
-
const l = r[i];
|
|
745
|
-
l && (o.extends = l);
|
|
746
|
-
}
|
|
747
|
-
return this.updateFullOption(), o;
|
|
748
|
-
}
|
|
749
|
-
}
|
|
750
|
-
class a extends B {
|
|
751
|
-
constructor(t, e, n) {
|
|
752
|
-
super(t, e), n && (this.extends = n);
|
|
753
|
-
}
|
|
754
|
-
/**
|
|
755
|
-
* 继承的选项
|
|
756
|
-
*/
|
|
757
|
-
get extends() {
|
|
758
|
-
return this._extends;
|
|
759
|
-
}
|
|
760
|
-
set extends(t) {
|
|
761
|
-
this._extends = t, this.updateFullOption();
|
|
762
|
-
}
|
|
763
|
-
_extends = null;
|
|
764
|
-
/**
|
|
765
|
-
* 返回已合并继承选项的最终选项
|
|
766
|
-
* @remarks
|
|
767
|
-
* 与继承选项只是浅合并
|
|
768
|
-
* @param mode
|
|
769
|
-
* @returns
|
|
770
|
-
*/
|
|
771
|
-
getFullModeOption(t) {
|
|
772
|
-
const { modes: e, extends: n } = this, i = e[t]?.plainFullOption;
|
|
773
|
-
if (n) {
|
|
774
|
-
const r = n.getFullModeOption(t);
|
|
775
|
-
return i ? w(r, i) : r;
|
|
776
|
-
}
|
|
777
|
-
return i;
|
|
778
|
-
}
|
|
779
|
-
/**
|
|
780
|
-
* 获取所有的模式名字
|
|
781
|
-
* @returns
|
|
782
|
-
*/
|
|
783
|
-
getModeNames() {
|
|
784
|
-
const { modes: t, extends: e } = this, n = Object.keys(t);
|
|
785
|
-
if (!e) return n;
|
|
786
|
-
const i = e.getModeNames();
|
|
787
|
-
return [.../* @__PURE__ */ new Set([...n, ...i])];
|
|
788
|
-
}
|
|
789
|
-
/**
|
|
790
|
-
* 在整个层级上判断是否有某个模式
|
|
791
|
-
* @param mode
|
|
792
|
-
* @returns
|
|
793
|
-
*/
|
|
794
|
-
hasModeOnTier(t) {
|
|
795
|
-
if (this.hasMode(t)) return !0;
|
|
796
|
-
const e = this.extends;
|
|
797
|
-
return e ? e.hasModeOnTier(t) : !1;
|
|
798
|
-
}
|
|
799
|
-
/**
|
|
800
|
-
* 当前模式的选项
|
|
801
|
-
*/
|
|
802
|
-
get optionManager() {
|
|
803
|
-
return this.getModeOptionManager(this.mode);
|
|
804
|
-
}
|
|
805
|
-
/**
|
|
806
|
-
* 获取模式对应的选项管理器
|
|
807
|
-
* @param mode
|
|
808
|
-
* @returns
|
|
809
|
-
*/
|
|
810
|
-
getModeOptionManager(t) {
|
|
811
|
-
const e = this.modes[t];
|
|
812
|
-
return e || (this.extends?.getModeOptionManager(t) ? this.setModeOption(t, {}) : null);
|
|
813
|
-
}
|
|
814
|
-
/**
|
|
815
|
-
* 获取选项成员
|
|
816
|
-
* @param key
|
|
817
|
-
* @returns
|
|
818
|
-
*/
|
|
819
|
-
getMember(t) {
|
|
820
|
-
const e = this.optionManager.getMember(t);
|
|
821
|
-
if (!this.isUndefined(e)) return e;
|
|
822
|
-
const n = this.extends;
|
|
823
|
-
if (n)
|
|
824
|
-
return n.getMember(t);
|
|
825
|
-
}
|
|
826
|
-
/**
|
|
827
|
-
* 获取属性路径对应的值
|
|
828
|
-
* @param propPath
|
|
829
|
-
* @returns
|
|
830
|
-
*/
|
|
831
|
-
getValue(t) {
|
|
832
|
-
const e = this.optionManager.getValue(t);
|
|
833
|
-
if (!this.isUndefined(e)) return e;
|
|
834
|
-
const n = this.extends;
|
|
835
|
-
if (n)
|
|
836
|
-
return n.getValue(t);
|
|
837
|
-
}
|
|
838
|
-
}
|
|
839
|
-
function ct(s, t) {
|
|
840
|
-
const { name: e } = t, n = `_${e}`;
|
|
841
|
-
return {
|
|
842
|
-
get: function() {
|
|
843
|
-
return this[n] || (this[n] = new a(this.constructor[e].mode, void 0, this.constructor[e]));
|
|
844
|
-
}
|
|
845
|
-
};
|
|
846
|
-
}
|
|
847
|
-
class D extends M {
|
|
848
|
-
/**
|
|
849
|
-
* 是否使用独立的插件管理器
|
|
850
|
-
* @defaultValue false
|
|
851
|
-
*/
|
|
852
|
-
static isolatedPluginManager = !1;
|
|
853
|
-
/**
|
|
854
|
-
* 插件管理器
|
|
855
|
-
*/
|
|
856
|
-
static get pluginManager() {
|
|
857
|
-
return this.isolatedPluginManager && !this.hasOwnProperty("_pluginManager") && (this._pluginManager = new d(this)), this._pluginManager;
|
|
858
|
-
}
|
|
859
|
-
static _pluginManager = new d(this);
|
|
860
|
-
/**
|
|
861
|
-
* 插件管理器 {@link PluginHost.pluginManager}
|
|
862
|
-
*/
|
|
863
|
-
get pluginManager() {
|
|
864
|
-
return this.constructor.pluginManager;
|
|
865
|
-
}
|
|
866
|
-
/**
|
|
867
|
-
* {@inheritDoc PluginExtendManager.usePlugin}
|
|
868
|
-
*/
|
|
869
|
-
static usePlugin(t, ...e) {
|
|
870
|
-
return this.pluginManager.usePlugin(t, ...e);
|
|
871
|
-
}
|
|
872
|
-
/**
|
|
873
|
-
* {@inheritDoc PluginExtendManager.useExtend}
|
|
874
|
-
*/
|
|
875
|
-
static useExtend(t) {
|
|
876
|
-
return this.pluginManager.useExtend(t);
|
|
877
|
-
}
|
|
878
|
-
/**
|
|
879
|
-
* 是否注册了插件 或 扩展
|
|
880
|
-
* @param plugin - 插件 或 扩展
|
|
881
|
-
* @returns 是否注册了插件 或 扩展
|
|
882
|
-
*/
|
|
883
|
-
static hasUsed(t) {
|
|
884
|
-
return this.pluginManager.hasUsed(t);
|
|
885
|
-
}
|
|
886
|
-
/**
|
|
887
|
-
* 需要在子类中调用
|
|
888
|
-
*
|
|
889
|
-
* 之所以没写在该类中的函数中,是因为 `this.pluginManager.onCreate(this,...args)` 通常会在构建函数执行的最后时才调用;
|
|
890
|
-
* 如果像下面写在该类的构建函数中,然后子类通过 `super()` 来调用,这样就会导致 `this.pluginManager.onCreate(this,...args)` 不是在最后的执行;
|
|
891
|
-
*/
|
|
892
|
-
// constructor(...args:any) {
|
|
893
|
-
// super();
|
|
894
|
-
// // @ts-ignore
|
|
895
|
-
// this.pluginManager.onCreate(this,...args);
|
|
896
|
-
// }
|
|
897
|
-
/**
|
|
898
|
-
* 实例的注册插件的方法
|
|
899
|
-
* @param plugin
|
|
900
|
-
* @param args
|
|
901
|
-
* @returns
|
|
902
|
-
*/
|
|
903
|
-
usePlugin(t, ...e) {
|
|
904
|
-
return this.pluginManager.instUsePlugin(this, t, ...e);
|
|
905
|
-
}
|
|
906
|
-
/**
|
|
907
|
-
* {@inheritDoc PluginExtendManager.useExtend}
|
|
908
|
-
*/
|
|
909
|
-
useExtend(t, ...e) {
|
|
910
|
-
return this.pluginManager.instUseExtend(this, t, ...e);
|
|
911
|
-
}
|
|
912
|
-
/**
|
|
913
|
-
* 初始化实例
|
|
914
|
-
* @remarks
|
|
915
|
-
* 会调用 {@link PluginExtendManager.onInit}
|
|
916
|
-
* @param args
|
|
917
|
-
*/
|
|
918
|
-
init(...t) {
|
|
919
|
-
return this.pluginManager.onInit(this, ...t);
|
|
920
|
-
}
|
|
921
|
-
/**
|
|
922
|
-
* 销毁实例
|
|
923
|
-
* @returns
|
|
924
|
-
*/
|
|
925
|
-
destroyThis() {
|
|
926
|
-
const t = this.pluginManager.onDestroy(this);
|
|
927
|
-
return t instanceof Promise ? t.finally(() => super.destroyThis()) : super.destroyThis();
|
|
928
|
-
}
|
|
929
|
-
}
|
|
930
|
-
class F extends H {
|
|
931
|
-
/**
|
|
932
|
-
* 是否使用独立的插件管理器
|
|
933
|
-
* @defaultValue false
|
|
934
|
-
*/
|
|
935
|
-
static isolatedPluginManager = !1;
|
|
936
|
-
/**
|
|
937
|
-
* 插件管理器
|
|
938
|
-
*/
|
|
939
|
-
static get pluginManager() {
|
|
940
|
-
return this.isolatedPluginManager && !this.hasOwnProperty("_pluginManager") && (this._pluginManager = new d(this)), this._pluginManager;
|
|
941
|
-
}
|
|
942
|
-
static _pluginManager = new d(this);
|
|
943
|
-
/**
|
|
944
|
-
* 插件管理器 {@link PluginHost.pluginManager}
|
|
945
|
-
*/
|
|
946
|
-
get pluginManager() {
|
|
947
|
-
return this.constructor.pluginManager;
|
|
948
|
-
}
|
|
949
|
-
/**
|
|
950
|
-
* {@inheritDoc PluginExtendManager.usePlugin}
|
|
951
|
-
*/
|
|
952
|
-
static usePlugin(t, ...e) {
|
|
953
|
-
return this.pluginManager.usePlugin(t, ...e);
|
|
954
|
-
}
|
|
955
|
-
/**
|
|
956
|
-
* {@inheritDoc PluginExtendManager.useExtend}
|
|
957
|
-
*/
|
|
958
|
-
static useExtend(t) {
|
|
959
|
-
return this.pluginManager.useExtend(t);
|
|
960
|
-
}
|
|
961
|
-
/**
|
|
962
|
-
* 是否注册了插件 或 扩展
|
|
963
|
-
* @param plugin - 插件 或 扩展
|
|
964
|
-
* @returns 是否注册了插件 或 扩展
|
|
965
|
-
*/
|
|
966
|
-
static hasUsed(t) {
|
|
967
|
-
return this.pluginManager.hasUsed(t);
|
|
968
|
-
}
|
|
969
|
-
/**
|
|
970
|
-
* 需要在子类中调用
|
|
971
|
-
*
|
|
972
|
-
* 之所以没写在该类中的函数中,是因为 `this.pluginManager.onCreate(this,...args)` 通常会在构建函数执行的最后时才调用;
|
|
973
|
-
* 如果像下面写在该类的构建函数中,然后子类通过 `super()` 来调用,这样就会导致 `this.pluginManager.onCreate(this,...args)` 不是在最后的执行;
|
|
974
|
-
*/
|
|
975
|
-
// constructor(...args:any) {
|
|
976
|
-
// super();
|
|
977
|
-
// // @ts-ignore
|
|
978
|
-
// this.pluginManager.onCreate(this,...args);
|
|
979
|
-
// }
|
|
980
|
-
/**
|
|
981
|
-
* 实例的注册插件的方法
|
|
982
|
-
* @param plugin
|
|
983
|
-
* @param args
|
|
984
|
-
* @returns
|
|
985
|
-
*/
|
|
986
|
-
usePlugin(t, ...e) {
|
|
987
|
-
return this.pluginManager.instUsePlugin(this, t, ...e);
|
|
988
|
-
}
|
|
989
|
-
/**
|
|
990
|
-
* {@inheritDoc PluginExtendManager.useExtend}
|
|
991
|
-
*/
|
|
992
|
-
useExtend(t, ...e) {
|
|
993
|
-
return this.pluginManager.instUseExtend(this, t, ...e);
|
|
994
|
-
}
|
|
995
|
-
/**
|
|
996
|
-
* 初始化实例
|
|
997
|
-
* @remarks
|
|
998
|
-
* 会调用 {@link PluginExtendManager.onInit}
|
|
999
|
-
* @param args
|
|
1000
|
-
*/
|
|
1001
|
-
init(...t) {
|
|
1002
|
-
return this.pluginManager.onInit(this, ...t);
|
|
1003
|
-
}
|
|
1004
|
-
/**
|
|
1005
|
-
* 销毁实例
|
|
1006
|
-
* @returns
|
|
1007
|
-
*/
|
|
1008
|
-
destroyThis() {
|
|
1009
|
-
const t = this.pluginManager.onDestroy(this);
|
|
1010
|
-
return t instanceof Promise ? t.finally(() => super.destroyThis()) : super.destroyThis();
|
|
1011
|
-
}
|
|
1012
|
-
}
|
|
1013
|
-
class C extends V {
|
|
1014
|
-
/**
|
|
1015
|
-
* 是否使用独立的插件管理器
|
|
1016
|
-
* @defaultValue false
|
|
1017
|
-
*/
|
|
1018
|
-
static isolatedPluginManager = !1;
|
|
1019
|
-
/**
|
|
1020
|
-
* 插件管理器
|
|
1021
|
-
*/
|
|
1022
|
-
static get pluginManager() {
|
|
1023
|
-
return this.isolatedPluginManager && !this.hasOwnProperty("_pluginManager") && (this._pluginManager = new d(this)), this._pluginManager;
|
|
1024
|
-
}
|
|
1025
|
-
static _pluginManager = new d(this);
|
|
1026
|
-
/**
|
|
1027
|
-
* 插件管理器 {@link PluginHost.pluginManager}
|
|
1028
|
-
*/
|
|
1029
|
-
get pluginManager() {
|
|
1030
|
-
return this.constructor.pluginManager;
|
|
1031
|
-
}
|
|
1032
|
-
/**
|
|
1033
|
-
* {@inheritDoc PluginExtendManager.usePlugin}
|
|
1034
|
-
*/
|
|
1035
|
-
static usePlugin(t, ...e) {
|
|
1036
|
-
return this.pluginManager.usePlugin(t, ...e);
|
|
1037
|
-
}
|
|
1038
|
-
/**
|
|
1039
|
-
* {@inheritDoc PluginExtendManager.useExtend}
|
|
1040
|
-
*/
|
|
1041
|
-
static useExtend(t) {
|
|
1042
|
-
return this.pluginManager.useExtend(t);
|
|
1043
|
-
}
|
|
1044
|
-
/**
|
|
1045
|
-
* 是否注册了插件 或 扩展
|
|
1046
|
-
* @param plugin - 插件 或 扩展
|
|
1047
|
-
* @returns 是否注册了插件 或 扩展
|
|
1048
|
-
*/
|
|
1049
|
-
static hasUsed(t) {
|
|
1050
|
-
return this.pluginManager.hasUsed(t);
|
|
1051
|
-
}
|
|
1052
|
-
/**
|
|
1053
|
-
* 需要在子类中调用
|
|
1054
|
-
*
|
|
1055
|
-
* 之所以没写在该类中的函数中,是因为 `this.pluginManager.onCreate(this,...args)` 通常会在构建函数执行的最后时才调用;
|
|
1056
|
-
* 如果像下面写在该类的构建函数中,然后子类通过 `super()` 来调用,这样就会导致 `this.pluginManager.onCreate(this,...args)` 不是在最后的执行;
|
|
1057
|
-
*/
|
|
1058
|
-
// constructor(...args:any) {
|
|
1059
|
-
// super();
|
|
1060
|
-
// // @ts-ignore
|
|
1061
|
-
// this.pluginManager.onCreate(this,...args);
|
|
1062
|
-
// }
|
|
1063
|
-
/**
|
|
1064
|
-
* 实例的注册插件的方法
|
|
1065
|
-
* @param plugin
|
|
1066
|
-
* @param args
|
|
1067
|
-
* @returns
|
|
1068
|
-
*/
|
|
1069
|
-
usePlugin(t, ...e) {
|
|
1070
|
-
return this.pluginManager.instUsePlugin(this, t, ...e);
|
|
1071
|
-
}
|
|
1072
|
-
/**
|
|
1073
|
-
* {@inheritDoc PluginExtendManager.useExtend}
|
|
1074
|
-
*/
|
|
1075
|
-
useExtend(t, ...e) {
|
|
1076
|
-
return this.pluginManager.instUseExtend(this, t, ...e);
|
|
1077
|
-
}
|
|
1078
|
-
/**
|
|
1079
|
-
* 初始化实例
|
|
1080
|
-
* @remarks
|
|
1081
|
-
* 会调用 {@link PluginExtendManager.onInit}
|
|
1082
|
-
* @param args
|
|
1083
|
-
*/
|
|
1084
|
-
init(...t) {
|
|
1085
|
-
return this.pluginManager.onInit(this, ...t);
|
|
1086
|
-
}
|
|
1087
|
-
/**
|
|
1088
|
-
* 销毁实例
|
|
1089
|
-
* @returns
|
|
1090
|
-
*/
|
|
1091
|
-
destroyThis() {
|
|
1092
|
-
const t = this.pluginManager.onDestroy(this);
|
|
1093
|
-
return t instanceof Promise ? t.finally(() => super.destroyThis()) : super.destroyThis();
|
|
1094
|
-
}
|
|
1095
|
-
}
|
|
1096
|
-
function N(s) {
|
|
1097
|
-
const t = j(s);
|
|
1098
|
-
return class extends t {
|
|
496
|
+
function L(n) {
|
|
497
|
+
return class extends n {
|
|
1099
498
|
/**
|
|
1100
499
|
* 是否使用独立的插件管理器
|
|
1101
500
|
* @defaultValue false
|
|
@@ -1105,175 +504,9 @@ function N(s) {
|
|
|
1105
504
|
* 插件管理器
|
|
1106
505
|
*/
|
|
1107
506
|
static get pluginManager() {
|
|
1108
|
-
return this.isolatedPluginManager && !this.hasOwnProperty("_pluginManager") && (this._pluginManager = new
|
|
1109
|
-
}
|
|
1110
|
-
static _pluginManager = new d(this);
|
|
1111
|
-
/**
|
|
1112
|
-
* 插件管理器 {@link PluginHostSub.pluginManager}
|
|
1113
|
-
*/
|
|
1114
|
-
get pluginManager() {
|
|
1115
|
-
return this.constructor.pluginManager;
|
|
1116
|
-
}
|
|
1117
|
-
/**
|
|
1118
|
-
* {@inheritDoc PluginExtendManager.usePlugin}
|
|
1119
|
-
*/
|
|
1120
|
-
static usePlugin(n, ...i) {
|
|
1121
|
-
return this.pluginManager.usePlugin(n, ...i);
|
|
1122
|
-
}
|
|
1123
|
-
/**
|
|
1124
|
-
* {@inheritDoc PluginExtendManager.useExtend}
|
|
1125
|
-
*/
|
|
1126
|
-
static useExtend(n) {
|
|
1127
|
-
return this.pluginManager.useExtend(n);
|
|
1128
|
-
}
|
|
1129
|
-
/**
|
|
1130
|
-
* 是否注册了插件 或 扩展
|
|
1131
|
-
* @param plugin - 插件 或 扩展
|
|
1132
|
-
* @returns 是否注册了插件 或 扩展
|
|
1133
|
-
*/
|
|
1134
|
-
static hasUsed(n) {
|
|
1135
|
-
return this.pluginManager.hasUsed(n);
|
|
1136
|
-
}
|
|
1137
|
-
/**
|
|
1138
|
-
* 需要在子类中调用
|
|
1139
|
-
*
|
|
1140
|
-
* 之所以没写在该类中的函数中,是因为 `this.pluginManager.onCreate(this)` 通常会在构建函数执行的最后时才调用;
|
|
1141
|
-
* 如果像下面写在该类的构建函数中,然后子类通过 `super()` 来调用,这样就会导致 `this.pluginManager.onCreate(this)` 不是在最后的执行;
|
|
1142
|
-
*/
|
|
1143
|
-
// constructor() {
|
|
1144
|
-
// super();
|
|
1145
|
-
// this.pluginManager.onCreate(this);
|
|
1146
|
-
// }
|
|
1147
|
-
/**
|
|
1148
|
-
* 实例的注册插件的方法
|
|
1149
|
-
* @param plugin
|
|
1150
|
-
* @param args
|
|
1151
|
-
* @returns
|
|
1152
|
-
*/
|
|
1153
|
-
usePlugin(n, ...i) {
|
|
1154
|
-
return this.pluginManager.instUsePlugin(this, n, ...i);
|
|
1155
|
-
}
|
|
1156
|
-
/**
|
|
1157
|
-
* {@inheritDoc PluginExtendManager.useExtend}
|
|
1158
|
-
*/
|
|
1159
|
-
useExtend(n, ...i) {
|
|
1160
|
-
return this.pluginManager.instUseExtend(this, n, ...i);
|
|
507
|
+
return this.isolatedPluginManager && !this.hasOwnProperty("_pluginManager") && (this._pluginManager = new h(this)), this._pluginManager;
|
|
1161
508
|
}
|
|
1162
|
-
|
|
1163
|
-
* 初始化实例
|
|
1164
|
-
* @remarks
|
|
1165
|
-
* 会调用 {@link PluginExtendManager.onInit}
|
|
1166
|
-
* @param args
|
|
1167
|
-
*/
|
|
1168
|
-
init(...n) {
|
|
1169
|
-
return this.pluginManager.onInit(this, ...n);
|
|
1170
|
-
}
|
|
1171
|
-
/**
|
|
1172
|
-
* 销毁实例
|
|
1173
|
-
* @returns
|
|
1174
|
-
*/
|
|
1175
|
-
destroyThis() {
|
|
1176
|
-
const n = this.pluginManager.onDestroy(this);
|
|
1177
|
-
return n instanceof Promise ? n.finally(() => super.destroyThis()) : super.destroyThis();
|
|
1178
|
-
}
|
|
1179
|
-
};
|
|
1180
|
-
}
|
|
1181
|
-
function $(s) {
|
|
1182
|
-
const t = c(s, {
|
|
1183
|
-
/**
|
|
1184
|
-
* 是否使用独立的插件管理器
|
|
1185
|
-
* @defaultValue false
|
|
1186
|
-
*/
|
|
1187
|
-
isolatedPluginManager: !1,
|
|
1188
|
-
/**
|
|
1189
|
-
* PluginHost 的插件管理器
|
|
1190
|
-
*/
|
|
1191
|
-
get pluginManager() {
|
|
1192
|
-
return (!this._pluginManager || this.isolatedPluginManager && !this.hasOwnProperty("_pluginManager")) && (this._pluginManager = new d(this)), this._pluginManager;
|
|
1193
|
-
},
|
|
1194
|
-
// _pluginManager: PluginManager<HOST,Plugin>;
|
|
1195
|
-
/**
|
|
1196
|
-
* {@inheritDoc PluginExtendManager.usePlugin}
|
|
1197
|
-
*/
|
|
1198
|
-
usePlugin(e, ...n) {
|
|
1199
|
-
return this.pluginManager.usePlugin(e, ...n);
|
|
1200
|
-
},
|
|
1201
|
-
/**
|
|
1202
|
-
* {@inheritDoc PluginExtendManager.useExtend}
|
|
1203
|
-
*/
|
|
1204
|
-
useExtend(e) {
|
|
1205
|
-
return this.pluginManager.useExtend(e);
|
|
1206
|
-
},
|
|
1207
|
-
/**
|
|
1208
|
-
* 是否注册了插件 或 扩展
|
|
1209
|
-
* @param plugin - 插件 或 扩展
|
|
1210
|
-
* @returns 是否注册了插件 或 扩展
|
|
1211
|
-
*/
|
|
1212
|
-
hasUsed(e) {
|
|
1213
|
-
return this.pluginManager.hasUsed(e);
|
|
1214
|
-
}
|
|
1215
|
-
});
|
|
1216
|
-
return c(t.prototype, {
|
|
1217
|
-
/**
|
|
1218
|
-
* 插件管理器
|
|
1219
|
-
*/
|
|
1220
|
-
get pluginManager() {
|
|
1221
|
-
return this.constructor.pluginManager;
|
|
1222
|
-
},
|
|
1223
|
-
/**
|
|
1224
|
-
* 实例的注册插件的方法
|
|
1225
|
-
* @param plugin
|
|
1226
|
-
* @param options
|
|
1227
|
-
* @returns
|
|
1228
|
-
*/
|
|
1229
|
-
usePlugin(e, ...n) {
|
|
1230
|
-
return this.pluginManager.instUsePlugin(this, e, ...n);
|
|
1231
|
-
},
|
|
1232
|
-
/**
|
|
1233
|
-
* {@inheritDoc PluginExtendManager.useExtend}
|
|
1234
|
-
*/
|
|
1235
|
-
useExtend(e, ...n) {
|
|
1236
|
-
return this.pluginManager.instUseExtend(this, e, ...n);
|
|
1237
|
-
},
|
|
1238
|
-
/**
|
|
1239
|
-
* 初始化实例
|
|
1240
|
-
* @param args
|
|
1241
|
-
*/
|
|
1242
|
-
async init(...e) {
|
|
1243
|
-
return super.init && await super.init(...e), this.pluginManager.onInit(this, ...e);
|
|
1244
|
-
},
|
|
1245
|
-
/**
|
|
1246
|
-
* 销毁实例
|
|
1247
|
-
* @returns
|
|
1248
|
-
*/
|
|
1249
|
-
async destroy() {
|
|
1250
|
-
if (await this.pluginManager.onDestroy(this), super.destroy) return super.destroy();
|
|
1251
|
-
}
|
|
1252
|
-
}), s;
|
|
1253
|
-
}
|
|
1254
|
-
function ft(s) {
|
|
1255
|
-
const t = $(s);
|
|
1256
|
-
return new Proxy(t, {
|
|
1257
|
-
construct: function(e, n, i) {
|
|
1258
|
-
const r = new e(...n);
|
|
1259
|
-
return t.pluginManager.onCreate(this, ...n), r;
|
|
1260
|
-
}
|
|
1261
|
-
});
|
|
1262
|
-
}
|
|
1263
|
-
function mt(s) {
|
|
1264
|
-
return class extends s {
|
|
1265
|
-
/**
|
|
1266
|
-
* 是否使用独立的插件管理器
|
|
1267
|
-
* @defaultValue false
|
|
1268
|
-
*/
|
|
1269
|
-
static isolatedPluginManager = !1;
|
|
1270
|
-
/**
|
|
1271
|
-
* 插件管理器
|
|
1272
|
-
*/
|
|
1273
|
-
static get pluginManager() {
|
|
1274
|
-
return this.isolatedPluginManager && !this.hasOwnProperty("_pluginManager") && (this._pluginManager = new d(this)), this._pluginManager;
|
|
1275
|
-
}
|
|
1276
|
-
static _pluginManager = new d(this);
|
|
509
|
+
static _pluginManager = new h(this);
|
|
1277
510
|
/**
|
|
1278
511
|
* 插件管理器 {@link PluginHostExtends.pluginManager}
|
|
1279
512
|
*/
|
|
@@ -1283,25 +516,25 @@ function mt(s) {
|
|
|
1283
516
|
/**
|
|
1284
517
|
* {@inheritDoc PluginExtendManager.usePlugin}
|
|
1285
518
|
*/
|
|
1286
|
-
static usePlugin(
|
|
1287
|
-
return this.pluginManager.usePlugin(
|
|
519
|
+
static usePlugin(t, ...s) {
|
|
520
|
+
return this.pluginManager.usePlugin(t, ...s);
|
|
1288
521
|
}
|
|
1289
522
|
/**
|
|
1290
523
|
* {@inheritDoc PluginExtendManager.useExtend}
|
|
1291
524
|
*/
|
|
1292
|
-
static useExtend(
|
|
1293
|
-
return this.pluginManager.useExtend(
|
|
525
|
+
static useExtend(t) {
|
|
526
|
+
return this.pluginManager.useExtend(t);
|
|
1294
527
|
}
|
|
1295
528
|
/**
|
|
1296
529
|
* 是否注册了插件 或 扩展
|
|
1297
530
|
* @param plugin - 插件 或 扩展
|
|
1298
531
|
* @returns 是否注册了插件 或 扩展
|
|
1299
532
|
*/
|
|
1300
|
-
static hasUsed(
|
|
1301
|
-
return this.pluginManager.hasUsed(
|
|
533
|
+
static hasUsed(t) {
|
|
534
|
+
return this.pluginManager.hasUsed(t);
|
|
1302
535
|
}
|
|
1303
|
-
constructor(...
|
|
1304
|
-
super(...
|
|
536
|
+
constructor(...t) {
|
|
537
|
+
super(...t), this.pluginManager.onCreate(this, ...t);
|
|
1305
538
|
}
|
|
1306
539
|
/**
|
|
1307
540
|
* 实例的注册插件的方法
|
|
@@ -1309,14 +542,14 @@ function mt(s) {
|
|
|
1309
542
|
* @param args
|
|
1310
543
|
* @returns
|
|
1311
544
|
*/
|
|
1312
|
-
usePlugin(
|
|
1313
|
-
return this.pluginManager.instUsePlugin(this,
|
|
545
|
+
usePlugin(t, ...s) {
|
|
546
|
+
return this.pluginManager.instUsePlugin(this, t, ...s);
|
|
1314
547
|
}
|
|
1315
548
|
/**
|
|
1316
549
|
* {@inheritDoc PluginExtendManager.useExtend}
|
|
1317
550
|
*/
|
|
1318
|
-
useExtend(
|
|
1319
|
-
return this.pluginManager.instUseExtend(this,
|
|
551
|
+
useExtend(t, ...s) {
|
|
552
|
+
return this.pluginManager.instUseExtend(this, t, ...s);
|
|
1320
553
|
}
|
|
1321
554
|
/**
|
|
1322
555
|
* 初始化实例
|
|
@@ -1324,385 +557,74 @@ function mt(s) {
|
|
|
1324
557
|
* 会调用 {@link PluginExtendManager.onInit}
|
|
1325
558
|
* @param args
|
|
1326
559
|
*/
|
|
1327
|
-
init(...
|
|
560
|
+
init(...t) {
|
|
1328
561
|
if (super.init) {
|
|
1329
|
-
const
|
|
1330
|
-
if (
|
|
1331
|
-
return
|
|
562
|
+
const s = super.init(...t);
|
|
563
|
+
if (s instanceof Promise)
|
|
564
|
+
return s.then(() => this.pluginManager.onInit(this, ...t));
|
|
1332
565
|
}
|
|
1333
|
-
return this.pluginManager.onInit(this, ...
|
|
566
|
+
return this.pluginManager.onInit(this, ...t);
|
|
1334
567
|
}
|
|
1335
568
|
/**
|
|
1336
569
|
* 销毁实例
|
|
1337
570
|
* @returns
|
|
1338
571
|
*/
|
|
1339
572
|
destroy() {
|
|
1340
|
-
const
|
|
1341
|
-
return super.destroy ?
|
|
1342
|
-
}
|
|
1343
|
-
};
|
|
1344
|
-
}
|
|
1345
|
-
class Mt extends D {
|
|
1346
|
-
/**
|
|
1347
|
-
* 全局级别的默认选项
|
|
1348
|
-
*/
|
|
1349
|
-
static defaultOptions = new u();
|
|
1350
|
-
/**
|
|
1351
|
-
* 实例级的默认选项
|
|
1352
|
-
*/
|
|
1353
|
-
get defaultOptions() {
|
|
1354
|
-
return this._defaultOptions || (this._defaultOptions = new u(void 0, this.constructor.defaultOptions));
|
|
1355
|
-
}
|
|
1356
|
-
_defaultOptions;
|
|
1357
|
-
constructor(t) {
|
|
1358
|
-
super(), this.defaultOptions.option = t;
|
|
1359
|
-
}
|
|
1360
|
-
}
|
|
1361
|
-
class yt extends F {
|
|
1362
|
-
/**
|
|
1363
|
-
* 全局级别的默认选项
|
|
1364
|
-
*/
|
|
1365
|
-
static defaultOptions = new u();
|
|
1366
|
-
/**
|
|
1367
|
-
* 实例级的默认选项
|
|
1368
|
-
*/
|
|
1369
|
-
get defaultOptions() {
|
|
1370
|
-
return this._defaultOptions || (this._defaultOptions = new u(void 0, this.constructor.defaultOptions));
|
|
1371
|
-
}
|
|
1372
|
-
_defaultOptions;
|
|
1373
|
-
constructor(t) {
|
|
1374
|
-
super(), this.defaultOptions.option = t;
|
|
1375
|
-
}
|
|
1376
|
-
}
|
|
1377
|
-
class Pt extends C {
|
|
1378
|
-
/**
|
|
1379
|
-
* 全局级别的默认选项
|
|
1380
|
-
*/
|
|
1381
|
-
static defaultOptions = new u();
|
|
1382
|
-
/**
|
|
1383
|
-
* 实例级的默认选项
|
|
1384
|
-
*/
|
|
1385
|
-
get defaultOptions() {
|
|
1386
|
-
return this._defaultOptions || (this._defaultOptions = new u(void 0, this.constructor.defaultOptions));
|
|
1387
|
-
}
|
|
1388
|
-
_defaultOptions;
|
|
1389
|
-
constructor(t) {
|
|
1390
|
-
super(), this.defaultOptions.option = t;
|
|
1391
|
-
}
|
|
1392
|
-
}
|
|
1393
|
-
function _t(s) {
|
|
1394
|
-
const t = N(s);
|
|
1395
|
-
return class extends t {
|
|
1396
|
-
/**
|
|
1397
|
-
* 全局级别的默认选项
|
|
1398
|
-
*/
|
|
1399
|
-
static defaultOptions = new u();
|
|
1400
|
-
/**
|
|
1401
|
-
* 实例级的默认选项
|
|
1402
|
-
*/
|
|
1403
|
-
get defaultOptions() {
|
|
1404
|
-
return this._defaultOptions || (this._defaultOptions = new u(void 0, this.constructor.defaultOptions));
|
|
1405
|
-
}
|
|
1406
|
-
_defaultOptions;
|
|
1407
|
-
constructor(n) {
|
|
1408
|
-
super(), this.defaultOptions.option = n;
|
|
1409
|
-
}
|
|
1410
|
-
};
|
|
1411
|
-
}
|
|
1412
|
-
const h = "common";
|
|
1413
|
-
class wt extends D {
|
|
1414
|
-
/**
|
|
1415
|
-
* 全局级别的默认选项
|
|
1416
|
-
*/
|
|
1417
|
-
static modeOptions = new a(h);
|
|
1418
|
-
/**
|
|
1419
|
-
* 实例级的默认选项
|
|
1420
|
-
*/
|
|
1421
|
-
get modeOptions() {
|
|
1422
|
-
return this._modeOptions || (this._modeOptions = new a(h, void 0, this.constructor.modeOptions));
|
|
1423
|
-
}
|
|
1424
|
-
_modeOptions;
|
|
1425
|
-
get mode() {
|
|
1426
|
-
return this.modeOptions.mode;
|
|
1427
|
-
}
|
|
1428
|
-
set mode(t) {
|
|
1429
|
-
this.modeOptions.mode = t;
|
|
1430
|
-
}
|
|
1431
|
-
get options() {
|
|
1432
|
-
return this.modeOptions.plainFullOption;
|
|
1433
|
-
}
|
|
1434
|
-
constructor(t) {
|
|
1435
|
-
super(), this.modeOptions.setOption(t);
|
|
1436
|
-
}
|
|
1437
|
-
}
|
|
1438
|
-
class bt extends F {
|
|
1439
|
-
/**
|
|
1440
|
-
* 全局级别的默认选项
|
|
1441
|
-
*/
|
|
1442
|
-
static modeOptions = new a(h);
|
|
1443
|
-
/**
|
|
1444
|
-
* 实例级的默认选项
|
|
1445
|
-
*/
|
|
1446
|
-
get modeOptions() {
|
|
1447
|
-
return this._modeOptions || (this._modeOptions = new a(h, void 0, this.constructor.modeOptions));
|
|
1448
|
-
}
|
|
1449
|
-
_modeOptions;
|
|
1450
|
-
get mode() {
|
|
1451
|
-
return this.modeOptions.mode;
|
|
1452
|
-
}
|
|
1453
|
-
set mode(t) {
|
|
1454
|
-
this.modeOptions.mode = t;
|
|
1455
|
-
}
|
|
1456
|
-
get options() {
|
|
1457
|
-
return this.modeOptions.plainFullOption;
|
|
1458
|
-
}
|
|
1459
|
-
constructor(t) {
|
|
1460
|
-
super(), this.modeOptions.setOption(t);
|
|
1461
|
-
}
|
|
1462
|
-
}
|
|
1463
|
-
class Tt extends C {
|
|
1464
|
-
/**
|
|
1465
|
-
* 全局级别的默认选项
|
|
1466
|
-
*/
|
|
1467
|
-
static modeOptions = new a(h);
|
|
1468
|
-
/**
|
|
1469
|
-
* 实例级的默认选项
|
|
1470
|
-
*/
|
|
1471
|
-
get modeOptions() {
|
|
1472
|
-
return this._modeOptions || (this._modeOptions = new a(h, void 0, this.constructor.modeOptions));
|
|
1473
|
-
}
|
|
1474
|
-
_modeOptions;
|
|
1475
|
-
get mode() {
|
|
1476
|
-
return this.modeOptions.mode;
|
|
1477
|
-
}
|
|
1478
|
-
set mode(t) {
|
|
1479
|
-
this.modeOptions.mode = t;
|
|
1480
|
-
}
|
|
1481
|
-
get options() {
|
|
1482
|
-
return this.modeOptions.plainFullOption;
|
|
1483
|
-
}
|
|
1484
|
-
constructor(t) {
|
|
1485
|
-
super(), this.modeOptions.setOption(t);
|
|
1486
|
-
}
|
|
1487
|
-
}
|
|
1488
|
-
function Ut(s) {
|
|
1489
|
-
const t = N(s);
|
|
1490
|
-
return class extends t {
|
|
1491
|
-
/**
|
|
1492
|
-
* 全局级别的默认选项
|
|
1493
|
-
*/
|
|
1494
|
-
static modeOptions = new a(h);
|
|
1495
|
-
/**
|
|
1496
|
-
* 实例级的默认选项
|
|
1497
|
-
*/
|
|
1498
|
-
get modeOptions() {
|
|
1499
|
-
return this._modeOptions || (this._modeOptions = new a(h, void 0, this.constructor.modeOptions));
|
|
1500
|
-
}
|
|
1501
|
-
_modeOptions;
|
|
1502
|
-
get mode() {
|
|
1503
|
-
return this.modeOptions.mode;
|
|
1504
|
-
}
|
|
1505
|
-
set mode(n) {
|
|
1506
|
-
this.modeOptions.mode = n;
|
|
1507
|
-
}
|
|
1508
|
-
get options() {
|
|
1509
|
-
return this.modeOptions.plainFullOption;
|
|
1510
|
-
}
|
|
1511
|
-
constructor(n) {
|
|
1512
|
-
super(), this.modeOptions.setOption(n);
|
|
573
|
+
const t = this.pluginManager.onDestroy(this);
|
|
574
|
+
return super.destroy ? t instanceof Promise ? t.finally(() => super.destroy()) : super.destroy() : t;
|
|
1513
575
|
}
|
|
1514
576
|
};
|
|
1515
577
|
}
|
|
1516
|
-
function vt(s, t, e) {
|
|
1517
|
-
const n = c(s, {
|
|
1518
|
-
/**
|
|
1519
|
-
* 全局级别的默认选项
|
|
1520
|
-
*/
|
|
1521
|
-
modeOptions: new a(t, e)
|
|
1522
|
-
});
|
|
1523
|
-
return c(n.prototype, {
|
|
1524
|
-
/**
|
|
1525
|
-
* 实例级的默认选项
|
|
1526
|
-
*/
|
|
1527
|
-
get modeOptions() {
|
|
1528
|
-
return this._modeOptions || (this._modeOptions = new a(t, void 0, this.constructor.modeOptions));
|
|
1529
|
-
},
|
|
1530
|
-
get mode() {
|
|
1531
|
-
return this.modeOptions.mode;
|
|
1532
|
-
},
|
|
1533
|
-
set mode(i) {
|
|
1534
|
-
this.modeOptions.mode = i;
|
|
1535
|
-
},
|
|
1536
|
-
get options() {
|
|
1537
|
-
return this.modeOptions.fullOption;
|
|
1538
|
-
}
|
|
1539
|
-
}), s;
|
|
1540
|
-
}
|
|
1541
|
-
const Dt = {
|
|
1542
|
-
onUse(s, t, e) {
|
|
1543
|
-
const n = t ?? h;
|
|
1544
|
-
p(s, {
|
|
1545
|
-
modeOptions: new a(
|
|
1546
|
-
n,
|
|
1547
|
-
void 0,
|
|
1548
|
-
e
|
|
1549
|
-
)
|
|
1550
|
-
}), p(s.prototype, {
|
|
1551
|
-
get modeOptions() {
|
|
1552
|
-
const i = this, r = s;
|
|
1553
|
-
return i._modeOptions || (i._modeOptions = new a(
|
|
1554
|
-
r.modeOptions.mode,
|
|
1555
|
-
void 0,
|
|
1556
|
-
r.modeOptions
|
|
1557
|
-
));
|
|
1558
|
-
},
|
|
1559
|
-
get mode() {
|
|
1560
|
-
return this.modeOptions.mode;
|
|
1561
|
-
},
|
|
1562
|
-
set mode(i) {
|
|
1563
|
-
const r = this;
|
|
1564
|
-
r.modeOptions.mode = i;
|
|
1565
|
-
},
|
|
1566
|
-
get options() {
|
|
1567
|
-
return this.modeOptions.plainFullOption;
|
|
1568
|
-
}
|
|
1569
|
-
});
|
|
1570
|
-
},
|
|
1571
|
-
onCreate(s, t) {
|
|
1572
|
-
s.modeOptions.setOption(t);
|
|
1573
|
-
}
|
|
1574
|
-
}, Ft = {
|
|
1575
|
-
onUse(s, t, e) {
|
|
1576
|
-
p(s, {
|
|
1577
|
-
/**
|
|
1578
|
-
* 全局级别的默认选项
|
|
1579
|
-
*/
|
|
1580
|
-
defaultOptions: new u(t, e)
|
|
1581
|
-
}), p(s.prototype, {
|
|
1582
|
-
/**
|
|
1583
|
-
* 实例级的默认选项
|
|
1584
|
-
*/
|
|
1585
|
-
get defaultOptions() {
|
|
1586
|
-
return this._defaultOptions || (this._defaultOptions = new u(void 0, s.defaultOptions));
|
|
1587
|
-
}
|
|
1588
|
-
});
|
|
1589
|
-
},
|
|
1590
|
-
onCreate(s, t) {
|
|
1591
|
-
s.defaultOptions.option = t;
|
|
1592
|
-
}
|
|
1593
|
-
};
|
|
1594
|
-
function Ct(s, t) {
|
|
1595
|
-
const e = c(s, {
|
|
1596
|
-
/**
|
|
1597
|
-
* 全局级别的默认选项
|
|
1598
|
-
*/
|
|
1599
|
-
defaultOptions: new u(t)
|
|
1600
|
-
});
|
|
1601
|
-
return c(e.prototype, {
|
|
1602
|
-
/**
|
|
1603
|
-
* 实例级的默认选项
|
|
1604
|
-
*/
|
|
1605
|
-
get defaultOptions() {
|
|
1606
|
-
return this._defaultOptions || (this._defaultOptions = new u(void 0, this.constructor.defaultOptions));
|
|
1607
|
-
}
|
|
1608
|
-
}), s;
|
|
1609
|
-
}
|
|
1610
|
-
function _(s, t) {
|
|
1611
|
-
const e = [{ target: s, props: t }];
|
|
1612
|
-
let n;
|
|
1613
|
-
for (; n = e.shift(); ) {
|
|
1614
|
-
const { target: i, props: r } = n;
|
|
1615
|
-
for (const [o, l] of Object.entries(r)) {
|
|
1616
|
-
if (l != null && typeof l == "object" && (!l.constructor || l.constructor === Object)) {
|
|
1617
|
-
e.push({ target: i[o], props: l });
|
|
1618
|
-
continue;
|
|
1619
|
-
}
|
|
1620
|
-
i[o] = l;
|
|
1621
|
-
}
|
|
1622
|
-
}
|
|
1623
|
-
return s;
|
|
1624
|
-
}
|
|
1625
|
-
function z(s, t) {
|
|
1626
|
-
const e = {}, n = [{ target: s, props: t, targetProps: e }];
|
|
1627
|
-
let i;
|
|
1628
|
-
for (; i = n.shift(); ) {
|
|
1629
|
-
const { target: r, props: o, targetProps: l } = i;
|
|
1630
|
-
for (const [m, f] of Object.entries(o)) {
|
|
1631
|
-
if (f != null && typeof f == "object" && (!f.constructor || f.constructor === Object)) {
|
|
1632
|
-
n.push({ target: r[m], props: f, targetProps: l[m] = {} });
|
|
1633
|
-
continue;
|
|
1634
|
-
}
|
|
1635
|
-
l[m] = r[m];
|
|
1636
|
-
}
|
|
1637
|
-
}
|
|
1638
|
-
return e;
|
|
1639
|
-
}
|
|
1640
|
-
function Nt(s, t) {
|
|
1641
|
-
const e = z(s, t);
|
|
1642
|
-
function n() {
|
|
1643
|
-
_(s, t);
|
|
1644
|
-
}
|
|
1645
|
-
function i() {
|
|
1646
|
-
_(s, e);
|
|
1647
|
-
}
|
|
1648
|
-
return { set: n, unset: i };
|
|
1649
|
-
}
|
|
1650
578
|
export {
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
O as
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
et as targetExtend,
|
|
1703
|
-
Q as targetMixin,
|
|
1704
|
-
ct as tierModeOptionsDecorator,
|
|
1705
|
-
Dt as tierModeOptionsPlugin,
|
|
1706
|
-
gt as tierOptionsDecorator,
|
|
1707
|
-
Ft as tierOptionsPlugin
|
|
579
|
+
W as ExtendManager,
|
|
580
|
+
et as ModeOptions,
|
|
581
|
+
h as PluginExtendManager,
|
|
582
|
+
nt as PluginHost,
|
|
583
|
+
$ as PluginManager,
|
|
584
|
+
d as TierModeOptions,
|
|
585
|
+
st as TierModeOptionsPluginHost,
|
|
586
|
+
f as TierOptions,
|
|
587
|
+
rt as TierOptionsPluginHost,
|
|
588
|
+
A as addDefaultOptions,
|
|
589
|
+
G as addInstOptions,
|
|
590
|
+
T as becomePluginHost,
|
|
591
|
+
L as becomePluginHost_Extends,
|
|
592
|
+
Y as becomePluginHost_Proxy,
|
|
593
|
+
J as becomeTierModeOptionsHost,
|
|
594
|
+
X as becomeTierOptionsHost,
|
|
595
|
+
w as commonModeName,
|
|
596
|
+
N as createDefineExtend,
|
|
597
|
+
v as createDefineMixin,
|
|
598
|
+
S as createExtendTarget,
|
|
599
|
+
k as createMixinTarget,
|
|
600
|
+
it as createPluginHost,
|
|
601
|
+
z as createPropertySetter,
|
|
602
|
+
q as createTargetExtend,
|
|
603
|
+
I as createTargetMixin,
|
|
604
|
+
ot as createTierModeOptionsPluginHost,
|
|
605
|
+
ut as createTierOptionsPluginHost,
|
|
606
|
+
B as defineExtend,
|
|
607
|
+
j as defineMixin,
|
|
608
|
+
at as extendMark,
|
|
609
|
+
F as extendTarget,
|
|
610
|
+
pt as getPropertyValue,
|
|
611
|
+
ct as getPropertyValueByPath,
|
|
612
|
+
b as getTargetProperties,
|
|
613
|
+
gt as isPlugin,
|
|
614
|
+
O as mergeProperties,
|
|
615
|
+
o as mixin,
|
|
616
|
+
C as mixinByOmit,
|
|
617
|
+
U as mixinByPick,
|
|
618
|
+
x as mixinIExtend,
|
|
619
|
+
a as mixinTarget,
|
|
620
|
+
lt as parsePropertyPath,
|
|
621
|
+
dt as pickHostExtendMembers,
|
|
622
|
+
ft as setPropertyValue,
|
|
623
|
+
ht as setPropertyValueByPath,
|
|
624
|
+
V as targetExtend,
|
|
625
|
+
H as targetMixin,
|
|
626
|
+
Ot as tierModeOptionsDecorator,
|
|
627
|
+
Q as tierModeOptionsPlugin,
|
|
628
|
+
Mt as tierOptionsDecorator,
|
|
629
|
+
R as tierOptionsPlugin
|
|
1708
630
|
};
|