@freelog/tools-lib 0.1.163 → 0.1.165

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.
@@ -6,50 +6,42 @@ import i18next from 'i18next';
6
6
  import Cookies from 'js-cookie';
7
7
  import htmlReactParser from 'html-react-parser';
8
8
 
9
+ // import {report} from '@freelog/resource-policy-lang/dist';
9
10
  // import {ContractEntity} from '@freelog/resource-policy-lang/dist/tools/ContractTool';
10
11
  // const {compile} = require('@freelog/resource-policy-lang');
11
-
12
12
  /**
13
13
  * 将对应的字节数,转换为易读单位数量
14
14
  * @param bytes
15
15
  * @return {string}
16
16
  */
17
-
18
17
  function humanizeSize(bytes) {
19
18
  // console.log('dddhumanizeSizesdfsd');
20
19
  if (bytes <= 0) {
21
20
  return '0 B';
22
21
  }
23
-
24
22
  var unitArr = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
25
23
  var index = Math.floor(Math.log(bytes) / Math.log(1024));
26
24
  var size = Math.round(bytes / Math.pow(1024, index) * 100) / 100; //保留的小数位数
27
-
28
25
  return size + ' ' + unitArr[index];
29
26
  }
30
27
  /**
31
28
  * 格式化日期时间
32
29
  */
33
-
34
30
  function formatDateTime(date, showTime) {
35
31
  if (showTime === void 0) {
36
32
  showTime = false;
37
33
  }
38
-
39
34
  return moment(date).format('YYYY/MM/DD' + (showTime ? ' HH:mm' : ''));
40
35
  }
41
36
  /**
42
37
  * 根据传入的子域名拼合成完整的适合的url
43
38
  * @param domain 要组合的三级域名
44
39
  */
45
-
46
40
  function completeUrlByDomain(domain) {
47
41
  var origin = "https://" + domain + ".testfreelog.com";
48
-
49
42
  if (window.location.origin.includes('.freelog.com')) {
50
43
  origin = "https://" + domain + ".freelog.com";
51
44
  }
52
-
53
45
  return origin;
54
46
  }
55
47
  /**
@@ -98,12 +90,10 @@ function completeUrlByDomain(domain) {
98
90
  // };
99
91
  // }
100
92
  // }
101
-
102
93
  /**
103
94
  * 将资源类型关键字数组,转换成标准展示文字
104
95
  * @param arr 关键字数组
105
96
  */
106
-
107
97
  function resourceTypeKeyArrToResourceType(arr) {
108
98
  return arr.join(' / ');
109
99
  }
@@ -117,46 +107,46 @@ var Format = {
117
107
  };
118
108
 
119
109
  // 展品名称
120
- var EXHIBIT_NAME = /*#__PURE__*/new RegExp(/^(?!.*(\\|\/|:|\*|\?|"|<|>|\||\s|@|\$|#)).{1,60}$/); // 资源名称
121
-
122
- var RESOURCE_NAME = /*#__PURE__*/new RegExp(/^(?!.*(\\|\/|:|\*|\?|"|<|>|\||\s|@|\$|#)).{1,60}$/); // 资源类型
123
-
124
- var RESOURCE_TYPE = /*#__PURE__*/new RegExp("^[\u4E00-\u9FEFa-zA-Z0-9\\-&.,]{1,40}$"); // 自定义属性键
110
+ var EXHIBIT_NAME = /*#__PURE__*/new RegExp(/^(?!.*(\\|\/|:|\*|\?|"|<|>|\||\s|@|\$|#)).{1,60}$/);
111
+ // 资源名称
112
+ var RESOURCE_NAME = /*#__PURE__*/new RegExp(/^(?!.*(\\|\/|:|\*|\?|"|<|>|\||\s|@|\$|#)).{1,60}$/);
113
+ // 资源类型
114
+ var RESOURCE_TYPE = /*#__PURE__*/new RegExp("^[\u4E00-\u9FEFa-zA-Z0-9\\-&.,]{1,40}$");
115
+ // 自定义属性键
125
116
  // export const CUSTOM_KEY: RegExp = new RegExp(/^[a-zA-Z_]([a-zA-Z0-9_]{1,19})?$/);
126
-
127
- var CUSTOM_KEY = /*#__PURE__*/new RegExp('^[a-zA-Z]([a-zA-Z0-9_]{1,29})?$'); // 节点名称
128
-
129
- var NODE_NAME = /*#__PURE__*/new RegExp(/^[\u4E00-\u9FA5|a-zA-Z0-9]{2,24}$/); // 节点地址
117
+ var CUSTOM_KEY = /*#__PURE__*/new RegExp('^[a-zA-Z]([a-zA-Z0-9_]{1,29})?$');
118
+ // 节点名称
119
+ var NODE_NAME = /*#__PURE__*/new RegExp(/^[\u4E00-\u9FA5|a-zA-Z0-9]{2,24}$/);
120
+ // 节点地址
130
121
  // export const NODE_DOMAIN: RegExp = new RegExp(/^(?!-)[a-z0-9-]{4,24}(?<!-)$/);
131
-
132
- var NODE_DOMAIN = /*#__PURE__*/new RegExp(/^[a-z0-9][a-z0-9-]{2,22}[a-z0-9]$/); // 支付密码
133
-
134
- var PAY_PASSWORD = /*#__PURE__*/new RegExp(/^\d{6}$/); // 手机号码
135
-
136
- var MOBILE_PHONE_NUMBER = /*#__PURE__*/new RegExp(/^1[345789]\d{9}$/); // export const TELEPHONE_NUMBER = /^((13[0-9])|(14[5-9])|(15([0-3]|[5-9]))|(16[6-7])|(17[1-8])|(18[0-9])|(19[1|3])|(19[5|6])|(19[8|9]))\d{8}$/
122
+ var NODE_DOMAIN = /*#__PURE__*/new RegExp(/^[a-z0-9][a-z0-9-]{2,22}[a-z0-9]$/);
123
+ // 支付密码
124
+ var PAY_PASSWORD = /*#__PURE__*/new RegExp(/^\d{6}$/);
125
+ // 手机号码
126
+ var MOBILE_PHONE_NUMBER = /*#__PURE__*/new RegExp(/^1[345789]\d{9}$/);
127
+ // export const TELEPHONE_NUMBER = /^((13[0-9])|(14[5-9])|(15([0-3]|[5-9]))|(16[6-7])|(17[1-8])|(18[0-9])|(19[1|3])|(19[5|6])|(19[8|9]))\d{8}$/
137
128
  // 邮箱地址
138
-
139
- var EMAIL_ADDRESS = /*#__PURE__*/new RegExp(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/); // 用户名
129
+ var EMAIL_ADDRESS = /*#__PURE__*/new RegExp(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/);
130
+ // 用户名
140
131
  // export const USERNAME: RegExp = new RegExp(/^(?!-)[A-Za-z0-9-]{1,30}(?<!-)$/);
141
-
142
- var USERNAME = /*#__PURE__*/new RegExp(/^([A-Za-z0-9][A-Za-z0-9-]{0,28})?[A-Za-z0-9]$/); // 用户密码
132
+ var USERNAME = /*#__PURE__*/new RegExp(/^([A-Za-z0-9][A-Za-z0-9-]{0,28})?[A-Za-z0-9]$/);
133
+ // 用户密码
143
134
  // export const PASSWORD = /^(?=.*[a-zA-Z])(?=.*[0-9]).{6,24}$/;
144
-
145
- var PASSWORD = /*#__PURE__*/new RegExp(/^(?=.*[0-9])(?=.*[a-zA-Z])(.{6,24})$/); // 自然数
146
-
147
- var NATURAL_NUMBER = /*#__PURE__*/new RegExp(/^[0-9]*$/); // 正整数
148
-
149
- var POSITIVE_INTEGER = /*#__PURE__*/new RegExp(/^[1-9]\d*$/); // 最多两位小数的正数
135
+ var PASSWORD = /*#__PURE__*/new RegExp(/^(?=.*[0-9])(?=.*[a-zA-Z])(.{6,24})$/);
136
+ // 自然数
137
+ var NATURAL_NUMBER = /*#__PURE__*/new RegExp(/^[0-9]*$/);
138
+ // 正整数
139
+ var POSITIVE_INTEGER = /*#__PURE__*/new RegExp(/^[1-9]\d*$/);
140
+ // 最多两位小数的正数
150
141
  // export const MAX_2_DECIMAL_POSITIVE_NUMBER = new RegExp(/^\d+(.\d{1,2})?$/);
151
-
152
- var MAX_2_DECIMAL_POSITIVE_NUMBER = /*#__PURE__*/new RegExp(/^\d+(\.\d{0,2})?$/); // 对象的Bucket名称
153
-
154
- var BUCKET_NAME = /*#__PURE__*/new RegExp(/^([a-z0-9][a-z0-9-]{0,61})?[a-z0-9]$/); // JS变量名称
155
-
156
- var JS_VARIABLE_NAME = /*#__PURE__*/new RegExp(/^[A-Za-z$_][\w$_]*$/); // 日期
157
-
158
- var DATE = /*#__PURE__*/new RegExp(/(([0-9]{3}[1-9]|[0-9]{2}[1-9][0-9]{1}|[0-9]{1}[1-9][0-9]{2}|[1-9][0-9]{3})-(((0[13578]|1[02])-(0[1-9]|[12][0-9]|3[01]))|((0[469]|11)-(0[1-9]|[12][0-9]|30))|(02-(0[1-9]|[1][0-9]|2[0-8]))))|((([0-9]{2})(0[48]|[2468][048]|[13579][26])|((0[48]|[2468][048]|[3579][26])00))-02-29)$/); // 日期时间
159
-
142
+ var MAX_2_DECIMAL_POSITIVE_NUMBER = /*#__PURE__*/new RegExp(/^\d+(\.\d{0,2})?$/);
143
+ // 对象的Bucket名称
144
+ var BUCKET_NAME = /*#__PURE__*/new RegExp(/^([a-z0-9][a-z0-9-]{0,61})?[a-z0-9]$/);
145
+ // JS变量名称
146
+ var JS_VARIABLE_NAME = /*#__PURE__*/new RegExp(/^[A-Za-z$_][\w$_]*$/);
147
+ // 日期
148
+ var DATE = /*#__PURE__*/new RegExp(/(([0-9]{3}[1-9]|[0-9]{2}[1-9][0-9]{1}|[0-9]{1}[1-9][0-9]{2}|[1-9][0-9]{3})-(((0[13578]|1[02])-(0[1-9]|[12][0-9]|3[01]))|((0[469]|11)-(0[1-9]|[12][0-9]|30))|(02-(0[1-9]|[1][0-9]|2[0-8]))))|((([0-9]{2})(0[48]|[2468][048]|[13579][26])|((0[48]|[2468][048]|[3579][26])00))-02-29)$/);
149
+ // 日期时间
160
150
  var DATE_TIME = /*#__PURE__*/new RegExp(/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/);
161
151
 
162
152
  var Regexp = {
@@ -181,441 +171,367 @@ var Regexp = {
181
171
  DATE_TIME: DATE_TIME
182
172
  };
183
173
 
174
+ function asyncGeneratorStep(n, t, e, r, o, a, c) {
175
+ try {
176
+ var i = n[a](c),
177
+ u = i.value;
178
+ } catch (n) {
179
+ return void e(n);
180
+ }
181
+ i.done ? t(u) : Promise.resolve(u).then(r, o);
182
+ }
183
+ function _asyncToGenerator(n) {
184
+ return function () {
185
+ var t = this,
186
+ e = arguments;
187
+ return new Promise(function (r, o) {
188
+ var a = n.apply(t, e);
189
+ function _next(n) {
190
+ asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
191
+ }
192
+ function _throw(n) {
193
+ asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
194
+ }
195
+ _next(void 0);
196
+ });
197
+ };
198
+ }
199
+ function _extends() {
200
+ return _extends = Object.assign ? Object.assign.bind() : function (n) {
201
+ for (var e = 1; e < arguments.length; e++) {
202
+ var t = arguments[e];
203
+ for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
204
+ }
205
+ return n;
206
+ }, _extends.apply(null, arguments);
207
+ }
208
+ function _objectDestructuringEmpty(t) {
209
+ if (null == t) throw new TypeError("Cannot destructure " + t);
210
+ }
211
+ function _objectWithoutPropertiesLoose(r, e) {
212
+ if (null == r) return {};
213
+ var t = {};
214
+ for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
215
+ if (e.includes(n)) continue;
216
+ t[n] = r[n];
217
+ }
218
+ return t;
219
+ }
184
220
  function _regeneratorRuntime() {
185
- /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
186
-
187
221
  _regeneratorRuntime = function () {
188
- return exports;
222
+ return e;
189
223
  };
190
-
191
- var exports = {},
192
- Op = Object.prototype,
193
- hasOwn = Op.hasOwnProperty,
194
- $Symbol = "function" == typeof Symbol ? Symbol : {},
195
- iteratorSymbol = $Symbol.iterator || "@@iterator",
196
- asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
197
- toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
198
-
199
- function define(obj, key, value) {
200
- return Object.defineProperty(obj, key, {
201
- value: value,
224
+ var t,
225
+ e = {},
226
+ r = Object.prototype,
227
+ n = r.hasOwnProperty,
228
+ o = Object.defineProperty || function (t, e, r) {
229
+ t[e] = r.value;
230
+ },
231
+ i = "function" == typeof Symbol ? Symbol : {},
232
+ a = i.iterator || "@@iterator",
233
+ c = i.asyncIterator || "@@asyncIterator",
234
+ u = i.toStringTag || "@@toStringTag";
235
+ function define(t, e, r) {
236
+ return Object.defineProperty(t, e, {
237
+ value: r,
202
238
  enumerable: !0,
203
239
  configurable: !0,
204
240
  writable: !0
205
- }), obj[key];
241
+ }), t[e];
206
242
  }
207
-
208
243
  try {
209
244
  define({}, "");
210
- } catch (err) {
211
- define = function (obj, key, value) {
212
- return obj[key] = value;
245
+ } catch (t) {
246
+ define = function (t, e, r) {
247
+ return t[e] = r;
213
248
  };
214
249
  }
215
-
216
- function wrap(innerFn, outerFn, self, tryLocsList) {
217
- var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
218
- generator = Object.create(protoGenerator.prototype),
219
- context = new Context(tryLocsList || []);
220
- return generator._invoke = function (innerFn, self, context) {
221
- var state = "suspendedStart";
222
- return function (method, arg) {
223
- if ("executing" === state) throw new Error("Generator is already running");
224
-
225
- if ("completed" === state) {
226
- if ("throw" === method) throw arg;
227
- return doneResult();
228
- }
229
-
230
- for (context.method = method, context.arg = arg;;) {
231
- var delegate = context.delegate;
232
-
233
- if (delegate) {
234
- var delegateResult = maybeInvokeDelegate(delegate, context);
235
-
236
- if (delegateResult) {
237
- if (delegateResult === ContinueSentinel) continue;
238
- return delegateResult;
239
- }
240
- }
241
-
242
- if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
243
- if ("suspendedStart" === state) throw state = "completed", context.arg;
244
- context.dispatchException(context.arg);
245
- } else "return" === context.method && context.abrupt("return", context.arg);
246
- state = "executing";
247
- var record = tryCatch(innerFn, self, context);
248
-
249
- if ("normal" === record.type) {
250
- if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
251
- return {
252
- value: record.arg,
253
- done: context.done
254
- };
255
- }
256
-
257
- "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
258
- }
259
- };
260
- }(innerFn, self, context), generator;
250
+ function wrap(t, e, r, n) {
251
+ var i = e && e.prototype instanceof Generator ? e : Generator,
252
+ a = Object.create(i.prototype),
253
+ c = new Context(n || []);
254
+ return o(a, "_invoke", {
255
+ value: makeInvokeMethod(t, r, c)
256
+ }), a;
261
257
  }
262
-
263
- function tryCatch(fn, obj, arg) {
258
+ function tryCatch(t, e, r) {
264
259
  try {
265
260
  return {
266
261
  type: "normal",
267
- arg: fn.call(obj, arg)
262
+ arg: t.call(e, r)
268
263
  };
269
- } catch (err) {
264
+ } catch (t) {
270
265
  return {
271
266
  type: "throw",
272
- arg: err
267
+ arg: t
273
268
  };
274
269
  }
275
270
  }
276
-
277
- exports.wrap = wrap;
278
- var ContinueSentinel = {};
279
-
271
+ e.wrap = wrap;
272
+ var h = "suspendedStart",
273
+ l = "suspendedYield",
274
+ f = "executing",
275
+ s = "completed",
276
+ y = {};
280
277
  function Generator() {}
281
-
282
278
  function GeneratorFunction() {}
283
-
284
279
  function GeneratorFunctionPrototype() {}
285
-
286
- var IteratorPrototype = {};
287
- define(IteratorPrototype, iteratorSymbol, function () {
280
+ var p = {};
281
+ define(p, a, function () {
288
282
  return this;
289
283
  });
290
- var getProto = Object.getPrototypeOf,
291
- NativeIteratorPrototype = getProto && getProto(getProto(values([])));
292
- NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
293
- var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
294
-
295
- function defineIteratorMethods(prototype) {
296
- ["next", "throw", "return"].forEach(function (method) {
297
- define(prototype, method, function (arg) {
298
- return this._invoke(method, arg);
284
+ var d = Object.getPrototypeOf,
285
+ v = d && d(d(values([])));
286
+ v && v !== r && n.call(v, a) && (p = v);
287
+ var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
288
+ function defineIteratorMethods(t) {
289
+ ["next", "throw", "return"].forEach(function (e) {
290
+ define(t, e, function (t) {
291
+ return this._invoke(e, t);
299
292
  });
300
293
  });
301
294
  }
302
-
303
- function AsyncIterator(generator, PromiseImpl) {
304
- function invoke(method, arg, resolve, reject) {
305
- var record = tryCatch(generator[method], generator, arg);
306
-
307
- if ("throw" !== record.type) {
308
- var result = record.arg,
309
- value = result.value;
310
- return value && "object" == typeof value && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
311
- invoke("next", value, resolve, reject);
312
- }, function (err) {
313
- invoke("throw", err, resolve, reject);
314
- }) : PromiseImpl.resolve(value).then(function (unwrapped) {
315
- result.value = unwrapped, resolve(result);
316
- }, function (error) {
317
- return invoke("throw", error, resolve, reject);
295
+ function AsyncIterator(t, e) {
296
+ function invoke(r, o, i, a) {
297
+ var c = tryCatch(t[r], t, o);
298
+ if ("throw" !== c.type) {
299
+ var u = c.arg,
300
+ h = u.value;
301
+ return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
302
+ invoke("next", t, i, a);
303
+ }, function (t) {
304
+ invoke("throw", t, i, a);
305
+ }) : e.resolve(h).then(function (t) {
306
+ u.value = t, i(u);
307
+ }, function (t) {
308
+ return invoke("throw", t, i, a);
318
309
  });
319
310
  }
320
-
321
- reject(record.arg);
311
+ a(c.arg);
322
312
  }
323
-
324
- var previousPromise;
325
-
326
- this._invoke = function (method, arg) {
327
- function callInvokeWithMethodAndArg() {
328
- return new PromiseImpl(function (resolve, reject) {
329
- invoke(method, arg, resolve, reject);
330
- });
313
+ var r;
314
+ o(this, "_invoke", {
315
+ value: function (t, n) {
316
+ function callInvokeWithMethodAndArg() {
317
+ return new e(function (e, r) {
318
+ invoke(t, n, e, r);
319
+ });
320
+ }
321
+ return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
331
322
  }
332
-
333
- return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
334
- };
323
+ });
335
324
  }
336
-
337
- function maybeInvokeDelegate(delegate, context) {
338
- var method = delegate.iterator[context.method];
339
-
340
- if (undefined === method) {
341
- if (context.delegate = null, "throw" === context.method) {
342
- if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel;
343
- context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method");
325
+ function makeInvokeMethod(e, r, n) {
326
+ var o = h;
327
+ return function (i, a) {
328
+ if (o === f) throw Error("Generator is already running");
329
+ if (o === s) {
330
+ if ("throw" === i) throw a;
331
+ return {
332
+ value: t,
333
+ done: !0
334
+ };
344
335
  }
345
-
346
- return ContinueSentinel;
347
- }
348
-
349
- var record = tryCatch(method, delegate.iterator, context.arg);
350
- if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
351
- var info = record.arg;
352
- return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
336
+ for (n.method = i, n.arg = a;;) {
337
+ var c = n.delegate;
338
+ if (c) {
339
+ var u = maybeInvokeDelegate(c, n);
340
+ if (u) {
341
+ if (u === y) continue;
342
+ return u;
343
+ }
344
+ }
345
+ if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
346
+ if (o === h) throw o = s, n.arg;
347
+ n.dispatchException(n.arg);
348
+ } else "return" === n.method && n.abrupt("return", n.arg);
349
+ o = f;
350
+ var p = tryCatch(e, r, n);
351
+ if ("normal" === p.type) {
352
+ if (o = n.done ? s : l, p.arg === y) continue;
353
+ return {
354
+ value: p.arg,
355
+ done: n.done
356
+ };
357
+ }
358
+ "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
359
+ }
360
+ };
353
361
  }
354
-
355
- function pushTryEntry(locs) {
356
- var entry = {
357
- tryLoc: locs[0]
362
+ function maybeInvokeDelegate(e, r) {
363
+ var n = r.method,
364
+ o = e.iterator[n];
365
+ if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
366
+ var i = tryCatch(o, e.iterator, r.arg);
367
+ if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
368
+ var a = i.arg;
369
+ return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
370
+ }
371
+ function pushTryEntry(t) {
372
+ var e = {
373
+ tryLoc: t[0]
358
374
  };
359
- 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
375
+ 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
360
376
  }
361
-
362
- function resetTryEntry(entry) {
363
- var record = entry.completion || {};
364
- record.type = "normal", delete record.arg, entry.completion = record;
377
+ function resetTryEntry(t) {
378
+ var e = t.completion || {};
379
+ e.type = "normal", delete e.arg, t.completion = e;
365
380
  }
366
-
367
- function Context(tryLocsList) {
381
+ function Context(t) {
368
382
  this.tryEntries = [{
369
383
  tryLoc: "root"
370
- }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
384
+ }], t.forEach(pushTryEntry, this), this.reset(!0);
371
385
  }
372
-
373
- function values(iterable) {
374
- if (iterable) {
375
- var iteratorMethod = iterable[iteratorSymbol];
376
- if (iteratorMethod) return iteratorMethod.call(iterable);
377
- if ("function" == typeof iterable.next) return iterable;
378
-
379
- if (!isNaN(iterable.length)) {
380
- var i = -1,
381
- next = function next() {
382
- for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
383
-
384
- return next.value = undefined, next.done = !0, next;
385
- };
386
-
387
- return next.next = next;
386
+ function values(e) {
387
+ if (e || "" === e) {
388
+ var r = e[a];
389
+ if (r) return r.call(e);
390
+ if ("function" == typeof e.next) return e;
391
+ if (!isNaN(e.length)) {
392
+ var o = -1,
393
+ i = function next() {
394
+ for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
395
+ return next.value = t, next.done = !0, next;
396
+ };
397
+ return i.next = i;
388
398
  }
389
399
  }
390
-
391
- return {
392
- next: doneResult
393
- };
400
+ throw new TypeError(typeof e + " is not iterable");
394
401
  }
395
-
396
- function doneResult() {
402
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
403
+ value: GeneratorFunctionPrototype,
404
+ configurable: !0
405
+ }), o(GeneratorFunctionPrototype, "constructor", {
406
+ value: GeneratorFunction,
407
+ configurable: !0
408
+ }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
409
+ var e = "function" == typeof t && t.constructor;
410
+ return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
411
+ }, e.mark = function (t) {
412
+ return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
413
+ }, e.awrap = function (t) {
397
414
  return {
398
- value: undefined,
399
- done: !0
415
+ __await: t
400
416
  };
401
- }
402
-
403
- return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
404
- var ctor = "function" == typeof genFun && genFun.constructor;
405
- return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
406
- }, exports.mark = function (genFun) {
407
- return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
408
- }, exports.awrap = function (arg) {
409
- return {
410
- __await: arg
411
- };
412
- }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
417
+ }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
413
418
  return this;
414
- }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
415
- void 0 === PromiseImpl && (PromiseImpl = Promise);
416
- var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
417
- return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
418
- return result.done ? result.value : iter.next();
419
+ }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
420
+ void 0 === i && (i = Promise);
421
+ var a = new AsyncIterator(wrap(t, r, n, o), i);
422
+ return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
423
+ return t.done ? t.value : a.next();
419
424
  });
420
- }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
425
+ }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
421
426
  return this;
422
- }), define(Gp, "toString", function () {
427
+ }), define(g, "toString", function () {
423
428
  return "[object Generator]";
424
- }), exports.keys = function (object) {
425
- var keys = [];
426
-
427
- for (var key in object) keys.push(key);
428
-
429
- return keys.reverse(), function next() {
430
- for (; keys.length;) {
431
- var key = keys.pop();
432
- if (key in object) return next.value = key, next.done = !1, next;
429
+ }), e.keys = function (t) {
430
+ var e = Object(t),
431
+ r = [];
432
+ for (var n in e) r.push(n);
433
+ return r.reverse(), function next() {
434
+ for (; r.length;) {
435
+ var t = r.pop();
436
+ if (t in e) return next.value = t, next.done = !1, next;
433
437
  }
434
-
435
438
  return next.done = !0, next;
436
439
  };
437
- }, exports.values = values, Context.prototype = {
440
+ }, e.values = values, Context.prototype = {
438
441
  constructor: Context,
439
- reset: function (skipTempReset) {
440
- if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
442
+ reset: function (e) {
443
+ if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
441
444
  },
442
445
  stop: function () {
443
446
  this.done = !0;
444
- var rootRecord = this.tryEntries[0].completion;
445
- if ("throw" === rootRecord.type) throw rootRecord.arg;
447
+ var t = this.tryEntries[0].completion;
448
+ if ("throw" === t.type) throw t.arg;
446
449
  return this.rval;
447
450
  },
448
- dispatchException: function (exception) {
449
- if (this.done) throw exception;
450
- var context = this;
451
-
452
- function handle(loc, caught) {
453
- return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
451
+ dispatchException: function (e) {
452
+ if (this.done) throw e;
453
+ var r = this;
454
+ function handle(n, o) {
455
+ return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
454
456
  }
455
-
456
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
457
- var entry = this.tryEntries[i],
458
- record = entry.completion;
459
- if ("root" === entry.tryLoc) return handle("end");
460
-
461
- if (entry.tryLoc <= this.prev) {
462
- var hasCatch = hasOwn.call(entry, "catchLoc"),
463
- hasFinally = hasOwn.call(entry, "finallyLoc");
464
-
465
- if (hasCatch && hasFinally) {
466
- if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
467
- if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
468
- } else if (hasCatch) {
469
- if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
457
+ for (var o = this.tryEntries.length - 1; o >= 0; --o) {
458
+ var i = this.tryEntries[o],
459
+ a = i.completion;
460
+ if ("root" === i.tryLoc) return handle("end");
461
+ if (i.tryLoc <= this.prev) {
462
+ var c = n.call(i, "catchLoc"),
463
+ u = n.call(i, "finallyLoc");
464
+ if (c && u) {
465
+ if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
466
+ if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
467
+ } else if (c) {
468
+ if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
470
469
  } else {
471
- if (!hasFinally) throw new Error("try statement without catch or finally");
472
- if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
470
+ if (!u) throw Error("try statement without catch or finally");
471
+ if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
473
472
  }
474
473
  }
475
474
  }
476
475
  },
477
- abrupt: function (type, arg) {
478
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
479
- var entry = this.tryEntries[i];
480
-
481
- if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
482
- var finallyEntry = entry;
476
+ abrupt: function (t, e) {
477
+ for (var r = this.tryEntries.length - 1; r >= 0; --r) {
478
+ var o = this.tryEntries[r];
479
+ if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
480
+ var i = o;
483
481
  break;
484
482
  }
485
483
  }
486
-
487
- finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
488
- var record = finallyEntry ? finallyEntry.completion : {};
489
- return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
484
+ i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
485
+ var a = i ? i.completion : {};
486
+ return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
490
487
  },
491
- complete: function (record, afterLoc) {
492
- if ("throw" === record.type) throw record.arg;
493
- return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
488
+ complete: function (t, e) {
489
+ if ("throw" === t.type) throw t.arg;
490
+ return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
494
491
  },
495
- finish: function (finallyLoc) {
496
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
497
- var entry = this.tryEntries[i];
498
- if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
492
+ finish: function (t) {
493
+ for (var e = this.tryEntries.length - 1; e >= 0; --e) {
494
+ var r = this.tryEntries[e];
495
+ if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
499
496
  }
500
497
  },
501
- catch: function (tryLoc) {
502
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
503
- var entry = this.tryEntries[i];
504
-
505
- if (entry.tryLoc === tryLoc) {
506
- var record = entry.completion;
507
-
508
- if ("throw" === record.type) {
509
- var thrown = record.arg;
510
- resetTryEntry(entry);
498
+ catch: function (t) {
499
+ for (var e = this.tryEntries.length - 1; e >= 0; --e) {
500
+ var r = this.tryEntries[e];
501
+ if (r.tryLoc === t) {
502
+ var n = r.completion;
503
+ if ("throw" === n.type) {
504
+ var o = n.arg;
505
+ resetTryEntry(r);
511
506
  }
512
-
513
- return thrown;
507
+ return o;
514
508
  }
515
509
  }
516
-
517
- throw new Error("illegal catch attempt");
510
+ throw Error("illegal catch attempt");
518
511
  },
519
- delegateYield: function (iterable, resultName, nextLoc) {
512
+ delegateYield: function (e, r, n) {
520
513
  return this.delegate = {
521
- iterator: values(iterable),
522
- resultName: resultName,
523
- nextLoc: nextLoc
524
- }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
525
- }
526
- }, exports;
527
- }
528
-
529
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
530
- try {
531
- var info = gen[key](arg);
532
- var value = info.value;
533
- } catch (error) {
534
- reject(error);
535
- return;
536
- }
537
-
538
- if (info.done) {
539
- resolve(value);
540
- } else {
541
- Promise.resolve(value).then(_next, _throw);
542
- }
543
- }
544
-
545
- function _asyncToGenerator(fn) {
546
- return function () {
547
- var self = this,
548
- args = arguments;
549
- return new Promise(function (resolve, reject) {
550
- var gen = fn.apply(self, args);
551
-
552
- function _next(value) {
553
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
554
- }
555
-
556
- function _throw(err) {
557
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
558
- }
559
-
560
- _next(undefined);
561
- });
562
- };
563
- }
564
-
565
- function _extends() {
566
- _extends = Object.assign ? Object.assign.bind() : function (target) {
567
- for (var i = 1; i < arguments.length; i++) {
568
- var source = arguments[i];
569
-
570
- for (var key in source) {
571
- if (Object.prototype.hasOwnProperty.call(source, key)) {
572
- target[key] = source[key];
573
- }
574
- }
514
+ iterator: values(e),
515
+ resultName: r,
516
+ nextLoc: n
517
+ }, "next" === this.method && (this.arg = t), y;
575
518
  }
576
-
577
- return target;
578
- };
579
- return _extends.apply(this, arguments);
580
- }
581
-
582
- function _objectDestructuringEmpty(obj) {
583
- if (obj == null) throw new TypeError("Cannot destructure undefined");
584
- }
585
-
586
- function _objectWithoutPropertiesLoose(source, excluded) {
587
- if (source == null) return {};
588
- var target = {};
589
- var sourceKeys = Object.keys(source);
590
- var key, i;
591
-
592
- for (i = 0; i < sourceKeys.length; i++) {
593
- key = sourceKeys[i];
594
- if (excluded.indexOf(key) >= 0) continue;
595
- target[key] = source[key];
596
- }
597
-
598
- return target;
519
+ }, e;
599
520
  }
600
521
 
601
522
  var _excluded = ["resourceID"],
602
- _excluded2 = ["nodeID", "showPage"],
603
- _excluded3 = ["nodeID", "showPage"],
604
- _excluded4 = ["goTo"],
605
- _excluded5 = ["goTo"],
606
- _excluded6 = ["goTo", "returnUrl"];
523
+ _excluded2 = ["nodeID", "showPage"],
524
+ _excluded3 = ["exhibitID"],
525
+ _excluded4 = ["nodeID", "showPage"],
526
+ _excluded5 = ["goTo"],
527
+ _excluded6 = ["goTo"],
528
+ _excluded7 = ["goTo", "returnUrl"];
607
529
  function home(_temp) {
608
- var _ref = _temp === void 0 ? {} : _temp;
609
-
610
- _objectDestructuringEmpty(_ref);
611
-
530
+ _objectDestructuringEmpty(_temp === void 0 ? {} : _temp);
612
531
  return "/home";
613
532
  }
614
533
  function activities(_temp2) {
615
- var _ref2 = _temp2 === void 0 ? {} : _temp2;
616
-
617
- _objectDestructuringEmpty(_ref2);
618
-
534
+ _objectDestructuringEmpty(_temp2 === void 0 ? {} : _temp2);
619
535
  return "/activities";
620
536
  }
621
537
  function activity(_ref3) {
@@ -623,349 +539,299 @@ function activity(_ref3) {
623
539
  return "/activity/" + activityID;
624
540
  }
625
541
  function dashboard(_temp3) {
626
- var _ref4 = _temp3 === void 0 ? {} : _temp3;
627
-
628
- _objectDestructuringEmpty(_ref4);
629
-
542
+ _objectDestructuringEmpty(_temp3 === void 0 ? {} : _temp3);
630
543
  return "/dashboard";
631
544
  }
632
545
  function market(_temp4) {
633
546
  var _ref5 = _temp4 === void 0 ? {} : _temp4,
634
- params = _extends({}, _ref5);
635
-
547
+ params = _extends({}, (_objectDestructuringEmpty(_ref5), _ref5));
636
548
  return "/market" + handleQuery(params);
637
549
  }
638
550
  function exampleNodes(_temp5) {
639
- var _ref6 = _temp5 === void 0 ? {} : _temp5;
640
-
641
- _objectDestructuringEmpty(_ref6);
642
-
551
+ _objectDestructuringEmpty(_temp5 === void 0 ? {} : _temp5);
643
552
  return "/examples";
644
553
  }
645
554
  function resourceDetails(_ref7) {
646
555
  var resourceID = _ref7.resourceID,
647
- params = _objectWithoutPropertiesLoose(_ref7, _excluded);
648
-
556
+ params = _objectWithoutPropertiesLoose(_ref7, _excluded);
649
557
  return "/resource/details/" + resourceID + handleQuery(params);
650
558
  }
559
+ function collectionDetails(_ref8) {
560
+ var collectionID = _ref8.collectionID;
561
+ return "/resource/collectionDetails/" + collectionID;
562
+ }
651
563
  function resourceCreatorEntry(_temp6) {
652
- var _ref8 = _temp6 === void 0 ? {} : _temp6;
653
-
654
- _objectDestructuringEmpty(_ref8);
655
-
564
+ _objectDestructuringEmpty(_temp6 === void 0 ? {} : _temp6);
656
565
  return "/resource/creatorEntry";
657
566
  }
658
567
  function resourceCreator(_temp7) {
659
- var _ref9 = _temp7 === void 0 ? {} : _temp7;
660
-
661
- _objectDestructuringEmpty(_ref9);
662
-
568
+ _objectDestructuringEmpty(_temp7 === void 0 ? {} : _temp7);
663
569
  return "/resource/creator";
664
570
  }
665
571
  function resourceCreatorBatch(_temp8) {
666
- var _ref10 = _temp8 === void 0 ? {} : _temp8;
667
-
668
- _objectDestructuringEmpty(_ref10);
669
-
572
+ _objectDestructuringEmpty(_temp8 === void 0 ? {} : _temp8);
670
573
  return "/resource/creatorBatch";
671
574
  }
672
575
  function collectionCreator(_temp9) {
673
- var _ref11 = _temp9 === void 0 ? {} : _temp9;
674
-
675
- _objectDestructuringEmpty(_ref11);
676
-
576
+ _objectDestructuringEmpty(_temp9 === void 0 ? {} : _temp9);
677
577
  return "/resource/collectionCreator";
678
578
  }
679
579
  function myResources(_temp10) {
680
- var _ref12 = _temp10 === void 0 ? {} : _temp10;
681
-
682
- _objectDestructuringEmpty(_ref12);
683
-
580
+ _objectDestructuringEmpty(_temp10 === void 0 ? {} : _temp10);
684
581
  return "/resource/list";
685
582
  }
686
583
  function myCollections(_temp11) {
687
- var _ref13 = _temp11 === void 0 ? {} : _temp11;
688
-
689
- _objectDestructuringEmpty(_ref13);
690
-
584
+ _objectDestructuringEmpty(_temp11 === void 0 ? {} : _temp11);
691
585
  return "/resource/collection";
692
586
  }
693
587
  function myCollects(_temp12) {
694
- var _ref14 = _temp12 === void 0 ? {} : _temp12;
695
-
696
- _objectDestructuringEmpty(_ref14);
697
-
588
+ _objectDestructuringEmpty(_temp12 === void 0 ? {} : _temp12);
698
589
  return "/resource/collect";
699
590
  }
700
- function resourceVersionInfo(_ref15) {
701
- var resourceID = _ref15.resourceID,
702
- _ref15$version = _ref15.version,
703
- version = _ref15$version === void 0 ? '' : _ref15$version;
591
+ function resourceVersionInfo(_ref16) {
592
+ var resourceID = _ref16.resourceID,
593
+ _ref16$version = _ref16.version,
594
+ version = _ref16$version === void 0 ? '' : _ref16$version;
704
595
  return "/resource/sidebar/versionInfo/" + resourceID + handleQuery({
705
596
  version: version
706
597
  });
707
598
  }
708
- function resourceInfo(_ref16) {
709
- var resourceID = _ref16.resourceID;
599
+ function resourceInfo(_ref17) {
600
+ var resourceID = _ref17.resourceID;
710
601
  return "/resource/sidebar/info/" + resourceID;
711
602
  }
712
- function resourcePolicy(_ref17) {
713
- var resourceID = _ref17.resourceID;
603
+ function resourcePolicy(_ref18) {
604
+ var resourceID = _ref18.resourceID;
714
605
  return "/resource/sidebar/policy/" + resourceID;
715
606
  }
716
- function resourceContract(_ref18) {
717
- var resourceID = _ref18.resourceID;
607
+ function resourceContract(_ref19) {
608
+ var resourceID = _ref19.resourceID;
718
609
  return "/resource/sidebar/contract/" + resourceID;
719
610
  }
720
- function resourceDependency(_ref19) {
721
- var resourceID = _ref19.resourceID;
611
+ function resourceDependency(_ref20) {
612
+ var resourceID = _ref20.resourceID;
722
613
  return "/resource/sidebar/dependency/" + resourceID;
723
614
  }
724
- function resourceVersionCreator(_ref20) {
725
- var resourceID = _ref20.resourceID;
615
+ function resourceVersionCreator(_ref21) {
616
+ var resourceID = _ref21.resourceID;
726
617
  return "/resource/versionCreator/" + resourceID;
727
618
  }
728
- function collectionVersionInfo(_ref21) {
729
- var collectionID = _ref21.collectionID;
619
+ function collectionVersionInfo(_ref22) {
620
+ var collectionID = _ref22.collectionID;
730
621
  return "/resource/collectionSidebar/versionInfo/" + collectionID;
731
622
  }
732
- function collectionInfo(_ref22) {
733
- var collectionID = _ref22.collectionID;
623
+ function collectionInfo(_ref23) {
624
+ var collectionID = _ref23.collectionID;
734
625
  return "/resource/collectionSidebar/info/" + collectionID;
735
626
  }
736
- function collectionPolicy(_ref23) {
737
- var collectionID = _ref23.collectionID;
627
+ function collectionPolicy(_ref24) {
628
+ var collectionID = _ref24.collectionID;
738
629
  return "/resource/collectionSidebar/policy/" + collectionID;
739
630
  }
740
- function collectionContract(_ref24) {
741
- var collectionID = _ref24.collectionID;
631
+ function collectionContract(_ref25) {
632
+ var collectionID = _ref25.collectionID;
742
633
  return "/resource/collectionSidebar/contract/" + collectionID;
743
634
  }
744
- function collectionDependency(_ref25) {
745
- var collectionID = _ref25.collectionID;
635
+ function collectionDependency(_ref26) {
636
+ var collectionID = _ref26.collectionID;
746
637
  return "/resource/collectionSidebar/dependency/" + collectionID;
747
638
  }
748
639
  function nodeCreator(_temp13) {
749
- var _ref26 = _temp13 === void 0 ? {} : _temp13;
750
-
751
- _objectDestructuringEmpty(_ref26);
752
-
640
+ _objectDestructuringEmpty(_temp13 === void 0 ? {} : _temp13);
753
641
  return "/node/creator";
754
642
  }
755
- function nodeManagement(_ref27) {
756
- var nodeID = _ref27.nodeID,
757
- _ref27$showPage = _ref27.showPage,
758
- showPage = _ref27$showPage === void 0 ? 'exhibit' : _ref27$showPage,
759
- params = _objectWithoutPropertiesLoose(_ref27, _excluded2);
760
-
643
+ function nodeManagement(_ref28) {
644
+ var nodeID = _ref28.nodeID,
645
+ _ref28$showPage = _ref28.showPage,
646
+ showPage = _ref28$showPage === void 0 ? 'exhibit' : _ref28$showPage,
647
+ params = _objectWithoutPropertiesLoose(_ref28, _excluded2);
761
648
  return "/node/formal/" + nodeID + handleQuery(_extends({
762
649
  showPage: showPage
763
650
  }, params));
764
651
  }
765
- function exhibitManagement(_ref28) {
766
- var exhibitID = _ref28.exhibitID,
767
- openAuthDrawer = _ref28.openAuthDrawer;
768
- return "/node/exhibit/formal/" + exhibitID + handleQuery({
769
- openAuthDrawer: openAuthDrawer
770
- });
771
- }
772
- function collectionExhibitManagement(_ref29) {
652
+ function exhibitManagement(_ref29) {
773
653
  var exhibitID = _ref29.exhibitID,
774
- openAuthDrawer = _ref29.openAuthDrawer;
654
+ params = _objectWithoutPropertiesLoose(_ref29, _excluded3);
655
+ return "/node/exhibit/formal/" + exhibitID + handleQuery(_extends({}, params));
656
+ }
657
+ function collectionExhibitManagement(_ref30) {
658
+ var exhibitID = _ref30.exhibitID,
659
+ openAuthDrawer = _ref30.openAuthDrawer;
775
660
  return "/node/collectionExhibit/formal/" + exhibitID + handleQuery({
776
661
  openAuthDrawer: openAuthDrawer
777
662
  });
778
663
  }
779
- function informNodeManagement(_ref30) {
780
- var nodeID = _ref30.nodeID,
781
- _ref30$showPage = _ref30.showPage,
782
- showPage = _ref30$showPage === void 0 ? 'exhibit' : _ref30$showPage,
783
- params = _objectWithoutPropertiesLoose(_ref30, _excluded3);
784
-
664
+ function informNodeManagement(_ref31) {
665
+ var nodeID = _ref31.nodeID,
666
+ _ref31$showPage = _ref31.showPage,
667
+ showPage = _ref31$showPage === void 0 ? 'exhibit' : _ref31$showPage,
668
+ params = _objectWithoutPropertiesLoose(_ref31, _excluded4);
785
669
  return "/node/informal/" + nodeID + handleQuery(_extends({
786
670
  showPage: showPage
787
671
  }, params));
788
672
  }
789
- function informExhibitManagement(_ref31) {
790
- var exhibitID = _ref31.exhibitID;
673
+ function informExhibitManagement(_ref32) {
674
+ var exhibitID = _ref32.exhibitID;
791
675
  return "/node/exhibit/informal/" + exhibitID;
792
676
  }
793
677
  function storageSpace(_temp14) {
794
- var _ref32 = _temp14 === void 0 ? {} : _temp14,
795
- params = _extends({}, _ref32);
796
-
678
+ var _ref33 = _temp14 === void 0 ? {} : _temp14,
679
+ params = _extends({}, (_objectDestructuringEmpty(_ref33), _ref33));
797
680
  return "/storage" + handleQuery(params);
798
681
  }
799
- function objectDetails(_ref33) {
800
- var params = _extends({}, _ref33);
801
-
682
+ function objectDetails(_ref34) {
683
+ var params = _extends({}, (_objectDestructuringEmpty(_ref34), _ref34));
802
684
  return "/storage" + handleQuery(params);
803
685
  }
804
- function resourceCreateSuccess(_ref34) {
805
- var resourceID = _ref34.resourceID;
686
+ function collectionCreateSuccess(_ref35) {
687
+ var collectionID = _ref35.collectionID;
688
+ return "/result/collection/create/success/" + collectionID;
689
+ }
690
+ function resourceCreateSuccess(_ref36) {
691
+ var resourceID = _ref36.resourceID;
806
692
  return "/result/resource/create/success/" + resourceID;
807
693
  }
808
- function resourceVersionCreateSuccess(_ref35) {
809
- var resourceID = _ref35.resourceID,
810
- version = _ref35.version;
694
+ function resourceVersionCreateSuccess(_ref37) {
695
+ var resourceID = _ref37.resourceID,
696
+ version = _ref37.version;
811
697
  return "/result/resource/version/create/success/" + resourceID + "/" + version;
812
698
  }
813
- function resourceVersionCreateRelease(_ref36) {
814
- var resourceID = _ref36.resourceID,
815
- version = _ref36.version;
699
+ function resourceVersionCreateRelease(_ref38) {
700
+ var resourceID = _ref38.resourceID,
701
+ version = _ref38.version;
816
702
  return "/result/resource/version/create/release/" + resourceID + "/" + version;
817
703
  }
818
- function nodeCreateSuccess(_ref37) {
819
- var nodeID = _ref37.nodeID;
704
+ function nodeCreateSuccess(_ref39) {
705
+ var nodeID = _ref39.nodeID;
820
706
  return "/result/node/create/success/" + nodeID;
821
707
  }
822
708
  function invitation(_temp15) {
823
- var _ref38 = _temp15 === void 0 ? {} : _temp15,
824
- goTo = _ref38.goTo,
825
- params = _objectWithoutPropertiesLoose(_ref38, _excluded4);
826
-
709
+ var _ref40 = _temp15 === void 0 ? {} : _temp15,
710
+ goTo = _ref40.goTo,
711
+ params = _objectWithoutPropertiesLoose(_ref40, _excluded5);
827
712
  // console.log(params.goTo, 'goTo9iowjefklsdj;flksdjflk')
828
713
  return "/invitation" + handleQuery(_extends({}, params, {
829
714
  returnUrl: goTo ? encodeURIComponent(goTo) : undefined
830
715
  }));
831
716
  }
832
717
  function exception403(_temp16) {
833
- var _ref39 = _temp16 === void 0 ? {} : _temp16,
834
- params = _extends({}, _ref39);
835
-
718
+ var _ref41 = _temp16 === void 0 ? {} : _temp16,
719
+ params = _extends({}, (_objectDestructuringEmpty(_ref41), _ref41));
836
720
  var fromUrl = params.from || '';
837
-
838
721
  if (!fromUrl) {
839
722
  var _window$location = window.location,
840
- href = _window$location.href,
841
- origin = _window$location.origin;
723
+ href = _window$location.href,
724
+ origin = _window$location.origin;
842
725
  fromUrl = href.replace(origin, '');
843
726
  }
844
-
845
727
  return "/exception/403" + handleQuery({
846
728
  from: fromUrl
847
729
  });
848
730
  }
849
- function nodeFreeze(_ref40) {
850
- var nodeID = _ref40.nodeID;
731
+ function exceptionUnableToAccess(_temp17) {
732
+ var _ref42 = _temp17 === void 0 ? {} : _temp17,
733
+ params = _extends({}, (_objectDestructuringEmpty(_ref42), _ref42));
734
+ var fromUrl = params.from || '';
735
+ if (!fromUrl) {
736
+ var _window$location2 = window.location,
737
+ href = _window$location2.href,
738
+ origin = _window$location2.origin;
739
+ fromUrl = href.replace(origin, '');
740
+ }
741
+ return "/exception/unableToAccess" + handleQuery({
742
+ from: fromUrl
743
+ });
744
+ }
745
+ function nodeFreeze(_ref43) {
746
+ var nodeID = _ref43.nodeID;
851
747
  return "/result/node/freeze/" + nodeID;
852
748
  }
853
- function resourceFreeze(_ref41) {
854
- var resourceID = _ref41.resourceID;
749
+ function resourceFreeze(_ref44) {
750
+ var resourceID = _ref44.resourceID;
855
751
  return "/result/resource/freeze/" + resourceID;
856
752
  }
857
- function globalSearch(_ref42) {
858
- var search = _ref42.search;
753
+ function globalSearch(_ref45) {
754
+ var search = _ref45.search;
859
755
  return "/search" + handleQuery({
860
756
  search: search
861
757
  });
862
758
  }
863
- function login(_temp17) {
864
- var _ref43 = _temp17 === void 0 ? {} : _temp17,
865
- goTo = _ref43.goTo;
866
-
759
+ function login(_temp18) {
760
+ var _ref46 = _temp18 === void 0 ? {} : _temp18,
761
+ goTo = _ref46.goTo;
867
762
  return "/login" + handleQuery({
868
763
  goTo: goTo ? encodeURIComponent(goTo) : undefined
869
764
  });
870
765
  }
871
- function logon(_temp18) {
872
- var _ref44 = _temp18 === void 0 ? {} : _temp18,
873
- goTo = _ref44.goTo,
874
- params = _objectWithoutPropertiesLoose(_ref44, _excluded5);
875
-
766
+ function logon(_temp19) {
767
+ var _ref47 = _temp19 === void 0 ? {} : _temp19,
768
+ goTo = _ref47.goTo,
769
+ params = _objectWithoutPropertiesLoose(_ref47, _excluded6);
876
770
  return "/logon" + handleQuery(_extends({
877
771
  goTo: goTo ? encodeURIComponent(goTo) : undefined
878
772
  }, params));
879
773
  }
880
- function bind(_temp19) {
881
- var _ref45 = _temp19 === void 0 ? {} : _temp19,
882
- goTo = _ref45.goTo,
883
- returnUrl = _ref45.returnUrl,
884
- params = _objectWithoutPropertiesLoose(_ref45, _excluded6);
885
-
774
+ function bind(_temp20) {
775
+ var _ref48 = _temp20 === void 0 ? {} : _temp20,
776
+ goTo = _ref48.goTo,
777
+ returnUrl = _ref48.returnUrl,
778
+ params = _objectWithoutPropertiesLoose(_ref48, _excluded7);
886
779
  return "/bind" + handleQuery(_extends({
887
780
  goTo: goTo ? encodeURIComponent(goTo) : undefined,
888
781
  returnUrl: returnUrl ? encodeURIComponent(returnUrl) : undefined
889
782
  }, params));
890
783
  }
891
- function retrieveUserPassword(_temp20) {
892
- var _ref46 = _temp20 === void 0 ? {} : _temp20,
893
- goTo = _ref46.goTo;
894
-
784
+ function retrieveUserPassword(_temp21) {
785
+ var _ref49 = _temp21 === void 0 ? {} : _temp21,
786
+ goTo = _ref49.goTo;
895
787
  return "/retrieve" + handleQuery({
896
788
  goTo: goTo ? encodeURIComponent(goTo) : undefined
897
789
  });
898
790
  }
899
- function retrievePayPassword(_temp21) {
900
- var _ref47 = _temp21 === void 0 ? {} : _temp21;
901
-
902
- _objectDestructuringEmpty(_ref47);
903
-
791
+ function retrievePayPassword(_temp22) {
792
+ _objectDestructuringEmpty(_temp22 === void 0 ? {} : _temp22);
904
793
  return "/retrievePayPassword";
905
794
  }
906
- function userFreeze(_temp22) {
907
- var _ref48 = _temp22 === void 0 ? {} : _temp22;
908
-
909
- _objectDestructuringEmpty(_ref48);
910
-
795
+ function userFreeze(_temp23) {
796
+ _objectDestructuringEmpty(_temp23 === void 0 ? {} : _temp23);
911
797
  return "/freeze";
912
798
  }
913
- function wallet(_temp23) {
914
- var _ref49 = _temp23 === void 0 ? {} : _temp23;
915
-
916
- _objectDestructuringEmpty(_ref49);
917
-
799
+ function wallet(_temp24) {
800
+ _objectDestructuringEmpty(_temp24 === void 0 ? {} : _temp24);
918
801
  return "/logged/wallet";
919
802
  }
920
- function reward(_temp24) {
921
- var _ref50 = _temp24 === void 0 ? {} : _temp24;
922
-
923
- _objectDestructuringEmpty(_ref50);
924
-
803
+ function reward(_temp25) {
804
+ _objectDestructuringEmpty(_temp25 === void 0 ? {} : _temp25);
925
805
  return "/logged/reward";
926
806
  }
927
- function contract(_temp25) {
928
- var _ref51 = _temp25 === void 0 ? {} : _temp25,
929
- params = _extends({}, _ref51);
930
-
807
+ function contract(_temp26) {
808
+ var _ref54 = _temp26 === void 0 ? {} : _temp26,
809
+ params = _extends({}, (_objectDestructuringEmpty(_ref54), _ref54));
931
810
  return "/logged/contract" + handleQuery(_extends({}, params));
932
811
  }
933
- function setting(_temp26) {
934
- var _ref52 = _temp26 === void 0 ? {} : _temp26;
935
-
936
- _objectDestructuringEmpty(_ref52);
937
-
812
+ function setting(_temp27) {
813
+ _objectDestructuringEmpty(_temp27 === void 0 ? {} : _temp27);
938
814
  return "/logged/setting";
939
815
  }
940
- function binding(_temp27) {
941
- var _ref53 = _temp27 === void 0 ? {} : _temp27;
942
-
943
- _objectDestructuringEmpty(_ref53);
944
-
816
+ function binding(_temp28) {
817
+ _objectDestructuringEmpty(_temp28 === void 0 ? {} : _temp28);
945
818
  return "/logged/binding";
946
819
  }
947
- function resultBindingSuccess(_temp28) {
948
- var _ref54 = _temp28 === void 0 ? {} : _temp28;
949
-
950
- _objectDestructuringEmpty(_ref54);
951
-
820
+ function resultBindingSuccess(_temp29) {
821
+ _objectDestructuringEmpty(_temp29 === void 0 ? {} : _temp29);
952
822
  return "/result/binding";
953
823
  }
954
824
  /************** user End ******************************************************/
955
-
956
825
  function handleQuery(query) {
957
826
  var obj = {};
958
-
959
827
  for (var _i = 0, _Object$entries = Object.entries(query); _i < _Object$entries.length; _i++) {
960
828
  var _Object$entries$_i = _Object$entries[_i],
961
- key = _Object$entries$_i[0],
962
- value = _Object$entries$_i[1];
963
-
829
+ key = _Object$entries$_i[0],
830
+ value = _Object$entries$_i[1];
964
831
  if (key && value) {
965
832
  obj[key] = value;
966
833
  }
967
834
  }
968
-
969
835
  var result = stringify(obj);
970
836
  return result ? '?' + result : '';
971
837
  }
@@ -979,6 +845,7 @@ var LinkTo = {
979
845
  market: market,
980
846
  exampleNodes: exampleNodes,
981
847
  resourceDetails: resourceDetails,
848
+ collectionDetails: collectionDetails,
982
849
  resourceCreatorEntry: resourceCreatorEntry,
983
850
  resourceCreator: resourceCreator,
984
851
  resourceCreatorBatch: resourceCreatorBatch,
@@ -1005,12 +872,14 @@ var LinkTo = {
1005
872
  informExhibitManagement: informExhibitManagement,
1006
873
  storageSpace: storageSpace,
1007
874
  objectDetails: objectDetails,
875
+ collectionCreateSuccess: collectionCreateSuccess,
1008
876
  resourceCreateSuccess: resourceCreateSuccess,
1009
877
  resourceVersionCreateSuccess: resourceVersionCreateSuccess,
1010
878
  resourceVersionCreateRelease: resourceVersionCreateRelease,
1011
879
  nodeCreateSuccess: nodeCreateSuccess,
1012
880
  invitation: invitation,
1013
881
  exception403: exception403,
882
+ exceptionUnableToAccess: exceptionUnableToAccess,
1014
883
  nodeFreeze: nodeFreeze,
1015
884
  resourceFreeze: resourceFreeze,
1016
885
  globalSearch: globalSearch,
@@ -1030,38 +899,34 @@ var LinkTo = {
1030
899
 
1031
900
  // export const apiHost = `${window.location.protocol}//qi.${(window.location.host.match(/(?<=\.).*/) || [''])[0]}`;
1032
901
  // 预设资源类型
1033
- var resourceTypes = ['json', 'widget', 'image', 'audio', 'markdown', 'theme', 'reveal_slide', 'license', 'video', 'catalog']; // 全局列表加载条目数
1034
-
1035
- var pageSize = 100; // Moment 日期时间格式
1036
-
902
+ var resourceTypes = ['json', 'widget', 'image', 'audio', 'markdown', 'theme', 'reveal_slide', 'license', 'video', 'catalog'];
903
+ // 全局列表加载条目数
904
+ var pageSize = 100;
905
+ // Moment 日期时间格式
1037
906
  var momentDateFormat = 'YYYY-MM-DD';
1038
- var momentDateTimeFormat = 'YYYY-MM-DD HH:mm'; // 签约方用户的身份类型定义
1039
-
907
+ var momentDateTimeFormat = 'YYYY-MM-DD HH:mm';
908
+ // 签约方用户的身份类型定义
1040
909
  var EnumContractPartyIdentityType;
1041
-
1042
910
  (function (EnumContractPartyIdentityType) {
1043
911
  EnumContractPartyIdentityType[EnumContractPartyIdentityType["resource"] = 1] = "resource";
1044
912
  EnumContractPartyIdentityType[EnumContractPartyIdentityType["node"] = 2] = "node";
1045
913
  EnumContractPartyIdentityType[EnumContractPartyIdentityType["consumer"] = 3] = "consumer";
1046
- })(EnumContractPartyIdentityType || (EnumContractPartyIdentityType = {})); // 标的物类型定义
1047
-
1048
-
914
+ })(EnumContractPartyIdentityType || (EnumContractPartyIdentityType = {}));
915
+ // 标的物类型定义
1049
916
  var EnumSubjectType;
1050
-
1051
917
  (function (EnumSubjectType) {
1052
918
  EnumSubjectType[EnumSubjectType["resource"] = 1] = "resource";
1053
919
  EnumSubjectType[EnumSubjectType["exhibit"] = 2] = "exhibit";
1054
920
  EnumSubjectType[EnumSubjectType["user"] = 3] = "user";
1055
- })(EnumSubjectType || (EnumSubjectType = {})); // 合约状态定义
1056
-
1057
-
921
+ })(EnumSubjectType || (EnumSubjectType = {}));
922
+ // 合约状态定义
1058
923
  var EnumContractStatus;
1059
-
1060
924
  (function (EnumContractStatus) {
1061
925
  EnumContractStatus[EnumContractStatus["pending"] = 0] = "pending";
1062
926
  EnumContractStatus[EnumContractStatus["authorized"] = 1] = "authorized";
1063
927
  EnumContractStatus[EnumContractStatus["stopped"] = 2] = "stopped";
1064
- })(EnumContractStatus || (EnumContractStatus = {})); // 合约授权状态定义
928
+ })(EnumContractStatus || (EnumContractStatus = {}));
929
+ // 合约授权状态定义
1065
930
  // export enum ContractAuthStatus {
1066
931
  //
1067
932
  // }
@@ -1092,11 +957,10 @@ function details(params) {
1092
957
  method: 'GET',
1093
958
  url: "/v2/nodes/" + params.nodeId
1094
959
  });
1095
- } // return FUtil.Axios.get(`/v2/nodes/detail`, {
960
+ }
961
+ // return FUtil.Axios.get(`/v2/nodes/detail`, {
1096
962
  // params,
1097
963
  // });
1098
-
1099
-
1100
964
  return FUtil.Request({
1101
965
  method: 'GET',
1102
966
  url: "/v2/nodes/detail",
@@ -1124,6 +988,13 @@ function setNodeInfo(params) {
1124
988
  data: params
1125
989
  });
1126
990
  }
991
+ function deleteNode(_ref) {
992
+ var nodeId = _ref.nodeId;
993
+ return FUtil.Request({
994
+ method: 'DELETE',
995
+ url: "/v2/nodes/" + nodeId
996
+ });
997
+ }
1127
998
 
1128
999
  var Node = {
1129
1000
  __proto__: null,
@@ -1131,19 +1002,21 @@ var Node = {
1131
1002
  details: details,
1132
1003
  nodes: nodes,
1133
1004
  searchForClient: searchForClient,
1134
- setNodeInfo: setNodeInfo
1005
+ setNodeInfo: setNodeInfo,
1006
+ deleteNode: deleteNode
1135
1007
  };
1136
1008
 
1137
1009
  var _excluded$1 = ["presentableId"],
1138
- _excluded2$1 = ["presentableId"],
1139
- _excluded3$1 = ["presentableId"],
1140
- _excluded4$1 = ["presentableId"],
1141
- _excluded5$1 = ["presentableId"],
1142
- _excluded6$1 = ["presentableId"],
1143
- _excluded7 = ["presentableId"],
1144
- _excluded8 = ["presentableId"],
1145
- _excluded9 = ["nodeId"],
1146
- _excluded10 = ["nodeId"];
1010
+ _excluded2$1 = ["presentableId"],
1011
+ _excluded3$1 = ["presentableId"],
1012
+ _excluded4$1 = ["presentableId"],
1013
+ _excluded5$1 = ["presentableId"],
1014
+ _excluded6$1 = ["presentableId"],
1015
+ _excluded7$1 = ["presentableId"],
1016
+ _excluded8 = ["presentableId"],
1017
+ _excluded9 = ["nodeId"],
1018
+ _excluded10 = ["nodeId"],
1019
+ _excluded11 = ["presentableId"];
1147
1020
  function createPresentable(params) {
1148
1021
  return FUtil.Request({
1149
1022
  method: 'POST',
@@ -1153,8 +1026,7 @@ function createPresentable(params) {
1153
1026
  }
1154
1027
  function updatePresentable(_ref) {
1155
1028
  var presentableId = _ref.presentableId,
1156
- params = _objectWithoutPropertiesLoose(_ref, _excluded$1);
1157
-
1029
+ params = _objectWithoutPropertiesLoose(_ref, _excluded$1);
1158
1030
  return FUtil.Request({
1159
1031
  method: 'PUT',
1160
1032
  url: "/v2/presentables/" + presentableId,
@@ -1163,8 +1035,7 @@ function updatePresentable(_ref) {
1163
1035
  }
1164
1036
  function presentablesOnlineStatus(_ref2) {
1165
1037
  var presentableId = _ref2.presentableId,
1166
- params = _objectWithoutPropertiesLoose(_ref2, _excluded2$1);
1167
-
1038
+ params = _objectWithoutPropertiesLoose(_ref2, _excluded2$1);
1168
1039
  return FUtil.Request({
1169
1040
  method: 'PUT',
1170
1041
  url: "/v2/presentables/" + presentableId + "/onlineStatus",
@@ -1179,10 +1050,8 @@ function presentableDetails(params) {
1179
1050
  params: params
1180
1051
  });
1181
1052
  }
1182
-
1183
1053
  var presentableId = params.presentableId,
1184
- p = _objectWithoutPropertiesLoose(params, _excluded3$1);
1185
-
1054
+ p = _objectWithoutPropertiesLoose(params, _excluded3$1);
1186
1055
  return FUtil.Request({
1187
1056
  method: 'GET',
1188
1057
  url: "/v2/presentables/" + presentableId,
@@ -1205,8 +1074,7 @@ function presentableList(params) {
1205
1074
  }
1206
1075
  function dependencyTree(_ref3) {
1207
1076
  var presentableId = _ref3.presentableId,
1208
- params = _objectWithoutPropertiesLoose(_ref3, _excluded4$1);
1209
-
1077
+ params = _objectWithoutPropertiesLoose(_ref3, _excluded4$1);
1210
1078
  return FUtil.Request({
1211
1079
  method: 'GET',
1212
1080
  url: "/v2/presentables/" + presentableId + "/dependencyTree",
@@ -1215,8 +1083,7 @@ function dependencyTree(_ref3) {
1215
1083
  }
1216
1084
  function relationTree(_ref4) {
1217
1085
  var presentableId = _ref4.presentableId,
1218
- params = _objectWithoutPropertiesLoose(_ref4, _excluded5$1);
1219
-
1086
+ params = _objectWithoutPropertiesLoose(_ref4, _excluded5$1);
1220
1087
  return FUtil.Request({
1221
1088
  method: 'GET',
1222
1089
  url: "/v2/presentables/" + presentableId + "/relationTree",
@@ -1225,8 +1092,7 @@ function relationTree(_ref4) {
1225
1092
  }
1226
1093
  function authTree(_ref5) {
1227
1094
  var presentableId = _ref5.presentableId,
1228
- params = _objectWithoutPropertiesLoose(_ref5, _excluded6$1);
1229
-
1095
+ params = _objectWithoutPropertiesLoose(_ref5, _excluded6$1);
1230
1096
  return FUtil.Request({
1231
1097
  method: 'GET',
1232
1098
  url: "/v2/presentables/" + presentableId + "/authTree",
@@ -1235,8 +1101,7 @@ function authTree(_ref5) {
1235
1101
  }
1236
1102
  function presentablesVersion(_ref6) {
1237
1103
  var presentableId = _ref6.presentableId,
1238
- params = _objectWithoutPropertiesLoose(_ref6, _excluded7);
1239
-
1104
+ params = _objectWithoutPropertiesLoose(_ref6, _excluded7$1);
1240
1105
  return FUtil.Request({
1241
1106
  method: 'PUT',
1242
1107
  url: "/v2/presentables/" + presentableId + "/version",
@@ -1245,8 +1110,7 @@ function presentablesVersion(_ref6) {
1245
1110
  }
1246
1111
  function updateRewriteProperty(_ref7) {
1247
1112
  var presentableId = _ref7.presentableId,
1248
- params = _objectWithoutPropertiesLoose(_ref7, _excluded8);
1249
-
1113
+ params = _objectWithoutPropertiesLoose(_ref7, _excluded8);
1250
1114
  return FUtil.Request({
1251
1115
  method: 'PUT',
1252
1116
  url: "/v2/presentables/" + presentableId + "/rewriteProperty",
@@ -1255,8 +1119,7 @@ function updateRewriteProperty(_ref7) {
1255
1119
  }
1256
1120
  function batchAuth(_ref8) {
1257
1121
  var nodeId = _ref8.nodeId,
1258
- params = _objectWithoutPropertiesLoose(_ref8, _excluded9);
1259
-
1122
+ params = _objectWithoutPropertiesLoose(_ref8, _excluded9);
1260
1123
  return FUtil.Request({
1261
1124
  method: 'GET',
1262
1125
  url: "/v2/auths/presentables/nodes/" + nodeId + "/batchAuth/result",
@@ -1265,8 +1128,7 @@ function batchAuth(_ref8) {
1265
1128
  }
1266
1129
  function contractAppliedPresentable(_ref9) {
1267
1130
  var nodeId = _ref9.nodeId,
1268
- params = _objectWithoutPropertiesLoose(_ref9, _excluded10);
1269
-
1131
+ params = _objectWithoutPropertiesLoose(_ref9, _excluded10);
1270
1132
  return FUtil.Request({
1271
1133
  method: 'GET',
1272
1134
  url: "/v2/presentables/" + nodeId + "/contractAppliedPresentable",
@@ -1281,8 +1143,7 @@ function batchCreatePresentable(params) {
1281
1143
  });
1282
1144
  }
1283
1145
  function batchUpdatePresentable(_ref10) {
1284
- var params = _extends({}, _ref10);
1285
-
1146
+ var params = _extends({}, (_objectDestructuringEmpty(_ref10), _ref10));
1286
1147
  return FUtil.Request({
1287
1148
  method: 'PUT',
1288
1149
  url: "/v2/presentables/updatePresentableBatch",
@@ -1290,14 +1151,22 @@ function batchUpdatePresentable(_ref10) {
1290
1151
  });
1291
1152
  }
1292
1153
  function batchUpdatePresentableStatus(_ref11) {
1293
- var params = _extends({}, _ref11);
1294
-
1154
+ var params = _extends({}, (_objectDestructuringEmpty(_ref11), _ref11));
1295
1155
  return FUtil.Request({
1296
1156
  method: 'PUT',
1297
1157
  url: "/v2/presentables/updatePresentableOnlineStatusBatch",
1298
1158
  data: params
1299
1159
  });
1300
1160
  }
1161
+ function ignorePresentableVersionUpdateTip(_ref12) {
1162
+ var presentableId = _ref12.presentableId,
1163
+ params = _objectWithoutPropertiesLoose(_ref12, _excluded11);
1164
+ return FUtil.Request({
1165
+ method: 'POST',
1166
+ url: "/v2/presentables/" + presentableId + "/ignorePresentableVersionUpdateTip",
1167
+ data: params
1168
+ });
1169
+ }
1301
1170
 
1302
1171
  var Exhibit = {
1303
1172
  __proto__: null,
@@ -1316,14 +1185,15 @@ var Exhibit = {
1316
1185
  contractAppliedPresentable: contractAppliedPresentable,
1317
1186
  batchCreatePresentable: batchCreatePresentable,
1318
1187
  batchUpdatePresentable: batchUpdatePresentable,
1319
- batchUpdatePresentableStatus: batchUpdatePresentableStatus
1188
+ batchUpdatePresentableStatus: batchUpdatePresentableStatus,
1189
+ ignorePresentableVersionUpdateTip: ignorePresentableVersionUpdateTip
1320
1190
  };
1321
1191
 
1322
1192
  var _excluded$2 = ["bucketName"],
1323
- _excluded2$2 = ["bucketName"],
1324
- _excluded3$2 = ["objectIdOrName"],
1325
- _excluded4$2 = ["sha1"],
1326
- _excluded5$2 = ["objectIdOrName"];
1193
+ _excluded2$2 = ["bucketName"],
1194
+ _excluded3$2 = ["objectIdOrName"],
1195
+ _excluded4$2 = ["sha1"],
1196
+ _excluded5$2 = ["objectIdOrName"];
1327
1197
  function createBucket(params) {
1328
1198
  return FUtil.Request({
1329
1199
  method: 'POST',
@@ -1342,7 +1212,6 @@ function spaceStatistics(params) {
1342
1212
  if (params === void 0) {
1343
1213
  params = {};
1344
1214
  }
1345
-
1346
1215
  return FUtil.Request({
1347
1216
  method: 'GET',
1348
1217
  url: "/v2/storages/buckets/spaceStatistics",
@@ -1364,8 +1233,7 @@ function bucketDetails(_ref) {
1364
1233
  }
1365
1234
  function objectList(_ref2) {
1366
1235
  var bucketName = _ref2.bucketName,
1367
- params = _objectWithoutPropertiesLoose(_ref2, _excluded$2);
1368
-
1236
+ params = _objectWithoutPropertiesLoose(_ref2, _excluded$2);
1369
1237
  return FUtil.Request({
1370
1238
  method: 'GET',
1371
1239
  url: "/v2/storages/buckets/" + bucketName + "/objects",
@@ -1381,8 +1249,7 @@ function userNodeDataList(params) {
1381
1249
  }
1382
1250
  function createObject(_ref3) {
1383
1251
  var bucketName = _ref3.bucketName,
1384
- params = _objectWithoutPropertiesLoose(_ref3, _excluded2$2);
1385
-
1252
+ params = _objectWithoutPropertiesLoose(_ref3, _excluded2$2);
1386
1253
  return FUtil.Request({
1387
1254
  method: 'POST',
1388
1255
  url: "/v2/storages/buckets/" + bucketName + "/objects",
@@ -1397,7 +1264,6 @@ function objectDetails$1(params) {
1397
1264
  params: params
1398
1265
  });
1399
1266
  }
1400
-
1401
1267
  return FUtil.Request({
1402
1268
  method: 'GET',
1403
1269
  url: "/v2/storages/buckets/" + params.bucketName + "/objects/" + params.objectId,
@@ -1432,19 +1298,15 @@ function uploadFile(params, config, returnCancel) {
1432
1298
  if (returnCancel === void 0) {
1433
1299
  returnCancel = false;
1434
1300
  }
1435
-
1436
1301
  var formData = new FormData();
1437
-
1438
1302
  for (var _i = 0, _Object$entries = Object.entries(params); _i < _Object$entries.length; _i++) {
1439
1303
  var _Object$entries$_i = _Object$entries[_i],
1440
- key = _Object$entries$_i[0],
1441
- value = _Object$entries$_i[1];
1442
-
1304
+ key = _Object$entries$_i[0],
1305
+ value = _Object$entries$_i[1];
1443
1306
  if (value) {
1444
1307
  formData.append(key, value);
1445
1308
  }
1446
1309
  }
1447
-
1448
1310
  if (!returnCancel) {
1449
1311
  // return FUtil.Axios.post('/v2/storages/files/upload', formData, config);
1450
1312
  return FUtil.Request(_extends({
@@ -1453,13 +1315,12 @@ function uploadFile(params, config, returnCancel) {
1453
1315
  data: formData
1454
1316
  }, config));
1455
1317
  }
1456
-
1457
- var cancel = null; // const promise = FUtil.Axios.post('/v2/storages/files/upload', formData, {
1318
+ var cancel = null;
1319
+ // const promise = FUtil.Axios.post('/v2/storages/files/upload', formData, {
1458
1320
  // cancelToken: new FUtil.Axios.CancelToken((c) => {
1459
1321
  // cancel = c;
1460
1322
  // }),
1461
1323
  // });
1462
-
1463
1324
  var promise = FUtil.Request(_extends({
1464
1325
  method: 'POST',
1465
1326
  url: "/v2/storages/files/upload",
@@ -1472,17 +1333,14 @@ function uploadFile(params, config, returnCancel) {
1472
1333
  }
1473
1334
  function uploadImage(params, config) {
1474
1335
  var formData = new FormData();
1475
-
1476
1336
  for (var _i2 = 0, _Object$entries2 = Object.entries(params); _i2 < _Object$entries2.length; _i2++) {
1477
1337
  var _Object$entries2$_i = _Object$entries2[_i2],
1478
- key = _Object$entries2$_i[0],
1479
- value = _Object$entries2$_i[1];
1480
-
1338
+ key = _Object$entries2$_i[0],
1339
+ value = _Object$entries2$_i[1];
1481
1340
  if (value) {
1482
1341
  formData.append(key, value);
1483
1342
  }
1484
1343
  }
1485
-
1486
1344
  return FUtil.Request(_extends({
1487
1345
  method: 'POST',
1488
1346
  url: "/v2/storages/files/uploadImage",
@@ -1505,8 +1363,7 @@ function generateCoverImage(params) {
1505
1363
  }
1506
1364
  function updateObject(_ref5) {
1507
1365
  var objectIdOrName = _ref5.objectIdOrName,
1508
- params = _objectWithoutPropertiesLoose(_ref5, _excluded3$2);
1509
-
1366
+ params = _objectWithoutPropertiesLoose(_ref5, _excluded3$2);
1510
1367
  return FUtil.Request({
1511
1368
  method: 'PUT',
1512
1369
  url: "/v2/storages/objects/" + objectIdOrName,
@@ -1514,8 +1371,7 @@ function updateObject(_ref5) {
1514
1371
  });
1515
1372
  }
1516
1373
  function batchUpdateObject(_ref6) {
1517
- var params = _extends({}, _ref6);
1518
-
1374
+ var params = _extends({}, (_objectDestructuringEmpty(_ref6), _ref6));
1519
1375
  return FUtil.Request({
1520
1376
  method: 'PUT',
1521
1377
  url: "/v2/storages/objects/updateBatch",
@@ -1531,8 +1387,7 @@ function batchObjectList(params) {
1531
1387
  }
1532
1388
  function fileProperty(_ref7) {
1533
1389
  var sha1 = _ref7.sha1,
1534
- params = _objectWithoutPropertiesLoose(_ref7, _excluded4$2);
1535
-
1390
+ params = _objectWithoutPropertiesLoose(_ref7, _excluded4$2);
1536
1391
  return FUtil.Request({
1537
1392
  method: 'GET',
1538
1393
  url: "/v2/storages/files/" + sha1 + "/property",
@@ -1541,8 +1396,7 @@ function fileProperty(_ref7) {
1541
1396
  }
1542
1397
  function cycleDependencyCheck(_ref8) {
1543
1398
  var objectIdOrName = _ref8.objectIdOrName,
1544
- params = _objectWithoutPropertiesLoose(_ref8, _excluded5$2);
1545
-
1399
+ params = _objectWithoutPropertiesLoose(_ref8, _excluded5$2);
1546
1400
  return FUtil.Request({
1547
1401
  method: 'POST',
1548
1402
  url: "/v2/storages/objects/" + objectIdOrName + "/cycleDependencyCheck",
@@ -1550,8 +1404,7 @@ function cycleDependencyCheck(_ref8) {
1550
1404
  });
1551
1405
  }
1552
1406
  function clearUserNodeData(_ref9) {
1553
- var params = _extends({}, _ref9);
1554
-
1407
+ var params = _extends({}, (_objectDestructuringEmpty(_ref9), _ref9));
1555
1408
  return FUtil.Request({
1556
1409
  method: 'DELETE',
1557
1410
  url: "/v2/storages/buckets/.UserNodeData/objects/clear",
@@ -1559,14 +1412,21 @@ function clearUserNodeData(_ref9) {
1559
1412
  });
1560
1413
  }
1561
1414
  function filesListInfo(_ref10) {
1562
- var params = _extends({}, _ref10);
1563
-
1415
+ var params = _extends({}, (_objectDestructuringEmpty(_ref10), _ref10));
1564
1416
  return FUtil.Request({
1565
1417
  method: 'GET',
1566
1418
  url: "/v2/storages/files/list/info",
1567
1419
  params: params
1568
1420
  });
1569
1421
  }
1422
+ function filesInfo(_ref11) {
1423
+ var params = _extends({}, (_objectDestructuringEmpty(_ref11), _ref11));
1424
+ return FUtil.Request({
1425
+ method: 'GET',
1426
+ url: "/v2/storages/files/info",
1427
+ params: params
1428
+ });
1429
+ }
1570
1430
 
1571
1431
  var Storage = {
1572
1432
  __proto__: null,
@@ -1593,7 +1453,8 @@ var Storage = {
1593
1453
  fileProperty: fileProperty,
1594
1454
  cycleDependencyCheck: cycleDependencyCheck,
1595
1455
  clearUserNodeData: clearUserNodeData,
1596
- filesListInfo: filesListInfo
1456
+ filesListInfo: filesListInfo,
1457
+ filesInfo: filesInfo
1597
1458
  };
1598
1459
 
1599
1460
  function collectResource(params) {
@@ -1648,17 +1509,31 @@ var Collection = {
1648
1509
  };
1649
1510
 
1650
1511
  var _excluded$3 = ["resourceIdOrName"],
1651
- _excluded2$3 = ["resourceId"],
1652
- _excluded3$3 = ["resourceId"],
1653
- _excluded4$3 = ["resourceId"],
1654
- _excluded5$3 = ["resourceId", "version"],
1655
- _excluded6$2 = ["fileSha1"],
1656
- _excluded7$1 = ["fileSha1"],
1657
- _excluded8$1 = ["resourceId"],
1658
- _excluded9$1 = ["resourceId"],
1659
- _excluded10$1 = ["resourceId"],
1660
- _excluded11 = ["resourceId"],
1661
- _excluded12 = ["resourceId"];
1512
+ _excluded2$3 = ["resourceId"],
1513
+ _excluded3$3 = ["resourceId"],
1514
+ _excluded4$3 = ["resourceId"],
1515
+ _excluded5$3 = ["resourceId", "version"],
1516
+ _excluded6$2 = ["fileSha1"],
1517
+ _excluded7$2 = ["fileSha1"],
1518
+ _excluded8$1 = ["resourceId"],
1519
+ _excluded9$1 = ["resourceId"],
1520
+ _excluded10$1 = ["resourceId"],
1521
+ _excluded11$1 = ["resourceId"],
1522
+ _excluded12 = ["resourceId"],
1523
+ _excluded13 = ["resourceId"],
1524
+ _excluded14 = ["resourceId"],
1525
+ _excluded15 = ["resourceId"],
1526
+ _excluded16 = ["resourceId"],
1527
+ _excluded17 = ["resourceId"],
1528
+ _excluded18 = ["resourceId"],
1529
+ _excluded19 = ["resourceId"],
1530
+ _excluded20 = ["resourceId"],
1531
+ _excluded21 = ["resourceId"],
1532
+ _excluded22 = ["resourceId"],
1533
+ _excluded23 = ["resourceId"],
1534
+ _excluded24 = ["resourceId", "itemId"],
1535
+ _excluded25 = ["resourceId"],
1536
+ _excluded26 = ["resourceId"];
1662
1537
  function create$1(params) {
1663
1538
  return FUtil.Request({
1664
1539
  method: 'POST',
@@ -1686,10 +1561,10 @@ function batchUpdate(params) {
1686
1561
  url: "/v2/resources/updateBatch",
1687
1562
  data: params
1688
1563
  });
1689
- } // interface ListReturnType extends CommonReturn {
1564
+ }
1565
+ // interface ListReturnType extends CommonReturn {
1690
1566
  // data: IResourceInfo[];
1691
1567
  // }
1692
-
1693
1568
  function list(params) {
1694
1569
  return FUtil.Request({
1695
1570
  method: 'GET',
@@ -1699,8 +1574,7 @@ function list(params) {
1699
1574
  }
1700
1575
  function info(_ref) {
1701
1576
  var resourceIdOrName = _ref.resourceIdOrName,
1702
- params = _objectWithoutPropertiesLoose(_ref, _excluded$3);
1703
-
1577
+ params = _objectWithoutPropertiesLoose(_ref, _excluded$3);
1704
1578
  return FUtil.Request({
1705
1579
  method: 'GET',
1706
1580
  url: "/v2/resources/" + encodeURIComponent(resourceIdOrName),
@@ -1716,8 +1590,7 @@ function batchInfo(params) {
1716
1590
  }
1717
1591
  function dependencyTree$1(_ref2) {
1718
1592
  var resourceId = _ref2.resourceId,
1719
- params = _objectWithoutPropertiesLoose(_ref2, _excluded2$3);
1720
-
1593
+ params = _objectWithoutPropertiesLoose(_ref2, _excluded2$3);
1721
1594
  return FUtil.Request({
1722
1595
  method: 'GET',
1723
1596
  url: "/v2/resources/" + resourceId + "/dependencyTree",
@@ -1726,8 +1599,7 @@ function dependencyTree$1(_ref2) {
1726
1599
  }
1727
1600
  function authTree$1(_ref3) {
1728
1601
  var resourceId = _ref3.resourceId,
1729
- params = _objectWithoutPropertiesLoose(_ref3, _excluded3$3);
1730
-
1602
+ params = _objectWithoutPropertiesLoose(_ref3, _excluded3$3);
1731
1603
  return FUtil.Request({
1732
1604
  method: 'GET',
1733
1605
  url: "/v2/resources/" + resourceId + "/authTree",
@@ -1736,8 +1608,7 @@ function authTree$1(_ref3) {
1736
1608
  }
1737
1609
  function createVersion(_ref4) {
1738
1610
  var resourceId = _ref4.resourceId,
1739
- params = _objectWithoutPropertiesLoose(_ref4, _excluded4$3);
1740
-
1611
+ params = _objectWithoutPropertiesLoose(_ref4, _excluded4$3);
1741
1612
  // return FUtil.Axios.post(`/v2/resources/${resourceId}/versions`, params);
1742
1613
  return FUtil.Request({
1743
1614
  method: 'POST',
@@ -1747,9 +1618,8 @@ function createVersion(_ref4) {
1747
1618
  }
1748
1619
  function resourceVersionInfo1(_ref5) {
1749
1620
  var resourceId = _ref5.resourceId,
1750
- version = _ref5.version,
1751
- params = _objectWithoutPropertiesLoose(_ref5, _excluded5$3);
1752
-
1621
+ version = _ref5.version,
1622
+ params = _objectWithoutPropertiesLoose(_ref5, _excluded5$3);
1753
1623
  return FUtil.Request({
1754
1624
  method: 'GET',
1755
1625
  url: "/v2/resources/" + resourceId + "/versions/" + version,
@@ -1764,8 +1634,7 @@ function resourceVersionInfo2(params) {
1764
1634
  });
1765
1635
  }
1766
1636
  function getVersionList(_ref6) {
1767
- var params = _extends({}, _ref6);
1768
-
1637
+ var params = _extends({}, (_objectDestructuringEmpty(_ref6), _ref6));
1769
1638
  return FUtil.Request({
1770
1639
  method: 'GET',
1771
1640
  url: "/v2/resources/versions/list",
@@ -1774,8 +1643,7 @@ function getVersionList(_ref6) {
1774
1643
  }
1775
1644
  function getResourceVersionBySha1(_ref7) {
1776
1645
  var fileSha1 = _ref7.fileSha1,
1777
- params = _objectWithoutPropertiesLoose(_ref7, _excluded6$2);
1778
-
1646
+ params = _objectWithoutPropertiesLoose(_ref7, _excluded6$2);
1779
1647
  return FUtil.Request({
1780
1648
  method: 'GET',
1781
1649
  url: "/v2/resources/files/" + fileSha1 + "/versions",
@@ -1784,8 +1652,7 @@ function getResourceVersionBySha1(_ref7) {
1784
1652
  }
1785
1653
  function getResourceBySha1(_ref8) {
1786
1654
  var fileSha1 = _ref8.fileSha1,
1787
- params = _objectWithoutPropertiesLoose(_ref8, _excluded7$1);
1788
-
1655
+ params = _objectWithoutPropertiesLoose(_ref8, _excluded7$2);
1789
1656
  // return FUtil.Axios.get(`/v2/resources/files/${fileSha1}`, {
1790
1657
  // params,
1791
1658
  // });
@@ -1838,14 +1705,14 @@ function resourceIsUsedByOther(params) {
1838
1705
  });
1839
1706
  }
1840
1707
  function resourcesDownload(params) {
1841
- return window.location.href = FUtil.Format.completeUrlByDomain('api') + ("/v2/resources/" + params.resourceId + "/versions/" + params.version + "/download"); // return request.get(`/v2/resources/${params.resourceId}/versions/${params.$version}/download`, {
1708
+ return window.location.href = FUtil.Format.completeUrlByDomain('api') + ("/v2/resources/" + params.resourceId + "/versions/" + params.version + "/download");
1709
+ // return request.get(`/v2/resources/${params.resourceId}/versions/${params.$version}/download`, {
1842
1710
  // responseType: 'arraybuffer',
1843
1711
  // });
1844
1712
  }
1845
1713
  function batchGetCoverageVersions(_ref10) {
1846
1714
  var resourceId = _ref10.resourceId,
1847
- params = _objectWithoutPropertiesLoose(_ref10, _excluded8$1);
1848
-
1715
+ params = _objectWithoutPropertiesLoose(_ref10, _excluded8$1);
1849
1716
  // return FUtil.Axios.get(`/v2/resources/${resourceId}/contracts/coverageVersions`, {
1850
1717
  // params,
1851
1718
  // });
@@ -1864,8 +1731,7 @@ function resolveResources(params) {
1864
1731
  }
1865
1732
  function batchSetContracts(_ref11) {
1866
1733
  var resourceId = _ref11.resourceId,
1867
- params = _objectWithoutPropertiesLoose(_ref11, _excluded9$1);
1868
-
1734
+ params = _objectWithoutPropertiesLoose(_ref11, _excluded9$1);
1869
1735
  // return FUtil.Axios.put(`/v2/resources/${resourceId}/versions/batchSetContracts`, params);
1870
1736
  return FUtil.Request({
1871
1737
  method: 'PUT',
@@ -1875,8 +1741,7 @@ function batchSetContracts(_ref11) {
1875
1741
  }
1876
1742
  function cycleDependencyCheck$1(_ref12) {
1877
1743
  var resourceId = _ref12.resourceId,
1878
- params = _objectWithoutPropertiesLoose(_ref12, _excluded10$1);
1879
-
1744
+ params = _objectWithoutPropertiesLoose(_ref12, _excluded10$1);
1880
1745
  // return FUtil.Axios.post(`/v2/resources/${resourceId}/versions/cycleDependencyCheck`, params);
1881
1746
  return FUtil.Request({
1882
1747
  method: 'POST',
@@ -1886,8 +1751,7 @@ function cycleDependencyCheck$1(_ref12) {
1886
1751
  }
1887
1752
  function relationTree$1(_ref13) {
1888
1753
  var resourceId = _ref13.resourceId,
1889
- params = _objectWithoutPropertiesLoose(_ref13, _excluded11);
1890
-
1754
+ params = _objectWithoutPropertiesLoose(_ref13, _excluded11$1);
1891
1755
  // return FUtil.Axios.get(`/v2/resources/${resourceId}/relationTree`, {
1892
1756
  // params,
1893
1757
  // });
@@ -1899,8 +1763,7 @@ function relationTree$1(_ref13) {
1899
1763
  }
1900
1764
  function relationTreeAuth(_ref14) {
1901
1765
  var resourceId = _ref14.resourceId,
1902
- params = _objectWithoutPropertiesLoose(_ref14, _excluded12);
1903
-
1766
+ params = _objectWithoutPropertiesLoose(_ref14, _excluded12);
1904
1767
  return FUtil.Request({
1905
1768
  method: 'GET',
1906
1769
  url: "/v2/auths/resources/" + resourceId + "/relationTreeAuth",
@@ -1908,8 +1771,7 @@ function relationTreeAuth(_ref14) {
1908
1771
  });
1909
1772
  }
1910
1773
  function resourcesCount(_ref15) {
1911
- var params = _extends({}, _ref15);
1912
-
1774
+ var params = _extends({}, (_objectDestructuringEmpty(_ref15), _ref15));
1913
1775
  return FUtil.Request({
1914
1776
  method: 'GET',
1915
1777
  url: "/v2/resources/count",
@@ -1917,8 +1779,7 @@ function resourcesCount(_ref15) {
1917
1779
  });
1918
1780
  }
1919
1781
  function batchAuth$1(_ref16) {
1920
- var params = _extends({}, _ref16);
1921
-
1782
+ var params = _extends({}, (_objectDestructuringEmpty(_ref16), _ref16));
1922
1783
  return FUtil.Request({
1923
1784
  method: 'GET',
1924
1785
  url: "/v2/auths/resources/batchAuth/results",
@@ -1926,8 +1787,7 @@ function batchAuth$1(_ref16) {
1926
1787
  });
1927
1788
  }
1928
1789
  function resourcesRecommend(_ref17) {
1929
- var params = _extends({}, _ref17);
1930
-
1790
+ var params = _extends({}, (_objectDestructuringEmpty(_ref17), _ref17));
1931
1791
  return FUtil.Request({
1932
1792
  method: 'GET',
1933
1793
  url: "/v2/resources/recommend",
@@ -1935,8 +1795,7 @@ function resourcesRecommend(_ref17) {
1935
1795
  });
1936
1796
  }
1937
1797
  function availableTags(_ref18) {
1938
- var params = _extends({}, _ref18);
1939
-
1798
+ var params = _extends({}, (_objectDestructuringEmpty(_ref18), _ref18));
1940
1799
  return FUtil.Request({
1941
1800
  method: 'GET',
1942
1801
  url: "/v2/resources/tags/availableTags",
@@ -1945,8 +1804,7 @@ function availableTags(_ref18) {
1945
1804
  }
1946
1805
  function resourceTypes$1(_temp) {
1947
1806
  var _ref19 = _temp === void 0 ? {} : _temp,
1948
- params = _extends({}, _ref19);
1949
-
1807
+ params = _extends({}, (_objectDestructuringEmpty(_ref19), _ref19));
1950
1808
  return FUtil.Request({
1951
1809
  method: 'GET',
1952
1810
  url: "/v2/resources/types/listSimpleByGroup",
@@ -1954,8 +1812,7 @@ function resourceTypes$1(_temp) {
1954
1812
  });
1955
1813
  }
1956
1814
  function ListSimpleByParentCode(_ref20) {
1957
- var params = _extends({}, _ref20);
1958
-
1815
+ var params = _extends({}, (_objectDestructuringEmpty(_ref20), _ref20));
1959
1816
  return FUtil.Request({
1960
1817
  method: 'GET',
1961
1818
  url: "/v2/resources/types/listSimpleByParentCode",
@@ -1963,8 +1820,7 @@ function ListSimpleByParentCode(_ref20) {
1963
1820
  });
1964
1821
  }
1965
1822
  function getResourceTypeInfoByCode(_ref21) {
1966
- var params = _extends({}, _ref21);
1967
-
1823
+ var params = _extends({}, (_objectDestructuringEmpty(_ref21), _ref21));
1968
1824
  return FUtil.Request({
1969
1825
  method: 'GET',
1970
1826
  url: "/v2/resources/types/getInfoByCode",
@@ -1972,8 +1828,7 @@ function getResourceTypeInfoByCode(_ref21) {
1972
1828
  });
1973
1829
  }
1974
1830
  function getResourceAttrListSimple(_ref22) {
1975
- var params = _extends({}, _ref22);
1976
-
1831
+ var params = _extends({}, (_objectDestructuringEmpty(_ref22), _ref22));
1977
1832
  return FUtil.Request({
1978
1833
  method: 'GET',
1979
1834
  url: "/v2/resources/attrs/listSimple",
@@ -1982,8 +1837,7 @@ function getResourceAttrListSimple(_ref22) {
1982
1837
  }
1983
1838
  function listSimple4Recently(_temp2) {
1984
1839
  var _ref23 = _temp2 === void 0 ? {} : _temp2,
1985
- params = _extends({}, _ref23);
1986
-
1840
+ params = _extends({}, (_objectDestructuringEmpty(_ref23), _ref23));
1987
1841
  return FUtil.Request({
1988
1842
  method: 'GET',
1989
1843
  url: "/v2/resources/types/listSimple4Recently",
@@ -1991,8 +1845,7 @@ function listSimple4Recently(_temp2) {
1991
1845
  });
1992
1846
  }
1993
1847
  function getAttrsInfoByKey(_ref24) {
1994
- var params = _extends({}, _ref24);
1995
-
1848
+ var params = _extends({}, (_objectDestructuringEmpty(_ref24), _ref24));
1996
1849
  return FUtil.Request({
1997
1850
  method: 'GET',
1998
1851
  url: "/v2/resources/attrs/getInfoByKey",
@@ -2009,6 +1862,201 @@ function generateResourceNames(_ref25) {
2009
1862
  }
2010
1863
  });
2011
1864
  }
1865
+ function updateCollection(_ref26) {
1866
+ var resourceId = _ref26.resourceId,
1867
+ params = _objectWithoutPropertiesLoose(_ref26, _excluded13);
1868
+ return FUtil.Request({
1869
+ method: 'PUT',
1870
+ url: "/v2/resources/catalogue/" + resourceId,
1871
+ data: params
1872
+ });
1873
+ }
1874
+ function deleteCollectionUnitResource(_ref27) {
1875
+ var resourceId = _ref27.resourceId,
1876
+ removeCollectionItemIds = _ref27.removeCollectionItemIds;
1877
+ return FUtil.Request({
1878
+ method: 'DELETE',
1879
+ url: "/v2/resources/catalogue/" + resourceId + "?removeCollectionItemIds=" + removeCollectionItemIds.join(',')
1880
+ });
1881
+ }
1882
+ function getCollectionItems(_ref28) {
1883
+ var resourceId = _ref28.resourceId,
1884
+ params = _objectWithoutPropertiesLoose(_ref28, _excluded14);
1885
+ return FUtil.Request({
1886
+ method: 'GET',
1887
+ url: "/v2/resources/catalogue/" + resourceId + "/items",
1888
+ params: params
1889
+ });
1890
+ }
1891
+ function getCollectionItems_Draft(_ref29) {
1892
+ var resourceId = _ref29.resourceId,
1893
+ params = _objectWithoutPropertiesLoose(_ref29, _excluded15);
1894
+ return FUtil.Request({
1895
+ method: 'GET',
1896
+ url: "/v2/resources/catalogues/drafts/" + resourceId + "/items",
1897
+ params: params
1898
+ });
1899
+ }
1900
+ function setCollectionItemSort(_ref30) {
1901
+ var resourceId = _ref30.resourceId,
1902
+ params = _objectWithoutPropertiesLoose(_ref30, _excluded16);
1903
+ return FUtil.Request({
1904
+ method: 'PUT',
1905
+ url: "/v2/resources/catalogue/" + resourceId + "/manualSort",
1906
+ data: params
1907
+ });
1908
+ }
1909
+ function reorderCollectionItemsSort(_ref31) {
1910
+ var resourceId = _ref31.resourceId,
1911
+ params = _objectWithoutPropertiesLoose(_ref31, _excluded17);
1912
+ return FUtil.Request({
1913
+ method: 'PUT',
1914
+ url: "/v2/resources/catalogue/" + resourceId + "/reorder",
1915
+ data: params
1916
+ });
1917
+ }
1918
+ function checkExistCollectionItems(_ref32) {
1919
+ var resourceId = _ref32.resourceId,
1920
+ params = _objectWithoutPropertiesLoose(_ref32, _excluded18);
1921
+ return FUtil.Request({
1922
+ method: 'GET',
1923
+ url: "/v2/resources/catalogue/" + resourceId + "/items/checkExists",
1924
+ params: params
1925
+ });
1926
+ }
1927
+ function getCollectionItemsAuth(_ref33) {
1928
+ var resourceId = _ref33.resourceId,
1929
+ params = _objectWithoutPropertiesLoose(_ref33, _excluded19);
1930
+ return FUtil.Request({
1931
+ method: 'GET',
1932
+ url: "/v2/auths/resources/" + resourceId + "/items/batchAuth",
1933
+ params: params
1934
+ });
1935
+ }
1936
+ function batchResourceItems(_ref34) {
1937
+ var params = _extends({}, (_objectDestructuringEmpty(_ref34), _ref34));
1938
+ return FUtil.Request({
1939
+ method: 'GET',
1940
+ url: "/v2/resources/catalogue/items/batch/list",
1941
+ params: params
1942
+ });
1943
+ }
1944
+ function batchResourceItems_Draft(_ref35) {
1945
+ var params = _extends({}, (_objectDestructuringEmpty(_ref35), _ref35));
1946
+ return FUtil.Request({
1947
+ method: 'GET',
1948
+ url: "/v2/resources/catalogues/drafts/items/batch/list",
1949
+ params: params
1950
+ });
1951
+ }
1952
+ function getCollectionUpdateLogs(_ref36) {
1953
+ var resourceId = _ref36.resourceId,
1954
+ params = _objectWithoutPropertiesLoose(_ref36, _excluded20);
1955
+ return FUtil.Request({
1956
+ method: 'GET',
1957
+ url: "/v2/resources/catalogue/" + resourceId + "/updateLogs",
1958
+ params: params
1959
+ });
1960
+ }
1961
+ function getCollectionCollectRules(_ref37) {
1962
+ var resourceId = _ref37.resourceId;
1963
+ return FUtil.Request({
1964
+ method: 'GET',
1965
+ url: "/v2/resources/catalogue/" + resourceId + "/items/collectRules"
1966
+ });
1967
+ }
1968
+ function setCollectRules(_ref38) {
1969
+ var resourceId = _ref38.resourceId,
1970
+ params = _objectWithoutPropertiesLoose(_ref38, _excluded21);
1971
+ return FUtil.Request({
1972
+ method: 'POST',
1973
+ url: "/v2/resources/catalogue/" + resourceId + "/items/collectRules",
1974
+ data: params
1975
+ });
1976
+ }
1977
+ function setItemsTitle(_ref39) {
1978
+ var resourceId = _ref39.resourceId,
1979
+ data = _ref39.data;
1980
+ return FUtil.Request({
1981
+ method: 'PUT',
1982
+ url: "/v2/resources/catalogue/" + resourceId + "/items",
1983
+ data: data
1984
+ });
1985
+ }
1986
+ function deleteCollectionItems_Draft(_ref40) {
1987
+ var resourceId = _ref40.resourceId,
1988
+ removeCollectionItemIds = _ref40.removeCollectionItemIds;
1989
+ return FUtil.Request({
1990
+ method: 'DELETE',
1991
+ url: "/v2/resources/catalogues/drafts/" + resourceId + "/items?removeCollectionItemIds=" + removeCollectionItemIds.join(',')
1992
+ });
1993
+ }
1994
+ function setCollectionItemsSortID_Draft(_ref41) {
1995
+ var resourceId = _ref41.resourceId,
1996
+ data = _ref41.data;
1997
+ return FUtil.Request({
1998
+ method: 'PUT',
1999
+ url: "/v2/resources/catalogues/drafts/" + resourceId + "/manualSort",
2000
+ data: data
2001
+ });
2002
+ }
2003
+ function reorderCollectionItems_Draft(_ref42) {
2004
+ var resourceId = _ref42.resourceId,
2005
+ params = _objectWithoutPropertiesLoose(_ref42, _excluded22);
2006
+ return FUtil.Request({
2007
+ method: 'PUT',
2008
+ url: "/v2/resources/catalogues/drafts/" + resourceId + "/reorder",
2009
+ data: params
2010
+ });
2011
+ }
2012
+ function resourceIsExistInItems_Draft(_ref43) {
2013
+ var resourceId = _ref43.resourceId,
2014
+ params = _objectWithoutPropertiesLoose(_ref43, _excluded23);
2015
+ return FUtil.Request({
2016
+ method: 'GET',
2017
+ url: "/v2/resources/catalogues/drafts/" + resourceId + "/items/checkExists",
2018
+ params: params
2019
+ });
2020
+ }
2021
+ function updateCollectionItemsInfo_Draft(_ref44) {
2022
+ var resourceId = _ref44.resourceId,
2023
+ data = _ref44.data;
2024
+ return FUtil.Request({
2025
+ method: 'PUT',
2026
+ // url: `/v2/resources/catalogue/${resourceId}/items`,
2027
+ url: "/v2/resources/catalogues/drafts/" + resourceId + "/items",
2028
+ data: data
2029
+ });
2030
+ }
2031
+ function updateCollectionItemAuthorization_Draft(_ref45) {
2032
+ var resourceId = _ref45.resourceId,
2033
+ itemId = _ref45.itemId,
2034
+ params = _objectWithoutPropertiesLoose(_ref45, _excluded24);
2035
+ return FUtil.Request({
2036
+ method: 'PUT',
2037
+ // url: `/v2/resources/catalogues/${resourceId}/items/${itemId}`,
2038
+ url: "/v2/resources/catalogues/drafts/" + resourceId + "/items/" + itemId,
2039
+ data: params
2040
+ });
2041
+ }
2042
+ function addResourceItems_Draft(_ref46) {
2043
+ var resourceId = _ref46.resourceId,
2044
+ params = _objectWithoutPropertiesLoose(_ref46, _excluded25);
2045
+ return FUtil.Request({
2046
+ method: 'POST',
2047
+ url: "/v2/resources/catalogues/drafts/" + resourceId + "/items",
2048
+ data: params
2049
+ });
2050
+ }
2051
+ function getCollectionItemsAuth_Draft(_ref47) {
2052
+ var resourceId = _ref47.resourceId,
2053
+ params = _objectWithoutPropertiesLoose(_ref47, _excluded26);
2054
+ return FUtil.Request({
2055
+ method: 'GET',
2056
+ url: "/v2/resources/catalogues/drafts/" + resourceId + "/items/batchAuth",
2057
+ params: params
2058
+ });
2059
+ }
2012
2060
 
2013
2061
  var Resource = {
2014
2062
  __proto__: null,
@@ -2049,13 +2097,34 @@ var Resource = {
2049
2097
  getResourceAttrListSimple: getResourceAttrListSimple,
2050
2098
  listSimple4Recently: listSimple4Recently,
2051
2099
  getAttrsInfoByKey: getAttrsInfoByKey,
2052
- generateResourceNames: generateResourceNames
2100
+ generateResourceNames: generateResourceNames,
2101
+ updateCollection: updateCollection,
2102
+ deleteCollectionUnitResource: deleteCollectionUnitResource,
2103
+ getCollectionItems: getCollectionItems,
2104
+ getCollectionItems_Draft: getCollectionItems_Draft,
2105
+ setCollectionItemSort: setCollectionItemSort,
2106
+ reorderCollectionItemsSort: reorderCollectionItemsSort,
2107
+ checkExistCollectionItems: checkExistCollectionItems,
2108
+ getCollectionItemsAuth: getCollectionItemsAuth,
2109
+ batchResourceItems: batchResourceItems,
2110
+ batchResourceItems_Draft: batchResourceItems_Draft,
2111
+ getCollectionUpdateLogs: getCollectionUpdateLogs,
2112
+ getCollectionCollectRules: getCollectionCollectRules,
2113
+ setCollectRules: setCollectRules,
2114
+ setItemsTitle: setItemsTitle,
2115
+ deleteCollectionItems_Draft: deleteCollectionItems_Draft,
2116
+ setCollectionItemsSortID_Draft: setCollectionItemsSortID_Draft,
2117
+ reorderCollectionItems_Draft: reorderCollectionItems_Draft,
2118
+ resourceIsExistInItems_Draft: resourceIsExistInItems_Draft,
2119
+ updateCollectionItemsInfo_Draft: updateCollectionItemsInfo_Draft,
2120
+ updateCollectionItemAuthorization_Draft: updateCollectionItemAuthorization_Draft,
2121
+ addResourceItems_Draft: addResourceItems_Draft,
2122
+ getCollectionItemsAuth_Draft: getCollectionItemsAuth_Draft
2053
2123
  };
2054
2124
 
2055
2125
  var _excluded$4 = ["loginName"];
2056
2126
  function login$1(_ref) {
2057
- var params = _extends({}, _ref);
2058
-
2127
+ var params = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
2059
2128
  // return FUtil.Axios.post(`/v2/passport/login`, params);
2060
2129
  return FUtil.Request({
2061
2130
  method: 'POST',
@@ -2067,8 +2136,7 @@ function login$1(_ref) {
2067
2136
  }
2068
2137
  function logout(_temp) {
2069
2138
  var _ref2 = _temp === void 0 ? {} : _temp,
2070
- params = _extends({}, _ref2);
2071
-
2139
+ params = _extends({}, (_objectDestructuringEmpty(_ref2), _ref2));
2072
2140
  return FUtil.Request({
2073
2141
  method: 'GET',
2074
2142
  url: '/v2/passport/logout',
@@ -2092,10 +2160,7 @@ function batchUserList(params) {
2092
2160
  });
2093
2161
  }
2094
2162
  function currentUserInfo(_temp2) {
2095
- var _ref3 = _temp2 === void 0 ? {} : _temp2;
2096
-
2097
- _objectDestructuringEmpty(_ref3);
2098
-
2163
+ _objectDestructuringEmpty(_temp2 === void 0 ? {} : _temp2);
2099
2164
  // return FUtil.Axios.get(`/v1/userinfos/current`);
2100
2165
  return FUtil.Request({
2101
2166
  method: 'GET',
@@ -2118,8 +2183,7 @@ function logon$1(params) {
2118
2183
  }
2119
2184
  function resetPassword(_ref4) {
2120
2185
  var loginName = _ref4.loginName,
2121
- params = _objectWithoutPropertiesLoose(_ref4, _excluded$4);
2122
-
2186
+ params = _objectWithoutPropertiesLoose(_ref4, _excluded$4);
2123
2187
  return FUtil.Request({
2124
2188
  method: 'PUT',
2125
2189
  url: "/v2/users/" + loginName + "/resetPassword",
@@ -2135,17 +2199,14 @@ function updatePassword(params) {
2135
2199
  }
2136
2200
  function uploadHeadImg(params, config) {
2137
2201
  var formData = new FormData();
2138
-
2139
2202
  for (var _i = 0, _Object$entries = Object.entries(params); _i < _Object$entries.length; _i++) {
2140
2203
  var _Object$entries$_i = _Object$entries[_i],
2141
- key = _Object$entries$_i[0],
2142
- value = _Object$entries$_i[1];
2143
-
2204
+ key = _Object$entries$_i[0],
2205
+ value = _Object$entries$_i[1];
2144
2206
  if (value) {
2145
2207
  formData.append(key, value);
2146
2208
  }
2147
2209
  }
2148
-
2149
2210
  return FUtil.Request(_extends({
2150
2211
  method: 'POST',
2151
2212
  url: "/v2/users/current/uploadHeadImg",
@@ -2170,7 +2231,6 @@ function areasProvinces(params) {
2170
2231
  if (params === void 0) {
2171
2232
  params = {};
2172
2233
  }
2173
-
2174
2234
  return FUtil.Request({
2175
2235
  method: 'GET',
2176
2236
  url: "/v2/areas/provinces",
@@ -2204,7 +2264,6 @@ function thirdPartyList(params) {
2204
2264
  if (params === void 0) {
2205
2265
  params = {};
2206
2266
  }
2207
-
2208
2267
  return FUtil.Request({
2209
2268
  method: 'GET',
2210
2269
  url: "/v2/thirdParty/list",
@@ -2217,15 +2276,15 @@ function thirdPartyIsBind(params) {
2217
2276
  url: "/v2/thirdParty/isBind",
2218
2277
  params: params
2219
2278
  });
2220
- } // 签到
2221
-
2279
+ }
2280
+ // 签到
2222
2281
  function signForCoins() {
2223
2282
  return FUtil.Request({
2224
2283
  method: 'GET',
2225
2284
  url: "/v2/activities/facade/sign"
2226
2285
  });
2227
- } // 查询签到信息
2228
-
2286
+ }
2287
+ // 查询签到信息
2229
2288
  function getSignInfo() {
2230
2289
  return FUtil.Request({
2231
2290
  method: 'GET',
@@ -2258,20 +2317,19 @@ var User = {
2258
2317
  };
2259
2318
 
2260
2319
  var _excluded$5 = ["nodeId"],
2261
- _excluded2$4 = ["nodeId"],
2262
- _excluded3$4 = ["nodeId"],
2263
- _excluded4$4 = ["nodeId"],
2264
- _excluded5$4 = ["nodeId"],
2265
- _excluded6$3 = ["testResourceId"],
2266
- _excluded7$2 = ["testResourceId"],
2267
- _excluded8$2 = ["nodeId"],
2268
- _excluded9$2 = ["nodeId"],
2269
- _excluded10$2 = ["nodeId"],
2270
- _excluded11$1 = ["nodeId"];
2320
+ _excluded2$4 = ["nodeId"],
2321
+ _excluded3$4 = ["nodeId"],
2322
+ _excluded4$4 = ["nodeId"],
2323
+ _excluded5$4 = ["nodeId"],
2324
+ _excluded6$3 = ["testResourceId"],
2325
+ _excluded7$3 = ["testResourceId"],
2326
+ _excluded8$2 = ["nodeId"],
2327
+ _excluded9$2 = ["nodeId"],
2328
+ _excluded10$2 = ["nodeId"],
2329
+ _excluded11$2 = ["nodeId"];
2271
2330
  function testResources(_ref) {
2272
2331
  var nodeId = _ref.nodeId,
2273
- params = _objectWithoutPropertiesLoose(_ref, _excluded$5);
2274
-
2332
+ params = _objectWithoutPropertiesLoose(_ref, _excluded$5);
2275
2333
  return FUtil.Request({
2276
2334
  method: 'GET',
2277
2335
  url: "/v2/testNodes/" + nodeId + "/testResources",
@@ -2280,8 +2338,7 @@ function testResources(_ref) {
2280
2338
  }
2281
2339
  function createRules(_ref2) {
2282
2340
  var nodeId = _ref2.nodeId,
2283
- params = _objectWithoutPropertiesLoose(_ref2, _excluded2$4);
2284
-
2341
+ params = _objectWithoutPropertiesLoose(_ref2, _excluded2$4);
2285
2342
  return FUtil.Request({
2286
2343
  method: 'POST',
2287
2344
  url: "/v2/testNodes/" + nodeId + "/rules",
@@ -2290,8 +2347,7 @@ function createRules(_ref2) {
2290
2347
  }
2291
2348
  function batchTestResources(_ref3) {
2292
2349
  var nodeId = _ref3.nodeId,
2293
- params = _objectWithoutPropertiesLoose(_ref3, _excluded3$4);
2294
-
2350
+ params = _objectWithoutPropertiesLoose(_ref3, _excluded3$4);
2295
2351
  return FUtil.Request({
2296
2352
  method: 'GET',
2297
2353
  url: "/v2/testNodes/" + nodeId + "/testResources/list",
@@ -2300,8 +2356,7 @@ function batchTestResources(_ref3) {
2300
2356
  }
2301
2357
  function dependencyTree$2(_ref4) {
2302
2358
  var nodeId = _ref4.nodeId,
2303
- params = _objectWithoutPropertiesLoose(_ref4, _excluded4$4);
2304
-
2359
+ params = _objectWithoutPropertiesLoose(_ref4, _excluded4$4);
2305
2360
  return FUtil.Request({
2306
2361
  method: 'GET',
2307
2362
  url: "/v2/testNodes/" + nodeId + "/testResources/dependencyTree/search",
@@ -2310,8 +2365,7 @@ function dependencyTree$2(_ref4) {
2310
2365
  }
2311
2366
  function putRules(_ref5) {
2312
2367
  var nodeId = _ref5.nodeId,
2313
- params = _objectWithoutPropertiesLoose(_ref5, _excluded5$4);
2314
-
2368
+ params = _objectWithoutPropertiesLoose(_ref5, _excluded5$4);
2315
2369
  return FUtil.Request({
2316
2370
  method: 'PUT',
2317
2371
  url: "/v2/testNodes/" + nodeId + "/rules",
@@ -2327,8 +2381,7 @@ function testNodeRules(_ref6) {
2327
2381
  }
2328
2382
  function updateTestResourceContracts(_ref7) {
2329
2383
  var testResourceId = _ref7.testResourceId,
2330
- params = _objectWithoutPropertiesLoose(_ref7, _excluded6$3);
2331
-
2384
+ params = _objectWithoutPropertiesLoose(_ref7, _excluded6$3);
2332
2385
  // return FUtil.Axios.put(`/v2/testNodes/testResources/${testResourceId}`, params);
2333
2386
  return FUtil.Request({
2334
2387
  method: 'PUT',
@@ -2338,8 +2391,7 @@ function updateTestResourceContracts(_ref7) {
2338
2391
  }
2339
2392
  function dependencyTreeFilter(_ref8) {
2340
2393
  var testResourceId = _ref8.testResourceId,
2341
- params = _objectWithoutPropertiesLoose(_ref8, _excluded7$2);
2342
-
2394
+ params = _objectWithoutPropertiesLoose(_ref8, _excluded7$3);
2343
2395
  // return FUtil.Axios.get(`/v2/testNodes/testResources/${testResourceId}/dependencyTree/filter`, {
2344
2396
  // params
2345
2397
  // });
@@ -2374,8 +2426,7 @@ function testResourceDetails(_ref11) {
2374
2426
  }
2375
2427
  function searchTestResourcesByDependency(_ref12) {
2376
2428
  var nodeId = _ref12.nodeId,
2377
- params = _objectWithoutPropertiesLoose(_ref12, _excluded8$2);
2378
-
2429
+ params = _objectWithoutPropertiesLoose(_ref12, _excluded8$2);
2379
2430
  // return FUtil.Axios.get(`/v2/testNodes/${nodeId}/testResources/searchByDependency`, {
2380
2431
  // params,
2381
2432
  // });
@@ -2387,8 +2438,7 @@ function searchTestResourcesByDependency(_ref12) {
2387
2438
  }
2388
2439
  function rulesRematch(_ref13) {
2389
2440
  var nodeId = _ref13.nodeId,
2390
- params = _objectWithoutPropertiesLoose(_ref13, _excluded9$2);
2391
-
2441
+ params = _objectWithoutPropertiesLoose(_ref13, _excluded9$2);
2392
2442
  return FUtil.Request({
2393
2443
  method: 'POST',
2394
2444
  url: "/v2/testNodes/" + nodeId + "/rules/rematch",
@@ -2397,8 +2447,7 @@ function rulesRematch(_ref13) {
2397
2447
  }
2398
2448
  function rulesPreExecution(_ref14) {
2399
2449
  var nodeId = _ref14.nodeId,
2400
- params = _objectWithoutPropertiesLoose(_ref14, _excluded10$2);
2401
-
2450
+ params = _objectWithoutPropertiesLoose(_ref14, _excluded10$2);
2402
2451
  return FUtil.Request({
2403
2452
  method: 'POST',
2404
2453
  url: "/v2/testNodes/" + nodeId + "/rules/preExecution",
@@ -2407,8 +2456,7 @@ function rulesPreExecution(_ref14) {
2407
2456
  }
2408
2457
  function batchGetAuths(_ref15) {
2409
2458
  var nodeId = _ref15.nodeId,
2410
- params = _objectWithoutPropertiesLoose(_ref15, _excluded11$1);
2411
-
2459
+ params = _objectWithoutPropertiesLoose(_ref15, _excluded11$2);
2412
2460
  return FUtil.Request({
2413
2461
  method: 'GET',
2414
2462
  url: "/v2/auths/exhibits/" + nodeId + "/test/batchAuth/results",
@@ -2436,10 +2484,9 @@ var InformalNode = {
2436
2484
  };
2437
2485
 
2438
2486
  var _excluded$6 = ["contractId"],
2439
- _excluded2$5 = ["contractId"];
2487
+ _excluded2$5 = ["contractId"];
2440
2488
  function createContract(_ref) {
2441
- var params = _extends({}, _ref);
2442
-
2489
+ var params = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
2443
2490
  return FUtil.Request({
2444
2491
  method: 'POST',
2445
2492
  url: "/v2/contracts",
@@ -2447,8 +2494,7 @@ function createContract(_ref) {
2447
2494
  });
2448
2495
  }
2449
2496
  function batchCreateContracts(_ref2) {
2450
- var params = _extends({}, _ref2);
2451
-
2497
+ var params = _extends({}, (_objectDestructuringEmpty(_ref2), _ref2));
2452
2498
  return FUtil.Request({
2453
2499
  method: 'POST',
2454
2500
  url: "/v2/contracts/batchSign",
@@ -2457,8 +2503,7 @@ function batchCreateContracts(_ref2) {
2457
2503
  }
2458
2504
  function contractDetails(_ref3) {
2459
2505
  var contractId = _ref3.contractId,
2460
- params = _objectWithoutPropertiesLoose(_ref3, _excluded$6);
2461
-
2506
+ params = _objectWithoutPropertiesLoose(_ref3, _excluded$6);
2462
2507
  return FUtil.Request({
2463
2508
  method: 'GET',
2464
2509
  url: "/v2/contracts/" + contractId,
@@ -2488,8 +2533,7 @@ function batchContracts(params) {
2488
2533
  }
2489
2534
  function transitionRecords(_ref4) {
2490
2535
  var contractId = _ref4.contractId,
2491
- params = _objectWithoutPropertiesLoose(_ref4, _excluded2$5);
2492
-
2536
+ params = _objectWithoutPropertiesLoose(_ref4, _excluded2$5);
2493
2537
  return FUtil.Request({
2494
2538
  method: 'GET',
2495
2539
  url: "/v2/contracts/" + contractId + "/transitionRecords",
@@ -2517,11 +2561,10 @@ var Contract = {
2517
2561
  };
2518
2562
 
2519
2563
  var _excluded$7 = ["accountId"],
2520
- _excluded2$6 = ["userId"];
2564
+ _excluded2$6 = ["userId"];
2521
2565
  function details$1(_ref) {
2522
2566
  var accountId = _ref.accountId,
2523
- params = _objectWithoutPropertiesLoose(_ref, _excluded$7);
2524
-
2567
+ params = _objectWithoutPropertiesLoose(_ref, _excluded$7);
2525
2568
  return FUtil.Request({
2526
2569
  method: 'GET',
2527
2570
  url: "/v2/transactions/details/" + accountId,
@@ -2530,8 +2573,7 @@ function details$1(_ref) {
2530
2573
  }
2531
2574
  function individualAccounts(_ref2) {
2532
2575
  var userId = _ref2.userId,
2533
- params = _objectWithoutPropertiesLoose(_ref2, _excluded2$6);
2534
-
2576
+ params = _objectWithoutPropertiesLoose(_ref2, _excluded2$6);
2535
2577
  return FUtil.Request({
2536
2578
  method: 'GET',
2537
2579
  url: "/v2/accounts/individualAccounts/" + userId,
@@ -2546,8 +2588,7 @@ function transactionDetails(_ref3) {
2546
2588
  });
2547
2589
  }
2548
2590
  function activateIndividualAccounts(_ref4) {
2549
- var params = _extends({}, _ref4);
2550
-
2591
+ var params = _extends({}, (_objectDestructuringEmpty(_ref4), _ref4));
2551
2592
  return FUtil.Request({
2552
2593
  method: 'PUT',
2553
2594
  url: "/v2/accounts/individualAccounts/activate",
@@ -2555,8 +2596,7 @@ function activateIndividualAccounts(_ref4) {
2555
2596
  });
2556
2597
  }
2557
2598
  function changePassword(_ref5) {
2558
- var params = _extends({}, _ref5);
2559
-
2599
+ var params = _extends({}, (_objectDestructuringEmpty(_ref5), _ref5));
2560
2600
  return FUtil.Request({
2561
2601
  method: 'PUT',
2562
2602
  url: "/v2/accounts/individualAccounts",
@@ -2564,8 +2604,7 @@ function changePassword(_ref5) {
2564
2604
  });
2565
2605
  }
2566
2606
  function resetPassword$1(_ref6) {
2567
- var params = _extends({}, _ref6);
2568
-
2607
+ var params = _extends({}, (_objectDestructuringEmpty(_ref6), _ref6));
2569
2608
  return FUtil.Request({
2570
2609
  method: 'PUT',
2571
2610
  url: "/v2/accounts/individualAccounts/resetPassword",
@@ -2573,8 +2612,7 @@ function resetPassword$1(_ref6) {
2573
2612
  });
2574
2613
  }
2575
2614
  function verifyTransactionPassword(_ref7) {
2576
- var params = _extends({}, _ref7);
2577
-
2615
+ var params = _extends({}, (_objectDestructuringEmpty(_ref7), _ref7));
2578
2616
  return FUtil.Request({
2579
2617
  method: 'GET',
2580
2618
  url: "/v2/accounts/individualAccounts/verifyTransactionPassword",
@@ -2617,8 +2655,7 @@ var Captcha = {
2617
2655
  var _excluded$8 = ["contractId"];
2618
2656
  function transaction(_ref) {
2619
2657
  var contractId = _ref.contractId,
2620
- params = _objectWithoutPropertiesLoose(_ref, _excluded$8);
2621
-
2658
+ params = _objectWithoutPropertiesLoose(_ref, _excluded$8);
2622
2659
  return FUtil.Request({
2623
2660
  method: 'POST',
2624
2661
  url: "/v2/contracts/" + contractId + "/events/payment",
@@ -2677,7 +2714,6 @@ function getBaseTaskInfo(params) {
2677
2714
  if (params === void 0) {
2678
2715
  params = {};
2679
2716
  }
2680
-
2681
2717
  return FUtil.Request({
2682
2718
  method: 'GET',
2683
2719
  url: "/v2/activities/facade/getBaseTaskInfo",
@@ -2688,7 +2724,6 @@ function getResourceTaskInfo(params) {
2688
2724
  if (params === void 0) {
2689
2725
  params = {};
2690
2726
  }
2691
-
2692
2727
  return FUtil.Request({
2693
2728
  method: 'GET',
2694
2729
  url: "/v2/activities/facade/getResourceTaskInfo",
@@ -2699,7 +2734,6 @@ function getNodeTaskInfo(params) {
2699
2734
  if (params === void 0) {
2700
2735
  params = {};
2701
2736
  }
2702
-
2703
2737
  return FUtil.Request({
2704
2738
  method: 'GET',
2705
2739
  url: "/v2/activities/facade/getNodeTaskInfo",
@@ -2745,7 +2779,6 @@ function getWechatOfficialAccountInfo(params) {
2745
2779
  if (params === void 0) {
2746
2780
  params = {};
2747
2781
  }
2748
-
2749
2782
  return FUtil.Request({
2750
2783
  method: 'GET',
2751
2784
  url: "/v2/extensions/wechat/getRelationship4Client",
@@ -2756,7 +2789,6 @@ function lotteryList(params) {
2756
2789
  if (params === void 0) {
2757
2790
  params = {};
2758
2791
  }
2759
-
2760
2792
  return FUtil.Request({
2761
2793
  method: 'GET',
2762
2794
  url: "/v2/activities/lottery/resource/list",
@@ -2788,7 +2820,6 @@ function listRewardRecordInfos(params) {
2788
2820
  if (params === void 0) {
2789
2821
  params = {};
2790
2822
  }
2791
-
2792
2823
  return FUtil.Request({
2793
2824
  method: 'POST',
2794
2825
  url: "/v2/activities/facade/listRewardRecordInfos",
@@ -2854,15 +2885,13 @@ function codeDetails1(_ref) {
2854
2885
  }
2855
2886
  function codeDetails2(_ref2) {
2856
2887
  _objectDestructuringEmpty(_ref2);
2857
-
2858
2888
  return FUtil.Request({
2859
2889
  method: 'GET',
2860
2890
  url: "/v2/testQualifications/beta/codes/userActivateCode"
2861
2891
  });
2862
2892
  }
2863
2893
  function betaCodesActivate(_ref3) {
2864
- var params = _extends({}, _ref3);
2865
-
2894
+ var params = _extends({}, (_objectDestructuringEmpty(_ref3), _ref3));
2866
2895
  return FUtil.Request({
2867
2896
  method: 'POST',
2868
2897
  url: "/v2/testQualifications/beta/codes/activate",
@@ -2870,8 +2899,7 @@ function betaCodesActivate(_ref3) {
2870
2899
  });
2871
2900
  }
2872
2901
  function usedRecords(_ref4) {
2873
- var params = _extends({}, _ref4);
2874
-
2902
+ var params = _extends({}, (_objectDestructuringEmpty(_ref4), _ref4));
2875
2903
  return FUtil.Request({
2876
2904
  method: 'GET',
2877
2905
  url: "/v2/testQualifications/beta/codes/usedRecords",
@@ -2879,8 +2907,7 @@ function usedRecords(_ref4) {
2879
2907
  });
2880
2908
  }
2881
2909
  function betaApply(_ref5) {
2882
- var params = _extends({}, _ref5);
2883
-
2910
+ var params = _extends({}, (_objectDestructuringEmpty(_ref5), _ref5));
2884
2911
  return FUtil.Request({
2885
2912
  method: 'POST',
2886
2913
  url: "/v2/testQualifications/beta/apply",
@@ -2889,8 +2916,7 @@ function betaApply(_ref5) {
2889
2916
  }
2890
2917
  function getBetaApply1(_temp) {
2891
2918
  var _ref6 = _temp === void 0 ? {} : _temp,
2892
- params = _extends({}, _ref6);
2893
-
2919
+ params = _extends({}, (_objectDestructuringEmpty(_ref6), _ref6));
2894
2920
  return FUtil.Request({
2895
2921
  method: 'GET',
2896
2922
  url: "/v2/testQualifications/beta/apply/current",
@@ -2899,8 +2925,7 @@ function getBetaApply1(_temp) {
2899
2925
  }
2900
2926
  function getBetaApply2(_ref7) {
2901
2927
  var recordId = _ref7.recordId,
2902
- params = _objectWithoutPropertiesLoose(_ref7, _excluded$9);
2903
-
2928
+ params = _objectWithoutPropertiesLoose(_ref7, _excluded$9);
2904
2929
  return FUtil.Request({
2905
2930
  method: 'GET',
2906
2931
  url: "/v2/testQualifications/beta/apply/" + recordId,
@@ -2908,8 +2933,7 @@ function getBetaApply2(_ref7) {
2908
2933
  });
2909
2934
  }
2910
2935
  function invitees(_ref8) {
2911
- var params = _extends({}, _ref8);
2912
-
2936
+ var params = _extends({}, (_objectDestructuringEmpty(_ref8), _ref8));
2913
2937
  return FUtil.Request({
2914
2938
  method: 'GET',
2915
2939
  url: "/v2/testQualifications/beta/codes/invitees",
@@ -2949,7 +2973,8 @@ function configsList(params) {
2949
2973
  url: "/v2/i18n/configs/list",
2950
2974
  data: params
2951
2975
  });
2952
- } // oss保存的翻译
2976
+ }
2977
+ // oss保存的翻译
2953
2978
  // interface ConfigsListParamsType {
2954
2979
  // key: string;
2955
2980
  // content: string;
@@ -2990,7 +3015,6 @@ function policyTemplates(params) {
2990
3015
  if (params === void 0) {
2991
3016
  params = {};
2992
3017
  }
2993
-
2994
3018
  return FUtil.Request({
2995
3019
  method: 'GET',
2996
3020
  url: "/v2/translate/translate-config/list4Client",
@@ -3025,7 +3049,6 @@ var Policy = {
3025
3049
  };
3026
3050
 
3027
3051
  // import * as CryptoJS from 'crypto-js';
3028
-
3029
3052
  /**
3030
3053
  * 根据 File 获取 SHA1 Hash 字符串
3031
3054
  * @param file
@@ -3035,46 +3058,38 @@ function getSHA1Hash(file) {
3035
3058
  return new Promise(function (resolve) {
3036
3059
  var reader = new FileReader();
3037
3060
  reader.readAsArrayBuffer(file);
3038
- reader.onload = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
3061
+ reader.onload = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
3039
3062
  var sha1;
3040
3063
  return _regeneratorRuntime().wrap(function _callee$(_context) {
3041
- while (1) {
3042
- switch (_context.prev = _context.next) {
3043
- case 0:
3044
- if (reader.result) {
3045
- _context.next = 3;
3046
- break;
3047
- }
3048
-
3049
- resolve('');
3050
- return _context.abrupt("return", '');
3051
-
3052
- case 3:
3053
- if (!(typeof reader.result === 'string')) {
3054
- _context.next = 6;
3055
- break;
3056
- }
3057
-
3058
- resolve('');
3059
- return _context.abrupt("return", '');
3060
-
3061
- case 6:
3062
- _context.next = 8;
3063
- return self.crypto.subtle.digest('SHA-1', reader.result).then(function (a) {
3064
- return Array.from(new Uint8Array(a)).map(function (a) {
3065
- return a.toString(16).padStart(2, '0');
3066
- }).join('');
3067
- });
3068
-
3069
- case 8:
3070
- sha1 = _context.sent;
3071
- resolve(sha1);
3072
- return _context.abrupt("return", '');
3073
-
3074
- case 11:
3075
- case "end":
3076
- return _context.stop();
3077
- }
3064
+ while (1) switch (_context.prev = _context.next) {
3065
+ case 0:
3066
+ if (reader.result) {
3067
+ _context.next = 3;
3068
+ break;
3069
+ }
3070
+ resolve('');
3071
+ return _context.abrupt("return", '');
3072
+ case 3:
3073
+ if (!(typeof reader.result === 'string')) {
3074
+ _context.next = 6;
3075
+ break;
3076
+ }
3077
+ resolve('');
3078
+ return _context.abrupt("return", '');
3079
+ case 6:
3080
+ _context.next = 8;
3081
+ return self.crypto.subtle.digest('SHA-1', reader.result).then(function (a) {
3082
+ return Array.from(new Uint8Array(a)).map(function (a) {
3083
+ return a.toString(16).padStart(2, '0');
3084
+ }).join('');
3085
+ });
3086
+ case 8:
3087
+ sha1 = _context.sent;
3088
+ resolve(sha1);
3089
+ return _context.abrupt("return", '');
3090
+ case 11:
3091
+ case "end":
3092
+ return _context.stop();
3078
3093
  }
3079
3094
  }, _callee);
3080
3095
  }));
@@ -3083,70 +3098,56 @@ function getSHA1Hash(file) {
3083
3098
  /**
3084
3099
  * 生成随机码
3085
3100
  */
3086
-
3087
3101
  function generateRandomCode(strLen) {
3088
3102
  if (strLen === void 0) {
3089
3103
  strLen = 5;
3090
3104
  }
3091
-
3092
3105
  var allStr = 'ABCDEFGHIJKLMNPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890';
3093
3106
  var newStrArr = [];
3094
-
3095
3107
  for (var i = 0; i < strLen; i++) {
3096
3108
  newStrArr.push(allStr[Math.floor(Math.random() * 61)]);
3097
3109
  }
3098
-
3099
3110
  return newStrArr.join('');
3100
3111
  }
3101
3112
  /**
3102
3113
  * 通过读取 cookies 获取用户 ID
3103
3114
  */
3104
-
3105
3115
  function getUserIDByCookies() {
3106
3116
  var uid = document.cookie.split('; ').find(function (co) {
3107
3117
  return co.startsWith('uid=');
3108
3118
  });
3109
-
3110
3119
  if (!uid) {
3111
3120
  return -1;
3112
3121
  }
3113
-
3114
3122
  return Number(uid.replace('uid=', ''));
3115
3123
  }
3116
3124
  function transformServerAPIContractState(_ref2) {
3117
3125
  var status = _ref2.status,
3118
- authStatus = _ref2.authStatus;
3119
-
3126
+ authStatus = _ref2.authStatus;
3120
3127
  if (status === 0) {
3121
3128
  if (authStatus === 1 || authStatus === 3) {
3122
3129
  return 'active';
3123
3130
  }
3124
-
3125
3131
  if (authStatus === 2) {
3126
3132
  return 'testActive';
3127
3133
  }
3128
-
3129
3134
  if (authStatus === 128) {
3130
3135
  return 'inactive';
3131
3136
  }
3132
3137
  }
3133
-
3134
3138
  if (status === 1) {
3135
3139
  return 'terminal';
3136
3140
  }
3137
-
3138
3141
  return 'exception';
3139
3142
  }
3140
3143
  /**
3141
3144
  * 暂时休眠
3142
3145
  * @param ms 休眠时常(毫秒)
3143
3146
  */
3144
-
3145
3147
  function promiseSleep(ms) {
3146
3148
  if (ms === void 0) {
3147
3149
  ms = 300;
3148
3150
  }
3149
-
3150
3151
  return new Promise(function (resolve) {
3151
3152
  setTimeout(function () {
3152
3153
  resolve();
@@ -3157,12 +3158,10 @@ function promiseSleep(ms) {
3157
3158
  * 获取用户头像URL
3158
3159
  * @param userID
3159
3160
  */
3160
-
3161
3161
  function getAvatarUrl(userID) {
3162
3162
  if (userID === void 0) {
3163
3163
  userID = 0;
3164
3164
  }
3165
-
3166
3165
  // return `${completeUrlByDomain('image')}/avatar/${userID || getUserIDByCookies()}?t=${Date.now()}`;
3167
3166
  return "https://image.freelog.com/avatar/" + (userID || getUserIDByCookies()) + "?t=" + Date.now();
3168
3167
  }
@@ -3180,123 +3179,101 @@ var Tool = {
3180
3179
  function getFilesSha1Info(_x, _x2) {
3181
3180
  return _getFilesSha1Info.apply(this, arguments);
3182
3181
  }
3183
-
3184
3182
  function _getFilesSha1Info() {
3185
- _getFilesSha1Info = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref, cdPartially) {
3183
+ _getFilesSha1Info = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref, cdPartially) {
3186
3184
  var sha1, resourceTypeCode, delay, needHandleSha1, allData, _yield$Storage$filesL, ret, errCode, data, msg, finishedInfo;
3187
-
3188
3185
  return _regeneratorRuntime().wrap(function _callee$(_context) {
3189
- while (1) {
3190
- switch (_context.prev = _context.next) {
3191
- case 0:
3192
- sha1 = _ref.sha1, resourceTypeCode = _ref.resourceTypeCode;
3193
-
3194
- if (cdPartially === void 0) {
3195
- cdPartially = function cdPartially() {
3196
- return undefined;
3197
- };
3198
- }
3199
-
3200
- if (!(sha1.length === 0)) {
3201
- _context.next = 4;
3202
- break;
3203
- }
3204
-
3205
- return _context.abrupt("return", {
3206
- error: '',
3207
- result: []
3208
- });
3209
-
3210
- case 4:
3211
- delay = 500;
3212
- needHandleSha1 = [].concat(sha1);
3213
- allData = [];
3214
-
3215
- case 7:
3216
-
3217
- _context.next = 10;
3218
- return filesListInfo({
3219
- sha1: needHandleSha1.join(','),
3220
- resourceTypeCode: resourceTypeCode
3221
- });
3222
-
3223
- case 10:
3224
- _yield$Storage$filesL = _context.sent;
3225
- ret = _yield$Storage$filesL.ret;
3226
- errCode = _yield$Storage$filesL.errCode;
3227
- data = _yield$Storage$filesL.data;
3228
- msg = _yield$Storage$filesL.msg;
3229
-
3230
- if (!(ret !== 0 || errCode !== 0)) {
3231
- _context.next = 18;
3232
- break;
3233
- }
3234
-
3235
- console.log({
3236
- ret: ret,
3237
- errCode: errCode,
3238
- data: data,
3239
- msg: msg
3240
- }, '09iowksdjaklfjs;oalijflskdjflsdkjflkj');
3241
- return _context.abrupt("return", {
3242
- error: msg,
3243
- result: allData
3244
- });
3245
-
3246
- case 18:
3247
- needHandleSha1 = data.filter(function (d) {
3248
- return d.metaAnalyzeStatus === 0 || d.metaAnalyzeStatus === 1;
3249
- }).map(function (d) {
3250
- return d.sha1;
3251
- });
3252
- finishedInfo = data.filter(function (d) {
3253
- return d.metaAnalyzeStatus !== 0 && d.metaAnalyzeStatus !== 1;
3254
- }).map(function (d) {
3255
- var state = 'fail';
3256
-
3257
- if (!d.metaAnalyzeStatus) {
3258
- state = 'nonentity';
3259
- } else if (d.metaAnalyzeStatus === 2) {
3260
- state = 'success';
3261
- } else if (d.metaAnalyzeStatus === 3) {
3262
- state = 'fail';
3263
- } // console.log(d, '90wieojiksdjf;lkasdjf;lksdjflksjdflkjsdlfkjsdlkj');
3264
-
3265
-
3266
- return {
3267
- sha1: d.sha1,
3268
- state: state,
3269
- info: d
3270
- };
3271
- });
3272
- cdPartially && cdPartially(finishedInfo);
3273
- allData = [].concat(allData, finishedInfo);
3274
-
3275
- if (!(needHandleSha1.length === 0)) {
3276
- _context.next = 24;
3277
- break;
3186
+ while (1) switch (_context.prev = _context.next) {
3187
+ case 0:
3188
+ sha1 = _ref.sha1, resourceTypeCode = _ref.resourceTypeCode;
3189
+ if (cdPartially === void 0) {
3190
+ cdPartially = function cdPartially() {
3191
+ return undefined;
3192
+ };
3193
+ }
3194
+ if (!(sha1.length === 0)) {
3195
+ _context.next = 4;
3196
+ break;
3197
+ }
3198
+ return _context.abrupt("return", {
3199
+ error: '',
3200
+ result: []
3201
+ });
3202
+ case 4:
3203
+ delay = 500;
3204
+ needHandleSha1 = [].concat(sha1);
3205
+ allData = [];
3206
+ case 7:
3207
+ _context.next = 10;
3208
+ return filesListInfo({
3209
+ sha1: needHandleSha1.join(','),
3210
+ resourceTypeCode: resourceTypeCode
3211
+ });
3212
+ case 10:
3213
+ _yield$Storage$filesL = _context.sent;
3214
+ ret = _yield$Storage$filesL.ret;
3215
+ errCode = _yield$Storage$filesL.errCode;
3216
+ data = _yield$Storage$filesL.data;
3217
+ msg = _yield$Storage$filesL.msg;
3218
+ if (!(ret !== 0 || errCode !== 0)) {
3219
+ _context.next = 18;
3220
+ break;
3221
+ }
3222
+ console.log({
3223
+ ret: ret,
3224
+ errCode: errCode,
3225
+ data: data,
3226
+ msg: msg
3227
+ }, '09iowksdjaklfjs;oalijflskdjflsdkjflkj');
3228
+ return _context.abrupt("return", {
3229
+ error: msg,
3230
+ result: allData
3231
+ });
3232
+ case 18:
3233
+ needHandleSha1 = data.filter(function (d) {
3234
+ return d.metaAnalyzeStatus === 0 || d.metaAnalyzeStatus === 1;
3235
+ }).map(function (d) {
3236
+ return d.sha1;
3237
+ });
3238
+ finishedInfo = data.filter(function (d) {
3239
+ return d.metaAnalyzeStatus !== 0 && d.metaAnalyzeStatus !== 1;
3240
+ }).map(function (d) {
3241
+ var state = 'fail';
3242
+ if (!d.metaAnalyzeStatus) {
3243
+ state = 'nonentity';
3244
+ } else if (d.metaAnalyzeStatus === 2) {
3245
+ state = 'success';
3246
+ } else if (d.metaAnalyzeStatus === 3) {
3247
+ state = 'fail';
3278
3248
  }
3279
-
3280
- return _context.abrupt("break", 28);
3281
-
3282
- case 24:
3283
- _context.next = 26;
3284
- return promiseSleep(delay);
3285
-
3286
- case 26:
3287
- _context.next = 7;
3249
+ // console.log(d, '90wieojiksdjf;lkasdjf;lksdjflksjdflkjsdlfkjsdlkj');
3250
+ return {
3251
+ sha1: d.sha1,
3252
+ state: state,
3253
+ info: d
3254
+ };
3255
+ });
3256
+ cdPartially && cdPartially(finishedInfo);
3257
+ allData = [].concat(allData, finishedInfo);
3258
+ if (!(needHandleSha1.length === 0)) {
3259
+ _context.next = 24;
3288
3260
  break;
3289
-
3290
- case 28:
3291
- return _context.abrupt("return", {
3292
- error: '',
3293
- result: allData
3294
- });
3295
-
3296
- case 29:
3297
- case "end":
3298
- return _context.stop();
3299
- }
3261
+ }
3262
+ return _context.abrupt("break", 28);
3263
+ case 24:
3264
+ _context.next = 26;
3265
+ return promiseSleep(delay);
3266
+ case 26:
3267
+ _context.next = 7;
3268
+ break;
3269
+ case 28:
3270
+ return _context.abrupt("return", {
3271
+ error: '',
3272
+ result: allData
3273
+ });
3274
+ case 29:
3275
+ case "end":
3276
+ return _context.stop();
3300
3277
  }
3301
3278
  }, _callee);
3302
3279
  }));
@@ -3310,8 +3287,7 @@ var recombination = {
3310
3287
 
3311
3288
  function operationCategories(_temp) {
3312
3289
  var _ref = _temp === void 0 ? {} : _temp,
3313
- params = _extends({}, _ref);
3314
-
3290
+ params = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
3315
3291
  return FUtil.Request({
3316
3292
  method: 'GET',
3317
3293
  url: "/v2/resources/operation-categories/listSimpleByGroup",
@@ -3319,8 +3295,7 @@ function operationCategories(_temp) {
3319
3295
  });
3320
3296
  }
3321
3297
  function recordRank(_ref2) {
3322
- var params = _extends({}, _ref2);
3323
-
3298
+ var params = _extends({}, (_objectDestructuringEmpty(_ref2), _ref2));
3324
3299
  return FUtil.Request({
3325
3300
  method: 'POST',
3326
3301
  url: "/v2/activities/coin/record/rank",
@@ -3328,8 +3303,7 @@ function recordRank(_ref2) {
3328
3303
  });
3329
3304
  }
3330
3305
  function rankInfo(_ref3) {
3331
- var params = _extends({}, _ref3);
3332
-
3306
+ var params = _extends({}, (_objectDestructuringEmpty(_ref3), _ref3));
3333
3307
  return FUtil.Request({
3334
3308
  method: 'POST',
3335
3309
  url: "/v2/activities/coin/record/rankInfo",
@@ -3344,6 +3318,29 @@ var Operation = {
3344
3318
  rankInfo: rankInfo
3345
3319
  };
3346
3320
 
3321
+ function getInfoByCode(_ref) {
3322
+ var params = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
3323
+ return FUtil.Request({
3324
+ method: 'GET',
3325
+ url: "/v2/resources/types/getInfoByCode",
3326
+ params: params
3327
+ });
3328
+ }
3329
+ function getInfoByCodeOrName(_ref2) {
3330
+ var params = _extends({}, (_objectDestructuringEmpty(_ref2), _ref2));
3331
+ return FUtil.Request({
3332
+ method: 'GET',
3333
+ url: "/v2/resources/types/getInfoByCodeOrName",
3334
+ params: params
3335
+ });
3336
+ }
3337
+
3338
+ var ResourceType = {
3339
+ __proto__: null,
3340
+ getInfoByCode: getInfoByCode,
3341
+ getInfoByCodeOrName: getInfoByCodeOrName
3342
+ };
3343
+
3347
3344
  var FServiceAPI = {
3348
3345
  Node: Node,
3349
3346
  Exhibit: Exhibit,
@@ -3362,9 +3359,11 @@ var FServiceAPI = {
3362
3359
  I18n: I18n,
3363
3360
  Policy: Policy,
3364
3361
  recombination: recombination,
3365
- Operation: Operation
3362
+ Operation: Operation,
3363
+ ResourceType: ResourceType
3366
3364
  };
3367
3365
 
3366
+ // import from '../service-API';
3368
3367
  var codeMessage = {
3369
3368
  200: '服务器成功返回请求的数据。',
3370
3369
  201: '新建或修改数据成功。',
@@ -3381,8 +3380,8 @@ var codeMessage = {
3381
3380
  502: '网关错误。',
3382
3381
  503: '服务不可用,服务器暂时过载或维护。',
3383
3382
  504: '网关超时。'
3384
- }; // export let apiHost: string = '';
3385
-
3383
+ };
3384
+ // export let apiHost: string = '';
3386
3385
  if (window.location.hostname.includes('.com')) {
3387
3386
  // apiHost = `${window.location.protocol}//qi.${(window.location.host.match(/(?<=\.).*/) || [''])[0]}`;
3388
3387
  // apiHost = window.location.origin.replace('console', 'qi');
@@ -3412,8 +3411,6 @@ if (window.location.hostname.includes('.com')) {
3412
3411
  // };
3413
3412
  //
3414
3413
  // // Add a request interceptor
3415
-
3416
-
3417
3414
  axios.interceptors.request.use(function (config) {
3418
3415
  // Do something before request is sent
3419
3416
  // NProgress.start();
@@ -3426,10 +3423,8 @@ axios.interceptors.request.use(function (config) {
3426
3423
  /**
3427
3424
  * 配置request请求时的默认参数
3428
3425
  */
3429
-
3430
3426
  axios.interceptors.response.use(function (response) {
3431
3427
  var _headers$contentDisp;
3432
-
3433
3428
  // Do something with response data
3434
3429
  // console.log(response, 'response!!!!!!');
3435
3430
  // NProgress.done();
@@ -3437,18 +3432,17 @@ axios.interceptors.response.use(function (response) {
3437
3432
  var error = {
3438
3433
  description: codeMessage[response.status],
3439
3434
  message: response.status
3440
- }; // notification.error(error);
3441
-
3435
+ };
3436
+ // notification.error(error);
3442
3437
  throw new Error(JSON.stringify(error));
3443
3438
  }
3444
-
3445
3439
  var data = response.data,
3446
- headers = response.headers;
3447
-
3440
+ headers = response.headers;
3448
3441
  if ((_headers$contentDisp = headers['content-disposition']) != null && _headers$contentDisp.includes('attachment;')) {
3449
3442
  // downloadFile(response);
3450
3443
  return;
3451
- } // console.log(data, 'data2390jasdflkf');
3444
+ }
3445
+ // console.log(data, 'data2390jasdflkf');
3452
3446
  // if ((data.errcode === undefined
3453
3447
  // ? (data.errCode !== 0 && data.errCode !== 2)
3454
3448
  // : (data.errcode !== 0 && data.errcode !== 2))
@@ -3459,8 +3453,6 @@ axios.interceptors.response.use(function (response) {
3459
3453
  // // });
3460
3454
  // throw new Error(JSON.stringify(data));
3461
3455
  // }
3462
-
3463
-
3464
3456
  return data;
3465
3457
  }, function (error) {
3466
3458
  // Do something with response error
@@ -3470,51 +3462,40 @@ axios.interceptors.response.use(function (response) {
3470
3462
  function request(_x, _x2) {
3471
3463
  return _request.apply(this, arguments);
3472
3464
  }
3473
-
3474
3465
  function _request() {
3475
- _request = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(config, _temp) {
3466
+ _request = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(config, _temp) {
3476
3467
  var _ref, _ref$noRedirect, noRedirect, _ref$noErrorAlert, noErrorAlert, result;
3477
-
3478
3468
  return _regeneratorRuntime().wrap(function _callee$(_context) {
3479
- while (1) {
3480
- switch (_context.prev = _context.next) {
3481
- case 0:
3482
- _ref = _temp === void 0 ? {} : _temp, _ref$noRedirect = _ref.noRedirect, noRedirect = _ref$noRedirect === void 0 ? false : _ref$noRedirect, _ref$noErrorAlert = _ref.noErrorAlert, noErrorAlert = _ref$noErrorAlert === void 0 ? false : _ref$noErrorAlert;
3483
- _context.next = 3;
3484
- return axios.request(config);
3485
-
3486
- case 3:
3487
- result = _context.sent;
3488
-
3489
- if (!(result.errCode === 30 && !noRedirect)) {
3490
- _context.next = 10;
3491
- break;
3492
- }
3493
-
3494
- _context.next = 7;
3495
- return FServiceAPI.User.logout();
3496
-
3497
- case 7:
3498
- window.location.replace("" + completeUrlByDomain('user') + login({
3469
+ while (1) switch (_context.prev = _context.next) {
3470
+ case 0:
3471
+ _ref = _temp === void 0 ? {} : _temp, _ref$noRedirect = _ref.noRedirect, noRedirect = _ref$noRedirect === void 0 ? false : _ref$noRedirect, _ref$noErrorAlert = _ref.noErrorAlert, noErrorAlert = _ref$noErrorAlert === void 0 ? false : _ref$noErrorAlert;
3472
+ _context.next = 3;
3473
+ return axios.request(config);
3474
+ case 3:
3475
+ result = _context.sent;
3476
+ if (!(result.errCode === 30 && !noRedirect)) {
3477
+ _context.next = 10;
3478
+ break;
3479
+ }
3480
+ _context.next = 7;
3481
+ return FServiceAPI.User.logout();
3482
+ case 7:
3483
+ window.location.replace("" + completeUrlByDomain('user') + login({
3484
+ goTo: window.location.href
3485
+ }));
3486
+ _context.next = 11;
3487
+ break;
3488
+ case 10:
3489
+ if (result.ret === 4 && result.errCode === 10 && !noRedirect) {
3490
+ window.location.replace("" + completeUrlByDomain('user') + userFreeze({
3499
3491
  goTo: window.location.href
3500
3492
  }));
3501
- _context.next = 11;
3502
- break;
3503
-
3504
- case 10:
3505
- if (result.ret === 4 && result.errCode === 10 && !noRedirect) {
3506
- window.location.replace("" + completeUrlByDomain('user') + userFreeze({
3507
- goTo: window.location.href
3508
- }));
3509
- }
3510
-
3511
- case 11:
3512
- return _context.abrupt("return", result);
3513
-
3514
- case 12:
3515
- case "end":
3516
- return _context.stop();
3517
- }
3493
+ }
3494
+ case 11:
3495
+ return _context.abrupt("return", result);
3496
+ case 12:
3497
+ case "end":
3498
+ return _context.stop();
3518
3499
  }
3519
3500
  }, _callee);
3520
3501
  }));
@@ -3523,20 +3504,16 @@ function _request() {
3523
3504
 
3524
3505
  function useGetState(initVal) {
3525
3506
  var _React$useState = useState(initVal),
3526
- state = _React$useState[0],
3527
- setState = _React$useState[1];
3528
-
3507
+ state = _React$useState[0],
3508
+ setState = _React$useState[1];
3529
3509
  var ref = useRef(initVal);
3530
-
3531
3510
  function setStateCopy(newVal) {
3532
3511
  ref.current = newVal;
3533
3512
  setState(newVal);
3534
3513
  }
3535
-
3536
3514
  function getState() {
3537
3515
  return ref.current;
3538
3516
  }
3539
-
3540
3517
  return [state, setStateCopy, getState];
3541
3518
  }
3542
3519
 
@@ -3545,6 +3522,7 @@ var Hook = {
3545
3522
  useGetState: useGetState
3546
3523
  };
3547
3524
 
3525
+ // import I18n from '../i18n';
3548
3526
  var FUtil = {
3549
3527
  Format: Format,
3550
3528
  Regexp: Regexp,
@@ -3567,12 +3545,11 @@ var allLanguage = [{
3567
3545
  value: 'zh_CN',
3568
3546
  label: '简体中文'
3569
3547
  }];
3570
-
3571
3548
  var I18nNext = /*#__PURE__*/function () {
3572
3549
  function I18nNext() {
3573
3550
  this._loadingData = 'NotStart';
3574
- this._taskQueue = []; // private _currentLanguage: LanguageKeyType = window.localStorage.getItem(localStorage_i18nextLng_key) as null || 'zh_CN';
3575
-
3551
+ this._taskQueue = [];
3552
+ // private _currentLanguage: LanguageKeyType = window.localStorage.getItem(localStorage_i18nextLng_key) as null || 'zh_CN';
3576
3553
  this._currentLanguage = Cookies.get(localStorage_i18nextLng_key) || 'zh_CN';
3577
3554
  this.ready();
3578
3555
  this.ready = this.ready.bind(this);
@@ -3581,100 +3558,77 @@ var I18nNext = /*#__PURE__*/function () {
3581
3558
  this.getAllLanguage = this.getAllLanguage.bind(this);
3582
3559
  this.getCurrentLanguage = this.getCurrentLanguage.bind(this);
3583
3560
  }
3584
-
3585
3561
  var _proto = I18nNext.prototype;
3586
-
3587
3562
  _proto.ready = /*#__PURE__*/function () {
3588
- var _ready = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
3563
+ var _ready = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
3589
3564
  var _this = this;
3590
-
3591
3565
  var exc, handleTasks, promise;
3592
3566
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
3593
- while (1) {
3594
- switch (_context2.prev = _context2.next) {
3595
- case 0:
3596
- exc = function exc() {
3597
- while (_this._taskQueue.length > 0) {
3598
- var task = _this._taskQueue.shift();
3599
-
3600
- task && task();
3601
- }
3602
- };
3603
-
3604
- handleTasks = /*#__PURE__*/function () {
3605
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
3606
- return _regeneratorRuntime().wrap(function _callee$(_context) {
3607
- while (1) {
3608
- switch (_context.prev = _context.next) {
3609
- case 0:
3610
- if (!(_this._loadingData === 'End')) {
3611
- _context.next = 3;
3612
- break;
3613
- }
3614
-
3615
- exc();
3616
- return _context.abrupt("return");
3617
-
3618
- case 3:
3619
- if (!(_this._loadingData === 'Start')) {
3620
- _context.next = 5;
3621
- break;
3622
- }
3623
-
3624
- return _context.abrupt("return");
3625
-
3626
- case 5:
3627
- // NO_START
3628
- _this._loadingData = 'Start';
3629
- _context.next = 8;
3630
- return _this._handleData();
3631
-
3632
- case 8:
3633
- // console.log('######');
3634
- exc();
3635
-
3636
- case 9:
3637
- case "end":
3638
- return _context.stop();
3567
+ while (1) switch (_context2.prev = _context2.next) {
3568
+ case 0:
3569
+ exc = function exc() {
3570
+ while (_this._taskQueue.length > 0) {
3571
+ var task = _this._taskQueue.shift();
3572
+ task && task();
3573
+ }
3574
+ };
3575
+ handleTasks = /*#__PURE__*/function () {
3576
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
3577
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
3578
+ while (1) switch (_context.prev = _context.next) {
3579
+ case 0:
3580
+ if (!(_this._loadingData === 'End')) {
3581
+ _context.next = 3;
3582
+ break;
3639
3583
  }
3640
- }
3641
- }, _callee);
3642
- }));
3643
-
3644
- return function handleTasks() {
3645
- return _ref.apply(this, arguments);
3646
- };
3647
- }();
3648
-
3649
- promise = new Promise(function (resolve) {
3650
- _this._taskQueue.push(resolve);
3651
- });
3652
- handleTasks();
3653
- return _context2.abrupt("return", promise);
3654
-
3655
- case 5:
3656
- case "end":
3657
- return _context2.stop();
3658
- }
3584
+ exc();
3585
+ return _context.abrupt("return");
3586
+ case 3:
3587
+ if (!(_this._loadingData === 'Start')) {
3588
+ _context.next = 5;
3589
+ break;
3590
+ }
3591
+ return _context.abrupt("return");
3592
+ case 5:
3593
+ // NO_START
3594
+ _this._loadingData = 'Start';
3595
+ _context.next = 8;
3596
+ return _this._handleData();
3597
+ case 8:
3598
+ // console.log('######');
3599
+ exc();
3600
+ case 9:
3601
+ case "end":
3602
+ return _context.stop();
3603
+ }
3604
+ }, _callee);
3605
+ }));
3606
+ return function handleTasks() {
3607
+ return _ref.apply(this, arguments);
3608
+ };
3609
+ }();
3610
+ promise = new Promise(function (resolve) {
3611
+ _this._taskQueue.push(resolve);
3612
+ });
3613
+ handleTasks();
3614
+ return _context2.abrupt("return", promise);
3615
+ case 5:
3616
+ case "end":
3617
+ return _context2.stop();
3659
3618
  }
3660
3619
  }, _callee2);
3661
3620
  }));
3662
-
3663
3621
  function ready() {
3664
3622
  return _ready.apply(this, arguments);
3665
3623
  }
3666
-
3667
3624
  return ready;
3668
3625
  }();
3669
-
3670
3626
  _proto.t = function t(key, options) {
3671
3627
  return i18next.t(key.trim(), options);
3672
3628
  };
3673
-
3674
3629
  _proto.tJSXElement = function tJSXElement(key, options) {
3675
3630
  return htmlReactParser(i18next.t(key.trim(), options));
3676
3631
  };
3677
-
3678
3632
  _proto.changeLanguage = function changeLanguage(lng) {
3679
3633
  // return i18next.changeLanguage(lng);
3680
3634
  // window.localStorage.setItem(localStorage_i18nextLng_key, lng)
@@ -3683,135 +3637,108 @@ var I18nNext = /*#__PURE__*/function () {
3683
3637
  domain: FUtil.Format.completeUrlByDomain('').replace(/http(s)?:\/\//, '')
3684
3638
  });
3685
3639
  };
3686
-
3687
3640
  _proto.getAllLanguage = function getAllLanguage() {
3688
3641
  return allLanguage;
3689
3642
  };
3690
-
3691
3643
  _proto.getCurrentLanguage = function getCurrentLanguage() {
3692
3644
  return this._currentLanguage;
3693
3645
  };
3694
-
3695
3646
  _proto._handleData = /*#__PURE__*/function () {
3696
- var _handleData2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
3647
+ var _handleData2 = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
3697
3648
  var lng, resource, i18nextResources;
3698
3649
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
3699
- while (1) {
3700
- switch (_context3.prev = _context3.next) {
3701
- case 0:
3702
- lng = this._currentLanguage;
3703
- resource = window.localStorage.getItem(localStorage_i18nextResources_key); // const resource: string | undefined = Cookies.get(decodeURIComponent(localStorage_i18nextResources_key));
3704
-
3705
- i18nextResources = resource ? JSON.parse(resource) : null;
3706
-
3707
- if (i18nextResources) {
3708
- _context3.next = 9;
3709
- break;
3710
- }
3711
-
3712
- _context3.next = 6;
3713
- return this._fetchData();
3714
-
3715
- case 6:
3716
- i18nextResources = _context3.sent;
3717
- _context3.next = 10;
3650
+ while (1) switch (_context3.prev = _context3.next) {
3651
+ case 0:
3652
+ lng = this._currentLanguage;
3653
+ resource = window.localStorage.getItem(localStorage_i18nextResources_key); // const resource: string | undefined = Cookies.get(decodeURIComponent(localStorage_i18nextResources_key));
3654
+ i18nextResources = resource ? JSON.parse(resource) : null;
3655
+ if (i18nextResources) {
3656
+ _context3.next = 9;
3718
3657
  break;
3719
-
3720
- case 9:
3721
- this._fetchData();
3722
-
3723
- case 10:
3724
- _context3.next = 12;
3725
- return i18next.init({
3726
- // the translations
3727
- // (tip move them in a JSON file and import them,
3728
- // or even better, manage them via a UI: https://react.i18next.com/guides/multiple-translation-files#manage-your-translations-with-a-management-gui)
3729
- resources: i18nextResources,
3730
- lng: lng,
3731
- fallbackLng: 'zh_CN',
3732
- interpolation: {
3733
- escapeValue: false,
3734
- prefix: '{',
3735
- suffix: '}'
3736
- }
3737
- });
3738
-
3739
- case 12:
3740
- this._loadingData = 'End';
3741
-
3742
- case 13:
3743
- case "end":
3744
- return _context3.stop();
3745
- }
3658
+ }
3659
+ _context3.next = 6;
3660
+ return this._fetchData();
3661
+ case 6:
3662
+ i18nextResources = _context3.sent;
3663
+ _context3.next = 10;
3664
+ break;
3665
+ case 9:
3666
+ this._fetchData();
3667
+ case 10:
3668
+ _context3.next = 12;
3669
+ return i18next.init({
3670
+ // the translations
3671
+ // (tip move them in a JSON file and import them,
3672
+ // or even better, manage them via a UI: https://react.i18next.com/guides/multiple-translation-files#manage-your-translations-with-a-management-gui)
3673
+ resources: i18nextResources,
3674
+ lng: lng,
3675
+ fallbackLng: 'zh_CN',
3676
+ interpolation: {
3677
+ escapeValue: false,
3678
+ prefix: '{',
3679
+ suffix: '}'
3680
+ }
3681
+ });
3682
+ case 12:
3683
+ this._loadingData = 'End';
3684
+ case 13:
3685
+ case "end":
3686
+ return _context3.stop();
3746
3687
  }
3747
3688
  }, _callee3, this);
3748
3689
  }));
3749
-
3750
3690
  function _handleData() {
3751
3691
  return _handleData2.apply(this, arguments);
3752
3692
  }
3753
-
3754
3693
  return _handleData;
3755
3694
  }();
3756
-
3757
3695
  _proto._fetchData = /*#__PURE__*/function () {
3758
- var _fetchData2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
3696
+ var _fetchData2 = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
3759
3697
  var url, res, en_US, zh_CN, _i, _Object$entries, _Object$entries$_i, key, value, result;
3760
-
3761
3698
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
3762
- while (1) {
3763
- switch (_context4.prev = _context4.next) {
3764
- case 0:
3765
- url = window.location.origin.includes('.freelog.com') ? ossJsonUrl : ossJsonUrl_Test;
3766
- _context4.next = 3;
3767
- return axios.get(url + '?timestamp=' + Date.now(), {
3768
- withCredentials: false
3769
- });
3770
-
3771
- case 3:
3772
- res = _context4.sent;
3773
- // console.log(res, 'data09oiw3qjelsfkdfjlsdkfjl');
3774
- en_US = {};
3775
- zh_CN = {};
3776
-
3777
- for (_i = 0, _Object$entries = Object.entries(res); _i < _Object$entries.length; _i++) {
3778
- _Object$entries$_i = _Object$entries[_i], key = _Object$entries$_i[0], value = _Object$entries$_i[1];
3779
- // console.log(key, value, 'key, value90iowsldfjlsdkj');
3780
- en_US[key] = value['en_US'];
3781
- zh_CN[key] = value['zh_CN'];
3699
+ while (1) switch (_context4.prev = _context4.next) {
3700
+ case 0:
3701
+ url = window.location.origin.includes('.freelog.com') ? ossJsonUrl : ossJsonUrl_Test;
3702
+ _context4.next = 3;
3703
+ return axios.get(url + '?timestamp=' + Date.now(), {
3704
+ withCredentials: false
3705
+ });
3706
+ case 3:
3707
+ res = _context4.sent;
3708
+ // console.log(res, 'data09oiw3qjelsfkdfjlsdkfjl');
3709
+ en_US = {};
3710
+ zh_CN = {};
3711
+ for (_i = 0, _Object$entries = Object.entries(res); _i < _Object$entries.length; _i++) {
3712
+ _Object$entries$_i = _Object$entries[_i], key = _Object$entries$_i[0], value = _Object$entries$_i[1];
3713
+ // console.log(key, value, 'key, value90iowsldfjlsdkj');
3714
+ en_US[key] = value['en_US'];
3715
+ zh_CN[key] = value['zh_CN'];
3716
+ }
3717
+ result = {
3718
+ en_US: {
3719
+ translation: en_US
3720
+ },
3721
+ zh_CN: {
3722
+ translation: zh_CN
3782
3723
  }
3783
-
3784
- result = {
3785
- en_US: {
3786
- translation: en_US
3787
- },
3788
- zh_CN: {
3789
- translation: zh_CN
3790
- }
3791
- }; // console.log(result, 'result093sdolkfjlsdkjl');
3792
-
3793
- window.localStorage.setItem(localStorage_i18nextResources_key, JSON.stringify(result)); // Cookies.set(localStorage_i18nextResources_key, encodeURIComponent(JSON.stringify(result)), {
3794
- // expires: 36525,
3795
- // domain: FUtil.Format.completeUrlByDomain('').replace(/http(s)?:\/\//, ''),
3796
- // });
3797
-
3798
- return _context4.abrupt("return", result);
3799
-
3800
- case 10:
3801
- case "end":
3802
- return _context4.stop();
3803
- }
3724
+ }; // console.log(result, 'result093sdolkfjlsdkjl');
3725
+ window.localStorage.setItem(localStorage_i18nextResources_key, JSON.stringify(result));
3726
+ // Cookies.set(localStorage_i18nextResources_key, encodeURIComponent(JSON.stringify(result)), {
3727
+ // expires: 36525,
3728
+ // domain: FUtil.Format.completeUrlByDomain('').replace(/http(s)?:\/\//, ''),
3729
+ // });
3730
+ return _context4.abrupt("return", result);
3731
+ case 10:
3732
+ case "end":
3733
+ return _context4.stop();
3804
3734
  }
3805
3735
  }, _callee4);
3806
3736
  }));
3807
-
3808
3737
  function _fetchData() {
3809
3738
  return _fetchData2.apply(this, arguments);
3810
3739
  }
3811
-
3812
3740
  return _fetchData;
3813
3741
  }();
3814
-
3815
3742
  return I18nNext;
3816
3743
  }();
3817
3744