@freelog/tools-lib 0.1.163 → 0.1.166

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,32 @@ 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 = ["resourceId"],
1517
+ _excluded7$2 = ["fileSha1"],
1518
+ _excluded8$1 = ["fileSha1"],
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"],
1535
+ _excluded25 = ["resourceId", "itemId"],
1536
+ _excluded26 = ["resourceId"],
1537
+ _excluded27 = ["resourceId"];
1662
1538
  function create$1(params) {
1663
1539
  return FUtil.Request({
1664
1540
  method: 'POST',
@@ -1686,10 +1562,10 @@ function batchUpdate(params) {
1686
1562
  url: "/v2/resources/updateBatch",
1687
1563
  data: params
1688
1564
  });
1689
- } // interface ListReturnType extends CommonReturn {
1565
+ }
1566
+ // interface ListReturnType extends CommonReturn {
1690
1567
  // data: IResourceInfo[];
1691
1568
  // }
1692
-
1693
1569
  function list(params) {
1694
1570
  return FUtil.Request({
1695
1571
  method: 'GET',
@@ -1697,17 +1573,24 @@ function list(params) {
1697
1573
  params: params
1698
1574
  });
1699
1575
  }
1576
+ // interface InfoReturnType extends CommonReturn {
1577
+ // data: IResourceInfo
1578
+ // }
1700
1579
  function info(_ref) {
1701
1580
  var resourceIdOrName = _ref.resourceIdOrName,
1702
- params = _objectWithoutPropertiesLoose(_ref, _excluded$3);
1703
-
1581
+ params = _objectWithoutPropertiesLoose(_ref, _excluded$3);
1582
+ // : Promise<InfoReturnType>
1704
1583
  return FUtil.Request({
1705
1584
  method: 'GET',
1706
1585
  url: "/v2/resources/" + encodeURIComponent(resourceIdOrName),
1707
1586
  params: params
1708
1587
  });
1709
1588
  }
1589
+ // interface BatchInfoReturnType extends CommonReturn {
1590
+ // data: IResourceInfo[];
1591
+ // }
1710
1592
  function batchInfo(params) {
1593
+ // : Promise<BatchInfoReturnType>
1711
1594
  return FUtil.Request({
1712
1595
  method: 'GET',
1713
1596
  url: "/v2/resources/list",
@@ -1716,8 +1599,7 @@ function batchInfo(params) {
1716
1599
  }
1717
1600
  function dependencyTree$1(_ref2) {
1718
1601
  var resourceId = _ref2.resourceId,
1719
- params = _objectWithoutPropertiesLoose(_ref2, _excluded2$3);
1720
-
1602
+ params = _objectWithoutPropertiesLoose(_ref2, _excluded2$3);
1721
1603
  return FUtil.Request({
1722
1604
  method: 'GET',
1723
1605
  url: "/v2/resources/" + resourceId + "/dependencyTree",
@@ -1726,8 +1608,7 @@ function dependencyTree$1(_ref2) {
1726
1608
  }
1727
1609
  function authTree$1(_ref3) {
1728
1610
  var resourceId = _ref3.resourceId,
1729
- params = _objectWithoutPropertiesLoose(_ref3, _excluded3$3);
1730
-
1611
+ params = _objectWithoutPropertiesLoose(_ref3, _excluded3$3);
1731
1612
  return FUtil.Request({
1732
1613
  method: 'GET',
1733
1614
  url: "/v2/resources/" + resourceId + "/authTree",
@@ -1736,8 +1617,7 @@ function authTree$1(_ref3) {
1736
1617
  }
1737
1618
  function createVersion(_ref4) {
1738
1619
  var resourceId = _ref4.resourceId,
1739
- params = _objectWithoutPropertiesLoose(_ref4, _excluded4$3);
1740
-
1620
+ params = _objectWithoutPropertiesLoose(_ref4, _excluded4$3);
1741
1621
  // return FUtil.Axios.post(`/v2/resources/${resourceId}/versions`, params);
1742
1622
  return FUtil.Request({
1743
1623
  method: 'POST',
@@ -1747,9 +1627,8 @@ function createVersion(_ref4) {
1747
1627
  }
1748
1628
  function resourceVersionInfo1(_ref5) {
1749
1629
  var resourceId = _ref5.resourceId,
1750
- version = _ref5.version,
1751
- params = _objectWithoutPropertiesLoose(_ref5, _excluded5$3);
1752
-
1630
+ version = _ref5.version,
1631
+ params = _objectWithoutPropertiesLoose(_ref5, _excluded5$3);
1753
1632
  return FUtil.Request({
1754
1633
  method: 'GET',
1755
1634
  url: "/v2/resources/" + resourceId + "/versions/" + version,
@@ -1763,29 +1642,35 @@ function resourceVersionInfo2(params) {
1763
1642
  params: params
1764
1643
  });
1765
1644
  }
1766
- function getVersionList(_ref6) {
1767
- var params = _extends({}, _ref6);
1768
-
1645
+ function getVersionListByResourceID(_ref6) {
1646
+ var resourceId = _ref6.resourceId,
1647
+ params = _objectWithoutPropertiesLoose(_ref6, _excluded6$2);
1648
+ return FUtil.Request({
1649
+ method: 'GET',
1650
+ url: "/v2/resources/" + resourceId + "/versions",
1651
+ params: params
1652
+ });
1653
+ }
1654
+ function getVersionList(_ref7) {
1655
+ var params = _extends({}, (_objectDestructuringEmpty(_ref7), _ref7));
1769
1656
  return FUtil.Request({
1770
1657
  method: 'GET',
1771
1658
  url: "/v2/resources/versions/list",
1772
1659
  params: params
1773
1660
  });
1774
1661
  }
1775
- function getResourceVersionBySha1(_ref7) {
1776
- var fileSha1 = _ref7.fileSha1,
1777
- params = _objectWithoutPropertiesLoose(_ref7, _excluded6$2);
1778
-
1662
+ function getResourceVersionBySha1(_ref8) {
1663
+ var fileSha1 = _ref8.fileSha1,
1664
+ params = _objectWithoutPropertiesLoose(_ref8, _excluded7$2);
1779
1665
  return FUtil.Request({
1780
1666
  method: 'GET',
1781
1667
  url: "/v2/resources/files/" + fileSha1 + "/versions",
1782
1668
  params: params
1783
1669
  });
1784
1670
  }
1785
- function getResourceBySha1(_ref8) {
1786
- var fileSha1 = _ref8.fileSha1,
1787
- params = _objectWithoutPropertiesLoose(_ref8, _excluded7$1);
1788
-
1671
+ function getResourceBySha1(_ref9) {
1672
+ var fileSha1 = _ref9.fileSha1,
1673
+ params = _objectWithoutPropertiesLoose(_ref9, _excluded8$1);
1789
1674
  // return FUtil.Axios.get(`/v2/resources/files/${fileSha1}`, {
1790
1675
  // params,
1791
1676
  // });
@@ -1819,8 +1704,8 @@ function lookDraft(params) {
1819
1704
  params: params
1820
1705
  });
1821
1706
  }
1822
- function deleteResourceDraft(_ref9) {
1823
- var resourceId = _ref9.resourceId;
1707
+ function deleteResourceDraft(_ref10) {
1708
+ var resourceId = _ref10.resourceId;
1824
1709
  // return FUtil.Axios.post(`/v2/resources/${params.resourceId}/versions/drafts`, params);
1825
1710
  return FUtil.Request({
1826
1711
  method: 'DELETE',
@@ -1838,14 +1723,14 @@ function resourceIsUsedByOther(params) {
1838
1723
  });
1839
1724
  }
1840
1725
  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`, {
1726
+ return window.location.href = FUtil.Format.completeUrlByDomain('api') + ("/v2/resources/" + params.resourceId + "/versions/" + params.version + "/download");
1727
+ // return request.get(`/v2/resources/${params.resourceId}/versions/${params.$version}/download`, {
1842
1728
  // responseType: 'arraybuffer',
1843
1729
  // });
1844
1730
  }
1845
- function batchGetCoverageVersions(_ref10) {
1846
- var resourceId = _ref10.resourceId,
1847
- params = _objectWithoutPropertiesLoose(_ref10, _excluded8$1);
1848
-
1731
+ function batchGetCoverageVersions(_ref11) {
1732
+ var resourceId = _ref11.resourceId,
1733
+ params = _objectWithoutPropertiesLoose(_ref11, _excluded9$1);
1849
1734
  // return FUtil.Axios.get(`/v2/resources/${resourceId}/contracts/coverageVersions`, {
1850
1735
  // params,
1851
1736
  // });
@@ -1862,10 +1747,9 @@ function resolveResources(params) {
1862
1747
  url: "/v2/resources/" + params.resourceId + "/resolveResources"
1863
1748
  });
1864
1749
  }
1865
- function batchSetContracts(_ref11) {
1866
- var resourceId = _ref11.resourceId,
1867
- params = _objectWithoutPropertiesLoose(_ref11, _excluded9$1);
1868
-
1750
+ function batchSetContracts(_ref12) {
1751
+ var resourceId = _ref12.resourceId,
1752
+ params = _objectWithoutPropertiesLoose(_ref12, _excluded10$1);
1869
1753
  // return FUtil.Axios.put(`/v2/resources/${resourceId}/versions/batchSetContracts`, params);
1870
1754
  return FUtil.Request({
1871
1755
  method: 'PUT',
@@ -1873,10 +1757,9 @@ function batchSetContracts(_ref11) {
1873
1757
  data: params
1874
1758
  });
1875
1759
  }
1876
- function cycleDependencyCheck$1(_ref12) {
1877
- var resourceId = _ref12.resourceId,
1878
- params = _objectWithoutPropertiesLoose(_ref12, _excluded10$1);
1879
-
1760
+ function cycleDependencyCheck$1(_ref13) {
1761
+ var resourceId = _ref13.resourceId,
1762
+ params = _objectWithoutPropertiesLoose(_ref13, _excluded11$1);
1880
1763
  // return FUtil.Axios.post(`/v2/resources/${resourceId}/versions/cycleDependencyCheck`, params);
1881
1764
  return FUtil.Request({
1882
1765
  method: 'POST',
@@ -1884,10 +1767,9 @@ function cycleDependencyCheck$1(_ref12) {
1884
1767
  data: params
1885
1768
  });
1886
1769
  }
1887
- function relationTree$1(_ref13) {
1888
- var resourceId = _ref13.resourceId,
1889
- params = _objectWithoutPropertiesLoose(_ref13, _excluded11);
1890
-
1770
+ function relationTree$1(_ref14) {
1771
+ var resourceId = _ref14.resourceId,
1772
+ params = _objectWithoutPropertiesLoose(_ref14, _excluded12);
1891
1773
  // return FUtil.Axios.get(`/v2/resources/${resourceId}/relationTree`, {
1892
1774
  // params,
1893
1775
  // });
@@ -1897,46 +1779,41 @@ function relationTree$1(_ref13) {
1897
1779
  params: params
1898
1780
  });
1899
1781
  }
1900
- function relationTreeAuth(_ref14) {
1901
- var resourceId = _ref14.resourceId,
1902
- params = _objectWithoutPropertiesLoose(_ref14, _excluded12);
1903
-
1782
+ function relationTreeAuth(_ref15) {
1783
+ var resourceId = _ref15.resourceId,
1784
+ params = _objectWithoutPropertiesLoose(_ref15, _excluded13);
1904
1785
  return FUtil.Request({
1905
1786
  method: 'GET',
1906
1787
  url: "/v2/auths/resources/" + resourceId + "/relationTreeAuth",
1907
1788
  params: params
1908
1789
  });
1909
1790
  }
1910
- function resourcesCount(_ref15) {
1911
- var params = _extends({}, _ref15);
1912
-
1791
+ function resourcesCount(_ref16) {
1792
+ var params = _extends({}, (_objectDestructuringEmpty(_ref16), _ref16));
1913
1793
  return FUtil.Request({
1914
1794
  method: 'GET',
1915
1795
  url: "/v2/resources/count",
1916
1796
  params: params
1917
1797
  });
1918
1798
  }
1919
- function batchAuth$1(_ref16) {
1920
- var params = _extends({}, _ref16);
1921
-
1799
+ function batchAuth$1(_ref17) {
1800
+ var params = _extends({}, (_objectDestructuringEmpty(_ref17), _ref17));
1922
1801
  return FUtil.Request({
1923
1802
  method: 'GET',
1924
1803
  url: "/v2/auths/resources/batchAuth/results",
1925
1804
  params: params
1926
1805
  });
1927
1806
  }
1928
- function resourcesRecommend(_ref17) {
1929
- var params = _extends({}, _ref17);
1930
-
1807
+ function resourcesRecommend(_ref18) {
1808
+ var params = _extends({}, (_objectDestructuringEmpty(_ref18), _ref18));
1931
1809
  return FUtil.Request({
1932
1810
  method: 'GET',
1933
1811
  url: "/v2/resources/recommend",
1934
1812
  params: params
1935
1813
  });
1936
1814
  }
1937
- function availableTags(_ref18) {
1938
- var params = _extends({}, _ref18);
1939
-
1815
+ function availableTags(_ref19) {
1816
+ var params = _extends({}, (_objectDestructuringEmpty(_ref19), _ref19));
1940
1817
  return FUtil.Request({
1941
1818
  method: 'GET',
1942
1819
  url: "/v2/resources/tags/availableTags",
@@ -1944,36 +1821,32 @@ function availableTags(_ref18) {
1944
1821
  });
1945
1822
  }
1946
1823
  function resourceTypes$1(_temp) {
1947
- var _ref19 = _temp === void 0 ? {} : _temp,
1948
- params = _extends({}, _ref19);
1949
-
1824
+ var _ref20 = _temp === void 0 ? {} : _temp,
1825
+ params = _extends({}, (_objectDestructuringEmpty(_ref20), _ref20));
1950
1826
  return FUtil.Request({
1951
1827
  method: 'GET',
1952
1828
  url: "/v2/resources/types/listSimpleByGroup",
1953
1829
  params: params
1954
1830
  });
1955
1831
  }
1956
- function ListSimpleByParentCode(_ref20) {
1957
- var params = _extends({}, _ref20);
1958
-
1832
+ function ListSimpleByParentCode(_ref21) {
1833
+ var params = _extends({}, (_objectDestructuringEmpty(_ref21), _ref21));
1959
1834
  return FUtil.Request({
1960
1835
  method: 'GET',
1961
1836
  url: "/v2/resources/types/listSimpleByParentCode",
1962
1837
  params: params
1963
1838
  });
1964
1839
  }
1965
- function getResourceTypeInfoByCode(_ref21) {
1966
- var params = _extends({}, _ref21);
1967
-
1840
+ function getResourceTypeInfoByCode(_ref22) {
1841
+ var params = _extends({}, (_objectDestructuringEmpty(_ref22), _ref22));
1968
1842
  return FUtil.Request({
1969
1843
  method: 'GET',
1970
1844
  url: "/v2/resources/types/getInfoByCode",
1971
1845
  params: params
1972
1846
  });
1973
1847
  }
1974
- function getResourceAttrListSimple(_ref22) {
1975
- var params = _extends({}, _ref22);
1976
-
1848
+ function getResourceAttrListSimple(_ref23) {
1849
+ var params = _extends({}, (_objectDestructuringEmpty(_ref23), _ref23));
1977
1850
  return FUtil.Request({
1978
1851
  method: 'GET',
1979
1852
  url: "/v2/resources/attrs/listSimple",
@@ -1981,26 +1854,24 @@ function getResourceAttrListSimple(_ref22) {
1981
1854
  });
1982
1855
  }
1983
1856
  function listSimple4Recently(_temp2) {
1984
- var _ref23 = _temp2 === void 0 ? {} : _temp2,
1985
- params = _extends({}, _ref23);
1986
-
1857
+ var _ref24 = _temp2 === void 0 ? {} : _temp2,
1858
+ params = _extends({}, (_objectDestructuringEmpty(_ref24), _ref24));
1987
1859
  return FUtil.Request({
1988
1860
  method: 'GET',
1989
1861
  url: "/v2/resources/types/listSimple4Recently",
1990
1862
  params: params
1991
1863
  });
1992
1864
  }
1993
- function getAttrsInfoByKey(_ref24) {
1994
- var params = _extends({}, _ref24);
1995
-
1865
+ function getAttrsInfoByKey(_ref25) {
1866
+ var params = _extends({}, (_objectDestructuringEmpty(_ref25), _ref25));
1996
1867
  return FUtil.Request({
1997
1868
  method: 'GET',
1998
1869
  url: "/v2/resources/attrs/getInfoByKey",
1999
1870
  params: params
2000
1871
  });
2001
1872
  }
2002
- function generateResourceNames(_ref25) {
2003
- var resourceNames = _ref25.resourceNames;
1873
+ function generateResourceNames(_ref26) {
1874
+ var resourceNames = _ref26.resourceNames;
2004
1875
  return FUtil.Request({
2005
1876
  method: 'POST',
2006
1877
  url: "/v2/resources/generateResourceNames",
@@ -2009,6 +1880,201 @@ function generateResourceNames(_ref25) {
2009
1880
  }
2010
1881
  });
2011
1882
  }
1883
+ function updateCollection(_ref27) {
1884
+ var resourceId = _ref27.resourceId,
1885
+ params = _objectWithoutPropertiesLoose(_ref27, _excluded14);
1886
+ return FUtil.Request({
1887
+ method: 'PUT',
1888
+ url: "/v2/resources/catalogue/" + resourceId,
1889
+ data: params
1890
+ });
1891
+ }
1892
+ function deleteCollectionUnitResource(_ref28) {
1893
+ var resourceId = _ref28.resourceId,
1894
+ removeCollectionItemIds = _ref28.removeCollectionItemIds;
1895
+ return FUtil.Request({
1896
+ method: 'DELETE',
1897
+ url: "/v2/resources/catalogue/" + resourceId + "?removeCollectionItemIds=" + removeCollectionItemIds.join(',')
1898
+ });
1899
+ }
1900
+ function getCollectionItems(_ref29) {
1901
+ var resourceId = _ref29.resourceId,
1902
+ params = _objectWithoutPropertiesLoose(_ref29, _excluded15);
1903
+ return FUtil.Request({
1904
+ method: 'GET',
1905
+ url: "/v2/resources/catalogue/" + resourceId + "/items",
1906
+ params: params
1907
+ });
1908
+ }
1909
+ function getCollectionItems_Draft(_ref30) {
1910
+ var resourceId = _ref30.resourceId,
1911
+ params = _objectWithoutPropertiesLoose(_ref30, _excluded16);
1912
+ return FUtil.Request({
1913
+ method: 'GET',
1914
+ url: "/v2/resources/catalogues/drafts/" + resourceId + "/items",
1915
+ params: params
1916
+ });
1917
+ }
1918
+ function setCollectionItemSort(_ref31) {
1919
+ var resourceId = _ref31.resourceId,
1920
+ params = _objectWithoutPropertiesLoose(_ref31, _excluded17);
1921
+ return FUtil.Request({
1922
+ method: 'PUT',
1923
+ url: "/v2/resources/catalogue/" + resourceId + "/manualSort",
1924
+ data: params
1925
+ });
1926
+ }
1927
+ function reorderCollectionItemsSort(_ref32) {
1928
+ var resourceId = _ref32.resourceId,
1929
+ params = _objectWithoutPropertiesLoose(_ref32, _excluded18);
1930
+ return FUtil.Request({
1931
+ method: 'PUT',
1932
+ url: "/v2/resources/catalogue/" + resourceId + "/reorder",
1933
+ data: params
1934
+ });
1935
+ }
1936
+ function checkExistCollectionItems(_ref33) {
1937
+ var resourceId = _ref33.resourceId,
1938
+ params = _objectWithoutPropertiesLoose(_ref33, _excluded19);
1939
+ return FUtil.Request({
1940
+ method: 'GET',
1941
+ url: "/v2/resources/catalogue/" + resourceId + "/items/checkExists",
1942
+ params: params
1943
+ });
1944
+ }
1945
+ function getCollectionItemsAuth(_ref34) {
1946
+ var resourceId = _ref34.resourceId,
1947
+ params = _objectWithoutPropertiesLoose(_ref34, _excluded20);
1948
+ return FUtil.Request({
1949
+ method: 'GET',
1950
+ url: "/v2/auths/resources/" + resourceId + "/items/batchAuth",
1951
+ params: params
1952
+ });
1953
+ }
1954
+ function batchResourceItems(_ref35) {
1955
+ var params = _extends({}, (_objectDestructuringEmpty(_ref35), _ref35));
1956
+ return FUtil.Request({
1957
+ method: 'GET',
1958
+ url: "/v2/resources/catalogue/items/batch/list",
1959
+ params: params
1960
+ });
1961
+ }
1962
+ function batchResourceItems_Draft(_ref36) {
1963
+ var params = _extends({}, (_objectDestructuringEmpty(_ref36), _ref36));
1964
+ return FUtil.Request({
1965
+ method: 'GET',
1966
+ url: "/v2/resources/catalogues/drafts/items/batch/list",
1967
+ params: params
1968
+ });
1969
+ }
1970
+ function getCollectionUpdateLogs(_ref37) {
1971
+ var resourceId = _ref37.resourceId,
1972
+ params = _objectWithoutPropertiesLoose(_ref37, _excluded21);
1973
+ return FUtil.Request({
1974
+ method: 'GET',
1975
+ url: "/v2/resources/catalogue/" + resourceId + "/updateLogs",
1976
+ params: params
1977
+ });
1978
+ }
1979
+ function getCollectionCollectRules(_ref38) {
1980
+ var resourceId = _ref38.resourceId;
1981
+ return FUtil.Request({
1982
+ method: 'GET',
1983
+ url: "/v2/resources/catalogue/" + resourceId + "/items/collectRules"
1984
+ });
1985
+ }
1986
+ function setCollectRules(_ref39) {
1987
+ var resourceId = _ref39.resourceId,
1988
+ params = _objectWithoutPropertiesLoose(_ref39, _excluded22);
1989
+ return FUtil.Request({
1990
+ method: 'POST',
1991
+ url: "/v2/resources/catalogue/" + resourceId + "/items/collectRules",
1992
+ data: params
1993
+ });
1994
+ }
1995
+ function setItemsTitle(_ref40) {
1996
+ var resourceId = _ref40.resourceId,
1997
+ data = _ref40.data;
1998
+ return FUtil.Request({
1999
+ method: 'PUT',
2000
+ url: "/v2/resources/catalogue/" + resourceId + "/items",
2001
+ data: data
2002
+ });
2003
+ }
2004
+ function deleteCollectionItems_Draft(_ref41) {
2005
+ var resourceId = _ref41.resourceId,
2006
+ removeCollectionItemIds = _ref41.removeCollectionItemIds;
2007
+ return FUtil.Request({
2008
+ method: 'DELETE',
2009
+ url: "/v2/resources/catalogues/drafts/" + resourceId + "/items?removeCollectionItemIds=" + removeCollectionItemIds.join(',')
2010
+ });
2011
+ }
2012
+ function setCollectionItemsSortID_Draft(_ref42) {
2013
+ var resourceId = _ref42.resourceId,
2014
+ data = _ref42.data;
2015
+ return FUtil.Request({
2016
+ method: 'PUT',
2017
+ url: "/v2/resources/catalogues/drafts/" + resourceId + "/manualSort",
2018
+ data: data
2019
+ });
2020
+ }
2021
+ function reorderCollectionItems_Draft(_ref43) {
2022
+ var resourceId = _ref43.resourceId,
2023
+ params = _objectWithoutPropertiesLoose(_ref43, _excluded23);
2024
+ return FUtil.Request({
2025
+ method: 'PUT',
2026
+ url: "/v2/resources/catalogues/drafts/" + resourceId + "/reorder",
2027
+ data: params
2028
+ });
2029
+ }
2030
+ function resourceIsExistInItems_Draft(_ref44) {
2031
+ var resourceId = _ref44.resourceId,
2032
+ params = _objectWithoutPropertiesLoose(_ref44, _excluded24);
2033
+ return FUtil.Request({
2034
+ method: 'GET',
2035
+ url: "/v2/resources/catalogues/drafts/" + resourceId + "/items/checkExists",
2036
+ params: params
2037
+ });
2038
+ }
2039
+ function updateCollectionItemsInfo_Draft(_ref45) {
2040
+ var resourceId = _ref45.resourceId,
2041
+ data = _ref45.data;
2042
+ return FUtil.Request({
2043
+ method: 'PUT',
2044
+ // url: `/v2/resources/catalogue/${resourceId}/items`,
2045
+ url: "/v2/resources/catalogues/drafts/" + resourceId + "/items",
2046
+ data: data
2047
+ });
2048
+ }
2049
+ function updateCollectionItemAuthorization_Draft(_ref46) {
2050
+ var resourceId = _ref46.resourceId,
2051
+ itemId = _ref46.itemId,
2052
+ data = _objectWithoutPropertiesLoose(_ref46, _excluded25);
2053
+ return FUtil.Request({
2054
+ method: 'PUT',
2055
+ // url: `/v2/resources/catalogues/${resourceId}/items/${itemId}`,
2056
+ url: "/v2/resources/catalogues/drafts/" + resourceId + "/items/" + itemId,
2057
+ data: data
2058
+ });
2059
+ }
2060
+ function addResourceItems_Draft(_ref47) {
2061
+ var resourceId = _ref47.resourceId,
2062
+ params = _objectWithoutPropertiesLoose(_ref47, _excluded26);
2063
+ return FUtil.Request({
2064
+ method: 'POST',
2065
+ url: "/v2/resources/catalogues/drafts/" + resourceId + "/items",
2066
+ data: params
2067
+ });
2068
+ }
2069
+ function getCollectionItemsAuth_Draft(_ref48) {
2070
+ var resourceId = _ref48.resourceId,
2071
+ params = _objectWithoutPropertiesLoose(_ref48, _excluded27);
2072
+ return FUtil.Request({
2073
+ method: 'GET',
2074
+ url: "/v2/resources/catalogues/drafts/" + resourceId + "/items/batchAuth",
2075
+ params: params
2076
+ });
2077
+ }
2012
2078
 
2013
2079
  var Resource = {
2014
2080
  __proto__: null,
@@ -2024,6 +2090,7 @@ var Resource = {
2024
2090
  createVersion: createVersion,
2025
2091
  resourceVersionInfo1: resourceVersionInfo1,
2026
2092
  resourceVersionInfo2: resourceVersionInfo2,
2093
+ getVersionListByResourceID: getVersionListByResourceID,
2027
2094
  getVersionList: getVersionList,
2028
2095
  getResourceVersionBySha1: getResourceVersionBySha1,
2029
2096
  getResourceBySha1: getResourceBySha1,
@@ -2049,13 +2116,34 @@ var Resource = {
2049
2116
  getResourceAttrListSimple: getResourceAttrListSimple,
2050
2117
  listSimple4Recently: listSimple4Recently,
2051
2118
  getAttrsInfoByKey: getAttrsInfoByKey,
2052
- generateResourceNames: generateResourceNames
2119
+ generateResourceNames: generateResourceNames,
2120
+ updateCollection: updateCollection,
2121
+ deleteCollectionUnitResource: deleteCollectionUnitResource,
2122
+ getCollectionItems: getCollectionItems,
2123
+ getCollectionItems_Draft: getCollectionItems_Draft,
2124
+ setCollectionItemSort: setCollectionItemSort,
2125
+ reorderCollectionItemsSort: reorderCollectionItemsSort,
2126
+ checkExistCollectionItems: checkExistCollectionItems,
2127
+ getCollectionItemsAuth: getCollectionItemsAuth,
2128
+ batchResourceItems: batchResourceItems,
2129
+ batchResourceItems_Draft: batchResourceItems_Draft,
2130
+ getCollectionUpdateLogs: getCollectionUpdateLogs,
2131
+ getCollectionCollectRules: getCollectionCollectRules,
2132
+ setCollectRules: setCollectRules,
2133
+ setItemsTitle: setItemsTitle,
2134
+ deleteCollectionItems_Draft: deleteCollectionItems_Draft,
2135
+ setCollectionItemsSortID_Draft: setCollectionItemsSortID_Draft,
2136
+ reorderCollectionItems_Draft: reorderCollectionItems_Draft,
2137
+ resourceIsExistInItems_Draft: resourceIsExistInItems_Draft,
2138
+ updateCollectionItemsInfo_Draft: updateCollectionItemsInfo_Draft,
2139
+ updateCollectionItemAuthorization_Draft: updateCollectionItemAuthorization_Draft,
2140
+ addResourceItems_Draft: addResourceItems_Draft,
2141
+ getCollectionItemsAuth_Draft: getCollectionItemsAuth_Draft
2053
2142
  };
2054
2143
 
2055
2144
  var _excluded$4 = ["loginName"];
2056
2145
  function login$1(_ref) {
2057
- var params = _extends({}, _ref);
2058
-
2146
+ var params = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
2059
2147
  // return FUtil.Axios.post(`/v2/passport/login`, params);
2060
2148
  return FUtil.Request({
2061
2149
  method: 'POST',
@@ -2067,8 +2155,7 @@ function login$1(_ref) {
2067
2155
  }
2068
2156
  function logout(_temp) {
2069
2157
  var _ref2 = _temp === void 0 ? {} : _temp,
2070
- params = _extends({}, _ref2);
2071
-
2158
+ params = _extends({}, (_objectDestructuringEmpty(_ref2), _ref2));
2072
2159
  return FUtil.Request({
2073
2160
  method: 'GET',
2074
2161
  url: '/v2/passport/logout',
@@ -2092,10 +2179,7 @@ function batchUserList(params) {
2092
2179
  });
2093
2180
  }
2094
2181
  function currentUserInfo(_temp2) {
2095
- var _ref3 = _temp2 === void 0 ? {} : _temp2;
2096
-
2097
- _objectDestructuringEmpty(_ref3);
2098
-
2182
+ _objectDestructuringEmpty(_temp2 === void 0 ? {} : _temp2);
2099
2183
  // return FUtil.Axios.get(`/v1/userinfos/current`);
2100
2184
  return FUtil.Request({
2101
2185
  method: 'GET',
@@ -2118,8 +2202,7 @@ function logon$1(params) {
2118
2202
  }
2119
2203
  function resetPassword(_ref4) {
2120
2204
  var loginName = _ref4.loginName,
2121
- params = _objectWithoutPropertiesLoose(_ref4, _excluded$4);
2122
-
2205
+ params = _objectWithoutPropertiesLoose(_ref4, _excluded$4);
2123
2206
  return FUtil.Request({
2124
2207
  method: 'PUT',
2125
2208
  url: "/v2/users/" + loginName + "/resetPassword",
@@ -2135,17 +2218,14 @@ function updatePassword(params) {
2135
2218
  }
2136
2219
  function uploadHeadImg(params, config) {
2137
2220
  var formData = new FormData();
2138
-
2139
2221
  for (var _i = 0, _Object$entries = Object.entries(params); _i < _Object$entries.length; _i++) {
2140
2222
  var _Object$entries$_i = _Object$entries[_i],
2141
- key = _Object$entries$_i[0],
2142
- value = _Object$entries$_i[1];
2143
-
2223
+ key = _Object$entries$_i[0],
2224
+ value = _Object$entries$_i[1];
2144
2225
  if (value) {
2145
2226
  formData.append(key, value);
2146
2227
  }
2147
2228
  }
2148
-
2149
2229
  return FUtil.Request(_extends({
2150
2230
  method: 'POST',
2151
2231
  url: "/v2/users/current/uploadHeadImg",
@@ -2170,7 +2250,6 @@ function areasProvinces(params) {
2170
2250
  if (params === void 0) {
2171
2251
  params = {};
2172
2252
  }
2173
-
2174
2253
  return FUtil.Request({
2175
2254
  method: 'GET',
2176
2255
  url: "/v2/areas/provinces",
@@ -2204,7 +2283,6 @@ function thirdPartyList(params) {
2204
2283
  if (params === void 0) {
2205
2284
  params = {};
2206
2285
  }
2207
-
2208
2286
  return FUtil.Request({
2209
2287
  method: 'GET',
2210
2288
  url: "/v2/thirdParty/list",
@@ -2217,21 +2295,31 @@ function thirdPartyIsBind(params) {
2217
2295
  url: "/v2/thirdParty/isBind",
2218
2296
  params: params
2219
2297
  });
2220
- } // 签到
2221
-
2298
+ }
2299
+ // 签到
2222
2300
  function signForCoins() {
2223
2301
  return FUtil.Request({
2224
2302
  method: 'GET',
2225
2303
  url: "/v2/activities/facade/sign"
2226
2304
  });
2227
- } // 查询签到信息
2228
-
2305
+ }
2306
+ // 查询签到信息
2229
2307
  function getSignInfo() {
2230
2308
  return FUtil.Request({
2231
2309
  method: 'GET',
2232
2310
  url: "/v2/activities/facade/signInfo"
2233
2311
  });
2234
2312
  }
2313
+ function searchForConsole(params) {
2314
+ if (params === void 0) {
2315
+ params = {};
2316
+ }
2317
+ return FUtil.Request({
2318
+ method: 'GET',
2319
+ url: '/v2/users/searchForConsole',
2320
+ params: params
2321
+ });
2322
+ }
2235
2323
 
2236
2324
  var User = {
2237
2325
  __proto__: null,
@@ -2254,24 +2342,24 @@ var User = {
2254
2342
  thirdPartyList: thirdPartyList,
2255
2343
  thirdPartyIsBind: thirdPartyIsBind,
2256
2344
  signForCoins: signForCoins,
2257
- getSignInfo: getSignInfo
2345
+ getSignInfo: getSignInfo,
2346
+ searchForConsole: searchForConsole
2258
2347
  };
2259
2348
 
2260
2349
  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"];
2350
+ _excluded2$4 = ["nodeId"],
2351
+ _excluded3$4 = ["nodeId"],
2352
+ _excluded4$4 = ["nodeId"],
2353
+ _excluded5$4 = ["nodeId"],
2354
+ _excluded6$3 = ["testResourceId"],
2355
+ _excluded7$3 = ["testResourceId"],
2356
+ _excluded8$2 = ["nodeId"],
2357
+ _excluded9$2 = ["nodeId"],
2358
+ _excluded10$2 = ["nodeId"],
2359
+ _excluded11$2 = ["nodeId"];
2271
2360
  function testResources(_ref) {
2272
2361
  var nodeId = _ref.nodeId,
2273
- params = _objectWithoutPropertiesLoose(_ref, _excluded$5);
2274
-
2362
+ params = _objectWithoutPropertiesLoose(_ref, _excluded$5);
2275
2363
  return FUtil.Request({
2276
2364
  method: 'GET',
2277
2365
  url: "/v2/testNodes/" + nodeId + "/testResources",
@@ -2280,8 +2368,7 @@ function testResources(_ref) {
2280
2368
  }
2281
2369
  function createRules(_ref2) {
2282
2370
  var nodeId = _ref2.nodeId,
2283
- params = _objectWithoutPropertiesLoose(_ref2, _excluded2$4);
2284
-
2371
+ params = _objectWithoutPropertiesLoose(_ref2, _excluded2$4);
2285
2372
  return FUtil.Request({
2286
2373
  method: 'POST',
2287
2374
  url: "/v2/testNodes/" + nodeId + "/rules",
@@ -2290,8 +2377,7 @@ function createRules(_ref2) {
2290
2377
  }
2291
2378
  function batchTestResources(_ref3) {
2292
2379
  var nodeId = _ref3.nodeId,
2293
- params = _objectWithoutPropertiesLoose(_ref3, _excluded3$4);
2294
-
2380
+ params = _objectWithoutPropertiesLoose(_ref3, _excluded3$4);
2295
2381
  return FUtil.Request({
2296
2382
  method: 'GET',
2297
2383
  url: "/v2/testNodes/" + nodeId + "/testResources/list",
@@ -2300,8 +2386,7 @@ function batchTestResources(_ref3) {
2300
2386
  }
2301
2387
  function dependencyTree$2(_ref4) {
2302
2388
  var nodeId = _ref4.nodeId,
2303
- params = _objectWithoutPropertiesLoose(_ref4, _excluded4$4);
2304
-
2389
+ params = _objectWithoutPropertiesLoose(_ref4, _excluded4$4);
2305
2390
  return FUtil.Request({
2306
2391
  method: 'GET',
2307
2392
  url: "/v2/testNodes/" + nodeId + "/testResources/dependencyTree/search",
@@ -2310,8 +2395,7 @@ function dependencyTree$2(_ref4) {
2310
2395
  }
2311
2396
  function putRules(_ref5) {
2312
2397
  var nodeId = _ref5.nodeId,
2313
- params = _objectWithoutPropertiesLoose(_ref5, _excluded5$4);
2314
-
2398
+ params = _objectWithoutPropertiesLoose(_ref5, _excluded5$4);
2315
2399
  return FUtil.Request({
2316
2400
  method: 'PUT',
2317
2401
  url: "/v2/testNodes/" + nodeId + "/rules",
@@ -2327,8 +2411,7 @@ function testNodeRules(_ref6) {
2327
2411
  }
2328
2412
  function updateTestResourceContracts(_ref7) {
2329
2413
  var testResourceId = _ref7.testResourceId,
2330
- params = _objectWithoutPropertiesLoose(_ref7, _excluded6$3);
2331
-
2414
+ params = _objectWithoutPropertiesLoose(_ref7, _excluded6$3);
2332
2415
  // return FUtil.Axios.put(`/v2/testNodes/testResources/${testResourceId}`, params);
2333
2416
  return FUtil.Request({
2334
2417
  method: 'PUT',
@@ -2338,8 +2421,7 @@ function updateTestResourceContracts(_ref7) {
2338
2421
  }
2339
2422
  function dependencyTreeFilter(_ref8) {
2340
2423
  var testResourceId = _ref8.testResourceId,
2341
- params = _objectWithoutPropertiesLoose(_ref8, _excluded7$2);
2342
-
2424
+ params = _objectWithoutPropertiesLoose(_ref8, _excluded7$3);
2343
2425
  // return FUtil.Axios.get(`/v2/testNodes/testResources/${testResourceId}/dependencyTree/filter`, {
2344
2426
  // params
2345
2427
  // });
@@ -2374,8 +2456,7 @@ function testResourceDetails(_ref11) {
2374
2456
  }
2375
2457
  function searchTestResourcesByDependency(_ref12) {
2376
2458
  var nodeId = _ref12.nodeId,
2377
- params = _objectWithoutPropertiesLoose(_ref12, _excluded8$2);
2378
-
2459
+ params = _objectWithoutPropertiesLoose(_ref12, _excluded8$2);
2379
2460
  // return FUtil.Axios.get(`/v2/testNodes/${nodeId}/testResources/searchByDependency`, {
2380
2461
  // params,
2381
2462
  // });
@@ -2387,8 +2468,7 @@ function searchTestResourcesByDependency(_ref12) {
2387
2468
  }
2388
2469
  function rulesRematch(_ref13) {
2389
2470
  var nodeId = _ref13.nodeId,
2390
- params = _objectWithoutPropertiesLoose(_ref13, _excluded9$2);
2391
-
2471
+ params = _objectWithoutPropertiesLoose(_ref13, _excluded9$2);
2392
2472
  return FUtil.Request({
2393
2473
  method: 'POST',
2394
2474
  url: "/v2/testNodes/" + nodeId + "/rules/rematch",
@@ -2397,8 +2477,7 @@ function rulesRematch(_ref13) {
2397
2477
  }
2398
2478
  function rulesPreExecution(_ref14) {
2399
2479
  var nodeId = _ref14.nodeId,
2400
- params = _objectWithoutPropertiesLoose(_ref14, _excluded10$2);
2401
-
2480
+ params = _objectWithoutPropertiesLoose(_ref14, _excluded10$2);
2402
2481
  return FUtil.Request({
2403
2482
  method: 'POST',
2404
2483
  url: "/v2/testNodes/" + nodeId + "/rules/preExecution",
@@ -2407,8 +2486,7 @@ function rulesPreExecution(_ref14) {
2407
2486
  }
2408
2487
  function batchGetAuths(_ref15) {
2409
2488
  var nodeId = _ref15.nodeId,
2410
- params = _objectWithoutPropertiesLoose(_ref15, _excluded11$1);
2411
-
2489
+ params = _objectWithoutPropertiesLoose(_ref15, _excluded11$2);
2412
2490
  return FUtil.Request({
2413
2491
  method: 'GET',
2414
2492
  url: "/v2/auths/exhibits/" + nodeId + "/test/batchAuth/results",
@@ -2436,10 +2514,9 @@ var InformalNode = {
2436
2514
  };
2437
2515
 
2438
2516
  var _excluded$6 = ["contractId"],
2439
- _excluded2$5 = ["contractId"];
2517
+ _excluded2$5 = ["contractId"];
2440
2518
  function createContract(_ref) {
2441
- var params = _extends({}, _ref);
2442
-
2519
+ var params = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
2443
2520
  return FUtil.Request({
2444
2521
  method: 'POST',
2445
2522
  url: "/v2/contracts",
@@ -2447,8 +2524,7 @@ function createContract(_ref) {
2447
2524
  });
2448
2525
  }
2449
2526
  function batchCreateContracts(_ref2) {
2450
- var params = _extends({}, _ref2);
2451
-
2527
+ var params = _extends({}, (_objectDestructuringEmpty(_ref2), _ref2));
2452
2528
  return FUtil.Request({
2453
2529
  method: 'POST',
2454
2530
  url: "/v2/contracts/batchSign",
@@ -2457,8 +2533,7 @@ function batchCreateContracts(_ref2) {
2457
2533
  }
2458
2534
  function contractDetails(_ref3) {
2459
2535
  var contractId = _ref3.contractId,
2460
- params = _objectWithoutPropertiesLoose(_ref3, _excluded$6);
2461
-
2536
+ params = _objectWithoutPropertiesLoose(_ref3, _excluded$6);
2462
2537
  return FUtil.Request({
2463
2538
  method: 'GET',
2464
2539
  url: "/v2/contracts/" + contractId,
@@ -2488,8 +2563,7 @@ function batchContracts(params) {
2488
2563
  }
2489
2564
  function transitionRecords(_ref4) {
2490
2565
  var contractId = _ref4.contractId,
2491
- params = _objectWithoutPropertiesLoose(_ref4, _excluded2$5);
2492
-
2566
+ params = _objectWithoutPropertiesLoose(_ref4, _excluded2$5);
2493
2567
  return FUtil.Request({
2494
2568
  method: 'GET',
2495
2569
  url: "/v2/contracts/" + contractId + "/transitionRecords",
@@ -2517,11 +2591,10 @@ var Contract = {
2517
2591
  };
2518
2592
 
2519
2593
  var _excluded$7 = ["accountId"],
2520
- _excluded2$6 = ["userId"];
2594
+ _excluded2$6 = ["userId"];
2521
2595
  function details$1(_ref) {
2522
2596
  var accountId = _ref.accountId,
2523
- params = _objectWithoutPropertiesLoose(_ref, _excluded$7);
2524
-
2597
+ params = _objectWithoutPropertiesLoose(_ref, _excluded$7);
2525
2598
  return FUtil.Request({
2526
2599
  method: 'GET',
2527
2600
  url: "/v2/transactions/details/" + accountId,
@@ -2530,8 +2603,7 @@ function details$1(_ref) {
2530
2603
  }
2531
2604
  function individualAccounts(_ref2) {
2532
2605
  var userId = _ref2.userId,
2533
- params = _objectWithoutPropertiesLoose(_ref2, _excluded2$6);
2534
-
2606
+ params = _objectWithoutPropertiesLoose(_ref2, _excluded2$6);
2535
2607
  return FUtil.Request({
2536
2608
  method: 'GET',
2537
2609
  url: "/v2/accounts/individualAccounts/" + userId,
@@ -2546,8 +2618,7 @@ function transactionDetails(_ref3) {
2546
2618
  });
2547
2619
  }
2548
2620
  function activateIndividualAccounts(_ref4) {
2549
- var params = _extends({}, _ref4);
2550
-
2621
+ var params = _extends({}, (_objectDestructuringEmpty(_ref4), _ref4));
2551
2622
  return FUtil.Request({
2552
2623
  method: 'PUT',
2553
2624
  url: "/v2/accounts/individualAccounts/activate",
@@ -2555,8 +2626,7 @@ function activateIndividualAccounts(_ref4) {
2555
2626
  });
2556
2627
  }
2557
2628
  function changePassword(_ref5) {
2558
- var params = _extends({}, _ref5);
2559
-
2629
+ var params = _extends({}, (_objectDestructuringEmpty(_ref5), _ref5));
2560
2630
  return FUtil.Request({
2561
2631
  method: 'PUT',
2562
2632
  url: "/v2/accounts/individualAccounts",
@@ -2564,8 +2634,7 @@ function changePassword(_ref5) {
2564
2634
  });
2565
2635
  }
2566
2636
  function resetPassword$1(_ref6) {
2567
- var params = _extends({}, _ref6);
2568
-
2637
+ var params = _extends({}, (_objectDestructuringEmpty(_ref6), _ref6));
2569
2638
  return FUtil.Request({
2570
2639
  method: 'PUT',
2571
2640
  url: "/v2/accounts/individualAccounts/resetPassword",
@@ -2573,8 +2642,7 @@ function resetPassword$1(_ref6) {
2573
2642
  });
2574
2643
  }
2575
2644
  function verifyTransactionPassword(_ref7) {
2576
- var params = _extends({}, _ref7);
2577
-
2645
+ var params = _extends({}, (_objectDestructuringEmpty(_ref7), _ref7));
2578
2646
  return FUtil.Request({
2579
2647
  method: 'GET',
2580
2648
  url: "/v2/accounts/individualAccounts/verifyTransactionPassword",
@@ -2617,8 +2685,7 @@ var Captcha = {
2617
2685
  var _excluded$8 = ["contractId"];
2618
2686
  function transaction(_ref) {
2619
2687
  var contractId = _ref.contractId,
2620
- params = _objectWithoutPropertiesLoose(_ref, _excluded$8);
2621
-
2688
+ params = _objectWithoutPropertiesLoose(_ref, _excluded$8);
2622
2689
  return FUtil.Request({
2623
2690
  method: 'POST',
2624
2691
  url: "/v2/contracts/" + contractId + "/events/payment",
@@ -2677,7 +2744,6 @@ function getBaseTaskInfo(params) {
2677
2744
  if (params === void 0) {
2678
2745
  params = {};
2679
2746
  }
2680
-
2681
2747
  return FUtil.Request({
2682
2748
  method: 'GET',
2683
2749
  url: "/v2/activities/facade/getBaseTaskInfo",
@@ -2688,7 +2754,6 @@ function getResourceTaskInfo(params) {
2688
2754
  if (params === void 0) {
2689
2755
  params = {};
2690
2756
  }
2691
-
2692
2757
  return FUtil.Request({
2693
2758
  method: 'GET',
2694
2759
  url: "/v2/activities/facade/getResourceTaskInfo",
@@ -2699,7 +2764,6 @@ function getNodeTaskInfo(params) {
2699
2764
  if (params === void 0) {
2700
2765
  params = {};
2701
2766
  }
2702
-
2703
2767
  return FUtil.Request({
2704
2768
  method: 'GET',
2705
2769
  url: "/v2/activities/facade/getNodeTaskInfo",
@@ -2745,7 +2809,6 @@ function getWechatOfficialAccountInfo(params) {
2745
2809
  if (params === void 0) {
2746
2810
  params = {};
2747
2811
  }
2748
-
2749
2812
  return FUtil.Request({
2750
2813
  method: 'GET',
2751
2814
  url: "/v2/extensions/wechat/getRelationship4Client",
@@ -2756,7 +2819,6 @@ function lotteryList(params) {
2756
2819
  if (params === void 0) {
2757
2820
  params = {};
2758
2821
  }
2759
-
2760
2822
  return FUtil.Request({
2761
2823
  method: 'GET',
2762
2824
  url: "/v2/activities/lottery/resource/list",
@@ -2788,7 +2850,6 @@ function listRewardRecordInfos(params) {
2788
2850
  if (params === void 0) {
2789
2851
  params = {};
2790
2852
  }
2791
-
2792
2853
  return FUtil.Request({
2793
2854
  method: 'POST',
2794
2855
  url: "/v2/activities/facade/listRewardRecordInfos",
@@ -2854,15 +2915,13 @@ function codeDetails1(_ref) {
2854
2915
  }
2855
2916
  function codeDetails2(_ref2) {
2856
2917
  _objectDestructuringEmpty(_ref2);
2857
-
2858
2918
  return FUtil.Request({
2859
2919
  method: 'GET',
2860
2920
  url: "/v2/testQualifications/beta/codes/userActivateCode"
2861
2921
  });
2862
2922
  }
2863
2923
  function betaCodesActivate(_ref3) {
2864
- var params = _extends({}, _ref3);
2865
-
2924
+ var params = _extends({}, (_objectDestructuringEmpty(_ref3), _ref3));
2866
2925
  return FUtil.Request({
2867
2926
  method: 'POST',
2868
2927
  url: "/v2/testQualifications/beta/codes/activate",
@@ -2870,8 +2929,7 @@ function betaCodesActivate(_ref3) {
2870
2929
  });
2871
2930
  }
2872
2931
  function usedRecords(_ref4) {
2873
- var params = _extends({}, _ref4);
2874
-
2932
+ var params = _extends({}, (_objectDestructuringEmpty(_ref4), _ref4));
2875
2933
  return FUtil.Request({
2876
2934
  method: 'GET',
2877
2935
  url: "/v2/testQualifications/beta/codes/usedRecords",
@@ -2879,8 +2937,7 @@ function usedRecords(_ref4) {
2879
2937
  });
2880
2938
  }
2881
2939
  function betaApply(_ref5) {
2882
- var params = _extends({}, _ref5);
2883
-
2940
+ var params = _extends({}, (_objectDestructuringEmpty(_ref5), _ref5));
2884
2941
  return FUtil.Request({
2885
2942
  method: 'POST',
2886
2943
  url: "/v2/testQualifications/beta/apply",
@@ -2889,8 +2946,7 @@ function betaApply(_ref5) {
2889
2946
  }
2890
2947
  function getBetaApply1(_temp) {
2891
2948
  var _ref6 = _temp === void 0 ? {} : _temp,
2892
- params = _extends({}, _ref6);
2893
-
2949
+ params = _extends({}, (_objectDestructuringEmpty(_ref6), _ref6));
2894
2950
  return FUtil.Request({
2895
2951
  method: 'GET',
2896
2952
  url: "/v2/testQualifications/beta/apply/current",
@@ -2899,8 +2955,7 @@ function getBetaApply1(_temp) {
2899
2955
  }
2900
2956
  function getBetaApply2(_ref7) {
2901
2957
  var recordId = _ref7.recordId,
2902
- params = _objectWithoutPropertiesLoose(_ref7, _excluded$9);
2903
-
2958
+ params = _objectWithoutPropertiesLoose(_ref7, _excluded$9);
2904
2959
  return FUtil.Request({
2905
2960
  method: 'GET',
2906
2961
  url: "/v2/testQualifications/beta/apply/" + recordId,
@@ -2908,8 +2963,7 @@ function getBetaApply2(_ref7) {
2908
2963
  });
2909
2964
  }
2910
2965
  function invitees(_ref8) {
2911
- var params = _extends({}, _ref8);
2912
-
2966
+ var params = _extends({}, (_objectDestructuringEmpty(_ref8), _ref8));
2913
2967
  return FUtil.Request({
2914
2968
  method: 'GET',
2915
2969
  url: "/v2/testQualifications/beta/codes/invitees",
@@ -2949,7 +3003,8 @@ function configsList(params) {
2949
3003
  url: "/v2/i18n/configs/list",
2950
3004
  data: params
2951
3005
  });
2952
- } // oss保存的翻译
3006
+ }
3007
+ // oss保存的翻译
2953
3008
  // interface ConfigsListParamsType {
2954
3009
  // key: string;
2955
3010
  // content: string;
@@ -2990,7 +3045,6 @@ function policyTemplates(params) {
2990
3045
  if (params === void 0) {
2991
3046
  params = {};
2992
3047
  }
2993
-
2994
3048
  return FUtil.Request({
2995
3049
  method: 'GET',
2996
3050
  url: "/v2/translate/translate-config/list4Client",
@@ -3025,7 +3079,6 @@ var Policy = {
3025
3079
  };
3026
3080
 
3027
3081
  // import * as CryptoJS from 'crypto-js';
3028
-
3029
3082
  /**
3030
3083
  * 根据 File 获取 SHA1 Hash 字符串
3031
3084
  * @param file
@@ -3035,46 +3088,38 @@ function getSHA1Hash(file) {
3035
3088
  return new Promise(function (resolve) {
3036
3089
  var reader = new FileReader();
3037
3090
  reader.readAsArrayBuffer(file);
3038
- reader.onload = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
3091
+ reader.onload = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
3039
3092
  var sha1;
3040
3093
  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
- }
3094
+ while (1) switch (_context.prev = _context.next) {
3095
+ case 0:
3096
+ if (reader.result) {
3097
+ _context.next = 3;
3098
+ break;
3099
+ }
3100
+ resolve('');
3101
+ return _context.abrupt("return", '');
3102
+ case 3:
3103
+ if (!(typeof reader.result === 'string')) {
3104
+ _context.next = 6;
3105
+ break;
3106
+ }
3107
+ resolve('');
3108
+ return _context.abrupt("return", '');
3109
+ case 6:
3110
+ _context.next = 8;
3111
+ return self.crypto.subtle.digest('SHA-1', reader.result).then(function (a) {
3112
+ return Array.from(new Uint8Array(a)).map(function (a) {
3113
+ return a.toString(16).padStart(2, '0');
3114
+ }).join('');
3115
+ });
3116
+ case 8:
3117
+ sha1 = _context.sent;
3118
+ resolve(sha1);
3119
+ return _context.abrupt("return", '');
3120
+ case 11:
3121
+ case "end":
3122
+ return _context.stop();
3078
3123
  }
3079
3124
  }, _callee);
3080
3125
  }));
@@ -3083,70 +3128,56 @@ function getSHA1Hash(file) {
3083
3128
  /**
3084
3129
  * 生成随机码
3085
3130
  */
3086
-
3087
3131
  function generateRandomCode(strLen) {
3088
3132
  if (strLen === void 0) {
3089
3133
  strLen = 5;
3090
3134
  }
3091
-
3092
3135
  var allStr = 'ABCDEFGHIJKLMNPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890';
3093
3136
  var newStrArr = [];
3094
-
3095
3137
  for (var i = 0; i < strLen; i++) {
3096
3138
  newStrArr.push(allStr[Math.floor(Math.random() * 61)]);
3097
3139
  }
3098
-
3099
3140
  return newStrArr.join('');
3100
3141
  }
3101
3142
  /**
3102
3143
  * 通过读取 cookies 获取用户 ID
3103
3144
  */
3104
-
3105
3145
  function getUserIDByCookies() {
3106
3146
  var uid = document.cookie.split('; ').find(function (co) {
3107
3147
  return co.startsWith('uid=');
3108
3148
  });
3109
-
3110
3149
  if (!uid) {
3111
3150
  return -1;
3112
3151
  }
3113
-
3114
3152
  return Number(uid.replace('uid=', ''));
3115
3153
  }
3116
3154
  function transformServerAPIContractState(_ref2) {
3117
3155
  var status = _ref2.status,
3118
- authStatus = _ref2.authStatus;
3119
-
3156
+ authStatus = _ref2.authStatus;
3120
3157
  if (status === 0) {
3121
3158
  if (authStatus === 1 || authStatus === 3) {
3122
3159
  return 'active';
3123
3160
  }
3124
-
3125
3161
  if (authStatus === 2) {
3126
3162
  return 'testActive';
3127
3163
  }
3128
-
3129
3164
  if (authStatus === 128) {
3130
3165
  return 'inactive';
3131
3166
  }
3132
3167
  }
3133
-
3134
3168
  if (status === 1) {
3135
3169
  return 'terminal';
3136
3170
  }
3137
-
3138
3171
  return 'exception';
3139
3172
  }
3140
3173
  /**
3141
3174
  * 暂时休眠
3142
3175
  * @param ms 休眠时常(毫秒)
3143
3176
  */
3144
-
3145
3177
  function promiseSleep(ms) {
3146
3178
  if (ms === void 0) {
3147
3179
  ms = 300;
3148
3180
  }
3149
-
3150
3181
  return new Promise(function (resolve) {
3151
3182
  setTimeout(function () {
3152
3183
  resolve();
@@ -3157,12 +3188,10 @@ function promiseSleep(ms) {
3157
3188
  * 获取用户头像URL
3158
3189
  * @param userID
3159
3190
  */
3160
-
3161
3191
  function getAvatarUrl(userID) {
3162
3192
  if (userID === void 0) {
3163
3193
  userID = 0;
3164
3194
  }
3165
-
3166
3195
  // return `${completeUrlByDomain('image')}/avatar/${userID || getUserIDByCookies()}?t=${Date.now()}`;
3167
3196
  return "https://image.freelog.com/avatar/" + (userID || getUserIDByCookies()) + "?t=" + Date.now();
3168
3197
  }
@@ -3180,123 +3209,101 @@ var Tool = {
3180
3209
  function getFilesSha1Info(_x, _x2) {
3181
3210
  return _getFilesSha1Info.apply(this, arguments);
3182
3211
  }
3183
-
3184
3212
  function _getFilesSha1Info() {
3185
- _getFilesSha1Info = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref, cdPartially) {
3213
+ _getFilesSha1Info = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref, cdPartially) {
3186
3214
  var sha1, resourceTypeCode, delay, needHandleSha1, allData, _yield$Storage$filesL, ret, errCode, data, msg, finishedInfo;
3187
-
3188
3215
  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;
3216
+ while (1) switch (_context.prev = _context.next) {
3217
+ case 0:
3218
+ sha1 = _ref.sha1, resourceTypeCode = _ref.resourceTypeCode;
3219
+ if (cdPartially === void 0) {
3220
+ cdPartially = function cdPartially() {
3221
+ return undefined;
3222
+ };
3223
+ }
3224
+ if (!(sha1.length === 0)) {
3225
+ _context.next = 4;
3226
+ break;
3227
+ }
3228
+ return _context.abrupt("return", {
3229
+ error: '',
3230
+ result: []
3231
+ });
3232
+ case 4:
3233
+ delay = 500;
3234
+ needHandleSha1 = [].concat(sha1);
3235
+ allData = [];
3236
+ case 7:
3237
+ _context.next = 10;
3238
+ return filesListInfo({
3239
+ sha1: needHandleSha1.join(','),
3240
+ resourceTypeCode: resourceTypeCode
3241
+ });
3242
+ case 10:
3243
+ _yield$Storage$filesL = _context.sent;
3244
+ ret = _yield$Storage$filesL.ret;
3245
+ errCode = _yield$Storage$filesL.errCode;
3246
+ data = _yield$Storage$filesL.data;
3247
+ msg = _yield$Storage$filesL.msg;
3248
+ if (!(ret !== 0 || errCode !== 0)) {
3249
+ _context.next = 18;
3250
+ break;
3251
+ }
3252
+ console.log({
3253
+ ret: ret,
3254
+ errCode: errCode,
3255
+ data: data,
3256
+ msg: msg
3257
+ }, '09iowksdjaklfjs;oalijflskdjflsdkjflkj');
3258
+ return _context.abrupt("return", {
3259
+ error: msg,
3260
+ result: allData
3261
+ });
3262
+ case 18:
3263
+ needHandleSha1 = data.filter(function (d) {
3264
+ return d.metaAnalyzeStatus === 0 || d.metaAnalyzeStatus === 1;
3265
+ }).map(function (d) {
3266
+ return d.sha1;
3267
+ });
3268
+ finishedInfo = data.filter(function (d) {
3269
+ return d.metaAnalyzeStatus !== 0 && d.metaAnalyzeStatus !== 1;
3270
+ }).map(function (d) {
3271
+ var state = 'fail';
3272
+ if (!d.metaAnalyzeStatus) {
3273
+ state = 'nonentity';
3274
+ } else if (d.metaAnalyzeStatus === 2) {
3275
+ state = 'success';
3276
+ } else if (d.metaAnalyzeStatus === 3) {
3277
+ state = 'fail';
3278
3278
  }
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;
3279
+ // console.log(d, '90wieojiksdjf;lkasdjf;lksdjflksjdflkjsdlfkjsdlkj');
3280
+ return {
3281
+ sha1: d.sha1,
3282
+ state: state,
3283
+ info: d
3284
+ };
3285
+ });
3286
+ cdPartially && cdPartially(finishedInfo);
3287
+ allData = [].concat(allData, finishedInfo);
3288
+ if (!(needHandleSha1.length === 0)) {
3289
+ _context.next = 24;
3288
3290
  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
- }
3291
+ }
3292
+ return _context.abrupt("break", 28);
3293
+ case 24:
3294
+ _context.next = 26;
3295
+ return promiseSleep(delay);
3296
+ case 26:
3297
+ _context.next = 7;
3298
+ break;
3299
+ case 28:
3300
+ return _context.abrupt("return", {
3301
+ error: '',
3302
+ result: allData
3303
+ });
3304
+ case 29:
3305
+ case "end":
3306
+ return _context.stop();
3300
3307
  }
3301
3308
  }, _callee);
3302
3309
  }));
@@ -3310,8 +3317,7 @@ var recombination = {
3310
3317
 
3311
3318
  function operationCategories(_temp) {
3312
3319
  var _ref = _temp === void 0 ? {} : _temp,
3313
- params = _extends({}, _ref);
3314
-
3320
+ params = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
3315
3321
  return FUtil.Request({
3316
3322
  method: 'GET',
3317
3323
  url: "/v2/resources/operation-categories/listSimpleByGroup",
@@ -3319,8 +3325,7 @@ function operationCategories(_temp) {
3319
3325
  });
3320
3326
  }
3321
3327
  function recordRank(_ref2) {
3322
- var params = _extends({}, _ref2);
3323
-
3328
+ var params = _extends({}, (_objectDestructuringEmpty(_ref2), _ref2));
3324
3329
  return FUtil.Request({
3325
3330
  method: 'POST',
3326
3331
  url: "/v2/activities/coin/record/rank",
@@ -3328,8 +3333,7 @@ function recordRank(_ref2) {
3328
3333
  });
3329
3334
  }
3330
3335
  function rankInfo(_ref3) {
3331
- var params = _extends({}, _ref3);
3332
-
3336
+ var params = _extends({}, (_objectDestructuringEmpty(_ref3), _ref3));
3333
3337
  return FUtil.Request({
3334
3338
  method: 'POST',
3335
3339
  url: "/v2/activities/coin/record/rankInfo",
@@ -3344,6 +3348,29 @@ var Operation = {
3344
3348
  rankInfo: rankInfo
3345
3349
  };
3346
3350
 
3351
+ function getInfoByCode(_ref) {
3352
+ var params = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
3353
+ return FUtil.Request({
3354
+ method: 'GET',
3355
+ url: "/v2/resources/types/getInfoByCode",
3356
+ params: params
3357
+ });
3358
+ }
3359
+ function getInfoByCodeOrName(_ref2) {
3360
+ var params = _extends({}, (_objectDestructuringEmpty(_ref2), _ref2));
3361
+ return FUtil.Request({
3362
+ method: 'GET',
3363
+ url: "/v2/resources/types/getInfoByCodeOrName",
3364
+ params: params
3365
+ });
3366
+ }
3367
+
3368
+ var ResourceType = {
3369
+ __proto__: null,
3370
+ getInfoByCode: getInfoByCode,
3371
+ getInfoByCodeOrName: getInfoByCodeOrName
3372
+ };
3373
+
3347
3374
  var FServiceAPI = {
3348
3375
  Node: Node,
3349
3376
  Exhibit: Exhibit,
@@ -3362,9 +3389,11 @@ var FServiceAPI = {
3362
3389
  I18n: I18n,
3363
3390
  Policy: Policy,
3364
3391
  recombination: recombination,
3365
- Operation: Operation
3392
+ Operation: Operation,
3393
+ ResourceType: ResourceType
3366
3394
  };
3367
3395
 
3396
+ // import from '../service-API';
3368
3397
  var codeMessage = {
3369
3398
  200: '服务器成功返回请求的数据。',
3370
3399
  201: '新建或修改数据成功。',
@@ -3381,8 +3410,8 @@ var codeMessage = {
3381
3410
  502: '网关错误。',
3382
3411
  503: '服务不可用,服务器暂时过载或维护。',
3383
3412
  504: '网关超时。'
3384
- }; // export let apiHost: string = '';
3385
-
3413
+ };
3414
+ // export let apiHost: string = '';
3386
3415
  if (window.location.hostname.includes('.com')) {
3387
3416
  // apiHost = `${window.location.protocol}//qi.${(window.location.host.match(/(?<=\.).*/) || [''])[0]}`;
3388
3417
  // apiHost = window.location.origin.replace('console', 'qi');
@@ -3412,8 +3441,6 @@ if (window.location.hostname.includes('.com')) {
3412
3441
  // };
3413
3442
  //
3414
3443
  // // Add a request interceptor
3415
-
3416
-
3417
3444
  axios.interceptors.request.use(function (config) {
3418
3445
  // Do something before request is sent
3419
3446
  // NProgress.start();
@@ -3426,10 +3453,8 @@ axios.interceptors.request.use(function (config) {
3426
3453
  /**
3427
3454
  * 配置request请求时的默认参数
3428
3455
  */
3429
-
3430
3456
  axios.interceptors.response.use(function (response) {
3431
3457
  var _headers$contentDisp;
3432
-
3433
3458
  // Do something with response data
3434
3459
  // console.log(response, 'response!!!!!!');
3435
3460
  // NProgress.done();
@@ -3437,18 +3462,17 @@ axios.interceptors.response.use(function (response) {
3437
3462
  var error = {
3438
3463
  description: codeMessage[response.status],
3439
3464
  message: response.status
3440
- }; // notification.error(error);
3441
-
3465
+ };
3466
+ // notification.error(error);
3442
3467
  throw new Error(JSON.stringify(error));
3443
3468
  }
3444
-
3445
3469
  var data = response.data,
3446
- headers = response.headers;
3447
-
3470
+ headers = response.headers;
3448
3471
  if ((_headers$contentDisp = headers['content-disposition']) != null && _headers$contentDisp.includes('attachment;')) {
3449
3472
  // downloadFile(response);
3450
3473
  return;
3451
- } // console.log(data, 'data2390jasdflkf');
3474
+ }
3475
+ // console.log(data, 'data2390jasdflkf');
3452
3476
  // if ((data.errcode === undefined
3453
3477
  // ? (data.errCode !== 0 && data.errCode !== 2)
3454
3478
  // : (data.errcode !== 0 && data.errcode !== 2))
@@ -3459,8 +3483,6 @@ axios.interceptors.response.use(function (response) {
3459
3483
  // // });
3460
3484
  // throw new Error(JSON.stringify(data));
3461
3485
  // }
3462
-
3463
-
3464
3486
  return data;
3465
3487
  }, function (error) {
3466
3488
  // Do something with response error
@@ -3470,51 +3492,40 @@ axios.interceptors.response.use(function (response) {
3470
3492
  function request(_x, _x2) {
3471
3493
  return _request.apply(this, arguments);
3472
3494
  }
3473
-
3474
3495
  function _request() {
3475
- _request = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(config, _temp) {
3496
+ _request = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(config, _temp) {
3476
3497
  var _ref, _ref$noRedirect, noRedirect, _ref$noErrorAlert, noErrorAlert, result;
3477
-
3478
3498
  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({
3499
+ while (1) switch (_context.prev = _context.next) {
3500
+ case 0:
3501
+ _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;
3502
+ _context.next = 3;
3503
+ return axios.request(config);
3504
+ case 3:
3505
+ result = _context.sent;
3506
+ if (!(result.errCode === 30 && !noRedirect)) {
3507
+ _context.next = 10;
3508
+ break;
3509
+ }
3510
+ _context.next = 7;
3511
+ return FServiceAPI.User.logout();
3512
+ case 7:
3513
+ window.location.replace("" + completeUrlByDomain('user') + login({
3514
+ goTo: window.location.href
3515
+ }));
3516
+ _context.next = 11;
3517
+ break;
3518
+ case 10:
3519
+ if (result.ret === 4 && result.errCode === 10 && !noRedirect) {
3520
+ window.location.replace("" + completeUrlByDomain('user') + userFreeze({
3499
3521
  goTo: window.location.href
3500
3522
  }));
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
- }
3523
+ }
3524
+ case 11:
3525
+ return _context.abrupt("return", result);
3526
+ case 12:
3527
+ case "end":
3528
+ return _context.stop();
3518
3529
  }
3519
3530
  }, _callee);
3520
3531
  }));
@@ -3523,20 +3534,16 @@ function _request() {
3523
3534
 
3524
3535
  function useGetState(initVal) {
3525
3536
  var _React$useState = useState(initVal),
3526
- state = _React$useState[0],
3527
- setState = _React$useState[1];
3528
-
3537
+ state = _React$useState[0],
3538
+ setState = _React$useState[1];
3529
3539
  var ref = useRef(initVal);
3530
-
3531
3540
  function setStateCopy(newVal) {
3532
3541
  ref.current = newVal;
3533
3542
  setState(newVal);
3534
3543
  }
3535
-
3536
3544
  function getState() {
3537
3545
  return ref.current;
3538
3546
  }
3539
-
3540
3547
  return [state, setStateCopy, getState];
3541
3548
  }
3542
3549
 
@@ -3545,6 +3552,7 @@ var Hook = {
3545
3552
  useGetState: useGetState
3546
3553
  };
3547
3554
 
3555
+ // import I18n from '../i18n';
3548
3556
  var FUtil = {
3549
3557
  Format: Format,
3550
3558
  Regexp: Regexp,
@@ -3567,12 +3575,11 @@ var allLanguage = [{
3567
3575
  value: 'zh_CN',
3568
3576
  label: '简体中文'
3569
3577
  }];
3570
-
3571
3578
  var I18nNext = /*#__PURE__*/function () {
3572
3579
  function I18nNext() {
3573
3580
  this._loadingData = 'NotStart';
3574
- this._taskQueue = []; // private _currentLanguage: LanguageKeyType = window.localStorage.getItem(localStorage_i18nextLng_key) as null || 'zh_CN';
3575
-
3581
+ this._taskQueue = [];
3582
+ // private _currentLanguage: LanguageKeyType = window.localStorage.getItem(localStorage_i18nextLng_key) as null || 'zh_CN';
3576
3583
  this._currentLanguage = Cookies.get(localStorage_i18nextLng_key) || 'zh_CN';
3577
3584
  this.ready();
3578
3585
  this.ready = this.ready.bind(this);
@@ -3581,100 +3588,77 @@ var I18nNext = /*#__PURE__*/function () {
3581
3588
  this.getAllLanguage = this.getAllLanguage.bind(this);
3582
3589
  this.getCurrentLanguage = this.getCurrentLanguage.bind(this);
3583
3590
  }
3584
-
3585
3591
  var _proto = I18nNext.prototype;
3586
-
3587
3592
  _proto.ready = /*#__PURE__*/function () {
3588
- var _ready = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
3593
+ var _ready = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
3589
3594
  var _this = this;
3590
-
3591
3595
  var exc, handleTasks, promise;
3592
3596
  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();
3597
+ while (1) switch (_context2.prev = _context2.next) {
3598
+ case 0:
3599
+ exc = function exc() {
3600
+ while (_this._taskQueue.length > 0) {
3601
+ var task = _this._taskQueue.shift();
3602
+ task && task();
3603
+ }
3604
+ };
3605
+ handleTasks = /*#__PURE__*/function () {
3606
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
3607
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
3608
+ while (1) switch (_context.prev = _context.next) {
3609
+ case 0:
3610
+ if (!(_this._loadingData === 'End')) {
3611
+ _context.next = 3;
3612
+ break;
3639
3613
  }
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
- }
3614
+ exc();
3615
+ return _context.abrupt("return");
3616
+ case 3:
3617
+ if (!(_this._loadingData === 'Start')) {
3618
+ _context.next = 5;
3619
+ break;
3620
+ }
3621
+ return _context.abrupt("return");
3622
+ case 5:
3623
+ // NO_START
3624
+ _this._loadingData = 'Start';
3625
+ _context.next = 8;
3626
+ return _this._handleData();
3627
+ case 8:
3628
+ // console.log('######');
3629
+ exc();
3630
+ case 9:
3631
+ case "end":
3632
+ return _context.stop();
3633
+ }
3634
+ }, _callee);
3635
+ }));
3636
+ return function handleTasks() {
3637
+ return _ref.apply(this, arguments);
3638
+ };
3639
+ }();
3640
+ promise = new Promise(function (resolve) {
3641
+ _this._taskQueue.push(resolve);
3642
+ });
3643
+ handleTasks();
3644
+ return _context2.abrupt("return", promise);
3645
+ case 5:
3646
+ case "end":
3647
+ return _context2.stop();
3659
3648
  }
3660
3649
  }, _callee2);
3661
3650
  }));
3662
-
3663
3651
  function ready() {
3664
3652
  return _ready.apply(this, arguments);
3665
3653
  }
3666
-
3667
3654
  return ready;
3668
3655
  }();
3669
-
3670
3656
  _proto.t = function t(key, options) {
3671
3657
  return i18next.t(key.trim(), options);
3672
3658
  };
3673
-
3674
3659
  _proto.tJSXElement = function tJSXElement(key, options) {
3675
3660
  return htmlReactParser(i18next.t(key.trim(), options));
3676
3661
  };
3677
-
3678
3662
  _proto.changeLanguage = function changeLanguage(lng) {
3679
3663
  // return i18next.changeLanguage(lng);
3680
3664
  // window.localStorage.setItem(localStorage_i18nextLng_key, lng)
@@ -3683,135 +3667,104 @@ var I18nNext = /*#__PURE__*/function () {
3683
3667
  domain: FUtil.Format.completeUrlByDomain('').replace(/http(s)?:\/\//, '')
3684
3668
  });
3685
3669
  };
3686
-
3687
3670
  _proto.getAllLanguage = function getAllLanguage() {
3688
3671
  return allLanguage;
3689
3672
  };
3690
-
3691
3673
  _proto.getCurrentLanguage = function getCurrentLanguage() {
3692
3674
  return this._currentLanguage;
3693
3675
  };
3694
-
3695
3676
  _proto._handleData = /*#__PURE__*/function () {
3696
- var _handleData2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
3677
+ var _handleData2 = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
3697
3678
  var lng, resource, i18nextResources;
3698
3679
  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;
3680
+ while (1) switch (_context3.prev = _context3.next) {
3681
+ case 0:
3682
+ lng = this._currentLanguage;
3683
+ resource = window.localStorage.getItem(localStorage_i18nextResources_key); // const resource: string | undefined = Cookies.get(decodeURIComponent(localStorage_i18nextResources_key));
3684
+ i18nextResources = resource ? JSON.parse(resource) : null;
3685
+ if (i18nextResources) {
3686
+ _context3.next = 9;
3718
3687
  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
- }
3688
+ }
3689
+ _context3.next = 6;
3690
+ return this._fetchData();
3691
+ case 6:
3692
+ i18nextResources = _context3.sent;
3693
+ _context3.next = 10;
3694
+ break;
3695
+ case 9:
3696
+ this._fetchData();
3697
+ case 10:
3698
+ _context3.next = 12;
3699
+ return i18next.init({
3700
+ // the translations
3701
+ // (tip move them in a JSON file and import them,
3702
+ // or even better, manage them via a UI: https://react.i18next.com/guides/multiple-translation-files#manage-your-translations-with-a-management-gui)
3703
+ resources: i18nextResources,
3704
+ lng: lng,
3705
+ fallbackLng: 'zh_CN',
3706
+ interpolation: {
3707
+ escapeValue: false,
3708
+ prefix: '{',
3709
+ suffix: '}'
3710
+ }
3711
+ });
3712
+ case 12:
3713
+ this._loadingData = 'End';
3714
+ case 13:
3715
+ case "end":
3716
+ return _context3.stop();
3746
3717
  }
3747
3718
  }, _callee3, this);
3748
3719
  }));
3749
-
3750
3720
  function _handleData() {
3751
3721
  return _handleData2.apply(this, arguments);
3752
3722
  }
3753
-
3754
3723
  return _handleData;
3755
3724
  }();
3756
-
3757
3725
  _proto._fetchData = /*#__PURE__*/function () {
3758
- var _fetchData2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
3726
+ var _fetchData2 = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
3759
3727
  var url, res, en_US, zh_CN, _i, _Object$entries, _Object$entries$_i, key, value, result;
3760
-
3761
3728
  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'];
3729
+ while (1) switch (_context4.prev = _context4.next) {
3730
+ case 0:
3731
+ url = window.location.origin.includes('.freelog.com') ? ossJsonUrl : ossJsonUrl_Test;
3732
+ _context4.next = 3;
3733
+ return axios.get(url + '?timestamp=' + Date.now(), {
3734
+ withCredentials: false
3735
+ });
3736
+ case 3:
3737
+ res = _context4.sent;
3738
+ // console.log(res, 'data09oiw3qjelsfkdfjlsdkfjl');
3739
+ en_US = {};
3740
+ zh_CN = {};
3741
+ for (_i = 0, _Object$entries = Object.entries(res); _i < _Object$entries.length; _i++) {
3742
+ _Object$entries$_i = _Object$entries[_i], key = _Object$entries$_i[0], value = _Object$entries$_i[1];
3743
+ // console.log(key, value, 'key, value90iowsldfjlsdkj');
3744
+ en_US[key] = value['en_US'];
3745
+ zh_CN[key] = value['zh_CN'];
3746
+ }
3747
+ result = {
3748
+ en_US: {
3749
+ translation: en_US
3750
+ },
3751
+ zh_CN: {
3752
+ translation: zh_CN
3782
3753
  }
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
- }
3754
+ };
3755
+ window.localStorage.setItem(localStorage_i18nextResources_key, JSON.stringify(result));
3756
+ return _context4.abrupt("return", result);
3757
+ case 10:
3758
+ case "end":
3759
+ return _context4.stop();
3804
3760
  }
3805
3761
  }, _callee4);
3806
3762
  }));
3807
-
3808
3763
  function _fetchData() {
3809
3764
  return _fetchData2.apply(this, arguments);
3810
3765
  }
3811
-
3812
3766
  return _fetchData;
3813
3767
  }();
3814
-
3815
3768
  return I18nNext;
3816
3769
  }();
3817
3770