@ray-js/build-plugin-router 0.6.21 → 0.6.22-beta-1
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/lib/index.js +172 -121
- package/package.json +7 -5
- package/templates/routes.config.ejs +0 -1
- package/lib/index.js.map +0 -1
package/lib/index.js
CHANGED
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
2
13
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
14
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
15
|
};
|
|
@@ -10,14 +21,127 @@ const lodash_1 = __importDefault(require("lodash"));
|
|
|
10
21
|
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
11
22
|
const ejs_1 = __importDefault(require("ejs"));
|
|
12
23
|
const shared_1 = require("@ray-js/shared");
|
|
24
|
+
const url_1 = __importDefault(require("url"));
|
|
25
|
+
const path_to_regexp_1 = require("path-to-regexp");
|
|
13
26
|
function ejsRender(file, data, options) {
|
|
14
27
|
const str = fs_extra_1.default.readFileSync(file).toString();
|
|
15
28
|
return ejs_1.default.render(str, data, Object.assign(Object.assign({}, options), { async: false }));
|
|
16
29
|
}
|
|
17
30
|
colors_1.default.enable();
|
|
18
31
|
const LOG_PREFIX = `build-plugin-router`;
|
|
19
|
-
function
|
|
20
|
-
|
|
32
|
+
function printError(msg) {
|
|
33
|
+
shared_1.log.error(LOG_PREFIX, '');
|
|
34
|
+
console.error(msg);
|
|
35
|
+
}
|
|
36
|
+
// 找出重复的项
|
|
37
|
+
function duplicates(arr, fn, key) {
|
|
38
|
+
const _arr = arr.concat().sort(fn);
|
|
39
|
+
const res = [];
|
|
40
|
+
let b = [];
|
|
41
|
+
for (let i = 1; i < _arr.length; i++) {
|
|
42
|
+
let curr = _arr[i];
|
|
43
|
+
let old = _arr[i - 1];
|
|
44
|
+
if (key) {
|
|
45
|
+
curr = curr[key];
|
|
46
|
+
old = old[key];
|
|
47
|
+
}
|
|
48
|
+
if (curr == old) {
|
|
49
|
+
if (!b.some((x) => (key ? x[key] : x) == curr)) {
|
|
50
|
+
b.unshift(_arr[i - 1]);
|
|
51
|
+
}
|
|
52
|
+
if (key) {
|
|
53
|
+
b.unshift(_arr[i]);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
if (key && b.length) {
|
|
58
|
+
res.push(b);
|
|
59
|
+
b = [];
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
if (key && b.length) {
|
|
64
|
+
res.push(b);
|
|
65
|
+
}
|
|
66
|
+
return key ? res : b;
|
|
67
|
+
}
|
|
68
|
+
const standardAppConfigFieldMap = [
|
|
69
|
+
['textColor', 'color'],
|
|
70
|
+
'borderStyle',
|
|
71
|
+
'selectedColor',
|
|
72
|
+
'backgroundColor',
|
|
73
|
+
];
|
|
74
|
+
function normalizeTabBarConfig(config, routes, fields) {
|
|
75
|
+
const _a = config || {}, { list } = _a, rest = __rest(_a, ["list"]);
|
|
76
|
+
let cfg;
|
|
77
|
+
if (list && list.length) {
|
|
78
|
+
const _cfg = {};
|
|
79
|
+
// tabBar.list[number].pagePath 必须在 routes[number].page 中,即tab.pagePath === routes[number].page
|
|
80
|
+
// tabBar.list[number].route 可不配置
|
|
81
|
+
// tabBar.list[number].route 若未配置,则设置 tabBar.list[number].route = routes[number].page(非模式匹配)或tabBar.list[number].pagePath
|
|
82
|
+
// tabBar.list[number].route 不能用模式,如不能用/xxx/:id等,必须是明确的 如/xxx/123
|
|
83
|
+
// tabBar.list[number].route 必须要能命中对应routes[number].route 路由规则,规则详见 path-to-regexp 模块
|
|
84
|
+
const tabs = list
|
|
85
|
+
.map((tab, index) => {
|
|
86
|
+
var _a;
|
|
87
|
+
const m = routes.find((i) => tab.pagePath === i.path);
|
|
88
|
+
if (!m) {
|
|
89
|
+
printError(`tabBar.list[${index}].pagePath: ${tab.pagePath} 需要在路由配置中: \n${JSON.stringify(routes, null, 2)}`.red);
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
let pagePath = tab.pagePath.replace(/^\//, '');
|
|
93
|
+
const urlObj = url_1.default.parse(pagePath);
|
|
94
|
+
if (urlObj.hash || urlObj.search) {
|
|
95
|
+
printError(`tabBar.list[${index}]: ${tab.pagePath} 不能携带参数`.red);
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
pagePath = urlObj.pathname;
|
|
99
|
+
if (!tab.route) {
|
|
100
|
+
// 判断 routes[number].route 是否为模式匹配规则
|
|
101
|
+
tab.route = m.route && (0, path_to_regexp_1.parse)(m.route).length === 1 ? m.route : m.path;
|
|
102
|
+
}
|
|
103
|
+
// 判断是否能被路由命中
|
|
104
|
+
const matched = (0, path_to_regexp_1.match)((_a = m.route) !== null && _a !== void 0 ? _a : m.path)(tab.route);
|
|
105
|
+
if (!matched) {
|
|
106
|
+
printError(`tabBar.list[${index}]\n.route: ${tab.route}\n.pagePath: ${tab.pagePath}\n无法被路由命中: \n${JSON.stringify(m, null, 2)}`.red);
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
// 判断是否还被其他路由命中
|
|
110
|
+
const otherMatched = routes
|
|
111
|
+
.filter((r) => tab.pagePath !== r.path)
|
|
112
|
+
.filter((r) => { var _a; return (0, path_to_regexp_1.match)((_a = r.route) !== null && _a !== void 0 ? _a : r.path)(tab.route); });
|
|
113
|
+
const unusable = otherMatched.filter((r) => r.path !== tab.pagePath);
|
|
114
|
+
if (unusable.length) {
|
|
115
|
+
printError(`tabBar.list[${index}]\n.route: ${tab.route}\n.pagePath: ${tab.pagePath}\n应被路由命中:\n${JSON.stringify(m, null, 2)}\n但同时又被其它路由命中:\n${JSON.stringify(unusable, null, 2)}`.red);
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
return {
|
|
119
|
+
pagePath,
|
|
120
|
+
text: tab.text,
|
|
121
|
+
iconPath: tab.icon,
|
|
122
|
+
selectedIconPath: tab.activeIcon,
|
|
123
|
+
};
|
|
124
|
+
})
|
|
125
|
+
.filter((tab) => !!tab);
|
|
126
|
+
if (tabs.length < 2 || tabs.length > 5) {
|
|
127
|
+
printError(`tabBar.list 最少 2 个、最多 5 个 tab`.red);
|
|
128
|
+
return cfg;
|
|
129
|
+
}
|
|
130
|
+
_cfg.list = tabs;
|
|
131
|
+
// 找出 tabBar.list[number].pagePath 重复的配置
|
|
132
|
+
const _list = duplicates(tabs, (a, b) => (a.pagePath > b.pagePath ? 1 : a.pagePath == b.pagePath ? 0 : -1), 'pagePath');
|
|
133
|
+
if (_list.length) {
|
|
134
|
+
console.error(LOG_PREFIX, `tabBar.list不能有重复的页面: \n${JSON.stringify(_list, null, 2)}`.red);
|
|
135
|
+
}
|
|
136
|
+
cfg = fields.reduce((o, next) => {
|
|
137
|
+
const [src, t] = typeof next === 'string' ? [next] : next;
|
|
138
|
+
if (rest[src]) {
|
|
139
|
+
o[t || src] = rest[src];
|
|
140
|
+
}
|
|
141
|
+
return o;
|
|
142
|
+
}, _cfg);
|
|
143
|
+
}
|
|
144
|
+
return cfg;
|
|
21
145
|
}
|
|
22
146
|
function PluginRouter(api) {
|
|
23
147
|
let cacheThemeLocation = {};
|
|
@@ -40,32 +164,26 @@ function PluginRouter(api) {
|
|
|
40
164
|
});
|
|
41
165
|
}
|
|
42
166
|
},
|
|
43
|
-
|
|
44
|
-
var _a;
|
|
167
|
+
readConfigFromConfigFile() {
|
|
45
168
|
const routesConfigFile = api.searchJSFile('src/routes.config');
|
|
46
|
-
const { target } = api.options;
|
|
47
169
|
if (!routesConfigFile) {
|
|
48
|
-
throw new Error(`missing configuration file (routes.config.ts)`);
|
|
170
|
+
throw new Error(`missing configuration file (routes.config.{ts|js})`);
|
|
49
171
|
}
|
|
50
172
|
const globalConfigFile = api.searchJSFile('src/global.config');
|
|
51
173
|
const routesConfig = api.requireJSFile(routesConfigFile);
|
|
52
174
|
const globalConfig = globalConfigFile ? api.requireJSFile(globalConfigFile, '*') : {};
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
// @ts-ignore
|
|
64
|
-
target === 'thing' || target === 'tuya' ? thingGlobalConfig : globalConfig[target];
|
|
65
|
-
const appConfig = (_a = this[`get${_target}AppConfigData`]) === null || _a === void 0 ? void 0 : _a.call(this, routesConfig, targetGlobalConfig !== null && targetGlobalConfig !== void 0 ? targetGlobalConfig : {});
|
|
66
|
-
if (lodash_1.default.isEmpty(appConfig.tabBar)) {
|
|
67
|
-
delete appConfig.tabBar; // 微信小程序tabBar不能为空对象,所以当为空对象时,索性所有小程序都删了
|
|
175
|
+
return { routesConfig, globalConfig };
|
|
176
|
+
},
|
|
177
|
+
buildRoutesConfig(immediate) {
|
|
178
|
+
const { routesConfig, globalConfig } = this.readConfigFromConfigFile();
|
|
179
|
+
// target 在入口处已经统一处理,tuya 会转成 thing
|
|
180
|
+
const { target } = api.options;
|
|
181
|
+
// 不是这两端的,其他的默认为web端,tuya thing 其实为同一个端,统一成 thing
|
|
182
|
+
if (!['wechat', 'thing'].includes(target)) {
|
|
183
|
+
// web端逻辑已经移到 @ray-js/builder-web
|
|
184
|
+
return;
|
|
68
185
|
}
|
|
186
|
+
const appConfig = this.getStandardAppConfigData(routesConfig, globalConfig);
|
|
69
187
|
this.generateThemeConfig(appConfig);
|
|
70
188
|
// FIX: 修复初始化时找不到配置文件
|
|
71
189
|
// 初始化时,需要立即生成配置文件
|
|
@@ -81,119 +199,48 @@ function PluginRouter(api) {
|
|
|
81
199
|
}, 1000);
|
|
82
200
|
},
|
|
83
201
|
/**
|
|
84
|
-
*
|
|
202
|
+
* 获取小程序的 app.config 配置
|
|
85
203
|
* @param routesConfig - routes.config 配置内容
|
|
86
|
-
* @param
|
|
204
|
+
* @param globalConfig - 已存在的应用配置
|
|
87
205
|
*/
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
const
|
|
91
|
-
const
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
if (tabBar === null || tabBar === void 0 ? void 0 : tabBar.borderStyle) {
|
|
96
|
-
tabBarConfig.borderStyle = tabBar.borderStyle;
|
|
97
|
-
}
|
|
98
|
-
if (tabBar === null || tabBar === void 0 ? void 0 : tabBar.selectedColor) {
|
|
99
|
-
tabBarConfig.selectedColor = tabBar.selectedColor;
|
|
100
|
-
}
|
|
101
|
-
if (tabBar === null || tabBar === void 0 ? void 0 : tabBar.backgroundColor) {
|
|
102
|
-
tabBarConfig.backgroundColor = tabBar.backgroundColor;
|
|
103
|
-
}
|
|
104
|
-
if (tabBar === null || tabBar === void 0 ? void 0 : tabBar.list) {
|
|
105
|
-
tabBarConfig.list = tabBar.list.map((tab) => {
|
|
106
|
-
const pagePath = routes.find((route) => route.id === tab.id);
|
|
107
|
-
return {
|
|
108
|
-
pagePath: pagePath.path.replace(/^\//, ''),
|
|
109
|
-
text: tab.text,
|
|
110
|
-
iconPath: tab.icon,
|
|
111
|
-
selectedIconPath: tab.activeIcon,
|
|
112
|
-
};
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
const subpackagesConfig = subpackages.map((subpackage) => {
|
|
206
|
+
getStandardAppConfigData(routesConfig, globalConfig) {
|
|
207
|
+
var _a, _b, _c, _d, _e, _f;
|
|
208
|
+
const { target } = api.options;
|
|
209
|
+
const g = target === 'thing'
|
|
210
|
+
? (_b = (_a = globalConfig['thing']) !== null && _a !== void 0 ? _a : globalConfig['tuya']) !== null && _b !== void 0 ? _b : {} // 因历史原因,需要兼容老项目的老配置,老项目中都是 tuya
|
|
211
|
+
: (_c = globalConfig[target]) !== null && _c !== void 0 ? _c : {};
|
|
212
|
+
const routes = ((_d = routesConfig.routes) !== null && _d !== void 0 ? _d : []).map((item) => {
|
|
116
213
|
var _a;
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
const config = Object.assign({}, globalConfig, {
|
|
120
|
-
pages,
|
|
121
|
-
tabBar: tabBarConfig,
|
|
122
|
-
subpackages: subpackagesConfig,
|
|
214
|
+
item.route = (_a = item.route) !== null && _a !== void 0 ? _a : item.path;
|
|
215
|
+
return item;
|
|
123
216
|
});
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
const {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
if (tabBar === null || tabBar === void 0 ? void 0 : tabBar.borderStyle) {
|
|
134
|
-
tabBarConfig.borderStyle = tabBar.borderStyle;
|
|
135
|
-
}
|
|
136
|
-
if (tabBar === null || tabBar === void 0 ? void 0 : tabBar.selectedColor) {
|
|
137
|
-
tabBarConfig.selectedColor = tabBar.selectedColor;
|
|
138
|
-
}
|
|
139
|
-
if (tabBar === null || tabBar === void 0 ? void 0 : tabBar.backgroundColor) {
|
|
140
|
-
tabBarConfig.backgroundColor = tabBar.backgroundColor;
|
|
141
|
-
}
|
|
142
|
-
if (tabBar === null || tabBar === void 0 ? void 0 : tabBar.list) {
|
|
143
|
-
tabBarConfig.list = tabBar.list.map((tab) => {
|
|
144
|
-
const pagePath = routes.find((route) => route.id === tab.id);
|
|
145
|
-
return {
|
|
146
|
-
pagePath: pagePath.path.replace(/^\//, ''),
|
|
147
|
-
text: tab.text,
|
|
148
|
-
iconPath: tab.icon,
|
|
149
|
-
selectedIconPath: tab.activeIcon,
|
|
150
|
-
};
|
|
217
|
+
const subPkgs = (_f = (_e = routesConfig.subPackages) !== null && _e !== void 0 ? _e : routesConfig.subpackages) !== null && _f !== void 0 ? _f : [];
|
|
218
|
+
const pages = lodash_1.default.uniq(routes.map((r) => r.path.replace(/^\//, '')));
|
|
219
|
+
const tabBar = normalizeTabBarConfig(routesConfig.tabBar, routes, standardAppConfigFieldMap);
|
|
220
|
+
const config = Object.assign(Object.assign({}, g), { pages, tabBar });
|
|
221
|
+
if (subPkgs && subPkgs.length) {
|
|
222
|
+
config.subpackages = subPkgs.map((pkg) => {
|
|
223
|
+
var _a;
|
|
224
|
+
const pages = lodash_1.default.uniq((_a = pkg.pages) === null || _a === void 0 ? void 0 : _a.map((r) => r.path.replace(/^\//, '')));
|
|
225
|
+
return Object.assign(Object.assign({}, pkg), { pages });
|
|
151
226
|
});
|
|
152
227
|
}
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
});
|
|
228
|
+
if (lodash_1.default.isEmpty(config.tabBar)) {
|
|
229
|
+
lodash_1.default.unset(config, 'tabBar');
|
|
230
|
+
}
|
|
157
231
|
return config;
|
|
158
232
|
},
|
|
233
|
+
/**
|
|
234
|
+
* 生成小程序app.config.{js|ts}文件
|
|
235
|
+
* @param data
|
|
236
|
+
*/
|
|
159
237
|
generateAppConfig(data) {
|
|
160
238
|
const templateFile = path_1.default.join(__dirname, '../templates/app.config.ejs');
|
|
161
239
|
const context = ejsRender(templateFile, { appConfig: data });
|
|
162
240
|
api.writeFile('src/app.config.ts', context);
|
|
163
241
|
shared_1.log.verbose(LOG_PREFIX, `generate`, 'src/app.config.ts'.underline.green, `for wechat platform`);
|
|
164
242
|
},
|
|
165
|
-
|
|
166
|
-
const { routes } = params;
|
|
167
|
-
const routesConfig = this.routesAdditionConfig(routes);
|
|
168
|
-
const templateFile = path_1.default.join(__dirname, '../templates/routes.config.ejs');
|
|
169
|
-
const pages = routesConfig.map((item) => {
|
|
170
|
-
const chunkName = normalizeRoute(item.id || item.route);
|
|
171
|
-
return {
|
|
172
|
-
id: item.id || '',
|
|
173
|
-
route: item.route,
|
|
174
|
-
path: item.path,
|
|
175
|
-
config: item.config,
|
|
176
|
-
chunkName,
|
|
177
|
-
};
|
|
178
|
-
});
|
|
179
|
-
const context = ejsRender(templateFile, { pages });
|
|
180
|
-
api.writeFile('.ray/router.config.ts', context);
|
|
181
|
-
shared_1.log.verbose(LOG_PREFIX, `generate`, '.ray/router.config.ts'.green.underline, `for web platform`);
|
|
182
|
-
},
|
|
183
|
-
/**
|
|
184
|
-
* 附加路由的配置信息
|
|
185
|
-
* @param routes - 路由配置
|
|
186
|
-
*/
|
|
187
|
-
routesAdditionConfig(routes) {
|
|
188
|
-
return routes.map((route) => {
|
|
189
|
-
let config = {};
|
|
190
|
-
const configFilePath = api.searchJSFile(api.options.source + route.path + '.config');
|
|
191
|
-
if (configFilePath) {
|
|
192
|
-
config = `require('@${route.path + '.config'}').web || {}`;
|
|
193
|
-
}
|
|
194
|
-
return Object.assign(Object.assign({}, route), { config: config });
|
|
195
|
-
});
|
|
196
|
-
},
|
|
243
|
+
// todo theme 逻辑不应该在这个文件
|
|
197
244
|
generateThemeConfig(appConfig) {
|
|
198
245
|
const src = this.checkThemeConfig(appConfig.themeLocation);
|
|
199
246
|
if (cacheThemeLocation.source && cacheThemeLocation.source !== src) {
|
|
@@ -214,6 +261,11 @@ function PluginRouter(api) {
|
|
|
214
261
|
let { cwd, target } = api.options;
|
|
215
262
|
// TODO 这里待优化
|
|
216
263
|
if (target === 'thing') {
|
|
264
|
+
/**
|
|
265
|
+
* 又是历史原因
|
|
266
|
+
* 因老项目生成的产物目录是tuya,所以就干脆是tuya,不然会出现既 tuya 又 thing 的目录
|
|
267
|
+
* 将开发整懵逼
|
|
268
|
+
*/
|
|
217
269
|
// @ts-ignore
|
|
218
270
|
target = 'tuya';
|
|
219
271
|
}
|
|
@@ -239,4 +291,3 @@ function PluginRouter(api) {
|
|
|
239
291
|
};
|
|
240
292
|
}
|
|
241
293
|
exports.default = PluginRouter;
|
|
242
|
-
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ray-js/build-plugin-router",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.22-beta-1",
|
|
4
4
|
"description": "Ray build plugin for router",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ray"
|
|
@@ -21,14 +21,16 @@
|
|
|
21
21
|
"watch": "tsc -p ./tsconfig.build.json --watch"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@ray-js/shared": "^0.6.
|
|
24
|
+
"@ray-js/shared": "^0.6.22-beta-1",
|
|
25
25
|
"chokidar": "^3.5.2",
|
|
26
26
|
"colors": "1.4.0",
|
|
27
27
|
"ejs": "^3.1.6",
|
|
28
|
-
"fs-extra": "^10.0.0"
|
|
28
|
+
"fs-extra": "^10.0.0",
|
|
29
|
+
"path-to-regexp": "^6.2.1",
|
|
30
|
+
"url": "^0.11.0"
|
|
29
31
|
},
|
|
30
32
|
"devDependencies": {
|
|
31
|
-
"@ray-js/types": "^0.6.
|
|
33
|
+
"@ray-js/types": "^0.6.22-beta-1"
|
|
32
34
|
},
|
|
33
35
|
"maintainers": [
|
|
34
36
|
{
|
|
@@ -36,6 +38,6 @@
|
|
|
36
38
|
"email": "tuyafe@tuya.com"
|
|
37
39
|
}
|
|
38
40
|
],
|
|
39
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "2e905a1820d0adfc0a6ca8cf3ecf1f3a584a0d44",
|
|
40
42
|
"repository": {}
|
|
41
43
|
}
|
package/lib/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;AAEA,wDAA+B;AAC/B,oDAA2B;AA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